:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #d9e2ec;
  --text: #1f2937;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --success-bg: #ecfdf5;
  --success-text: #166534;
  --success-btn-bg: #d1fae5;
  --success-btn-hover: #a7f3d0;
  --success-btn-border: #86efac;
  --success-btn-text: #166534;
  --note-bg: #fff7f7;
  --note-text: #b91c1c;
  --error-bg: #fef2f2;
  --error-text: #991b1b;
  --warning-bg: #fffbeb;
  --warning-text: #92400e;
  --radius: 12px;
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
}

a { color: inherit; }
button, input, select, textarea { font: inherit; }

.page--center {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.main {
  width: 100%;
  padding: 24px;
}

.main--wide {
  max-width: 1500px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 22px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.topbar__logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.topbar__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  flex: 1;
  min-width: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.topbar__nav a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
}

.topbar__nav a:hover,
.topbar__brand:hover {
  color: var(--accent);
}

/* --- 导航链接激活状态 --- */
.topbar__nav a.active {
  color: var(--accent);
  font-weight: 700;
  position: relative;
}
.topbar__nav a.active::after {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}
.topbar__nav .nav-badge-link.active {
  padding-bottom: 0;
}

.topbar__user {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: 0.92rem;
  color: var(--muted);
}

/* --- 用户头像（姓氏圆圈） --- */
.user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.topbar__name,
.topbar__role {
  white-space: nowrap;
}

.topbar__logout {
  text-decoration: none;
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}

.topbar__last-login {
  font-size: 0.78rem;
  color: var(--muted);
  opacity: 0.85;
  white-space: nowrap;
}

/* --- 汉堡菜单按钮（桌面隐藏） --- */
.topbar__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}
.topbar__hamburger span {
  display: block;
  width: 22px;
  height: 2.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.topbar__hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.topbar__hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.topbar__hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  line-height: 1;
}

.badge--hidden { display: none; }

.panel,
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.panel {
  padding: 20px;
}

.card--narrow {
  width: min(100%, 420px);
  padding: 28px;
}

.card__title,
.panel__title,
.dashboard-card__title,
.employee-admin__heading {
  margin: 0;
}

