:root {
  --bg: #f5f6f7;
  --panel: #ffffff;
  --ink: #1c1e21;
  --ink-2: #5b6169;
  --ink-3: #8d949e;
  --line: #e3e6ea;
  --line-2: #eef0f3;
  --brand: #2f6b4f;
  --brand-soft: #e8f1ec;
  --brand-ink: #24543e;
  --warn: #b8791a;
  --warn-soft: #fdf3e2;
  --danger: #b3402f;
  --danger-soft: #fbecea;
  --info: #2a5f8f;
  --info-soft: #eaf1f8;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .16);
  --mono: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }

/* ----------------------------- 登录页 ----------------------------- */
#login-view {
  min-height: 100%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(1200px 600px at 15% -10%, #e6efe9 0%, transparent 60%),
    radial-gradient(900px 500px at 95% 110%, #eef2f7 0%, transparent 55%),
    var(--bg);
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 30px 28px 24px;
  box-shadow: var(--shadow-lg);
}
.login-card .brand { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.login-card h1 { font-size: 20px; margin: 0; letter-spacing: .3px; }
.login-card .sub { color: var(--ink-3); font-size: 13px; margin: 0 0 22px; }
.bean-logo {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, #3f7f60, #24543e);
  display: grid; place-items: center; color: #fff; font-size: 16px; flex: none;
}
/* 2026-10-21 老杨要求：登录页密码框旁边加「显示密码」按钮。
   做法：输入框和按钮套一层 relative 容器，按钮绝对定位贴在框右边里面。
   ⚠️ 只影响登录页那个密码框，别乱用 .pwd-wrap 到别处。 */
.pwd-wrap { position: relative; }
.pwd-wrap input { padding-right: 84px; }
.pwd-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; padding: 4px 6px; cursor: pointer;
  font-size: 12.5px; color: var(--ink-2); font-family: inherit;
  border-radius: 6px; line-height: 1;
}
.pwd-toggle:hover { color: var(--brand); background: var(--brand-soft); }

.login-card .hint {  margin-top: 16px; padding: 10px 12px; background: var(--brand-soft);
  border-radius: 8px; font-size: 12px; color: var(--brand-ink); line-height: 1.7;
}

/* 登录页底部那行小链接（申请账号） */
.login-extra {
  margin-top: 16px; padding-top: 13px;
  border-top: 1px solid var(--line-2); text-align: center;
}
.link-btn {
  background: none; border: 0; padding: 4px 8px; cursor: pointer;
  color: var(--brand); font-size: 13px;
  text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover { color: var(--brand-ink); }

/* ----------------------------- 布局 ----------------------------- */
#app-view { display: flex; min-height: 100vh; }
#sidebar {
  width: 208px; flex: none; background: #1f2a24; color: #cfd8d3;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
#sidebar .logo {
  padding: 16px 16px 14px; display: flex; gap: 9px; align-items: center;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
#sidebar .logo b { color: #fff; font-size: 14px; font-weight: 600; letter-spacing: .2px; }
#sidebar .logo span { display: block; font-size: 11px; color: #8ba295; }
#sidebar nav { padding: 8px 8px; overflow-y: auto; flex: 1; }
#sidebar nav .group {
  font-size: 11px; color: #7d9188; padding: 12px 10px 5px; letter-spacing: .6px;
}
#sidebar nav a {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 7px;
  color: #cfd8d3; font-size: 13.5px; text-decoration: none; margin-bottom: 1px;
}
#sidebar nav a:hover { background: rgba(255,255,255,.07); text-decoration: none; }
#sidebar nav a.active { background: var(--brand); color: #fff; font-weight: 500; }
#sidebar nav a .ic { width: 16px; text-align: center; opacity: .9; }
#sidebar .who {
  padding: 11px 14px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12px; color: #9db1a7;
}
#sidebar .who b { color: #fff; display: block; font-size: 13px; font-weight: 500; }
#sidebar .who button {
  margin-top: 8px; width: 100%; background: rgba(255,255,255,.08); color: #dfe7e2;
  border: 0; border-radius: 6px; padding: 5px; cursor: pointer; font-size: 12px;
}
#sidebar .who button:hover { background: rgba(255,255,255,.16); }

