:root {
  color-scheme: light;
  --bg: #f7f9fa;
  --bg-soft: #f3f6f5;
  --surface: #ffffff;
  --surface-subtle: #fbfcfd;
  --text: #111827;
  --text-2: #374151;
  --muted: #6b7280;
  --faint: #9ca3af;
  --border: #d9dfe7;
  --line: #e8ecf1;
  --green: #168a45;
  --green-strong: #0f7a3d;
  --green-soft: #eaf6ef;
  --amber: #d97706;
  --amber-soft: #fff4df;
  --red: #dc2626;
  --red-soft: #fff1f2;
  --blue: #1267a8;
  --blue-soft: #eaf4ff;
  --radius: 8px;
  --radius-sm: 6px;
  --touch: 48px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--bg);
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
}

body,
button,
input,
select,
textarea {
  font-family: var(--font);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--green);
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

p {
  line-height: 1.55;
}

svg {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

button,
.button {
  min-height: 40px;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 0 14px;
  background: var(--green);
  color: #fff;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}

button:disabled,
.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.button.secondary,
.secondary-button,
.ghost-button {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
}

.danger-button {
  width: 100%;
  min-height: 52px;
  background: var(--red);
  color: #fff;
}

.full-width-button {
  width: 100%;
}

.icon-button {
  width: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 20px;
}

.icon-link {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: flex-start;
  color: var(--text);
  font-size: 40px;
  line-height: 1;
}

.top-text-link,
.danger-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 16px;
}

.danger-link {
  color: var(--red);
}

.scrap-entry-button {
  min-height: 36px;
  border: 1px solid #f2b4bd;
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(255, 241, 242, 0.72);
  color: #b91c1c;
  font-size: 14px;
  font-weight: 650;
}

.scrap-entry-button:active {
  background: var(--red-soft);
}

.page-shell {
  width: min(960px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  place-items: center;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
  background: var(--bg);
}

.auth-card {
  width: min(100%, 340px);
  display: grid;
  gap: 28px;
}

.auth-card h1 {
  text-align: center;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: 0;
}

.auth-card > p {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.auth-form {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.auth-card-compact .auth-form {
  gap: 16px;
}

.auth-form label,
.stack-form label {
  display: grid;
  gap: 8px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
}

.auth-form input,
.stack-form input,
.form-control {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
}

.auth-form input:focus,
.form-control:focus,
.mobile-form input:focus,
.mobile-form select:focus,
.mobile-form textarea:focus,
.mobile-search input:focus {
  border-color: #9bcdb5;
  outline: 3px solid rgba(22, 138, 69, 0.13);
}

.auth-form button {
  min-height: 52px;
  font-size: 17px;
}

.errorlist {
  margin: 0;
  padding-left: 18px;
  color: var(--red);
  line-height: 1.6;
}

.mobile-shell {
  width: 100%;
  min-height: 100vh;
  background: var(--bg);
}

.mobile-page,
.scan-app {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 18px calc(86px + env(safe-area-inset-bottom));
  background: var(--bg);
}

.mobile-page-header {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 58px;
  align-items: center;
  min-height: 58px;
  margin-bottom: 16px;
}

.mobile-page-header h1 {
  min-width: 0;
  text-align: center;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: 0;
}

.header-side {
  min-width: 0;
}

.header-side-right {
  display: flex;
  justify-content: flex-end;
}

.scan-page-header {
  grid-template-columns: 88px minmax(0, 1fr) 88px;
  margin-bottom: 14px;
}

.scan-header-tools {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 4px;
}

.scan-header-tools .icon-link {
  width: 40px;
  height: 40px;
}

.scan-tool-menu {
  display: block;
}

.scan-tool-menu-trigger {
  width: 38px;
  min-height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  padding: 0;
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  list-style: none;
}

.scan-tool-menu-trigger:focus,
.manual-entry.scan-menu-option > summary:focus {
  outline: none;
}

.scan-tool-menu-trigger:focus-visible,
.manual-entry.scan-menu-option > summary:focus-visible {
  outline: 3px solid rgba(22, 138, 69, 0.18);
  outline-offset: 2px;
}

.scan-tool-menu-trigger::-webkit-details-marker {
  display: none;
}

.scan-tool-menu-trigger svg {
  width: 20px;
  height: 20px;
  opacity: 0.72;
}

.scan-tool-menu[open] .scan-tool-menu-trigger {
  border-color: #a8d4bc;
  background: var(--green-soft);
  color: var(--green);
}

.scan-tool-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: min(286px, calc(100vw - 28px));
  display: grid;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--surface);
  box-shadow: 0 18px 38px rgba(17, 24, 39, 0.16);
}

.scan-tool-menu:not([open]) > .scan-tool-menu-panel {
  display: none;
}

.scan-menu-option {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: var(--surface-subtle);
}

.manual-entry.scan-menu-option {
  display: block;
  color: var(--text-2);
}

.manual-entry.scan-menu-option > summary {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 650;
  list-style: none;
}

.manual-entry.scan-menu-option > summary::-webkit-details-marker {
  display: none;
}

.manual-entry.scan-menu-option > summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.52;
}

.manual-entry.scan-menu-option[open] > summary::after {
  transform: rotate(225deg);
}

.mobile-messages {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.mobile-message {
  border: 1px solid #a8d4bc;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: var(--green-soft);
  color: var(--green-strong);
  font-size: 14px;
}

.mobile-message-error,
.message-error {
  border-color: #f2b4bd;
  background: var(--red-soft);
  color: var(--red);
}

.mobile-tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 20;
  width: min(100%, 430px);
  min-height: calc(66px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-bottom: env(safe-area-inset-bottom);
  transform: translateX(-50%);
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.mobile-tabbar-admin {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.mobile-tabbar a {
  display: grid;
  gap: 3px;
  place-items: center;
  padding: 7px 2px 6px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.mobile-tabbar svg {
  width: 26px;
  height: 26px;
  stroke-width: 1.8;
}

.mobile-tabbar a.is-active {
  color: var(--green);
  font-weight: 650;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-subtle);
}

.segmented-control button {
  min-height: 46px;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 17px;
}

.segmented-control button.is-active {
  background: var(--surface);
  color: var(--green);
  box-shadow: inset 0 0 0 1px rgba(22, 138, 69, 0.13);
}

.camera-panel {
  position: relative;
  overflow: hidden;
  min-height: 270px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #111827;
  cursor: pointer;
  touch-action: manipulation;
}

.camera-panel:focus-visible {
  outline: 3px solid rgba(22, 138, 69, 0.22);
  outline-offset: 3px;
}

.scan-video {
  width: 100%;
  height: 270px;
  display: block;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.camera-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: rgba(17, 24, 39, 0.14);
}

.scan-frame {
  width: min(64vw, 236px);
  aspect-ratio: 1;
  border: 2px solid #b8f4c8;
  border-radius: var(--radius);
  box-shadow: 0 0 0 999px rgba(17, 24, 39, 0.22);
}

.flash-toggle {
  position: absolute;
  right: 14px;
  bottom: 48px;
  z-index: 2;
  width: 48px;
  min-height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.34);
  color: #fff;
  padding: 0;
  opacity: 0.5;
}

.flash-toggle svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
  stroke: none;
  opacity: 0.7;
}

.flash-toggle.is-active {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.9);
  color: #d97706;
  opacity: 0.82;
}

.camera-status {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  min-height: 30px;
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  background: rgba(17, 24, 39, 0.72);
  color: #fff;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.camera-status:empty {
  display: none;
}

.camera-panel.is-detected .scan-frame,
.camera-panel.is-scanning .scan-frame {
  border-color: #fff;
}

.return-context,
.scan-feedback,
.flow-panel,
.recent-panel,
.mobile-panel,
.profile-summary,
.search-result-card,
.in-use-card,
.notice-card,
.detail-hero {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.return-context {
  display: grid;
  gap: 0;
  margin-top: 12px;
  overflow: hidden;
  border-color: #9fcdb2;
  background: var(--green-soft);
}

.return-location,
.return-reagent {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 14px;
}

.return-reagent {
  border-top: 1px solid #badbc8;
  background: rgba(255, 255, 255, 0.38);
}

.return-reagent[hidden] {
  display: none;
}

.context-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
}

#target-location,
#pending-return-reagent {
  display: block;
  overflow-wrap: anywhere;
  font-size: 17px;
}

#pending-return-origin {
  display: block;
  margin-top: 4px;
  color: var(--green-strong);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.return-context > .switch-row {
  border-top: 1px solid #badbc8;
  border-bottom: 1px solid #badbc8;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.45);
}

.return-context p {
  padding: 9px 14px;
  color: var(--green-strong);
  font-size: 14px;
  text-align: center;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-2);
  font-size: 15px;
}

.switch-row input[type="checkbox"] {
  flex: 0 0 auto;
  width: 50px;
  height: 30px;
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #d1d5db;
  position: relative;
  transition: background 160ms ease;
}

.switch-row input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: transform 160ms ease;
}

.switch-row input[type="checkbox"]:checked {
  background: var(--green);
}

.switch-row input[type="checkbox"]:checked::after {
  transform: translateX(20px);
}

.switch-row-field {
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  background: var(--surface-subtle);
}

/* 表单内的开关行：恢复“文字在左、开关在右”的横排（覆盖 .mobile-form label 的纵向网格） */
.mobile-form .switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* 表单里的开关仍是 50×30 的胶囊，不要被 .mobile-form input 的 min-height/padding 拉高 */
.mobile-form .switch-row input[type="checkbox"] {
  min-height: 0;
  height: 30px;
  padding: 0;
}

/* 选项胶囊在表单内也保持 inline-flex，避免被 .mobile-form label 改成 grid
   导致两行内容（位置组名称+储存条件）超出 min-height 被裁切 */
.mobile-form .choice-pill {
  display: inline-flex;
}

.scan-feedback {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  padding: 12px 14px;
}

.scan-feedback span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 13px;
}

.scan-feedback .scan-feedback-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  margin: -1px;
  padding: 0;
  border: 0;
  white-space: nowrap;
}

.scan-feedback strong {
  display: block;
  color: var(--text);
  font-size: 16px;
  line-height: 1.45;
}

.scan-feedback[data-severity="success"] {
  border-color: #a8d4bc;
  background: var(--green-soft);
}

.scan-feedback[data-severity="warning"] {
  border-color: #f3cc86;
  background: var(--amber-soft);
}

.scan-feedback[data-severity="error"] {
  border-color: #f2b4bd;
  background: var(--red-soft);
}

.scan-feedback.is-flashing {
  animation: scan-feedback-flash 360ms ease-out;
}

@keyframes scan-feedback-flash {
  0% {
    transform: translateY(-2px);
  }

  100% {
    transform: translateY(0);
  }
}

.ghost-button {
  min-height: 36px;
  padding: 0 12px;
  white-space: nowrap;
}

.manual-entry {
  color: var(--muted);
}

.manual-entry:not([open]) > .manual-form {
  display: none;
}

.manual-entry summary {
  min-height: 32px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
}

.manual-form {
  display: grid;
  gap: 8px;
  padding-top: 8px;
}

.manual-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.manual-row input,
.mobile-form input,
.mobile-form select,
.mobile-form textarea,
.mobile-search input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
}

.mobile-form input[type="date"] {
  min-width: 0;
  max-width: 100%;
  appearance: none;
  -webkit-appearance: none;
  color-scheme: light;
  line-height: 1.35;
}

.mobile-form input[type="date"]::-webkit-date-and-time-value {
  min-height: 24px;
  text-align: left;
}

.flow-panel,
.recent-panel,
.mobile-panel {
  display: grid;
  gap: 14px;
  margin-top: 12px;
  padding: 14px;
}

.flow-panel[hidden],
.return-context[hidden],
.mobile-form[hidden] {
  display: none;
}

.slot-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.slot-row {
  min-height: 54px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: var(--surface-subtle);
}

.slot-row + .slot-row {
  border-top: 1px solid var(--line);
}

.slot-row span {
  color: var(--text-2);
  font-weight: 650;
}

.slot-row strong {
  color: var(--green);
  font-size: 16px;
  text-align: right;
  overflow-wrap: anywhere;
}

.state-note,
.muted-note {
  color: var(--muted);
  font-size: 14px;
}

.mobile-form {
  display: grid;
  gap: 14px;
}

.mobile-form label {
  display: grid;
  gap: 8px;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 650;
}

