/**
 * ============================================================
 * 文件名称：login.css
 * 文件说明：亿嘉智印进销存系统 - 登录页面和全局样式
 * 主要功能：
 *   1. 定义全局CSS变量（颜色、尺寸等）
 *   2. 登录页面样式（左右分栏布局）
 *   3. 登录表单样式（输入框、按钮等）
 *   4. 注册对话框样式
 *   5. 主应用界面布局样式
 * ============================================================
 */

/* ============================================================
   全局变量区域
   使用CSS变量定义系统的统一颜色和尺寸，便于后期维护和主题切换
   ============================================================ */
:root {
  /* 主色调：蓝色系 */
  --primary: #1677ff;         /* 主色：蓝色 */
  --primary-light: #e8f4ff;   /* 浅蓝：用于hover背景等 */
  --primary-dark: #0958d9;    /* 深蓝：用于按钮hover等 */
  
  /* 侧边栏样式 */
  --sidebar-bg: #1e3a8a;     /* 侧边栏背景色：深蓝色 */
  --sidebar-w: 72px;          /* 侧边栏宽度 */
  
  /* 顶部栏样式 */
  --topbar-h: 52px;           /* 顶部栏高度 */
  
  /* 状态颜色 */
  --success: #52c41a;         /* 绿色：表示成功 */
  --warning: #faad14;         /* 黄色：表示警告 */
  --danger: #ff4d4f;          /* 红色：表示错误/危险 */
  
  /* 文本颜色 */
  --text: #333;               /* 主要文本颜色：深灰色 */
  --text-secondary: #888;     /* 次要文本颜色：浅灰色 */
  
  /* 边框和背景 */
  --border: #e8e8e8;          /* 边框颜色 */
  --bg: #f5f7fb;              /* 页面背景色 */
  --white: #fff;              /* 白色 */
  
  /* 阴影和圆角 */
  --shadow: 0 2px 12px rgba(0,0,0,.08);  /* 卡片阴影效果 */
  --radius: 10px;             /* 圆角大小 */
}

/* ============================================================
   全局基础样式重置
   统一各浏览器的默认样式
   ============================================================ */
* { 
  margin: 0;                  /* 清除默认外边距 */
  padding: 0;                 /* 清除默认内边距 */
  box-sizing: border-box;     /* 使用IE盒模型，width包含border和padding */
}

/* body样式：设置字体和背景色 */
body { 
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;  /* 系统默认字体 */
  background: var(--bg);      /* 页面背景色 */
  color: var(--text);         /* 文本颜色 */
}

/* 链接样式：移除下划线，鼠标变为手型 */
a { 
  text-decoration: none; 
  cursor: pointer; 
}

/* 表单元素样式：统一字体 */
input, button, select, textarea { 
  outline: none;              /* 移除focus时的默认轮廓线 */
  font-family: inherit; 
}

/* 隐藏类：用于JS控制元素的显示/隐藏 */
.hidden { 
  display: none !important;   /* 强制隐藏，优先级最高 */
}

/* ============================================================
   移动端适配样式
   桌面端默认隐藏移动端特有的元素
   ============================================================ */
.mobile-tabbar { display: none !important; }      /* 隐藏移动端底部导航栏 */
.mobile-module-grid { display: none !important; } /* 隐藏移动端模块网格 */
.mobile-back-btn { display: none !important; }    /* 隐藏移动端返回按钮 */

/* 仅在移动端模式下显示这些元素 */
html.mobile .mobile-tabbar { display: flex !important; }
html.mobile .mobile-module-grid { display: flex !important; }

/* ============================================================
   登录页面样式
   采用左右分栏布局：左侧品牌展示，右侧登录表单
   ============================================================ */
.login-page { 
  min-height: 100vh;          /* 最小高度100%视口高度 */
  display: flex;              /* flex布局 */
  flex-direction: column;     /* 垂直排列子元素 */
}

