:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --line: #e2e6eb;
  --line-strong: #cfd6de;
  --ink: #18222e;
  --muted: #6a7787;
  --accent: #1666b8;
  --accent-soft: #e8f1fb;
  --ok: #1c8a4f;
  --ok-soft: #e6f5ec;
  --warn: #a86500;
  --warn-soft: #fdf3e0;
  --err: #bf2c2c;
  --err-soft: #fdeaea;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(20, 32, 48, .06), 0 4px 12px rgba(20, 32, 48, .04);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.55 system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
}

button, input, select, textarea { font: inherit; color: inherit; }

.app { display: grid; grid-template-rows: 52px 1fr; height: 100vh; }

.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 0 16px; background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 650; letter-spacing: .2px; }
.brand span { color: var(--accent); }
.topbar .spacer { flex: 1; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: 999px; font-size: 12px;
  background: #eef1f4; color: var(--muted); white-space: nowrap;
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.err { background: var(--err-soft); color: var(--err); }
.badge.info { background: var(--accent-soft); color: var(--accent); }

.btn {
  border: 1px solid var(--line-strong); background: var(--panel);
  padding: 6px 13px; border-radius: 6px; cursor: pointer;
  transition: background .12s, border-color .12s;
}
.btn:hover { background: #f7f9fb; border-color: #b9c2cc; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #125aa4; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { background: #eef1f4; color: var(--ink); }

/* 详情页左上角的「← 一览」：给点底色，像个可点的返回键 */
#btn-back {
  background: #eef4fb;
  border-color: #d7e4f2;
  color: #2c4f74;
  font-weight: 500;
  padding: 4px 11px;
}
#btn-back:hover {
  background: #e2ecf9;
  border-color: #c4daf1;
  color: var(--accent);
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.sm { padding: 3px 9px; font-size: 12.5px; }
.btn.lg { padding: 9px 22px; font-size: 14px; font-weight: 560; }

.workspace { display: grid; grid-template-columns: 286px 1fr; min-height: 0; }

/* ---------------- 侧栏 ---------------- */
.sidebar {
  background: var(--panel); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; min-height: 0;
}
.sidebar-head { padding: 12px 12px 8px; display: flex; gap: 8px; }
.sidebar-head .btn { flex: 1; }
.ship-list { overflow: auto; padding: 10px 12px 12px; }
.ship {
  padding: 9px 10px; border-radius: 7px; cursor: pointer;
  border: 1px solid transparent; margin-bottom: 3px;
}
.ship:hover { background: #f5f7f9; }
.ship.active { background: var(--accent-soft); border-color: #c9dff5; }
.ship .t { font-weight: 560; font-size: 13.5px; display: flex; justify-content: space-between; gap: 6px; }
.ship .m { color: var(--muted); font-size: 12px; margin-top: 2px; }
.ship .t small { color: var(--muted); font-weight: 400; }
.empty-hint { color: var(--muted); font-size: 13px; padding: 18px 10px; text-align: center; }

/* ---------------- 主区 ---------------- */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.main-head {
  padding: 12px 18px; background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.main-head .row1 { display: flex; align-items: center; gap: 10px; }
.main-head h1 { font-size: 16px; margin: 0; font-weight: 620; }
.main-head .sub { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.main-head .actions { display: flex; gap: 8px; margin-left: auto; align-items: center; }

.tabs { display: flex; gap: 2px; padding: 0 18px; background: var(--panel);
        border-bottom: 1px solid var(--line); }
.tab {
  padding: 9px 14px; cursor: pointer; color: var(--muted);
  border-bottom: 2px solid transparent; font-size: 13.5px; user-select: none;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 560; }
.tab .n { font-size: 11px; background: #eef1f4; border-radius: 999px; padding: 0 6px; margin-left: 5px; }
.tab.active .n { background: var(--accent-soft); }

.body { flex: 1; overflow: auto; padding: 18px; }
.pane { display: none; }
.pane.active { display: block; }

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 14px;
}
.card-h { padding: 10px 14px; border-bottom: 1px solid var(--line);
          display: flex; align-items: center; gap: 10px; }
.card-h h3 { margin: 0; font-size: 13.5px; font-weight: 600; }
.card-h .hint { color: var(--muted); font-size: 12px; }
.card-b { padding: 14px; }

/* 单据一览的筛选条：上下滚动时吸在顶部，不跟着表格滚走 */
.filter-card {
  position: sticky; top: 0;
  z-index: 30;
  margin-bottom: 14px;
  background: var(--panel);
}
.filter-card .card-b { padding: 12px 14px; }

/* 单据一览：整页不滚，只有表格区域滚——表头、筛选条、翻页条都固定 */
.ov-body {
  display: flex; flex-direction: column;
  overflow: hidden;
}
.ov-body .filter-card { position: static; flex: 0 0 auto; }
.ov-body .table-card {
  flex: 1 1 auto; min-height: 0; margin-bottom: 0;
  display: flex; flex-direction: column;
}
.ov-body .table-wrap {
  flex: 1 1 auto; min-height: 0;
  overflow: auto;            /* 纵向滚动条在表格区域内 */
}
.ov-body .table-wrap thead th {
  position: sticky; top: 0; z-index: 5;   /* 表头也跟着固定 */
  background: #f5f7fa;
}
.ov-body .pager { flex: 0 0 auto; padding: 12px 14px 14px; }

/* ---------------- 上传 ---------------- */
.dropzone {
  border: 1.5px dashed var(--line-strong); border-radius: var(--radius);
  padding: 26px; text-align: center; color: var(--muted); cursor: pointer;
  transition: background .12s, border-color .12s;
}
.dropzone:hover, .dropzone.over { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.dropzone strong { color: var(--ink); display: block; margin-bottom: 4px; font-size: 14px; }

.doc-list { margin-top: 12px; display: grid; gap: 8px; }
.doc {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 7px; background: #fcfdfe;
}
.doc .kind {
  font-size: 11px; padding: 1px 7px; border-radius: 4px;
  background: #eef1f4; color: var(--muted); text-transform: uppercase;
}
.doc .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc .meta { color: var(--muted); font-size: 12px; }

/* ---------------- 字段表单 ---------------- */
.group { margin-bottom: 18px; }
.group > h4 {
  margin: 0 0 9px; font-size: 12.5px; font-weight: 600; color: var(--muted);
  letter-spacing: .4px; text-transform: uppercase;
}
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 14px; }
.grid .full { grid-column: 1 / -1; }

.field label {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--muted); margin-bottom: 3px;
}
.field label .req { color: var(--err); }
.field input, .field select {
  width: 100%; padding: 7px 9px; border: 1px solid var(--line-strong);
  border-radius: 6px; background: #fff; outline: none;
}
.field input:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field.low input, .field.low select { border-color: #e2b45e; background: #fffdf7; }
.field.missing input, .field.missing select { border-color: #e8a0a0; background: #fffafa; }

.conf { font-size: 11px; padding: 0 5px; border-radius: 3px; letter-spacing: .2px; }
.conf.high { background: var(--ok-soft); color: var(--ok); }
.conf.mid  { background: var(--warn-soft); color: var(--warn); }
.conf.low  { background: var(--err-soft); color: var(--err); }
.conf.manual { background: var(--accent-soft); color: var(--accent); }

/* ---------------- 表体 ---------------- */
.table-wrap { overflow-x: auto; }
table.items { width: 100%; border-collapse: collapse; font-size: 13px; }
table.items th {
  text-align: left; font-weight: 600; font-size: 12px; color: var(--muted);
  padding: 7px 8px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.items td { padding: 4px 6px; border-bottom: 1px solid #f0f2f5; vertical-align: middle; }
table.items tr:hover td { background: #fafbfc; }
table.items input, table.items select {
  width: 100%; border: 1px solid transparent; border-radius: 5px;
  padding: 5px 6px; background: transparent; min-width: 0;
}
table.items input:hover, table.items select:hover { border-color: var(--line-strong); background: #fff; }
table.items input:focus, table.items select:focus {
  border-color: var(--accent); background: #fff; outline: none;
  box-shadow: 0 0 0 2px var(--accent-soft);
}
table.items input.num { text-align: right; font-variant-numeric: tabular-nums; }
table.items .seq { color: var(--muted); font-size: 12px; text-align: center; width: 34px; }
table.items .del { color: var(--muted); cursor: pointer; padding: 0 6px; }
table.items .del:hover { color: var(--err); }
.col-wide { min-width: 200px !important; }

/* ---------------- 校验 ---------------- */
.issue {
  display: flex; gap: 10px; padding: 9px 12px; border-radius: 6px;
  border: 1px solid var(--line); margin-bottom: 7px; background: #fff;
  cursor: pointer;
}
.issue:hover { border-color: var(--line-strong); background: #fcfdfe; }
.issue .dot { width: 3px; border-radius: 3px; flex: none; }
.issue.error .dot { background: var(--err); }
.issue.warn .dot { background: #e0a53a; }
.issue.info .dot { background: #7aa7d8; }
.issue .code { font-size: 11px; color: var(--muted); font-family: ui-monospace, Consolas, monospace; }
.issue .msg { font-size: 13px; }
.issue .hint { color: var(--muted); font-size: 12px; margin-top: 2px; }

.summary { display: flex; gap: 8px; margin-bottom: 12px; }

/* ---------------- 来源 ---------------- */
.evidence-box {
  margin-top: 12px; padding: 10px 12px; background: #fbfcfd;
  border: 1px solid var(--line); border-radius: 7px; font-size: 12.5px;
}
.evidence-box .k { color: var(--muted); }
.evidence-box code {
  font-family: ui-monospace, Consolas, monospace;
  background: #f1f4f7; padding: 1px 5px; border-radius: 4px; font-size: 12px;
}

/* ---------------- 导出 ---------------- */
pre.out {
  background: #0f1720; color: #d7e3ee; padding: 14px; border-radius: 7px;
  overflow: auto; max-height: 460px; font-size: 12px;
  font-family: ui-monospace, Consolas, monospace; margin: 0;
}
.dl-row { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }

.notice {
  background: #fffdf5; border: 1px solid #f0e0b8; border-radius: 7px;
  padding: 10px 12px; font-size: 12.5px; line-height: 1.7; color: #6b5520;
}
.notice b { color: #4a3a12; }
.notice.warn {
  background: #fff6f3; border-color: #f3cfc4; color: #7a4232;
}
.notice.warn b { color: #8c3d28; }
.todo-list { margin: 6px 0 0; padding-left: 20px; }
.todo-list li { margin: 2px 0; }
.notice code {
  background: #fff; border: 1px solid #eadfc0; border-radius: 4px;
  padding: 0 4px; font-size: 12px; font-family: ui-monospace, Consolas, monospace;
}

/* ---------------- 发送 ---------------- */
/* 与「导出文件」卡片的按钮行保持同样的下间距（.dl-row 也是 12px） */
.send-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.err-hint { color: var(--err); }

.sent-list { margin-top: 16px; border-top: 1px dashed var(--line); padding-top: 10px; }
.sent-list-h { font-size: 12px; color: var(--muted); margin-bottom: 6px; }

.sent-file {
  margin-top: 8px; padding: 10px 12px; border-radius: 7px;
  background: var(--ok-soft); border: 1px solid #cfe8da;
}
.sent-file .sf-name { font-size: 13px; font-weight: 560; color: #14653c; }
.sent-file .sf-path {
  font-size: 11.5px; color: #3f6b55; margin-top: 3px;
  word-break: break-all; user-select: all;
}
.sent-file .sf-meta { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

/* ---------------- 报关单录入表 ---------------- */
.decl-head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
  background: linear-gradient(#fbfcfd, #f6f8fa);
}
.decl-head h2 { margin: 0; font-size: 16px; font-weight: 650; letter-spacing: .5px; }
.decl-head .decl-sub { color: var(--muted); font-size: 12px; margin-top: 3px; }

.decl-wrap { max-width: 1180px; }
.decl-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.decl-grid {
  width: 100%; border-collapse: collapse; table-layout: fixed; margin-bottom: 4px;
}
.decl-grid th {
  text-align: right; font-weight: 500; font-size: 11.5px; color: var(--muted);
  background: #f5f7fa; padding: 3px 7px;
  border: 1px solid var(--line); white-space: nowrap;
}
.decl-grid td { border: 1px solid var(--line); padding: 0; }
.decl-grid .dl-input {
  width: 100%; border: 0; background: transparent;
  padding: 4px 7px; font-size: 12.5px; border-radius: 0; line-height: 1.5;
}
.decl-grid .dl-input:focus {
  outline: 2px solid var(--accent); outline-offset: -2px; background: #fff;
}
.decl-grid .req-empty { background: #fff8f8; }
.decl-grid .lowconf { background: #fffdf5; }
.decl-grid .has-err { box-shadow: inset 3px 0 0 var(--err); background: #fffafa; }
.decl-grid th.has-err { color: var(--err); background: #fdf0f0; }

/* 待确认：整格琥珀色，标签加粗、左边一条竖条，输入框淡黄底 —— 一眼能看到 */
.decl-grid .lf.pending {
  background: #fff8e6;
  box-shadow: inset 3px 0 0 #e0a53a;
}
.decl-grid .lf.pending .lb {
  color: #8a5a00; font-weight: 700;
}
.decl-grid .lf.pending .cfm { opacity: 1; }
.decl-grid input.pending,
.decl-grid select.pending,
.decl-grid textarea.pending {
  background: #fffdf2 !important;
  border-color: #e8c877 !important;
}
.decl-grid th .req { color: var(--err); margin-left: 2px; }

.i-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  margin-right: 5px; vertical-align: middle;
}
.i-dot.ok { background: #3aa66b; }
.i-dot.mid { background: #e0a53a; }
.i-dot.low { background: #d24b4b; }
.i-dot.none { background: #d9dee4; }
.i-dot.done {
  background: none; width: auto; height: auto;
  font-style: normal; font-size: 10px; color: var(--ok); font-weight: 700;
}

.decl-grid th .cfm {
  margin-left: 7px; width: 18px; height: 18px; padding: 0;
  border: 1px solid #cfe0d4; background: #f3faf5; color: #3aa66b;
  border-radius: 50%; font-size: 10px; line-height: 1; cursor: pointer;
  vertical-align: middle; opacity: 0; transition: all .12s;
}
.decl-grid th:hover .cfm, .decl-grid th.pending .cfm { opacity: 1; }
.decl-grid th .cfm:hover {
  color: #fff; border-color: #3aa66b; background: #3aa66b; transform: scale(1.08);
}
.decl-grid th.pending { background: #fffdf5; }

.decl-wrap h4.sec {
  margin: 14px 0 5px; font-size: 12px; font-weight: 600;
  letter-spacing: .4px; color: var(--muted);
}
.decl-wrap h4.sec:first-of-type { margin-top: 0; }

.decl-toolbar {
  display: flex; align-items: center; gap: 12px;
  margin: 10px 0 6px; padding-top: 2px; border-top: none;
  font-size: 12.5px;
}
.decl-toolbar .tl { font-weight: 600; color: var(--muted); letter-spacing: .3px; }

.decl-items { margin-bottom: 10px; }
.decl-items th { text-align: center; }
.decl-items .seqcell {
  text-align: center; color: var(--muted); font-size: 12px;
  border-right: 1px solid var(--line);
}
.decl-items .opcell { text-align: center; }
.decl-items .del { color: var(--muted); cursor: pointer; font-size: 12px; }
.decl-items .del:hover { color: var(--err); }
.decl-items .empty-row { padding: 16px; color: var(--muted); font-size: 13px; }
.decl-grid .dl-input.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------------- 杂项 ---------------- */
.btn.danger { color: var(--err); border-color: #e7b9b9; }
.btn.danger:hover { background: var(--err-soft); border-color: var(--err); }

#ship-view, #overview { display: flex; flex-direction: column; flex: 1; min-height: 0; }

/* ---------------- 侧栏 ---------------- */
/* 「单据一览」是入口，不是单据：用底色区分；左右内边距和下面的单据保持一致，两列对齐 */
.side-link {
  display: flex; align-items: center; gap: 6px;
  margin: 2px 0 10px; padding: 9px 10px; border-radius: 7px;
  cursor: pointer; font-size: 13.5px; font-weight: 600;
  background: linear-gradient(180deg, #f2f6fb 0%, #e9f0f8 100%);
  border: 1px solid #d8e4f1;
  color: #1c3f63;
}
.side-link:hover {
  background: linear-gradient(180deg, #eaf2fb 0%, #dfeaf7 100%);
  border-color: #c7d9ec;
}
.side-link.active {
  background: var(--accent-soft); color: var(--accent);
  border-color: #c9dff5;
}
.side-link .n { margin-left: auto; font-size: 11px; background: #fff;
  border: 1px solid #dbe6f2; border-radius: 999px; padding: 0 7px; color: var(--muted); }
.side-link.active .n { background: #fff; color: var(--accent); border-color: #c9dff5; }

.side-sec {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 12px 5px; font-size: 11.5px; color: var(--muted);
  cursor: pointer; letter-spacing: .3px;
}
.side-sec:hover { color: var(--ink); }
.side-sec .dot { width: 6px; height: 6px; border-radius: 50%; }
.side-sec .n { margin-left: auto; font-size: 11px; background: #eef1f4;
  border-radius: 999px; padding: 0 6px; }
.side-empty { padding: 2px 12px 8px; color: #aab3bd; font-size: 12px; }
.side-more { padding: 2px 12px 10px; font-size: 12px; color: var(--accent); cursor: pointer; }
.side-more:hover { text-decoration: underline; }

/* 字典字段的自定义下拉：最多 10 行，超出滚动 */
.cmb-pop {
  position: fixed; z-index: 9998;
  background: #fff; border: 1px solid #c9d7e6; border-radius: 6px;
  box-shadow: 0 8px 22px rgba(15, 32, 52, .16);
  padding: 4px; max-height: 308px; overflow-y: auto;
  font-size: 13px;
}
.cmb-item {
  height: 30px; line-height: 30px; padding: 0 10px;
  border-radius: 4px; cursor: pointer; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; color: #1f2d3d;
}
.cmb-item.on { background: var(--accent-soft); color: var(--accent); }
.cmb-item:hover { background: #f2f6fb; }
.cmb-empty { padding: 8px 10px; color: var(--muted); }

/* 标题就地编辑（只在单据详情页头） */
#ship-title { cursor: text; }
#ship-title:hover { text-decoration: underline dotted; text-underline-offset: 3px; }
.title-input {
  font: inherit; color: inherit; width: 100%; max-width: 26em;
  padding: 1px 4px; border: 1px solid var(--accent); border-radius: 4px;
  background: #fff; outline: none;
}
#ship-title .title-input { font-size: inherit; font-weight: inherit; }

/* ---------------- 单据一览 ---------------- */
.filter-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search-group { display: flex; gap: 8px; flex: 1 1 240px; min-width: 0; }
.search-input {
  flex: 1; min-width: 220px; padding: 6px 10px;
  border: 1px solid var(--line-strong); border-radius: 6px; outline: none;
}
.search-group .search-input { min-width: 0; }
.search-group #ov-reset { flex: 0 0 auto; }
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.seg2 { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; }
.seg2 button {
  border: 0; background: #fff; padding: 6px 12px;
  font-size: 12.5px; color: var(--muted); cursor: pointer;
}
.seg2 button + button { border-left: 1px solid var(--line); }
.seg2 button:hover { background: #f7f9fb; }
.seg2 button.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.seg2.big button { padding: 8px 16px; font-size: 13px; }

.ov-table { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
.ov-table th {
  text-align: left; font-weight: 600; font-size: 11.5px; color: var(--muted);
  background: #f8fafb; padding: 8px 10px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.ov-table td { padding: 8px 10px; border-bottom: 1px solid #f0f2f5; white-space: nowrap; }
.ov-table tr[data-open] { cursor: pointer; }
.ov-table tr[data-open]:hover td { background: #fafbfd; }
.ov-table td.c, .ov-table th.c { text-align: center; }
.ov-table td.strong { font-weight: 550; }
.ov-table td.ellip { overflow: hidden; text-overflow: ellipsis; }
.ov-table td.stack div {
  overflow: hidden; text-overflow: ellipsis; line-height: 1.35; font-size: 12px;
}
.ov-table td.stack .sub { color: var(--muted); }
.ov-table .empty-row { padding: 26px; text-align: center; color: var(--muted); }

.tag { font-size: 11px; padding: 1px 7px; border-radius: 4px; }
.tag-in { background: var(--accent-soft); color: var(--accent); }
.tag-out { background: var(--ok-soft); color: var(--ok); }
.tag-none { background: #eef1f4; color: var(--muted); }
.err-n { color: var(--err); font-weight: 600; }

.pager {
  display: flex; align-items: center;
  padding: 10px 14px; border-top: 1px solid var(--line); font-size: 12.5px;
}

/* ---------------- 弹窗 ---------------- */
.modal {
  position: fixed; inset: 0; background: rgba(16, 24, 34, .38);
  display: flex; align-items: center; justify-content: center; z-index: 60;
}
.modal-box {
  background: #fff; border-radius: 10px; padding: 20px 22px; width: 420px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
}
.modal-box h3 { margin: 0 0 14px; font-size: 15px; }
.modal-label { display: block; font-size: 12px; color: var(--muted); margin: 14px 0 5px; }
.modal-box input {
  width: 100%; padding: 8px 10px;
  border: 1px solid var(--line-strong); border-radius: 6px; outline: none;
}
.modal-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

.toast {
  position: fixed; right: 20px; bottom: 20px; background: #1b2733; color: #fff;
  padding: 9px 14px; border-radius: 7px; font-size: 13px; opacity: 0;
  transform: translateY(8px); transition: .18s; pointer-events: none; z-index: 50;
  max-width: 420px;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.err { background: var(--err); }

.hidden { display: none !important; }
.mono { font-family: ui-monospace, Consolas, monospace; }
.muted { color: var(--muted); }
.right { margin-left: auto; }
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid rgba(255,255,255,.4);
        border-top-color: #fff; border-radius: 50%; animation: sp .7s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

/* 解析 / 校验期间锁屏：挡住所有点击，只留一个进度框 */
.busy-lock {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: rgba(15, 32, 52, .30);
  cursor: progress;
}
.busy-box {
  display: flex; align-items: center; gap: 14px;
  min-width: 280px; padding: 18px 24px;
  background: #fff; border-radius: 10px;
  box-shadow: 0 12px 34px rgba(15, 32, 52, .28);
}
.busy-box .spin {
  width: 18px; height: 18px; border-width: 3px;
  border-color: #cfe2f5; border-top-color: var(--accent);
}
.busy-title { font-size: 13.5px; color: #1a2330; font-weight: 600; }
.busy-sub { margin-top: 3px; font-size: 12px; color: #6b7a8c; }
body.busy .topbar,
body.busy .sidebar,
body.busy main { pointer-events: none; user-select: none; }

@media (max-width: 980px) {
  .workspace { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .grid { grid-template-columns: 1fr; }
}

/* ---------------- 登录 / 注册 ---------------- */
.auth-body {
  margin: 0; min-height: 100vh; background: #f5f7fa;
}
.auth-shell {
  display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh;
}

/* 左侧品牌面板 */
.auth-brand {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; gap: 30px;
  padding: 56px 60px;
  background:
    radial-gradient(900px 500px at 15% 10%, rgba(60, 140, 220, .28), transparent 60%),
    radial-gradient(700px 500px at 90% 90%, rgba(30, 90, 160, .35), transparent 55%),
    linear-gradient(155deg, #08213c 0%, #0e3355 55%, #0a2744 100%);
  color: #fff;
}
.auth-brand::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at 30% 30%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 30% 30%, #000 0%, transparent 78%);
}
.ab-watermark {
  position: absolute; right: -18px; bottom: -70px;
  font-size: 340px; font-weight: 800; line-height: 1;
  color: rgba(255, 255, 255, .035); pointer-events: none; user-select: none;
}
.ab-logo {
  font-size: 21px; font-weight: 700; letter-spacing: 1px;
  position: relative; z-index: 1;
}
.ab-logo span { color: #6fc2ff; }
.ab-title {
  margin: 0; font-size: 30px; line-height: 1.5; font-weight: 600;
  letter-spacing: .5px; position: relative; z-index: 1;
}
.ab-points {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 13px; position: relative; z-index: 1;
}
.ab-points li {
  position: relative; padding-left: 26px;
  color: #b9cde0; font-size: 13.5px; line-height: 1.6;
}
.ab-points li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 16px; height: 16px; line-height: 16px; text-align: center;
  font-size: 10px; color: #6fc2ff;
  border: 1px solid rgba(111, 194, 255, .45); border-radius: 50%;
  background: rgba(111, 194, 255, .1);
}
.ab-foot {
  color: #5d7d9c; font-size: 11.5px; letter-spacing: 1.2px;
  position: relative; z-index: 1; margin-top: 6px;
}

/* 右侧表单面板 */
.auth-panel {
  display: flex; align-items: center; justify-content: center;
  padding: 48px 40px; background: #fff;
}
.auth-box { width: 360px; }
.auth-head { margin-bottom: 22px; }
.auth-head h1 { margin: 0 0 6px; font-size: 24px; font-weight: 650; letter-spacing: .5px; }
.auth-sub { color: var(--muted); font-size: 13px; }

.auth-form label {
  display: block; font-size: 12.5px; color: #52606f;
  margin: 14px 0 6px; font-weight: 500;
}
.auth-form input {
  width: 100%; height: 44px; padding: 0 13px;
  border: 1px solid #d8dee6; border-radius: 9px; background: #fbfcfd;
  outline: none; font-size: 14px;
  transition: border-color .14s, box-shadow .14s, background .14s;
}
.auth-form input:hover { border-color: #c2cbd6; }
.auth-form input:focus {
  border-color: var(--accent); background: #fff;
  box-shadow: 0 0 0 4px rgba(22, 102, 184, .10);
}
.btn.block {
  display: block; width: 100%; height: 46px; margin-top: 24px;
  padding: 0; font-size: 15px; font-weight: 560; letter-spacing: 3px;
  border-radius: 9px;
  box-shadow: 0 6px 16px rgba(22, 102, 184, .22);
}
.btn.block:hover { box-shadow: 0 8px 20px rgba(22, 102, 184, .3); }
.btn.block:disabled { box-shadow: none; letter-spacing: 1px; }

.auth-links {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 16px; font-size: 12.5px;
}
.auth-links a { color: var(--accent); text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }

.auth-msg { margin-top: 16px; font-size: 12.5px; min-height: 18px; line-height: 1.7; }
.auth-msg.err { color: var(--err); }
.auth-msg.ok { color: var(--ok); }

.auth-note {
  background: #f5f8fc; border: 1px solid #e2e9f1; border-radius: 8px;
  padding: 10px 12px; font-size: 12.5px; color: #5b6979;
  margin: 2px 0 4px; line-height: 1.75;
}

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-panel { padding: 36px 22px; }
  .auth-box { width: 100%; max-width: 380px; }
}

/* ---------------- 用户管理 ---------------- */
.users-body { background: var(--bg); padding: 26px 0 64px; }
.users-wrap { width: min(1080px, 94vw); margin: 0 auto; padding-bottom: 48px; }
.users-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.users-head h1 { margin: 0 0 4px; font-size: 20px; }

/* ---------------- 工单 ---------------- */
.modal-box.wide { width: 540px; max-width: 92vw; max-height: 88vh; overflow-y: auto; }
.modal-tip {
  margin: -6px 0 4px; font-size: 12.5px; color: var(--muted); line-height: 1.7;
}
.modal-box textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line-strong);
  border-radius: 6px; outline: none; font: inherit; font-size: 13px;
  line-height: 1.7; resize: vertical; background: #fff;
}
.modal-box textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.modal-actions .btn.ghost.sm { margin-right: auto; }

/* 截图选择与预览 */
.shot-picker { display: flex; gap: 8px; }
.shot-add {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 12px; border: 1px dashed var(--line-strong); border-radius: 7px;
  font-size: 12.5px; color: var(--muted); cursor: pointer; user-select: none;
}
.shot-add:hover { border-color: var(--accent); color: var(--accent); }
.shot-add span { font-size: 14px; line-height: 1; }
.shot-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.shot { position: relative; }
.shot img {
  width: 76px; height: 76px; object-fit: cover; display: block;
  border: 1px solid var(--line); border-radius: 8px;
}
.shot-x {
  position: absolute; top: -6px; right: -6px;
  width: 20px; height: 20px; line-height: 18px; padding: 0;
  border: 1px solid var(--line-strong); border-radius: 50%;
  background: #fff; color: var(--muted); font-size: 11px; cursor: pointer;
}
.shot-x:hover { color: var(--err); border-color: var(--err); }

.ticket-filter { background: none; border: 0; box-shadow: none; padding: 0 0 14px; }

.ticket-list { display: grid; gap: 12px; }
.ticket {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; box-shadow: var(--shadow);
}
.ticket.closed { background: #fbfcfd; }
.tc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tc-title { font-weight: 600; font-size: 14px; }
.tc-status {
  margin-left: auto; font-size: 12px; padding: 2px 8px; border-radius: 20px;
  background: #eef6ff; color: var(--accent);
}
.tc-status.closed { background: #f0f2f5; color: var(--muted); }
.tc-meta { margin-top: 6px; font-size: 12px; color: var(--muted); }
.tc-body {
  margin-top: 8px; font-size: 13px; line-height: 1.8; color: #2a3949;
  white-space: pre-wrap; word-break: break-word;
}
.tc-reply {
  margin-top: 10px; padding: 9px 12px; border-radius: 8px;
  background: #f2f8ff; border-left: 3px solid var(--accent);
  font-size: 13px; line-height: 1.75; white-space: pre-wrap; word-break: break-word;
}
.tc-reply b { display: block; font-size: 12px; color: var(--accent); margin-bottom: 3px; }
.tc-shots { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.tc-shots img {
  width: 88px; height: 88px; object-fit: cover; display: block;
  border: 1px solid var(--line); border-radius: 8px; background: #fafbfc;
}
.tc-shots a:hover img { border-color: var(--accent); }
.tc-admin { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.tc-admin textarea { width: 100%; margin-bottom: 8px; }
.tc-admin-actions { display: flex; gap: 8px; justify-content: flex-end; }
.empty-hint {
  padding: 40px 20px; text-align: center; color: var(--muted); font-size: 13px;
  background: #fff; border: 1px dashed var(--line-strong); border-radius: 10px;
}
.head-actions { display: flex; gap: 8px; }

@media (max-width: 760px) {
  .ticket { padding: 12px 13px; }
  .tc-status { margin-left: 0; }
  .modal-box.wide { width: 100%; }
}
/* ---------------- 顶栏用户区 ---------------- */
.brand { display: flex; align-items: center; gap: 7px; }
.brand-mark { width: 21px; height: 21px; display: block; border-radius: 5px; }
.ab-logo { display: flex; align-items: center; gap: 9px; }
.ab-mark { width: 30px; height: 30px; display: block; }
.userbox { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.userbox .who { color: var(--ink); font-weight: 550; }
.userbox a { color: var(--accent); text-decoration: none; }
.userbox a:hover { text-decoration: underline; }

/* ---------------- 手机：表格变卡片 ---------------- */
@media (max-width: 760px) {
  /* 顶栏：允许换行，去掉次要信息 */
  .app { grid-template-rows: auto 1fr; }
  .topbar { flex-wrap: wrap; gap: 8px; padding: 8px 12px; }
  .topbar .spacer { display: none; }
  .brand { font-size: 15px; }
  #engine-badge, #flow-badge { display: none; }
  .userbox { margin-left: auto; font-size: 12px; gap: 7px; }
  .userbox .role { display: none; }
  .userbox .who { max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .main-head { padding: 10px 12px; }
  .main-head .row1 { flex-wrap: wrap; gap: 8px; }
  .main-head h1 { font-size: 15px; flex: 1 1 auto; min-width: 0; }
  .main-head .actions { width: 100%; margin-left: 0; justify-content: flex-end; gap: 6px; }
  .main-head .sub { font-size: 12px; }
  #btn-back { padding: 4px 9px; }
  .tabs { padding: 0 8px; }
  .tab { padding: 8px 10px; font-size: 13px; }

  .table-wrap { overflow: visible; }
  .ov-table thead { display: none; }
  .ov-table, .ov-table tbody, .ov-table td { display: block; width: 100%; }

  .ov-table tr {
    display: grid; grid-template-columns: 1fr 1fr;
    column-gap: 12px; row-gap: 2px;
    position: relative;
    margin: 0 10px 10px; padding: 12px 14px;
    background: #fff; border: 1px solid var(--line);
    border-radius: 10px; box-shadow: var(--shadow);
  }
  .ov-table tr:hover td { background: transparent; }

  .ov-table td {
    display: flex; align-items: baseline; gap: 10px;
    border: 0; padding: 2px 0; white-space: normal;
    font-size: 13px; text-align: left; justify-content: flex-start;
  }
  .ov-table td::before {
    content: attr(data-label);
    flex: 0 0 62px; color: var(--muted); font-size: 12px;
    white-space: nowrap;
  }
  /* 整行显示的字段标签更长，留宽一点，别折行 */
  .ov-table td[data-label="境内收发货人"]::before,
  .ov-table td[data-label="申报单位"]::before,
  .ov-table td[data-label="合同/发票"]::before,
  .ov-table td[data-label="更新"]::before { flex-basis: 92px; }
  .ov-table td:not([data-label])::before,
  .ov-table td.cell-title::before { content: none; }

  /* 桌面端的居中数字列，在卡片里要左对齐（否则标签被推到中间） */
  .ov-table td.c { text-align: left; justify-content: flex-start; }

  /* 空值行直接不显示，别占地方 */
  .ov-table td.is-empty { display: none; }

  .ov-table td.cell-title {
    order: -1; display: block;
    font-size: 15px; font-weight: 600;
    padding: 0 30px 8px 0; margin-bottom: 2px;
    border-bottom: 1px dashed var(--line);
  }
  .ov-table td.cell-title {
    grid-column: 1 / -1; grid-row: 1;
  }
  .ov-table td.cell-title.ellip { overflow: visible; text-overflow: clip; }

  /* 单据卡片的删除按钮：右上角 */
  .ov-table tr[data-open] td.cell-actions {
    position: absolute; top: 8px; right: 10px;
    width: auto; padding: 2px 4px;
  }
  .ov-table tr[data-open] td.cell-actions::before { content: none; }
  .ov-table tr[data-open] .del { font-size: 15px; padding: 4px; }

  /* 用户卡片的操作按钮：底部一整行 */
  .ov-table tr:not([data-open]) td.cell-actions {
    display: flex; flex-wrap: wrap; gap: 6px;
    padding-top: 10px; margin-top: 4px;
    border-top: 1px dashed var(--line);
  }
  .ov-table tr:not([data-open]) td.cell-actions::before { content: none; }

  .ov-table td.ellip { max-width: none; overflow: visible; text-overflow: clip; }
  .ov-table td.stack div { font-size: 13px; }
  .ov-table .empty-row td { justify-content: center; }
  .pager { border-top: 0; padding: 4px 14px 14px; }

  /* 申报表：窄屏改成单列堆叠（标签在上、输入框在下），不再横向滚动 */
  .decl-wrap { overflow: visible; }
  .decl-grid { display: block; min-width: 0; }
  .decl-grid colgroup, .decl-grid thead { display: none; }
  .decl-grid tbody { display: block; }
  .decl-grid tr { display: block; margin-bottom: 16px; }
  .decl-grid th {
    display: block; width: auto; text-align: left;
    background: none; border: 0; padding: 0 0 6px 2px;
    font-size: 12px; font-weight: 500; white-space: nowrap;
  }
  .decl-grid th.has-err { background: none; }
  .decl-grid td {
    display: block; border: 1px solid var(--line-strong);
    border-radius: 9px; background: #fff; overflow: hidden;
  }
  .decl-grid .dl-input { padding: 10px 12px; font-size: 14px; }
  .decl-grid .dl-input:focus { outline-offset: -2px; }

  .decl-bar { flex-wrap: wrap; gap: 8px; }
  .decl-bar .hint.right { margin-left: 0; width: 100%; }
  .decl-head { flex-wrap: wrap; gap: 8px; padding: 12px 14px; }
  .decl-head h2 { font-size: 15px; }

  /* 表体商品：每行一张卡 */
  .decl-items { display: block; min-width: 0; }
  .decl-items colgroup, .decl-items thead { display: none; }
  /* 兜底：旧页面/异常情况下表头混进 tbody 时，也别当卡片渲染出来 */
  .decl-items tbody tr:has(> th) { display: none; }
  .decl-items tbody { display: block; }
  .decl-items tr {
    display: block; margin-bottom: 10px; padding: 10px 12px;
    border: 1px solid var(--line); border-radius: 10px;
    background: #fff; box-shadow: var(--shadow);
  }
  .decl-items td {
    display: flex; align-items: center; gap: 10px;
    border: 0; padding: 3px 0;
  }
  .decl-items td::before {
    content: attr(data-label);
    flex: 0 0 78px; color: var(--muted); font-size: 12px;
  }
  .decl-items td.seqcell { border: 0; text-align: left; font-weight: 600; }
  .decl-items td.seqcell::before { content: "项号"; }
  .decl-items td.opcell { justify-content: flex-end; padding-top: 6px; }
  .decl-items td.opcell::before { content: none; }
  .decl-items .dl-input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; }
  .decl-items .empty-row { padding: 16px; text-align: center; }
  .decl-toolbar { flex-wrap: wrap; gap: 8px; }

  /* 列表页头部的筛选栏：搜索框和「重置」同一行 */
  .filter-bar { gap: 8px; }
  /* 搜索框和「重置」打包成一个整体：要么一起在当前行，要么整体换行，不会被拆开 */
  .filter-bar .search-group { flex: 1 1 240px; min-width: 0; gap: 8px; }
  .filter-bar .search-group .search-input { flex: 1 1 auto; min-width: 0; width: auto; }
  .filter-bar .search-group #ov-reset { flex: 0 0 auto; }
  .main-head .actions { flex-wrap: wrap; }

  /* 卡片内三栏排：短字段并排，长字段整行，卡片更薄 */
  .ov-table tr { grid-template-columns: 1fr 1fr; column-gap: 10px; row-gap: 0; }
  .ov-table td { padding: 1px 0; font-size: 12.5px; }
  .ov-table td::before { flex: 0 0 62px; }

  /* 三栏里的短标签用窄的，给值留空间 */
  .ov-table td[data-label="类型"]::before,
  .ov-table td[data-label="票号"]::before,
  .ov-table td[data-label="状态"]::before,
  .ov-table td[data-label="资料"]::before,
  .ov-table td[data-label="商品"]::before,
  .ov-table td[data-label="错误"]::before { flex-basis: 32px; }

  /* 固定位置，避免空值隐藏后错位 */
  .ov-table td.cell-title { grid-area: 1 / 1 / 2 / -1; }
  .ov-table td[data-label="类型"]   { grid-area: 2 / 1; }
  .ov-table td[data-label="票号"]   { grid-area: 2 / 2; }
  .ov-table td[data-label="资料"]   { grid-area: 3 / 1; }
  .ov-table td[data-label="商品"]   { grid-area: 3 / 2; }
  .ov-table td[data-label="错误"]   { grid-area: 4 / 1; }
  .ov-table td[data-label="状态"]   { grid-area: 4 / 2; }
  .ov-table td[data-label="境内收发货人"] { grid-area: 5 / 1 / 6 / -1; }
  .ov-table td[data-label="申报单位"]     { grid-area: 6 / 1 / 7 / -1; }
  .ov-table td[data-label="合同/发票"]    { grid-area: 7 / 1 / 8 / -1; }
  .ov-table td[data-label="更新"]         { grid-area: 8 / 1 / 9 / -1; }
  .ov-table td[data-label="境内收发货人"]::before,
  .ov-table td[data-label="申报单位"]::before,
  .ov-table td[data-label="合同/发票"]::before,
  .ov-table td[data-label="更新"]::before { flex-basis: 92px; }
  .ov-table td.cell-actions { grid-area: 1 / 2 / 2 / 3; }

  /* 卡片与筛选区之间留出呼吸空间 */
  .table-wrap { padding-top: 14px; }
}

/* 手机上够宽时用三栏（更窄的屏退回两栏，避免「校验未通过」折行） */
@media (min-width: 380px) and (max-width: 760px) {
  /* 第三列（状态）给宽一点，"校验未通过" 才不会折行 */
  .ov-table tr { grid-template-columns: 1fr 1fr 1.35fr; }
  .ov-table td[data-label="状态"] { grid-area: 2 / 3; }
  .ov-table td[data-label="资料"] { grid-area: 3 / 1; }
  .ov-table td[data-label="商品"] { grid-area: 3 / 2; }
  .ov-table td[data-label="错误"] { grid-area: 3 / 3; }
  .ov-table td[data-label="境内收发货人"] { grid-area: 4 / 1 / 5 / -1; }
  .ov-table td[data-label="申报单位"]     { grid-area: 5 / 1 / 6 / -1; }
  .ov-table td[data-label="合同/发票"]    { grid-area: 6 / 1 / 7 / -1; }
  .ov-table td[data-label="更新"]         { grid-area: 7 / 1 / 8 / -1; }
  .ov-table td.cell-actions { grid-area: 1 / 3 / 2 / 4; }
}

/* ---------------- 用量与账单 ---------------- */
.stat-row { display: flex; flex-wrap: wrap; gap: 26px; padding: 4px 0 14px; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-k { font-size: 12px; color: var(--muted); }
.stat-v { font-size: 20px; font-weight: 650; color: var(--ink); }
.stat-v.warn { color: #b26a00; }
.stat-v.err { color: var(--err); }
.ledger-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ledger-table th {
  text-align: left; padding: 6px 8px; color: var(--muted); font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.ledger-table td { padding: 6px 8px; border-bottom: 1px solid #f0f3f7; }
/* 上传区下方的计费提示 */
.upload-tip {
  margin: 10px 2px 0; font-size: 12.5px; line-height: 1.7; color: var(--muted);
}
.upload-tip b { color: var(--ink); font-weight: 600; }
/* ---------------- 个人中心 ---------------- */
.kv { display: grid; gap: 2px; }
.kv-row {
  display: flex; align-items: center; gap: 14px;
  padding: 9px 2px; border-bottom: 1px solid #f2f5f8;
}
.kv-row:last-child { border-bottom: 0; }
.kv-k { flex: 0 0 96px; color: var(--muted); font-size: 13px; }
.kv-v { font-size: 14px; color: var(--ink); }
.kv-input {
  flex: 1 1 220px; max-width: 320px; padding: 7px 10px;
  border: 1px solid var(--line-strong); border-radius: 7px; outline: none;
}
.kv-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.kv-actions { margin-top: 14px; display: flex; justify-content: flex-end; }

@media (max-width: 760px) {
  .kv-row { flex-wrap: wrap; gap: 6px; }
  .kv-k { flex: 0 0 100%; font-size: 12px; }
  .kv-input { max-width: none; }
}
/* 短信验证码行 */
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1 1 auto; min-width: 0; }
.code-row .btn { flex: 0 0 auto; height: 38px; padding: 0 14px; font-size: 13px;
  border-radius: 9px; }
.code-row .btn:disabled { color: var(--muted); }
/* ---------------- 购买票包 ---------------- */
.pack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.pack {
  border: 1px solid var(--line); border-radius: 10px; padding: 16px;
  background: #fff; text-align: center; box-shadow: var(--shadow);
}
.pack-name { font-size: 13px; color: var(--muted); }
.pack-tickets { font-size: 22px; font-weight: 700; margin: 6px 0 2px; }
.pack-price { font-size: 15px; color: var(--accent); font-weight: 600; }
.pack-unit { font-size: 12px; color: var(--muted); margin: 4px 0 12px; }
.pay-box { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; }
.qr { text-align: center; font-size: 12px; color: var(--muted); }
.qr img { width: 148px; height: 148px; display: block; border: 1px solid var(--line); border-radius: 8px; }
.pay-line { font-size: 13px; color: var(--ink); line-height: 1.9; }
.order-detail { font-size: 14px; line-height: 2.1; }
.order-big { font-size: 17px; margin-bottom: 8px; }
.order-big b { color: var(--accent); font-size: 22px; }
.order-line b { color: var(--ink); }
.pay-qr { display: block; width: 180px; height: 180px; margin: 10px 0; border: 1px solid var(--line); border-radius: 8px; }
/* 表单栅格 */
.grid.inv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.fld { display: flex; flex-direction: column; gap: 5px; }
.fld span { font-size: 12.5px; color: var(--muted); }
.fld input, .fld select {
  height: 38px; padding: 0 10px; border: 1px solid var(--line-strong);
  border-radius: 7px; outline: none; font: inherit; font-size: 13.5px;
}
.fld input:focus, .fld select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
@media (max-width: 760px) { .grid.inv-grid { grid-template-columns: 1fr; } }
.todo-title { font-size: 13px; font-weight: 600; margin: 0 0 6px; }

/* ---------------- 平台后台（左菜单 + 右内容） ---------------- */
.admin-body { background: var(--bg); }
.admin-shell { display: grid; grid-template-columns: 208px 1fr; min-height: 100vh; }
.admin-nav {
  background: #fff; border-right: 1px solid var(--line);
  padding: 18px 12px; display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh;
}
.admin-brand { font-size: 15px; font-weight: 700; padding: 4px 10px 14px; }
.nav-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; border-radius: 8px; color: #34495e;
  text-decoration: none; font-size: 13.5px;
}
.nav-item:hover { background: #f3f6fa; }
.nav-item.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: #eef1f5; color: #6b7a8c; font-size: 11.5px;
  display: inline-flex; align-items: center; justify-content: center;
}
.nav-item.on .nav-badge { background: #fff; color: var(--accent); }
.admin-nav-foot { margin-top: auto; padding: 10px 12px; font-size: 12.5px; }
.admin-nav-foot a { color: var(--muted); text-decoration: none; }
.admin-main { padding: 26px 30px 60px; min-width: 0; }
.sec-head { margin-bottom: 16px; }
.sec-head h2 { margin: 0 0 4px; font-size: 19px; }
.sec-sub { color: var(--muted); font-size: 12.5px; }
.sec-block { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 16px; }
.sec-block h3 { margin: 0 0 10px; font-size: 13.5px; }
.admin-main .ledger-table { background: #fff; }
.inv-no { width: 130px; padding: 4px 7px; border: 1px solid var(--line-strong); border-radius: 6px; }
#dict-list { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
#dict-list .ledger-table { background: transparent; }
#dict-list .ledger-table th { padding: 10px 14px; }
#dict-list .ledger-table td { padding: 9px 14px; }

@media (max-width: 760px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-nav {
    position: static; height: auto; flex-direction: row; flex-wrap: wrap;
    border-right: 0; border-bottom: 1px solid var(--line);
  }
  .admin-brand { width: 100%; padding-bottom: 8px; }
  .admin-nav-foot { margin: 0 0 0 auto; }
  .admin-main { padding: 18px 14px 40px; }
}
/* 字典导入 */
.hidden-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.import-panel {
  margin-top: 12px; padding: 14px 16px; border: 1px solid var(--line);
  border-radius: 10px; background: #fbfcfe; font-size: 13px;
}
.import-panel .imp-row { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 8px; }
.imp-num { font-weight: 700; }
.imp-added { color: #1a7f37; }
.imp-changed { color: #b25e09; }
.imp-same { color: var(--muted); }
.imp-list { max-height: 180px; overflow: auto; margin: 8px 0; font-family: ui-monospace, monospace; font-size: 12px; }
.imp-list div { padding: 2px 0; }
/* 分页 */
.pager { display: flex; align-items: center; gap: 10px; justify-content: flex-end; padding: 12px 4px 0; }
.pager-info { font-size: 12.5px; color: var(--muted); }
/* ==================== 申报表视觉优化 ==================== */
.decl-wrap { max-width: 1180px; }

/* 分组标题：左侧色条 + 更清晰的层级 */
.decl-wrap h4.sec {
  display: flex; align-items: center; gap: 8px;
  margin: 22px 0 10px; font-size: 13px; font-weight: 600;
  color: #1f2d3d; letter-spacing: .3px;
}
.decl-wrap h4.sec::before {
  content: ""; width: 3px; height: 14px; border-radius: 2px;
  background: linear-gradient(#2f6fdd, #5b93f0);
}
.decl-wrap h4.sec:first-of-type { margin-top: 6px; }

/* 表单网格：去掉重边框，改成卡片 + 细分隔线 */
.decl-grid {
  width: 100%; border-collapse: separate; border-spacing: 0;
  table-layout: fixed; margin: 0;
  background: #fff; border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(16, 32, 64, .04);
}
.decl-grid th {
  text-align: right; font-weight: 500; font-size: 12px; color: #6b7a8c;
  background: #fafbfc; padding: 0 8px; height: 32px;
  border: 0; border-bottom: 1px solid #eef1f4; border-right: 1px solid #eef1f4;
  white-space: normal; line-height: 1.3; vertical-align: middle;
  word-break: keep-all;
}
.decl-grid td {
  border: 0; border-bottom: 1px solid #eef1f4; border-right: 1px solid #eef1f4;
  padding: 0; height: 32px; vertical-align: middle; background: #fff;
}
.decl-grid th { padding-top: 6px; padding-bottom: 6px; height: auto; }
.decl-grid tr:last-child th, .decl-grid tr:last-child td { border-bottom: 0; }
.decl-grid th:nth-last-child(2) { border-right: 0; }
.decl-grid td:last-child { border-right: 0; }

/* 输入框：整格可点，聚焦时整格高亮 */
.decl-grid .dl-input {
  width: 100%; height: 32px; border: 0; background: transparent;
  padding: 0 8px; font-size: 12.5px; border-radius: 0; line-height: 32px;
  color: #1f2d3d; transition: background .12s ease;
}
.decl-grid .dl-input::placeholder { color: #b6c0cc; }
.decl-grid td:hover { background: #fafcff; }
.decl-grid td:hover .dl-input { background: transparent; }
.decl-grid .dl-input:focus {
  outline: 0; background: #fff; box-shadow: inset 0 0 0 2px rgba(47, 111, 221, .55);
}
.decl-grid .req-empty { background: #fffbfb; }
.decl-grid .lowconf { background: #fffdf4; }
.decl-grid .has-err { box-shadow: inset 3px 0 0 var(--err); background: #fffafa; }
.decl-grid th.has-err { color: var(--err); background: #fdf3f3; }
.decl-grid th .req { color: var(--err); margin-left: 3px; }

/* 状态点：缩小、更克制 */
.decl-grid th .i-dot { width: 5px; height: 5px; margin-right: 6px; opacity: .85; }

/* 顶部工具条：上边距 -1px、下边距 +2px（跟上面的页签和下面的表单网格贴得更匀） */
.decl-bar { display: flex; align-items: center; gap: 10px; margin: 1px 0 6px; }

/* 商品表：与上方卡片同风格 */
.decl-grid.decl-items th { text-align: left; padding: 0 8px; height: 36px; }
.decl-grid.decl-items td { height: 36px; }
.decl-grid.decl-items .dl-input { height: 36px; line-height: 36px; padding: 0 8px; font-size: 13px; }
.decl-grid.decl-items .seqcell { text-align: center; color: var(--muted); font-size: 12px; }
/* 商品表：列多了以后横向滚动，避免撑破卡片 */
.items-scroll {
  overflow-x: auto; overflow-y: visible;
  margin: 0 -1px; padding-bottom: 2px;
}
.items-scroll .decl-items {
  min-width: 0; width: 100%; table-layout: fixed;
  border-radius: 10px; margin: 0;
}
.items-scroll::-webkit-scrollbar { height: 8px; }
.items-scroll::-webkit-scrollbar-thumb { background: #d6dde6; border-radius: 4px; }
.items-scroll::-webkit-scrollbar-thumb:hover { background: #c2ccd8; }
/* 表体行展开面板 */
.decl-grid .item-tr { cursor: pointer; }
.decl-grid .item-tr:hover td { background: #f7fafe; }
.decl-grid .item-tr.open td { background: #eef5ff; }
.decl-grid .item-tr.open .seqcell { font-weight: 700; color: var(--accent); }
.item-detail {
  margin: 10px 0 4px; padding: 14px 16px 16px;
  background: #fbfcfe; border: 1px solid #dfe9f7; border-radius: 10px;
  box-shadow: 0 2px 8px rgba(16, 32, 64, .05);
}
.it-detail-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
  font-size: 13px;
}
.it-detail-head .right { margin-left: auto; }
.it-grid { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 10px 12px; }
.it-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.it-f.wide { grid-column: span 3; }
.it-f > span { font-size: 12px; color: #6b7a8c; }
.it-f > span .req { color: var(--err); margin-left: 2px; font-style: normal; }
.it-f .dl-input {
  height: 34px; line-height: 34px; padding: 0 9px; font-size: 13px;
  border: 1px solid var(--line-strong); border-radius: 7px; background: #fff;
  width: 100%;
}
.it-f .dl-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.it-f select.dl-input { height: 34px; }
@media (max-width: 1100px) { .it-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } .it-f.wide { grid-column: span 3; } }
@media (max-width: 720px) { .it-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .it-f.wide { grid-column: span 2; } }
/* 证据面板：宽屏时悬浮在右侧空白处，不用往下翻 */
@media (min-width: 1560px) {
  .evidence-box {
    position: fixed; right: auto; left: 1499px; top: 352px; min-height: 120px;
    width: 264px; max-height: calc(100vh - 140px); overflow-y: auto;
    margin: 0; padding: 14px 16px;
    background: #fff; border: 1px solid var(--line); border-radius: 10px;
    box-shadow: 0 6px 20px rgba(16, 32, 64, .09);
    z-index: 40; font-size: 12.5px; line-height: 1.7;
  }
  .evidence-box::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
  }
  .evidence-box > .k { display: block; }
  /* 侧栏收起后，主框整体左移 286px，面板跟着走 */
  body.side-collapsed .evidence-box { left: 1213px; }
}
/* 表体只读展示 */
.cell-text {
  padding: 0 10px; height: 36px; line-height: 36px; font-size: 13px;
  color: #1f2d3d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cell-text.num { text-align: right; }
.cell-text.has-err { color: var(--err); }
.decl-grid.decl-items td { padding: 0; }
/* 侧栏折叠 */
.sidebar-head .side-toggle {
  flex: 0 0 26px; padding: 0; font-size: 18px; line-height: 1;
  font-weight: 700; color: var(--muted); height: 34px;
}
.side-toggle:hover { color: var(--accent); }
.workspace { transition: grid-template-columns .18s ease; }
body.side-collapsed .workspace { grid-template-columns: 0 1fr; }
body.side-collapsed .sidebar { overflow: hidden; border-right: 0; }
body.side-collapsed .sidebar * { visibility: hidden; }
body.side-collapsed .main-head { padding-left: 30px; }
.side-expand {
  position: fixed; left: 0; top: 66px; z-index: 60;
  width: 22px; height: 34px; border-radius: 0 7px 7px 0;
  border: 1px solid var(--line); border-left: 0; background: #fff;
  color: var(--muted); font-size: 20px; font-weight: 700; cursor: pointer;
  box-shadow: 0 2px 8px rgba(16, 32, 64, .08);
}
.side-expand:hover { color: var(--accent); background: #f7fafe; }
/* 窄屏：不套用桌面折叠逻辑，侧栏本来就被隐藏 */
@media (max-width: 980px) {
  body.side-collapsed .workspace { grid-template-columns: 1fr; }
  body.side-collapsed .sidebar { display: none; }
  body.side-collapsed .sidebar * { visibility: visible; }
  .side-toggle { display: none; }
  .side-expand { display: none !important; }
}
/* 品牌字中间的点 */
.brand .b-dot, .ab-logo .b-dot {
  font-style: normal; font-weight: 400;
  margin: 0 1px; color: var(--accent); opacity: .55;
  font-size: .92em;
}
.ab-logo .b-dot { color: #fff; opacity: .7; }
/* ===== 单一窗口风格：紧凑网格 + 淡黄输入底 ===== */
.decl-grid {
  border: 1px solid #a9bdd6; border-radius: 4px;
  box-shadow: none; background: #fff;
}
.decl-grid th {
  background: #eef3f9; color: #1f3550; font-size: 12px;
  border-bottom: 1px solid #c9d7e6; border-right: 1px solid #c9d7e6;
  height: 30px; padding: 0 6px;
}
.decl-grid td {
  border-bottom: 1px solid #c9d7e6; border-right: 1px solid #c9d7e6;
  height: 30px; background: #fff;
}
.decl-grid .dl-input {
  height: 30px; line-height: 30px; font-size: 12.5px;
  padding: 0 6px; background: #FAFFBD;   /* 淡黄底，对应单一窗口的可填区域 */
  color: #1a2330;
}
.decl-grid td:hover { background: #f4f8fd; }
.decl-grid .dl-input:focus { background: #fff8c9; box-shadow: inset 0 0 0 2px #2f6fdd; }
.decl-grid .req-empty { background: #fff1f1; }
.decl-grid .lowconf { background: #fffaea; }
.decl-grid th .i-dot { width: 0; height: 0; margin: 0; }   /* 单一窗口没有状态点，收掉 */

/* 分组标题：改成单一窗口那种浅蓝条 */
.decl-wrap h4.sec {
  margin: 10px 0 4px; padding: 3px 8px; font-size: 12px; font-weight: 600;
  color: #1f3550; background: linear-gradient(#eaf2fb, #dce9f8);
  border: 1px solid #b9cde4; border-radius: 3px;
}
.decl-wrap h4.sec::before { display: none; }
/* 单一窗口版式网格 */
.decl-grid.decl-layout { table-layout: fixed; }
.decl-layout td.lcell { padding: 0; vertical-align: middle; }
.decl-grid.decl-layout td { border-right: 1px solid #c9d7e6; }
.decl-grid.decl-layout td:last-child { border-right: 0; }
.decl-layout .lf {
  display: flex; align-items: center; gap: 5px; padding: 0 5px; min-height: 32px;
}
.decl-layout .lf .lb {
  flex: 0 0 76px; font-size: 10.5px; color: #3a4a5e;
  white-space: normal; overflow: visible; word-break: break-all; line-height: 1.15;
  text-align: right; padding-right: 8px;
  font-weight: 700; -webkit-text-stroke: 0.2px #3a4a5e;
}
.decl-layout .lf .dl-input {
  flex: 1 1 auto; min-width: 0; height: 28px; line-height: 28px;
  font-size: 12.5px; padding: 0 6px; background: #FAFFBD;
  border: 1px solid transparent; border-radius: 3px;
}
.decl-layout .lf .dl-input:hover { border-color: #c9d7e6; }
.decl-layout .lf .dl-input:focus { background: #fff8c9; border-color: #2f6fdd; }
.decl-layout .lf .i-dot { display: none; }
.decl-layout .lf .cfm { display: none; }
/* ===== 单一窗口式两栏布局 ===== */
.sw-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 288px; gap: 8px; align-items: start; }
@media (max-width: 1180px) { .sw-wrap { grid-template-columns: 1fr; } }

/* 蓝色分段条 */
.sw-sec {
  display: flex; align-items: center; gap: 6px;
  margin: 8px 0 0; padding: 3px 10px;
  background: linear-gradient(#e8f1fd, #d5e6fa);
  border: 1px solid #b6cde8; border-radius: 4px 4px 0 0;
  font-size: 12px; font-weight: 700; color: #16406e;
}
.sw-sec span { color: #16406e; }
.sw-sec + .decl-grid.decl-layout { margin-top: 0; border-top: 0; border-radius: 0 0 4px 4px; }

/* 右侧固定栏 */
.sw-rail { display: flex; flex-direction: column; gap: 8px; position: static; align-self: start; }
.rail-blk { border: 1px solid #b6cde8; border-radius: 4px; overflow: hidden; background: #fff; }
.rail-hd {
  background: linear-gradient(#e8f1fd, #d5e6fa); padding: 3px 8px;
  font-size: 12px; font-weight: 700; color: #16406e; border-bottom: 1px solid #b6cde8;
}
.rail-body { padding: 6px 8px; display: flex; flex-direction: column; gap: 4px; }
.rf { display: flex; align-items: center; gap: 5px; }
.rf > span { flex: 0 0 70px; font-size: 10.5px; color: #3a4a5e; }
.rf > input {
  flex: 1 1 auto; min-width: 0; height: 22px; line-height: 22px; padding: 0 5px;
  font-size: 12px; border: 1px solid #c9d7e6; border-radius: 2px; background: #FAFFBD;
}
.rf > input:focus { outline: 0; border-color: #2f6fdd; background: #fff8c9; }
/* 只读占位字段 */
.decl-layout .dl-input.ro {
  background: #f2f4f7; color: #6b7a8c; cursor: not-allowed;
  border: 1px solid #e3e8ee;
}
/* 申报表：去掉卡片外观，贴边排版（对齐单一窗口） */
#pane-form .card,
#pane-form .card-b {
  background: transparent; border: 0; box-shadow: none; border-radius: 0;
}
#pane-form .decl-head { background: none; border-bottom: 1px solid #d6e0ea; }
#pane-form .decl-wrap { max-width: none; padding: 0 0 25px; }
.sw-sec {
  background: none; border: 0; border-left: 3px solid #7fa9d8;
  border-radius: 0; margin: 10px 0 2px; padding: 1px 8px;
  color: #16406e;
}
.sw-sec + .decl-grid.decl-layout { border-radius: 0; border-top: 1px solid #b6cde8; }

/* 来源面板：固定在底部 */
.evidence-box {
  position: fixed !important; left: 286px; right: 16px; bottom: 0; top: auto !important;
  width: auto; height: 25px; max-height: 25px; overflow: hidden;
  display: flex; align-items: center; gap: 8px;
  margin: 0; padding: 7px 14px;
  background: #eef4fb; border-top: 1px solid #b6cde8;
  border-radius: 0; box-shadow: 0 -2px 10px rgba(16, 32, 64, .06);
  font-size: 12px; line-height: 25px; color: #2c3e50; white-space: nowrap;
  z-index: 50;
}
.evidence-box .ev-meta { flex: 0 0 auto; color: #4a5b6e; }
.evidence-box .ev-snip {
  flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  color: #2c3e50; background: #eef3f9; border-radius: 3px; padding: 0 7px; line-height: 20px;
}
.evidence-box .k {
  flex: 0 0 auto; padding: 0 6px; line-height: 18px; font-size: 11px;
  background: #e3eefb; border-radius: 3px; color: #16406e;
  font-size: 11.5px; font-weight: 700;
}
.evidence-box code { background: #eef3f9; padding: 0 4px; border-radius: 3px; }
/* 侧栏收起时，来源条跟着左移 */
body.side-collapsed .evidence-box { left: 0 !important; }

/* 单一窗口式蓝色小按钮 */
.sw-btn {
  height: 26px; padding: 0 10px; margin: 3px 6px; white-space: nowrap;
  border: 1px solid #0f4d8b; border-radius: 3px;
  background: linear-gradient(#2f8ae0, #1a6fc4);
  color: #fff; font-size: 12px; font-weight: 600; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}
.sw-btn:hover { background: linear-gradient(#3b95ea, #1f7ad2); }
.sw-btn:active { background: #1a6fc4; }
/* 「导出校验稿」跟着 .btn.sm 走，和其它两个按钮同尺寸 */
a.btn.sm { text-decoration: none; }

.lf-btn { justify-content: center; padding: 0 4px; }
.lf-btn .sw-btn { width: 100%; margin: 3px 0; padding: 0 8px; }

/* 右侧栏：单一窗口样式 */
.rail-hd { display: flex; align-items: center; justify-content: space-between; }
.rail-tools { display: flex; gap: 4px; }
.rail-tools i {
  font-style: normal; font-size: 10.5px; padding: 0 6px; line-height: 16px;
  border: 1px solid #9fc0e2; border-radius: 2px; background: #f2f8ff; color: #1a5fa8;
  cursor: pointer; user-select: none;
}
.rail-tools i:hover { background: #e2f0ff; }
.rail-th {
  display: flex; background: #4a86c8; color: #fff; font-size: 10.5px;
  border-bottom: 1px solid #3a72ad;
}
.rail-th span {
  padding: 2px 4px; text-align: center; box-sizing: border-box;
  border-right: 1px solid #7aa9d6; overflow: hidden; white-space: nowrap;
}
.rail-th span:last-child { border-right: 0; }
.rail-empty {
  height: 54px; display: flex; align-items: center; justify-content: center;
  background: #f4f8fd; color: #8a99a9; font-size: 11.5px; border-bottom: 1px solid #d6e3f0;
}
.rail-body { background: #fff; }
.rf > span { text-align: right; color: #2c3e50; }
.rf > input { border: 1px solid #c9d7e6; background: #FAFFBD; }
/* 右下角合计块 */
.rail-tips .rail-body { padding: 6px 8px; gap: 2px; }
.tip-row { display: flex; justify-content: space-between; font-size: 11px; color: #3a4a5e; }
.tip-row b { color: #1a5fa8; font-weight: 700; }

/* 覆盖：底部来源条强制 25px，去掉多余内边距 */
.evidence-box {
  height: 25px !important; min-height: 0 !important; max-height: 25px !important;
  padding: 0 14px !important; margin: 0 !important;
  box-sizing: border-box; align-items: center; overflow: hidden;
}
.evidence-box .k { line-height: 17px !important; }


/* 贴在内容底部（而不是窗口底部），内容不满一屏时不再留大块空白 */
.evidence-box {
  position: sticky !important;
  left: auto !important; right: auto !important; top: auto !important; bottom: 0 !important;
  width: auto !important; margin: 0 !important;
}
#pane-form .decl-wrap { padding-bottom: 0 !important; }


/* 表体明细：单一窗口样式 */
.item-layout { table-layout: fixed; margin-top: 6px; }
.item-layout td.lcell { padding: 0; }
.item-layout .lf { height: 34px; }
.item-layout .lf .lb { flex: 0 0 92px; }
.item-layout .dl-input { background: #FAFFBD; border: 1px solid #c9d7e6; height: 26px; line-height: 26px; }
.item-layout .dl-input.ro { background: #f2f4f7; }


/* 表体编辑面板：固定在列表下方，常驻显示 */
.item-detail {
  position: static; z-index: auto;
  background: #fff; border: 1px solid #c9d7e6; border-radius: 4px;
  box-shadow: 0 -2px 10px rgba(16, 32, 64, .06);
  margin-top: 8px;
}
.detail-tr > td { padding: 0 !important; border: 0 !important; background: none; }


/* 底部来源条：左右铺满、贴底 */
.evidence-box {
  position: sticky !important;
  left: 0 !important; right: 0 !important;
  bottom: 0 !important; top: auto !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 14px !important;
  border-radius: 0 !important;
}





/* 表体编辑面板：紧跟商品列表下方，不浮动 */
.item-detail {
  position: static !important;
  left: auto !important; right: auto !important; bottom: auto !important;
  width: auto !important;
  margin-top: 8px !important;
  max-height: none !important; overflow: visible !important;
  background: #fff; border: 1px solid #c9d7e6; border-radius: 4px;
  box-shadow: none;
  z-index: auto !important;
  padding: 0 !important;
}
#pane-form .decl-wrap { padding-bottom: 30px !important; }


/* 来源提示条：固定在窗口最底部 */
.evidence-box {
  position: fixed !important;
  left: 0 !important; right: 0 !important; bottom: 0 !important; top: auto !important;
  width: 100% !important;
  height: 25px !important; max-height: 25px !important;
  margin: 0 !important; padding: 0 14px !important;
  border-radius: 0 !important; z-index: 60 !important;
  display: flex; align-items: center;
}
#pane-form .decl-wrap { padding-bottom: 30px !important; }


/* 来源提示条：左边缘对齐内容区 */
.evidence-box {
  left: 286px !important;
  right: 0 !important;
  padding-left: 0 !important;
}
body.side-collapsed .evidence-box { left: 0 !important; }


/* 表体明细：列名在左、录入框在右（与表头一致） */
.it-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px 8px; }
.it-f {
  flex-direction: row; align-items: center; gap: 6px;
  border: 1px solid #e3e8ee; border-radius: 3px; background: #fff;
  padding: 2px 6px; min-width: 0;
}
.it-f.wide { grid-column: span 3; }
.it-f > span {
  flex: 0 0 84px; text-align: right; font-size: 11px; color: #3a4a5e;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.it-f .dl-input {
  flex: 1 1 auto; min-width: 0; height: 26px; line-height: 26px; padding: 0 6px;
  font-size: 12.5px; border: 0; background: #FAFFBD; border-radius: 2px;
}
@media (max-width: 1100px) { .it-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .it-f.wide { grid-column: span 4; } }


/* 表体明细第一行：项号/备案序号/商品编号/监管类别名称 */
.it-first {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px 8px; margin-bottom: 6px;
}


/* 表体明细：每行 flex 排布 */
.it-row { display: flex; gap: 6px; margin-bottom: 6px; }
.it-row:last-child { margin-bottom: 0; }
.it-row .it-f { flex: 1 1 0; min-width: 0; }


.it-row .it-cell { min-width: 0; }
.it-row .it-cell .it-f { flex: 1 1 auto; width: 100%; }


/* 表体明细：去掉字段间空隙，外留一点边距 */
.item-detail {
  margin: 6px 8px 10px !important;
  padding: 0 !important;
  border: 1px solid #c9d7e6; border-radius: 3px; background: #fff;
}
.it-detail-head {
  padding: 4px 10px !important; margin: 0 !important;
  border-bottom: 1px solid #c9d7e6; background: #f7fafd;
}
.it-row { gap: 0 !important; margin: 0 !important; }
.it-row .it-cell, .it-row .it-f { margin: 0 !important; }
.it-row .it-f {
  border: 0 !important;
  border-right: 1px solid #e3e8ee !important;
  border-bottom: 1px solid #e3e8ee !important;
  border-radius: 0 !important;
  height: 30px; padding: 0 5px !important; gap: 4px !important;
  background: #fff;
}
.it-row .it-f:last-child { border-right: 0 !important; }
.it-row:last-child .it-f { border-bottom: 0 !important; }
.it-row .it-f > span { flex: 0 0 78px; }
.it-row .it-f .dl-input { height: 24px; line-height: 24px; border-radius: 0; }


/* 表体明细：左右与表体表格两端对齐 */
.item-detail {
  margin: 6px 0 10px 0 !important;
  width: 100% !important;
  box-sizing: border-box;
}
.detail-tr > td { padding: 0 !important; }




/* 列名：整格用边框框起来 */
.decl-layout .lf .lb {
  align-self: stretch;
  display: flex; align-items: center; justify-content: flex-end;
  border-right: 1px solid #c9d7e6 !important;
  padding-right: 8px;
}
.it-row .it-f > span {
  align-self: stretch;
  display: flex; align-items: center; justify-content: flex-end;
  border-right: 1px solid #e3e8ee;
  padding-right: 6px;
}


/* 表体明细：每格补齐左侧边框，最右一格补右边框 */
.it-row .it-f {
  border-left: 1px solid #e3e8ee !important;
}
.it-row .it-f:last-child {
  border-right: 1px solid #e3e8ee !important;
}


/* 表体：横向滚动 */
.items-scroll {
  overflow-x: auto !important;
  overflow-y: hidden !important;
  padding-bottom: 6px;
}
.items-scroll .decl-items {
  min-width: 1080px !important;
  width: max-content !important;
  table-layout: fixed;
}
.items-scroll::-webkit-scrollbar { height: 10px; }
.items-scroll::-webkit-scrollbar-track { background: #f2f5f9; border-radius: 5px; }
.items-scroll::-webkit-scrollbar-thumb { background: #c2ccd8; border-radius: 5px; }
.items-scroll::-webkit-scrollbar-thumb:hover { background: #a9b6c6; }


/* 右侧栏子表列表 */
.rail-row {
  display: flex; align-items: center; font-size: 11px; height: 22px;
  border-bottom: 1px solid #eef2f7; cursor: pointer; background: #fff;
}
.rail-row > span {
  padding: 0 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  border-right: 1px solid #eef2f7;
}
.rail-row > span:nth-child(1) { width: 34%; }
.rail-row > span:nth-child(2) { width: 26%; }
.rail-row > span:nth-child(3) { width: 20%; }
.rail-row > span:nth-child(4) { width: 20%; border-right: 0; }
.rail-row:hover { background: #f4f8fd; }
.rail-row.sel { background: #e8f1fd; }
.rail-row .rail-del {
  flex: 0 0 18px; text-align: center; color: #98a6b6; font-style: normal; cursor: pointer;
}
.rail-row .rail-del:hover { color: #d9534f; }
.rail-tools i { cursor: pointer; }


/* 表体：铺满剩余宽度（仍可横向滚动） */
.items-scroll .decl-items {
  width: 100% !important;
  min-width: 1080px !important;
}
.items-scroll { width: 100%; }

/* 右侧栏：列表区固定高度，撑满区块 */
.rail-blk { display: flex; flex-direction: column; }
.rail-blk .rail-list { min-height: 78px; }
.rail-row { height: 24px; }


/* 右侧栏列表区：固定高度 */
.rail-list {
  height: 42px; min-height: 42px; max-height: 42px;
  overflow-y: auto; background: #fff;
}
.rail-list .rail-empty {
  height: 42px; border-bottom: 0; font-size: 11px;
}


/* 两栏：左栏（表单+表体），右栏铺到底 */
.sw-wrap { align-items: stretch; }
.sw-rail { height: 100%; }
.sw-rail > .rail-blk:last-child { flex: 1 1 auto; }


/* 表体：固定 6 行高度，双向滚动 */
.items-scroll {
  max-height: 254px !important;   /* 表头 38 + 6 行 x 36 */
  overflow: auto !important;
}
.items-scroll::-webkit-scrollbar { width: 10px; height: 10px; }
.items-scroll::-webkit-scrollbar-thumb { background: #c2ccd8; border-radius: 5px; }

/* 右栏列表：固定 4 行高度（行高 24） */
.rail-list {
  height: 96px !important; min-height: 96px !important; max-height: 96px !important;
  overflow: auto !important;
}
.rail-list .rail-empty { height: 96px !important; }


/* 表体空行 */
.blank-item td { height: 36px; color: #c0c8d2; }


/* 表体表头固定，滚动时不跟着走 */
.items-scroll { position: relative; }
.items-scroll .decl-items thead th {
  position: sticky; top: 0; z-index: 6;
  background: #eef3f9; box-shadow: inset 0 -1px 0 #c9d7e6;
}


/* 表头粘性（加强版：thead + th 同时 sticky） */
.items-scroll { overflow: auto !important; }
.items-scroll .decl-items { border-collapse: separate !important; border-spacing: 0; }
.items-scroll .decl-items thead { position: relative; z-index: 9; }
.items-scroll .decl-items thead th {
  position: sticky !important;
  top: 0 !important;
  z-index: 10 !important;
  background: #eef3f9 !important;
  box-shadow: inset 0 -1px 0 #c9d7e6;
}


/* 表体：6 行不滚动，第 7 行才滚动 */
.items-scroll {
  max-height: 266px !important;   /* 表头 38 + 6 行 x 38 */
  overflow: auto !important;
}


/* 表头独立于滚动区，永不随滚动移动 */
.items-head-wrap {
  overflow: hidden;
  width: 100%;
  border: 1px solid #c9d7e6; border-bottom: 0; border-radius: 4px 4px 0 0;
  background: #eef3f9;
}
.items-head-wrap .decl-items { width: 100% !important; min-width: 1080px !important; margin: 0; border: 0; }
.items-head-wrap .decl-items thead th { background: #eef3f9 !important; }

.items-scroll {
  border: 1px solid #c9d7e6; border-top: 0; border-radius: 0 0 4px 4px;
  max-height: 240px !important;   /* 6 行 */
  overflow: auto !important;
}
.items-scroll .decl-items { width: 100% !important; min-width: 1080px !important; margin: 0; border: 0; }


/* 表体：滚动条常驻，表头预留同宽，保证列对齐 */
.items-scroll {
  overflow-y: scroll !important;
  overflow-x: scroll !important;
}
.items-scroll::-webkit-scrollbar { width: 10px; height: 10px; }
.items-head-wrap {
  padding-right: 10px !important;   /* 与纵向滚动条同宽 */
  box-sizing: border-box;
}


/* 默认不显示滚动条，但始终预留滚动条槽位，保证表头列对齐 */
.items-scroll {
  overflow-y: auto !important;
  overflow-x: auto !important;
  scrollbar-gutter: stable !important;
}


/* 表头微调：补 1px 边框差 */
.items-head-wrap {
  padding-right: 11px !important;
  border-right-width: 0 !important;
}


/* 两栏底部齐平：右栏跟着左栏撑满，集装箱/随附单证两块平分多出来的高度 */
.sw-wrap { align-items: stretch !important; }
.sw-rail {
  height: auto !important;
  align-self: stretch !important;
  display: flex; flex-direction: column; gap: 8px;
}
.sw-rail > .rail-blk {
  flex: 1 1 0; min-height: 0;
  display: flex; flex-direction: column;
}
.sw-rail > .rail-blk:last-child { flex: 0 0 auto !important; }   /* tips 不拉伸 */
.sw-rail .rail-grid { flex: 1 1 auto; min-height: 96px; }


/* 表头与数据表同宽（定宽，避免 1px 缩放差） */
.items-head-wrap .decl-items,
.items-scroll .decl-items {
  width: 1080px !important;
  min-width: 1080px !important;
  max-width: 1080px !important;
}
.items-head-wrap { padding-right: 0 !important; }


/* 表体数据整体右移 1px，与表头列线重合 */
.items-scroll .decl-items { transform: none; }



/* 表体表格右侧边框（定宽时右边缘也要有线） */
.items-scroll .decl-items { border-right: 1px solid #c9d7e6; }
.items-head-wrap .decl-items { border-right: 1px solid #c9d7e6; }


/* 表头与数据同宽同起点 */
.items-head-wrap { padding-right: 0 !important; overflow: hidden; }
.items-head-wrap .decl-items { border-right: 0 !important; }


/* 表体：按实际行数展示，不出纵向滚动条 */
.items-scroll {
  max-height: none !important;
  overflow-y: visible !important;
  overflow-x: auto !important;
  scrollbar-gutter: auto !important;
}


/* 表体 Tabulator：调成单一窗口风格 */
.item-grid { border: 1px solid #c9d7e6; border-radius: 4px; overflow: hidden; background: #fff; }
.item-grid .tabulator { border: 0; background: #fff; font-size: 12.5px; }
.item-grid .tabulator-header {
  background: #eef3f9; border-bottom: 1px solid #c9d7e6; color: #3a4a5e; font-weight: 700;
}
.item-grid .tabulator-header .tabulator-col { background: transparent; border-right: 1px solid #dbe5f0; }
.item-grid .tabulator-header .tabulator-col .tabulator-col-content { padding: 0 8px; }
.item-grid .tabulator-row { border-bottom: 1px solid #eef2f7; }
.item-grid .tabulator-row .tabulator-cell {
  border-right: 1px solid #eef2f7; padding: 0 8px; line-height: 20px; font-size: 11.5px;
}
.item-grid .tabulator-row.tabulator-selected { background: #e8f1fd !important; }
.item-grid .tabulator-row.tabulator-selectable:hover { background: #f4f8fd; }
.item-grid .grid-del { color: #98a6b6; cursor: pointer; }
.item-grid .grid-del:hover { color: #d9534f; }
.item-grid .tabulator-placeholder { color: #98a6b6; font-size: 12.5px; }


/* 冻结列必须是不透明背景，否则滚动时后一列文字会透上来 */
.item-grid .tabulator-header .tabulator-frozen {
  background: #eef3f9 !important; z-index: 12;
}
.item-grid .tabulator-row .tabulator-cell.tabulator-frozen {
  background: #fff !important; z-index: 12;
}
.item-grid .tabulator-row.tabulator-selected .tabulator-cell.tabulator-frozen {
  background: #e8f1fd !important;
}


/* 冻结列的分隔线：改回 1px 普通细线 */
.item-grid .tabulator-header .tabulator-col.tabulator-frozen-left,
.item-grid .tabulator-header .tabulator-col.tabulator-frozen-right,
.item-grid .tabulator-row .tabulator-cell.tabulator-frozen-left,
.item-grid .tabulator-row .tabulator-cell.tabulator-frozen-right {
  border-left-width: 0 !important;
  border-right-width: 1px !important;
  border-color: #dbe5f0 !important;
}


/* 右侧栏表格控件 */
.rail-grid { border-bottom: 1px solid #d6e3f0; background: #fff; }
.rail-grid .tabulator { border: 0; background: #fff; font-size: 11px; }
.rail-grid .tabulator-header { background: #4a86c8; color: #fff; border-bottom: 1px solid #3a72ad; }
.rail-grid .tabulator-header .tabulator-col { background: transparent; border-right: 1px solid #7aa9d6; }
.rail-grid .tabulator-header .tabulator-col .tabulator-col-content { padding: 0 4px; }
.rail-grid .tabulator-tableholder .tabulator-row { border-bottom: 1px solid #eef2f7; }
.rail-grid .tabulator-row .tabulator-cell { padding: 0 4px; line-height: 26px; border-right: 1px solid #eef2f7; }
.rail-grid .tabulator-row.tabulator-selected { background: #e8f1fd !important; }
.rail-grid .tabulator-placeholder { color: #8a99a9; font-size: 11px; }


/* 右侧栏表格字号小一号 */
.rail-grid .tabulator { font-size: 10px !important; }
.rail-grid .tabulator-header .tabulator-col-title { font-size: 10px !important; }
.rail-grid .tabulator-row .tabulator-cell { font-size: 10px !important; }


/* 右侧栏表格：去掉 3D/立体感（阴影、渐变、内发光） */
.rail-grid .tabulator,
.rail-grid .tabulator-header,
.rail-grid .tabulator-header .tabulator-col,
.rail-grid .tabulator-row,
.rail-grid .tabulator-row .tabulator-cell {
  box-shadow: none !important;
  text-shadow: none !important;
  background-image: none !important;
}


/* 右侧栏表格：滚动条改扁平细条，去掉立体感 */
.rail-grid .tabulator-tableholder::-webkit-scrollbar { width: 6px; height: 6px; }
.rail-grid .tabulator-tableholder::-webkit-scrollbar-track { background: #fff; }
.rail-grid .tabulator-tableholder::-webkit-scrollbar-thumb {
  background: #d6e3f0; border-radius: 0; border: 0;
}
.rail-grid .tabulator-tableholder::-webkit-scrollbar-thumb:hover { background: #c2d3e4; }


/* 右侧栏表格：外框与下方明细一致，统一细蓝线 */
.rail-grid {
  border: 1px solid #c9d7e6 !important;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 4px;
  background: #fff;
}
.rail-grid .tabulator { border: 0 !important; }
.rail-grid .tabulator-header {
  border-bottom: 1px solid #c9d7e6 !important;
}
.rail-grid .tabulator-row { border-bottom: 1px solid #eef2f7 !important; }


/* 表头列名：字号 +1 */
.decl-layout .lf .lb { font-size: 12.5px !important; }


/* 指定列名用橙色 */
.decl-layout .lf .lb.hl { color: #e07b00 !important; }


/* 白底录入框（如检验检疫编码） */
.decl-layout .dl-input.wbg { background: #fff !important; }


/* 表头：真正的表格，20 列网格 */
.decl-table-guided, .decl-grid.decl-plain {
  table-layout: fixed !important;
  width: 100%;
  border-collapse: collapse;
}
.decl-grid.decl-plain td { padding: 0; vertical-align: middle; }
.decl-grid.decl-plain .lf { height: 30px; }


/* 表头整表加外框线 */
.decl-grid.decl-plain {
  border: 1px solid #c9d7e6 !important;
  border-radius: 4px;
  overflow: hidden;
}
.decl-grid.decl-plain td {
  border-right: 1px solid #c9d7e6 !important;
  border-bottom: 1px solid #eef2f7;
}
.decl-grid.decl-plain td:last-child { border-right: 0 !important; }
.decl-grid.decl-plain tr:last-child td { border-bottom: 0; }


/* 表头边框：加强，确保可见 */
table.decl-grid.decl-plain {
  border: 1px solid #a9c0d6 !important;
  border-collapse: collapse !important;
  overflow: visible !important;
  border-radius: 0 !important;
}
table.decl-grid.decl-plain > tbody > tr > td {
  border: 1px solid #dbe5f0 !important;
}


/* 列名加宽，且一律不换行 */
.decl-layout .lf .lb {
  flex: 0 0 98px !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}


/* 日期输入框：文字用正常深色，不要灰蒙蒙 */
.decl-layout .dl-input[type=date],
.decl-layout .dl-input[type=date]::-webkit-datetime-edit,
.decl-layout .dl-input[type=date]::-webkit-datetime-edit-fields-wrapper,
.decl-layout .dl-input[type=date]::-webkit-datetime-edit-text,
.decl-layout .dl-input[type=date]::-webkit-datetime-edit-month-field,
.decl-layout .dl-input[type=date]::-webkit-datetime-edit-day-field,
.decl-layout .dl-input[type=date]::-webkit-datetime-edit-year-field {
  color: #1a2330 !important;
  background: #FAFFBD;
  cursor: text;
}
.decl-layout .dl-input[type=date]:focus { background: #fff8c9; }


/* 列名：字号再 +1（12.5px），不用粗体；宽度 98 → 123px，
   让值框左边和「企业名称」框左边落在同一条竖线上 */
.decl-layout .lf .lb {
  font-size: 12.5px !important;
  font-weight: 400 !important;
  -webkit-text-stroke-width: 0 !important;
  letter-spacing: 0;
  flex: 0 0 123px !important;
}


/* 不显示列名、但要占住列名宽度的格子（企业名称那四格）：纯占位，不画分隔线 */
.decl-layout .lf .lpad {
  flex: 0 0 123px;
  align-self: stretch;
}


/* ===== 表头：CSS Grid（20 列），不再用 table + colspan =====
   宽度的含义和以前一样：每格 grid-column: span round(宽/5)。
   因为列宽由 1fr 均分，不会再有 border/colspan 累计出来的错位。 */
.dgrid {
  display: grid;
  grid-template-columns: repeat(20, minmax(0, 1fr));
  width: 100%;
}
.dgrid .dcell {
  border-right: 1px solid #c9d7e6;
  border-bottom: 1px solid #eef2f7;
  background: #fff;
  min-width: 0;
  min-height: 30px;
}

/* 运费/保费/杂费：一格三框——标志代码 · 费/费率 · 币制 */
.decl-layout .lf.fee { gap: 4px; }
.decl-layout .lf.fee .fee-mark { flex: 0 0 58px; padding: 0 2px; font-size: 11.5px; }
.decl-layout .lf.fee .fee-cur { flex: 0 0 62px; padding: 0 2px; font-size: 11.5px; }
.decl-layout .lf.fee .fee-val { flex: 1 1 auto; min-width: 0; }
.decl-layout .lf.fee .fee-cur:disabled { background: #f2f4f7; color: #9aa7b4; }


/* 其他包装 / 价格说明 / 业务事项：定宽 184px，挂在输入框右边，输入框自动填满剩下的宽度 */
.decl-layout .lf .sw-btn.btn-fix {
  flex: 0 0 184px;
  width: 184px;
  margin: 0 0 0 4px;
  padding: 0 8px;
}


/* ===== 行距收紧，贴近单一窗口（原来 30px 一行）===== */
.decl-grid.decl-plain .lf { height: 24px; min-height: 24px; }
.dgrid .dcell { min-height: 24px; }
.decl-layout .lf .dl-input,
.decl-layout .lf select.dl-input {
  height: 22px;
  line-height: 22px;
  font-size: 12px;
}
.decl-layout .lf .sw-btn { height: 22px; line-height: 22px; }
.decl-layout .lf-btn .sw-btn { margin: 1px 0; }
.decl-layout .lf .sw-btn.btn-fix { height: 22px; }


/* ===== 表体明细面板：列名字号 +1，行距收紧（参考单一窗口）===== */
.it-row {
  display: grid !important;
  grid-template-columns: repeat(20, minmax(0, 1fr));
  gap: 0 !important;
  margin: 0 !important;
}
.it-row .it-f { height: 24px; }
.it-row .it-f > span { font-size: 12px; flex: 0 0 118px; }
.it-row .it-f .dl-input { height: 20px; line-height: 20px; }
.it-row .it-f select.dl-input { height: 20px; line-height: 20px; }
.it-row .it-cell { min-width: 0; }
/* 表体明细里的蓝色小按钮（如「协定享惠」） */
.it-row .it-f .it-btn {
  flex: 0 0 126px;
  width: 126px;
  height: 20px;
  line-height: 20px;
  margin: 0 0 0 4px;
  padding: 0 4px;
  font-size: 12px;
}


/* 橙色列名：表体明细里加粗；表头的橙色列名也加粗 */
.it-row .it-f > span.hl {
  color: #e07b00;
  font-weight: 700;
}
.decl-layout .lf .lb.hl {
  font-weight: 700 !important;
}


/* ===== 顶栏：浅蓝渐变 + 极细网格 + 底部一条高光，做出一点科技感 =====
   走「浅色」而不是深色：报关单是信息密集型界面，顶栏压暗会分散注意力，
   而且右侧的账号/工单文字得全部改成白字才能看清。 */
.topbar {
  background:
    linear-gradient(90deg, rgba(22, 102, 184, .13), rgba(111, 194, 255, .16) 55%, rgba(22, 102, 184, .07)),
    repeating-linear-gradient(90deg, rgba(22, 102, 184, .06) 0 1px, rgba(255, 255, 255, 0) 1px 22px),
    repeating-linear-gradient(0deg, rgba(22, 102, 184, .05) 0 1px, rgba(255, 255, 255, 0) 1px 22px),
    #fafcff;
  border-bottom: 1px solid #c9dcf0;
  box-shadow: 0 1px 0 rgba(111, 194, 255, .6), inset 0 -1px 0 rgba(255, 255, 255, .75);
}

/* 顶栏底部一条流动光带：从左扫到右，循环 */
.topbar { position: relative; }
.topbar::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg,
    rgba(111, 194, 255, 0) 0%,
    rgba(111, 194, 255, .15) 25%,
    #6fc2ff 50%,
    rgba(111, 194, 255, .15) 75%,
    rgba(111, 194, 255, 0) 100%);
  background-size: 42% 100%;
  background-repeat: no-repeat;
  animation: topbar-sweep 5s linear infinite;
  pointer-events: none;
}
@keyframes topbar-sweep {
  0%   { background-position: -45% 0; }
  100% { background-position: 145% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .topbar::after { animation: none; opacity: .35; }
}


/* ===== 去掉 number 输入框右侧的上下小箭头 ===== */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}


/* ===== datalist 的小三角：原生那个贴着框底，换成自绘的、垂直居中 ===== */
.decl-layout input[list]::-webkit-calendar-picker-indicator {
  display: none !important;          /* 藏掉浏览器自带的 */
}
.decl-layout input[list],
.decl-layout input[list].wbg,
.decl-layout input[list]:focus {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0h10L5 6z' fill='%234a5b6e'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
  background-size: 9px 5px;
  padding-right: 20px;
}


/* ---------------------------------------------------------------- 回执信息 */
.rc-grid td { font-size: 12px; vertical-align: top; }
.rc-grid .rc-msg { color: #3a4a5e; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 620px; }
.rc-grid .rc-empty { color: #8a99a9; text-align: center; padding: 26px 0; }
.rc-grid .tag { display: inline-block; }
.rc-grid .tag.ok { background: #e7f5ec; color: #1f7a4d; }
.rc-grid .tag.warn { background: #fdf1e0; color: #96631a; }
.rc-grid .tag.bad { background: #fdeceb; color: #b4372c; }


/* ---------------- 加载遮罩 ---------------- */
.loading-mask {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(238, 244, 250, .72);
  backdrop-filter: blur(1px);
}
.loading-mask.hidden { display: none; }
.loading-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: #fff;
  border: 1px solid #c9d7e6;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(28, 68, 112, .16);
  font-size: 14px;
  color: #21324a;
}
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #cfe0f2;
  border-top-color: #1f6fd0;
  border-radius: 50%;
  animation: lspin .8s linear infinite;
}
@keyframes lspin { to { transform: rotate(360deg); } }
.loading-retry {
  margin-left: 6px;
  padding: 4px 12px;
  border: 1px solid #1f6fd0;
  background: #1f6fd0;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}
.loading-retry.hidden { display: none; }


/* 价格说明弹窗 */
.modal { position: fixed; inset: 0; z-index: 9000; display: flex;
  align-items: center; justify-content: center; background: rgba(20,35,55,.35); }
.modal.hidden { display: none; }
.modal-box { background: #fff; border: 1px solid #c9d7e6; border-radius: 8px;
  box-shadow: 0 12px 40px rgba(20,40,70,.25); width: 520px; max-width: 92vw; }
.modal-hd { display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; border-bottom: 1px solid #e6eef7; font-weight: 600; color: #21324a; }
.modal-x { cursor: pointer; font-size: 18px; color: #7d8fa5; }
.modal-bd { padding: 12px 16px; }
.modal-ft { display: flex; justify-content: flex-end; gap: 8px;
  padding: 12px 16px; border-top: 1px solid #e6eef7; }
.pn-hint { margin: 0 0 10px; font-size: 12px; color: #7d8fa5; }
.pn-row { display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 8px; font-size: 13px; color: #21324a; }
.pn-row > span { flex: 1 1 auto; }
.pn-row > select { flex: 0 0 150px; height: 28px; }
.pn-cur { margin-top: 10px; font-size: 12px; color: #5b6b7d; }
.pn-cur code { background: #f2f6fb; padding: 2px 6px; border-radius: 3px; }


/* 其他包装弹窗 */
.op-box { width: 760px; }
.op-bd { max-height: 60vh; overflow: auto; padding: 10px 16px; }
.op-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.op-table th { background: #eaf1f9; color: #21324a; font-weight: 600;
  padding: 6px 8px; border: 1px solid #d6e3f0; }
.op-table td { padding: 5px 8px; border: 1px solid #e6eef7; }
.op-table tbody tr:nth-child(even) { background: #f7fafd; }
.op-table input[type=checkbox] { width: 14px; height: 14px; }


/* 申报流程卡片 */
.card { background:#fff; border:1px solid #dbe6f2; border-radius:8px; padding:16px 18px; }
.flow-row { display:flex; gap:12px; align-items:flex-start; cursor:pointer; }
.flow-row input { margin-top:3px; width:16px; height:16px; }
.flow-row b { font-size:14px; color:#1d2b3d; }
.flow-row p { margin:6px 0 0; font-size:12.5px; color:#5b6b7d; line-height:1.6; }
.flow-foot { display:flex; align-items:center; justify-content:space-between;
  margin-top:16px; padding-top:14px; border-top:1px solid #eef4fa; }


/* ---------------- 首页 Dashboard ---------------- */

.brand { cursor: pointer; user-select: none; }
.brand:hover .b1, .brand:hover .b2 { color: #1e5aa8; }

.home-wrap { padding:22px 26px 40px; max-width:1180px; }
.home-head { display:flex; align-items:flex-end; justify-content:space-between; margin-bottom:18px; }
.home-head h1 { font-size:22px; margin:0 0 4px; color:#16273d; }
.home-head p { margin:0; font-size:13px; color:#7d8fa5; }
.home-growth { font-size:13px; color:#1e8a5a; background:#e9f7f0;
  padding:5px 10px; border-radius:20px; }
.home-growth.down { color:#c0392b; background:#fdecea; }

.kpi-row { display:grid; grid-template-columns:repeat(5, 1fr); gap:14px; margin-bottom:18px; }
.kpi { background:#fff; border:1px solid #e2ecf7; border-radius:10px; padding:16px 16px 14px;
  box-shadow:0 1px 2px rgba(30,70,120,.04); }
.kpi .k-label { font-size:12.5px; color:#7d8fa5; margin-bottom:8px; }
.kpi .k-value { font-size:26px; font-weight:600; color:#16273d; line-height:1.1; }
.kpi .k-value small { font-size:13px; font-weight:400; color:#7d8fa5; margin-left:4px; }
.kpi.warn .k-value { color:#e07b00; }
.kpi.danger .k-value { color:#c0392b; }

.home-cols { display:grid; grid-template-columns:1.35fr 1fr; gap:16px; }
.home-card { background:#fff; border:1px solid #e2ecf7; border-radius:10px; padding:16px 18px;
  display:flex; flex-direction:column; }
.hc-head { display:flex; justify-content:space-between; align-items:center;
  margin-bottom:12px; font-size:14px; color:#16273d; }
.hc-head a { font-size:12.5px; color:#1e5aa8; cursor:pointer; }
.hc-sub { font-size:12px; color:#9aabbd; font-weight:400; }

.recent-list .r-item { display:flex; justify-content:space-between; align-items:center;
  padding:9px 8px; border-radius:6px; cursor:pointer; font-size:13px; color:#24384f; }
.recent-list .r-item:hover { background:#f4f9ff; }
.recent-list .r-id { color:#8fa1b5; width:44px; flex:0 0 44px; }
.recent-list .r-title { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.recent-list .r-time { color:#9aabbd; font-size:12px; margin-left:10px; }
.r-badge { font-size:11.5px; padding:2px 7px; border-radius:10px; margin-left:8px; }
.r-badge.sent { background:#e9f7f0; color:#1e8a5a; }
.r-badge.checked { background:#e8f1fb; color:#1e5aa8; }
.r-badge.submitted { background:#fff3e2; color:#c77800; }
.r-badge.draft, .r-badge.invalid { background:#f2f5f9; color:#6b7c8f; }

.trend-box { display:flex; align-items:flex-end; gap:8px; flex:1 1 auto;
  min-height:150px; margin:6px 0 0; }
.trend-bar { flex:1; display:flex; flex-direction:column; justify-content:flex-end; align-items:center; height:100%; }
.trend-bar i { display:block; width:62%; background:#cddffb; border-radius:4px 4px 0 0; min-height:4px; }
.trend-bar.on i { background:#2f6fd0; }
.trend-bar span { font-size:11px; color:#9aabbd; margin-top:6px; }
.quick-row { display:flex; gap:8px; margin-top:auto; padding-top:14px;
  border-top:1px solid #eef4fa; }


/* 首页模式下隐藏单据列表与详情 */
body.home-mode #overview, body.home-mode #ship-view { display: none !important; }


/* 申报表专属：只收这一页的留白，其他页维持 18px */
.body:has(#pane-form.active) { padding: 0 1px 3px; }
#pane-form .decl-wrap { padding: 0 !important; }


/* 单据一览：标题区里的按钮相对整块上下居中 */
/* ov-head-center */
#overview .main-head { position: relative; padding-right: 150px; min-height: 62px;
  display: flex; flex-direction: column; justify-content: center; }
#overview .main-head .actions { position: absolute; right: 18px; top: 50%;
  transform: translateY(-50%); margin: 0; }


/* 顶栏用户下拉菜单 */
.userbox { position: relative; }
.user-trigger { display:flex; align-items:center; gap:7px; height:30px; padding:0 8px;
  background:transparent; border:1px solid transparent; border-radius:7px; cursor:pointer;
  font-size:13px; color:#24384f; }
.user-trigger:hover { background:#eef4fb; border-color:#dbe6f2; }
.user-trigger .avatar { width:20px; height:20px; border-radius:50%; background:#1e5aa8;
  color:#fff; font-size:11px; display:flex; align-items:center; justify-content:center; }
.user-trigger .caret { font-size:10px; color:#8fa1b5; }

.user-menu { position:absolute; right:0; top:calc(100% + 8px); z-index:9500; width:180px;
  background:#fff; border:1px solid #dbe6f2; border-radius:9px; padding:6px;
  box-shadow:0 10px 30px rgba(20,45,80,.14); }
.user-menu.hidden { display:none; }
.um-head { padding:8px 10px 9px; border-bottom:1px solid #eef4fa; margin-bottom:4px;
  display:flex; flex-direction:column; gap:2px; }
.um-head b { font-size:13px; color:#16273d; }
.um-head span { font-size:11.5px; color:#8fa1b5; }
.um-item { display:block; width:100%; text-align:left; padding:7px 10px; border:0;
  background:transparent; border-radius:6px; font-size:13px; color:#24384f;
  cursor:pointer; text-decoration:none; }
.um-item:hover { background:#f2f7fd; }
.um-item.danger { color:#c0392b; }
.um-item.danger:hover { background:#fdecea; }

/* 侧栏里的复核待办入口 */
.side-actions { padding:8px 12px 0; }
.side-actions .side-item { display:flex; align-items:center; gap:6px; width:100%;
  padding:9px 10px; border:1px solid #dbe6f2; border-radius:7px; background:#fff;
  font-size:13.5px; color:#24384f; cursor:pointer; text-align:left; }
.side-actions .side-item:hover { background:linear-gradient(180deg,#eaf2fb,#dfeaf7); }

/* 回执表格：.grid 原本是表单的两列布局，用到 <table> 上会被当成网格容器，
   这里强制恢复成表格行为，否则表头和内容会挤成一行 */
table.grid { display: table; width: 100%; table-layout: fixed; border-collapse: collapse; }
.rc-grid th, .rc-grid td {
  padding: 7px 10px;
  border-bottom: 1px solid #EDF2F9;
  text-align: left;
  vertical-align: top;
}
.rc-grid thead th {
  font-size: 12px; color: #5B6B7D; font-weight: 600;
  background: #F7FAFE; white-space: nowrap;
}
.rc-grid tbody tr:last-child td { border-bottom: 0; }

/* 资料下载 */
.doc-dl {
  margin-left: auto; margin-right: 8px;
  font-size: 12px; color: var(--accent, #1E5AA8);
  text-decoration: none; white-space: nowrap;
}
.doc-dl:hover { text-decoration: underline; }

/* ---------- 报检区（沿用表头 .dgrid 版式）---------- */
.insp-head .lf { gap: 6px; }
.inspect-toggle {
  width: 18px; height: 18px; padding: 0;
  border: none; border-radius: 50%;
  background: #1E5AA8; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .15s, transform .15s;
  box-shadow: 0 1px 3px rgba(30, 90, 168, .35);
}
.inspect-toggle:hover { background: #17498A; }
.inspect-toggle svg { display: block; transition: transform .15s; }
.inspect-toggle.open svg { transform: rotate(90deg); }
.insp-title { font-weight: 600; color: #34495E; }
.insp-note { font-size: 12px; color: #8A97A8; }
.insp-wrap.hidden { display: none; }
.insp-wrap { display: contents; }

/* 报检区的标签和值，和表头其它行完全对齐 */
.insp-cell .lf .lb {
  flex: 0 0 123px !important;      /* 和表头其它列同宽，值框左右边界才对得齐 */
  font-size: 12.5px !important;
  font-weight: 400 !important;
  text-align: right;
  border-right: 1px solid #c9d7e6;
  padding-right: 8px;
}
.insp-cell .dl-input { height: 22px; }
.decl-grid.insp-grid { position: relative; }
/* 表头箭头：绝对定位到最后一行行首 */
.decl-grid.insp-grid > #btn-inspect-toggle {
  position: absolute; left: 2px; z-index: 3;
}
.it-toggle-cell .inspect-toggle { position: static; left: auto; top: auto; }

/* 表体报检开关 */
.item-insp-bar { display: flex; align-items: center; padding: 2px 4px; }
.item-insp-bar .inspect-toggle { position: static; }

/* 报检区里的蓝色按钮：定宽 184px 靠右，输入框自动填到按钮左边 */
.insp-cell .lf-btn { padding-left: 0; }
/* 输入框右边缘贴着按钮左边缘：去掉 flex gap 和按钮的左外边距 */
.insp-cell.has-btn .lf { padding-right: 5px; gap: 0; }
.insp-cell .sw-btn.btn-fix {
  width: 184px; flex: 0 0 184px;
  margin: 3px 0 3px 0 !important; padding: 0 8px;
}

/* 没有标签的报检格：输入框从最左边开始 */
.insp-cell.no-lb .lf { padding-left: 0; }

/* 表体里的展开按钮格 */
.it-toggle-cell {
  display: flex; align-items: center; justify-content: flex-start; padding-left: 6px;
  height: 24px;
  border-left: 1px solid #e3e8ee;
  border-right: 1px solid #e3e8ee;
  border-bottom: 1px solid #e3e8ee;
}
.it-row:last-child .it-toggle-cell { border-bottom: 0; }

.it-spacer { background: transparent; }

/* 表体报检按钮：按钮在格子内部，左右各留 2px、上下各留 1px */
.it-btn-cell {
  display: flex; align-items: center;
  padding: 0 2px; box-sizing: border-box;
  height: 20px;
  border-left: 1px solid #e3e8ee;
  border-right: 1px solid #e3e8ee;
  border-bottom: 1px solid #e3e8ee;
}
.it-btn-cell .sw-btn {
  flex: 1 1 auto; width: auto; margin: 0;
  height: 20px; line-height: 20px;
  border-radius: 2px; font-size: 11.5px;
}

/* 报检区第一行（目的地海关/启运日期/企业资质）上面补一条线 */
.dgrid .insp-wrap > .insp-cell:nth-child(-n+3) {
  border-top: 1px solid #c9d7e6;
}

/* 表头最后一行（标记唛码）只有一格，补左边线。
   用伪元素画在 -1px 处，和上面各行的竖线落在同一条像素上 */
.dgrid .lcell.last-head-cell { position: relative; }
.dgrid .lcell.last-head-cell::before {
  content: ''; position: absolute; left: -1px; top: 0; bottom: 0;
  width: 1px; background: #c9d7e6;
}

/* 表体明细里的非必填录入框：白底（和表头的 wbg 一致） */
.it-row .it-f .dl-input.wbg,
.it-f .dl-input.wbg { background: #fff !important; }

/* 生产日期：隐藏原生日期框，只留一个小日历按钮 */
/* 日期选择器：透明锚点贴在输入框左边缘，弹窗左边界和输入框左边线对齐 */
.it-f .date-source {
  position: absolute; left: 0; top: 0; width: 1px; height: 100%;
  opacity: 0; pointer-events: none; border: 0; padding: 0;
}

/* 日期选择器需要定位参照 */
.it-f { position: relative; }

/* 表头行高再压 2px（32 → 30） */
.decl-layout .lf { min-height: 30px; }
.dgrid .dcell { min-height: 28px; }

/* 行高对齐单一窗口（约 22px）；输入框铺满单元格内容区，不留白边 */
.decl-layout .lf { padding: 0 !important; gap: 0 !important; min-height: 21px; align-items: stretch; }
.decl-layout .lf .lb { padding-left: 6px; font-size: 11.5px !important; line-height: 1.1; }
.decl-layout .lf .dl-input,
.decl-layout .lf select.dl-input {
  height: 21px !important; line-height: 21px !important;
  border-radius: 0 !important; border: 0 !important;
  align-self: stretch; box-sizing: border-box; font-size: 11.5px !important;
  display: block;
}
.decl-layout .lf .sw-btn { height: 21px !important; line-height: 21px !important; border-radius: 0 !important; margin: 0 2px !important; }
.dgrid .dcell { min-height: 22px !important; }
/* 单元格网格线一律保留 */
.dgrid .dcell {
  border-right: 1px solid #c9d7e6 !important;
  border-bottom: 1px solid #c9d7e6 !important;
}

/* 聚焦时的蓝色边框去掉（表头 + 表体） */
.decl-layout .lf .dl-input:focus,
.decl-layout .lf select.dl-input:focus,
.it-f .dl-input:focus,
.it-f select.dl-input:focus {
  outline: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* 申报表里所有录入框聚焦时：不要外描边，只在底部留一条蓝线 */
#pane-form input:focus,
#pane-form select:focus,
#pane-form textarea:focus {
  outline: none !important;
  outline-offset: 0 !important;
  box-shadow: none !important;
  border-color: transparent !important;
  border-bottom: 2px solid #2f6fdd !important;
}

/* 单元格不要内边距，输入框直接铺到边框上（否则底部露出白边） */
.dgrid .dcell { padding: 0 !important; }
.decl-layout .lf { height: 100%; }
.decl-layout .lf .dl-input,
.decl-layout .lf select.dl-input { height: 100% !important; min-height: 21px; }

/* ===== 表体明细：和表头同一套视觉（22px 行高、输入框铺满、无白边）===== */
.it-row .it-f {
  height: 22px !important; min-height: 22px !important;
  padding: 0 !important; gap: 0 !important; align-items: stretch;
}
.it-row .it-f > span {
  flex: 0 0 113px; font-size: 11.5px; line-height: 1.1;   /* 94 × 1.2，再宽 20% */
  display: flex; align-items: center; justify-content: flex-end;
  padding-right: 6px; border-right: 1px solid #e3e8ee;
}
.it-row .it-f .dl-input,
.it-row .it-f select.dl-input {
  height: 100% !important; line-height: 20px !important;
  border-radius: 0 !important; border: 0 !important;
  font-size: 11.5px !important; align-self: stretch;
}
.it-row .it-f .it-btn { height: 20px !important; line-height: 20px !important; }

/* 右侧栏（集装箱 / 随附单证）字号 +1 */
.rail-grid .tabulator { font-size: 11px !important; }
.rail-grid .tabulator-header .tabulator-col-title { font-size: 11px !important; }
.rail-grid .tabulator-row .tabulator-cell { font-size: 11px !important; }
.rail-grid .tabulator-placeholder { font-size: 11px !important; }

/* 表体商品表格字号 -1 */
.item-grid .tabulator { font-size: 11.5px !important; }
.item-grid .tabulator-header .tabulator-col-title { font-size: 11.5px !important; }
.item-grid .tabulator-row .tabulator-cell { font-size: 11.5px !important; }
.item-grid .tabulator-placeholder { font-size: 11.5px !important; }

/* 申报表整页上移 2px */
#pane-form .decl-toolbar { margin-top: 8px !important; }
#pane-form.active { margin-top: -2px; }

/* 右侧栏：编辑区优先显示，表格自己收缩 */
.sw-rail .rail-grid { min-height: 0 !important; flex: 1 1 auto !important; }
.sw-rail .rail-body { flex: 0 0 auto !important; }

/* 随附单证板块再矮 6px（共 12px），tips 整体上移 6px */
.sw-rail > .rail-blk:nth-child(2) { margin-bottom: 4px !important; }
.sw-rail > .rail-blk:last-child { margin-bottom: 12px !important; }

/* 检验检疫签证申报要素：多行输入 */
.ie-textarea {
  width: 100%; box-sizing: border-box; min-height: 150px;
  padding: 8px 10px; font-size: 13px; line-height: 1.6;
  border: 1px solid #c9d7e6; border-radius: 3px;
  background: #FAFFBD; resize: vertical;
}
.ie-textarea:focus { outline: none; border-bottom: 2px solid #2f6fdd; }
/* 已填值的报检按钮加个圆点提示 */
.sw-btn.filled::after { content: ''; }

/* ===== 使用人弹窗（编辑使用人信息）===== */
.iu-box { width: 720px; max-width: 94vw; }
.iu-bd { padding: 8px 10px 4px; }
.iu-tools { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.iu-tools .btn.sm { height: 24px; line-height: 22px; padding: 0 10px; font-size: 12px; }
.iu-table { width: 100%; border-collapse: collapse; background: #fff; }
.iu-table th {
  background: linear-gradient(#dbe9f7, #cfe2f5); border: 1px solid #a9c0d6;
  font-size: 12px; font-weight: 600; color: #1b3a5c; height: 26px; text-align: center;
}
.iu-table td { border: 1px solid #e3e8ee; height: 26px; padding: 0; }
.iu-table td.iu-ck { text-align: center; }
.iu-table td.iu-no { text-align: center; font-size: 12px; color: #3a4a5e; }
.iu-table .iu-in {
  width: 100%; height: 24px; box-sizing: border-box; border: 0; padding: 0 6px;
  font-size: 12.5px; background: #fff;
}
.iu-table .iu-in:focus { outline: none; background: #FAFFBD; }

/* ===== 检验检疫签证申报要素弹窗 ===== */
.ie-box { width: 820px; max-width: 96vw; }
.ie-bd { padding: 8px 10px 8px; }
.ie-scroll { max-height: 340px; overflow: auto; border: 1px solid #a9c0d6; }
.ie-table { width: 100%; border-collapse: collapse; background: #fff; }
.ie-table th {
  position: sticky; top: 0; z-index: 1;
  background: linear-gradient(#dbe9f7, #cfe2f5); border: 1px solid #a9c0d6;
  font-size: 12px; font-weight: 600; color: #1b3a5c; height: 26px; text-align: center;
}
.ie-table td { border: 1px solid #e3e8ee; height: 24px; font-size: 12px; }
.ie-table td.ie-ck, .ie-table td.ie-no, .ie-table td.ie-code { text-align: center; }
.ie-table td.ie-name { padding: 0 6px; }
.ie-table .ie-num {
  width: 100%; height: 22px; box-sizing: border-box; border: 0;
  text-align: center; font-size: 12px; background: #fff;
}
.ie-table .ie-num:focus { outline: none; background: #FAFFBD; }
.ie-extra { margin-top: 6px; display: flex; flex-direction: column; gap: 3px; }
.ie-row { display: flex; align-items: center; gap: 6px; }
.ie-row > span { flex: 0 0 160px; text-align: right; font-size: 12px; color: #3a4a5e; }
.ie-in {
  flex: 1 1 auto; min-width: 0; height: 24px; box-sizing: border-box;
  padding: 0 7px; font-size: 12.5px; border: 1px solid #c9d7e6; border-radius: 2px;
  background: #FAFFBD;
}
.ie-in:focus { outline: none; border-bottom: 2px solid #2f6fdd; }

/* ===== 危险货物信息弹窗 ===== */
.dg-box { width: 620px; max-width: 94vw; }
.dg-bd { padding: 8px 10px; }
.dg-table { width: 100%; border-collapse: collapse; }
.dg-table th {
  width: 150px; text-align: right; padding: 0 8px; height: 28px;
  font-size: 12.5px; font-weight: 400; color: #22303f;
  background: #eef3f9; border: 1px solid #a9c0d6;
}
.dg-table td { border: 1px solid #a9c0d6; padding: 0; }
.dg-table .dg-in {
  width: 100%; height: 26px; box-sizing: border-box; border: 0;
  padding: 0 8px; font-size: 12.5px; background: #fff;
}
.dg-table select.dg-in { height: 28px; }
.dg-table .dg-in:focus { outline: none; border-bottom: 2px solid #2f6fdd; }
.dg-help {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; margin-right: 4px; border-radius: 50%;
  background: #1E5AA8; color: #fff; font-size: 11px; font-style: normal;
  cursor: help;
}

/* ===== 商品单据弹窗 ===== */
.idoc-box { width: 780px; max-width: 95vw; }
.idoc-bd { padding: 8px 10px; }
.idoc-group {
  font-size: 13px; font-weight: 700; color: #1E5AA8;
  padding: 2px 0 6px;
}
.idoc-info { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.idoc-info th {
  background: #eef3f9; border: 1px solid #a9c0d6; height: 24px;
  font-size: 12px; font-weight: 400; color: #22303f; text-align: center;
}
.idoc-info td {
  border: 1px solid #a9c0d6; height: 24px; text-align: center;
  font-size: 12.5px; background: #f7fafd;
}
.idoc-lock { font-style: normal; font-size: 11px; color: #6b7a8c; }
.idoc-tools { display: flex; gap: 6px; margin-bottom: 6px; }
.idoc-tools .idoc-in {
  height: 24px; box-sizing: border-box; padding: 0 7px; font-size: 12.5px;
  border: 1px solid #c9d7e6; border-radius: 2px; background: #fff;
}
.idoc-tools select.idoc-in { width: 170px; }
.idoc-tools input.idoc-in { flex: 1 1 auto; min-width: 0; }
.idoc-tools .btn.sm { height: 24px; line-height: 22px; padding: 0 10px; font-size: 12px; }
.idoc-table { width: 100%; border-collapse: collapse; }
.idoc-table th {
  background: linear-gradient(#dbe9f7, #cfe2f5); border: 1px solid #a9c0d6;
  height: 24px; font-size: 12px; font-weight: 600; color: #1b3a5c; text-align: center;
}
.idoc-table td { border: 1px solid #e3e8ee; height: 24px; font-size: 12.5px; padding: 0 8px; }
.idoc-table td.idoc-empty { text-align: center; color: #98a6b6; }
.idoc-table td.idoc-op { text-align: center; }
.idoc-table td.idoc-op a { color: #1E5AA8; cursor: pointer; }

/* 表体只读字段：灰底（取单一窗口的 #EBEBEB），不可编辑 */
.it-row .it-f .dl-input.ro,
.it-row .it-f .dl-input[readonly] {
  background: #EBEBEB !important;
  color: #22303f !important;
  cursor: default;
}

/* 表头只读字段也用单一窗口的灰 #EBEBEB */
.decl-layout .dl-input.ro,
.decl-layout .dl-input[readonly],
.decl-layout .lf .fee-cur:disabled,
.item-layout .dl-input.ro,
.item-layout .dl-input[readonly] {
  background: #EBEBEB !important;
  color: #22303f !important;
  cursor: default;
}

/* 表体（含检验检疫行）：格子高度跟随本行最高的元素，录入框铺满，不留缝 */
.it-row .it-f {
  height: auto !important; min-height: 22px !important;
  align-items: stretch !important; box-sizing: border-box;
}
.it-row .it-f .dl-input,
.it-row .it-f select.dl-input { height: 100% !important; min-height: 20px; }
.it-row { align-items: stretch; }

/* 集装箱编辑区：自重(KG)、拼箱标识 用白底（非必填） */
.rf > input[data-rail-field="containers:tare"],
.rf > input[data-rail-field="containers:lcl"] {
  background: #fff !important;
}

/* 「关联信息」独立板块：按内容高度，不参与平分；4 个录入框白底 */
.sw-rail > .rail-blk.rail-blk-mini {
  flex: 0 0 auto !important;
  height: auto !important;
  margin-top: -2px !important;   /* 与「随附单证」的间距减 2px */
}
.rail-blk-mini .rail-body { gap: 4px; }
.rail-blk-mini .rf > input {
  background: #fff !important;
}

/* 集装箱 +2 行、随附单证 -2 行（每行 24px，共挪 48px） */
.sw-rail > .rail-blk:nth-child(1) { flex: 1 1 96px !important; }

/* 表体商品：列名全部居中 */
.item-grid .tabulator-header .tabulator-col,
.item-grid .tabulator-header .tabulator-col-content,
.item-grid .tabulator-header .tabulator-col-title {
  text-align: center !important;
  justify-content: center;
}
.item-grid .tabulator-header .tabulator-col-title { width: 100%; }

/* ===== 顶栏主导航（方案 A） ===== */
.topnav { display: flex; align-items: center; gap: 2px; margin-left: 6px; }
.nav-item {
  border: 0; background: transparent; cursor: pointer; font-family: inherit;
  font-size: 13px; color: #41546b; padding: 6px 13px; border-radius: 6px;
  transition: background .13s ease, color .13s ease;
}
.nav-item:hover { background: #f1f5fa; color: #1E5AA8; }
.nav-item.on { background: #e8f1fb; color: #1E5AA8; font-weight: 650; }
@media (max-width: 1280px) { .nav-item { padding: 6px 9px; font-size: 12.5px; } }

/* 非「单据」模块时不显示单据列表（列数也要跟着减） */
body.module-mode .sidebar { display: none; }
body.module-mode .workspace { grid-template-columns: 1fr; }
body.module-mode #btn-expand { display: none !important; }
body.module-mode #mod-view { flex: 1; min-width: 0; }

/* 模块占位页 */
.mod-wrap { padding: 26px 30px; overflow-y: auto; width: 100%; min-width: 0; }
.mod-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.mod-head h1 { font-size: 18px; margin: 0; font-weight: 680; }
.mod-tag { font-size: 11.5px; color: #8a6d1d; background: #fff8e1;
  border: 1px solid #f0d98a; border-radius: 20px; padding: 1px 9px; }
.mod-sub { font-size: 12.5px; color: var(--muted); margin-bottom: 18px; }
.mod-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.mod-card { background: #fff; border: 1px solid #e4ebf3; border-radius: 10px; padding: 14px 16px; }
.mod-card h3 { font-size: 13.5px; margin: 0 0 8px; }
.mod-card li { font-size: 12.5px; color: #52647a; line-height: 1.9; margin-left: 14px; }
.mod-soon { font-size: 12px; color: #93a3b8; margin-top: 6px; }

/* ===== 商品库 / 客户库 ===== */
.mod-count { font-size: 12px; color: #7b8ca0; }
.lib-add { margin-left: auto; }
.lib-tools { display: flex; gap: 10px; margin-bottom: 10px; }
.lib-search { flex: 1; max-width: 420px; height: 32px; padding: 0 12px; font-size: 12.5px;
  border: 1px solid #d5dfeb; border-radius: 6px; background: #fff; outline: none; }
.lib-search:focus { border-color: #1E5AA8; box-shadow: 0 0 0 2px #e8f0fb; }
.lib-tablewrap { background: #fff; border: 1px solid #e4ebf3; border-radius: 10px; overflow: auto; }
.lib-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.lib-table th { background: #f7f9fc; text-align: left; padding: 8px 10px; color: #52647a;
  font-weight: 600; border-bottom: 1px solid #e8eef5; white-space: nowrap; }
.lib-table td { padding: 7px 10px; border-bottom: 1px solid #f1f5fa; color: #33465c;
  max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-table tr:hover td { background: #fafcff; }
.lib-dim { color: #b6c2d1; }
.lib-empty { padding: 26px 10px; text-align: center; color: #8b9bb0; line-height: 1.9; }
.lib-ops { white-space: nowrap; }
.lib-ops .btn { margin-right: 4px; }
.btn.sm.danger { color: #c0392b; border-color: #f0c9c4; }
.btn.sm.danger:hover { background: #fdf1f0; border-color: #e2a49c; }
.lib-box { width: 560px; max-width: 92vw; }
.lib-bd { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.lib-f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #52647a; }
.lib-f span { color: #6b7c92; }
.lib-f input, .lib-f textarea {
  height: 32px; padding: 0 10px; font-size: 12.5px; font-family: inherit;
  border: 1px solid #d5dfeb; border-radius: 6px; outline: none; background: #fff;
}
.lib-f textarea { height: 62px; padding: 7px 10px; resize: vertical; }
.lib-f input:focus, .lib-f textarea:focus { border-color: #1E5AA8; box-shadow: 0 0 0 2px #e8f0fb; }
.lib-f:has(textarea) { grid-column: span 2; }

/* ===== 归类 / 报表 / 设置 ===== */
.cls-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.cls-card { background: #fff; border: 1px solid #e4ebf3; border-radius: 10px; padding: 13px 15px; }
.cls-code { font-size: 15px; font-weight: 700; color: #1E5AA8; display: flex; align-items: center; gap: 8px; }
.cls-used { margin-left: auto; font-size: 11.5px; color: #8b9bb0; font-weight: 400; }
.cls-name { font-size: 13.5px; margin-top: 5px; color: #26323f; }
.cls-spec { font-size: 12px; color: #6b7c92; margin-top: 4px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.cls-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11.5px; color: #7b8ca0; margin-top: 8px; }
.cls-meta b { color: #33465c; font-weight: 600; }
.cls-elems { margin-top: 9px; font-size: 11.5px; color: #52647a; background: #f7f9fc;
  border-radius: 6px; padding: 7px 9px; line-height: 1.7; word-break: break-all; }
.cls-elems b { color: #1E5AA8; margin-right: 6px; font-weight: 600; }
.cls-note { margin-top: 16px; font-size: 12px; color: #8a6d1d; background: #fff8e1;
  border: 1px solid #f0d98a; border-radius: 8px; padding: 8px 12px; display: inline-block; }

.rep-kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 14px; }
.rep-kpi { background: #fff; border: 1px solid #e4ebf3; border-radius: 10px; padding: 11px 13px; }
.rep-kpi .n { font-size: 21px; font-weight: 700; color: #1E5AA8; }
.rep-kpi .l { font-size: 11.5px; color: #7b8ca0; margin-top: 2px; }
.rep-cols { display: grid; grid-template-columns: 1.35fr 1fr; gap: 12px; margin-bottom: 12px; }
.rep-card { background: #fff; border: 1px solid #e4ebf3; border-radius: 10px; padding: 13px 16px; }
.rep-card h3 { font-size: 13.5px; margin: 0 0 10px; }
.rep-chart { display: flex; align-items: flex-end; gap: 4px; height: 118px; }
.rep-bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.rep-bar i { width: 100%; background: linear-gradient(180deg, #6fc2ff, #1E5AA8);
  border-radius: 3px 3px 0 0; min-height: 2px; display: block; }
.rep-bar span { font-size: 9.5px; color: #a7b4c4; margin-top: 4px; }
.rep-row { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px;
  padding: 6px 0; border-bottom: 1px dashed #eef2f7; color: #41546b; }
.rep-row:last-child { border: 0; }
.rep-row b { color: #26323f; font-weight: 600; white-space: nowrap; }
.rep-code { font-style: normal; font-size: 10.5px; background: #eef1f4; color: #6b7c92;
  border-radius: 4px; padding: 1px 5px; margin-right: 6px; }
.rep-code.err { background: #fdeceb; color: #c0392b; }
@media (max-width: 1280px) {
  .rep-kpis { grid-template-columns: repeat(3, 1fr); }
  .rep-cols { grid-template-columns: 1fr; }
}

/* ===== 归类（AI 建议） ===== */
.cls-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px;
  background: #fff; border: 1px solid #e4ebf3; border-radius: 10px; padding: 14px 16px; max-width: 980px; }
.cls-f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.cls-f span { color: #6b7c92; }
.cls-f.full { grid-column: span 2; }
.cls-f input { height: 34px; padding: 0 10px; font-size: 13px; font-family: inherit;
  border: 1px solid #d5dfeb; border-radius: 6px; outline: none; }
.cls-f input:focus { border-color: #1E5AA8; box-shadow: 0 0 0 2px #e8f0fb; }
.cls-actions { display: flex; align-items: center; gap: 12px; margin: 14px 0 6px; }
.cls-loading { margin-top: 14px; font-size: 13px; color: #6b7c92; }
.cls-out { margin-top: 16px; background: #fff; border: 1px solid #e4ebf3;
  border-radius: 10px; padding: 16px 18px; max-width: 980px; }
.cls-main { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.cls-code-big { font-size: 30px; font-weight: 700; color: #1E5AA8; letter-spacing: 1px; }
.cls-conf { font-size: 12px; padding: 3px 10px; border-radius: 20px; }
.cls-conf.ok { background: #e8f7ee; color: #1e7f45; }
.cls-conf.mid { background: #fff8e1; color: #8a6d1d; }
.cls-conf.low { background: #fdeceb; color: #c0392b; }
.cls-kv { display: flex; gap: 14px; padding: 9px 0; border-top: 1px dashed #eef2f7; font-size: 13px; }
.cls-kv > span { width: 96px; flex: none; color: #7b8ca0; font-size: 12px; padding-top: 2px; }
.cls-kv > b { color: #26323f; }
.cls-spec-box { flex: 1; background: #f7f9fc; border-radius: 6px; padding: 8px 10px;
  font-size: 12.5px; line-height: 1.8; word-break: break-all; position: relative; }
.cls-copy { position: absolute; right: 8px; top: 6px; }
.cls-reason { flex: 1; color: #41546b; line-height: 1.85; }
.cls-alts { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.cls-alt { font-size: 12.5px; color: #33465c; }
.cls-alt b { color: #1E5AA8; margin-right: 6px; }
.cls-alt-diff { color: #7b8ca0; font-size: 12px; margin-top: 2px; line-height: 1.7; }
.cls-unc { flex: 1; margin: 0; padding-left: 18px; color: #8a6d1d; font-size: 12.5px; line-height: 2; }
.cls-hists { flex: 1; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.cls-hist-row b { color: #1E5AA8; margin-right: 6px; }
.cls-dim { color: #93a3b8; font-size: 11.5px; margin-left: 6px; }
.cls-fail { margin-top: 16px; background: #fdf1f0; border: 1px solid #f0c9c4; color: #8c2f24;
  border-radius: 10px; padding: 14px 16px; font-size: 12.5px; max-width: 980px; }
.cls-miss { margin-top: 8px; color: #8a6d1d; }
.cls-hist { margin-top: 8px; color: #41546b; }

/* ===== HS 编码库 ===== */
.hs-code { color: #1E5AA8; font-size: 13.5px; margin-right: 10px; }
.hs-name { color: #26323f; font-size: 13px; margin-right: 12px; }
.hs-meta { color: #7b8ca0; font-size: 12px; margin-right: 12px; }
.hs-tag { background: #eef2f7; color: #52647a; font-size: 11.5px;
  border-radius: 4px; padding: 1px 7px; margin-right: 8px; }
.admin-row-main { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 0; }

/* HS 编码库：一行一条，操作按钮靠右 */
#hs-list .admin-row { display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 9px 0; border-bottom: 1px solid #eef2f7; }
#hs-list .admin-row-main { flex: 1; min-width: 0; }
#hs-list .admin-row-ops { display: flex; gap: 6px; flex: none; }

/* 归类页：录入框的占位提示再淡一点 */
.cls-f input::placeholder { color: #cfd8e3; opacity: 1; }
.cls-f input::-webkit-input-placeholder { color: #cfd8e3; }

/* ===== HS 编码库（表格 + 弹窗） ===== */
.hs-table td { font-size: 12.5px; }
.hs-table .hs-c { color: #1E5AA8; font-weight: 600; white-space: nowrap; }
.hs-table .hs-n { max-width: 460px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-table .hs-ops { white-space: nowrap; }
.hs-table .hs-ops .btn { margin-right: 4px; }

.adm-modal { position: fixed; inset: 0; background: rgba(15, 28, 46, .45);
  display: flex; align-items: center; justify-content: center; z-index: 60; }
.adm-modal.hidden { display: none; }
.adm-modal-box { width: 720px; max-width: 94vw; max-height: 88vh; background: #fff;
  border-radius: 12px; display: flex; flex-direction: column;
  box-shadow: 0 18px 50px rgba(9, 20, 36, .28); }
.adm-modal-hd { display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid #eef2f7; font-size: 14px; }
.adm-modal-x { cursor: pointer; color: #93a3b8; font-size: 18px; line-height: 1; }
.adm-modal-bd { padding: 16px 18px; overflow-y: auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.adm-f { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: #6b7c92; }
.adm-f.full { grid-column: span 2; }
.adm-f input, .adm-f textarea { height: 34px; padding: 0 10px; font-size: 12.5px;
  font-family: inherit; border: 1px solid #d5dfeb; border-radius: 6px; outline: none; }
.adm-f textarea { height: 66px; padding: 8px 10px; resize: vertical; }
.adm-f input:focus, .adm-f textarea:focus { border-color: #1E5AA8; box-shadow: 0 0 0 2px #e8f0fb; }
.adm-modal-ft { display: flex; justify-content: flex-end; gap: 8px;
  padding: 12px 18px; border-top: 1px solid #eef2f7; }

/* HS 详情弹窗里的只读输入框 */
.adm-f input.ro-input, .adm-f textarea.ro-input {
  background: #f5f7fa; color: #41546b; border-color: #e4ebf3; cursor: default;
}
.adm-f input.ro-input:focus, .adm-f textarea.ro-input:focus {
  border-color: #e4ebf3; box-shadow: none;
}

/* ===== HS 查新弹窗 ===== */
.hs-diff-box { width: 860px; }
.hs-diff-bd { display: block; }
.hs-diff-head { font-size: 12.5px; color: #52647a; margin-bottom: 12px; }
.hs-diff-head b { color: #1E5AA8; font-size: 14px; }
.hs-diff-sec { border-top: 1px dashed #eef2f7; padding: 10px 0; }
.hs-diff-sec h4 { margin: 0 0 8px; font-size: 13px; }
.hs-diff-n { background: #eef2f7; color: #52647a; font-size: 11.5px;
  border-radius: 10px; padding: 1px 8px; margin-left: 6px; }
.hs-diff-n.zero { background: #e8f7ee; color: #1e7f45; }
.hs-diff-row { display: flex; gap: 10px; align-items: baseline; font-size: 12.5px;
  padding: 3px 0; color: #33465c; }
.hs-diff-row .hs-c { color: #1E5AA8; min-width: 104px; }
.hs-diff-row .hs-c.del { color: #c0392b; }
.hs-diff-row .hint { color: #7b8ca0; font-size: 11.5px; }
.hs-diff-fail { background: #fdf1f0; border: 1px solid #f0c9c4; color: #8c2f24;
  border-radius: 8px; padding: 12px 14px; font-size: 12.5px; }

/* HS 表格：16 列，横向滚动；长文本省略显示，悬停看全文 */
.hs-tablewrap { overflow-x: auto; border: 1px solid #eef2f7; border-radius: 8px; }
.hs-table { min-width: 1560px; }
.hs-table th { white-space: nowrap; font-size: 11.5px; padding: 8px 8px; }
.hs-table td { padding: 7px 8px; vertical-align: middle; }
.hs-table .hs-elem, .hs-table .hs-note {
  max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #52647a; font-size: 12px;
}
.hs-table .hs-note { max-width: 150px; }

/* ===== 申报要素 ===== */
.el-table .el-code { color: #1E5AA8; font-weight: 600; }
.el-req { background: #fdeee9; color: #b4451f; font-size: 11.5px;
  border-radius: 4px; padding: 1px 7px; }

/* 申报要素表：四列自适应，不要被 HS 的 min-width 撑开 */
.el-table { width: 100%; }
.el-table th { font-size: 11.5px; padding: 8px 10px; }
.el-table td { padding: 7px 10px; font-size: 12.5px; }

/* 单位代码小标签 */
.unit-code { color: #93a3b8; font-size: 11px; margin-left: 3px; }

/* ===== 历史归类 ===== */
.cls-history { margin-top: 22px; max-width: 980px; }
.cls-hl-head { font-size: 13.5px; font-weight: 650; margin-bottom: 8px;
  display: flex; align-items: baseline; gap: 8px; }
.cls-hl-row { display: grid; grid-template-columns: 92px 108px 1.2fr 1.6fr 52px 56px;
  gap: 8px; align-items: center; background: #fff; border: 1px solid #e4ebf3;
  border-radius: 8px; padding: 8px 12px; margin-bottom: 6px; font-size: 12.5px; }
.cls-hl-time { color: #93a3b8; font-size: 11.5px; }
.cls-hl-code { color: #1E5AA8; }
.cls-hl-name { color: #26323f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cls-hl-raw { color: #7b8ca0; font-size: 11.5px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.cls-hl-conf { color: #52647a; font-size: 11.5px; text-align: right; }

/* 历史归类行：可点击查看 */
.cls-hl-row { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.cls-hl-row:hover { border-color: #d5dfeb; }
.cls-hl-row.on { border-color: #e4ebf3; }
.cls-hist-note { margin: 4px 0 8px; font-size: 12px; color: #7b8ca0; }

/* 归类页顶部提示语 */
.cls-note-top { display: inline-block; margin: 0 0 12px; }

/* 归类标题行里的提示语 */
.cls-note-title { margin: 0 0 0 10px; font-size: 12px; padding: 4px 10px;
  vertical-align: middle; }
.mod-head h1 { display: inline-block; }

/* 历史归类：行内展开的详情 */
.cls-hl-item { margin-bottom: 6px; }
.cls-hl-item .cls-hl-row { margin-bottom: 0; }
.cls-hl-detail { background: #fff; border: 1px solid #e4ebf3; border-top: none;
  border-radius: 0 0 8px 8px; padding: 14px 16px 6px; }
.cls-hl-detail .cls-out { border: none; box-shadow: none; padding: 0; }
.cls-hl-detail .cls-code-big { font-size: 26px; }
.cls-hl-item .cls-hl-row.on { border-radius: 8px 8px 0 0; border-bottom-color: transparent; }

/* ===== 默认设置页 ===== */
.df-group { margin-bottom: 18px; }
.df-group-h { font-size: 13px; font-weight: 650; color: #26323f; margin: 0 0 6px; }
.df-table { width: 100%; }
.df-table th { font-size: 11.5px; padding: 7px 10px; }
.df-table td { font-size: 12.5px; padding: 7px 10px; vertical-align: top; }
.df-table .btn.sm { padding: 2px 9px; }

/* 默认设置：分类页签 */
.df-tabs { display: flex; gap: 8px; margin: 4px 0 14px; }
.df-tab { border: 1px solid #d5dfeb; background: #fff; color: #41546b; cursor: pointer;
  border-radius: 8px; padding: 8px 16px; font-size: 13px; font-family: inherit; }
.df-tab:hover { border-color: #b9cade; }
.df-tab.on { background: #1E5AA8; border-color: #1E5AA8; color: #fff; }
.df-tab-n { margin-left: 6px; font-size: 11.5px; opacity: .75; }

/* ===== 存为默认值弹窗 ===== */
.sd-target { display: flex; align-items: center; gap: 16px; font-size: 12.5px; color: #41546b; }
.sd-target label { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.sd-list { max-height: 46vh; overflow-y: auto; }
.sd-group-h { font-size: 12px; font-weight: 650; color: #26323f; margin: 12px 0 6px;
  display: flex; align-items: center; gap: 6px; }
.sd-row { display: grid; grid-template-columns: 18px 190px 1fr; gap: 8px; align-items: center;
  padding: 4px 0; font-size: 12.5px; cursor: pointer; }
.sd-row input { margin: 0; }
.sd-label { color: #41546b; }
.sd-val { color: #7b8ca0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 客户被排除：整行置灰 */
.lib-row-off td { color: #9aa8b8; }
.lib-row-off td:first-child { text-decoration: line-through; }

/* ===== 商品库：左客户 / 右商品 ===== */
.lib-split { display: grid; grid-template-columns: 260px 1fr; gap: 16px; align-items: start; }
.lib-custs { background: #fff; border: 1px solid #e4ebf3; border-radius: 10px; padding: 8px;
  max-height: 74vh; overflow-y: auto; }
.lib-cust { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; border: 0; background: transparent; cursor: pointer; text-align: left;
  padding: 8px 10px; border-radius: 7px; font-size: 12.5px; color: #33465c;
  font-family: inherit; }
.lib-cust:hover { background: #f4f7fb; }
.lib-cust.on { background: #e8f0fb; color: #1E5AA8; font-weight: 600; }
.lib-cust-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-cust-c { color: #93a3b8; font-size: 11.5px; flex: none; }
.lib-cust.on .lib-cust-c { color: #1E5AA8; }
.lib-main { min-width: 0; }

/* 商品库左侧：客户名称表头 */
.lib-custs-h { display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 4px 10px 8px; border-bottom: 1px solid #eef2f7; margin-bottom: 6px;
  font-size: 11.5px; color: #7b8ca0; }
.lib-cust-all { border: 0; background: transparent; cursor: pointer; font-family: inherit;
  font-size: 11.5px; color: #1E5AA8; padding: 2px 6px; border-radius: 5px; }
.lib-cust-all:hover { background: #eef4fc; }
.lib-cust-all.on { background: #e8f0fb; font-weight: 600; }

/* 商品库/客户库弹窗：提示词淡一点，别和真实值混淆 */
.lib-f input::placeholder, .lib-f textarea::placeholder { color: #cfd8e3; opacity: 1; }

/* 必填星号 */
.lib-req { color: #d9534f; font-weight: 700; }
.lib-f select { height: 34px; padding: 0 8px; font-size: 12.5px; font-family: inherit;
  border: 1px solid #d5dfeb; border-radius: 6px; background: #fff; color: #26323f; }

/* ===== 客户默认值弹窗：方向 + 分类 一行排布 ===== */
.pd-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; background: #f7fafd; border: 1px solid #e8eff7;
  border-radius: 10px; margin-bottom: 14px; }
.pd-line-k { font-size: 11.5px; color: #8a9aae; }
.seg { display: inline-flex; border: 1px solid #d5dfeb; border-radius: 8px;
  overflow: hidden; background: #fff; }
.seg button { border: 0; background: transparent; padding: 7px 16px; font-size: 12.5px;
  cursor: pointer; color: #41546b; font-family: inherit; transition: background .15s; }
.seg button + button { border-left: 1px solid #e4ebf3; }
.seg button:hover { background: #f2f7fd; }
.seg button.on { background: #1E5AA8; color: #fff; }
.seg button .n { font-size: 11px; opacity: .7; margin-left: 5px; }
.subtabs { display: inline-flex; gap: 4px; }
.subtabs button { border: 1px solid transparent; background: transparent; border-radius: 6px;
  padding: 6px 12px; font-size: 12.5px; cursor: pointer; color: #52647a; font-family: inherit; }
.subtabs button:hover { background: #eef4fc; }
.subtabs button.on { background: #e8f0fb; color: #1E5AA8; font-weight: 600;
  border-color: #d6e4f7; }
.subtabs button .n { font-size: 11px; opacity: .65; margin-left: 5px; }

/* ===== 可搜索下拉 ===== */
.ssel { position: relative; width: 100%; }
.ssel-in { width: 100%; height: 34px; padding: 0 10px; font-size: 12.5px;
  font-family: inherit; border: 1px solid #d5dfeb; border-radius: 6px;
  background: #fff; color: #26323f; outline: none; }
.ssel-in:focus { border-color: #1E5AA8; box-shadow: 0 0 0 2px #e8f0fb; }
.ssel-pop { position: absolute; z-index: 80; left: 0; right: 0; top: 38px;
  max-height: 260px; overflow-y: auto; background: #fff; border: 1px solid #d5dfeb;
  border-radius: 8px; box-shadow: 0 10px 26px rgba(16, 32, 52, .16); padding: 4px; }
.ssel-pop.hidden { display: none; }
.ssel-item { padding: 7px 10px; border-radius: 6px; font-size: 12.5px;
  color: #33465c; cursor: pointer; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }
.ssel-item:hover, .ssel-item.act { background: #eef4fc; }
.ssel-item.on { color: #1E5AA8; font-weight: 600; }
.ssel-empty { padding: 10px; font-size: 12px; color: #93a3b8; }

/* 归类建议书下载按钮 */
.cls-advice { margin-left: 10px; text-decoration: none; }

/* 工单附件列表 */
.att-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.att { display: flex; align-items: center; gap: 8px; background: #f7fafd;
  border: 1px solid #e4ebf3; border-radius: 7px; padding: 6px 10px; font-size: 12.5px; }
.att-n { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #33465c; }
.att-s { color: #93a3b8; font-size: 11.5px; }
.att-x { border: 0; background: transparent; color: #b03a2e; cursor: pointer;
  font-size: 13px; padding: 0 2px; }

/* 工单里的附件 */
.tc-atts { margin: 10px 0 4px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tc-atts-k { font-size: 11.5px; color: #8a9aae; }
.tc-att { display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  border: 1px solid #dbe5f0; background: #f7fafd; border-radius: 7px;
  padding: 5px 10px; font-size: 12.5px; color: #33465c; }
.tc-att:hover { border-color: #b9cade; background: #eef4fc; }
.tc-att-n { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-att-s { color: #93a3b8; font-size: 11.5px; }
.tc-att-d { color: #1E5AA8; font-size: 11.5px; }

/* 后台菜单分组 */
.nav-group { font-size: 11px; color: #93a3b8; padding: 14px 14px 6px;
  letter-spacing: .5px; }

/* 后台工单卡片 */
.adm-ticket { background: #fff; border: 1px solid #e4ebf3; border-radius: 10px;
  padding: 14px 16px; margin-bottom: 12px; }
.adm-ticket.closed { opacity: .78; }
.tk-head { display: flex; align-items: center; gap: 8px; }
.tk-kind { font-size: 11.5px; padding: 1px 8px; border-radius: 5px;
  background: #eef2f7; color: #52647a; }
.tk-kind.bug { background: #fdeee9; color: #b4451f; }
.tk-kind.idea { background: #e8f7ee; color: #1e7f45; }
.tk-title { font-size: 13.5px; }
.tk-status { margin-left: auto; font-size: 11.5px; padding: 1px 8px; border-radius: 5px; }
.tk-status.open { background: #fdf3e2; color: #9a6a12; }
.tk-status.closed { background: #e8f7ee; color: #1e7f45; }
.tk-meta { font-size: 11.5px; color: #8a9aae; margin: 6px 0; }
.tk-body { font-size: 12.5px; color: #33465c; white-space: pre-wrap; margin-bottom: 8px; }
.tk-shots { display: flex; gap: 8px; margin-bottom: 8px; }
.tk-shots img { height: 90px; border-radius: 6px; border: 1px solid #e4ebf3; }
.tk-ops { border-top: 1px dashed #eef2f7; padding-top: 10px; }
.tk-ops textarea { width: 100%; font-size: 12.5px; font-family: inherit; padding: 8px 10px;
  border: 1px solid #d5dfeb; border-radius: 6px; outline: none; resize: vertical; }
.tk-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

/* 复制兜底弹窗 */
.copy-fallback { position: fixed; inset: 0; background: rgba(15, 28, 46, .45);
  display: flex; align-items: center; justify-content: center; z-index: 90; }
.cf-box { background: #fff; border-radius: 12px; width: 560px; max-width: 92vw;
  padding: 16px 18px 14px; box-shadow: 0 18px 50px rgba(9, 20, 36, .28); }
.cf-hd { display: flex; align-items: center; justify-content: space-between;
  font-size: 13.5px; margin-bottom: 10px; }
.cf-x { cursor: pointer; color: #93a3b8; }
.cf-ta { width: 100%; height: 110px; font-size: 12.5px; font-family: inherit;
  padding: 8px 10px; border: 1px solid #d5dfeb; border-radius: 8px; resize: vertical; }
.cf-tip { font-size: 11.5px; color: #7b8ca0; margin-top: 8px; }

/* 归类页：产品图片 */
.cls-pic-cell { justify-content: flex-start; grid-row: span 2; }
.cls-pic-row { display: flex; align-items: center; gap: 12px; }
.cls-pic-ops { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.cls-pic-h { font-size: 12.5px; color: #41546b; margin-bottom: 8px; }
.cls-pic-body { display: flex; align-items: center; gap: 10px; }
.cls-pic-add { display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  border: 1px dashed #b9cade; border-radius: 8px; padding: 6px 12px;
  font-size: 12.5px; color: #1E5AA8; background: #fff; white-space: nowrap; }
.cls-pic-add:hover { border-color: #1E5AA8; }
.cls-pic-name { font-size: 12px; color: #7b8ca0; }
.cls-pic-preview { display: block; flex: none; }
.cls-pic-preview:empty { display: none; }
.cls-pic-preview img { max-height: 92px; max-width: 150px; border-radius: 8px;
  border: 1px solid #e4ebf3; display: block; }
.cls-hist-pic { margin: 8px 0 4px; }
.cls-hist-pic img { max-height: 180px; border-radius: 8px; border: 1px solid #e4ebf3; }

/* 历史归类：换图片按钮 */
.cls-advice-upload { margin-left: 8px; cursor: pointer; }


/* 平台后台 · 字段清单 */
.fields-toolbar { display: flex; gap: 8px; align-items: center; margin: 8px 0 12px; }
.fields-toolbar .grow { flex: 1; }
.fields-table input[type="text"], .fields-table input:not([type]),
.fields-table textarea {
  width: 100%; box-sizing: border-box; font-size: 12.5px; padding: 4px 6px;
  border: 1px solid #dbe4ee; border-radius: 6px; background: #fff;
}
.fields-table textarea { resize: vertical; min-height: 44px; line-height: 1.45; }
.fields-table .fld-key { font-family: ui-monospace, Consolas, monospace; color: #334; }
.fields-table td { vertical-align: top; }


/* 平台后台 · 字段清单（表格版） */
.fld-desc-cell { white-space: pre-wrap; line-height: 1.5; color: #444; font-size: 12.5px; }
.fields-table td { vertical-align: top; }
.fields-table .btn.sm { margin-right: 4px; }
#fld-modal .modal-box { max-height: 86vh; }
#fld-modal textarea { width: 100%; box-sizing: border-box; font-size: 12.5px;
  border: 1px solid #dbe4ee; border-radius: 6px; padding: 6px 8px; resize: vertical; }
#fld-modal input[type="text"], #fld-modal input:not([type]) {
  width: 100%; box-sizing: border-box; padding: 6px 8px; font-size: 13px;
  border: 1px solid #dbe4ee; border-radius: 6px; }


/* 字段编辑弹窗排版修正 */
#fld-modal .modal-bd { max-height: 68vh; overflow-y: auto; padding-bottom: 10px; }
#fld-modal .lib-f span { display: block; margin-bottom: 4px; color: #445; font-size: 12.5px; }
#fld-modal input[type="checkbox"] { width: auto !important; margin: 0 6px 0 0; }
#fld-modal textarea { min-height: 120px; }
#fld-modal .modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
#fld-modal .modal-hd { padding-bottom: 8px; border-bottom: 1px solid #eef2f7; }


/* 字段清单：操作列两个按钮排一行 */
.fields-table td:last-child { white-space: nowrap; }
.fields-table td:last-child .btn.sm {
  margin-right: 6px; padding: 4px 10px; font-size: 12px; display: inline-block;
}
.fields-table td:last-child .btn.sm:last-child { margin-right: 0; }


/* 弹窗里的输入框 / 下拉框统一尺寸（新建单据的客户选择与票名一致） */
.modal-box .modal-input,
.modal-box select.modal-input,
#modal-new select {
  display: block; width: 100%; box-sizing: border-box;
  height: 40px; min-height: 40px; padding: 8px 10px;
  font-size: inherit; line-height: 1.4;
  border: 1px solid var(--line-strong); border-radius: 6px;
  background: #fff; outline: none; max-width: none;
}
.modal-box .modal-input:focus,
#modal-new select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }


/* 下拉框箭头统一：去掉系统箭头，自己画一个，位置统一右移 12px（比默认靠左 2px） */
select.modal-input,
#modal-new select,
.modal-box select,
select.sel-std {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23808b9a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
}
select.modal-input::-ms-expand,
#modal-new select::-ms-expand,
.modal-box select::-ms-expand { display: none; }


/* 客户默认设置：固定高度，只有字段列表滚动 */
#pd-modal .adm-modal-box {
  display: flex; flex-direction: column;
  height: 86vh; max-height: 86vh; overflow: hidden;
}
#pd-modal .adm-modal-hd { flex: none; }
#pd-modal .adm-modal-ft { flex: none; }
#pd-modal .pd-bd {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column; overflow: hidden;
}
#pd-modal .pd-fixed { flex: none; }
#pd-modal .pd-scroll {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden;
  border-top: 1px solid #eef2f7; padding-right: 2px;
}


/* 商品库分页条 */
.lib-pager {
  display: flex; align-items: center; gap: 10px; justify-content: flex-end;
  padding: 10px 12px 2px; font-size: 12.5px; color: #5b6b7f;
}
.lib-pager .btn { padding: 3px 12px; }


/* 客户模板管理 */
.tpl-add { display: flex; gap: 8px; margin-bottom: 10px; }
.tpl-add .modal-input { flex: 1; }
.tpl-list { max-height: 320px; overflow-y: auto; }
.tpl-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 4px; border-bottom: 1px solid #eef2f7;
}
.tpl-nm { flex: 1; font-size: 13px; color: #26323f; }


/* 默认值弹窗要盖在「模板」弹窗之上（两者都是模态） */
.adm-modal { z-index: 9100; }


/* 上下游关联企业 */
.rel-add { display: flex; gap: 8px; margin-bottom: 10px; align-items: center; }
.rel-add .modal-input { flex: 1; }
.rel-kind { font-size: 11px; padding: 1px 6px; border-radius: 4px; }
.rel-kind.up { background: #eaf1fb; color: #1e5aa8; }
.rel-kind.down { background: #eef7ee; color: #2f7d32; }


/* 上下游表格 */
.rel-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.rel-table th {
  text-align: left; color: #6b7c92; font-weight: 500; font-size: 12px;
  padding: 6px 8px; border-bottom: 1px solid #e6ecf3; background: #f7f9fc;
}
.rel-table td { padding: 6px 8px; border-bottom: 1px solid #eef2f7; color: #26323f; }
.rel-table td:nth-child(1) { white-space: nowrap; }


/* 上下游行内编辑 */
.rel-table tr.rel-editing td { background: #fbfdff; }
.rel-in {
  width: 100%; height: 28px; padding: 0 6px; font-size: 12.5px;
  border: 1px solid #cfd8e3; border-radius: 5px; outline: none;
}
.rel-in:focus { border-color: #1E5AA8; box-shadow: 0 0 0 2px #e8f0fb; }


/* 上下游顶部工具条 */
.rel-tools { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }


/* 上下游行内下拉（类型） */
.rel-sel {
  height: 28px; padding: 0 4px; font-size: 12.5px;
  border: 1px solid #cfd8e3; border-radius: 5px; background: #fff; color: #26323f;
}
.rel-table td { vertical-align: middle; }


/* 上下游弹窗：固定尺寸，表格区独立滚动 */
#rel-modal .rel-box { display: flex; flex-direction: column; overflow: hidden; }
#rel-modal .modal-bd { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
#rel-modal .rel-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
#rel-modal .modal-ft { flex: none; }


/* 上下游分页条 */
.rel-pager {
  display: flex; align-items: center; gap: 8px; justify-content: flex-end;
  padding: 8px 0 2px; font-size: 12.5px; color: #5b6b7f;
}


/* 居中列（商品库同步等） */
.lib-table th.lib-col-center, .lib-table td.lib-col-center { text-align: center !important; }


/* 操作列：按钮全部显示，不省略、不裁剪 */
.lib-table td.lib-ops { white-space: nowrap; overflow: visible; max-width: none; text-overflow: clip; }
.lib-table td.lib-ops .btn { margin: 0 0 0 4px; }


/* 列表页「操作」列（最后一列）居中：客户 / 商品库 / 归类 */
.lib-table th:last-child,
.lib-table td.lib-ops { text-align: center; }


/* 一览「类型」列：和票号拉开距离 */
.ov-table td[data-label="类型"], .ov-table th:nth-child(1) { min-width: 96px; padding-right: 14px; }
.ov-table td[data-label="类型"] .tag { margin-right: 0; }

/* 侧栏单据前的类型标签 */
/* 侧栏：单据类型写在下面那行小字里，不再挤在标题前 */
.ship .side-kind { color: #1E5AA8; }
.ship .t { display: flex; align-items: center; gap: 4px; }


/* 一览「类型」列：定宽 + 居中，和票号留出间距 */
.ov-table thead th:nth-child(1) { text-align: center; }
.ov-table tbody td[data-label="类型"] {
  text-align: center; overflow: visible; padding-right: 6px;
}
.ov-table tbody td[data-label="类型"] .tag {
  display: inline-block; white-space: nowrap;
}


/* 4 种单据类型各自配色（一览 + 侧栏共用） */
.tag.kind-di { background: #e8f1fd; color: #1E5AA8; }
.tag.kind-de { background: #e9f7ee; color: #2f7d32; }
.tag.kind-mi { background: #fff4e5; color: #b26a00; }
.tag.kind-me { background: #f3e8fd; color: #6b3fa0; }
.tag.kind-none { background: #eef1f5; color: #7b8794; }
/* 70px 列宽下把标签再收紧一点 */
.ov-table td[data-label="类型"] .tag { font-size: 11.5px; padding: 1px 6px; }
.side-kind.kind-di { color: #1E5AA8; }
.side-kind.kind-de { color: #2f7d32; }
.side-kind.kind-mi { color: #b26a00; }
.side-kind.kind-me { color: #6b3fa0; }
.side-kind.kind-none { color: #7b8794; }


/* 默认值：保存后高亮刚才那一行 */
.df-table tr.pd-row-focus td { background: #fff8e1; transition: background .3s; }


/* 默认设置：条件默认值 */
.pd-rules { border-top: 1px solid #e3e9f2; margin-top: 10px; padding: 10px 14px 4px; }
.pd-rules-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.pd-rule-add { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pd-rule-k { color: #6b7a90; font-size: 12px; }
.pd-rule-sel { height: 28px; border: 1px solid #cfd8e3; border-radius: 5px; padding: 0 6px; font-size: 12px; }
.pd-rule-in { height: 28px; width: 130px; border: 1px solid #cfd8e3; border-radius: 5px; padding: 0 6px; font-size: 12px; }
.pd-rule-list { margin-top: 8px; }
.pd-rule-row { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 4px 0; border-bottom: 1px dashed #eef2f7; }
.pd-rule-row .r-del { margin-left: auto; }


/* 归类结果：扣票提示 */
.cls-bill { margin-top: 10px; font-size: 12.5px; color: #6b7a90;
  background: #f6f8fb; border: 1px solid #e3e9f2; border-radius: 6px; padding: 6px 10px;
  text-align: left; max-width: 980px; box-sizing: border-box; }


/* 历史归类：编号 */
.cls-hist-id { margin-left: 6px; color: #8b98ab; font-family: ui-monospace, monospace; font-size: 11.5px; }


/* 历史归类：编号标签 */
.cls-hl-id { display: inline-block; min-width: 40px; color: #8b98ab;
  font-family: ui-monospace, monospace; font-size: 11.5px; }


/* 历史归类行：编号/时间/编码/名称/原文/把握/详情 共 7 列，详情固定在最右 */
.cls-hl-row { grid-template-columns: 48px 92px 108px 1.2fr 1.6fr 52px 64px; }
.cls-hl-row > .btn.sm { justify-self: end; white-space: nowrap; }


/* 归类页：扣票提醒 */
.cls-bill-tip { margin: 8px 0 14px; font-size: 12.5px; line-height: 1.7;
  color: #7a5a17; background: #fffaf0; border: 1px solid #f2e2bd;
  border-radius: 6px; padding: 8px 12px; }
.cls-bill-tip b { color: #a4650a; }


/* 归类页提示：和页顶说明同一套灰色小字 */
.cls-sub-hint { color: var(--muted); font-size: 12.5px; line-height: 1.6; }


/* 注册页：协议勾选 */
.auth-consent { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0 4px;
  font-size: 12.5px; color: #4a5868; line-height: 1.6; cursor: pointer; }
.auth-consent input[type="checkbox"] {
  width: 15px; height: 15px; min-width: 15px; padding: 0; margin: 3px 0 0;
  flex: 0 0 15px; border-radius: 3px; accent-color: #1E5AA8; cursor: pointer;
  box-shadow: none; background: #fff;
}
.auth-consent input[type="checkbox"]:hover,
.auth-consent input[type="checkbox"]:focus {
  box-shadow: none; border-color: inherit; background: #fff;
}
.auth-consent a { color: #1E5AA8; text-decoration: none; }
.auth-consent a:hover { text-decoration: underline; }
.auth-consent-tip { margin: 0 0 8px; font-size: 12px; color: #c0392b; min-height: 16px; }


/* 登录/注册页：压缩纵向高度，避免出现右侧滚动条 */
.auth-shell { padding: 24px 0; }
.auth-form label { margin: 9px 0 4px; }
.auth-form input { height: 38px; }
.auth-note { padding: 8px 10px; margin: 0 0 2px; line-height: 1.6; }
.auth-links { margin-top: 12px; }
.auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
/* 公司名比用户名长：左边宽一点 */
.auth-row.auth-row-wide { grid-template-columns: 1.55fr 1fr; }
.auth-consent { margin: 8px 0 2px; }
.auth-consent-tip { margin: 0 0 6px; min-height: 0; }


/* 登录页：微信扫码登录 */
.auth-wechat { display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 10px; height: 38px; border: 1px solid #d8dee6; border-radius: 9px;
  background: #fff; color: #26323f; font-size: 13.5px; text-decoration: none; }
.auth-wechat:hover { border-color: #07c160; color: #07c160; }
.wx-icon { display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%; background: #07c160; color: #fff;
  font-size: 10px; letter-spacing: -0.5px; }


/* 字段清单：表头/表体 tab */
.fields-tabs { display: flex; gap: 6px; margin: 4px 0 12px; border-bottom: 1px solid #e4ebf3; }
.fields-tab { border: none; background: none; padding: 8px 14px; font-size: 13.5px;
  color: #52606f; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.fields-tab:hover { color: #1E5AA8; }
.fields-tab.on { color: #1E5AA8; border-bottom-color: #1E5AA8; font-weight: 600; }
.fields-tab .cnt { color: #9aa7b6; font-size: 11.5px; margin-left: 4px; }
.fields-tab.on .cnt { color: #6f9fd0; }


/* 个人中心：整体紧凑（比默认少约 1/3 高度） */
.profile-body { padding: 16px 0 40px; }
.profile-body .users-wrap { width: min(1000px, 94vw); padding-bottom: 24px; }
.profile-body .users-head { margin-bottom: 10px; }
.profile-body .users-head h1 { font-size: 20px; margin: 0 0 2px; }
.profile-body .card { margin-bottom: 10px; }
.profile-body .card-h { padding: 8px 14px; }
.profile-body .card-b { padding: 6px 14px 8px; }
.profile-body .kv { gap: 0; }
.profile-body .kv-row { padding: 5px 2px; }
.profile-body .kv-input { padding: 5px 9px; }
.profile-body .kv-actions { margin-top: 8px; }
.profile-body .muted { font-size: 12.5px; }

/* 申报单位：两列，一屏放完 */
.kv-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 26px; }
/* 每行用固定标签宽，左右两列输入框起点和宽度都对齐 */
.kv-two .kv-row {
  display: grid; grid-template-columns: 120px minmax(0, 1fr);
  align-items: center; gap: 8px; padding: 5px 2px;
}
.kv-two .kv-k { flex: none; white-space: nowrap; font-size: 12.5px; }
.kv-two .kv-input { width: 100%; max-width: none; min-width: 0; }
@media (max-width: 760px) {
  .kv-two { grid-template-columns: 1fr; }
}