.mobile-form textarea {
  min-height: 74px;
  resize: vertical;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.choice-field {
  display: grid;
  gap: 9px;
}

.choice-field > span {
  color: var(--text-2);
  font-size: 15px;
  font-weight: 650;
}

.choice-field-compact {
  align-content: start;
}

.quick-spec-row,
.choice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice-grid-five,
.choice-grid-four,
.check-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice-grid-location {
  display: grid;
  grid-template-columns: 1fr;
}

/* 位置组列表：最多约四条高度，超出可滚动查看，避免占满整屏 */
.location-group-scroll {
  max-height: 222px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2px;
  margin: -2px;
}

/* 带图标的选项网格：固定三列，窄屏也不塌成一列 */
.choice-grid-icon {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.choice-pill,
.choice-button {
  position: relative;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-2);
  font-size: 16px;
  font-weight: 550;
  cursor: pointer;
  overflow: hidden;
}

.choice-button {
  padding: 0 14px;
}

.choice-pill input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.choice-pill span {
  min-width: 58px;
  padding: 10px 12px;
  text-align: center;
}

/* 图标选项：图标在上、文字在下的小卡片 */
.choice-pill-icon span {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  gap: 5px;
  padding: 10px 6px;
}

.choice-pill-icon em {
  font-style: normal;
  font-size: 13.5px;
  line-height: 1.1;
}

.choice-ico {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 规格：手动输入区与“手动输入”按钮 */
.spec-manual {
  display: grid;
  gap: 12px;
  margin-top: 2px;
}

.spec-manual[hidden],
.field-block[hidden] {
  display: none;
}

.field-block {
  display: grid;
  gap: 6px;
}

.choice-button-ghost {
  border-style: dashed;
  color: var(--green-strong);
}

.choice-pill-stack {
  width: 100%;
  justify-content: stretch;
}

.choice-pill-stack span {
  width: 100%;
  display: grid;
  gap: 2px;
  justify-items: start;
  text-align: left;
}

.choice-pill-stack small {
  color: currentColor;
  font-size: 12px;
  opacity: 0.72;
}

.choice-pill:has(input:checked) {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.choice-pill:has(input:checked) span,
.choice-pill:has(input:checked) span small {
  color: #fff;
}

.choice-danger:has(input:checked) {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.choice-button.is-selected {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.danger-action {
  border-color: #f2b4bd;
  background: var(--red-soft);
  color: var(--red);
}

.form-action-bar {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 12px;
  align-items: center;
}

.mobile-primary-button {
  min-height: 52px;
  font-size: 17px;
}

.subtle-details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0;
}

.subtle-details summary {
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  cursor: pointer;
  color: var(--text-2);
  font-weight: 650;
}

.subtle-details[open] {
  padding-bottom: 12px;
}

.subtle-details[open] > :not(summary) {
  margin: 0 12px 10px;
}

.scrap-flow-panel {
  border-color: #f2b4bd;
}

.scrap-card {
  display: grid;
  gap: 8px;
  border: 1px solid #f2b4bd;
  border-radius: var(--radius-sm);
  padding: 12px;
  background: var(--red-soft);
}

.scrap-card p {
  color: var(--text-2);
  font-size: 14px;
}

.missing-list {
  display: grid;
  gap: 10px;
}

.missing-row {
  display: grid;
  gap: 8px;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
}

.missing-row legend {
  padding: 0 4px;
  color: var(--text);
  font-weight: 650;
}

.toggle-row {
  min-height: 44px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  background: var(--surface-subtle);
  color: var(--text-2);
  font-size: 15px;
  font-weight: 600;
}

.toggle-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-title-row h2,
.mobile-panel h2,
.task-section h2 {
  font-size: 18px;
  line-height: 1.3;
}

.section-title-row span,
.list-count {
  color: var(--muted);
  font-size: 14px;
}

.recent-list,
.mobile-list,
.timeline-list,
.plain-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.recent-item,
.empty-result {
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  background: var(--bg-soft);
}

.recent-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px;
  column-gap: 10px;
  align-items: center;
  border-left: 4px solid var(--green);
}

.recent-item:first-child {
  background: var(--green-soft);
}

.recent-item strong {
  overflow-wrap: anywhere;
  color: var(--text);
}

.recent-item > div {
  min-width: 0;
}

.recent-item span,
.empty-result {
  color: var(--muted);
  font-size: 14px;
}

.recent-item.is-undone {
  border-left-color: var(--amber);
  background: #fffbeb;
}

.recent-item.is-undone:first-child {
  background: #fffbeb;
}

.recent-undone-label {
  color: #b45309;
  font-weight: 700;
  white-space: nowrap;
}

.recent-undo-button {
  width: 34px;
  min-height: 34px;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}

.recent-undo-button:active {
  color: var(--green);
  background: var(--green-soft);
}

.recent-item[data-kind="location"] {
  border-left-color: var(--blue);
}

.recent-item[data-kind="unbound"] {
  border-left-color: var(--amber);
}

.recent-item[data-kind="error"] {
  border-left-color: var(--red);
}

.task-section {
  display: grid;
  gap: 14px;
}

.task-section h2 {
  border-left: 4px solid var(--green);
  padding-left: 10px;
}

.warehouse-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.task-card {
  min-height: 148px;
  display: grid;
  align-content: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 14px;
  background: var(--surface);
  color: var(--text);
}

.task-card strong {
  font-size: 21px;
  line-height: 1.25;
}

.task-card small {
  color: var(--muted);
  font-size: 14px;
}

.task-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--green);
}

.task-icon svg {
  width: 34px;
  height: 34px;
}

.task-icon-warning {
  color: var(--amber);
}

.task-icon-info {
  color: var(--blue);
}

.mobile-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-bottom: 18px;
}

.search-box {
  position: relative;
  display: block;
}

.search-box svg {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 22px;
  height: 22px;
  transform: translateY(-50%);
  color: var(--muted);
}

.search-box input {
  padding-left: 46px;
}

.mobile-list-relaxed {
  gap: 12px;
}

/* 紧跟在表单卡片之后的列表区，拉开间距避免与上方贴在一起 */
.section-after-panel {
  margin-top: 22px;
}

.search-result-card,
.in-use-card,
.notice-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  color: var(--text);
}

.search-result-card {
  gap: 14px;
}

.result-card-head,
.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.result-card-head h2,
.notice-card h2,
.mobile-row h2 {
  font-size: 21px;
  line-height: 1.25;
}

.result-card-head h2 {
  border-left: 4px solid var(--green);
  padding-left: 10px;
}

.result-card-head > span,
.row-chevron {
  color: var(--muted);
  font-size: 30px;
  line-height: 1;
}

.result-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block: 1px solid var(--line);
}

.result-metrics span {
  display: grid;
  gap: 5px;
  padding: 12px 4px;
  text-align: center;
}

.result-metrics span + span {
  border-left: 1px solid var(--line);
}

.result-metrics small {
  color: var(--muted);
  font-size: 14px;
}

.result-metrics strong {
  color: var(--green);
  font-size: 28px;
}

.text-info {
  color: var(--blue) !important;
}

.text-danger {
  color: var(--red) !important;
}

.recommend-line {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--text-2);
  font-size: 15px;
}

.recommend-line strong {
  color: var(--green);
}

.recommend-line-muted {
  color: var(--muted);
}

.profile-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 22px;
  padding: 16px;
}

.avatar-mark,
.reagent-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--green-soft);
  color: var(--green);
}

.avatar-mark {
  border-radius: 50%;
}

.avatar-mark svg,
.reagent-mark svg {
  width: 30px;
  height: 30px;
}

.profile-summary h2 {
  font-size: 24px;
  line-height: 1.2;
}

.profile-summary p {
  color: var(--muted);
  font-size: 15px;
}

.summary-count {
  display: grid;
  min-width: 72px;
  justify-items: center;
  border-left: 1px solid var(--line);
  padding-left: 14px;
}

.summary-count span {
  color: var(--muted);
  font-size: 14px;
}

.summary-count strong {
  color: var(--green);
  font-size: 30px;
}

