* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: #f5f5f0; color: #333; line-height: 1.5; }
.bg-gray { background: #eef0eb; }

/* ========== 顶部导航栏 ========== */
.topbar { position: fixed; top: 0; left: 0; right: 0; height: 56px; background: #fff; border-bottom: 1px solid #e0e0d8; z-index: 100; display: flex; align-items: center; }
.topbar-inner { max-width: none; width: 100%; margin: 0; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: #2c5e2e; font-weight: 600; font-size: 16px; flex-shrink: 0; }
.brand-icon { font-size: 22px; }

/* 顶部右侧容器（版本号+用户区+汉堡） */
.topbar-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }

/* 版本号徽章 */
.version-badge { display: flex; align-items: center; gap: 4px; padding: 3px 10px; background: #e8f5e9; border: 1px solid #c8e6c9; border-radius: 12px; font-size: 11px; }
.version-label { font-weight: 700; color: #2c5e2e; }

/* 顶部右侧用户下拉菜单 */
.topbar-user { position: relative; display: flex; align-items: center; }
.user-dropdown-toggle { display: flex; align-items: center; gap: 6px; padding: 8px 14px; background: transparent; border: 1px solid transparent; border-radius: 8px; color: #333; font-size: 14px; cursor: pointer; transition: all 0.15s; }
.user-dropdown-toggle:hover { background: #f5f5f0; border-color: #e0e0d8; }
.user-dropdown-toggle .user-icon { font-size: 18px; }
.user-dropdown-toggle .user-name { font-weight: 500; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-dropdown-toggle .user-caret { font-size: 10px; color: #888; transition: transform 0.2s; }
.user-dropdown-toggle.open .user-caret { transform: rotate(180deg); }

.user-dropdown { position: absolute; top: calc(100% + 8px); right: 0; min-width: 240px; background: #fff; border: 1px solid #e0e0d8; border-radius: 12px; box-shadow: 0 6px 24px rgba(0,0,0,0.12); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: all 0.2s ease; z-index: 200; }
.user-dropdown.open { opacity: 1; visibility: visible; transform: translateY(0); }

.user-dropdown-header { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: linear-gradient(135deg, #f8fdf5 0%, #f0f7ec 100%); border-radius: 12px 12px 0 0; }
.user-dropdown-avatar { width: 38px; height: 38px; border-radius: 50%; background: #e8f5e9; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.user-dropdown-info { flex: 1; min-width: 0; }
.user-dropdown-name { font-size: 14px; font-weight: 600; color: #222; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-dropdown-role { font-size: 12px; color: #888; margin-top: 2px; }
.user-dropdown-divider { height: 1px; background: #f0f0ea; margin: 0; }

.user-dropdown-item { display: flex; align-items: center; gap: 10px; padding: 11px 16px; color: #333; text-decoration: none; font-size: 14px; transition: background 0.15s; cursor: pointer; }
.user-dropdown-item:hover { background: #f5f5f0; }
.user-dropdown-item:first-of-type { border-radius: 0; }
.user-dropdown-item.logout { color: #c0392b; }
.user-dropdown-item.logout:hover { background: #fff5f5; }
.user-dropdown-icon { font-size: 16px; width: 20px; text-align: center; }

@media (max-width: 768px) {
  .topbar-user .user-name { display: none; }
  .user-dropdown { min-width: 200px; }
}

/* 左侧导航栏（accordion 风格） */
.sidebar { position: fixed; top: 56px; left: 0; bottom: 0; width: 220px; background: #fff; border-right: 1px solid #e0e0d8; z-index: 90; display: flex; flex-direction: column; overflow-y: auto; }
.sidebar-nav { padding: 8px 6px; flex: 1; }
.sidebar-module { margin: 2px 0; }
.sidebar-module-header { display: flex; align-items: center; gap: 4px; padding: 10px 12px; border-radius: 8px; user-select: none; font-size: 14px; font-weight: 600; color: #2c5e2e; transition: background 0.15s; }
.sidebar-module-header:hover { background: #f5f5f0; }
.sidebar-module-link { display: flex; align-items: center; gap: 8px; flex: 1; text-decoration: none; color: inherit; cursor: pointer; padding: 4px 0; }
.sidebar-module-icon { font-size: 16px; width: 20px; text-align: center; }
.sidebar-module-name { flex: 1; }
.sidebar-module-arrow { font-size: 14px; color: #888; transition: transform 0.2s; flex-shrink: 0; margin-left: auto; padding: 0 4px; }
.sidebar-module-arrow:hover { background: #e8f5e9; color: #2c5e2e; }
.sidebar-module.collapsed .sidebar-module-arrow { transform: rotate(-90deg); }
.sidebar-module.collapsed .sidebar-module-items { display: none; }
.sidebar-module-items { padding: 2px 0 6px 0; }
.sidebar-link { display: flex; align-items: center; gap: 10px; padding: 9px 12px 9px 36px; margin: 1px 0; border-radius: 6px; color: #555; text-decoration: none; font-size: 13.5px; transition: all 0.15s; }
.sidebar-link:hover { background: #f5f5f0; color: #2c5e2e; }
.sidebar-link.active { background: #e8f5e9; color: #2c5e2e; font-weight: 500; }
.sidebar-link-icon { font-size: 15px; width: 18px; text-align: center; }

/* ========== 移动端抽屉菜单 ========== */
.mobile-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.4); z-index: 98; }
.mobile-overlay.open { display: block; }
.mobile-drawer { display: flex; position: fixed; top: 0; left: 0; bottom: 0; width: 280px; max-width: 80vw; background: #fff; z-index: 99; transform: translateX(-100%); transition: transform 0.25s ease; overflow-y: auto; flex-direction: column; pointer-events: none; }
.mobile-drawer.open { transform: translateX(0); pointer-events: auto; }
.mobile-module-link.logout { background: #fff5f5; color: #c0392b; }
.mobile-drawer-header { padding: 16px; border-bottom: 1px solid #e0e0d8; background: #f8f8f5; }
.mobile-drawer-title { font-size: 16px; font-weight: 600; color: #2c5e2e; }
.mobile-drawer-body { flex: 1; padding: 8px 0; }
.mobile-module { border-bottom: 1px solid #f0f0ea; }
.mobile-module-name { padding: 12px 16px 6px; font-size: 12px; color: #888; font-weight: 600; }
.mobile-module-items { display: flex; flex-wrap: wrap; padding: 4px 12px 12px; gap: 8px; }
.mobile-module-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 8px; background: #f5f5f0; color: #444; text-decoration: none; font-size: 14px; }
.mobile-module-link:hover, .mobile-module-link.active { background: #e8f5e9; color: #2c5e2e; }
.mobile-drawer-footer { padding: 16px; border-top: 1px solid #e0e0d8; background: #f8f8f5; }
.mobile-user-name { font-size: 14px; font-weight: 500; margin-bottom: 10px; color: #333; }
.mobile-user-actions { display: flex; gap: 12px; }
.mobile-user-actions a { color: #2c5e2e; text-decoration: none; font-size: 13px; }
.mobile-user-actions a.logout { color: #c0392b; }

/* ========== 手机端底部Tab导航 ========== */
.bottom-tabs { display: none; }
.bottom-tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px 4px; text-decoration: none; color: #999; font-size: 11px; transition: color 0.15s; -webkit-tap-highlight-color: transparent; }
.bottom-tab .tab-icon { font-size: 18px; line-height: 1; }
.bottom-tab.active { color: #2c5e2e; font-weight: 600; }

/* ========== 主内容区 ========== */
.main-content { margin-left: 220px; min-height: calc(100vh - 56px); padding: 64px 24px 60px; max-width: none; }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.page-header h1 { font-size: 22px; font-weight: 600; color: #222; }
.page-header p { color: #777; font-size: 14px; }
.page-header > div:last-child { display: flex; gap: 8px; flex-wrap: wrap; }

.card { background: #fff; border-radius: 12px; padding: 16px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.card h2 { font-size: 16px; margin-bottom: 12px; color: #333; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }

.batch-actions { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #f0f9f0; border-radius: 10px; margin-bottom: 12px; }
.batch-actions-bottom { margin-top: 12px; margin-bottom: 0; }
.batch-hint { font-size: 13px; color: #888; }

/* 批量操作浮动工具栏（选中行后从底部浮出） */
.batch-toolbar { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; align-items: center; gap: 16px; padding: 10px 20px; background: #fff; border-radius: 50px; box-shadow: 0 4px 20px rgba(0,0,0,0.15); z-index: 100; border: 1px solid #e0e0d8; }
.batch-toolbar .batch-count { font-size: 14px; color: #555; }
.batch-toolbar .batch-count strong { color: #2c5e2e; font-size: 16px; margin: 0 4px; }
.batch-toolbar .batch-actions { display: flex; gap: 8px; padding: 0; background: none; margin: 0; }

/* 批量操作内联工具栏（双表格卡片头部，如需求列表） */
.batch-bar { display: flex; align-items: center; gap: 12px; padding: 6px 14px; background: #f0f9f0; border-radius: 30px; border: 1px solid #d4e9d4; }
.batch-bar .batch-count { font-size: 13px; color: #555; white-space: nowrap; }
.batch-bar .batch-count strong { color: #2c5e2e; font-size: 15px; margin: 0 4px; }

/* 列表复选框列 */
.check-col { width: 36px; text-align: center; padding-left: 12px !important; padding-right: 4px !important; }
.check-col input[type="checkbox"] { cursor: pointer; width: 16px; height: 16px; }
.table tbody tr:hover { background: #fafaf5; }
.table tbody tr:has(.row-check:checked) { background: #f0f9f0; }


.filter-actions.filter-actions-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
/* ========== 内联搜索框 ========== */
.filter-item.filter-search { flex: 1 1 200px; min-width: 160px; max-width: 320px; }
.search-inline-form { display: flex; align-items: center; width: 100%; }
.search-input-wrap .btn { flex: 0 0 auto; flex-shrink: 0; min-width: 64px; padding: 6px 14px; font-size: 13px; min-height: 32px; margin-left: 4px; gap: 0; border-radius: 4px; }
  .search-input-wrap { gap: 0; }
.search-input-wrap { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; background: #fff; border: 1px solid #d8d8d0; border-radius: 6px; transition: border-color 0.15s, box-shadow 0.15s; }
.search-input-wrap:focus-within { border-color: #2c5e2e; box-shadow: 0 0 0 3px rgba(44,94,46,0.1); }
.search-icon { padding: 0 6px 0 12px; color: #888; font-size: 13px; pointer-events: none; flex-shrink: 0; }
.search-input { flex: 1; border: none; background: transparent; padding: 8px 6px 8px 8px; font-size: 13.5px; color: #333; outline: none; min-width: 0; }
.search-input::placeholder { color: #aaa; }
.search-clear { padding: 0 10px; color: #aaa; text-decoration: none; font-size: 14px; line-height: 1; }
.search-clear:hover { color: #c0392b; }

@media (max-width: 768px) {
  .filter-item.filter-search { flex: 1 1 100%; max-width: 100%; }
  .search-inline-form { width: 100%; }
  .search-input-wrap { flex: 1; }
}

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: 12px; padding: 16px; text-align: center; border-left: 4px solid #ccc; }
.stat-value { font-size: 28px; font-weight: 700; color: #2c5e2e; }
.stat-label { font-size: 13px; color: #888; margin-top: 4px; }
.stat-supplier { border-left-color: #e67e22; }
.stat-store { border-left-color: #3498db; }
.stat-product { border-left-color: #9b59b6; }
.stat-order { border-left-color: #2ecc71; }
.stat-pending { border-left-color: #e74c3c; }
.stat-amount { border-left-color: #f39c12; }
.stat-settled { border-left-color: #1abc9c; }

/* 运输管理统计卡片颜色 */
.dashboard-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-icon { font-size: 24px; margin-bottom: 4px; }
.stat-green { border-left-color: #2ecc71; }
.stat-blue { border-left-color: #3498db; }
.stat-purple { border-left-color: #9b59b6; }
.stat-orange { border-left-color: #e67e22; }
.stat-red { border-left-color: #e74c3c; }
.stat-teal { border-left-color: #1abc9c; }
.info-card { background: #f8f9fa; border-radius: 8px; padding: 16px; border-left: 4px solid #2c5e2e; }

/* 快捷操作区 */
.quick-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.quick-action { display: flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: 10px; background: #fff; border: 1px solid #e0e0d8; text-decoration: none; color: #444; font-size: 14px; transition: all 0.15s; }
.quick-action:hover { background: #e8f5e9; border-color: #2c5e2e; color: #2c5e2e; }
.quick-action .qa-icon { font-size: 18px; }

/* v85: 表头锁定 — wrap改为双向滚动容器，sticky表头对wrap生效（原来只有overflow-x，sticky无纵向滚动参照而失效） */
.table-wrap { overflow: auto; -webkit-overflow-scrolling: touch; max-width: 100%; max-height: calc(100vh - 230px); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 600px; }
/* v36 移动端表格自适应 */
@media (max-width: 768px) {
  .table { min-width: 0; font-size: 13px; width: 100%; }
  .table th, .table td { white-space: normal; }
  .table th, .table td { padding: 8px 6px; white-space: nowrap; }
  .table th { font-size: 12px; }
  .table-wrap { max-height: 72vh; }
}
.table th, .table td { padding: 10px 8px; text-align: left; border-bottom: 1px solid #f0f0ea; }
/* v85: sticky表头补z-index和底线（border-collapse下边框会随滚动丢失，用inset阴影替代） */
.table th { color: #777; font-weight: 500; background: #fafaf8; position: sticky; top: 0; z-index: 3; box-shadow: inset 0 -1px 0 #e0e0d8; }
.table tr:hover { background: #fafaf8; }
.table tfoot td { border-top: 2px solid #e0e0d8; border-bottom: none; }

/* 分页 */
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 16px; font-size: 14px; }
.pagination .page-info { color: #888; }
.pagination .btn { min-width: 36px; }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: 8px 16px; border-radius: 8px; border: 1px solid #d0d0c8; background: #fff; color: #444; text-decoration: none; font-size: 14px; cursor: pointer; min-height: 36px; transition: background 0.15s; }
.btn:hover { background: #f5f5f0; }
.btn-primary { background: #2c5e2e; border-color: #2c5e2e; color: #fff; }
.btn-primary:hover { background: #254d27; }
.btn-success { background: #27ae60; border-color: #27ae60; color: #fff; }
.btn-success:hover { background: #219150; }
.btn-danger { background: #c0392b; border-color: #c0392b; color: #fff; }
.btn-warning { background: #e67e22; border-color: #e67e22; color: #fff; }
.btn-warning:hover { background: #cf711c; }
.btn-sm { padding: 5px 12px; font-size: 13px; min-height: 32px; }
.btn-xs { padding: 3px 8px; font-size: 12px; min-height: 28px; }
.btn-block { width: 100%; }

.form { max-width: 100%; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #555; margin-bottom: 5px; }
.form-control { width: 100%; padding: 8px 10px; border: 1px solid #d8d8d0; border-radius: 8px; font-size: 14px; background: #fff; }
.form-control:focus { outline: none; border-color: #2c5e2e; }
.form-actions { display: flex; gap: 10px; margin-top: 16px; }
.form-inline { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.form-inline .form-group { margin-bottom: 0; }
.form-inline .form-control { width: auto; min-width: 120px; }
.form-row { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 10px; }
.item-row { padding: 10px; background: #fafaf8; border-radius: 8px; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; padding: 12px; background: #fafaf8; border-radius: 10px; }
.filters label { font-size: 12px; color: #888; margin-bottom: 2px; display: block; }
.filters .form-control { font-size: 13px; padding: 6px 10px; }
.filter-actions { display: flex; gap: 6px; align-items: flex-end; }

/* 统一筛选栏右侧操作按钮 */
.filter-spacer { flex: 1; min-width: 20px; }
.filter-actions-right { margin-left: auto; }
.filter-actions-right .btn-group { display: inline-flex; gap: 6px; align-items: center; flex-wrap: nowrap; flex-shrink: 0; }
.filter-actions-right .btn { flex: 0 0 auto; min-width: 0; }
/* 设置面板（列显示/隐藏） */
.settings-panel {
  display: none;
  margin-top: 12px;
  padding: 14px;
  background: #fafaf8;
  border-radius: 10px;
  border: 1px dashed #d8d8d0;
  animation: slideDown 0.2s ease;
}
.settings-panel.show { display: block; }
.settings-panel-title { font-size: 13px; font-weight: 600; color: #555; margin-bottom: 10px; }
.settings-toggles { display: flex; flex-wrap: wrap; gap: 14px; }
.settings-toggles label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; font-size: 13px; color: #555; }
.settings-toggles input { cursor: pointer; accent-color: #2c5e2e; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 12px; }
.badge-active, .badge-submitted, .badge-confirmed, .badge-sent, .badge-completed { background: #e8f5e9; color: #2c5e2e; }
.badge-draft { background: #fff3e0; color: #e65100; }
.badge-disabled, .badge-cancelled { background: #ffebee; color: #c62828; }
.badge-warning { background: #fff8e1; color: #f57c00; }
.badge-settled { background: #e3f2fd; color: #1565c0; }
.badge-veg { background: #e8f5e9; color: #2c5e2e; }
.badge-fruit { background: #fff3e0; color: #e65100; }

.empty-state { text-align: center; padding: 40px; color: #888; font-size: 14px; }
.text-right { text-align: right; }
.text-muted { color: #888; font-size: 12px; }
.text-success { color: #27ae60; }
.text-danger { color: #c0392b; }
.text-nowrap { white-space: nowrap; }

/* === v73 登录页：右40%米白铺满，卡片内容居中 === */
.login-page-v69 {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-columns: 6fr 4fr;
  background: #f5f5f0;
  overflow: hidden;
  z-index: 9999;
}
.login-brand {
  background: linear-gradient(135deg, #059669 0%, #06b6d4 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 80px;
  color: #fff;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.login-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.15) 0%, transparent 50%);
  pointer-events: none;
}
.brand-logo {
  width: 140px;
  height: 140px;
  border-radius: 32px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}
.brand-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: 1px;
  position: relative;
  z-index: 1;
  text-align: center;
}
.brand-slogan-en {
  font-size: 15px;
  letter-spacing: 4px;
  margin-bottom: 14px;
  opacity: 0.92;
  position: relative;
  z-index: 1;
  text-transform: uppercase;
}
.brand-desc {
  font-size: 15px;
  opacity: 0.92;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 360px;
  line-height: 1.6;
}

.login-card {
  background: transparent;
  padding: 40px 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  overflow-y: auto;
}
.login-card-header, .login-form, .login-footer { width: 100%; max-width: 440px; margin-left: auto; margin-right: auto; }
.login-card-header { margin-bottom: 28px; text-align: center; }
.login-card-header h2 {
  font-size: 26px;
  color: #134e4a;
  margin-bottom: 6px;
  font-weight: 700;
}
.login-card-header p {
  color: #888;
  font-size: 14px;
}
.login-form .form-group { margin-bottom: 16px; }
.login-form .form-input { width: 100%; padding: 12px 14px; border: 1px solid #d8d8d0; border-radius: 10px; font-size: 16px; }
.login-form .form-input:focus { outline: none; border-color: #0d9488; box-shadow: 0 0 0 3px rgba(13,148,136,0.12); }
.remember-row { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; font-size: 14px; color: #666; }
.remember-row input[type=checkbox] { width: 18px; height: 18px; cursor: pointer; accent-color: #0d9488; }
.login-footer {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #f0f0ea;
  font-size: 12px;
  color: #888;
  text-align: center;
}
.remember-row { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; font-size: 14px; color: #666; }
.remember-row input[type=checkbox] { width: 18px; height: 18px; cursor: pointer; accent-color: #2c5e2e; }
.alert { padding: 10px 12px; border-radius: 8px; margin-bottom: 16px; font-size: 13px; }
.alert-error { background: #ffebee; color: #c62828; }
.alert-success { background: #e8f5e9; color: #2c5e2e; }
.alert-warning { background: #fff8e1; color: #f57c00; }
.alert-info { background: #e3f2fd; color: #1565c0; }
.notification-banner .notification-item { padding: 10px 12px; border-radius: 8px; margin-bottom: 8px; }

.error-page { min-height: 60vh; display: flex; align-items: center; justify-content: center; }
.error-card { text-align: center; background: #fff; padding: 40px; border-radius: 16px; }
.error-code { font-size: 72px; font-weight: 700; color: #2c5e2e; }

/* ========== 综合查询大宽表 ========== */
.wide-table-card { padding: 0; overflow: hidden; }
.wide-table-toolbar { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: #fafaf8; border-bottom: 1px solid #f0f0ea; flex-wrap: wrap; gap: 10px; }
.wide-table-toolbar .toolbar-info { font-size: 14px; color: #555; font-weight: 500; }
.wide-table-toolbar .toolbar-info .total { color: #2c5e2e; font-size: 18px; font-weight: 700; margin: 0 4px; }
.wide-table-scroll { overflow: auto; max-height: calc(100vh - 280px); }
.wide-table-scroll .table { width: 100%; min-width: 1600px; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.wide-table-scroll .table th { position: sticky; top: 0; background: #f5f5f0; color: #555; font-weight: 600; padding: 0; z-index: 5; box-shadow: 0 1px 0 #e0e0d8; min-width: 80px; }
.wide-table-scroll .table th .th-inner { padding: 10px 8px; text-align: left; font-size: 13px; border-bottom: 1px solid #e0e0d8; }
.wide-table-scroll .table th.text-right .th-inner { text-align: right; }
.wide-table-scroll .table th .col-filter { width: 100%; padding: 4px 6px; border: 1px solid #d8d8d0; border-radius: 4px; font-size: 12px; background: #fff; margin-top: 4px; }
.wide-table-scroll .table th .col-filter:focus { outline: none; border-color: #2c5e2e; }
.wide-table-scroll .table td { padding: 8px 8px; border-bottom: 1px solid #f0f0ea; vertical-align: middle; }
.wide-table-scroll .table tfoot td { position: sticky; bottom: 0; background: #f5f5f0; color: #2c5e2e; font-weight: 700; padding: 10px 8px; border-top: 2px solid #2c5e2e; z-index: 4; }
.wide-table-scroll .table tfoot td.text-right { text-align: right; }
.wide-table-scroll .table tr:hover td { background: #fafaf8; }
.wide-table-scroll .table tr:hover tfoot td { background: #f5f5f0; }
.wide-table-scroll .table .text-right { text-align: right; }
.wide-table-scroll .table .text-nowrap { white-space: nowrap; }

/* ======== 综合查询：筛选栏 ======== */
.filter-card {
  background: #fff; border-radius: 12px; padding: 14px 18px;
  margin-bottom: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.filter-row { display: flex; flex-wrap: nowrap; align-items: center; gap: 10px; padding: 4px 0; }
.filter-item { display: flex; flex-direction: column; gap: 3px; min-width: 100px; }
.filter-item-inline { flex-direction: row !important; align-items: center; gap: 6px; flex-wrap: nowrap !important; }
.filter-item-inline .filter-item-label { font-size: 13px; color: #555; font-weight: 500; white-space: nowrap; padding: 0 2px; margin: 0; }
.filter-item-inline .btn-group { display: inline-flex; gap: 6px; flex-wrap: nowrap !important; }
.filter-item label { font-size: 11px; color: #888; font-weight: 500; }
.filter-item input, .filter-item select {
  min-height: 34px; padding: 5px 8px; font-size: 13px;
  border: 1px solid #d8d8d0; border-radius: 6px; background: #fff;
}
.filter-item input:focus, .filter-item select:focus {
  outline: none; border-color: #2c5e2e; box-shadow: 0 0 0 2px rgba(44,94,46,0.1);
}
.filter-item.filter-search { flex: 1 1 200px; min-width: 160px; max-width: 320px; } !important
.filter-item.filter-actions { min-width: auto; }
.filter-item.filter-actions .btn-group { display: flex; gap: 6px; }
.btn-group { display: inline-flex; gap: 6px; align-items: center; }

/* 显示已禁用开关（紧凑label） */
.show-disabled-toggle { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; color: #555; user-select: none; padding: 6px 4px; white-space: nowrap; }
.show-disabled-toggle input { cursor: pointer; width: 14px; height: 14px; margin: 0; accent-color: #2c5e2e; }

/* 高级筛选面板 */
.advanced-panel {
  margin-top: 12px; padding-top: 12px; border-top: 1px dashed #e0e0d8;
  animation: slideDown 0.2s ease;
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

/* 按钮变体 */
.btn-sm { font-size: 13px; padding: 6px 14px; border-radius: 6px; cursor: pointer; border: none; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.btn-primary { background: #2c5e2e; color: #fff; }
.btn-primary:hover { background: #1e4220; }
.btn-outline { background: #fff; color: #555; border: 1px solid #d0d0c8; }
.btn-outline:hover { background: #f5f5f0; border-color: #bbb; }
.btn-success { background: #27ae60; color: #fff; }
.btn-success:hover { background: #219a52; }

/* ======== 大宽表 ======== */
.wide-table-scroll { overflow: auto; max-height: calc(100vh - 240px); border-radius: 10px; border: 1px solid #e8e8e0; }
.wide-table-scroll .compact-table {
  width: 100%; min-width: 1750px; border-collapse: collapse; font-size: 13px;
}
.wide-table-scroll .compact-table th {
  position: sticky; top: 0; background: #f5f5f0; color: #555;
  font-weight: 600; padding: 8px 7px; text-align: left; white-space: nowrap;
  border-bottom: 1px solid #e0e0d8; z-index: 5;
}
.wide-table-scroll .compact-table td {
  padding: 6px 7px; border-bottom: 1px solid #f0f0ea; vertical-align: middle;
}
.wide-table-scroll .compact-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.wide-table-scroll .compact-table tbody tr:hover td { background: #fafaf8; }
.wide-table-scroll .compact-table tfoot td {
  position: sticky; bottom: 0; background: #f5f5f0; color: #2c5e2e;
  font-weight: 700; padding: 8px 7px; border-top: 2px solid #2c5e2e; z-index: 4;
}
.wide-table-scroll .compact-table tfoot td.total-label { font-weight: 600; font-size: 13px; }
.wide-table-scroll .compact-table tfoot td.num { text-align: right; }

/* 单据超链接 */
.doc-link { color: #2980b9; text-decoration: none; font-weight: 500; white-space: nowrap; }
.doc-link:hover { color: #1a5276; text-decoration: underline; }

/* ======== 底部分页栏 ======== */
.pagination-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0 4px; flex-wrap: wrap; gap: 12px; font-size: 14px;
}
.pagination-bar .pagination-info { color: #666; }
.pagination-bar .pagination-info strong { color: #2c5e2e; }
.pagination-bar .pagination-perpage { display: flex; align-items: center; gap: 6px; color: #888; }
.pagination-bar .pagination-perpage select {
  padding: 5px 10px; border: 1px solid #d0d0c8; border-radius: 6px;
  font-size: 13px; background: #fff; cursor: pointer;
}
.pagination-bar .pagination-nav { display: flex; align-items: center; gap: 4px; }
.page-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 8px;
  border: 1px solid #d8d8d0; border-radius: 6px; background: #fff;
  color: #555; font-size: 14px; text-decoration: none; cursor: pointer;
  transition: all 0.15s;
}
.page-btn:hover { background: #f5f5f0; border-color: #bbb; }
.page-btn.active { background: #2c5e2e; color: #fff; border-color: #2c5e2e; }
.page-btn.disabled { color: #ccc; cursor: default; pointer-events: none; }
.page-ellipsis { padding: 0 6px; color: #aaa; }

/* ======== 移动端 ======== */
@media (max-width: 768px) {
  .filter-card { padding: 10px 12px; }
  /* v36 移动端改造：允许换行，按钮合理紧凑 */
  .filter-row { gap: 8px; flex-wrap: wrap; }
  .filter-item { min-width: 0; }
  .filter-item label { font-size: 12px; }
  .filter-item.filter-search { flex: 1 1 100%; max-width: 100%; }
  .filter-item.filter-actions.filter-actions-right { margin-left: 0; width: 100%; justify-content: flex-end; }
  .filter-item.filter-actions .btn-group { gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
  .show-disabled-toggle { margin-left: 0; }
  .filter-row .btn { padding: 6px 12px; font-size: 13px; }
  .filter-row .btn-sm { padding: 5px 10px; font-size: 12px; }
  .filter-item { min-width: 80px; }
  .filter-item input, .filter-item select { min-height: 38px; font-size: 14px; }
  .filter-item.filter-actions .btn-group { flex-wrap: wrap; }
  .wide-table-scroll { max-height: 55vh; }
  .wide-table-scroll .compact-table { font-size: 12px; min-width: 1550px; }
  .wide-table-scroll .compact-table th { padding: 6px 5px; }
  .wide-table-scroll .compact-table td { padding: 5px 5px; }
}

.footer { text-align: center; padding: 20px; color: #aaa; font-size: 12px; margin-left: 220px; }

.column-toggles { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; align-items: center; }
.column-toggles label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; color: #555; }
.column-toggles input { cursor: pointer; }


/* ========== 汉堡菜单按钮（手机端导航入口） ========== */
.hamburger { display: none; flex-direction: column; justify-content: center; align-items: center; gap: 4px; width: 40px; height: 40px; background: transparent; border: 1px solid #e0e0d8; border-radius: 8px; cursor: pointer; padding: 0; -webkit-tap-highlight-color: transparent; transition: background 0.15s; }
.hamburger:hover { background: #f5f5f0; }
.hamburger:active { background: #e8e8e0; }
.hamburger span { display: block; width: 20px; height: 2.5px; background: #333; border-radius: 2px; transition: all 0.2s ease; }
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ========== 手机端适配 ========== */
@media (max-width: 768px) {
  body { overflow-x: hidden; }
  html { overflow-x: hidden; }
  .main-content { overflow-x: hidden; }
  .form > .form-group { padding: 0 10px; box-sizing: border-box; }
  .form-group .form-control { box-sizing: border-box; }
  /* 隐藏桌面端用户区，显示汉堡菜单 */
  .topbar-user { display: none; }
  .hamburger { display: flex; }

  /* 隐藏桌面端左侧边栏 */
  .sidebar { display: none; }

  /* 主内容区全宽 */
  .main-content { margin-left: 0; padding: 64px 10px 100px; max-width: 100%; min-height: calc(100vh - 56px); }
  .page-header { flex-direction: column; align-items: flex-start; }
  .page-header h1 { font-size: 20px; }
  .page-header > div:last-child { width: 100%; justify-content: flex-start; }

  /* 卡片 */
  .card { padding: 12px; border-radius: 10px; }
  .card h2 { font-size: 15px; }

  /* 统计卡片 */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat-card { padding: 12px; }
  .stat-value { font-size: 24px; }

  /* 表格 */
  .table-wrap { margin: 0 -12px; padding: 0 12px; }
  .table { font-size: 13px; }
  .table th, .table td { padding: 8px 6px; white-space: nowrap; }

  /* 按钮 */
  .btn { padding: 10px 16px; min-height: 44px; font-size: 15px; }
  .btn-sm { padding: 8px 14px; min-height: 40px; font-size: 14px; }
  .btn-xs { padding: 6px 10px; min-height: 36px; font-size: 13px; }

  /* 表单 */
  .form-group label { font-size: 14px; }
  .form-control { padding: 12px 14px; font-size: 16px; }
  .form-actions { flex-direction: column; }
  .form-actions .btn { width: 100%; }
  .form-row { flex-direction: column; align-items: stretch; }
  .form-inline { flex-direction: column; align-items: stretch; }
  .form-inline .form-control { width: 100%; min-width: auto; }
  .item-row { padding: 8px; }

  /* 筛选器 */
  .filters { flex-direction: column; }
  .filter-spacer { display: none; }
  .filter-actions-right { margin-left: auto; }
.filter-actions-right .btn-group { display: inline-flex; gap: 6px; align-items: center; flex-wrap: nowrap; flex-shrink: 0; }
.filter-actions-right .btn { flex: 0 0 auto; min-width: 0; }
  .settings-panel { padding: 12px; }
  .settings-toggles { gap: 10px; }

  /* 登录页 v74：手机端上半缩小30dvh + 下半为主 + 禁止滚动 */
  .login-page-v69 {
    grid-template-columns: 1fr;
    grid-template-rows: 30dvh 1fr;
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
  }
  .login-brand { padding: 14px 20px 10px; overflow: hidden; }
  .brand-logo { width: 52px; height: 52px; border-radius: 13px; margin-bottom: 6px; box-shadow: 0 6px 16px rgba(0,0,0,0.15); }
  .brand-title { font-size: 17px; margin-bottom: 4px; letter-spacing: 0.5px; }
  .brand-slogan-en { font-size: 10px; letter-spacing: 1.5px; margin-bottom: 3px; }
  .brand-desc { font-size: 10px; margin-bottom: 0; }
  .login-card { padding: 20px 24px 16px; justify-content: center; overflow-y: auto; }
  .login-card-header { margin-bottom: 18px; }
  .login-card-header h2 { font-size: 20px; }
  .login-card-header p { font-size: 12px; }
  .login-form .form-group { margin-bottom: 12px; }
  .login-form .form-input { padding: 12px 14px; font-size: 16px; }
  .remember-row { margin-bottom: 12px; font-size: 13px; }
  .login-footer { margin-top: 16px; padding-top: 14px; font-size: 11px; }

  /* 快捷操作 */
  .quick-actions { flex-direction: column; }
  .quick-action { justify-content: center; }

  /* 底部Tab - 固定在屏幕底部 */
  .bottom-tabs {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0;
    height: 56px; background: #fff; border-top: 1px solid #e0e0d8;
    z-index: 95; box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  /* 隐藏PC端footer */
  .footer { display: none; }

  /* 分页栏移动端优化 */
  .pagination-bar { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 0 8px; }
  .pagination-bar .pagination-info { text-align: center; font-size: 13px; }
  .pagination-bar .pagination-nav { justify-content: center; flex-wrap: wrap; gap: 6px; }
  .page-btn { min-width: 40px; height: 40px; font-size: 15px; -webkit-tap-highlight-color: transparent; }
  .page-ellipsis { padding: 0 4px; }

  /* v38 响应式表格：移动端紧凑列表 + 表头可见 */
  .resp-table { display: block; width: 100%; }
  .resp-table thead { display: block; }
  .resp-table thead tr {
    display: grid;
    grid-template-columns: 1fr 38px 48px 82px;
    gap: 12px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 2px solid #d0d0c8;
    background: #fafaf8;
  }
  .resp-table thead th { font-size: 13px; color: #888; font-weight: 500; padding: 0; text-align: center; }
  .resp-table thead th:first-child { text-align: left; padding-left: 4px; }
  .resp-table tbody { display: block; width: 100%; }
  .resp-table tbody tr {
    display: grid;
    grid-template-columns: 1fr 38px 48px 82px;
    gap: 12px;
    align-items: center;
    background: transparent;
    border: none;
    border-bottom: 1px solid #ececec;
    border-radius: 0;
    padding: 10px 0;
    margin-bottom: 0;
  }
  .resp-table tr:first-child { border-top: 1px solid #ececec; }
  .resp-table td {
    padding: 0;
    border: none;
    text-align: left;
    display: block;
    min-width: 0;
  }
  .resp-table td[data-label]::before { content: ''; }
  .resp-table td[data-label] { display: block; }
  .resp-table .prod-name { font-size: 15px; font-weight: 500; color: #2c5e2e; line-height: 1.3; padding-left: 4px; }
  .resp-table .yesterday-qty { font-size: 14px; color: #888; text-align: right; padding-right: 4px; }
  .resp-table .form-control { width: 100%; padding: 6px 6px; font-size: 16px; border: 1px solid #d8d8d0; border-radius: 4px; background: #fafaf8; }
  .resp-table input.qty-input { min-width: 0; width: 100%; text-align: left; padding: 8px 26px 8px 8px; font-size: 16px; }
  .resp-table select.form-control { width: 100%; padding: 6px 2px; font-size: 16px; }

  /* v38: 3列表格（编辑/查看页）用不同列宽 */
  .resp-table-3col thead tr { grid-template-columns: 1fr 82px 48px; gap: 12px; }
  .resp-table-3col tbody tr { grid-template-columns: 1fr 82px 48px; gap: 12px; padding: 10px 0; }

  /* v39: 只针对需求单新建/编辑/查看页面减少padding，不影响首页 */
  .card-compact { padding: 10px !important; margin-bottom: 10px !important; }
  .card-compact h3 { font-size: 14px; margin-bottom: 8px; }
  .card-compact .table-wrap { overflow-x: hidden; padding: 0; margin: 0; }

  /* v46: 报量步进器 - 上下符嵌入input框内右侧，数字左对齐 */
  .qty-stepper { position: relative; width: 100%; }
  .qty-arrows { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 0; }
  .qty-arrow-btn { border: none; background: transparent; cursor: pointer; padding: 0; font-size: 14px; line-height: 18px; color: #999; -webkit-tap-highlight-color: transparent; }
  .qty-arrow-btn:active { color: #4CAF50; }
}

/* v63: 桌面端(>=769px)隐藏自定义箭头，用原生spinner */
@media (min-width: 769px) {
  .qty-arrows { display: none; }
}
/* v63: 手机端(<=768px)隐藏原生spinner，用自定义箭头 */
@media (max-width: 768px) {
  .qty-input::-webkit-inner-spin-button,
  .qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none; margin: 0;
  }
  .qty-input { -moz-appearance: textfield; }
}

@media (min-width: 769px) {
  /* 桌面端恢复正常表格布局 */
  .resp-table { display: table; width: 100%; }
  .resp-table thead { display: table-header-group; }
  .resp-table tbody { display: table-row-group; }
  .resp-table tr { display: table-row; background: none; border: none; border-radius: 0; padding: 0; margin: 0; }
  .resp-table td { display: table-cell; padding: 10px 12px; border-bottom: 1px solid #e0e0e0; }
  .resp-table td[data-label]::before { display: none; }
  .resp-table td[data-label] { display: table-cell; }
  .resp-table .form-control { width: auto; padding: 6px 10px; font-size: 15px; }
  .resp-table .qty-input { min-width: 0; width: 100%; max-width: 110px; }
}

/* ============================================================
   配送单填写页：表格形式，桌面完整显示，手机横向滚动
   ============================================================ */
.delivery-table-wrap {
  width: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  max-height: calc(100vh - 250px);
  border: 1px solid #e0e0d8;
  border-radius: 8px;
}
.delivery-table {
  width: 100%;
  min-width: 1100px;
  border-collapse: collapse;
  background: #fff;
  font-size: 14px;
}
.delivery-table thead th {
  background: #f5f5f0;
  padding: 10px 8px;
  font-weight: 600;
  color: #555;
  border-bottom: 1px solid #e0e0d8;
  white-space: nowrap;
  text-align: center;
  /* v85: 表头纵向锁定（z-index需高于正文左侧锁定列的10） */
  position: sticky;
  top: 0;
  z-index: 12;
  box-shadow: inset 0 -1px 0 #e0e0d8;
}
.delivery-table tbody tr { border-bottom: 1px solid #f0f0ea; }
.delivery-table tbody tr:last-child { border-bottom: none; }
.delivery-table tbody td {
  padding: 10px 8px;
  text-align: center;
  vertical-align: middle;
}
.delivery-table tbody td.sticky-col {
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 10;
  text-align: left;
  border-right: 1px solid #f0f0ea;
  box-shadow: 2px 0 4px rgba(0,0,0,0.04);
}
.delivery-table thead th.sticky-col {
  position: sticky;
  left: 0;
  top: 0;
  z-index: 13;
  text-align: left;
  border-right: 1px solid #e0e0d8;
}
.dt-product { font-weight: 600; color: #2c5e2e; }
.dt-store { color: #888; font-size: 13px; }
.delivery-table .form-control {
  width: 80px;
  min-width: 60px;
  padding: 6px 6px;
  font-size: 14px;
  text-align: center;
}
.delivery-table .dt-result {
  font-weight: 600;
  color: #2c5e2e;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .delivery-table { font-size: 13px; }
  .delivery-table thead th,
  .delivery-table tbody td { padding: 8px 6px; }
  .delivery-table .form-control {
    width: 70px;
    min-width: 58px;
    padding: 8px 4px;
    font-size: 15px;
  }
}

@media (max-width: 400px) {
  .topbar-brand .brand-text { font-size: 14px; }
  .brand-icon { font-size: 18px; }
  .page-header h1 { font-size: 18px; }
  .stats-grid { grid-template-columns: 6fr 4fr; }
  .stat-value { font-size: 20px; }
}

/* v42: Desktop qty stepper (arrows inside input) */

/* v53: 配送单按品分组样式 */
.product-group-header td {
  background: #f5f5f5 !important;
  font-size: 14px;
  padding: 8px 12px;
  border-top: 2px solid #ddd;
}
.product-subtotal td {
  font-size: 13px;
}
.grand-total-row td {
  font-size: 15px;
  border-top: 2px solid #4caf50;
}
/* 暗色模式适配 */
@media (prefers-color-scheme: dark) {
  .product-group-header td {
    background: #2a2a2a !important;
    border-top: 2px solid #444;
  }
  .product-subtotal td {
    background: #1e2a1e !important;
  }
  .grand-total-row td {
    background: #1a2e1a !important;
    border-top: 2px solid #4caf50;
  }
}


}

/* ==========================================================
   v81 - 加量申请页面移动端适配（仅作用于 #extraTable）
   ========================================================== */
.resp-table-extra { width: 100%; border-collapse: collapse; }
.resp-table-extra thead th { font-size: 13px; }

/* 桌面端：保持原 table 布局，搜索框是普通 input */
@media (min-width: 769px) {
  .resp-table-extra #extraBody td[data-label="商品"] .extra-search {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #d8d8d0;
    border-radius: 8px;
    margin-bottom: 6px;
    box-sizing: border-box;
    background: #fff;
  }
}

/* 移动端：表格变卡片式 grid 布局 */
@media (max-width: 768px) {
  .resp-table-extra { min-width: 0 !important; }
  .resp-table-extra thead { display: none; }

  .resp-table-extra #extraBody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "store   store"
      "product product"
      "qty     unit"
      "action  action";
    gap: 10px;
    padding: 14px;
    margin-bottom: 12px;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  }

  .resp-table-extra #extraBody td {
    display: block;
    padding: 0;
    border: none;
    white-space: normal;
    width: auto;
  }

  .resp-table-extra #extraBody td[data-label="门店"] { grid-area: store; }
  .resp-table-extra #extraBody td[data-label="商品"] { grid-area: product; }
  .resp-table-extra #extraBody td[data-label="加量数量"] { grid-area: qty; }
  .resp-table-extra #extraBody td[data-label="单位"] { grid-area: unit; }
  .resp-table-extra #extraBody td[data-label="操作"] { grid-area: action; text-align: right; }

  /* 搜索框独立占整行，可看清 */
  .resp-table-extra #extraBody td[data-label="商品"] .extra-search {
    display: block;
    width: 100%;
    font-size: 16px; /* 防iOS缩放 */
    padding: 12px 14px;
    margin-bottom: 8px;
    box-sizing: border-box;
    border: 1px solid #d8d8d0;
    border-radius: 8px;
    background: #fff;
  }

  .resp-table-extra #extraBody td[data-label="加量数量"] input,
  .resp-table-extra #extraBody td[data-label="单位"] select,
  .resp-table-extra #extraBody td[data-label="门店"] select {
    font-size: 16px; /* 防iOS缩放 */
    padding: 10px 12px;
    box-sizing: border-box;
  }
}

/* ==========================================================
   v81 END
   ========================================================== */

/* ==========================================================
   v88: 移动端配送单表单优化 — 商品列隐藏+门店列锁定
   供应商手机端填毛重/皮重时拖到右侧看不到门店的问题修复
   思路：商品已有大标题分组(📦大葱)，每行无需重复显示商品名；
   门店列sticky锁左，横向滚动时始终可见是给哪家送货
   ========================================================== */
@media (max-width: 768px) {
  /* 商品列隐藏（每组商品已有大标题，不需要每行重复显示） */
  .delivery-table .col-product {
    display: none !important;
  }

  /* 门店列锁定左侧（横向滚动时始终可见） */
  .delivery-table .col-store {
    position: sticky;
    left: 0;
    z-index: 11;
    min-width: 80px;
    background: #fff;
    box-shadow: 2px 0 6px rgba(0,0,0,0.08);
  }
  .delivery-table thead .col-store {
    z-index: 14;
    background: #f5f5f0;
  }
  .delivery-table tbody td.col-store {
    background: #fff;
  }

  /* 商品组标题移动端加强（突出"📦 大葱"） */
  .delivery-table .product-group-header td {
    font-size: 16px;
    padding: 12px 10px;
    background: #f0f5e8 !important;
    border-top: 2px solid #8bc34a;
  }
  .delivery-table .product-group-header td strong {
    font-size: 16px;
  }

  /* 小计/合计行字号适配 */
  .delivery-table .product-subtotal td,
  .delivery-table .grand-total-row td {
    font-size: 13px;
  }

  /* 表头缩小字号腾空间 */
  .delivery-table thead th {
    font-size: 12px;
    padding: 6px 4px;
    white-space: nowrap;
  }

  /* 输入框移动端适配（16px防iOS缩放） */
  .delivery-table .form-control {
    font-size: 16px;
    min-width: 70px;
  }
}

/* ==========================================================
   汇总单详情表移动端适配 (v93)
   思路：9列在手机端挤成细条看不清
   - 商品列sticky锁左（采购始终知道"这条对应哪个商品"）
   - 供应商列最小宽度140px（下拉框能完整显示供应商名）
   - 其他列靠右滑浏览
   ========================================================== */
@media (max-width: 768px) {
  /* 商品列锁定左侧（横向滚动时始终可见） */
  .summary-detail-table .col-product {
    position: sticky;
    left: 0;
    z-index: 11;
    min-width: 90px;
    max-width: 120px;
    background: #fff;
    box-shadow: 2px 0 6px rgba(0,0,0,0.08);
  }
  .summary-detail-table thead .col-product {
    z-index: 14;
    background: #f5f5f0;
  }
  .summary-detail-table tbody td.col-product {
    background: #fff;
  }

  /* 供应商列最小宽度，下拉框撑满 */
  .summary-detail-table .col-supplier {
    min-width: 140px;
  }
  .summary-detail-table .col-supplier .form-control {
    width: 100%;
    font-size: 16px; /* 防iOS缩放 */
  }

  /* 表头字号适配 */
  .summary-detail-table thead th {
    font-size: 12px;
    padding: 6px 4px;
    white-space: nowrap;
  }
  .summary-detail-table tbody td {
    font-size: 13px;
    padding: 6px 4px;
  }

  /* 输入框移动端适配（16px防iOS缩放） */
  .summary-detail-table .form-control {
    font-size: 16px;
  }
}


/* ===== v100: 数字输入框去上下箭头（仅限加 no-spinner 类的输入框，防误触改数） ===== */
input[type=number].no-spinner::-webkit-inner-spin-button,
input[type=number].no-spinner::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number].no-spinner {
  -moz-appearance: textfield;
  appearance: textfield;
}
