html, body, #app {
  height: 100%;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f5f7fa;
}

.login-wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1f2d3d 0%, #304156 100%);
}

.login-card {
  width: 380px;
  padding: 40px 36px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.login-title {
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  color: #303133;
  margin-bottom: 6px;
}

.login-sub {
  text-align: center;
  color: #909399;
  font-size: 13px;
  margin-bottom: 28px;
}

.layout {
  height: 100%;
  display: flex;
}

.aside {
  width: 164px;
  background: #fff;
  border-right: 1px solid #e8ebf0;
  box-shadow: 2px 0 8px rgba(0, 21, 41, 0.04);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.logo {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #1f2d3d 0%, #2b3f57 100%);
}

/* 侧栏菜单：浅色悬浮卡片式 */
.aside .el-menu {
  border-right: none;
  background: #fff;
  padding: 6px 0;
}
.aside .el-menu-item,
.aside .el-sub-menu__title {
  height: 40px;
  line-height: 40px;
  color: #4b5563;
  margin: 3px 6px 3px 0;
  border-radius: 0 8px 8px 0;
  font-size: 14px;
  padding-left: 2px !important;
}
.aside .el-menu-item .el-icon,
.aside .el-sub-menu__title .el-icon {
  font-size: 16px;
  margin-right: 6px;
}
.aside .el-menu-item:hover,
.aside .el-sub-menu__title:hover {
  background: #f1f5f9;
  color: #1f2d3d;
}
.aside .el-menu-item.is-active {
  background: #e8f0fe;
  color: #2563eb;
  font-weight: 600;
}
.aside .el-sub-menu .el-menu-item {
  min-width: 0;
  padding-left: 18px !important;
}
.aside .el-sub-menu .el-menu-item.is-active {
  background: #e8f0fe;
  color: #2563eb;
}

/* 表格横向滚动条：常显、加粗、好拖 */
.el-table .el-scrollbar__bar.is-horizontal {
  height: 12px !important;
  opacity: 1 !important;
}
.el-table .el-scrollbar__thumb {
  background: #a8abb2 !important;
  border-radius: 6px;
  min-width: 48px;
}
.el-table .el-scrollbar__wrap {
  scrollbar-width: thin;
  scrollbar-color: #a8abb2 #eef1f5;
}

/* 表头文字居中（全部表格） */
.el-table th .cell {
  text-align: center;
}

/* 表格单元格更紧凑（左右 6px），窄屏列放得下 */
.el-table .cell {
  padding: 0 6px !important;
}

/* 员工管理表格：列宽按百分比分配（合计 100%），任何窗口宽度自动撑满 */
.users-table col:nth-child(1) { width: 4% !important; }
.users-table col:nth-child(2) { width: 16% !important; }
.users-table col:nth-child(3) { width: 20% !important; }
.users-table col:nth-child(4) { width: 16% !important; }
.users-table col:nth-child(5) { width: 18% !important; }
.users-table col:nth-child(6) { width: 10% !important; }
.users-table col:nth-child(7) { width: 16% !important; }

/* 列表页弹性布局：内容区 flex 纵向，表格精确撑满到最底部（不留下方空白） */
.content:has(.users-page),
.content:has(.page-fill) {
  display: flex;
  flex-direction: column;
}
.users-page,
.page-fill {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.users-page .page-head,
.page-fill .page-head {
  flex-shrink: 0;
  margin-bottom: 14px;
}
.users-page .users-table,
.page-fill .el-table {
  flex: 1;
  min-height: 0;
}

/* el-card 嵌套的列表页（如供应商管理）：卡片撑满 + 表头固定 + 表格铺满 */
.page-fill .el-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.page-fill .el-card .el-card__body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.page-fill .el-card .el-card__body > .el-table {
  flex: 1;
  min-height: 0;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  height: 56px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
}

.content {
  flex: 1;
  padding: 18px;
  overflow: auto;
}

.page-card {
  background: #fff;
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 16px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.toolbar .spacer { flex: 1; }

.stat-cards { display: flex; gap: 16px; flex-wrap: wrap; }
.stat-card {
  flex: 1;
  min-width: 180px;
  background: #fff;
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 2px 8px rgba(0, 21, 41, 0.06);
}
.stat-num { font-size: 28px; font-weight: 700; color: #409eff; }
.stat-label { color: #909399; font-size: 13px; margin-top: 4px; }

.table-tools { display: flex; gap: 8px; }