.in-use-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.card-aside {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mark-warning {
  background: var(--amber-soft);
  color: var(--amber);
}

.mark-danger {
  background: var(--red-soft);
  color: var(--red);
}

.card-title-row h3 {
  font-size: 20px;
  line-height: 1.25;
}

.card-title-row h3 span {
  margin-left: 6px;
  font-size: 17px;
  font-weight: 500;
}

.compact-facts,
.detail-facts {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
}

.compact-facts div,
.detail-facts div {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
}

.compact-facts dt,
.detail-facts dt {
  color: var(--muted);
}

.compact-facts dd,
.detail-facts dd {
  margin: 0;
  color: var(--text-2);
  overflow-wrap: anywhere;
}

.status-tag,
.tag {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 8px;
  background: var(--bg-soft);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.status-success,
.tag.success {
  border-color: #b8dec8;
  background: var(--green-soft);
  color: var(--green-strong);
}

.status-warning,
.tag.warning {
  border-color: #f3cc86;
  background: var(--amber-soft);
  color: var(--amber);
}

.status-danger,
.tag.danger {
  border-color: #f2b4bd;
  background: var(--red-soft);
  color: var(--red);
}

.status-muted {
  color: var(--muted);
}

.quiet-logout {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

.quiet-logout button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
}

.account-actions {
  margin-top: 30px;
  display: grid;
  gap: 12px;
  justify-items: center;
}

.account-actions .quiet-logout {
  margin-top: 0;
}

.account-action-link {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
}

.auth-hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.notification-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.notification-summary span {
  display: grid;
  gap: 4px;
  place-items: center;
  min-height: 68px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.notification-summary small {
  color: var(--muted);
}

.notification-summary strong {
  color: var(--red);
  font-size: 24px;
}

.notice-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.notice-card p {
  color: var(--muted);
  font-size: 14px;
}

.detail-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
  padding: 14px;
}

.detail-hero h2 {
  font-size: 21px;
  line-height: 1.25;
}

.detail-hero h2 span {
  color: var(--text-2);
  font-size: 17px;
  font-weight: 500;
}

.detail-hero p {
  color: var(--muted);
  font-size: 14px;
}

.timeline-list article {
  display: grid;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.timeline-list article:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.timeline-list span {
  color: var(--muted);
  font-size: 14px;
}

.mobile-row,
.detail-list {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--surface);
}

.mobile-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.mobile-row-block {
  grid-template-columns: minmax(0, 1fr) auto;
}

.mobile-row p {
  color: var(--muted);
  font-size: 14px;
}

.backoffice-shell {
  min-height: 100vh;
  background: var(--bg);
}

.backoffice-app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
}

.backoffice-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--surface);
  padding: 22px 14px;
}

.backoffice-brand {
  display: grid;
  gap: 4px;
  margin-bottom: 24px;
  padding: 0 8px;
}

.backoffice-brand strong {
  font-size: 18px;
}

.backoffice-brand span {
  color: var(--muted);
  font-size: 13px;
}

.backoffice-nav {
  display: grid;
  gap: 4px;
  margin: 0;
}

.backoffice-nav a {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: var(--radius-sm);
  padding: 0 10px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
}

.backoffice-nav a.is-active {
  background: var(--green-soft);
  color: var(--green-strong);
}

.backoffice-nav svg {
  width: 18px;
  height: 18px;
}

.backoffice-account {
  margin-top: auto;
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 14px 8px 0;
  color: var(--muted);
  font-size: 13px;
}

.backoffice-account a {
  color: var(--text-2);
  font-weight: 650;
}

.backoffice-main {
  min-width: 0;
  padding: 26px 28px 40px;
}

.bo-app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
}

.bo-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--surface);
  padding: 22px 14px;
}

.bo-brand {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 24px;
  padding: 0 8px;
}

.bo-brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid #cfe7d8;
  border-radius: var(--radius-sm);
  background: var(--green-soft);
  color: var(--green-strong);
  font-weight: 800;
}

.bo-brand strong,
.bo-brand span {
  display: block;
}

.bo-brand strong {
  font-size: 17px;
}

.bo-brand span:not(.bo-brand-mark) {
  color: var(--muted);
  font-size: 13px;
}

.bo-workspace {
  min-width: 0;
  padding: 26px 28px 40px;
}

.bo-topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.bo-topbar h1 {
  font-size: 26px;
  line-height: 1.2;
}

.bo-account {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
}

.bo-account a {
  color: var(--text-2);
  font-weight: 650;
}

.bo-content {
  min-width: 0;
}

.backoffice-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.backoffice-page-header h1 {
  font-size: 26px;
  line-height: 1.2;
}

.backoffice-page-header p,
.muted-note {
  color: var(--muted);
}

.message-list {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.message {
  border: 1px solid #b8dec8;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: var(--green-soft);
  color: var(--green-strong);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.metric-card,
.panel,
.admin-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.metric-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  color: var(--text);
}

.metric-card span {
  color: var(--muted);
  font-size: 13px;
}

.metric-card strong {
  font-size: 28px;
  line-height: 1;
}

.panel {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
  padding: 16px;
}

.panel h2 {
  font-size: 17px;
  line-height: 1.25;
}

.split-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
}

.filter-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.compact-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.inline-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  min-width: 520px;
  align-items: end;
}

.form-grid p,
.compact-form p,
.inline-form p {
  display: grid;
  gap: 6px;
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
}

.bo-field {
  display: grid;
  gap: 6px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 650;
}

.bo-field label {
  color: var(--text-2);
}

.bo-field-check {
  align-self: center;
  grid-template-columns: auto 1fr;
  align-items: center;
}

.bo-field-check label {
  grid-column: 2;
  grid-row: 1;
}

.bo-field-check input {
  grid-column: 1;
  grid-row: 1;
  width: 18px;
  height: 18px;
}

.bo-help,
.bo-form-errors,
.bo-field .errorlist {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.form-checkbox {
  width: 18px;
  height: 18px;
}

textarea.form-control {
  min-height: 72px;
  resize: vertical;
}

.button-row,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 13px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 9px 10px;
  text-align: left;
  vertical-align: middle;
}

