* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: #f0f2f5;
  color: #333;
  font-size: 14px;
}

/* 登录页 */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0c1445 0%, #1a237e 30%, #0d47a1 60%, #006064 100%);
  position: relative;
  overflow: hidden;
}

/* 科技网格背景 */
.login-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(0, 200, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 200, 255, 0.08) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% { background-position: 0 0; }
  100% { background-position: 50px 50px; }
}

/* 动态光斑 */
.login-container::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 200, 255, 0.15) 0%, transparent 70%);
  top: -200px;
  right: -200px;
  animation: glowFloat 8s ease-in-out infinite;
}

@keyframes glowFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-100px, 100px) scale(1.2); }
}

/* 浮动几何图形 */
.tech-shape {
  position: absolute;
  border: 2px solid rgba(0, 200, 255, 0.3);
  animation: floatShape 15s ease-in-out infinite;
}

.tech-shape.circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  top: 15%;
  left: 10%;
  animation-delay: 0s;
}

.tech-shape.square {
  width: 60px;
  height: 60px;
  top: 60%;
  left: 8%;
  transform: rotate(45deg);
  animation-delay: -3s;
}

.tech-shape.triangle {
  width: 0;
  height: 0;
  border-left: 40px solid transparent;
  border-right: 40px solid transparent;
  border-bottom: 70px solid rgba(0, 200, 255, 0.2);
  border-top: none;
  top: 20%;
  right: 12%;
  animation-delay: -6s;
}

.tech-shape.circle2 {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  bottom: 15%;
  right: 15%;
  border: 1px dashed rgba(0, 255, 200, 0.3);
  animation-delay: -9s;
}

.tech-shape.line {
  width: 200px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 200, 255, 0.5), transparent);
  border: none;
  top: 40%;
  left: 5%;
  animation-delay: -12s;
}

@keyframes floatShape {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.5; }
  25% { transform: translateY(-30px) rotate(90deg); opacity: 0.8; }
  50% { transform: translateY(0) rotate(180deg); opacity: 0.5; }
  75% { transform: translateY(30px) rotate(270deg); opacity: 0.8; }
}

/* 粒子效果 */
.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(0, 200, 255, 0.6);
  border-radius: 50%;
  animation: particleFloat 10s linear infinite;
}

@keyframes particleFloat {
  0% { transform: translateY(100vh) translateX(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-100px) translateX(50px); opacity: 0; }
}

/* ========== 大圆角卡片登录页面样式 ========== */
.login-container {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: linear-gradient(135deg, #e8f0fe 0%, #f0f5ff 50%, #e6f0ff 100%) !important;
  padding: 20px;
  box-sizing: border-box;
}

/* 隐藏旧的浮动几何图形和粒子效果 */
.login-container .tech-shape,
.login-container .particle {
  display: none !important;
}

/* 大圆角卡片 */
.login-card {
  display: flex;
  width: 100%;
  max-width: 960px;
  height: 500px;
  background: white;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 
    0 20px 60px rgba(0, 82, 217, 0.15),
    0 8px 24px rgba(0, 0, 0, 0.08);
}

/* 左侧装饰区域 */
.login-left {
  flex: 1;
  position: relative;
  background: linear-gradient(135deg, #0052D9 0%, #003d99 50%, #002866 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px 0 0 24px;
}

.login-left-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(64, 128, 255, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(0, 200, 255, 0.2) 0%, transparent 50%);
}

.login-left-content {
  position: relative;
  z-index: 10;
  color: white;
  padding: 30px 35px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-left-brand {
  display: inline-block;
  margin-bottom: 22px;
}

.login-left-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.login-left-title {
  font-size: 40px;
  font-weight: bold;
  letter-spacing: 3px;
  color: white;
  line-height: 1;
}

.login-left-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 6px;
  text-align: center;
  width: 100%;
}

.login-left-desc {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.login-left-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.feature-icon {
  font-size: 22px;
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  backdrop-filter: blur(10px);
}

.feature-text {
  flex: 1;
}

.feature-title {
  font-size: 16px;
  font-weight: 600;
  color: white;
  margin-bottom: 4px;
}

.feature-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}

/* 装饰性圆形 */
.deco-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}

.deco-1 {
  width: 250px;
  height: 250px;
  top: -80px;
  right: -80px;
}

.deco-2 {
  width: 180px;
  height: 180px;
  bottom: 40px;
  left: -40px;
}

.deco-3 {
  width: 120px;
  height: 120px;
  top: 40%;
  right: 8%;
  background: rgba(64, 128, 255, 0.1);
}

/* 右侧登录区域 */
.login-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 0 24px 24px 0;
  overflow: hidden;
}

/* 右侧上部：软件名称 */
.login-right-header {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px 30px 15px;
  border-bottom: 1px solid #f0f0f0;
}

.login-right-logo {
  flex-shrink: 0;
}

.login-right-name {
  display: flex;
  flex-direction: column;
}

.login-right-title {
  font-size: 24px;
  font-weight: bold;
  color: #0052D9;
  letter-spacing: 2px;
  line-height: 1.2;
}

.login-right-subtitle {
  font-size: 12px;
  color: #999;
  letter-spacing: 1px;
  margin-top: 3px;
}

/* 登录页面logo区域 */
.login-logo-area {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f0f0f0;
}

.login-logo-area img {
  max-width: 240px;
  height: auto;
  display: block;
  margin: 0 auto;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
}