#main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#topbar {
  height: 52px; flex: none; background: var(--panel); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; padding: 0 20px; position: sticky; top: 0; z-index: 20;
}
#topbar h2 { margin: 0; font-size: 15.5px; font-weight: 600; }
#topbar .spacer { flex: 1; }

/* ------------------- 顶部横向导航（仓库日常操作） ------------------- */
/* 老杨要求：把仓库那一组从左侧栏拿出来，横排在页面顶部、居中。 */
#topnav {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
  padding: 6px 20px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 52px;              /* 正好贴在顶栏底下 */
  z-index: 15;
}
#topnav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  font-size: 13.5px;
  color: var(--ink-2);
  text-decoration: none;
  border-radius: 7px;
  white-space: nowrap;
  transition: background .12s, color .12s;
}
/* 鼠标路过：极浅的灰，一眼看出是「路过」不是「选中」 */
#topnav a:hover { background: var(--line-2); color: var(--brand-ink); text-decoration: none; }
/* 当前所在页：深绿底 + 白字 + 底下一条暗线，绝不会跟「路过」混淆 */
#topnav a.active {
  background: var(--brand);
  color: #fff;
  font-weight: 500;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18);
}
#topnav a .ic { opacity: .85; }

/* 屏幕窄的时候，横条改成可横向滑动，不换行 */
@media (max-width: 1100px) {
  #topnav {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  #topnav::-webkit-scrollbar { height: 4px; }
  #topnav::-webkit-scrollbar-thumb { background: var(--line); border-radius: 2px; }
}

#content { padding: 18px 20px 60px; max-width: 1500px; width: 100%; }

/* ----------------------------- 组件 ----------------------------- */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 16px;
}
.card > header {
  padding: 12px 16px; border-bottom: 1px solid var(--line-2);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.card > header h3 { margin: 0; font-size: 14px; font-weight: 600; }
.card > header .spacer { flex: 1; }
.card > .body { padding: 16px; }
.card > .body.tight { padding: 0; }

.grid { display: grid; gap: 14px; }
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.c3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.c4 { grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); }

.stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow);
}
.stat .k { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 5px; }
.stat .v { font-size: 23px; font-weight: 600; margin-top: 5px; letter-spacing: -.3px; }
.stat .v small { font-size: 12px; font-weight: 400; color: var(--ink-3); margin-left: 3px; }
.stat .x { font-size: 12px; color: var(--ink-2); margin-top: 3px; }
.stat.accent { border-left: 3px solid var(--brand); }
.stat.warn { border-left: 3px solid var(--warn); background: var(--warn-soft); }
.stat.danger { border-left: 3px solid var(--danger); background: var(--danger-soft); }