th {
  background: var(--surface-subtle);
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

td {
  color: var(--text-2);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.section-header,
.detail-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.bo-tabs,
.bo-segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.bo-tab,
.bo-segmented .button,
.bo-segmented a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 0 12px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 650;
}

.bo-tab.is-active,
.bo-segmented .button.is-active,
.bo-segmented a.is-active {
  border-color: #b7dec7;
  background: var(--green-soft);
  color: var(--green-strong);
}

.bo-inline-editor {
  min-width: 320px;
}

.bo-inline-editor summary,
.bo-weak-create summary,
.bo-log-details summary {
  cursor: pointer;
  color: var(--green-strong);
  font-weight: 650;
}

.bo-log-details code {
  display: block;
  margin-top: 8px;
  max-width: 460px;
  color: var(--muted);
  font-size: 12px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 0;
}

.detail-grid div {
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.detail-grid dt {
  color: var(--muted);
  font-size: 13px;
}

.detail-grid dd {
  margin: 4px 0 0;
}

.pagination {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 14px;
  color: var(--muted);
}

.plain-list {
  display: grid;
  gap: 8px;
}

code {
  color: var(--text-2);
  white-space: pre-wrap;
}

@media (max-width: 1100px) {
  .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .backoffice-app,
  .bo-app-shell {
    grid-template-columns: 1fr;
  }

  .backoffice-sidebar,
  .bo-sidebar {
    position: static;
    height: auto;
  }

  .backoffice-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 430px) {
  .mobile-page,
  .scan-app {
    padding-inline: 14px;
  }

  .warehouse-grid,
  .two-col,
  .form-action-bar,
  .choice-grid-five,
  .choice-grid-four,
  .check-status-grid,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .scan-feedback {
    grid-template-columns: 1fr;
  }

  .ghost-button {
    width: 100%;
  }
}

/* ============================================================
   电脑端后台 · 人文科技主题（Humanistic-Tech backoffice theme）
   全部规则限定在 .bo-shell 作用域内，不影响手机端样式。
   设计：暖象牙纸面 + 松绿主色 + 衬线标题 + 柔和投影 + 线性图标。
   ============================================================ */
.bo-shell {
  --bo-paper: #f3f1ea;
  --bo-surface: #fffdf8;
  --bo-surface-2: #f8f5ee;
  --bo-ink: #20312c;
  --bo-ink-2: #44544e;
  --bo-muted: #7f8b85;
  --bo-faint: #a9b1ab;
  --bo-line: #e9e4d8;
  --bo-border: #ddd6c6;
  --bo-accent: #2f6b5b;
  --bo-accent-strong: #244f43;
  --bo-accent-soft: #e8efe9;
  --bo-accent-line: #c6dcd1;
  --bo-amber: #b1742a;
  --bo-amber-soft: #f7eddb;
  --bo-amber-line: #ecd3a8;
  --bo-red: #b1453f;
  --bo-red-soft: #f7e8e4;
  --bo-red-line: #e6c4bf;
  --bo-r: 14px;
  --bo-r-sm: 10px;
  --bo-r-xs: 8px;
  --bo-shadow-sm: 0 1px 2px rgba(28, 40, 36, .05);
  --bo-shadow: 0 1px 2px rgba(28, 40, 36, .04), 0 16px 32px -20px rgba(28, 40, 36, .24);
  --bo-shadow-lift: 0 2px 4px rgba(28, 40, 36, .05), 0 22px 40px -22px rgba(28, 40, 36, .3);
  --bo-serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", Georgia, "Times New Roman", serif;
  --bo-ease: cubic-bezier(.4, 0, .2, 1);
  background:
    radial-gradient(130% 70% at 100% -10%, rgba(47, 107, 91, .06), transparent 55%),
    var(--bo-paper);
  color: var(--bo-ink);
  -webkit-font-smoothing: antialiased;
}

/* ---- shell / sidebar ---- */
.bo-shell .bo-app-shell {
  grid-template-columns: 264px minmax(0, 1fr);
}

.bo-shell .bo-sidebar {
  background: linear-gradient(180deg, var(--bo-surface), var(--bo-surface-2));
  border-right: 1px solid var(--bo-line);
  padding: 26px 18px;
  gap: 2px;
}

.bo-shell .bo-brand {
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  padding: 2px 6px 22px;
  border-bottom: 1px solid var(--bo-line);
}

.bo-shell .bo-brand-mark {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(145deg, var(--bo-accent), var(--bo-accent-strong));
  color: #fdfbf4;
  font-family: var(--bo-serif);
  font-size: 23px;
  font-weight: 600;
  box-shadow: 0 7px 16px -7px rgba(36, 79, 67, .65), inset 0 1px 0 rgba(255, 255, 255, .2);
}

.bo-shell .bo-brand strong {
  font-family: var(--bo-serif);
  font-size: 18px;
  letter-spacing: .04em;
  color: var(--bo-ink);
}

.bo-shell .bo-brand span:not(.bo-brand-mark) {
  color: var(--bo-muted);
  font-size: 12px;
  letter-spacing: .14em;
}

.bo-shell .bo-nav {
  gap: 2px;
  margin-top: 6px;
}

.bo-shell .bo-nav-link {
  position: relative;
  min-height: 44px;
  gap: 12px;
  padding: 0 12px;
  border-radius: var(--bo-r-sm);
  color: var(--bo-ink-2);
  font-size: 14.5px;
  font-weight: 550;
  transition: background .18s var(--bo-ease), color .18s var(--bo-ease);
}

.bo-shell .bo-nav-ico {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--bo-faint);
  stroke-width: 1.7;
  transition: color .18s var(--bo-ease), transform .18s var(--bo-ease);
}

.bo-shell .bo-nav-link:hover {
  background: var(--bo-surface-2);
  color: var(--bo-ink);
}

.bo-shell .bo-nav-link:hover .bo-nav-ico {
  color: var(--bo-accent);
  transform: translateX(1px);
}

.bo-shell .bo-nav-link.is-active {
  background: var(--bo-accent-soft);
  color: var(--bo-accent-strong);
  font-weight: 650;
}

.bo-shell .bo-nav-link.is-active .bo-nav-ico {
  color: var(--bo-accent);
}

.bo-shell .bo-nav-link.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 22px;
  border-radius: 0 3px 3px 0;
  background: var(--bo-accent);
}

/* ---- workspace / topbar ---- */
.bo-shell .bo-workspace {
  padding: 32px 40px 60px;
}

.bo-shell .bo-topbar {
  align-items: flex-end;
  margin-bottom: 26px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--bo-line);
}

.bo-shell .bo-kicker,
.bo-shell .eyebrow {
  margin-bottom: 7px;
  color: var(--bo-accent);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.bo-shell .bo-topbar h1 {
  font-family: var(--bo-serif);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--bo-ink);
}

.bo-shell .bo-account {
  gap: 14px;
  color: var(--bo-muted);
}

.bo-shell .bo-user {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--bo-ink-2);
  font-weight: 600;
}

.bo-shell .bo-avatar {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bo-accent-soft);
  color: var(--bo-accent-strong);
  font-family: var(--bo-serif);
  font-size: 14px;
  font-weight: 600;
}

.bo-shell .bo-account a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--bo-border);
  border-radius: 999px;
  color: var(--bo-ink-2);
  font-weight: 600;
  transition: border-color .16s var(--bo-ease), background .16s var(--bo-ease), color .16s var(--bo-ease);
}

.bo-shell .bo-account a:hover {
  border-color: var(--bo-accent-line);
  background: var(--bo-accent-soft);
  color: var(--bo-accent-strong);
}

.bo-shell .bo-ico-sm {
  width: 16px;
  height: 16px;
  stroke-width: 1.8;
}

/* ---- messages ---- */
.bo-shell .message {
  border: 1px solid var(--bo-accent-line);
  border-radius: var(--bo-r-sm);
  padding: 12px 14px;
  background: var(--bo-accent-soft);
  color: var(--bo-accent-strong);
  box-shadow: var(--bo-shadow-sm);
}

.bo-shell .message-error {
  border-color: var(--bo-red-line);
  background: var(--bo-red-soft);
  color: var(--bo-red);
}

.bo-shell .message-warning {
  border-color: var(--bo-amber-line);
  background: var(--bo-amber-soft);
  color: var(--bo-amber);
}

/* ---- metric cards ---- */
.bo-shell .bo-metric-grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.bo-shell .bo-metric-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--bo-line);
  border-radius: var(--bo-r);
  background: var(--bo-surface);
  box-shadow: var(--bo-shadow-sm);
  transition: transform .2s var(--bo-ease), box-shadow .2s var(--bo-ease), border-color .2s var(--bo-ease);
}

.bo-shell .bo-metric-card:hover {
  transform: translateY(-3px);
  border-color: var(--bo-accent-line);
  box-shadow: var(--bo-shadow-lift);
}

.bo-shell .bo-metric-ico {
  width: 46px;
  height: 46px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--bo-accent-soft);
  color: var(--bo-accent);
}

.bo-shell .bo-metric-ico svg {
  width: 23px;
  height: 23px;
  stroke-width: 1.7;
}

