/* =====================================================
   康煜进销存管理系统 - 全局样式
   v3.0 高性能版
   ===================================================== */

/* CSS 变量 - 主题系统 */
:root {
  --primary-color: #1890ff;
  --primary-hover: #40a9ff;
  --success-color: #52c41a;
  --warning-color: #faad14;
  --danger-color: #f5222d;
  --error-color: #f5222d;
  --text-color: #e8e8e8;
  --text-secondary: #a0a0a0;
  --border-color: #404040;
  --bg-color: #e6f7ff;
  --bg-secondary: #f0f5ff;
  --bg-card: #ffffff;
  --white: #ffffff;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --radius: 6px;
  --sidebar-width: 200px;
}

/* 主题色板 */
[data-theme="blue"] {
  --primary-color: #1890ff;
  --primary-hover: #40a9ff;
  --bg-color: #e6f7ff;
  --bg-secondary: #f0f5ff;
}

[data-theme="green"] {
  --primary-color: #52c41a;
  --primary-hover: #73d13d;
  --bg-color: #f6ffed;
  --bg-secondary: #f0f5ff;
}

[data-theme="purple"] {
  --primary-color: #722ed1;
  --primary-hover: #9254de;
  --bg-color: #f9f0ff;
  --bg-secondary: #efdbff;
}

[data-theme="red"] {
  --primary-color: #f5222d;
  --primary-hover: #ff7875;
  --bg-color: #fff1f0;
  --bg-secondary: #ffebe9;
}

[data-theme="orange"] {
  --primary-color: #fa8c16;
  --primary-hover: #ffc069;
  --bg-color: #fff7e6;
  --bg-secondary: #ffe7ba;
}

[data-theme="dark"] {
  --primary-color: #1890ff;
  --primary-hover: #40a9ff;
  --text-color: #e8e8e8;
  --text-secondary: #a0a0a0;
  --border-color: #404040;
  --bg-color: #1a1a2e;
  --bg-secondary: #16213e;
  --bg-card: #1f2937;
  --white: #e8e8e8;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* 基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 去除数字输入框的上下箭头 */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* 列宽拖拽手柄样式 */
.col-resize-handle {
  position: absolute !important;
  right: 0 !important;
  top: 0 !important;
  height: 100% !important;
  width: 8px !important;
  cursor: col-resize !important;
  background: transparent !important;
  z-index: 100 !important;
  user-select: none;
}
.col-resize-handle:hover {
  background: var(--primary-color) !important;
}

/* 销售单表格表头样式 - 确保拖拽正常 */
#so-items-table {
  table-layout: fixed !important;
  border-collapse: separate;
  border-spacing: 0;
}
#so-items-table thead th {
  position: sticky !important;
  top: 0;
  z-index: 10;
  user-select: none;
  overflow: visible !important;
  word-wrap: break-word;
  box-sizing: border-box;
}
#so-items-table tbody td {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap;
  box-sizing: border-box;
}

/* 拖拽状态下的表格样式 */
#so-items-table[data-resizing="true"] thead th,
#so-items-table[data-resizing="true"] tbody td {
  transition: none !important;
}

/* 拖拽时禁用文本选择 */
body.resizing {
  cursor: col-resize !important;
  user-select: none !important;
}
body.resizing * {
  cursor: col-resize !important;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: 14px;
  color: var(--text-color);
  background: var(--bg-color);
  line-height: 1.5;
  height: 100vh;
  overflow: hidden;
}

/* 页面主体：侧边栏+内容区（横排）— 详见 #main-page .page-body */

/* 页面隐藏 */
.hidden {
  display: none !important;
}

/* 登录页面 */
#login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.login-container {
  width: 100%;
  max-width: 400px;
  padding: 20px;
}

.login-box {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.login-header h1 {
  font-size: 24px;
  color: var(--primary-color);
  margin-bottom: 8px;
  text-shadow: 0 0 20px rgba(24, 144, 255, 0.3);
}

.login-header p {
  color: var(--text-secondary);
  font-size: 14px;
}

.login-tip {
  text-align: center;
  margin-top: 20px;
  color: var(--text-secondary);
  font-size: 12px;
}

/* 表单样式 */
.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  margin-bottom: 4px;
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d9d9d9;
  border-radius: var(--radius);
  font-size: 14px;
  transition: border-color 0.3s;
  background: #ffffff;
  color: #333333;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

/* 按钮样式 */
.btn-primary {
  background: var(--primary-color);
  color: var(--white);
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: #ffffff;
  color: #333333;
  border: 1px solid #d9d9d9;
  padding: 10px 20px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
}

.btn-secondary:hover {
  background: var(--bg-color);
}

.btn-danger {
  background: var(--danger-color);
  color: var(--white);
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 12px;
}

.btn-link {
  background: none;
  border: none;
  color: var(--primary-color);
  cursor: pointer;
  font-size: 14px;
  padding: 4px 8px;
}

.btn-link:hover {
  text-decoration: underline;
}

.btn-link.btn-danger {
  color: var(--danger-color);
  background: transparent;
  border: none;
}

.btn-block {
  width: 100%;
}

.btn-primary:disabled,
.btn-secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 小按钮 */
.btn-sm {
  padding: 4px 10px;
  font-size: 13px;
}

/* =====================================================
   列表筛选栏样式
   ===================================================== */
.filter-bar {
  background: #ffffff;
  border-radius: var(--radius);
  padding: 6px 12px;
  margin-bottom: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  border: 1px solid #e8e8e8;
}

/* 独立筛选栏用 flex 布局 */
.filter-bar > .filter-row,
.filter-row:not(thead tr) {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-end;
}

/* 表格内的筛选行保持原生 tr 布局，不要覆盖 display */
thead tr.filter-row {
  /* 不设置 display: flex，保留 table-row 默认布局 */
}

.filter-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.filter-item label {
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

.filter-input,
.filter-select {
  padding: 5px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 13px;
  color: #333;
  background: #fff;
  min-width: 130px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.filter-input:focus,
.filter-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.08);
}

.filter-select {
  cursor: pointer;
  min-width: 160px;
}

.filter-actions {
  margin-left: auto;
}

.filter-buttons {
  display: flex;
  gap: 6px;
}

.filter-quick-dates {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e0e0e0;
  flex-wrap: wrap;
}

.quick-date-label {
  font-size: 12px;
  color: #999;
}

.quick-date-btn {
  padding: 4px 12px;
  font-size: 12px;
  color: #666;
  background: #f5f5f5;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.quick-date-btn:hover {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

/* =====================================================
   客户/供应商输入框下拉样式
   ===================================================== */
.filter-customer-wrapper {
  position: relative;
}

.filter-customer-input-wrapper {
  position: relative;
}

.filter-customer-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 200px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-top: none;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  margin-top: -1px;
}

/* 确保筛选栏能显示下拉菜单 */
.filter-bar {
  position: relative;
  z-index: 100;
}

.filter-customer-wrapper {
  position: relative;
  z-index: 101;
}

.filter-customer-option {
  padding: 8px 12px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid #f0f0f0;
}

.filter-customer-option:last-child {
  border-bottom: none;
}

.filter-customer-option:hover {
  background: #e6f7ff;
  color: var(--primary-color);
}

.filter-customer-no-match {
  padding: 12px;
  font-size: 13px;
  color: #999;
  text-align: center;
}

/* 主页面布局 */
#main-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

#main-page .page-body {
  display: flex;
  flex-direction: row; /* sidebar 和 main-content 横排 */
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* 头部 */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border-bottom: none;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  height: 60px;
  padding: 0 25px;
}

