/* 全局样式 */
html, body { margin: 0; padding: 0; height: 100%; font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif; }
#app { height: 100%; }
.boot { padding: 40px; color: #909399; }

.layout { height: 100vh; }
.aside { background: #001529; color: #fff; }
.aside .logo { height: 60px; line-height: 60px; text-align: center; color: #fff; font-size: 16px; font-weight: bold; letter-spacing: 1px; border-bottom: 1px solid #10314f; }
.aside .el-menu { border-right: none; background: #001529; }
.aside .el-menu-item { color: #c7d2dd; }
.aside .el-menu-item.is-active { background: #1677ff !important; color: #fff !important; }
.aside .el-menu-item:hover { background: #10314f; }
.header { background: #fff; border-bottom: 1px solid #e6e8eb; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; }
.header h2 { font-size: 17px; margin: 0; }
.header-right { display: flex; align-items: center; gap: 16px; }
.user-chip { cursor: pointer; color: #1677ff; font-size: 13px; outline: none; }
.main { background: #f5f7fa; padding: 16px; overflow: auto; }

/* 登录页（独立登录） */
.login-wrap { height: 100vh; display: flex; align-items: center; justify-content: center; background: #001529; }
.login-card { width: 360px; background: #fff; border-radius: 8px; padding: 32px 28px 24px; box-shadow: 0 8px 32px rgba(0,0,0,.35); }
.login-brand { text-align: center; font-size: 26px; font-weight: bold; letter-spacing: 3px; color: #1677ff; }
.login-title { text-align: center; font-size: 16px; margin-top: 6px; color: #303133; }
.login-sub { text-align: center; font-size: 12px; color: #909399; margin: 4px 0 22px; }
.login-err { color: #f56c6c; font-size: 13px; margin-bottom: 12px; }

.card { background: #fff; border-radius: 6px; padding: 16px; margin-bottom: 14px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.muted { color: #909399; font-size: 12px; }
.mono { font-family: Consolas, "Courier New", monospace; font-size: 12px; }
.tag-tail { color: #e6a23c; font-weight: bold; }

.stat { background: #fff; border-radius: 6px; padding: 16px; border-left: 4px solid #1677ff; }
.stat .num { font-size: 26px; font-weight: bold; color: #1677ff; }
.stat .lbl { color: #909399; font-size: 13px; margin-top: 4px; }
.stat.warn { border-left-color: #e6a23c; }
.stat.warn .num { color: #e6a23c; }
.stat.err { border-left-color: #f56c6c; }
.stat.err .num { color: #f56c6c; }

.preview-box { background: #eef0f3; padding: 16px; border-radius: 6px; text-align: center; overflow: auto; }
.preview-box img { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.15); max-width: 100%; }

/* 打印前预览：多箱标签平铺 */
.preview-grid { display: flex; flex-wrap: wrap; gap: 16px; padding: 14px; background: #eef0f3; border-radius: 6px; max-height: 58vh; overflow: auto; }
.preview-item { text-align: center; }
.preview-item .el-image { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.preview-item .el-image img { object-fit: contain; }

.raw-code { background: #1e1e1e; color: #d4d4d4; padding: 12px; border-radius: 4px; white-space: pre-wrap; word-break: break-all; max-height: 60vh; overflow: auto; font-family: Consolas, monospace; font-size: 12px; line-height: 1.5; }

.el-table .tail-row { background: #fff8e6; }

/* ---------------- 打印作业指导书 ----------------
   在「SOP 模板」页点「打印」时，只输出作业定义本身：
   隐藏侧边栏 / 顶栏 / 查询条，图与表不跨页断开。 */
.print-head { display: none; }
@media print {
  html, body, #app, .layout, .el-container, .el-aside, .el-main { height: auto !important; overflow: visible !important; }
  .aside, .header, .toolbar, .no-print { display: none !important; }
  .main { padding: 0 !important; background: #fff !important; }
  .card { box-shadow: none !important; border: 1px solid #ddd; page-break-inside: avoid; margin-bottom: 8px; }
  .el-table { font-size: 11px; }
  .el-table th, .el-table td { padding: 3px 0 !important; }
  .print-head { display: block !important; margin-bottom: 10px; }
  .print-head h1 { font-size: 18px; margin: 0 0 4px; }
  .print-head .meta { font-size: 12px; color: #333; line-height: 1.7; }
  .photo-grid img { max-height: 48mm !important; width: auto !important; }
  a[href]:after { content: "" !important; }
  @page { margin: 10mm; }
}