.bo-shell .bo-metric-body {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.bo-shell .bo-metric-label {
  color: var(--bo-muted);
  font-size: 13px;
  font-weight: 600;
}

.bo-shell .bo-metric-value {
  font-family: var(--bo-serif);
  font-size: 30px;
  line-height: 1;
  color: var(--bo-ink);
  font-variant-numeric: tabular-nums;
}

.bo-shell .bo-metric-warning .bo-metric-ico {
  background: var(--bo-amber-soft);
  color: var(--bo-amber);
}

.bo-shell .bo-metric-danger .bo-metric-ico {
  background: var(--bo-red-soft);
  color: var(--bo-red);
}

/* ---- panels ---- */
.bo-shell .panel,
.bo-shell .bo-panel,
.bo-shell .admin-panel {
  border: 1px solid var(--bo-line);
  border-radius: var(--bo-r);
  background: var(--bo-surface);
  box-shadow: var(--bo-shadow-sm);
  padding: 22px 24px;
  gap: 18px;
  margin-bottom: 18px;
}

.bo-shell .panel h2,
.bo-shell .bo-panel h2 {
  font-family: var(--bo-serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--bo-ink);
}

.bo-shell .section-header {
  align-items: center;
}

.bo-shell .section-header > a:not(.button),
.bo-shell .detail-header a:not(.button) {
  color: var(--bo-accent);
  font-size: 13.5px;
  font-weight: 600;
}

.bo-shell .section-header > a:not(.button):hover {
  color: var(--bo-accent-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bo-shell .muted-note,
.bo-shell .backoffice-page-header p {
  color: var(--bo-muted);
  font-size: 13px;
}

/* ---- tables ---- */
.bo-shell .table-wrap {
  border: 1px solid var(--bo-line);
  border-radius: var(--bo-r-sm);
  background: var(--bo-surface);
  overflow-x: auto;
}

.bo-shell table {
  background: transparent;
  font-size: 13.5px;
}

.bo-shell thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bo-surface-2);
  color: var(--bo-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  padding: 13px 15px;
  border-bottom: 1px solid var(--bo-border);
}

.bo-shell tbody td {
  padding: 13px 15px;
  border-bottom: 1px solid var(--bo-line);
  color: var(--bo-ink-2);
}

.bo-shell tbody tr {
  transition: background .14s var(--bo-ease);
}

.bo-shell tbody tr:hover td {
  background: var(--bo-accent-soft);
}

.bo-shell tbody tr:hover td:first-child {
  box-shadow: inset 3px 0 0 var(--bo-accent);
}

.bo-shell tbody td a {
  color: var(--bo-accent-strong);
  font-weight: 600;
}

.bo-shell tbody td a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bo-shell tbody tr td[colspan] {
  padding: 30px 15px;
  color: var(--bo-faint);
  text-align: center;
  font-style: italic;
}

.bo-shell code {
  background: var(--bo-surface-2);
  border: 1px solid var(--bo-line);
  border-radius: 6px;
  padding: 1px 7px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--bo-ink-2);
}

/* ---- buttons ---- */
.bo-shell button,
.bo-shell .button {
  min-height: 40px;
  border-radius: var(--bo-r-xs);
  padding: 0 18px;
  background: var(--bo-accent);
  color: #fdfbf4;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(36, 79, 67, .18);
  transition: background .16s var(--bo-ease), box-shadow .16s var(--bo-ease), transform .1s var(--bo-ease);
}

.bo-shell button:hover,
.bo-shell .button:hover {
  background: var(--bo-accent-strong);
  box-shadow: 0 5px 14px -5px rgba(36, 79, 67, .5);
}

.bo-shell button:active,
.bo-shell .button:active {
  transform: translateY(1px);
}

.bo-shell .button.secondary,
.bo-shell .secondary-button {
  background: var(--bo-surface);
  border: 1px solid var(--bo-border);
  color: var(--bo-ink-2);
  box-shadow: none;
}

.bo-shell .button.secondary:hover,
.bo-shell .secondary-button:hover {
  border-color: var(--bo-accent-line);
  background: var(--bo-accent-soft);
  color: var(--bo-accent-strong);
}

.bo-shell .button.secondary.is-active {
  border-color: var(--bo-accent-line);
  background: var(--bo-accent-soft);
  color: var(--bo-accent-strong);
}

.bo-shell .bo-row-action {
  min-height: 34px;
  padding: 0 13px;
  font-size: 13px;
}

/* 库存表：位置列需要更宽，避免“组 / 位置”被挤窄换行 */
.bo-shell .bo-inventory-table .bo-col-location {
  min-width: 180px;
}

/* ---- forms / inputs ---- */
.bo-shell .form-control {
  min-height: 42px;
  border: 1px solid var(--bo-border);
  border-radius: var(--bo-r-xs);
  background: var(--bo-surface);
  color: var(--bo-ink);
  font-size: 14px;
  padding: 9px 12px;
  transition: border-color .16s var(--bo-ease), box-shadow .16s var(--bo-ease);
}

.bo-shell .form-control:hover {
  border-color: var(--bo-accent-line);
}

.bo-shell .form-control:focus {
  border-color: var(--bo-accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 107, 91, .14);
}

.bo-shell select.form-control {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237f8b85' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}

.bo-shell .bo-field label {
  color: var(--bo-ink-2);
  font-size: 13px;
  font-weight: 600;
}

.bo-shell .bo-help,
.bo-shell .bo-form-errors {
  color: var(--bo-muted);
}

.bo-shell .bo-field .errorlist,
.bo-shell .errorlist {
  color: var(--bo-red);
}

.bo-shell input[type="checkbox"],
.bo-shell .form-checkbox {
  accent-color: var(--bo-accent);
}

/* ---- tabs / segmented / disclosures ---- */
.bo-shell .bo-tab,
.bo-shell .bo-segmented .button,
.bo-shell .bo-segmented a {
  min-height: 38px;
  border: 1px solid var(--bo-border);
  border-radius: 999px;
  background: var(--bo-surface);
  color: var(--bo-ink-2);
  font-weight: 600;
  box-shadow: none;
}

.bo-shell .bo-tab.is-active,
.bo-shell .bo-tabs .bo-tab.is-active {
  border-color: var(--bo-accent);
  background: var(--bo-accent);
  color: #fdfbf4;
}

.bo-shell .bo-inline-editor summary,
.bo-shell .bo-weak-create summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--bo-border);
  border-radius: 999px;
  background: var(--bo-surface);
  color: var(--bo-accent-strong);
  font-weight: 600;
  list-style: none;
  transition: border-color .16s var(--bo-ease), background .16s var(--bo-ease);
}

.bo-shell .bo-inline-editor summary::-webkit-details-marker,
.bo-shell .bo-weak-create summary::-webkit-details-marker {
  display: none;
}

.bo-shell .bo-inline-editor summary::before,
.bo-shell .bo-weak-create summary::before {
  content: "+";
  font-size: 15px;
  line-height: 1;
}

.bo-shell details[open] > summary::before {
  content: "−";
}

.bo-shell .bo-inline-editor summary:hover,
.bo-shell .bo-weak-create summary:hover {
  border-color: var(--bo-accent-line);
  background: var(--bo-accent-soft);
}

.bo-shell .bo-weak-create[open] > form {
  margin-top: 14px;
  padding-top: 16px;
  border-top: 1px dashed var(--bo-line);
}

/* 位置管理：行内“编辑”展开为一张整洁的编辑卡片，而非挤在单元格里的散字段 */
.bo-shell .bo-inline-editor {
  min-width: 0;
}

.bo-shell .bo-inline-editor[open] {
  display: block;
}

.bo-shell .bo-inline-editor[open] > form {
  width: min(430px, 72vw);
  margin-top: 12px;
  padding: 18px;
  border: 1px solid var(--bo-line);
  border-radius: var(--bo-r-sm);
  background: var(--bo-surface-2);
  box-shadow: var(--bo-shadow-sm);
}

.bo-shell .bo-inline-editor[open] > form.bo-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bo-shell .bo-inline-editor[open] .bo-field-note {
  grid-column: 1 / -1;
}

.bo-shell .bo-inline-editor[open] .bo-form-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
  margin-top: 2px;
}

/* 编辑卡展开较宽时，保证首列名称不被压成竖排（超出则整体横向滚动） */
.bo-shell .bo-location-table td:first-child,
.bo-shell .bo-location-table th:first-child,
.bo-shell .bo-location-group-table td:first-child,
.bo-shell .bo-location-group-table th:first-child {
  min-width: 150px;
}

.bo-shell .bo-log-details summary {
  color: var(--bo-accent-strong);
  font-weight: 600;
}

/* ---- detail page back link ---- */
.bo-shell .bo-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  padding: 6px 14px 6px 8px;
  border: 1px solid var(--bo-border);
  border-radius: 999px;
  background: var(--bo-surface);
  color: var(--bo-ink-2);
  font-size: 13.5px;
  font-weight: 600;
  transition: border-color .16s var(--bo-ease), background .16s var(--bo-ease), color .16s var(--bo-ease);
}

.bo-shell .bo-back-link:hover {
  border-color: var(--bo-accent-line);
  background: var(--bo-accent-soft);
  color: var(--bo-accent-strong);
}

.bo-shell .bo-back-link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- detail facts / lists / pagination ---- */
.bo-shell .detail-grid {
  gap: 0 28px;
}

.bo-shell .detail-grid div {
  border-bottom: 1px solid var(--bo-line);
  padding: 13px 0;
}

.bo-shell .detail-grid dt {
  color: var(--bo-muted);
  font-size: 12px;
  letter-spacing: .03em;
}

.bo-shell .detail-grid dd {
  margin-top: 6px;
  color: var(--bo-ink);
  font-size: 15px;
}

.bo-shell .plain-list {
  gap: 0;
}

.bo-shell .plain-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--bo-line);
  list-style: none;
}

.bo-shell .plain-list li:last-child {
  border-bottom: 0;
}

.bo-shell .bo-list a {
  color: var(--bo-ink);
  font-weight: 600;
}

.bo-shell .bo-list a:hover {
  color: var(--bo-accent-strong);
}

.bo-shell .bo-list span:not(.tag) {
  color: var(--bo-muted);
  font-size: 13px;
}

.bo-shell .bo-empty {
  justify-content: flex-start;
  color: var(--bo-faint);
  font-style: italic;
}

.bo-shell .pagination {
  color: var(--bo-muted);
}

.bo-shell .pagination a {
  padding: 8px 15px;
  border: 1px solid var(--bo-border);
  border-radius: 999px;
  color: var(--bo-ink-2);
  font-weight: 600;
  transition: border-color .16s var(--bo-ease), background .16s var(--bo-ease), color .16s var(--bo-ease);
}

.bo-shell .pagination a:hover {
  border-color: var(--bo-accent-line);
  background: var(--bo-accent-soft);
  color: var(--bo-accent-strong);
}

/* ---- tags (scoped refine) ---- */
.bo-shell .tag {
  border-radius: 999px;
  border-color: var(--bo-border);
  background: var(--bo-surface-2);
  color: var(--bo-ink-2);
  font-size: 12px;
  font-weight: 600;
}

.bo-shell .tag.success {
  border-color: var(--bo-accent-line);
  background: var(--bo-accent-soft);
  color: var(--bo-accent-strong);
}

.bo-shell .tag.warning {
  border-color: var(--bo-amber-line);
  background: var(--bo-amber-soft);
  color: var(--bo-amber);
}

.bo-shell .tag.danger {
  border-color: var(--bo-red-line);
  background: var(--bo-red-soft);
  color: var(--bo-red);
}

/* ---- settings page ---- */
.bo-shell .bo-settings-primary {
  margin-bottom: 18px;
}

.bo-shell .bo-threshold-form {
  grid-template-columns: repeat(2, minmax(0, 220px));
  justify-content: start;
}

.bo-shell .bo-threshold-form .bo-form-actions {
  grid-column: 1 / -1;
}

.bo-shell .bo-data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.bo-shell .bo-data-grid .bo-panel {
  margin-bottom: 0;
}

.bo-shell .bo-add-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.bo-shell .bo-add-form .bo-field {
  gap: 0;
}

.bo-shell .bo-add-form .bo-field label {
  display: none;
}

.bo-shell .bo-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.bo-shell .bo-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--bo-line);
  border-radius: 999px;
  background: var(--bo-surface-2);
  color: var(--bo-ink-2);
  font-size: 13px;
  font-weight: 600;
  list-style: none;
}

.bo-shell .bo-chip .tag {
  padding: 1px 8px;
  font-size: 11px;
}

.bo-shell .bo-chip-empty {
  color: var(--bo-faint);
  font-size: 13px;
  font-style: italic;
  list-style: none;
}

/* ---- focus visibility ---- */
.bo-shell a:focus-visible,
.bo-shell button:focus-visible,
.bo-shell .button:focus-visible,
.bo-shell summary:focus-visible {
  outline: 2px solid var(--bo-accent);
  outline-offset: 2px;
}

/* ---- responsive ---- */
@media (max-width: 1180px) {
  .bo-shell .bo-metric-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

@media (max-width: 960px) {
  .bo-shell .bo-app-shell {
    grid-template-columns: 1fr;
  }

  .bo-shell .bo-sidebar {
    position: static;
    height: auto;
    padding: 16px 18px;
  }

  .bo-shell .bo-brand {
    margin-bottom: 14px;
    padding-bottom: 14px;
  }

  .bo-shell .bo-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .bo-shell .bo-nav-link {
    min-height: 38px;
  }

  .bo-shell .bo-nav-link.is-active::before {
    display: none;
  }

  .bo-shell .bo-workspace {
    padding: 24px 20px 48px;
  }
}

@media (max-width: 560px) {
  .bo-shell .bo-metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bo-shell .bo-topbar h1 {
    font-size: 25px;
  }
}

/* ---- backoffice login (scoped via bo-auth) ---- */
.bo-auth {
  background:
    radial-gradient(130% 80% at 50% -10%, rgba(47, 107, 91, .08), transparent 55%),
    var(--bo-paper, #f3f1ea);
}

.bo-auth .auth-card h1 {
  font-family: var(--bo-serif, Georgia, serif);
  color: #20312c;
  letter-spacing: .03em;
}

.bo-auth .auth-form {
  border-color: #e9e4d8;
  border-radius: 16px;
  background: #fffdf8;
  box-shadow: 0 1px 2px rgba(28, 40, 36, .04), 0 20px 44px -26px rgba(28, 40, 36, .3);
}

.bo-auth .auth-form button {
  background: #2f6b5b;
}

.bo-auth .auth-form button:hover {
  background: #244f43;
}

.bo-auth .auth-form input:focus {
  border-color: #2f6b5b;
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 107, 91, .14);
}

/* ============================================================
   手机端 · 人文科技主题（Humanistic-Tech mobile theme）
   做法：在 .mobile-shell / .auth-shell 作用域内重定义全局调色板令牌，
   让既有规则自动换肤；再补少量打磨。全部为 CSS，不改任何 JS 逻辑与 DOM 结构。
   ============================================================ */
.mobile-shell,
.auth-shell {
  --bg: #f3f1ea;
  --bg-soft: #ece8de;
  --surface: #fffdf8;
  --surface-subtle: #faf7f0;
  --text: #20312c;
  --text-2: #44544e;
  --muted: #7f8b85;
  --faint: #a9b1ab;
  --border: #ddd6c6;
  --line: #e9e4d8;
  --green: #2f6b5b;
  --green-strong: #244f43;
  --green-soft: #e8efe9;
  --amber: #b1742a;
  --amber-soft: #f7eddb;
  --red: #b1453f;
  --red-soft: #f7e8e4;
  --blue: #356f80;
  --blue-soft: #e6eef1;
  --radius: 14px;
  --radius-sm: 10px;
  --m-serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", Georgia, "Times New Roman", serif;
  --m-shadow: 0 1px 2px rgba(28, 40, 36, .04), 0 14px 30px -20px rgba(28, 40, 36, .22);
  --m-ease: cubic-bezier(.4, 0, .2, 1);
  -webkit-font-smoothing: antialiased;
}

/* ---- 标题改衬线，强化人文气质 ---- */
.mobile-shell .mobile-page-header h1,
.mobile-shell .mobile-panel h2,
.mobile-shell .task-section h2,
.mobile-shell .result-card-head h2,
.mobile-shell .detail-hero h2,
.mobile-shell .profile-summary h2,
.mobile-shell .mobile-row h2,
.auth-shell .auth-card h1 {
  font-family: var(--m-serif);
  letter-spacing: .02em;
}

.mobile-shell .result-metrics strong,
.mobile-shell .summary-count strong {
  font-family: var(--m-serif);
  font-variant-numeric: tabular-nums;
}

/* ---- 卡片柔和投影 ---- */
.mobile-shell .mobile-panel,
.mobile-shell .flow-panel,
.mobile-shell .recent-panel,
.mobile-shell .task-card,
.mobile-shell .search-result-card,
.mobile-shell .in-use-card,
.mobile-shell .notice-card,
.mobile-shell .detail-hero,
.mobile-shell .profile-summary,
.mobile-shell .slot-list,
.mobile-shell .segmented-control,
.auth-shell .auth-form {
  box-shadow: var(--m-shadow);
}

/* ---- 底部 Tab 栏 ---- */
.mobile-shell .mobile-tabbar {
  border-top-color: var(--line);
  background: rgba(255, 253, 248, .92);
}

/* ---- 任务卡（仓库首页）：图标改为柔色方块 + 按压反馈 ---- */
.mobile-shell .task-card {
  transition: transform .16s var(--m-ease), box-shadow .16s var(--m-ease);
}

.mobile-shell .task-card:active {
  transform: translateY(1px);
}

.mobile-shell .task-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--green-soft);
  color: var(--green);
}

.mobile-shell .task-icon svg {
  width: 24px;
  height: 24px;
}

.mobile-shell .task-icon-warning {
  background: var(--amber-soft);
  color: var(--amber);
}

.mobile-shell .task-icon-info {
  background: var(--blue-soft);
  color: var(--blue);
}

/* ---- 表单：入库 / 位置组 重点美化 ---- */
.mobile-shell .mobile-form input:focus,
.mobile-shell .mobile-form select:focus,
.mobile-shell .mobile-form textarea:focus,
.mobile-shell .mobile-search input:focus {
  border-color: var(--green);
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 107, 91, .16);
}

/* 选项胶囊 / 常用规格按钮：圆角药丸 + 过渡 + 按压反馈 */
.mobile-shell .choice-pill:not(.choice-pill-stack),
.mobile-shell .choice-button {
  border-radius: 999px;
  transition: border-color .15s var(--m-ease), background .15s var(--m-ease), color .15s var(--m-ease), transform .1s var(--m-ease);
}

.mobile-shell .choice-pill:not(.choice-pill-stack):active,
.mobile-shell .choice-button:active {
  transform: scale(.97);
}

.mobile-shell .choice-pill-stack {
  border-radius: var(--radius-sm);
  transition: border-color .15s var(--m-ease), background .15s var(--m-ease);
}

/* 选中态：整颗胶囊填充主色 + 柔和上浮，不再只染内部文字块 */
.mobile-shell .choice-pill:has(input:checked):not(.choice-danger) {
  border-color: var(--green-strong);
  box-shadow: 0 4px 12px -6px rgba(22, 138, 69, .55);
}

/* 主按钮：柔和投影 + 按压 */
.mobile-shell .mobile-primary-button {
  box-shadow: 0 6px 16px -8px rgba(36, 79, 67, .6);
  transition: background .16s var(--m-ease), box-shadow .16s var(--m-ease), transform .1s var(--m-ease);
}

.mobile-shell .mobile-primary-button:active {
  transform: translateY(1px);
}

/* 槽位汇总（当前位置 / 试剂码）数值用主色 */
.mobile-shell .slot-row strong {
  color: var(--green);
}

/* ---- 消息条 / 扫码反馈 配色对齐暖色体系 ---- */
.mobile-shell .mobile-message {
  border-radius: var(--radius-sm);
  border-color: #c6dcd1;
  background: var(--green-soft);
  color: var(--green-strong);
}

.mobile-shell .mobile-message-error,
.mobile-shell .message-error {
  border-color: #e6c4bf;
  background: var(--red-soft);
  color: var(--red);
}

.mobile-shell .mobile-message-warning {
  border-color: #ecd3a8;
  background: var(--amber-soft);
  color: var(--amber);
}

.mobile-shell .scan-feedback[data-severity="success"] {
  border-color: #c6dcd1;
  background: var(--green-soft);
}

.mobile-shell .scan-feedback[data-severity="warning"] {
  border-color: #ecd3a8;
  background: var(--amber-soft);
}

.mobile-shell .scan-feedback[data-severity="error"] {
  border-color: #e6c4bf;
  background: var(--red-soft);
}

/* ---- 放回上下文 / 扫码工具菜单 / 分段控件 的薄荷描边对齐 ---- */
.mobile-shell .return-context {
  border-color: #c6dcd1;
}

.mobile-shell .return-reagent,
.mobile-shell .return-context > .switch-row {
  border-color: #d2e0d8;
}

.mobile-shell .scan-tool-menu[open] .scan-tool-menu-trigger {
  border-color: #c6dcd1;
  background: var(--green-soft);
  color: var(--green);
}

.mobile-shell .segmented-control button.is-active {
  box-shadow: inset 0 0 0 1px rgba(47, 107, 91, .2);
}

/* ---- 登录卡（手机/通用入口）---- */
.auth-shell .auth-card h1 {
  color: var(--text);
}

.auth-shell .auth-form {
  border-radius: 16px;
}