/* 公司名 - header 绝对居中 */
.header-company {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  padding: 4px 16px;
  white-space: nowrap;
  text-shadow: 0 0 8px rgba(0, 212, 255, 0.3);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  letter-spacing: 1px;
}

.header-datetime {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
}

.header-datetime .dt-left {
  display: flex;
  flex-direction: column;
  line-height: 1.4;
}

.header-datetime .date {
  font-weight: 500;
}

.header-datetime .time {
  font-family: "Consolas", "Monaco", monospace;
  font-size: 14px;
  font-weight: 600;
  color: #00d4ff;
  text-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
}

.header-datetime .company {
  font-size: 15px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  background: linear-gradient(
    135deg,
    rgba(0, 212, 255, 0.15),
    rgba(0, 150, 255, 0.1)
  );
  padding: 4px 14px;
  border-radius: 6px;
  white-space: nowrap;
  letter-spacing: 2px;
  border: 1px solid rgba(0, 212, 255, 0.2);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
}

.header-right .btn-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 4px;
  transition: all 0.2s;
}

.header-right .btn-link:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* 侧边栏 */
.sidebar {
  width: var(--sidebar-width, 200px);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
  overflow-x: visible;
  flex-shrink: 0;
  position: relative;
  z-index: 99998;
}

.menu {
  list-style: none;
  padding: 10px 0;
}

.menu-group {
  padding: 10px 20px 6px;
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: 600;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  cursor: pointer;
  transition: all 0.3s;
  color: var(--text-secondary);
}

.menu-item:hover {
  background: rgba(24, 144, 255, 0.1);
  color: var(--text-color);
}

.menu-item.active {
  background: rgba(24, 144, 255, 0.15);
  color: var(--primary-color);
  border-right: 3px solid var(--primary-color);
}

.menu-icon {
  margin-right: 10px;
  font-size: 16px;
}

/* 多级菜单样式 */
.menu-parent {
  position: relative;
}

.menu-parent-item {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  cursor: pointer;
  transition: all 0.3s;
  color: var(--text-secondary);
}

.menu-parent-item:hover {
  background: rgba(24, 144, 255, 0.15);
  color: var(--primary-color);
}

.menu-arrow {
  margin-left: auto;
  font-size: 10px;
  transition: transform 0.3s;
}

.menu-parent-item:hover .menu-arrow {
  transform: rotate(90deg);
}

.submenu {
  position: fixed;
  min-width: 200px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-10px);
  transition: all 0.2s ease;
  z-index: 100000;
  padding: 8px 0;
  pointer-events: none;
}

/* 显示子菜单的 class */
.submenu.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
}

/* 子菜单内部鼠标进入时保持显示 */
.submenu:hover {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
}

/* 父菜单悬停时显示子菜单 - 纯CSS方式 */
.menu-parent:hover > .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
}

/* 子菜单内部鼠标进入时保持显示 */
.submenu:hover {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
}

.submenu-item {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
  white-space: nowrap;
}

.submenu-item:hover {
  background: rgba(24, 144, 255, 0.1);
  color: var(--primary-color);
}

.submenu-item .menu-icon {
  margin-right: 8px;
  font-size: 14px;
}

.submenu-item .menu-text {
  font-size: 13px;
}

/* 主内容区 */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
  color: #333333;
  position: relative;
  z-index: 1;
}

/* 页签栏 */
.tabs-container {
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  padding: 8px 10px 0;
  border-bottom: none;
  min-height: 40px;
  flex-shrink: 0;
}

.tabs-container.hidden {
  display: none;
}

.tabs-list {
  display: flex;
  flex: 1;
  overflow-x: auto;
  gap: 2px;
}

.tabs-list::-webkit-scrollbar {
  display: none;
}

.tab-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  font-size: 13px;
}

.tab-item:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.tab-item.active {
  background: #fff;
  color: #333;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

/* page-header 内的 tab-item（如往来账款切换按钮）适配浅色背景 */
.page-header .tab-item {
  color: #666;
  background: #f0f0f0;
  border-radius: 4px;
}
.page-header .tab-item:hover {
  color: #333;
  background: #e0e0e0;
}
.page-header .tab-item.active {
  background: #fff;
  color: #333;
  border: 1px solid #d9d9d9;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* 页签红框提醒 - 多个新建销售单/出库单时 */
.tab-item.tab-warning {
  background: rgba(255, 77, 79, 0.2) !important;
  border: 2px solid #ff4d4f !important;
  animation: tab-pulse 1.5s infinite;
}

.tab-item.tab-warning .tab-title {
  color: #ff4d4f;
  font-weight: 600;
}

.tab-item.tab-warning.active {
  background: #fff !important;
}

@keyframes tab-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 77, 79, 0.4);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(255, 77, 79, 0.2);
  }
}

/* 属性验证失败抖动动画 */
@keyframes attr-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-4px);
  }
  40% {
    transform: translateX(4px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(4px);
  }
}

