/* ============================================================
 * 退货扫描管理系统 · 样式
 * ============================================================ */

:root {
  --sidebar-w: 190px;
  --brand: #2f6fed;
  --line: #e6e8eb;
  --text: #1f2329;
  --muted: #8a9099;
  --bg: #f5f6f8;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
}
[v-cloak] { display: none; }
.boot { padding: 40px; color: var(--muted); }

/* ---------------- 登录 ---------------- */
.login-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; background: #eef1f6;
}
.login-card {
  width: 340px; padding: 34px 28px 24px; background: #fff;
  border-radius: 12px; box-shadow: 0 6px 24px rgba(0, 0, 0, .07);
}
.login-title { font-size: 20px; font-weight: 600; text-align: center; }
.login-sub { text-align: center; color: var(--muted); margin: 6px 0 22px; font-size: 13px; }

/* ---------------- 布局 ---------------- */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); flex: none; background: #232a36; color: #c8ced8; }
.brand {
  height: 56px; line-height: 56px; text-align: center;
  color: #fff; font-weight: 600; letter-spacing: 2px; font-size: 15px;
}
.nav { padding: 8px 0; }
.nav-item {
  display: block; padding: 11px 20px; cursor: pointer;
  font-size: 14px; border-left: 3px solid transparent; user-select: none;
}
.nav-item:hover { background: #2c3441; color: #fff; }
.nav-item.active { background: #2c3441; color: #fff; border-left-color: var(--brand); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; height: 56px; padding: 0 20px;
  background: #fff; border-bottom: 1px solid var(--line);
}
.topbar-title { margin: 0; font-size: 16px; font-weight: 500; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.who { color: var(--muted); }
.content { flex: 1; padding: 16px 20px 40px; }

/* ---------------- 通用 ---------------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
.card + .card { margin-top: 14px; }
.card-title {
  font-size: 15px; font-weight: 500; margin-bottom: 12px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.card-title .desc { font-size: 12px; color: var(--muted); font-weight: 400; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.mt8 { margin-top: 8px; }
.mt12 { margin-top: 12px; }
.mb12 { margin-bottom: 12px; }

.scan-box { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.scan-input { flex: 1; }
.scan-tip { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.6; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px;
}
.stat-label { font-size: 13px; color: var(--muted); }
.stat-value { font-size: 24px; font-weight: 600; margin-top: 4px; }
.stat-value.accent { color: var(--brand); }

/* 未确认面单高亮 */
.pending-row { background: #fff8e6; }

/* ---------------- 打印区域（页面上即所见即所得） ---------------- */
#printArea { background: #fff; padding: 12px 14px; }
.print-title { text-align: center; font-size: 18px; font-weight: 600; margin: 0 0 14px; }
.print-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.print-table th, .print-table td { border: 1px solid #333; padding: 6px 8px; text-align: left; }
.print-table th { background: #f2f4f7; font-weight: 500; }
.print-table td.num { width: 60px; }
.print-meta { font-size: 12px; color: var(--muted); margin-top: 10px; display: flex; justify-content: space-between; }

/* ---------------- 打印输出：只保留打印区 ---------------- */
@media print {
  @page { size: A4 portrait; margin: 10mm; }
  body { background: #fff; }
  body * { visibility: hidden; }
  #printArea, #printArea * { visibility: visible; }
  #printArea { position: absolute; left: 0; top: 0; width: 100%; padding: 0; }
  .print-title { font-size: 16pt; margin-bottom: 8mm; }
  .print-table { font-size: 11pt; }
  .print-table th, .print-table td { border: 1px solid #000; padding: 5px 6px; }
  .print-table th {
    background: #f0f0f0 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .print-meta { color: #333; }
}
