/* 订单查询系统 - 公共样式 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  background: #f2f4f8;
  color: #2b2f36;
  font-size: 14px;
  line-height: 1.6;
}
a { color: #2b6cb0; text-decoration: none; }
a:hover { text-decoration: underline; }

/* 左侧边栏 */
.topbar {
  position: fixed; left: 0; top: 0; bottom: 0; width: 200px;
  background: #fff; border-right: 1px solid #e3e7ee;
  display: flex; flex-direction: column; padding: 20px 0; z-index: 10;
}
.topbar .brand { font-size: 17px; font-weight: 700; color: #1a3a6b; padding: 0 20px 20px; border-bottom: 1px solid #eef2f8; margin-bottom: 16px; }
.topbar nav { display: flex; flex-direction: column; gap: 2px; padding: 0 12px; flex: 1; }
.topbar nav a {
  display: block; padding: 9px 14px; border-radius: 6px; color: #4a5568; font-size: 14px;
}
.topbar nav a:hover { background: #eef2f8; text-decoration: none; }
.topbar nav a.on { background: #2b6cb0; color: #fff; }
.nav-group-title {
  font-size: 14px; color: #4a5568; font-weight: 600;
  padding: 9px 14px 6px; cursor: pointer; user-select: none;
  display: flex; align-items: center; gap: 6px;
}
.nav-group-title:hover { color: #2b6cb0; }
.nav-group-title .arrow { font-size: 10px; transition: transform 0.15s; display: inline-block; }
.nav-group.collapsed .arrow { transform: rotate(-90deg); }
.nav-group.collapsed .nav-group-items { display: none; }
.nav-group-items a {
  padding-left: 28px !important; font-size: 13px;
}
/* 三级子菜单 */
.sub-group .nav-group-title {
  padding-left: 28px !important;
  font-size: 13px !important;
  padding-top: 6px !important;
  padding-bottom: 4px !important;
}
.sub-group .nav-group-items a {
  padding-left: 44px !important;
  font-size: 12px !important;
}
.topbar .userbox { padding: 16px 20px; border-top: 1px solid #eef2f8; display: flex; flex-direction: column; gap: 8px; }
.topbar .uname { color: #4a5568; font-size: 13px; }

.container { max-width: calc(100vw - 240px); min-width: 0; margin: 24px 24px 40px 224px; padding: 0; }
.footer { text-align: center; color: #94a0b4; font-size: 12px; padding: 16px 0 30px; }

/* Flash */
.flash {
  padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; font-size: 14px;
}
.flash.ok { background: #e6f7ee; color: #1d7a45; border: 1px solid #b7e6cd; }
.flash.warn { background: #fff7e6; color: #8a5b00; border: 1px solid #f2dca6; }
.flash.err { background: #fdecec; color: #a02c2c; border: 1px solid #f3c1c1; }
.flash.info { background: #eef4fd; color: #1d4f91; border: 1px solid #c9daf5; }

/* 卡片 */
.card {
  background: #fff; border: 1px solid #e3e7ee; border-radius: 10px;
  padding: 18px 20px; margin-bottom: 16px;
}
.card h2 { font-size: 16px; color: #1a3a6b; margin-bottom: 12px; }
.card h2 .sub { font-weight: 400; font-size: 13px; color: #8a94a6; }

/* 统计条 */
.stats { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.stat {
  flex: 1; min-width: 180px; background: #fff; border: 1px solid #e3e7ee;
  border-radius: 10px; padding: 14px 18px;
}
.stat .lbl { color: #8a94a6; font-size: 13px; }
.stat .num { font-size: 24px; font-weight: 700; color: #1a3a6b; margin: 2px 0; }
.stat .num.small { font-size: 18px; }
.stat .sub { color: #6b7688; font-size: 12px; }

/* 筛选表单 */
.filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.filters .f-item { display: flex; flex-direction: column; gap: 4px; }
.filters label { font-size: 12px; color: #6b7688; }
.filters input[type=text], .filters input[type=date], .filters input[type=number], .filters select {
  height: 32px; padding: 0 8px; border: 1px solid #cfd6e2; border-radius: 6px; font-size: 13px;
  background: #fff; min-width: 120px;
}
.filters input:focus, .filters select:focus { outline: none; border-color: #2b6cb0; }
.filters .f-item.actions { display: flex; flex-direction: row; gap: 8px; align-items: flex-end; }
.filters .f-item.date-row .dr { display: flex; gap: 6px; align-items: center; }
.filters .f-item.date-row .dr input[type=date] { min-width: 128px; }
.filters .f-item.date-row .dr input.date-input { min-width: 128px; text-align: center; background: #fff; cursor: pointer; }
.filters .quick-range { min-width: 122px; color: #2b6cb0; background: #f5f8fc; font-weight: 500; }
.filters .kw-row { display: flex; gap: 6px; align-items: center; }
.filters .detail-btn { height: 32px; background: #2b6cb0; color: #fff; white-space: nowrap; }
.filters .detail-btn:hover { background: #1f5aa8; color: #fff; }

/* 订单明细模式提示条 */
.detail-tip { display: flex; align-items: center; gap: 6px; padding: 9px 14px; margin-bottom: 14px; background: #eef4fd; border: 1px solid #cfe0f5; border-radius: 8px; font-size: 13px; color: #1d4f91; }
.detail-tip b { color: #c53030; }

/* 操作列已移除，首列订单编号宽度由 .no-col 控制 */
.table-wrap.list-scroll thead th:first-child { text-align: left; }
.op-cell { position: relative; text-align: center; }
.op-trigger { cursor: pointer; margin: 0; white-space: nowrap; font-size: 12px; }
.op-menu { position: absolute; top: calc(100% + 2px); left: 50%; transform: translateX(-50%); background: #fff; border: 1px solid #dbe2ec; border-radius: 6px; box-shadow: 0 6px 18px rgba(15, 23, 42, 0.16); min-width: 112px; z-index: 60; padding: 4px; }
.op-item { display: block; padding: 7px 12px; font-size: 13px; color: #1f2937; text-decoration: none; border-radius: 4px; text-align: left; cursor: pointer; white-space: nowrap; }
.op-item:hover { background: #eef3f9; }
.op-item.op-del { color: #c53030; }
.op-item.op-del:hover { background: #fdecea; }

/* 订单明细弹窗（遮罩 + iframe） */
.detail-modal { display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, 0.55); z-index: 300; align-items: center; justify-content: center; }
.detail-modal .dm-box { width: min(1240px, 96vw); height: min(740px, 92vh); background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28); }
.detail-modal .dm-frame { width: 100%; height: 100%; border: 0; display: block; }

/* 订单明细页（弹窗 iframe 内） */
.od-body { background: #fff; }
.od-page { display: flex; flex-direction: column; height: 100vh; font-size: 13px; }
.od-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: #2b6cb0; color: #fff; flex: none; }
.od-title { font-size: 15px; font-weight: 600; }
.od-close { background: transparent; border: 0; color: #fff; font-size: 22px; cursor: pointer; line-height: 1; padding: 0 4px; }
.od-close:hover { color: #ffd; }
.od-print-link { color: #fff; font-size: 13px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.45); border-radius: 6px; padding: 4px 10px; text-decoration: none; margin-left: auto; margin-right: 10px; }
.od-print-link:hover { background: rgba(255,255,255,.28); color: #fff; }
.od-search { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid #e3e7ee; background: #f8fafc; flex: none; }
.od-search select, .od-search input { height: 30px; border: 1px solid #cfd6e2; border-radius: 6px; padding: 0 8px; font-size: 13px; background: #fff; }
.od-search button { height: 30px; border: 0; background: #2b6cb0; color: #fff; padding: 0 18px; border-radius: 6px; font-size: 13px; cursor: pointer; }
.od-search button:hover { background: #1f5aa8; }
.od-count { margin-left: auto; color: #6b7688; font-size: 12px; }
.od-table-wrap { flex: 1; overflow: auto; }
.od-table-wrap table { width: 100%; border-collapse: collapse; font-size: 13px; }
.od-table-wrap th, .od-table-wrap td { border: 1px solid #e3e7ee; padding: 6px 8px; white-space: nowrap; text-align: left; }
.od-table-wrap th { background: #f4f6fa; color: #4a5568; font-weight: 600; position: sticky; top: 0; z-index: 1; }
.od-table-wrap td.num { text-align: right; font-variant-numeric: tabular-nums; }
.od-table-wrap tr:nth-child(even) { background: #fafbfd; }
.od-table-wrap tr:hover { background: #eef4fd; }
.od-empty { padding: 40px 20px; text-align: center; color: #8a94a6; font-size: 14px; }
/* 修改订单弹窗：编辑区独立滚动 + 明细表头固定 */
.od-edit-body { flex: 1; min-height: 0; overflow: auto; padding: 14px 16px; }
.od-edit-body .edit-items thead th { position: sticky; top: 0; z-index: 5; }
/* 订单编号列加宽（回收站 / 通用）+ 超长省略，悬停显示全文 */
.no-col { min-width: 150px; white-space: nowrap; }
.no-col .order-link { display: inline-block; max-width: 170px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.log-nos { display: inline-block; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.od-foot { padding: 10px 16px; border-top: 1px solid #e3e7ee; text-align: right; background: #f8fafc; flex: none; }
.od-foot .od-ok { border: 0; background: #2b6cb0; color: #fff; padding: 7px 32px; border-radius: 6px; font-size: 13px; cursor: pointer; }
.od-foot .od-ok:hover { background: #1f5aa8; }

/* ===== 双日历弹层 ===== */
#dateRangeWrap { position: relative; }
.date-range-panel {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 300;
  display: flex; gap: 10px; background: #fff; border: 1px solid #dbe2ec; border-radius: 10px;
  box-shadow: 0 8px 28px rgba(15, 40, 80, .16); padding: 12px 14px;
}
.date-range-panel[hidden] { display: none; }
.drp-col { min-width: 252px; }
.drp-col.active .drp-head { color: #2b6cb0; }
.drp-col.active .drp-cal {
  box-shadow: 0 0 0 2px #2b6cb0; border-radius: 8px; padding: 2px;
}
.drp-head {
  font-size: 12px; color: #63708a; font-weight: 600; padding: 2px 4px 8px;
  border-bottom: 1px solid #edf1f7; margin-bottom: 6px;
}
.drp-cal { user-select: none; }
.drp-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.drp-nav {
  border: 1px solid #dbe2ec; background: #fff; color: #3b4353; width: 26px; height: 26px;
  border-radius: 6px; cursor: pointer; font-size: 12px; line-height: 1;
}
.drp-nav:hover { background: #f0f5fb; border-color: #2b6cb0; color: #2b6cb0; }
.drp-titles { display: flex; gap: 4px; }
.drp-title {
  border: none; background: transparent; color: #2b2f36; font-size: 13px; font-weight: 600;
  padding: 3px 8px; border-radius: 5px; cursor: pointer;
}
.drp-title::after { content: '▾'; margin-left: 3px; font-size: 10px; color: #8a94a6; }
.drp-title:hover { background: #eef4fd; color: #2b6cb0; }
.drp-title:active { background: #dce9f7; }
.drp-week { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 2px; }
.drp-wk { text-align: center; font-size: 11px; color: #8a94a6; padding: 3px 0; }
.drp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.drp-cell {
  border: none; background: transparent; height: 30px; min-width: 0; border-radius: 6px;
  font-size: 12.5px; color: #2b2f36; cursor: pointer; line-height: 1;
}
.drp-cell:hover { background: #eef4fd; color: #2b6cb0; }
.drp-cell.is-other { color: #c3cbd8; }
.drp-cell.is-blank { visibility: hidden; }
.drp-cell.is-disabled { color: #d6dce6; cursor: not-allowed; background: transparent; }
.drp-cell.is-disabled:hover { background: transparent; color: #d6dce6; }
.drp-cell.is-today { box-shadow: inset 0 0 0 1px #2b6cb0; color: #2b6cb0; font-weight: 600; }
.drp-cell.is-from, .drp-cell.is-to { background: #2b6cb0; color: #fff; font-weight: 600; }
.drp-cell.is-from:hover, .drp-cell.is-to:hover { background: #245a94; color: #fff; }
.drp-cell.is-range { background: #e7f0fb; color: #2b6cb0; border-radius: 0; }
.drp-cell.is-from.is-range { border-radius: 6px 0 0 6px; }
.drp-cell.is-to.is-range { border-radius: 0 6px 6px 0; }
.drp-yeargrid .drp-cell, .drp-monthgrid .drp-cell { height: 38px; font-size: 12.5px; }
.drp-yeargrid, .drp-monthgrid { grid-template-columns: repeat(4, 1fr); gap: 4px; }
.drp-cell.is-current { background: #2b6cb0; color: #fff; font-weight: 600; }
.drp-cell.is-current:hover { background: #245a94; color: #fff; }
@media (max-width: 640px) {
  .date-range-panel { flex-direction: column; left: 50%; transform: translateX(-50%); }
}

/* 按钮 */
.btn {
  display: inline-block; border: 1px solid #cfd6e2; background: #fff; color: #2b2f36;
  padding: 7px 16px; border-radius: 6px; font-size: 13px; cursor: pointer; line-height: 1.4;
}
.btn:hover { background: #f4f6fa; text-decoration: none; }
.btn.primary { background: #2b6cb0; border-color: #2b6cb0; color: #fff; }
.btn.primary:hover { background: #245a94; }
.btn.danger { background: #c53030; border-color: #c53030; color: #fff; }
.btn.danger:hover { background: #a72828; }
.btn.sm { padding: 3px 10px; font-size: 12px; }

/* 表格 */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th, table.tbl td {
  border: 1px solid #e3e7ee; padding: 7px 10px; text-align: left; white-space: nowrap;
}
table.tbl th { background: #f4f6fa; color: #4a5568; font-weight: 600; }
/* 订单列表：列表区独立滚动，表头固定不随订单内容上滑 */
.table-wrap.list-scroll {
  overflow-x: auto; overflow-y: auto; max-height: calc(100vh - 330px);
}
.table-wrap.list-scroll thead th {
  position: sticky; top: 0; z-index: 5;
  background: #f4f6fa; box-shadow: 0 1px 0 #dbe2ec;
}
/* 表头可点击排序：点击后相同值聚在一起 */
.table-wrap.list-scroll thead th.sortable { cursor: pointer; user-select: none; }
.table-wrap.list-scroll thead th.sortable:hover { background: #e8eef7; }
.table-wrap.list-scroll thead th.sortable::after { content: '↕'; font-size: 10px; color: #b3bfd0; margin-left: 4px; vertical-align: 1px; }
.table-wrap.list-scroll thead th.sortable.sort-asc::after { content: '▲'; color: #2b6cb0; }
.table-wrap.list-scroll thead th.sortable.sort-desc::after { content: '▼'; color: #2b6cb0; }
/* 订单列表：长文本单行省略，表格更紧凑 */
.table-wrap.list-scroll thead th, .table-wrap.list-scroll tbody td {
  max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 7px 6px;
}
/* 长文本列收窄：去掉操作列后，列号整体前移一位 */
.table-wrap.list-scroll thead th:nth-child(3), .table-wrap.list-scroll tbody td:nth-child(3) { max-width: 150px; } /* 客户名称 */
.table-wrap.list-scroll thead th:nth-child(8), .table-wrap.list-scroll tbody td:nth-child(8) { max-width: 150px; } /* 信息备注 */
.table-wrap.list-scroll thead th:nth-child(15), .table-wrap.list-scroll tbody td:nth-child(15) { max-width: 170px; } /* 订单备注 */
/* 操作列单元格必须允许下拉溢出（覆盖上面的 overflow:hidden） */
.table-wrap.list-scroll tbody td.op-cell, .table-wrap.list-scroll thead th:first-child { overflow: visible; }
/* 订单列表：合计行固定在底部，滚动查看时不动 */
.table-wrap.list-scroll tfoot td {
  position: sticky; bottom: 0; z-index: 5;
  background: #f9fafc; box-shadow: 0 -1px 0 #dbe2ec;
}
table.tbl tbody tr:nth-child(even) { background: #fafbfd; }
table.tbl tbody tr:hover { background: #eef4fd; }
table.tbl .num-col { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl td.num-col { font-weight: 600; }
table.tbl .total-row td { background: #fff7e6; font-weight: 700; }
table.tbl a.order-link { font-weight: 600; }

.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; }
.badge.ok { background: #e6f7ee; color: #1d7a45; }
.badge.warn { background: #fff7e6; color: #8a5b00; }
.badge.muted { background: #eef0f4; color: #6b7688; }

/* 空态 / 分页 */
.empty { text-align: center; color: #8a94a6; padding: 40px 0; }
.pager { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 14px; font-size: 13px; color: #6b7688; }
.pager .btn { min-width: 0; }

/* 导入 */
.drop-zone {
  border: 2px dashed #c9d5e8; border-radius: 10px; padding: 14px 20px; text-align: center;
  background: #fbfcfe; color: #6b7688; cursor: pointer;
}
.drop-zone.on { border-color: #2b6cb0; background: #eef4fd; }
.drop-zone input[type=file] { margin-top: 12px; }

.note { font-size: 12px; color: #8a94a6; margin-top: 8px; }
.summary-grid { display: flex; gap: 14px; flex-wrap: wrap; margin: 10px 0 4px; }
.summary-grid .item { background: #f4f6fa; border-radius: 8px; padding: 10px 16px; min-width: 130px; }
.summary-grid .item b { display: block; font-size: 18px; color: #1a3a6b; }
.summary-grid .item span { font-size: 12px; color: #6b7688; }

/* 详情页 */
.detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 20px; }
.detail-grid .d-item.full { grid-column: 1 / -1; }
.detail-grid .d-item label { display: block; font-size: 12px; color: #8a94a6; }
.detail-grid .d-item div { font-size: 14px; color: #2b2f36; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, #2b6cb0, #3182ce);
  color: #fff; padding: 8px 18px; border-radius: 8px;
  font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none;
  box-shadow: 0 2px 6px rgba(43,108,176,.25);
  margin-bottom: 14px; transition: all .15s ease;
}
.back-link:hover { background: linear-gradient(135deg, #245a94, #2b6cb0); box-shadow: 0 3px 10px rgba(43,108,176,.35); transform: translateY(-1px); color: #fff; }
.back-link .back-ico { font-size: 15px; line-height: 1; }

/* 登录页 */

/* 导入页：删除/修改并排 + 修改弹窗 */
.mgmt-row { display: flex; gap: 16px; margin-bottom: 16px; }
.mgmt-row > .card { flex: 1; margin-bottom: 0; min-width: 0; }
.mgmt-col { flex: 1; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.mgmt-col .card { margin-bottom: 0; flex: 1; padding: 12px 20px; }
.mgmt-col .card h2 .sub { display: block; margin-top: 3px; line-height: 1.5; }
.modal-wrap {
  position: fixed; inset: 0; z-index: 998; overflow: auto;
  background: rgba(8, 18, 34, .55);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 36px 16px 60px;
}
.modal-wrap[hidden] { display: none; }
.modal-box { background: #fff; border-radius: 12px; padding: 18px 18px 20px; width: 100%; box-shadow: 0 14px 52px rgba(0,0,0,.28); }
.modal-box.wide { max-width: 1180px; }
.modal-box .tbl.edit-items { min-width: 1180px; }

.login-body {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; overflow: hidden;
  background: linear-gradient(135deg, #081c3d 0%, #123c74 42%, #0e6b8c 100%);
}
.login-body::before {
  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: 46px 46px;
}
.login-decor { position: absolute; inset: 0; pointer-events: none; }
.login-decor .glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; }
.login-decor .g1 { width: 460px; height: 460px; background: #2f7fd0; top: -140px; left: -120px; }
.login-decor .g2 { width: 400px; height: 400px; background: #0ea5a4; bottom: -130px; right: -90px; opacity: .38; }
.login-decor .g3 { width: 300px; height: 300px; background: #7c5cd6; top: 46%; left: 60%; opacity: .22; }

.login-card {
  position: relative; width: 400px; max-width: calc(100vw - 40px);
  padding: 38px 38px 26px;
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-radius: 18px;
  box-shadow: 0 26px 70px rgba(3, 15, 40, .5), 0 3px 10px rgba(3, 15, 40, .22);
  animation: login-in .5s ease both;
}
@keyframes login-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}
.login-logo {
  width: 66px; height: 66px; margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 20px; color: #fff;
  background: linear-gradient(135deg, #2b6cb0, #1a4a8a);
  box-shadow: 0 12px 26px rgba(26, 74, 138, .45);
}
.login-logo svg { width: 34px; height: 34px; }
.login-card h1 {
  font-size: 22px; color: #132a4d; text-align: center;
  margin-bottom: 6px; letter-spacing: 3px;
}
.login-card .sub { text-align: center; color: #7c889c; font-size: 13px; margin-bottom: 24px; }
.login-err { margin-bottom: 16px; border-radius: 8px; padding: 9px 12px; }

.login-form .field { margin-bottom: 18px; }
.login-form label { display: block; font-size: 13px; color: #4a5568; margin-bottom: 7px; font-weight: 500; }
.login-form .input-wrap { position: relative; }
.login-form .input-wrap .ic {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; display: flex; align-items: center; justify-content: center;
  color: #9aa5b8; pointer-events: none;
  transition: color .2s;
}
.login-form .input-wrap .ic svg { width: 16px; height: 16px; display: block; flex: none; }
.login-form .field input[type="text"], .login-form .field input[type="password"] {
  box-sizing: border-box; width: 100%; height: 44px; padding: 0 14px 0 44px;
  border: 1px solid #dfe5ee; border-radius: 10px;
  background: #f7f9fc; font-size: 14px; color: #2b2f36;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.login-form .field input[type="text"]:focus, .login-form .field input[type="password"]:focus {
  outline: none; background: #fff; border-color: #2b6cb0;
  box-shadow: 0 0 0 3px rgba(43, 108, 176, .16);
}
.login-form .input-wrap:focus-within .ic { color: #2b6cb0; }
.login-form .field input::placeholder { color: #aab4c5; }

.login-btn {
  width: 100%; height: 46px; margin-top: 6px;
  border: none; border-radius: 10px; cursor: pointer;
  font-size: 15px; letter-spacing: 8px; color: #fff;
  background: linear-gradient(135deg, #2b6cb0, #1a4a8a);
  box-shadow: 0 10px 24px rgba(26, 74, 138, .38);
  transition: filter .2s, transform .15s, box-shadow .2s;
}
.login-btn:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 14px 28px rgba(26, 74, 138, .46); }
.login-btn:active { transform: translateY(0); filter: brightness(.98); }

.login-foot { margin-top: 26px; text-align: center; font-size: 12px; color: #a6afc0; }

/* 用户管理页 */
.user-form .uf-row { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; }
.user-form .uf-item { display: flex; flex-direction: column; gap: 4px; }
.user-form .uf-item label { font-size: 12px; color: #6b7688; }
.user-form .uf-item input {
  height: 32px; padding: 0 8px; border: 1px solid #cfd6e2; border-radius: 6px;
  font-size: 13px; background: #fff; min-width: 160px;
}
.user-form .uf-item input:focus { outline: none; border-color: #2b6cb0; }
.user-form .uf-submit { flex-direction: row; gap: 8px; }
.inline-form { display: inline; }
.del-form { max-width: 560px; }
.del-form .uf-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.del-form .uf-item { display: flex; align-items: center; flex: 1; min-width: 0; }
.del-form .uf-item label { font-size: 13px; color: #6b7688; margin-right: 8px; white-space: nowrap; flex: none; }
.del-form .uf-item input {
  flex: 1; min-width: 0; width: auto; box-sizing: border-box; padding: 7px 10px;
  border: 1px solid #cbd5e3; border-radius: 6px; font-size: 14px; background: #fff;
}
.del-form .uf-item input:focus { outline: none; border-color: #2b6cb0; }
.del-form .uf-submit { flex: 0 0 100%; }
.tbl .log-detail { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl.edit-items input, .tbl.edit-items select { padding: 3px 5px; border: 1px solid #c8d4e4; border-radius: 4px; font-size: 12px; box-sizing: border-box; }
.tbl.edit-items input:focus { outline: none; border-color: #3b6fd4; box-shadow: 0 0 0 2px rgba(59,111,212,.12); }
.tbl.edit-items .in-date { width: 96px; }
.tbl.edit-items .in-num { width: 70px; }
.tbl.edit-items .in-short { width: 60px; }
.tbl.edit-items .in-text { width: 96px; }
.tbl.edit-items .in-name { width: 110px; }
.tbl.edit-items .in-content { width: 130px; }
.tbl.edit-items td { vertical-align: middle; }

/* 查询等待动画（全屏遮罩） */
.loading-mask {
  position: fixed; inset: 0; z-index: 9999;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  animation: mask-in .22s ease both;
}
.loading-mask[hidden] { display: none; }
@keyframes mask-in { from { opacity: 0; } to { opacity: 1; } }
.loading-box {
  text-align: center;
  background: #fff;
  border-radius: 14px;
  padding: 28px 40px;
  box-shadow: 0 12px 36px rgba(20, 40, 80, .16), 0 2px 8px rgba(20, 40, 80, .08);
  border: 1px solid rgba(43, 108, 176, .1);
}
.loading-box .spinner { position: relative; width: 84px; height: 84px; margin: 0 auto 20px; }
.loading-box .ring { position: absolute; border-radius: 50%; border-style: solid; }
.loading-box .ring-a {
  inset: 0; border-width: 4px;
  border-color: rgba(43,108,176,.18) #4b96d6 rgba(43,108,176,.18) rgba(43,108,176,.18);
  animation: ring-rotate 1.1s linear infinite;
}
.loading-box .ring-b {
  inset: 15px; border-width: 3px;
  border-color: #9fd2ff transparent transparent transparent;
  animation: ring-rotate 1.7s linear infinite reverse;
}
.loading-box .core {
  position: absolute; inset: 33px; border-radius: 50%;
  background: linear-gradient(135deg, #8fd0ff, #2b6cb0);
  box-shadow: 0 0 22px rgba(127, 193, 255, .85);
  animation: core-pulse 1.3s ease-in-out infinite;
}
@keyframes ring-rotate { to { transform: rotate(360deg); } }
@keyframes core-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(.72); opacity: .65; }
}
.loading-box .loading-text {
  color: #2b6cb0; font-size: 16px; letter-spacing: 4px;
  animation: text-glow 2s ease-in-out infinite;
}
@keyframes text-glow {
  0%, 100% { opacity: .85; }
  50% { opacity: 1; }
}
.loading-box .dots { margin-top: 14px; }
.loading-box .dots i {
  display: inline-block; width: 8px; height: 8px; margin: 0 5px;
  border-radius: 50%; background: #9fd2ff;
  animation: dot-jump 1.2s ease-in-out infinite;
}
.loading-box .dots i:nth-child(2) { animation-delay: .15s; }
.loading-box .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot-jump {
  0%, 100% { transform: translateY(0); opacity: .45; }
  50% { transform: translateY(-7px); opacity: 1; }
}

/* 导入预览弹窗 */
.modal-overlay {
  position: fixed; inset: 0; z-index: 9990;
  background: rgba(15, 30, 55, .55);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.modal-box {
  width: min(1080px, 96vw);
  max-height: 92vh;
  display: flex; flex-direction: column;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(15, 30, 55, .3);
  overflow: hidden;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid #e6ebf3;
  background: linear-gradient(135deg, #f6f9fd, #eef4fb);
}
.modal-head h2 { margin: 0; font-size: 17px; color: #1a3a6b; }
.modal-close {
  font-size: 24px; line-height: 1; color: #7b8798; text-decoration: none;
  padding: 2px 8px; border-radius: 6px;
}
.modal-close:hover { color: #a02c2c; background: #f1e5e5; }
.modal-body {
  padding: 16px 20px 20px;
  overflow-y: auto;
}
.preview-scroll { max-height: 420px; overflow-y: auto; }

/* 订单详情页操作区：返回 + 打印/导出 */
.page-actions {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; margin-bottom: 14px;
}
.action-group { display: flex; gap: 8px; }

/* 开单员下拉：点击展开，面板内搜索过滤 */
.op-dropdown { position: relative; flex: 1; min-width: 0; }
.op-trigger {
  width: 100%; padding: 6px 8px;
  border: 1px solid #d8e0ec; border-radius: 6px; font-size: 13px;
  box-sizing: border-box; cursor: pointer; background: #fff; text-align: left;
}
.op-trigger:focus { border-color: #2b6cb0; outline: none; }
.op-panel {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 99;
  width: 100%; min-width: 170px; background: #fff;
  border: 1px solid #d8e0ec; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(20,40,80,.14); padding: 6px;
}
.op-search {
  width: 100%; padding: 5px 8px; margin-bottom: 4px;
  border: 1px solid #d8e0ec; border-radius: 6px; font-size: 12px;
  box-sizing: border-box;
}
.op-search:focus { border-color: #2b6cb0; outline: none; }
.op-list { max-height: 180px; overflow-y: auto; }
.op-opt { padding: 5px 8px; font-size: 13px; cursor: pointer; border-radius: 5px; }
.op-opt:hover { background: #eef4fb; }

/* 打印：只打印订单内容（print-area），隐藏导航与操作按钮 */
@media print {
  body * { visibility: hidden; }
  .print-area, .print-area * { visibility: visible; }
  .print-area { position: absolute; left: 0; top: 0; width: 100%; }
  .page-actions, .topbar, .nav, .footer { display: none !important; }
}

/* ===== billing: invoice / payment ===== */
.badge.blue { background:#eef4fd; color:#1d4f91; }
.badge.green { background:#e6f7ee; color:#1d7a45; }
.form-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:12px 16px; margin-bottom:12px; }
.field label { display:block; font-size:12px; color:#8a94a6; margin-bottom:4px; }
.field input[type=text], .field input[type=number], .field input[type=date], .field select { width:100%; padding:7px 10px; border:1px solid #d8e0ec; border-radius:6px; font-size:14px; box-sizing:border-box; background:#fff; }
.req { color:#c53030; }
.hint-inline { font-weight:normal; color:#8a94a6; font-size:12px; }
.form-actions { display:flex; align-items:center; gap:12px; margin-top:8px; flex-wrap:wrap; }
.required-note { font-size:12px; color:#8a94a6; }
.actions-cell { white-space:nowrap; }

/* 行内操作下拉菜单 */
.row-menu { position: relative; display: inline-block; }
.row-menu-btn .caret { font-size: 10px; margin-left: 2px; }
.row-menu-panel {
  display: none; z-index: 120;
  min-width: 124px; background: #fff; border: 1px solid #d8e0ec; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(20,40,80,.16); padding: 5px;
}
.row-menu.open .row-menu-panel { display: block; }
.row-menu-item {
  display: block; padding: 7px 12px; font-size: 13px; color: #2b3a4a;
  border-radius: 6px; text-decoration: none; white-space: nowrap;
}
.row-menu-item:hover { background: #eef4fb; color: #1d4f91; }
.chip { display:inline-flex; align-items:center; gap:6px; background:#eef4fb; border:1px solid #c9daf5; color:#1d4f91; padding:3px 8px; border-radius:14px; font-size:13px; }
.chip-x { border:none; background:transparent; color:#a02c2c; cursor:pointer; font-size:15px; line-height:1; padding:0 2px; }
.search-result { border:1px solid #e5e7eb; border-radius:8px; background:#fff; max-height:220px; overflow:auto; }
.search-row { padding:8px 12px; border-bottom:1px solid #f0f0f0; display:flex; justify-content:space-between; align-items:center; cursor:pointer; }
.search-row:hover { background:#f6f9ff; }
.add-link { color:#1f6feb; }
.paybar { display:flex; align-items:center; gap:12px; margin:12px 0; }
.paybar .track { flex:1; height:10px; background:#eef0f4; border-radius:6px; overflow:hidden; }
.paybar .fill { height:100%; background:#1d7a45; border-radius:6px; }
.paybar .fill.warn { background:#e0a93a; }

/* 表头列筛选 */
.th-filter { margin-left:5px; font-size:15px; color:#9aa4b2; cursor:pointer; user-select:none; display:inline-block; line-height:1; padding:6px 8px; border-radius:4px; }
.th-filter:hover { color:#1f6feb; background:#eef4fb; }
.th-filter.active { color:#e5484d; }
.th-filter-panel {
  position: fixed; z-index: 999; min-width: 190px; max-width: 260px;
  background: #fff; border: 1px solid #e1e4e8; border-radius: 8px;
  box-shadow: 0 4px 16px rgba(31,35,41,.14);
}
.th-filter-panel .ff-head { padding: 8px 12px; border-bottom: 1px solid #eef1f4; font-size: 13px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.th-filter-panel .ff-head .ff-count { color: #8a94a6; font-size: 12px; font-weight: normal; }
.th-filter-panel .ff-list { max-height: 240px; overflow: auto; padding: 6px 0; }
.th-filter-panel .ff-item { display: flex; align-items: center; gap: 6px; padding: 5px 12px; font-size: 13px; color: #444; cursor: pointer; white-space: nowrap; }
.th-filter-panel .ff-item:hover { background: #f5f7fa; }
.th-filter-panel .ff-item input { margin: 0; cursor: pointer; }
.th-filter-panel .ff-item span { overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.th-filter-panel .ff-foot { display: flex; gap: 6px; padding: 8px 12px; border-top: 1px solid #eef1f4; }
.th-filter-panel .ff-btn { flex: 1; padding: 5px 0; border: 1px solid #d0d7de; border-radius: 5px; background: #fff; font-size: 12px; cursor: pointer; color: #444; }
.th-filter-panel .ff-btn:hover { background: #f5f7fa; }
.th-filter-panel .ff-ok { border-color: #1f6feb; background: #1f6feb; color: #fff; }
.th-filter-panel .ff-ok:hover { background: #1a5fd0; }

/* 列表下方筛选条件条 */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; margin-top: 12px; background: #f7f9fc; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 13px; }
.filter-bar .fb-label { color: #5b6472; }
.filter-bar .fb-chip { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 1px solid #c9d5e8; color: #2b3a4a; padding: 4px 10px; border-radius: 16px; font-size: 13px; }
.filter-bar .fb-chip b { color: #1d4f91; font-weight: normal; }
.filter-bar .fb-x { border: none; background: transparent; color: #a02c2c; cursor: pointer; font-size: 15px; line-height: 1; padding: 0 3px; }
.filter-bar .fb-x:hover { color: #c53030; }
.filter-bar .fb-clear { border: 1px solid #d0d7de; background: #fff; color: #444; border-radius: 6px; padding: 4px 14px; font-size: 12px; cursor: pointer; }
.filter-bar .fb-clear:hover { background: #f5f7fa; }

/* 快捷筛选行（订单列表筛选区下方） */
.quick-filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; margin-top: 12px; background: #f7f9fc; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 13px; }
.quick-filter-row .qf-label { color: #5b6472; }
.quick-filter-row .btn { text-decoration: none; }

/* 发票识别结果列表（批量 OCR） */

/* ===== 日期范围选择器（复制自订单查询） ===== */
.filters .date-range-box {
  display: flex; align-items: center; gap: 6px; min-width: 232px; padding: 6px 12px;
  background: #f5f7fa; border: 1px solid #d6dbe3; border-radius: 6px; cursor: pointer;
  color: #333; font-size: 13px; transition: border-color .15s;
}
.filters .date-range-box:hover { border-color: #2b6cb0; }
.filters .date-range-box .dr-ico { color: #2b6cb0; font-size: 14px; line-height: 1; }
.filters .date-range-box .dr-text { white-space: nowrap; }
.filters .quick-range { min-width: 122px; color: #2b6cb0; background: #f5f8fc; font-weight: 500; }

#dateRangeWrap { position: relative; }
.date-range-panel {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 300;
  display: flex; gap: 10px; background: #fff; border: 1px solid #dbe2ec; border-radius: 10px;
  box-shadow: 0 8px 28px rgba(15, 40, 80, .16); padding: 12px 14px;
}
.date-range-panel[hidden] { display: none; }
.drp-col { min-width: 252px; }
.drp-col.active .drp-head { color: #2b6cb0; }
.drp-head { font-size: 12px; color: #63708a; font-weight: 600; padding: 2px 4px 8px; border-bottom: 1px solid #edf1f7; margin-bottom: 6px; }
.drp-cal { user-select: none; }
.drp-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.drp-nav { border: 1px solid #dbe2ec; background: #fff; color: #3b4353; width: 26px; height: 26px; border-radius: 6px; cursor: pointer; font-size: 12px; line-height: 1; }
.drp-nav:hover { background: #f0f5fb; border-color: #2b6cb0; color: #2b6cb0; }
.drp-title { border: none; background: transparent; color: #2b2f36; font-size: 13px; font-weight: 600; padding: 3px 8px; border-radius: 5px; cursor: pointer; }
.drp-title::after { content: '▾'; margin-left: 3px; font-size: 10px; color: #8a94a6; }
.drp-week { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 2px; }
.drp-wk { text-align: center; font-size: 11px; color: #8a94a6; padding: 3px 0; }
.drp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.drp-cell { border: none; background: transparent; height: 30px; min-width: 0; border-radius: 6px; font-size: 12.5px; color: #2b2f36; cursor: pointer; line-height: 1; }
.drp-cell:hover { background: #eef4fd; color: #2b6cb0; }
.drp-cell.is-other { color: #c3cbd8; }
.drp-cell.is-today { box-shadow: inset 0 0 0 1px #2b6cb0; color: #2b6cb0; font-weight: 600; }
.drp-cell.is-from, .drp-cell.is-to { background: #2b6cb0; color: #fff; font-weight: 600; border-radius: 50%; }
.drp-cell.is-range { background: #e7f0fb; color: #2b6cb0; border-radius: 0; }
.ocr-row { border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; background: #fbfcfe; }
.ocr-row .ocr-head { font-weight: 600; font-size: 13px; color: #2b3a4a; margin-bottom: 4px; }
.ocr-row .ocr-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: #5b6472; }
.ocr-row .ocr-info .btn { margin-left: auto; }