.attr-invalid-shake {
  animation: attr-shake 0.4s ease-in-out;
  border-color: #ff4d4f !important;
}

.tab-title {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tab-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  border-radius: 50%;
  font-size: 14px;
  opacity: 0.6;
  transition: all 0.2s;
}

.tab-close:hover {
  background: rgba(255, 0, 0, 0.6);
  color: #fff;
  opacity: 1;
}

.tab-close-all {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  border-radius: 4px;
  font-size: 12px;
  margin-left: 10px;
  transition: all 0.2s;
}

.tab-close-all:hover {
  background: rgba(255, 0, 0, 0.5);
  color: #fff;
}

/* 页面视图 */
.page-view {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* 包含 data-table 的 page-view：表格区域独立滚动，表头才能 sticky */
.page-view:has(.data-table) {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
}
.page-view:has(.data-table) .page-header {
  flex-shrink: 0;
  padding: 6px 12px 4px 12px;
  margin: 0;
}
.page-view:has(.data-table) .table-container {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: auto;
  margin: 0 12px 8px 12px;
}

/* 当 page-view 内包含 doc-page 时的布局由 css/layout/page-view.css 统一控制 */

/* 合计行等底部区域 flex-shrink:0 自动贴底 */
.doc-receivable-section,
.doc-footer-section,
.doc-summary-section,
.doc-actions-section {
  flex-shrink: 0;
}

/* 当 page-view 内包含 dashboard 时，去掉自身滚动 */
.page-view:has(.dashboard) {
  overflow: hidden;
  padding: 0;
}

/* 表单页面 */
.form-page {
  max-width: 1200px;
  margin: 0 auto;
}

.form-page .page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e0e0e0;
}

.form-page .page-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.form-page .page-actions {
  display: flex;
  gap: 6px;
}

.form-content {
  background: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 页面头部 */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e0e0e0;
}

.page-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: #333333;
}

.page-actions {
  display: flex;
  gap: 6px;
}

.page-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.tab-btn {
  padding: 5px 12px;
  border: 1px solid var(--border-color);
  background: var(--white);
  cursor: pointer;
  border-radius: var(--radius);
}

.tab-btn.active {
  background: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

/* 表格 */
.table-container {
  background: #ffffff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #e0e0e0;
}

/* 单据列表页面 - 独立滚动 */
.page-view.list-page {
  overflow: hidden; /* 禁止.page-view自身滚动 */
  display: flex;
  flex-direction: column;
  height: 100%; /* 填满父容器 */
  padding: 0; /* 去掉padding，让子元素控制自己的边距 */
}

/* 列表页面的头部区域 - 固定高度 */
.page-view.list-page .page-header {
  flex-shrink: 0;
  padding: 6px 12px 4px 12px;
  margin: 0;
}

/* 列表页面的筛选栏 - 固定高度 */
.page-view.list-page .filter-bar {
  flex-shrink: 0;
  padding: 4px 12px 4px 12px;
  margin: 0;
}

.page-view.list-page .table-container {
  flex: 1;
  min-height: 0; /* 关键：允许flex项目缩小 */
  max-height: none; /* 移除最大高度限制，由flex控制 */
  overflow: auto;
  margin: 0 12px 8px 12px; /* 添加边距 */
}

.data-table {
  width: auto;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.data-table th,
.data-table td {
  padding: 6px 8px;
  text-align: center !important;
  border-bottom: 1px solid #e0e0e0;
  border-right: 1px solid #e0e0e0;
  line-height: 28px;
}

.data-table th {
  background: #f5f5f5;
  font-weight: 600;
  font-size: 13px;
  position: sticky;
  top: 0;
  z-index: 2;
  color: #333333;
}

/* 表格内筛选行样式 */
.data-table thead tr.filter-row th,
.data-table thead tr[id$="-filter-row"] th {
  padding: 4px 6px;
  font-weight: normal;
  background: #fafafa;
  border-bottom: 2px solid #e8e8e8;
  position: sticky;
  top: 40px; /* 列标题行高度(6+28+6)，粘在列标题下方 */
  z-index: 3;
}
.data-table thead tr.filter-row .col-filter {
  width: 100%;
  padding: 3px 6px;
  border: 1px solid #ddd;
  border-radius: 3px;
  font-size: 11px;
  color: #333;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.data-table thead tr.filter-row .col-filter:focus {
  border-color: #4caf50;
  outline: none;
  box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.15);
}

.data-table tr:hover {
  background: #f9f9f9;
}

/* 可双击编辑的行 */
.data-table tr.clickable-row {
  cursor: pointer;
}

.data-table tr.clickable-row:hover {
  background: #e6f7ff !important;
  transition: background 0.15s;
}

.data-table tr.clickable-row:hover td:first-child::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #1890ff;
  border-radius: 0;
}

/* ── 键盘上下箭头行导航选中样式 ── */
.data-table tr.row-nav-active,
.doc-items-table tr.row-nav-active,
table[id] tr.row-nav-active {
  background: #e6f7ff !important;
  outline: 1px solid #91d5ff;
  outline-offset: -1px;
  transition:
    background 0.1s,
    outline 0.1s;
}

.data-table tr.row-nav-active td:first-child::before,
.doc-items-table tr.row-nav-active td:first-child::before,
table[id] tr.row-nav-active td:first-child::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #1890ff;
  border-radius: 0;
}

.data-table .empty-tip {
  text-align: center;
  color: var(--text-secondary);
  padding: 40px;
}

/* 列表合计栏 - 固定在表格和分页之间，不随表格滚动 */
.list-summary-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 6px 12px;
  background: #f0f5ff;
  border-top: 2px solid #1890ff;
  font-size: 13px;
  color: #333;
}
.list-summary-bar .summary-label {
  font-weight: 500;
  color: #666;
}
.list-summary-bar .summary-value {
  font-weight: 700;
  color: #1890ff;
  min-width: 100px;
  text-align: right;
}

/* 分页 */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #ffffff;
  border-top: 1px solid #e0e0e0;
}

.pagination-info {
  color: #666666;
  font-size: 13px;
}

.pagination-buttons {
  display: flex;
  gap: 4px;
}