.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  background: var(--panel); border: 1px solid var(--line); color: var(--ink);
  padding: 6px 12px; border-radius: 7px; cursor: pointer; font-size: 13px;
  transition: background .12s, border-color .12s; white-space: nowrap;
}
.btn:hover { background: #f7f8f9; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 500; }
.btn.primary:hover { background: var(--brand-ink); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger:hover { filter: brightness(.94); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--line-2); }
.btn.sm { padding: 3px 9px; font-size: 12px; border-radius: 6px; }
.btn.lg { padding: 9px 18px; font-size: 14px; }

label.f { display: block; margin-bottom: 12px; }
label.f > span { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 4px; }
label.f > span .req { color: var(--danger); margin-left: 2px; }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=search],
select, textarea {
  width: 100%; padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px;
  background: #fff; outline: none; transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47,107,79,.12);
}
input[disabled], select[disabled] { background: #f6f7f8; color: var(--ink-2); }
textarea { resize: vertical; min-height: 62px; }
.hint-text { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
thead th {
  background: #fafbfc; font-weight: 600; font-size: 12px; color: var(--ink-2);
  position: sticky; top: 0; z-index: 1; white-space: nowrap;
}
tbody tr:hover { background: #fafbfc; }
tbody tr.clickable { cursor: pointer; }
/* 收购列表：换了一户就画条粗线，好认出哪几条是一家的（老杨要求） */
tbody tr.group-start > td { border-top: 2px solid var(--line); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.mono { font-family: var(--mono); font-size: 12px; }
tfoot td { font-weight: 600; background: #fafbfc; border-top: 2px solid var(--line); }
.table-wrap { overflow: auto; max-height: 70vh; }
.empty { padding: 34px 16px; text-align: center; color: var(--ink-3); font-size: 13px; }
.empty .big { font-size: 26px; display: block; margin-bottom: 8px; opacity: .5; }

.tag {
  display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 11.5px;
  background: var(--line-2); color: var(--ink-2); white-space: nowrap;
}
.tag.green { background: var(--brand-soft); color: var(--brand-ink); }
.tag.amber { background: var(--warn-soft); color: var(--warn); }
.tag.red { background: var(--danger-soft); color: var(--danger); }
.tag.blue { background: var(--info-soft); color: var(--info); }
.tag.gray { background: #f0f2f4; color: var(--ink-3); }

.toolbar {
  display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; box-shadow: var(--shadow);
}
.toolbar label.f { margin-bottom: 0; min-width: 132px; }
.toolbar .grow { flex: 1; min-width: 160px; }
.toolbar .spacer { flex: 1; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 0; }
.tabs button {
  background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 14px;
  cursor: pointer; color: var(--ink-2); font-size: 13.5px;
}
.tabs button.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 500; }
.tabs button:hover { color: var(--ink); }

/* 页签行右边挂的东西（比如鲜果收购页的「选农户」下拉）
   2026-10-21 老杨要求把下拉放到「按农户汇总」后面，跟页签排同一行。
   ⚠️ 别改 .tabs 本身 —— 十几个页面都在用它。只加这几个类。 */
.tabs .tabs-right { margin-left: auto; display: flex; align-items: center; gap: 8px; padding: 0 4px 4px; }
.tabs .tabs-right .tabs-label { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.tabs .tabs-right select { min-width: 220px; padding: 5px 8px; font-size: 13px; }

/* 单据行编辑 */
.lines-table input, .lines-table select { padding: 4px 7px; font-size: 12.5px; }
.lines-table td { padding: 5px 6px; }
.line-remove { color: var(--danger); cursor: pointer; background: none; border: 0; font-size: 15px; padding: 0 4px; }
.line-remove:hover { background: var(--danger-soft); border-radius: 5px; }

/* 弹窗 */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(20,26,23,.45); z-index: 100;
  display: grid; place-items: center; padding: 20px; overflow: auto;
  backdrop-filter: blur(2px);
}
.modal {
  background: var(--panel); border-radius: 12px; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 640px; max-height: 90vh; display: flex; flex-direction: column;
}
.modal.wide { max-width: 940px; }
.modal.narrow { max-width: 420px; }
.modal > header {
  padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px;
}
.modal > header h3 { margin: 0; font-size: 15px; }
.modal > header .spacer { flex: 1; }
.modal > header .x { background: none; border: 0; font-size: 19px; cursor: pointer; color: var(--ink-3); line-height: 1; }
.modal > .body { padding: 18px; overflow: auto; }
.modal > footer {
  padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px;
  justify-content: flex-end; background: #fafbfc; border-radius: 0 0 12px 12px;
}
.form-grid { display: grid; gap: 0 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
fieldset {
  border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px 2px; margin: 0 0 14px;
}
fieldset legend { font-size: 12px; color: var(--ink-2); padding: 0 6px; font-weight: 600; }

/* 提示 */
#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: #232b27; color: #f1f4f2; padding: 10px 14px; border-radius: 8px; font-size: 13px;
  box-shadow: var(--shadow-lg); max-width: 420px; animation: slideIn .16s ease-out; line-height: 1.5;
}
.toast.ok { background: #24634a; }
.toast.err { background: #8f3423; }
.toast.warn { background: #8a5c14; }
@keyframes slideIn { from { opacity: 0; transform: translateY(8px); } }

.banner {
  padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 14px;
  display: flex; gap: 8px; align-items: flex-start;
}
.banner.info { background: var(--info-soft); color: var(--info); }
.banner.warn { background: var(--warn-soft); color: var(--warn); }
.banner.err { background: var(--danger-soft); color: var(--danger); }
.banner.ok { background: var(--brand-soft); color: var(--brand-ink); }

.spinner {
  width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.kv { display: grid; grid-template-columns: 96px 1fr; gap: 5px 10px; font-size: 13px; }
.kv dt { color: var(--ink-3); font-size: 12px; }
.kv dd { margin: 0; word-break: break-word; }

/* 时间轴 */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 1px; background: var(--line); }
.timeline .item { position: relative; padding: 7px 0 9px; }
.timeline .item::before {
  content: ''; position: absolute; left: -20px; top: 13px; width: 9px; height: 9px;
  border-radius: 50%; background: #fff; border: 2px solid var(--ink-3);
}
.timeline .item.in::before { border-color: var(--brand); background: var(--brand); }
.timeline .item.out::before { border-color: var(--danger); }
.timeline .head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 13px; }
.timeline .meta { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }

.bar { height: 7px; background: var(--line-2); border-radius: 4px; overflow: hidden; min-width: 60px; }
.bar > i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.bar.low > i { background: var(--danger); }
.bar.mid > i { background: var(--warn); }

.chart { width: 100%; height: 190px; display: block; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink-2); margin-top: 6px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }

.row-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.muted { color: var(--ink-3); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.mt { margin-top: 14px; }
.mb0 { margin-bottom: 0; }
.strong { font-weight: 600; }

@media (max-width: 860px) {
  #sidebar { position: fixed; z-index: 60; transform: translateX(-100%); transition: transform .2s; }
  #sidebar.open { transform: none; }
  #content { padding: 14px 12px 60px; }
  .form-grid { grid-template-columns: 1fr; }
  #topbar { padding: 0 12px; }
}

@media print {
  #sidebar, #topbar, .toolbar, .row-actions, .btn { display: none !important; }
  #content { padding: 0; }
  .card { box-shadow: none; border-color: #ccc; break-inside: avoid; }
}

/* ============================================================
   包装成品 · 产品卡片（照设计样品 07-包装成品.html 的样式抄的）
   ============================================================ */
.crow { border-top: 1px solid var(--line); padding: 10px 0 4px; }
.crow:first-of-type { border-top: none; }
.crow-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 12px 2px; }
.crow-name { font-size: 14.5px; font-weight: 700; }
.crow-sub { font-size: 12px; color: var(--muted); }
.cprods { display: flex; gap: 12px; overflow-x: auto; padding: 12px; align-items: stretch; }
.pc {
  flex: none; width: 180px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); display: flex; flex-direction: column; padding-bottom: 10px;
}
.pc .pimg { background: #f1f5f9; border-radius: 10px 10px 0 0; overflow: hidden; }
.pc .pimg img { display: block; width: 100%; height: 110px; object-fit: cover; }
.pc .pimg .noimg {
  display: grid; place-items: center; height: 110px;
  font-size: 11.5px; color: #94a3b8;
}
.pc .bname { font-size: 13.5px; font-weight: 600; padding: 8px 10px 0; line-height: 1.35; }
.pc .pnums { display: grid; gap: 4px; padding: 8px 10px 0; margin-top: auto; }
.pc .pn { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.pc .pn span { width: 34px; color: var(--muted); flex: none; }
.pc .pn input {
  width: 100%; padding: 3px 6px; font-size: 12px;
  border: 1px solid var(--line); border-radius: 6px;
}
.pc .pown { display: grid; gap: 3px; padding: 8px 10px 0; margin-top: auto; }
.pc .bqty { font-size: 12.5px; font-weight: 600; padding-top: 6px; }
.pc .bprice { font-size: 12.5px; font-weight: 600; padding-top: 2px; color: var(--brand, #0f766e); }
.pc .row-actions { padding: 8px 10px 0; display: flex; gap: 6px; }
/* 视角切换：内部看 / 给客户看 */
.view-switch { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; }
.view-switch .vs-label { font-size: 13px; font-weight: 600; }
.view-switch button {
  padding: 6px 14px; font-size: 13px; border: 1px solid var(--line);
  border-radius: 999px; background: #fff; cursor: pointer;
}
.view-switch button.on { background: var(--brand, #0f766e); color: #fff; border-color: var(--brand, #0f766e); }
body[data-view="client"] .only-internal { display: none !important; }
body[data-view="internal"] .only-client { display: none !important; }

/* ==========================================================================
   总览页：顶部品牌介绍带（照设计样品 02-总览.html 抄，样式取自 样板样式.css）
   ========================================================================== */
#brand-band {
  padding: 0 20px;
  width: 100%; max-width: 1500px;
}
.brand-band {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 16px;
  margin-top: 18px;
  display: flex; align-items: center; gap: 12px;
}
.brand-band .bb-photo {
  width: 48px; height: 48px; flex: none; border-radius: 8px; object-fit: cover;
  background: var(--brand-soft); display: grid; place-items: center;
  color: var(--brand-ink); font-size: 26px;
}
.brand-band .bb-main   { flex: 1; min-width: 0; }
.brand-band .bb-name   { font-size: 15.5px; font-weight: 600; }
.brand-band .bb-slogan { font-size: 14px; color: var(--ink-2); margin-top: 2px;
                         overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-band .bb-toggle { flex: none; }

/* 收起态：一行，48 高 */
.brand-band.collapsed { padding: 6px 16px; gap: 10px; }
.brand-band.collapsed .bb-main   { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.brand-band.collapsed .bb-photo  { width: 34px; height: 34px; font-size: 20px; }
.brand-band.collapsed .bb-slogan { min-width: 0; white-space: nowrap; overflow: hidden;
                                   text-overflow: ellipsis; display: block; }

@media (max-width: 860px) {
  #brand-band { padding: 0 12px; }
  .brand-band { padding: 12px; gap: 12px; }
  .brand-band .bb-photo { width: 44px; height: 44px; }
  .brand-band:not(.collapsed) .bb-slogan {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
    overflow: hidden; white-space: normal;
  }
  .brand-band.collapsed { padding: 6px 12px; }
  .brand-band .bb-toggle { position: relative; }
  .brand-band .bb-toggle::after { content: ''; position: absolute; inset: -7px -10px; }
}

@media print { #brand-band { display: none !important; } }

/* ==========================================================================
   设计样品里的通用小零件（照 样板样式.css 搬，三类）
   ① .fixed-badge：卡头/筛选项旁边的绿色小标，写"这一轮新加的什么"
   ② .table-hint：表格右上角「手机上只留几列 ｜ 左右能滑」，窄屏才显示
   ③ .fixed-note：一整行的绿色说明条
   ========================================================================== */
.fixed-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--brand-soft); color: var(--brand-ink);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 1px 9px; font-size: 11.5px; line-height: 1.8; font-weight: 400;
  white-space: normal;
}
.table-hint { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
@media (min-width: 861px) {
  /* 宽屏不需要提示"左右能滑"——跟设计样品一样只在手机屏露出来 */
  .table-hint.only-narrow { display: none; }
}
.fixed-note {
  display: block; margin: 0 0 12px;
  background: var(--brand-soft); color: var(--brand-ink);
  border: 1px solid var(--line); border-left: 3px solid var(--brand);
  border-radius: 8px; padding: 8px 12px; font-size: 12px; line-height: 1.7;
}
.fixed-note b { color: var(--brand-ink); }
@media (max-width: 860px) {
  .fixed-note { font-size: 11.5px; padding: 6px 10px; margin-bottom: 10px; }
}

/* 包装数量一行：［计量自己填］×［数量］［单位下拉］（设计样品 06-烘焙.html） */
.pu-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pu-row select { width: auto; min-width: 96px; }
.pu-row input { width: 96px; }
.pu-x { color: var(--ink-3); }

/* 草稿预览的格子（长得像填好的表单，点不动）—— 设计样品「✨ AI 变成的单子」那块 */
.draft-grid { display: grid; gap: 0 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.draft-sub { grid-column: 1 / -1; font-size: 12px; color: var(--ink-2); font-weight: 600; margin: 4px 0 8px; }
.draft-field { display: block; margin-bottom: 12px; }
.draft-field > .dk { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 4px; }
.draft-field > .dv {
  padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px;
  background: #fff; font-size: 14px; line-height: 1.5; word-break: break-word;
}
.draft-field.auto > .dv { background: #f6f7f8; color: var(--ink-3); }
.draft-field.guess > .dv {
  background: var(--warn-soft); border-color: var(--warn); color: var(--warn); font-weight: 600;
}
.draft-field.guess > .hint-text { color: var(--warn); }
.draft-field.missing > .dv {
  background: #fafbfc; border-style: dashed; border-color: var(--line); color: var(--ink-3);
}
.draft-field.empty > .dv { color: var(--ink-3); }

/* 翻页（设计样品 07-包装成品.html 底部：一页 8 个 / 1 2 3 / 第 1 / 6 页） */
.pager {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2);
}
.pager .spacer { flex: 1; }
.btn.on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ==========================================================================
   右下角常驻 🎤 圆钮 + 点开的说一句面板（设计样品：除了智能体/总览/库存查询/登录日志，每页都有）
   ========================================================================== */
.mic-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 70;
  display: flex; align-items: center; gap: 6px;
  height: 48px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--brand); background: var(--brand); color: #fff;
  font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-lg);
}
.mic-fab:hover { background: var(--brand-ink); }
.mic-fab .mf-ic { font-size: 17px; line-height: 1; }

.mic-panel {
  position: fixed; right: 20px; bottom: 80px; z-index: 71;
  width: 400px; max-width: calc(100vw - 24px);
  max-height: calc(100vh - 110px); overflow: auto;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-lg);
}
.mic-panel[hidden] { display: none !important; }
.mic-panel > header {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 14px; border-bottom: 1px solid var(--line-2);
}
.mic-panel > header b { font-size: 13.5px; }
.mic-panel > header .spacer { flex: 1; }
.mic-panel > .body { padding: 12px 14px; }
.mic-panel textarea { min-height: 68px; }

.voice-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.btn.hold {
  min-height: 44px; padding: 10px 20px; font-size: 15.5px; font-weight: 500;
  background: var(--brand); border-color: var(--brand); color: #fff;
}
.btn.hold:hover { background: var(--brand-ink); }
.btn.hold.pressing { background: var(--danger); border-color: var(--danger); color: #fff; }
.link-btn {
  background: none; border: 0; color: var(--ink-3); font-size: 12px;
  cursor: pointer; padding: 2px 4px;
}
.link-btn:hover { color: var(--ink-2); }

.recog {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--brand-soft); color: var(--brand-ink);
  border-radius: 8px; padding: 10px 12px; font-size: 14px;
}
.recog-type {
  background: #fff; border-radius: 999px; padding: 2px 12px;
  font-weight: 600; font-size: 15px;
}
.recog.unsure { background: var(--warn-soft); color: var(--warn); }
.recog .btn { font-size: 13px; font-weight: 400; }

@media (max-width: 860px) {
  .mic-fab { right: 14px; bottom: 16px; height: 46px; width: 46px; padding: 0; justify-content: center; border-radius: 50%; }
  .mic-fab .mf-t { display: none; }
  .mic-panel {
    left: 0; right: 0; bottom: 0; width: auto; max-width: none;
    max-height: 72vh; border-radius: 16px 16px 0 0;
  }
  body.has-mic #content { padding-bottom: 78px; }
  body.has-mic .row-actions { padding-right: 56px; }
  .voice-actions { flex-direction: column; align-items: stretch; gap: 8px; }
  .voice-actions .btn { width: 100%; min-height: 52px; }
  .mic-panel textarea { min-height: 96px; font-size: 16px; }
}

/* 报表页的横条图（设计样品 14-报表统计.html 的「月度入库/月度出库」） */
.rp-bar-row { display: flex; align-items: center; gap: 10px; padding: 3px 0; font-size: 12.5px; }
.rp-bar-row .lb { width: 62px; flex: none; color: var(--ink-2); }
.rp-bar-row .rpb { flex: 1; height: 14px; background: #f0f2f4; border-radius: 4px; overflow: hidden; }
.rp-bar-row .rpb > i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.rp-bar-row .vv { width: 56px; flex: none; text-align: right; font-variant-numeric: tabular-nums; }
