:root {
  --panel-bg: #ffffff;
  --panel-border: #d9dde3;
  --accent: #2271b1;
  --muted: #6b7280;
  --text: #1d2327;
  --section-bg: #f6f7f9;
  --danger: #d63638;
  --success: #00a32a;
  --warning: #c56c00;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background: #eef0f2;
  font-size: 14px;
  line-height: 1.6;
}

/* ---------- 站点顶部栏 ---------- */
.site-header {
  background: #1c2b4a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 60;
}
.site-header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.site-logo { display: block; }
.site-logo img { height: 42px; width: auto; display: block; }
.site-header-left { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.site-team { position: relative; display: flex; align-items: center; }
.site-team-btn { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.22); border-radius: 999px; padding: 3px 12px; color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.site-team-btn:hover { background: rgba(255,255,255,0.18); }
.site-team-btn .caret { color: rgba(255,255,255,0.8); }
.site-team-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 50; background: #fff; border: 1px solid var(--panel-border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.15); min-width: 220px; padding: 6px; }
.site-team-menu[hidden] { display: none; }
.team-menu-form { margin: 0; }
.team-menu-option { display: block; width: 100%; text-align: left; background: none; border: none; padding: 6px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; color: #374151; }
.team-menu-option:hover { background: var(--section-bg); }
.team-menu-option.active { color: var(--accent); font-weight: 600; background: #eef4fb; }
.site-nav { display: flex; gap: 26px; align-items: center; }
.site-nav-link {
  color: #c3cbda;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.site-nav-link:hover { color: #ffffff; }
.site-nav-link.active { color: #ffffff; font-weight: 600; border-bottom-color: #ffffff; }
.site-nav-drop { position: relative; }
.site-nav-drop-toggle {
  display: inline-flex; align-items: center; gap: 4px;
  background: none; cursor: pointer; font: inherit;
  border: 0; border-bottom: 2px solid transparent;   /* 与 site-nav-link 一致 */
  appearance: none; -webkit-appearance: none; border-radius: 0;
  color: #c3cbda; font-size: 15px; font-weight: 500; padding: 6px 2px;
  transition: color 0.15s, border-color 0.15s;
}
.site-nav-drop-toggle:hover { color: #ffffff; }
.site-nav-drop-toggle .caret { font-size: 10px; opacity: 0.7; }
.site-nav-drop-menu {
  position: absolute; top: 100%; left: 0; min-width: 190px; background: #fff;
  border: 1px solid var(--panel-border); border-radius: 8px; box-shadow: 0 12px 30px rgba(0,0,0,0.16);
  padding: 6px; display: none; z-index: 80;
}
.site-nav-drop:hover .site-nav-drop-menu, .site-nav-drop.open .site-nav-drop-menu { display: block; }
.site-nav-drop-menu a { display: block; padding: 8px 12px; border-radius: 6px; color: #374151; text-decoration: none; font-size: 14px; }
.site-nav-drop-menu a:hover { background: var(--section-bg); color: var(--accent); }
.site-nav-drop-menu a.active { color: var(--accent); font-weight: 600; background: #eef4fb; }
.site-user { display: flex; align-items: center; gap: 12px; }
.site-user-name { color: #ffffff; font-size: 14px; font-weight: 600; }
.site-logout { color: #c3cbda; text-decoration: none; font-size: 13px; }
.site-logout:hover { color: #ffffff; }
.site-msg { position: relative; }
.msg-badge { display: inline-block; margin-left: 4px; background: #d63638; color: #fff; border-radius: 999px; padding: 0 6px; font-size: 11px; line-height: 16px; font-weight: 600; }

/* 消息中心 */
.row-unread { background: #f6f9ff; }
.msg-status { background: var(--section-bg); color: var(--muted); border: 1px solid var(--panel-border); border-radius: 999px; padding: 1px 10px; font-size: 12px; }
.msg-status.read { color: var(--success); border-color: #b8e0c0; }
.msg-body { min-width: 240px; }

/* 系统风格确认/提示弹窗 */
.modal-confirm { width: 400px; max-width: calc(100vw - 32px); }
.modal-confirm .m-title { margin: 0; font-size: 16px; }
.modal-confirm .m-msg { margin: 4px 0 0; font-size: 14px; color: var(--text); }

/* ---------- 登录页 ---------- */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #1c2b4a; }
.login-shell { width: 100%; display: flex; justify-content: center; padding: 24px 16px; }
.login-card {
  background: #fff; border-radius: 12px; overflow: hidden;
  width: 480px; max-width: 100%; box-shadow: 0 12px 32px rgba(0,0,0,0.25);
}
.login-brand {
  background: #1c2b4a;
  padding: 22px;
  display: flex; align-items: center; justify-content: center; gap: 16px;
}
.login-brand img { height: 60px; display: block; width: auto; }
.login-brand-text { color: #fff; font-size: 22px; font-weight: 600; letter-spacing: 1px; line-height: 1; white-space: nowrap; }
.login-card-body { padding: 24px 32px 32px; }
.login-card h1 { text-align: center; font-size: 22px; margin: 0 0 2px; }
.login-card .subtitle { text-align: center; color: var(--muted); font-size: 13px; margin: 0 0 18px; }
.login-hint { color: var(--muted); font-size: 12px; margin: 0 0 12px; }
.login-actions { margin-top: 18px; }
.login-actions .button { width: 100%; }
.captcha-row { display: flex; align-items: flex-end; gap: 10px; margin-top: 14px; }
.captcha-row .form-field { flex: 1; margin-top: 0; }
.captcha-img { width: 140px; height: 44px; border: 1px solid var(--panel-border); border-radius: 6px; }

.page-shell {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 20px 40px;
}
.page-shell--wide {
  max-width: 1440px;
}
.page-header { margin-bottom: 18px; }
.page-header h1 { font-size: 22px; margin: 0; color: var(--text); }
.order-biz-status { font-size: 14px; font-weight: 600; color: var(--text); margin: 6px 0 2px; }
.page-header .subtitle { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.order-actions { display: flex; gap: 10px; margin: 0 0 16px; }
.order-actions-menu { position: relative; }
.order-actions-menu-list { position: absolute; left: 0; top: calc(100% + 4px); min-width: 168px; background: #fff; border: 1px solid var(--panel-border); border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,0.12); z-index: 20; overflow: hidden; }
.order-actions-menu-list[hidden] { display: none; }
.order-actions-menu-item { display: block; width: 100%; text-align: left; padding: 9px 14px; background: #fff; border: none; cursor: pointer; font-size: 13px; color: var(--text); text-decoration: none; }
.order-actions-menu-item:hover { background: var(--section-bg); }
.order-actions-menu-item + .order-actions-menu-item { border-top: 1px solid var(--panel-border); }

/* 详情页宽屏布局：左栏任务/备注 + 右侧订单详情 */
.detail-layout { display: grid; grid-template-columns: minmax(0,1fr) 480px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .detail-layout { grid-template-columns: 1fr; } }
.detail-side { display: flex; flex-direction: column; gap: 16px; }
.side-card { background: var(--panel-bg); border: 1px solid var(--panel-border); border-radius: 10px; overflow: hidden; }
.side-card-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--section-bg); border-bottom: 1px solid var(--panel-border); }
.side-card-head h2 { margin: 0; font-size: 15px; }
.task-list, .note-list { padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.side-item { border: 1px solid var(--panel-border); border-radius: 8px; padding: 10px 12px; background: #fff; }
.side-item-meta { font-size: 12px; color: var(--muted); margin-bottom: 6px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.m-time { color: var(--muted); }
.m-sender { color: var(--accent); font-weight: 600; }
.m-sender { color: var(--accent); font-weight: 600; }
.gun-img { width: 15px; height: 15px; vertical-align: -2px; margin-right: 1px; }
.m-receiver { color: var(--text); }
.m-status { border: 1px solid var(--panel-border); background: #fff; border-radius: 999px; padding: 1px 10px; font-size: 12px; cursor: default; color: var(--warning); }
.m-status.done { color: var(--success); border-color: #b8e0c0; background: #ecf6ff; }
.m-status.review { color: #1c4f82; border-color: #c7d8ea; background: #eef4fb; }
.task-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
.task-reply { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--panel-border); font-size: 13px; color: #374151; }
.task-reject { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--panel-border); font-size: 13px; color: var(--danger); }
/* 任务对话时间线（每轮处理/驳回/确认） */
.task-convo { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--panel-border); font-size: 13px; color: #374151; }
.task-convo + .task-convo { border-top: 1px dashed var(--panel-border); }
.task-convo.task-reject { color: var(--danger); }
.task-convo.task-confirm { color: #1c7c37; }
.task-convo-meta { display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.side-item-author { color: var(--accent); font-weight: 600; }
.side-item-text { font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.side-item-images { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.side-item-images img { width: 150px; height: auto; border-radius: 6px; border: 1px solid var(--panel-border); }
/* 详情页出货照图片（任务区上方）：120px 缩略图 */
.ship-photo-grid { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; }
.ship-photo-thumb { width: 120px; height: 120px; object-fit: cover; border-radius: 6px; border: 1px solid var(--panel-border); cursor: zoom-in; }
.ship-photo-links { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 10px; }
.ship-photo-link { border: 1px solid var(--panel-border); border-radius: 6px; padding: 8px 10px; background: var(--section-bg); }
.ship-link-row { display: flex; align-items: baseline; gap: 8px; margin: 2px 0; }
.ship-link-row .field-label { font-size: 12px; color: var(--muted); min-width: 40px; }
.ship-link-row a { word-break: break-all; color: var(--accent); }
.ship-link-row .field-value { font-size: 13px; color: var(--text); }
.ship-link-meta { font-size: 12px; color: var(--muted); margin-top: 6px; }
/* 订单详情-信用卡核验区域 */
.risk-card-body { padding: 12px 16px; }
.risk-upload-field + .risk-upload-field { margin-top: 14px; }
.risk-upload-field .field-label { display: block; color: var(--muted); font-size: 13px; margin: 0 0 6px; }
.risk-file-input { width: 100%; font-size: 13px; }
.risk-upload-field .button { margin-right: 8px; }
/* 收款明细-信用卡核验完成标记 */
.risk-review-done { color: var(--success); }
.risk-review-done b { color: inherit; }
.risk-hint { color: var(--muted); font-size: 12px; margin-left: 4px; }
.risk-photo { display: block; width: 150px; height: auto; margin-top: 8px; border: 1px solid var(--panel-border); border-radius: 6px; cursor: zoom-in; }
.risk-photo[hidden] { display: none; }
.risk-empty { color: var(--muted); font-size: 13px; padding: 12px 0; border: 1px dashed var(--panel-border); border-radius: 6px; text-align: center; margin-top: 8px; }
.risk-review-status { padding: 4px 2px; }
.risk-review-status .review-row .field-value { color: inherit; }
.modal-textarea { min-height: 90px; resize: vertical; }
.modal-images { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.modal-images img { width: 80px; height: 80px; object-fit: cover; border-radius: 6px; border: 1px solid var(--panel-border); }

/* 富文本编辑器 */
.rte-toolbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.rte-toolbar button { background: #fff; border: 1px solid var(--panel-border); border-radius: 5px; padding: 5px 10px; cursor: pointer; font-size: 14px; }
.rte-toolbar button:hover { border-color: var(--accent); }
.rte-toolbar select { border: 1px solid var(--panel-border); border-radius: 5px; padding: 5px 8px; font-size: 13px; background: #fff; }
.rte-toolbar input[type="color"] { width: 34px; height: 30px; border: 1px solid var(--panel-border); border-radius: 5px; padding: 2px; cursor: pointer; }
.rte-colors { display: inline-flex; gap: 4px; align-items: center; }
.rte-color { width: 22px !important; height: 22px !important; padding: 0 !important; border-radius: 4px !important; border: 1px solid rgba(0,0,0,0.15) !important; }
.rte-color:hover { transform: scale(1.12); }
.rte-editor { min-height: 120px; border: 1px solid var(--panel-border); border-radius: 6px; padding: 10px 12px; background: #fff; font-size: 14px; overflow-y: auto; }
.rte-editor:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(34,113,177,0.15); }
.rte-editor img { max-width: 100%; border-radius: 6px; margin: 4px 0; }
.rte-editor:empty::before { content: attr(data-placeholder); color: #a5abb2; }
.side-item-text img { width: 150px; height: auto; border-radius: 6px; margin: 4px 0; cursor: zoom-in; }
.side-item-images img { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.85); display: flex; align-items: center; justify-content: center; z-index: 300; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: 8px; }
.lightbox .lightbox-close { position: absolute; top: 16px; right: 20px; font-size: 30px; color: #fff; background: none; border: none; cursor: pointer; line-height: 1; z-index: 5; }
.lightbox .order-lightbox-img { max-width: 92vw; max-height: 92vh; }
/* 商品主图 / 选项图 支持点击预览 */
.preview-product-image, .option-thumb { cursor: zoom-in; }
.option-thumb { display: inline-block; vertical-align: middle; }

/* 任务列表 */
.task-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .task-columns { grid-template-columns: 1fr; } }
.task-column { background: var(--panel-bg); border: 1px solid var(--panel-border); border-radius: 10px; overflow: hidden; }
.task-column-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--section-bg); border-bottom: 1px solid var(--panel-border); }
.task-column-head h2 { margin: 0; font-size: 15px; }
.task-count { background: var(--accent); color: #fff; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; }
.task-column-body { padding: 12px 16px; display: flex; flex-direction: column; gap: 12px; }
.task-row { border: 1px solid var(--panel-border); border-radius: 8px; padding: 10px 12px; background: #fff; }
.task-row-meta { display: flex; gap: 12px; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.task-row .side-item-text { margin: 4px 0; }
.task-list-reply { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--panel-border); font-size: 13px; color: #374151; }
.task-list-reject { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--panel-border); font-size: 13px; color: var(--danger); }
.task-row-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.task-type-tag { font-size: 12px; color: var(--accent); background: #eef4fb; border: 1px solid #c7d8ea; border-radius: 999px; padding: 1px 10px; margin-right: 8px; }
/* 订单备注（4 条一行，差异用颜色标识） */
.wc-notes-section { background: var(--section-bg); border: 1px solid var(--panel-border); border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; }
.wc-notes-section h2 { font-size: 14px; margin: 0 0 10px; color: #374151; border-bottom: 1px solid var(--panel-border); padding-bottom: 6px; }
.wc-notes-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.wc-notes-loading, .wc-notes-empty { color: var(--muted); font-size: 13px; grid-column: 1 / -1; }
.wc-note { background: #fff; border: 1px solid var(--panel-border); border-radius: 8px; padding: 8px 10px; min-height: 64px; display: flex; flex-direction: column; }
.wc-note.new { background: #e9f6ee; border-color: #2e7d32; }
.wc-note.changed { background: #fdf3e3; border-color: #e0a800; }
.wc-note-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 5px; }
.wc-note-time { font-size: 11px; color: var(--muted); }
.wc-badge { font-size: 11px; color: #fff; background: var(--accent); border-radius: 999px; padding: 0 8px; line-height: 17px; }
.wc-note.new .wc-badge { background: #2e7d32; }
.wc-note.changed .wc-badge { background: #e0a800; }
.wc-note-body { font-size: 12px; color: #374151; line-height: 1.45; word-break: break-word; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
@media (max-width: 900px) { .wc-notes-grid { grid-template-columns: repeat(2, 1fr); } }
.task-card-reply { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--panel-border); font-size: 13px; color: #374151; }
.page-header-list { display: flex; justify-content: space-between; align-items: center; }
.back-link { color: var(--accent); text-decoration: none; font-size: 13px; }
.muted { color: var(--muted); font-size: 13px; }
.error { color: var(--danger); }
.note { color: var(--muted); font-size: 12px; margin-top: 8px; }
.notice.error {
  background: #fcf0f1; border: 1px solid var(--danger); color: var(--danger);
  padding: 10px 14px; border-radius: 8px; margin-bottom: 12px;
}
.notice {
  background: #eef4fb; border: 1px solid #c7d8ea; color: #1c4f82;
  padding: 14px 16px; border-radius: 8px; margin-bottom: 12px;
}

/* ---------- 汇率设置 ---------- */
.toolbar {
  display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap;
  background: var(--panel-bg); border: 1px solid var(--panel-border);
  border-radius: 10px; padding: 14px 18px; margin-bottom: 16px;
}
.toolbar-field { display: flex; flex-direction: column; }
.toolbar-field .form-label { margin-bottom: 4px; }
.select-input {
  border: 1px solid var(--panel-border); border-radius: 6px;
  padding: 8px 12px; font-size: 14px; background: #fff; color: var(--text);
}
.select-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(34,113,177,0.15); }
.toolbar-status { align-self: center; font-size: 13px; margin-left: 4px; }
.toolbar-status.loading { color: var(--muted); }
.toolbar-status.ok { color: var(--success); }
.toolbar-status.error { color: var(--danger); }

.rate-panel { margin-top: 4px; }
.rate-panel-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid var(--panel-border);
}
.rate-panel-header h2 { margin: 0; font-size: 15px; }
.rate-ym { color: var(--accent); font-family: ui-monospace, monospace; font-size: 14px; }
.rate-actions { display: flex; gap: 8px; }
.rate-table { width: 100%; border-collapse: collapse; }
.rate-table th, .rate-table td { padding: 10px 20px; border-bottom: 1px solid var(--panel-border); font-size: 14px; }
.rate-table tr:last-child td { border-bottom: none; }
.rate-table thead th { background: var(--section-bg); color: #374151; font-weight: 600; font-size: 13px; }
.rate-currency { font-weight: 600; width: 200px; }
.rate-currency-input { width: 160px; font-size: 13px; padding: 5px 8px; text-transform: uppercase; }
.rate-input {
  width: 220px; border: 1px solid var(--panel-border); border-radius: 6px;
  padding: 8px 12px; font-size: 14px; background: #fff; color: var(--text);
  font-variant-numeric: tabular-nums;
}
.rate-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(34,113,177,0.15); }
.rate-input[readonly] { background: var(--section-bg); color: #4b5563; cursor: default; }

/* ---------- 主数据管理 ---------- */
.tabs { display: flex; gap: 4px; margin-bottom: 16px; background: var(--panel-bg); border: 1px solid var(--panel-border); border-radius: 10px; padding: 6px; }
.tab {
  flex: 1; text-align: center; padding: 9px 12px; border-radius: 7px;
  color: var(--text); text-decoration: none; font-weight: 500; font-size: 14px;
}
.tab:hover { background: var(--section-bg); }
.tab.is-active { background: var(--accent); color: #fff; }

.section-panel { margin-bottom: 16px; }
.section-header {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 16px 20px; border-bottom: 1px solid var(--panel-border);
}
.section-header h2 { margin: 0; font-size: 15px; }
.section-header .status { margin: 0; font-size: 13px; }

.inline-form { display: flex; gap: 8px; margin-left: auto; }
.inline-form .text-input { width: 220px; }

.switch-row { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.switch-input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.switch-label { font-size: 13px; color: var(--muted); }

.user-add-block { padding: 20px; border-top: 1px solid var(--panel-border); }
.user-add-block h3 { margin: 0 0 14px; font-size: 15px; }
.ptype-hint { color: var(--muted); font-size: 12px; max-width: 520px; }
.ptype-hint code { background: var(--section-bg); padding: 1px 4px; border-radius: 4px; }
.ptype-rule { font-family: ui-monospace, monospace; font-size: 13px; }
.ptype-rule + td { white-space: nowrap; }
.ptype-sites-wrap { display: inline-flex; align-items: center; gap: 8px; }
.ptype-site-check { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; cursor: pointer; }
.ptype-inline-select { max-width: 160px; padding: 4px 6px; border: 1px solid var(--panel-border); border-radius: 6px; font-size: 13px; }
.ptype-inline-value { font-weight: 600; color: var(--accent); }
.user-form { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; align-items: end; }
.user-form .form-field { display: flex; flex-direction: column; }
.user-form-actions { grid-column: span 5; display: flex; justify-content: flex-end; }
.form-actions { margin-top: 16px; display: flex; justify-content: flex-end; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: end; }
.form-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-items: end; }
.span-all { grid-column: 1 / -1; }
.modal-panel.modal-panel--wide { width: 760px; }
/* 添加已收款订单 浮层 */
.paid-fetch-row { display: flex; align-items: center; gap: 10px; margin: 14px 0 4px; }
.paid-info { background: var(--section-bg); border: 1px solid var(--panel-border); border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; }
.paid-info .field-label { font-size: 12px; color: var(--muted); margin: 0 0 8px; display: block; }
.paid-info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.paid-info-grid > div { text-align: center; }
.paid-info-grid span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.paid-info-grid b { font-size: 15px; color: #111827; }
.form-label.required::after { content: ' *'; color: #c62828; }
.paid-cny-display { background: var(--section-bg); border: 1px solid var(--panel-border); border-radius: 8px; padding: 8px 12px; display: flex; flex-direction: column; gap: 3px; min-height: 40px; justify-content: center; }
.paid-cny-display .field-label { font-size: 13px; color: #374151; margin: 0; }
.paid-cny-display b { font-size: 17px; color: #111827; }
.inst-ctx { background: var(--section-bg); border: 1px solid var(--panel-border); border-radius: 8px; padding: 8px 12px; margin-bottom: 14px; font-size: 13px; }
.inst-ctx .field-label { font-size: 12px; color: var(--muted); margin: 0 4px 0 0; }
.inst-ctx b { color: #111827; font-variant-numeric: tabular-nums; }
/* 归属团队 多选下拉 */
.field-ms { position: relative; grid-column: auto; }
.ms-field { display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid var(--panel-border); border-radius: 6px; background: #fff; padding: 7px 12px; cursor: pointer; min-height: 40px; }
.ms-field .ms-label { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-field.has-value .ms-label { color: var(--text); }
.ms-caret { color: var(--muted); flex: 0 0 auto; }
.ms-panel { position: absolute; top: calc(100% + 4px); right: 0; left: auto; min-width: 240px; z-index: 30; background: #fff; border: 1px solid var(--panel-border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.12); max-height: 220px; overflow: auto; padding: 6px; display: none; }
.field-ms.open .ms-panel { display: block; }
.ms-option { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; color: #374151; }
.ms-option:hover { background: var(--section-bg); }
@media (max-width: 900px) { .user-form { grid-template-columns: 1fr 1fr; } }

/* ---------- 通用录入输入框（采购 / 物流 / 收款）---------- */
.pt-input {
  height: 40px;
  width: 100%;
  max-width: 220px;
  border: 1px solid #c6cbd4;         /* 灰色边框 */
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  background: #fff;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.pt-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(34,113,177,0.15); }
.pt-input[readonly], .pt-input:disabled { background: var(--section-bg); color: #4b5563; }

/* ---------- 采购明细 ---------- */
.purchase-table .pt-input { width: 140px; }
.purchase-table .pt-text { width: 170px; }
.purchase-table .pt-number { width: 125px; text-align: right; }
.purchase-table .pt-order { font-family: ui-monospace, monospace; }
.purchase-table .pt-paid { white-space: nowrap; }
.col-amount { text-align: right; }
.purchase-table .col-amount { text-align: right; }
.pt-msg { font-size: 12px; margin-left: 6px; }
.pt-msg.loading { color: var(--muted); }
.pt-msg.ok { color: var(--success); }
.pt-msg.error { color: var(--danger); }

/* ---------- 物流明细 ---------- */
.logistics-table .logi-group td {
  background: var(--section-bg);
  padding: 8px 16px;
}
.logi-group-label { font-weight: 600; color: #374151; margin-right: 12px; }
.logistics-table .pt-input { width: 150px; }
.logistics-table .pt-order { font-family: ui-monospace, monospace; white-space: nowrap; }
.pt-status {
  font-weight: 600; color: var(--accent); white-space: nowrap;
  display: inline-block; padding: 7px 10px; background: #eef4fb;
  border-radius: 6px; font-size: 13px;
}
.logistics-table .pt-status { display: block; text-align: center; }

/* ---------- 物流明细：卡片/区域模式 ---------- */
.logi-orders { display: flex; flex-direction: column; gap: 18px; }
.logi-order {
  background: var(--panel-bg); border: 1px solid var(--panel-border);
  border-radius: 10px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.logi-order-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; background: var(--section-bg); border-bottom: 1px solid var(--panel-border);
}
.logi-order-header h2 { margin: 0; font-size: 16px; color: #374151; }
.logi-order-summary { margin-top: 4px; font-size: 13px; color: var(--muted); }
.logi-order-summary .sum-item b { color: var(--text); }
.logi-order-actions { display: flex; align-items: center; gap: 10px; }
.pay-menu { position: relative; }
.pay-menu-list { position: absolute; right: 0; top: calc(100% + 4px); min-width: 168px; background: #fff; border: 1px solid var(--panel-border); border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,0.12); z-index: 20; overflow: hidden; }
.pay-menu-list[hidden] { display: none; }
.pay-menu-item { display: block; width: 100%; text-align: left; padding: 9px 14px; background: #fff; border: none; cursor: pointer; font-size: 13px; color: var(--text); }
.pay-menu-item:hover { background: var(--section-bg); }
.pay-menu-item + .pay-menu-item { border-top: 1px solid var(--panel-border); }
.logi-order-top { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.logi-order-header--stack { flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 6px; }
.logi-order-header--stack .logi-order-top { width: 100%; align-items: center; flex-wrap: nowrap; }
.logi-order-header--stack .logi-order-actions { margin-left: auto; }
.logi-dates { flex-wrap: wrap; row-gap: 4px; }
.order-type-badge { font-size: 12px; font-weight: 600; border-radius: 999px; padding: 1px 10px; margin-left: 10px; vertical-align: middle; }
.order-type-badge.now { color: #1c7c37; background: #e9f6ee; border: 1px solid #2e7d32; }
.order-type-badge.install { color: #b26a00; background: #fdf3e3; border: 1px solid #e0a800; }
.order-type-badge.unset { color: #6b7280; background: #eef1f5; border: 1px solid #d1d5db; }
.pay-status-badge { font-size: 12px; font-weight: 600; border-radius: 999px; padding: 1px 10px; margin-left: 6px; vertical-align: middle; }
.pay-status-badge.pending { color: #b26a00; background: #fdf3e3; border: 1px solid #e0a800; }
.pay-status-badge.done { color: #1c7c37; background: #e9f6ee; border: 1px solid #2e7d32; }
.pay-status-badge.cancel { color: #b91c1c; background: #fdecec; border: 1px solid #ef4444; }
.logi-dates { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.logi-amounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--panel-border); background: var(--section-bg); }
.logi-amount-cell { background: #fff; border: 1px solid var(--panel-border); border-radius: 8px; padding: 8px 12px; text-align: center; position: relative; }
.logi-amount-cell span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.logi-amount-cell b { font-size: 15px; color: #111827; }
.amount-detail { position: absolute; top: 5px; right: 6px; font-size: 11px; line-height: 1; padding: 3px 8px; border: 1px solid var(--panel-border); border-radius: 999px; background: #fff; color: var(--muted); cursor: pointer; }
.amount-detail:hover { color: #1f6feb; border-color: #1f6feb; }
.pay-settle { margin-left: 8px; display: flex; align-items: center; gap: 15px; }
.logi-cards { padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.logi-empty { margin: 0; }
.logi-item {
  background: #fff; border: 1px solid var(--panel-border); border-radius: 8px; padding: 14px 16px;
}
.logi-item-toolbar {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px;
}
.logi-item-title { font-weight: 700; font-size: 14px; color: var(--text); }
.logi-actions { display: flex; align-items: center; gap: 8px; }
.logi-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 16px;
}
.logi-field { display: flex; flex-direction: column; gap: 4px; }
.logi-field-label { font-size: 12px; color: var(--muted); }
.logi-field .pt-input { width: 100%; }
@media (max-width: 900px) { .logi-grid { grid-template-columns: 1fr 1fr; } }

/* 收款卡：5 列布局（款项类型/付款渠道/币种/金额/人民币金额），备注行含可选「订单号」列 */
.logi-grid--pay { grid-template-columns: repeat(5, 1fr); }
.logi-grid--pay .logi-field--full { grid-column: 1 / -1; }
@media (max-width: 900px) {
  .logi-grid--pay { grid-template-columns: 1fr 1fr; }
  .logi-grid--pay .logi-field--full { grid-column: 1 / -1; }
}
.logi-remark-row { display: flex; gap: 12px 16px; margin-top: 12px; }
.logi-remark-row .logi-field--order { flex: 0 0 200px; }
.logi-remark-row .logi-field--remark { flex: 1; }

/* ---------- 详情：单栏居中 ---------- */
.order-info-panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
/* 下拉多选面板需要溢出父容器展示，故不在此处裁剪（overflow-hidden 会遮住 .ms-panel） */
.preview-source-section {
  padding: 18px 24px;
  border-bottom: 1px solid var(--panel-border);
}
.preview-source-section:last-child { border-bottom: none; }
.preview-source-section h2 {
  font-size: 15px; margin: 0 0 14px; padding-bottom: 8px;
  border-bottom: 1px solid var(--panel-border); color: #374151;
}
.preview-order-summary {
  display: flex; flex-direction: column; gap: 12px;
}
.summary-row { display: grid; gap: 12px; }
.summary-row--main { grid-template-columns: repeat(6, 1fr); }
.summary-row--time { grid-template-columns: repeat(2, 1fr); }
.summary-row .field { padding: 6px 10px; }
.field {
  background: var(--section-bg); border: 1px solid var(--panel-border);
  border-radius: 8px; padding: 10px 14px;
}
.field .field-label { color: var(--muted); font-size: 12px; display: block; margin-bottom: 2px; }
.field .field-value { font-size: 14px; font-weight: 600; word-break: break-all; }

.preview-copy-field {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--section-bg); border: 1px solid var(--panel-border);
  border-radius: 8px; padding: 10px 14px; margin-bottom: 10px;
}
.preview-copy-field .field-label { color: var(--muted); font-size: 12px; display: block; }
.preview-copy-field .field-value { font-size: 14px; font-weight: 600; word-break: break-all; }
.preview-copy-link {
  flex-shrink: 0; background: #fff; border: 1px solid var(--panel-border);
  border-radius: 5px; padding: 4px 12px; cursor: pointer; font-size: 12px; color: var(--accent);
}
.preview-copy-link:hover { border-color: var(--accent); }
.preview-copy-link:disabled { opacity: 0.5; cursor: not-allowed; }
.preview-copy-actions { display: flex; gap: 6px; flex-shrink: 0; align-items: center; }
.preview-ai-link {
  flex-shrink: 0; background: var(--accent); border: 1px solid var(--accent);
  border-radius: 5px; padding: 4px 12px; cursor: pointer; font-size: 12px; color: #fff;
}
.preview-ai-link:hover { background: #1a5c90; }
.preview-ai-link:disabled { opacity: 0.6; cursor: wait; }

/* 联系人信息：email/phone 一行两列，地址独占一行 */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
  align-items: stretch;
}
.contact-stack { display: flex; flex-direction: column; gap: 10px; }
.contact-head { display: flex; align-items: center; gap: 10px; }
.contact-head h2 { margin: 0; }
.contact-mod-flag { font-size: 12px; font-weight: 600; color: #b45309; background: #fffbeb; border: 1px solid #fde68a; border-radius: 999px; padding: 1px 10px; }
.pause-skus-wrap { margin-bottom: 10px; }
.pause-skus-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.pause-sku-check { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; cursor: pointer; padding: 4px 10px; border: 1px solid var(--panel-border); border-radius: 6px; background: #fff; }
.pause-sku-check input { width: 15px; height: 15px; }
.resume-skus-value { font-weight: 600; color: var(--text); }
.contact-grid .preview-copy-field { margin-bottom: 0; }

.preview-source-card {
  display: flex; gap: 16px; background: var(--section-bg);
  border: 1px solid var(--panel-border); border-radius: 8px;
  padding: 14px; margin-bottom: 12px;
}
.item-options {
  margin: 0 0 14px;
  border: 1px solid var(--panel-border); border-radius: 8px; overflow: hidden; background: #fff;
}
.item-options-label {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 12px; background: var(--section-bg);
  border-bottom: 1px solid var(--panel-border);
  font-size: 13px; color: #374151; font-weight: 600;
}
.item-options-toggle {
  font-size: 12px; padding: 3px 12px; border: 1px solid var(--panel-border);
  border-radius: 6px; background: #fff; cursor: pointer; color: #374151;
}
.item-options-toggle:hover { border-color: var(--accent); color: var(--accent); }
.item-options-body .option-table { border: none; border-radius: 0; }
.preview-source-card:last-child { margin-bottom: 0; }
.preview-product-image {
  flex-shrink: 0; width: 100px; height: 100px; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--panel-border); background: #fff;
}
.preview-product-info { flex: 1; min-width: 0; }
.product-title {
  font-size: 15px; font-weight: 700; margin: 0 0 6px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.product-biz {
  flex-shrink: 0; font-size: 12px; font-weight: 600; color: #0a7e43;
  background: #e4f5e9; border: 1px solid #bfe3cb; border-radius: 999px; padding: 1px 10px;
}
.product-biz.accessory { background: #fff4e5; color: #a15c00; border-color: #fde68a; }
.product-biz.needpo { background: #eef2ff; color: #3730a3; border-color: #c7d2fe; }
.product-biz.src-api { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.product-biz.src-manual { background: #e0f2fe; color: #0369a1; border-color: #bae6fd; }
.product-biz.subno { background: #eef6ff; color: #1d4ed8; border-color: #bfdbfe; }
.preview-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.preview-section-head h2 { margin: 0; }
.preview-product-meta {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 16px; margin-top: 10px;
}
.preview-product-meta .field { padding: 8px 12px; }

.preview-option-card {
  display: flex; gap: 14px; align-items: center;
  background: var(--section-bg); border: 1px solid var(--panel-border);
  border-radius: 8px; padding: 12px 14px; margin-bottom: 10px;
}
.preview-option-card:last-child { margin-bottom: 0; }
.preview-option-image {
  flex-shrink: 0; width: 88px; height: 88px; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--panel-border); background: #fff;
}
.preview-option-info { flex: 1; min-width: 0; }
.preview-option-name { font-weight: 700; font-size: 14px; }
.preview-option-value { margin-top: 2px; }
.preview-option-meta { display: flex; gap: 16px; margin-top: 6px; font-size: 13px; color: var(--muted); }
.preview-option-meta strong { color: var(--text); font-weight: 600; }

/* 选项信息：表格式 */
.option-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  overflow: hidden;
}
.option-table th, .option-table td {
  border: 1px solid var(--panel-border);
  padding: 10px 12px;
  font-size: 13px;
  text-align: left;
  vertical-align: middle;
}
.option-table thead th {
  background: var(--section-bg);
  color: #374151;
  font-weight: 600;
  white-space: nowrap;
}
.option-table tbody tr:hover { background: #fafbfc; }
.option-table .cell-img { width: 92px; text-align: center; }
.option-thumb {
  width: 64px; height: 64px; object-fit: cover;
  border-radius: 6px; border: 1px solid var(--panel-border); background: #fff;
  display: block; margin: 0 auto;
}
.cell-empty { color: var(--muted); }

/* 金额与费用 */
.money-summary {
  background: var(--section-bg); border: 1px solid var(--panel-border);
  border-radius: 8px; padding: 10px 14px; margin-bottom: 12px;
}
.money-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: 14px; }
.money-row + .money-row { border-top: 1px dashed var(--panel-border); }
.money-label { color: var(--muted); }
.money-value { font-weight: 600; text-align: right; }
.money-row.is-total .money-label, .money-row.is-total .money-value { font-weight: 700; color: var(--text); font-size: 16px; }
.fee-block-label { font-size: 13px; color: #374151; margin: 12px 0 6px; font-weight: 600; }
.fee-block {
  background: var(--section-bg); border: 1px solid var(--panel-border);
  border-radius: 8px; padding: 6px 14px; margin-bottom: 10px;
}
.fee-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; font-size: 14px; }
.fee-row + .fee-row { border-top: 1px dashed var(--panel-border); }
.fee-name { flex: 1; min-width: 0; }
.fee-tag {
  background: #fff; border: 1px solid var(--panel-border); border-radius: 5px;
  padding: 2px 8px; font-family: ui-monospace, monospace; font-size: 13px;
}
.fee-value { font-weight: 600; white-space: nowrap; }
.shipping-row { align-items: flex-start; }
.fee-info { flex: 1; min-width: 0; }
.fee-items { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }

/* ---------- 列表 ---------- */
.table-wrap {
  background: var(--panel-bg); border: 1px solid var(--panel-border);
  border-radius: 10px; overflow-x: auto; box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.data-table { width: 100%; min-width: 920px; border-collapse: collapse; }
.data-table th, .data-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--panel-border); font-size: 14px; }
.data-table thead th { background: var(--section-bg); color: #374151; font-weight: 600; font-size: 13px; white-space: nowrap; }
.data-table tbody tr:hover { background: #fafbfc; }
.data-table tbody tr:last-child td { border-bottom: none; }
.col-order { font-weight: 600; color: var(--accent); }
.order-link { color: var(--accent); text-decoration: none; font-weight: 600; }
.order-link:hover { text-decoration: underline; }
.sku-tip { cursor: help; border-bottom: 1px dashed var(--muted); }
.col-type { font-weight: 700; color: var(--text); white-space: nowrap; }
.col-site { white-space: nowrap; }
.col-sku { font-family: ui-monospace, monospace; font-size: 13px; color: var(--text); }
.col-brand { font-weight: 600; color: var(--text); white-space: nowrap; }
.col-ptype { font-weight: 600; color: var(--accent); white-space: nowrap; }
.col-qty { text-align: center; font-variant-numeric: tabular-nums; }
.col-action { text-align: right; }
.col-rmb { font-weight: 600; font-variant-numeric: tabular-nums; }

/* 操作列固定在最右侧，横向滚动时始终可见 */
.table-wrap thead .col-action { position: sticky; right: 0; background: var(--section-bg); z-index: 3; }
.table-wrap tbody .col-action { position: sticky; right: 0; background: var(--panel-bg); z-index: 2; box-shadow: -8px 0 8px -8px rgba(0,0,0,0.15); }
.table-wrap tbody tr:hover .col-action { background: #fafbfc; }
.empty-cell { text-align: center; color: var(--muted); padding: 40px 16px !important; }

.status-badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: var(--section-bg); border: 1px solid var(--panel-border); color: #374151;
}
.status-completed, .status-processing { background: #ecf6ff; color: var(--success); border-color: #b8e0c0; }
.status-cancelled, .status-failed, .status-refunded { background: #fcf0f1; color: var(--danger); border-color: #f0b9bb; }
.status-pending, .status-on-hold { background: #fff8e7; color: var(--warning); border-color: #f2dd8f; }

/* ---------- 按钮 ---------- */
.button {
  display: inline-block; background: #fff; border: 1px solid var(--panel-border);
  border-radius: 6px; padding: 7px 16px; cursor: pointer; font-size: 14px;
  color: var(--text); text-decoration: none; text-align: center;
}
.button:hover { border-color: var(--accent); color: var(--accent); }
.button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.button.primary:hover { background: #1a5c90; }
.button.small { padding: 4px 12px; font-size: 12px; }
.button:disabled { opacity: .55; cursor: not-allowed; background: #e5e7eb; border-color: #d1d5db; color: #9ca3af; }
.button.primary:disabled { background: #cbd5e1; border-color: #cbd5e1; color: #f1f5f9; }
.button:disabled:hover { border-color: #d1d5db; color: #9ca3af; }
.button.disabled, .button.primary.disabled { opacity: .55; cursor: not-allowed; pointer-events: none; background: #cbd5e1; border-color: #cbd5e1; color: #f1f5f9; }

/* ---------- 浮层 ---------- */
.modal { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.45); }
.modal-panel {
  position: relative; background: var(--panel-bg); border-radius: 12px;
  width: 440px; max-width: calc(100vw - 32px); box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  /* 超过视口时内部滚动，保证底部操作按钮始终可见 */
  max-height: calc(100vh - 48px);
  display: flex; flex-direction: column;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--panel-border); flex: none; }
.modal-header h2 { margin: 0; font-size: 16px; }
.modal-body { padding: 20px; flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--panel-border); flex: none; }
.icon-button { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--muted); line-height: 1; }
.icon-button:hover { color: var(--text); }

/* 实收计算明细浮层 */
.modal-panel--cal { width: 640px; }
.cal-block { margin: 0 0 14px; }
.cal-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 14px; }
.cal-side-title { font-size: 13px; font-weight: 600; color: #111827; margin-bottom: 6px; }
.cal-title { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.cal-solid { border: 1px solid var(--panel-border); border-radius: 8px; padding: 10px 14px; }
.cal-line { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 4px 0; }
.cal-line span { color: var(--muted); }
.cal-line b { color: #111827; font-variant-numeric: tabular-nums; }
.cal-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.cal-table th, .cal-table td { padding: 6px 8px; border-bottom: 1px solid var(--panel-border); text-align: left; }
.cal-table th { color: var(--muted); font-weight: 600; }
.cal-table td { font-variant-numeric: tabular-nums; }
.cal-table .cal-plus { color: #1c7c37; }
.cal-table .cal-minus { color: #c62828; }
.cal-formula { margin: 4px 0 14px; font-size: 12px; }

/* 浮层表单字段（干净的 label + 输入框，不套用详情页数据框的 .field 样式） */
.form-field { display: block; margin-top: 16px; }
.form-label {
  display: block; font-size: 13px; color: var(--text);
  font-weight: 600; margin-bottom: 6px;
}
.radio-row { display: flex; gap: 18px; align-items: center; padding: 4px 0; }
.radio-label { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; cursor: pointer; color: var(--text); }
.radio-label input { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }
.text-input {
  width: 100%; border: 1px solid var(--panel-border); border-radius: 6px;
  padding: 9px 12px; font-size: 14px; background: #fff; color: var(--text);
}
.text-input::placeholder { color: #a5abb2; }
.text-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(34,113,177,0.15); }
.status { font-size: 13px; margin: 10px 0 0; }
.status.loading { color: var(--muted); }
.status.ok { color: var(--success); }
.status.error { color: var(--danger); }

/* ---------- 订单处理日志 ---------- */
.log-legend { display: flex; gap: 18px; align-items: center; margin: 0 0 16px; font-size: 13px; color: var(--muted); }
.log-legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.legend-dot.done { background: var(--success); }
.legend-dot.pending { background: #d1d5db; }
.log-list { display: grid; gap: 16px; }
.log-order-card { background: var(--panel-bg); border: 1px solid var(--panel-border); border-radius: 12px; padding: 16px; box-shadow: 0 1px 2px rgba(0,0,0,0.03); }
.log-order-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.order-number { font-size: 16px; font-weight: 700; color: var(--accent); text-decoration: none; }
.order-number:hover { text-decoration: underline; }
.order-type { font-size: 12px; font-weight: 700; color: var(--text); background: var(--section-bg); border: 1px solid var(--panel-border); border-radius: 999px; padding: 2px 10px; }
.order-progress { margin-left: auto; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.order-chain { display: flex; flex-wrap: wrap; gap: 10px; }
.chain-step { flex: 1 1 130px; min-width: 130px; border: 1px solid var(--panel-border); border-radius: 8px; padding: 10px 12px; background: #fff; }
.chain-step.done { border-color: #b8e0c0; }
.chain-step.todo { opacity: 0.85; border-style: dashed; }
.chain-step.pending { opacity: 0.6; border-style: dashed; }
.step-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); margin-bottom: 6px; }
.chain-step.done .step-dot { background: var(--success); }
.step-label { font-size: 12px; color: var(--muted); }
.step-badge { display: inline-block; margin: 4px 0 6px; font-size: 12px; font-weight: 600; color: #6b7280; }
.chain-step.done .step-badge { color: var(--success); }
.chain-step.todo .step-badge { color: var(--warning); }
.step-value { font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; }
.chain-step.pending .step-value { color: var(--muted); font-style: italic; }
.step-extra { margin-top: 8px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.step-extra br { line-height: 1; }

/* ---------- 利润率估算 ---------- */
.profit-summary { display: flex; flex-wrap: wrap; gap: 14px; margin: 0 0 18px; }
.profit-summary-item { flex: 1 1 160px; min-width: 160px; background: var(--panel-bg); border: 1px solid var(--panel-border); border-radius: 10px; padding: 12px 16px; }
.profit-summary-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.profit-summary-value { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.profit-summary-value.neg { color: var(--danger); }
.profit-list { display: grid; gap: 16px; }
.profit-card { background: var(--panel-bg); border: 1px solid var(--panel-border); border-radius: 12px; padding: 16px; }
.profit-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.profit-head .order-number { font-size: 16px; font-weight: 700; color: var(--accent); text-decoration: none; }
.profit-head .order-number:hover { text-decoration: underline; }
.profit-head-right { display: flex; align-items: center; gap: 10px; }
.margin-badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; border: 1px solid var(--panel-border); }
.margin-badge.pos { color: var(--success); border-color: #b8e0c0; background: #ecf6ff; }
.margin-badge.neg { color: var(--danger); border-color: #f0b9bb; background: #fcf0f1; }
.margin-badge.pending { color: var(--muted); background: var(--section-bg); }
.profit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.profit-field { border: 1px solid var(--panel-border); border-radius: 8px; padding: 10px 12px; background: #fff; }
.profit-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.profit-value { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text); }
.profit-field.rev .profit-value { color: var(--success); }
.profit-field.cost .profit-value { color: var(--text); font-weight: 700; }
.profit-field.neg .profit-value { color: var(--danger); }

/* ---------- 详情页：审单状态卡 ---------- */
.review-status { padding: 4px 2px; }
.review-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0; }
.review-row .field-label { margin: 0; }

/* ---------- 采购明细：采购单文件列 ---------- */
.pt-file-cell { min-width: 160px; }
.pt-file-view { display: none; }
.pt-file-cell.saved .pt-file-browse { display: block; }
.pt-file-cell.editing .pt-file-edit { display: block; }
.pt-file-link { color: var(--accent); text-decoration: none; font-weight: 600; word-break: break-all; }
.pt-file-link:hover { text-decoration: underline; }
.pt-dropzone { border: 1px dashed var(--panel-border); border-radius: 6px; padding: 10px 8px; cursor: pointer; background: var(--section-bg); text-align: center; }
.pt-dropzone:hover, .pt-dropzone.dragging { border-color: var(--accent); background: #eef4fb; }
.pt-drop-hint { font-size: 12px; color: var(--muted); display: block; }
.pt-current-file { display: block; font-size: 12px; color: #374151; margin-top: 4px; word-break: break-all; }
.pt-file-msg { display: block; font-size: 12px; margin-top: 4px; min-height: 14px; }
.pt-file-msg.ok { color: var(--success); }
.pt-file-msg.error { color: var(--danger); }
.pt-file-msg.loading { color: var(--muted); }

/* ---------- LLM配置 ---------- */
.llm-form { flex: 1 1 100%; width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 14px; align-items: end; }
.llm-form .form-field { margin-top: 0; }
.llm-form .text-input { width: 100%; }
.llm-name-row { display: flex; gap: 6px; align-items: center; }
.llm-name-row .text-input { flex: 1 1 auto; }
.llm-name-row .button { flex-shrink: 0; white-space: nowrap; }

/* ---------- Prompt管理 ---------- */
.prompt-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 14px; align-items: end; width: 100%; }
.prompt-form .form-field { margin-top: 0; }
.prompt-form .text-input { width: 100%; }
.prompt-content-field { grid-column: 1 / -1; }
.prompt-form-actions { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; }
.prompt-content-preview { font-family: ui-monospace, monospace; font-size: 12px; color: var(--text); }
.prompt-updated { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.llm-form-actions { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; }
.llm-url { font-family: ui-monospace, monospace; font-size: 12px; color: var(--text); word-break: break-all; }
.key-mask { font-weight: 600; color: var(--text); }

/* ---------- 物流地址 AI 分析结果 ---------- */
.ai-result { margin-top: 8px; border: 1px solid var(--panel-border); border-radius: 8px; padding: 12px 14px; background: var(--section-bg); }
.ai-result--cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 900px) { .ai-result--cols { grid-template-columns: 1fr; } }
.ai-col { border: 1px solid var(--panel-border); border-radius: 8px; background: #fff; padding: 10px 12px; }
.ai-col-title { font-size: 14px; font-weight: 700; color: #374151; margin-bottom: 6px; border-bottom: 1px solid var(--panel-border); padding-bottom: 6px; }
.ai-col-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ai-result-label { font-size: 13px; color: var(--muted); }
.ai-result-conclusion { font-size: 14px; font-weight: 700; color: var(--accent); }
.ai-result-time { font-size: 12px; color: var(--muted); margin-left: auto; }
.ai-result-time b { color: #374151; font-variant-numeric: tabular-nums; }
.ai-col-detail { margin-top: 8px; font-size: 13px; color: #374151; }
.ai-col-detail summary { cursor: pointer; color: var(--accent); font-size: 12px; }
.ai-result-body { margin-top: 6px; }
.ai-history { margin-top: 8px; font-size: 13px; color: #374151; border-top: 1px dashed var(--panel-border); padding-top: 6px; }
.ai-history summary { cursor: pointer; color: var(--accent); font-size: 13px; font-weight: 600; }
.ai-history-list { list-style: none; margin: 6px 0 0; padding: 0; }
.ai-history-item { display: flex; align-items: center; gap: 10px; padding: 4px 0; border-bottom: 1px solid var(--panel-border); }
.ai-history-item:last-child { border-bottom: none; }
.ai-history-time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ai-history-conclusion { font-size: 13px; font-weight: 600; color: var(--accent); }

/* ---------- 邮箱 AI 校验状态 ---------- */
.email-status { display: inline-flex; align-items: center; gap: 5px; margin-top: 5px; font-size: 12px; }
.es-icon { font-weight: 700; }
.email-status.valid { color: var(--success); }
.email-status.valid .es-icon { font-size: 14px; }
.email-status.invalid { color: var(--danger); }
.email-status.invalid .es-text { word-break: break-all; }
.email-status.unknown { color: var(--warning); }
.email-status.loading { color: var(--muted); }

/* ---------- AI审单结果 ---------- */
.ai-review-section { margin-bottom: 16px; }
.ai-review-section-head { display: flex; justify-content: space-between; align-items: center; }
.ai-review-section-head h2 { margin: 0 0 10px; }
.ai-review-section.collapsed .ai-review-list, .ai-review-section.collapsed .ai-review-meta, .ai-review-section.collapsed .ai-review-feedback { display: none; }
.ai-review-meta { font-size: 12px; color: var(--muted); margin: 0 0 10px; }
.ai-review-list { display: grid; gap: 12px; }
.ai-review-item { border: 1px solid var(--panel-border); border-radius: 8px; padding: 12px 14px; background: #fff; }
.ai-review-title { font-size: 14px; font-weight: 700; color: #374151; margin-bottom: 6px; }
.ai-review-sku { font-family: ui-monospace, monospace; font-size: 12px; color: var(--accent); font-weight: 600; margin-left: 6px; }
.ai-review-brand { font-size: 12px; color: #fff; background: var(--accent); border-radius: 999px; padding: 1px 8px; margin-left: 8px; }
.ai-review-body { font-size: 13px; color: #374151; }
.ai-review-body h1, .ai-review-body h2, .ai-review-body h3, .ai-review-body h4, .ai-review-body h5, .ai-review-body h6 { font-size: 14px; font-weight: 700; margin: 10px 0 4px; color: #1f2937; }
.ai-review-body p { margin: 6px 0; }
.ai-review-body ul, .ai-review-body ol { margin: 6px 0; padding-left: 22px; }
.ai-review-body li { margin: 2px 0; }
/* 赞踩反馈条 */
.ai-review-feedback{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:14px;padding:10px 14px;border:1px solid var(--panel-border);border-radius:8px;background:var(--section-bg)}
.ai-review-feedback .feedback-hint{font-size:12px;color:var(--muted);flex:1 1 240px;line-height:1.5}
.ai-review-feedback .feedback-hint b{color:#374151}
.feedback-actions{display:flex;gap:8px}
.feedback-btn{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--panel-border);border-radius:999px;background:#fff;padding:5px 14px;font-size:13px;cursor:pointer;color:#374151;transition:background .15s,border-color .15s,color .15s}
.feedback-btn:hover{border-color:var(--accent);color:var(--accent)}
.feedback-btn.active.up{background:#e9f6ee;border-color:#2e7d32;color:#2e7d32}
.feedback-btn.active.down{background:#fdecec;border-color:#c62828;color:#c62828}
.feedback-status{font-size:12px;color:var(--muted);margin:2px 0 0;flex-basis:100%}
.ai-review-body strong { font-weight: 700; }
.ai-review-body em { font-style: italic; }
.ai-review-body code { background: #f3f4f6; border: 1px solid var(--panel-border); border-radius: 4px; padding: 1px 5px; font-size: 12px; }
.ai-review-body pre.md-code { background: #f7f8fa; border: 1px solid var(--panel-border); border-radius: 6px; padding: 8px 10px; overflow-x: auto; margin: 6px 0; }
.ai-review-body pre.md-code code { background: none; border: none; padding: 0; }
.ai-review-body hr { border: none; border-top: 1px solid var(--panel-border); margin: 10px 0; }
.ai-review-body a { color: var(--accent); }

/* ---------- AI 生成邮件内容（内联） ---------- */
.email-panel { margin-top: 14px; border: 1px solid var(--panel-border); border-radius: 8px; background: var(--section-bg); }
.email-panel[hidden] { display: none; }
.email-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--panel-border); }
.email-panel-title { font-size: 14px; font-weight: 700; color: #374151; }
.email-panel-body { padding: 12px 14px; max-height: 400px; overflow: auto; word-break: break-word; font-size: 13px; line-height: 1.55; color: #374151; }
.email-panel-body p { margin: 6px 0; }
.email-panel-body h1, .email-panel-body h2, .email-panel-body h3, .email-panel-body h4, .email-panel-body h5, .email-panel-body h6 { font-size: 14px; font-weight: 700; margin: 10px 0 4px; color: #1f2937; }
.email-panel-body ul, .email-panel-body ol { margin: 6px 0; padding-left: 22px; }
.email-panel-body li { margin: 2px 0; }
.email-panel-body code { background: #eef1f5; border-radius: 4px; padding: 1px 4px; font-size: 12px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.email-panel-body pre.md-code { background: #1f2937; color: #e5e7eb; border-radius: 6px; padding: 8px 10px; overflow: auto; font-size: 12px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.email-panel-body a { color: var(--accent); }
.email-panel-body hr { border: none; border-top: 1px solid var(--panel-border); margin: 10px 0; }
.email-panel-body blockquote { border-left: 3px solid var(--panel-border); margin: 6px 0; padding: 2px 10px; color: var(--muted); }

/* ---------- 订单列表：业务处理状态下拉 ---------- */
.biz-status-select { display: block; width: 100%; min-width: 130px; margin-bottom: 6px; border: 1px solid var(--panel-border); border-radius: 5px; padding: 5px 8px; font-size: 12px; color: var(--text); background: #fff; }
.biz-status-select:focus { outline: none; border-color: var(--accent); }
.biz-status-row { margin-bottom: 6px; }
.biz-status-row .biz-status-select { margin-bottom: 0; }
.biz-status-text { font-size: 12px; color: var(--text); padding: 2px 0; line-height: 1.4; }
.logi-tracking { color: var(--accent); text-decoration: none; font-weight: 600; white-space: nowrap; }
.logi-tracking:hover { text-decoration: underline; }
/* ---- 分页条 ---- */
.pg-bar{display:flex; align-items:center; gap:18px; padding:14px 4px; flex-wrap:wrap}
.pg-total{font-size:13px; color:var(--muted)}
.pg-total b{color:#111827}
.pg-per{font-size:13px; color:var(--muted); display:flex; align-items:center; gap:6px}
.pg-per-select{border:1px solid var(--panel-border); border-radius:6px; padding:3px 8px; font-size:13px; background:#fff}
.pg-pager{display:flex; align-items:center; gap:4px; flex-wrap:wrap}
.pg-nav,.pg-num{display:inline-block; min-width:30px; text-align:center; padding:5px 9px; border:1px solid var(--panel-border); border-radius:6px; background:#fff; color:var(--text); text-decoration:none; font-size:13px}
.pg-nav:hover,.pg-num:hover{border-color:var(--accent); color:var(--accent)}
.pg-nav.disabled{opacity:.45; pointer-events:none}
.pg-num.active{background:var(--accent); color:#fff; border-color:var(--accent)}
.pg-ell{color:var(--muted); padding:0 4px}
.pg-info{font-size:13px; color:var(--muted); margin-left:auto}

/* ---------- 审单规则配置 ---------- */
.audit-form { margin: 14px 20px; padding: 14px 16px; border: 1px solid var(--panel-border); border-radius: 8px; background: var(--section-bg); }
.audit-form h3 { margin: 0 0 10px; font-size: 14px; color: #374151; }
.audit-form .form-field { max-width: 560px; }
.audit-form-actions { display: flex; gap: 8px; margin-top: 12px; }
.audit-rule { white-space: pre-wrap; word-break: break-word; }
.audit-rule .text-input, .audit-brand .text-input { min-width: 160px; }

/* ---------- 收款明细：确认收齐 ---------- */
.logi-order-summary-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pay-settle-done { font-size: 13px; color: var(--success); font-weight: 600; }
.pay-settle-done b { color: #374151; font-variant-numeric: tabular-nums; }

/* 页面顶部查询区（订单列表/收款明细等）：一行紧凑布局 */
.filter-bar{background:#fff;border:1px solid var(--panel-border);border-radius:8px;padding:10px 14px;margin:0 0 16px;display:flex;flex-wrap:nowrap;align-items:flex-end;gap:12px}
.filter-field{display:flex;flex-direction:column;gap:3px;flex:1 1 auto;min-width:0}
.filter-label{font-size:12px;color:var(--muted);font-weight:600;white-space:nowrap}
.filter-field .text-input,.filter-field .pt-input{width:100%;min-width:0}
.filter-range{display:flex;align-items:center;gap:6px;flex:1 1 auto}
.filter-range .pt-input{min-width:0}
.filter-actions{display:flex;gap:8px;flex:0 0 auto}
