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

body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; background: #f0f2f5; }

.login-container { display: flex; justify-content: center; align-items: center; min-height: 100vh; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.login-card { background: #fff; padding: 40px; border-radius: 12px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15); width: 400px; }
.login-brand { display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 12px; margin-bottom: 28px; }
.login-logo { width: 40px; height: 40px; object-fit: contain; flex-shrink: 0; }
.login-card h2 { text-align: center; margin-bottom: 0; color: #333; font-size: 24px; }
.login-footer { text-align: center; margin-top: 12px; }

.sidebar { background: #304156; overflow-y: auto; }
.logo { color: #fff; font-size: 18px; font-weight: 700; text-align: center; padding: 20px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.sidebar-logo { width: 32px; height: 32px; object-fit: contain; vertical-align: middle; margin-right: 6px; }
.el-menu { border-right: none; }

.header { background: #fff; display: flex; align-items: center; padding: 0 24px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08); z-index: 10; }
.user-info { cursor: pointer; font-size: 14px; color: #606266; }

.main-content { padding: 20px; overflow-y: auto; }

/* 统计卡片改为实色块（底色/文字色由模板的 body-style 内联传入），
   与订单页 kanban-card 风格统一。 */
.stat-card { text-align: center; border: none; overflow: hidden; }
/* el-card 默认有边框和圆角内影，实色块下会露出白边，这里去掉 */
.stat-card.el-card { border: none; }
.stat-card .el-card__body { border-radius: 8px; }
.stat-number { font-size: 32px; font-weight: 700; margin-bottom: 8px; line-height: 1.2; }
.stat-label { font-size: 14px; opacity: 0.9; }
/* hover 时轻微上浮，实色块上加白色内描边保持边界清晰 */
.stat-card.el-card:hover { transform: translateY(-2px); }
.stat-card.el-card:hover .el-card__body { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3); }
/* 6 张统计卡片等高：数字位数不同时（如「3」与「¥170」）卡片会差几像素 */
.stat-row > .el-col { display: flex; flex-direction: column; }
.stat-row > .el-col > .stat-card { flex: 1; display: flex; flex-direction: column; justify-content: center; }

.kanban-row { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.kanban-card {
  flex: 1; min-width: 140px; padding: 16px; border-radius: 8px;
  text-align: center; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  /* 内描边让所有色块在未选中时边界清晰；选中时由 .kanban-active 接管 */
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.kanban-card:hover { transform: translateY(-2px); }
/* 选中态：只加一圈内描边，不再用外扩的双层白边。
   原写法（0 0 0 3px #fff, 0 0 0 6px 颜色）在蓝底上显得特别亮，
   容易被误认为「这个色块颜色不一样」。 */
.kanban-card.kanban-active { box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.9); }
.kanban-card.kanban-active .label { opacity: 1; font-weight: 500; }
.kanban-card .num { font-size: 28px; font-weight: 700; }
.kanban-card .label { font-size: 13px; margin-top: 4px; opacity: 0.8; }

.chart-container { height: 320px; margin-top: 16px; }

/* ── 滞销 SKU 预警表格 ──
   列宽合计 468px，但在窄屏（<1200px）下卡片会窄于此值，
   el-table 默认 fit=true 会压缩列宽并可能挤出横向滚动条。
   这里让各列按比例收缩、内容超宽用省略号，彻底避免横向滚动。 */
.slow-sku-table .el-table__body-wrapper,
.slow-sku-table .el-table__header-wrapper { overflow-x: hidden; }
.slow-sku-table .cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 商品名列可占剩余空间，让另外三列保持紧凑 */
.slow-sku-table .el-table__col--min-width { flex: 1 1 auto; }
.slow-sku-table .el-table__col--width { flex: 0 0 auto; }
/* 极窄屏（<1200px，卡片可宽会小于列宽合计 386px）时，
   让各列等比收缩而不是溢出 —— el-table 用 flex 布局，这里显式允许收缩。 */
.slow-sku-table .el-table__col--width {
  flex: 0 1 auto !important;
  min-width: 0;
}
.slow-sku-table .el-table__col--min-width { min-width: 100px; }

/* ── 仪表盘同行卡片等高 ──
   仪表盘每行两张卡片（图表 + 表格）内容高度天然不同：
   图表卡是固定的 chart-container 320px，表格卡由 max-height=300 的表格撑开，
   于是同一行左低右高，视觉上很乱。
   这里让 el-row 撑成等高的 flex 容器，el-col 拉伸对齐，
   el-card 用 height:100% 填满列高，两张卡片就一样高。
   （flex 布局下 flex 会失效，改用 CSS 显式 height:100%） */
.dash-row { display: flex; align-items: stretch; }
.dash-row > .el-col { display: flex; flex-direction: column; }
.dash-row > .el-col > .el-card { flex: 1; display: flex; flex-direction: column; }
/* 卡片 body 也要跟着撑，否则内容仍会顶在顶部留白 */
.dash-row > .el-col > .el-card > .el-card__body { flex: 1; display: flex; flex-direction: column; }
/* 表格卡里的表格占满剩余空间，滚动条出现在表格内部而不是卡片外 */
.dash-row .el-table { flex: 1; }

.el-table { font-size: 13px; }

.preview-summary { padding: 12px 0; }
.preview-summary .el-tag { margin-right: 8px; }
.duplicate-row { background-color: #fdf6ec !important; }
.duplicate-row td { background-color: #fdf6ec !important; }
.unmapped-sku-row { background-color: #fef0f0 !important; }
.unmapped-sku-row td { background-color: #fef0f0 !important; }
.unmatched-row { background: #fef0f0 !important; }
.matched-row { background: #f0f9eb !important; }

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

/* 导入预览里供货价非法的行：整行标红，让问题行在几十行里一眼可见。
   比只在单元格里标一个 ⚠ 更醒目，也不用逐行扫描。 */
.invalid-row { background-color: #fef0f0 !important; }
.invalid-row td { background-color: #fef0f0 !important; }

/* 文件内重复的行：用浅黄而不是红。
   红=必须修好才能导入（供货价错误），黄=默认跳过但可以导入（重复），
   两种严重程度不同，颜色不能混用。 */
.dup-in-file-row { background-color: #fdf6ec !important; }
.dup-in-file-row td { background-color: #fdf6ec !important; }

/* 状态下拉面板：teleport 到 body 后层级容易被 el-dialog 压住，
   表现为「展开只看到最后一个选项、其余被裁掉」。这里显式抬高层级并让宽度跟随输入框。 */
/* 状态弹窗的下拉面板：teleport 到 body 后层级容易被 el-dialog 压住。
   只做层级兜底，不要改选项的行高/display ——
   强行覆盖 display 会让 el-option 的内容定位失效，出现多个选项显示同一段文字。 */
.status-select-popper {
  z-index: 3000 !important;
}

@media (max-width: 768px) {
  .el-aside { width: 60px !important; }
  .logo { font-size: 14px; }
  .el-menu-item span:last-child { display: none; }
  .kanban-card { min-width: 100px; }
  .kanban-card .num { font-size: 22px; }
}