/* 仪表盘 - 现代化设计 */
.dashboard {
  padding: 16px;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
  height: 100%;
  overflow-y: auto;
  box-sizing: border-box;
}

/* 欢迎区域 */
.dashboard-welcome {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding: 14px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  color: #fff;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.dashboard-welcome h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.dashboard-welcome p {
  margin: 4px 0 0;
  font-size: 13px;
  opacity: 0.9;
}

.dashboard-welcome .welcome-date {
  text-align: right;
  font-size: 13px;
  opacity: 0.9;
}

.dashboard-welcome .welcome-date strong {
  display: block;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 2px;
}

/* 统计卡片网格 */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  background: var(--white);
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.stat-card.sales::before {
  background: linear-gradient(90deg, #52c41a, #73d13d);
}
.stat-card.receipt::before {
  background: linear-gradient(90deg, #1890ff, #69c0ff);
}
.stat-card.delivery::before {
  background: linear-gradient(90deg, #faad14, #ffd666);
}
.stat-card.warning::before {
  background: linear-gradient(90deg, #f5222d, #ff7875);
}

.stat-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 10px;
}

.stat-card.sales .stat-card-icon {
  background: linear-gradient(135deg, #f6ffed, #d9f7be);
}
.stat-card.receipt .stat-card-icon {
  background: linear-gradient(135deg, #e6f7ff, #bae7ff);
}
.stat-card.delivery .stat-card-icon {
  background: linear-gradient(135deg, #fffbe6, #ffe58f);
}
.stat-card.warning .stat-card-icon {
  background: linear-gradient(135deg, #fff1f0, #ffccc7);
}

.stat-title {
  font-size: 13px;
  color: #8c8c8c;
  margin-bottom: 4px;
  font-weight: 500;
}

.stat-value {
  font-size: 26px;
  font-weight: 700;
  color: #262626;
  line-height: 1.2;
}

.stat-card.sales .stat-value {
  color: #52c41a;
}
.stat-card.receipt .stat-value {
  color: #1890ff;
}
.stat-card.delivery .stat-value {
  color: #faad14;
}
.stat-card.warning .stat-value {
  color: #f5222d;
}

.stat-count {
  font-size: 13px;
  color: #8c8c8c;
  margin-top: 8px;
}

/* 双列卡片行 */
.dashboard-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.dashboard-card {
  background: var(--white);
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.dashboard-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
}

.dashboard-card-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: #262626;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-card-header h3 .icon {
  font-size: 20px;
}

.dashboard-card-header .badge {
  background: #f5222d;
  color: #fff;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
}

.big-number {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
}

.big-number.ar {
  color: #f5222d;
}
.big-number.ap {
  color: #faad14;
}

/* 列表样式 */
.dashboard-list {
  max-height: 240px;
  overflow-y: auto;
}

.dashboard-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f5f5f5;
}

.dashboard-list-item:last-child {
  border-bottom: none;
}

.dashboard-list-item .info {
  flex: 1;
}

.dashboard-list-item .title {
  font-size: 13px;
  color: #262626;
  font-weight: 500;
  margin-bottom: 2px;
}

.dashboard-list-item .desc {
  font-size: 11px;
  color: #8c8c8c;
}

.dashboard-list-item .value {
  text-align: right;
}

.dashboard-list-item .amount {
  font-size: 14px;
  font-weight: 600;
  color: #262626;
}

.dashboard-list-item .date {
  font-size: 12px;
  color: #8c8c8c;
  margin-top: 4px;
}

.empty-tip {
  text-align: center;
  padding: 40px 20px;
  color: #8c8c8c;
  font-size: 14px;
}

.empty-tip .icon {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
  opacity: 0.5;
}

/* 快捷入口 - 自适应正方形网格 */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-align: center;
  position: relative;
  padding: 6px;
}

.quick-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-hover)
  );
  color: #fff;
}

.quick-action-btn .icon {
  font-size: 26px;
  margin-bottom: 4px;
  line-height: 1;
}

.quick-action-btn .label {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

/* 自定义快捷入口弹窗 */
.dashboard-shortcut-modal {
  max-width: 560px;
}

.dashboard-shortcut-modal .shortcut-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-height: 400px;
  overflow-y: auto;
  padding: 4px;
}

.dashboard-shortcut-modal .shortcut-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 4px;
  border: 2px solid #e8e8e8;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  background: #fff;
  user-select: none;
}

.dashboard-shortcut-modal .shortcut-item:hover {
  border-color: var(--primary-color);
  background: #f0f5ff;
}

.dashboard-shortcut-modal .shortcut-item.active {
  border-color: var(--primary-color);
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-hover)
  );
  color: #fff;
}

.dashboard-shortcut-modal .shortcut-item .icon {
  font-size: 22px;
  margin-bottom: 4px;
}