/* 右侧软件名称 */
.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f0f0f0;
}

.login-brand-logo {
  flex-shrink: 0;
}

.login-brand-text {
  display: flex;
  flex-direction: column;
}

.login-brand-title {
  font-size: 26px;
  font-weight: bold;
  color: #0052D9;
  letter-spacing: 2px;
  line-height: 1.2;
}

.login-brand-subtitle {
  font-size: 12px;
  color: #999;
  letter-spacing: 2px;
  margin-top: 4px;
}

/* 下部：登录框 */
.login-box {
  background: white !important;
  backdrop-filter: none !important;
  padding: 25px 45px 35px !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  width: auto !important;
  position: relative !important;
  z-index: 10 !important;
  border: none !important;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-box::before {
  display: none !important;
}

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

.login-welcome {
  font-size: 22px;
  font-weight: bold;
  color: #333;
}

.login-system-name {
  font-size: 14px;
  color: #999;
  letter-spacing: 1px;
  margin-top: 5px;
}

/* 输入框样式 */
.login-box .form-group {
  margin-bottom: 14px !important;
}

.login-box .form-group label {
  display: none !important;
}

.login-box .form-group input {
  width: 100%;
  padding: 13px 16px !important;
  border: 1px solid #e8e8e8 !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  background: #f8f9fa !important;
  transition: all 0.3s ease !important;
  box-sizing: border-box !important;
}

.login-box .form-group input:focus {
  border-color: #0052D9 !important;
  background: white !important;
  box-shadow: 0 0 0 3px rgba(0, 82, 217, 0.1) !important;
  outline: none !important;
}

.login-box .form-group input::placeholder {
  color: #bbb !important;
}

/* 登录按钮样式 */
.login-btn {
  width: 100%;
  padding: 13px !important;
  background: linear-gradient(135deg, #0052D9 0%, #4080ff 100%) !important;
  border: none !important;
  border-radius: 8px !important;
  color: white !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  margin-top: 8px !important;
  letter-spacing: 2px !important;
}

.login-btn:hover {
  background: linear-gradient(135deg, #003d99 0%, #0052D9 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 20px rgba(0, 82, 217, 0.3) !important;
}

.login-btn:active {
  transform: translateY(0) !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .login-card {
    flex-direction: column;
    height: auto;
    max-height: 90vh;
  }
  
  .login-left {
    flex: none;
    height: 200px;
    border-radius: 24px 24px 0 0;
  }
  
  .login-left-content {
    padding: 30px;
  }
  
  .login-left-desc {
    display: none;
  }
  
  .login-right {
    border-radius: 0 0 24px 24px;
  }
  
  .login-right-header {
    padding: 25px 20px 15px;
  }
}

/* 登录框科技感 */
.login-box {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 
    0 10px 40px rgba(0,0,0,0.3),
    0 0 60px rgba(0, 200, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  width: 400px;
  position: relative;
  z-index: 10;
  border: 1px solid rgba(0, 200, 255, 0.3);
}

/* 登录框顶部装饰线 */
.login-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #00d4ff, #00ff88, #00d4ff);
  border-radius: 12px 12px 0 0;
  animation: lineGlow 3s ease-in-out infinite;
}

@keyframes lineGlow {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; box-shadow: 0 0 20px rgba(0, 200, 255, 0.8); }
}

.login-title {
  text-align: center;
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 30px;
  color: #333;
}

.form-row {
  display: flex;
  gap: 20px;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #667eea;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
  white-space: nowrap;
}

.btn-primary {
  background: #667eea;
  color: #fff;
}

.btn-primary:hover {
  background: #5568d3;
}

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

.btn-success:hover {
  background: #49b018;
}

.btn-warning {
  background: #faad14;
  color: #fff;
}

.btn-warning:hover {
  background: #e09a0e;
}

.btn-danger {
  background: #f5222d;
  color: #fff;
}

.btn-danger:hover {
  background: #d91e28;
}

.btn-default {
  background: #fff;
  color: #333;
  border: 1px solid #ddd;
}

.btn-default:hover {
  background: #f5f5f5;
}

.btn-block {
  display: block;
  width: 100%;
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}

/* 主布局 */
.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 220px;
  background: #ffffff;
  color: #333;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  /* 只允许纵向滚动：overflow-y 非 visible 时 overflow-x 会跟着变成 auto，
     菜单里任何超出 220px 的元素都会在侧边栏底部冒出一条左右滑动条 */
  overflow-x: hidden;
  border-right: 1px solid #e8e8e8;
  box-shadow: 2px 0 8px rgba(0,0,0,0.06);
  /* 侧边栏必须盖过内容区的一切粘性表头（thead z-index:10）与下拉层，
     否则手机放大后横向平移、或内容超宽拖动时，表头会绘制到侧边栏之上 */
  z-index: 1100;
}

.sidebar-logo {
  padding: 20px;
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  border-bottom: 1px solid #f0f0f0;
}

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

.sidebar-menu li {
  padding: 0;
  cursor: pointer;
  transition: background 0.3s;
  border-left: 3px solid transparent;
}

.sidebar-menu li > a {
  padding: 20px 20px;
  display: flex;
  align-items: center;
}

.sidebar-menu li:hover {
  background: #f5f7fa;
}

.sidebar-menu li.active {
  background: #f0f5ff;
  border-left-color: #0052D9;
  color: #0052D9;
  box-shadow: none;
  font-weight: 600;
}

.sidebar-menu li a {
  color: #555;
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: color 0.3s;
  margin: 0;
  box-sizing: border-box;
}

/* 菜单分组 */
.sidebar-menu .menu-group {
  padding: 0;
  border-left: none;
}

.sidebar-menu .menu-group .menu-title {
  padding: 20px 20px;
  display: flex;
  align-items: center;
  margin: 0;
}

.sidebar-menu .menu-group:hover {
  background: transparent;
}

.sidebar-menu .menu-title {
  padding: 20px 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.3s;
}

.sidebar-menu .menu-title:hover {
  background: #f5f7fa;
}

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

.sidebar-menu .menu-group.open .menu-arrow {
  transform: rotate(90deg);
}

.sidebar-menu .submenu {
  list-style: none;
  padding: 0;
  display: none;
  background: #fafafa;
}

.sidebar-menu .menu-group.open .submenu {
  display: block;
}

.sidebar-menu .submenu li {
  padding: 0;
  font-size: 13px;
}

.sidebar-menu .submenu li > a {
  padding: 20px 20px 20px 48px;
  display: flex;
  align-items: center;
}

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

/* 侧边栏头部 */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  border-bottom: 1px solid #f0f0f0;
  height: 70px;
  box-sizing: border-box;
  overflow: visible;
}

.sidebar-header .sidebar-logo {
  padding: 0 5px;
  font-size: 16px;
  border-bottom: none;
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: visible;
  display: flex;
  align-items: center;
  height: 100%;
  max-width: 100%;
  /* 允许收缩，否则 logo 图 + 折叠按钮总宽超出 220px，把折叠按钮挤出侧边栏 */
  min-width: 0;
  user-select: none;
  -webkit-user-select: none;
}

.sidebar-header .sidebar-logo img {
  width: 160px;
  max-width: 100%;
  height: 60px;
  object-fit: contain;
  object-position: left center;
  display: block;
  flex-shrink: 1;
}

.sidebar-toggle {
  background: transparent;
  border: none;
  color: #999;
  cursor: pointer;
  padding: 8px 10px;
  font-size: 12px;
  border-radius: 4px;
  transition: all 0.3s;
  flex-shrink: 0;
}

.sidebar-toggle:hover {
  background: #f0f0f0;
  color: #666;
}

/* 菜单图标和文字 */
.menu-icon {
  margin-right: 10px;
  font-size: 16px;
  flex-shrink: 0;
  transition: transform 0.3s;
  line-height: 1;
}

.sidebar-menu li:hover .menu-icon {
  transform: scale(1.1);
}

.menu-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  font-size: 14px;
  line-height: 1;
}



.sidebar-menu .menu-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-menu .menu-title .menu-text {
  flex: 1;
}

.sidebar-menu .menu-arrow {
  flex-shrink: 0;
  margin-left: 5px;
}

/* 折叠状态 */
.sidebar.collapsed {
  width: 60px;
}

.sidebar.collapsed .sidebar-header {
  padding: 0;
  justify-content: center;
}

.sidebar.collapsed .sidebar-logo {
  display: none;
}

.sidebar.collapsed .sidebar-toggle {
  padding: 15px 0;
  width: 100%;
  text-align: center;
}

.sidebar.collapsed .menu-text,
.sidebar.collapsed .menu-arrow {
  display: none;
}

.sidebar.collapsed .menu-icon {
  margin-right: 0;
  text-align: center;
  width: 100%;
  justify-content: center;
  display: flex;
  align-items: center;
}

.sidebar.collapsed .sidebar-menu li {
  padding: 12px 0;
  text-align: center;
}

.sidebar.collapsed .sidebar-menu li a {
  justify-content: center;
  align-items: center;
  padding: 0;
}

.sidebar.collapsed .sidebar-menu .menu-title {
  justify-content: center;
  align-items: center;
  padding: 20px 20px;
}

.sidebar.collapsed .sidebar-menu .menu-title .menu-icon {
  margin-right: 0;
  justify-content: center;
}

.sidebar.collapsed .sidebar-menu .menu-title .menu-arrow {
  display: none;
}

.sidebar.collapsed .sidebar-menu .submenu {
  display: none !important;
}

.sidebar.collapsed .sidebar-menu .submenu li {
  padding: 0;
  text-align: center;
}

.sidebar.collapsed .sidebar-menu .submenu li > a {
  padding: 20px 0;
  justify-content: center;
}

.sidebar.collapsed .sidebar-menu .submenu li .menu-icon {
  justify-content: center;
  margin-right: 0;
}

/* 主内容区根据侧边栏状态调整 */
.main {
  flex: 1;
  /* 允许收缩：宽表格改由 .table-container 内部横向滚动，
     而不是把整页撑宽（否则页面出现横向滚动条，与数据看板/客户管理表现不一致） */
  min-width: 0;
  margin-left: 220px;
  padding: 14px;
  transition: margin-left 0.3s;
}

body.sidebar-collapsed .main {
  margin-left: 60px;
}

.header {
  background: #fff;
  padding: 0 20px;
  border-radius: 8px;
  margin: -14px 0 14px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  height: 70px;
  box-sizing: border-box;
}

.header-title {
  font-size: 18px;
  font-weight: bold;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-user span {
  color: #666;
}

/* 卡片 */
.card {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.card-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

/* 统计卡片 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.stats-grid.overall-stats {
  grid-template-columns: 1fr 1fr 2fr;
}

.stat-card.filter-card {
  border-left-color: #667eea;
  padding: 15px 20px;
}

.stat-card.filter-card .filter-content {
  display: flex;
  flex-direction: row;
  gap: 10px;
  margin-top: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.stat-card.filter-card .filter-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.stat-card.filter-card .filter-row select,
.stat-card.filter-card .filter-row input {
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 12px;
  min-width: 120px;
}

.stat-card.filter-card .filter-buttons {
  margin-left: auto;
}

.stat-card.filter-card .filter-buttons .btn {
  padding: 5px 12px;
  font-size: 12px;
}

.stat-card {
  background: #fff;
  border-radius: 8px;
  padding: 15px 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border-left: 4px solid #667eea;
}

.stat-card.receivable {
  border-left-color: #52c41a;
}

.stat-card.payable {
  border-left-color: #faad14;
}

.stat-card.warning {
  border-left-color: #f5222d;
}

.stat-label {
  color: #999;
  font-size: 13px;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 24px;
  font-weight: bold;
  color: #333;
}

/* 表格 */
.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th, td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

th {
  background: #fafafa;
  font-weight: 600;
  color: #555;
  white-space: nowrap;
}

tr:hover {
  background: #f9f9f9;
}

/* 标签 */
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.tag-receivable {
  background: #e6f0ff;
  color: #0052D9;
}

.tag-payable {
  background: #fff7e6;
  color: #fa8c16;
}

.tag-pending {
  background: #fffbe6;
  color: #faad14;
}

.tag-active {
  background: #e6f0ff;
  color: #0052D9;
}

.tag-completed {
  background: #f6ffed;
  color: #52c41a;
}

.tag-terminated {
  background: #fff1f0;
  color: #f5222d;
}

.tag-paid {
  background: #f6ffed;
  color: #52c41a;
}

.tag-overdue {
  background: #fff1f0;
  color: #f5222d;
}

.tag-warn {
  background: #fff7e6;
  color: #fa8c16;
}

/* 统一列表行高：所有表格列表行固定 40px（单元格垂直内边距归零，内容在 40px 行内垂直居中，不再被撑高） */
.table-container table tr { height: 40px; }
.table-container table td,
.table-container table th {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  vertical-align: middle;
}

/* 筛选栏 */
.filter-bar {
  background: #fff;
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: flex-end;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

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

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

.filter-item input,
.filter-item select {
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
  min-width: 150px;
}

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.pagination button {
  padding: 6px 12px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination button.active {
  background: #667eea;
  color: #fff;
  border-color: #667eea;
}

.pagination span {
  color: #666;
}

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

.modal {
  background: #fff;
  border-radius: 8px;
  width: 1100px;
  max-width: 95vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-large {
  width: 1100px;
  max-width: 95vw;
}

.modal-header {
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  background: #fff;
  z-index: 1;
}

.modal-title {
  font-size: 16px;
  font-weight: bold;
}

.modal-close {
  cursor: pointer;
  font-size: 20px;
  color: #999;
}

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

.modal-footer {
  padding: 15px 20px;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
  background: #fff;
  z-index: 1;
}

/* 详情页 */
.detail-section {
  margin-bottom: 20px;
}

/* 详情选项卡 */
.detail-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #e8e8e8;
  margin-bottom: 20px;
}

.tab-btn {
  padding: 10px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: #666;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.tab-btn:hover {
  color: #0052D9;
}

.tab-btn.active {
  color: #0052D9;
  border-bottom-color: #0052D9;
  font-weight: 500;
}

.tab-content {
  animation: fadeIn 0.3s;
}

.detail-tab-content {
  display: none;
}

.detail-tab-content.active {
  display: block;
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.detail-item label {
  color: #999;
  font-size: 12px;
}

.detail-item span {
  color: #333;
  font-size: 14px;
  word-break: break-all;
}

.detail-label {
  color: #999;
  min-width: 100px;
}

.detail-value {
  color: #333;
  flex: 1;
}

/* 操作按钮组 */
.action-btns {
  display: flex;
  gap: 8px;
}

/* 金额显示 */
.amount {
  font-weight: bold;
}

.amount.receivable {
  color: #52c41a;
}

.amount.payable {
  color: #fa8c16;
}

/* 空状态 */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

/* 提示消息 */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  border-radius: 6px;
  color: #fff;
  z-index: 2000;
  animation: slideDown 0.3s;
}

.toast.success {
  background: #52c41a;
}

.toast.error {
  background: #f5222d;
}

.toast.info {
  background: #0052D9;
}

@keyframes slideDown {
  from {
    transform: translateX(-50%) translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

/* 上传区域 */
.upload-area {
  border: 2px dashed #ddd;
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.3s;
}

.upload-area:hover {
  border-color: #667eea;
}

.upload-area p {
  color: #999;
  margin-top: 10px;
}

/* 附件列表 */
.attachment-list {
  margin-top: 10px;
}

.attachment-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #f9f9f9;
  border-radius: 4px;
  margin-bottom: 8px;
}

.attachment-item a {
  color: #0052D9;
  text-decoration: none;
}

.attachment-item a:hover {
  text-decoration: underline;
}

/* ==================== 列显示/隐藏 ==================== */
.col-settings-th {
  width: 45px;
  text-align: center;
  position: sticky;
  right: 0;
  background: #fafafa;
  z-index: 10;
}

.col-settings-icon {
  cursor: pointer;
  font-size: 16px;
  opacity: 0.5;
  transition: opacity 0.3s, transform 0.3s;
  display: inline-block;
}

.col-settings-icon:hover {
  opacity: 1;
  transform: rotate(45deg);
}

.column-panel {
  position: absolute;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  z-index: 2000;
  min-width: 180px;
  max-height: 400px;
  overflow-y: auto;
}

.column-panel-header {
  padding: 12px 16px;
  font-weight: 600;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
  color: #262626;
  background: #fafafa;
  border-radius: 8px 8px 0 0;
}

.column-panel-body {
  padding: 8px 0;
}

.column-panel-item {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 13px;
  color: #595959;
}

.column-panel-item:hover {
  background: #f5f5f5;
}

.column-panel-item input[type="checkbox"] {
  margin-right: 10px;
  cursor: pointer;
  width: 16px;
  height: 16px;
  accent-color: #0052D9;
}

/* 拖拽排序相关样式 */
.column-panel-item-drag {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  cursor: move;
  transition: background 0.2s;
  font-size: 13px;
  color: #595959;
  border-bottom: 1px solid #f5f5f5;
  user-select: none;
}

.column-panel-item-drag:hover {
  background: #f5f5f5;
}

.column-panel-item-drag.drag-over {
  background: #e6f0ff;
  border-top: 2px solid #0052D9;
}

.column-panel-item-drag input[type="checkbox"] {
  margin-right: 8px;
  cursor: pointer;
  width: 16px;
  height: 16px;
  accent-color: #0052D9;
}

.drag-handle {
  cursor: move;
  color: #bfbfbf;
  margin-right: 6px;
  font-size: 12px;
  letter-spacing: -2px;
}

.drag-handle:hover {
  color: #0052D9;
}

.column-panel-footer {
  padding: 10px 16px;
  border-top: 1px solid #f0f0f0;
  text-align: center;
  background: #fafafa;
  border-radius: 0 0 8px 8px;
}

.column-panel-footer .btn {
  padding: 4px 12px;
  font-size: 12px;
}


/* ===== 弹窗内表格：滚动时表头锁定（吸顶） ===== */
.modal table { border-collapse: separate; border-spacing: 0; }
.modal th {
  position: sticky;
  top: 0;
  z-index: 6;
  background: #fafafa !important;
  box-shadow: inset 0 -1px 0 #e8e8e8;
  white-space: nowrap;
}
/* 无内联固定高度的弹窗表格容器：不单独形成滚动条，交由 modal-body 统一滚动，使表头相对 modal-body 吸顶。
   带内联 max-height + overflow-y:auto 的容器（如详情关联合同表）内联优先级更高，仍保持内部滚动。*/
.modal .table-container {
  overflow-x: visible;
  overflow-y: visible;
}
.modal [id$="PickerList"],
.modal [id$="SelectList"],
.modal [id$="List"][style*="overflow"] {
  -webkit-overflow-scrolling: touch;
}

/* ============================================================
   移动端 / 小屏响应式适配（手机、小平板）
   侧边栏改为抽屉式，内容区全宽；多列栅格改单列；弹窗/筛选/表格自适应
   ============================================================ */
.mobile-menu-btn { display: none; }
.sidebar-mask { display: none; }

@media (max-width: 768px) {
  /* 顶部汉堡按钮 */
  .mobile-menu-btn {
    display: flex;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1200;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    background: #0052D9;
    color: #fff;
    font-size: 20px;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  }

  /* 遮罩 */
  .sidebar-mask {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1050;
  }
  body:not(.mobile-sidebar-open) .sidebar-mask { display: none; }
  body.mobile-sidebar-open .sidebar-mask { display: block; }

  /* 侧边栏：抽屉，默认移出屏幕 */
  .sidebar {
    width: 240px !important;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 1100;
    box-shadow: 2px 0 14px rgba(0,0,0,0.25);
  }
  body.mobile-sidebar-open .sidebar { transform: translateX(0); }
  /* 手机端不使用 PC 的折叠态，抽屉始终完整显示文字 */
  .sidebar.collapsed { width: 240px !important; }
  .sidebar.collapsed .menu-text,
  .sidebar.collapsed .menu-arrow { display: inline; }
  .sidebar.collapsed .menu-icon { margin-right: 10px; font-size: 16px; }
  .sidebar.collapsed .submenu { display: block; max-height: none; overflow: visible; }
  .sidebar-toggle { display: none !important; }

  /* 内容区全宽 */
  .main,
  body.sidebar-collapsed .main {
    margin-left: 0 !important;
    padding: 14px;
    padding-top: 60px;
    width: 100%;
    box-sizing: border-box;
  }

  /* 顶栏：避让汉堡按钮，取消固定高度、纵向自适应，避免内容重叠 */
  .header {
    height: auto !important;
    min-height: 96px;
    margin: 0 0 14px;
    padding: 10px 12px 10px 58px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .header-title { font-size: 16px; width: 100%; line-height: 1.4; }
  .header-user { flex-wrap: wrap; gap: 8px; font-size: 12px; width: 100%; align-items: center; }
  .header-user span { white-space: nowrap; }
  .header-user .btn { padding: 4px 10px; font-size: 12px; }
  .header > div { flex-wrap: wrap; }

  /* 多列详情/表单栅格改单列 */
  .detail-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr !important; }
  .form-row { flex-direction: column; gap: 0; }

  /* 统计卡片：总体统计三列改两列 */
  .stats-grid.overall-stats { grid-template-columns: 1fr 1fr; }
  /* 筛选卡横跨整行，避免输入框被挤到半栏 */
  .stats-grid.overall-stats .stat-card.filter-card { grid-column: 1 / -1; }
  .stats-grid { gap: 12px; margin-bottom: 12px; }
  .stat-value { font-size: 19px; }
  .stat-card { padding: 12px 14px; }

  /* 看板/图表横向排列改纵向 */
  .chart-row, .dashboard-row, .cards-row, .panel-row {
    flex-direction: column;
  }
  .chart-card, .panel-card { width: 100%; margin-bottom: 14px; }

  /* 筛选栏：每项占整行，输入框全宽 */
  .filter-bar { gap: 10px; padding: 12px; }
  .filter-item { width: 100%; }
  .filter-item input, .filter-item select { width: 100%; min-width: 0; box-sizing: border-box; }
  .stat-card.filter-card .filter-row { flex-wrap: wrap; width: 100%; }
  .stat-card.filter-card .filter-row select,
  .stat-card.filter-card .filter-row input { min-width: 0; flex: 1 1 45%; }
  .stat-card.filter-card .filter-buttons { margin-left: 0; width: 100%; display: flex; gap: 8px; }
  .stat-card.filter-card .filter-buttons .btn { flex: 1; }

  /* 弹窗几乎占满屏宽 */
  .modal, .modal-large { width: 96vw !important; max-width: 96vw; max-height: 92vh; }
  .modal-body { padding: 14px; }
  .modal-header, .modal-footer { padding: 12px 14px; }

  /* 表格：移动端强制容器可横向滚动，覆盖页面内联的 overflow:hidden，
     实现全列横滚显示（桌面端不受影响） */
  .table-container {
    -webkit-overflow-scrolling: touch;
    overflow-x: auto !important;
    overflow-y: auto !important;
  }
  th, td { padding: 6px 8px; font-size: 12px; white-space: nowrap; }

  /* 操作按钮组、分页、汇总栏换行 */
  .action-btns { flex-wrap: wrap; }
  .pagination { flex-wrap: wrap; gap: 6px; }
  .summary-bar { flex-wrap: wrap; gap: 8px; }

  /* 汇总+分页卡片：手机端汇总占一行、分页占一行 */
  .sum-pager-card {
    flex-wrap: wrap !important;
    row-gap: 10px;
  }
  .sum-pager-card > *:first-child {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    flex-wrap: wrap;
    row-gap: 6px;
    justify-content: flex-start;
  }
  .sum-pager-card > *:last-child {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    justify-content: center;
  }

  /* 通用按钮在窄栏不被挤压 */
  .btn { white-space: nowrap; }

  /* 卡片间距收紧 */
  .card { margin-bottom: 14px; }

  /* ===== 业务页通用收敛：覆盖页面内联样式，使列表/详情/表单在手机端可用 ===== */

  /* 工具栏允许换行，搜索框占满整行（合同/回款/付款/发票/客户/供应商/产品页共用模式） */
  .card-title > div { flex-wrap: wrap; }
  .card-title > div input[type="text"] { width: 100% !important; min-width: 0; }

  /* 内联多列统计栅格 repeat(3/4/5,1fr) 收敛为两列 */
  [style*="grid-template-columns:repeat(3"], [style*="grid-template-columns: repeat(3"],
  [style*="grid-template-columns:repeat(4"], [style*="grid-template-columns: repeat(4"],
  [style*="grid-template-columns:repeat(5"], [style*="grid-template-columns: repeat(5"] {
    grid-template-columns: 1fr 1fr !important;
  }

  /* 内联双列栅格（1fr 1fr 的表单/详情区）收敛为单列 */
  [style*="grid-template-columns:1fr 1fr"], [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

/* ============================================================
   基础档案列表页统一布局
   （车辆档案 / 往来单位 / 配件档案 / 厂牌车型 / 维修项目 / 员工管理）
   版式对齐：标题居左；筛选控件+操作按钮一行靠右、自动换行；表头吸顶
   ============================================================ */
.card-title.archive-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.card-title.archive-title > div {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.card-title.archive-title select,
.card-title.archive-title input[type="text"] {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
}
.card-title.archive-title input[type="text"] { width: 180px; }
.card-title.archive-title .switch-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #555;
  white-space: nowrap;
}
/* 列表表头吸顶（配合 .table-container 的 max-height 滚动） */
.table-container.sticky-head thead {
  position: sticky;
  top: 0;
  z-index: 5;
}
@media (max-width: 768px) {
  .card-title.archive-title input[type="text"] { width: 100% !important; min-width: 0; }
}

/* ============================================================
   登录页移动端适配：隐藏左侧装饰区，登录卡片单列自适应
   ============================================================ */
@media (max-width: 768px) {
  .login-container { padding: 12px; }
  .login-card {
    width: 100%;
    max-width: 420px;
    height: auto;
    max-height: 92vh;
    flex-direction: column;
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(0, 82, 217, 0.12);
  }
  /* 左侧装饰区保留为卡片顶部渐变横条（隐藏下方文字描述），参考合账云 */
  .login-left { flex: none; height: 200px; border-radius: 18px 18px 0 0; }
  .login-left-content { padding: 24px; }
  .login-left-desc { display: none; }
  .login-right { width: 100%; border-radius: 0 0 18px 18px; }
  .login-box { width: 100% !important; max-width: 100% !important; box-sizing: border-box; }
  .login-logo-area img { max-width: 180px; }
}

/* ============================================================
   基础档案：内容区撑满整个右侧（桌面端）
   页面加 <body class="fullpage"> 生效——整页不滚动，
   末张卡片吃掉剩余高度并贴到窗口底部，滚动交给卡片内的表格容器。
   移动端不启用（保持整页自然滚动，见下方 @media 覆盖）。
   ============================================================ */
@media (min-width: 769px) {
  body.fullpage .layout {
    height: 100vh;
    overflow: hidden;
  }
  body.fullpage .main {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding-bottom: 0;   /* 卡片下沿紧贴窗口底部，不留 20px 空隙 */
    overflow: hidden;
  }
  body.fullpage .main > .header {
    flex: 0 0 auto;
  }
  /* 非末张卡片（厂牌车型的上段厂牌）按自身内容高度，空间紧张时可让内部表格让位 */
  body.fullpage .main > .card {
    display: flex;
    flex-direction: column;
    flex: 0 1 auto;
    min-height: 0;
  }
  /* 非末张卡片占高上限 50%：厂牌车型的上段厂牌条数少，
     矮窗口下把高度让给下段车型列表，避免下段被压得只剩几行 */
  body.fullpage .main > .card:not(:last-child) {
    max-height: 50%;
  }
  /* 末张卡片吃掉全部剩余高度，margin-bottom 归零 → 下沿紧贴窗口底部 */
  body.fullpage .main > .card:last-child {
    flex: 1 1 0;
    margin-bottom: 0;
  }
  /* 卡片内除表格外的元素（标题行/分页/汇总条）保持自身高度，不参与压缩 */
  body.fullpage .main > .card > :not(.table-container) {
    flex: 0 0 auto;
  }
  body.fullpage .main > .card > .table-container {
    min-height: 0;
  }
  /* 末张卡片的表格撑满卡片剩余空间；覆盖页面内联的 max-height（如 600px） */
  body.fullpage .main > .card:last-child > .table-container {
    flex: 1 1 auto;
    max-height: none !important;
    overflow: auto;
  }
}

/* ============================================================
   厂牌车型：上下两段等高，每段固定显示 6 行
   行高实测：表头 44px + 数据行 53px → 6 行 = 362px
   记录不足 6 条时表格区域仍占同高、下方留空；超过 6 条则表格内滚动。
   本段写在通用 fullpage 规则之后，用于覆盖其撑满/限高规则。
   ============================================================ */
@media (min-width: 769px) {
  /* 空间不足时整页可滚动，保证 6 条记录不被截断 */
  body.fullpage.page-brands .main {
    overflow-y: auto;
    overflow-x: hidden;
  }
  /* 两段同基准：视口够高时共同铺满贴底；不够高时保持内容高度，交由外层滚动 */
  body.fullpage.page-brands .main > .card {
    flex: 1 1 auto;
    min-height: auto;      /* 不参与压缩：6 行表格不被裁切、不溢出卡片 */
    max-height: none;      /* 取消通用规则里的 50% 占高上限 */
    padding-bottom: 16px;  /* 底部内边距略收，给两段 6 行多留一点空间 */
  }
  body.fullpage.page-brands .main > .card:last-child {
    flex: 1 1 auto;        /* 覆盖通用规则的 flex:1 1 0，保持两段同基准 → 上下等高 */
    margin-bottom: 0;
  }
  /* 表格固定 6 行高；实际高度由脚本按「表头 + 6×行高」算出写入 --brand-table-h，
     未执行脚本时用 362px 兜底（表头 44 + 6×53） */
  body.fullpage.page-brands .main > .card > .table-container {
    flex: 0 0 auto;
    height: var(--brand-table-h, 362px);
    max-height: var(--brand-table-h, 362px) !important;
    overflow: auto;
  }
  /* 一屏放不下两段各 6 行时，脚本收紧行距（--brand-row-pad：12px → 最小 8px） */
  body.fullpage.page-brands .main > .card > .table-container th,
  body.fullpage.page-brands .main > .card > .table-container td {
    padding: var(--brand-row-pad, 12px) 12px;
  }
  /* 标题与表格间距略收，给「两段各 6 行」再挤出一点高度 */
  body.fullpage.page-brands .main > .card > .card-title {
    margin-bottom: 10px;
  }
}

/* ===== 检索行控件高度统一 ===== */
.filter-bar input, .filter-bar select, .filter-bar .btn-sm { height:26px !important; box-sizing:border-box; display:inline-flex; align-items:center; justify-content:center; padding:2px 8px !important; }
/* 底部汇总+页码小卡片（与检索行同高 56px）：按钮压至 26px */
.sum-pager-card .btn-sm { height:26px !important; box-sizing:border-box; display:inline-flex; align-items:center; justify-content:center; padding:2px 8px !important; font-size:14px; }
.wb-toolbar input, .wb-toolbar select, .wb-toolbar .btn-sm { height:34px !important; box-sizing:border-box; display:inline-flex; align-items:center; justify-content:center; }
/* 内嵌模式（数据中心 iframe 调用）：隐藏侧栏/顶栏/选项卡条，内容区贴边 */
html.embed .sidebar { display: none; }
html.embed .header { display: none; }
html.embed .main { margin-left: 0; padding: 0; }
html.embed .layout { min-height: auto; }
html.embed .tabs { display: none; }

/* ===== 通用单据打印（PrintBill 控件） ===== */
.pb-wrap { display:none; }
@media print {
  body * { visibility:hidden !important; }
  #printAreaPB, #printAreaPB * { visibility:visible !important; }
  #printAreaPB { display:block !important; position:absolute; left:0; top:0; width:100%; padding:28px 32px; box-sizing:border-box; font-family:'Microsoft YaHei', 'SimSun', sans-serif; color:#000; }
  #printAreaPB .pb-company { text-align:center; font-size:20px; font-weight:700; letter-spacing:2px; }
  #printAreaPB .pb-title { text-align:center; font-size:18px; font-weight:700; margin:6px 0 2px; }
  #printAreaPB .pb-sub { text-align:center; font-size:12px; color:#555; margin-bottom:10px; }
  #printAreaPB .pb-head { display:grid; grid-template-columns:1fr 1fr; gap:4px 24px; margin:12px 0; font-size:13px; }
  #printAreaPB .pb-hi { display:flex; }
  #printAreaPB .pb-hl { flex:0 0 74px; color:#555; }
  #printAreaPB .pb-hv { font-weight:600; }
  #printAreaPB .pb-sec-title { font-weight:700; margin:14px 0 6px; font-size:14px; }
  #printAreaPB .pb-table { width:100%; border-collapse:collapse; font-size:12.5px; }
  #printAreaPB .pb-table th, #printAreaPB .pb-table td { border:1px solid #333; padding:5px 8px; text-align:left; }
  #printAreaPB .pb-table th { background:#f2f2f2; font-weight:700; }
  #printAreaPB .pb-table td { color:#000; }
  #printAreaPB .pb-sum { margin:12px 0; font-size:13.5px; line-height:1.9; display:flex; flex-wrap:wrap; gap:6px 22px; }
  #printAreaPB .pb-sum-item b { font-weight:700; }
  #printAreaPB .pb-sum-item { background:#f8f8f8; border:1px solid #ddd; border-radius:4px; padding:3px 10px; }
  #printAreaPB .pb-sign { display:flex; justify-content:space-between; margin-top:34px; font-size:13px; }
  #printAreaPB .pb-printtime { margin-top:18px; font-size:12px; color:#555; text-align:right; }
  #printAreaPB .pb-footer { margin-top:8px; text-align:center; font-size:12px; color:#666; }
}

/* ===== 打印预览（设置页内嵌弹窗） ===== */
.pb-preview { background:#e9edf2; padding:18px; flex:1; min-height:0; overflow:auto; }
.pb-preview .pb-wrap { display:block !important; width:794px; min-height:1123px; margin:0 auto; background:#fff; padding:48px 56px; box-sizing:border-box; font-family:'Microsoft YaHei','SimSun',sans-serif; color:#000; box-shadow:0 4px 18px rgba(0,0,0,.18); }
.pb-preview .s4-wrap { display:block !important; width:794px; margin:0 auto; background:#fff; box-shadow:0 4px 18px rgba(0,0,0,.18); }
.pb-preview .pb-company { text-align:center; font-size:20px; font-weight:700; letter-spacing:2px; }
.pb-preview .pb-title { text-align:center; font-size:18px; font-weight:700; margin:6px 0 2px; }
.pb-preview .pb-sub { text-align:center; font-size:12px; color:#555; margin-bottom:10px; }
.pb-preview .pb-head { display:grid; grid-template-columns:1fr 1fr; gap:4px 24px; margin:12px 0; font-size:13px; }
.pb-preview .pb-hi { display:flex; }
.pb-preview .pb-hl { flex:0 0 74px; color:#555; }
.pb-preview .pb-hv { font-weight:600; }
.pb-preview .pb-sec-title { font-weight:700; margin:14px 0 6px; font-size:14px; }
.pb-preview .pb-table { width:100%; border-collapse:collapse; font-size:12.5px; }
.pb-preview .pb-table th, .pb-preview .pb-table td { border:1px solid #333; padding:5px 8px; text-align:left; }
.pb-preview .pb-table th { background:#f2f2f2; font-weight:700; }
.pb-preview .pb-table td { color:#000; }
.pb-preview .pb-sum { margin:12px 0; font-size:13.5px; line-height:1.9; display:flex; flex-wrap:wrap; gap:6px 22px; }
.pb-preview .pb-sum-item b { font-weight:700; }
.pb-preview .pb-sum-item { background:#f8f8f8; border:1px solid #ddd; border-radius:4px; padding:3px 10px; }
.pb-preview .pb-sign { display:flex; justify-content:space-between; margin-top:34px; font-size:13px; }
.pb-preview .pb-printtime { margin-top:18px; font-size:12px; color:#555; text-align:right; }
.pb-preview .pb-footer { margin-top:8px; text-align:center; font-size:12px; color:#666; }

/* 车牌检索建议高亮（上下箭头选中） */
.plate-sug .sg-active { background:#e6f0ff; }
.plate-sug .sg-active .sg-plate { color:#0052D9; font-weight:700; }

/* 下拉框键盘增强浮层 */
.sel-pop { position:absolute; z-index:9999; display:none; background:#fff; border:1px solid #d9d9d9; border-radius:6px; box-shadow:0 4px 14px rgba(0,0,0,.14); max-height:220px; overflow:auto; min-width:150px; margin-top:2px; }
.sel-opt { padding:7px 14px; font-size:13px; color:#333; cursor:pointer; white-space:nowrap; }
.sel-opt-hi, .sel-opt:hover { background:#e6f0ff; color:#0052D9; font-weight:600; }