.card__title { font-size: 1.55rem; }
.card__subtitle { margin: 6px 0 18px; color: var(--muted); }
.panel__meta { margin: 6px 0 18px; color: var(--note-text); font-weight: 700; }

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field--inline {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.field__label { color: var(--muted); font-size: 0.92rem; }
.field__input {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  outline: none;
}
.field__input:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.field__input--narrow { max-width: 110px; }
.field__input--compact { min-width: 0; width: 180px; }
.status-filter-form__field { align-items: center; gap: 8px; flex-wrap: nowrap; }
.status-filter-form__field .field__label { white-space: nowrap; }
.status-filter-form__field .field__input { flex: 0 0 auto; }
.nav-badge-link { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.nav-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #ef4444; color: #fff; font-size: 12px; line-height: 1; }
.nav-badge--title { margin-left: 8px; vertical-align: middle; }
.batch-qty-input-wrap { position: relative; display: flex; align-items: stretch; width: 100%; }
.batch-qty-input-wrap__input { flex: 1 1 auto; min-width: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.batch-qty-input-wrap__arrow { width: 38px; border: 1px solid var(--border); border-left: 0; border-radius: 0 10px 10px 0; background: #f8fafc; color: var(--text); cursor: pointer; }
.batch-qty-input-wrap__arrow:disabled { cursor: not-allowed; opacity: 0.5; }
.batch-qty-input-wrap__menu { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 20; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12); overflow: hidden; }
.batch-qty-input-wrap__menu-item { display: block; width: 100%; padding: 10px 12px; border: 0; background: #fff; text-align: left; cursor: pointer; }
.batch-qty-input-wrap__menu-item:hover { background: #eff6ff; }
.batch-qty-input-wrap__menu-empty { padding: 10px 12px; color: var(--muted); }

.form,
.form--compact,
.employee-form,
.employee-create-row,
.inline-search,
.employee-inline-form,
.employee-create__footer,
.pager,
.form-actions,
.cell-actions__row,
.employee-admin__toolbar,
.employee-admin__actions,
.dashboard-grid,
.price-strip {
  display: flex;
}

.form { flex-direction: column; gap: 14px; }
.form--compact { max-width: 420px; margin-top: 16px; }
.form-actions { gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.inline-search { gap: 10px; align-items: end; flex-wrap: wrap; margin-bottom: 16px; }
.employee-inline-form { gap: 8px; align-items: center; flex-wrap: wrap; }
.employee-create__footer,
.employee-admin__toolbar,
.employee-admin__actions,
.pager,
.cell-actions__row,
.approval-card__head,
.price-strip { gap: 10px; flex-wrap: wrap; }
.employee-create__footer,
.employee-admin__toolbar { justify-content: space-between; align-items: center; }
.pager { align-items: center; margin-top: 16px; }
.pager__info { color: var(--muted); font-size: 0.9rem; }
.pager__jump { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.pager__jump-label { color: var(--muted); font-size: 0.9rem; }
.pager__jump-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--accent-hover); }
.btn--primary { background: var(--accent); }
.btn--secondary { background: #eaf2ff; color: var(--accent); border-color: #c9ddff; }
.btn--secondary:hover { background: #dbeafe; border-color: #9ec5ff; }
.btn--success { background: var(--success-btn-bg); color: var(--success-btn-text); border-color: var(--success-btn-border); }
.btn--success:hover { background: var(--success-btn-hover); border-color: #6ee7b7; }
.btn--ghost { background: transparent; color: var(--muted); border-color: var(--border); }
.btn--ghost:hover { background: #98c7b7; border-color: #e2e8f0; }
/* “添加备注”按钮：橙色文字（全局） */
.batch-row__detail-line--price .btn--ghost { color: #f97316; }
.batch-row__detail-line--price .btn--ghost:hover { color: #ea580c; background: rgba(249, 115, 22, 0.1); border-color: #fdba74; }
.btn--danger { background: #8b3a3a; }
.btn--danger:hover { background: #a14a4a; }
.btn--row-action { width: 100%; }
.is-disabled { pointer-events: none; opacity: 0.55; }
.no-underline,
.no-underline:hover,
.no-underline:focus,
.no-underline:visited { text-decoration: none; }

.table-wrap {
  overflow: visible;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}
.my-requests-wrap {
  overflow: visible;
}
.my-requests-table {
  min-width: 0;
}
.data-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.92rem;
}
.data-table th,
.data-table td {
  padding: 12px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.data-table th { background: var(--surface-2); color: var(--muted); font-weight: 600; }
.data-table th:last-child,
.data-table td:last-child { width: auto; }
.data-table tr:last-child td { border-bottom: none; }
.cell-empty,
.cell-muted { color: var(--muted); }

.is-hidden { display: none !important; }
.mobile-only { display: none; }



.order-panel { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: #f8fafc; }
.order-panel__head, .order-panel__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.order-panel__head { margin-bottom: 8px; }
.order-panel__title { font-weight: 700; font-size: 0.95rem; }
.order-panel__meta { color: var(--muted); font-size: 0.8rem; margin-top: 3px; }
.order-panel__body { display: grid; gap: 10px; }
.order-panel__error { margin: 0; color: var(--error-text); background: var(--error-bg); border: 1px solid #fecaca; border-radius: 10px; padding: 8px 10px; font-size: 0.88rem; }

.order-detail-cards,
.my-requests-cards { display: grid; gap: 12px; }

.order-detail-card,
.my-request-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
  padding: 14px;
}

.order-detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 12px 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

body.is-sending .order-detail-toolbar {
  background: #eff6ff;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.order-detail-toolbar__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.order-detail-toolbar__sending {
  color: var(--accent);
  font-weight: 700;
}

.order-detail-toolbar__chip {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
  border-radius: 10px;
  font-size: 0.86rem;
}

.order-detail-toolbar__chip strong { font-size: 0.88rem; }
.order-detail-toolbar__chip em { font-style: normal; color: #475569; }

.btn.is-loading {
  position: relative;
  padding-right: 2.2em;
}
.btn.is-loading::after {
  content: '';
  position: absolute;
  right: 0.8em;
  top: 50%;
  width: 0.85em;
  height: 0.85em;
  margin-top: -0.425em;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: btn-spin 0.75s linear infinite;
}
@keyframes btn-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
body.order-send-flash .order-detail-toolbar {
  animation: order-flash 1.2s ease-out;
}
@keyframes order-flash {
  0% { box-shadow: 0 0 0 0 rgba(59,130,246,0.18); }
  50% { box-shadow: 0 0 0 8px rgba(59,130,246,0.08); }
  100% { box-shadow: 0 0 0 0 rgba(59,130,246,0); }
}

.order-detail-card__head,
.my-request-card__head,
.order-detail-card__foot,
.my-request-card__foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.order-detail-card__title,
.my-request-card__title { font-weight: 700; font-size: 1rem; }
.order-detail-card__sub,
.my-request-card__sub { color: var(--muted); font-size: 0.9rem; margin-top: 2px; }
.order-detail-card__grid,
.my-request-card__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.order-detail-card__body-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.9fr);
  gap: 12px;
  align-items: start;
  margin-top: 12px;
}
.order-detail-card__section,
.my-request-card__section { margin-top: 0; }
.order-detail-card__section--remark,
.order-detail-card__section--images { min-width: 0; }

.cell-label { display: block; color: var(--muted); font-size: 0.82rem; margin-bottom: 2px; }

.tag,
.banner {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 600;
}
.tag { padding: 3px 10px; font-size: 0.78rem; }
.tag--pending { background: var(--warning-bg); color: var(--warning-text); }
.tag--success { background: var(--success-bg); color: var(--success-text); }
.tag--bad { background: var(--error-bg); color: var(--error-text); }
.tag--muted { background: #eef2f7; color: #526072; }
.tag--special { background: #fef3c7; color: #92400e; }
.tag--normal { background: #e0e7ff; color: #3730a3; }
.banner {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
}
.banner--success { background: var(--success-bg); color: var(--success-text); border-color: #bbf7d0; }
.banner--error { background: var(--error-bg); color: var(--error-text); border-color: #fecaca; }
.banner--warning { background: var(--warning-bg); color: var(--warning-text); border-color: #fde68a; }
.flash-list { margin-bottom: 16px; display: grid; gap: 10px; }
.status-filter-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 16px; }

.demo-hint {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
}
.demo-hint__title { margin: 0 0 8px; font-weight: 600; }
.demo-hint__list { margin: 0; padding-left: 20px; color: var(--muted); }



.price-strip {
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 12px 14px;
  margin: 12px 0 8px;
  background: var(--surface-2);
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--muted);
}

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 18px;
  border-radius: 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: var(--text);
  font-size: 0.95rem;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 2000;
}
.toast.toast--visible { opacity: 1; transform: translateX(-50%) translateY(0); }

.employee-admin {
  max-width: 1080px;
  margin: 0 auto;
}
.employee-admin__section + .employee-admin__section { margin-top: 22px; }
.employee-admin__heading { font-size: 1.08rem; }
.employee-admin__toolbar { align-items: center; justify-content: space-between; }
.employee-admin__actions { align-items: center; }
.employee-create-rows { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.employee-create-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.employee-reset-form { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.employee-reset-form--hidden { display: none; }
.employee-reset-form .field__input { max-width: 160px; }
.employee-create__footer { margin-top: 14px; align-items: center; }

.dashboard-panel { max-width: 980px; margin: 0 auto; }
.dashboard-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
}
.dashboard-card { border: 1px solid var(--border); border-radius: 10px; padding: 14px; background: #fff; }
.dashboard-card__title { margin-bottom: 10px; font-size: 1.02rem; }

.employee-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
}
.employee-form .btn { margin-top: 0; }

.cell-actions__row form { margin: 0; }
.cell-actions .btn { margin-top: 0; }

.approval-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.approval-row { border: 1px solid var(--border); border-radius: 12px; background: #fff; overflow: hidden; }
.approval-row__summary { display: flex; align-items: center; gap: 12px; padding: 12px 14px; flex-wrap: wrap; }
.approval-row__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.approval-row__meta { display: flex; flex-wrap: wrap; gap: 10px 14px; color: var(--muted); font-size: 0.88rem; }
.approval-row__id { font-weight: 700; color: var(--text); }
.approval-row__title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.approval-row__title { font-weight: 700; font-size: 1rem; line-height: 1.3; }
.approval-row__brief { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: 0.88rem; }
.stock-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.stock-badge--ok {
  background: linear-gradient(135deg, #eaf7f0 0%, #f1fbfb 100%);
  color: #0f766e;
  border-color: #b9e6db;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.08);
}
.stock-badge--empty {
  background: linear-gradient(135deg, #fff7ed 0%, #fffaf3 100%);
  color: #b45309;
  border-color: #fde3b0;
  box-shadow: 0 4px 12px rgba(180, 83, 9, 0.08);
}
.stock-badge__warehouses {
  display: inline;
  margin-left: 8px;
  color: inherit;
  font-weight: 600;
  font-size: 0.82rem;
}
.stock-badge__warehouse {
  white-space: nowrap;
}
.stock-badge__sep {
  opacity: 0.7;
}
.stock-badge__warehouse--empty {
  opacity: 0.85;
}

.approval-row__actions { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.approval-row__toggle,
.approval-row__approve-form,
.approval-row__reject,
.approval-row__single-check { align-self: flex-end; }
.approval-row__single-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  align-self: center;
}
.approval-row__single-check input {
  margin: 0;
  align-self: center;
}
.approval-row__reject { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.approval-row__reject-field { flex-direction: row; align-items: center; gap: 6px; }
.approval-row__reject-field .field__label {
  margin-bottom: 0;
  line-height: 1.1;
  align-self: center;
}
.approval-row__reject-valid-field { align-items: flex-start; flex-direction: column; gap: 0; margin-top: 0; }
.approval-row__reject-valid-label {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1;
  margin-bottom: 2px;
  white-space: normal;
  max-width: 100%;
  word-break: break-word;
}
.approval-row__reject-valid-select {
  min-width: 120px;
}
.approval-row__reject-valid-field .field__input {
  color: var(--text);
}
.approval-row__detail { border-top: 1px solid var(--border); padding: 10px 14px 12px; background: #fafcff; }
.approval-row__detail.is-collapsed { display: none; }
.approval-row__detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px 14px; }
.approval-row__detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px 14px; }
.approval-row__detail-grid--original { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.approval-row__item--remark,
.approval-row__item--attachment,
.approval-row__item--source { grid-column: auto; }
.approval-row__item--attachment .attachment-thumb-list--inline { display: flex; flex-wrap: wrap; gap: 10px; }
.my-requests-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
.my-requests-toolbar .field { margin-bottom: 0; }
.my-requests-toolbar .btn,
.my-requests-toolbar .my-requests-actions__count { align-self: center; }
.my-requests-actions__count { color: var(--muted); font-size: 0.95rem; }
.status-filter-form { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
.status-filter-form .field { margin-bottom: 0; }
.status-filter-form .btn { align-self: center; }
.status-filter-form__field { min-width: 0; }
.status-filter-form__field .field__input--compact { min-width: 210px; }
.approval-section {
  margin: 12px 0 14px;
  padding: 12px 12px 10px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: #f8fafc;
}
.approval-section--cost { background: linear-gradient(180deg, #eef6ff 0%, #f8fbff 100%); border-color: #dbeafe; }
.approval-section--lowprice { background: linear-gradient(180deg, #f0fdfa 0%, #f8fffd 100%); border-color: #bbf7d0; }
.approval-section--year { background: linear-gradient(180deg, #fff7ed 0%, #fffdf8 100%); border-color: #fed7aa; }
.approval-section--ref { background: linear-gradient(180deg, #f5f3ff 0%, #fbfaff 100%); border-color: #ddd6fe; }
.approval-section__title { margin: 0 0 10px; font-size: 0.95rem; font-weight: 700; color: var(--text); }
.approval-row__item { display: flex; flex-direction: column; gap: 2px; }
.approval-row__label { font-size: 0.90rem; color: var(--muted); }
.approval-row__label strong { color: var(--text); font-weight: 800; }
.approval-row__label--spaced { margin-left: 10px; }
.approval-row__value { font-weight: 600; }
.approval-row__value--wrap { word-break: break-word; overflow-wrap: anywhere; }
.approval-row__item--emphasis {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
}
.approval-row__item--soft-blue { background: #eff6ff; border-color: #bfdbfe; }
.approval-row__item--soft-amber { background: #fffbeb; border-color: #fde68a; }
.approval-row__item--soft-mint { background: #ecfdf5; border-color: #bbf7d0; }
.approval-row__item--inline-full { grid-column: 1 / -1; }
.approval-row__inline-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.attachment-thumb-list--inline { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.approval-row__inline-row .approval-row__label,
.approval-row__inline-row .approval-row__value,
.approval-row__inline-row .cell-muted,
.approval-row__inline-row .attachment-thumb-list--inline { display: inline-flex; align-items: center; }
.approval-row__toggle { min-width: 92px; }
.approval-row--fresh { position: relative; overflow: hidden; background: #ecfdf5; border-left: 6px solid #22c55e; box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.12); }
.approval-row--fresh::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(34, 197, 94, 0.16), rgba(34, 197, 94, 0.06) 35%, rgba(34, 197, 94, 0)); opacity: 1; animation: approvalFreshFade 4s ease-out forwards; }
@keyframes approvalFreshFade { 0% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }
.approval-row__new-badge { position: absolute; top: 10px; right: 10px; z-index: 3; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 24px; padding: 0 10px; border-radius: 999px; background: #22c55e; color: #fff; font-size: 12px; font-weight: 800; letter-spacing: 0.04em; box-shadow: 0 4px 12px rgba(34, 197, 94, 0.28); }
.approval-row.has-new .approval-row__new-badge { display: inline-flex; }
.approval-row:not(.has-new) .approval-row__new-badge { display: none; }

.batch-quote-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
  overflow: visible;
}

.batch-quote-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
}

.batch-quote-footer__left,
.batch-quote-footer__right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.batch-row {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  overflow: visible;
  position: relative;
}

.batch-row__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: #fafcff;
}

.batch-row__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 1;
  min-width: 0;
}


.batch-row__status-dot,
.batch-row__hint-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #cbd5e1;
  flex: 0 0 auto;
}

.batch-row__status-dot--green,
.batch-row__hint-dot--green { background: #22c55e; }
.batch-row__status-dot--red,
.batch-row__hint-dot--red { background: #ef4444; }
.batch-row__status-dot--gray,
.batch-row__hint-dot--gray { background: #94a3b8; }

.batch-row__body {
  padding: 14px;
}

.batch-row__mainline {
  display: grid;
  grid-template-columns: minmax(220px, 1.8fr) minmax(220px, 1.8fr) minmax(120px, 120px) minmax(140px, 140px) minmax(140px, 220px) minmax(160px, 250px) auto;
  gap: 12px;
  align-items: end;
}

.batch-field--small,
.batch-choice {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.batch-choice {
  align-self: stretch;
}

.batch-choice > label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  white-space: nowrap;
}

.batch-field--small .field__input,
.batch-autocomplete .field__input,
.batch-choice .field__input {
  width: 100%;
  box-sizing: border-box;
}

.batch-choice .field__label,
.batch-field--small .field__label {
  min-height: 20px;
}

.batch-autocomplete {
  position: relative;
  min-width: 0;
}

.batch-autocomplete--wide {
  min-width: 0;
}

.batch-autocomplete__panel {
  position: absolute;
  left: 0;
  top: calc(100% + 4px);
  z-index: 2147483647;
  width: 100%;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
  padding: 6px 0;
}

.batch-autocomplete__item {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.batch-autocomplete__item:hover {
  background: #eff6ff;
}

.batch-autocomplete__empty {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.batch-row__section {
  display: grid;
  grid-template-columns: minmax(150px, 0.72fr) minmax(150px, 0.72fr);
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--border);
}

.batch-row__section--all {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

.batch-row__section--all .field,
.batch-row__section--all .batch-choice {
  min-width: 0;
  flex: 1 1 150px;
}

.batch-row__section--all .batch-autocomplete {
  flex: 1.35 1 230px;
}

.batch-row__section--all .batch-field--small {
  flex: 1 1 140px;
}

.batch-row__section--all .batch-choice {
  flex: 1 1 160px;
}

.batch-row__section--all .batch-choice > label {
  white-space: normal;
  line-height: 1.35;
}

.batch-row__section--all .field__input,
.batch-row__section--all select,
.batch-row__section--all input[type="text"],
.batch-row__section--all input[type="number"] {
  min-width: 0;
}

.batch-row__section--all .field__label {
  white-space: nowrap;
}

.batch-row__head-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.batch-row__title {
  font-weight: 700;
  font-size: 1rem;
}

.batch-row__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.batch-row__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px 14px;
  flex-wrap: wrap;
}

.batch-row__detail {
  border-top: 1px solid var(--border);
  padding: 12px 14px 14px;
  background: #fafcff;
}

.batch-row__detail.is-hidden { display: none; }

.batch-row__detail-line {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.batch-row__detail-line--meta {
  gap: 10px 16px;
}

.batch-row__detail-line--price {
  margin-top: 12px;
}

.batch-row__detail-label {
  color: var(--muted);
  font-size: 0.92rem;
}

.batch-row__detail-value {
  font-weight: 600;
  color: var(--text);
}

/* 上次成交价样式 */
.batch-row__detail-label--deal {
  color: var(--muted);
  font-size: 0.92rem;
}
[data-batch-last-deal] {
  font-weight: 600;
  color: #b45309;
}

/* 库存信息样式 */
.batch-row__detail-line--inventory {
  margin-top: 4px;
}
[data-batch-inventory] {
  font-weight: 600;
  font-size: 0.92rem;
  color: #2563eb;
}
[data-batch-last-qty] {
  font-weight: 600;
  color: #b45309;
}
[data-batch-last-date] {
  font-weight: 600;
  color: #b45309;
}

.batch-row__price-flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
}

.batch-row__remark {
  margin-top: 12px;
}

.batch-row__remark.is-hidden { display: none; }

.attachment-thumb-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.attachment-thumb,
.attachment-preview-item {
  display: block;
  width: 108px;
  border: 1px solid #dbe4ee;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}
.attachment-preview-item--button {
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.attachment-thumb {
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.attachment-thumb:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
}

.attachment-thumb__img,
.attachment-preview-item__img {
  display: block;
  width: 100%;
  height: 108px;
  object-fit: cover;
  background: #eef2f7;
}

.attachment-preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.attachment-preview-item__meta {
  padding: 6px 8px;
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-modal__img {
  display: block;
  width: 100%;
  max-width: min(92vw, 1200px);
  max-height: 84vh;
  object-fit: contain;
}

.attachment-thumb-list:empty::after,
.attachment-preview-list:empty::after {
  content: '—';
  color: var(--muted);
}

.preview-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.72);
}

.preview-modal.is-hidden { display: none; }

.preview-modal__panel {
  position: relative;
  max-width: min(92vw, 1200px);
  max-height: 92vh;
  background: #0f172a;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.preview-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.preview-modal__close:hover { background: rgba(255, 255, 255, 0.24); }

.preview-modal__img {
  display: block;
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
}

.order-panel__attachments,
.reapply-panel__attachments {
  margin-top: 10px;
  padding: 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
}

.attachment-preview-list,
.attachment-thumb-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.attachment-preview-item,
.attachment-thumb {
  display: block;
  width: 96px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #dbe4ee;
  background: #fff;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
}

.attachment-preview-item {
  position: relative;
}

.attachment-preview-item__remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.attachment-preview-item__remove:hover {
  background: rgba(220, 38, 38, 0.9);
}

.attachment-preview-item__img,
.attachment-thumb__img {
  display: block;
  width: 100%;
  height: 96px;
  object-fit: cover;
  background: #eef2f7;
}

.attachment-preview-item__meta {
  padding: 6px 8px;
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.approval-row__item--full {
  grid-column: 1 / -1;
}

.attachment-thumb {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.attachment-thumb:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}

@media (max-width: 820px) {
  .topbar {
    flex-wrap: wrap;
    padding: 12px 14px;
    gap: 10px;
  }

  .topbar__hamburger {
    display: flex;
  }

  .topbar__brand {
    flex: 1 1 auto;
    font-size: 0.95rem;
  }

  .topbar__logo {
    width: 28px;
    height: 28px;
  }

  .topbar__nav {
    flex: 1 1 100%;
    gap: 10px 12px;
    display: none;
  }
  .topbar__nav--open {
    display: flex;
    flex-wrap: wrap;
  }

  .topbar__user {
    flex: 1 1 100%;
    justify-content: flex-start;
  }

  /* 移动端导航链接激活状态适配 */
  .topbar__nav a.active::after {
    bottom: -10px;
  }

  .main {
    padding: 12px;
  }
  /* 手机端：行卡片内部左右内边距收紧（头/主体/底部/详情），左右显示更多 */
  .row-card .row-header,
  .row-card .row-body,
  .row-card .row-footer,
  .batch-row__detail {
    padding-left: 10px;
    padding-right: 10px;
  }

  .panel,
  .card--narrow {
    width: 100%;
    padding: 16px;
  }

  .field--inline {
    flex-direction: column;
    align-items: stretch;
  }

  .field__input--narrow {
    max-width: none;
    width: 100%;
  }

  .pager {
    align-items: flex-start;
  }

  .pager__jump {
    margin-left: 0;
    width: 100%;
    flex-wrap: wrap;
  }

  .employee-admin__toolbar,
  .employee-create__footer {
    align-items: stretch;
  }

  .employee-admin__actions {
    width: 100%;
  }

  .employee-admin__actions .btn,
  .employee-create__footer .btn,
  .approval-row__actions .btn,
  .approval-row__reject .btn {
    width: 100%;
  }

  .approval-row__detail-grid--original {
    grid-template-columns: 1fr;
  }

  .approval-row__summary {
    padding: 12px;
  }

  .approval-row__actions,
  .approval-row__reject {
    width: 100%;
  }

  .approval-row__reject-field {
    width: 100%;
  }

  .approval-row__reject-field .field__input {
    width: 100%;
  }

  /* ===== 移动端分组卡片表头优化（换行 + 宽松上下间距） ===== */
  .approval-group-card__header {
    padding: 10px 8px;
    gap: 6px;
    flex-wrap: wrap;
  }
  .approval-group-card__header-left {
    gap: 4px;
    flex-wrap: wrap;
    flex: 1 1 auto;
    min-width: 0;
  }
  .approval-group-card__customer {
    font-size: 0.88rem;
    white-space: normal;
    word-break: break-all;
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    flex-shrink: 1;
  }
  .approval-group-card__count {
    font-size: 0.7rem;
    padding: 2px 8px;
    flex-shrink: 0;
  }
  .approval-group-card__gross-rate {
    font-size: 0.7rem;
    padding: 2px 8px;
    flex-shrink: 0;
    white-space: normal;
    word-break: break-all;
  }
  .approval-group-card__gross-rate--warn {
    max-width: none;
    overflow: visible;
    text-overflow: clip;
  }
  .approval-group-card__header-right {
    display: flex;
    flex: 1 1 100%;
    min-width: 0;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-start;
    padding-top: 4px;
  }
  .approval-group-card__header-right .btn-commit-order,
  .approval-group-card__header-right .btn-escalate--group {
    font-size: 0.7rem;
    padding: 3px 8px;
    white-space: nowrap;
  }
  .approval-group-card__header-right .approval-row__time {
    font-size: 0.72rem;
  }
  .approval-group-card__header-right .group-chevron {
    flex-shrink: 0;
  }

  /* ===== 移动端单个审批卡片头部优化 ===== */
  .approval-row__card-header {
    padding: 10px 12px;
    gap: 8px;
  }
  .approval-row__card-left {
    gap: 8px;
  }
  .approval-row__card-right {
    gap: 6px;
  }
  .approval-row__app-id {
    font-size: 12px;
  }
  .approval-row__sales-person {
    font-size: 0.82rem;
  }
  .approval-row__time {
    font-size: 0.72rem;
  }
}

@media (max-width: 520px) {
  .topbar__nav {
    gap: 8px;
    font-size: 0.95rem;
  }

  .topbar__brand {
    font-size: 0.9rem;
  }

  .topbar__logo {
    width: 24px;
    height: 24px;
  }

  .user-avatar {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .topbar__name,
  .topbar__role {
    font-size: 0.88rem;
  }
  .topbar__nav {
    gap: 8px;
    font-size: 0.95rem;
  }

  .topbar__user {
    font-size: 0.9rem;
  }

  .main {
    padding: 8px;
  }

  .panel,
  .card--narrow {
    padding: 14px;
  }

  .panel__title,
  .card__title {
    font-size: 1.25rem;
  }

  .card__subtitle,
  .panel__meta {
    font-size: 0.95rem;
  }

  .mobile-only { display: block; margin: 10px 0 12px; }

  /* --- 表格转卡片（限带 data-label 的表格） --- */
  .table-wrap {
    overflow: visible;
    border: none;
    border-radius: 0;
    background: transparent;
  }
  .data-table,
  .my-requests-table {
    min-width: 0;
    display: block;
  }
  .data-table thead {
    display: none;
  }
  .data-table tbody,
  .data-table tr {
    display: block;
  }
  .data-table tr {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 10px;
    padding: 10px 12px;
  }
  .data-table td {
    display: flex;
    padding: 6px 0;
    border-bottom: none;
    font-size: 0.95rem;
    align-items: center;
    gap: 8px;
  }
  .data-table td:not(:last-child) {
    border-bottom: 1px solid #f3f4f6;
  }
  .data-table td::before {
    content: attr(data-label);
    flex-shrink: 0;
    min-width: 80px;
    font-weight: 600;
    color: var(--muted);
    font-size: 0.82rem;
  }
  .data-table td[data-label="操作"]::before {
    display: none;
  }
  .data-table td[data-label="操作"] {
    justify-content: flex-end;
    border-bottom: none !important;
    padding-top: 8px;
  }
  .data-table .cell-empty {
    display: block;
    text-align: center;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
  }

  /* --- GM 审批页筛选区 --- */
  .gm-filter-bar {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    align-items: stretch;
  }
  .gm-filter-group {
    width: auto;
    flex: 1 1 calc(50% - 8px);
    min-width: 120px;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .gm-filter-group.batch-autocomplete--wide {
    flex: 1 1 100%;
    min-width: 0;
  }
  .gm-filter-group .field__input {
    width: 100%;
  }
  .gm-filter-actions {
    margin-left: 0;
    width: 100%;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
  }
  .gm-filter-actions .gm-btn-primary,
  .gm-filter-actions .gm-btn-ghost {
    flex: none;
  }

  /* --- GM 信息提示条 --- */
  .gm-info-bar {
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px;
  }

  /* --- GM 页面标题 --- */
  .gm-page-header h2 {
    font-size: 1.2rem;
  }

  /* --- 分页条（所有 gm-pager-bar） --- */
  .gm-pager-bar,
  .pager {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }
  .gm-pager-bar .gm-jump-group {
    width: auto;
  }
  .gm-page-info {
    font-size: 0.85rem;
  }

  /* --- 管理员页面筛选区 --- */
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-bar .filter-group {
    width: 100%;
  }
  .filter-bar .filter-group .field__input {
    width: 100%;
  }
  .filter-bar .filter-actions {
    margin-left: 0;
  }

  /* --- 管理员页面标题操作栏 --- */
  .page-header .title-group h2 {
    font-size: 1.2rem;
  }

  /* --- 登录页 --- */
  .page--center {
    padding: 16px;
  }
  .card--narrow {
    max-width: 100%;
  }
  .demo-hint {
    font-size: 0.88rem;
  }

  .order-panel__meta,
  .order-panel__body,
  .price-strip,
  .field--inline,
  .inline-search,
  .pager,
  .pager__jump-inline {
    width: 100%;
  }

  .order-panel__head,
  .order-panel__foot,
  .price-strip { align-items: stretch; }
  .order-panel__price-field { width: 100%; }

  .btn,
  .employee-admin__actions .btn,
  .employee-create__footer .btn,
  .approval-row__actions .btn,
  .approval-row__reject .btn {
    width: 100%;
  }

  .batch-quote-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .batch-quote-footer__left,
  .batch-quote-footer__right {
    width: 100%;
  }

  .batch-row__section,
  .batch-row__section--all {
    display: grid;
    grid-template-columns: 1fr;
  }

  .batch-row__section--all .field,
  .batch-row__section--all .batch-choice {
    flex: 1 1 100%;
  }

  .batch-row__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .batch-row__head-left,
  .batch-row__actions,
  .batch-row__price-field,
  .batch-row__price-field .field__input,
  .batch-row__section .field,
  .batch-row__section .batch-choice,
  .batch-row__section .field__input,
  .batch-row__section .batch-choice > label {
    width: 100%;
  }

  /* 手机端：输入价格标签与输入框同一行，输入框不占满整行 */
  .batch-row__price-field {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    width: auto;
  }
  .batch-row__price-field .field__label {
    white-space: nowrap;
    font-size: 12px;
  }
  .batch-row__price-field .field__input {
    width: 100%;
    max-width: 100px;
    font-size: 12px;
    padding: 6px 10px;
  }
  .batch-row__price-flag {
    font-size: 12px;
  }

  .batch-row__actions .btn {
    width: 100%;
  }

  .batch-row__detail-line--inventory {
    flex-direction: column;
    align-items: flex-start;
  }

  /* 手机端：输入价格行横排换行，“请先输入价格”提示语与输入框同行 */
  .batch-row__detail-line--price {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
  }

  /* 手机端：库存信息、添加备注字体与客户/型号一致（11px 深灰） */
  .batch-row__detail-line--inventory .batch-row__detail-label {
    font-size: 11px;
    white-space: nowrap;
  }
  .batch-row__detail-line--inventory [data-batch-inventory] {
    font-size: 11px;
    font-weight: 600;
    color: #2563eb;
  }
  .batch-row__detail-line--price .btn--ghost {
    font-size: 11px;
  }

  /* 手机端：备注、图片附件区域字体与“客户”(11px)一致 */
  .batch-row__remark .field__label,
  .batch-row__remark .order-panel__attachments .field__label,
  .batch-row__remark textarea.field__input,
  .batch-row__remark input[type="file"].field__input,
  .batch-row__remark .attachment-preview-item__meta,
  .batch-row__remark .attachment-preview-item__remove {
    font-size: 11px;
  }

  /* 手机端：详情“客户/型号”紧凑横排，尽量同行显示 */
  .batch-row__detail-line--meta {
    flex-direction: row;
    align-items: center;
    gap: 4px 8px;
    font-size: 11px;
    line-height: 1.5;
  }
  .batch-row__detail-line--meta .batch-row__detail-label,
  .batch-row__detail-line--meta .batch-row__detail-value {
    font-size: 11px;
    white-space: nowrap;
  }
  /* 手机端：系统报价/来源/上次成交信息同样缩小为 11px */
  .batch-row__detail-line--quote .batch-row__detail-label,
  .batch-row__detail-line--quote .batch-row__detail-label--deal,
  .batch-row__detail-line--quote [data-batch-suggestion],
  .batch-row__detail-line--quote [data-batch-last-deal],
  .batch-row__detail-line--quote [data-batch-last-qty],
  .batch-row__detail-line--quote [data-batch-last-date] {
    font-size: 11px;
    white-space: nowrap;
  }
  /* 来源文本较长时允许换行，不超出容器 */
  .batch-row__detail-line--quote .batch-row__detail-source {
    font-size: 11px;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .batch-row__detail-line--quote [data-batch-source] {
    overflow-wrap: anywhere;
  }

  /* 手机端：上次成交价与系统报价同行显示 */
  .batch-row__detail-line--quote {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
  }

  /* 手机端：上次成交信息三字段水平并列 */
  .batch-deal-group {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
  }

  .order-detail-toolbar,
  .order-detail-toolbar__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .order-detail-toolbar__actions .btn,
  .order-detail-toolbar .btn {
    width: 100%;
  }

  .order-detail-card__grid,
  .my-request-card__grid {
    grid-template-columns: 1fr;
  }
  .order-detail-card__body-split {
    grid-template-columns: 1fr;
  }

  .order-detail-card__head,
  .my-request-card__head,
  .order-detail-card__foot,
  .my-request-card__foot {
    flex-direction: column;
    align-items: flex-start;
  }

  .order-detail-card .btn,
  .my-request-card .btn {
    width: 100%;
  }

  .batch-autocomplete__panel {
    position: static;
    width: 100%;
    max-height: 200px;
    margin-top: 6px;
  }

  /* --- 同步日志页适配 --- */
  .sync-grid {
    grid-template-columns: 1fr;
  }
  .sync-card {
    padding: 16px;
  }

  /* --- 员工密码管理内联表单 --- */
  .employee-inline-form {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .employee-inline-form .field__input {
    width: 100%;
  }

  /* --- 工作台适配 --- */
  .dashboard-wrap .welcome-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
  }
  .dashboard-wrap .welcome-extra {
    align-self: flex-start;
  }
  .dashboard-wrap .card {
    padding: 16px;
  }
  .dashboard-wrap .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .dashboard-wrap .email-display {
    flex-wrap: wrap;
  }
  .dashboard-wrap .email-display .btn-text {
    margin-left: auto;
  }
}

/* ===== 待审批页面 GM 卡片重设计 ===== */

/* --- 信息提示条 --- */
.gm-info-bar {
  display: flex;
  gap: 24px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 12px 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.gm-info-bar .gm-info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #374151;
  line-height: 1.5;
}
.gm-info-bar .gm-info-item .gm-info-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}
.gm-info-bar .gm-info-item .gm-info-highlight {
  background: #fef2f2;
  color: #ef4444;
  padding: 0 8px;
  border-radius: 4px;
  font-weight: 600;
}

/* --- 页面标题 --- */
.gm-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.gm-page-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}
.gm-page-header h2 .gm-total-count {
  font-size: 14px;
  font-weight: 400;
  color: #9ca3af;
}

/* --- 筛选区 --- */
.gm-filter-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.gm-filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.gm-filter-group label {
  font-size: 13px;
  color: #6b7280;
  white-space: nowrap;
  font-weight: 500;
}
.gm-filter-group select,
.gm-filter-group input {
  padding: 7px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  color: #374151;
  background: #fff;
  outline: none;
  transition: all 0.2s;
}
.gm-filter-group select:focus,
.gm-filter-group input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.gm-filter-group .gm-date-combo {
  display: flex;
  align-items: center;
  gap: 4px;
}
.gm-filter-group .gm-date-combo select { min-width: 55px; }
.gm-filter-group .gm-date-combo input[type="date"] { min-width: 140px; }
.gm-filter-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

/* --- 按钮 (仅 GM 页面) --- */
.gm-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 18px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  background: #2563eb;
  color: #fff;
  transition: all 0.15s;
}
.gm-btn-primary:hover { background: #1d4ed8; }
.gm-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 18px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  background: transparent;
  color: #6b7280;
  transition: all 0.15s;
  text-decoration: none;
}
.gm-btn-ghost:hover { background: #f3f4f6; color: #374151; }
.gm-btn-sm { padding: 5px 12px; font-size: 12px; }
.gm-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 18px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  background: #fff;
  color: #374151;
  transition: all 0.15s;
  text-decoration: none;
}
.gm-btn-outline:hover { background: #f9fafb; border-color: #9ca3af; }

/* --- 审批卡片 --- */
.approval-row--card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  transition: all 0.2s;
  margin-bottom: 16px;
}
.approval-row--card:hover {
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  border-color: #d1d5db;
}

/* --- 审批分组卡片 --- */
.approval-group-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
  overflow: hidden;
  margin-bottom: 20px;
}
.approval-group-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #f3f4f6;
  border-bottom: 1px solid #e5e7eb;
}
.approval-group-card__header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.approval-group-card__customer-icon {
  font-size: 1.1rem;
}
.approval-group-card__customer {
  font-weight: 700;
  font-size: 1rem;
  color: #1f2937;
}
.approval-group-card__count {
  font-size: 0.82rem;
  color: #6b7280;
  background: #e5e7eb;
  padding: 2px 10px;
  border-radius: 10px;
}
.approval-group-card__gross-rate {
  font-size: 0.82rem;
  font-weight: 600;
  color: #059669;
  background: #d1fae5;
  padding: 2px 10px;
  border-radius: 10px;
  white-space: nowrap;
}
.approval-group-card__gross-rate--warn {
  color: #d97706;
  background: #fef3c7;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.approval-group-card__items > .approval-row--card {
  border: none;
  border-radius: 0;
  box-shadow: none;
  margin-bottom: 0;
}
.btn-escalate--group {
  font-size: 0.72rem;
  padding: 2px 8px;
  background: #fbbf24;
  color: #92400e;
  border: 1px solid #f59e0b;
  border-radius: 4px;
  cursor: pointer;
  line-height: 1.4;
  transition: background 0.15s;
}
.btn-escalate--group:hover {
  background: #f59e0b;
}
.approval-group-card__items > .approval-row--card:hover {
  box-shadow: none;
  border-color: transparent;
}
.approval-group-card__items > .approval-row--card + .approval-row--card {
  border-top: 1px solid #e5e7eb;
}

/* 分组卡片收起状态 */
.approval-group-card.is-collapsed .approval-group-card__items {
  display: none;
}
.approval-group-card.is-collapsed .group-chevron {
  transform: rotate(-90deg);
}
.group-chevron {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.approval-group-card__header {
  cursor: pointer;
  user-select: none;
}
.approval-group-card__header:hover {
  background: #e5e7eb;
}

/* --- 卡片头部 --- */
.approval-row__card-header {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  gap: 16px;
  flex-wrap: wrap;
}
.approval-row__card-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  flex: 1;
}
.approval-row__card-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.approval-row__time {
  font-size: 0.8rem;
  color: #6b7280;
  white-space: nowrap;
}

.approval-row__app-id {
  font-size: 13px;
  font-weight: 700;
  color: #1f2937;
}
.approval-row__app-id .hash {
  color: #9ca3af;
  font-weight: 400;
}

.approval-row__sales-person {
  font-size: 12px;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 4px;
}
.approval-row__sales-person .person-icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #eff6ff;
  color: #2563eb;
  font-size: 10px;
  font-weight: 700;
  align-items: center;
  justify-content: center;
}

/* --- 库存药丸标签 --- */
.stock-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: linear-gradient(135deg, #ecfdf5, #f0fdfa);
  color: #065f46;
  border: 1px solid #a7f3d0;
  cursor: default;
  position: relative;
}
.stock-chip--empty {
  background: linear-gradient(135deg, #fff7ed, #fffaf3);
  color: #b45309;
  border-color: #fde3b0;
}
.stock-chip .stock-chip__num {
  font-size: 14px;
  font-weight: 800;
}
.stock-chip .stock-chip__detail {
  font-weight: 400;
  color: #047857;
  font-size: 11px;
  display: none;
}
.stock-chip--empty .stock-chip__detail { color: #92400e; }
.stock-chip:hover .stock-chip__detail {
  display: inline;
}
.stock-chip .stock-chip__detail span + span::before {
  content: "·";
  margin: 0 4px;
  color: #6ee7b7;
}

/* --- 状态徽章 --- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.status-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.status-badge--warning {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}
.status-badge--warning .dot { background: #f59e0b; }

/* --- 卡片主体 --- */
.approval-row__body {
  padding: 20px;
}

/* --- 关键指标行 --- */
.approval-row__metrics {
  display: grid;
  grid-template-columns: 2fr 1fr 0.6fr 1fr 1fr 1.2fr;
  gap: 16px;
  padding: 16px 18px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 16px;
}
.approval-row__metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.approval-row__metric .metric-label {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.approval-row__metric .metric-value {
  font-size: 14px;
  color: #1f2937;
  font-weight: 600;
  word-break: break-word;
}
.approval-row__metric .metric-value.product-name {
  font-size: 15px;
  font-weight: 700;
}
.app-card__metric .metric-value.product-name {
  font-size: 15px;
  font-weight: 700;
}
.approval-row__metric .metric-value.price-applied {
  font-size: 18px;
  font-weight: 700;
  color: #ef4444;
}
.app-card__metric .metric-value.price-applied {
  font-size: 18px;
  font-weight: 700;
  color: #ef4444;
}
.approval-row__metric .metric-value.metric-sys-price {
  font-size: 18px;
  font-weight: 700;
  color: #10b981;
}
.app-card__metric .metric-value.metric-sys-price {
  font-size: 18px;
  font-weight: 700;
  color: #10b981;
}
.approval-row__metric .metric-value.margin-rate {
  font-size: 16px;
  color: #b45309;
}
.app-card__metric .metric-value.margin-rate {
  font-size: 16px;
  color: #b45309;
}
.approval-row__metric .metric-sub {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 400;
}
.approval-row__metric .metric-sub del {
  text-decoration: line-through;
}

/* --- 审批操作栏 --- */
.approval-row__decision {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  flex-wrap: wrap;
}
.approval-row__decision .decision-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}
.approval-row__decision .decision-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #4b5563;
  margin: 0;
}
.approval-row__decision .decision-check input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #2563eb;
}
.approval-row__decision .decision-fields {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}
.approval-row__decision .decision-field {
  display: flex;
  align-items: center;
  gap: 6px;
}
.approval-row__decision .decision-field label {
  font-size: 12px;
  color: #9ca3af;
  white-space: nowrap;
}
.approval-row__decision .decision-field input,
.approval-row__decision .decision-field select {
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 12px;
  color: #374151;
  background: #fff;
  outline: none;
}
.approval-row__decision .decision-field input:focus,
.approval-row__decision .decision-field select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.approval-row__decision .decision-field input { width: 90px; }
.approval-row__decision .decision-field select { width: 110px; }

/* 驳回价格毛利率显示 */
.reject-gross-rate {
  display: inline-block;
  margin-left: 8px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  box-shadow: 0 1px 3px rgba(251, 191, 36, 0.2);
}

.approval-row__decision .decision-btns {
  display: flex;
  gap: 8px;
  align-items: center;
}

.approval-row__decision .decision-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-approve {
  background: #10b981;
  color: #fff;
  padding: 8px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.btn-approve:hover { background: #059669; }

.btn-reject {
  background: #fff;
  color: #ef4444;
  border: 1px solid #ef4444;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.btn-reject:hover { background: #fef2f2; }

/* --- 待通过/待驳回卡片边框 --- */
.approval-row--pending-approve {
  border-left: 6px solid #10b981;
}
.approval-row--pending-reject {
  border-left: 6px solid #ef4444;
}

/* --- 待通过/待驳回状态标签 --- */
.pending-label {
  font-size: 14px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 6px;
}
.pending-label--approve {
  color: #065f46;
  background: #d1fae5;
}
.pending-label--reject {
  color: #991b1b;
  background: #fef2f2;
}

/* --- 待通过/待驳回提示文字 --- */
.pending-hint {
  font-size: 12px;
  color: #6b7280;
  flex: 1;
}

/* --- 撤回按钮 --- */
.btn-undo {
  background: #fff;
  color: #6b7280;
  border: 1px solid #d1d5db;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.btn-undo:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
  color: #374151;
}

/* --- 提交处理按钮（分组头部） --- */
.btn-commit-order {
  font-size: 0.72rem;
  padding: 4px 10px;
  background: #10b981;
  color: #fff;
  border: 1px solid #059669;
  border-radius: 4px;
  cursor: pointer;
  line-height: 1.4;
  font-weight: 600;
  transition: background 0.15s;
}
.btn-commit-order:hover {
  background: #059669;
}

/* --- 详情折叠区 --- */
.approval-row__toggle--card {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 10px 20px;
  border: none;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  font-size: 13px;
  color: #2563eb;
  cursor: pointer;
  font-weight: 500;
  text-align: left;
}
.approval-row__toggle--card:hover { background: #eff6ff; }

.detail-section {
  border-top: 1px solid #e5e7eb;
  padding: 20px;
  background: #fafcff;
}

/* --- 申请详情网格 --- */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px 20px;
  margin-bottom: 20px;
}
.detail-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px 0;
}
.detail-item .dl {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 500;
}
.detail-item .dv {
  font-size: 13px;
  color: #1f2937;
  font-weight: 500;
}
.detail-item .dv.source-text {
  font-size: 12px;
  font-weight: 400;
  color: #6b7280;
  line-height: 1.6;
}
.detail-item.full-width {
  grid-column: 1 / -1;
}
.detail-item .dv .tag {
  display: inline-block;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}
.detail-item .dv .tag.yes { background: #ecfdf5; color: #047857; }
.detail-item .dv .tag.no { background: #f3f4f6; color: #6b7280; }
.detail-item .dv .price-highlight {
  font-size: 16px;
  font-weight: 700;
  color: #ef4444;
}
.detail-item .dv .margin-badge {
  display: inline-block;
  padding: 2px 8px;
  background: #fffbeb;
  border-radius: 4px;
  color: #b45309;
  font-size: 12px;
}

/* --- 双栏布局 --- */
.approval-row__split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}
.approval-row__split-col {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}
.approval-row__split-col .split-header {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #374151;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  gap: 8px;
}
.approval-row__split-col .split-header .split-icon {
  font-size: 15px;
}
.approval-row__split-col .split-body {
  padding: 12px 14px 14px;
}

/* --- 数据区块 --- */
.data-block {
  margin-bottom: 14px;
}
.data-block:last-child { margin-bottom: 0; }
.data-block .block-title {
  font-size: 12px;
  font-weight: 700;
  color: #4b5563;
  margin: 0 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
  gap: 6px;
}
.data-block .block-title .badge-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
}
.data-block .block-title .badge-icon.blue { background: #2563eb; }
.data-block .block-title .badge-icon.green { background: #10b981; }
.data-block .block-title .badge-icon.amber { background: #f59e0b; }
.data-block .block-title .badge-icon.purple { background: #8b5cf6; }

.block-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
}
.block-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.block-item .bl {
  font-size: 11px;
  color: #9ca3af;
}
.block-item .bv {
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
}
.block-item .bv .cmp {
  font-weight: 400;
  font-size: 11px;
  color: #6b7280;
}
.block-item.full-w { grid-column: 1 / -1; }

/* --- 年度指标表格布局（方案B） --- */
.annual-grid {
  display: grid;
  grid-template-columns: 70px 1fr 1fr 1fr;
  gap: 4px 8px;
  align-items: center;
}
.annual-grid__header {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 500;
  padding: 2px 0;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 4px;
}
.annual-grid__label {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
}
.annual-grid__value {
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
}

/* --- 高亮指标卡片 --- */
.highlight-cards {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.hl-card {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
}
.hl-card .hl-label {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 4px;
}
.hl-card .hl-value {
  font-size: 15px;
  font-weight: 700;
}
.hl-card.blue { background: #eff6ff; border-color: #bfdbfe; }
.hl-card.blue .hl-label { color: #1d4ed8; }
.hl-card.blue .hl-value { color: #1e3a8a; }
.hl-card.amber { background: #fffbeb; border-color: #fde68a; }
.hl-card.amber .hl-label { color: #b45309; }
.hl-card.amber .hl-value { color: #78350f; }
.hl-card.green { background: #ecfdf5; border-color: #a7f3d0; }
.hl-card.green .hl-label { color: #047857; }
.hl-card.green .hl-value { color: #064e3b; }

.source-note {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.6;
  padding: 8px 12px;
  background: #f9fafb;
  border-radius: 6px;
  margin-top: 8px;
}

/* --- 分页 --- */
.gm-pager-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
  margin-top: 8px;
}
.gm-pager-bar .gm-page-info {
  font-size: 13px;
  color: #9ca3af;
}
.gm-pager-bar .gm-jump-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.gm-pager-bar .gm-jump-group input {
  width: 60px;
  padding: 5px 8px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 13px;
  text-align: center;
  outline: none;
}
.gm-pager-bar .gm-jump-group input:focus {
  border-color: #2563eb;
  outline: none;
}

/* --- 响应式 --- */
@media (max-width: 1100px) {
  .approval-row__metrics {
    grid-template-columns: 1fr 1fr;
  }
  .approval-row__split {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .approval-row__metrics {
    grid-template-columns: 1fr;
  }
  .highlight-cards {
    grid-template-columns: 1fr;
  }
  .approval-row__decision {
    flex-direction: column;
    align-items: stretch;
  }
  .approval-row__decision .decision-fields {
    margin-left: 0;
  }
  .gm-filter-actions {
    margin-left: 0;
  }
  .approval-row__decision .decision-btns {
    width: 100%;
  }
  .approval-row__decision .decision-btns .btn-approve,
  .approval-row__decision .decision-btns .btn-reject {
    flex: 1;
  }
}

/* 详情项高亮样式（自提、包装费、申请价、毛利率） */
.detail-item--highlight {
  background: #f9fafb;
  border-radius: 8px;
}

/* 申请价 - 红色加粗 */
.detail-item--highlight .dv.dv--price,
.dv.dv--price {
  color: #dc2626 !important;
  font-size: 16px !important;
  font-weight: 800;
  display: inline-block;
}

/* 毛利率 - 琥珀色背景标签（紧凑宽度） */
.detail-item--highlight .dv.dv--rate,
.dv.dv--rate {
  display: inline-block !important;
  background: linear-gradient(135deg, #fef9e7 0%, #fdf2d8 100%) !important;
  color: #a16207 !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  box-shadow: 0 1px 3px rgba(251, 191, 36, 0.1);
  width: fit-content;
  max-width: fit-content;
}

/* 自提/包装费 - 绿色标签（是/包含） */
.detail-item--highlight .dv.dv--yes,
.dv.dv--yes {
  display: inline-block !important;
  background: linear-gradient(135deg, #e0f7ef 0%, #ccf0e3 100%) !important;
  color: #047857 !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.08);
  width: fit-content;
  max-width: fit-content;
}

/* 自提/包装费 - 灰色标签（否/不包含） */
.detail-item--highlight .dv.dv--no,
.dv.dv--no {
  display: inline-block !important;
  background: #f3f4f6 !important;
  color: #6b7280 !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  width: fit-content;
  max-width: fit-content;
}

/* 自提=是 - 蓝色标签 */
.detail-item--highlight .dv.dv--self,
.dv.dv--self {
  display: inline-block !important;
  background: #eff6ff !important;
  color: #2563eb !important;
  border: 1px solid #bfdbfe !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  width: fit-content;
  max-width: fit-content;
}

/* 建议价 - 绿色加粗 */
.detail-item--highlight .dv.dv--sysprice,
.dv.dv--sysprice {
  color: #059669 !important;
  font-weight: 800 !important;
  font-size: 16px !important;
}

/* --- .tag.self 蓝色标签（自提=是） --- */
.detail-item .dv .tag.self {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

/* ================================================================ */
/* 已审批申请页 - 卡片布局
/* ================================================================ */

.app-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  transition: all 0.2s;
}
.app-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  border-color: #d1d5db;
}

.app-card__header {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  gap: 16px;
  flex-wrap: wrap;
}
.app-card__header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  flex: 1;
}
.app-card__header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.app-card .app-id {
  font-size: 13px;
  font-weight: 700;
  color: #1f2937;
}
.app-card .app-id .hash {
  color: #9ca3af;
  font-weight: 400;
}
.app-card .sales-person {
  font-size: 12px;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 4px;
}
.app-card .sales-person .person-icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #eff6ff;
  color: #2563eb;
  font-size: 10px;
  font-weight: 700;
  align-items: center;
  justify-content: center;
}

/* --- 状态徽章 --- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.status-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.status-badge--success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.status-badge--success .dot {
  background: #10b981;
}
.status-badge--rejected {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.status-badge--rejected .dot {
  background: #ef4444;
}

/* --- 卡片主体 --- */
.app-card__body {
  padding: 16px 20px;
}

/* 关键指标行（5列网格） */
.app-card__metrics {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
  gap: 16px;
  padding: 14px 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 14px;
}
.app-card__metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.app-card__metric .metric-label {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.app-card__metric .metric-value {
  font-size: 14px;
  color: #1f2937;
  font-weight: 600;
  word-break: break-word;
}
.app-card__metric .metric-sub {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 400;
}

/* --- 卡片底部元信息 --- */
.app-card__footer {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 20px;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
  font-size: 12px;
  color: #9ca3af;
}
.app-card__footer .footer-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.app-card__footer .footer-meta-label {
  color: #9ca3af;
}
.app-card__footer .footer-meta-value {
  color: #6b7280;
  font-weight: 500;
}
.app-card__footer .footer-opinion {
  color: #10b981;
  font-weight: 500;
}

/* 已审批页分组内卡片底部 */
.approval-row__footer {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 20px;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
  font-size: 12px;
  color: #9ca3af;
}
.approval-row__footer .footer-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.approval-row__footer .footer-meta-label {
  color: #9ca3af;
}
.approval-row__footer .footer-meta-value {
  color: #6b7280;
  font-weight: 500;
}
.approval-row__footer .footer-opinion {
  color: #10b981;
  font-weight: 500;
}

/* 已审批页分组内卡片摘要网格 */
.approval-summary-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 12px 0;
  border-bottom: 1px solid #f3f4f6;
  margin-bottom: 12px;
}
.approval-summary-grid__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.approval-summary-grid__label {
  font-size: 11px;
  color: #9ca3af;
}
.approval-summary-grid__value {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}

/* ================================================================ */
/* 产品指标导入页 - 双栏布局
/* ================================================================ */

.import-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
.import-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.import-right {
  position: sticky;
  top: 20px;
}

/* --- 上传卡片 --- */
.upload-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}
.upload-card .uc-header {
  padding: 14px 20px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 8px;
}
.upload-card .uc-body {
  padding: 20px;
}

/* --- 文件选择器 --- */
.file-picker {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 14px;
}
.file-picker .fp-btn {
  padding: 9px 18px;
  background: #f9fafb;
  color: #6b7280;
  font-size: 13px;
  font-weight: 500;
  border-right: 1px solid #d1d5db;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}
.file-picker .fp-btn:hover {
  background: #f3f4f6;
}
.file-picker .fp-path {
  flex: 1;
  padding: 9px 14px;
  font-size: 13px;
  color: #9ca3af;
  background: #fff;
}
.file-picker .fp-path.has-file {
  color: #1f2937;
}

.upload-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.upload-actions .btn-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2563eb;
  color: #fff;
  padding: 9px 28px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.upload-actions .btn-upload:hover {
  background: #1d4ed8;
}
.upload-actions .file-status {
  font-size: 12px;
  color: #9ca3af;
  display: flex;
  align-items: center;
  gap: 6px;
}
.upload-actions .file-status .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d1d5db;
  transition: background 0.2s;
}
.upload-actions .file-status .dot.active {
  background: #10b981;
}
.upload-actions .file-status .dot.error {
  background: #ef4444;
}

/* --- 字段说明标签 --- */
.field-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.field-tags .ft-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}
.field-tags .ft-item.required {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

/* --- 预览卡片 --- */
.preview-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}
.preview-card .pc-header {
  padding: 14px 20px;
  background: #ecfdf5;
  border-bottom: 1px solid #a7f3d0;
  font-size: 14px;
  font-weight: 600;
  color: #065f46;
  display: flex;
  align-items: center;
  gap: 8px;
}
.preview-card .pc-body {
  padding: 20px;
}

/* --- 空状态 --- */
.import-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #9ca3af;
  gap: 10px;
}
.import-empty-state .import-empty-icon {
  font-size: 36px;
  opacity: 0.4;
}
.import-empty-state .import-empty-text {
  font-size: 13px;
}

/* --- 预览表格 --- */
.preview-table-wrap {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow-x: auto;
}
.preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.preview-table th {
  padding: 10px 14px;
  background: #f9fafb;
  color: #6b7280;
  font-weight: 600;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
  font-size: 12px;
}
.preview-table td {
  padding: 9px 14px;
  border-bottom: 1px solid #f3f4f6;
  color: #374151;
}
.preview-table tr:last-child td {
  border-bottom: none;
}
.preview-table tr:hover td {
  background: #f9fafb;
}
.preview-table thead + tbody tr:first-child td {
  border-top: none;
}

/* ================================================================ */
/* 已审批页 & 产品导入页 - 响应式
/* ================================================================ */

@media (max-width: 1100px) {
  .import-layout {
    grid-template-columns: 1fr;
  }
  .import-right {
    position: static;
  }
  .app-card__metrics {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 768px) {
  .app-card__metrics {
    grid-template-columns: 1fr;
  }
  .gm-filter-actions {
    margin-left: 0;
  }
}

/* ========================================
  批量询价页面优化样式
  ======================================== */

/* 页面标题 + 辅助操作 */
.batch-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.batch-actions .btn--small {
  padding: 6px 14px;
  font-size: 12px;
}

/* --- 蓝色信息提示条 --- */
.info-bar {
  display: flex;
  gap: 24px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 14px 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.info-bar .item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #374151;
  line-height: 1.5;
}
.info-bar .item .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}
.info-bar .item .highlight {
  color: #b91c1c;
  font-weight: 600;
  background: #fef2f2;
  padding: 0 8px;
  border-radius: 4px;
}
.info-bar--warning {
  background: #fffbeb;
  border-color: #fde68a;
}

/* --- 行卡片列表 --- */
.row-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

/* --- 行卡片 --- */
.row-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  overflow: visible;
  transition: all 0.2s;
}
.row-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  border-color: #d1d5db;
}
.row-card.quoted {
  border-left: 4px solid #10b981;
}

/* --- 行头部 --- */
.row-card .row-header {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  gap: 14px;
  border-radius: 11px 11px 0 0;
}
.row-card .row-header .row-label {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 10px;
}
.row-card .row-header .row-label .row-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #e5e7eb;
  font-size: 12px;
  font-weight: 700;
  color: #4b5563;
}
.row-card .row-header .right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- 状态标签 --- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.status-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.status-pill.idle {
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #e5e7eb;
}
.status-pill.idle .dot {
  background: #9ca3af;
}
.status-pill.pending {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}
.status-pill.pending .dot {
  background: #f59e0b;
}
.status-pill.done {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.status-pill.done .dot {
  background: #10b981;
}

/* --- 行主体 --- */
.row-card .row-body {
  padding: 20px;
}

/* --- 统一客户选择栏（所有询价行共用，内部样式与行内输入框一致） --- */
.global-customer-bar {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.global-customer-bar__group {
  max-width: 480px;
}

/* --- 字段 Grid --- */
.fields-grid {
  display: grid;
  grid-template-columns: 1.5fr 1.2fr 0.8fr 0.6fr 0.6fr;
  gap: 16px;
  align-items: start;
}

/* --- 字段组 --- */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.field-group .field-label {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}
.field-group .field-label .required {
  color: #ef4444;
  font-weight: 600;
}
.field-group .field-label .hint {
  font-size: 11px;
  color: #d1d5db;
  margin-left: 4px;
  cursor: default;
}
.field-group input,
.field-group select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  color: #1f2937;
  background: #fff;
  outline: none;
  transition: all 0.2s;
}
.field-group input:focus,
.field-group select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.field-group input::placeholder {
  color: #bbb;
}
.field-group input[readonly] {
  background: #f9fafb;
  color: #6b7280;
  cursor: default;
}

/* --- 复选框包装 --- */
.field-group .check-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 38px;
}
.field-group .check-wrap input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
  cursor: default;
}
.field-group .check-wrap label {
  font-size: 13px;
  color: #4b5563;
}

/* --- 行底部反馈区 --- */
.row-card .row-footer {
  padding: 10px 20px;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: #9ca3af;
  border-radius: 0 0 11px 11px;
}
.row-footer .feedback-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.row-footer .fb-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d1d5db;
}
.row-footer .fb-dot.success {
  background: #10b981;
}
.row-footer .fb-dot.fail {
  background: #ef4444;
}
.row-footer .feedback-text {
  color: #6b7280;
}
.row-footer .expand-hint {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #2563eb;
  cursor: default;
  font-size: 12px;
}

/* --- 底部操作栏 --- */
.action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
  flex-wrap: wrap;
  gap: 12px;
}
.action-bar .left-actions {
  display: flex;
  gap: 12px;
}
.action-bar .right-actions {
  display: flex;
  gap: 12px;
}

/* --- 按钮变体 --- */
.btn--small {
  padding: 5px 14px;
  font-size: 12px;
}
.btn-xs {
  padding: 3px 10px;
  font-size: 11px;
  border-radius: 4px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 22px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: default;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-sm {
  padding: 5px 14px;
  font-size: 12px;
}
.btn-primary {
  background: #2563eb;
  color: #fff;
}
.btn-primary:hover {
  background: #1d4ed8;
}
.btn-outline {
  background: #fff;
  color: #374151;
  border: 1px solid #d1d5db;
}
.btn-outline:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}
.btn-success {
  background: #10b981;
  color: #fff;
}
.btn-success:hover {
  background: #059669;
}
.btn-warning {
  background: #dc2626;
  color: #fff;
}
.btn-warning:hover {
  background: #b91c1c;
}
.btn-info {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}
.btn-info:hover {
  background: #dbeafe;
}
.btn-add {
  background: #eff6ff;
  color: #2563eb;
  border: 1px dashed #93c5fd;
}
.btn-add:hover {
  background: #dbeafe;
}
.btn-delete {
  background: transparent;
  color: #9ca3af;
  border: 1px solid #e5e7eb;
  padding: 4px 12px;
  font-size: 12px;
}
.btn-delete:hover {
  background: #fef2f2;
  color: #ef4444;
  border-color: #fecaca;
}

/* ================================================================ */
/* 下单详情 & 我的特价申请 - 共用样式
/* ================================================================ */

/* --- 页面内容区 --- */
.page-content {
  padding: 24px 28px 32px;
}

/* --- 页面标题区 --- */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.page-header .title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.page-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}
.page-header .header-tip {
  font-size: 12px;
  color: #9ca3af;
  background: #f3f4f6;
  padding: 4px 12px;
  border-radius: 20px;
}
.page-header .header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* --- 筛选区 --- */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-group label {
  font-size: 13px;
  color: #6b7280;
  white-space: nowrap;
  font-weight: 500;
}
.filter-group select,
.filter-group input {
  padding: 7px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  color: #374151;
  background: #fff;
  outline: none;
  transition: all 0.2s;
  min-width: 120px;
}
.filter-group select:focus,
.filter-group input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.filter-group .date-combo {
  display: flex;
  align-items: center;
  gap: 4px;
}
.filter-group .date-combo select { min-width: 60px; }
.filter-group .date-combo input { min-width: 130px; }

.filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* --- 选择统计栏 --- */
.selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 16px;
}
.selection-bar .left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.selection-bar .count {
  font-size: 13px;
  color: #6b7280;
}
.selection-bar .count strong { color: #2563eb; font-weight: 600; }
.selection-bar .actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- 订单卡片列表 --- */
.order-list { display: flex; flex-direction: column; gap: 16px; }

.order-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  transition: all 0.2s;
  position: relative;
}
.order-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  border-color: #d1d5db;
}

/* 卡片头部 */
.order-card .card-header {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  gap: 16px;
}
.order-card .card-header .checkbox-wrap {
  display: flex;
  align-items: center;
}
.order-card .card-header .checkbox-wrap input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: #2563eb;
  cursor: default;
}
.order-card .card-header .order-id {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  font-family: "SF Mono", "JetBrains Mono", monospace;
  letter-spacing: 0.3px;
}
.order-card .card-header .order-id .label {
  font-weight: 400;
  color: #9ca3af;
  font-size: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  margin-right: 6px;
}
.order-card .card-header .right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 卡片内容体 */
.order-card .card-body {
  padding: 18px 20px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px 24px;
}
.order-card .info-grid {
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.info-item .label {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.info-item .value {
  font-size: 13px;
  color: #1f2937;
  line-height: 1.5;
}
.info-item .value.price {
  font-size: 15px;
  font-weight: 700;
  color: #ef4444;
}
.info-item .value.price.price--green {
  color: #10b981;
}
.info-item .value.address {
  font-size: 12px;
  color: #4b5563;
  word-break: break-word;
  overflow-wrap: break-word;
}
.info-item .value .tag {
  display: inline-block;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}
.info-item .value .tag.yes { background: #ecfdf5; color: #047857; }
.info-item .value .tag.no { background: #f3f4f6; color: #6b7280; }
.info-item .value .tag.self { background: #eff6ff; color: #2563eb; }

/* 产品名 */
.product-name {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}
.product-name .sub {
  font-weight: 400;
  font-size: 12px;
  color: #9ca3af;
  margin-left: 6px;
}

/* 卡片底部 */
.order-card .card-footer {
  padding: 10px 20px;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
  font-size: 12px;
  color: #9ca3af;
  display: flex;
  align-items: center;
  gap: 8px;
}
.order-card .card-footer .hint-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #d1d5db;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

/* ================================================================ */
/* 特价申请卡片
/* ================================================================ */

.app-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  transition: all 0.2s;
}
.app-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  border-color: #d1d5db;
}
.app-card .card-header {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  gap: 14px;
}
.app-card .card-header .app-id {
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
  font-family: "SF Mono", "JetBrains Mono", monospace;
}
.app-card .card-header .app-product {
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
}
.app-card .card-header .label {
  font-weight: 400;
  color: #9ca3af;
  font-size: 11px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  margin-right: 6px;
}
.app-card .card-header .right { margin-left: auto; }

.app-card .card-body { padding: 18px 20px; }

.app-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
  gap: 12px 16px;
}
.app-info-item--full {
  grid-column: 1 / -1;
}
.app-info-item--full .value {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.app-info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.app-info-item .label {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 500;
}
.app-info-item .value {
  font-size: 13px;
  color: #1f2937;
  line-height: 1.5;
}
.product-type-suffix {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 400;
  margin-left: 2px;
}
.app-info-item .value .app-price {
  font-size: 18px;
  font-weight: 700;
  color: #ef4444;
}
.app-info-item .value .app-price.app-price--green {
  color: #10b981;
}
.app-info-item .value .feedback {
  display: inline-block;
  padding: 2px 10px;
  background: #ecfdf5;
  border-radius: 4px;
  color: #047857;
  font-size: 12px;
}

.app-card .card-footer {
  padding: 10px 20px;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
  font-size: 12px;
  color: #9ca3af;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.app-card .card-footer .meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.app-card .card-footer .meta-item .meta-label {
  color: #9ca3af;
}
.app-card .card-footer .meta-item .meta-value {
  color: #4b5563;
}

/* --- 状态徽章补全 --- */
.status-badge.success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.status-badge.success .dot { background: #10b981; }
.status-badge.warning {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}
.status-badge.warning .dot { background: #f59e0b; }
.status-badge.info {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.status-badge.info .dot { background: #2563eb; }
.status-badge.danger {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.status-badge.danger .dot { background: #ef4444; }

/* --- 响应式 - 下单&特价 --- */
@media (max-width: 900px) {
  .app-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr 1fr; }
  .order-card .info-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-actions { margin-left: 0; }
}

/* ================================================================ */
/* 管理员页面 - 手动同步
/* ================================================================ */

.sync-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 4px;
}

.sync-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  transition: all 0.2s;
}
.sync-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  border-color: #d1d5db;
}
.sync-card__title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}
.sync-card__desc {
  margin: 0;
  color: #9ca3af;
  font-size: 13px;
  line-height: 1.5;
}
.sync-card .gm-btn-primary,
.sync-card .gm-btn-ghost {
  align-self: flex-start;
  margin-top: auto;
}

@media (min-width: 1200px) {
  .sync-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* --- 同步结果卡片状态 --- */
.app-card--success {
  border-color: #86efac !important;
  background: #f0fdf4 !important;
}
.app-card--error {
  border-color: #fecaca !important;
  background: #fef2f2 !important;
}
.app-card--success .app-card__header,
.app-card--error .app-card__header {
  border-bottom-color: inherit;
}

/* --- 响应式 --- */
@media (max-width: 1100px) {
  .fields-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .info-bar {
    gap: 14px;
  }
}
@media (max-width: 768px) {
  .fields-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  /* 产品/数量各占半行；付款方式、是否自提、含包装费 & 运费三者并排同一行 */
  .fields-grid > .field-group:nth-child(1),
  .fields-grid > .field-group:nth-child(2) {
    grid-column: span 3;
  }
  .fields-grid > .field-group:nth-child(3),
  .fields-grid > .field-group:nth-child(4),
  .fields-grid > .field-group:nth-child(5) {
    grid-column: span 2;
  }
  .action-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .action-bar .right-actions {
    flex-wrap: wrap;
  }
  .info-bar {
    flex-direction: column;
    gap: 8px;
  }
}

/* --- 手机端极小屏幕优化 (<=520px) --- */
@media (max-width: 520px) {
  /* --- 页面标题区：按钮堆叠 --- */
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .page-header .header-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .page-header .header-actions .btn {
    flex: 1;
    min-width: calc(50% - 4px);
    text-align: center;
    font-size: 12px;
    padding: 8px 6px;
  }

  /* --- GM审批页 - 指标行：6列→2列 --- */
  .approval-row__metrics {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 14px;
  }

  /* --- GM审批页 - 操作栏：纵向堆叠 --- */
  .approval-row__decision {
    flex-direction: column;
    align-items: stretch;
  }
  .approval-row__decision .decision-fields {
    margin-left: 0;
    width: 100%;
    flex-direction: column;
  }
  .approval-row__decision .decision-btns {
    width: 100%;
    display: flex;
    gap: 8px;
  }
  .approval-row__decision .decision-btns .btn-approve,
  .approval-row__decision .decision-btns .btn-reject {
    flex: 1;
    text-align: center;
  }

  /* --- GM审批 - 详情网格：固定2列布局（确保标签+值成对） --- */
  .approval-row__detail .detail-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
  }
  .approval-row__detail .detail-item {
    min-width: 0;
  }
  .approval-row__detail .detail-item .dl {
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .approval-row__detail .detail-item .dv {
    font-size: 13px;
    word-break: break-word;
  }
  .approval-row__detail .detail-extras {
    flex-direction: column;
    gap: 12px;
  }

  /* --- GM已审批 - 详情网格：2列布局（合理利用空间） --- */
  .app-card .detail-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
  }
  .app-card .detail-item {
    min-width: 0;
  }
  .app-card .detail-item .dl {
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .app-card .detail-item .dv {
    font-size: 13px;
    word-break: break-word;
  }

  /* --- GM审批 - 详情双栏：堆叠 --- */
  .approval-row__split {
    grid-template-columns: 1fr;
  }

  /* --- GM已审批 - 卡片底部 --- */
  .app-card__footer {
    flex-wrap: wrap;
    gap: 8px;
  }
  .app-card__footer .footer-meta-item[style*="margin-left:auto"] {
    margin-left: 0 !important;
  }

  /* --- GM审批 - 卡片头部/主体：减少内边距以利用屏幕宽度 --- */
  .approval-row__body {
    padding: 10px;
  }
  .approval-row__card-header {
    padding: 10px 12px;
  }
  .detail-section {
    padding: 12px;
  }
  .approval-row__split-col .split-body {
    padding: 10px 12px 12px;
  }
  .main {
    padding: 8px;
  }

  /* --- 通用主体内容区 padding 适配 --- */
  .page-content {
    padding: 16px;
  }
  .app-card__header,
  .app-card__body,
  .app-card .card-body,
  .app-card .card-header,
  .app-card .card-footer {
    padding-left: 14px;
    padding-right: 14px;
  }

  /* --- GM详情 - 高亮指标卡片：3列→1列 --- */
  .highlight-cards {
    grid-template-columns: 1fr;
  }

  /* --- GM详情 - 多列block-grid：统一单列 --- */
  .block-grid {
    grid-template-columns: 1fr;
  }
  /* 成本指标移动端改为2行2列，不被统一单列影响 */
  .block-grid--cost {
    grid-template-columns: 1fr 1fr !important;
  }
  /* 低价指标移动端前两列同行，第三列全宽（.full-w 已处理） */
  .block-grid--lowprice {
    grid-template-columns: 1fr 1fr !important;
  }
  /* 额外参考指标移动端两列同行 */
  .block-grid--extra {
    grid-template-columns: 1fr 1fr !important;
  }

  /* --- GM已审批 - 卡片头部右对齐修复 --- */
  .app-card__header-right {
    margin-left: 0;
  }

  /* --- 我的特价申请页 - app-grid：2列布局（充分利用空间） --- */
  .order-list .app-card .app-grid,
  body .order-list .app-card .app-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px 16px;
  }
  .order-list .app-info-item .value,
  body .order-list .app-info-item .value {
    font-size: 13px;
  }
  .order-list .app-info-item .value .app-price,
  body .order-list .app-info-item .value .app-price {
    font-size: 16px;
  }

  /* --- 信息提示条：间隙缩小、选项纵向 --- */
  .info-bar {
    flex-direction: column;
    gap: 12px;
    padding: 12px 14px;
  }
  .info-bar .item {
    font-size: 12px;
    width: 100%;
  }

  /* --- 下单详情页 - info-grid：3列网格，短字段2行×3列排列 --- */
  .order-card .info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px 12px;
  }
  .order-card .info-item {
    min-width: 0;
  }
  /* 第1-2项（产品、客户）和第9项起（地址、联系人/电话、备注、图片）占满整行 */
  .order-card .info-item:nth-child(-n+2),
  .order-card .info-item:nth-child(n+9) {
    grid-column: 1 / -1;
  }
  /* 第3-8项（数量、申请价、付款方式、自提、含包装费和运费、系统建议价）在3列网格中自动排列为2行×3列 */
  .order-card .info-item .label {
    font-size: 11px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.5;
  }
  .order-card .info-item .label label {
    display: inline;
    white-space: nowrap;
    margin-left: 4px;
  }
  .order-card .info-item .value {
    font-size: 13px;
    word-break: break-word;
  }
  /* --- 下单详情页 - 地址/联系人编辑区域：全宽适配 --- */
  .order-card .addr-edit textarea,
  .order-card .contact-edit textarea {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* --- 下单详情页 - 选择操作栏：按钮堆叠 --- */
  .selection-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .selection-bar .actions {
    flex-wrap: wrap;
    gap: 8px;
  }
  .selection-bar .actions .btn {
    flex: 1;
    min-width: calc(50% - 4px);
    text-align: center;
    font-size: 12px;
    padding: 8px 6px;
  }

  /* --- 批量询价页 - 标题文字横向排列 --- */
  .gm-page-header h2 {
    font-size: 18px;
    white-space: nowrap;
    overflow: visible;
  }
  
  /* --- 批量询价页 - 产品名称显示优化 --- */
  .batch-row__product-name {
    word-break: break-word;
    white-space: normal;
    line-height: 1.4;
  }

  /* --- 批量询价页 - 页面标题区按钮堆叠 --- */
  .gm-page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .gm-page-header .batch-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .gm-page-header .batch-actions .btn--small {
    flex: 1;
    min-width: calc(33% - 6px);
    text-align: center;
    font-size: 12px;
    padding: 8px 6px;
  }

  /* --- 批量询价页 - 底部操作栏按钮堆叠 --- */
  .action-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .action-bar .right-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .action-bar .right-actions .btn {
    flex: 1;
    min-width: calc(33% - 6px);
    text-align: center;
    font-size: 12px;
    padding: 8px 6px;
  }

  /* --- 我的特价申请页 - 卡片头部布局优化 --- */
  .order-list .app-card .card-header {
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
  }
  .order-list .app-card .card-header input[type="checkbox"] {
    flex-shrink: 0;
    margin-top: 2px;
  }
  .order-list .app-card .card-header .app-id {
    flex: 1;
    min-width: 0;
    word-break: break-word;
    line-height: 1.4;
    display: inline-block;
  }
  .order-list .app-card .card-header .app-id .label {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 400;
  }
  .order-list .app-card .card-header .right {
    margin-left: auto !important;
    flex-shrink: 0;
    align-self: flex-start;
    width: auto !important;
  }
  .order-list .app-card .card-header .status-badge {
    white-space: nowrap !important;
    flex-shrink: 0;
    display: inline-flex;
  }

  /* --- 产品查询页 - 筛选栏压缩 --- */
  .pq-controls {
    padding: 12px;
    gap: 8px;
  }
  .pq-field {
    min-width: 120px;
  }

  /* --- 产品查询页 - 图表区压缩 --- */
  .pq-chart-section {
    padding: 12px;
  }
}

/* --- 回收站模态框 --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-container {
  background: #fff;
  border-radius: 16px;
  width: 640px;
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
}
.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}
.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #9ca3af;
  padding: 4px 8px;
  border-radius: 6px;
}
.modal-close:hover {
  background: #f3f4f6;
  color: #374151;
}
.modal-body {
  padding: 16px 24px;
  overflow-y: auto;
  flex: 1;
  min-height: 100px;
}
.modal-footer {
  padding: 12px 24px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.modal-footer .btn-outline {
  flex-shrink: 0;
}

/* --- 客户维度成交情况内联面板 --- */
.customer-transaction-link {
  margin-top: 12px;
  text-align: right;
}
.gm-link-btn {
  background: none;
  border: none;
  color: #3b82f6;
  font-size: 12px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.15s;
}
.gm-link-btn:hover {
  background: #eff6ff;
  text-decoration: underline;
}

/* 内联面板 - 在卡片内展开，带滚动条 */
.tx-inline-panel {
  margin-top: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
  overflow: hidden;
}
.tx-inline-panel.is-hidden {
  display: none;
}
.tx-inline-panel__inner {
  max-height: 260px;
  overflow-y: auto;
  padding: 8px;
}
.tx-loading {
  text-align: center;
  padding: 24px 0;
  color: #9ca3af;
  font-size: 13px;
}
.tx-empty {
  text-align: center;
  padding: 24px 0;
  color: #9ca3af;
  font-size: 13px;
}
.tx-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 12px;
}
.tx-table th {
  background: #f3f4f6;
  color: #6b7280;
  font-weight: 600;
  padding: 6px 4px;
  border-bottom: 2px solid #e5e7eb;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}
.tx-table td {
  padding: 5px 4px;
  border-bottom: 1px solid #f3f4f6;
  color: #374151;
  word-break: break-all;
}
/* 第1列：日期 */
.tx-table th:nth-child(1),
.tx-table td:nth-child(1) {
  width: 24%;
  text-align: left;
}
/* 第2列：单据编号 */
.tx-table th:nth-child(2),
.tx-table td:nth-child(2) {
  width: 26%;
  text-align: left;
}
/* 第3列：单价 */
.tx-table th:nth-child(3),
.tx-table td:nth-child(3) {
  width: 20%;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
/* 第4列：数量 */
.tx-table th:nth-child(4),
.tx-table td:nth-child(4) {
  width: 13%;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
/* 第5列：金额 */
.tx-table th:nth-child(5),
.tx-table td:nth-child(5) {
  width: 17%;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.tx-table tr:hover td {
  background: #fff;
}

.trash-pager {
  display: flex;
  align-items: center;
  gap: 12px;
}
.trash-page-info {
  font-size: 12px;
  color: #6b7280;
}

/* --- 回收站列表 --- */
.trash-loading,
.trash-empty {
  text-align: center;
  padding: 40px 0;
  color: #9ca3af;
}
.trash-group {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
}
.trash-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}
.trash-order-id {
  font-weight: 600;
  font-size: 14px;
  color: #374151;
}
.trash-group-body {
  padding: 8px 16px;
}
.trash-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
  font-size: 13px;
  color: #6b7280;
  border-bottom: 1px solid #f3f4f6;
}
.trash-row:last-child {
  border-bottom: none;
}
.trash-row-name {
  flex: 1;
  font-weight: 500;
  color: #374151;
}
.trash-row-qty,
.trash-row-price {
  white-space: nowrap;
}
.trash-row-time {
  color: #9ca3af;
  font-size: 12px;
  white-space: nowrap;
}

.btn-danger {
  background: #dc2626;
  color: #fff;
  border: 1px solid #dc2626;
}
.btn-danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

.btn-success {
  background: #16a34a;
  color: #fff;
  border: 1px solid #16a34a;
}
.btn-success:hover {
  background: #15803d;
  border-color: #15803d;
}

.trash-group-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* 密码小眼睛 */
.pw-field {
  position: relative;
  display: inline-block;
}
.pw-field .field__input {
  padding-right: 32px;
}
.pw-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  cursor: pointer;
  padding: 4px;
  font-size: 16px;
  line-height: 1;
  color: #9ca3af;
  transition: color 0.15s;
}
.pw-toggle:hover {
  color: #4b5563;
}


/* ===== 产品查询 ===== */

.pq-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
}

.pq-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 180px;
  flex: 1 1 auto;
}

.pq-field--action {
  flex: 0 0 auto;
  min-width: auto;
  justify-content: flex-end;
}

.pq-label {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}

.pq-autocomplete {
  position: relative;
}

.pq-suggest {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  z-index: 30;
  list-style: none;
  margin: 0;
  padding: 4px 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  max-height: 220px;
  overflow-y: auto;
}

.pq-suggest li {
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.92rem;
  color: var(--text);
}

.pq-suggest li:hover {
  background: #eff6ff;
}

.pq-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 40px;
  justify-content: center;
  color: var(--muted);
}

.pq-spinner {
  width: 22px;
  height: 22px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: pq-spin 0.7s linear infinite;
}

@keyframes pq-spin {
  to { transform: rotate(360deg); }
}

.pq-error {
  padding: 14px 18px;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 0.92rem;
}

.pq-product-info {
  display: flex;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 16px;
}

.pq-product-spec {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.pq-product-name {
  font-size: 0.92rem;
  color: var(--muted);
}

/* --- 产品指标行（面价/返利价格/最低接受价/建议价） --- */
.pq-indicator-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid #eef2f6;
  border-radius: var(--radius);
}
.pq-indicator-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pq-indicator-label {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
}
.pq-indicator-value {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

@media (max-width: 520px) {
  .pq-indicator-row {
    gap: 12px;
    padding: 8px 12px;
  }
  .pq-indicator-item {
    flex: 0 0 calc(50% - 6px);
  }
}

/* --- 指标表格（桌面端） --- */
.pq-metrics {
  margin-bottom: 24px;
}

.pq-table {
  width: 100%;
  border-collapse: collapse;
}

.pq-th {
  text-align: left;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: none;
  border-bottom: 1px solid var(--border);
}

.pq-row:not(:last-child) .pq-td {
  border-bottom: 1px solid #f0f2f5;
}

.pq-td {
  padding: 12px;
  font-size: 0.92rem;
  color: var(--text);
}

.pq-td--label {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.pq-td sup {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 400;
}

.pq-td--cust {
  word-break: break-word;
  white-space: normal;
}

/* 占位符、负数 */
.pq-value--na {
  color: #adb5bd;
  font-style: italic;
  font-weight: 400;
}

.pq-value--negative {
  color: #dc2626;
}

/* --- 手机端：表格转卡片（≤768px） --- */
@media (max-width: 768px) {
  .pq-table thead {
    display: none;
  }
  .pq-table,
  .pq-table tbody {
    display: block;
  }
  .pq-table tr {
    display: flex;
    flex-wrap: wrap;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 10px;
    background: #fff;
    overflow: hidden;
  }
  /* 行首单元格转为卡片标题 */
  .pq-table tr .pq-td--label {
    flex: 0 0 100%;
    padding: 10px 14px;
    font-size: 0.85rem;
    font-weight: 700;
    background: #f8fafc;
    border-bottom: 1px solid #eef2f6;
    white-space: normal;
    box-sizing: border-box;
  }
  .pq-table tr .pq-td--label sup {
    font-size: 0.7rem;
    color: var(--muted);
    font-weight: 400;
  }
  /* 其余单元格：flex 50% 确保严格2列 */
  .pq-table tr .pq-td:not(.pq-td--label) {
    flex: 0 0 50%;
    display: block;
    padding: 10px 14px;
    box-sizing: border-box;
    border: none;
    font-size: 0.92rem;
  }
  .pq-table tr .pq-td:not(.pq-td--label)::before {
    content: attr(data-label);
    display: block;
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 500;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  /* 交替边框模拟网格线 */
  .pq-table tr .pq-td:not(.pq-td--label):nth-child(2n-1) {
    border-right: 1px solid #f0f2f5;
  }
  .pq-table tr .pq-td:not(.pq-td--label):nth-child(n+3) {
    border-top: 1px solid #f0f2f5;
  }
  /* 平均价行（colspan=4）占满整行 */
  .pq-table tr:last-child .pq-td:not(.pq-td--label) {
    flex: 0 0 100%;
    border: none;
    font-size: 1rem;
    font-weight: 600;
  }
  .pq-table tr:last-child .pq-td:not(.pq-td--label)::before {
    font-weight: 500;
  }
  /* 客户字段换行 */
  .pq-td--cust {
    white-space: normal !important;
    word-break: break-word !important;
  }
  /* 占位符与负数颜色 */
  .pq-td.pq-value--na {
    color: #adb5bd;
    font-style: italic;
    font-weight: 400;
  }
}


/* --- 折线图 --- */
.pq-chart-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.pq-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.pq-chart-title {
  font-size: 1rem;
  font-weight: 600;
}

.pq-chart-tabs {
  display: flex;
  gap: 4px;
  background: #f3f4f6;
  border-radius: 8px;
  padding: 3px;
}

.pq-chart-tab {
  padding: 6px 16px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}

.pq-chart-tab.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.pq-chart-tab:hover:not(.active) {
  color: var(--text);
}

.pq-chart-wrap {
  width: 100%;
  height: 320px;
}

/* 确认模态框 — 手机端表格横向滚动 */
@media (max-width: 768px) {
  [data-confirm-modal] .modal-body {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  [data-confirm-modal] .modal-footer {
    flex-direction: column;
    gap: 10px;
  }
  [data-confirm-modal] .modal-footer [data-confirm-count] {
    align-self: flex-start;
  }
  [data-confirm-modal] .modal-footer > div:last-child {
    width: 100%;
    display: flex;
    gap: 8px;
  }
  [data-confirm-modal] .modal-footer > div:last-child button {
    flex: 1;
    text-align: center;
  }
}

/* --- 全局占屏处理遮罩（询价/审批/下单/邮件通知等操作通用，与总经理端一致） --- */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.92);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}
.loading-overlay__inner {
  text-align: center;
}
.loading-overlay__spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e5e7eb;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: loading-spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes loading-spin {
  to { transform: rotate(360deg); }
}
.loading-overlay__text {
  font-size: 16px;
  color: #374151;
  font-weight: 500;
}