/* 登录背景容器：包含左侧和右侧 */
.login-bg {
  flex: 1;                    /* 占据剩余的所有空间 */
  display: flex;              /* flex布局 */
  /* 渐变背景：从浅蓝到浅绿 */
  background: linear-gradient(135deg, #dbeafe 0%, #e0f2fe 40%, #f0fdf4 100%);
}

/* ============================================================
   左侧品牌展示区样式
   ============================================================ */
.login-left {
  flex: 1;                    /* 占据左侧1份空间（右侧固定440px） */
  padding: 60px 80px;         /* 内边距：上下60px，左右80px */
  display: flex;              /* flex布局 */
  flex-direction: column;      /* 垂直排列 */
  justify-content: center;     /* 垂直居中 */
}

/* 品牌标识区：Logo + 公司名 */
.brand { 
  display: flex;             /* flex布局 */
  align-items: center;        /* 垂直居中 */
  gap: 10px;                  /* 元素间距10px */
  margin-bottom: 40px;        /* 下方间距40px */
}
.brand-icon { 
  width: 40px; height: 40px; /* Logo尺寸 */
  border-radius: 8px;         /* 圆角8px */
  object-fit: cover;          /* 图片填充方式：保持比例裁剪 */
}
.brand-name { 
  font-size: 22px;           /* 字体大小22px */
  font-weight: 700;           /* 字体加粗 */
  /* 渐变文字效果：深蓝到浅蓝 */
  background: linear-gradient(135deg, #2d3d95, #227cc8); 
  -webkit-background-clip: text;  /* 渐变应用到文字背景 */
  -webkit-text-fill-color: transparent;  /* 文字颜色设为透明，显示渐变 */
  background-clip: text;      /* 标准浏览器支持 */
}
.brand-slogan { font-size: 14px; color: #666; }  /* 副标题样式 */

/* 主标题样式 */
.hero-title { 
  font-size: 36px;           /* 字体大小36px */
  font-weight: 700;           /* 字体加粗 */
  color: #1a1a2e;            /* 深色文字 */
  line-height: 1.4;           /* 行高1.4倍 */
  margin-bottom: 12px;         /* 下方间距12px */
}

/* 副标题样式 */
.hero-sub { 
  font-size: 15px; 
  color: #666; 
  margin-bottom: 24px; 
}

/* 功能特点标签区 */
.feature-tags { 
  display: flex;             /* flex布局 */
  flex-direction: column;     /* 垂直排列 */
  gap: 10px;                  /* 标签间距10px */
  margin-bottom: 32px;        /* 下方间距32px */
}
.tag {
  display: inline-flex;      /* 行内flex布局 */
  align-items: center;        /* 垂直居中 */
  gap: 6px;                  /* 图标和文字间距6px */
  background: rgba(22,119,255,0.1);  /* 半透明蓝色背景 */
  color: var(--primary);     /* 蓝色文字 */
  padding: 6px 14px;         /* 内边距 */
  border-radius: 20px;        /* 圆形边缘（药丸形状） */
  font-size: 13px; 
  width: fit-content;         /* 宽度自适应内容 */
}

/* 底部宣传语 */
.hero-footer { 
  font-size: 14px; 
  color: #888; 
}

/* ============================================================
   右侧登录表单区样式
   ============================================================ */
.login-right {
  width: 440px;               /* 固定宽度440px */
  display: flex;              /* flex布局 */
  align-items: center;        /* 垂直居中 */
  justify-content: center;    /* 水平居中 */
  padding: 40px;             /* 内边距40px */
}

/* 登录卡片样式：白色背景，带阴影和圆角 */
.login-card {
  width: 100%;                /* 宽度100%（相对于父容器） */
  background: white;         /* 白色背景 */
  border-radius: 16px;        /* 圆角16px */
  padding: 40px 36px;         /* 内边距：上下40px，左右36px */
  /* 蓝色阴影效果，增加层次感 */
  box-shadow: 0 8px 40px rgba(22,119,255,.12);
}

/* 登录标题样式 */
.login-title { 
  text-align: center;        /* 居中对齐 */
  font-size: 22px; 
  font-weight: 700; 
  color: #1a1a2e; 
  margin-bottom: 20px;        /* 下方间距20px */
}

/* 登录方式切换标签（账号登录 / 微信扫码） */
.login-tabs {
  display: flex;             /* flex布局 */
  gap: 24px;                 /* 标签间距24px */
  border-bottom: 1px solid var(--border);  /* 底部边框 */
  margin-bottom: 28px;        /* 下方间距28px */
}
.login-tabs .tab {
  padding-bottom: 10px;      /* 底部内边距10px */
  font-size: 15px; 
  color: #888;               /* 未选中时灰色 */
  cursor: pointer;           /* 鼠标变为手型 */
  border-bottom: 2px solid transparent;  /* 透明下边框 */
  transition: .2s;          /* 过渡动画0.2秒 */
}
/* 选中状态：蓝色高亮 */
.login-tabs .tab.active { 
  color: var(--primary);    /* 蓝色文字 */
  border-bottom-color: var(--primary);  /* 蓝色下边框 */
  font-weight: 600;          /* 字体加粗 */
}

/* 标签内容区域：默认隐藏 */
.tab-content { display: none; }
/* 选中状态时显示 */
.tab-content.active { display: block; }

/* ============================================================
   登录表单元素样式
   ============================================================ */
/* 输入框容器 */
.input-group { margin-bottom: 16px; }

/* 文本输入框样式 */
.inp {
  width: 100%;                /* 宽度100% */
  height: 44px;               /* 高度44px */
  border: 1px solid var(--border);  /* 边框：1px灰色 */
  border-radius: 8px;         /* 圆角8px */
  padding: 0 14px;            /* 左右内边距14px */
  font-size: 14px;            /* 字体14px */
  transition: border-color .2s;  /* 边框颜色过渡动画 */
}
/* 输入框获得焦点时的样式 */
.inp:focus { 
  border-color: var(--primary);  /* 蓝色边框 */
  box-shadow: 0 0 0 3px rgba(22,119,255,.1);  /* 蓝色光晕效果 */
}

/* 记住密码和忘记密码行 */
.login-options { 
  display: flex;             /* flex布局 */
  justify-content: space-between;  /* 两端对齐 */
  align-items: center;        /* 垂直居中 */
  margin-bottom: 20px;         /* 下方间距20px */
  font-size: 13px; 
  color: #666; 
}
.forgot { color: var(--primary); }  /* 忘记密码链接：蓝色 */

/* 登录按钮样式 */
.btn-login {
  width: 100%;                /* 宽度100% */
  height: 44px;               /* 高度44px */
  background: var(--primary); /* 蓝色背景 */
  color: white;              /* 白色文字 */
  border: none;              /* 无边框 */
  border-radius: 8px;         /* 圆角8px */
  font-size: 16px; 
  font-weight: 600;           /* 字体加粗 */
  cursor: pointer;            /* 手型光标 */
  transition: background .2s; /* 背景色过渡动画 */
}
.btn-login:hover { 
  background: var(--primary-dark);  /* hover时变深蓝色 */
}

/* 错误提示文字样式 */
.error-msg { color: var(--danger); font-size: 13px; }
.login-tip { min-height: 24px; margin-top: 10px; text-align: center; }  /* 提示区域最小高度24px */
.login-extra { text-align: center; font-size: 12px; color: #aaa; margin-top: 8px; }  /* 演示账号提示 */

/* 管理员登录区域 */
.admin-login-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0 14px; color: #bbb; font-size: 12px;
}
/* 分隔线伪元素：左右线条 */
.admin-login-divider::before, .admin-login-divider::after {
  content: ''; flex: 1; height: 1px; background: #e8e8e8;
}
.admin-login-form .input-group { margin-bottom: 10px; }
/* 管理员登录按钮：渐变背景 */
.btn-admin {
  background: linear-gradient(135deg, #2d3d95, #227cc8);
  font-size: 14px; height: 40px;
}
.btn-admin:hover { opacity: 0.92; }

/* ============================================================
   微信扫码区域样式
   ============================================================ */
.qr-area { display: flex; justify-content: center; padding: 20px 0; }
.qr-box {
  width: 200px; height: 200px;   /* 二维码区域尺寸 */
  border: 1px dashed var(--border);  /* 虚线边框 */
  border-radius: 12px;           /* 圆角12px */
  display: flex;                 /* flex布局 */
  align-items: center;           /* 垂直居中 */
  justify-content: center;       /* 水平居中 */
}
.qr-placeholder { text-align: center; color: #aaa; }  /* 提示文字 */
.qr-tip { font-size: 12px; }    /* 二维码提示 */

/* 登录页底部版权信息 */
.login-footer {
  text-align: center; padding: 16px;
  font-size: 12px; color: #aaa;
  background: rgba(255,255,255,.5);
}

/* ============================================================
   注册入口链接样式
   ============================================================ */
.login-register-link { 
  text-align: center; 
  font-size: 13px; 
  color: #666; 
  margin-top: 12px; 
}
.login-register-link a { 
  color: var(--primary); 
  cursor: pointer; 
  font-weight: 500; 
}
.login-register-link a:hover { 
  text-decoration: underline;    /* hover时显示下划线 */
}

/* ============================================================
   服务器选择下拉框样式
   ============================================================ */
.login-server-select {
  display: flex;               /* flex布局 */
  align-items: center;         /* 垂直居中 */
  justify-content: center;     /* 水平居中 */
  gap: 8px;                    /* 间距8px */
  margin-top: 16px;            /* 上方间距16px */
  padding-top: 14px;           /* 上方内边距14px */
  border-top: 1px dashed #e8e8e8;  /* 顶部虚线分隔 */
  font-size: 13px; 
}
.login-server-select .server-label { color: #888; }  /* "服务器地址："文字颜色 */
.login-server-select .server-select-input {
  padding: 6px 10px;           /* 内边距 */
  border: 1px solid #d9d9d9;   /* 边框 */
  border-radius: 6px;          /* 圆角6px */
  font-size: 13px;             /* 字体大小 */
  color: var(--primary);      /* 文字蓝色 */
  background: white;           /* 白色背景 */
  cursor: pointer;            /* 手型光标 */
  min-width: 160px;           /* 最小宽度160px */
}
.login-server-select .server-select-input:focus {
  outline: none;              /* 移除focus轮廓 */
  border-color: var(--primary);  /* 蓝色边框 */
  box-shadow: 0 0 0 2px rgba(22,119,255,.1);  /* 蓝色光晕 */
}

/* ============================================================
   注册对话框样式（弹窗形式）
   ============================================================ */
/* 对话框容器：固定定位，覆盖整个屏幕 */
.register-dialog { 
  position: fixed;             /* 相对于视口定位 */
  inset: 0;                   /* top/right/bottom/left都为0，即全屏覆盖 */
  z-index: 10000;              /* 层级很高，确保在最上层 */
  display: flex;               /* flex布局 */
  align-items: center;          /* 垂直居中 */
  justify-content: center;      /* 水平居中 */
}
/* 隐藏状态 */
.register-dialog.hidden { display: none !important; }

/* 遮罩层：半透明黑色背景 */
.register-overlay { 
  position: absolute;         /* 相对于对话框定位 */
  inset: 0;                   /* 填满整个对话框 */
  background: rgba(0,0,0,.45); /* 45%透明度的黑色 */
}

/* 注册卡片样式 */
.register-card { 
  position: relative;          /* 相对于遮罩定位 */
  background: white;           /* 白色背景 */
  border-radius: 16px;         /* 圆角16px */
  width: 420px;                /* 宽度420px */
  max-width: 92vw;            /* 最大92%视口宽度（移动端自适应） */
  max-height: 90vh;           /* 最大90%视口高度 */
  overflow: hidden;            /* 超出部分隐藏 */
  box-shadow: 0 20px 60px rgba(0,0,0,.2);  /* 大阴影效果 */
  animation: regSlideIn .3s ease;  /* 入场动画：从下方滑入 */
}

/* 注册卡片入场动画：从透明和下方位置过渡到最终状态 */
@keyframes regSlideIn { 
  from { 
    opacity:0;                    /* 开始时完全透明 */
    transform:translateY(20px);   /* 开始时向下偏移20px */
  } 
  to { 
    opacity:1;                   /* 结束时完全不透明 */
    transform:translateY(0);     /* 结束时回到原位 */
  } 
}

/* 注册卡片头部 */
.register-header { 
  display: flex;               /* flex布局 */
  align-items: center;         /* 垂直居中 */
  justify-content: space-between;  /* 两端对齐 */
  padding: 18px 24px;          /* 内边距 */
  border-bottom: 1px solid #f0f0f0;  /* 底部边框 */
}
.register-header h3 { 
  font-size: 16px; 
  font-weight: 600; 
  color: #1a1a2e; 
  margin: 0; 
}
/* 关闭按钮 */
.register-close { 
  background: none;           /* 无背景 */
  border: none;               /* 无边框 */
  font-size: 18px; 
  color: #999;                /* 灰色 */
  cursor: pointer;            /* 手型光标 */
  width: 32px; height: 32px; /* 按钮尺寸 */
  border-radius: 8px;         /* 圆角8px */
  display: flex;               /* flex布局 */
  align-items: center;         /* 垂直居中 */
  justify-content: center;    /* 水平居中 */
}
.register-close:hover { background: #f5f5f5; }  /* hover时浅灰背景 */

/* 注册卡片内容区 */
.register-body { 
  padding: 20px 24px 24px;    /* 内边距 */
  overflow-y: auto;           /* 内容超出时可滚动 */
  max-height: calc(90vh - 70px);  /* 最大高度：视口90%减去头部高度 */
}

/* 注册表单字段样式 */
.reg-group { margin-bottom: 14px; }  /* 字段间距 */
.reg-group label { 
  display: block;             /* 块级元素，独占一行 */
  font-size: 13px; 
  color: #555; 
  margin-bottom: 5px;         /* 标签和输入框间距 */
}
.reg-group .required { color: var(--danger); }  /* 红色星号 */

/* 注册表单输入框 */
.reg-inp { 
  width: 100%; 
  height: 40px;               /* 高度40px */
  border: 1px solid #d9d9d9;  /* 灰色边框 */
  border-radius: 8px;         /* 圆角8px */
  padding: 0 12px;            /* 左右内边距12px */
  font-size: 14px;            /* 字体14px */
  transition: border-color .2s;  /* 边框颜色过渡 */
}
.reg-inp:focus { 
  border-color: var(--primary);  /* 蓝色边框 */
  box-shadow: 0 0 0 3px rgba(22,119,255,.1);  /* 蓝色光晕 */
}

/* 注册错误提示 */
.reg-error { 
  color: var(--danger); 
  font-size: 12px; 
  min-height: 18px;           /* 最小高度，保持布局稳定 */
  margin-bottom: 10px; 
}

/* 注册按钮 */
.btn-reg { 
  width: 100%; 
  height: 42px;               /* 高度42px */
  background: var(--primary); /* 蓝色背景 */
  color: white;              /* 白色文字 */
  border: none;               /* 无边框 */
  border-radius: 8px;         /* 圆角8px */
  font-size: 15px; 
  font-weight: 600;           /* 加粗 */
  cursor: pointer;            /* 手型光标 */
  transition: background .2s; /* 背景过渡 */
}
.btn-reg:hover { background: var(--primary-dark); }  /* hover时变深蓝 */
/* 禁用状态：半透明，禁止点击 */
.btn-reg:disabled { 
  opacity: .6;                /* 60%透明度 */
  cursor: not-allowed;        /* 禁用光标 */
}

/* 返回登录链接 */
.reg-login-link { 
  text-align: center; 
  font-size: 13px; 
  color: #888; 
  margin-top: 14px; 
}
.reg-login-link a { 
  color: var(--primary); 
  cursor: pointer; 
}

/* ===== 主应用布局 ===== */
.app { display: flex; height: 100vh; overflow: hidden; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex; flex-direction: column;
  flex-shrink: 0;
  transition: width .3s;
  z-index: 100;
  position: relative;
}

.sidebar-brand {
  display: flex; align-items: center; justify-content: center;
  padding: 18px 4px; border-bottom: 1px solid rgba(255,255,255,.1);
}
.sidebar-logo { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; }
.sidebar-title { display: none; }
.sidebar-name { color: white; font-size: 16px; font-weight: 700; }
.sidebar-sub {
  color: rgba(255,255,255,.6); font-size: 11px;
  background: rgba(255,255,255,.15); padding: 2px 6px; border-radius: 4px;
}

.sidebar-nav { flex: 1; padding: 4px 0; overflow-y: auto; overflow-x: hidden; }
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 4px; color: rgba(255,255,255,.75);
  font-size: 11px; cursor: pointer; transition: .2s;
  border-left: 3px solid transparent;
  user-select: none;
}
.nav-item:hover { background: rgba(255,255,255,.1); color: white; }
.nav-item.active {
  background: rgba(255,255,255,.15); color: white; font-weight: 600;
  border-left-color: #60a5fa;
}
.nav-icon { font-size: 20px; width: auto; text-align: center; }
.nav-label { font-size: 11px; }
.nav-item-no-click { cursor: default !important; }
.nav-item-no-click:active { transform: none !important; }

/* 悬浮子菜单面板 */
.nav-popup {
  position: fixed;
  left: calc(var(--sidebar-w) - 1px);
  width: 180px;
  background: white;
  border-radius: 0 6px 6px 0;
  box-shadow: 2px 2px 12px rgba(0,0,0,.1);
  z-index: 200;
  display: none;
  padding: 8px 0;
  border: 1px solid #d9d9d9;
  border-left: none;
}
.nav-popup::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 16px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-right: 8px solid #d9d9d9;
  border-bottom: 6px solid transparent;
}
.nav-popup::after {
  content: '';
  position: absolute;
  left: -6px;
  top: 16px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-right: 8px solid #ffffff;
  border-bottom: 6px solid transparent;
}
.nav-popup.show { display: block; }
.nav-popup-title {
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: #333;
  padding: 6px 16px 10px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 4px;
}
.nav-popup-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 16px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
  transition: .15s;
}
.nav-popup-item:hover {
  background: #f5f7fb;
  color: var(--primary);
}
.nav-popup-tag {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #52c41a;
  color: white;
  flex-shrink: 0;
  margin-left: 6px;
}
.nav-popup-report-btn {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #52c41a;
  color: white;
  border: none;
  cursor: pointer;
  margin-left: 8px;
  transition: background-color 0.2s;
}
.nav-popup-report-btn:hover {
  background: #389e0d;
}
.nav-popup-report-btn:active {
  background: #237804;
}

/* 报表页面样式 */
.report-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  padding: 12px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.report-search {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.search-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.search-item label {
  font-size: 13px;
  color: #666;
}
.search-item input, .search-item select {
  padding: 6px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 13px;
  min-width: 120px;
}
.report-actions {
  display: flex;
  gap: 8px;
}
.report-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.report-table th, .report-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
}
.report-table th {
  background: #fafafa;
  font-weight: 600;
  color: #333;
}
.report-table tbody tr:hover {
  background: #f9fafc;
}
.report-table tfoot {
  background: #fff7f7;
}
.report-table tfoot td {
  font-weight: 600;
}
.report-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding: 12px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.pagination-info {
  font-size: 13px;
  color: #666;
}
.pagination-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: #666;
}

/* 分组悬浮子菜单 */
.nav-popup-groups {
  display: flex;
  overflow: hidden;
}
.nav-popup-group {
  flex: 1;
  min-width: 150px;
  padding: 0;
}
.nav-popup-group-title {
  font-size: 13px;
  font-weight: 600;
  color: #1e3a8a;
  padding: 8px 16px 6px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 2px;
  background: #f8faff;
}
.nav-popup-group .nav-popup-item {
  padding: 8px 16px;
  font-size: 13px;
}
.nav-popup-groups > .nav-popup-group + .nav-popup-group {
  border-left: 1px solid #f0f0f0;
}

/* 顶部栏 */
.main-wrap { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.topbar {
  height: var(--topbar-h);
  background: white;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
  flex-shrink: 0;
  z-index: 50;
}

.topbar-left { display: flex; align-items: center; gap: 12px; }
.sidebar-toggle { background: none; border: none; font-size: 20px; cursor: pointer; color: #666; padding: 4px 8px; border-radius: 6px; }
.sidebar-toggle:hover { background: var(--bg); }
.breadcrumb { font-size: 14px; color: #666; }

.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-tag {
  font-size: 12px; padding: 3px 10px; border-radius: 12px;
}
.topbar-tag.warn { background: #fff7e6; color: #d46b08; }
.topbar-tag.ok { background: #f6ffed; color: #389e0d; }
.topbar-tag.info { background: #e6f4ff; color: #0958d9; }
.topbar-item { font-size: 13px; color: #666; cursor: pointer; }
.topbar-item:hover { color: var(--primary); }

.user-menu { position: relative; display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 14px; }
.user-avatar { font-size: 20px; }
.dropdown-arr { font-size: 11px; color: #999; }
.user-dropdown {
  position: absolute; top: 36px; right: 0;
  background: white; border: 1px solid var(--border);
  border-radius: 8px; box-shadow: var(--shadow);
  min-width: 120px; padding: 6px 0; z-index: 200;
}
.user-dropdown.hidden { display: none; }
.user-dropdown a { display: block; padding: 8px 16px; font-size: 13px; color: #555; }
.user-dropdown a:hover { background: var(--bg); color: var(--primary); }

/* 标签栏 */
.tab-bar {
  display: flex;
  align-items: flex-end;
  gap: 0;
  background: #f0f2f5;
  border-bottom: 1px solid #d9d9d9;
  padding: 0 20px;
  overflow-x: auto;
  flex-shrink: 0;
  min-height: 36px;
}
.tab-bar::-webkit-scrollbar { height: 0; }
.tab-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  font-size: 13px;
  color: #666;
  background: #fafafa;
  border: 1px solid #d9d9d9;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s;
  margin-right: -1px;
  position: relative;
}
.tab-item:hover { background: #e6f7ff; color: #1677ff; }
.tab-item.active {
  background: white;
  color: var(--primary);
  font-weight: 600;
  z-index: 2;
  border-bottom: 1px solid white;
  margin-bottom: -1px;
}
.tab-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  font-size: 11px;
  line-height: 1;
  color: #999;
  border-radius: 50%;
  cursor: pointer;
  transition: .15s;
}
.tab-close:hover { background: #ff4d4f; color: white; }

/* 页面内容 */
.page-content {
  flex: 1; overflow-y: auto; padding: 20px;
  background: var(--bg);
}

/* ===== 通用卡片 ===== */
.card {
  background: white; border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.card-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 16px; }

/* 统计卡片组 */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.stat-card {
  background: white; border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow);
}
.stat-value { font-size: 22px; font-weight: 700; color: #1a1a2e; }
.stat-label { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.stat-sub { font-size: 12px; color: var(--text-secondary); }

/* 快捷功能图标 */
.shortcut-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 12px; }
.shortcut-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 8px; border-radius: 8px; cursor: pointer;
  transition: .2s;
}
.shortcut-item:hover { background: var(--bg); transform: translateY(-2px); }
.shortcut-icon { font-size: 28px; }
.shortcut-label { font-size: 12px; color: #555; text-align: center; }

/* 常用功能 + 汇总 布局 */
.dashboard-mid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.quick-btns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.quick-btn {
  padding: 9px 10px; background: var(--bg); border-radius: 6px;
  font-size: 13px; color: #555; text-align: center; cursor: pointer;
  border: 1px solid var(--border); transition: .2s;
}
.quick-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.summary-item { text-align: center; }
.summary-num { font-size: 22px; font-weight: 700; }
.summary-num.blue { color: #1677ff; }
.summary-num.teal { color: #13c2c2; }
.summary-num.orange { color: #fa8c16; }
.summary-label { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

/* 图表区 */
.dashboard-charts { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 16px; }
.chart-wrap { position: relative; height: 220px; }

/* 资产现金流 */
.dashboard-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.asset-grid { display: flex; flex-direction: column; gap: 8px; }
.asset-row { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.asset-label { color: var(--text-secondary); display: flex; align-items: center; gap: 6px; }
.asset-value { font-weight: 500; }
.asset-total { font-size: 24px; font-weight: 700; color: var(--danger); margin-bottom: 12px; }
.asset-total-label { font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }

/* ===== 表格 ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { background: #fafafa; color: #666; font-weight: 500; padding: 10px 14px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
td { padding: 10px 14px; border-bottom: 1px solid #f0f0f0; color: var(--text); }
tr:hover td { background: var(--primary-light); }

/* 分页 */
.pagination { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 12px 0; }
.page-btn {
  padding: 4px 12px; border: 1px solid var(--border); border-radius: 6px;
  background: white; font-size: 13px; cursor: pointer; color: #555;
}
.page-btn:hover, .page-btn.active { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.page-info { font-size: 13px; color: #888; }

/* ===== 搜索栏 ===== */
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.toolbar-left { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search-inp {
  height: 34px; border: 1px solid var(--border); border-radius: 6px;
  padding: 0 12px; font-size: 13px; width: 200px;
}
.search-inp:focus { border-color: var(--primary); }

/* ===== 按钮 ===== */
.btn { padding: 7px 16px; border-radius: 6px; font-size: 13px; cursor: pointer; border: none; display: inline-flex; align-items: center; gap: 5px; transition: .2s; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-default { background: white; color: #555; border: 1px solid var(--border); }
.btn-default:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: white; color: var(--danger); border: 1px solid var(--danger); }
.btn-danger:hover { background: var(--danger); color: white; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-warning { background: var(--warning); color: white; border: none; }

/* 状态徽标 */
.badge { padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.badge-success { background: #f6ffed; color: #389e0d; }
.badge-warning { background: #fff7e6; color: #d46b08; }
.badge-default { background: #f0f0f0; color: #888; }
.badge-danger { background: #fff2f0; color: #cf1322; }

/* ===== 弹窗 ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 999;
}
.modal {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: white; border-radius: 12px;
  width: 620px; max-width: 95vw; max-height: 85vh;
  display: flex; flex-direction: column;
  z-index: 1000; box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; border-bottom: 1px solid var(--border); }
.modal-header span { font-size: 16px; font-weight: 600; }
.modal-close { background: none; border: none; font-size: 18px; cursor: pointer; color: #888; }
.modal-body { flex: 1; overflow-y: auto; padding: 20px 24px; }
.modal-footer { padding: 14px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* 表单 */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid.full { grid-template-columns: 1fr; }
.form-item { display: flex; flex-direction: column; gap: 5px; }
.form-label { font-size: 13px; color: #555; }
.form-inp {
  height: 36px; border: 1px solid var(--border); border-radius: 6px;
  padding: 0 12px; font-size: 13px;
}
.form-inp:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(22,119,255,.1); }
.form-select {
  height: 36px; border: 1px solid var(--border); border-radius: 6px;
  padding: 0 10px; font-size: 13px; background: white; cursor: pointer;
}

/* 订单商品列表 */
.order-items-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
.order-items-table th { background: #f7f7f7; padding: 7px 10px; border: 1px solid #eee; }
.order-items-table td { padding: 7px 10px; border: 1px solid #eee; }
.order-items-table input { width: 100%; border: none; background: transparent; font-size: 13px; text-align: center; }

/* 空状态 */
.empty-state { text-align: center; padding: 60px 0; color: #aaa; }
.empty-state-icon { font-size: 48px; margin-bottom: 12px; }

/* 库存预警红字 */
.low-stock { color: var(--danger); font-weight: 600; }
.low-stock-scroll { max-height: 420px; overflow-y: auto; }
.low-stock-scroll::-webkit-scrollbar { width: 6px; }
.low-stock-scroll::-webkit-scrollbar-thumb { background: #d9d9d9; border-radius: 3px; }

/* 页面标题 */
.page-title { font-size: 18px; font-weight: 700; margin-bottom: 16px; color: #1a1a2e; }

/* 分类列表 */
.category-list { display: flex; flex-direction: column; gap: 8px; }
.cat-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: var(--bg); border-radius: 8px; font-size: 14px; }
.cat-item:hover { background: var(--primary-light); }

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

/* ===== 销售全页表单样式 ===== */
.sale-tab-bar {
  display: flex; align-items: center; gap: 2px;
  background: #f5f7fa; border-radius: 8px 8px 0 0; padding: 4px 12px;
  border-bottom: 2px solid #1677ff; margin-bottom: 0;
  flex-wrap: wrap;
}
.sale-tab {
  padding: 6px 16px; font-size: 13px; cursor: pointer;
  border-radius: 4px; color: #666; white-space: nowrap;
  transition: .2s;
}
.sale-tab:hover { background: #e6f4ff; color: #1677ff; }
.sale-tab.active { background: #1677ff; color: #fff; font-weight: 600; }
.sale-tab-sep { padding: 6px 8px; font-size: 14px; color: #ddd; }
.sale-tab-label { font-size: 13px; color: #666; margin-right: 8px; }
.sale-radio-label { font-size: 13px; color: #666; margin-right: 16px; cursor: pointer; }
.sale-radio-label input { margin-right: 4px; }
.sale-hdr-label { display: block; font-size: 12px; color: #888; margin-bottom: 4px; }
.sale-hdr-no { font-size: 14px; font-weight: 700; color: #1677ff; font-family: monospace; }
.sale-hdr-link { font-size: 13px; color: #1677ff; cursor: pointer; white-space: nowrap; }
.sale-hdr-link:hover { text-decoration: underline; }
.sale-hdr-delivery {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; background: #52c41a; color: #fff;
  border-radius: 4px; font-size: 12px; cursor: pointer;
}
.sale-hdr-expand { font-size: 13px; color: #1677ff; cursor: pointer; }
.sale-header {
  display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-end;
  padding: 14px 18px; background: #fff; border: 1px solid #e8e8e8;
  border-top: none; margin-bottom: 0;
}
.sale-hdr-item { display: flex; flex-direction: column; gap: 4px; }
.customer-item { flex-direction: row; align-items: flex-end; gap: 8px; }
.customer-select-wrapper { position: relative; display: flex; align-items: center; gap: 8px; }
.customer-select {
  display: flex; align-items: center; justify-content: space-between;
  min-width: 260px; height: 34px; padding: 0 12px;
  background: #fff; border: 1px solid #d9d9d9; border-radius: 4px;
  cursor: pointer; transition: .2s;
}
.customer-select:hover { border-color: #1677ff; }
.customer-label { font-size: 14px; color: #666; }
.customer-arrow { font-size: 10px; color: #999; margin-left: 8px; }
.customer-quick-add-btn {
  height: 34px; padding: 0 16px;
  background: #1677ff; color: #fff; border: none;
  border-radius: 4px; font-size: 14px; cursor: pointer;
  transition: .2s;
}
.customer-quick-add-btn:hover { background: #0958d9; }
.customer-dropdown {
  position: absolute; top: 100%; left: 0; margin-top: 4px;
  width: 360px; background: #fff; border: 1px solid #e8e8e8;
  border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 1000; overflow: hidden;
}
.customer-search {
  display: flex; align-items: center;
  padding: 8px 12px; border-bottom: 1px solid #f0f0f0;
  background: #fafafa;
}
.search-icon { color: #999; margin-right: 8px; font-size: 14px; }
.customer-search input {
  flex: 1; height: 28px; padding: 0 8px;
  border: 1px solid #d9d9d9; border-radius: 4px;
  font-size: 13px; outline: none;
}
.customer-search input:focus { border-color: #1677ff; }
.search-clear {
  margin-left: 8px; color: #999; cursor: pointer;
  font-size: 12px; padding: 2px 6px; border-radius: 50%;
  transition: .2s;
}
.search-clear:hover { background: #f0f0f0; color: #666; }
.customer-list {
  max-height: 240px; overflow-y: auto;
}
.customer-list-item {
  display: flex; align-items: center;
  padding: 10px 14px; cursor: pointer;
  transition: .15s; font-size: 14px; color: #333;
  border-bottom: 1px solid #f5f5f5;
}
.customer-list-item:hover { background: #f5f7fa; }
.customer-list-item.selected { background: #e6f4ff; color: #1677ff; }
.customer-red-dot {
  display: inline-block; width: 8px; height: 8px;
  background: #ff4d4f; border-radius: 50%;
  margin-right: 8px;
}
.customer-name { flex: 1; }
.customer-empty {
  padding: 40px 20px; text-align: center; color: #999; font-size: 13px;
}
.customer-actions {
  display: flex; gap: 20px; padding: 8px 14px;
  border-top: 1px solid #f0f0f0; background: #fafafa;
}
.customer-action-link {
  display: inline-flex; align-items: center;
  font-size: 13px; color: #666; cursor: pointer;
  transition: .2s;
}
.customer-action-link:hover { color: #1677ff; }
.customer-add-link { color: #1677ff; }
.customer-add-link:hover { color: #0958d9; }
.refresh-icon { margin-right: 4px; }
.plus-icon { margin-right: 4px; color: #1677ff; }
.customer-pagination {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 14px; border-top: 1px solid #f0f0f0;
}
.page-btn {
  width: 28px; height: 28px; border: 1px solid #d9d9d9;
  background: #fff; border-radius: 4px; cursor: pointer;
  font-size: 14px; color: #333; transition: .2s;
}
.page-btn:hover:not(:disabled) { border-color: #1677ff; color: #1677ff; }
.page-btn:disabled { color: #ccc; cursor: not-allowed; background: #f5f5f5; }
.page-info { font-size: 13px; color: #666; }
.sale-table-wrap {
  overflow-x: auto; background: #fff;
  border: 1px solid #e8e8e8; border-top: none;
  max-height: 380px; overflow-y: auto;
}
.sale-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 1400px; }
.sale-table th {
  background: #fafafa; color: #555; font-weight: 600; padding: 10px 8px;
  border-bottom: 2px solid #e8e8e8; white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
.sale-table td { padding: 8px 8px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
.sale-table tr:hover td { background: #fafcff; }
.sale-table tfoot { background: #fafafa; }
.asm-add-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border: 1px solid #52c41a;
  background: #f6ffed; color: #52c41a; border-radius: 3px;
  font-size: 14px; cursor: pointer; margin-right: 4px;
}
.asm-add-btn:hover { background: #52c41a; color: #fff; }
.asm-del-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border: 1px solid #ff4d4f;
  background: #fff1f0; color: #ff4d4f; border-radius: 3px;
  font-size: 12px; cursor: pointer;
}
.asm-del-btn:hover { background: #ff4d4f; color: #fff; }
.sale-table tfoot td { padding: 10px 8px; border-top: 2px solid #e8e8e8; }
.sale-op-cell { display: flex; gap: 4px; }
.sale-basic-link {
  display: inline-block; padding: 2px 8px; background: #e6f7ff;
  color: #1890ff; font-size: 12px; border-radius: 4px; cursor: pointer;
}
.sale-add-row {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 18px; background: #fff; border: 1px solid #e8e8e8; border-top: none;
}
.sale-total-label { font-size: 14px; font-weight: 600; color: #333; }
.sale-grand-total { font-size: 20px; font-weight: 700; color: var(--danger); }
.sale-bottom {
  background: #fff; border: 1px solid #e8e8e8; border-top: none;
  border-radius: 0 0 8px 8px; padding: 14px 18px;
}
.sale-bottom-row {
  display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin-bottom: 12px;
}
.sale-bottom-row-1 { justify-content: flex-start; }
.sale-bottom-row-2 { justify-content: flex-start; }
.sale-bottom-row-3 { justify-content: space-between; }
.sale-bottom-item { display: flex; flex-direction: column; gap: 4px; }
.sale-bottom-item label { font-size: 12px; color: #888; }
.sale-bottom-val { font-size: 14px; font-weight: 600; color: #333; }
.sale-bottom-val.unpaid { color: #ff4d4f; }
.sale-bottom-receive { }
.sale-bottom-receive input { border: 1px solid #ff4d4f; color: #ff4d4f; }
.sale-bottom-points {
  display: flex; gap: 24px; font-size: 13px; color: #666;
}
.sale-bottom-points span { display: flex; align-items: center; gap: 4px; }
.sale-receive-box {
  display: flex; align-items: center; gap: 12px;
  padding: 4px;
  background: #fff7f7;
  border: 1px solid #ffccc7;
  border-radius: 4px;
}
.sale-receive-box input {
  border: 1px solid #ff4d4f;
  color: #ff4d4f;
  font-weight: 600;
}
.sale-debt-info {
  font-size: 13px;
  color: #666;
}
.sale-upload-area {
  display: flex; align-items: center; gap: 12px;
  padding: 16px; background: #fafafa; border: 1px dashed #d9d9d9;
  border-radius: 8px; margin-top: 12px;
}
.sale-upload-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; background: #fff; border: 1px solid #d9d9d9;
  border-radius: 4px; font-size: 13px; cursor: pointer;
}
.sale-upload-btn:hover { border-color: #1677ff; color: #1677ff; }
.sale-upload-hint { font-size: 12px; color: #999; }

/* ===== 附件上传样式 ===== */
.ai-chat-input-area {
  margin-top: 12px;
  padding: 12px;
  background: #fff;
  border-radius: 8px;
  border: 1px dashed #d9d9d9;
  cursor: text;
  min-height: 100px;
  position: relative;
}
.ai-chat-input-area:hover {
  border-color: #1890ff;
}
.ai-chat-input-area:focus-within {
  border-color: #1890ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}
.attachment-hidden-input {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: text;
  border: none;
  outline: none;
}
.attachment-upload-area {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  z-index: 1;
  position: relative;
}
.attachment-upload-btn {
  width: 60px;
  height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed #d9d9d9;
  border-radius: 8px;
  cursor: pointer;
  background: #fafafa;
  transition: all 0.2s;
  flex-shrink: 0;
}
.attachment-upload-btn:hover {
  border-color: #1890ff;
  background: #e6f7ff;
}
.upload-icon {
  font-size: 20px;
  color: #999;
  margin-bottom: 2px;
}
.attachment-upload-btn:hover .upload-icon {
  color: #1890ff;
}
.upload-text {
  font-size: 11px;
  color: #999;
}
.attachment-upload-btn:hover .upload-text {
  color: #1890ff;
}
.attachment-preview-area {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.attachment-preview-item {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
  background: #1a1a1a;
  display: flex;
  flex-direction: column;
}
.attachment-thumb {
  flex: 1;
  width: 100%;
  object-fit: cover;
}
.attachment-info {
  padding: 4px 8px;
  background: #1a1a1a;
  color: #999;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attachment-delete {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.attachment-delete:hover {
  background: #ff4d4f;
}
.attachment-hint {
  margin-top: 8px;
  font-size: 12px;
  color: #999;
  text-align: right;
}

.form-select-xs { height: 30px; font-size: 12px; padding: 0 8px; border: 1px solid #d9d9d9; border-radius: 4px; background: #fff; }
.form-inp-xs { height: 30px; font-size: 12px; padding: 0 8px; border: 1px solid #d9d9d9; border-radius: 4px; }
.btn-xs { padding: 4px 8px; font-size: 12px; height: 26px; line-height: 1; }
.btn-lg { padding: 10px 32px; font-size: 14px; }

/* ===== 组装拆卸 ===== */
.asm-section { margin-bottom: 16px; }
.asm-section-header {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 16px; background: #fff; border: 1px solid #e8e8e8; border-bottom: none;
  border-radius: 8px 8px 0 0;
}
.asm-section-title { font-size: 15px; font-weight: 700; color: #333; }
.asm-multiple-inp { width: 60px; height: 28px; text-align: center; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 13px; }
.asm-cost-btn { margin-left: auto; }

/* ===== 库存表单通用 ===== */
.stock-form-section { margin-bottom: 12px; }
.stock-section-title {
  font-size: 14px; font-weight: 600; color: #333;
  padding: 8px 0; border-bottom: 1px solid #eee; margin-bottom: 8px;
}
.stock-split-line { height: 1px; background: #eee; margin: 16px 0; }

/* ===== 库存查询表格微调 ===== */
.inv-table { width: 100%; border-collapse: collapse; }
.inv-table th {
  background: #fafafa; color: #555; font-weight: 600; padding: 8px 6px;
  border-bottom: 2px solid #e8e8e8; white-space: nowrap; position: sticky; top: 0; z-index: 1;
  font-size: 12px;
}
.inv-table td { padding: 6px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; font-size: 13px; }
.inv-table tr:hover td { background: #fafcff; }

/* ===== 设置模块标签页 ===== */
.settings-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--primary); margin-bottom: 20px; flex-wrap: wrap; }
.settings-tabs .tab-item {
  padding: 8px 18px; font-size: 13px; color: #666; cursor: pointer;
  border-radius: 6px 6px 0 0; border: 1px solid transparent;
  transition: .2s; white-space: nowrap;
}
.settings-tabs .tab-item:hover { color: var(--primary); background: var(--primary-light); }
.settings-tabs .tab-item.active {
  color: var(--primary); font-weight: 600;
  background: white; border-color: var(--primary);
  position: relative;
}
.settings-tabs .tab-item.active::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
  height: 2px; background: white;
}

/* ===== 搜索栏 ===== */
.search-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 14px; }
