* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; color: #1f2328; background: #f6f7f9; }
a { color: #0b5cad; text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 8px 0 16px; }
h2 { font-size: 17px; margin: 24px 0 10px; }
.brand-mark { display: block; flex: 0 0 auto; }
.brand-copy { min-width: 0; }
.brand-product, .brand-factory { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 16px; }
.narrow { max-width: 480px; margin: 0 auto; padding: 16px; }

:root { --side-w: 208px; }

/* —— PC：左侧菜单 —— */
body.has-side { padding-left: var(--side-w); }
.mob-bar, .nav-scrim { display: none; }
.side {
  position: fixed; left: 0; top: 0; bottom: 0; width: var(--side-w);
  background: #1f2d3d; color: #dbe4ee; z-index: 200;
  display: flex; flex-direction: column;
}
.side-head { padding: 16px 16px 12px; border-bottom: 1px solid rgba(255,255,255,.08); }
.side-head .brand {
  display: flex; align-items: center; gap: 10px; color: #fff;
}
.side-head .brand:hover { text-decoration: none; color: #fff; }
.side-head .brand-copy { flex: 1; }
.side-head .brand-product { color: #fff; font-size: 14px; font-weight: 700; line-height: 1.2; }
.side-head .brand-factory { margin-top: 2px; color: #b8c6d6; font-size: 12px; line-height: 1.25; }
.side-head .who { display: block; margin-top: 8px; font-size: 12px; color: #9fb0c3; }
.side-nav {
  flex: 1; overflow-y: auto; padding: 10px 8px 16px;
  display: flex; flex-direction: column; gap: 2px;
}
.side-nav > a,
.side-nav .nav-group > summary {
  display: block; padding: 9px 12px; border-radius: 6px;
  color: #dbe4ee; font-size: 14px; white-space: nowrap;
}
.side-nav > a:hover,
.side-nav .nav-group > summary:hover {
  text-decoration: none; color: #fff; background: rgba(255,255,255,.06);
}
.side-nav > a.on {
  color: #fff; background: #0b5cad;
}
.side-nav .nav-group { margin: 2px 0; }
.side-nav .nav-group > summary {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.side-nav .nav-group > summary::-webkit-details-marker,
.side-nav .nav-group > summary::marker { display: none; content: ""; }
.side-nav .nav-group > summary::after {
  content: ""; width: 0; height: 0; flex: 0 0 auto;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid #9fb0c3; transition: transform .15s;
}
.side-nav .nav-group[open] > summary::after { transform: rotate(180deg); }
.side-nav .nav-group.on > summary { color: #fff; }
.side-nav .nav-sub {
  display: flex; flex-direction: column; gap: 2px;
  padding: 2px 0 6px 8px;
}
.side-nav .nav-sub a {
  display: block; padding: 7px 12px; border-radius: 6px;
  color: #b8c6d6; font-size: 13px; white-space: nowrap;
}
.side-nav .nav-sub a:hover { text-decoration: none; color: #fff; background: rgba(255,255,255,.06); }
.side-nav .nav-sub a.on { color: #fff; background: #0b5cad; }
.side-foot {
  padding: 12px 16px 16px; border-top: 1px solid rgba(255,255,255,.08);
}
.side-foot .link { color: #9fb0c3; font-size: 13px; }
.side-foot .link:hover { color: #fff; }
form.inline { display: inline; margin: 0; }
button.link { background: none; border: 0; padding: 0; cursor: pointer; color: #0b5cad; font: inherit; }

.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; }
.flash.ok { background: #e6f4ea; color: #1e6b34; }
.flash.err { background: #fdecea; color: #a1261b; }

.card { background: #fff; border: 1px solid #e3e6ea; border-radius: 8px; padding: 16px; margin-bottom: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.row > * { flex: 0 0 auto; }
.grow { flex: 1 1 auto; }
.muted { color: #6a737d; font-size: 13px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

.draft-source-text {
  margin: 0 0 10px; padding: 10px 12px; background: #fff; border: 1px solid #e3e6ea;
  border-radius: 6px; white-space: pre-wrap; word-break: break-word; font-size: 13px; line-height: 1.45;
  max-height: 220px; overflow: auto;
}
.draft-source-files { display: flex; flex-wrap: nowrap; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.draft-source-files a { flex: 0 0 auto; }
.draft-source-files img {
  display: block; max-height: 180px; width: auto; border-radius: 6px;
  border: 1px solid #e3e6ea; background: #f7f8fa;
}
.draft-source-dl {
  display: inline-flex; align-items: center; padding: 10px 14px; border: 1px solid #e3e6ea;
  border-radius: 6px; background: #f7f8fa; font-size: 13px; white-space: nowrap;
}

table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 7px 8px; border-bottom: 1px solid #eceef1; text-align: left; vertical-align: top; }
th { background: #f2f4f7; font-weight: 600; font-size: 13px; color: #444; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }

/* 采购新建明细：原材料约占四成，数量/单价/交期给足宽度 */
.po-lines { table-layout: fixed; width: 100%; }
.po-lines th:nth-child(1), .po-lines td:nth-child(1) { width: 40%; }
.po-lines th:nth-child(2), .po-lines td:nth-child(2) { width: 14%; min-width: 6.5em; }
.po-lines th:nth-child(3), .po-lines td:nth-child(3) { width: 16%; min-width: 7em; }
.po-lines th:nth-child(4), .po-lines td:nth-child(4) { width: 30%; min-width: 11em; }
.po-lines select,
.po-lines input { width: 100%; max-width: 100%; box-sizing: border-box; }
.po-lines td.num input { text-align: right; }
@media (max-width: 760px) {
  .po-lines { table-layout: auto; }
  .po-lines, .po-lines tbody { display: block; width: 100%; }
  .po-lines tr:has(> th) { display: none; }
  .po-lines tr {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px;
    background: #fafbfc; border: 1px solid #eceef1; border-radius: 8px;
    margin: 0 0 10px; padding: 10px;
  }
  .po-lines td {
    display: block; width: auto !important; padding: 0; border: 0;
    text-align: left !important;
  }
  .po-lines td:first-child,
  .po-lines td:last-child { grid-column: 1 / -1; }
  .po-lines td[data-label]::before {
    content: attr(data-label); display: block;
    font-size: 12px; color: #555; margin-bottom: 3px; font-weight: 400;
  }
  .po-lines td.num input { text-align: left; }
}

label { display: block; font-size: 13px; color: #555; margin-bottom: 3px; }
input, select, textarea { font: inherit; padding: 6px 8px; border: 1px solid #c9cfd6; border-radius: 5px; background: #fff; max-width: 100%; }
input[type=number] { width: 110px; }
textarea { width: 100%; min-height: 90px; }
/* 按钮层级：主实心 → 次描边 → 行内安静 → 危险 */
button, .btn {
  display: inline-block; font: inherit; font-weight: 600; padding: 8px 16px; border-radius: 5px;
  border: 1px solid #0b5cad; background: #0b5cad; color: #fff; cursor: pointer;
  text-decoration: none; text-align: center; line-height: 1.35; vertical-align: middle;
}
button:hover, .btn:hover { background: #094a8f; border-color: #094a8f; color: #fff; text-decoration: none; }
button:focus-visible, .btn:focus-visible { outline: 2px solid #0b5cad; outline-offset: 2px; }
button:disabled, .btn:disabled, button[disabled] { opacity: .45; cursor: not-allowed; pointer-events: none; }

button.secondary, .btn.secondary {
  background: #fff; color: #0b5cad; font-weight: 500;
}
button.secondary:hover, .btn.secondary:hover {
  background: #e3effc; color: #0b5cad; border-color: #0b5cad;
}

/* 新订单：拍照 / 相册双入口（capture 与 multiple 拆开，手机才能直开相机） */
.file-native {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.order-upload { margin-bottom: 14px; }
.order-upload-label { margin: 0 0 10px; font-size: 14px; color: #555; font-weight: 500; }
.file-actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px;
}
.file-action {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 48px; padding: 12px 14px; font-size: 16px;
}
.file-action-icon {
  width: 22px; height: 22px; flex: 0 0 auto;
  stroke: currentColor; fill: none; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.order-files-status { margin: 0 0 6px; font-size: 13px; }
.order-files-list {
  list-style: none; margin: 0; padding: 0;
  border: 1px solid #e3e6ea; border-radius: 6px; background: #f6f7f9;
}
.order-files-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px; border-bottom: 1px solid #eceef1; font-size: 13px;
}
.order-files-list li:last-child { border-bottom: 0; }
.order-file-name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.order-submit-row { margin: 12px 0 6px; }
.order-submit-row .submit-big { width: 100%; padding: 14px 16px; font-size: 16px; }
.order-parse-progress {
  margin: 0 0 8px; font-size: 14px; color: #0b5cad; font-weight: 500;
}
button.is-busy, .btn.is-busy {
  cursor: wait; opacity: .92; position: relative;
}
button.is-busy::before, .btn.is-busy::before {
  content: ""; display: inline-block;
  width: .95em; height: .95em; margin-right: .55em; vertical-align: -0.12em;
  border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin .7s linear infinite;
}
button.secondary.is-busy::before, .btn.secondary.is-busy::before,
button.quiet.is-busy::before, .btn.quiet.is-busy::before,
button.link.is-busy::before {
  border-color: rgba(11, 92, 173, .25); border-top-color: #0b5cad;
}
.board-ask-submit.is-busy {
  color: transparent;
}
.board-ask-submit.is-busy svg { opacity: 0; }
.board-ask-submit.is-busy::before {
  position: absolute;
  inset: 0;
  width: 1.05em; height: 1.05em;
  margin: auto;
  vertical-align: 0;
  border-color: rgba(255, 255, 255, .35); border-top-color: #fff;
  /* 只用 rotate，避免覆盖 translate 导致漂移 */
}
@keyframes btn-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  button.is-busy::before, .btn.is-busy::before { animation: none; opacity: .7; }
  .board-ask-submit.is-busy::before { animation: none; }
}
.order-hint, .order-channel { margin: 0; font-size: 13px; }
.order-manual { margin-top: 12px; }
.order-manual .secondary { width: 100%; min-height: 44px; }
.order-new textarea { min-height: 110px; font-size: 16px; }
.order-text-block { margin-bottom: 4px; }
.order-text-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 6px;
}
.order-text-head label { margin: 0; flex: 1 1 auto; }
.order-paste-btn {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 6px 12px;
}
.order-paste-btn .file-action-icon { width: 16px; height: 16px; }
.order-paste-hint { margin: 6px 0 0; font-size: 12px; }

/* 旧资料导入：与新订单同套移动端触控 */
.import-lead { margin: 0 0 14px; }
.import-h { margin: 0 0 12px; font-size: 17px; }
.import-excel-form { display: flex; flex-direction: column; gap: 12px; }
.import-field label { display: block; }
.import-field select { width: 100%; max-width: 100%; font-size: 16px; min-height: 44px; }
.import-field .file-action { width: 100%; margin-top: 4px; }
.import-tips { margin: 12px 0 0; padding-left: 1.2em; font-size: 13px; line-height: 1.55; }
.import-photo .order-upload { margin-bottom: 12px; }
.import-photo textarea { min-height: 96px; font-size: 16px; width: 100%; }
.import-pending { margin-top: 8px; }
.import-pending-list { list-style: none; margin: 0; padding: 0; }
.import-pending-list li {
  display: flex; flex-wrap: nowrap; align-items: baseline; gap: 6px 12px;
  padding: 12px 14px; margin-bottom: 8px;
  background: #fff; border: 1px solid #e3e6ea; border-radius: 8px;
}
.import-pending-list form { margin: 0; display: inline; flex-shrink: 0; }
.import-pending-list a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-pending-list .muted { flex-shrink: 0; }

/* 系统设置 */
.settings-lead { margin: 0 0 12px; max-width: 48em; }
.settings-toc {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px;
}
.settings-toc a {
  display: inline-block; padding: 6px 12px; border-radius: 6px;
  background: #fff; border: 1px solid #e3e6ea; color: #0b5cad; text-decoration: none; font-size: 13px;
}
.settings-toc a:hover { background: #e3effc; text-decoration: none; }
.settings-sec { scroll-margin-top: 72px; }
.settings-h { margin: 0 0 10px; font-size: 17px; }
.settings-note { margin: 8px 0 0; font-size: 13px; }
.settings-status {
  margin: 0 0 12px; padding: 10px 12px; border-radius: 6px; font-weight: 600; font-size: 14px;
}
.settings-status.ok { background: #e6f4ea; color: #1e6b34; }
.settings-status.warn { background: #fff4d6; color: #7a5a00; }
.settings-dl { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.settings-dl > div {
  display: grid; grid-template-columns: 7.5em 1fr; gap: 8px 12px; align-items: baseline;
  padding-bottom: 8px; border-bottom: 1px solid #eceef1;
}
.settings-dl > div:last-child { border-bottom: 0; padding-bottom: 0; }
.settings-dl dt { margin: 0; color: #555; font-size: 13px; }
.settings-dl dd { margin: 0; word-break: break-all; }
.settings-channels { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.settings-channel {
  border: 1px solid #e3e6ea; border-radius: 8px; padding: 12px 14px; background: #f6f7f9;
}
.settings-channel.is-on { background: #f3faf5; border-color: #c6e2cf; }
.settings-channel-top {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px;
}
.settings-channel p { margin: 0; }
.settings-meta { margin-top: 6px !important; font-size: 12px; }
.settings-actions {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px;
}
.settings-subh { margin: 18px 0 8px; font-size: 15px; font-weight: 600; }
.settings-backups { margin-top: 12px; }
.settings-restore-inline {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0;
}
.settings-restore-inline input { font-size: 14px; max-width: 10em; }
.settings-upload-restore {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px;
}
.settings-upload-restore input[type=file] { max-width: 100%; }
@media (max-width: 760px) {
  .settings-dl > div { grid-template-columns: 1fr; gap: 2px; }
  .settings-actions .btn, .settings-actions button { flex: 1 1 100%; text-align: center; }
  .settings-restore-inline, .settings-upload-restore { width: 100%; }
  .settings-restore-inline input, .settings-upload-restore input[name=confirm] { flex: 1 1 8em; }
}

/* 表格行内 / 密表操作：不与主按钮抢蓝 */
button.quiet, .btn.quiet {
  background: #fff; color: #1f2328; border-color: #c9cfd6; font-weight: 500;
}
button.quiet:hover, .btn.quiet:hover {
  background: #f2f4f7; color: #1f2328; border-color: #9aa3ad;
}

button.danger, .btn.danger {
  background: #fff; color: #b3261e; border-color: #b3261e; font-weight: 500;
}
button.danger:hover, .btn.danger:hover { background: #fdecea; color: #b3261e; border-color: #b3261e; }
button.danger:focus-visible, .btn.danger:focus-visible { outline-color: #b3261e; }
/* 区块级危险（结案 / 结算 / 丢弃）：实心红 */
button.danger:not(.small), .btn.danger:not(.small) {
  background: #b3261e; color: #fff; font-weight: 600;
}
button.danger:not(.small):hover, .btn.danger:not(.small):hover {
  background: #8f1e18; border-color: #8f1e18; color: #fff;
}

button.small, .btn.small { padding: 4px 10px; font-size: 13px; font-weight: 500; }
button.submit-big, .btn.submit-big {
  width: 100%; font-size: 22px; padding: 16px; font-weight: 600;
}

/* 登录页：与系统同色车间浅灰 + 75° 远景数控机台车间线稿 */
body.login-page {
  min-height: 100vh; min-height: 100dvh;
  background-color: #f6f7f9;
  background-image: url("/static/login-cnc-iso.svg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
body.login-page main {
  display: flex; flex-direction: column; justify-content: center;
  min-height: 100vh; min-height: 100dvh;
}
.login-card {
  border: 1px solid #e3e6ea;
  border-radius: 8px;
  box-shadow: none;
  padding: 28px 28px 24px;
}
.login-brand { display: flex; align-items: center; gap: 14px; margin: 0 0 22px; }
.login-brand-mark { display: block; flex: 0 0 auto; width: 52px; height: 52px; }
.login-product { color: #0b5cad; font-size: 19px; font-weight: 700; line-height: 1.2; }
.login-brand h1 { margin: 3px 0 0; color: #1f2328; font-size: 17px; font-weight: 600; line-height: 1.3; }

.demo-login { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid #eceef1; }
.demo-login .muted { margin: 0 0 10px; }
.demo-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.demo-chips .demo-chip { min-width: 4.5em; padding: 8px 14px; }

.login-card #login-form p { margin: 0 0 16px; }
.login-card #login-form label { margin-bottom: 6px; }
.login-card #login-form input {
  width: 100%; font-size: 22px; padding: 12px 14px; box-sizing: border-box;
}
.login-card .submit-big { margin-top: 4px; padding: 16px 18px; }
.login-card > .muted { margin: 16px 0 0; line-height: 1.55; }

.draft-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px;
  margin: 16px 0 8px;
}
.draft-actions form { margin: 0; display: inline; }
.draft-actions .grow { flex: 1 1 12em; min-width: 0; }

body.login-page main.narrow { max-width: 440px; padding: 24px 16px; }
@media (max-width: 760px) {
  .login-card { padding: 24px 20px 20px; }
  body.login-page main.narrow { padding: 20px 14px; }
}

.badge { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 12px; background: #eceef1; color: #444; }
.badge.red { background: #fdecea; color: #a1261b; }
.badge.yellow { background: #fff4d6; color: #7a5a00; }
.badge.green { background: #e6f4ea; color: #1e6b34; }
.badge.blue { background: #e3effc; color: #0b5cad; }
tr.risk-red td:first-child { border-left: 4px solid #d93025; }
tr.risk-yellow td:first-child { border-left: 4px solid #f2b400; }
tr.risk-green td:first-child { border-left: 4px solid #34a853; }

.bar { height: 8px; background: #eceef1; border-radius: 4px; overflow: hidden; min-width: 80px; }
.bar > span { display: block; height: 100%; background: #34a853; }

.stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.stat { background: #fff; border: 1px solid #e3e6ea; border-radius: 8px; padding: 12px 16px; min-width: 0; flex: 1 1 160px; }
.stat b { display: block; font-size: 24px; font-variant-numeric: tabular-nums; }

/* 实时看板：AI 智造在上，AI速查紧随其下 */
.board-title { margin-bottom: 12px; }

/* AI速查：简洁大气，大输入 + 横向滑动短标签（移动优先） */
.board-ask {
  background: #fff; border: 1px solid #e3e6ea; border-radius: 8px;
  padding: 16px 16px 14px; margin-bottom: 16px;
}
.board-ask-head {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.board-ask-title {
  margin: 0; font-size: 18px; font-weight: 700; line-height: 1.2;
  color: #1f2d3d; letter-spacing: 0.01em;
}
.board-ask-tagline { font-size: 12px; line-height: 1.4; }
.board-ask-form {
  display: flex; gap: 8px; align-items: stretch;
}
.board-ask-input {
  flex: 1 1 auto; min-width: 0; min-height: 48px;
  font-size: 16px; padding: 12px 14px;
  border: 1px solid #d8dee6; border-radius: 10px; background: #fafbfc;
  color: #1f2328;
}
.board-ask-input::placeholder { color: #9aa3ad; }
.board-ask-input:focus {
  outline: none; border-color: #0b5cad; background: #fff;
  box-shadow: 0 0 0 3px rgba(11, 92, 173, 0.12);
}
.board-ask-mic {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; min-height: 48px; padding: 0;
  background: #fff; border: 1px solid #d8dee6; border-radius: 10px;
}
.board-ask-mic svg {
  width: 22px; height: 22px;
  fill: none; stroke: #0b5cad; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.board-ask-mic:hover { background: #e3effc; border-color: #0b5cad; }
.board-ask-mic.is-listening {
  background: #fdecea; border-color: #d93025;
  animation: ask-mic-pulse 1.4s ease-in-out infinite;
}
.board-ask-mic.is-listening svg { stroke: #b3261e; }
@keyframes ask-mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217, 48, 37, 0.28); }
  50% { box-shadow: 0 0 0 5px rgba(217, 48, 37, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .board-ask-mic.is-listening { animation: none; }
}
.board-ask-submit {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; min-width: 0; min-height: 48px; padding: 0;
  border-radius: 10px;
}
.board-ask-submit svg {
  width: 21px; height: 21px;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.board-ask-hint { margin: 8px 0 0; font-size: 12px; line-height: 1.45; }
.board-ask .flash { margin: 10px 0 0; }
.board-ask-chips {
  display: flex; flex-wrap: nowrap; gap: 8px;
  margin-top: 12px; padding-bottom: 2px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity; scrollbar-width: none;
}
.board-ask-chips::-webkit-scrollbar { display: none; }
.board-ask-chips .ask-chip {
  flex: 0 0 auto; scroll-snap-align: start;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 36px; padding: 0 14px;
  font-size: 14px; font-weight: 500; line-height: 1;
  color: #1f2d3d; background: #f6f7f9;
  border: 1px solid #e3e6ea; border-radius: 999px;
  text-decoration: none; cursor: pointer;
  white-space: nowrap;
}
.board-ask-chips .ask-chip:hover,
.board-ask-chips .ask-chip:active {
  background: #e3effc; border-color: #0b5cad; color: #0b5cad;
  text-decoration: none;
}
/* AI速查结果：标题 + 大数 + 明细表，一屏读完 */
.ask-result { margin-top: 20px; }
.board-ask .ask-result {
  margin-top: 14px; padding-top: 14px; border-top: 1px solid #eceef1;
}
.ask-result-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 8px 12px; flex-wrap: wrap; margin-bottom: 12px;
}
.ask-result-title { margin: 0; font-size: 17px; font-weight: 600; color: #1f2d3d; }
.ask-result-meta { font-size: 12px; color: #9aa3ad; }
.ask-result-none { margin: 0 0 10px; }
.ask-result-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.ask-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 8px; margin-bottom: 12px;
}
.ask-stat {
  background: #f8fafc; border: 1px solid #eceef1; border-radius: 8px;
  padding: 10px 12px; min-width: 0;
}
.ask-stat-label {
  display: block; font-size: 12px; color: #6a737d; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ask-stat b {
  display: block; margin-top: 2px;
  font-size: 22px; font-weight: 700; line-height: 1.15; color: #1f2d3d;
  font-variant-numeric: tabular-nums;
}
.ask-result-table { font-size: 14px; }
.ask-result-table th { background: #fafbfc; }
.ask-result-more {
  display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap;
  margin: 10px 0 0; font-size: 13px;
}
.ask-result-clear {
  margin-left: auto; color: #6a737d; text-decoration: none;
  padding: 6px 10px; border-radius: 6px; border: 1px solid #e3e6ea; background: #fff;
}
.ask-result-clear:hover { color: #1f2328; background: #f2f4f6; text-decoration: none; }

/* AI 智造入口：标题 + 入口瓦片同一行；描边图标 */
.board-ai {
  display: flex; flex-direction: row; align-items: center; gap: 16px 20px;
  background: #fff; border: 1px solid #e3e6ea; border-radius: 8px;
  padding: 14px 16px; margin-bottom: 10px;
}
.board-ai-brand {
  flex: 0 0 auto; max-width: 11.5em; min-width: 9em;
}
.board-ai-title {
  margin: 0; font-size: 22px; font-weight: 700; line-height: 1.2;
  color: #1f2d3d; letter-spacing: 0.01em;
}
.board-ai-tagline {
  margin: 4px 0 0; font-size: 12px; line-height: 1.4; color: #6a737d;
}
.board-ai-key-hint { color: #6a737d; }
.board-ai-tiles {
  flex: 1 1 auto; min-width: 0;
  display: grid; gap: 8px;
  grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
}
/* 越用越准：更宽一格并带上真实数字，作为这一排的落点 */
.board-ai-tiles.has-feature {
  grid-auto-flow: row;
  grid-template-columns: repeat(3, minmax(0, 1fr)) 1.7fr;
}
.board-ai-tile {
  display: flex; flex-direction: row; align-items: center; gap: 8px;
  background: #f6f7f9; border: 1px solid #e3e6ea; border-radius: 6px;
  padding: 10px 10px; color: #1f2328; text-decoration: none;
  min-height: 56px;
}
.board-ai-tile:hover {
  text-decoration: none; background: #e3effc; border-color: #0b5cad; color: #0b5cad;
}
.board-ai-icon {
  flex: 0 0 auto; width: 22px; height: 22px;
  stroke: #0b5cad; fill: none; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.board-ai-tile:hover .board-ai-icon { stroke: #094a8f; }
.board-ai-tile-text {
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.board-ai-tile-label {
  font-size: 14px; font-weight: 600; color: #0b5cad;
  display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap;
  line-height: 1.25;
}
.board-ai-tile:hover .board-ai-tile-label { color: #094a8f; }
.board-ai-tile-hint { font-size: 11px; line-height: 1.3; }
.board-ai-badge {
  display: inline-block; min-width: 1.2em; padding: 0 6px;
  font-size: 11px; font-weight: 600; line-height: 1.5;
  color: #fff; background: #0b5cad; border-radius: 10px;
  font-variant-numeric: tabular-nums; text-align: center;
}
.board-ai-feature {
  background: #fff; border-color: #c5d9ef; gap: 11px; padding: 10px 14px;
}
.board-ai-feature .board-ai-icon { width: 26px; height: 26px; }
.board-ai-feature .board-ai-tile-label { font-size: 15px; }
.board-ai-feature-stats {
  display: flex; flex-wrap: wrap; gap: 2px 14px;
  font-size: 11px; line-height: 1.3; color: #6a737d;
}
.board-ai-feature-stats b {
  margin-right: 4px; font-size: 15px; font-weight: 700; color: #1f2d3d;
  font-variant-numeric: tabular-nums;
}

/* 核心关注：饼 / 柱 / 曲线；等高卡片、零柱不占灰轨、曲线不拉伸 */
.board-charts { margin-bottom: 24px; }
.board-charts-head {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 6px 16px; margin-bottom: 12px;
}
.board-charts-title { margin: 0; font-size: 20px; font-weight: 600; }
.board-charts-sub { margin: 0; font-size: 13px; }
.board-charts-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.board-chart {
  background: #fff; border: 1px solid #e3e6ea; border-radius: 8px;
  padding: 14px 14px 12px;
  display: flex; flex-direction: column; min-height: 210px;
}
.board-chart-h {
  margin: 0 0 10px; font-size: 14px; font-weight: 600; color: #1f2328;
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
}
.board-chart-h .muted { font-weight: 400; font-size: 12px; }
.board-chart-body { flex: 1 1 auto; min-height: 0; }
.board-chart-legend {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px;
}
.board-chart-legend b { font-variant-numeric: tabular-nums; }
.board-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 2px;
  margin-right: 6px; vertical-align: middle; flex: 0 0 auto;
}
.board-dot.danger { background: #d93025; }
.board-dot.warn { background: #f2b400; }
.board-dot.ok { background: #34a853; }

.board-pie-wrap {
  display: flex; align-items: center; gap: 14px; height: 100%;
}
.board-pie {
  flex: 0 0 auto; width: 108px; height: 108px; border-radius: 50%;
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px rgba(31, 45, 61, 0.06);
}
.board-pie-hole {
  width: 62px; height: 62px; border-radius: 50%; background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  line-height: 1.15; color: #1f2328;
  box-shadow: 0 0 0 1px #eceef1;
}
.board-pie-hole b { font-size: 22px; font-variant-numeric: tabular-nums; }
.board-pie-hole small { font-size: 11px; color: #6a737d; }
.board-pie-legend {
  flex: 1 1 120px; flex-direction: column; gap: 10px;
}
.board-pie-legend li {
  display: grid; grid-template-columns: auto 1fr auto auto;
  align-items: center; gap: 6px; font-size: 13px; color: #555;
}
.board-pie-legend b { color: #1f2328; font-size: 16px; min-width: 1.2em; text-align: right; }
.board-pie-legend em { font-style: normal; color: #6a737d; font-size: 12px; min-width: 2.4em; text-align: right; }

.board-vbars {
  display: flex; align-items: flex-end; gap: 6px;
  height: 100%; min-height: 140px; padding-top: 2px;
}
.board-vbar {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%;
}
.board-vbar-val {
  font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; color: #1f2328;
  min-height: 1.2em; line-height: 1.2;
}
.board-vbar.is-zero .board-vbar-val { color: #9aa3ad; font-weight: 400; }
.board-vbar-track {
  width: 100%; max-width: 28px; flex: 1 1 auto;
  background: transparent;
  border-bottom: 1px solid #c9cfd6;
  display: flex; align-items: flex-end; justify-content: center;
  position: relative;
}
.board-vbar-track::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: #eceef1; border-radius: 1px;
}
.board-vbars-flow .board-vbar-track { max-width: 40px; }
.board-vbar-fill {
  position: relative; z-index: 1;
  display: block; width: 100%; min-height: 0; border-radius: 4px 4px 1px 1px;
  background: #0b5cad;
}
.board-vbar-fill.tone-p0 { background: #9aa3ad; }
.board-vbar-fill.tone-p1 { background: #f2b400; }
.board-vbar-fill.tone-p50 { background: #0b5cad; }
.board-vbar-fill.tone-p80 { background: #1a7f37; }
.board-vbar-fill.tone-p100 { background: #34a853; }
.board-vbar-fill.flow-planned { background: #6a737d; }
.board-vbar-fill.flow-finished { background: #0b5cad; }
.board-vbar-fill.flow-shipped { background: #34a853; }
.board-vbar-label {
  font-size: 11px; color: #555; text-align: center; line-height: 1.25;
  max-width: 100%; white-space: nowrap;
}

.board-line {
  display: flex; flex-direction: column; gap: 8px; height: 100%;
}
.board-line-svg {
  width: 100%; flex: 1 1 auto; min-height: 110px; display: block;
  background: #fafbfc;
  border: 1px solid #eceef1; border-radius: 6px;
}
.board-line-guide {
  stroke: #eceef1; stroke-width: 1; stroke-dasharray: 3 3;
}
.board-line-area { fill: rgba(11, 92, 173, 0.10); stroke: none; }
.board-line-stroke {
  stroke: #0b5cad; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round;
}
.board-line-dot { fill: #0b5cad; stroke: #fff; stroke-width: 1.2; }
.board-line-dot.danger { fill: #d93025; }
.board-line-dot.warn { fill: #f2b400; }
.board-line-dot.ok { fill: #34a853; }
.board-line-dot.muted { fill: #9aa3ad; }
.board-line-axis {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px;
  font-size: 11px; text-align: center; color: #555;
}
.board-line-axis b {
  display: block; font-variant-numeric: tabular-nums; color: #1f2328; font-weight: 600; font-size: 13px;
}
.board-line-axis .tone-danger b { color: #a1261b; }
.board-line-axis .tone-warn b { color: #7a5a00; }
.board-line-axis .tone-ok b { color: #1e6b34; }

@media (max-width: 1100px) {
  .board-ai { flex-wrap: wrap; }
  .board-ai-brand { max-width: none; flex: 1 1 100%; }
  .board-ai-tiles { flex: 1 1 100%; }
  .board-charts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.board-watch { margin-bottom: 28px; }
.board-watch-title { margin: 0 0 12px; font-size: 20px; }
.board-watch-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px;
}
.board-watch-card {
  background: #fff; border: 1px solid #e3e6ea; border-radius: 8px; padding: 16px;
}
.board-watch-card.risk-red { background: #fff8f7; border-color: #f0c2bc; }
.board-watch-card.risk-yellow { background: #fffdf5; border-color: #e8d39a; }
.board-watch-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.board-watch-due { font-size: 13px; font-weight: 600; color: #444; }
.board-watch-name { margin: 0 0 6px; font-size: 18px; font-weight: 600; line-height: 1.3; }
.board-watch-bar { margin: 10px 0 12px; min-width: 0; }
/* 工单 / 订单操作同一行，不换行 */
.board-watch-links {
  display: flex; flex-wrap: nowrap; gap: 8px; align-items: center; margin: 0;
}
.board-watch-links .btn {
  flex: 1 1 0; min-width: 0; white-space: nowrap;
  text-align: center; padding: 8px 10px; font-size: 13px;
}
.board-watch-links .badge { flex: 0 0 auto; }
.board-watch-ok {
  margin: 0; padding: 16px; background: #e6f4ea; border: 1px solid #b7dfc5;
  border-radius: 8px; color: #1e6b34;
}

.board-all { margin-top: 8px; padding-top: 8px; border-top: 1px solid #eceef1; }
.board-all h2 { font-size: 16px; color: #555; margin: 16px 0 8px; }
.board-all h2 .muted { font-weight: 400; font-size: 13px; }
.board-legend { margin: 0 0 10px; font-size: 12px; }
.board-table td.card-title { font-weight: 600; }
.board-table { opacity: .96; }

@media (max-width: 760px) {
  .board-ask { padding: 14px 12px 12px; margin-left: -2px; margin-right: -2px; }
  .board-ask-input { min-height: 52px; font-size: 16px; border-radius: 12px; }
  .board-ask-mic { width: 52px; min-height: 52px; border-radius: 12px; }
  .board-ask-submit { width: 52px; min-height: 52px; border-radius: 12px; }
  .board-ask-chips { margin-left: -4px; margin-right: -4px; padding-left: 4px; padding-right: 4px; }
  .board-ask-chips .ask-chip { min-height: 40px; padding: 0 16px; font-size: 15px; }
  .ask-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ask-stat b { font-size: 20px; }
  .ask-result-more { font-size: 14px; }
  .ask-result-clear { padding: 9px 14px; border-radius: 8px; }
  body.login-page {
    background-color: #f6f7f9;
    background-image: url("/static/login-cnc-iso-portrait.svg");
    background-size: cover;
    background-position: center top;
    background-attachment: scroll;
  }
  .board-ai { flex-direction: column; align-items: stretch; gap: 12px; padding: 12px; }
  .board-ai-brand { max-width: none; }
  .board-ai-title { font-size: 20px; }
  .board-ai-tiles, .board-ai-tiles.has-feature {
    grid-auto-flow: row; grid-template-columns: repeat(2, 1fr);
  }
  .board-ai-feature { grid-column: 1 / -1; }
  .board-charts-grid { grid-template-columns: 1fr; }
  .board-chart { min-height: 0; }
  .board-pie-wrap { flex-wrap: wrap; }
  .board-pie { width: 100px; height: 100px; }
  .board-pie-hole { width: 56px; height: 56px; }
  .board-pie-hole b { font-size: 20px; }
  .board-vbars { min-height: 128px; }
  .board-line-svg { min-height: 96px; }
  .board-watch-name { font-size: 17px; }
}

.flag { font-size: 12px; color: #a1261b; }
.only-mobile { display: none; }
@media (max-width: 760px) {
  .only-mobile { display: inline; }
  .hide-mobile { display: none !important; }
}
td.edited, input.warn, select.warn { background: #fff8e1; }

/* 工人报工：大按钮、大数字 */
.worker { font-size: 17px; }
.worker .big { font-size: 34px; font-weight: 700; }
.ops { display: grid; gap: 8px; margin: 12px 0; }
.ops a { display: block; padding: 12px; border: 2px solid #c9cfd6; border-radius: 8px; color: #1f2328; background: #fff; }
.ops a.on { border-color: #0b5cad; background: #e3effc; }
.ops a.off { opacity: .5; }

.voice-fill { margin: 12px 0; }
.voice-fill .submit-big.secondary {
  background: #fff; color: #0b5cad; border: 2px solid #0b5cad;
}
.voice-panel { margin-top: 8px; padding: 12px; border: 1px solid #c9cfd6; border-radius: 8px; background: #f7f8fa; }
.field-toggle { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0; }
.field-toggle button { padding: 10px 0; background: #fff; color: #1f2328; border: 2px solid #c9cfd6; }
.field-toggle button.on { border-color: #0b5cad; background: #e3effc; }
.display { font-size: 40px; font-weight: 700; text-align: right; padding: 8px 12px; background: #fff; border: 2px solid #0b5cad;
  border-radius: 8px; min-height: 64px; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.keypad button { font-size: 28px; padding: 16px 0; background: #fff; color: #1f2328; border: 1px solid #c9cfd6; }
.queue { background: #fff4d6; color: #7a5a00; padding: 10px; border-radius: 6px; margin: 10px 0; }

/* 手机：顶栏 + 抽屉菜单 */
@media (max-width: 760px) {
  body { font-size: 15px; }
  body.has-side { padding-left: 0; }
  .wrap, .narrow { padding: 12px; }
  h1 { font-size: 19px; margin: 4px 0 12px; }
  h2 { font-size: 16px; margin: 18px 0 8px; }

  .mob-bar {
    display: flex; align-items: center; gap: 10px;
    position: sticky; top: 0; z-index: 210;
    padding: 10px 12px; background: #1f2d3d; color: #dbe4ee;
  }
  .mob-bar .brand {
    display: flex; align-items: center; gap: 8px;
    flex: 1; min-width: 0; color: #fff;
  }
  .mob-bar .brand:hover { text-decoration: none; color: #fff; }
  .mob-bar .brand-mark { width: 28px; height: 28px; }
  .mob-bar .brand-copy { flex: 1; }
  .mob-bar .brand-product { color: #fff; font-size: 12px; font-weight: 700; line-height: 1.15; }
  .mob-bar .brand-factory { margin-top: 1px; color: #b8c6d6; font-size: 11px; line-height: 1.2; }
  .mob-bar .who { font-size: 12px; color: #9fb0c3; max-width: 7em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mob-back {
    flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 6px; color: #fff;
    text-decoration: none; border: 1px solid rgba(255,255,255,.2);
  }
  .mob-back:hover { text-decoration: none; color: #fff; background: rgba(255,255,255,.08); }
  .mob-back svg {
    width: 20px; height: 20px; stroke: currentColor; fill: none;
    stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  }
  .nav-toggle {
    position: relative; flex: 0 0 auto; width: 40px; height: 36px; padding: 0;
    background: transparent; border: 1px solid rgba(255,255,255,.2); border-radius: 6px; cursor: pointer;
  }
  .nav-toggle span {
    position: absolute; left: 9px; right: 9px; height: 2px; background: #fff; border-radius: 1px;
    transition: transform .2s ease, opacity .2s ease, top .2s ease;
  }
  .nav-toggle span:nth-child(1) { top: 11px; }
  .nav-toggle span:nth-child(2) { top: 17px; }
  .nav-toggle span:nth-child(3) { top: 23px; }
  body.nav-open .nav-toggle span:nth-child(1) { top: 17px; transform: rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { top: 17px; transform: rotate(-45deg); }
  body.nav-open { overflow: hidden; }
  .nav-scrim {
    display: block; position: fixed; inset: 0; z-index: 190;
    background: rgba(15, 23, 32, .45); border: 0; padding: 0; cursor: pointer;
  }
  .nav-scrim[hidden] { display: none !important; }
  .side {
    transform: translateX(-100%);
    transition: transform .2s ease;
    box-shadow: none; z-index: 200;
  }
  body.nav-open .side {
    transform: translateX(0);
    box-shadow: 8px 0 28px rgba(0,0,0,.28);
  }
  .side-head .brand { display: none; }
  .side-nav > a,
  .side-nav .nav-group > summary { padding: 12px 14px; font-size: 15px; }
  .side-nav .nav-sub a { padding: 10px 14px; font-size: 14px; }

  .card { padding: 12px; }
  .row { gap: 10px; }
  /* 表单：两列栅格，输入框撑满 */
  form.row > div, .card.row > div { flex: 1 1 calc(50% - 5px); min-width: 0; }
  form.row > div.grow, .card.row > div.grow { flex-basis: 100%; }
  form.row input:not([type=checkbox]):not([type=radio]), form.row select,
  .card.row input:not([type=checkbox]), .card.row select { width: 100%; }
  form.row > div:last-child:has(> button:only-child) { flex: 0 0 auto; align-self: flex-end; }
  form.row > input, form.row > select { flex: 1 1 140px; min-width: 0; }
  input, select, textarea { font-size: 16px; }   /* iOS 小于 16px 会自动放大页面 */
  button, .btn { padding: 9px 16px; }
  button.small, .btn.small { padding: 6px 10px; font-size: 14px; }

  /* 表格：不挤压成一字一行，改为横向滑动 */
  .table-scroll { margin: 0 -12px; padding: 0 12px; }
  .table-scroll table { min-width: 100%; width: max-content; }
  th, td { white-space: nowrap; padding: 8px 10px; }
  td .muted { white-space: normal; }
  td form.row { flex-wrap: nowrap; }
  td form.row > * { flex: 0 0 auto; }
  td form.row input { width: auto !important; }

  /* 常用列表在手机上改为卡片：每行一张卡，td 用 data-label 显示字段名 */
  .table-scroll:has(> table.cards) { margin: 0; padding: 0; }
  table.cards { width: 100% !important; min-width: 0 !important; background: none; }
  table.cards, table.cards tbody, table.cards tr, table.cards td { display: block; }
  table.cards tr:has(> th) { display: none; }
  table.cards tr { background: #fff; border: 1px solid #e3e6ea; border-radius: 8px; margin-bottom: 10px; padding: 8px 12px; }
  table.cards td { border: 0; padding: 3px 0; white-space: normal; display: flex; gap: 10px; text-align: left !important; }
  table.cards td:empty { display: none; }
  table.cards td[data-label]::before { content: attr(data-label); flex: 0 0 5.5em; color: #6a737d; font-size: 13px; padding-top: 1px; }
  table.cards td.card-title { font-weight: 600; font-size: 16px; }
  table.cards td.card-title .muted { font-weight: normal; }
  table.cards td.card-actions { padding-top: 8px; }
  table.cards td.card-actions form.row { flex-wrap: wrap; width: 100%; }
  table.cards td.card-actions form.row input { flex: 1 1 120px; width: auto !important; }
  table.cards tr.risk-red { border-left: 5px solid #d93025; }
  table.cards tr.risk-yellow { border-left: 5px solid #f2b400; }
  table.cards tr.risk-green { border-left: 5px solid #34a853; }
  table.cards tr[class^=risk] td:first-child { border-left: 0; }
  table.cards td > .bar { flex: 1; align-self: center; }

  .stats { gap: 8px; }
  .stat { flex: 1 1 calc(50% - 4px); min-width: 0; padding: 10px 12px; }
  .stat b { font-size: 22px; }
}

/* 打印：流转卡 / 送货单 */
.sheet { background: #fff; max-width: 800px; margin: 0 auto; padding: 24px; }
.sheet table th, .sheet table td { border: 1px solid #333; }
.card-head { display: flex; justify-content: space-between; gap: 16px; }
.qr svg { width: 150px; height: 150px; }
@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  .wrap { padding: 0; max-width: none; }
  .sheet { padding: 0; }
}

/* 人员头像 */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid #c9cfd6;
  vertical-align: middle;
  overflow: hidden;
}
.avatar-sm { width: 28px; height: 28px; font-size: 12px; }
.avatar-md { width: 36px; height: 36px; font-size: 14px; }
.avatar-lg { width: 56px; height: 56px; font-size: 20px; }
.avatar-fallback {
  background: #e3effc;
  color: #0b5cad;
  font-weight: 700;
  line-height: 1;
  border-color: #b7d0ef;
}
.person-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}
.person-cell > span:not(.avatar),
.person-cell > a { min-width: 0; }
.avatar-upload { display: inline-flex; margin: 0; }
.avatar-pick {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  cursor: pointer;
  border-radius: 50%;
}
.avatar-pick .avatar { border-color: #0b5cad; }
.avatar-pick-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(15, 23, 32, .55);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  opacity: 0;
  transition: opacity .15s;
  pointer-events: none;
}
.avatar-pick:hover .avatar-pick-hint,
.avatar-pick:focus-within .avatar-pick-hint { opacity: 1; }
.me-profile-head { align-items: flex-start; gap: 12px; }
.me-profile-name { font-size: 18px; font-weight: 600; line-height: 1.3; }
@media (hover: none) {
  .avatar-pick-hint {
    inset: auto 0 0 0;
    height: auto;
    padding: 2px 0;
    border-radius: 0 0 50% 50% / 0 0 12px 12px;
    font-size: 10px;
    opacity: .85;
    background: rgba(15, 23, 32, .5);
  }
}