.dashboard-shortcut-modal .shortcut-item .label {
  font-size: 11px;
  text-align: center;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

/* 响应式 */
@media (max-width: 1200px) {
  .stat-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .stat-cards {
    grid-template-columns: 1fr;
  }
  .dashboard-row {
    grid-template-columns: 1fr;
  }
  .quick-actions {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 8px;
  }
  .dashboard-welcome {
    flex-direction: column;
    text-align: center;
  }
  .dashboard-welcome .welcome-date {
    text-align: center;
    margin-top: 16px;
  }
}

/* 财务报表 */
.report-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.report-card {
  background: var(--white);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.report-card h3 {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.report-value {
  font-size: 28px;
  font-weight: 600;
  color: var(--primary-color);
}

.report-card.highlight .report-value {
  color: var(--success-color);
}

.report-count {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* 往来账款 */
.summary-bar {
  display: flex;
  gap: 30px;
  padding: 20px;
  background: var(--white);
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.summary-item {
  display: flex;
  flex-direction: column;
}

.summary-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.summary-value {
  font-size: 24px;
  font-weight: 600;
}

/* 模态框 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: #ffffff;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  border: 1px solid #e0e0e0;
}

/* 弹窗抖动动画 */
@keyframes modal-shake {
  0%,
  100% {
    transform: translateX(0);
    border-color: #e0e0e0;
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-5px);
    border-color: #ff4d4f;
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(5px);
    border-color: #ff4d4f;
  }
}

.modal-shake {
  animation: modal-shake 0.3s ease-in-out;
  border: 2px solid #ff4d4f !important;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e0e0e0;
  background: #f5f5f5;
}

.modal-header h3 {
  font-size: 18px;
  color: #333333;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666666;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid #e0e0e0;
  background: #f5f5f5;
}

/* 角色表单 */
.modal.modal-role {
  max-width: 960px;
  width: 96vw;
}

.role-form-container {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.role-form-row {
  display: grid;
  grid-template-columns: 240px 1fr 180px;
  gap: 16px;
  align-items: start;
}

.role-form-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.role-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #1890ff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 10px;
  background: #e6f7ff;
  border-left: 3px solid #1890ff;
  border-radius: 0 4px 4px 0;
  margin-bottom: 4px;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  padding: 8px;
  background: #fafafa;
}

.checkbox-group.scrollable {
  max-height: 360px;
  overflow-y: auto;
  overflow-x: hidden;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  color: #333;
  transition: background 0.15s;
  user-select: none;
  white-space: nowrap;
}

.checkbox-item:hover {
  background: #e6f7ff;
  color: #1890ff;
}

.checkbox-item input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #1890ff;
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-item input[type="checkbox"]:checked + span {
  color: #1890ff;
  font-weight: 500;
}

.role-form-col .form-group label {
  font-size: 13px;
  font-weight: 500;
  color: #555;
}

.role-form-col .form-group input,
.role-form-col .form-group select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 5px;
  font-size: 13px;
  color: #333;
  background: #fff;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.role-form-col .form-group input:focus,
.role-form-col .form-group select:focus {
  outline: none;
  border-color: #1890ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.08);
}

/* 错误提示 */
.error {
  padding: 20px;
  background: rgba(245, 34, 45, 0.1);
  border: 1px solid rgba(245, 34, 45, 0.3);
  border-radius: var(--radius);
  color: #ff7875;
}

.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
}

/* 空页面 */
.empty-page {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

/* 状态徽章 */
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.status-draft {
  background: #f0f0f0;
  color: #666;
}
.status-confirmed {
  background: #e6f7ff;
  color: #1890ff;
}
.status-delivered {
  background: #fff7e6;
  color: #fa8c16;
}
.status-completed {
  background: #f6ffed;
  color: #52c41a;
}
.status-voided {
  background: #fff1f0;
  color: #f5222d;
}

/* 响应式 */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -200px;
    top: 60px;
    bottom: 0;
    z-index: 100;
    transition: left 0.3s;
  }

  .sidebar.open {
    left: 0;
  }

  .stat-cards,
  .dashboard-row {
    grid-template-columns: 1fr;
  }
}

/* 系统设置 */
.settings-content {
  background: #ffffff;
  border-radius: var(--radius);
  padding: 20px;
}

.settings-section {
  margin-bottom: 30px;
}

.settings-section h3 {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
}

.setting-desc {
  color: #666;
  font-size: 14px;
  margin-bottom: 15px;
}

.setting-tip {
  color: #999;
  font-size: 12px;
  margin-top: 5px;
}

.sidebar-width-control {
  display: flex;
  align-items: center;
  gap: 15px;
}

.sidebar-width-control input[type="range"] {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  background: linear-gradient(to right, #1890ff, #40a9ff);
  border-radius: 3px;
  outline: none;
}

.sidebar-width-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: #fff;
  border: 2px solid #1890ff;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.sidebar-width-control #sidebar-width-value {
  min-width: 50px;
  font-size: 16px;
  font-weight: 600;
  color: #1890ff;
}

/* 主题选择器 */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 15px;
  margin: 15px 0;
}

.theme-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

.theme-option:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.theme-option.active {
  border-color: var(--primary-color);
  background: rgba(24, 144, 255, 0.1);
}

.theme-preview {
  width: 80px;
  height: 50px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.theme-blue {
  background: linear-gradient(135deg, #e6f7ff 0%, #1890ff 100%);
}

.theme-green {
  background: linear-gradient(135deg, #f6ffed 0%, #52c41a 100%);
}

.theme-purple {
  background: linear-gradient(135deg, #f9f0ff 0%, #722ed1 100%);
}

.theme-red {
  background: linear-gradient(135deg, #fff1f0 0%, #f5222d 100%);
}

.theme-orange {
  background: linear-gradient(135deg, #fff7e6 0%, #fa8c16 100%);
}

.theme-dark {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.theme-option span {
  font-size: 13px;
  color: #666;
}

.no-rules-table {
  margin-bottom: 20px;
  overflow-x: auto;
}

.no-rules-table .data-table {
  min-width: 700px;
}

.no-rules-table input,
.no-rules-table select {
  padding: 6px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 13px;
  background: #fff;
}

.preview-no {
  font-family: "Consolas", "Monaco", monospace;
  background: #f5f5f5;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 13px;
  color: #1890ff;
  font-weight: 500;
}

.settings-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
}

/* =====================================================
   单据表单页面样式 - 完整布局
   ===================================================== */

/* 单据页头 */
.doc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 20px;
  border-bottom: 2px solid #1890ff;
  background: linear-gradient(to right, #f8fbff, #ffffff);
  flex-shrink: 0;
  position: relative;
}

.doc-header-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
}

.doc-order-no {
  font-size: 14px;
  color: #666;
}

.doc-order-no strong {
  color: #1890ff;
  font-family: "Consolas", "Monaco", monospace;
  font-size: 15px;
}

.doc-record-time {
  font-size: 13px;
  color: #999;
}

.doc-title {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
  text-align: center;
  letter-spacing: 3px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  pointer-events: none;
}

.doc-header-right {
  display: flex;
  gap: 10px;
  flex: 1;
  justify-content: flex-end;
}

.doc-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px 24px;
}

.doc-info-item {
  display: flex;
  align-items: center;
}

.doc-info-item label {
  min-width: 80px;
  color: #666;
  font-size: 13px;
}

.doc-info-item label:after {
  content: ":";
  margin-right: 4px;
}

.doc-info-item .value {
  flex: 1;
  color: #333;
  font-size: 14px;
}

.doc-info-item input,
.doc-info-item select,
.doc-info-item textarea {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 13px;
  background: #fff;
  color: #333;
}

.doc-info-item input:focus,
.doc-info-item select:focus,
.doc-info-item textarea:focus {
  border-color: #1890ff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

.doc-summary-row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.doc-summary-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

.doc-summary-row label {
  font-size: 13px;
  color: #666;
  margin-bottom: 4px;
  display: block;
}

.doc-summary-row input,
.doc-summary-row textarea {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 13px;
}

.doc-summary-row textarea {
  resize: vertical;
  min-height: 40px;
}

.doc-items-table {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  background: #fff;
  table-layout: fixed;
}

.doc-items-table thead {
  background: #f5f7fa;
  position: sticky;
  top: 0;
  z-index: 10;
}

.doc-items-table th {
  padding: 10px 8px;
  text-align: center;
  font-weight: 600;
  color: #333;
  border: 1px solid #e8e8e8;
  white-space: nowrap;
  background: linear-gradient(to bottom, #f8f9fb, #f0f2f5);
}

.doc-items-table td {
  padding: 4px 6px;
  border: 1px solid #e8e8e8;
  vertical-align: middle;
  line-height: 28px;
  text-align: center !important;
}

.doc-items-table td[data-col="mark"] {
  border: none;
  text-align: center;
  padding: 0;
}

.doc-items-table td[data-col="mark"] .cell-checkbox {
  margin: 0;
  cursor: pointer;
}

.doc-items-table tbody tr:hover {
  background: #f8fbff;
}

.doc-items-table input,
.doc-items-table select {
  width: 100%;
  padding: 5px 6px;
  border: 1px solid #d9d9d9;
  border-radius: 3px;
  font-size: 12px;
  box-sizing: border-box;
  line-height: 18px;
}

.doc-items-table input:focus,
.doc-items-table select:focus {
  border-color: #1890ff;
  outline: none;
}

/* 只读单元格输入框 */
.cell-readonly {
  background: #f5f5f5 !important;
  color: #666;
}

/* 计算结果单元格 */
.cell-calc {
  background: #fff7e6 !important;
}

/* 复选框特殊处理 */
.cell-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 16px !important;
  height: 16px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 1px solid #bbb !important;
  border-radius: 2px;
  background: #fff;
  cursor: pointer;
  vertical-align: middle;
  display: inline-block !important;
  box-shadow: none !important;
}

.cell-checkbox:checked {
  background: #1890ff;
  border-color: #1890ff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpolyline points='1.5,5 4,7.5 8.5,2.5' stroke='white' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 10px 10px;
  background-position: center;
}

/* 商品搜索输入框容器 */
.fuzzy-input-wrap {
  position: relative !important;
  overflow: visible !important;
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* fuzzy-input-wrap 内的输入框自适应容器宽度 */
.fuzzy-input-wrap input[type="text"] {
  width: 100% !important;
  padding: 4px 6px !important;
  border: 1px solid #d9d9d9 !important;
  border-radius: 3px !important;
  box-sizing: border-box !important;
  color: #333 !important;
  font-size: 13px !important;
}

/* fuzzy-dropdown 下拉框样式
   position/top/left 由 JS 在运行时动态设置（appendChild到body后用fixed定位），
   此处只设置视觉样式，不设 position 默认值避免干扰 JS 定位 */
.fuzzy-dropdown,
.prod-fuzzy-dropdown {
  display: none;
  max-height: 200px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 3px;
  z-index: 10000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.doc-item-row {
  transition: background 0.2s;
  position: relative;
}

.doc-item-row:hover {
  background: #f0f7ff;
}

/* 商品搜索下拉框 - 确保在最上层
   注意：position 由 JS 动态设置，不使用 !important */
.prod-fuzzy-dropdown {
  z-index: 10000 !important;
}

/* 确保表格内的绝对定位元素在正确的层 */
#so-items-table {
  position: relative;
  z-index: 1;
}

#so-items-table tbody tr.doc-item-row {
  z-index: auto;
}

/* 商品名称单元格 - 允许下拉框溢出 */
#so-items-table tbody td[data-col="name"] {
  overflow: visible !important;
}

/* 商品搜索输入框容器 */
.fuzzy-input-wrap {
  position: relative !important;
  overflow: visible !important;
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* fuzzy-input-wrap 内的输入框自适应容器宽度 */
.fuzzy-input-wrap input[type="text"] {
  width: 100% !important;
  padding: 4px 6px !important;
  border: 1px solid #d9d9d9 !important;
  border-radius: 3px !important;
  box-sizing: border-box !important;
  color: #333 !important;
  font-size: 13px !important;
}

/* 商品搜索下拉框（JS 动态定位，position 由 JS 设置） */
.prod-fuzzy-dropdown {
  z-index: 100000 !important;
  max-height: 200px;
  overflow-y: auto;
}

/* 商品下拉项样式 */
.fuzzy-item {
  padding: 6px 10px;
  cursor: pointer;
  font-size: 13px;
  color: #000;
  border-bottom: 1px solid #f0f0f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fuzzy-item:hover {
  background: #e6f7ff;
  color: #1890ff;
}

.fuzzy-item:last-child {
  border-bottom: none;
}

/* 操作列按钮 */
.doc-action-btns {
  display: flex;
  gap: 4px;
  justify-content: center;
}

.doc-action-btns button {
  padding: 4px 8px;
  font-size: 12px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
}

.doc-action-btns .btn-add {
  background: #1890ff;
  color: #fff;
}

.doc-action-btns .btn-add:hover {
  background: #40a9ff;
}

.doc-action-btns .btn-del {
  background: transparent;
  color: #333;
  border: 1px solid #333;
}

.doc-action-btns .btn-del:hover {
  background: #f5f5f5;
  border-color: #666;
}

.doc-action-btns .btn-copy {
  background: #52c41a;
  color: #fff;
}

.doc-action-btns .btn-copy:hover {
  background: #73d13d;
}

/* 合计行 */
.doc-total-row {
  background: #fff7e6 !important;
  font-weight: 600;
}

.doc-total-row td {
  text-align: center;
  padding: 2px 4px;
  color: #d46b08;
}

.doc-total-row td:first-child {
  text-align: right;
  padding-right: 15px;
}

.doc-total-value {
  color: #d46b08;
  font-size: 14px;
}

.doc-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.doc-footer-block {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  padding: 12px 16px;
}

.doc-footer-block h4 {
  font-size: 13px;
  color: #666;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px dashed #e8e8e8;
}

.doc-footer-field {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.doc-footer-field label {
  min-width: 70px;
  color: #999;
  font-size: 12px;
}

.doc-footer-field .value {
  flex: 1;
  font-size: 13px;
  color: #333;
}

.doc-footer-field input {
  flex: 1;
  padding: 4px 8px;
  border: 1px solid #d9d9d9;
  border-radius: 3px;
  font-size: 13px;
}

.doc-footer-field .checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.doc-footer-field input[type="checkbox"] {
  width: auto;
}

/* 列设置面板 */
.doc-items-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.column-settings-panel {
  position: absolute;
  z-index: 100;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 400px;
  max-width: 600px;
}

.column-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.column-settings-body {
  max-height: 300px;
  overflow-y: auto;
}

/* 页面设置面板 */
.page-settings-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  min-width: 380px;
  max-width: 500px;
}

/* 列排序拖拽 */
.dv-col-sort-item {
  display: flex;
  align-items: center;
  padding: 6px 8px;
  margin-bottom: 4px;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 4px;
  cursor: default;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.dv-col-sort-item:hover {
  background: #e6f7ff;
  border-color: #91d5ff;
}
.dv-col-sort-dragging {
  opacity: 0.4;
  background: #fff !important;
  border: 1px dashed #1890ff !important;
}
.dv-col-sort-item:active .dv-col-sort-handle {
  cursor: grabbing;
}

.page-settings-content {
  overflow: hidden;
}

.page-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
}

.page-settings-header button {
  color: #fff;
  opacity: 0.8;
}

.page-settings-header button:hover {
  opacity: 1;
}

.page-settings-body {
  padding: 16px 18px;
}

.page-settings-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.page-settings-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #f8f9fa;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.page-settings-item:hover {
  background: #e9ecef;
}

.page-settings-item.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.page-settings-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.page-settings-item.disabled input {
  cursor: not-allowed;
}

.page-settings-item span {
  font-size: 14px;
  color: #333;
}

/* 单据页面布局由 css/layout/page-view.css 统一控制，此处只保留背景色 */
.doc-page {
  background: #fff;
}

/* 已审核单据：仅可输入区域变灰 + 中央水印，背景/文字不变 */
.doc-page.doc-confirmed {
  position: relative;
}

.doc-page.doc-confirmed::after {
  content: "已审核";
  position: absolute;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%) rotate(-18deg);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: 6px;
  color: rgba(100, 100, 100, 0.1);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.03);
  white-space: nowrap;
  pointer-events: none;
  z-index: 3;
}

.doc-page.doc-confirmed input,
.doc-page.doc-confirmed select,
.doc-page.doc-confirmed textarea {
  background: #f0f0f0 !important;
  border-color: #d9d9d9 !important;
  color: #333 !important;
}

.doc-page.doc-confirmed .doc-items-table tbody tr:hover {
  background: transparent;
}

.doc-page.doc-confirmed .doc-actions-section {
  position: relative;
  z-index: 4;
}

.doc-page.doc-confirmed .doc-actions-section .doc-action-btn {
  opacity: 1 !important;
  filter: none !important;
}

/* 只读模式（编辑单据时）——仅可输入区域变灰，背景不变 */
.doc-page.doc-readonly {
  position: relative;
}

.doc-page.doc-readonly::after {
  content: "只读模式";
  position: absolute;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%) rotate(-15deg);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: 6px;
  color: rgba(100, 100, 100, 0.08);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.03);
  white-space: nowrap;
  pointer-events: none;
  z-index: 3;
}

.doc-page.doc-readonly input,
.doc-page.doc-readonly select,
.doc-page.doc-readonly textarea {
  background: #f0f0f0 !important;
  border-color: #d9d9d9 !important;
  color: #333 !important;
}

.doc-page.doc-readonly .doc-items-table tbody tr:hover {
  background: transparent;
}

.doc-page.doc-readonly .doc-actions-section {
  position: relative;
  z-index: 4;
}

.doc-page.doc-readonly .doc-actions-section .doc-action-btn {
  opacity: 1 !important;
  filter: none !important;
}

.doc-info-section {
  flex-shrink: 0;
  padding: 6px 20px;
  background: #fff;
  border-bottom: 1px solid #eee;
}

.doc-summary-section {
  flex-shrink: 0;
  padding: 6px 20px;
  background: #fafafa;
  border-bottom: 1px solid #eee;
}

.doc-items-section {
  flex: 1;
  min-height: 0;
  padding: 6px 20px;
  background: #fff;
  overflow-x: auto;
  overflow-y: auto;
}

.doc-items-section .doc-items-toolbar {
  margin-bottom: 4px;
}

.doc-receivable-section {
  padding: 4px 20px;
  background: linear-gradient(to right, #f0f5ff, #e6f7ff);
  border-top: 1px solid #d9e6f7;
  flex-shrink: 0;
}

/* 底部汇总+收货信息 合并行布局 */
.doc-bottom-row {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
.doc-bottom-left {
  display: flex;
  gap: 10px;
  align-items: center;
  flex: 1;
  min-width: 0;
}
.doc-bottom-item {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.doc-bottom-item label {
  font-size: 12px;
  color: #666;
  white-space: nowrap;
  flex-shrink: 0;
}
.doc-bottom-item input {
  flex: 1;
  min-width: 0;
  padding: 3px 6px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 12px;
}
.doc-bottom-right {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-shrink: 0;
}

.doc-footer-section {
  flex-shrink: 0;
  padding: 4px 20px;
  background: #fafafa;
  border-top: 1px solid #eee;
}

/* .doc-actions-section 已移至 2596 行 */

.doc-receivable-grid {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  align-items: center;
}

.doc-receivable-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.doc-receivable-item label {
  color: #666;
  font-size: 13px;
}

.doc-receivable-item input {
  width: 90px;
  padding: 4px 8px;
  font-size: 13px;
}

.doc-receivable-item .amount {
  font-size: 15px;
  font-weight: 700;
  color: #1890ff;
}

.doc-receivable-item.highlight .amount {
  color: #fa8c16;
  font-size: 15px;
}

.doc-receivable-item.total .amount {
  color: #f5222d;
  font-size: 22px;
}

/* 简化底部收货信息 - 更紧凑 */
.doc-footer-simple {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 4px 12px;
  background: #fafafa;
  border-radius: 6px;
}

.doc-footer-item {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.doc-footer-item label {
  font-size: 12px;
  color: #666;
  white-space: nowrap;
}

.doc-footer-item input {
  padding: 2px 6px;
  flex: 1;
  padding: 5px 8px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 13px;
}

/* 单据操作按钮区 */
.doc-actions-section {
  flex-shrink: 0;
  padding: 6px 20px;
  background: #fff;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: center;
  gap: 12px;
}

.doc-action-btn {
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  border: none;
}

.doc-action-btn.primary {
  background: #1890ff;
  color: #fff;
}

.doc-action-btn.primary:hover {
  background: #40a9ff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
}

.doc-action-btn.success {
  background: #52c41a;
  color: #fff;
}

.doc-action-btn.success:hover {
  background: #73d13d;
}

.doc-action-btn.secondary {
  background: #fff;
  color: #666;
  border: 1px solid #d9d9d9;
}

.doc-action-btn.secondary:hover {
  border-color: #1890ff;
  color: #1890ff;
}

.doc-action-btn.danger {
  background: #fff;
  color: #ff4d4f;
  border: 1px solid #ff4d4f;
}

.doc-action-btn.danger:hover {
  background: #fff1f0;
}

/* 商品选择器弹窗 */
.product-picker-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.product-picker-content {
  background: #fff;
  border-radius: 8px;
  width: 90%;
  max-width: 900px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.product-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
}

.product-picker-header h3 {
  font-size: 18px;
  color: #333;
}

.product-picker-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
}

.product-picker-search {
  padding: 12px 20px;
  border-bottom: 1px solid #eee;
}

.product-picker-search input {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 14px;
}

.product-picker-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 20px;
}

.product-picker-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.product-picker-table th {
  background: #f5f7fa;
  padding: 10px;
  text-align: left;
  font-size: 13px;
  color: #666;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 2;
}

.product-picker-table td {
  padding: 10px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
}

.product-picker-table tr:hover {
  background: #f8fbff;
  cursor: pointer;
}

.product-picker-table tr.selected {
  background: #e6f7ff;
}

.product-picker-footer {
  padding: 16px 20px;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ==================== 出库单订单选择弹窗 ==================== */
.dv-order-picker {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.dv-order-picker-content {
  background: #fff;
  border-radius: 8px;
  width: 90%;
  max-width: 1050px;
  max-height: 88vh;
  min-width: 600px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.dv-order-picker-content .resize-indicator {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  opacity: 0.35;
  pointer-events: auto;
  z-index: 5;
}

.dv-order-picker-content .resize-indicator::before {
  content: "";
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 8px;
  height: 8px;
  border-right: 2px solid #999;
  border-bottom: 2px solid #999;
}

.dv-order-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
}

.dv-order-picker-header h3 {
  font-size: 16px;
  color: #333;
  margin: 0;
}

.dv-order-picker-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
  line-height: 1;
}

.dv-order-picker-search {
  padding: 10px 20px;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.dv-order-picker-search input {
  flex: 1;
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 13px;
}

.dv-order-picker-search input[type="date"] {
  flex: 0 0 150px;
  min-width: 130px;
}

/* ── 上下面板 + 分割条 ── */
.dv-picker-panels {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.dv-picker-panel-top {
  flex: 4;
  min-height: 60px;
  overflow: auto;
  overflow-x: auto;
  border-bottom: 1px solid #e6f7ff;
}

.dv-picker-splitter {
  flex: 0 0 6px;
  background: #e8e8e8;
  cursor: ns-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  user-select: none;
  position: relative;
  z-index: 2;
}

.dv-picker-splitter:hover,
.dv-picker-splitter.active {
  background: #1890ff;
}

.dv-picker-splitter-bar {
  width: 30px;
  height: 2px;
  background: #bbb;
  border-radius: 1px;
  transition: background 0.15s;
}

.dv-picker-splitter:hover .dv-picker-splitter-bar,
.dv-picker-splitter.active .dv-picker-splitter-bar {
  background: #fff;
}

.dv-picker-panel-bottom {
  flex: 6;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dv-picker-item-scroll {
  flex: 1;
  overflow: auto;
  overflow-x: auto;
}

/* ── 表格列边框 ── */
.dv-order-picker-table {
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.dv-order-picker-table th {
  background: #f5f7fa;
  padding: 10px 8px;
  text-align: left;
  font-size: 13px;
  color: #666;
  border-bottom: 1px solid #eee;
  border-right: 1px solid #e8e8e8;
  position: sticky;
  top: 0;
  z-index: 1;
  white-space: nowrap;
  overflow: visible;
  text-overflow: ellipsis;
}

.dv-order-picker-table th:last-child {
  border-right: none;
}

.dv-order-picker-table td {
  padding: 8px 8px;
  border-bottom: 1px solid #f0f0f0;
  border-right: 1px solid #f0f0f0;
  font-size: 13px;
  overflow: visible;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dv-order-picker-table td:last-child {
  border-right: none;
}

.dv-order-picker-table tr {
  cursor: pointer;
  transition: background 0.15s;
}

.dv-order-picker-table tr:hover {
  background: #f8fbff;
}

/* 列宽拖拽手柄 */
.dv-picker-col-resize-handle {
  position: absolute;
  right: 0;
  top: 0;
  width: 6px;
  height: 100%;
  cursor: col-resize;
  z-index: 3;
  background: transparent;
}

.dv-picker-col-resize-handle:hover {
  background: #1890ff;
}

.dv-order-picker-footer {
  padding: 12px 20px;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ==================== 预加载遮罩样式 ==================== */
.preload-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(8px);
}

.preload-content {
  text-align: center;
  padding: 40px 60px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  min-width: 320px;
}

.preload-spinner {
  width: 50px;
  height: 50px;
  margin: 0 auto 20px;
  border: 4px solid #e0e0e0;
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: preload-spin 0.8s linear infinite;
}

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

.preload-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 24px;
}

.preload-progress {
  width: 100%;
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 16px;
}

.preload-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), #52c41a);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.preload-text {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.preload-stats {
  font-size: 12px;
  color: #999;
}
