/* ===== 联馨玻璃下单系统 公共样式 ===== */
/* 快捷筛选标签（订单管理页） */
.quick-filter .qf.active { background: var(--primary); color: #fff; border-color: var(--primary); }

:root {
  --primary: #1a56db;
  --primary-dark: #1443ab;
  --bg: #f3f5f9;
  --card: #ffffff;
  --border: #e2e6ee;
  --text: #1f2937;
  --muted: #6b7280;
  --danger: #dc2626;
  --success: #059669;
  --warning: #d97706;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

/* ---- 顶栏 ---- */
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.brand { font-size: 16px; font-weight: 700; color: var(--primary); white-space: nowrap; }
.brand small { font-weight: 400; color: var(--muted); margin-left: 6px; font-size: 12px; }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.nav a {
  padding: 6px 14px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
}
.nav a:hover { background: #eef2fb; color: var(--primary); }
.nav a.active { background: var(--primary); color: #fff; }
.topbar .right { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* 移动端汉堡菜单按钮（桌面隐藏） */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-size: 18px;
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  line-height: 1;
}
.nav-toggle:active { background: #eef2fb; }

/* ---- 手机竖屏响应式：导航折叠为下拉菜单 ---- */
@media (max-width: 768px) {
  .topbar { padding: 0 12px; gap: 10px; height: 48px; }
  .brand { font-size: 14px; }
  .brand small { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute;
    top: 48px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
    padding: 8px 12px;
    gap: 2px;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
    z-index: 99;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; font-size: 14px; }
  .topbar .right { font-size: 12px; }
}

/* ---- 主容器 ---- */
.container { max-width: 1440px; margin: 0 auto; padding: 20px 24px 60px; }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.page-head h1 { font-size: 20px; }

/* ---- 卡片 ---- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.card h2 { font-size: 15px; margin-bottom: 12px; color: var(--text); }
.card h2 .badge { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 8px; }

/* ---- 按钮 ---- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: 8px; border: 1px solid var(--border);
  background: #fff; color: var(--text); font-size: 13px; cursor: pointer;
  transition: all .15s; text-decoration: none; line-height: 1.4;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; padding: 7px 20px; font-size: 14px; box-shadow: 0 2px 6px rgba(26,86,219,.25); }
.btn.primary:hover { background: var(--primary-dark); box-shadow: 0 3px 10px rgba(26,86,219,.35); }
.btn.accent { background: #0e9f6e; border-color: #0e9f6e; color: #fff; font-weight: 600; }
.btn.accent:hover { background: #057a55; border-color: #057a55; }
.btn.danger { color: var(--danger); }
.btn.danger:hover { border-color: var(--danger); color: var(--danger); }
.btn.small { padding: 3px 10px; font-size: 12px; border-radius: 6px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---- 表单 ---- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 16px; }
.form-item { display: flex; flex-direction: column; gap: 4px; }
.form-item.full { grid-column: 1 / -1; }
.form-item label { font-size: 12px; color: var(--muted); }
.form-item label .req { color: var(--danger); }
input, select, textarea {
  padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; font-family: inherit; background: #fff; color: var(--text); width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26, 86, 219, .12); }
textarea { resize: vertical; min-height: 60px; }

/* ---- 表格 ---- */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
th { background: #f6f8fc; color: #5b6b83; font-weight: 600; white-space: nowrap; }
/* 表头冻结：列表滚动时表头固定在顶部 */
thead th { position: sticky; top: 0; z-index: 5; }
tr:hover td { background: #fafbfe; }
td.num, th.num { text-align: right; }
td.center, th.center { text-align: center; }

/* 紧凑表格（生产工单列表） */
.mo-tbl th, .mo-tbl td { padding: 4px 7px; font-size: 12px; line-height: 1.45; }

/* 产品明细分组标题 */
.group-title {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 0 8px; font-size: 13px; font-weight: 700; color: var(--text);
}
.group-title:first-child { margin-top: 4px; }
.group-title .line { flex: 1; height: 1px; background: #eef1f7; }
.group-title .btn { margin-left: auto; }

/* 合计行 */
.sum-line {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 12px 4px 4px; font-size: 14px; font-weight: 600;
}
.sum-line .amount {
  font-size: 18px; font-weight: 800; color: var(--primary);
}

/* ---- 状态标签 ---- */
.tag { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px; white-space: nowrap; }
.tag-draft { background: #f1f5f9; color: #475569; }
.tag-pending { background: #fef9c3; color: #a16207; }
.tag-confirmed { background: #dbeafe; color: #1d4ed8; }
.tag-reviewed { background: #cffafe; color: #0e7490; }
.tag-production { background: #fef3c7; color: #b45309; }
.tag-ready { background: #d1fae5; color: #047857; }
.tag-shipped { background: #a7f3d0; color: #065f46; }
.tag-done { background: #ede9fe; color: #6d28d9; }
.tag-info { background: #dcfce7; color: #15803d; }
.tag-canceled { background: #fee2e2; color: #b91c1c; }
.tag-paused { background: #fde8d8; color: #c2410c; }
.changed-mark { background: #fee2e2; color: #dc2626; font-weight: 700; margin-left: 4px; }
/* 状态下拉（列表页内联快改） */
.status-select {
  border: none; outline: none; cursor: pointer;
  border-radius: 9999px; padding: 3px 20px 3px 10px;
  font-size: 12px; font-weight: 500; appearance: none;
  min-width: 88px; max-width: 132px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 6px center;
  background-color: #f1f5f9; color: #475569;
  transition: filter .15s, box-shadow .15s;
  border: 1px solid transparent;
}
.status-select:hover { filter: brightness(.94); }
.status-select:focus { box-shadow: 0 0 0 2px rgba(26, 86, 219, .18); border-color: rgba(26, 86, 219, .35); }
.status-select.s-draft     { background-color:#f1f5f9; color:#475569; }
.status-select.s-pending   { background-color:#fef9c3; color:#a16207; }
.status-select.s-confirmed { background-color:#dbeafe; color:#1d4ed8; }
.status-select.s-reviewed  { background-color:#cffafe; color:#0e7490; }
.status-select.s-production{ background-color:#fef3c7; color:#b45309; }
.status-select.s-paused    { background-color:#fde8d8; color:#c2410c; }
.status-select.s-ready     { background-color:#d1fae5; color:#047857; }
.status-select.s-shipped   { background-color:#a7f3d0; color:#065f46; }
.status-select.s-done      { background-color:#ede9fe; color:#6d28d9; }
.status-select.s-canceled  { background-color:#fee2e2; color:#b91c1c; }
.field-changed {
  background: #fdecec !important; border-radius: 4px; padding: 2px 6px;
  color: #b91c1c; font-weight: 600;
}
.row-changed td { background: #fdecec !important; }
.tag-cat { padding: 1px 8px; border-radius: 6px; font-size: 12px; }
.tag-cat-bottle { background: #dbeafe; color: #1d4ed8; }
.tag-cat-part { background: #ede9fe; color: #6d28d9; }
.tag-cat-other { background: #d1fae5; color: #047857; }

/* ---- 工具栏 ---- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar input[type=search], .toolbar select { width: auto; min-width: 140px; }
/* 日期选择框：固定紧凑宽度，避免被全局 width:100% 拉伸 */
.toolbar input[type="date"] { width: 132px !important; flex: none; padding: 6px 8px; }
.toolbar input[type="number"] { flex: none; }

/* ---- 空状态 ---- */
.empty { text-align: center; color: var(--muted); padding: 40px 0; }
.empty .icon { font-size: 40px; margin-bottom: 8px; }

/* ---- 弹窗 ---- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .45);
  display: none; align-items: center; justify-content: center; z-index: 999;
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff; border-radius: 12px; padding: 20px; width: min(560px, 92vw);
  max-height: 88vh; overflow: auto; box-shadow: 0 20px 50px rgba(0,0,0,.2);
}
.modal h3 { margin-bottom: 14px; }
.modal .form-grid { margin-bottom: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

/* ---- 分组明细 ---- */
.group-title {
  display: flex; align-items: center; gap: 10px; margin: 18px 0 8px;
  font-size: 14px; font-weight: 600;
}
.group-title .line { flex: 1; height: 1px; background: var(--border); }
.item-row td { padding: 6px 8px; }
.item-row input, .item-row select { padding: 5px 8px; font-size: 13px; }
.row-total { font-weight: 700; }
.sum-line { display: flex; justify-content: flex-end; align-items: baseline; gap: 8px; margin-top: 12px; font-size: 15px; }
.sum-line .amount { font-size: 22px; font-weight: 700; color: var(--primary); }

/* ---- 消息提示 ---- */
.toast {
  position: fixed; top: 70px; left: 50%; transform: translateX(-50%);
  background: #111827; color: #fff; padding: 10px 22px; border-radius: 8px;
  font-size: 13px; z-index: 9999; opacity: 0; transition: opacity .25s; pointer-events: none;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); white-space: nowrap;
}
.toast.show { opacity: 1; }

/* ---- 批量操作栏 ---- */
.batch-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #eef2fb; border: 1px solid #c7d5f3; border-radius: 10px;
  padding: 9px 14px; margin-bottom: 12px; font-size: 13px; color: #1d4ed8; font-weight: 600;
}
.batch-bar b { color: var(--danger); }
.batch-bar .btn { font-weight: 400; }

/* ---- 订单管理模块 UI ---- */
.seg-tab { display: inline-flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; background: #fff; }
.seg-tab button { border: none; background: #fff; padding: 7px 18px; font-size: 13px; cursor: pointer; color: var(--text); transition: all .15s; }
.seg-tab button.active { background: var(--primary); color: #fff; }
.filter-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.filter-row + .filter-row { margin-top: 8px; border-top: 1px dashed var(--border); padding-top: 8px; }
.filter-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
/* 覆盖全局 input/select width:100%，让筛选行内控件紧凑水平排列 */
.filter-row input, .filter-row select { width: auto !important; flex: none !important; padding: 5px 8px; font-size: 13px; }
.filter-row input[type="search"] { width: 220px !important; }
.filter-row input[type="date"]   { width: 128px !important; }
.filter-row input[type="number"] { width: 78px !important; text-align: right; }
.filter-row select               { min-width: 90px; max-width: 150px; }
.stat-cards { display: flex; gap: 12px; flex-wrap: wrap; }
.stat-card { display: flex; align-items: baseline; gap: 8px; background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 9px 16px; font-size: 13px; color: var(--muted); }
.stat-card b { font-size: 18px; color: var(--text); font-variant-numeric: tabular-nums; }
.stat-card.hl b { color: var(--primary); }
.order-table { border-collapse: separate; border-spacing: 0; min-width: 1150px; }
.order-table thead th { position: sticky; top: 0; background: #f8fafc; z-index: 5; box-shadow: inset 0 -1px 0 var(--border); padding: 9px 10px; }
.order-table tbody td { padding: 9px 10px; border-bottom: 1px solid #eef1f6; vertical-align: middle; }
.order-table tbody tr:nth-child(even) td { background: #fafbfe; }
.order-table tbody tr:hover td { background: #eef2fb; }
.order-table td.num { font-variant-numeric: tabular-nums; }
.order-table .btn.small { padding: 3px 9px; }

/* 必选未选（来源等）红色提示 */
select.invalid {
  border-color: #dc2626 !important;
  background: #fef2f2 !important;
  color: #b91c1c;
}

/* ---- 客户实时模糊搜索面板 ---- */
.cs-panel {
  position: absolute; top: calc(100% + 2px); left: 0; right: 0; z-index: 300;
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, .12); max-height: 240px; overflow: auto;
}
.cs-item {
  padding: 8px 12px; font-size: 13px; cursor: pointer; border-bottom: 1px solid #f1f5f9;
  display: flex; justify-content: space-between; align-items: center;
}
.cs-item:hover, .cs-item.active { background: #eef2fb; color: var(--primary); }
.cs-item .cs-sub { font-size: 12px; color: var(--muted); }
.cs-item.cs-add { color: var(--success); font-weight: 600; border-bottom: none; background: #f0fdf4; }
.cs-item.cs-add:hover { background: #dcfce7; }
.cs-empty { padding: 10px 12px; font-size: 12px; color: var(--muted); }

/* ---- 产品行图片（确认图片 / 印刷图片）缩略与悬浮放大 ---- */
.img-cell {
  width: 48px; height: 48px; border: 1px dashed var(--border); border-radius: 6px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  position: relative; font-size: 18px; color: var(--muted);
  background: #fafbfe; overflow: visible; margin: 0 auto;
}
.img-cell img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 5px;
  transition: transform .15s ease, box-shadow .15s ease;
  position: relative; z-index: 1;
}
.img-cell img:hover {
  transform: scale(3); z-index: 99;
  box-shadow: 0 8px 24px rgba(0,0,0,.35); border-radius: 6px;
}
.img-del {
  position: absolute; top: -5px; right: -5px; width: 16px; height: 16px; line-height: 14px;
  text-align: center; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff;
  font-size: 10px; cursor: pointer; border: none; z-index: 100;
}
.img-del:hover { background: var(--danger); }
.img-thumb-sm { width: 30px; height: 30px; object-fit: cover; border-radius: 4px; vertical-align: middle; cursor: zoom-in; }

/* ---- 明细表样式（工艺换行不溢出、图片列居中） ---- */
.detail-table table-layout: auto;
.detail-table td { vertical-align: middle; word-break: break-word; }
.detail-table td.col-wrap { white-space: normal; word-break: break-word; line-height: 1.5; }
.detail-table td.td-img { text-align: center; white-space: nowrap; }
.detail-table td.td-img img { vertical-align: middle; display: inline-block; }
.detail-table th { white-space: nowrap; }
/* 备注列：截断显示省略号，悬浮看全，点击进入订单详情看全部 */
.detail-table td.td-ellipsis {
  max-width: 150px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; cursor: pointer;
}

.img-ph {
  display: inline-block; width: 30px; height: 30px; border-radius: 4px;
  border: 1px dashed var(--border); background: #fafbfe; vertical-align: middle;
}

/* ---- 明细总表 UI 优化 ---- */
.detail-view-wrap { overflow-x: auto; }
.detail-table { border-collapse: separate; border-spacing: 0; min-width: 1200px; }
.detail-table thead th {
  position: sticky; top: 0; z-index: 5;
  background: #f8fafc; box-shadow: inset 0 -1px 0 var(--border);
  padding: 9px 10px; font-size: 12px;
}
.detail-table tbody td { padding: 8px 10px; border-bottom: 1px solid #eef1f6; }
.detail-table tbody tr:nth-child(even) td { background: #fafbfe; }
.detail-table tbody tr:hover td { background: #eef2fb; }
.detail-table td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.detail-table td { vertical-align: middle; word-break: break-word; }

/* ---- 凭证图片上传 ---- */
.upload-zone {
  border: 2px dashed var(--border); border-radius: 8px; padding: 18px;
  text-align: center; color: var(--muted); font-size: 12px; cursor: pointer;
  background: #fafbfe; transition: border-color .15s;
}
.upload-zone:hover { border-color: var(--primary); color: var(--primary); }
.upload-previews { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.preview-thumb {
  position: relative; width: 72px; height: 72px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--border); background: #f1f5f9;
}
.preview-thumb img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.preview-thumb .del {
  position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; line-height: 16px;
  text-align: center; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff;
  font-size: 11px; cursor: pointer; border: none;
}
.preview-thumb .del:hover { background: var(--danger); }
/* 内联凭证小缩略图 */
.voucher-thumbs { display: flex; flex-wrap: wrap; gap: 6px; }
.voucher-thumbs .preview-thumb { width: 48px; height: 48px; }

/* ---- 订单编辑页专属 ---- */
/* 分区布局 */
.oe-card { padding: 0; overflow: hidden; border-radius: 14px; }
.oe-section { padding: 14px 20px; }
.oe-divider { border: none; border-top: 1px dashed #e5e9f2; margin: 0; height: 1px; }
.oe-section-title {
  font-size: 12px; font-weight: 700; color: var(--primary);
  letter-spacing: .04em;
  margin-bottom: 12px; display: flex; align-items: center; gap: 7px;
}
.oe-section-title::before {
  content: ''; display: inline-block; width: 3px; height: 14px;
  background: linear-gradient(180deg, var(--primary), #6ea0f0); border-radius: 2px;
}
.oe-section-title::after {
  content: ''; flex: 1; height: 1px; background: #eef1f7; margin-left: 2px;
}
.oe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px 16px;
}
.oe-grid-dense {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.oe-grid .form-item.full { grid-column: 1 / -1; }
.oe-hint { font-size: 11px; font-weight: 400; color: var(--muted); margin-left: 4px; }

/* 统一控件高度与质感（仅订单编辑页） */
.oe-card input, .oe-card select {
  height: 32px;
  border-radius: 7px;
  border-color: #dfe4ee;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.oe-card textarea {
  border-radius: 7px;
  border-color: #dfe4ee;
  font-size: 13px;
  padding: 6px 9px;
}
.oe-card input:focus, .oe-card select:focus, .oe-card textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,86,219,.10);
}
.oe-card input[readonly] { background: #f6f8fb !important; color: var(--muted); }
.oe-card label {
  font-size: 11.5px; color: #5b6b83; font-weight: 500;
  display: flex; align-items: center; gap: 4px;
}
.oe-card label .req { color: var(--danger); font-weight: 700; }
/* 表单标签行统一对齐 */
.oe-card .form-item { gap: 5px; }
/* 套袋/打托/备注两列网格 */
.oe-grid-2col {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}
/* 卡片内小按钮与输入框同高 */
.oe-card .btn.small {
  height: 32px; display: inline-flex; align-items: center;
  white-space: nowrap;
}

/* 关键按钮强化 */
.btn.save-draft {
  border-color: #64748b; color: #64748b; font-weight: 600;
}
.btn.save-draft:hover { background: #f1f5f9; border-color: #475569; color: #475569; }
.btn.save-confirm {
  padding: 8px 24px; font-size: 14px; font-weight: 700;
  box-shadow: 0 3px 10px rgba(26,86,219,.3);
  letter-spacing: .02em;
}
.btn.save-confirm:hover { box-shadow: 0 4px 16px rgba(26,86,219,.4); transform: translateY(-1px); }

/* ---- 打印（合同页） ---- */
.print-only { display: none; }
@media print {
  @page { size: A4; margin: 12mm 10mm; }
  body { background: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .topbar, .no-print, .btn, .pager, .modal-mask, .quick-filter { display: none !important; }
  .container { max-width: 100%; padding: 0; }
  .card { border: none; box-shadow: none; padding: 0; margin: 0; }
  table { page-break-inside: auto; }
  tr, td, th { page-break-inside: avoid; }
  th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { text-decoration: none; color: inherit; }
}

/* ---- 采购页内嵌视图切换标签 ---- */
.sub-tabs {
  display: flex; gap: 6px; background: #eef2f7; padding: 5px;
  border-radius: 12px; width: fit-content; margin-bottom: 14px;
  border: 1px solid #e2e8f0;
}
.sub-tab {
  border: 1px solid #d7dee8; background: #fff; padding: 8px 20px;
  border-radius: 9px; font-size: 13.5px; font-weight: 600;
  color: #475569; cursor: pointer; transition: all .15s;
  font-family: inherit; box-shadow: 0 1px 3px rgba(15,23,42,.06);
}
.sub-tab:hover { color: var(--primary); border-color: #93b4f5; background: #f5f8ff; }
.sub-tab.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8); color: #fff;
  border-color: #1d4ed8; box-shadow: 0 2px 8px rgba(37,99,235,.4);
}

/* ---- 采购管理表：字号优化（更清晰明朗） ---- */
.purchase-table { font-size: 13px; }
.purchase-table th { font-size: 13px; font-weight: 700; padding: 9px 8px; color: #334155; }
.purchase-table td { padding: 7px 8px; }
.purchase-table input[type="text"],
.purchase-table input[type="number"],
.purchase-table select { font-size: 12.5px !important; padding: 3px 5px !important; }
.purchase-table .btn.small { font-size: 11.5px !important; padding: 2px 8px !important; }
.purchase-table a { font-size: 13px !important; }
.purchase-table .tag { font-size: 12px; }
.purchase-table .num { font-size: 13px; }
.filter-row input, .filter-row select { font-size: 12.5px; }

/* 行内单价输入：隐藏原生调整箭头（避免误点），直接手输 */
input.price-inline::-webkit-inner-spin-button,
input.price-inline::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input.price-inline[type="number"] { -moz-appearance: textfield; appearance: textfield; }

/* ---- 分页控件 ---- */
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 4px; padding: 10px 14px; flex-wrap: wrap; }
.pager .pg-info { font-size: 12.5px; color: var(--muted); margin-right: 10px; }
.pager .pg-btn, .pager .pg-num {
  min-width: 28px; height: 28px; line-height: 26px; text-align: center;
  font-size: 12.5px; border: 1px solid var(--border); border-radius: 6px;
  color: #334155; background: #fff; text-decoration: none; padding: 0 6px;
  box-sizing: border-box; display: inline-block; cursor: pointer;
}
.pager .pg-btn:hover, .pager .pg-num:hover { border-color: var(--primary); color: var(--primary); }
.pager .pg-num.cur { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.pager .pg-btn[disabled], .pager .pg-btn.disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }
