/* ============ TradeFlow ERP 样式 ============ */
:root {
  --primary: #2d8a5e;
  --primary-dark: #1e6b45;
  --primary-light: #e6f5ed;
  --bg: #C7EDCC;
  --surface: #ffffff;
  --border: #b8dcc0;
  --border-strong: #9cc9a8;
  --text: #1f2937;
  --text-secondary: #4a6b55;
  --text-muted: #7a9a85;
  --success: #059669;
  --success-bg: #e6f5ed;
  --warning: #b7791f;
  --warning-bg: #fffbeb;
  --danger: #c0392b;
  --danger-bg: #fef2f2;
  --info: #2d8a5e;
  --info-bg: #e6f5ed;
  --sidebar-bg: #1e3d2f;
  --sidebar-text: #a8c4b5;
  --shadow: 0 1px 3px rgba(30, 61, 47, .08), 0 1px 2px rgba(30, 61, 47, .04);
  --shadow-lg: 0 10px 30px rgba(30, 61, 47, .14);
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", "Cascadia Code", Consolas, "Courier New", monospace;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}
.hidden { display: none !important; }
a { color: var(--primary); text-decoration: none; }

/* ============ 首次启动界面 ============ */
.bootstrap-screen {
  position: fixed; inset: 0; z-index: 200;
  background: linear-gradient(135deg, #1e3d2f 0%, #2d5a42 60%, #2d8a5e 120%);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.bootstrap-card {
  background: var(--surface); border-radius: 16px; padding: 44px 48px;
  width: 480px; max-width: 100%; text-align: center; box-shadow: var(--shadow-lg);
}
.bootstrap-logo {
  width: 64px; height: 64px; border-radius: 16px; margin: 0 auto 16px;
  background: var(--primary); color: #fff; font-weight: 800; font-size: 28px;
  display: flex; align-items: center; justify-content: center;
}
.bootstrap-card h1 { font-size: 24px; margin-bottom: 4px; }
.bootstrap-sub { color: var(--text-secondary); margin-bottom: 20px; }
.bootstrap-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 22px;
}
.bootstrap-stat { background: var(--bg); border-radius: 10px; padding: 12px 8px; }
.bootstrap-stat b { display: block; font-size: 20px; color: var(--primary); }
.bootstrap-stat span { font-size: 12px; color: var(--text-secondary); }
.progress-track { height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
.progress-fill { height: 100%; width: 0; background: var(--primary); transition: width .2s; }
.bootstrap-hint { font-size: 12px; color: var(--text-muted); margin-top: 14px; }

/* ============ 主布局 ============ */
.main-layout { display: flex; height: 100vh; overflow: hidden; }
.sidebar {
  width: 216px; background: var(--sidebar-bg); color: var(--sidebar-text);
  display: flex; flex-direction: column; flex-shrink: 0;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px; padding: 18px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand-badge {
  width: 34px; height: 34px; border-radius: 9px; background: var(--primary);
  color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.brand-name { color: #fff; font-weight: 700; font-size: 16px; }
.brand-name small { font-weight: 400; color: var(--sidebar-text); }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 10px 10px; }
.nav-section {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: rgba(168,196,181,.55); padding: 14px 10px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px;
  color: var(--sidebar-text); cursor: pointer; font-size: 13.5px; margin-bottom: 2px;
  transition: background .12s, color .12s; user-select: none;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active { background: var(--primary); color: #fff; }
.nav-icon { width: 18px; text-align: center; font-size: 14px; opacity: .9; }
.nav-badge {
  margin-left: auto; background: #ef4444; color: #fff; font-size: 11px;
  border-radius: 10px; padding: 1px 7px; font-weight: 600;
}
.sidebar-footer { padding: 14px; border-top: 1px solid rgba(255,255,255,.08); }

.content { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 58px; background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px; flex-shrink: 0;
}
.topbar h2 { font-size: 17px; font-weight: 700; }
.topbar-actions { display: flex; gap: 10px; align-items: center; }
.page { flex: 1; overflow-y: auto; padding: 22px 24px 40px; }

/* ============ 通用组件 ============ */
.card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 20px; margin-bottom: 18px;
}
.card-title { font-size: 14px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; }
.card-title .link { font-weight: 500; font-size: 13px; cursor: pointer; }

.btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid transparent;
  border-radius: 8px; padding: 7px 14px; font-size: 13px; font-family: var(--font);
  cursor: pointer; transition: all .12s; font-weight: 500; background: var(--surface);
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); }
.btn-outline { border-color: var(--border-strong); color: var(--text); background: var(--surface); }
.btn-outline:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #b91c1c; }
.btn-ghost { background: transparent; color: inherit; border-color: rgba(255,255,255,.2); }
.btn-ghost:hover { background: rgba(255,255,255,.1); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-lg { padding: 11px 26px; font-size: 15px; }

input, select, textarea {
  font-family: var(--font); font-size: 13.5px; color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 8px; padding: 7px 11px;
  background: var(--surface); outline: none; transition: border .12s, box-shadow .12s;
  max-width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(45,138,94,.12); }
input[type="number"] { font-family: var(--mono); }
input[readonly] { background: var(--bg); }

/* 表单布局 */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 16px; }
.form-grid .span-2 { grid-column: span 2; }
.form-field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-secondary); margin-bottom: 5px; }
.form-field input, .form-field select { width: 100%; }
.form-hint { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }

/* 表格 */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left; padding: 9px 10px; color: var(--text-secondary); font-weight: 600;
  border-bottom: 1.5px solid var(--border); white-space: nowrap; font-size: 12px;
  background: #dff5e3; position: sticky; top: 0;
}
td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:hover { background: var(--primary-light); }
tbody tr.clickable { cursor: pointer; }
.td-num { text-align: right; font-family: var(--mono); font-size: 12.5px; }
.td-muted { color: var(--text-muted); }
.remark-cell { max-width: 420px; min-width: 200px; overflow: visible; white-space: normal; word-break: break-word; line-height: 1.4; }
.td-strong { font-weight: 600; }
.mono { font-family: var(--mono); font-size: 12.5px; }

