/* ===== 服装厂管理系统 全局样式 ===== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  background: #f0f2f5; color: #333; -webkit-font-smoothing: antialiased;
}

/* ---------- 登录页 ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1f6feb 0%, #0d47a1 55%, #6a1f9e 100%);
}
.login-card {
  width: 380px; max-width: 92vw; background: #fff; border-radius: 14px;
  padding: 36px 34px 30px; box-shadow: 0 20px 60px rgba(0,0,0,.28);
}
.login-card h1 { margin: 0 0 6px; font-size: 22px; text-align: center; color: #1f2d3d; }
.login-card .sub { text-align: center; color: #909399; font-size: 13px; margin-bottom: 26px; }
.login-tip { margin-top: 18px; font-size: 12px; color: #909399; background: #f5f7fa; border-radius: 6px; padding: 10px 12px; line-height: 1.9; }

/* ---------- 主布局 ---------- */
.layout { height: 100vh; display: flex; }
.sidebar { width: 210px; background: #001529; color: #fff; display: flex; flex-direction: column; flex-shrink: 0; }
.sidebar .logo { padding: 18px 16px; font-size: 16px; font-weight: bold; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar .logo small { display: block; font-size: 11px; font-weight: normal; color: #8aa0b8; margin-top: 2px; }
.sidebar .nav { flex: 1; overflow-y: auto; padding: 8px 0; }
.sidebar .nav .nav-item {
  display: flex; align-items: center; gap: 8px; padding: 12px 18px; cursor: pointer;
  color: #a6b8cc; font-size: 14px; transition: all .15s; user-select: none;
}
.sidebar .nav .nav-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.sidebar .nav .nav-item.active { color: #fff; background: #1f6feb; border-right: 3px solid #64b5f6; }
.sidebar .userbox { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12px; color: #a6b8cc; }
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 54px; background: #fff; display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; box-shadow: 0 1px 4px rgba(0,21,41,.08); flex-shrink: 0;
}
.topbar .page-title { font-size: 16px; font-weight: 600; color: #1f2d3d; }
.topbar .top-right { display: flex; align-items: center; gap: 14px; font-size: 13px; color: #606266; }
.content { flex: 1; overflow-y: auto; padding: 16px 20px 40px; }

/* ---------- 卡片统计 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-card { background: #fff; border-radius: 10px; padding: 16px 18px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.stat-card .label { font-size: 13px; color: #909399; margin-bottom: 6px; }
.stat-card .value { font-size: 26px; font-weight: 700; color: #1f2d3d; }
.stat-card .value.warn { color: #e64340; }
.stat-card .value.blue { color: #1f6feb; }
.stat-card .value.green { color: #34a853; }

/* ---------- 看板 ---------- */
.kanban-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.kanban-card { background: #fff; border-radius: 10px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.kanban-card .kb-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.kanban-card .kb-head .kb-no { font-weight: 600; color: #1f2d3d; font-size: 14px; }
.kanban-card .kb-meta { color: #909399; font-size: 12px; line-height: 1.8; margin-bottom: 10px; }
.stage-row { margin-bottom: 8px; }
.stage-row .stage-label { display: flex; justify-content: space-between; font-size: 12px; color: #606266; margin-bottom: 3px; }

/* ---------- 工人端大按钮 ---------- */
.worker-nav-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.worker-big-btn {
  background: #fff; border-radius: 12px; padding: 26px 10px; text-align: center; cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,.08); transition: transform .1s; border: 2px solid transparent;
}
.worker-big-btn:hover { transform: translateY(-2px); border-color: #1f6feb; }
.worker-big-btn .icon { font-size: 40px; margin-bottom: 8px; }
.worker-big-btn .txt { font-size: 17px; font-weight: 600; color: #1f2d3d; }
.worker-big-btn .desc { font-size: 12px; color: #909399; margin-top: 4px; }

/* 扫码报工页（大字体大按钮） */
.report-wrap { max-width: 480px; margin: 0 auto; }
.report-step {
  background: #fff; border-radius: 12px; padding: 20px; margin-bottom: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.report-step .step-no {
  display: inline-block; background: #1f6feb; color: #fff; border-radius: 50%;
  width: 26px; height: 26px; line-height: 26px; text-align: center; font-size: 14px; margin-right: 8px;
}
.task-confirm { font-size: 16px; line-height: 2; }
.qty-input { font-size: 34px; font-weight: 700; text-align: center; height: 88px !important; }
.bad-input { font-size: 22px; text-align: center; height: 64px !important; }
.qty-label { font-size: 15px; font-weight: 700; color: #1f2d3d; margin-bottom: 8px; text-align: left; }
.bad-label { font-size: 14px; font-weight: 700; color: #e6a23c; margin: 12px 0 8px; text-align: left; }
/* 工资明细中的修报记录行 */
.correct-row { background: #fdf6ec !important; }
.correct-row td { color: #b45309; }
.big-submit { width: 100%; height: 60px; font-size: 20px; font-weight: 700; letter-spacing: 4px; }
.deduct-item { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed #ebeef5; font-size: 14px; }
.deduct-item .amt { color: #e64340; font-weight: 600; }

/* 订单详情信息网格 */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.info-item { display: flex; flex-direction: column; background: #f8fafc; border: 1px solid #ebeef5; border-radius: 6px; padding: 8px 12px; }
.info-item .info-label { font-size: 12px; color: #909399; margin-bottom: 4px; }

/* 弹窗迷你统计 */
.mini-stat { background: #f8fafc; border: 1px solid #ebeef5; border-radius: 6px; padding: 8px 14px; display: flex; flex-direction: column; min-width: 110px; }
.mini-stat .mini-label { font-size: 12px; color: #909399; margin-bottom: 4px; }

/* ---------- 通用 ---------- */
.page-card { background: #fff; border-radius: 10px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06); margin-bottom: 14px; }
.flex { display: flex; gap: 10px; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.mt10 { margin-top: 10px; } .mb10 { margin-bottom: 10px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.risk-tag { color: #e64340 !important; }
.price-cell { font-weight: 600; color: #1f6feb; }
.amount-cell { font-weight: 700; color: #e64340; }
.text-muted { color: #909399; font-size: 12px; }
.empty-tip { text-align: center; color: #909399; padding: 40px 0; font-size: 14px; }

@media (max-width: 760px) {
  .content { padding: 12px; }
  .kanban-grid { grid-template-columns: 1fr; }
}

/* ===== 移动端适配（手机扫码/工人端） ===== */
@media (max-width: 768px) {
  .layout { flex-direction: column; }
  .sidebar {
    width: 100%; height: auto; flex-direction: row; align-items: center;
    padding: 6px 10px; gap: 6px; overflow-x: auto;
  }
  .sidebar .logo { font-size: 14px; white-space: nowrap; margin-right: 4px; }
  .sidebar .logo small { display: none; }
  .sidebar .nav { display: flex; flex-direction: row; gap: 2px; flex: 1; }
  .sidebar .nav .nav-item { padding: 8px 12px; font-size: 13px; white-space: nowrap; border-radius: 6px; display: flex; align-items: center; gap: 5px; }
  .sidebar .nav .nav-item span { display: inline; }
  .sidebar .nav .nav-item.active { background: #1f6feb; color: #fff; }
  .sidebar .userbox { display: none; }
  .main { width: 100%; }
  .topbar { height: 46px; padding: 0 12px; }
  .topbar .top-right span { font-size: 12px; }
  .content { padding: 10px 10px 30px; }
  .page-title { font-size: 15px; }
  /* 工人端首页三个入口在手机上并排 */
  .worker-nav-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .worker-big-btn { padding: 16px 4px; }
  .worker-big-btn .icon { font-size: 26px; }
  .worker-big-btn .txt { font-size: 14px; }
  .worker-big-btn .desc { font-size: 10px; }
  /* 统计卡片两列 */
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat-card { padding: 12px; }
  /* 扫码取景框 */
  #qr-reader video { border-radius: 10px; }
  .report-step { padding: 14px; }
  .qty-input .el-input__inner, .bad-input .el-input__inner { font-size: 18px; height: 52px; text-align: center; }
}

/* ===== 扫码报工工序确认（谁扫谁报） ===== */
.proc-warn {
  font-size: 26px; font-weight: 900; color: #e11d48;
  text-align: center; margin: 12px 0; line-height: 1.4;
  background: #fff1f2; border: 2px solid #e11d48; border-radius: 10px; padding: 10px 8px;
}
.confirm-tip {
  background: #fff7e6; border: 1px solid #ffd591; color: #ad6800;
  border-radius: 8px; padding: 8px 12px; margin-bottom: 12px;
  font-weight: 700; text-align: center; font-size: 14px;
}
