* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f0f2f5;
  color: #1a1a2e;
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

input,
select,
button {
  font-family: inherit;
  outline: none;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.25);
}

/* 侧边栏滚动条：隐藏，保留鼠标滚轮滚动 */
.sidebar::-webkit-scrollbar {
  width: 0px;
  height: 0px;
  display: none;
}

/* ===== 登录页 ===== */
.login-page {
  display: flex;
  height: 100vh;
  background: #fff;
  position: relative;
  overflow: hidden;
}

/* 左侧宣传区域 */
.login-left {
  flex: 1;
  background: url('/static/bg_login_left.png') center/cover no-repeat;
  position: relative;
  overflow: hidden;
}

/* 右侧登录区域 */
.login-right {
  width: 520px;
  min-width: 520px;
  max-width: 520px;
  background: #fff;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* 右上角语言选择 */
.login-lang {
  position: absolute;
  top: 20px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #999;
  cursor: pointer;
}

.login-lang::before {
  content: '🌐';
  font-size: 14px;
}

/* 登录卡片 */
.login-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 56px;
  animation: cardSlideUp 0.6s ease-out;
}

@keyframes cardSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 扫码图标 */
.login-qrcode {
  position: absolute;
  top: 60px;
  right: 50px;
  width: 40px;
  height: 40px;
  cursor: pointer;
}

.login-qrcode svg {
  width: 100%;
  height: 100%;
  fill: #1565c0;
}

/* 金蝶云星空Logo */
.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 40px;
}

.login-logo-icon {
  display: flex;
  gap: 4px;
  margin-right: 10px;
}

.login-logo-icon .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.login-logo-icon .dot:nth-child(1) {
  background: #1565c0;
}

.login-logo-icon .dot:nth-child(2) {
  background: #1e88e5;
}

.login-logo-icon .dot:nth-child(3) {
  background: #42a5f5;
}

.login-logo-text {
  font-size: 22px;
  font-weight: 500;
  color: #1565c0;
  letter-spacing: 2px;
}

/* 标签切换 */
.login-tabs {
  display: flex;
  border-bottom: 1px solid #e8ecf1;
  margin-bottom: 28px;
  gap: 0;
}

.login-tab {
  flex: 1;
  text-align: center;
  padding: 14px 0;
  font-size: 14px;
  color: #8b95a5;
  cursor: pointer;
  position: relative;
  transition: color 0.3s;
  font-weight: 500;
}

.login-tab.active {
  color: #1565c0;
  font-weight: 600;
}

.login-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 3px;
  background: #1565c0;
  border-radius: 3px 3px 0 0;
}

/* 下拉选择行 */
.login-select-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.login-select-group {
  flex: 1;
  position: relative;
}

.login-select-group select {
  width: 100%;
  padding: 10px 28px 10px 0;
  border: none;
  border-bottom: 1px solid #e8e8e8;
  background: transparent;
  color: #333;
  font-size: 14px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%23999' d='M5 7L1 3h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
}

.login-select-group select:focus {
  outline: none;
  border-bottom-color: #1565c0;
}

/* 输入框样式 */
.login-input-group {
  margin-bottom: 20px;
  position: relative;
}

.login-input-group input {
  width: 100%;
  padding: 13px 14px 13px 40px;
  border: 1.5px solid #e2e6ec;
  border-radius: 8px;
  background: #f8f9fb;
  color: #1a1a2e;
  font-size: 14px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.login-input-group input::placeholder {
  color: #b0b8c4;
}

.login-input-group input:focus {
  outline: none;
  border-color: #1565c0;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
}

.login-input-group .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #b0b8c4;
  font-size: 16px;
}

/* 登录按钮 */
.btn-login {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 6px;
  background: linear-gradient(135deg, #1565c0 0%, #1976d2 50%, #1e88e5 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 12px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(21, 101, 192, 0.25);
  letter-spacing: 0.5px;
}

.btn-login:hover {
  background: linear-gradient(135deg, #1976d2 0%, #1e88e5 50%, #2196f3 100%);
  box-shadow: 0 6px 20px rgba(21, 101, 192, 0.35);
  transform: translateY(-1px);
}

.btn-login:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(21, 101, 192, 0.2);
}

/* 忘记密码 */
.login-forgot {
  text-align: right;
  margin-top: 12px;
}

.login-forgot a {
  color: #999;
  font-size: 12px;
  text-decoration: none;
}

.login-forgot a:hover {
  color: #1890ff;
}

/* 底部链接 */
.login-footer {
  position: absolute;
  bottom: 30px;
  left: 50px;
  right: 50px;
  text-align: center;
  font-size: 11px;
  color: #bbb;
}

.login-footer a {
  color: #bbb;
  text-decoration: none;
}

.login-footer a:hover {
  color: #1890ff;
}

.login-footer .divider {
  margin: 0 8px;
  color: #ddd;
}

.login-footer .browser-hint {
  margin-top: 6px;
  font-size: 10px;
}

.login-error {
  color: #ff4d4f;
  font-size: 12px;
  text-align: center;
  margin-top: 12px;
  min-height: 18px;
}

/* 离线登录按钮 */
.btn-login-offline {
  width: 100%;
  padding: 12px;
  background: transparent;
  color: #4A6FFF;
  border: 1.5px solid #4A6FFF;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.2s;
}

.btn-login-offline:hover {
  background: rgba(74, 111, 255, 0.08);
  border-color: #5B7CFF;
}

/* 离线登录弹窗 */
.offline-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}

.offline-modal-content {
  background: #1e2a35;
  border-radius: 12px;
  padding: 30px 28px 24px;
  width: 360px;
  max-width: 90vw;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.offline-modal-btns {
  display: flex;
  margin-top: 18px;
}

.btn-cancel {
  padding: 12px 16px;
  background: #3a4550;
  color: #ccc;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-cancel:hover {
  background: #4a5560;
}

/* ===== 主页 ===== */
.main-page {
  display: none;
  height: 100vh;
  flex-direction: column;
  background: #f0f2f5;
}

/* 顶部导航栏 - 金蝶天蓝风格 */
.top-bar {
  background: linear-gradient(135deg, #4A6FFF 0%, #5B7CFF 40%, #6B8FFF 100%);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  position: relative;
  height: 40px;
  box-shadow: 0 2px 12px rgba(74, 111, 255, 0.25);
  z-index: 100;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* 金蝶Logo样式 */
.top-bar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  padding: 5px 12px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.top-bar-logo:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.1);
}

.top-bar-logo-icon {
  width: 28px;
  height: 28px;
  background: #fff;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.top-bar-logo-icon svg {
  width: 18px;
  height: 18px;
  fill: #1e3a5f;
}

.top-bar-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.top-bar-logo-main {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
}

.top-bar-logo-sub {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}

.top-bar-divider {
  color: rgba(255, 255, 255, 0.4);
  font-size: 16px;
  font-weight: 300;
}

.top-bar-center {
  display: flex;
  align-items: center;
  gap: 16px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
}

.top-bar-center .org-name {
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.2s ease;
}

.top-bar-center .org-name:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.22);
}

.top-bar-center .org-name::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid rgba(255, 255, 255, 0.8);
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-bar-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.85);
  font-size: 16px;
  transition: all 0.2s ease;
  position: relative;
  background: transparent;
  border: 1px solid transparent;
}

.top-bar-icon:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.08);
}

.top-bar-icon .badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: #ff4d4f;
  border-radius: 50%;
  border: 1px solid #1565c0;
}

.top-bar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  background: transparent;
  border: 1px solid transparent;
}

.top-bar-user:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.08);
}