/* 通知弹窗（右下角实时提醒，2026-09-02） */
#notif-popup-box { position: fixed; inset: 0; z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; pointer-events: none; padding: 24px; }
.notif-popup { pointer-events: auto; display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-left: 6px solid var(--primary); border-radius: 14px; padding: 20px 24px; box-shadow: var(--shadow-lg); cursor: pointer; min-width: 440px; max-width: 580px; animation: notif-pop-in .25s ease; }
.notif-popup:hover { border-left-color: var(--danger, #c0392b); }
@keyframes notif-pop-in { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }

/* 日历月视图（2026-09-03） */
.cal-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-flt { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; white-space: nowrap; cursor: pointer; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-head { text-align: center; font-size: 12px; font-weight: 600; color: var(--text-secondary); padding: 4px 0 6px; }
.cal-cell { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; min-height: 96px; padding: 6px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; overflow: hidden; transition: border-color .15s; }
.cal-cell:hover { border-color: var(--primary); }
.cal-cell.dim { opacity: .45; }
.cal-cell.today { border: 2px solid var(--primary); }
.cal-daynum { font-size: 12.5px; font-weight: 600; }
.cal-chip { font-size: 11px; line-height: 1.35; padding: 2px 6px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.cal-chip.due { background: rgba(192, 57, 43, .12); color: #c0392b; }
.cal-chip.evt { background: rgba(230, 81, 0, .12); color: #e65100; }
.cal-chip.etd { background: rgba(31, 111, 235, .12); color: #1f6feb; }
.cal-chip.sched { background: rgba(45, 138, 94, .12); color: #2d8a5e; }
.cal-more { font-size: 11px; color: var(--text-secondary); }
/* 当日明细列表（弹窗内） */
.cal-day-list { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow: auto; }
.cal-row { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; }
.cal-row .cal-chip { flex: none; margin-top: 1px; }
/* 参与人复选 */
.cal-parts { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 6px 0; }
@media (max-width: 900px) { .cal-grid { gap: 3px; } .cal-cell { min-height: 64px; padding: 4px; } .cal-chip { font-size: 10px; padding: 1px 4px; } }


/* 徽章 */
.badge {
  display: inline-flex; align-items: center; border-radius: 20px; font-size: 11.5px;
  padding: 2px 10px; font-weight: 600; white-space: nowrap;
}
.badge-producing { background: var(--info-bg); color: var(--info); }
.badge-finished { background: var(--success-bg); color: var(--success); }
.badge-exceeded { background: var(--danger-bg); color: var(--danger); }
.badge-due-soon { background: var(--warning-bg); color: var(--warning); }
.badge-due-over { background: var(--danger-bg); color: var(--danger); }
.badge-neutral { background: var(--bg); color: var(--text-secondary); }

/* KPI 卡片 */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi-card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 18px; display: flex; flex-direction: column; gap: 2px;
}
.kpi-label { font-size: 12.5px; color: var(--text-secondary); font-weight: 500; }
.kpi-value { font-size: 26px; font-weight: 800; font-family: var(--mono); letter-spacing: -.02em; }
.kpi-value.success { color: var(--success); }
.kpi-value.danger { color: var(--danger); }
.kpi-value.warning { color: var(--warning); }
.kpi-value.primary { color: var(--primary); }
.kpi-sub { font-size: 11.5px; color: var(--text-muted); }

/* 双列面板 */
.panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.panel-grid .card { margin-bottom: 0; }
@media (max-width: 1100px) { .panel-grid { grid-template-columns: 1fr; } }

/* 筛选栏 */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px;
}
.filter-bar input, .filter-bar select { min-width: 130px; }
.filter-spacer { flex: 1; }

/* 多选下拉筛选（UI.multiSelect） */
.msel { position: relative; display: inline-block; }
.msel-btn { min-width: 130px; text-align: left; display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; max-width: 300px; overflow: hidden; }
.msel-btn::after { content: '▾'; font-size: 11px; color: var(--text-muted); flex: none; }
.msel-panel {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 150;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 6px; min-width: 200px; max-height: 320px; overflow-y: auto;
  display: none;
}
.msel.open .msel-panel { display: block; }
.msel-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; white-space: nowrap; color: var(--text); }
.msel-item:hover { background: var(--primary-light); }
.msel-item input { width: auto; min-width: 0; margin: 0; accent-color: var(--primary); }
.msel-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 6px 4px 2px; margin-top: 4px; border-top: 1px solid var(--border); }

/* 分页 */
.pagination { display: flex; align-items: center; gap: 8px; justify-content: flex-end; margin-top: 14px; font-size: 12.5px; color: var(--text-secondary); }
.pagination button { min-width: 30px; }

/* 发货列表底部统计（与分页组件字体统一） */
.dispatch-stat { font-size: 12.5px; color: var(--text-secondary); }
.dispatch-stat .stat-num { font-weight: 600; color: var(--text-primary); }

/* 发货列表底部：统计 + 分页同行排列 */
.dispatch-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; justify-content: flex-end; padding: 0 14px; margin-top: 14px; }
.dispatch-foot .pagination { margin-top: 0; }

/* 模态框 */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(30,61,47,.45); z-index: 300;
  display: flex; align-items: flex-start; justify-content: center; padding: 40px 20px; overflow-y: auto;
}
.modal {
  background: var(--surface); border-radius: 14px; width: 640px; max-width: 100%;
  box-shadow: var(--shadow-lg); animation: modal-in .18s ease;
}
.modal.modal-lg { width: 900px; }
.modal.modal-xl { width: 1350px; }
@keyframes modal-in { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 15.5px; }
.modal-close { background: none; border: none; font-size: 19px; cursor: pointer; color: var(--text-muted); padding: 4px 8px; border-radius: 6px; }
.modal-close:hover { background: var(--bg); color: var(--text); }
.modal-body { padding: 20px 22px; max-height: calc(100vh - 220px); overflow-y: auto; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 22px; border-top: 1px solid var(--border); background: var(--bg); border-radius: 0 0 14px 14px;
}

/* Toast */
#toast-root { position: fixed; top: 18px; right: 18px; z-index: 400; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--sidebar-bg); color: #fff; border-radius: 10px; padding: 11px 18px;
  font-size: 13px; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 9px;
  animation: toast-in .2s ease; max-width: 380px;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); }
