:root {
  --bg: #f1f3f6;
  --panel: #ffffff;
  --ink: #16202c;
  --muted: #667487;
  --line: #dfe4ea;
  /* 主题色跟着公司 logo 走：盾牌藏蓝 + 闪电金 */
  --brand: #0d3a66;
  --brand-2: #1c6ea8;
  --navy-deep: #071f3a;
  --accent: #c8901a;
  --gold: #d4a218;
  --gold-2: #f0c040;
  --danger: #b91c1c;
  --warn: #b45309;
  --ok: #15803d;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 30, 50, .06), 0 6px 20px rgba(16, 30, 50, .06);
}

/* ---------------- 销售履约：仓库发货任务 ---------------- */
.warehouse-task-page {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
}

.warehouse-task-intro {
  position: relative;
  overflow: hidden;
  padding: 22px 24px;
  border: 1px solid #173e64;
  border-radius: 12px;
  color: #eaf3fb;
  background: linear-gradient(110deg, #071f3a, #0d3a66);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, .85fr);
  align-items: center;
  gap: 24px;
}

.warehouse-task-intro::after {
  content: "";
  position: absolute;
  right: -48px;
  bottom: -70px;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(162, 200, 232, .13);
  border-radius: 50%;
  box-shadow: 0 0 0 32px rgba(162, 200, 232, .035),
    0 0 0 64px rgba(162, 200, 232, .025);
  pointer-events: none;
}

.warehouse-task-intro > div { position: relative; z-index: 1; }
.warehouse-task-intro .eyebrow {
  margin-bottom: 7px;
  color: #f0c45d;
  font-size: 10px;
}
.warehouse-task-intro h3 {
  margin: 0;
  color: #fff;
  font-size: 20px;
  line-height: 1.35;
}
.warehouse-task-intro p {
  max-width: 720px;
  margin: 7px 0 0;
  color: #a9c0d5;
  font-size: 11.5px;
  line-height: 1.7;
}

.warehouse-task-route {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
}
.warehouse-task-route span {
  flex: 0 0 auto;
  color: #8faac2;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.warehouse-task-route span.active {
  color: #ffda78;
  font-weight: 600;
}
.warehouse-task-route i {
  min-width: 22px;
  height: 1px;
  flex: 1 1 22px;
  background: rgba(178, 204, 226, .24);
}

.warehouse-task-summary-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}
.warehouse-task-summary {
  min-height: 88px;
  padding: 15px 18px;
  border-right: 1px solid var(--line);
}
.warehouse-task-summary:last-child { border-right: 0; }
.warehouse-task-summary > span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.warehouse-task-summary strong {
  display: block;
  margin-top: 7px;
  color: var(--ink);
  font: 500 28px/1 "Bahnschrift", "DIN Alternate", "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
}
.warehouse-task-summary.accent {
  color: #fff;
  background: var(--brand);
}
.warehouse-task-summary.accent > span,
.warehouse-task-summary.accent strong { color: #fff; }

.warehouse-task-card { margin-top: 14px; }
.warehouse-task-card-head {
  align-items: flex-start;
  min-height: 68px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.warehouse-task-card-head > div:first-child {
  min-width: 0;
}
.warehouse-task-card-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.warehouse-task-controls {
  margin-left: auto;
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 7px;
}
.warehouse-task-view-label {
  color: #506176;
  font-size: 10px;
  font-weight: 600;
}
.warehouse-task-filters {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.warehouse-task-filters button {
  min-height: 29px;
  padding: 4px 9px;
  border: 1px solid #d4dde7;
  border-radius: 7px;
  color: #596b7e;
  background: #fff;
  font: inherit;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.warehouse-task-filters button:hover {
  border-color: #9eb4c9;
  background: #f6f9fc;
}
.warehouse-task-filters button.active {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
}

.warehouse-task-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  background: #fff;
}
.warehouse-task-table th,
.warehouse-task-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #edf1f5;
  text-align: left;
  vertical-align: middle;
}
.warehouse-task-table th {
  color: #667487;
  background: #f7f9fc;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.warehouse-task-table td {
  color: #2d3d50;
  font-size: 11px;
  line-height: 1.5;
}
.warehouse-task-table tbody tr:last-child td { border-bottom: 0; }
.warehouse-task-table tbody tr:hover { background: #fafcff; }
.warehouse-task-table td > b { color: #193955; font-weight: 600; }
.warehouse-task-table td > small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}
.warehouse-task-table .num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.warehouse-task-table .ops {
  width: 1%;
  text-align: right;
  white-space: nowrap;
}
.warehouse-task-table .ops .btn + .btn,
.warehouse-task-table .ops .btn + .muted { margin-left: 5px; }
.warehouse-task-qty {
  width: 92px;
  height: 32px;
  padding: 4px 7px;
  border: 1px solid #cfd9e5;
  border-radius: 7px;
  text-align: right;
  font: inherit;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1080px) {
  .warehouse-task-intro {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .warehouse-task-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .warehouse-task-summary:nth-child(2) { border-right: 0; }
  .warehouse-task-summary:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 760px) {
  .warehouse-task-intro {
    padding: 18px;
  }
  .warehouse-task-intro h3 { font-size: 18px; }
  .warehouse-task-summary-grid {
    grid-template-columns: 1fr;
  }
  .warehouse-task-summary {
    min-height: 76px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .warehouse-task-summary:last-child { border-bottom: 0; }
  .warehouse-task-card-head {
    align-items: stretch;
    flex-direction: column;
  }
  .warehouse-task-controls {
    align-items: flex-start;
  }
  .warehouse-task-filters { width: 100%; }
  .warehouse-task-table { min-width: 760px; }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 15px/1.58 "Microsoft YaHei", "PingFang SC", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
/* 链接不加下划线（名称下面那道横线看着像分隔线，影响阅读）；
   鼠标移上去才显示下划线，用颜色区分可点 */
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

/* ---------- 登录 ---------- */
.login-wrap {
  min-height: 100%;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 420px at 8% 0%, rgba(28, 110, 168, .55), transparent 62%),
    radial-gradient(760px 420px at 100% 100%, rgba(212, 162, 24, .18), transparent 60%),
    linear-gradient(140deg, #071f3a 0%, #0a2b4d 55%, #0d3a66 100%);
  padding: 24px;
}
/* 背景：放大的 logo 当水印，后面一圈光晕 + 极淡的科技网格 */
.login-bg {
  position: absolute; inset: 0; display: grid; place-items: center;
  pointer-events: none; z-index: 0;
}
.login-bg::before {
  content: ''; position: absolute; inset: -10%;
  background-image:
    linear-gradient(rgba(120, 180, 240, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 180, 240, .055) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 50%, #000 30%, transparent 72%);
}
.login-bg > img.lb-watermark {
  position: absolute; left: -6%; top: 50%;
  width: min(96vmin, 980px); height: auto;
  opacity: .085; filter: saturate(.9) contrast(1.05) blur(.4px);
  transform: translate(0, -50%);
  animation: lbFloat 14s ease-in-out infinite;
}
.lb-halo {
  position: absolute; width: min(122vmin, 1180px); aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(28, 110, 168, .30) 0%, rgba(28, 110, 168, .12) 42%, transparent 68%);
  animation: lbPulse 6s ease-in-out infinite;
}
/* 旋转的雷达环 */
.lb-radar {
  position: absolute; width: min(118vmin, 1140px); aspect-ratio: 1; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(120, 190, 255, .28), rgba(120, 190, 255, 0) 26%, rgba(240, 192, 64, .16) 50%, rgba(120, 190, 255, 0) 74%, rgba(120, 190, 255, .28));
  -webkit-mask: radial-gradient(circle, transparent 61%, #000 62%, #000 64%, transparent 65%);
  mask: radial-gradient(circle, transparent 61%, #000 62%, #000 64%, transparent 65%);
  animation: lbSpin 26s linear infinite;
  opacity: .8;
}
@keyframes lbSpin { to { transform: rotate(360deg); } }
/* 从上往下扫的光带 */
.lb-scan {
  position: absolute; left: 0; right: 0; height: 140px;
  background: linear-gradient(180deg, transparent, rgba(120, 190, 255, .10), transparent);
  animation: lbScan 9s linear infinite;
}
@keyframes lbScan {
  0% { top: -140px; }
  100% { top: 100%; }
}
/* 四角 HUD 角标 + 状态 */
.login-hud { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.login-hud .hud-status {
  position: absolute; top: 26px; left: 32px; display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: #9db4cd; letter-spacing: .08em;
}
.login-hud .hud-status i {
  width: 7px; height: 7px; border-radius: 50%; background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); animation: pulse 2.4s infinite;
}
.login-hud .hud-meta {
  position: absolute; bottom: 26px; left: 32px;
  font-size: 11.5px; color: #6d839b; letter-spacing: .12em;
}
.login-hud .hud-br { left: auto; right: 32px; }
.login-shell::before, .login-shell::after {
  content: ''; position: absolute; width: 26px; height: 26px; pointer-events: none;
  border: 1px solid rgba(240, 192, 64, .55); z-index: 2;
}
.login-shell::before { top: -10px; left: -10px; border-right: 0; border-bottom: 0; }
.login-shell::after { bottom: -10px; right: -10px; border-left: 0; border-top: 0; }
@keyframes lbFloat {
  0%, 100% { transform: translate(0, -50%) scale(1); }
  50% { transform: translate(1.2%, -52%) scale(1.015); }
}
/* 底部透视网格地面：给画面做纵深 */
.lb-floor {
  position: absolute; left: -30%; right: -30%; bottom: -14%; height: 62vh;
  background-image:
    linear-gradient(rgba(120, 190, 255, .16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 190, 255, .16) 1px, transparent 1px);
  background-size: 64px 64px;
  transform: perspective(520px) rotateX(64deg);
  transform-origin: bottom center;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 35%, #000 68%, transparent 96%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 35%, #000 68%, transparent 96%);
  opacity: .55;
}
@keyframes lbPulse {
  0%, 100% { opacity: .55; transform: scale(1); }
  50% { opacity: .85; transform: scale(1.04); }
}
.login-wrap { display: flex; align-items: center; justify-content: center; gap: clamp(40px, 6vw, 96px); padding: 0 6vw; }
/* 左边一大片设计区 */
.login-left {
  position: relative; z-index: 1; flex: 1 1 auto; min-width: 0;
  display: flex; align-items: flex-end; justify-content: flex-start;
  padding: 0 0 68px 76px;
}
.lb-mark { position: relative; }
.lb-mark img {
  width: 118px; height: 118px; object-fit: contain; display: block; margin-bottom: 22px;
  filter: drop-shadow(0 10px 30px rgba(28, 110, 168, .55));
}
.lb-mark h1 {
  margin: 0; font-size: 46px; letter-spacing: .2em; text-transform: uppercase;
  color: #fff; font-weight: 600; line-height: 1.1;
  text-shadow: 0 8px 30px rgba(0, 0, 0, .45);
}
.lb-mark p { margin: 12px 0 0; font-size: 13.5px; color: #a9bdd3; letter-spacing: .08em; }
.lb-mark .lb-line {
  width: 72px; height: 3px; margin-top: 26px;
  background: linear-gradient(90deg, var(--gold-2), rgba(240, 192, 64, 0));
  border-radius: 2px;
}
.login-card {
  position: relative; z-index: 2;
  flex: 0 0 auto; width: min(420px, 40vw); align-self: center; margin-right: 7vw;
  padding: 38px 36px 30px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(9, 30, 54, .72), rgba(6, 22, 40, .82));
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  border: 1px solid rgba(255, 255, 255, .14);
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
  box-shadow: 0 30px 70px rgba(2, 10, 20, .55), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.login-card::before {
  content: ''; position: absolute; left: 18px; right: 18px; top: 0; height: 2px;
  background: linear-gradient(90deg, rgba(240, 192, 64, 0), rgba(240, 192, 64, .8), rgba(240, 192, 64, 0));
}
.login-bg::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 260px 70px rgba(3, 14, 28, .75);
}
.lc-head { margin-bottom: 8px; }
.lc-head h2 { font-size: 22px; letter-spacing: .16em; color: #fff; }
.lc-head span { display: block; margin-top: 6px; font-size: 12.5px; color: #8fa6c0; letter-spacing: .04em; }
.login-card label { color: #9db4cd; }
.login-card label input {
  height: 44px; color: #eaf2fa; background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .16);
}
.login-card label input::placeholder { color: #6f869e; }
.login-card label input:focus {
  border-color: rgba(240, 192, 64, .8); box-shadow: 0 0 0 3px rgba(240, 192, 64, .18);
  background: rgba(255, 255, 255, .09);
}
.login-card .btn.primary {
  height: 46px; font-size: 15px; letter-spacing: .18em; margin-top: 8px;
  background: linear-gradient(180deg, #f0c040, #c8901a);
  border-color: rgba(240, 192, 64, .9); color: #1b1205; font-weight: 600;
}
.login-card .btn.primary:hover { background: linear-gradient(180deg, #f6cf5c, #d39b20); }
.lc-foot { margin: 10px 0 0; text-align: center; font-size: 11.5px; color: #6f869e; }
.login-card .brand { display: flex; gap: 14px; align-items: center; margin-bottom: 6px; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 11px;
  background: transparent;                     /* 透明底，露出 logo 本身 */
  display: grid; place-items: center; overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
/* 侧边栏是深色底，盾牌外侧加一点浅色光晕，免得暗部糊在一起 */
.brand.small .brand-mark {
  background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 70%);
}
.login-card h1 { font-size: 21px; text-transform: uppercase; letter-spacing: .09em; }
.login-card p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.login-card label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.login-hint { font-size: 12px; color: var(--muted); text-align: center; margin: 4px 0 0; }
.login-foot { border-top: 1px dashed var(--line); margin-top: 4px; padding-top: 12px; }
.login-foot .login-hint { text-align: left; line-height: 1.6; }
.login-addr {
  margin: 8px 0 0; padding: 9px 11px; border-radius: 8px; text-align: center;
  background: #f2f6fb; border: 1px solid #d9e4f0; color: var(--brand);
  font: 600 14px/1.4 "Consolas", "Microsoft YaHei", monospace;
  letter-spacing: .02em; user-select: all; word-break: break-all;
}
.login-addr.plain { font: 13px/1.5 "Microsoft YaHei", system-ui, sans-serif; font-weight: 400; color: var(--muted); }

/* ---------- 布局 ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 242px; flex: 0 0 242px;
  min-width: 0;
  background: linear-gradient(180deg, #0b2f56 0%, #071f3a 100%);
  color: #cbd5e1;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  overflow: hidden;
  transition: transform .2s ease;
}
.sidebar-hover-zone { display: none; }
.brand.small { display: flex; gap: 10px; align-items: center; padding: 16px 16px 14px; }
.brand.small .brand-mark { width: 36px; height: 36px; font-size: 13px; border-radius: 9px; }
.brand.small strong {
  display: block; color: #fff; font-size: 15px;
  text-transform: uppercase; letter-spacing: .08em;   /* 跟 logo 上的 SAFEBLAST 一致 */
}
.brand.small span { font-size: 11.5px; color: #8fa3ba; }
.sidebar nav { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 8px 16px; }
.nav-section { margin-bottom: 2px; }
.nav-items { display: block; }
.nav-section.collapsed .nav-items { display: none; }
.nav-group {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  border: 0; background: none; cursor: pointer;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC",
    "Noto Sans CJK SC", system-ui, sans-serif;
  font-size: 14px; font-weight: 600; text-transform: none;
  letter-spacing: .02em; color: #a8bbcf; padding: 14px 10px 8px; text-align: left;
}
.nav-group:hover { color: #dbe7f3; }
.nav-chevron { font-style: normal; font-size: 14px; line-height: 1; transition: transform .16s ease; }
.nav-section.collapsed .nav-chevron { transform: rotate(-90deg); }
.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px; border-radius: 8px; cursor: pointer;
  font-size: 15px; line-height: 1.45; color: #d3dde8; border: 0; background: none;
  width: 100%; text-align: left;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC",
    "Noto Sans CJK SC", system-ui, sans-serif;
}
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(28, 110, 168, .55), rgba(28, 110, 168, .12));
  color: #fff; box-shadow: inset 3px 0 0 var(--gold-2);
}
.nav-item .ic { width: 18px; text-align: center; opacity: .9; }
.nav-item .badge {
  margin-left: auto; background: #b91c1c; color: #fff;
  border-radius: 9px; font-size: 11px; padding: 0 6px; line-height: 17px;
}
.system-switch {
  flex: 0 0 auto;
  border-top: 1px solid rgba(255, 255, 255, .09);
  padding: 0;
  background: rgba(3, 18, 34, .22);
}
.system-switch-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 18px;
  color: #7991aa;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.system-switch-label::-webkit-details-marker { display: none; }
.system-switch-label:hover { color: #b8cce0; background: rgba(255, 255, 255, .035); }
.system-switch-chevron {
  font-style: normal;
  font-size: 14px;
  line-height: 1;
  color: #7f9bb5;
  transition: transform .16s ease;
}
.system-switch[open] .system-switch-chevron { transform: rotate(180deg); }
.system-switch-items {
  display: grid;
  gap: 5px;
  padding: 2px 8px 9px;
}
.system-switch-item {
  background: rgba(28, 110, 168, .13);
  border: 1px solid rgba(120, 180, 235, .13);
  font-size: 15px;
  line-height: 1.45;
  padding: 9px 10px;
}
.system-switch-item:hover { background: rgba(28, 110, 168, .25); }
.system-switch-item .switch-arrow { margin-left: auto; color: #7fb9e9; }
.sidebar-foot { border-top: 1px solid rgba(255, 255, 255, .09); padding: 12px; font-size: 12.5px; }
#who { color: #fff; margin-bottom: 2px; }
#who small { color: #8fa3ba; display: block; }
.sidebar-auth-actions { display: flex; gap: 6px; margin-top: 8px; }
.sidebar-auth-actions .btn { flex: 1; color: #cbd5e1; }
.sidebar-auth-actions .btn:hover { color: #fff; background: rgba(255, 255, 255, .08); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 58px; background: var(--panel); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; padding: 0 18px;
  position: sticky; top: 0; z-index: 20;
}
.topbar h2 { font-size: 16px; flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
#menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex: 0 0 34px; padding: 0;
  font-size: 18px; line-height: 1;
}
.clock { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.body { padding: 18px; max-width: none; width: 100%; transition: padding-left .2s ease; }

/* ---------- 通用组件 ---------- */
.btn {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 8px; padding: 7px 13px; font-size: 13.5px; cursor: pointer;
  font-family: inherit; transition: .12s; white-space: nowrap;
}
.btn:hover { background: #f6f8fb; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); }
.btn.danger { background: #fff; border-color: #f0c4c4; color: var(--danger); }
.btn.danger:hover { background: #fdf2f2; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: rgba(0, 0, 0, .05); }
.btn.small { padding: 4px 9px; font-size: 12.5px; }
.btn.block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

input, select, textarea {
  font: inherit; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(44, 74, 110, .28); border-color: var(--brand-2); }
input[readonly] { background: #f4f6f9; color: var(--muted); }
label.field { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); }
label.field > span { font-weight: 500; }

.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid-note {
  padding: 10px 12px;
  border: 1px solid #d7e3ef;
  border-radius: 9px;
  background: #f4f8fc;
  color: #4d6175;
  font-size: 12.5px;
  line-height: 1.65;
}

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card.kpi.clickable-kpi {
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.card.kpi.clickable-kpi:hover {
  border-color: #9fb5c8;
  box-shadow: 0 8px 22px rgba(20, 58, 94, .10);
  transform: translateY(-1px);
}
.card.kpi.clickable-kpi:focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: 2px;
}
.kpi-data-target-highlight {
  animation: kpiDataTarget 1.5s ease-out;
}
@keyframes kpiDataTarget {
  0%, 100% { box-shadow: var(--shadow); }
  30% { box-shadow: 0 0 0 3px rgba(28, 110, 168, .18), 0 10px 26px rgba(20, 58, 94, .12); }
}
.card + .card { margin-top: 14px; }
.grid > .card,
.grid > .card + .card { margin-top: 0; }
.card-head {
  padding: 12px 15px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.card-head h3 { font-size: 14.5px; flex: 1; min-width: 120px; }
.card-body { padding: 15px; }
.card-body.tight { padding: 0; }

.kpi { padding: 14px 16px; }
.kpi .v { font-size: 25px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.kpi .l { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.kpi.accent .v { color: var(--accent); }
.kpi.danger .v { color: var(--danger); }
.kpi.ok .v { color: var(--ok); }

table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
thead th {
  text-align: left; font-weight: 600; color: var(--muted); font-size: 12.5px;
  padding: 9px 12px; background: #f7f9fc; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 1; white-space: nowrap;
}
/* 总表每个分区一张表：分区标题固定在顶上，列名紧接着停在它下面 ——
   下滑时永远知道自己在看哪一类、哪几列。 */
.table-wrap thead tr.cols > th { top: 40px; z-index: 2; }
tbody td { padding: 8px 12px; border-bottom: 1px solid #eef1f5; vertical-align: middle; }
tbody tr:hover { background: #fafbfd; }
tbody tr.total { font-weight: 600; background: #f7f9fc; }
.table-wrap { overflow: auto; max-height: 68vh; }
@media (min-width: 901px) and (min-height: 620px) {
  .master-shell {
    height: calc(100vh - 94px);
    height: calc(100dvh - 94px);
    min-height: 500px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .master-shell > .card-head { flex: 0 0 auto; }
  .master-list-body { flex: 1 1 auto; min-height: 0; overflow: hidden; }
  .master-table-wrap {
    height: 100%;
    max-height: none;
    overflow: auto;
  }
}
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.center, td.center, th.center { text-align: center !important; }
.doc-number-print { display: none !important; }

/* 库存汇总：把“名称 + 数量”做成不可拆行的紧凑标签 */
.stock-pairs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  min-width: 120px;
}
.stock-pair {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  max-width: 100%;
  padding: 1px 7px;
  border: 1px solid #dce6f1;
  border-radius: 7px;
  background: #f7faff;
  color: #42556b;
  font-size: 11.5px;
  line-height: 19px;
  white-space: nowrap;
}
.stock-pair > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
}
.stock-pair b {
  color: #172b42;
  font-variant-numeric: tabular-nums;
}
.batch-pairs { min-width: 96px; }
.batch-pair {
  border-color: #f0dca9;
  background: #fffaf0;
}
.batch-pair .batch-no { color: #8a6416; }
.stock-summary-table tbody td { vertical-align: top; }
.stock-summary-table td.batch-cell { min-width: 105px; }
.stock-summary-table td.distribution-cell { min-width: 190px; }
.stock-summary-table td.stock-row-actions { white-space: nowrap; }

.tag {
  display: inline-block; padding: 1px 8px; border-radius: 20px;
  font-size: 11.5px; border: 1px solid; line-height: 18px; white-space: nowrap;
}
.tag.gray { color: #475569; border-color: #d7dee7; background: #f6f8fb; }
.tag.blue { color: #1d4ed8; border-color: #c7d7fb; background: #eff4ff; }
.tag.green { color: #15803d; border-color: #bfe3cb; background: #f0fbf3; }
.tag.amber { color: #b45309; border-color: #f3dcb4; background: #fff8ec; }
.tag.red { color: #b91c1c; border-color: #f3c4c4; background: #fdf2f2; }
.tag.purple { color: #6d28d9; border-color: #ddd0fb; background: #f6f2ff; }

.hazard-banner {
  background: #fff8ec; border: 1px solid #f3dcb4; color: #92400e;
  padding: 10px 13px; border-radius: 9px; font-size: 13px; display: flex; gap: 9px;
}
.empty { padding: 40px 16px; text-align: center; color: var(--muted); }
.empty .big { font-size: 30px; margin-bottom: 8px; opacity: .5; }

.toolbar { display: flex; gap: 9px; flex-wrap: wrap; align-items: flex-end; }
.toolbar .field { min-width: 140px; }

/* ---------- 单据类型选择 ---------- */
.cat-chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 20px; padding: 5px 13px; font: inherit; font-size: 13px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; transition: .12s;
}
.chip:hover { background: #f6f8fb; }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip em { font-style: normal; font-size: 11.5px; opacity: .65; }
.chip.on em { opacity: .85; }

/* 分类标题行：每个分区最上面一行（上面是它，下面是这一类的列名和数据） */
.group-head {
  background: #eef3fa !important; color: #1f3550; font-size: 13.5px;
  border-top: 2px solid #cfdcec; border-bottom: 1px solid #cfdcec;
  position: sticky; top: 0; z-index: 3;
  height: 42px; padding: 5px 12px; text-align: left;
}
.group-head .muted { font-weight: 400; font-size: 12px; margin-left: 8px; }
/* 分区名（点一下改名字） */
.group-head .gh-name { cursor: pointer; border-bottom: 1px dashed #8aa4c4; }
.group-head .gh-name:hover { color: var(--brand); }
/* 分区标题右边的按钮：入库 / 出库 / 转移 / ＋增加 / 删除这类 */
.group-head .group-acts {
  display: inline-flex; gap: 5px; align-items: center;
  margin-left: 12px; vertical-align: middle;
}
.group-head .group-acts .btn {
  background: #fff; border-color: #cfdcec; color: #35506f;
  padding: 2px 9px; font-size: 12px;
}
.group-head .group-acts .btn:hover { background: #f2f7ff; border-color: #a9c2dd; }
/* 卡片标题栏里的「已选 N 项」批量操作条 */
.selbar { margin-left: auto; display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
/* 「当页记账」小窗顶上那条：自动记账到哪本台账 */
.auto-note {
  background: #eef3fa; border: 1px solid #cfdcec; color: #1f3550;
  border-radius: 9px; padding: 10px 13px; font-size: 13px;
}
.auto-note .muted { color: #667487; }
/* 照片旁边「照着手打」那一行 */
.cand-add {
  display: flex; flex-wrap: wrap; gap: 7px; align-items: center;
  margin-top: 12px; padding: 10px 12px; border: 1px dashed #c6d2e0;
  border-radius: 9px; background: #fbfcfe;
}
/* 危险 / 不可恢复的提示（删除、冲销这类） */
.danger-note {
  background: #fdf2f2; border: 1px solid #f3c4c4; color: #8c1c1c;
  border-radius: 9px; padding: 10px 13px; font-size: 13px; display: flex; gap: 9px;
}
/* 页面内确认框里的说明文字 */
.ask-msg { font-size: 13.5px; line-height: 1.7; color: #16202c; }
.ask-msg b { color: #b91c1c; }
/* 服务器换了新版界面时，提醒刷新（省得对着旧页面找按钮） */
.page-hint {
  background: #f4f8ff; border: 1px solid #d7e3f5; color: #274b73;
  border-radius: 9px; padding: 9px 13px; font-size: 13px; margin-bottom: 14px;
}
.update-bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 999;
  display: flex; align-items: center; gap: 10px;
  background: #16202c; color: #fff; border-radius: 10px; padding: 10px 14px;
  font-size: 13.5px; box-shadow: 0 8px 24px rgba(15, 32, 55, .28);
}
.ov-table th.selcol, .ov-table td.selcol { width: 2%; }
/* 所有分区共用同一套列宽（table-layout:fixed + colgroup），
   这样每张表的每一列都对齐，「操作」那一列也永远在同一个位置 */
.ov-table {
  table-layout: fixed;
  width: 100%;
  min-width: 0;
  font-size: 12.5px;
}
/* 列表类表格：列宽定死，中文不会被挤成竖排 */
.t-fixed { table-layout: fixed; min-width: 1000px; }
.t-fixed td, .t-fixed th { overflow: hidden; text-overflow: ellipsis; }
.t-fixed td .tag {
  max-width: none;
  overflow: visible;
  text-overflow: clip;
}
/* 多行内容（物料摘要、备注）允许换行，别裁掉 */
.t-fixed td.wrap-ok { white-space: normal; overflow: visible; }
/* 「操作」列保留在表格最右侧；不使用悬浮固定，避免覆盖库存数字。 */
.ov-table th.opscol {
  width: auto; white-space: normal; line-height: 1.25;
}
.ov-table tbody td.ops {
  white-space: normal; background: #fff;
}
.ov-table tbody tr:hover td.ops { background: #fafbfd; }
/* 总表列多，间距收紧一点，尽量一屏放得下，不用左右拉 */
.ov-table thead th, .ov-table tbody td {
  padding-left: 6px;
  padding-right: 6px;
}
.ov-table thead th { white-space: normal; line-height: 1.25; }
.ov-table .ops .btn {
  padding: 4px 6px;
  margin: 2px 2px 0 0;
  vertical-align: middle;
}
.ov-table td.clip-cell { max-width: 132px; }
.ov-table small.clip { max-width: 100px; }
.ov-table th.namecol { width: auto; }
.ov-table td.name-cell {
  width: auto;
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ov-table td.name-cell a { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
td.ed { cursor: text; border-bottom: 1px dashed #c6d2e0 !important; }
td.ed:hover { background: #fffdf4; box-shadow: inset 0 0 0 1px #f3dcb4; }
td.ed input { padding: 3px 6px; font-size: 13px; }
@media (max-width: 920px) {
  .ov-table { min-width: 1080px; }
}
/* 备注之类的长文字压成一行，鼠标停上去看全文，别把表格行撑高 */
small.clip {
  display: block; max-width: 150px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
/* 一行放不下就省略号，鼠标停上去看全文；别把表格行撑成好几行 */
td.clip-cell {
  max-width: 170px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap;
}

.dtype-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.dtype-pick button {
  border: 1px solid var(--line); background: #fff; border-radius: 9px;
  padding: 9px 13px; cursor: pointer; font: inherit; font-size: 13.5px; text-align: left;
  display: flex; flex-direction: column; gap: 1px; min-width: 108px;
}
.dtype-pick button small { color: var(--muted); font-size: 11.5px; }
.dtype-pick button.on { border-color: var(--brand-2); background: #eef3fa; box-shadow: inset 0 0 0 1px var(--brand-2); }
.dtype-pick button.on small { color: var(--brand-2); }
.dtype-pick-btn {
  border: 1px solid var(--line); background: #fff; border-radius: 9px;
  padding: 12px 18px; cursor: pointer; font: inherit; font-size: 14px;
  display: flex; flex-direction: column; gap: 2px; text-align: left; min-width: 190px;
}
.dtype-pick-btn small { color: var(--muted); font-size: 11.5px; }
.dtype-pick-btn:hover { border-color: var(--brand-2); background: #f7f9fc; }
.dtype-pick-btn.on {
  border-color: var(--brand-2); background: #eef3fa;
  box-shadow: inset 0 0 0 1px var(--brand-2);
}
.dtype-pick-btn.on small { color: var(--brand-2); }

/* ---------- 物料选择下拉 ---------- */
.combo { position: relative; }
.combo-list {
  position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 3px);
  background: #fff; border: 1px solid var(--line); border-radius: 9px;
  box-shadow: 0 10px 30px rgba(16, 30, 50, .16); max-height: 250px; overflow: auto; min-width: 240px;
}
.combo-list div { padding: 7px 11px; cursor: pointer; font-size: 13px; display: flex; gap: 8px; }
.combo-list div:hover, .combo-list div.hi { background: #eef3fa; }
.combo-list div .sub { color: var(--muted); font-size: 11.5px; margin-left: auto; }
.combo-list .none { color: var(--muted); cursor: default; }
.combo-list .none:hover { background: none; }
.combo-list .combo-head {
  position: sticky; top: 0; background: #f4f7fb; color: #1f3550;
  font-size: 11.5px; font-weight: 600; letter-spacing: .02em;
  padding: 5px 11px; border-bottom: 1px solid #e4eaf2; cursor: default;
  display: block;
}
.combo-list .combo-head:hover { background: #f4f7fb; }
.combo-list .combo-head em { font-style: normal; color: var(--muted); font-weight: 400; }
.combo-list .combo-head b { color: #b45309; font-weight: 600; }
.conv { font-size: 11.5px; color: #15803d; margin-top: 2px; white-space: nowrap; }

/* ---------- 流转链 ---------- */
.trace { position: relative; padding-left: 20px; }
.trace::before {
  content: ''; position: absolute; left: 5px; top: 8px; bottom: 8px;
  width: 2px; background: #dfe4ea;
}
.trace-item { position: relative; padding: 0 0 12px 8px; }
.trace-dot {
  position: absolute; left: -19px; top: 6px; width: 11px; height: 11px;
  border-radius: 50%; background: #94a3b8; border: 2px solid #fff;
  box-shadow: 0 0 0 1px #dfe4ea;
}
.trace-dot.green { background: #15803d; }
.trace-dot.blue { background: #1d4ed8; }
.trace-dot.amber { background: #b45309; }
.trace-dot.purple { background: #6d28d9; }
.trace-dot.red { background: #b91c1c; }
.trace-body { background: #fafbfd; border: 1px solid #eef1f5; border-radius: 8px; padding: 8px 11px; }
.trace-head { display: flex; gap: 9px; align-items: center; font-size: 13.5px; flex-wrap: wrap; }
.trace-meta { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.step-table td { vertical-align: top; font-size: 13px; }
.step-table .tl { display: inline-block; white-space: nowrap; }
.step-table .tl b { font-weight: 600; }

.drop-zone {
  border: 2px dashed #c6d2e0; border-radius: 12px; padding: 26px 18px;
  text-align: center; cursor: pointer; background: #fafbfd; color: var(--ink);
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  transition: .15s;
}
.drop-zone:hover, .drop-zone.over { border-color: var(--brand-2); background: #eef3fa; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.photo-card {
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  background: #fff; display: flex; flex-direction: column; position: relative;
}
.photo-thumb {
  height: 150px; background: #eef1f5; display: grid; place-items: center;
  cursor: zoom-in; overflow: hidden;
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-meta { padding: 8px 10px 4px; display: flex; flex-direction: column; gap: 4px; }
.photo-name { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-acts { padding: 6px 10px 10px; display: flex; gap: 6px; }
.photo-pick { position: absolute; top: 7px; left: 7px; z-index: 2;
  background: rgba(255,255,255,.92); border-radius: 6px; padding: 2px 5px; }
.photo-pick input { width: auto; }

.mini-photo {
  width: 104px; height: 104px; border: 1px solid var(--line); border-radius: 8px;
  overflow: hidden; cursor: zoom-in; background: #eef1f5;
}
.mini-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.cap-view { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; }
.cap-img { background: #16202c; border-radius: 10px; display: grid; place-items: center; min-height: 360px; overflow: auto; }
.cap-img img { max-width: 100%; max-height: 72vh; display: block; }
.cap-side { min-width: 0; }
.cand {
  display: flex; gap: 8px; align-items: center; font-size: 13px;
  background: #eef3fa; border: 1px solid #dbe6f3; border-radius: 7px; padding: 5px 9px;
}
.cand-row {
  display: flex; gap: 8px; align-items: center; font-size: 13.5px;
  background: #eef3fa; border: 1px solid #dbe6f3; border-radius: 7px;
  padding: 6px 9px; margin-top: 8px; flex-wrap: wrap;
}
.cand-row input { width: auto; }
.cand-row .chips { margin-left: auto; display: flex; gap: 5px; flex-wrap: wrap; }
.nchip {
  border: 1px solid #c6d2e0; background: #fff; border-radius: 6px;
  padding: 2px 9px; font: inherit; font-size: 12.5px; cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.nchip:hover { background: #f2f7fd; }
.nchip.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.cand-raw { font-size: 11.5px; color: var(--muted); margin: 3px 0 0 26px; }
@media (max-width: 900px) {
  .cap-view { grid-template-columns: 1fr; }
  .cap-img { min-height: 220px; }
}

.flow { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; }
.flow-node {
  flex: 1 1 165px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 13px; position: relative;
}
.flow-node .t { font-size: 12.5px; color: var(--muted); }
.flow-node .q { font-size: 20px; font-weight: 600; margin: 5px 0 2px; font-variant-numeric: tabular-nums; }
.flow-node .b { font-size: 11.5px; color: var(--muted); }
.flow-line { font-size: 13.5px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.flow-line b { font-size: 16px; }
.flow-node.warn { border-color: #f3dcb4; background: #fffdf8; }
.flow-node.zero .q { color: #9aa7b6; }
.flow-arrow { align-self: center; color: #b6c2d1; font-size: 18px; }
.chain-flow .flow-node {
  color: var(--ink); background: #fff; border-color: var(--line); cursor: default;
}
.chain-flow .flow-node .t,
.chain-flow .flow-node .b { color: #718398; }
.chain-flow .flow-node .q { color: #21384f; }
.chain-flow .flow-node:hover { border-color: var(--line); background: #fff; transform: none; }
.chain-flow .flow-arrow {
  color: #718398; min-width: 76px; text-align: center; line-height: 1.35;
}
.chain-flow .flow-arrow em {
  display: block; color: #8a6a28; font-size: 10.5px; font-style: normal; white-space: nowrap;
}

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(14, 22, 33, .5);
  display: grid; place-items: center; z-index: 100; padding: 18px;
}
.modal {
  background: #fff; border-radius: 12px; width: min(720px, 100%);
  max-height: 90vh; display: flex; flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
}
.modal.wide { width: min(1000px, 100%); }
.modal-head { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.modal-head h3 { flex: 1; font-size: 15px; }
.modal-body { padding: 16px; overflow: auto; }
.modal-foot { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; gap: 9px; justify-content: flex-end; }

/* ---------- 提示 ---------- */
.toast-root { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: #16202c; color: #fff; padding: 10px 15px; border-radius: 9px;
  font-size: 13.5px; max-width: 460px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  white-space: pre-wrap; animation: pop .18s ease-out;
}
.toast.ok { background: #15803d; }
.toast.err { background: #b91c1c; }
.toast.warn { background: #b45309; }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }

/* ---------- 留言板 ---------- */
.board-summary {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px;
}
.board-summary > div {
  padding: 14px 17px; border: 1px solid #dce5ef; border-radius: 11px;
  background: linear-gradient(145deg, #fff 0%, #f7fbff 100%);
  box-shadow: 0 6px 18px rgba(23, 55, 87, .05);
}
.board-summary span { display: block; color: var(--muted); font-size: 11.5px; }
.board-summary b {
  display: block; margin-top: 4px; color: #173953; font-size: 24px;
  line-height: 1.2; font-variant-numeric: tabular-nums;
}
.board-summary small { display: block; margin-top: 3px; color: #8190a2; font-size: 11px; }
.board-compose textarea { min-height: 92px; resize: vertical; line-height: 1.7; }
.board-compose-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 9px; color: var(--muted); font-size: 11.5px;
}
.board-filters { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.board-search {
  display: flex; align-items: center; gap: 5px; height: 32px; padding: 0 9px;
  border: 1px solid #d7e0ea; border-radius: 8px; background: #fff;
}
.board-search span { color: #7d8ea1; }
.board-search input {
  width: 180px; height: 100%; padding: 0; border: 0; outline: 0;
  box-shadow: none !important; background: transparent; font-size: 12.5px;
}
.board-list { padding: 6px 16px 12px; }
.board-thread { border-bottom: 1px solid #eaf0f5; }
.board-thread:last-child { border-bottom: 0; }
.board-message { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 11px; padding: 15px 2px; }
.board-avatar {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%;
  background: #e8f1fa; color: #235784; font-size: 15px; font-weight: 700;
}
.board-message-main { min-width: 0; }
.board-message-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.board-message-head > b { color: #20384f; font-size: 13px; }
.board-message-head time { color: #8291a2; font-size: 10.5px; font-variant-numeric: tabular-nums; }
.board-message-actions { margin-left: auto; display: flex; gap: 2px; }
.board-message-actions .danger-text,
.danger-text { color: var(--danger); }
.board-message-body {
  margin: 7px 0 0; color: #354b61; font-size: 13px; line-height: 1.75;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.board-replies {
  margin-top: 11px; border-left: 2px solid #dbe7f2; padding-left: 13px;
  display: flex; flex-direction: column; gap: 9px;
}
.board-reply {
  padding: 9px 11px; border: 1px solid #e4ebf2; border-radius: 8px; background: #f9fbfd;
}
.board-reply-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.board-reply-head b { color: #314960; font-size: 11.5px; }
.board-reply-head span { color: #7c8b9d; font-size: 10.5px; }
.board-reply-head time { color: #8b98a8; font-size: 10.5px; }
.board-reply-head button { margin-left: auto; }
.board-reply p {
  margin: 5px 0 0; color: #455a6f; font-size: 12px; line-height: 1.65;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.board-reply-origin {
  padding: 10px 12px; border-left: 2px solid #c7d8e8; background: #f7fafc;
  color: #607184; font-size: 12px; line-height: 1.6; white-space: pre-wrap;
}
.board-empty { padding: 46px 16px; }
@media (max-width: 760px) {
  .board-summary { grid-template-columns: 1fr; gap: 9px; }
  .board-filters { justify-content: flex-start; flex-wrap: wrap; width: 100%; }
  .board-search { flex: 1; min-width: 190px; }
  .board-search input { width: 100%; }
  .board-list { padding: 4px 12px 10px; }
  .board-message { grid-template-columns: 32px minmax(0, 1fr); gap: 9px; }
  .board-avatar { width: 32px; height: 32px; font-size: 13px; }
  .board-message-actions { width: 100%; margin-left: 0; }
}

/* ---------- 安全生产事故台账 ---------- */
.safety-ledger-intro h3 { margin: 9px 0 8px; color: #233b52; font-size: 21px; }
.safety-ledger-intro p { margin: 0; color: #53677c; font-size: 13px; line-height: 1.8; }
.safety-fields { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 7px; }
.safety-fields span {
  padding: 5px 9px; border: 1px solid #dbe5ef; border-radius: 7px;
  background: #f8fbfe; color: #526a82; font-size: 11.5px;
}
.safety-ledger-actions {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px;
  min-height: 210px; border-left: 1px solid var(--line); padding: 18px 24px;
}
.safety-ledger-actions b { color: #223a51; font-size: 15px; text-align: center; }
.safety-ledger-actions small { margin-bottom: 5px; color: var(--muted); }
.safety-ledger-actions .btn { width: min(250px, 100%); text-align: center; }
.safety-doc-icon {
  width: 54px; height: 54px; display: grid; place-items: center; border-radius: 14px;
  background: #edf4fb; color: #2e638e; font-size: 26px;
}
.safety-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.safety-steps > div {
  display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px;
  border: 1px solid #e2e9f0; border-radius: 9px; background: #fbfcfe;
}
.safety-steps b {
  width: 24px; height: 24px; flex: none; display: grid; place-items: center;
  border-radius: 50%; background: #e9f2fa; color: #245b85; font-size: 11.5px;
}
.safety-steps span { color: #52667a; font-size: 12px; line-height: 1.65; }
@media (max-width: 760px) {
  .safety-ledger-actions { border-left: 0; border-top: 1px solid var(--line); padding: 18px 0 0; }
  .safety-steps { grid-template-columns: 1fr; }
}

/* ---------- 设备与保养：概览 + 紧凑清单 + 维护动态 ---------- */
.equipment-summary-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px; margin-bottom: 14px;
}
.equipment-summary {
  min-height: 94px; padding: 16px 18px; border: 1px solid #d9e3ee; border-radius: 12px;
  display: flex; align-items: center; gap: 14px;
  background:
    radial-gradient(220px 100px at 100% 0, rgba(28, 110, 168, .09), transparent 70%),
    linear-gradient(145deg, #fff 0%, #f8fbff 100%);
  box-shadow: 0 7px 22px rgba(26, 55, 86, .06);
}
.equipment-summary-icon {
  width: 42px; height: 42px; flex: none; display: grid; place-items: center;
  border-radius: 12px; background: #eaf2fb; color: var(--brand-2);
  font-size: 20px; font-weight: 700;
}
.equipment-summary > div { min-width: 0; }
.equipment-summary b {
  display: inline-block; margin-right: 8px; color: #132c48; font-size: 28px;
  line-height: 1; font-variant-numeric: tabular-nums;
}
.equipment-summary span:not(.equipment-summary-icon) { color: #42576d; font-weight: 600; }
.equipment-summary small { display: block; margin-top: 7px; color: var(--muted); font-size: 11.5px; }
.equipment-summary.ok .equipment-summary-icon { background: #ecf8f0; color: #15803d; }
.equipment-summary.warn { border-color: #edd8b1; background: linear-gradient(145deg, #fff 0%, #fffaf1 100%); }
.equipment-summary.warn .equipment-summary-icon { background: #fff2dc; color: #b45309; }
.equipment-summary.warn b { color: #a75a12; }

.equipment-main-grid {
  display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(300px, .75fr);
  align-items: start; gap: 14px;
}
.equipment-main-grid > .card { margin-top: 0; min-width: 0; }
.equipment-heading { flex: 1; min-width: 180px; }
.equipment-heading h3 { flex: none; }
.equipment-heading > span { display: block; margin-top: 3px; color: var(--muted); font-size: 11.5px; }
.equipment-head-actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.equipment-filterbar {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  padding: 12px 15px; background: #f8fafc; border-bottom: 1px solid var(--line);
}
.equipment-search {
  flex: 1; min-width: 210px; display: flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 11px; border: 1px solid #d7e0ea; border-radius: 9px; background: #fff;
}
.equipment-search:focus-within { border-color: #9cb8d4; box-shadow: 0 0 0 3px rgba(28, 110, 168, .08); }
.equipment-search > span { color: #71849a; font-size: 18px; line-height: 1; }
.equipment-search input {
  width: 100%; height: 100%; padding: 0; border: 0; outline: 0; box-shadow: none !important;
  background: transparent; font-size: 13px;
}
.equipment-filterbar select { width: 128px; height: 36px; padding: 0 9px; font-size: 12.5px; }
.equipment-visible { margin-left: auto; color: var(--muted); font-size: 11.5px; white-space: nowrap; }

.equipment-list { background: #fff; }
.equipment-entry {
  width: 100%; display: grid;
  grid-template-columns: 42px minmax(0, 1fr) minmax(125px, auto) 18px;
  align-items: center; gap: 13px; padding: 14px 16px;
  border: 0; border-bottom: 1px solid #edf1f5; background: #fff; color: inherit;
  font: inherit; text-align: left; cursor: pointer; transition: background .14s, box-shadow .14s;
}
.equipment-entry:last-child { border-bottom: 0; }
.equipment-entry:hover {
  position: relative; z-index: 1; background: #f8fbff;
  box-shadow: inset 3px 0 0 var(--brand-2);
}
.equipment-entry:focus-visible { outline: 2px solid var(--brand-2); outline-offset: -2px; }
.equipment-entry-icon {
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid #dbe7f3; border-radius: 11px; background: #f2f7fc; color: #31597f; font-size: 19px;
}
.equipment-entry-main { min-width: 0; }
.equipment-entry-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.equipment-entry-title b {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #1c3046; font-size: 14px;
}
.equipment-entry-title em {
  flex: none; padding: 1px 6px; border-radius: 5px; background: #eef3f9;
  color: #63758a; font-size: 10.5px; font-style: normal; font-variant-numeric: tabular-nums;
}
.equipment-entry-main > small {
  display: block; margin-top: 5px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; color: var(--muted); font-size: 11.5px;
}
.equipment-entry-state { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.equipment-entry-state small { color: var(--muted); font-size: 10.5px; white-space: nowrap; }
.equipment-entry-state small.danger { color: var(--danger); }
.equipment-entry-state small.warn { color: var(--warn); }
.equipment-entry-arrow { color: #a2b0c0; font-size: 24px; line-height: 1; text-align: right; }

.equipment-recent-card { overflow: hidden; }
.equipment-recent-list { padding: 2px 0; }
.equipment-recent-item {
  width: 100%; display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 5px 10px;
  padding: 11px 15px; border: 0; border-bottom: 1px solid #edf1f5; background: #fff;
  color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.equipment-recent-item:last-child { border-bottom: 0; }
.equipment-recent-item:hover { background: #f8fbff; }
.equipment-recent-date {
  grid-row: span 2; color: #52677d; font-size: 11px; font-weight: 600;
  font-variant-numeric: tabular-nums; padding-top: 2px;
}
.equipment-recent-main { min-width: 0; }
.equipment-recent-main b {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #293b50; font-size: 12.5px;
}
.equipment-recent-main small {
  display: block; margin-top: 2px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; color: var(--muted); font-size: 10.5px;
}
.equipment-recent-result { grid-column: 2; color: #738398; font-size: 10.5px; }
.equipment-recent-foot { padding: 11px 14px; border-top: 1px solid var(--line); background: #fbfcfe; }
.equipment-recent-empty { padding: 32px 15px; }

.equipment-detail-hero {
  display: flex; align-items: center; gap: 14px; padding: 2px 0 16px;
}
.equipment-detail-symbol {
  width: 58px; height: 58px; flex: none; display: grid; place-items: center;
  border: 1px solid #d8e4f1; border-radius: 16px; background: #edf4fb; color: #31597f; font-size: 27px;
}
.equipment-detail-title { min-width: 0; }
.equipment-detail-title > span { color: var(--muted); font-size: 11px; letter-spacing: .04em; }
.equipment-detail-title h3 { margin: 2px 0 7px; color: #1a2e45; font-size: 19px; }
.equipment-detail-title > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.equipment-due { font-size: 11.5px; color: var(--muted); }
.equipment-due.danger { color: var(--danger); }
.equipment-due.warn { color: var(--warn); }
.equipment-detail-meta {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid #e2e8ef; border-radius: 10px; overflow: hidden; background: #f9fbfd;
}
.equipment-detail-meta > div { min-width: 0; padding: 11px 13px; border-right: 1px solid #e7ecf2; border-bottom: 1px solid #e7ecf2; }
.equipment-detail-meta > div:nth-child(3n) { border-right: 0; }
.equipment-detail-meta > div:nth-last-child(-n+3) { border-bottom: 0; }
.equipment-detail-meta span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 10.5px; }
.equipment-detail-meta b { display: block; overflow-wrap: anywhere; color: #2a3e53; font-size: 12.5px; font-weight: 600; }
.equipment-detail-note { margin-top: 12px; padding: 10px 12px; border-left: 2px solid #c9d7e6; background: #f8fafc; }
.equipment-detail-note span { color: var(--muted); font-size: 10.5px; }
.equipment-detail-note p { margin: 3px 0 0; color: #3f5267; font-size: 12px; line-height: 1.65; }
.equipment-detail-section-head { display: flex; align-items: center; gap: 10px; margin: 18px 0 9px; }
.equipment-detail-section-head h4 { color: #263a50; font-size: 13.5px; }
.equipment-detail-section-head span { color: var(--muted); font-size: 11px; }
.equipment-history { border-top: 1px solid #e6ebf1; }
.equipment-history-entry {
  display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 14px;
  padding: 13px 4px; border-bottom: 1px solid #edf1f5;
}
.equipment-history-date b { display: block; color: #40566e; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.equipment-history-date span { display: block; margin-top: 4px; color: var(--muted); font-size: 10.5px; }
.equipment-history-body { min-width: 0; }
.equipment-history-body > b { color: #253a50; font-size: 12.5px; }
.equipment-history-body p { margin: 4px 0 7px; color: #5b6c80; font-size: 11.5px; line-height: 1.55; }
.equipment-history-body > div { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.equipment-history-body > div small { color: var(--muted); font-size: 10.5px; }
.equipment-history-note { display: block; margin-top: 6px; color: var(--muted); font-size: 10.5px; }
.equipment-detail-empty { padding: 28px 12px; }
.equipment-history-table tbody td small { display: block; margin-top: 2px; }

.batch-snapshot-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px;
}
.dashboard-info-grid {
  display: grid; grid-template-columns: minmax(300px, .8fr) minmax(0, 1.2fr);
  gap: 14px; align-items: stretch;
}
.dashboard-info-grid > .card {
  margin-top: 0; min-width: 0; height: 100%; display: flex; flex-direction: column;
}
.dashboard-info-grid > .card > .card-body { flex: 1; }
.dashboard-info-grid .stock-warning-empty {
  min-height: 100%; display: flex; flex-direction: column; justify-content: center;
}
.dashboard-info-grid .batch-snapshot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.batch-snapshot {
  display: flex; flex-direction: column; gap: 9px; min-width: 0;
  padding: 13px 14px; border: 1px solid #dce5ef; border-radius: 10px;
  background: linear-gradient(145deg, #fff 0%, #f8fbff 100%);
  color: inherit; font: inherit; text-align: left; cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.batch-snapshot:hover {
  border-color: #b7cce1; box-shadow: 0 8px 20px rgba(20, 58, 94, .09);
  transform: translateY(-1px);
}
.batch-snapshot-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.batch-snapshot-top b { color: #1d3852; font-size: 13px; }
.batch-snapshot-top i { font-style: normal; }
.batch-snapshot strong {
  color: #183a5a; font-size: 17px; font-variant-numeric: tabular-nums;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.batch-snapshot small { color: var(--muted); font-size: 11.5px; }

@media (max-width: 1080px) {
  .equipment-main-grid { grid-template-columns: 1fr; }
  .dashboard-info-grid { grid-template-columns: 1fr; }
  .equipment-recent-list {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .batch-snapshot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .equipment-recent-item:nth-child(odd) { border-right: 1px solid #edf1f5; }
}
@media (max-width: 760px) {
  .equipment-summary-grid { grid-template-columns: 1fr; gap: 9px; }
  .equipment-summary { min-height: 78px; padding: 13px 15px; }
  .equipment-summary b { font-size: 24px; }
  .equipment-head-actions { width: 100%; justify-content: flex-start; }
  .equipment-entry {
    grid-template-columns: 38px minmax(0, 1fr) 16px;
    gap: 10px; padding: 12px 13px;
  }
  .equipment-entry-icon { width: 38px; height: 38px; border-radius: 10px; }
  .equipment-entry-state {
    grid-column: 2; flex-direction: row; align-items: center; justify-content: flex-start;
  }
  .equipment-entry-arrow { grid-column: 3; grid-row: 1 / span 2; }
  .equipment-recent-list { grid-template-columns: 1fr; }
  .batch-snapshot-grid { grid-template-columns: 1fr; }
  .equipment-recent-item:nth-child(odd) { border-right: 0; }
  .equipment-detail-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .equipment-detail-meta > div:nth-child(3n) { border-right: 1px solid #e7ecf2; }
  .equipment-detail-meta > div:nth-child(2n) { border-right: 0; }
  .equipment-detail-meta > div:nth-last-child(-n+3) { border-bottom: 1px solid #e7ecf2; }
  .equipment-detail-meta > div:nth-last-child(-n+2) { border-bottom: 0; }
}
@media (max-width: 480px) {
  .equipment-filterbar { padding: 10px 12px; }
  .equipment-search { min-width: 100%; }
  .equipment-filterbar select { flex: 1; width: auto; }
  .equipment-history-entry { grid-template-columns: 1fr; gap: 6px; }
  .equipment-history-date { display: flex; gap: 8px; align-items: center; }
  .equipment-history-date span { margin-top: 0; }
}

/* ---------- 打印 ---------- */
.ledger-sheet { width: 100%; border-collapse: collapse; }
.ledger-sheet th, .ledger-sheet td {
  border: 1px solid #94a3b8; padding: 5px 8px; font-size: 13px;
}
.ledger-sheet thead th {
  background: #f1f5fa; text-align: center; color: #1f3550;
  position: static; font-size: 12.5px;
}
.ledger-sheet tbody td { height: 32px; }
.ledger-sheet tbody tr:hover { background: transparent; }
.ledger-sheet .total td { background: #f7f9fc; font-weight: 600; }
.record-ledger-sheet { min-width: 1180px; table-layout: fixed; }
.record-ledger-sheet td, .record-ledger-sheet th { overflow-wrap: anywhere; }
.record-ledger-sheet thead th {
  padding: 5px 3px;
  font-size: 11px;
  line-height: 1.45;
  white-space: normal;
  word-break: break-all;
}

.print-area { display: none; }
/* 台账表头：屏幕上只看中文（后台都是中国人），打印出来才是中英文对照（当地员工要填） */
.scr-only { display: inline; }
.prt-only { display: none; }
@media print {
  body { background: #fff; }
  .sidebar, .topbar, .toast-root { display: none !important; }
  body.equipment-printing #app-view,
  body.equipment-printing #login-v2-view,
  body.equipment-printing #login-view,
  body.equipment-printing #modal-root,
  body.equipment-printing #picker-root { display: none !important; }
  body.equipment-printing #equipment-print-area { display: block !important; }
  .body { padding: 0; }
  .no-print { display: none !important; }
  .print-area { display: block !important; }
  .scr-only { display: none !important; }
  .prt-only { display: inline !important; }
  .card { box-shadow: none; border: 0; }
  table { font-size: 11pt; }
  thead th { background: #fff; border-bottom: 1.5px solid #000; }
  tbody td { border-bottom: .5px solid #999; }
  .table-wrap { max-height: none; overflow: visible; }
  .equipment-print-ledger { color: #000; }
  .equipment-print-head { text-align: center; margin-bottom: 12px; }
  .equipment-print-head h1 { font-size: 18pt; margin: 0 0 4px; }
  .equipment-print-head p { margin: 0; font-size: 10pt; }
  .equipment-print-ledger h2 { font-size: 12pt; margin: 12px 0 6px; }
  .equipment-print-ledger .ledger-sheet { page-break-inside: auto; }
  .equipment-print-ledger .ledger-sheet tr { page-break-inside: avoid; }
  .equipment-print-ledger .equipment-print-history { margin-top: 0; }
  .equipment-print-sign { margin-top: 14px; font-size: 10pt; }
  .doc-number-print { display: table-cell !important; }
  @page { size: A4 landscape; margin: 12mm; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 920px) {
  .sidebar {
    position: fixed; z-index: 90; left: 0; top: 0; transform: translateX(-100%);
    transition: transform .2s;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .sidebar.open { transform: none; }
  .sidebar .brand.small,
  .sidebar .system-switch,
  .sidebar .sidebar-foot {
    flex: 0 0 auto;
  }
  .sidebar nav {
    flex: 0 0 auto;
    overflow: visible;
  }
  .sidebar-foot {
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }
  .g3, .g4, .g6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #menu-toggle { display: block; }
}
@media (min-width: 921px) {
  #menu-toggle { display: inline-flex; }
  .sidebar {
    position: fixed; left: 0; top: 58px; z-index: 90;
    height: calc(100vh - 58px);
    transform: translateX(-101%);
    box-shadow: 8px 0 28px rgba(4, 20, 39, .24);
  }
  .sidebar.open { transform: none; }
  .app.sidebar-pinned .body { padding-left: 260px; }
  .sidebar-hover-zone {
    display: block; position: fixed; left: 0; top: 58px; bottom: 0; z-index: 89;
    width: 13px; cursor: pointer;
  }
  .sidebar-hover-zone span {
    position: absolute; left: 1px; top: 50%; transform: translateY(-50%);
    width: 11px; height: 54px; border-radius: 0 7px 7px 0;
    display: grid; place-items: center; color: #dce7f2; font-size: 18px;
    background: rgba(7, 31, 58, .86); box-shadow: 2px 0 8px rgba(7, 31, 58, .18);
  }
  .main { width: 100%; }
}
@media (max-width: 560px) {
  .g2, .g3, .g4, .g6 { grid-template-columns: 1fr; }
  .body { padding: 12px; }
  .login-left { display: none; }
  .login-card {
    flex: 1 1 auto; width: auto; margin: 24px 18px; padding: 30px 22px 24px;
    align-self: center; border-radius: 16px;
  }
  .login-hud .hud-meta { display: none; }
  .login-hud .hud-status { top: 16px; left: 18px; }
}

/* ---------- 首页看板：深色实时总览 ---------- */
.hero {
  position: relative; overflow: hidden;
  border-radius: 14px; padding: 18px 20px 16px;
  background:
    radial-gradient(1000px 300px at 12% -30%, rgba(28, 110, 168, .55), transparent 60%),
    radial-gradient(680px 260px at 100% 120%, rgba(212, 162, 24, .22), transparent 62%),
    linear-gradient(135deg, #0b2f56 0%, #0a2444 45%, #071f3a 100%);
  color: #e8eef6;
  box-shadow: 0 18px 40px rgba(7, 31, 58, .28);
}
/* 细网格：像监控屏，不是花纹 */
.hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .65), transparent 78%);
}
.hero > * { position: relative; z-index: 1; }
.hero-head { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.hero-title { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 260px; }
.hero-title h3 { font-size: 17px; letter-spacing: .02em; color: #fff; }
.hero-title p { margin: 4px 0 0; font-size: 12.5px; color: #9db4cd; }
.pulse {
  width: 11px; height: 11px; border-radius: 50%; flex: 0 0 11px;
  background: var(--gold-2); box-shadow: 0 0 0 0 rgba(240, 192, 64, .7);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(240, 192, 64, .55); }
  70% { box-shadow: 0 0 0 11px rgba(240, 192, 64, 0); }
  100% { box-shadow: 0 0 0 0 rgba(240, 192, 64, 0); }
}
.hero-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.hchip {
  font-size: 12.5px; padding: 5px 11px; border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .06); color: #d6e2f0;
}
.hchip b { color: #fff; font-variant-numeric: tabular-nums; }
.hchip.warn { border-color: rgba(240, 192, 64, .5); color: #f6d98a; background: rgba(240, 192, 64, .12); }
.hchip.ok { border-color: rgba(74, 222, 128, .4); color: #a7f3c0; background: rgba(74, 222, 128, .1); }

.hero-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.hkpi {
  padding: 13px 15px 12px; border-radius: 11px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .085), rgba(255, 255, 255, .03));
  border: 1px solid rgba(255, 255, 255, .1);
  border-top: 2px solid rgba(240, 192, 64, .65);
}
.hkpi .hk-l { font-size: 12.5px; color: #9db4cd; }
.hkpi .hk-v {
  margin-top: 4px; font-size: 29px; font-weight: 600; line-height: 1.1; color: #fff;
  font-variant-numeric: tabular-nums; letter-spacing: .01em;
}
.hkpi .hk-v small { font-size: 13px; font-weight: 400; color: #9db4cd; margin-left: 4px; }
.hkpi .hk-s { margin-top: 3px; font-size: 11.5px; color: #8fa6c0; }
.hkpi.warn { border-top-color: #f0c040; }
.hkpi.warn .hk-v { color: #f7d67c; }
.hkpi.ok .hk-v { color: #8ce9ac; }
.hkpi.clickable {
  cursor: pointer; text-align: left; font: inherit; color: inherit;
  transition: border-color .15s, background .15s, transform .15s;
}
.hkpi.clickable:hover {
  border-color: rgba(240, 192, 64, .7); background: rgba(255, 255, 255, .12);
  transform: translateY(-1px);
}

.flow-strip {
  margin-top: 16px; display: flex; align-items: stretch; gap: 6px; flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 13px;
}
.flow-node {
  flex: 1 1 130px; min-width: 118px; text-align: left; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .045);
  border-radius: 10px; padding: 9px 11px; color: #dce7f3;
  display: flex; flex-direction: column; gap: 2px;
  font: inherit; transition: border-color .15s, background .15s, transform .15s;
}
.flow-node:hover { border-color: rgba(240, 192, 64, .55); background: rgba(240, 192, 64, .1); transform: translateY(-1px); }
.flow-node .fn-name { font-size: 12px; color: #9db4cd; }
.flow-node .fn-qty {
  font-size: 19px; font-weight: 600; color: #fff; font-variant-numeric: tabular-nums;
}
.flow-node .fn-sub { font-size: 11px; color: #8fa6c0; }
.flow-arrow { align-self: center; color: rgba(240, 192, 64, .75); font-size: 18px; }
.flow-tail {
  align-self: center; margin-left: 6px; font-size: 11.5px; color: #8fa6c0;
  border-left: 1px solid rgba(255, 255, 255, .12); padding-left: 10px;
}

/* 烘药工房全流程 */
.drying-process-flow {
  display: flex; align-items: stretch; gap: 4px; flex-wrap: wrap;
}
.drying-process-node {
  flex: 1 1 128px; min-width: 124px; min-height: 104px; padding: 12px 13px;
  border: 1px solid #dbe3ec; border-radius: 11px;
  background: linear-gradient(180deg, #fbfdff, #f4f7fb);
  display: flex; flex-direction: column; justify-content: center;
}
.drying-process-node span { font-size: 12.5px; color: var(--muted); }
.drying-process-node b {
  margin: 5px 0 2px; color: var(--brand); font-size: 23px;
  font-variant-numeric: tabular-nums;
}
.drying-process-node b small { font-size: 11px; color: var(--muted); font-weight: 500; }
.drying-process-node em { font-style: normal; color: #7d8b9c; font-size: 11px; }
.drying-process-node.waiting { border-color: #ecd9b2; background: #fffaf0; }
.drying-process-node.dryer { border-color: #b8d7ed; background: #f2f8fd; }
.drying-process-arrow {
  flex: 0 0 48px; min-height: 104px; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.drying-process-arrow::before {
  content: ''; position: absolute; left: 2px; right: 8px; top: 50%;
  height: 2px; background: #c8d4df;
}
.drying-process-arrow::after {
  content: ''; position: absolute; right: 2px; top: calc(50% - 5px);
  border-left: 8px solid #8da5ba; border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}
.drying-process-arrow i {
  position: absolute; top: calc(50% - 3px); left: 5px; width: 28px; height: 6px;
  border-radius: 6px;
  background: linear-gradient(90deg, transparent, rgba(212, 162, 24, .75), transparent);
  animation: dryingFlow 2.2s linear infinite;
}
.drying-process-arrow small {
  position: absolute; top: calc(50% + 9px); font-size: 10.5px; color: #7d8b9c;
}
@keyframes dryingFlow {
  from { transform: translateX(-24px); opacity: 0; }
  30%, 70% { opacity: 1; }
  to { transform: translateX(28px); opacity: 0; }
}
.drying-process-formula {
  margin-top: 13px; padding: 11px 13px; border-radius: 9px;
  background: #f7f9fc; border-left: 4px solid var(--accent);
  color: #445366; font-size: 12.8px; line-height: 1.7;
}
.drying-stock-reconcile {
  display: grid; grid-template-columns: repeat(6, auto); align-items: center;
  gap: 5px 12px; margin-top: 10px; padding: 10px 12px; border-radius: 9px;
  background: #f3f9f4; border: 1px solid #cfe5d3; color: #355b3d;
}
.drying-stock-reconcile > span { font-size: 11.5px; color: #687789; }
.drying-stock-reconcile > b { font-size: 14px; font-variant-numeric: tabular-nums; }
.drying-stock-reconcile > small { grid-column: 1 / -1; color: #718398; }
.drying-stock-reconcile.warn { background: #fff8eb; border-color: #efd8ad; color: #8a5a13; }
.drying-batch-details { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.drying-batch-details summary { cursor: pointer; color: var(--brand); font-weight: 600; margin-bottom: 8px; }
@media (prefers-reduced-motion: reduce) {
  .drying-process-arrow i { animation: none; }
}
@media (max-width: 820px) {
  .drying-process-flow { flex-direction: column; }
  .drying-process-arrow { min-height: 36px; flex-basis: 36px; }
  .drying-process-arrow::before { top: 4px; bottom: 4px; left: 50%; width: 2px; height: auto; right: auto; }
  .drying-process-arrow::after {
    left: calc(50% - 5px); right: auto; top: auto; bottom: 1px;
    border-top: 8px solid #8da5ba; border-left: 5px solid transparent;
    border-right: 5px solid transparent; border-bottom: 0;
  }
  .drying-process-arrow i { display: none; }
  .drying-process-arrow small { left: calc(50% + 10px); top: 9px; }
}

/* 最近登记：时间轴 */
.tl { padding: 6px 0; max-height: 430px; overflow: auto; }
.tl-row {
  display: flex; align-items: center; gap: 10px; padding: 7px 15px 7px 13px;
  border-left: 2px solid var(--line); margin-left: 20px; position: relative; cursor: pointer;
}
.tl-row:hover { background: #f7f9fc; }
.tl-dot { position: absolute; left: -6px; width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; }
.tl-dot.in { background: var(--ok); box-shadow: 0 0 0 3px rgba(21, 128, 61, .12); }
.tl-dot.out { background: var(--accent); box-shadow: 0 0 0 3px rgba(200, 144, 26, .14); }
.tl-time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl-mat { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tl-mat small { color: var(--muted); font-size: 11.5px; }
.tl-qty { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.tl-qty.in { color: var(--ok); }
.tl-qty.out { color: var(--accent); }
.tl-by { font-size: 12px; color: var(--muted); min-width: 56px; text-align: right; }

/* 需要关注 */
.alert-cap { margin: 10px 0 6px; font-size: 12px; color: var(--muted); }
.alert-cap:first-child { margin-top: 0; }
.alert-row {
  display: flex; align-items: center; gap: 8px; padding: 6px 0;
  border-bottom: 1px dashed var(--line);
}
.alert-row.alert-link {
  width: 100%; border-top: 0; border-left: 0; border-right: 0;
  border-radius: 0; background: transparent; color: inherit; font: inherit;
  text-align: left; cursor: pointer;
}
.alert-row.alert-link:hover { background: #f6f9fc; }
.alert-row.alert-link:focus-visible { outline: 2px solid var(--brand-2); outline-offset: -2px; }
.issue-material-row { cursor: pointer; }
.issue-material-row:hover { background: #f1f7fd; }
.issue-material-row td:first-child { box-shadow: inset 3px 0 0 #6b9dc7; }
.stock-focus-row {
  background: #eaf5ff !important;
  box-shadow: inset 4px 0 0 #2e78b7;
  animation: stockRowPulse 1.2s ease-out 2;
}
@keyframes stockRowPulse {
  0% { background: #d8edff !important; }
  100% { background: #eaf5ff !important; }
}
.alert-row:last-child { border-bottom: 0; }
.alert-row .al-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alert-row .al-val { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.ledger-focus {
  border: 2px solid #3b82c4 !important;
  box-shadow: 0 0 0 4px rgba(59, 130, 196, .12), 0 12px 30px rgba(27, 74, 116, .14) !important;
  animation: ledgerFocusPulse 1.2s ease-out 2;
}
.ledger-table { table-layout: fixed; min-width: 900px; }
.ledger-table thead th { background: #f7f9fc; white-space: nowrap; }
.ledger-table th.ledger-time { width: 108px; }
.ledger-table th.ledger-mat { width: 132px; }
.ledger-table th.ledger-context { width: 200px; }
.ledger-table th.ledger-batch { width: 70px; }
.ledger-table th.ledger-qty { width: 64px; }
.ledger-table th.ledger-unit { width: 42px; }
.ledger-table th.ledger-people { width: 140px; }
.ledger-table th.ledger-actions { width: 150px; }
.ledger-table tbody td {
  vertical-align: top; padding: 10px 8px; line-height: 1.45;
  overflow-wrap: anywhere;
}
.ledger-table .ledger-time b,
.ledger-table .ledger-time small,
.ledger-table .ledger-mat small,
.ledger-table .ledger-context b,
.ledger-table .ledger-context small,
.ledger-table .ledger-people span,
.ledger-table .ledger-people small { display: block; }
.ledger-table .ledger-time a { color: var(--brand); font-weight: 600; }
.ledger-table .ledger-time a small { margin-top: 1px; color: var(--muted); font-weight: 400; }
.ledger-table .ledger-time .tag { margin-top: 6px; }
.ledger-table .ledger-seq { display: inline-block; margin-left: 4px; color: #94a3b8; }
.ledger-table .ledger-context b { color: #263b50; }
.ledger-table .ledger-context small { margin-top: 2px; color: var(--muted); font-size: 11.5px; }
.ledger-table .ledger-note {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; color: #53677c; line-height: 1.45;
}
.ledger-table .ledger-batch { color: #6b5940; font-variant-numeric: tabular-nums; }
.ledger-table .ledger-people span { color: #34495f; }
.ledger-table .ledger-people small { color: var(--muted); font-size: 11.5px; }
.ledger-table .ledger-actions .btn { padding-left: 6px; padding-right: 6px; }
.audit-table { table-layout: fixed; min-width: 960px; }
.audit-table th:nth-child(1) { width: 126px; }
.audit-table th:nth-child(2) { width: 105px; }
.audit-table th:nth-child(3) { width: 105px; }
.audit-table th:nth-child(4) { width: 190px; }
.audit-table th:nth-child(6) { width: 150px; }
.audit-table td { vertical-align: top; }
.audit-detail-cell > div { color: #34495f; line-height: 1.55; overflow-wrap: anywhere; }
.audit-details { margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 6px; }
.audit-details summary {
  cursor: pointer; color: var(--brand-2); font-size: 12px;
  user-select: none;
}
.audit-detail-line {
  display: grid; grid-template-columns: auto minmax(110px, 1fr) auto;
  gap: 5px 8px; align-items: center; padding: 6px 0;
  border-bottom: 1px dotted #e4ebf2;
}
.audit-detail-line:last-child { border-bottom: 0; }
.audit-detail-line > small { grid-column: 2 / 4; color: var(--muted); font-size: 11px; }
.audit-detail-line .audit-line-note { overflow-wrap: anywhere; }
.audit-qty { font-weight: 600; color: #20384f; white-space: nowrap; text-align: right; }
.audit-ip { overflow-wrap: anywhere; }
.source-jump {
  color: var(--brand-2); border-bottom: 1px dotted currentColor;
  text-decoration: none; cursor: pointer;
}
.source-jump:hover { color: var(--brand); border-bottom-style: solid; }
.source-compare {
  display: grid; grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1.25fr);
  gap: 10px; align-items: stretch; margin: 12px 0 14px;
}
.source-compare-side {
  border: 1px solid var(--line); border-radius: 9px; padding: 11px 13px;
  background: #f8fafc; min-width: 0;
}
.source-compare-side.original { border-left: 3px solid #d4a218; }
.source-compare-side.corrected { border-left: 3px solid #2e78b7; background: #f4f9ff; }
.source-compare-side small { display: block; color: var(--muted); font-size: 11px; }
.source-compare-side b { display: block; margin-top: 3px; color: #20384f; }
.source-compare-side p { margin: 5px 0 0; color: #53677c; font-size: 12px; line-height: 1.55; }
.source-compare-values {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 12px; margin-top: 7px; color: #34495f; font-size: 12px;
}
.source-compare-arrow {
  display: grid; place-items: center; color: #2e78b7; font-size: 22px; font-weight: 600;
}
.source-context-table { max-height: 65vh; }
.source-context-table th:first-child,
.source-context-table td:first-child { position: sticky; left: 0; z-index: 2; background: #fff; }
.source-focus-row td {
  background: #fff4d7 !important;
  box-shadow: inset 0 1px 0 #efcf84, inset 0 -1px 0 #efcf84;
}
@keyframes ledgerFocusPulse {
  0% { box-shadow: 0 0 0 0 rgba(59, 130, 196, .35), 0 12px 30px rgba(27, 74, 116, .12); }
  70% { box-shadow: 0 0 0 9px rgba(59, 130, 196, 0), 0 12px 30px rgba(27, 74, 116, .12); }
  100% { box-shadow: 0 0 0 4px rgba(59, 130, 196, .12), 0 12px 30px rgba(27, 74, 116, .14); }
}

/* 库位 / 工序节点卡片 */
.loc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 11px; }
.loc-card {
  text-align: left; cursor: pointer; font: inherit;
  border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px;
  background: linear-gradient(180deg, #fbfcfe, #fff);
  display: flex; flex-direction: column; gap: 3px;
  border-left: 3px solid var(--brand-2);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.loc-card:hover { border-color: var(--brand-2); box-shadow: var(--shadow); transform: translateY(-1px); }
.loc-card .lc-name { font-weight: 600; color: var(--ink); }
.loc-card .lc-hz {
  font-style: normal; font-size: 11px; color: var(--warn);
  border: 1px solid #f3dcb4; background: #fff8ec; border-radius: 6px; padding: 0 5px; margin-left: 4px;
}
.loc-card .lc-kinds { font-size: 12.5px; color: var(--muted); }
.loc-card .lc-foot { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; margin-top: 2px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #cbd5e1; }
.dot.green { background: var(--ok); }
.dot.amber { background: var(--warn); }
.dot.gray { background: #cbd5e1; }

@media (max-width: 920px) {
  .hero-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* 手机上「危险品流转」和各库位卡片是同一批数据，重复了，只留下面详细的 */
  .flow-strip { display: none; }
  .hero { padding: 16px 14px 14px; }
  .hero-title h3 { font-size: 15.5px; }
  .hero-chips { margin-top: 4px; }
  .hkpi .hk-v { font-size: 24px; }
}

/* ---------- 多人同时用：在线人数 / 有新登记提示 ---------- */
.online-chip {
  display: flex; align-items: center; gap: 6px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  border-radius: 20px; padding: 4px 11px; font: inherit; font-size: 12.5px;
}
.online-chip:hover { border-color: var(--brand-2); color: var(--brand); }
.online-chip .dot { background: var(--ok); box-shadow: 0 0 0 3px rgba(21, 128, 61, .12); }
.pulse-chip {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, #0b2f56, #071f3a);
  color: #e8eef6; border: 1px solid rgba(240, 192, 64, .45);
  border-radius: 12px; padding: 10px 14px; box-shadow: 0 14px 32px rgba(7, 31, 58, .35);
  font-size: 13px;
}
.pulse-chip.hidden { display: none; }
.pulse-chip b { color: var(--gold-2); }

/* 表格点表头排序的小箭头 */
table thead th { cursor: pointer; }
.sort-arrow { font-size: 10px; color: var(--accent); }

/* 数据与安全里的备份状态条 */
.bk-box {
  background: #f4f8fc; border: 1px solid #dbe6f1; border-radius: 9px;
  padding: 10px 12px; margin-bottom: 12px; font-size: 13px; line-height: 1.7;
}

/* ================= 登录页 v3（参考图：电路光带 + 发光盾牌 + 多环光台） ================= */
.login-wrap {
  display: flex; align-items: center; justify-content: flex-start;
  padding: 0 0 0 9vw; overflow-x: hidden; overflow-y: auto;
  background:
    radial-gradient(820px 560px at 71% 44%, rgba(18, 92, 176, .48), transparent 64%),
    radial-gradient(1280px 760px at 54% 118%, rgba(10, 74, 148, .52), transparent 72%),
    radial-gradient(700px 420px at 4% 8%, rgba(14, 66, 128, .30), transparent 70%),
    linear-gradient(158deg, #020a17 0%, #04152b 36%, #061f3c 66%, #020b1a 100%);
}
.login-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }

/* 细网格铺底，中心亮、四周暗 */
.lb-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(96, 176, 255, .075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 176, 255, .075) 1px, transparent 1px);
  background-size: 78px 78px;
  -webkit-mask-image: radial-gradient(ellipse 72% 78% at 58% 48%, #000 18%, transparent 78%);
  mask-image: radial-gradient(ellipse 72% 78% at 58% 48%, #000 18%, transparent 78%);
  opacity: .9;
}

/* 两道斜向光带，做出参考图里的空间层次 */
.lb-beam {
  position: absolute; width: 54vw; height: 170vh; top: -38vh;
  background: linear-gradient(90deg, transparent, rgba(96, 186, 255, .075) 42%, rgba(140, 210, 255, .12) 50%, rgba(96, 186, 255, .075) 58%, transparent);
  transform: rotate(22deg); filter: blur(3px); mix-blend-mode: screen;
}
.lb-beam-a { left: 34vw; }
.lb-beam-b { left: 58vw; width: 40vw; transform: rotate(-18deg); opacity: .55; }

/* 电路板走线 */
.lb-circuit { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .92; }
.lb-trace path { fill: none; stroke: rgba(76, 160, 240, .28); stroke-width: 1.15; stroke-linejoin: round; stroke-linecap: round; }
.lb-trace.bright path { stroke: rgba(116, 200, 255, .52); stroke-width: 1.35; }
.lb-trace.dim { opacity: .45; }
.lb-trace .live {
  stroke: #a5e2ff; stroke-width: 1.7; stroke-dasharray: 74 620;
  filter: drop-shadow(0 0 6px rgba(88, 190, 255, .95));
  animation: lbDash 7s linear infinite;
}
@keyframes lbDash { to { stroke-dashoffset: -694; } }
.lb-pads circle { fill: rgba(126, 206, 255, .55); }
.lb-pads rect { fill: rgba(96, 186, 255, .34); }

/* 底部透视地面 */
.lb-floor {
  position: absolute; left: -24%; right: -24%; bottom: -16%; height: 58vh;
  background-image:
    linear-gradient(rgba(96, 186, 255, .14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 186, 255, .14) 1px, transparent 1px);
  background-size: 72px 72px;
  transform: perspective(560px) rotateX(66deg);
  transform-origin: bottom center;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 38%, #000 66%, transparent 96%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 38%, #000 66%, transparent 96%);
  opacity: .45;
}

/* ---------- 右侧盾牌主体 ---------- */
.lb-hero {
  position: absolute; right: 8.5%; top: 48%;
  height: min(63vh, 590px); aspect-ratio: 1;
  transform: translateY(-50%); z-index: 1;
}
.lb-aura {
  position: absolute; inset: -22%;
  background: radial-gradient(ellipse at 50% 46%, rgba(54, 152, 255, .52) 0%, rgba(24, 96, 190, .20) 42%, transparent 70%);
  filter: blur(8px); opacity: .82; animation: lbBreathe 8s ease-in-out infinite;
}
@keyframes lbBreathe {
  0%, 100% { opacity: .72; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}
.lb-orbit {
  position: absolute; inset: -9%; border-radius: 50%;
  background: conic-gradient(from 15deg,
    transparent 0deg 48deg,
    rgba(120, 212, 255, .8) 62deg,
    transparent 84deg 208deg,
    rgba(120, 212, 255, .58) 224deg,
    transparent 246deg 360deg);
  -webkit-mask: radial-gradient(circle, transparent 78.4%, #000 78.9%, #000 79.8%, transparent 80.3%);
  mask: radial-gradient(circle, transparent 78.4%, #000 78.9%, #000 79.8%, transparent 80.3%);
  opacity: .72; filter: drop-shadow(0 0 6px rgba(80, 190, 255, .55));
  animation: lbSpin 28s linear infinite;
}
@keyframes lbSpin { to { transform: rotate(360deg); } }
.lb-column {
  position: absolute; left: 30%; right: 30%; bottom: -10%; height: 46%;
  background: linear-gradient(0deg, rgba(96, 196, 255, .34), rgba(58, 150, 255, .08) 58%, transparent 100%);
  filter: blur(16px); opacity: .85;
}
/* 远景几何：六边形 + 轨道刻度 + 放射线 */
.lb-geo {
  position: absolute; inset: -20%; width: 140%; height: 140%;
  opacity: .34; animation: lbSpin 120s linear infinite;
}
/* 两道从光台升起的能量光柱 */
.lb-blade {
  position: absolute; top: -6%; height: 114%; width: 2px;
  background: linear-gradient(180deg, transparent, rgba(130, 220, 255, .55) 32%,
    rgba(130, 220, 255, .12) 72%, transparent);
  filter: blur(1.3px); opacity: .55;
}
.lb-blade.b1 { left: 15%; transform: rotate(13deg); }
.lb-blade.b2 { right: 13%; transform: rotate(-13deg); }
/* 环绕盾牌的 HUD 刻度环 + 两段反向转动的弧 */
.lb-hud-ring { position: absolute; inset: -15%; pointer-events: none; }
.hr-ticks {
  position: absolute; inset: 0; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg,
    rgba(140, 220, 255, .65) 0deg .55deg, transparent .55deg 6deg);
  -webkit-mask: radial-gradient(circle, transparent 84%, #000 84.3%, #000 85.2%, transparent 85.5%);
  mask: radial-gradient(circle, transparent 84%, #000 84.3%, #000 85.2%, transparent 85.5%);
  opacity: .45; animation: lbSpin 70s linear infinite;
}
.hr-rev {
  position: absolute; inset: 7%; border-radius: 50%;
  background: conic-gradient(from 30deg,
    transparent 0deg 40deg,
    rgba(100, 200, 255, .6) 56deg,
    transparent 82deg 198deg,
    rgba(100, 200, 255, .4) 214deg,
    transparent 240deg 360deg);
  -webkit-mask: radial-gradient(circle, transparent 71.6%, #000 72%, #000 73.2%, transparent 73.6%);
  mask: radial-gradient(circle, transparent 71.6%, #000 72%, #000 73.2%, transparent 73.6%);
  opacity: .55; animation: lbSpin 24s linear infinite reverse;
}
.hr-dot {
  position: absolute; width: 5px; height: 5px; border-radius: 50%;
  background: #b7ecff; box-shadow: 0 0 10px 2px rgba(80, 190, 255, .85);
}
.hr-dot.p1 { left: 50%; top: 1%; transform: translate(-50%, -50%); }
.hr-dot.p2 { right: 1%; top: 50%; transform: translate(50%, -50%); }
.hr-dot.p3 { left: 50%; bottom: 1%; transform: translate(-50%, 50%); }
.hr-dot.p4 { left: 1%; top: 50%; transform: translate(-50%, -50%); }
/* 四角定位框 */
.lb-corner {
  position: absolute; width: 30px; height: 30px; pointer-events: none;
  border: 1px solid rgba(110, 205, 255, .38);
}
.lb-corner.c1 { left: -8%; top: 1%; border-right: 0; border-bottom: 0; }
.lb-corner.c2 { right: -8%; top: 1%; border-left: 0; border-bottom: 0; }
.lb-corner.c3 { left: -8%; bottom: 1%; border-right: 0; border-top: 0; }
.lb-corner.c4 { right: -8%; bottom: 1%; border-left: 0; border-top: 0; }
/* 浮游的小方块 / 节点 */
.lb-hex {
  position: absolute; width: 12px; height: 12px;
  border: 1px solid rgba(120, 212, 255, .55);
  box-shadow: 0 0 10px rgba(60, 170, 255, .35), inset 0 0 6px rgba(90, 190, 255, .25);
  transform: rotate(45deg);
  animation: hexFloat 9s ease-in-out infinite;
}
.lb-hex.h1 { left: -3%; top: 23%; }
.lb-hex.h2 { right: -5%; top: 45%; width: 8px; height: 8px; animation-delay: -3.4s; }
.lb-hex.h3 { left: 3%; bottom: 9%; width: 9px; height: 9px; animation-delay: -6.1s; }
@keyframes hexFloat {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: .45; }
  50% { transform: rotate(45deg) translate(3px, -9px); opacity: .95; }
}
/* 悬浮的通讯节点 */
.lb-node {
  position: absolute; width: 7px; height: 7px; border-radius: 50%;
  background: #c9f1ff;
  box-shadow: 0 0 0 4px rgba(80, 190, 255, .12), 0 0 15px 3px rgba(80, 190, 255, .75);
  animation: nodePulse 6s ease-in-out infinite;
}
.lb-node.n1 { left: 5%; top: 15%; }
.lb-node.n2 { right: -3%; top: 61%; animation-delay: -2.2s; }
.lb-node.n3 { left: 17%; bottom: 2%; width: 5px; height: 5px; animation-delay: -4.4s; }
@keyframes nodePulse {
  0%, 100% { opacity: .35; transform: scale(.8); }
  50% { opacity: 1; transform: scale(1.15); }
}
/* 外层蓝色泛光：只往外发亮，不盖在盾牌表面，避免发糊 */
.lb-shield-glow {
  position: absolute; inset: -2.5%; width: 105%; height: 105%; object-fit: contain;
  filter: blur(19px) saturate(1.65) brightness(1.18);
  opacity: .72;
  -webkit-mask: url('/logo-shield-mask.svg') center / contain no-repeat;
  mask: url('/logo-shield-mask.svg') center / contain no-repeat;
}
/* 盾牌本体：轻微透视 + 多层厚度 + 锐利描边 */
.lb-shield-3d {
  position: absolute; inset: -4% -7%;
  transform: perspective(1500px) rotateY(-4deg) rotateX(1.2deg);
  transform-style: preserve-3d;
  animation: lbFloat3d 11s ease-in-out infinite;
}
@keyframes lbFloat3d {
  0%, 100% { transform: perspective(1500px) rotateY(-4deg) rotateX(1.2deg) translateY(0); }
  50% { transform: perspective(1500px) rotateY(-4.5deg) rotateX(1deg) translateY(-1.5%); }
}
.lb-shield-3d img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  -webkit-mask: url('/logo-shield-mask.svg') center / contain no-repeat;
  mask: url('/logo-shield-mask.svg') center / contain no-repeat;
}
.lb-shell {
  position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible;
}
.lb-echo-shield {
  position: absolute; inset: -5%; width: 110%; height: 110%;
  opacity: .35; filter: drop-shadow(0 0 8px rgba(90, 190, 255, .45));
  animation: lbEcho 7s ease-in-out infinite;
}
@keyframes lbEcho {
  0%, 100% { opacity: .16; transform: translate(-10px, -6px) scale(1.01); }
  50% { opacity: .42; transform: translate(-17px, -11px) scale(1.028); }
}
/* 向后错开的几层 = 盾牌厚度 */
.lb-edge { filter: brightness(.46) saturate(1.42) contrast(1.02); }
.lb-edge.e1 { transform: translate(2px, 4px); }
.lb-edge.e2 { transform: translate(4px, 8px); opacity: .6; filter: brightness(.4) saturate(1.35) blur(2px); }
.lb-edge.e3 { transform: translate(7px, 12px); opacity: .34; filter: brightness(.26) saturate(1.25) blur(6px); }
/* 一圈不发虚的高光边 */
.lb-shield-rim-dark {
  filter: brightness(0);
  transform: scale(1.024);
  opacity: .8;
}
.lb-shield-rim {
  filter: brightness(0) invert(1) sepia(1) saturate(6) hue-rotate(170deg) brightness(1.3)
    drop-shadow(0 0 6px rgba(120, 210, 255, .9));
  transform: scale(1.011);
  opacity: .9;
}
.lb-shield {
  transform: scale(1.08);
  image-rendering: -webkit-optimize-contrast;
  filter:
    brightness(1.05) contrast(1.08) saturate(1.08)
    drop-shadow(0 18px 30px rgba(0, 10, 25, .58));
}
/* 左上受光、右下压暗，给正面补一层体积感 */
.lb-shade {
  position: absolute; inset: .9%;
  background: linear-gradient(142deg, rgba(210, 242, 255, .30) 0%, rgba(255, 255, 255, .05) 24%, transparent 46%, rgba(0, 10, 26, .38) 92%);
  -webkit-mask: url('/logo-shield-mask.svg') center / contain no-repeat;
  mask: url('/logo-shield-mask.svg') center / contain no-repeat;
  mix-blend-mode: soft-light; opacity: .85;
}
/* 全息网格：只在盾牌轮廓里淡淡浮一层，增加科技表面质感 */
.lb-mesh {
  position: absolute; inset: .9%;
  background-image:
    linear-gradient(rgba(170, 226, 255, .5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(170, 226, 255, .5) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask: url('/logo-shield-mask.svg') center / contain no-repeat;
  mask: url('/logo-shield-mask.svg') center / contain no-repeat;
  mix-blend-mode: screen; opacity: .1;
}
/* 斜向扫过的高光，让表面像有弧度的金属/玻璃 */
.lb-spec {
  position: absolute; inset: .9%;
  background: linear-gradient(112deg, transparent 30%, rgba(225, 246, 255, .7) 43%, rgba(255, 255, 255, .18) 50%, transparent 60%);
  -webkit-mask: url('/logo-shield-mask.svg') center / contain no-repeat;
  mask: url('/logo-shield-mask.svg') center / contain no-repeat;
  mix-blend-mode: screen; opacity: 0;
  animation: lbSpec 9s ease-in-out infinite;
}
@keyframes lbSpec {
  0%, 48% { opacity: 0; transform: translateX(-38%); }
  58% { opacity: .5; }
  72% { opacity: .34; }
  84%, 100% { opacity: 0; transform: translateX(38%); }
}
/* 一道细光顺着盾牌轮廓扫下来 */
.lb-shield-scan {
  position: absolute; inset: .9%;
  background: linear-gradient(180deg, transparent 42%, rgba(186, 232, 255, .6) 50%, transparent 58%);
  -webkit-mask: url('/logo-shield-mask.svg') center / contain no-repeat;
  mask: url('/logo-shield-mask.svg') center / contain no-repeat;
  mix-blend-mode: screen; opacity: 0;
  animation: lbScanShield 8.5s ease-in-out infinite;
}
@keyframes lbScanShield {
  0%, 14% { transform: translateY(-44%); opacity: 0; }
  26% { opacity: .38; }
  56% { transform: translateY(44%); opacity: .2; }
  68%, 100% { transform: translateY(44%); opacity: 0; }
}
/* 地面倒影：把盾牌“放”在光台上，而不是贴在图里 */
.lb-shield-reflect {
  position: absolute; left: 0; right: 0; top: 93%; height: 62%; width: 100%;
  object-fit: contain; transform: scaleY(-1);
  opacity: .10; filter: blur(5px) saturate(1.25);
  -webkit-mask: url('/logo-shield-mask.svg') center / contain no-repeat;
  mask: url('/logo-shield-mask.svg') center / contain no-repeat;
}
.lb-spark {
  position: absolute; width: 4px; height: 4px; border-radius: 50%;
  background: #bfe9ff; box-shadow: 0 0 10px 2px rgba(90, 190, 255, .85);
  opacity: .8; animation: lbSpark 9s ease-in-out infinite;
}
.lb-spark.s1 { left: -9%; top: 30%; animation-delay: -1s; }
.lb-spark.s2 { right: -11%; top: 22%; width: 3px; height: 3px; animation-delay: -3.6s; }
.lb-spark.s3 { right: -4%; top: 66%; width: 5px; height: 5px; animation-delay: -5.2s; }
.lb-spark.s4 { left: -2%; top: 74%; width: 3px; height: 3px; animation-delay: -7.4s; }
@keyframes lbSpark {
  0%, 100% { transform: translateY(0); opacity: .2; }
  40% { opacity: .95; }
  70% { transform: translateY(-18px); opacity: .5; }
}

/* ---------- 底部多环光台 ---------- */
.lb-platform {
  position: absolute; left: 50%; bottom: -8%; width: 132%; height: 27%;
  transform: translateX(-50%); pointer-events: none;
}
.p-glow {
  position: absolute; inset: -12% -8%;
  background: radial-gradient(ellipse at 50% 58%, rgba(90, 194, 255, .40) 0%, rgba(40, 130, 235, .14) 46%, transparent 68%);
  filter: blur(9px);
}
.p-ring {
  position: absolute; left: 50%; top: 50%; border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(112, 204, 255, .55);
  box-shadow: 0 0 20px rgba(64, 164, 255, .42), inset 0 0 20px rgba(64, 164, 255, .16);
  animation: pRing 6.4s ease-in-out infinite;
}
.p-ring.r1 { width: 100%; height: 100%; opacity: .38; }
.p-ring.r2 { width: 78%; height: 76%; opacity: .6; animation-delay: -1.6s; }
.p-ring.r3 { width: 56%; height: 54%; opacity: .78; animation-delay: -3.2s; border-color: rgba(140, 218, 255, .7); }
.p-ring.r4 { width: 34%; height: 32%; opacity: .9; animation-delay: -4.8s; border-color: rgba(176, 232, 255, .8); }
@keyframes pRing {
  0%, 100% { transform: translate(-50%, -50%) scale(.96); opacity: .25; }
  50% { transform: translate(-50%, -50%) scale(1.03); opacity: .85; }
}
.p-core {
  position: absolute; left: 50%; top: 52%; width: 34%; height: 20%;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(ellipse, rgba(205, 240, 255, .95) 0%, rgba(78, 174, 255, .65) 38%, rgba(40, 130, 235, 0) 72%);
  filter: blur(7px); opacity: .85;
}

/* ---------- 登录卡片 ---------- */
.login-card {
  position: relative; z-index: 3; flex: 0 0 auto;
  width: 374px; margin: 0; align-self: center;
  padding: 30px 30px 22px; gap: 0;
  background: #fff; border: 1px solid rgba(255, 255, 255, .8); border-radius: 6px;
  box-shadow: 0 34px 80px rgba(0, 6, 18, .55), 0 1px 0 rgba(255, 255, 255, .9) inset;
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.login-card::before { display: none; }
.lc-head { display: flex; align-items: center; gap: 11px; margin-bottom: 0; }
.lc-logo { width: 40px; height: 40px; object-fit: contain; }
.lc-head h2 { font-size: 19px; letter-spacing: .15em; color: #103a63; line-height: 1.15; }
.lc-head span { margin-top: 3px; font-size: 11.5px; color: #7c8c9d; letter-spacing: .01em; }
.lc-tabs { display: flex; margin: 17px 0 16px; border-bottom: 1px solid #e8eef5; }
.lc-tab {
  font-size: 13.5px; font-weight: 600; color: #1a6fb5;
  padding: 0 2px 9px; border-bottom: 2px solid #1f7ac8; margin-bottom: -1px;
  letter-spacing: .02em;
}
.login-card .lc-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; color: #4e5f71; }
.lc-label { font-size: 12.5px; color: #4e5f71; }
.lc-input { position: relative; display: block; }
.lc-input svg {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: #93a3b4; pointer-events: none;
}
.login-card .lc-input input {
  width: 100%; height: 43px; padding: 0 13px 0 39px;
  color: #16202c; background: #fff; border: 1px solid #d7dee7; border-radius: 4px;
  font: inherit; font-size: 13.5px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.login-card .lc-input input::placeholder { color: #a6b2c0; }
.login-card .lc-input input:focus {
  border-color: #1f7ac8; box-shadow: 0 0 0 3px rgba(31, 122, 200, .13); background: #fff;
}
.lc-row { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 17px; }
.login-card .lc-check {
  display: flex; flex-direction: row; align-items: center; gap: 6px;
  font-size: 11.5px; color: #5d6d7f; cursor: pointer;
}
.login-card .lc-check input {
  width: 13px; height: 13px; margin: 0; padding: 0;
  accent-color: #0f5b9f; cursor: pointer;
}
.lc-mini { font-size: 10.5px; color: #9aa7b6; }
.login-card .btn.primary {
  height: 45px; margin-top: 0; border: 0; border-radius: 4px;
  background: linear-gradient(180deg, #1f80d2 0%, #0d5296 100%);
  color: #fff; font-size: 15px; font-weight: 600; letter-spacing: .34em; text-indent: .17em;
  box-shadow: 0 9px 20px rgba(13, 82, 150, .28);
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.login-card .btn.primary:hover {
  background: linear-gradient(180deg, #2a8ee0 0%, #0f5da8 100%);
  transform: translateY(-1px); box-shadow: 0 12px 24px rgba(13, 82, 150, .34);
}
.login-card .btn.primary:active { transform: translateY(0); box-shadow: 0 6px 14px rgba(13, 82, 150, .3); }
.login-card .lc-foot {
  margin: 17px 0 0; padding-top: 13px; border-top: 1px solid #eef2f7;
  text-align: center; font-size: 10.5px; color: #a2aebb; letter-spacing: .05em;
}
.legacy-login-entries {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e8eef5;
}
.legacy-login-entries a {
  padding: 9px 12px;
  border: 1px solid #dce8f1;
  border-radius: 9px;
  color: #215f93;
  background: #f7fbff;
  text-align: center;
  text-decoration: none;
  font-size: 12px;
  font-weight: 650;
}
.legacy-login-entries a:hover {
  border-color: #8ebbd9;
  background: #edf7ff;
}

.login-hud .hud-status { top: 24px; left: 30px; color: #8fb0cb; }
.login-hud .hud-meta { bottom: 22px; left: 30px; color: #5f7892; }
.login-hud .hud-br { left: auto; right: 30px; }

/* 矮屏（1366×640 / 1280×720）收紧一点，保证一屏放得下 */
@media (min-width: 921px) and (max-height: 720px) {
  .lb-hero { height: min(60vh, 470px); top: 47%; }
  .login-card { padding: 24px 28px 18px; }
  .lc-tabs { margin: 13px 0 13px; }
  .login-card .lc-field { margin-bottom: 10px; }
  .login-card .lc-input input { height: 41px; }
  .login-card .btn.primary { height: 43px; }
  .login-card .lc-foot { margin-top: 13px; padding-top: 10px; }
}

@media (max-width: 1100px) and (min-width: 921px) {
  .login-wrap { padding-left: 6vw; }
  .lb-hero { right: 3%; height: min(58vh, 500px); }
  .login-card { width: 356px; }
}

@media (max-width: 920px) {
  .login-wrap { justify-content: center; padding: 22px 18px; overflow-y: auto; }
  .lb-hero {
    right: 50%; top: 44%; transform: translate(50%, -50%);
    height: 92vmin; opacity: .16; filter: saturate(.9);
  }
  .lb-platform, .lb-orbit, .lb-shield-scan, .lb-spec, .lb-shield-reflect, .lb-spark, .lb-column,
  .lb-hud-ring, .lb-corner, .lb-hex, .lb-echo-shield, .lb-geo, .lb-blade, .lb-node { display: none; }
  .lb-circuit { opacity: .5; }
  .lb-grid { opacity: .5; }
  .lb-beam { opacity: .5; }
  .login-card { width: min(408px, 100%); padding: 28px 24px 20px; }
  .login-hud .hud-meta { display: none; }
  .login-hud .hud-status { top: 16px; left: 18px; }
}

@media (max-width: 420px) {
  .login-wrap { padding: 18px 14px; }
  .login-card { padding: 24px 20px 18px; }
  .lc-head h2 { font-size: 17.5px; }
  .lc-head span { font-size: 10.5px; }
  .lc-row { gap: 8px; }
  .lc-mini { text-align: right; }
}

/* ---------- 盘卷与客户溯源 ---------- */
.trace-form-note {
  margin: 0 0 14px;
  padding: 10px 13px;
  border: 1px solid #cfe1f0;
  border-radius: 6px;
  background: #f3f8fc;
  color: #52677a;
  font-size: 12.5px;
  line-height: 1.65;
}
.trace-form-note b { color: #123d62; }
.coil-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.coil-stats > div {
  position: relative;
  overflow: hidden;
  min-height: 94px;
  padding: 17px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(145deg, #fff 0%, #f5f8fb 100%);
  box-shadow: 0 5px 16px rgba(17, 48, 77, .055);
}
.coil-stats > div::after {
  content: "";
  position: absolute;
  width: 95px;
  height: 95px;
  right: -32px;
  bottom: -48px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(28, 124, 197, .13), transparent 70%);
}
.coil-stats span, .coil-stats small { display: block; color: #6b7b8c; }
.coil-stats span { font-size: 12.5px; }
.coil-stats b {
  display: block;
  margin: 5px 0 2px;
  color: #123e65;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -.02em;
}
.coil-stats b em { margin-left: 4px; font-size: 13px; font-style: normal; color: #60788d; }
.coil-stats small { font-size: 11.5px; }
.coil-batch-output-panel { margin-bottom: 14px; }
.coil-output-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 12px;
  border: 1px solid #dfe7ee;
  border-radius: 7px;
  background: #f8fafc;
}
.coil-output-summary > div { padding: 12px 15px; }
.coil-output-summary > div + div { border-left: 1px solid #dfe7ee; }
.coil-output-summary span { display: block; color: #6f7f8f; font-size: 11.5px; }
.coil-output-summary b {
  display: block;
  margin-top: 4px;
  color: #173f61;
  font-size: 20px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.coil-output-summary small { display: block; margin-top: 3px; color: #7b8998; font-size: 10.5px; }
.coil-output-table-wrap {
  max-height: 430px;
  overflow: auto;
  border: 1px solid #e0e7ee;
  border-radius: 7px;
}
.coil-output-table { min-width: 1160px; }
.coil-output-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f5f8fb;
  box-shadow: inset 0 -1px 0 #dfe7ee;
}
.coil-output-table td { vertical-align: middle; }
.coil-output-table td > small,
.coil-output-table td > .tag + small {
  display: block;
  margin-top: 3px;
  color: #7b8998;
  font-size: 10.5px;
  line-height: 1.35;
}
.coil-output-table .coil-output-row-warn td { background: #fffaf0; }
.coil-workshop-output {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.coil-workshop-output > span {
  padding: 3px 6px;
  border: 1px solid #dce6ef;
  border-radius: 5px;
  background: #f7fafc;
  color: #435b70;
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
}
.coil-workshop-output b { color: #1f5c84; }
.coil-workshop-output small { color: #7a8998; }
.coil-batch-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1c6698;
  font: inherit;
  cursor: pointer;
}
.coil-batch-link:hover { color: #124a72; text-decoration: underline; text-underline-offset: 3px; }
.coil-batch-link span { color: #7a94a9; }
.coil-estimate-ignored {
  display: inline-block;
  color: #7b8998;
  font-size: 12px;
  font-weight: 600;
}
.coil-output-note {
  margin: 10px 2px 0;
  color: #718092;
  font-size: 11.5px;
  line-height: 1.65;
}
.card-subtitle {
  display: block;
  margin-top: 3px;
  color: #788797;
  font-size: 11.5px;
}
.coil-label-card-panel { margin-bottom: 14px; }
.coil-ws-tabs { margin: 0; }
.coil-reserve-bar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.coil-reserve-bar .field { width: 128px; margin: 0; }
.coil-reserve-bar .field input { height: 36px; }
.coil-reserve-bar > span {
  align-self: center;
  color: #7b8998;
  font-size: 11.5px;
}
.coil-label-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.coil-label-guide > div {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr);
  column-gap: 8px;
  padding: 10px 11px;
  border: 1px solid #e0e8ef;
  border-radius: 6px;
  background: #fafcfd;
}
.coil-label-guide b {
  grid-row: 1 / 3;
  align-self: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #e5f1f9;
  color: #1e618a;
  font-size: 11px;
  line-height: 25px;
  text-align: center;
}
.coil-label-guide span { color: #254d6d; font-size: 12px; font-weight: 600; }
.coil-label-guide small { margin-top: 2px; color: #7a8998; font-size: 10.5px; line-height: 1.45; }
.coil-label-table { max-height: 215px; overflow: auto; }
.coil-label-table table { min-width: 660px; }
.coil-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.coil-main-grid > .card { min-width: 0; }
.coil-record-filterbar {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}
.coil-record-filterbar > span {
  margin-right: 3px;
  color: #6f7f8f;
  font-size: 11.5px;
}
.coil-record-filterbar .chip { margin: 0; }
.coil-template-links {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  padding: 10px 13px;
  border-top: 1px solid var(--line);
  background: #fafbfd;
  color: #66778a;
  font-size: 12px;
}
.trace-query-card { position: static; }
.trace-search { display: flex; gap: 8px; margin-bottom: 14px; }
.trace-search input {
  flex: 1;
  min-width: 0;
  height: 39px;
  padding: 0 12px;
  border: 1px solid #cfd9e4;
  border-radius: 5px;
  background: #fff;
  font: 600 15px/1.2 Consolas, "Arial Narrow", monospace;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.trace-search .btn { height: 39px; }
.trace-result { min-height: 130px; }
.batch-current-stage {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  margin: 0 0 12px; padding: 11px 13px; border-radius: 9px;
  background: linear-gradient(90deg, #f2f8fd, #fbfdff);
  border: 1px solid #d5e4f1;
}
.batch-current-stage > span { color: var(--muted); font-size: 12px; }
.batch-current-stage > b { font-size: 13px; }
.batch-current-stage > p { margin: 0 0 0 auto; color: #506176; font-size: 12px; }
.empty.compact { padding: 28px 12px; }
.empty.compact .big { font-size: 28px; margin-bottom: 8px; }
.trace-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 15px;
  border: 1px solid #cfe2ef;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(22, 101, 161, .09), transparent 55%),
    linear-gradient(150deg, #f9fcff, #eef6fb);
}
.trace-result-head h3 {
  margin: 1px 0 3px;
  color: #103c64;
  font: 700 21px/1.25 Consolas, "Arial Narrow", monospace;
  letter-spacing: .025em;
}
.trace-result-head p { margin: 0; color: #65798c; font-size: 12px; }
.trace-kicker {
  color: #6a8194;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .08em;
}
.trace-ok-mark {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
  color: #16704c;
  font-size: 21px;
  font-weight: 700;
}
.trace-ok-mark span { font-size: 11px; }
.trace-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 10px 0 16px;
  border: 1px solid #e1e8ef;
  background: #e1e8ef;
}
.trace-facts > div { padding: 9px 11px; background: #fff; }
.trace-facts span, .trace-facts b { display: block; }
.trace-facts span { color: #7c8a98; font-size: 10.5px; }
.trace-facts b { margin-top: 2px; color: #173d60; font-size: 12.5px; }
.trace-section-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin: 16px 0 8px;
}
.trace-section-title b { color: #173d60; font-size: 13.5px; }
.trace-section-title span { color: #8794a2; font-size: 10.5px; text-align: right; }
.trace-table { min-width: 770px; }
.trace-table code { color: #335e80; font-size: 10.5px; white-space: nowrap; }
.trace-upstream {
  margin-bottom: 7px;
  border: 1px solid #dfe7ef;
  border-radius: 6px;
  background: #fff;
}
.trace-upstream summary {
  padding: 9px 11px;
  color: #295777;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}
.trace-steps { padding: 0 11px 9px; }
.trace-step {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 7px;
  padding: 7px 0;
  border-top: 1px solid #edf1f5;
}
.trace-step > b {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #e8f2fa;
  color: #246692;
  font-size: 10.5px;
  line-height: 19px;
  text-align: center;
}
.trace-step strong { display: block; color: #274d69; font-size: 12px; }
.trace-step small { display: block; margin-top: 2px; color: #8190a0; font-size: 10.5px; }
.trace-step p { margin: 4px 0 0; color: #53687a; font-size: 11px; line-height: 1.5; }
.trace-no-step { margin: 0; padding: 0 11px 11px; font-size: 11.5px; }
.ocr-sheet-wrap {
  max-height: 60vh;
  overflow: auto;
  border: 1px solid #dce5ed;
  border-radius: 6px;
}
.modal.ocr-sheet-modal {
  width: min(1540px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
}
.modal.test-import-modal {
  width: calc(100vw - 16px);
  max-width: 1800px;
  height: calc(100vh - 18px);
  max-height: none;
}
.test-import-modal .modal-body {
  padding: 12px 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.test-import-wrap {
  flex: 1;
  min-height: 260px;
  max-height: none;
  border: 1px solid #dce5ed;
  border-radius: 7px;
}
.test-import-table {
  width: 100%;
  min-width: 1000px;
  font-size: 12px;
}
.test-import-table th,
.test-import-table td { padding: 3px 2px; }
.test-import-table thead th {
  white-space: nowrap;
  font-size: 11px;
  text-align: center;
}
.test-import-table tbody td:nth-child(1) { width: 86px; }
.test-import-table tbody td:nth-child(2),
.test-import-table tbody td:nth-child(8) { width: 112px; }
.test-import-table tbody td:nth-child(3) { width: 64px; }
.test-import-table tbody td:nth-child(4) { width: 56px; }
.test-import-table tbody td:nth-child(5) { width: 64px; }
.test-import-table tbody td:nth-child(6) { width: 82px; }
.test-import-table tbody td:nth-child(7) { width: 86px; }
.test-import-table tbody td:nth-child(9) { width: 62px; }
.test-import-table tbody td:nth-child(10),
.test-import-table tbody td:nth-child(11) { width: 68px; }
.test-import-table tbody td:nth-child(12) { width: 116px; }
.test-import-table input:not([type="checkbox"]),
.test-import-table select { font-size: 12px; }
.ocr-sheet-table { min-width: 1180px; }
.ocr-sheet-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #edf3f8;
  white-space: nowrap;
}
.ocr-sheet-table td { padding: 5px; vertical-align: middle; }
.ocr-sheet-table td input[type="text"],
.ocr-sheet-table td input:not([type]) {
  width: 100%;
  min-width: 82px;
  height: 32px;
  padding: 0 7px;
}
.ocr-sheet-table td input[type="checkbox"] { width: 16px; height: 16px; }
.affected-coils { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.affected-coils button {
  padding: 8px 9px;
  border: 1px solid #d9e3ec;
  border-radius: 5px;
  background: #fafcfe;
  text-align: left;
  cursor: pointer;
}
.affected-coils button:hover { border-color: #79a8cc; background: #f1f8fd; }
.affected-coils b, .affected-coils span { display: block; }
.affected-coils b { color: #184a70; font: 700 11.5px/1.4 Consolas, monospace; }
.affected-coils span { margin-top: 2px; color: #7a8998; font-size: 10.5px; }
.trace-not-found {
  padding: 21px 16px;
  border: 1px solid #ead8d8;
  border-radius: 7px;
  background: #fffafa;
}
.trace-not-found b { color: #8c3434; font-size: 14px; }
.trace-not-found p { margin: 6px 0; color: #765b5b; font-size: 12px; }
.trace-not-found small { color: #9a8585; font-size: 10.5px; }
.coil-label-tip {
  margin: 2px 0 13px;
  color: #6e7e8d;
  font-size: 11.5px;
}
.coil-label-tip span {
  display: inline-block;
  margin-right: 7px;
  padding: 3px 7px;
  border-radius: 20px;
  background: #e9f3f9;
  color: #1d628d;
  font-weight: 600;
}
.coil-label-tip span.warn { background: #fff0e7; color: #a34e20; }
.coil-segment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 9px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.coil-segment-head b, .coil-segment-head span { display: block; }
.coil-segment-head b { color: #183e60; font-size: 13.5px; }
.coil-segment-head span { margin-top: 2px; color: #84919e; font-size: 11px; }
.coil-segment-line {
  display: grid;
  grid-template-columns: 28px 105px minmax(0, 1fr) 140px 58px;
  gap: 8px;
  align-items: end;
  margin-bottom: 8px;
  padding: 9px;
  border: 1px solid #e0e7ee;
  border-radius: 6px;
  background: #fbfcfd;
}
.coil-segment-line .field { margin: 0; }
.coil-segment-order {
  align-self: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e8f2f8;
  color: #27678f;
  font-size: 11px;
  font-weight: 700;
  line-height: 24px;
  text-align: center;
}
.coil-remove-seg { margin-bottom: 1px; color: #9c4b4b; }
.coil-summary {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  padding: 10px 13px;
  border-radius: 6px;
  background: #f4f6f9;
  color: #68798a;
  font-size: 12px;
}
.coil-summary b { color: #244e6d; font-size: 13px; }
.coil-summary.ok { background: #edf8f2; color: #2b7053; }
.coil-summary.ok b { color: #176346; }
.coil-summary.bad { background: #fff4ee; color: #8b5b42; }
.coil-summary.bad b { color: #9b4b24; }

@media (max-width: 760px) {
  .coil-stats { grid-template-columns: 1fr; }
  .coil-stats > div { min-height: 78px; }
  .coil-output-summary { grid-template-columns: 1fr; }
  .coil-output-summary > div + div {
    border-top: 1px solid #dfe7ee;
    border-left: 0;
  }
  .coil-segment-line { grid-template-columns: 27px minmax(0, 1fr) 105px; }
  .coil-remove-seg { grid-column: 2 / -1; width: fit-content; }
  .coil-facts, .trace-facts, .affected-coils { grid-template-columns: 1fr; }
  .trace-result-head { align-items: flex-start; }
  .trace-ok-mark { flex-direction: column; align-items: flex-end; }
  .coil-label-guide { grid-template-columns: 1fr; }
}

/* ---------- 手机端总修复：页面不横向漂移，只有表格内部滚动 ---------- */
@media (max-width: 760px) {
  html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
  }
  #app-view, .app, .main, .body {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .body {
    padding: 10px;
    overflow-x: hidden;
  }
  .body > *,
  .card,
  .grid,
  .grid > *,
  .hero,
  .dashboard-info-grid,
  .dashboard-info-grid > .card,
  .batch-snapshot-grid,
  .batch-snapshot,
  .loc-grid,
  .loc-card {
    min-width: 0 !important;
    max-width: 100%;
  }
  .topbar {
    padding: 0 10px;
    gap: 8px;
  }
  .topbar h2 {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
  }
  .clock { display: none; }
  .card-head {
    align-items: flex-start;
    gap: 7px;
    padding: 11px 12px;
  }
  .card-head h3 {
    min-width: 0;
    font-size: 15px;
  }
  .card-body { padding: 12px; }
  .card-body.tight { padding: 0; }
  .hero {
    padding: 14px 12px;
  }
  .hero-title {
    min-width: 0;
  }
  .hero-title h3 {
    font-size: 15px;
    line-height: 1.35;
  }
  .hero-title p {
    font-size: 11.5px;
    line-height: 1.55;
  }
  .hero-chips { width: 100%; }
  .hero-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .hkpi { padding: 10px; }
  .hkpi .hk-v { font-size: 21px; }
  .hkpi .hk-l,
  .hkpi .hk-s { font-size: 10.5px; line-height: 1.4; }
  .dashboard-info-grid,
  .dashboard-info-grid .batch-snapshot-grid,
  .loc-grid {
    grid-template-columns: 1fr;
  }
  .table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
  }
  .tl-row {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    grid-template-areas:
      "time material qty"
      ". by by";
    column-gap: 8px;
    row-gap: 3px;
    align-items: start;
    margin-left: 12px;
    padding: 9px 10px;
  }
  .tl-time { grid-area: time; font-size: 11px; }
  .tl-mat { grid-area: material; }
  .tl-qty { grid-area: qty; font-size: 13px; text-align: right; }
  .tl-by {
    grid-area: by;
    min-width: 0;
    text-align: left;
    font-size: 11px;
  }
  .alert-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .alert-row .al-name {
    flex: 1 1 calc(100% - 72px);
    white-space: normal;
    overflow: visible;
    line-height: 1.55;
  }
  .alert-row .al-val {
    width: 100%;
    white-space: normal;
    padding-left: 0;
    line-height: 1.5;
  }
  .stock-warning-row,
  .stock-warning-row > span {
    min-width: 0;
  }
  .toolbar > .field,
  .toolbar > label.field {
    flex: 1 1 100%;
    min-width: 0 !important;
  }
  .toolbar > .btn {
    max-width: 100%;
    white-space: normal;
  }
  .card-head > div[style*="margin-left:auto"] {
    width: 100%;
    margin-left: 0 !important;
  }

  /* 危险品库存表在手机上改成一张张独立卡片 */
  .hazard-stock-table,
  .hazard-stock-table tbody,
  .hazard-stock-table tr,
  .hazard-stock-table td {
    display: block;
    width: 100%;
  }
  .hazard-stock-table thead { display: none; }
  .hazard-stock-table tbody {
    display: grid;
    gap: 10px;
    padding: 10px;
  }
  .hazard-stock-table tr {
    padding: 12px;
    border: 1px solid #dfe7ef;
    border-radius: 10px;
    background: #fff;
  }
  .hazard-stock-table td {
    padding: 4px 0;
    border: 0;
    text-align: left !important;
  }
  .hazard-stock-table td:first-child {
    padding-bottom: 8px;
    border-bottom: 1px solid #edf1f5;
  }
  .hazard-stock-table td[data-label]::before {
    content: attr(data-label);
    display: inline-block;
    min-width: 76px;
    color: #7a8999;
    font-size: 11px;
  }
  .hazard-stock-table .stock-pairs {
    display: inline-flex;
    min-width: 0;
    vertical-align: top;
  }
}

/* 试爆记录：统计与填写说明 */
.test-overview-grid { margin-bottom: 14px; }
.test-overview-grid .kpi { border-top: 3px solid #8fb7d6; }
.test-overview-grid .kpi.ok { border-top-color: #65a67b; }
.test-overview-grid .kpi.danger { border-top-color: #d08a8a; }
.test-guide-card { margin-bottom: 14px; }
.test-guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.test-guide-item {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid #dfe8f1;
  border-radius: 9px;
  background: linear-gradient(145deg, #fbfdff, #f4f8fc);
}
.test-guide-item b { display: block; color: #1b4c73; font-size: 13px; }
.test-guide-item p {
  margin: 7px 0 0;
  color: #617386;
  font-size: 12px;
  line-height: 1.65;
}
@media (max-width: 920px) {
  .test-guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .test-guide-grid { grid-template-columns: 1fr; }
}

/* 成品成本核算与成本预警 */
.cost-summary-grid { margin-bottom: 14px; }
.cost-summary-grid .kpi { border-top: 3px solid #8fb7d6; }
.cost-summary-grid .kpi.accent { border-top-color: var(--gold); }
.cost-summary-grid .kpi.ok { border-top-color: var(--ok); }
.cost-summary-grid .kpi.danger { border-top-color: var(--danger); }
.cost-target-card { margin-bottom: 14px; }
.cost-target-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px auto auto;
  gap: 12px;
  align-items: end;
}
.cost-target-row > div > b { color: #183e60; font-size: 14px; }
.cost-target-row > div > p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.cost-batch-table { min-width: 1220px; }
.cost-batch-table .cost-pick {
  width: 38px;
  min-width: 38px;
  padding-left: 8px;
  padding-right: 8px;
  text-align: center;
}
.cost-batch-table .cost-pick input {
  width: 16px;
  height: 16px;
  accent-color: #1f6b8f;
  cursor: pointer;
}
.cost-batch-table tfoot td {
  border-top: 2px solid #aebfd0;
  background: #f4f8fb;
  font-weight: 600;
}
.cost-batch-table tfoot .cost-meter-note { margin-top: 3px; }
.cost-row-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.pool-fee-edit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 190px;
}
.pool-fee-edit input:first-child {
  width: 110px;
  text-align: right;
}
.pool-fee-edit input:last-child {
  width: 72px;
  text-align: center;
}
.cost-meter-note { display: block; color: var(--muted); font-size: 10.5px; font-weight: 400; }
.cost-over { color: #b91c1c; font-weight: 700; }
.cost-under { color: #15803d; font-weight: 700; }
.cost-monitor-summary { margin-bottom: 14px; }
.cost-monitor-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
}
.cost-monitor-actions > span { margin-right: auto; }
.cost-monitor-card { margin-top: 14px; }
.cost-monitor-ok { min-height: 150px; display: grid; place-content: center; }

@media (max-width: 760px) {
  .cost-target-row { grid-template-columns: 1fr; }
  .cost-target-row .btn,
  .cost-target-row .field { width: 100%; }
  .cost-row-actions { flex-wrap: wrap; white-space: normal; }
  .cost-monitor-actions { justify-content: stretch; }
  .cost-monitor-actions > span { flex: 1 1 100%; }
}

/* 操作审计：桌面保留密集台账，手机改为可扫描的记录卡。 */
.audit-summary {
  color: #34495f;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.audit-summary-disclosure {
  margin: 0;
  color: #34495f;
  line-height: 1.55;
}
.audit-summary-disclosure summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  cursor: pointer;
  list-style: none;
}
.audit-summary-disclosure summary::-webkit-details-marker { display: none; }
.audit-summary-disclosure summary span {
  overflow-wrap: anywhere;
}
.audit-summary-disclosure summary b {
  color: var(--brand);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.audit-summary-disclosure > div {
  margin-top: 7px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fafc;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .topbar {
    height: auto;
    min-height: 58px;
    flex-wrap: wrap;
    padding: 8px 10px 7px;
    gap: 7px 10px;
  }
  .topbar h2 {
    flex: 1 1 auto;
    min-width: 0;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.3;
  }
  .topbar-right {
    flex: 0 0 100%;
    min-width: 0;
    gap: 7px;
    padding-top: 6px;
    border-top: 1px solid #e6ecf2;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .topbar-right::-webkit-scrollbar { display: none; }
  .topbar-right .btn.small {
    min-height: 32px;
    flex: 0 0 auto;
  }
  #a-list {
    max-height: min(68vh, 720px);
    padding: 10px;
    background: #f2f6fa;
  }
  .audit-table {
    display: block;
    min-width: 0;
    width: 100%;
    table-layout: auto;
    background: transparent;
  }
  .audit-table thead { display: none; }
  .audit-table tbody {
    display: grid;
    gap: 10px;
  }
  .audit-table tbody tr {
    display: block;
    padding: 12px 13px;
    border: 1px solid #dce5ee;
    border-radius: 12px;
    background: #fff;
  }
  .audit-table tbody td {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 9px;
    width: auto;
    padding: 5px 0;
    border: 0;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .audit-table tbody td::before {
    content: attr(data-label);
    color: #5d7181;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.55;
  }
  .audit-table tbody td:first-child {
    padding-top: 0;
    color: #183a5a;
    font-weight: 600;
  }
  .audit-table tbody td:last-child { padding-bottom: 0; }
  .audit-table .audit-detail-cell { align-items: start; }
  .audit-detail-line {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 5px 7px;
  }
  .audit-detail-line > small { grid-column: 1 / -1; }
  .audit-table .tag { justify-self: start; }
}

/* ==========================================================================
   2026-11-21 · 仓储界面整理
   方向：工业台账、现场标签、少量警示色。保留业务结构，只收敛层级、
   间距、颜色和交互反馈。Unslop by Damir Sokolovsky (@heydamir), CC BY 4.0.
   ========================================================================== */
:root {
  --bg: #f2f4f1;
  --panel: #fdfefb;
  --ink: #202722;
  --muted: #66716f;
  --line: #d6ddd9;
  --brand: #0d3a66;
  --brand-2: #1c6ea8;
  --navy-deep: #071f3a;
  --accent: #ad711f;
  --gold: #b67822;
  --gold-2: #d8a64b;
  --danger: #a43d35;
  --warn: #9a681c;
  --ok: #2f6b4f;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(35, 48, 48, .04);
}

body {
  background: var(--bg);
  color: var(--ink);
}

.sidebar {
  background: #0b3155;
  color: #cfd9d8;
  border-right: 1px solid #214b70;
}

.brand.small .brand-mark {
  background: transparent;
}

.brand.small strong {
  letter-spacing: .06em;
}

.brand.small span {
  color: #9eaba5;
}

.nav-group {
  padding: 12px 10px 6px;
  color: #9eaea7;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .01em;
}

.nav-group:hover {
  color: #eef2ef;
}

.nav-item {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 7px;
  color: #d7dfda;
  font-size: 14px;
}

.nav-item:hover {
  color: #fff;
  background: #154367;
}

.nav-item.active {
  color: #fff;
  background: #1b5685;
  box-shadow: inset 3px 0 0 #d8a64b;
}

.nav-item .ic {
  width: 18px;
  color: #9fb6ac;
  opacity: 1;
}

.nav-item.active .ic {
  color: #f0d49b;
}

.system-switch {
  background: #082844;
}

.system-switch-label {
  color: #8fa1a5;
}

.system-switch-item {
  border-color: #315a7c;
  background: #143f65;
}

.system-switch-item:hover {
  background: #1a4c74;
}

.topbar {
  min-height: 60px;
  height: 60px;
  padding: 0 24px;
  border-bottom-color: #d9d4c8;
  background: rgba(255, 253, 248, .96);
  backdrop-filter: blur(10px);
}

.topbar h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #20231e;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -.01em;
}

.topbar h2::before {
  content: "";
  width: 4px;
  height: 18px;
  flex: 0 0 4px;
  border-radius: 1px;
  background: #1c6ea8;
}

.topbar-right {
  gap: 8px;
}

.body {
  padding: 24px;
  background: var(--bg);
}

.btn,
input,
select,
textarea {
  border-color: #d8d2c5;
  border-radius: 8px;
  background: #fffdf9;
}

.btn {
  min-height: 34px;
  padding: 6px 12px;
  color: #30332c;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.btn:hover {
  background: #f1eee6;
}

.btn.primary {
  border-color: var(--brand);
  background: var(--brand);
}

.btn.primary:hover {
  background: #0b4f80;
}

.btn.small {
  min-height: 30px;
  padding: 4px 9px;
  font-size: 12px;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid #1c6ea8;
  outline-offset: 2px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(45, 101, 112, .22);
  border-color: var(--brand-2);
}

.card {
  border-color: #ddd8cc;
  border-radius: 14px;
  background: var(--panel);
  box-shadow: none;
}

.card + .card {
  margin-top: 16px;
}

.card.kpi.clickable-kpi:hover {
  border-color: #aebcb7;
  box-shadow: none;
  transform: none;
}

.card-head {
  min-height: 52px;
  padding: 14px 16px;
  border-bottom-color: #e4dfd5;
  background: #fcfaf5;
}

.card-head h3 {
  color: #262923;
  font-size: 15px;
  font-weight: 500;
}

.card-body {
  padding: 16px;
}

.tag {
  border-radius: 5px;
  padding: 1px 7px;
  font-size: 11px;
  line-height: 18px;
}

.tag.blue,
.tag.purple {
  color: #345b64;
  border-color: #c9d9d5;
  background: #eef5f2;
}

.tag.gray {
  color: #62685f;
  border-color: #d8d4ca;
  background: #f2efe8;
}

.tag.green {
  color: #2f684b;
  border-color: #bfd8c9;
  background: #eff7f1;
}

.tag.amber {
  color: #7d5419;
  border-color: #e2c894;
  background: #fbf4e5;
}

.tag.red {
  color: #913d36;
  border-color: #dfb9b3;
  background: #faf0ee;
}

.warehouse-line-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.capture-empty-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 36px;
  margin: 0 auto 8px;
  border: 1px solid #d7d2c6;
  border-radius: 8px;
  background: #f5f2ea;
  color: #55655f;
}

.capture-empty-icon .warehouse-line-icon {
  width: 24px;
  height: 24px;
}

.hazard-banner-icon {
  margin-top: 2px;
  color: #8a5a18;
}

table {
  color: #2d3029;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

thead th {
  padding: 10px 12px;
  border-bottom-color: #d8d3c7;
  background: #f6f3ec;
  color: #666b62;
  font-size: 11px;
  font-weight: 500;
}

tbody td {
  padding: 10px 12px;
  border-bottom-color: #ece7dd;
}

tbody tr:hover {
  background: #f8f5ef;
}

.hero {
  padding: 24px;
  border: 1px solid #d5dcd8;
  border-top: 3px solid #376887;
  border-radius: 16px;
  background: #fbf9f3;
  color: var(--ink);
  box-shadow: none;
}

.hero::after {
  display: none;
}

.hero-head {
  align-items: center;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #dfdacf;
}

.hero-title {
  align-items: flex-start;
  gap: 12px;
}

.hero-title h3 {
  color: #20241f;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -.015em;
}

.hero-title p {
  margin-top: 5px;
  color: #687371;
  font-size: 12px;
}

.pulse {
  width: 8px;
  height: 8px;
  margin-top: 7px;
  flex-basis: 8px;
  background: #a96d20;
  box-shadow: none;
  animation: none;
}

.hero-chips {
  gap: 6px;
}

.hchip {
  padding: 4px 9px;
  border-color: #d8d2c6;
  border-radius: 6px;
  background: #f2efe8;
  color: #646a60;
  font-size: 11px;
}

.hchip b {
  color: #252922;
  font-family: var(--finance-num, ui-monospace, "SFMono-Regular", Consolas, monospace);
  font-size: 12px;
}

.hchip.warn {
  border-color: #dfc38d;
  background: #fbf3e2;
  color: #7e5519;
}

.hchip.ok {
  border-color: #c5dbcc;
  background: #eff7f1;
  color: #35644b;
}

.hero-kpis {
  margin-top: 16px;
  gap: 0;
  overflow: hidden;
  border: 1px solid #ddd8cc;
  border-radius: 10px;
  background: #fffdf9;
}

.hkpi {
  min-width: 0;
  padding: 15px 16px;
  border: 0;
  border-left: 1px solid #e1ddd3;
  border-radius: 0;
  background: #fffdf9;
  color: #2b2e28;
  transition: background-color 140ms ease;
}

.hkpi:first-child {
  border-left: 0;
}

.hkpi .hk-l {
  color: #6c7067;
  font-size: 12.5px;
}

.hkpi .hk-v {
  margin-top: 5px;
  color: #252821;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -.02em;
}

.hkpi .hk-v small {
  color: #74786f;
  font-size: 12px;
}

.hkpi .hk-s {
  color: #74786f;
  font-size: 12.5px;
  line-height: 18px;
}

.hkpi.warn {
  border-top: 0;
  box-shadow: inset 0 3px 0 #b97c25;
}

.hkpi.warn .hk-v {
  color: #8b5a18;
}

.hkpi.ok .hk-v {
  color: #2f684b;
}

.hkpi.clickable:hover {
  border-color: #e1ddd3;
  background: #f5f2ea;
  transform: none;
}

.dashboard-info-grid {
  padding-top: 16px;
  grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr);
  align-items: start;
}

.dashboard-info-grid > .card {
  margin-top: 0 !important;
  height: auto;
}

.dashboard-info-grid .card-head h3 {
  font-size: 16px;
}

.dashboard-info-grid .empty {
  font-size: 15px;
}

.dashboard-info-grid > .card > .card-body {
  flex: 0 1 auto;
}

.dashboard-info-grid .stock-warning-empty {
  min-height: 0;
}

.stock-warning-card {
  overflow: hidden;
}

.stock-warning-card-head {
  align-items: center;
  padding: 16px 18px;
}

.stock-warning-heading {
  flex: 1 1 160px;
  min-width: 0;
}

.stock-warning-heading h3 {
  margin: 0;
}

.stock-warning-heading p {
  margin: 3px 0 0;
  color: #72776f;
  font-size: 11px;
  line-height: 16px;
}

.stock-warning-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-left: auto;
}

.stock-warning-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #79521d;
  font-size: 12px;
  white-space: nowrap;
}

.stock-warning-status::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 2px;
  background: #b67b2d;
}

.stock-warning-status.is-ok {
  color: #38634c;
}

.stock-warning-status.is-ok::before {
  background: #4f8064;
}

.stock-warning-action {
  min-height: 32px;
  padding: 4px 2px 4px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #315f55;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: color 140ms ease, background-color 140ms ease;
}

.stock-warning-action:hover {
  background: #f1eee6;
  color: #174b42;
}

.stock-warning-action .warehouse-line-icon,
.stock-warning-chevron .warehouse-line-icon {
  width: 14px;
  height: 14px;
}

.stock-warning-table-head,
.stock-warning-row {
  display: grid;
  grid-template-columns: minmax(128px, 1fr) 72px 80px 68px 16px;
  align-items: center;
  column-gap: 12px;
}

.stock-warning-table-head {
  min-height: 34px;
  padding: 0 18px;
  border-bottom: 1px solid #ddd8cc;
  background: #f6f3ec;
  color: #777b72;
  font-size: 10px;
  line-height: 14px;
}

.stock-warning-table-head span:not(:first-child) {
  text-align: right;
}

.stock-warning-row {
  width: 100%;
  min-height: 62px;
  padding: 10px 18px;
  border: 0;
  border-bottom: 1px solid #ece7dd;
  border-radius: 0;
  background: #fffdf9;
  color: #30332c;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 140ms ease;
}

.stock-warning-row:last-child {
  border-bottom: 0;
}

.stock-warning-row:hover {
  background: #f6f3ec;
}

.stock-warning-row:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid #2d6570;
  outline-offset: -2px;
}

.stock-warning-material {
  min-width: 0;
}

.stock-warning-material b,
.stock-warning-material small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-warning-material b {
  color: #2b2e28;
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
}

.stock-warning-material small {
  margin-top: 2px;
  color: #777b73;
  font-size: 11px;
  line-height: 16px;
}

.stock-warning-figure {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 3px;
  min-width: 0;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.stock-warning-figure b {
  color: #30332c;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 14px;
  font-weight: 500;
}

.stock-warning-figure i {
  color: #777b73;
  font-size: 10px;
  font-style: normal;
}

.stock-warning-shortfall b {
  color: #8a5a18;
}

.stock-warning-chevron {
  display: grid;
  place-items: center;
  color: #8a8e85;
  transition: color 140ms ease, transform 140ms ease;
}

.stock-warning-row:hover .stock-warning-chevron {
  color: #315f55;
  transform: translateX(2px);
}

.batch-snapshot-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid #ded9ce;
  border-radius: 10px;
}

.batch-snapshot {
  gap: 7px;
  padding: 14px 16px;
  border: 0;
  border-right: 1px solid #e4dfd5;
  border-bottom: 1px solid #e4dfd5;
  border-radius: 0;
  background: #fffdf9;
  transition: background-color 140ms ease;
}

.batch-snapshot:nth-child(2n) {
  border-right: 0;
}

.batch-snapshot:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.batch-snapshot:hover {
  border-color: #e4dfd5;
  background: #f6f3ec;
  box-shadow: none;
  transform: none;
}

.batch-snapshot-top b {
  color: #2b3028;
  font-size: 12px;
}

.batch-snapshot strong {
  color: #25302a;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 16px;
  font-weight: 500;
}

.batch-snapshot small {
  color: #71756b;
}

.loc-grid {
  gap: 10px;
}

.loc-card {
  padding: 12px 14px;
  border-color: #ddd8cc;
  border-left: 3px solid #376887;
  border-radius: 10px;
  background: #fffdf9;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.loc-card:hover {
  border-color: #becac5;
  border-left-color: #b67822;
  background: #f8f5ee;
  box-shadow: none;
  transform: none;
}

.loc-card .lc-name {
  color: #292d26;
  font-size: 13px;
  font-weight: 500;
}

.loc-card .lc-hz {
  border-radius: 4px;
  border-color: #e2c894;
  background: #fbf4e5;
  color: #7d5419;
}

.loc-card .lc-kinds {
  color: #62675e;
}

.loc-card .lc-foot {
  color: #777b72;
}

.tl-row:hover {
  background: #f7f4ed;
}

.alert-row.alert-link:hover {
  background: #f7f4ed;
}

.online-chip {
  border-color: #d8d2c6;
  border-radius: 7px;
  background: #fffdf9;
  color: #62685f;
}

.online-chip .dot {
  box-shadow: none;
}

.warehouse-task-intro {
  padding: 20px 24px;
  border: 1px solid #d5dcd8;
  border-top: 3px solid #376887;
  border-radius: 14px;
  background: #fbf9f3;
  color: var(--ink);
  box-shadow: none;
}

.warehouse-task-intro::after {
  display: none;
}

.warehouse-task-intro .eyebrow {
  color: #396b8f;
  font-size: 11px;
}

.warehouse-task-intro h3 {
  color: #22261f;
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -.015em;
}

.warehouse-task-intro p {
  color: #6c7067;
  font-size: 12px;
}

.warehouse-task-route span {
  color: #777b72;
  font-size: 11px;
}

.warehouse-task-route span.active {
  color: #7d5419;
  font-weight: 500;
}

.warehouse-task-route i {
  background: #d8d2c6;
}

.warehouse-task-summary-grid {
  margin-top: 16px;
  border-color: #d8d2c6;
  border-radius: 10px;
  box-shadow: none;
}

.warehouse-task-summary {
  min-height: 82px;
  padding: 14px 16px;
  border-color: #e0dbd0;
}

.warehouse-task-summary > span {
  color: #6c7067;
  font-size: 11px;
}

.warehouse-task-summary strong {
  margin-top: 6px;
  color: #282b24;
  font: 500 26px/1 ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.warehouse-task-summary.accent {
  background: #e9f0ec;
}

.warehouse-task-summary.accent > span {
  color: #52655f;
}

.warehouse-task-summary.accent strong {
  color: #1f5148;
}

.warehouse-task-card {
  margin-top: 16px;
}

.warehouse-task-view-label {
  color: #676c63;
  font-size: 11px;
  font-weight: 500;
}

.warehouse-task-filters button {
  min-height: 30px;
  padding: 4px 9px;
  border-color: #d8d2c6;
  background: #fffdf9;
  color: #62675e;
  font-size: 11px;
}

.warehouse-task-filters button:hover {
  border-color: #aebcb7;
  background: #f4f1e9;
}

@media (max-width: 1080px) {
  .dashboard-info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .hero {
    padding: 18px;
  }

  .hero-head {
    align-items: flex-start;
  }

  .hero-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hkpi:nth-child(3) {
    border-left: 0;
    border-top: 1px solid #e1ddd3;
  }

  .hkpi:nth-child(4) {
    border-top: 1px solid #e1ddd3;
  }
}

@media (max-width: 760px) {
  .body {
    padding: 12px;
  }

  .topbar {
    background: rgba(255, 253, 248, .98);
  }

  .hero {
    padding: 16px;
    border-radius: 14px;
  }

  .hero-title h3 {
    font-size: 17px;
  }

  .hero-title p {
    font-size: 11px;
    line-height: 1.55;
  }

  .hero-date,
  .hero-summary {
    display: block;
  }

  .hero-sep {
    display: none;
  }

  .hero-kpis {
    gap: 0;
  }

  .topbar-right {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    gap: 6px;
    overflow: visible;
    white-space: nowrap;
  }

  .topbar-right > * {
    min-width: 0;
    width: 100%;
    justify-content: center;
  }

  .online-chip {
    padding: 4px 6px;
    font-size: 11px;
    white-space: nowrap;
  }

  .topbar-right .btn.small {
    padding: 4px 6px;
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
  }

  .card-head {
    flex-wrap: wrap;
    align-items: center;
  }

  .card-head h3 {
    flex: 1 1 100%;
    white-space: normal;
  }

  .card-head > .muted {
    flex: 1 1 100%;
    white-space: normal;
  }

  .card-head > .btn {
    margin-left: auto;
  }

  .stock-warning-card-head {
    align-items: flex-start;
    padding: 14px;
  }

  .stock-warning-heading {
    flex: 1 1 100%;
  }

  .stock-warning-tools {
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
  }

  .stock-warning-table-head {
    display: none;
  }

  .stock-warning-row {
    grid-template-areas:
      "material material material chevron"
      "stock safe shortage chevron";
    grid-template-columns: repeat(3, minmax(0, 1fr)) 16px;
    row-gap: 10px;
    min-height: 96px;
    padding: 12px 14px;
  }

  .stock-warning-material {
    grid-area: material;
  }

  .stock-warning-figure {
    display: grid;
    grid-template-columns: auto auto;
    justify-items: start;
    justify-content: start;
    align-items: baseline;
    column-gap: 3px;
    row-gap: 0;
    text-align: left;
  }

  .stock-warning-figure::before {
    content: attr(data-label);
    grid-column: 1 / -1;
    color: #777b73;
    font-size: 10px;
    line-height: 14px;
  }

  .stock-warning-figure:nth-of-type(2) {
    grid-area: stock;
  }

  .stock-warning-figure:nth-of-type(3) {
    grid-area: safe;
  }

  .stock-warning-figure:nth-of-type(4) {
    grid-area: shortage;
  }

  .stock-warning-chevron {
    grid-area: chevron;
    align-self: center;
  }

  .hkpi {
    padding: 12px;
  }

  .hkpi .hk-v {
    font-size: 23px;
  }

  .hkpi .hk-l,
  .hkpi .hk-s {
    font-size: 12px;
  }

  .batch-snapshot-grid {
    grid-template-columns: 1fr;
  }

  .batch-snapshot,
  .batch-snapshot:nth-child(2n),
  .batch-snapshot:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid #e4dfd5;
  }

  .batch-snapshot:last-child {
    border-bottom: 0;
  }
}

/* ---------------- 经营助手 ---------------- */

.assistant-shell {
  width: 100%;
  max-width: 1440px;
  min-height: calc(100vh - 112px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 296px;
  gap: 20px;
  align-items: stretch;
  animation: assistant-enter 360ms cubic-bezier(.22, 1, .36, 1) both;
}

.assistant-workspace,
.assistant-context {
  border: 1px solid #dcd7cc;
  border-radius: 16px;
  background: #fffdf8;
  box-shadow: 0 1px 2px rgba(16, 30, 50, .04), 0 12px 28px rgba(16, 30, 50, .045);
}

.assistant-workspace {
  min-width: 0;
  min-height: 680px;
  display: grid;
  grid-template-rows: auto minmax(360px, 1fr) auto;
  overflow: hidden;
}

.assistant-header {
  min-height: 104px;
  padding: 22px 24px;
  border-bottom: 1px solid #e6e1d7;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.assistant-kicker {
  margin: 0 0 6px;
  color: #0d7165;
  font-size: 12px;
  line-height: 16px;
}

.assistant-header h3 {
  margin: 0;
  color: #1f1b16;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.15;
}

.assistant-header p:last-child {
  margin: 8px 0 0;
  color: #5e554a;
  font-size: 14px;
  line-height: 20px;
}

.assistant-thread {
  min-height: 0;
  padding: 24px;
  overflow: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}

.assistant-empty {
  min-height: 100%;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-content: center;
  gap: 16px 20px;
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 0;
}

.assistant-empty-mark {
  width: 48px;
  height: 48px;
  border: 1px solid #cfd9d4;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #0d7165;
  background: #f3f7f5;
  font: 500 24px/1 "Bahnschrift", "DIN Alternate", "Segoe UI", sans-serif;
}

.assistant-empty h3 {
  margin: 2px 0 6px;
  color: #1f1b16;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.35;
}

.assistant-empty p {
  max-width: 620px;
  margin: 0;
  color: #5e554a;
  font-size: 13px;
  line-height: 21px;
}

.assistant-prompts {
  grid-column: 2;
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.assistant-prompt {
  width: 100%;
  min-height: 56px;
  padding: 12px 14px;
  border: 1px solid #ddd8ce;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #1f1b16;
  background: #faf8f3;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.assistant-prompt:hover {
  border-color: #aebdb7;
  background: #f5f8f6;
}

.assistant-prompt:focus-visible,
.assistant-source-link:focus-visible,
.assistant-composer textarea:focus-visible {
  outline: 2px solid #0d7165;
  outline-offset: 2px;
}

.assistant-prompt span {
  font-size: 14px;
  font-weight: 500;
}

.assistant-prompt small {
  color: #7b7266;
  font-size: 12px;
  line-height: 16px;
  text-align: right;
}

.assistant-message {
  max-width: 820px;
  margin: 0 auto 20px;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
}

.assistant-message-role {
  padding-top: 10px;
  color: #7b7266;
  font-size: 12px;
  line-height: 16px;
  text-align: right;
}

.assistant-message-body {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid #e1ddd4;
  border-radius: 12px;
  color: #332e28;
  background: #fff;
  font-size: 14px;
  line-height: 22px;
}

.assistant-message.user .assistant-message-body {
  border-color: #c7d7d1;
  background: #f0f6f3;
}

.assistant-message-body p {
  margin: 0 0 10px;
}

.assistant-message-body p:last-child {
  margin-bottom: 0;
}

.assistant-message-body strong {
  color: #1f1b16;
  font-weight: 600;
}

.assistant-message-body code {
  padding: 1px 5px;
  border-radius: 4px;
  color: #0d5f56;
  background: #edf3f1;
  font: 12px/18px "SFMono-Regular", Consolas, monospace;
}

.assistant-sources {
  grid-column: 2;
  margin-top: -8px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.assistant-sources > span {
  color: #7b7266;
  font-size: 12px;
}

.assistant-source-link,
.assistant-source-label {
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid #d9ded8;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1f5c54;
  background: #f8faf8;
  font-size: 12px;
  text-decoration: none;
}

button.assistant-source-link {
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.assistant-source-link i {
  color: #7b7266;
  font-style: normal;
}

.assistant-message.is-loading .assistant-message-body {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #7b7266;
}

.assistant-loading-line {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: #0d7165;
  animation: assistant-wait 1.2s ease-in-out infinite;
}

.assistant-composer {
  padding: 16px 20px 18px;
  border-top: 1px solid #e6e1d7;
  background: #fcfaf5;
}

.assistant-composer > label {
  display: block;
  margin-bottom: 8px;
  color: #5e554a;
  font-size: 12px;
  line-height: 16px;
}

.assistant-composer textarea {
  width: 100%;
  min-height: 64px;
  max-height: 180px;
  padding: 12px 14px;
  border: 1px solid #cec8bc;
  border-radius: 10px;
  resize: vertical;
  color: #1f1b16;
  background: #fff;
  font: 14px/22px "Microsoft YaHei", system-ui, sans-serif;
}

.assistant-composer textarea::placeholder {
  color: #8a847a;
}

.assistant-composer-foot {
  min-height: 36px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.assistant-composer-foot > span {
  color: #7b7266;
  font-size: 12px;
}

.assistant-context {
  min-width: 0;
  padding: 20px;
  align-self: start;
}

.assistant-runtime-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e6e1d7;
}

.assistant-runtime-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #b45309;
}

.assistant-runtime-dot.ready {
  background: #15803d;
}

.assistant-runtime-head strong,
.assistant-runtime-head small {
  display: block;
}

.assistant-runtime-head strong {
  color: #1f1b16;
  font-size: 14px;
  font-weight: 500;
}

.assistant-runtime-head small {
  margin-top: 2px;
  color: #7b7266;
  font: 11px/16px "SFMono-Regular", Consolas, monospace;
}

.assistant-config-note {
  margin: 14px 0 0;
  color: #8a5d00;
  font-size: 12px;
  line-height: 19px;
}

.assistant-config-note code {
  color: #6d4a00;
  font-size: 11px;
}

.assistant-scope {
  padding: 18px 0;
  border-bottom: 1px solid #e6e1d7;
}

.assistant-scope > span {
  color: #7b7266;
  font-size: 12px;
}

.assistant-scope ul {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.assistant-scope li {
  position: relative;
  padding-left: 14px;
  color: #332e28;
  font-size: 13px;
  line-height: 22px;
}

.assistant-scope li::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #0d7165;
}

.assistant-usage {
  min-height: 36px;
  border-bottom: 1px solid #ece8df;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #5e554a;
  font-size: 12px;
}

.assistant-usage strong {
  color: #1f1b16;
  font: 500 12px/16px "SFMono-Regular", Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

.assistant-rule {
  margin-top: 18px;
  padding: 14px;
  border-left: 2px solid #0d7165;
  background: #f6f8f6;
}

.assistant-rule strong {
  color: #1f1b16;
  font-size: 13px;
  font-weight: 500;
}

.assistant-rule p,
.assistant-privacy {
  margin: 7px 0 0;
  color: #7b7266;
  font-size: 12px;
  line-height: 19px;
}

@keyframes assistant-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes assistant-wait {
  0%, 100% { opacity: .35; transform: scaleX(.55); transform-origin: left; }
  50% { opacity: 1; transform: scaleX(1); transform-origin: left; }
}

@media (max-width: 1040px) {
  .assistant-shell {
    grid-template-columns: 1fr;
  }

  .assistant-context {
    order: -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 20px;
  }

  .assistant-runtime-head {
    grid-column: 1 / -1;
  }

  .assistant-scope,
  .assistant-usage {
    border-bottom: 0;
  }

  .assistant-rule,
  .assistant-privacy {
    display: none;
  }
}

@media (max-width: 680px) {
  .assistant-shell {
    min-height: 0;
  }

  .assistant-workspace {
    min-height: calc(100vh - 104px);
  }

  .assistant-header,
  .assistant-thread {
    padding: 16px;
  }

  .assistant-header h3 {
    font-size: 24px;
  }

  .assistant-empty {
    grid-template-columns: 1fr;
    padding: 20px 0;
  }

  .assistant-empty-mark {
    display: none;
  }

  .assistant-prompts {
    grid-column: 1;
  }

  .assistant-prompt {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .assistant-prompt small {
    text-align: left;
  }

  .assistant-message {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .assistant-message-role {
    padding-top: 0;
    text-align: left;
  }

  .assistant-sources {
    grid-column: 1;
  }

  .assistant-context {
    grid-template-columns: 1fr;
  }

  .assistant-runtime-head {
    grid-column: 1;
  }

  .assistant-scope {
    border-bottom: 1px solid #e6e1d7;
  }

  .assistant-composer {
    padding: 12px 16px 16px;
  }

  .assistant-composer-foot > span {
    display: none;
  }

  .assistant-composer-foot {
    justify-content: flex-end;
  }
}