.top-bar-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1890ff;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.top-bar-user-name {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.top-bar-sync {
  color: #b3c6ff;
  font-size: 12px;
  margin-left: 16px;
  cursor: pointer;
  user-select: none;
  padding: 2px 8px;
  border-radius: 4px;
  transition: all 0.2s;
  white-space: nowrap;
}

.top-bar-sync:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

.top-bar-user-menu {
  display: none;
  position: absolute;
  top: 42px;
  right: 0;
  background: #fff;
  border-radius: 0;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
  min-width: 160px;
  z-index: 1000;
  overflow: hidden;
  border: 1px solid #d0d0d0;
}

.top-bar-user-menu.show {
  display: block;
  animation: menuSlideIn 0.2s ease;
}

@keyframes menuSlideIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.top-bar-user-menu-item {
  padding: 12px 18px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-bar-user-menu-item:hover {
  background: #316ac5;
  color: #fff;
}

.top-bar-user-menu-divider {
  height: 1px;
  background: #d0d0d0;
  margin: 4px 0;
}

.btn-logout {
  padding: 6px 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
}

.btn-logout:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
}

.body-area {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* 侧边栏 - 金蝶星空云风格 */
.sidebar {
  width: 190px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-right: 1px solid #dce4f0;
  overflow-y: auto;
  flex-shrink: 0;
  padding: 0;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.03);
}

.sidebar-brand {
  padding: 2px 16px 2px 12px;
  color: #1565c0;
  font-size: 15px;
  font-weight: 700;
  border-bottom: 1px solid #dce4f0;
  background: linear-gradient(135deg, #f0f4ff 0%, #e8f1ff 100%);
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
}

.sidebar-brand::before {
  content: '';
  width: 4px;
  height: 18px;
  background: linear-gradient(180deg, #1565c0, #1976d2);
  border-radius: 2px;
}

.sidebar-brand .折叠按钮 {
  margin-left: auto;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #1565c0;
  font-size: 13px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.sidebar-brand .折叠按钮:hover {
  background: rgba(21, 101, 192, 0.1);
}

.sidebar.折叠 {
  width: 0;
  min-width: 0;
  padding: 0;
  border: none;
  overflow: hidden;
  opacity: 0;
}

.sidebar.折叠 .sidebar-brand,
.sidebar.折叠 .nav-label,
.sidebar.折叠 button,
.sidebar.折叠 .sep {
  display: none;
}

.折叠指示条 {
  width: 6px;
  background: linear-gradient(180deg, #f0f4ff 0%, #e8f1ff 100%);
  border-right: 1px solid #dce4f0;
  border-bottom: 2px solid #4A90D9;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
}

.折叠指示条:hover {
  background: linear-gradient(180deg, #e8f1ff 0%, #d6e4ff 100%);
}

.折叠指示条 .展开按钮 {
  width: 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1565c0;
  color: #fff;
  border-radius: 0 4px 4px 0;
  font-size: 12px;
  position: absolute;
  left: 0;
}

.折叠指示条.显示 {
  display: flex;
}

/* 浮动展开菜单提示箭头 */
.展开菜单提示 {
  position: fixed;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9999;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: bold;
  white-space: nowrap;
  cursor: pointer;
  display: none;
  animation: 提示呼吸 1.6s ease-in-out infinite;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
}

.展开菜单提示.显示 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.提示关闭 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  font-size: 11px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
}

.提示关闭:hover {
  background: rgba(255, 255, 255, 0.5);
}

@keyframes 提示呼吸 {

  0%,
  100% {
    transform: translateX(0);
    opacity: 1;
  }

  50% {
    transform: translateX(8px);
    opacity: 0.8;
  }
}

/* 数据大屏加载遮罩 */
.大屏加载遮罩 {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.25);
  z-index: 9998;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.大屏加载遮罩.显示 {
  display: flex;
}

.加载遮罩内容 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.加载菊花 {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: 菊花旋转 0.8s linear infinite;
}

@keyframes 菊花旋转 {
  to {
    transform: rotate(360deg);
  }
}

.加载文字 {
  color: #fff;
  font-size: 18px;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 帮助面板 */
.帮助遮罩 {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  z-index: 10000;
}

.帮助面板 {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 820px;
  max-height: 80vh;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  z-index: 10001;
  overflow: hidden;
  flex-direction: column;
}

.帮助面板.显示,
.帮助遮罩.显示 {
  display: flex;
}

.帮助面板头 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: linear-gradient(135deg, #1e3a5f, #1565c0);
  color: #fff;
  font-size: 18px;
  font-weight: bold;
}

.帮助面板关闭 {
  cursor: pointer;
  font-size: 18px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background 0.2s;
}

.帮助面板关闭:hover {
  background: rgba(255, 255, 255, 0.2);
}

.帮助面板体 {
  padding: 20px 24px;
  overflow-y: auto;
  max-height: 60vh;
}

.帮助表格 {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.帮助表格 th {
  text-align: left;
  padding: 10px 12px;
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
  color: #475569;
  font-weight: 600;
  font-size: 12px;
  position: sticky;
  top: 0;
}

.帮助表格 td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: top;
}

.帮助表格 tr:hover td {
  background: #f8fafc;
}

.帮助模块名 {
  font-weight: bold;
  color: #1565c0;
  white-space: nowrap;
}

.帮助图标 {
  font-size: 18px;
  margin-right: 4px;
}

.sidebar-brand span {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #8b95a5;
  letter-spacing: 0;
  margin-top: 2px;
}

.sidebar .nav-label {
  padding: 12px 16px 4px;
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  margin: 0;
}

.sidebar button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% - 12px);
  margin: 2px 6px;
  padding: 9px 14px;
  border: none;
  background: transparent;
  color: #475569;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  border-radius: 6px;
  font-weight: 500;
}

.sidebar button:hover {
  background: #e8f1ff;
  color: #1565c0;
  transform: translateX(2px);
}

.sidebar button:active {
  transform: translateX(1px);
}

.sidebar button.active {
  background: linear-gradient(135deg, #e8f1ff 0%, #d6e4ff 100%);
  color: #1565c0;
  font-weight: 600;
  box-shadow: inset 3px 0 0 #1565c0;
  border-radius: 6px;
}

.sidebar button .nav-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.sidebar .sep {
  border-top: 1px solid #e8ecf1;
  margin: 8px 10px;
}

.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f0f4fa;
  border-radius: 0;
  box-shadow: none;
}

/* ===== Tab 栏 - 金蝶天蓝风格 ===== */
.tab-bar {
  background: #E8F1FB;
  padding: 2px 12px 0 0;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
  border-bottom: 2px solid #4A90D9;
  min-height: 28px;
}

.tab-bar .tab-btn {
  padding: 7px 16px;
  border: 1px solid #dce4f0;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  background: #f6f8fc;
  color: #64748b;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  top: 1px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.tab-bar .tab-btn:hover {
  background: #e8f1ff;
  color: #1565c0;
  border-color: #b8cde8;
}

.tab-bar .tab-btn.active {
  background: #ffffff;
  color: #1565c0;
  border-color: #1565c0;
  border-bottom: 2px solid #fff;
  font-weight: 600;
  top: 1px;
  box-shadow: 0 -1px 4px rgba(21, 101, 192, 0.08);
}

.tab-bar .tab-close {
  font-size: 14px;
  color: currentColor;
  opacity: 0.5;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.tab-bar .tab-close:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.06);
}

.tab-bar .tab-btn.active .tab-close:hover {
  background: rgba(21, 101, 192, 0.08);
}

/* ===== 通用过滤栏 ===== */
.filter-bar {
  background: #E8F1FB;
  padding: 0px 14px;
  border-bottom: 1px solid #dce4f0;
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.filter-bar label {
  font-size: 12px;
  color: #1e3a5f;
  font-weight: 500;
}

.filter-bar input,
.filter-bar select {
  padding: 6px 10px;
  border: 1px solid #dce4f0;
  border-radius: 4px;
  background: #f8fafc;
  color: #2c3e50;
  font-size: 12px;
  transition: all 0.2s ease;
  height: 30px;
}

.filter-bar input::placeholder {
  color: #94a3b8;
}

.filter-bar select {
  min-width: 80px;
}

.filter-bar select option {
  background: #fff;
  color: #2c3e50;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: #1565c0;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(21, 101, 192, 0.08);
  outline: none;
}

.filter-bar .btn-action {
  padding: 6px 14px;
  border: 1px solid #dce4f0;
  border-radius: 6px;
  background: #f6f8fc;
  color: #475569;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  height: 30px;
}

.filter-bar .btn-action:hover {
  background: #e8f1ff;
  border-color: #1565c0;
  color: #1565c0;
  transform: translateY(-1px);
}

.filter-bar .btn-action:active {
  transform: translateY(0);
}

.active-btn {
  background: #1565c0 !important;
  color: #fff !important;
  border-color: #1565c0 !important;
}

.filter-bar .btn-query {
  background: linear-gradient(135deg, #1565c0, #1976d2);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(21, 101, 192, 0.2);
}

.filter-bar .btn-query:hover {
  background: linear-gradient(135deg, #1976d2, #1e88e5);
  color: #fff;
  box-shadow: 0 4px 12px rgba(21, 101, 192, 0.3);
  transform: translateY(-1px);
}

.filter-bar .btn-query:active {
  transform: translateY(0);
}

.filter-bar .btn-export {
  background: linear-gradient(135deg, #166534, #15803d);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(22, 101, 52, 0.2);
}

.filter-bar .btn-export:hover {
  background: linear-gradient(135deg, #15803d, #16a34a);
  color: #fff;
  box-shadow: 0 4px 12px rgba(22, 101, 52, 0.3);
  transform: translateY(-1px);
}

.filter-bar .btn-export:active {
  transform: translateY(0);
}

.filter-bar .btn-warn {
  background: linear-gradient(135deg, #9a3412, #c2410c);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(154, 52, 18, 0.2);
}

.filter-bar .btn-warn:hover {
  background: linear-gradient(135deg, #c2410c, #ea580c);
  color: #fff;
  box-shadow: 0 4px 12px rgba(154, 52, 18, 0.3);
  transform: translateY(-1px);
}

.filter-bar .btn-warn:active {
  transform: translateY(0);
}

.filter-bar .btn-dateprep {
  background: linear-gradient(135deg, #059669, #10b981);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.2);
}

.filter-bar .btn-dateprep:hover {
  background: linear-gradient(135deg, #10b981, #34d399);
  color: #fff;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
  transform: translateY(-1px);
}

.filter-bar .btn-dateprep:active {
  transform: translateY(0);
}

/* 导出下拉菜单 */
.导出下拉项 {
  padding: 8px 14px;
  cursor: pointer;
  color: #ccc;
  font-size: 13px;
  white-space: nowrap;
  transition: background 0.15s;
}

.导出下拉项:hover {
  background: #3a3a3a;
  color: #fff;
}

/* ===== 方案标签栏 ===== */
.sf-方案栏 {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 1px 16px;
  background: #E8F1FB;
  border-bottom: 1px solid #dce4f0;
  flex-wrap: nowrap;
  flex-shrink: 0;
  min-height: 24px;
  overflow: visible;
}

.sf-方案前缀 {
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: 2px;
  line-height: 24px;
}

.sf-方案标签 {
  padding: 0px 8px;
  border: 1px solid #93b5e8;
  border-radius: 6px;
  background: transparent;
  color: #333;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 20px;
  flex-shrink: 0;
}

.sf-方案标签:hover {
  background: #e8f1ff;
  border-color: #1565c0;
  color: #1565c0;
}

.sf-方案标签.激活 {
  background: #fff;
  border-color: #e67e22;
  color: #e67e22;
  font-weight: 600;
}

.sf-方案标签 .sf-删除标签 {
  font-size: 10px;
  line-height: 1;
  margin-left: 1px;
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.15s;
}

.sf-方案标签:hover .sf-删除标签 {
  opacity: 0.5;
}

.sf-方案标签 .sf-删除标签:hover {
  opacity: 1;
  color: #dc2626;
}

.sf-方案标签.激活 .sf-删除标签:hover {
  color: #fecaca;
}

.sf-方案标签.隐藏标签 {
  display: none;
}

.sf-更多下拉 {
  position: relative;
}

.sf-更多下拉 .sf-drop-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #e2e6ec;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 1100;
  min-width: 140px;
  padding: 4px 0;
}

.sf-更多下拉 .sf-drop-menu.显示 {
  display: block;
}

.sf-更多下拉 .sf-drop-item {
  padding: 6px 14px;
  font-size: 12px;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sf-更多下拉 .sf-drop-item:hover {
  background: #e8f1ff;
  color: #1565c0;
}

.sf-新增方案 {
  padding: 2px 10px;
  border: 1px dashed #94a3b8;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
  height: 24px;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sf-新增方案:hover {
  border-color: #1565c0;
  color: #1565c0;
  background: #e8f1ff;
}

/* ===== 高级过滤标题栏 ===== */
.高级过滤标题栏 {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 16px;
  background: #ffffff;
  border-bottom: 2px solid #e2e6ec;
  flex-shrink: 0;
  min-height: 26px;
}

.高级过滤标题 {
  padding: 3px 18px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  margin-bottom: -2px;
  font-weight: 500;
}

.高级过滤标题:hover {
  color: #1565c0;
  background: #f0f4f8;
}

.高级过滤标题.激活 {
  color: #1565c0;
  border-bottom-color: #1565c0;
  font-weight: 600;
}

/* ===== 多维表下拉菜单 ===== */
.多维表下拉触发 {
  position: relative;
}

.多维表下拉菜单 {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 2000;
  background: #ffffff;
  border: 1px solid #e2e6ec;
  border-radius: 6px;
  min-width: 120px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  padding: 4px 0;
  margin-top: 4px;
}

.多维表下拉菜单.显示 {
  display: block;
}

.多维表下拉项 {
  padding: 8px 16px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.多维表下拉项:hover {
  background: #f0f4f8;
  color: #1565c0;
}

/* ===== 多维表悬浮面板（视觉内嵌，实质浮层，标签切换不丢失） ===== */
#多维表悬浮面板 {
  position: absolute;
  top: 33px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  background: #f0f4fa;
  display: none;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}

#多维表悬浮面板.显示 {
  display: flex;
}

/* 悬浮面板内部布局保持一致 */
#多维表悬浮面板 .高级过滤标题栏 {
  flex-shrink: 0;
}

#多维表悬浮面板 .filter-wrap {
  flex-shrink: 0;
}

#多维表悬浮面板 .module-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#多维表悬浮面板 .table-wrap {
  flex: 1;
  overflow: hidden;
}

#多维表悬浮面板 .bottom-bar {
  flex-shrink: 0;
}

/* ===== 多维表备份列表项 ===== */
.mt备份项 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
}

.mt备份项:hover {
  background: #f8f9fb;
}

.mt备份恢复按钮 {
  padding: 3px 12px;
  border: 1px solid #1565c0;
  background: transparent;
  color: #1565c0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.mt备份恢复按钮:hover {
  background: #1565c0;
  color: #fff;
}

/* 多维表可编辑单元格样式 */
.mt可编辑单元格 {
  cursor: cell;
}

/* AG-Grid 修改过的单元格闪烁 */
.ag-cell.mt可编辑单元格:hover {
  background-color: #e3f2fd !important;
  outline: 1px solid #1565c0;
}

/* AG-Grid 修改闪烁动画 */
.ag-cell-data-changed {
  background-color: #d4edda !important;
  transition: background-color 0.5s ease;
}

/* ===== 高级过滤内联展开区 ===== */
.高级过滤-展开区 {
  display: none;
  padding: 10px 16px;
  background: #f8f9fb;
  border: 1px solid #e2e6ec;
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.高级过滤-展开区.显示 {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
}

.高级过滤-粘贴区 textarea {
  width: 100%;
  min-height: 90px;
  padding: 10px 12px;
  border: 1.5px solid #e2e6ec;
  border-radius: 8px;
  background: #fff;
  color: #1a1a2e;
  font-size: 12px;
  font-family: "Consolas", "Microsoft YaHei", monospace;
  resize: vertical;
  line-height: 1.6;
}

.高级过滤-粘贴区 textarea:focus {
  border-color: #1565c0;
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.06);
}

.高级过滤-列映射 {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.高级过滤-列映射 .列映射项 {
  flex: 1;
  min-width: 150px;
  background: #fff;
  border: 1.5px solid #e2e6ec;
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.高级过滤-列映射 .列映射项 .列标号 {
  font-size: 10px;
  color: #8b95a5;
  font-weight: 500;
}

.高级过滤-列映射 .列映射项 select {
  width: 100%;
  padding: 6px 8px;
  border: 1.5px solid #e2e6ec;
  border-radius: 6px;
  background: #fafbfc;
  color: #1a1a2e;
  font-size: 11px;
  height: 30px;
}

.高级过滤-列映射 .列映射项 .列值预览 {
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.高级过滤-列映射 .列映射项 .gj-字段 {
  padding: 5px 8px;
  border: 1.5px solid #e2e6ec;
  border-radius: 6px;
  background: #fff;
  color: #1a1a2e;
  font-size: 12px;
  height: 30px;
  width: 100%;
  transition: all 0.2s ease;
}

.高级过滤-列映射 .列映射项 .gj-字段:focus {
  border-color: #1565c0;
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.06);
  outline: none;
}

.高级过滤-按钮行 {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 8px;
  margin-top: 8px;
  border-top: 1px solid #e8ecf1;
}

.高级过滤-按钮行 button {
  padding: 4px 14px;
  border: 1px solid #dce4f0;
  border-radius: 6px;
  background: #f6f8fc;
  color: #475569;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  height: 28px;
}

.高级过滤-按钮行 button:hover {
  background: #e8f1ff;
  border-color: #1565c0;
  color: #1565c0;
  transform: translateY(-1px);
}

.高级过滤-按钮行 button:active {
  transform: translateY(0);
}

.高级过滤-按钮行 .btn-确认查询 {
  background: linear-gradient(135deg, #1565c0, #1976d2);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}

.高级过滤-按钮行 .btn-确认查询:hover {
  background: linear-gradient(135deg, #1976d2, #1e88e5);
  color: #fff;
}

/* ===== 内联展开区 ===== */
.sf-展开区 {
  display: none;
  padding: 8px 16px;
  background: #f8f9fb;
  border: 1px solid #e2e6ec;
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  gap: 6px;
  flex-direction: column;
}

.sf-展开区.显示 {
  display: flex;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
}

.sf-展开区 .sf-行 {
  display: flex;
  align-items: center;
  gap: 5px;
}

.sf-展开区 .sf-关系栏 {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0 6px 0;
  margin-bottom: 4px;
}

.sf-展开区 .sf-关系标签 {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

.sf-展开区 .sf-关系切换 {
  padding: 3px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid #dce4f0;
  min-width: 48px;
}

.sf-展开区 .sf-关系切换.且 {
  background: #dbeafe;
  border-color: #3b82f6;
  color: #1d4ed8;
}

.sf-展开区 .sf-关系切换.或 {
  background: #fce7f3;
  border-color: #ec4899;
  color: #be185d;
}

.sf-展开区 .sf-按钮行 {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid #e8ecf1;
  margin-top: 2px;
}

.sf-展开区 .sf-按钮行 button {
  padding: 4px 14px;
  border: 1px solid #dce4f0;
  border-radius: 6px;
  background: #f6f8fc;
  color: #475569;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  height: 28px;
}

.sf-展开区 .sf-按钮行 button:hover {
  background: #e8f1ff;
  border-color: #1565c0;
  color: #1565c0;
  transform: translateY(-1px);
}

.sf-展开区 .sf-按钮行 button:active {
  transform: translateY(0);
}

.sf-展开区 .sf-按钮行 .btn-确认查询 {
  background: linear-gradient(135deg, #1565c0, #1976d2);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}

.sf-展开区 .sf-按钮行 .btn-确认查询:hover {
  background: linear-gradient(135deg, #1976d2, #1e88e5);
  color: #fff;
}

/* ===== 快捷过滤 ===== */
.sf-容器 {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: none;
  width: fit-content;
}

.sf-行 {
  display: flex;
  align-items: center;
  gap: 5px;
}

.sf-行 select {
  padding: 5px 8px;
  border: 1px solid #dce4f0;
  border-radius: 4px;
  background: #f8fafc;
  color: #2c3e50;
  font-size: 12px;
  max-width: 150px;
  height: 28px;
  transition: all 0.2s ease;
}

/* 枚举字段下拉框宽度对齐输入框 */
.sf-行 select.sf-值 {
  width: 210px;
  max-width: 210px;
  flex: none;
}

.sf-行 select:focus {
  border-color: #1565c0;
  box-shadow: 0 0 0 2px rgba(21, 101, 192, 0.08);
  outline: none;
}

.sf-行 input {
  padding: 5px 8px;
  border: 1px solid #dce4f0;
  border-radius: 4px;
  background: #f8fafc;
  color: #2c3e50;
  font-size: 12px;
  width: 210px;
  flex: none;
  height: 28px;
  transition: all 0.2s ease;
}

.sf-行 input:focus {
  border-color: #1565c0;
  box-shadow: 0 0 0 2px rgba(21, 101, 192, 0.08);
  outline: none;
}

.sf-行 .btn-sf {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #dce4f0;
  border-radius: 6px;
  background: #f6f8fc;
  color: #475569;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.sf-行 .btn-sf:hover {
  background: #e8f1ff;
  border-color: #1565c0;
  color: #1565c0;
  transform: translateY(-1px);
}

.sf-行 .btn-sf:active {
  transform: translateY(0);
}

.sf-行 .btn-sf-删:hover {
  background: #fef2f2;
  border-color: #dc2626;
  color: #dc2626;
}

.sf-行 .btn-sf-关系 {
  padding: 2px 8px;
  border: 1px solid #dce4f0;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: #dbeafe;
  border-color: #3b82f6;
  color: #1d4ed8;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 30px;
  text-align: center;
  height: 28px;
}

.sf-行 .btn-sf-关系.或 {
  background: #fce7f3;
  border-color: #ec4899;
  color: #be185d;
}

.sf-行 .btn-sf-关系.且 {
  background: #dbeafe;
  border-color: #3b82f6;
  color: #1d4ed8;
}

.sf-行 .sel-sf-左括号 {
  padding: 2px 2px;
  border: 1px solid #c4b5fd;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  background: #ede9fe;
  color: #6d28d9;
  cursor: pointer;
  width: 40px;
  text-align: center;
  height: 28px;
}

.sf-行 .sel-sf-右括号 {
  padding: 2px 2px;
  border: 1px solid #c4b5fd;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  background: #ede9fe;
  color: #6d28d9;
  cursor: pointer;
  width: 40px;
  text-align: center;
  height: 28px;
}

.sf-行 .btn-sf-加:hover {
  background: #f0fff4;
  border-color: #38a169;
  color: #38a169;
}

.sf-字段 {
  padding: 5px 8px;
  border: 1.5px solid #e2e6ec;
  border-radius: 6px;
  background: #fafbfc;
  color: #1a1a2e;
  font-size: 12px;
  width: 130px;
  height: 28px;
  transition: all 0.2s ease;
}

.sf-字段:focus {
  border-color: #1565c0;
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.06);
  outline: none;
}

.module-panel {
  display: none;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
}

.module-panel.active {
  display: flex;
}

/* ===== ag-Grid 主题定制 - 金蝶星空云风格 ===== */
.ag-theme-alpine {
  --ag-font-family: "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ag-font-size: 13px;
  --ag-header-height: 38px;
  --ag-row-height: 34px;
  --ag-header-background-color: #4A6FFF;
  --ag-header-foreground-color: #ffffff;
  --ag-selected-row-background-color: #cce0ff;
  --ag-cell-horizontal-padding: 14px;
  --ag-row-hover-colour: #e8f1ff;
  --ag-odd-row-background-color: #ffffff;
  --ag-even-row-background-color: #f6f8fc;
  --ag-border-color: #dce4f0;
  --ag-secondary-border-color: #e8edf5;
  --ag-range-selection-border-color: #4A6FFF;
  --ag-checkbox-checked-color: #4A6FFF;
  --ag-row-border-color: #e8ecf4;
  --ag-background-color: #ffffff;
  --ag-grid-size: 4px;
}

/* 表头 - 金蝶天蓝渐变 */
.ag-theme-alpine .ag-header {
  border-bottom: 1px solid #dce4f0 !important;
}

.ag-theme-alpine .ag-header-cell {
  background: #E8F1FB;
  color: #333;
  font-weight: 600;
  border-right: 1px solid #dce4f0;
  border-bottom: none;
  font-size: 12px;
  padding: 0 14px;
  letter-spacing: 0.3px;
}

.ag-theme-alpine .ag-header-cell:hover {
  background: #dce8f8;
}

.ag-theme-alpine .ag-header-cell-text {
  color: #333 !important;
  text-shadow: none;
}

.ag-theme-alpine .ag-header-icon {
  color: rgba(0, 0, 0, 0.45) !important;
}

.ag-theme-alpine .ag-header-select-all .ag-checkbox-input-wrapper {
  accent-color: #1565c0;
}

/* 复选框 - 完全自定义，隐藏icon font，只用CSS边框 */
.ag-theme-alpine .ag-cell .ag-checkbox-input-wrapper,
.ag-theme-alpine .ag-header-select-all .ag-checkbox-input-wrapper {
  width: 16px !important;
  height: 16px !important;
  border: 1.5px solid #93b5e8 !important;
  border-radius: 2px !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}

/* 隐藏icon font的方框（黑色线框来源） */
.ag-theme-alpine .ag-cell .ag-checkbox-input-wrapper .ag-icon,
.ag-theme-alpine .ag-header-select-all .ag-checkbox-input-wrapper .ag-icon,
.ag-theme-alpine .ag-cell .ag-checkbox-input-wrapper .ag-inner-wrapper,
.ag-theme-alpine .ag-header-select-all .ag-checkbox-input-wrapper .ag-inner-wrapper {
  display: none !important;
}

.ag-theme-alpine .ag-cell .ag-checkbox-input-wrapper::before,
.ag-theme-alpine .ag-header-select-all .ag-checkbox-input-wrapper::before,
.ag-theme-alpine .ag-cell .ag-checkbox-input-wrapper::after,
.ag-theme-alpine .ag-header-select-all .ag-checkbox-input-wrapper::after {
  display: none !important;
  content: none !important;
}

/* 选中状态 - 蓝底白勾 */
.ag-theme-alpine .ag-cell .ag-checkbox-input-wrapper.ag-checked,
.ag-theme-alpine .ag-header-select-all .ag-checkbox-input-wrapper.ag-checked,
.ag-theme-alpine .ag-cell .ag-checkbox-input-wrapper.ag-indeterminate,
.ag-theme-alpine .ag-header-select-all .ag-checkbox-input-wrapper.ag-indeterminate {
  background: #1565c0 !important;
  border-color: #1565c0 !important;
}

/* 选中后显示勾 */
.ag-theme-alpine .ag-cell .ag-checkbox-input-wrapper.ag-checked::after,
.ag-theme-alpine .ag-header-select-all .ag-checkbox-input-wrapper.ag-checked::after {
  display: block !important;
  content: '✓' !important;
  color: #fff !important;
  font-size: 11px !important;
  line-height: 14px !important;
  text-align: center !important;
  position: absolute !important;
  inset: 0 !important;
  opacity: 1 !important;
  background: none !important;
}

/* 半选状态显示横线 */
.ag-theme-alpine .ag-cell .ag-checkbox-input-wrapper.ag-indeterminate::after,
.ag-theme-alpine .ag-header-select-all .ag-checkbox-input-wrapper.ag-indeterminate::after {
  display: block !important;
  content: '—' !important;
  color: #fff !important;
  font-size: 10px !important;
  line-height: 14px !important;
  text-align: center !important;
  position: absolute !important;
  inset: 0 !important;
  opacity: 1 !important;
  background: none !important;
}

/* 复选框列右边框与其他列一致 */
.ag-theme-alpine .ag-pinned-left-cols-container .ag-cell,
.ag-theme-alpine .ag-pinned-left-header .ag-header-cell {
  border-right: 1px solid #dce4f0 !important;
}

/* 去掉复选框列的聚焦边框 */
.ag-theme-alpine .ag-pinned-left-cols-container .ag-cell.ag-cell-focus,
.ag-theme-alpine .ag-pinned-left-header .ag-header-cell.ag-header-cell-focus {
  border: none !important;
  outline: none !important;
}

.ag-theme-alpine .ag-root-wrapper {
  border: none !important;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

.ag-theme-alpine .ag-root-wrapper-body {
  border-radius: 0;
}

/* 单元格 */
.ag-theme-alpine .ag-cell {
  border-right: 1px solid #eef1f8;
  border-bottom: 1px solid #eef1f8;
  font-size: 13px;
  line-height: 34px;
  color: #2c3e50;
  padding: 0 14px;
}

.ag-theme-alpine .ag-cell:focus {
  border-color: #1565c0 !important;
  box-shadow: inset 0 0 0 1px #1565c0;
}

/* 行样式 */
.ag-theme-alpine .ag-row {
  border-bottom: 1px solid #eef1f8;
  transition: background 0.12s ease;
}

.ag-theme-alpine .ag-row-odd {
  background-color: #ffffff;
}

.ag-theme-alpine .ag-row-even {
  background-color: #f6f8fc;
}

.ag-theme-alpine .ag-row-hover {
  background-color: #e8f1ff !important;
}

.ag-theme-alpine .ag-row-hover .ag-cell {
  color: #1a2d4a;
}

.ag-theme-alpine .ag-row-selected {
  background-color: #cce0ff !important;
}

.ag-theme-alpine .ag-row-selected .ag-cell {
  color: #0d2b4e !important;
  font-weight: 500;
}

/* 状态行 */
.ag-theme-alpine .row-cancel,
.ag-theme-alpine .ag-row.row-cancel,
.ag-theme-alpine .ag-row.row-cancel .ag-cell {
  color: #dc3545 !important;
  font-weight: 700 !important;
}

.ag-theme-alpine .row-terminate {
  color: #b45309 !important;
  background-color: #fff8e1 !important;
}

.ag-theme-alpine .row-gray {
  color: #e65100 !important;
  background-color: #fff3e0 !important;
  opacity: 1;
}

.ag-theme-alpine .row-warn {
  color: #92400e !important;
  background-color: #fef9c3 !important;
}

.ag-theme-alpine .ag-overlay {
  font-family: "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ag-Grid 滚动条 - 加大方便拖动 */
.ag-theme-alpine .ag-body-viewport::-webkit-scrollbar {
  width: 16px;
  height: 16px;
}

.ag-theme-alpine .ag-body-viewport::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.04);
  border-radius: 8px;
}

.ag-theme-alpine .ag-body-viewport::-webkit-scrollbar-thumb {
  background: rgba(30, 58, 95, 0.3);
  border-radius: 8px;
  min-height: 80px;
}

.ag-theme-alpine .ag-body-viewport::-webkit-scrollbar-thumb:hover {
  background: rgba(30, 58, 95, 0.5);
}

/* ag-Grid 列筛选按钮 */
.ag-theme-alpine .ag-header-cell .header-filter-btn {
  opacity: 0;
}

.ag-theme-alpine .ag-header-cell:hover .header-filter-btn,
.ag-theme-alpine .ag-header-cell .header-filter-btn.active {
  opacity: 1;
}

.ag-theme-alpine .ag-header-cell .header-filter-btn:hover {
  color: rgba(0, 0, 0, 0.7);
}

.ag-theme-alpine .ag-header-cell .header-filter-btn.active {
  color: #1890ff;
}

/* ===== 紧凑模式样式 ===== */
.compact-mode .ag-theme-alpine .ag-cell {
  padding-top: 1px !important;
  padding-bottom: 1px !important;
  padding-left: 3px !important;
  padding-right: 3px !important;
  font-size: 12px !important;
}

.compact-mode .ag-theme-alpine .ag-header-cell {
  padding-left: 3px !important;
  padding-right: 3px !important;
  font-size: 12px !important;
}

.compact-mode .ag-theme-alpine .ag-header-cell-label {
  padding-left: 2px !important;
  padding-right: 2px !important;
}

.compact-mode .filter-bar {
  padding: 2px 8px !important;
  gap: 4px !important;
}

.compact-mode .filter-bar .btn-action {
  padding: 3px 8px !important;
}

/* ===== 显示模式切换滑块 ===== */
.table-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
  cursor: pointer;
  user-select: none;
}

.table-toggle .toggle-label-text {
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
}

.table-toggle .toggle-switch {
  position: relative;
  width: 80px;
  height: 28px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  transition: background 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.table-toggle .toggle-switch .switch-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 36px;
  height: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #e8f1ff 100%);
  border-radius: 11px;
  transition: transform 0.3s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.table-toggle .toggle-switch.native .switch-slider {
  transform: translateX(40px);
}

.table-toggle .toggle-switch.native {
  background: rgba(42, 82, 152, 0.6);
  border-color: rgba(42, 82, 152, 0.4);
}

.table-toggle .switch-text-left,
.table-toggle .switch-text-right {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  font-weight: 600;
  transition: color 0.3s ease;
  pointer-events: none;
}

.table-toggle .switch-text-left {
  left: 8px;
  color: #fff;
}

.table-toggle .switch-text-right {
  right: 7px;
  color: rgba(255, 255, 255, 0.5);
}

/* ===== 过滤弹窗标题栏 ===== */
.过滤弹窗_标题栏 {
  display: flex;
  background: #f0f4f8;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
}

.过滤弹窗_标题 {
  flex: 1;
  text-align: center;
  padding: 12px 8px;
  font-size: 14px;
  font-weight: 500;
  color: #5a6872;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}

.过滤弹窗_标题:hover {
  color: #1565c0;
  background: #e8f0f8;
}

.过滤弹窗_标题.激活 {
  color: #1565c0;
  font-weight: 600;
  border-bottom-color: #1565c0;
  background: #fff;
}

/* ===== 列管理器 ===== */
.列管理工具栏 {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: #f0f4f8;
  border-radius: 6px;
  font-size: 12px;
  color: #5a6872;
  flex-shrink: 0;
}

.列管理工具栏 input {
  width: 50px;
  padding: 4px 6px;
  border: 1px solid #d0d8e0;
  border-radius: 4px;
  font-size: 12px;
  text-align: center;
}

.列管理列表 {
  border: 1px solid #e2e6ec;
  border-radius: 6px;
  overflow-y: auto;
  background: #fff;
}

.列管理行 {
  padding: 7px 10px;
  cursor: pointer;
  border-bottom: 1px solid #eef1f5;
  color: #1a1a2e;
  font-size: 13px;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.列管理行:last-child {
  border-bottom: none;
}

.列管理行:hover {
  background: #f0f4fa;
}

.列管理行.选中 {
  background: #e3ecf7;
  border-left: 3px solid #4a90d9;
}

.列管理行 input[type="checkbox"] {
  accent-color: #4a90d9;
  flex-shrink: 0;
}

.列管理名 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.列管理空 {
  padding: 24px 10px;
  text-align: center;
  color: #8899aa;
  font-size: 13px;
}

.列管理小按钮 {
  padding: 5px 12px;
  border: 1px solid #c8d4e0;
  background: #fff;
  color: #4a5a6a;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.列管理小按钮:hover {
  background: #e8f0f8;
  border-color: #4a90d9;
  color: #1a6dd4;
}

/* ===== 排序弹窗 ===== */
.排序列表 {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 400px;
  overflow-y: auto;
}

.排序行 {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #f6f8fa;
  border: 1px solid #dce1e8;
  border-radius: 5px;
  transition: all 0.15s;
}

.排序行:hover {
  border-color: #b0c0d0;
}

.排序行.拖拽中 {
  opacity: 0.5;
}

.排序行.拖拽悬停 {
  border-color: #4a90d9;
  background: #e8f0f8;
}

.排序添加行 {
  border-style: dashed;
  cursor: pointer;
  justify-content: center;
}

.排序添加行:hover {
  border-color: #4a90d9;
  background: #f0f4f8;
}

.排序拖拽柄 {
  cursor: grab;
  color: #8899aa;
  font-size: 16px;
  padding: 0 4px;
  user-select: none;
}

.排序拖拽柄:active {
  cursor: grabbing;
}

.排序字段选 {
  flex: 1;
  padding: 5px 8px;
  border: 1px solid #d0d8e0;
  background: #fff;
  color: #1a1a2e;
  border-radius: 4px;
  font-size: 13px;
  min-width: 0;
}

.排序字段名 {
  font-size: 13px;
  color: #1a1a2e;
  font-weight: 500;
  min-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.排序方向切换 {
  width: 56px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s;
  user-select: none;
  flex-shrink: 0;
}

.排序方向切换.升序 {
  background: #e8f5e9;
  color: #2e7d32;
}

.排序方向切换.降序 {
  background: #ffebee;
  color: #c62828;
}

.排序方向切换:hover {
  opacity: 0.8;
}

.排序删除 {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  color: #8899aa;
  font-size: 14px;
  transition: all 0.15s;
  flex-shrink: 0;
}

.排序删除:hover {
  background: #ffebee;
  color: #c62828;
}

.table-toggle .toggle-switch.native .switch-text-left {
  color: rgba(255, 255, 255, 0.5);
}

.table-toggle .toggle-switch.native .switch-text-right {
  color: #fff;
}

/* ===== 三态滑块开关 ===== */
.tri-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  height: 22px;
}

.tri-toggle .tri-toggle-label {
  color: #ff6d00;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.tri-toggle .tri-toggle-track {
  position: relative;
  width: 96px;
  height: 22px;
  background: linear-gradient(90deg, #2a1a0a 0%, #3a2a1a 50%, #1a2a1a 100%);
  border-radius: 11px;
  border: 1px solid #ff6d00;
  overflow: hidden;
  box-shadow: 0 0 6px rgba(255, 109, 0, 0.3);
}

.tri-toggle .tri-toggle-slider {
  position: absolute;
  top: 2px;
  width: 30px;
  height: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #e8f1ff 100%);
  border-radius: 8px;
  transition: left 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

.tri-toggle.state-0 .tri-toggle-slider {
  left: 1px;
}

.tri-toggle.state-1 .tri-toggle-slider {
  left: 33px;
}

.tri-toggle.state-2 .tri-toggle-slider {
  left: 65px;
}

.tri-toggle .tri-toggle-segments {
  position: absolute;
  inset: 0;
  display: flex;
  z-index: 1;
}

.tri-toggle .tri-toggle-segment {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.3s ease;
  pointer-events: none;
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.2);
}

.tri-toggle .tri-toggle-segment:last-child {
  font-size: 8px;
}

.tri-toggle.state-0 .tri-toggle-segment:nth-child(1),
.tri-toggle.state-1 .tri-toggle-segment:nth-child(2),
.tri-toggle.state-2 .tri-toggle-segment:nth-child(3) {
  color: #fff;
  text-shadow: 0 0 4px rgba(255, 109, 0, 0.8);
}

/* 2段滑块：更窄的轨道 */
.tri-toggle[data-segments="2"] .tri-toggle-track {
  width: 64px;
}

.tri-toggle[data-segments="2"].state-1 .tri-toggle-slider {
  left: 33px;
}

.tri-toggle[data-segments="2"].state-0 .tri-toggle-slider {
  left: 1px;
}

/* 车间颜色标识 */
.ag-theme-alpine .生产车间-蓝色 {
  color: #2a5298 !important;
  font-weight: 600;
}

/* ===== 表格 ===== */
.table-wrap {
  flex: 1;
  overflow: auto;
  background: #fff;
  border: 1px solid #e8ecf1;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table-wrap thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

.table-wrap th {
  background: #f8fafc;
  color: #1a1a2e;
  padding: 8px 10px;
  border-right: 1px solid #edf0f5;
  border-bottom: 2px solid #e2e6ec;
  white-space: nowrap;
  font-weight: 600;
  font-size: 13px;
}

.table-wrap td {
  padding: 7px 10px;
  border-bottom: 1px solid #f5f6f8;
  border-right: 1px solid #f1f3f6;
  white-space: nowrap;
  color: #1a1a2e;
  font-size: 13px;
}

.table-wrap tr:nth-child(even) td {
  background: #fafbfd;
}

.table-wrap tr:hover td {
  background: #f5f8ff;
}

.table-wrap tr.selected td {
  background: #e8f0fe !important;
  color: #1a1a2e !important;
}

.table-wrap tr {
  cursor: pointer;
}

.table-wrap .row-cancel td {
  color: #dc3545;
  font-weight: 700;
}

.table-wrap .row-warn td {
  color: #333;
  background: #fff3e0 !important;
}

.table-wrap .row-done td {
  color: #2e7d32;
  font-weight: 700;
  background: #f1f8e9 !important;
}

.table-wrap .row-gray td {
  color: #e65100;
  background: #fff3e0 !important;
}

.table-wrap .row-terminate td {
  color: #333;
  background: #fff8e1 !important;
}

.bottom-bar {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: 6px 16px;
  border-top: 1px solid #dce4f0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  font-size: 11px;
}

.bottom-bar .pager {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #1e3a5f;
}

.bottom-bar .pager button {
  padding: 4px 12px;
  border: 1px solid #dce4f0;
  border-radius: 6px;
  background: #f6f8fc;
  color: #475569;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  height: 28px;
}

.bottom-bar .pager button:disabled {
  opacity: .4;
  cursor: default;
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #94a3b8;
}

.bottom-bar .pager button:hover:not(:disabled) {
  background: #e8f1ff;
  border-color: #1565c0;
  color: #1565c0;
  transform: translateY(-1px);
}

.bottom-bar .pager button:active:not(:disabled) {
  transform: translateY(0);
}

.btn-count-total {
  padding: 4px 10px;
  border: 1px solid #dce4f0;
  border-radius: 6px;
  background: #f6f8fc;
  color: #475569;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  margin-left: 4px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  height: 28px;
}

.btn-count-total:hover {
  background: #e8f1ff;
  border-color: #1565c0;
  transform: translateY(-1px);
}

.btn-count-total:active {
  transform: translateY(0);
}

.btn-count-total:disabled {
  opacity: 0.4;
  cursor: default;
}

.bottom-bar .pager .summary-info {
  font-size: 12px;
  font-weight: 600;
  margin-right: 12px;
}

.bottom-bar .pager .lbl-page-size {
  font-size: 11px;
  color: #5a6872;
  font-weight: 500;
}

.bottom-bar .pager .spn-page {
  width: 55px;
  padding: 4px 6px;
  border: 1.5px solid #e2e6ec;
  border-radius: 6px;
  text-align: center;
  font-size: 11px;
  height: 26px;
  background: #fafbfc;
  color: #1a1a2e;
}

.summary-info .sum-qty {
  color: #1890ff;
  font-weight: 600;
}

.summary-info .sum-unstock {
  color: #dc2626;
  font-weight: 600;
}

.summary-info .sum-wan {
  color: #94a3b8;
  font-weight: 500;
}

.bottom-bar .log {
  color: #94a3b8;
  font-size: 11px;
  max-width: 50%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: auto;
  font-weight: 500;
}

.bottom-bar .sel-count {
  font-size: 12px;
  color: #1565c0;
  background: #e8f1ff;
  border: 1px solid #bbdefb;
  border-radius: 4px;
  padding: 2px 10px;
  margin-right: 12px;
  white-space: nowrap;
  font-weight: 500;
}

.bottom-bar .sel-count b {
  font-weight: 700;
}

.toast {
  position: fixed;
  top: 64px;
  right: 20px;
  background: #fff;
  color: #1a1a2e;
  padding: 12px 20px;
  border-radius: 10px;
  z-index: 9999;
  display: none;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border: 1px solid #e8ecf1;
  border-left: 4px solid #1565c0;
}

.toast.error {
  border-left-color: #ef4444;
}

.toast.success {
  border-left-color: #22c55e;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.check-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.check-row input[type="checkbox"] {
  margin: 0;
  accent-color: #1565c0;
}

.check-row label {
  font-size: 12px;
  color: #b0bec5;
}

.radio-group-label {
  font-size: 12px;
  color: #b0bec5;
  margin-right: 4px;
}

.radio-inline {
  font-size: 12px;
  color: #b0bec5;
  margin-right: 8px;
  cursor: pointer;
}

.radio-inline input[type="radio"] {
  margin: 0 2px 0 0;
  accent-color: #1565c0;
  vertical-align: middle;
}

/* ===== 模态对话框 ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  z-index: 1000;
  display: none;
  justify-content: center;
  align-items: flex-start;
  padding-top: 60px;
  overflow-y: auto;
}

.modal-overlay.active {
  display: flex;
  animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-box {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e8ecf1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
  animation: modalSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-box .modal-header {
  background: linear-gradient(135deg, #f8fafc, #f0f4f8);
  padding: 14px 20px;
  border-bottom: 1px solid #e8ecf1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.modal-box .modal-header h3 {
  color: #1a1a2e;
  font-size: 14px;
  margin: 0;
  font-weight: 600;
}

.modal-box .modal-header .modal-close {
  background: transparent;
  border: none;
  color: #8b95a5;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
  line-height: 1;
}

.modal-box .modal-header .modal-close:hover {
  color: #1a1a2e;
  background: rgba(0, 0, 0, 0.04);
}

.modal-box .modal-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 16px;
  gap: 12px;
  background: #fafbfc;
}

.modal-box .modal-footer {
  background: #f8fafc;
  padding: 12px 20px;
  border-top: 1px solid #e8ecf1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.modal-box .btn-cancel {
  padding: 8px 20px;
  border: 1px solid #dce1e8;
  border-radius: 8px;
  background: #fff;
  color: #5a6778;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-box .btn-cancel:hover {
  background: #f0f4f8;
  border-color: #c0c8d4;
  transform: translateY(-1px);
}

.modal-box .btn-cancel:active {
  transform: translateY(0);
}

.modal-box .btn-confirm {
  padding: 8px 24px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #1565c0, #1976d2);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-box .btn-confirm:hover {
  background: linear-gradient(135deg, #1976d2, #1e88e5);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(21, 101, 192, 0.35);
}

.modal-box .btn-confirm:active {
  transform: translateY(0);
}

/* 销售对账对话框 */
.modal-对账 {
  width: 92vw;
  height: 90vh;
  max-width: 1400px;
}

.modal-对账 .对账输入区,
.modal-大结果 .对账输入区 {
  background: transparent;
  padding: 4px 0;
  border-radius: 0;
  border: none;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.modal-对账 .对账输入区 label,
.modal-大结果 .对账输入区 label {
  font-size: 12px;
  color: #5a6872;
  font-weight: 500;
}

.modal-对账 .对账输入区 input,
.modal-大结果 .对账输入区 input {
  padding: 8px 12px;
  border: 1.5px solid #e2e6ec;
  border-radius: 8px;
  background: #fafbfc;
  color: #1a1a2e;
  font-size: 12px;
  width: 220px;
  transition: all 0.2s ease;
}

.modal-对账 .对账输入区 input:focus,
.modal-大结果 .对账输入区 input:focus {
  border-color: #1565c0;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.06);
}

.modal-对账 .对账输入区 button,
.modal-大结果 .对账输入区 button {
  padding: 8px 16px;
  border: 1.5px solid #e2e6ec;
  border-radius: 6px;
  background: #fafbfc;
  color: #4a5568;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-对账 .对账输入区 button:hover,
.modal-大结果 .对账输入区 button:hover {
  background: #f0f4ff;
  border-color: #1565c0;
  color: #1565c0;
  transform: translateY(-1px);
}

.modal-对账 .对账输入区 button:active,
.modal-大结果 .对账输入区 button:active {
  transform: translateY(0);
}

.modal-对账 .对账输入区 .btn-primary,
.modal-大结果 .对账输入区 .btn-primary {
  background: linear-gradient(135deg, #1565c0, #1976d2);
  border-color: transparent;
  color: #fff;
  border-radius: 6px;
}

.modal-对账 .对账输入区 .btn-primary:hover,
.modal-大结果 .对账输入区 .btn-primary:hover {
  background: linear-gradient(135deg, #1976d2, #1e88e5);
  box-shadow: 0 4px 12px rgba(21, 101, 192, 0.2);
  transform: translateY(-1px);
}

.modal-对账 .对账输入区 .btn-primary:active,
.modal-大结果 .对账输入区 .btn-primary:active {
  transform: translateY(0);
}

.modal-对账 .对账输入区 .btn-success {
  background: linear-gradient(135deg, #2e7d32, #388e3c);
  border-color: transparent;
  color: #fff;
}

.modal-对账 .对账输入区 .btn-success:hover {
  background: linear-gradient(135deg, #388e3c, #43a047);
}

.modal-对账 .对账输入区 .btn-warn,
.modal-大结果 .对账输入区 .btn-warn {
  background: linear-gradient(135deg, #e65100, #ef6c00);
  border-color: transparent;
  color: #fff;
}

.modal-对账 .对账输入区 .btn-warn:hover,
.modal-大结果 .对账输入区 .btn-warn:hover {
  background: linear-gradient(135deg, #ef6c00, #f57c00);
}

.modal-对账 .对账输入区 .progress-wrap,
.modal-大结果 .对账输入区 .progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.modal-对账 .对账输入区 progress,
.modal-大结果 .对账输入区 progress {
  width: 120px;
  height: 14px;
  border-radius: 7px;
  overflow: hidden;
  -webkit-appearance: none;
  appearance: none;
}

/* ===== 导出选项弹窗 ===== */
.导出_日期行 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.导出_日期行 label {
  color: #8899aa;
  font-size: 12px;
  min-width: 60px;
}

.导出_日期行 input[type="date"] {
  background: #1a2a3a;
  color: #e0e0e0;
  border: 1px solid #334455;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  font-family: inherit;
}

.导出_选项行 {
  display: block;
  padding: 6px 0;
  color: #8899aa;
  font-size: 13px;
  cursor: pointer;
}

.导出_选项行 input[type="radio"] {
  margin-right: 6px;
  accent-color: #4ecdc4;
}

.modal-对账 .对账输入区 progress::-webkit-progress-bar,
.modal-大结果 .对账输入区 progress::-webkit-progress-bar {
  background: #e0e0e0;
  border-radius: 7px;
}

.modal-对账 .对账输入区 progress::-webkit-progress-value,
.modal-大结果 .对账输入区 progress::-webkit-progress-value {
  background: linear-gradient(90deg, #1565c0, #42a5f5);
  border-radius: 7px;
  transition: width 0.3s ease;
}

.modal-对账 .对账输入区 .progress-label,
.modal-大结果 .对账输入区 .progress-label {
  color: #90a4ae;
  font-size: 11px;
}

.modal-对账 .对账左右区 {
  flex: 1;
  display: flex;
  gap: 10px;
  overflow: hidden;
}

.modal-对账 .对账左面板 {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e8ecf1;
  overflow: hidden;
}

.modal-对账 .对账右面板 {
  flex: 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

.modal-对账 .面板标题,
.modal-大结果 .面板标题 {
  background: #f8fafc;
  padding: 8px 14px;
  font-size: 12px;
  color: #1a1a2e;
  border-bottom: 1px solid #e8ecf1;
  flex-shrink: 0;
  font-weight: 600;
}

.modal-大结果 .生产对账结果区 {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e8ecf1;
  overflow: hidden;
  min-height: 0;
  margin-top: 0;
}

.modal-大结果 .生产对账结果区 .table-wrap {
  flex: 1;
  overflow: auto;
  min-height: 0;
}

.modal-对账 .对账汇总区 {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e8ecf1;
  overflow: hidden;
}

.kc-check-row {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-size: 13px;
  color: #495057;
  margin-left: 8px;
  user-select: none;
}

.kc-check-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #4ecdc4;
}

/* 库存对账 — 排除日期弹窗 */
.kc-date-dlg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.kc-date-dlg {
  background: #1e1e2e;
  border: 1px solid #333;
  border-radius: 10px;
  width: 380px;
  max-width: 90vw;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.kc-date-dlg-header {
  padding: 14px 18px;
  border-bottom: 1px solid #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: 600;
  color: #e0e0e0;
}

.kc-date-dlg-body {
  padding: 16px 18px;
}

.kc-date-dlg-footer {
  padding: 12px 18px;
  border-top: 1px solid #333;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.kc-date-chk {
  display: block;
  padding: 8px 0;
  color: #ccc;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}

.kc-date-chk:hover {
  color: #fff;
}

.kc-date-chk input {
  margin-right: 8px;
}

/* 库存对账独立弹窗 */
.kc-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kc-popup {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
  width: 960px;
  max-width: 96vw;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.kc-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: #2c3e50;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}

.kc-popup-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}

.kc-popup-close:hover {
  color: #e74c3c;
}

.kc-popup-body {
  padding: 8px 0;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.kc-popup-footer {
  padding: 10px 20px 14px;
  text-align: right;
  border-top: 1px solid #e8ecf1;
}

/* 库存对账卡片 */
.kc-summary-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px;
}

.kc-summary-card {
  flex: 1 1 140px;
  min-width: 120px;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 12px 16px;
  text-align: center;
  border: 1px solid #e8ecf1;
}

.kc-summary-card .kc-label {
  display: block;
  color: #6c757d;
  font-size: 13px;
  margin-bottom: 6px;
}

.kc-summary-card .kc-val {
  display: block;
  color: #2c3e50;
  font-size: 22px;
  font-weight: bold;
}

.kc-summary-card.kc-warn {
  background: #fff8e1;
  border-color: #ffe082;
}

.kc-summary-card.kc-warn .kc-val {
  color: #e67e22;
}

.kc-summary-card.kc-ok .kc-val {
  color: #4ecdc4;
}

.kc-summary-card.kc-err .kc-val {
  color: #e74c3c;
}

.kc-summary-card.kc-status {
  flex: 2 1 200px;
}

/* 库存对账分类明细 */
.kc-breakdown-section {
  flex: 2 1 100%;
  padding: 8px 12px;
  background: #1a1a2e;
  border: 1px solid #2a2a4a;
  border-radius: 6px;
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  align-items: center;
}

.kc-breakdown-title {
  font-size: 12px;
  font-weight: 600;
  color: #aaa;
  margin-right: 8px;
}

.kc-breakdown-item {
  font-size: 12px;
  color: #ddd;
  background: #2a2a4a;
  padding: 2px 8px;
  border-radius: 3px;
  white-space: nowrap;
}

.kc-breakdown-item.kc-bd-warn {
  background: #4a3520;
  color: #f0a050;
}

/* 库存对账明细区域 */
.kc-detail-wrap {
  border-top: 1px solid #e8ecf1;
  margin-top: 4px;
}

.kc-detail-title {
  padding: 10px 16px 6px;
  font-size: 14px;
  font-weight: 600;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 6px;
}

.kc-detail-title::before {
  content: '';
  width: 3px;
  height: 14px;
  background: #4A6FFF;
  border-radius: 2px;
}

.kc-detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.kc-detail-table thead th {
  background: #f0f4fa;
  color: #475569;
  font-weight: 600;
  padding: 7px 10px;
  text-align: center;
  border-bottom: 1px solid #dce4f0;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

.kc-detail-table tbody td {
  padding: 5px 10px;
  border-bottom: 1px solid #f0f2f5;
  text-align: left;
  white-space: nowrap;
}

.kc-detail-table tbody tr:hover {
  background: #f8faff;
}

.kc-detail-table .kc-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.kc-detail-table .kc-bd-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #f0a050;
}

.kc-detail-table .kc-warn-num {
  color: #e67e22;
}

.kc-detail-table .kc-name-cell {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kc-popup .table-wrap {
  max-height: 360px;
  overflow-y: auto;
  padding: 0 8px 8px;
}

.modal-对账 .对账明细区 {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e8ecf1;
  overflow: hidden;
}

/* 车间追踪对话框 */
.modal-追踪 {
  width: 92vw;
  height: 90vh;
  max-width: 1400px;
}

.modal-追踪 .追踪输入区 {
  background: #fff;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid #e8ecf1;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.modal-追踪 .追踪输入区 label {
  font-size: 12px;
  color: #5a6872;
  font-weight: 500;
}

.modal-追踪 .追踪输入区 input {
  padding: 8px 12px;
  border: 1.5px solid #e2e6ec;
  border-radius: 8px;
  background: #fafbfc;
  color: #1a1a2e;
  font-size: 12px;
  transition: all 0.2s ease;
}

.modal-追踪 .追踪输入区 input:focus {
  border-color: #1565c0;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.06);
}

.modal-追踪 .追踪输入区 button {
  padding: 8px 16px;
  border: 1.5px solid #e2e6ec;
  border-radius: 6px;
  background: #fafbfc;
  color: #4a5568;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-追踪 .追踪输入区 button:hover {
  background: #f0f4ff;
  border-color: #1565c0;
  color: #1565c0;
  transform: translateY(-1px);
}

.modal-追踪 .追踪输入区 button:active {
  transform: translateY(0);
}

.modal-追踪 .追踪输入区 .btn-primary {
  background: linear-gradient(135deg, #1565c0, #1976d2);
  border-color: transparent;
  color: #fff;
  border-radius: 6px;
}

.modal-追踪 .追踪输入区 .btn-primary:hover {
  background: linear-gradient(135deg, #1976d2, #1e88e5);
  transform: translateY(-1px);
}

.modal-追踪 .追踪输入区 .btn-primary:active {
  transform: translateY(0);
}

.modal-追踪 .追踪输入区 .btn-success {
  background: linear-gradient(135deg, #2e7d32, #388e3c);
  border-color: transparent;
  color: #fff;
}

.modal-追踪 .追踪输入区 .btn-success:hover {
  background: linear-gradient(135deg, #388e3c, #43a047);
}

.modal-追踪 .追踪结果区 {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e8ecf1;
  overflow: hidden;
  min-height: 0;
}

.modal-追踪 .追踪日志区 {
  height: 140px;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e8ecf1;
  overflow: hidden;
  flex-shrink: 0;
}

.modal-追踪 .日志内容 {
  flex: 1;
  padding: 10px;
  font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: 11px;
  color: #5a6872;
  background: #f8fafc;
  overflow: auto;
  white-space: pre-wrap;
}

.modal-追踪 .面板标题 {
  background: #f8fafc;
  padding: 8px 14px;
  font-size: 12px;
  color: #1a1a2e;
  border-bottom: 1px solid #e8ecf1;
  flex-shrink: 0;
  font-weight: 600;
}

.modal-追踪 progress {
  border-radius: 7px;
  overflow: hidden;
  -webkit-appearance: none;
  appearance: none;
}

.modal-追踪 progress::-webkit-progress-bar {
  background: #e0e0e0;
  border-radius: 7px;
}

.modal-追踪 progress::-webkit-progress-value {
  background: linear-gradient(90deg, #1565c0, #42a5f5);
  border-radius: 7px;
  transition: width 0.3s ease;
}

/* 小提示 */
.hint {
  color: #999;
  font-size: 11px;
}

/* BOM弹窗 & 生产状态弹窗 共用 */
.modal-大结果 {
  width: 92vw;
  height: 90vh;
  max-width: 1600px;
  max-height: 92vh;
}

.modal-大结果 .modal-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-大结果 .query-info {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #666;
  padding: 4px 0;
}

.modal-大结果 .query-info strong {
  color: #333;
}

/* ===== BOM上传弹窗样式 ===== */
.上传文件区 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px 24px;
  border: 2px dashed #c8d6e5;
  border-radius: 12px;
  background: #f8f9fb;
  cursor: pointer;
  transition: all 0.2s ease;
}

.上传文件区:hover {
  border-color: #1565c0;
  background: #f0f4ff;
}

.上传图标 {
  font-size: 36px;
  line-height: 1;
}

.上传文字 {
  font-size: 14px;
  font-weight: 500;
  color: #2c3e50;
}

.上传提示 {
  font-size: 12px;
  color: #95a5a6;
}

.进度区 {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #f0f6ff;
  border: 1px solid #d6e4ff;
}

.进度标题 {
  font-size: 13px;
  font-weight: 600;
  color: #1565c0;
}

.进度区 .progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.进度区 progress {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  -webkit-appearance: none;
  appearance: none;
}

.进度区 progress::-webkit-progress-bar {
  background: #e0e7ff;
  border-radius: 4px;
}

.进度区 progress::-webkit-progress-value {
  background: linear-gradient(90deg, #1565c0, #42a5f5);
  border-radius: 4px;
}

.进度区 .progress-label {
  font-size: 12px;
  color: #1565c0;
  font-weight: 500;
  white-space: nowrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #1565c0, #1976d2);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1976d2, #1e88e5);
  box-shadow: 0 4px 12px rgba(21, 101, 192, 0.3);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-cancel {
  padding: 10px 22px;
  border: 1.5px solid #dce1e8;
  border-radius: 8px;
  background: #fff;
  color: #5a6778;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-cancel:hover {
  background: #f5f7fa;
  border-color: #bcc4d0;
  transform: translateY(-1px);
}

.btn-cancel:active {
  transform: translateY(0);
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #2e7d32, #388e3c);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-download:hover {
  background: linear-gradient(135deg, #388e3c, #43a047);
  box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
  transform: translateY(-1px);
}

.btn-download:active {
  transform: translateY(0);
}

.btn图标 {
  font-size: 16px;
  line-height: 1;
}

/* ===== 列筛选下拉框样式 ===== */
.列筛选下拉框 {
  position: absolute;
  background: #fff;
  border: 1px solid #e2e6ec;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  min-width: 200px;
  max-width: 300px;
  max-height: 350px;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  font-size: 13px;
}

.列筛选下拉框 .筛选搜索框 {
  padding: 10px 12px;
  border: none;
  border-bottom: 1px solid #e2e6ec;
  outline: none;
  font-size: 13px;
  border-radius: 8px 8px 0 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

.列筛选下拉框 .筛选搜索框:focus {
  background-color: #f8fafc;
}

.列筛选下拉框 .筛选选项列表 {
  flex: 1;
  overflow-y: auto;
  max-height: 220px;
  padding: 4px 0;
}

.列筛选下拉框 .筛选选项 {
  display: flex;
  align-items: center;
  padding: 5px 12px;
  cursor: pointer;
  transition: background 0.15s;
}

.列筛选下拉框 .筛选选项:hover {
  background: #f0f4ff;
}

/* 方框复选框样式 */
.列筛选下拉框 .筛选选项 .方框复选框 {
  width: 14px;
  height: 14px;
  border: 1px solid #c0c4cc;
  border-radius: 2px;
  margin-right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  flex-shrink: 0;
  transition: all 0.15s;
}

.列筛选下拉框 .筛选选项:hover .方框复选框 {
  border-color: #1565c0;
}

.列筛选下拉框 .筛选选项 .方框复选框.已选中 {
  background: #1565c0;
  border-color: #1565c0;
}

.列筛选下拉框 .筛选选项 .方框复选框.已选中::after {
  content: '✓';
  color: #fff;
  font-size: 10px;
  font-weight: bold;
}

.列筛选下拉框 .筛选选项 .选项文本 {
  flex: 1;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  color: #333;
}

.列筛选下拉框 .筛选选项 .选项文本.已选中 {
  color: #1890ff;
  font-weight: 500;
}

.列筛选下拉框 .筛选按钮区 {
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
  border-top: 1px solid #e2e6ec;
  gap: 8px;
}

.列筛选下拉框 .筛选按钮区 button {
  padding: 5px 12px;
  border: 1px solid #e2e6ec;
  border-radius: 4px;
  background: #fafbfc;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.15s;
}

.列筛选下拉框 .筛选按钮区 button:hover {
  background: #f0f4ff;
  border-color: #1565c0;
  color: #1565c0;
}

.列筛选下拉框 .筛选按钮区 .btn-确认 {
  background: #1565c0;
  color: #fff;
  border-color: #1565c0;
}

.列筛选下拉框 .筛选按钮区 .btn-确认:hover {
  background: #3366b2;
}

.列筛选下拉框 .筛选统计 {
  padding: 6px 12px;
  font-size: 11px;
  color: #8b95a5;
  border-bottom: 1px solid #e2e6ec;
}

/* 表头筛选按钮 - 平时不占空间，hover时展开 */
.ag-theme-alpine .ag-header-cell .header-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0;
  height: 18px;
  margin-left: 0;
  margin-right: 0;
  cursor: pointer;
  border-radius: 3px;
  color: #8b95a5;
  font-size: 10px;
  transition: all 0.15s;
  vertical-align: middle;
  order: -1;
  overflow: hidden;
}

/* 防止窄列裁掉筛选按钮 */
.ag-theme-alpine .ag-header-cell,
.ag-theme-alpine .ag-header-cell-label {
  overflow: visible !important;
}

.ag-theme-alpine .ag-header-cell:hover .header-filter-btn,
.ag-theme-alpine .ag-header-cell .header-filter-btn.active {
  width: 18px;
  margin-left: 2px;
}

.ag-theme-alpine .ag-header-cell .header-filter-btn:hover {
  background: #e2e6ec;
  color: #1890ff;
}

.ag-theme-alpine .ag-header-cell .header-filter-btn.active {
  color: #1890ff;
  background: #e8f0fe;
}

/* 排序箭头平时隐藏，hover或已排序时显示 */
.ag-theme-alpine .ag-header-cell .ag-sort-indicator-container {
  opacity: 0;
  transition: opacity 0.15s;
  width: 0;
  overflow: hidden;
}

.ag-theme-alpine .ag-header-cell:hover .ag-sort-indicator-container,
.ag-theme-alpine .ag-header-cell.ag-header-cell-sorted-asc .ag-sort-indicator-container,
.ag-theme-alpine .ag-header-cell.ag-header-cell-sorted-desc .ag-sort-indicator-container {
  opacity: 1;
  width: auto;
  overflow: visible;
}

/* 让筛选按钮紧跟在文字后面 */
.ag-theme-alpine .ag-header-cell-text {
  display: inline-flex !important;
  align-items: center;
  gap: 2px;
}

/* ===== 自定义右键菜单 ===== */
.ctx-menu {
  display: none;
  position: fixed;
  z-index: 9999;
  background: #ffffff;
  border: 1px solid #dce4f0;
  border-radius: 6px;
  box-shadow: 0 8px 30px rgba(13, 43, 78, 0.12), 0 2px 8px rgba(13, 43, 78, 0.06);
  min-width: 190px;
  padding: 4px 0;
  font-size: 13px;
  animation: ctxMenuIn 0.15s ease;
  backdrop-filter: blur(8px);
}

@keyframes ctxMenuIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-4px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.ctx-menu.show {
  display: block;
}

.ctx-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  color: #2c3e50;
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
  border-radius: 4px;
  margin: 0 4px;
}

.ctx-menu-item:hover {
  background: linear-gradient(135deg, #e8f1ff 0%, #d6e4ff 100%);
  color: #1565c0;
}

.ctx-menu-item .ctx-icon {
  width: 18px;
  text-align: center;
  font-size: 14px;
  flex-shrink: 0;
}

.ctx-menu-item .ctx-shortcut {
  margin-left: auto;
  color: #9ca3af;
  font-size: 11px;
}

/* 右键菜单警示项（橙色） */
.ctx-menu-item.ctx-warn {
  color: #ff9800;
  font-weight: 600;
}

.ctx-menu-item.ctx-warn:hover {
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
  color: #e65100;
}

.ctx-menu-divider {
  height: 1px;
  background: #eef1f8;
  margin: 4px 12px;
}

/* 自定义确认对话框 */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.confirm-box {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 28px 32px;
  min-width: 420px;
  max-width: 520px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.confirm-box .confirm-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(250, 204, 21, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 24px;
}

.confirm-box .confirm-title {
  color: #f1f5f9;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 8px;
}

.confirm-box .confirm-msg {
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
  margin-bottom: 24px;
}

.confirm-box .confirm-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.confirm-box .confirm-btns button {
  padding: 10px 32px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}

.confirm-box .btn-cancel {
  background: #334155;
  color: #cbd5e1;
}

.confirm-box .btn-cancel:hover {
  background: #475569;
}

.confirm-box .btn-confirm {
  background: #f59e0b;
  color: #1e293b;
}

.confirm-box .btn-confirm:hover {
  background: #fbbf24;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ===== Boss 生产驾驶舱 ===== */
.boss-dashboard {
  padding: 20px 24px;
  overflow-y: auto;
  height: 100%;
}

.boss-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.boss-header h2 {
  font-size: 22px;
  color: #1a1a2e;
  font-weight: 600;
}

/* 时间范围选择器 */
.time-range-selector {
  display: flex;
  gap: 4px;
  background: #f0f2f5;
  padding: 4px;
  border-radius: 8px;
}

.time-range-btn {
  padding: 5px 14px;
  border: none;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  color: #555;
  transition: all 0.2s;
  font-weight: 500;
}

.time-range-btn:hover {
  background: #e0e3e8;
  color: #333;
}

.time-range-btn.active {
  background: #1565c0;
  color: #fff;
  box-shadow: 0 2px 6px rgba(21, 101, 192, 0.3);
}

.boss-refresh {
  font-size: 13px;
  color: #1565c0;
  cursor: pointer;
  padding: 6px 14px;
  border: 1px solid #1565c0;
  border-radius: 6px;
  transition: all 0.2s;
  user-select: none;
}

.boss-refresh:hover {
  background: #1565c0;
  color: #fff;
}

.boss-export-btn {
  background: #28a745;
  color: #fff;
  border-color: #28a745;
}

.boss-export-btn:hover {
  background: #218838;
  border-color: #218838;
  color: #fff;
}

/* Boss Tabs */
.boss-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 2px solid #e8ecf1;
}

.boss-tab {
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: all 0.2s;
  outline: none;
  border-radius: 6px 6px 0 0;
}

.boss-tab:hover {
  color: #1565c0;
  background: rgba(21, 101, 192, 0.05);
}

.boss-tab.active {
  color: #1565c0;
  border-bottom-color: #1565c0;
  font-weight: 600;
}

.boss-tab-panel {
  animation: bossFadeIn 0.2s ease;
}

@keyframes bossFadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.boss-cards {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

/* 委外/采购卡只用4列 */
#boss_panel_委外 .boss-cards {
  grid-template-columns: repeat(4, 1fr);
}

/* 库存卡只用2列 */
#boss_panel_库存 .boss-cards {
  grid-template-columns: repeat(2, 1fr);
  max-width: 400px;
}

.boss-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px 16px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid #e8ecf1;
  transition: transform 0.2s, box-shadow 0.2s;
}

.boss-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.boss-card.warn {
  border-left: 4px solid #ff4d4f;
}

.boss-card.alert-red {
  border-left: 4px solid #dc3545;
  background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
}

.boss-card.alert-red .boss-card-value {
  color: #dc3545;
}

.boss-card.alert-yellow {
  border-left: 4px solid #fd7e14;
  background: linear-gradient(135deg, #fff8f0 0%, #fff 100%);
}

.boss-card.alert-yellow .boss-card-value {
  color: #fd7e14;
}

.boss-card.alert-blue {
  border-left: 4px solid #0dcaf0;
  background: linear-gradient(135deg, #f0faff 0%, #fff 100%);
}

.boss-card.alert-blue .boss-card-value {
  color: #0dcaf0;
}

.boss-card-value {
  font-size: 32px;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.2;
}

.boss-card.warn .boss-card-value {
  color: #ff4d4f;
}

.boss-card-label {
  font-size: 13px;
  color: #8899aa;
  margin-top: 6px;
}

.boss-card-sub {
  font-size: 11px;
  color: #b0bec5;
  margin-top: 3px;
}

/* 甘特图样式 */
.gantt-chart {
  font-size: 12px;
  min-width: 800px;
}

.gantt-header {
  display: flex;
  background: #f8f9fb;
  border-bottom: 1px solid #e8ecf1;
  font-weight: 600;
  color: #666;
}

.gantt-header .gantt-label {
  padding: 8px 12px;
  border-right: 1px solid #e8ecf1;
  background: #fff;
}

.gantt-day {
  width: 40px;
  padding: 8px 2px;
  text-align: center;
  border-right: 1px solid #e8ecf1;
  font-size: 11px;
}

.gantt-row {
  display: flex;
  border-bottom: 1px solid #f0f0f0;
  align-items: center;
  height: 40px;
}

.gantt-row .gantt-label {
  padding: 4px 12px;
  border-right: 1px solid #e8ecf1;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gantt-bar-wrap {
  position: relative;
  flex: 1;
  height: 100%;
}

.gantt-bar {
  position: absolute;
  top: 8px;
  height: 22px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
}

.gantt-bar-text {
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.gantt-actual {
  position: absolute;
  top: 28px;
  color: #dc3545;
  font-size: 10px;
}

.boss-table-wrap {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid #e8ecf1;
  margin-bottom: 20px;
  overflow: hidden;
}

.boss-chart-mini {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid #e8ecf1;
  margin-bottom: 20px;
  padding: 16px 20px;
  height: 260px;
}

.boss-table-title {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a2e;
  padding: 14px 20px;
  border-bottom: 1px solid #e8ecf1;
  background: #f8f9fb;
}

.boss-table-wrap .table-wrap {
  height: auto;
  min-height: 200px;
}

.boss-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: #ff4d4f;
  font-size: 14px;
}

/* ===== BOM正反查弹窗美化 ===== */
/* 左侧面板卡片 */
#BOM正反查弹窗 .modal-header {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

/* 查询按钮悬停效果 */
#BOM正反查_输入框:focus {
  border-color: #1565c0 !important;
  box-shadow: 0 0 0 2px rgba(21, 101, 192, 0.15);
}

/* 统计卡片动画 */
#BOM正反查_统计 {
  transition: all 0.3s ease;
}

/* 功能按钮网格样式 */
#BOM正反查弹窗 .btn-action {
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

#BOM正反查弹窗 .btn-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  filter: brightness(1.08);
}

#BOM正反查弹窗 .btn-action:active {
  transform: translateY(0);
}

/* 表头美化 */
#BOM正反查_结果容器 thead th {
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* 表格行悬停效果 */
#BOM正反查_结果容器 tbody tr:hover {
  background: rgba(21, 101, 192, 0.03) !important;
}

/* 可复制文本悬停效果 */
#BOM正反查_结果容器 span[title="点击复制"]:hover {
  color: #1565c0 !important;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

/* 展开按钮动画 */
#BOM正反查_结果容器 td[onclick*="切换展开"] {
  transition: transform 0.2s ease;
}

#BOM正反查_结果容器 td[onclick*="切换展开"]:hover {
  transform: scale(1.2);
}

/* 进度条美化 */
#BOM正反查_进度区 progress {
  border-radius: 8px;
  height: 6px;
}

#BOM正反查_进度区 progress::-webkit-progress-bar {
  background: #e0e0e0;
  border-radius: 8px;
}

#BOM正反查_进度区 progress::-webkit-progress-value {
  background: linear-gradient(90deg, #1565c0, #1976d2);
  border-radius: 8px;
}

/* 导出选项弹窗 */
#BOM导出选项弹窗 select:focus {
  border-color: #1565c0;
  box-shadow: 0 0 0 2px rgba(21, 101, 192, 0.15);
  outline: none;
}

/* BOM表格容器滚动条美化 */
#BOM正反查_结果容器::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

#BOM正反查_结果容器::-webkit-scrollbar-track {
  background: #f5f5f5;
}

#BOM正反查_结果容器::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

#BOM正反查_结果容器::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

/* 成品行独立样式 */
#BOM正反查_结果容器 tr.BOM父行 {
  border-top: 1px solid #e0e0e0;
}

/* 子行连线效果 */
#BOM正反查_结果容器 tr.BOM子行 {
  transition: background 0.15s ease;
}

/* Tab按钮过渡 */
#BOM正反查_tab正查,
#BOM正反查_tab反查 {
  transition: all 0.25s ease;
}

/* 缓存状态 */
#BOM正反查_缓存状态 {
  transition: color 0.3s ease;
}

/* ===== 金蝶云星空主题配色覆盖 ===== */
/* 说明：仅调整颜色值，不修改任何布局、尺寸、事件或功能逻辑 */

:root {
  --kingdee-primary: #1565c0;
  --kingdee-primary-dark: #2E4EAA;
  --kingdee-primary-light: #4A6FFF;
  --kingdee-bg: #f5f7fa;
  --kingdee-panel: #eef2f7;
  --kingdee-border: #dce4f0;
  --kingdee-text: #1a2d4a;
  --kingdee-text-secondary: #64748b;
  --kingdee-orange: #e67e22;
  --kingdee-orange-dark: #d35400;
  --kingdee-green: #27ae60;
  --kingdee-green-dark: #1e8449;
  --kingdee-red: #e74c3c;
  --kingdee-red-dark: #c0392b;
}

/* 顶部导航栏 - 深蓝渐变 */
.top-bar {
  background: linear-gradient(135deg, #2E4EAA 0%, #3d5ed8 50%, #4A6FFF 100%);
  box-shadow: 0 2px 12px rgba(46, 78, 170, 0.28);
}

.top-bar-icon .badge {
  border-color: #2E4EAA;
}

/* 左侧边栏 - 金蝶浅灰蓝 */
.sidebar {
  background: linear-gradient(180deg, #f5f7fa 0%, #eef2f7 100%);
  border-right-color: #d4dde8;
}

.sidebar-brand {
  background: linear-gradient(135deg, #eef2f7 0%, #e6ecf4 100%);
  color: #2E4EAA;
  border-bottom-color: #d4dde8;
}

.sidebar-brand::before {
  background: linear-gradient(180deg, #2E4EAA, #4A6FFF);
}

.sidebar .nav-label {
  color: #64748b;
}

.sidebar button {
  color: #475569;
}

.sidebar button:hover {
  background: #e3eaf5;
  color: #2E4EAA;
}

.sidebar button.active {
  background: #ffffff;
  color: #2E4EAA;
  box-shadow: inset 3px 0 0 #4A6FFF, 0 1px 3px rgba(46, 78, 170, 0.08);
}

.sidebar .sep {
  border-top-color: #d4dde8;
}

.折叠指示条 {
  background: linear-gradient(180deg, #eef2f7 0%, #e6ecf4 100%);
  border-right-color: #d4dde8;
  border-bottom-color: #4A6FFF;
}

.折叠指示条:hover {
  background: linear-gradient(180deg, #e3eaf5 0%, #d6e0ed 100%);
}

.折叠指示条 .展开按钮 {
  background: #2E4EAA;
}

/* 内容区 */
.content {
  background: #f5f7fa;
}

/* Tab 栏 */
.tab-bar {
  background: #eef2f7;
  border-bottom-color: #4A6FFF;
}

.tab-bar .tab-btn {
  background: #f6f8fc;
  border-color: #d4dde8;
  color: #64748b;
}

.tab-bar .tab-btn:hover {
  background: #e3eaf5;
  color: #2E4EAA;
  border-color: #b8c9e0;
}

.tab-bar .tab-btn.active {
  background: #ffffff;
  color: #2E4EAA;
  border-color: #2E4EAA;
}

/* 过滤栏 */
.filter-bar {
  background: #eef2f7;
  border-bottom-color: #d4dde8;
}

.filter-bar label {
  color: #1e3a5f;
}

.filter-bar input,
.filter-bar select {
  background: #ffffff;
  border-color: #c8d4e0;
  color: #2c3e50;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: #2E4EAA;
  box-shadow: 0 0 0 2px rgba(46, 78, 170, 0.08);
}

.filter-bar .btn-action {
  background: #ffffff;
  border-color: #c8d4e0;
  color: #475569;
}

.filter-bar .btn-action:hover {
  background: #e3eaf5;
  border-color: #2E4EAA;
  color: #2E4EAA;
}

.active-btn {
  background: #2E4EAA !important;
  color: #fff !important;
  border-color: #2E4EAA !important;
}

.filter-bar .btn-query {
  background: linear-gradient(135deg, #1a3a7a 0%, #2E4EAA 100%);
  color: #fff !important;
  font-weight: 600;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
  box-shadow: 0 2px 6px rgba(26, 58, 122, 0.25);
}

.filter-bar .btn-query:hover {
  background: linear-gradient(135deg, #2E4EAA 0%, #3d5ed8 100%);
  box-shadow: 0 4px 12px rgba(26, 58, 122, 0.35);
}

.filter-bar .btn-export {
  background: linear-gradient(135deg, #0f5c32 0%, #1e8449 100%);
  color: #fff !important;
  font-weight: 600;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
  box-shadow: 0 2px 6px rgba(15, 92, 50, 0.25);
}

.filter-bar .btn-export:hover {
  background: linear-gradient(135deg, #1e8449 0%, #27ae60 100%);
  box-shadow: 0 4px 12px rgba(15, 92, 50, 0.35);
}

.filter-bar .btn-warn {
  background: linear-gradient(135deg, #a04000 0%, #d35400 100%);
  color: #fff !important;
  font-weight: 600;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
  box-shadow: 0 2px 6px rgba(160, 64, 0, 0.25);
}

.filter-bar .btn-warn:hover {
  background: linear-gradient(135deg, #d35400 0%, #e67e22 100%);
  box-shadow: 0 4px 12px rgba(160, 64, 0, 0.35);
}

/* 方案标签栏 */
.sf-方案栏 {
  background: #eef2f7;
  border-bottom-color: #d4dde8;
}

.sf-方案前缀 {
  color: #64748b;
}

.sf-方案标签 {
  border-color: #93b5e8;
  color: #333;
}

.sf-方案标签:hover {
  background: #e3eaf5;
  border-color: #2E4EAA;
  color: #2E4EAA;
}

.sf-方案标签.激活 {
  background: #ffffff;
  border-color: #e67e22;
  color: #d35400;
}

/* ag-Grid 表格 - 金蝶风格 */
.ag-theme-alpine {
  --ag-header-background-color: #4A6FFF;
  --ag-header-foreground-color: #1a2d4a;
  --ag-selected-row-background-color: #d6e4ff;
  --ag-row-hover-colour: #e8f1ff;
  --ag-odd-row-background-color: #ffffff;
  --ag-even-row-background-color: #f6f8fc;
  --ag-border-color: #dce4f0;
  --ag-secondary-border-color: #e8edf5;
  --ag-range-selection-border-color: #2E4EAA;
  --ag-checkbox-checked-color: #2E4EAA;
  --ag-row-border-color: #e8ecf4;
  --ag-background-color: #ffffff;
}

.ag-theme-alpine .ag-header {
  border-bottom-color: #c8d4e0 !important;
}

.ag-theme-alpine .ag-header-cell {
  background: #E8F1FB;
  color: #1a2d4a;
  border-right-color: #d4dde8;
}

.ag-theme-alpine .ag-header-cell:hover {
  background: #dce8f8;
}

.ag-theme-alpine .ag-header-cell-text {
  color: #1a2d4a !important;
}

.ag-theme-alpine .ag-cell {
  color: #2c3e50;
  border-right-color: #eef1f8;
  border-bottom-color: #eef1f8;
}

.ag-theme-alpine .ag-cell:focus {
  border-color: #2E4EAA !important;
  box-shadow: inset 0 0 0 1px #2E4EAA;
}

.ag-theme-alpine .ag-row-hover {
  background-color: #e8f1ff !important;
}

.ag-theme-alpine .ag-row-hover .ag-cell {
  color: #1a2d4a;
}

.ag-theme-alpine .ag-row-selected {
  background-color: #d6e4ff !important;
}

.ag-theme-alpine .ag-row-selected .ag-cell {
  color: #0d2b4e !important;
}

.ag-theme-alpine .ag-cell .ag-checkbox-input-wrapper,
.ag-theme-alpine .ag-header-select-all .ag-checkbox-input-wrapper {
  border-color: #93b5e8 !important;
}

.ag-theme-alpine .ag-cell .ag-checkbox-input-wrapper.ag-checked,
.ag-theme-alpine .ag-header-select-all .ag-checkbox-input-wrapper.ag-checked,
.ag-theme-alpine .ag-cell .ag-checkbox-input-wrapper.ag-indeterminate,
.ag-theme-alpine .ag-header-select-all .ag-checkbox-input-wrapper.ag-indeterminate {
  background: #2E4EAA !important;
  border-color: #2E4EAA !important;
}

/* 过滤弹窗标题栏 */
.过滤弹窗_标题栏 {
  background: #eef2f7;
}

.过滤弹窗_标题 {
  color: #5a6872;
}

.过滤弹窗_标题:hover {
  color: #2E4EAA;
  background: #e3eaf5;
}

.过滤弹窗_标题.激活 {
  color: #2E4EAA;
  border-bottom-color: #2E4EAA;
  background: #ffffff;
}

/* 列管理器 */
.列管理工具栏 {
  background: #eef2f7;
  color: #5a6872;
}

.列管理行:hover {
  background: #f0f4fa;
}

.列管理行.选中 {
  background: #e3ecf7;
  border-left-color: #4A6FFF;
}

.列管理小按钮 {
  border-color: #c8d4e0;
  color: #4a5a6a;
}

.列管理小按钮:hover {
  background: #e3eaf5;
  border-color: #2E4EAA;
  color: #2E4EAA;
}

/* 通用按钮 */
.btn-primary {
  background: linear-gradient(135deg, #2E4EAA 0%, #4A6FFF 100%);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #3d5ed8 0%, #5B7CFF 100%);
}

.btn-cancel:hover {
  border-color: #2E4EAA;
  color: #2E4EAA;
}

/* 顶部栏用户菜单 */
.top-bar-user-menu-item:hover {
  background: #2E4EAA;
}

/* 时间范围按钮 */
.time-range-btn:hover {
  border-color: #2E4EAA;
  color: #2E4EAA;
}

.time-range-btn.active {
  background: #2E4EAA;
  border-color: #2E4EAA;
}

/* 对账/追踪弹窗主按钮 */
.modal-对账 .对账输入区 .btn-primary,
.modal-大结果 .对账输入区 .btn-primary,
.modal-追踪 .追踪输入区 .btn-primary {
  background: linear-gradient(135deg, #2E4EAA 0%, #4A6FFF 100%);
}

.modal-对账 .对账输入区 .btn-primary:hover,
.modal-大结果 .对账输入区 .btn-primary:hover,
.modal-追踪 .追踪输入区 .btn-primary:hover {
  background: linear-gradient(135deg, #3d5ed8 0%, #5B7CFF 100%);
}

.modal-对账 .对账输入区 .btn-success {
  background: linear-gradient(135deg, #1e8449 0%, #27ae60 100%);
}

.modal-对账 .对账输入区 .btn-success:hover {
  background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

.modal-对账 .对账输入区 .btn-warn,
.modal-大结果 .对账输入区 .btn-warn {
  background: linear-gradient(135deg, #d35400 0%, #e67e22 100%);
}

.modal-对账 .对账输入区 .btn-warn:hover,
.modal-大结果 .对账输入区 .btn-warn:hover {
  background: linear-gradient(135deg, #e67e22 0%, #f39c12 100%);
}

/* 确认弹窗 */
.confirm-box .btn-confirm {
  background: linear-gradient(135deg, #2E4EAA 0%, #4A6FFF 100%);
}

.confirm-box .btn-confirm:hover {
  background: linear-gradient(135deg, #3d5ed8 0%, #5B7CFF 100%);
}

.confirm-box .btn-cancel:hover {
  border-color: #2E4EAA;
  color: #2E4EAA;
}

/* BOM 弹窗按钮 */
#BOM正反查弹窗 .btn-action {
  background: linear-gradient(135deg, #2E4EAA 0%, #4A6FFF 100%);
}

#BOM正反查弹窗 .btn-action:hover {
  background: linear-gradient(135deg, #3d5ed8 0%, #5B7CFF 100%);
}

/* 模态框按钮 */
.modal-box .btn-confirm {
  background: linear-gradient(135deg, #2E4EAA 0%, #4A6FFF 100%);
}

.modal-box .btn-confirm:hover {
  background: linear-gradient(135deg, #3d5ed8 0%, #5B7CFF 100%);
}

.modal-box .btn-cancel:hover {
  border-color: #2E4EAA;
  color: #2E4EAA;
}

/* ===== 搜索面板（下拉式，类似金蝶命令面板） 2026-06-29 ===== */
.top-bar-search-wrap {
  position: relative;
}

.search-panel {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  width: 360px;
  max-height: 420px;
  background: #ffffff;
  border: 1px solid #dce4f0;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(13, 43, 78, 0.14), 0 2px 8px rgba(13, 43, 78, 0.06);
  z-index: 9999;
  overflow: hidden;
  animation: searchPanelIn 0.15s ease;
}

@keyframes searchPanelIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-panel-input {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-bottom: 1px solid #eef1f5;
  font-size: 14px;
  color: #1a2d4a;
  background: #f8fafc;
  outline: none;
  font-family: inherit;
}

.search-panel-input::placeholder {
  color: #94a3b8;
}

.search-panel-input:focus {
  background: #ffffff;
}

.search-panel-list {
  max-height: 340px;
  overflow-y: auto;
  padding: 4px 0;
}

.search-panel-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.12s ease;
  border-left: 3px solid transparent;
}

.search-panel-item:hover,
.search-panel-item.highlight {
  background: #eef2f7;
  border-left-color: #2E4EAA;
}

.search-panel-item .item-icon {
  font-size: 18px;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}

.search-panel-item .item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.search-panel-item .item-name {
  font-size: 13px;
  font-weight: 500;
  color: #1a2d4a;
}

.search-panel-item .item-desc {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-panel-empty {
  padding: 24px 16px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}

/* === 多维表网格 === */
#表格容器_多维表 .ag-cell {
  text-align: left !important;
  display: flex !important;
  align-items: center !important;
  padding-left: 8px !important;
  padding-right: 4px !important;
}

#表格容器_多维表 .ag-header-cell {
  text-align: left !important;
  display: flex !important;
  align-items: center !important;
}

#表格容器_多维表 .ag-header-cell-menu-button {
  display: none !important;
}

#表格容器_多维表 .ag-header-icon {
  display: none !important;
}

#表格容器_多维表 .ag-header-cell-text {
  display: flex;
  align-items: center;
  gap: 4px;
}

#表格容器_多维表 .ag-header-select-all {
  display: none;
}

/* 多维表 - 修改过单元格橙色标记 */
#表格容器_多维表 .ag-cell.mt-修改过 {
  background-color: #fff3cd !important;
  border: 1px solid #ffc107 !important;
}

/* ==================== 数据大屏 ==================== */
.dashboard-screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  font-family: "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
}

.dash-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #f0f4f8 0%, #e8eef3 30%, #f5f7fa 60%, #eef2f6 100%);
  z-index: -1;
}

.dash-content {
  position: relative;
  padding: 20px 24px 16px;
}

/* 顶部标题栏 */
.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 30px;
  margin-bottom: 22px;
  background: linear-gradient(135deg, #1a3a5c, #1e4d7b);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(26, 58, 92, 0.25);
}

.dash-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dash-title-icon {
  font-size: 44px;
}

.dash-title {
  font-size: 28px;
  font-weight: bold;
  color: #ffffff;
  margin: 0;
  letter-spacing: 2px;
}

.dash-subtitle {
  font-size: 14px;
  color: #b8d4f0;
  margin: 5px 0 0;
}

.dash-header-center {
  display: flex;
  gap: 12px;
}

.dash-badge {
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: bold;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.dash-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dash-clock {
  font-size: 30px;
  font-weight: bold;
  color: #ffffff;
  font-family: 'Consolas', 'Courier New', monospace;
  letter-spacing: 2px;
}

.dash-refresh-btn {
  padding: 10px 24px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
}

.dash-refresh-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.2);
}

/* KPI 卡片行 */
.dash-kpi-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.dash-kpi-card {
  position: relative;
  padding: 24px 20px;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border-left: 5px solid #ddd;
  transition: transform 0.3s, box-shadow 0.3s;
}

.dash-kpi-card.blue {
  border-left-color: #3b82f6;
}

.dash-kpi-card.green {
  border-left-color: #10b981;
}

.dash-kpi-card.cyan {
  border-left-color: #06b6d4;
}

.dash-kpi-card.red {
  border-left-color: #ef4444;
}

.dash-kpi-card.purple {
  border-left-color: #8b5cf6;
}

.dash-kpi-card.orange {
  border-left-color: #f59e0b;
}

.dash-kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.dash-kpi-icon {
  font-size: 30px;
  margin-bottom: 8px;
}

.dash-kpi-value {
  font-size: 36px;
  font-weight: bold;
  color: #1e293b;
  line-height: 1.2;
}

.dash-kpi-label {
  font-size: 13px;
  color: #64748b;
  margin-top: 3px;
  font-weight: 500;
}

.dash-kpi-sub {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
  font-weight: 400;
}

.dash-kpi-animate {
  animation: kpiBounce 0.6s ease-out;
}

@keyframes kpiBounce {
  0% {
    transform: scale(1.3);
    opacity: 0.3;
  }

  50% {
    transform: scale(0.95);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* 图表行 */
.dash-chart-row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.dash-chart-box {
  background: #ffffff;
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  min-height: 310px;
}

.dash-chart-box.span-4 {
  grid-column: span 4;
}

.dash-chart-box.span-6 {
  grid-column: span 6;
}

.dash-chart-box.span-8 {
  grid-column: span 8;
}

.dash-chart-box.span-12 {
  grid-column: span 12;
}

.dash-chart-title {
  font-size: 15px;
  font-weight: bold;
  color: #334155;
  margin: 0 0 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.dash-chart-desc {
  font-size: 12px;
  color: #94a3b8;
  margin: 0 0 12px;
  line-height: 1.4;
}

.dash-chart {
  width: 100%;
  height: 270px;
}

/* 底部信息栏 */
.dash-footer {
  display: flex;
  justify-content: center;
  gap: 40px;
  padding: 14px 0;
  font-size: 13px;
  color: #94a3b8;
}

/* 响应式 */
@media (max-width: 1400px) {
  .dash-kpi-row {
    grid-template-columns: repeat(3, 1fr);
  }

  .dash-chart-box.span-4,
  .dash-chart-box.span-6,
  .dash-chart-box.span-8 {
    grid-column: span 6;
  }
}

@media (max-width: 900px) {
  .dash-kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .dash-chart-box.span-4,
  .dash-chart-box.span-6,
  .dash-chart-box.span-8 {
    grid-column: span 12;
  }

  .dash-header {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .dash-title {
    font-size: 20px;
  }
}

/* ========== AI 助手悬浮面板 ========== */
.ai-float-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9998;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}

.ai-float-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.6);
}

.ai-float-btn.pulse {
  animation: ai-pulse 2s infinite;
}

@keyframes ai-pulse {

  0%,
  100% {
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
  }

  50% {
    box-shadow: 0 4px 28px rgba(37, 99, 235, 0.8);
  }
}

.ai-chat-panel {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 420px;
  height: 560px;
  max-height: calc(100vh - 120px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
  display: none;
  flex-direction: column;
  z-index: 9999;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.ai-chat-panel.show {
  display: flex;
}

.ai-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  user-select: none;
  cursor: move;
}

.ai-chat-actions {
  display: flex;
  gap: 6px;
}

.ai-chat-actions button {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.ai-chat-actions button:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* 折叠状态 */
.ai-chat-panel.collapsed .ai-chat-body,
.ai-chat-panel.collapsed .ai-chat-footer {
  display: none;
}

.ai-chat-panel.collapsed {
  height: auto;
  min-height: auto;
}

.ai-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f9fafb;
}

.ai-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.6;
  word-break: break-word;
  animation: ai-fadeIn 0.25s ease;
}

@keyframes ai-fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ai-msg-user {
  align-self: flex-end;
  background: #2563eb;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.ai-msg-bot {
  align-self: flex-start;
  background: #fff;
  color: #1f2937;
  border: 1px solid #e5e7eb;
  border-bottom-left-radius: 4px;
}

.ai-msg-streaming {
  border-left: 3px solid #2563eb;
  animation: ai-blink 1s infinite;
}

@keyframes ai-blink {

  0%,
  100% {
    border-color: #2563eb;
  }

  50% {
    border-color: transparent;
  }
}

/* AI 选择按钮 */
.ai-choice-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ai-choice-question {
  font-size: 13px;
  color: #374151;
  font-weight: 500;
}

.ai-choice-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-choice-btn {
  padding: 8px 16px;
  border: 1px solid #2563eb;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.ai-choice-btn:hover {
  background: #2563eb;
  color: #fff;
}

.ai-choice-btn:active {
  transform: scale(0.96);
}

/* AI 跳转按钮 */
.ai-nav-wrap {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #d1d5db;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ai-nav-hint {
  font-size: 12px;
  color: #6b7280;
}

.ai-nav-btn {
  padding: 6px 14px;
  border: none;
  border-radius: 6px;
  background: #dcfce7;
  color: #166534;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.ai-nav-btn:hover {
  background: #16a34a;
  color: #fff;
}

.ai-chat-footer {
  padding: 10px 12px;
  border-top: 1px solid #e5e7eb;
  background: #fff;
}

.ai-input-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.ai-input {
  flex: 1;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
}

.ai-input:focus {
  border-color: #2563eb;
}

.ai-btn-voice {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #d1d5db;
  background: #f3f4f6;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

.ai-btn-voice:hover {
  background: #e5e7eb;
}

.ai-btn-voice.recording {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
  animation: ai-pulse 1s infinite;
}

.ai-btn-send {
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: opacity 0.15s;
  flex-shrink: 0;
}

.ai-btn-send:hover {
  opacity: 0.9;
}

.ai-btn-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .ai-chat-panel {
    width: calc(100vw - 16px);
    right: 8px;
    bottom: 80px;
    height: 480px;
    max-height: calc(100vh - 100px);
    border-radius: 12px;
  }

  .ai-float-btn {
    bottom: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
  }
}