/* 订单助手 · 管理后台 —— 蓝白商务（配色参考 wecom-archive 管理端） */
:root {
  --brand: #165dff;          /* 主色：按钮、链接、选中 */
  --brand-dark: #0e42d2;
  --brand-soft: #e8f3ff;
  --brand-line: #94bfff;
  --blue: #165dff;
  --blue-2: #4096ff;
  --orange: #f77234;
  --red: #f53f3f;            /* 图形用 */
  --red-text: #cb2634;       /* 文字用（对比度够） */
  --red-soft: #ffece8;
  --amber: #ff7d00;
  --amber-text: #b54708;
  --amber-soft: #fff3e8;
  --green: #00b42a;
  --green-text: #007a24;
  --green-soft: #e8ffea;
  --bg: #f6faff;
  --card: #ffffff;
  --fill: #f2f3f5;
  --hover: #f7faff;
  --border: #e5e6eb;
  --line: #f0f0f0;
  --line-soft: #eff6fe;
  --line-kpi: #dfebf0;
  --title: #000000;
  --text: #1f1f1f;
  --muted: #4e5969;
  --faint: #86909c;
  --radius: 8px;
  --shadow: none;
  --sans: "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --display: "MiSans", "PingFang SC", "Microsoft YaHei", sans-serif;
  --numf: "DIN Alternate", "Bahnschrift", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-family: var(--sans);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
::selection { background: #cfe2ff; }
.boot { padding: 80px; text-align: center; color: var(--muted); }
.num { font-family: var(--numf); font-variant-numeric: tabular-nums; }
.mono { font-family: var(--numf); letter-spacing: .01em; }
.muted { color: var(--muted); }
.red { color: var(--red-text); }
.green { color: var(--green-text); }

/* ---- 框架：左侧栏 + 内容 ---- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; width: 224px; flex: none;
  display: flex; flex-direction: column; gap: 26px; padding: 22px 14px 20px 16px; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px; }
.brand-mark { width: 36px; height: 36px; border-radius: 8px; background: var(--brand); color: #fff; display: grid; place-items: center; flex: none; }
.brand-mark svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.brand-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.brand-text b { font-size: 16px; font-weight: 600; color: var(--title); letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { font-size: 12px; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; width: 100%; height: 44px; padding: 0 14px;
  border: 0; border-radius: 8px; background: none; color: #1e1f1f; font: inherit; font-size: 14px; text-align: left; cursor: pointer;
  transition: color .2s, background .2s;
}
.nav-item .ico { width: 18px; height: 18px; }
.nav-item:hover { color: var(--brand); }
.nav-item.on { background: #fff; color: var(--brand); font-weight: 500; box-shadow: 0 1px 2px rgba(22, 93, 255, .06); }
.side-status { margin-top: auto; padding: 14px 16px; border-radius: 8px; background: #fff; border: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.side-status b { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text); }
.side-status .dot.on { background: var(--green); }
.side-status .dot.off { background: var(--red); }
.side-user { display: flex; align-items: center; gap: 10px; padding: 0 10px; font-size: 13px; }
.side-user .ava { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 600; flex: none; }
.side-user span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user button { border: 0; background: none; padding: 6px 0; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.side-user button:hover { color: var(--brand); }
.content { flex: 1; min-width: 0; }
main { width: 100%; max-width: 1400px; padding: 26px 32px 60px 20px; }
.page-head { margin-bottom: 16px; }
.page-head h1 { margin: 0; font-family: var(--display); font-size: 22px; font-weight: 600; color: var(--title); letter-spacing: .02em; }

/* ---- controls ---- */
.bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.bar .grow { flex: 1; }
.field { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px;
  background: var(--card); border: 1px solid var(--border); border-radius: 6px; transition: border-color .2s; }
.field:hover { border-color: var(--brand-line); }
.field > span { color: var(--muted); white-space: nowrap; }
.field select, .field input { border: 0; outline: none; background: transparent; font: inherit; color: var(--text); min-width: 0; }
.field input[type=date] { width: 128px; font-family: var(--numf); }
input.inp, select.inp, textarea.inp {
  width: 100%; height: 34px; padding: 0 10px; font: inherit; color: var(--text);
  border: 1px solid var(--border); border-radius: 6px; background: #fff; outline: none; transition: border-color .2s, box-shadow .2s;
}
input.inp:hover, select.inp:hover, textarea.inp:hover { border-color: var(--brand-line); }
textarea.inp { height: auto; padding: 8px 10px; resize: vertical; }
.inp::placeholder { color: #a9aeb8; }
.inp:focus, .field:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(22, 93, 255, .12); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 16px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); font: inherit; cursor: pointer; white-space: nowrap;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .02); transition: color .2s, border-color .2s, background .2s;
}
.btn:hover { border-color: var(--brand-line); color: var(--brand); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 500; box-shadow: 0 2px 0 rgba(5, 145, 255, .1); }
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn.small { height: 28px; padding: 0 10px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: default; }
.btn:disabled:hover { border-color: var(--border); color: var(--text); }
.btn.primary:disabled:hover { background: var(--brand); color: #fff; }

/* ---- cards ---- */
.card { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 20px; }
.card + .card, .grid2 + .card, .card + .grid2, .stats-row + .card { margin-top: 20px; }
.card h3 { margin: 0 0 14px; font-size: 16px; font-weight: 600; color: var(--title); display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.card h3 small { font-size: 12.5px; font-weight: 400; color: var(--muted); }
.card h3 .grow { flex: 1; }
.card h3 a { font-size: 13px; font-weight: 400; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-bottom: 20px; }
.kpi { background: var(--card); border: 1px solid var(--line-kpi); border-radius: var(--radius); padding: 18px 20px 16px; min-width: 0; }
.kpi .k { color: var(--muted); font-size: 13px; }
.kpi .v { font-family: var(--numf); font-size: 34px; font-weight: 400; margin: 10px 0 8px; line-height: 1; color: var(--text); white-space: nowrap; }
.kpi .v small { font-family: var(--sans); font-size: 13px; color: var(--muted); margin-left: 4px; }
.kpi.alert .v { color: var(--red); }
.kpi.alert .d { color: var(--red-text); }
.kpi .d { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .d.up { color: var(--green-text); }
.kpi .d.down { color: var(--red-text); }

.stats-row { display: flex; flex-wrap: wrap; gap: 20px; }
.stats-row > .card { margin: 0; }
.trend-card { flex: 2 1 560px; min-width: 0; display: flex; flex-direction: column; }
.trend-card .chart { flex: 1; min-height: 340px; }
.rank-col { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.rank-col .card { margin: 0; }
.rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.rank li { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.rank li i { width: 20px; height: 20px; border-radius: 4px; flex: none; display: grid; place-items: center; font-style: normal; font-size: 12px;
  font-family: var(--numf); background: var(--fill); color: var(--muted); }
.rank li i.top { background: var(--brand); color: #fff; }
.rank .nm { width: 76px; flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank .track { flex: 1; height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.rank .track span { display: block; height: 100%; border-radius: 3px; background: var(--brand); }
.rank.alt .track span { background: var(--blue-2); }
.rank li.other .track span { background: #c9cdd4; }
.rank b { width: 52px; flex: none; text-align: right; font-family: var(--numf); font-size: 15px; font-weight: 400; }

.chart { width: 100%; height: 300px; }
.chart.short { height: 260px; }

/* ---- tables ---- */
.tw { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: #fafafa; color: var(--muted); font-weight: 500; font-size: 13px; padding-top: 11px; padding-bottom: 11px; }
tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; }
tbody tr { transition: background .15s; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover td { background: var(--hover); }
.wrap { white-space: normal; min-width: 180px; }

.rate { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.rate .track { flex: 1; height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; max-width: 220px; }
.rate .fill { height: 100%; background: var(--brand); border-radius: 3px; }

.tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 4px; font-size: 12px; line-height: 20px; white-space: nowrap; }
.tag.pending { background: var(--brand-soft); color: var(--brand-dark); }
.tag.shipped { background: var(--green-soft); color: var(--green-text); }
.tag.cancelled { background: var(--fill); color: var(--muted); }
.tag.overdue { background: var(--red-soft); color: var(--red-text); }
.tag.soon { background: var(--amber-soft); color: var(--amber-text); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }

.pager { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 14px; color: var(--muted); }
.empty { padding: 40px 0; text-align: center; color: var(--faint); }

/* ---- drawer ---- */
.mask { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 50; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(580px, 100vw); z-index: 51;
  background: var(--card); box-shadow: 0 8px 30px rgba(29, 33, 41, .12); display: flex; flex-direction: column;
}
.drawer header { display: flex; align-items: center; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--border); }
.drawer header h2 { margin: 0; font-size: 18px; font-weight: 600; color: var(--title); }
.drawer .body { flex: 1; overflow-y: auto; padding: 20px 22px; }
.drawer footer { padding: 12px 22px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; background: #fafbfd; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.form label.full, .form .full { grid-column: 1 / -1; }
.batches { display: grid; gap: 4px; font-size: 13px; padding: 8px 10px; background: var(--fill); border-radius: 6px; }
.section-title { margin: 24px 0 10px; font-size: 14px; font-weight: 600; color: var(--title); }
.photos { display: flex; flex-wrap: wrap; gap: 10px; }
.drawer footer .grow { flex: 1; }
.drawer footer .muted { align-self: center; }
.inline .inp.unit { flex: 0 0 72px; }

/* 产品档案 */
.c-thumb { width: 52px; padding-right: 0; }
.thumb { display: block; width: 40px; height: 40px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); background: var(--fill); }
.thumb.blank { background: repeating-linear-gradient(135deg, var(--fill) 0 6px, #fff 6px 12px); }
.goods-hero { display: flex; gap: 18px; align-items: flex-start; padding: 16px; margin-bottom: 18px; border: 1px solid var(--border); border-radius: 8px; background: #fafcff; }
.hero-photo { flex: none; width: 128px; height: 128px; border-radius: 8px; background: var(--fill); display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: zoom-in; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.goods-hero .kv { flex: 1; min-width: 0; }
.pre { white-space: pre-line; color: var(--red-text); line-height: 1.8; max-height: 40vh; overflow-y: auto; }

.section-title.with-action { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.section-title .grow { flex: 1; }
.photos .ph { position: relative; }
.photos .ph .ph-del { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, .55); color: #fff; font-size: 14px; line-height: 22px; cursor: pointer; opacity: 0; transition: opacity .15s; }
.photos .ph:hover .ph-del, .photos .ph .ph-del:focus { opacity: 1; }
@media (hover: none) { .photos .ph .ph-del { opacity: 1; } }
.similar-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.sim { display: flex; flex-direction: column; gap: 2px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; color: var(--text); text-decoration: none; }
.sim:hover { border-color: var(--brand-line); background: #fafcff; }
.sim img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: var(--fill); margin-bottom: 4px; }

/* 人员：角色 + 可建单 */
.role-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.can-order { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--text); white-space: nowrap; cursor: pointer; }
.can-order input { margin: 0; accent-color: var(--brand); }
.can-order.fixed { color: var(--faint); cursor: default; }
.photos img { width: 120px; height: 120px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); cursor: zoom-in; background: var(--fill); }
.msg { padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; margin-bottom: 8px; white-space: pre-wrap; word-break: break-word; background: #fff; }
.msg .meta { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.items-table th, .items-table td { padding: 5px 4px; border-bottom: 0; background: none; }
.items-table th { font-size: 12px; }
.items-table .inp { height: 32px; }
.items-table .inp.unit { width: 52px; }
.items-table input[type=number] { width: 82px; }
.items-table td:first-child .inp { min-width: 110px; }
.add-line { margin-top: 6px; }
.msg.chg { padding: 7px 12px; }
.msg.chg .old { color: var(--faint); text-decoration: line-through; }
.msg .rep { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--border); color: var(--muted); }

.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .8); display: grid; place-items: center; cursor: zoom-out; }
.lightbox img { max-width: 94vw; max-height: 94vh; }

/* ---- login ---- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--bg); }
.login .card { width: min(400px, 100%); padding: 36px 32px 32px; border-color: var(--border); box-shadow: 0 8px 30px rgba(29, 33, 41, .06); }
.login .brand { padding: 0; margin-bottom: 28px; }
.login h1 { margin: 0 0 6px; font-family: var(--display); font-size: 22px; font-weight: 600; color: var(--title); }
.login .sub { margin: 0 0 24px; color: var(--muted); font-size: 13px; }
.login label { display: block; margin-bottom: 16px; color: var(--muted); font-size: 13px; }
.login label .inp { margin-top: 6px; height: 40px; }
.login .btn { width: 100%; height: 42px; margin-top: 8px; font-size: 15px; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 80;
  background: #1d2129; color: #fff; padding: 10px 18px; border-radius: 6px; max-width: 90vw; box-shadow: 0 8px 30px rgba(29, 33, 41, .2); }
.toast.err { background: var(--red-text); }
.foot { margin-top: 18px; text-align: right; color: var(--faint); font-size: 12px; }
.status-line { display: flex; gap: 24px; flex-wrap: wrap; }

/* ---- settings ---- */
.small { font-size: 12.5px; }
.hint { margin-top: 10px; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.hint.top { margin: -4px 0 12px; }
.hint.warn { color: var(--amber-text); }
.form .hint { margin-top: 0; }
.ico { display: inline-grid; place-items: center; width: 18px; height: 18px; flex: none; }
.ico svg, .sec-ico svg, .tile-ico svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.settings { display: flex; flex-direction: column; gap: 20px; max-width: 1160px; }
/* 设置页分页：一次只看一页 */
.set-nav { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.set-nav::-webkit-scrollbar { display: none; }
.set-nav a { flex: none; display: flex; align-items: center; gap: 8px; padding: 10px 14px 11px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--muted); font-size: 14px; }
.set-nav a .ico { width: 16px; height: 16px; }
.set-nav a:hover { color: var(--brand); }
.set-nav a.on { color: var(--brand); font-weight: 500; border-bottom-color: var(--brand); }
.nav-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--amber-soft); color: var(--amber-text); font-size: 12px; display: grid; place-items: center; }
.set-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.set-main > .card, .set-grid > .card { margin: 0; }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tile { position: relative; background: var(--card); border: 1px solid var(--line-kpi); border-radius: var(--radius); padding: 16px 18px 14px; overflow: hidden; min-width: 0; }
.tile-ico { position: absolute; right: 14px; top: 14px; width: 34px; height: 34px; padding: 7px; border-radius: 8px; background: var(--fill); color: var(--muted); }
.tile.ok .tile-ico { background: var(--green-soft); color: var(--green-text); }
.tile.warn .tile-ico { background: var(--amber-soft); color: var(--amber-text); }
.tile.bad .tile-ico { background: var(--red-soft); color: var(--red-text); }
.tile-k { color: var(--muted); font-size: 13px; }
.tile-v { font-size: 22px; font-weight: 600; margin: 10px 0 4px; line-height: 1.2; color: var(--title); }
.tile-v small { font-size: 13px; font-weight: 400; color: var(--muted); }
.tile.bad .tile-v { color: var(--red-text); }
.tile-d { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.set-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; }
.sec-card { padding: 0; display: flex; flex-direction: column; }
.sec-head { display: flex; align-items: flex-start; gap: 14px; padding: 18px 20px 14px; }
.sec-ico { flex: none; width: 38px; height: 38px; padding: 8px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); }
.sec-title { flex: 1; min-width: 0; }
.sec-title h3 { margin: 1px 0 3px; font-size: 16px; font-weight: 600; color: var(--title); }
.sec-title p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.sec-body { padding: 4px 20px 20px; }
.sec-body.split { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; }
.sec-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 20px; border-top: 1px solid var(--line); background: #fafbfd; border-radius: 0 0 var(--radius) var(--radius); margin-top: auto; }
.sec-foot.note { color: var(--muted); font-size: 12.5px; }
.sec-foot .grow { flex: 1; }
.link-muted { color: var(--muted); font-size: 13px; }
.link-muted:hover { color: var(--brand); }

.pill { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px; border-radius: 4px; font-size: 12.5px; font-weight: 500; white-space: nowrap; flex: none; }
.pill.sm { height: 22px; padding: 0 8px; font-size: 12px; }
.pill.ok { background: var(--green-soft); color: var(--green-text); }
.pill.warn { background: var(--amber-soft); color: var(--amber-text); }
.pill.bad { background: var(--red-soft); color: var(--red-text); }
.pill.neutral { background: var(--fill); color: var(--muted); }

.progress { height: 6px; margin: 0 20px 6px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--brand); border-radius: 3px; transition: width .3s; }
.checklist { list-style: none; margin: 0; padding: 8px 20px 18px; display: flex; flex-direction: column; }
.checklist li { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist .mark { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; margin-top: 1px; }
.checklist li.ok .mark { background: var(--green-soft); color: var(--green-text); }
.checklist li.bad .mark { background: var(--amber-soft); color: var(--amber-text); }
.ck-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ck-text b { font-weight: 500; }
.checklist li.ok .ck-text b { color: var(--muted); }
.ck-text small { color: var(--muted); font-size: 12.5px; }
.ck-go { flex: none; font-size: 13px; padding: 2px 0; }

.timeline { list-style: none; margin: 0; padding: 4px 20px 6px; }
.timeline li { display: flex; gap: 14px; padding: 8px 0; position: relative; }
.tl-time { flex: none; width: 52px; height: 26px; border-radius: 4px; background: var(--brand-soft); color: var(--brand-dark); display: grid; place-items: center; font-family: var(--numf); font-size: 13px; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 10px 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; line-height: 1.6; min-width: 0; word-break: break-all; }
.kv.compact { grid-template-columns: 76px 1fr; gap: 8px 12px; font-size: 13.5px; }
.sec-card > .kv.compact { margin: 6px 20px 18px; padding-top: 12px; border-top: 1px dashed var(--line); }
.kv .tag { margin-left: 6px; }

.settings-form label { color: var(--text); font-weight: 500; }
.settings-form .hint { font-weight: 400; }
.inline { display: flex; gap: 8px; align-items: center; }
.inline .inp { flex: 1; min-width: 0; }
.side-panel { background: var(--hover); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 14px 16px; align-self: start; }
.side-title { font-size: 12.5px; color: var(--muted); font-weight: 600; letter-spacing: .5px; margin-bottom: 10px; }
.side-tip { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border); color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.test-result { margin-top: 14px; padding: 10px 12px; border-radius: 6px; line-height: 1.6; word-break: break-word; font-size: 13.5px; }
.test-result.ok { background: var(--green-soft); color: var(--green-text); }
.test-result.bad { background: var(--red-soft); color: var(--red-text); }
.btn.danger { color: var(--red-text); border-color: #fbd3d0; }
.btn.danger:hover { color: var(--red-text); border-color: var(--red); }
.btn .ico { width: 16px; height: 16px; }

.toolbar { display: flex; align-items: center; gap: 10px; padding: 0 20px 10px; flex-wrap: wrap; }
.toolbar .grow { flex: 1; }
.search { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; width: 260px; max-width: 100%;
  border: 1px solid transparent; border-radius: 6px; background: #f9f9f9; color: var(--faint); transition: border-color .2s, background .2s; }
.search:focus-within { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(22, 93, 255, .12); }
.search input { border: 0; outline: none; font: inherit; flex: 1; min-width: 0; background: transparent; color: var(--text); }
.sec-card .hint.top { padding: 0 20px; }
.sec-card > .tw { margin: 0; padding: 0 8px; }
.staff-table th { font-size: 12.5px; text-transform: none; padding-top: 8px; border-top: 1px solid var(--line); }
.staff-table th:first-child { padding-left: 12px; }
.staff-table td { vertical-align: middle; }
.staff-table .cap { display: none; font-size: 12px; color: var(--faint); }
/* 角色：一眼看出管理员、待授权、已停用 */
.inp.role.role-admin { color: var(--brand); font-weight: 500; }
.inp.role.role-buyer { font-weight: 500; }
.inp.role.role-pending { color: var(--amber-text); border-color: #f5c99a; background: var(--amber-soft); }
.inp.role.role-off { color: var(--faint); }
.staff-table tr.off .c-person, .staff-table tr.off .c-dept, .staff-table tr.off .c-seen { opacity: .5; }
.role-seg { align-self: center; }
.role-seg button { padding: 5px 10px; font-size: 13px; }
.role-seg button b { font-size: 12px; color: var(--faint); }
.role-seg button.on b { color: inherit; }
.role-seg button.warn:not(.on) { color: var(--amber-text); }
.add-person .inp.add-role { width: 110px; }
.staff-table tr.changed td { background: #f2f7ff; }
.staff-table tr.unnamed td:first-child { box-shadow: inset 3px 0 0 var(--amber); }
/* 人员：左边部门树，右边成员 */
.org { display: grid; grid-template-columns: 200px minmax(0, 1fr); border-top: 1px solid var(--line); }
.org-tree { border-right: 1px solid var(--line); padding: 8px 6px 12px; max-height: 620px; overflow: auto; background: #fafcff; }
.org-node { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 8px; border-radius: 6px; color: var(--text); text-decoration: none; font-size: 13.5px; }
.org-node:hover { background: #eef3fc; color: var(--text); }
.org-node.on { background: var(--brand-soft); color: var(--brand); font-weight: 500; }
.org-node .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-node b { flex: none; font-weight: 400; font-size: 12px; color: var(--muted); font-family: var(--numf); }
.org-node.all { margin-bottom: 2px; }
.org-node.all .ico { color: var(--brand); }
.caret { flex: none; width: 16px; height: 16px; display: grid; place-items: center; border-radius: 4px; cursor: pointer; }
.caret::before { content: ""; border-style: solid; border-width: 4px 0 4px 5px; border-color: transparent transparent transparent var(--faint); transition: transform .15s; }
.caret.open::before { transform: rotate(90deg); }
.caret:not(.leaf):hover { background: #e5ecf8; }
.caret.leaf { cursor: inherit; }
.caret.leaf::before { border: 0; width: 4px; height: 4px; border-radius: 50%; background: #c9cdd4; }
.org-empty { margin: 8px 4px; padding: 10px; font-size: 12.5px; color: var(--muted); line-height: 1.6; border: 1px dashed var(--border); border-radius: 6px; }
.org-main { min-width: 0; }
.org-crumb { padding: 10px 14px; font-size: 13.5px; border-bottom: 1px solid var(--line); }
.org-crumb .muted { margin-left: 6px; }
.org-main > .tw { margin: 0; }
.org .staff-table th { border-top: 0; }
.inp.dept { width: 140px; height: 30px; }
.org .person { min-width: 170px; }
.inp.dept.none { color: var(--muted); }
.more-dept { margin-left: 6px; padding: 1px 6px; border-radius: 4px; background: var(--fill); color: var(--muted); font-size: 12px; cursor: default; }
.person { display: flex; align-items: center; gap: 12px; min-width: 210px; }
.avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 14px;
  background: var(--brand-soft); color: var(--brand); }
.avatar.blank { background: var(--amber-soft); color: var(--amber-text); }
.person-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.inp.ghost { height: 28px; padding: 0 6px; margin-left: -6px; border-color: transparent; background: transparent; font-weight: 500; width: 150px; }
.inp.ghost:hover { border-color: var(--border); background: #fff; }
.inp.ghost::placeholder { color: var(--amber-text); font-weight: 400; }
.inp.role { width: 104px; height: 30px; }
.switch { position: relative; display: inline-block; width: 36px; height: 20px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; border-radius: 10px; background: #c9cdd4; transition: background .2s; }
.switch i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .2s; }
.switch input:checked + i { background: var(--brand); }
.switch input:checked + i::after { transform: translateX(16px); }
.switch input:focus-visible + i { box-shadow: 0 0 0 3px rgba(22, 93, 255, .2); }
.empty-row { text-align: center; color: var(--faint); padding: 28px 10px !important; }
.add-person { display: flex; align-items: center; gap: 10px; margin: 0 20px 14px; padding: 12px; border: 1px solid var(--line-soft); background: var(--hover); border-radius: 8px; flex-wrap: wrap; }
.add-person .inp { width: 200px; height: 32px; background: #fff; }
.add-person .add-warn { flex-basis: 100%; margin: 0; padding: 8px 10px; border-radius: 6px; background: var(--amber-soft); color: var(--amber-text); font-size: 13px; line-height: 1.6; }
.sub-title { font-weight: 600; margin-bottom: 8px; color: var(--title); }
.steps { margin: 0 0 14px; padding-left: 20px; color: var(--muted); line-height: 1.9; font-size: 13.5px; }
.field-label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; }
.backup-state { margin-bottom: 10px; padding: 8px 10px; border-radius: 6px; font-size: 13.5px; }
.backup-state.ok { background: var(--green-soft); color: var(--green-text); }
.backup-state.bad { background: var(--red-soft); color: var(--red-text); }
/* 设置项：左边说明，右边开关 */
.opt { display: flex; align-items: center; gap: 24px; padding: 16px 20px; }
.opt + .opt { border-top: 1px solid var(--line); }
.opt-text { flex: 1; min-width: 0; }
.opt-text b { font-weight: 500; color: var(--title); }
.opt-text p { margin: 3px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.opt .seg { align-self: center; flex: none; }
select.inp.opt-sel { width: 240px; flex: none; }
.callout { margin: 0 20px 14px; padding: 9px 12px; border-radius: 6px; font-size: 13px; line-height: 1.6; background: var(--brand-soft); color: var(--brand-dark); }
.callout.warn { background: var(--amber-soft); color: var(--amber-text); }
.callout.bad { background: var(--red-soft); color: var(--red-text); }
.callout.flush { margin: 0 0 14px; }
.opt + .callout { margin-top: -4px; margin-bottom: 16px; }
.done-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 20px 18px; }
.checklist + .done-chips { border-top: 1px dashed var(--line); }
.chip { padding: 2px 10px; border-radius: 12px; background: var(--green-soft); color: var(--green-text); font-size: 12.5px; line-height: 20px; }
.timeline li.off { opacity: .5; }
.now-bar { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0 20px 16px; padding: 10px 14px; border-radius: 8px; background: var(--hover); border: 1px solid var(--line-soft); font-size: 13px; }
.now-bar i { font-style: normal; color: var(--muted); margin-right: 8px; }
.now-bar b { font-weight: 500; }
.now-bar .tag { margin-left: 6px; font-style: normal; }
.sec-body .settings-form { max-width: 760px; }
.btn.on { border-color: var(--brand-line); color: var(--brand); background: var(--brand-soft); }
.person-text .pill { margin-left: 6px; }
.add-tip { flex-basis: 100%; color: var(--muted); font-size: 12.5px; }
.legend { padding: 12px 20px 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.legend summary { cursor: pointer; width: max-content; max-width: 100%; }
.legend summary:hover { color: var(--brand); }
.legend ul { list-style: none; margin: 10px 0 2px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 24px; line-height: 1.6; }
.legend li b { display: inline-block; min-width: 86px; margin-right: 8px; color: var(--text); font-weight: 500; }
@media (max-width: 760px) { .legend ul { grid-template-columns: minmax(0, 1fr); } }
.master { display: flex; flex-direction: column; gap: 16px; max-width: 1160px; }
.seg { display: inline-flex; gap: 4px; padding: 3px; border-radius: 8px; background: #e9eef6; align-self: flex-start; }
.seg button { border: 0; background: transparent; padding: 7px 16px; border-radius: 6px; font: inherit; color: var(--muted); cursor: pointer; }
.seg button:hover { color: var(--text); }
.seg button b { font-weight: 400; margin-left: 4px; color: inherit; font-family: var(--numf); }
.seg button.on { background: var(--card); color: var(--brand); font-weight: 500; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.inp.ghost.strong { font-weight: 600; width: 130px; }
.nowrap { white-space: nowrap; }
.dialog { position: fixed; z-index: 51; left: 50%; top: 20%; transform: translateX(-50%); width: min(440px, calc(100vw - 32px));
  background: var(--card); border-radius: var(--radius); box-shadow: 0 8px 30px rgba(29, 33, 41, .16); padding: 22px 24px; }
.dialog h3 { margin: 0 0 12px; font-size: 17px; font-weight: 600; color: var(--title); }
.dialog.wide { width: min(660px, calc(100vw - 32px)); top: 8%; max-height: 84vh; overflow-y: auto; }
.err-list { margin: 8px 0; padding-left: 20px; color: var(--red-text); line-height: 1.8; max-height: 40vh; overflow-y: auto; }
.mask.low { z-index: 44; }
.drawer.low { z-index: 45; }
.mini-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.mini-kpis > div { background: var(--hover); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.mini-kpis b { font-family: var(--numf); font-size: 22px; font-weight: 400; }
.mini-kpis span { color: var(--muted); font-size: 12.5px; }
.mini-kpis .red b { color: var(--red); }
.bar-row { display: grid; grid-template-columns: 100px 1fr 48px; align-items: center; gap: 10px; margin: 6px 0; }
.bar-row i { display: block; height: 6px; border-radius: 3px; background: var(--brand); }
.bar-row b { text-align: right; font-weight: 400; font-family: var(--numf); }
.mini-table td { padding: 8px 6px; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.pwd-form { display: flex; align-items: flex-end; gap: 14px; padding: 2px 20px 20px; flex-wrap: wrap; }
.pwd-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.pwd-form .inp { width: 220px; }

@media (max-width: 1240px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1100px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .set-grid, .sec-body.split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  /* 侧栏变成顶栏 */
  .shell { flex-direction: column; }
  .sidebar { position: static; width: auto; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 12px;
    padding: 12px 16px 8px; border-bottom: 1px solid var(--border); background: #fff; overflow: visible; }
  .brand { padding: 0; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-text small { display: none; }
  .nav { order: 3; width: 100%; flex-direction: row; gap: 4px; overflow-x: auto; }
  .nav-item { width: auto; flex: none; height: 40px; padding: 0 9px; gap: 6px; }
  .nav-item.on { background: var(--brand-soft); box-shadow: none; }
  .side-status { display: none; }
  .side-user { margin-left: auto; padding: 0; }
  .side-user span { display: none; }
  .settings { gap: 14px; }
  .set-nav a { padding: 10px 10px 11px; }
}
@media (max-width: 760px) {
  main { padding: 16px 16px 50px; }
  .page-head h1 { font-size: 21px; }
  .grid2 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .kpi { padding: 14px 14px 12px; }
  .kpi .v { font-size: 28px; }
  .form { grid-template-columns: 1fr; }
  .goods-hero { flex-direction: column; }
  .hero-photo { width: 100%; height: 180px; }
  .kv { grid-template-columns: 92px 1fr; }
  .mini-kpis { grid-template-columns: repeat(2, 1fr); }
  .tiles { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .tile-v { font-size: 19px; }
  .tile-ico { width: 28px; height: 28px; padding: 6px; }
  .sec-head { padding: 16px 16px 12px; }
  .sec-body, .toolbar, .checklist, .timeline { padding-left: 16px; padding-right: 16px; }
  .progress { margin-left: 16px; margin-right: 16px; }
  .sec-foot { padding: 12px 16px; }
  .search { width: 100%; }
  .add-person { margin: 0 16px 14px; }
  .add-person .inp, .pwd-form .inp { width: 100%; }
  .pwd-form { padding: 2px 16px 18px; }
  .pwd-form label { flex: 1 1 100%; }
  /* 人员表：手机上每人一张小卡片，不用左右滑 */
  .sec-card > .tw, .org-main > .tw { padding: 0; overflow: visible; }
  .org { grid-template-columns: minmax(0, 1fr); }
  .org-tree { border-right: 0; border-bottom: 1px solid var(--line); max-height: 240px; padding: 6px 10px; }
  .staff-table .c-dept { grid-area: dept; display: flex; align-items: center; }
  .inp.dept { width: 100%; }
  .staff-table thead { display: none; }
  .staff-table, .staff-table tbody { display: block; }
  .staff-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "person person" "dept role" "save save";
    align-items: center; gap: 10px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .staff-table td { display: block; padding: 0; border: 0; white-space: normal; }
  .staff-table .c-person { grid-area: person; }
  .staff-table .c-role { grid-area: role; }
  .role-seg { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .role-seg button { flex: none; }
  .staff-table .cap { display: inline; }
  .chat-table tr { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name open" "hook hook" "last last"; }
  .chat-table .c-hook { grid-area: hook; min-width: 0; }
  .chat-table .c-name { grid-area: name; }
  .chat-table .c-name .inp.ghost { min-width: 0; width: 100%; }
  .chat-table .c-last { grid-area: last; min-width: 0; }
  .chat-table .c-last .last-text { max-width: 100%; }
  .chat-table .c-open { grid-area: open; text-align: right; white-space: nowrap; }
  .opt { flex-wrap: wrap; padding: 14px 16px; gap: 10px 16px; }
  .opt .seg, select.inp.opt-sel { width: 100%; }
  .opt .seg button { flex: 1; padding: 7px 8px; }
  .callout { margin-left: 16px; margin-right: 16px; }
  .legend { padding-left: 16px; padding-right: 16px; }
  .now-bar { margin-left: 16px; margin-right: 16px; }
  .foot-tip { display: none; }
  .staff-table .c-seen { display: none; }
  .staff-table .c-save { grid-area: save; }
  .staff-table .c-save:empty { display: none; }
  .staff-table .c-save:not(:has(button)) { display: none; }
  .staff-table .c-save .btn { width: 100%; }
  .staff-table tr.unnamed { box-shadow: inset 3px 0 0 var(--amber); }
  .staff-table tr.unnamed td:first-child { box-shadow: none; }
  .staff-table .empty-row { grid-column: 1 / -1; }
  .person { min-width: 0; }
  .field input[type=date] { width: 118px; }
}
@media (max-width: 1100px) { .org .staff-table .c-seen, .org .staff-table:not(.chat-table) th:nth-child(4) { display: none; } }

.empty-note { padding: 6px 20px 20px; color: var(--muted); }
.chat-sub { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.chat-table td { vertical-align: top; }
.chat-table .c-hook { min-width: 220px; }
.chat-table .hook-on { display: flex; align-items: center; gap: 6px; }
.chat-table .hook-btns { display: flex; gap: 6px; margin-top: 6px; }
.chat-table .hook-add { display: flex; gap: 6px; }
.chat-table .hook-add .inp { min-width: 0; flex: 1; font-size: 12px; }
.chat-table .inp.ghost { min-width: 180px; }
.chat-table tr.unnamed .inp.ghost::placeholder { color: var(--warn, #c77700); }
.chat-table .last-text { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); margin-top: 2px; }

/* 包装层级编辑器：每行「1 件 = 120 个」，最后一行是最小单位 */
.form .full > .lbl { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.pack-ed { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--hover); }
.pack-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); }
.pack-row .inp.u { width: 72px; height: 30px; }
.pack-row .inp.n { width: 96px; height: 30px; }
.pack-row .b { min-width: 2em; }
.pack-row .btn { margin-left: auto; }
.btn.ghost-x { border-color: transparent; background: transparent; color: var(--faint); }
.btn.ghost-x:hover { color: var(--red-text); border-color: transparent; }
.pack-pv { font-size: 13px; padding-top: 6px; border-top: 1px dashed var(--line); }
.pack-pv b { font-weight: 600; color: var(--title); }
.pack-pv .warn { color: var(--amber-text); }
.inline .inp.unit { flex: 0 0 84px; }

.days-input { display: flex; align-items: center; gap: 6px; flex: none; }
.days-input .inp { width: 72px; text-align: right; }

/* 统计页：能点开的数字、排行、跟单员行 */
.kpi.go { cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.kpi.go:hover { border-color: var(--brand-line); box-shadow: 0 2px 8px rgba(22, 93, 255, .08); }
.rank li.go { cursor: pointer; border-radius: 4px; }
.rank li.go:hover .nm { color: var(--brand); }

/* 页面内二级标签（采购单状态 / 产品与货号） */
.sub-nav { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.sub-nav::-webkit-scrollbar { display: none; }
.sub-nav a { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 8px 12px 10px; margin-bottom: -1px;
  border-bottom: 2px solid transparent; color: var(--muted); font-size: 14px; white-space: nowrap; }
.sub-nav a:hover { color: var(--brand); }
.sub-nav a.on { color: var(--brand); font-weight: 500; border-bottom-color: var(--brand); }
.sub-nav a b { font-size: 12px; font-weight: 400; color: var(--faint); }
.sub-nav a.on b { color: var(--brand); }
.sub-nav a.late b { color: var(--red-text); font-weight: 500; }

/* 抽屉内标签页 */
.drawer-tabs { display: flex; gap: 4px; padding: 0 22px; border-bottom: 1px solid var(--border); background: #fafbfd; }
.drawer-tabs a { display: inline-flex; align-items: center; gap: 5px; padding: 9px 10px 10px; margin-bottom: -1px;
  border-bottom: 2px solid transparent; color: var(--muted); font-size: 13.5px; }
.drawer-tabs a:hover { color: var(--brand); }
.drawer-tabs a.on { color: var(--brand); font-weight: 500; border-bottom-color: var(--brand); }
.drawer-tabs a b { font-size: 12px; font-weight: 400; color: var(--faint); }
.drawer-tabs a.on b { color: var(--brand); }
.section-title.first { margin-top: 0; }

/* 提醒规则折叠 */
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head h3 { margin: 0; }
.rule-toggle { font-size: 13px; white-space: nowrap; user-select: none; }
.rule-toggle::after { content: " ▾"; font-size: 11px; }
.rule-toggle.open::after { content: " ▴"; }
.rule-list { margin: 0 0 14px; padding: 10px 14px 10px 28px; background: var(--hover); border: 1px solid var(--line-soft);
  border-radius: 6px; line-height: 1.8; color: var(--muted); font-size: 12.5px; }
.sku-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.sku-head h3 { margin: 0; }

/* 草稿行「确认」与抽屉修改原因 */
.btn.small.row-act { margin-left: 8px; height: 24px; padding: 0 10px; font-size: 12.5px; }
.drawer footer .inp.reason { flex: 1; min-width: 0; height: 32px; }

/* 提醒记录：没送达的原因直接写出来；筛选条贴着标题 */
.why { margin-top: 2px; white-space: normal; max-width: 280px; line-height: 1.5; }
.card > .bar.flush { margin-bottom: 12px; }

/* 建单时：老板确认时定的、后来被改了的 */
.orig-tag { margin-left: 6px; }
.orig-box { margin: 0 0 18px; padding: 10px 12px 8px; border: 1px solid #f3d9a4; background: var(--amber-soft); border-radius: 8px; }
.orig-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; color: var(--amber-text); }
.orig-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.orig-table th { text-align: left; font-weight: 500; color: var(--muted); padding: 4px 8px 4px 0; border-bottom: 1px solid #f0dcb4; }
.orig-table td { padding: 5px 8px 5px 0; vertical-align: top; }
.orig-table td.old { color: var(--muted); text-decoration: line-through; }