@keyframes toast-in { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }

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

/* 详情页 */
.detail-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 22px; margin-bottom: 16px; }
.detail-meta-item label { display: block; font-size: 11.5px; color: var(--text-muted); font-weight: 600; }
.detail-meta-item span { font-size: 13.5px; font-weight: 600; }

/* 进度条（发货进度） */
.qty-progress { background: var(--bg); border-radius: 5px; height: 6px; min-width: 70px; overflow: hidden; }
.qty-progress-fill { height: 100%; background: var(--success); }

/* 汇总行 */
.summary-row { display: flex; gap: 26px; padding: 12px 4px 2px; font-size: 13px; color: var(--text-secondary); flex-wrap: wrap; }
.summary-row b { color: var(--text); font-family: var(--mono); }

/* 设置页 */
.settings-section { margin-bottom: 26px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid var(--border); gap: 18px; }
.settings-row:last-child { border-bottom: none; }
.settings-info { flex: 1; }
.settings-info h4 { font-size: 13.5px; margin-bottom: 2px; }
.settings-info p { font-size: 12.5px; color: var(--text-secondary); }

/* 打印 */
@media print {
  .sidebar, .topbar-actions, .filter-bar, .pagination { display: none !important; }
  .page { padding: 0; }
}

/* 响应式 */
@media (max-width: 760px) {
  .sidebar { width: 62px; }
  .brand-name, .nav-item span:not(.nav-icon):not(.nav-badge), .nav-section, .sidebar-footer { display: none; }
  .nav-item { justify-content: center; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
  .page { padding: 14px; }

  /* 触控区加大（2026-08-29 实测）：手机上表格行内按钮仅 26px、多选复选框仅 15px，手指点不准 */
  .btn-sm, table .btn-sm { min-height: 36px; padding: 7px 12px; line-height: 1.3; }
  table input[type="checkbox"], input[type="checkbox"] { width: 22px; height: 22px; }
  .nav-item { min-height: 44px; }
  /* 弹窗在小屏上占地方：限制高度、内容可滚、按钮竖排更好点 */
  .modal { max-height: 88vh; display: flex; flex-direction: column; }
  .modal-body { overflow-y: auto; }
  .modal-footer { flex-wrap: wrap; }
  .modal-footer .btn { flex: 1 1 auto; min-height: 40px; }
}

/* 滚动条 */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #a8c4b5; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #8ab09a; }
::-webkit-scrollbar-track { background: transparent; }

/* 编辑留痕：字段级变更对比（操作日志页展开） */
.audit-edit { margin: 0; }
.audit-edit summary { cursor: pointer; font-weight: 600; color: var(--text); }
.audit-edit summary:hover { color: var(--primary); }
.diff-table { width: 100%; margin-top: 8px; border-collapse: collapse; font-size: 12.5px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.diff-table th { text-align: left; padding: 5px 10px; background: var(--primary-light); color: var(--text-secondary); border-bottom: 1px solid var(--border); }
.diff-table td { padding: 5px 10px; border-bottom: 1px dashed var(--border); vertical-align: top; }
.diff-table tr:last-child td { border-bottom: none; }
.diff-table .diff-field { white-space: nowrap; }
.diff-table .diff-before { color: var(--text-secondary); text-decoration: line-through; word-break: break-all; }
.diff-table .diff-after { color: var(--text); font-weight: 600; word-break: break-all; }
.diff-row-note td { background: var(--warning-bg); }
.diff-row-note .diff-before, .diff-row-note .diff-after { text-decoration: none; color: inherit; }

/* ===== 导入拖拽框（装箱单导入 / import.js 通用） ===== */
.imp-drop {
  border: 2px dashed var(--border-strong);
  border-radius: 10px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  background: var(--bg-soft);
  margin-bottom: 12px;
  user-select: none;
  -webkit-user-select: none;
  transition: border-color .15s, background .15s;
}
.imp-drop:hover { border-color: var(--primary); }
.imp-drop.drag-over { border-color: var(--primary); background: var(--primary-light); }
.imp-drop .imp-drop-icon { font-size: 30px; line-height: 1; margin-bottom: 8px; }
.imp-drop .imp-drop-title { font-size: 14px; font-weight: 600; }
.imp-drop .imp-drop-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.imp-drop .imp-drop-file { font-size: 12.5px; margin-top: 9px; color: var(--primary); font-weight: 600; word-break: break-all; }

/* ============ 零件图片/图纸 ============ */
/* 列表列多附件横向排列容器 */
.cell-thumbs { display: inline-flex; flex-direction: row; align-items: center; gap: 5px; flex-wrap: wrap; }
.part-thumb { height: 38px; max-width: 64px; object-fit: contain; border-radius: 4px; cursor: zoom-in;
  border: 1px solid var(--border); background: var(--bg-soft); display: block; }
.pdf-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 4px;
  font-size: 12px; font-weight: 600; color: var(--danger); background: var(--danger-bg);
  border: 1px solid var(--border); cursor: pointer; white-space: nowrap; }
.pdf-chip:hover { border-color: var(--danger); }
.img-lightbox { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.85);
  display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
.img-lightbox img { max-width: 94vw; max-height: 94vh; border-radius: 6px; box-shadow: var(--shadow-lg); }
.pa-img-preview { margin-bottom: 8px; }
.pa-img-preview img { max-height: 120px; max-width: 100%; border-radius: 4px; border: 1px solid var(--border); }

/* ---- 零件附件上传区（点击/拖拽/粘贴） ---- */
.pa-drop { border: 1.5px dashed var(--border); border-radius: 8px; padding: 18px 14px; text-align: center;
  cursor: pointer; transition: all .15s; background: var(--bg-soft); margin-top: 6px; }
.pa-drop:hover { border-color: var(--primary); background: var(--primary-bg, rgba(59,130,246,.06)); }
.pa-drop.drag { border-color: var(--primary); background: var(--primary-bg, rgba(59,130,246,.1)); transform: scale(1.01); }
.pa-drop-icon { font-size: 26px; line-height: 1; margin-bottom: 6px; }
.pa-drop-text { font-size: 13px; color: var(--text-primary); font-weight: 500; }
.pa-drop-sub { font-size: 11.5px; color: var(--text-secondary); margin-top: 3px; }
/* 多附件缩略图行（最多 5 个，图片/图纸混算） */
.pa-thumbs { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.pa-thumb { position: relative; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-soft); padding: 3px; flex-shrink: 0; }
.pa-thumb img { height: 56px; max-width: 110px; object-fit: contain; display: block; border-radius: 4px; }
.pa-thumb.is-pdf { display: flex; align-items: center; min-height: 56px; justify-content: center; }
.pa-thumb .pa-thumb-pdf { font-size: 12px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pa-thumb-x { position: absolute; top: -7px; right: -7px; width: 18px; height: 18px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface); color: var(--danger); font-size: 10px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); }
.pa-thumb-x:hover { background: var(--danger); color: #fff; border-color: var(--danger); }

/* ---- 对账弹窗：订单 / 发货 双维度 Tab ---- */
.rc-tabs { display: flex; gap: 6px; margin: 14px 0 2px; border-bottom: 1px solid var(--border); padding-bottom: 0; }
.rc-tab { background: none; border: none; border-bottom: 2px solid transparent; padding: 7px 14px;
  font-size: 13px; font-weight: 400; color: var(--text-secondary); cursor: pointer; margin-bottom: -1px;
  font-family: inherit; transition: all .15s; }
.rc-tab:hover { color: var(--text-primary); }
.rc-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 500; }

