/* ============================================================
   土管家订单履约协同平台 - 样式
   企业浅色主题 / A4 打印排版
   ============================================================ */

:root {
  --bg: #f4f6f9;
  --panel: #ffffff;
  --panel-2: #fafbfd;
  --border: #e3e8ef;
  --border-strong: #d3dae5;
  --text: #1b2430;
  --text-2: #5a6779;
  --text-3: #8a95a6;
  --brand: #1f5fd0;
  --brand-dark: #17489f;
  --brand-soft: #e8f0ff;
  --green: #0e8a5f;
  --green-soft: #e4f6ee;
  --amber: #b8790b;
  --amber-soft: #fdf3df;
  --red: #c8322c;
  --red-soft: #fdeceb;
  --purple: #6b4bd6;
  --purple-soft: #efeaff;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(16, 32, 56, .06), 0 1px 8px rgba(16, 32, 56, .04);
  --shadow-lg: 0 8px 28px rgba(16, 32, 56, .14);
  --sidebar: 208px;
  --header: 52px;
  --topbar: 56px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Source Han Sans CN", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: var(--brand); text-decoration: none; }

/* ---------- 布局骨架：顶部全局导航 + 左侧菜单 + 右侧内容 ---------- */
.app { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.app-body { flex: 1; display: flex; min-height: 0; overflow: hidden; }

/* ---- 顶部全局导航 ---- */
.topbar {
  height: var(--topbar); flex: 0 0 var(--topbar);
  background: #12203a; color: #c8d4e6;
  display: flex; align-items: center; gap: 14px; padding: 0 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  z-index: 60;
}
.topbar-brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.topbar-brand .logo {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, #2f7bf5, #6b4bd6);
  display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 15px;
  letter-spacing: -.5px;
}
.topbar-brand .t1 { color: #fff; font-size: 14.5px; font-weight: 600; line-height: 1.2; }
.topbar-brand .t2 { font-size: 11px; color: #7d8ea8; line-height: 1.2; }

.topnav {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 2px;
  overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;
}
.topnav::-webkit-scrollbar { display: none; }
.topnav-tab {
  padding: 6px 13px; border-radius: 6px;
  font-size: 13.5px; color: #a9b8cf; white-space: nowrap;
  cursor: pointer; user-select: none;
  transition: background .12s, color .12s;
}
.topnav-tab:hover { background: rgba(255,255,255,.07); color: #fff; }
.topnav-tab.active {
  background: rgba(47,123,245,.24); color: #fff; font-weight: 500;
  box-shadow: inset 0 -2px 0 #2f7bf5;
}
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.topbar .btn {
  background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.18); color: #e8eef8;
}
.topbar .btn:hover { background: rgba(255,255,255,.2); color: #fff; }
.topbar .who {
  background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14);
  color: #e8eef8;
}
.topbar .who-role { color: #9db0cc; }
.topbar select {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18);
  color: #e8eef8; border-radius: 6px; padding: 5px 8px;
}
.topbar select option { color: #1b2430; }

/* ---- 左侧菜单 ---- */
.sidebar {
  width: var(--sidebar);
  flex: 0 0 var(--sidebar);
  background: #fff;
  border-right: 1px solid var(--border);
  color: var(--text-2);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.sidebar-hd {
  height: 40px; flex: 0 0 auto;
  display: flex; align-items: center; padding: 0 16px;
  background: var(--panel-2); border-bottom: 1px solid var(--border);
  font-size: 12px; font-weight: 600; color: var(--text-3); letter-spacing: .5px;
}

.sidebar-body { flex: 1; overflow-y: auto; padding: 8px 0 24px; }
.nav-empty { padding: 14px 16px; font-size: 12.5px; color: var(--text-3); }
.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 14px; margin: 1px 8px;
  border-radius: 6px;
  cursor: pointer; color: var(--text-2);
  font-size: 13.5px;
  transition: background .12s, color .12s;
  user-select: none;
}
.nav-item:hover { background: var(--bg); color: var(--text); }
.nav-item.active {
  background: var(--brand-soft); color: var(--brand-dark); font-weight: 500;
  box-shadow: inset 2px 0 0 var(--brand);
}
.nav-item .ic { width: 16px; text-align: center; opacity: .9; font-size: 13px; }
.nav-item .badge {
  margin-left: auto; background: var(--red); color: #fff;
  font-size: 10.5px; padding: 0 5px; border-radius: 9px; min-width: 16px;
  text-align: center; line-height: 16px; font-weight: 600;
}

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.header-titles { min-width: 0; }

.header {
  height: var(--header); flex: 0 0 var(--header);
  background: var(--panel); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px; padding: 0 18px;
}
.header h1 { font-size: 16px; margin: 0; font-weight: 600; }
.header .sub { font-size: 12px; color: var(--text-3); }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.content { flex: 1; overflow-y: auto; padding: 18px; }
.content-wide { padding: 0; }

/* ---------- 通用组件 ---------- */
.card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.card-hd {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.card-hd h2 { font-size: 14.5px; margin: 0; font-weight: 600; }
.card-hd .desc { font-size: 12px; color: var(--text-3); }
.card-hd .spacer { margin-left: auto; }
.card-bd { padding: 16px; }
.card-bd.tight { padding: 0; }

.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 1180px) { .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 820px) { .g2,.g3,.g4 { grid-template-columns: 1fr; } }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 13px; border-radius: 6px;
  border: 1px solid var(--border-strong); background: #fff;
  cursor: pointer; font-size: 13px; line-height: 22px;
  transition: all .12s; white-space: nowrap;
}
.btn:hover { background: var(--panel-2); border-color: #b9c4d4; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--bg); }
.btn.danger { color: var(--red); border-color: #f0c9c7; background: var(--red-soft); }
.btn.danger:hover { background: #fbdedc; }
.btn.sm { padding: 3px 9px; font-size: 12px; line-height: 20px; }
.btn.lg { padding: 9px 20px; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.field { display: flex; flex-direction: column; gap: 5px; }
.field > label { font-size: 12px; color: var(--text-2); font-weight: 500; }
.field .hint { font-size: 11.5px; color: var(--text-3); }

input[type=text], input[type=number], input[type=date], input[type=tel], select, textarea {
  padding: 6px 10px; border: 1px solid var(--border-strong); border-radius: 6px;
  background: #fff; outline: none; width: 100%; line-height: 22px;
  transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(31,95,208,.12);
}
input[readonly] { background: var(--panel-2); color: var(--text-2); }
textarea { resize: vertical; min-height: 68px; }
select { cursor: pointer; }

.form-grid { display: grid; gap: 12px 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.form-grid .span2 { grid-column: span 2; }
.form-grid .span3 { grid-column: span 3; }
.form-grid .full { grid-column: 1 / -1; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th {
  text-align: left; font-weight: 600; color: var(--text-2);
  background: var(--panel-2); padding: 9px 12px;
  border-bottom: 1px solid var(--border); white-space: nowrap;
  position: sticky; top: 0; z-index: 1;
}
table.tbl td { padding: 8px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.tbl tbody tr:hover { background: #f8fafd; }
table.tbl tfoot td { background: var(--panel-2); font-weight: 600; border-top: 1px solid var(--border-strong); }
table.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl .center { text-align: center; }
.tbl-wrap { overflow: auto; max-height: 62vh; }
.empty { padding: 40px 16px; text-align: center; color: var(--text-3); font-size: 13px; }

.tag {
  display: inline-block; padding: 1px 8px; border-radius: 11px;
  font-size: 11.5px; line-height: 19px; font-weight: 500; white-space: nowrap;
}
.tag.blue { background: var(--brand-soft); color: var(--brand-dark); }
.tag.green { background: var(--green-soft); color: var(--green); }
.tag.amber { background: var(--amber-soft); color: var(--amber); }
.tag.red { background: var(--red-soft); color: var(--red); }
.tag.purple { background: var(--purple-soft); color: var(--purple); }
.tag.gray { background: #eef1f6; color: var(--text-2); }

.stat {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow);
}
.stat .k { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.stat .v { font-size: 25px; font-weight: 650; margin-top: 6px; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.stat .u { font-size: 12px; color: var(--text-3); font-weight: 400; margin-left: 3px; }
.stat .d { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.stat.accent-blue { border-left: 3px solid var(--brand); }
.stat.accent-green { border-left: 3px solid var(--green); }
.stat.accent-amber { border-left: 3px solid var(--amber); }
.stat.accent-red { border-left: 3px solid var(--red); }
.stat.accent-purple { border-left: 3px solid var(--purple); }

.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar .grow { flex: 1; min-width: 140px; }
.toolbar input, .toolbar select { width: auto; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 14px; flex-wrap: wrap; }
.tab {
  padding: 7px 15px; cursor: pointer; font-size: 13.5px; color: var(--text-2);
  border-bottom: 2px solid transparent; margin-bottom: -1px; user-select: none;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--border); border-radius: 7px; padding: 2px; }
.seg button {
  border: 0; background: transparent; padding: 5px 13px; border-radius: 5px;
  cursor: pointer; font-size: 13px; color: var(--text-2);
}
.seg button.active { background: #fff; color: var(--brand); font-weight: 600; box-shadow: var(--shadow); }

.modal-mask {
  position: fixed; inset: 0; background: rgba(16,24,40,.45);
  display: grid; place-items: center; z-index: 100; padding: 24px;
}
.modal {
  background: #fff; border-radius: 10px; box-shadow: var(--shadow-lg);
  width: 560px; max-width: 100%; max-height: 88vh; display: flex; flex-direction: column;
}
.modal.wide { width: 860px; }
.modal-hd { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; }
.modal-hd h3 { margin: 0; font-size: 15px; font-weight: 600; }
.modal-hd .x { margin-left: auto; cursor: pointer; color: var(--text-3); font-size: 18px; line-height: 1; padding: 2px 6px; border-radius: 4px; }
.modal-hd .x:hover { background: var(--bg); color: var(--text); }
.modal-bd { padding: 18px; overflow: auto; flex: 1; }
.modal-ft { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; background: var(--panel-2); border-radius: 0 0 10px 10px; }

.toast-wrap { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: #12203a; color: #fff; padding: 9px 18px; border-radius: 20px;
  font-size: 13px; box-shadow: var(--shadow-lg); animation: tin .18s ease;
}
.toast.ok { background: var(--green); }
.toast.err { background: var(--red); }
@keyframes tin { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.paste-box {
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius);
  padding: 12px; background: var(--panel-2);
}
.paste-box:focus-within { border-color: var(--brand); background: #fff; }
.paste-box textarea { border: 0; background: transparent; padding: 0; min-height: 86px; }
.paste-box textarea:focus { box-shadow: none; }

.drop-zone {
  border: 2px dashed var(--border-strong); border-radius: 10px;
  padding: 22px 16px; text-align: center; background: var(--panel-2);
  transition: border-color .15s, background .15s; cursor: pointer;
}
.drop-zone:hover { border-color: var(--brand); background: #fff; }
.drop-zone.over { border-color: var(--brand); background: var(--brand-soft); }

/* 批量设置条 */
.batch-bar {
  border: 1px solid var(--brand); background: var(--brand-soft);
  border-radius: var(--radius); padding: 10px 12px; margin-bottom: 12px;
}
.batch-bar .bb-hd { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.batch-bar .bb-hd .hint { font-size: 11.5px; color: var(--text-2); }
.batch-bar .bb-body {
  display: grid; gap: 8px 10px; align-items: end;
  grid-template-columns: minmax(120px,1fr) minmax(180px,1.4fr) 100px auto;
}
.batch-bar .bb-body .field > label { font-size: 11.5px; }
@media (max-width: 860px) { .batch-bar .bb-body { grid-template-columns: 1fr 1fr; } }

.parsed-preview { display: grid; gap: 8px; }
/* 每行下方的 快递 / 商品 / 数量 微调区 */
.parsed-row .f2 {
  display: grid; gap: 6px; margin-top: 7px; padding-top: 7px;
  border-top: 1px dashed var(--border);
  grid-template-columns: minmax(110px,1fr) minmax(150px,1.5fr) 82px minmax(60px,.8fr);
  align-items: center;
}
.parsed-row .f2 select, .parsed-row .f2 input { padding: 5px 8px; font-size: 13px; }
.parsed-row .f2 .unit { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 860px) {
  .parsed-row .f2 { grid-template-columns: 1fr 1fr; }
  .parsed-row .f2 .unit { grid-column: span 2; }
}
.parsed-row {
  display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: center;
  border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; background: #fff;
}
.parsed-row .idx { color: var(--text-3); font-size: 12px; text-align: center; }
.parsed-row .f { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px,1fr)); gap: 8px; }
.parsed-row.warn { border-color: #f0c9c7; background: var(--red-soft); }

/* 平台汇总：分组小计行 */
.tbl tr.tr-sub td { background: var(--panel-2); font-weight: 600; border-top: 1px solid var(--border); }
.tbl tr.tr-sub td.right { text-align: right; color: var(--text-2); }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 3px 10px; border-radius: 14px; background: var(--bg);
  border: 1px solid var(--border); font-size: 12.5px; cursor: pointer;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }

.kv { display: grid; grid-template-columns: 96px 1fr; gap: 6px 10px; font-size: 13px; }
.kv .k { color: var(--text-3); }

.reminder-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--red); margin-right: 5px; vertical-align: 1px; }

.divider { height: 1px; background: var(--border); margin: 14px 0; }
.muted { color: var(--text-3); }
.small { font-size: 12px; }
.mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.row-flex { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.banner {
  padding: 10px 14px; border-radius: 6px; font-size: 13px; margin-bottom: 14px;
  border: 1px solid transparent; display: flex; gap: 8px; align-items: flex-start;
}
.banner.info { background: var(--brand-soft); border-color: #c4d9f8; color: var(--brand-dark); }
.banner.warn { background: var(--amber-soft); border-color: #f2dfb4; color: #8a5c07; }
.banner.err  { background: var(--red-soft); border-color: #f3cfcd; color: #96231e; }
.banner.ok   { background: var(--green-soft, #eaf6ec); border-color: #bfe3c6; color: #216b32; }

/* ---------- 打印：A4 ---------- */
@media print {
  @page { size: A4 portrait; margin: 12mm 10mm; }
  body { background: #fff; }
  .app { display: block; height: auto; overflow: visible; }
  .sidebar, .header, .no-print, .toolbar, .modal-mask { display: none !important; }
  .main { display: block; overflow: visible; }
  .content { padding: 0; overflow: visible; }
  .card { border: 0; box-shadow: none; margin: 0; }
  .card-hd { padding: 0 0 8px; }
  .tbl-wrap { max-height: none; overflow: visible; }
  table.tbl { font-size: 11.5px; }
  table.tbl th { position: static; background: #f0f2f5 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  table.tbl td, table.tbl th { padding: 5px 7px; border-color: #bbb; }
  table.tbl tbody tr:hover { background: transparent; }
  .print-only { display: block !important; }
  .stat { box-shadow: none; }
  a[href]::after { content: ""; }
}
.print-only { display: none; }
.sheet {
  background: #fff; width: 210mm; min-height: 297mm;
  margin: 0 auto; padding: 14mm 12mm; box-shadow: var(--shadow);
}
.sheet-hd { display: flex; align-items: flex-end; justify-content: space-between; border-bottom: 2px solid #12203a; padding-bottom: 8px; margin-bottom: 12px; }
.sheet-hd h2 { margin: 0; font-size: 19px; letter-spacing: 1px; }
.sheet-hd .meta { font-size: 11.5px; color: var(--text-2); text-align: right; line-height: 1.6; }
.sheet-ft { margin-top: 18px; display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-2); border-top: 1px solid #ccc; padding-top: 8px; }
.sign-row { display: flex; gap: 40px; margin-top: 26px; font-size: 12.5px; }

/* ---------- 连接状态徽标 ---------- */
.conn {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; padding: 3px 10px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--panel-2); color: var(--text-2);
  white-space: nowrap;
}
.conn .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); }
.conn.on { background: var(--green-soft); border-color: #bfe6d4; color: var(--green); }
.conn.on .dot { background: var(--green); box-shadow: 0 0 0 3px rgba(14,138,95,.18); }
.conn.off { background: var(--amber-soft); border-color: #f0dfb6; color: var(--amber); }
.conn.off .dot { background: var(--amber); }

/* ---------- 移动端：侧栏变抽屉 ---------- */
.nav-toggle {
  display: none;
  border: 1px solid var(--border-strong); background: #fff; border-radius: 6px;
  width: 34px; height: 32px; font-size: 16px; line-height: 1; cursor: pointer; color: var(--text-2);
}
.sidebar-mask { display: none; }

@media (max-width: 860px) {
  .hide-sm { display: none !important; }
  .nav-toggle { display: block; }
  .app-body { position: relative; }
  .topbar { padding: 0 10px; gap: 8px; }
  .topbar-brand .t2 { display: none; }
  .topbar-brand .t1 { font-size: 13.5px; }
  .sidebar {
    position: fixed; left: 0; top: var(--topbar); bottom: 0; z-index: 90;
    transform: translateX(-100%); transition: transform .22s ease;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: none; }
  .sidebar-mask {
    display: block; position: fixed; inset: 0; background: rgba(16,24,40,.42);
    z-index: 80; opacity: 0; pointer-events: none; transition: opacity .2s;
  }
  .sidebar-mask.show { opacity: 1; pointer-events: auto; }
  .header { padding: 0 12px; gap: 8px; }
  .header h1 { font-size: 15px; }
  .content { padding: 12px; }
  .stat .v { font-size: 21px; }
  .card-bd { padding: 12px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span2, .form-grid .span3 { grid-column: auto; }
  /* 触摸友好 */
  .btn { padding: 8px 14px; }
  .btn.sm { padding: 5px 11px; }
  /* 字号 ≥16px，避免 iOS 聚焦时自动放大页面 */
  input[type=text], input[type=number], input[type=date], input[type=tel], select, textarea {
    padding: 9px 10px; font-size: 16px;
  }
  .tbl-wrap { max-height: none; }
  table.tbl { font-size: 12.5px; }
  table.tbl th, table.tbl td { padding: 7px 9px; }
  .toolbar > * { flex: 1 1 46%; }
  .toolbar input, .toolbar select { width: 100%; }
  .sheet { width: 100%; min-height: 0; padding: 10mm 6mm; box-shadow: none; }
}

/* ---------- 到点提醒浮层 ---------- */
.remind-panel {
  position: fixed; right: 18px; bottom: 18px; z-index: 9000; width: 360px; max-width: calc(100vw - 24px);
  background: var(--panel); border: 1px solid var(--brand); border-radius: 10px;
  box-shadow: 0 8px 28px rgba(18,32,58,.22); overflow: hidden;
}
.remind-panel .rp-hd {
  display: flex; align-items: center; gap: 6px; padding: 9px 12px;
  background: var(--red-soft); border-bottom: 1px solid var(--border); font-size: 13px;
}
.remind-panel .rp-hd .btn { padding: 3px 8px; font-size: 12px; }
.remind-panel .rp-bd { max-height: 46vh; overflow: auto; }
.remind-panel .rp-item { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.remind-panel .rp-item:last-child { border-bottom: 0; }
.remind-panel .rp-t { font-size: 13px; font-weight: 600; }
.remind-panel .rp-s { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.remind-panel .rp-ops { display: flex; gap: 8px; margin-top: 8px; }
.remind-panel .rp-bell {
  width: 8px; height: 8px; border-radius: 50%; background: var(--red);
  box-shadow: 0 0 0 0 rgba(226,75,74,.6); animation: rpPulse 1.4s infinite;
}
@keyframes rpPulse {
  0% { box-shadow: 0 0 0 0 rgba(226,75,74,.55); }
  70% { box-shadow: 0 0 0 10px rgba(226,75,74,0); }
  100% { box-shadow: 0 0 0 0 rgba(226,75,74,0); }
}
@media (max-width: 640px) { .remind-panel { right: 8px; bottom: 8px; width: calc(100vw - 16px); } }

/* ---------- 单表独立打印 ---------- */
.print-root { display: none; }
.print-root table.tbl { font-size: 12px; }
@media print {
  body.print-one #app { display: none !important; }
  .print-root { display: block !important; }
  .print-root .card, .print-root .grid { border: 0; box-shadow: none; margin: 0; }
}
/* 分组标题行（配货汇总：先商品、后耗材，同一张表） */
.tbl tr.tr-sec td {
  background: var(--brand-soft); font-weight: 600; font-size: 13px;
  border-top: 1px solid var(--border); letter-spacing: .5px;
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #c6cddb; border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #a9b3c6; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 登录 / 注册（未登录时整页只显示这一张卡） ---------- */
#app.auth-lock { display: block; }
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px 16px; background: var(--bg);
}
.auth-card {
  width: 100%; max-width: 460px; background: var(--panel); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: 0 10px 40px rgba(18,32,58,.12); padding: 26px 26px 22px;
}
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.auth-brand .logo {
  width: 42px; height: 42px; border-radius: 11px; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 600;
}
.auth-brand .t1 { font-size: 17px; font-weight: 600; }
.auth-brand .t2 { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.auth-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.auth-tabs .tab {
  padding: 8px 16px; font-size: 14px; color: var(--text-2); border-bottom: 2px solid transparent;
  cursor: pointer; background: none; border-top: 0; border-left: 0; border-right: 0;
}
.auth-tabs .tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 500; }

/* 顶栏：当前登录人 */
.who {
  display: inline-flex; flex-direction: column; line-height: 1.25; margin-right: 2px;
  padding: 3px 10px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--border);
}
.who-name { font-size: 13px; font-weight: 500; }
.who-role { font-size: 11px; color: var(--text-3); }
/* 表格里被停用的账号 */
.tbl tr.tr-off td { opacity: .5; }