/* ---- 列表多选 / 批量删除工具条 ---- */
.sel-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: -4px 0 12px;
  padding: 8px 14px; background: var(--primary-bg, rgba(59,130,246,.06));
  border: 1px solid var(--primary); border-radius: 8px; }
.sel-bar .sel-count { font-size: 13px; font-weight: 600; color: var(--primary); white-space: nowrap; }
.sel-bar .sel-spacer { flex: 1; }
.sel-bar .btn-ghost { color: var(--primary); }
.sel-bar .btn[disabled] { opacity: .45; cursor: not-allowed; }
tr.row-sel > td { background: var(--primary-bg, rgba(59,130,246,.06)); }
/* 勾选框列：垂直居中、点击区域稍大 */
table input[type="checkbox"] { width: 15px; height: 15px; cursor: pointer; vertical-align: middle; accent-color: var(--primary); }
th input[type="checkbox"], td input[type="checkbox"] { display: inline-block; }

/* ===== 订舱管理（2026-08-30） ===== */
/* 状态徽标：底色由状态定义内联给出，这里只管形状与文字 */
.bk-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; color: #fff;
            font-size: 11.5px; line-height: 1.6; white-space: nowrap; }
/* ETD 临近提醒：3 天内红、7 天内橙；已过船期置灰 */
.td-urgent { color: var(--danger);  font-weight: 700; }
.td-soon   { color: var(--warning); font-weight: 600; }
.td-past   { color: var(--text-muted); }
