:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --text: #151b2b;
  --muted: #7c8799;
  --border: #edf0f4;
  --primary: #ef1748;
  --primary-dark: #d90d3c;
  --action-blue: #2563eb;
  --action-blue-dark: #1d4ed8;
  --action-green: #10b981;
  --action-green-dark: #059669;
  --action-yellow: #f59e0b;
  --action-yellow-dark: #d97706;
  --action-red: #e11d48;
  --action-red-dark: #be123c;
  --blue: #eaf2ff;
  --blue-text: #1d4ed8;
  --green: #eaf9ef;
  --green-text: #157347;
  --yellow: #fff7df;
  --yellow-text: #936900;
  --red: #fff1f1;
  --red-text: #b42318;
  --purple: #f1edff;
  --purple-text: #5b35d5;
  --shadow: 0 5px 18px rgba(15, 23, 42, 0.055);
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.topbar {
  padding: 24px 24px 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}
.eyebrow { color: var(--primary); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { margin: 0; }
h1 { margin-top: 6px; font-size: 30px; letter-spacing: 0; }
.subtitle { color: var(--muted); margin-top: 8px; line-height: 1.6; }
.top-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.clock-card {
  min-width: 210px;
  background: #111827;
  color: white;
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: var(--shadow);
}
.clock-card span { display: block; font-size: 12px; color: #cbd5e1; }
.clock-card strong { display: block; margin-top: 4px; font-size: 18px; }

.topbar, .layout { width: 100%; max-width: none; margin-left: auto; margin-right: auto; }
.layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 16px; padding: 0 24px 30px; }
.sidebar {
  position: sticky;
  top: 16px;
  align-self: start;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow);
  max-height: calc(100vh - 32px);
  overflow: auto;
}
.nav {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 11px 12px;
  border-radius: 12px;
  color: #374151;
  font-weight: 700;
  margin-bottom: 6px;
}
.nav.active, .nav:hover { background: #eef4ff; color: var(--primary); }
.side-note { margin-top: 16px; padding: 14px; border: 1px dashed #d7dce8; border-radius: 14px; font-size: 13px; color: var(--muted); }
.side-note strong { display: block; margin-bottom: 8px; color: var(--text); }
.side-note p { margin: 8px 0; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 99px; margin-right: 8px; }
.dot.green { background: #22c55e; }
.dot.blue { background: #3b82f6; }
.dot.yellow { background: #eab308; }
.dot.red { background: #ef4444; }

.content { min-width: 0; }
.session-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-bottom: 14px; min-width: 0; color: #64748b; font-size: 12px; }
.session-toolbar > span { min-width: 0; overflow-wrap: anywhere; }
.session-toolbar strong { color: #334155; }
.session-toolbar .btn { flex: 0 0 auto; min-height: 44px; white-space: nowrap; }
.panel { display: none; }
.panel.active { display: block; }
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.section-head h2 { font-size: 24px; letter-spacing: 0; }
.section-head p { color: var(--muted); margin-top: 6px; line-height: 1.6; }

.btn {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: .16s ease;
  white-space: nowrap;
}
.btn.primary { background: var(--primary); color: white; }
.btn.primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn.secondary { background: white; color: #334155; border: 1px solid var(--border); }
.btn.secondary:hover { background: #f8fafc; transform: translateY(-1px); }
.btn.danger { background: var(--red); color: var(--red-text); }
.btn.small { padding: 7px 10px; font-size: 13px; }
.file-label input { display: none; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card, .card {
  background: rgba(255,255,255,.94);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.stat-card span { color: var(--muted); font-size: 13px; }
.stat-card strong { display: block; margin-top: 8px; font-size: 26px; letter-spacing: 0; }
.stat-card p { color: var(--muted); margin-top: 6px; font-size: 13px; }
.two-col { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h3 { font-size: 18px; }
.muted { color: var(--muted); font-size: 13px; }
.mt { margin-top: 16px; }

.toolbar { display: flex; gap: 12px; margin-bottom: 14px; align-items: center; }
.input {
  width: 100%;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--text);
  outline: none;
  transition: border .15s ease, box-shadow .15s ease;
}
.input:focus { border-color: #9bbcff; box-shadow: 0 0 0 4px rgba(37,99,235,.10); }
.input.compact { max-width: 180px; }
.input.wide { max-width: 360px; }
.input.readonly { background: #f8fafc; color: #475569; }
textarea.input { resize: vertical; min-height: 76px; }

.table-wrap {
  overflow: auto;
  max-width: 100%;
  background: rgba(255,255,255,.94);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
table { width: 100%; border-collapse: collapse; min-width: 980px; }
th, td { padding: 13px 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { background: #f8fafc; color: #475569; font-size: 13px; white-space: nowrap; }
td { font-size: 14px; line-height: 1.5; }
tr:last-child td { border-bottom: 0; }
.small-table table { min-width: 760px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.text-btn { border: 0; background: transparent; color: var(--primary); font-weight: 800; padding: 0; }
.text-btn.danger-text { color: var(--red-text); }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.status-paid { background: var(--green); color: var(--green-text); }
.status-reserved { background: #e0f2fe; color: #075985; border: 1px solid #7dd3fc; }
.status-instock { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.status-pending { background: var(--yellow); color: var(--yellow-text); }
.status-shipped { background: var(--purple); color: var(--purple-text); }
.status-renting { background: var(--blue); color: var(--blue-text); }
.status-risk { background: var(--red); color: var(--red-text); }
.status-completed { background: #ecfdf5; color: #047857; }
.order-time-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}
.order-time-overdue { color: #b91c1c; background: #fee2e2; border: 1px solid #fca5a5; }
.order-time-reserved { color: #1d4ed8; background: #dbeafe; border: 1px solid #93c5fd; }
.order-time-urgent { color: #b91c1c; background: #fee2e2; border: 1px solid #fca5a5; }
.order-time-due { color: #a16207; background: #fef3c7; border: 1px solid #fcd34d; }

.mini-list { display: grid; gap: 10px; }
.mini-item { border: 1px solid var(--border); border-radius: 14px; padding: 12px; display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; background: #fff; }
.mini-item strong { display: block; margin-bottom: 3px; }
.mini-item p { color: var(--muted); font-size: 13px; line-height: 1.5; }

.dialog {
  border: 0;
  padding: 0;
  border-radius: 22px;
  max-width: 860px;
  width: calc(100vw - 32px);
  box-shadow: 0 25px 90px rgba(15, 23, 42, 0.25);
}
.large-dialog { max-width: 1060px; }
.dialog::backdrop { background: rgba(15, 23, 42, .45); backdrop-filter: blur(4px); }
.dialog-inner { padding: 22px; }
.dialog-head { display: flex; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.dialog-head h2 { font-size: 22px; }
.dialog-head p { color: var(--muted); margin-top: 5px; line-height: 1.5; }
.icon-btn { width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 12px; background: white; font-size: 24px; line-height: 1; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.form-grid label { color: #475569; font-size: 13px; font-weight: 800; display: grid; gap: 7px; }
.span-2 { grid-column: span 2; }

.source-picker { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 8px; align-items: center; }
.source-picker .tiny-btn { padding: 10px 12px; min-height: 42px; white-space: nowrap; font-size: 13px; }
@media (max-width: 720px) {
  .source-picker { grid-template-columns: 1fr 1fr; }
  .source-picker select { grid-column: 1 / -1; }
}

/* v2.9.57：统一错误提示层，保证弹窗和手机安全区可见。 */
#toast {
  z-index: 2147483000;
  max-width: min(420px, calc(100vw - 32px));
  overflow-wrap: anywhere;
  line-height: 1.45;
}
#toast.toast-error {
  border: 1px solid #fda4af;
  background: #be123c;
  box-shadow: 0 16px 40px rgba(190, 18, 60, .28);
}
.app-alert-dialog {
  width: min(460px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  overflow: visible;
  border: 1px solid #fecdd3;
  border-radius: 18px;
}
#appAlertDialog[open] { display: block; }
body:not(.is-authenticated) #appAlertDialog[open] { display: block; }
.app-alert-inner { padding: 20px; }
.app-alert-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}
.app-alert-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 900;
  font-size: 20px;
}
.app-alert-copy { min-width: 0; }
#appAlertTitle { margin: 0; color: #172033; font-size: 18px; }
#appAlertMessage {
  margin-top: 6px;
  color: #475569;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.app-alert-actions { margin-top: 18px; }
@media (max-width: 720px) {
  #toast {
    right: 12px;
    bottom: calc(78px + env(safe-area-inset-bottom));
    left: 12px;
    width: auto;
    max-width: none;
    padding: 11px 13px;
    border-radius: 12px;
    font-size: 12px;
  }
  .app-alert-dialog {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    max-height: calc(100dvh - 32px);
    margin: auto;
    border-radius: 16px;
  }
  .app-alert-inner { padding: 16px; }
  #appAlertMessage { font-size: 13px; }
  .app-alert-actions { margin-top: 14px; }
  .app-alert-actions .btn { min-height: 40px; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  #toast { transition: none; }
}

/* v2.9.0：半透明毛玻璃侧栏与统一线性图标体系 */
@media (min-width: 721px) {
  body.is-authenticated {
    background:
      radial-gradient(circle at 18% 12%, rgba(255, 228, 238, .45), transparent 32%),
      radial-gradient(circle at 86% 8%, rgba(219, 235, 255, .56), transparent 36%),
      #f4f7fb;
  }

  body.is-authenticated .sidebar {
    position: sticky;
    z-index: 20;
    overflow: hidden auto;
    background: linear-gradient(180deg, rgba(255,255,255,.78), rgba(247,250,255,.62));
    border-right: 1px solid rgba(148,163,184,.18);
    box-shadow: 14px 0 34px rgba(48, 63, 89, .10);
    backdrop-filter: blur(24px) saturate(145%);
    -webkit-backdrop-filter: blur(24px) saturate(145%);
  }
  body.is-authenticated .sidebar::before {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    content: "";
    background: linear-gradient(145deg, rgba(255,255,255,.5), transparent 38%, rgba(226,234,248,.18));
  }
  body.is-authenticated .sidebar > * { position: relative; z-index: 1; }
  body.is-authenticated .sidebar-brand,
  body.is-authenticated .sidebar-label,
  body.is-authenticated .sidebar-rule { display: block; }
  body.is-authenticated .sidebar-brand {
    min-height: 62px;
    padding: 0 8px 18px;
    color: #162136;
  }
  body.is-authenticated .sidebar-brand-mark {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    border-radius: 13px;
    background: linear-gradient(145deg, #ff527b, #ea174a 78%);
    box-shadow: 0 12px 24px rgba(234, 23, 74, .25);
    font-size: 20px;
  }
  body.is-authenticated .sidebar-brand strong {
    color: #182338;
    font-size: 16px;
    letter-spacing: -.01em;
  }
  body.is-authenticated .sidebar-brand span { color: #7d8ba1; font-size: 10.5px; }
  body.is-authenticated .sidebar-rule {
    height: 1px;
    margin: 0 -12px 16px;
    background: rgba(148,163,184,.2);
  }
  body.is-authenticated .sidebar-label {
    padding: 0 14px 10px;
    color: #8b98ab;
    font-size: 9px;
    letter-spacing: .18em;
  }
  body.is-authenticated .nav {
    min-height: 50px;
    margin-bottom: 6px;
    padding: 8px 12px;
    gap: 12px;
    border: 1px solid transparent;
    border-radius: 14px;
    color: #526177;
    font-size: 14px;
    font-weight: 760;
    line-height: 1.3;
    transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
  }
  body.is-authenticated .nav:hover {
    transform: translateX(2px);
    border-color: rgba(148,163,184,.17);
    background: rgba(255,255,255,.62);
    color: #1f2c45;
    box-shadow: 0 7px 18px rgba(60, 79, 108, .07);
  }
  body.is-authenticated .nav.active,
  body.is-authenticated .nav.active:hover {
    transform: none;
    border-color: transparent;
    background: linear-gradient(135deg, #ff4b77, #ea174a 84%);
    color: #fff;
    box-shadow: 0 13px 25px rgba(234, 23, 74, .24);
  }
  body.is-authenticated .nav::before { display: none; }
  body.is-authenticated .nav-icon {
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    place-items: center;
    border: 1px solid rgba(148,163,184,.23);
    border-radius: 10px;
    background: rgba(255,255,255,.48);
    color: #6f7f96;
    transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
  }
  body.is-authenticated .nav-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  body.is-authenticated .nav:hover .nav-icon {
    border-color: rgba(234,23,74,.2);
    color: #e11d48;
    transform: scale(1.04);
  }
  body.is-authenticated .nav.active .nav-icon {
    border-color: rgba(255,255,255,.3);
    background: rgba(255,255,255,.17);
    color: #fff;
  }
  body.is-authenticated .nav-label { min-width: 0; }
  body.is-authenticated .side-note {
    margin: auto 0 1px;
    padding: 13px 13px 11px;
    border: 1px solid rgba(148,163,184,.2);
    border-radius: 14px;
    background: rgba(255,255,255,.55);
    color: #708098;
    box-shadow: 0 10px 26px rgba(63, 80, 107, .06);
    backdrop-filter: blur(12px);
  }
  body.is-authenticated .side-note strong { color: #46566f; font-size: 11px; }
  body.is-authenticated .side-note p { margin: 6px 0; font-size: 11px; }
}

@media (max-width: 720px) {
  .sidebar {
    background: rgba(255,255,255,.78);
    border-color: rgba(148,163,184,.2);
    backdrop-filter: blur(18px) saturate(145%);
    -webkit-backdrop-filter: blur(18px) saturate(145%);
  }
  .nav::before { display: none; }
  .nav-icon {
    display: inline-grid;
    width: 18px;
    height: 18px;
    margin-right: 4px;
    place-items: center;
    color: currentColor;
    vertical-align: middle;
  }
  .nav-icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
}

/* 2.8.9 新增订单：用分区色、字段提示和两段式设备选择降低填写负担 */
#orderDialog.large-dialog {
  width: min(1160px, calc(100vw - 24px));
  max-width: 1160px;
}
.order-form-shell { padding: 20px 22px 24px; background: #fff; }
#orderDialog .sticky-dialog-head { margin: -6px -6px 12px; padding: 12px 6px 14px; }
#orderDialog .sticky-dialog-head > div:first-child { min-width: 190px; }
#orderDialog:focus { outline: none; }
#orderDialog .sticky-dialog-head {
  position: relative;
  top: auto;
  z-index: auto;
  background: transparent;
  border-bottom: 0;
  backdrop-filter: none;
}
#orderDialog .order-save-bar {
  position: sticky;
  top: 0;
  z-index: 45;
  display: flex;
  justify-content: flex-end;
  margin: 0 0 6px;
  padding: 0;
  background: transparent;
  pointer-events: none;
}
#orderDialog .order-save-bar .order-sticky-save {
  min-width: 116px;
  pointer-events: auto;
}
.order-header-status {
  display: grid;
  gap: 3px;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.order-header-status .input { width: 170px; min-height: 38px; padding: 8px 30px 8px 10px; font-size: 12px; }
.order-form-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0 0 12px;
  padding: 9px 12px;
  border: 1px solid #e7eaf0;
  border-radius: 10px;
  color: #64748b;
  background: #fafbfc;
  font-size: 11px;
  font-weight: 750;
}
.order-form-legend span { display: inline-flex; align-items: center; gap: 6px; }
.order-form-legend i { width: 7px; height: 7px; border-radius: 50%; }
.legend-required i { background: #f59e0b; box-shadow: 0 0 0 3px #fef3c7; }
.legend-auto i { background: #10b981; box-shadow: 0 0 0 3px #d1fae5; }
.legend-optional i { background: #3b82f6; box-shadow: 0 0 0 3px #dbeafe; }

#orderDialog .order-section-tone {
  position: relative;
  overflow: hidden;
  margin: 12px 0;
  padding: 15px 16px 16px;
  border-radius: 14px;
  border-left-width: 4px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, .035);
}
#orderDialog .tone-blue { border-color: #bfdbfe; border-left-color: #3b82f6; background: #f8fbff; }
#orderDialog .tone-violet { border-color: #ddd6fe; border-left-color: #8b5cf6; background: #fbfaff; }
#orderDialog .tone-amber { border-color: #fde68a; border-left-color: #f59e0b; background: #fffdf7; }
#orderDialog .tone-green { border-color: #bbf7d0; border-left-color: #10b981; background: #f8fefb; }
#orderDialog .tone-slate { border-color: #dbe3ed; border-left-color: #64748b; background: #fbfcfd; }
#orderDialog .order-section-title { justify-content: flex-start; align-items: flex-start; }
.order-section-title > div { min-width: 0; }
.order-section-title .order-product-actions { margin-left: auto; }
.order-section-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  color: #fff;
  background: #334155;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
}
.tone-blue .order-section-number { background: #2563eb; }
.tone-violet .order-section-number { background: #7c3aed; }
.tone-amber .order-section-number { background: #d97706; }
#orderDialog .order-primary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
#orderDialog .order-primary-grid .span-2 { grid-column: span 2; }
#orderDialog .order-rental-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
#orderDialog .form-grid label.field-required,
#orderDialog .form-grid label.field-auto,
#orderDialog .form-grid label.field-optional { position: relative; padding-top: 1px; }
.field-hint {
  position: absolute;
  top: 0;
  right: 0;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 850;
  line-height: 1.35;
}
.field-hint.required { color: #a16207; background: #fef3c7; }
.field-hint.auto { color: #047857; background: #d1fae5; }
.field-hint.optional { color: #1d4ed8; background: #dbeafe; }
#orderDialog .field-required > .input,
#orderDialog .field-required .source-picker > .input { border-color: #fcd34d; background: #fffef8; }
#orderDialog .field-auto > .input,
#orderDialog .field-auto .source-picker > .input { border-color: #a7f3d0; background: #fbfffd; }
#orderDialog .field-optional > .input,
#orderDialog .field-optional .source-picker > .input { border-color: #bfdbfe; background: #fcfdff; }
#orderDialog .input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, .12); background: #fff; }
.compact-source-picker { grid-template-columns: minmax(0, 1fr) auto; }
.compact-source-picker .tiny-btn { min-height: 42px; }

.order-device-workspace { display: grid; gap: 12px; }
.order-model-browser { display: grid; gap: 9px; }
#orderDialog .order-device-tools { display: block; margin-bottom: 0; }
#orderDialog .order-device-tools .input { width: 100%; background: #fff; }
.order-device-model-groups {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
}
.order-device-model-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  flex: 0 0 245px;
  min-width: 0;
  gap: 9px;
  padding: 9px;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  color: #334155;
  background: #fff;
  text-align: left;
  cursor: pointer;
  scroll-snap-align: start;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.order-device-model-card:hover { border-color: #a78bfa; transform: translateY(-1px); }
.order-device-model-card.active { border-color: #7c3aed; box-shadow: 0 0 0 2px rgba(124, 58, 237, .1); }
.order-device-model-image { display: grid; place-items: center; width: 46px; height: 46px; overflow: hidden; border-radius: 9px; color: #7c3aed; background: #f3f0ff; font-size: 10px; }
.order-device-model-image img { width: 100%; height: 100%; object-fit: cover; }
.order-device-model-copy { display: grid; min-width: 0; gap: 2px; }
.order-device-model-copy small { color: #8b5cf6; font-size: 9px; font-style: normal; }
.order-device-model-copy strong { overflow: hidden; color: #172033; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.order-device-model-copy em { overflow: hidden; color: #64748b; font-size: 9.5px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.order-device-model-card > i { color: #94a3b8; font-size: 20px; font-style: normal; }
.order-device-picker { overflow: hidden; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; }
.order-device-active-group { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; border-bottom: 1px solid #edf0f4; background: #faf9ff; }
.order-device-active-group > div { display: grid; min-width: 0; gap: 2px; }
.order-device-active-group small { color: #8b5cf6; font-size: 9px; font-weight: 800; }
.order-device-active-group strong { color: #172033; font-size: 13px; }
.order-device-active-group span { color: #64748b; font-size: 10px; }
.order-device-checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.order-device-row {
  display: grid;
  grid-template-columns: auto 8px minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  gap: 9px;
  padding: 11px 13px;
  border-bottom: 1px solid #edf0f4;
  background: #fff;
  cursor: pointer;
}
.order-device-row:nth-child(odd) { border-right: 1px solid #edf0f4; }
.order-device-row:hover { background: #fafcff; }
.order-device-row.selected { background: #f5f3ff; box-shadow: inset 3px 0 #8b5cf6; }
.order-device-row.disabled { opacity: .52; cursor: not-allowed; }
.order-device-row input { width: 16px; height: 16px; accent-color: #7c3aed; }
.order-device-status-dot { width: 7px; height: 7px; border-radius: 50%; }
.order-device-status-dot.free { background: #10b981; box-shadow: 0 0 0 3px #d1fae5; }
.order-device-status-dot.busy { background: #f59e0b; box-shadow: 0 0 0 3px #fef3c7; }
.order-device-row-copy { display: grid; min-width: 0; gap: 2px; }
.order-device-row-copy strong { overflow: hidden; color: #172033; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.order-device-row-copy span,
.order-device-row-copy small { overflow: hidden; color: #64748b; font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
.order-device-row > b { color: #64748b; font-size: 9px; white-space: nowrap; }
.order-device-row.selected > b { color: #6d28d9; }
.order-product-actions .btn { min-height: 34px; }
.order-product-actions .order-device-toggle {
  color: #6d28d9;
  border-color: #c4b5fd;
  background: #f5f3ff;
}
.order-product-actions .order-device-toggle:hover { background: #ede9fe; }
.operation-log-page-head { align-items: flex-end; gap: 20px; }
.operation-log-toolbar { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.operation-log-toolbar label { display: grid; gap: 4px; color: #64748b; font-size: 11px; font-weight: 800; }
.operation-log-toolbar .input { min-width: 132px; }
.operation-log-toolbar .operation-log-search { min-width: 220px; }
.operation-log-summary { display: flex; align-items: center; gap: 12px; margin: 14px 0 10px; color: #64748b; font-size: 13px; }
.operation-log-summary strong { color: #172033; font-size: 15px; }
.operation-log-list { display: grid; gap: 8px; }
.operation-log-entry {
  display: grid; grid-template-columns: 11px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  width: 100%; padding: 14px 16px; border: 1px solid #e4eaf2; border-radius: 13px;
  color: #172033; background: #fff; text-align: left; cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.operation-log-entry:hover { border-color: #93c5fd; box-shadow: 0 6px 18px rgba(30, 64, 175, .08); transform: translateY(-1px); }
.operation-log-entry .operation-log-dot { width: 9px; height: 9px; border-radius: 50%; background: #2563eb; box-shadow: 0 0 0 4px #dbeafe; }
.operation-log-entry.scope-device .operation-log-dot { background: #7c3aed; box-shadow: 0 0 0 4px #ede9fe; }
.operation-log-entry.scope-system .operation-log-dot { background: #64748b; box-shadow: 0 0 0 4px #e2e8f0; }
.operation-log-entry .operation-log-main { display: grid; min-width: 0; gap: 5px; }
.operation-log-entry .operation-log-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.operation-log-entry .operation-log-title strong { font-size: 14px; }
.operation-log-entry .operation-log-title em { padding: 2px 7px; border-radius: 999px; color: #1d4ed8; background: #eff6ff; font-size: 10px; font-style: normal; font-weight: 800; }
.operation-log-rollback-state { padding: 2px 7px; border-radius: 999px; font-size: 10px; font-style: normal; font-weight: 800; }
.operation-log-rollback-state.can { color: #047857; background: #ecfdf5; }
.operation-log-rollback-state.view { color: #64748b; background: #f1f5f9; }
.operation-log-entry.scope-device .operation-log-title em { color: #6d28d9; background: #f5f3ff; }
.operation-log-entry.scope-system .operation-log-title em { color: #475569; background: #f1f5f9; }
.operation-log-entry .operation-log-main p { overflow: hidden; margin: 0; color: #64748b; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.operation-log-entry .operation-log-meta { display: grid; justify-items: end; gap: 4px; color: #94a3b8; font-size: 11px; white-space: nowrap; }
.operation-log-entry .operation-log-meta strong { color: #475569; font-size: 11px; }
.operation-log-entry .operation-log-chevron { color: #94a3b8; font-size: 18px; }
.operation-log-detail-dialog { width: min(760px, calc(100vw - 28px)); }
.operation-log-detail-content { display: grid; gap: 16px; padding: 4px 0 8px; }
.operation-log-detail-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.operation-log-detail-meta > div { display: grid; gap: 4px; padding: 11px 12px; border-radius: 11px; background: #f8fafc; }
.operation-log-detail-meta span { color: #94a3b8; font-size: 11px; }
.operation-log-detail-meta strong { overflow: hidden; color: #334155; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.operation-log-detail-block { display: grid; gap: 8px; }
.operation-log-detail-block h4 { margin: 0; color: #334155; font-size: 13px; }
.operation-log-detail-block p { margin: 0; padding: 11px 12px; border-radius: 10px; color: #475569; background: #f8fafc; white-space: pre-wrap; word-break: break-word; }
.operation-log-rollback-note p { border: 1px solid #fecdd3; color: #9f1239; background: #fff1f2; }
.operation-log-rollback-note.unavailable p { border-color: #e2e8f0; color: #64748b; background: #f8fafc; }
#rollbackOperationLogBtn:disabled { border-color: #e2e8f0; color: #94a3b8; background: #f1f5f9; box-shadow: none; cursor: not-allowed; }
.operation-log-diff { overflow: hidden; border: 1px solid #e2e8f0; border-radius: 11px; }
.operation-log-diff-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr); border-bottom: 1px solid #edf0f4; }
.operation-log-diff-row:last-child { border-bottom: 0; }
.operation-log-diff-row > div { min-width: 0; padding: 10px 12px; color: #475569; font-size: 12px; word-break: break-word; }
.operation-log-diff-row > div:first-child { color: #334155; background: #f8fafc; font-weight: 800; }
.operation-log-diff-row .before { background: #fff7ed; color: #9a3412; }
.operation-log-diff-row .after { background: #f0fdf4; color: #166534; }
.operation-log-diff-head { display: grid; grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr); color: #94a3b8; background: #f8fafc; font-size: 11px; font-weight: 800; }
.operation-log-diff-head > div { padding: 8px 12px; }
@media (max-width: 900px) {
  .operation-log-page-head { align-items: stretch; }
  .operation-log-toolbar { justify-content: flex-start; }
  .operation-log-detail-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .operation-log-toolbar > * { flex: 1 1 150px; }
  .operation-log-toolbar .operation-log-search { min-width: 0; }
  .operation-log-entry { grid-template-columns: 11px minmax(0, 1fr) auto; padding: 12px; }
  .operation-log-entry .operation-log-meta { display: none; }
  .operation-log-detail-meta { grid-template-columns: 1fr; }
  .operation-log-diff-row, .operation-log-diff-head { grid-template-columns: 88px minmax(0, 1fr) minmax(0, 1fr); }
  .operation-log-diff-row > div, .operation-log-diff-head > div { padding: 8px; font-size: 11px; }
}
#selectedDeviceSummary { max-width: 620px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.order-advanced-block { margin: 12px 0; border: 1px solid #e2e8f0; border-radius: 13px; background: #fff; }
.order-advanced-block > summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 15px; list-style: none; cursor: pointer; }
.order-advanced-block > summary::-webkit-details-marker { display: none; }
.order-advanced-block > summary span { display: grid; gap: 3px; }
.order-advanced-block > summary strong { color: #172033; font-size: 13px; }
.order-advanced-block > summary small { color: #64748b; font-size: 10px; }
.order-advanced-block > summary b { color: #2563eb; font-size: 10px; }
.order-advanced-block[open] > summary { border-bottom: 1px solid #e7eaf0; background: #f8fafc; }
.order-advanced-block[open] > summary b::before { content: '收起 · '; }
.order-advanced-content { padding: 0 14px 4px; }
#orderDialog .order-health-section { padding: 12px 14px; }
#orderDialog .order-health-section .form-section-head { margin-bottom: 8px; }
#orderDialog .dialog-actions { margin-top: 12px; }

@media (max-width: 900px) {
  #orderDialog .order-primary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #orderDialog .order-rental-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-device-checklist { grid-template-columns: 1fr; }
  .order-device-row:nth-child(odd) { border-right: 0; }
}

@media (max-width: 720px) {
  #orderDialog.large-dialog { width: calc(100vw - 8px); }
  .order-form-shell { padding: 10px; }
  #orderDialog .sticky-dialog-head { display: grid; grid-template-columns: 1fr; gap: 9px; margin: -10px -10px 9px; padding: 10px; }
  #orderDialog .dialog-head-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; width: 100%; }
  .order-header-status { min-width: 0; }
  .order-header-status .input { width: 100%; }
  #orderDialog .dialog-head-save { min-width: 0; padding-inline: 10px; }
  #orderDialog.order-dialog-creating .dialog-head-actions { display: flex; gap: 8px; }
  #orderDialog.order-dialog-creating .dialog-head-save { min-width: 96px; }
  .order-form-legend { gap: 7px 12px; }
  #orderDialog .order-primary-grid,
  #orderDialog .order-rental-grid { grid-template-columns: 1fr; }
  #orderDialog .order-primary-grid .span-2,
  #orderDialog .order-rental-grid .span-2 { grid-column: 1; }
  #orderDialog .order-section-tone { padding: 12px; }
  .order-section-title { display: grid; grid-template-columns: auto 1fr; }
  .order-section-title .order-product-actions { grid-column: 1 / -1; width: 100%; margin-left: 0; }
  .order-product-actions .btn { flex: 1; }
  .order-device-model-card { flex-basis: 220px; }
  .order-device-active-group { align-items: flex-start; flex-direction: column; }
  #selectedDeviceSummary { max-width: 72vw; }
}

@media (max-width: 430px) {
  #orderDialog .dialog-head-actions { grid-template-columns: 1fr auto auto; }
  .order-header-status { grid-column: 1 / -1; }
  #orderDialog.order-dialog-creating .dialog-head-actions { gap: 6px; }
  #orderDialog.order-dialog-creating .dialog-head-save { min-width: 92px; padding-inline: 8px; }
  #orderDialog.order-dialog-creating .close-dialog { flex-basis: 32px; }
  .order-form-legend { display: grid; grid-template-columns: 1fr; }
  .compact-source-picker { grid-template-columns: 1fr; }
  .compact-source-picker .tiny-btn { width: 100%; }
}

/* v2.4.0 目标站点风格设备管理工作台；原库存表保留为第三种视图 */
.inventory-section-head { align-items: flex-start; }
.section-kicker { margin-bottom: 5px; color: #e11d48; font-size: 9px; font-weight: 900; letter-spacing: .16em; }
.inventory-command-bar { max-width: 780px; justify-content: flex-end; gap: 7px; }
.inventory-command-bar .btn { min-height: 34px; padding: 7px 10px; font-size: 10.5px; white-space: nowrap; }
.inventory-brand-chips { display: flex; gap: 7px; overflow-x: auto; margin: 13px 0 10px; padding: 2px 1px 6px; scrollbar-width: thin; }
.inventory-brand-chip { flex: 0 0 auto; min-height: 32px; padding: 6px 13px; border: 1px solid #e2e8f0; border-radius: 8px; color: #475569; background: #fff; font-size: 11px; font-weight: 750; cursor: pointer; transition: .16s ease; }
.inventory-brand-chip:hover { border-color: #fda4af; color: #be123c; }
.inventory-brand-chip.active { border-color: #e11d48; color: #fff; background: #e11d48; box-shadow: 0 4px 11px rgba(225, 29, 72, .16); }
.inventory-filter-shell { display: grid; grid-template-columns: minmax(260px, 1.7fr) repeat(4, minmax(128px, .72fr)) auto; gap: 8px; align-items: start; padding: 10px; border: 1px solid #e7eaf0; border-radius: 12px; background: #fff; }
.inventory-mobile-filter-toggle { display: none; }
.inventory-advanced-filters { display: contents; }
.inventory-search-block { display: grid; gap: 3px; }
.inventory-search-block span { padding-left: 2px; color: #94a3b8; font-size: 9.5px; }
.inventory-filter-shell .input { min-width: 0; }
.inventory-filter-shell > .btn { min-height: 44px; }
.inventory-view-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 11px 0; }
.inventory-view-switch { flex: 0 0 auto; }
.inventory-view-switch button { min-width: 88px; }
.inventory-model-grid { display: grid; grid-template-columns: 1fr; gap: 10px; overflow: visible; }
.inventory-model-card { display: grid; grid-template-columns: 122px minmax(0, 1fr) 270px; min-height: 132px; overflow: visible; min-width: 0; border: 1px solid #e5e9f0; border-radius: 12px; background: #fff; box-shadow: 0 4px 14px rgba(15, 23, 42, .045); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.inventory-model-card:hover { transform: translateY(-2px); border-color: #fecdd3; box-shadow: 0 10px 24px rgba(15, 23, 42, .08); }
.inventory-model-image { display: grid; place-items: center; overflow: hidden; border-right: 1px solid #edf0f4; color: #94a3b8; background: linear-gradient(145deg, #f8fafc, #eef2f7); font-size: 12px; }
.inventory-model-image img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.inventory-model-body { min-width: 0; padding: 14px 16px 12px; }
.inventory-model-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 7px; }
.inventory-model-meta span { padding: 3px 7px; border-radius: 999px; color: #64748b; background: #f1f5f9; font-size: 9.5px; font-weight: 750; }
.inventory-model-body h3 { overflow: hidden; margin: 0 0 8px; color: #0f172a; font-size: 15px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.inventory-model-price { display: flex; align-items: baseline; gap: 5px; }
.inventory-model-price strong { color: #d97706; font-size: 20px; }
.inventory-model-price span { color: #94a3b8; font-size: 10px; }
.inventory-sku { display: flex; width: 100%; justify-content: space-between; gap: 8px; overflow: hidden; margin: 8px 0; padding: 0; border: 0; color: #64748b; background: transparent; font: inherit; font-size: 10.5px; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.inventory-sku span { flex: 0 0 auto; color: #2563eb; }
.inventory-stock-line { display: grid; gap: 3px; max-width: 460px; padding: 8px 10px; border: 1px solid #e7eaf0; border-radius: 8px; background: #f8fafc; }
.inventory-stock-line strong { color: #172033; font-size: 12px; }
.inventory-stock-line span { color: #64748b; font-size: 9.5px; line-height: 1.5; }
.inventory-model-extra { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.inventory-model-extra span { color: #64748b; font-size: 9.5px; }
.inventory-model-extra span:not(:last-child)::after { content: '·'; margin-left: 5px; color: #cbd5e1; }
.inventory-model-actions { display: flex; align-content: center; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px; padding: 14px 16px; border-left: 1px solid #edf0f4; background: #fbfcfe; }
.inventory-model-actions .btn { min-height: 31px; padding: 5px 8px; font-size: 10px; }
.inventory-model-actions .text-btn { width: 100%; text-align: right; font-size: 10.5px; }
.inventory-device-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.inventory-device-card { overflow: hidden; border: 1px solid #e5e9f0; border-radius: 12px; background: #fff; box-shadow: 0 3px 12px rgba(15, 23, 42, .04); }
.inventory-device-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 13px 14px 10px; }
.inventory-device-card-head > div { min-width: 0; }
.inventory-device-card-head > div > span { color: #94a3b8; font-size: 9.5px; }
.inventory-device-thumb { display: grid; width: 48px; height: 48px; flex: 0 0 48px; place-items: center; overflow: hidden; border: 1px solid #edf0f4; border-radius: 9px; color: #94a3b8; background: #f8fafc; font-size: 8px; }
.inventory-device-thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.inventory-device-title { flex: 1 1 auto; }
.inventory-device-card-head h3 { overflow: hidden; margin: 4px 0 0; color: #172033; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.inventory-device-identifiers { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; padding: 0 14px 10px; }
.inventory-device-identifiers button { display: grid; gap: 3px; overflow: hidden; padding: 8px 9px; border: 1px solid #edf0f4; border-radius: 8px; color: #334155; background: #f8fafc; text-align: left; cursor: pointer; }
.inventory-device-identifiers button span { color: #94a3b8; font-size: 8.5px; font-weight: 800; letter-spacing: .08em; }
.inventory-device-identifiers button strong { overflow: hidden; font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.inventory-device-metrics { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid #edf0f4; border-bottom: 1px solid #edf0f4; }
.inventory-device-metrics span { display: grid; gap: 3px; padding: 9px; border-right: 1px solid #edf0f4; color: #94a3b8; font-size: 8.5px; }
.inventory-device-metrics span:last-child { border-right: 0; }
.inventory-device-metrics strong { color: #334155; font-size: 10.5px; }
.inventory-device-note { min-height: 42px; margin: 0; padding: 10px 14px; color: #64748b; font-size: 10.5px; line-height: 1.55; }
.inventory-device-actions { display: flex; flex-wrap: wrap; gap: 12px; padding: 9px 14px; border-top: 1px solid #edf0f4; background: #fbfcfe; }
.inventory-device-actions .text-btn { font-size: 10.5px; }
.inventory-card-limit-note { grid-column: 1 / -1; padding: 12px; border: 1px dashed #cbd5e1; border-radius: 10px; color: #64748b; background: #f8fafc; font-size: 10.5px; text-align: center; }
.model-editor-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; margin-bottom: 14px; }
.model-image-editor { display: grid; align-content: start; gap: 8px; }
.model-image-preview { display: grid; place-items: center; overflow: hidden; height: 180px; border: 1px dashed #cbd5e1; border-radius: 11px; color: #94a3b8; background: #f8fafc; }
.model-image-preview img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.model-main-fields { align-content: start; }
.inline-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.accessory-check-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.accessory-check { display: flex; gap: 8px; align-items: flex-start; padding: 9px; border: 1px solid #e7eaf0; border-radius: 9px; background: #fff; }
.accessory-check input { margin-top: 3px; accent-color: #e11d48; }
.accessory-check span { display: grid; gap: 2px; min-width: 0; }
.accessory-check strong { color: #334155; font-size: 11px; }
.accessory-check small { color: #94a3b8; font-size: 9.5px; }
.package-editor-list { display: grid; gap: 8px; }
.package-editor-row { display: grid; grid-template-columns: 1fr 100px 120px minmax(150px, 1.2fr) minmax(130px, 1fr) 34px; gap: 7px; align-items: end; padding: 9px; border: 1px solid #e7eaf0; border-radius: 10px; background: #fff; }
.package-editor-row label { gap: 4px; color: #64748b; font-size: 9px; }
.package-accessory-select { min-height: 70px; }
.maintenance-history-list { display: grid; gap: 8px; margin-top: 16px; }
.maintenance-history-list > h3 { margin: 0 0 3px; }
.maintenance-history-row { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 10px 11px; border: 1px solid #e7eaf0; border-radius: 9px; background: #fff; }
.maintenance-history-row strong { color: #334155; font-size: 11.5px; }
.maintenance-history-row p { margin: 4px 0; color: #64748b; font-size: 10.5px; }
.maintenance-history-row small { color: #94a3b8; font-size: 9.5px; }

@media (max-width: 1180px) {
  .inventory-filter-shell { grid-template-columns: minmax(240px, 1.5fr) repeat(2, minmax(130px, 1fr)); }
  .inventory-filter-shell .inventory-search-block { grid-column: span 2; }
  .inventory-model-card { grid-template-columns: 108px minmax(0, 1fr) 220px; }
  .package-editor-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .package-note { grid-column: span 2; }
}

@media (max-width: 760px) {
  .inventory-section-head { display: grid; }
  .inventory-command-bar { display: flex; max-width: 100%; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding: 2px 0 5px; }
  .inventory-command-bar .btn { flex: 0 0 auto; }
  .inventory-filter-shell { grid-template-columns: 1fr 1fr; padding: 8px; }
  .inventory-filter-shell .inventory-search-block { grid-column: 1 / -1; }
  .inventory-filter-shell .btn { grid-column: 1 / -1; }
  .inventory-view-row { align-items: flex-start; flex-direction: column; }
  .inventory-view-switch { display: grid; width: 100%; grid-template-columns: repeat(3, 1fr); }
  .inventory-view-switch button { min-width: 0; }
  .inventory-model-grid, .inventory-device-grid { grid-template-columns: 1fr; }
  .inventory-model-card { grid-template-columns: 1fr; grid-template-rows: 150px 1fr auto; }
  .inventory-model-image { border-right: 0; border-bottom: 1px solid #edf0f4; }
  .inventory-model-actions { justify-content: flex-start; border-top: 1px solid #edf0f4; border-left: 0; }
  .inventory-model-actions .text-btn { width: auto; margin-left: auto; }
  .model-editor-layout { grid-template-columns: 1fr; }
  .model-image-preview { height: 160px; }
  .accessory-check-grid { grid-template-columns: 1fr 1fr; }
  .package-editor-row { grid-template-columns: 1fr 1fr; }
  .package-editor-row .package-note { grid-column: 1 / -1; }
  .inventory-device-metrics { grid-template-columns: 1fr 1fr; }
  .inventory-device-metrics span:nth-child(2) { border-right: 0; }
  .inventory-device-metrics span:nth-child(-n+2) { border-bottom: 1px solid #edf0f4; }
}

@media (max-width: 430px) {
  .inventory-filter-shell { grid-template-columns: 1fr; }
  .inventory-filter-shell .inventory-search-block, .inventory-filter-shell .btn { grid-column: 1; }
  .accessory-check-grid { grid-template-columns: 1fr; }
  .package-editor-row { grid-template-columns: 1fr; }
  .package-editor-row .package-note { grid-column: 1; }
}
.form-section { border: 1px solid var(--border); border-radius: 16px; padding: 14px; margin: 16px 0; }
.form-section-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 12px; }
.check-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.check-card { border: 1px solid var(--border); border-radius: 14px; padding: 12px; display: flex; gap: 10px; align-items: flex-start; background: #fff; }
.check-card.disabled { opacity: .55; background: #f8fafc; }
.check-card input { margin-top: 3px; }
.check-card strong { display: block; font-size: 14px; }
.check-card span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.rent-tip { margin-top: 12px; border-radius: 12px; padding: 10px 12px; background: #f8fafc; color: #334155; font-weight: 800; }
.dialog-actions { display: flex; gap: 10px; margin-top: 18px; align-items: center; }
.spacer { flex: 1; }

.legend { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; color: var(--muted); font-size: 13px; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: 6px; vertical-align: -2px; }
.cell-free { background: #f8fafc; border: 1px solid var(--border); }
.cell-booked { background: #dbeafe; border: 1px solid #93c5fd; }
.cell-today { background: #111827; }
.schedule-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 8px; }
.day-cell { min-height: 62px; border-radius: 12px; border: 1px solid var(--border); padding: 8px; background: #f8fafc; font-size: 12px; display: flex; flex-direction: column; justify-content: space-between; }
.day-cell.booked { background: #dbeafe; border-color: #93c5fd; color: #1e3a8a; }
.day-cell.today { outline: 3px solid #111827; }
.day-cell strong { font-size: 13px; }
.day-cell span { color: var(--muted); }
.day-cell.booked span { color: #1d4ed8; font-weight: 800; }
.day-cell.conflict { background: #fee2e2; border-color: #fca5a5; color: var(--red-text); }

.date-range { display: flex; gap: 8px; align-items: center; }
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  background: #111827;
  color: #fff;
  padding: 12px 14px;
  border-radius: 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: .18s ease;
  max-width: 360px;
}
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1080px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .side-note { grid-column: 1 / -1; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col { grid-template-columns: 1fr; }
  .analysis-visual-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trend-card { grid-column: 1 / -1; }
  .analysis-summary-grid { grid-template-columns: 1fr; }
  .check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid.five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .topbar { padding: 16px; display: block; }
  h1 { font-size: 24px; }
  .subtitle { font-size: 13px; }
  .top-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; justify-content: stretch; margin-top: 14px; }
  .top-actions .btn, .top-actions .file-label { width: 100%; min-height: 42px; }
  .clock-card, .user-card, .auto-backup-card { grid-column: 1 / -1; min-width: 0; width: 100%; }
  .layout { padding: 0 10px 18px; gap: 12px; }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    max-height: none;
    padding: 8px;
    border-radius: 0 0 14px 14px;
    margin: 0 -10px;
  }
  .nav {
    flex: 0 0 auto;
    width: auto;
    margin-bottom: 0;
    padding: 10px 12px;
    white-space: nowrap;
  }
  .side-note { display: none; }
  .section-head, .toolbar { flex-direction: column; align-items: stretch; }
  .stats-grid { grid-template-columns: 1fr; }
  .analysis-switch { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .analysis-visual-grid { grid-template-columns: 1fr; }
  .trend-card { grid-column: auto; }
  .chart-card { min-height: 320px; }
  .chart-canvas { height: 230px; }
  .pie-canvas { height: 220px; }
  .form-grid, .form-grid.five, .check-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .clock-card { width: 100%; }
  .stat-card, .card { padding: 14px; }
  th, td { padding: 10px 11px; }
  .row-actions .text-btn { padding: 7px 0; min-width: 44px; }
}

.header-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.inventory-stats { margin-top: 4px; }
.inventory-stats { display: none; }
.inventory-model-card { cursor: pointer; }
.inventory-model-card:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.inventory-command-bar { align-items: center; }
.inventory-command-bar > .btn { min-height: 38px; white-space: nowrap; }
.inventory-more-menu { position: relative; }
.inventory-more-menu > summary { display: inline-flex; align-items: center; min-height: 38px; list-style: none; cursor: pointer; }
.inventory-more-menu > summary::-webkit-details-marker { display: none; }
.inventory-more-menu > summary::after { content: '⌄'; margin-left: 7px; color: #64748b; }
.inventory-more-popover { position: absolute; top: calc(100% + 8px); right: 0; z-index: 80; display: grid; width: 220px; gap: 7px; padding: 10px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; box-shadow: 0 18px 45px rgba(15,23,42,.16); }
.inventory-more-popover .btn { width: 100%; justify-content: flex-start; min-height: 34px; }
.device-form-section { margin: 12px 0; padding: 15px; background: #fff; }
.device-model-source-section { border-color: #bfdbfe; background: #f8fbff; }
.model-autofill-hint { display: grid; align-content: center; gap: 3px; min-height: 42px; padding: 8px 11px; border: 1px solid #dbeafe; border-radius: 9px; background: #eff6ff; color: #64748b; font-size: 10px; }
.model-autofill-hint strong { color: #1d4ed8; font-size: 11px; }
.model-autofill-hint span { color: #64748b; }
.device-advanced-section > summary { color: #334155; font-size: 13px; font-weight: 800; cursor: pointer; }
.device-advanced-section[open] > summary { margin-bottom: 8px; }
.device-advanced-section > .small-text { margin: 4px 0 12px; }
.order-device-tools { display: grid; grid-template-columns: 190px 1fr; gap: 10px; margin-bottom: 12px; }
.dialog { max-height: calc(100vh - 36px); overflow: auto; }
/* 统一由 dialog 外层承载滚动，避免新增订单等长表单出现两条垂直滚动条。 */
.dialog-inner { max-height: none; overflow: visible; }
/* 模态表单打开时锁定页面底层滚动，只保留弹窗自身滚动条。 */
body:has(dialog[open]) { overflow: hidden; }
#deviceTable td:nth-child(4), #deviceTable td:nth-child(5) { min-width: 190px; }
@media (max-width: 760px) {
  .header-actions { width: 100%; justify-content: stretch; }
  .header-actions .btn { flex: 1; }
  .order-device-tools { grid-template-columns: 1fr; }
  .inventory-command-bar { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .inventory-command-bar > .btn:first-child, .inventory-more-menu { grid-column: 1 / -1; }
  .inventory-more-menu > summary { width: 100%; justify-content: center; }
  .inventory-more-popover { right: 0; left: 0; width: auto; }
}

.auto-backup-card {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 8px;
  align-items: center;
  min-width: 320px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  font-size: 13px;
  color: var(--muted);
}
.auto-backup-card label { display: flex; gap: 6px; align-items: center; font-weight: 800; color: var(--text); }
.auto-backup-card input[type="checkbox"] { width: 16px; height: 16px; }
.mini-select { min-width: 92px; padding: 8px 10px; }
.analysis-tools label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 800; }
.input.tiny { width: 82px; padding: 9px 10px; }
.small-text { font-size: 13px; margin-top: -4px; }
.photo-upload-btn input { display: none; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 12px; }
.photo-card { border: 1px solid var(--border); border-radius: 14px; padding: 10px; background: #f8fafc; display: grid; gap: 8px; }
.photo-card img { width: 100%; height: 120px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); background: #fff; }
.photo-card strong { display: block; font-size: 12px; word-break: break-all; }
.photo-card span { display: block; color: var(--muted); font-size: 12px; }
.danger-text { color: var(--red-text) !important; }
.photo-cell { display: flex; align-items: center; gap: 8px; min-width: 86px; }
.photo-cell img { width: 42px; height: 42px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); background: #fff; }
.photo-cell span { color: var(--muted); font-size: 12px; font-weight: 800; }
@media (max-width: 720px) {
  .auto-backup-card { width: 100%; grid-template-columns: 1fr; }
  .analysis-tools { align-items: stretch; }
  .analysis-tools label { justify-content: space-between; }
  .date-range.analysis-tools { display: grid; grid-template-columns: 1fr; }
  .date-range.analysis-tools > span { display: none; }
}

.section-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
#orderDeviceSectionBody.collapsed { display: none; }
.income-head { align-items: flex-start; }
.inline-label { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; font-weight: 800; }
.compact-stats { margin-bottom: 0; }
.analysis-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  margin: 0 0 14px;
}
.analysis-mode {
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #475569;
  font-weight: 800;
  padding: 9px 14px;
}
.analysis-mode.active {
  background: var(--primary);
  color: #fff;
}
.analysis-visual-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, .8fr) minmax(260px, .8fr);
  gap: 14px;
  align-items: stretch;
}
.chart-card { min-height: 360px; display: flex; flex-direction: column; }
.trend-card { min-width: 0; }
.chart-canvas {
  width: 100%;
  height: 260px;
  display: block;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  background: #fff;
}
.pie-canvas { height: 230px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 12px; color: #475569; font-size: 13px; font-weight: 800; }
.chart-legend.stack { display: grid; gap: 8px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 10px; height: 10px; border-radius: 999px; display: inline-block; flex: 0 0 auto; }
.analysis-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.analysis-summary-grid .table-wrap { min-width: 0; overflow: hidden; }
.analysis-summary-grid table { width: 100%; min-width: 0 !important; table-layout: fixed; }
.analysis-summary-grid th, .analysis-summary-grid td { padding: 9px 7px; font-size: 10.5px; white-space: nowrap; }
.analysis-summary-grid th:first-child, .analysis-summary-grid td:first-child { width: 32%; }
.analysis-summary-grid th:not(:first-child), .analysis-summary-grid td:not(:first-child) { width: 22.666%; }
.rent-price-toolbar { margin-top: 16px; flex-wrap: wrap; }
.rent-price-toolbar .input { max-width: 420px; }
.rent-price-table-wrap { max-height: 620px; }
.rent-price-table-wrap table { min-width: 1680px; }
.rent-price-table-wrap thead th { position: sticky; top: 0; z-index: 2; }
.price-calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 16px; }
.price-calc-card { border: 1px solid var(--border); border-radius: 12px; background: #f8fafc; padding: 12px; min-height: 78px; }
.price-calc-card span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; }
.price-calc-card strong { display: block; margin-top: 8px; font-size: 18px; overflow-wrap: anywhere; }
#dailyIncomeTable tr:first-child td, #monthlyIncomeTable tr:first-child td { background: #fbfdff; }
@media (max-width: 720px) {
  .section-actions { width: 100%; justify-content: stretch; }
  .section-actions .btn { flex: 1; }
  .inline-label { align-items: stretch; flex-direction: column; }
  .rent-price-toolbar .input { max-width: none; }
}

.status-unshipped { background: #fff7df; color: #936900; }
.inline-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 12px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.inline-checkbox input { width: 16px; height: 16px; }
.order-toolbar { flex-wrap: wrap; }
.action-column { min-width: 132px; align-items: center; }
.mini-status { width: 124px; max-width: 124px; padding: 6px 8px; border-radius: 10px; font-size: 12px; }
.schedule-query-card { margin-bottom: 16px; }
.schedule-query-tools { flex-wrap: wrap; justify-content: flex-end; }
.available-device-list { display: grid; gap: 10px; }
.available-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tag-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: #172033;
  border-radius: 999px;
  padding: 8px 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}
.tag-btn span { color: var(--muted); font-size: 12px; font-weight: 700; }
@media (max-width: 720px) {
  .schedule-query-tools { align-items: stretch; flex-direction: column; }
  .schedule-query-tools .input, .schedule-query-tools .btn { max-width: none; width: 100%; }
}

/* v6 optimization */
.ops-card { margin-bottom: 18px; }
.action-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.action-card {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  border-radius: 16px;
  padding: 14px;
  text-align: left;
  display: grid;
  gap: 6px;
  min-height: 116px;
  transition: .16s ease;
}
.action-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #bfdbfe; }
.action-card span { color: var(--muted); font-size: 13px; font-weight: 800; }
.action-card strong { font-size: 28px; line-height: 1; letter-spacing: 0; }
.action-card em { color: var(--muted); font-style: normal; font-size: 12px; line-height: 1.4; }
.action-card.warn { background: #fffbeb; border-color: #fde68a; }
.action-card.danger { background: #fef2f2; border-color: #fecaca; }
.quick-filter-note { min-width: 130px; font-weight: 800; color: var(--primary); }
.health-box { display: grid; gap: 10px; }
.health-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: #f8fafc; border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; }
.health-summary strong { font-size: 14px; }
.health-summary span:last-child { color: var(--muted); font-size: 13px; }
.health-list { border-radius: 14px; border: 1px solid #bbf7d0; background: #f0fdf4; padding: 10px 12px; }
.health-list.has-warning { border-color: #fde68a; background: #fffbeb; }
.health-list p { margin: 4px 0; color: #334155; font-size: 13px; line-height: 1.5; }
.mini-status { min-width: 112px; padding: 7px 8px; border-radius: 10px; }
.action-column { min-width: 160px; }

@media (max-width: 1180px) {
  .action-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-filter-note { width: 100%; }
}


.check-card.rented-device {
  border-color: #fecaca;
  background: #fff1f2;
}
.check-card.rented-device strong,
.check-card.rented-device span { color: #991b1b; }
.rented-warning {
  display: inline-block !important;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b !important;
  font-size: 11px !important;
  font-weight: 900;
}
.renewal-list { display: grid; gap: 10px; }
.renewal-row {
  display: grid;
  grid-template-columns: 1fr 120px 140px 1fr auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #f8fafc;
}
.renewal-row label { font-size: 12px; color: var(--muted); font-weight: 800; }
.renewal-note { min-width: 160px; }
@media (max-width: 880px) {
  .renewal-row { grid-template-columns: 1fr 1fr; }
  .renewal-row .btn { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .renewal-row { grid-template-columns: 1fr; }
}

.check-card.rented-device input { accent-color: #dc2626; }


/* 新增订单：已出租设备只做红色提醒，不禁止勾选 */
.check-card.rented-device { cursor: pointer; pointer-events: auto; }
.check-card.rented-device input { pointer-events: auto; }
.check-card.rented-device input:not(:disabled) { cursor: pointer; }

.photo-missing img {
  opacity: 0.35;
  border: 1px dashed #ef4444;
}
.photo-missing-tip {
  display: none;
  color: #dc2626;
  font-size: 12px;
  margin-top: 4px;
}
.photo-missing .photo-missing-tip {
  display: block;
}


/* add8: photo upload choice + compact schedule availability query */
.photo-actions { gap: 8px; }
.compact-query-card {
  padding: 12px 14px;
  margin-bottom: 12px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.055);
}
.compact-query-head {
  margin-bottom: 8px;
  align-items: center;
}
.compact-query-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.compact-query-title h3 { font-size: 16px; }
.compact-query-title .muted { font-size: 12px; }
.compact-query-tools { gap: 6px; }
.compact-query-tools .input.compact {
  max-width: 142px;
  padding: 8px 10px;
  border-radius: 10px;
}
.compact-query-tools .btn.small { padding: 8px 12px; }
.range-separator { color: var(--muted); font-size: 12px; }
.compact-available-result {
  max-height: 138px;
  overflow: auto;
  padding-right: 2px;
}
.compact-available-result .rent-tip {
  margin-top: 0;
  padding: 7px 10px;
  font-size: 13px;
}
.compact-available-result .available-tags {
  margin-top: 8px;
  gap: 6px;
}
.compact-available-result .tag-btn {
  padding: 6px 8px;
  border-radius: 10px;
  font-size: 12px;
}
.compact-available-result .tag-btn span { font-size: 11px; }
@media (max-width: 720px) {
  .compact-query-head { align-items: stretch; }
  .compact-query-title { display: grid; gap: 2px; }
  .compact-query-tools { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .compact-query-tools .input.compact { flex: 1; min-width: 128px; max-width: none; }
  .compact-query-tools .btn.small { flex: 0 0 auto; }
  .photo-actions { width: auto; justify-content: flex-end; }
}

/* 登录与权限 */
body:not(.is-authenticated) .topbar,
body:not(.is-authenticated) .layout,
body:not(.is-authenticated) dialog {
  display: none;
}
/* 退出后隐藏业务区，避免移动端布局规则再次将其显示。 */
html body:not(.is-authenticated) .layout,
html body:not(.is-authenticated) .mobile-bottom-nav {
  display: none !important;
}
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}
body.is-authenticated .login-screen { display: none; }
.login-card {
  width: min(460px, 100%);
  background: rgba(255,255,255,.96);
  border: 1px solid var(--border);
  border-radius: 26px;
  box-shadow: 0 28px 80px rgba(15,23,42,.14);
  padding: 28px;
  display: grid;
  gap: 16px;
}
.login-brand h1 { font-size: 28px; }
.login-brand p { margin-top: 10px; color: var(--muted); line-height: 1.7; }
.login-card label,
.account-form label {
  color: #475569;
  font-size: 13px;
  font-weight: 800;
  display: grid;
  gap: 7px;
}
.login-error { color: var(--red-text); min-height: 22px; font-weight: 800; }
.full-width { width: 100%; }
.user-card {
  min-width: 150px;
  background: rgba(255,255,255,.94);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
}
.user-card span { display: block; font-size: 12px; color: var(--muted); }
.user-card strong { display: block; margin-top: 2px; font-size: 15px; }
.user-card .text-btn { margin-top: 6px; font-size: 12px; }
body.role-user .admin-only,
body.role-user .admin-only-panel { display: none !important; }
.account-form { display: grid; gap: 14px; align-self: start; }
button:disabled, select:disabled { opacity: .55; cursor: not-allowed; }

@media (max-width: 760px) {
  .login-card { padding: 22px; }
  .user-card { width: 100%; }
}

/* v2.1.3 大类档期总览：宽度/高度可调 */
.category-schedule-card {
  overflow: hidden;
}
.category-schedule-head {
  align-items: flex-start;
  gap: 12px;
}
.category-schedule-summary {
  margin: 10px 0 12px;
}

.category-width-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 12px;
  padding: 10px 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  background: #f8fafc;
}
.category-width-tools label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  color: #334155;
}
.input.mini-number {
  width: 88px;
  padding: 7px 8px;
}

.category-schedule-scroll {
  overflow: auto;
  max-height: var(--category-schedule-height, 1400px);
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #ffffff;
}
.category-schedule-grid {
  min-width: max-content;
  display: grid;
  gap: 0;
}
.category-schedule-row,
.category-device-row {
  display: grid;
  grid-template-columns: var(--category-device-width, 180px) repeat(var(--schedule-days, 121), var(--category-cell-width, 80px));
  min-height: 50px;
}
.category-schedule-header {
  position: sticky;
  top: 0;
  z-index: 3;
}
.category-device-head,
.category-date-cell,
.category-device-name,
.category-day-cell {
  border-right: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}
.category-device-head,
.category-device-name {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #f8fafc;
}
.category-device-head {
  z-index: 4;
  padding: 10px;
  font-weight: 700;
}
.category-date-cell {
  background: #f8fafc;
  padding: 10px 4px;
  text-align: center;
  font-size: 12px;
  color: #475569;
  font-weight: 700;
}
.category-device-name {
  width: var(--category-device-width, 180px);
  padding: 8px 10px;
  text-align: left;
  border: 0;
  border-right: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  cursor: pointer;
  display: grid;
  gap: 4px;
  color: #0f172a;
}
.category-device-name strong {
  font-size: 13px;
  line-height: 1.25;
}
.category-device-name .status-pill {
  width: fit-content;
  font-size: 11px;
  padding: 2px 8px;
}
.category-device-name:hover {
  background: #eef2ff;
}
.category-day-cell {
  min-width: var(--category-cell-width, 80px);
  height: 50px;
  display: grid;
  place-items: center;
  font-size: 11px;
  color: #64748b;
  background: #f0fdf4;
  padding: 3px 4px;
}
.category-device-row.device-instock .category-device-name {
  background: #f0fdf4;
  border-left: 4px solid #22c55e;
}
.category-device-row.device-busy .category-device-name {
  background: #f8fafc;
  border-left: 4px solid #60a5fa;
}
.category-cell-text {
  width: 100%;
  display: grid;
  gap: 1px;
  text-align: center;
  line-height: 1.1;
}
.category-cell-text strong {
  display: block;
  font-size: 12px;
  font-weight: 900;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.category-cell-text small {
  display: block;
  font-size: 11px;
  font-weight: 800;
  opacity: .86;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.free-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .14);
}
.category-day-cell.booked {
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 700;
}
.category-day-cell.conflict {
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 800;
}
.category-day-cell.today,
.category-date-cell.today {
  box-shadow: inset 0 0 0 2px #f59e0b;
}
@media (max-width: 720px) {
  .category-schedule-head { align-items: stretch; }
  .category-schedule-row,
  .category-device-row {
    grid-template-columns: var(--category-device-width, 180px) repeat(var(--schedule-days, 121), var(--category-cell-width, 80px));
  }
  .category-device-name,
  .category-device-head {
    width: var(--category-device-width, 180px);
  }
  .category-day-cell {
    min-width: var(--category-cell-width, 80px);
  }
}

/* 新增十三：发货/验收录像管理 */
.hidden { display: none !important; }
.video-dialog { max-width: 760px; width: min(94vw, 760px); }
.video-stage {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: #020617;
  min-height: 320px;
  display: grid;
  place-items: center;
  border: 1px solid #1e293b;
}
.video-stage video {
  width: 100%;
  max-height: 56vh;
  object-fit: contain;
  background: #020617;
}
.recording-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  background: rgba(185, 28, 28, .92);
  color: #fff;
  font-weight: 900;
  border-radius: 999px;
  padding: 8px 12px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .25);
}
.video-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  color: #475569;
  font-size: 13px;
}
.video-meta span,
.video-meta strong {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 6px 10px;
}
.video-error {
  min-height: 22px;
  color: #b91c1c;
  font-weight: 700;
  margin-top: 10px;
  font-size: 13px;
}
.video-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  line-height: 1.45;
}
.video-link-row a {
  font-weight: 800;
  color: #2563eb;
  text-decoration: none;
}
.video-link-row span { color: #64748b; }
@media (max-width: 720px) {
  .video-stage { min-height: 240px; }
  .video-meta { font-size: 12px; }
}

/* 新增十四：录像/拍照/上传处理界面优化 */
.video-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 10px 0 12px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}
.video-toolbar label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  color: #334155;
}
.video-toolbar .small-note {
  flex: 1 1 280px;
  line-height: 1.5;
}
.camera-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  color: #cbd5e1;
  font-weight: 700;
  padding: 20px;
  pointer-events: none;
}
.video-actions {
  flex-wrap: wrap;
}
.video-saved-info {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  color: #14532d;
  font-size: 13px;
  line-height: 1.6;
  word-break: break-all;
}
.video-saved-info code {
  background: rgba(255,255,255,.75);
  border: 1px solid #dcfce7;
  padding: 2px 5px;
  border-radius: 6px;
}
.video-link-row a[title] {
  max-width: 100px;
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}
@media (max-width: 720px) {
  .video-stage { min-height: 220px; }
  .video-toolbar { align-items: stretch; }
  .video-toolbar label,
  .video-toolbar .btn,
  .video-actions .btn { width: 100%; justify-content: center; }
  .video-toolbar select { flex: 1; min-width: 0; }
}

/* v2.0.17 十五：订单备注列与紧凑显示 */
.order-note-cell {
  max-width: 180px;
  min-width: 120px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.45;
  font-size: 12px;
  color: var(--text);
}
.video-error {
  white-space: pre-wrap;
}

.order-address-cell {
  min-width: 220px;
  max-width: 360px;
  white-space: normal;
  line-height: 1.45;
  color: var(--text);
}
.category-due-date {
  display: inline-flex;
  align-items: center;
  margin-top: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.2;
  background: rgba(245, 158, 11, 0.12);
  color: #92400e;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

/* v2.1.5 数据分析榜单与设备栏高度限制 */
.ranking-cards { align-items: stretch; }
.ranking-table-wrap { max-height: 360px; overflow: auto; }
.analysis-device-wrap { max-height: 560px; overflow: auto; }
.analysis-device-wrap table thead th,
.ranking-table-wrap table thead th { position: sticky; top: 0; z-index: 2; background: #f8fafc; }
.analysis-device-name {
  max-height: 48px;
  overflow: hidden;
  line-height: 1.35;
  min-width: 180px;
}
.analysis-device-name strong,
.analysis-device-name span {
  display: block;
  word-break: break-word;
}
@media (max-width: 900px) {
  .ranking-cards { grid-template-columns: 1fr; }
  .analysis-device-wrap { max-height: 460px; }
}


/* v2.1.7 综合性能优化：手机端更流畅、降低重绘和渲染压力 */
.performance-note {
  background: #f8fafc;
  color: #64748b;
  font-weight: 700;
  text-align: center;
}
.panel.active {
  /* 活动面板内有下拉菜单、提示层等需要跨出内容盒绘制的浮层，不能使用 paint containment。 */
  content-visibility: visible;
  contain-intrinsic-size: auto;
}
.table-wrap,
.category-schedule-scroll,
.analysis-device-wrap,
.ranking-table-wrap {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: auto;
}
.category-schedule-grid {
  contain: layout paint;
}
.category-day-cell,
.category-date-cell,
.category-device-name {
  contain: layout paint;
}
@media (max-width: 720px) {
  :root {
    --shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
    --radius: 14px;
  }
  html { scroll-behavior: auto; }
  body { background: var(--bg); }
  .topbar { padding: 14px 12px 10px; }
  h1 { font-size: 21px; letter-spacing: 0; }
  .subtitle { font-size: 12px; line-height: 1.45; }
  .top-actions { gap: 8px; }
  .top-actions .btn,
  .file-label { flex: 1 1 calc(50% - 8px); min-height: 40px; padding: 9px 10px; }
  .clock-card { min-width: 0; padding: 10px 12px; }
  .clock-card strong { font-size: 15px; }
  .layout { gap: 12px; padding: 0 10px 18px; }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 8px;
    border-radius: 0 0 14px 14px;
    box-shadow: 0 6px 18px rgba(15,23,42,.06);
  }
  .nav {
    flex: 0 0 auto;
    width: auto;
    min-width: 86px;
    margin: 0;
    padding: 9px 10px;
    text-align: center;
    font-size: 13px;
  }
  .side-note { display: none; }
  .section-head { margin-bottom: 10px; gap: 10px; }
  .section-head h2 { font-size: 20px; }
  .card,
  .stat-card {
    padding: 12px;
    box-shadow: none;
  }
  .table-wrap { box-shadow: none; }
  .stats-grid { gap: 10px; margin-bottom: 10px; }
  .stat-card strong { font-size: 20px; }
  .toolbar { gap: 8px; margin-bottom: 10px; }
  .input { padding: 9px 10px; border-radius: 10px; }
  .btn { border-radius: 10px; padding: 9px 10px; transition: none; }
  .btn:hover { transform: none !important; }
  table { min-width: 760px; }
  th, td { padding: 9px 10px; font-size: 12px; line-height: 1.4; }
  .row-actions { gap: 6px; }
  .text-btn { font-size: 12px; }
  .status-pill { padding: 4px 8px; font-size: 11px; }
  .dialog { width: calc(100vw - 12px); max-height: calc(100vh - 12px); border-radius: 16px; }
  .dialog-inner { padding: 14px; max-height: calc(100vh - 12px); }
  .dialog-head { gap: 8px; margin-bottom: 12px; }
  .form-section { padding: 10px; margin: 10px 0; }
  .category-width-tools { gap: 8px; padding: 8px; }
  .category-width-tools label { flex: 1 1 120px; justify-content: space-between; }
  .input.mini-number { width: 76px; }
  .category-schedule-scroll { max-height: var(--category-schedule-height, 1400px); }
  .category-device-name strong { font-size: 12px; }
  .category-cell-text strong { font-size: 11px; }
  .category-cell-text small { font-size: 10px; }
  .analysis-device-wrap { max-height: 62vh; }
  .ranking-table-wrap { max-height: 46vh; }
  .analysis-switch { width: 100%; }
  .analysis-visual-grid,
  .analysis-summary-grid { grid-template-columns: 1fr; }
  .chart-card { min-height: 320px; }
  .chart-canvas { height: 230px; }
  .pie-canvas { height: 220px; }
}


/* v2.1.9 手机端滑动修复：避免表格/卡片区域拦截页面纵向滚动 */
@media (max-width: 720px) {
  html,
  body {
    width: 100%;
    min-height: 100%;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
  }
  .layout,
  .content,
  .panel.active {
    min-height: auto;
    overflow: visible;
  }
  .panel.active {
    content-visibility: visible;
    contain-intrinsic-size: auto;
  }
  .card,
  .table-wrap,
  .analysis-device-wrap,
  .ranking-table-wrap {
    touch-action: pan-y pan-x;
    overscroll-behavior: auto;
  }
  .table-wrap {
    overflow-x: auto;
    overflow-y: auto;
    max-height: none;
    max-width: 100%;
  }
  .ranking-table-wrap {
    max-height: none;
    overflow-x: auto;
    overflow-y: visible;
  }
  .analysis-device-wrap {
    overflow-x: auto;
    overflow-y: auto;
  }
  .category-schedule-scroll {
    touch-action: pan-x pan-y;
    overscroll-behavior: auto;
  }
}

@media (prefers-reduced-motion: reduce), (max-width: 720px) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* v2.1.9: 修复手机端主体区域滑动问题；空置率/出租率榜单显示全部未卖出设备。 */

/* v2.1.11 大类商品分析表 */
.category-analysis-wrap { max-height: 420px; overflow: auto; }
.category-analysis-wrap table { min-width: 980px; }
.category-analysis-wrap table thead th { position: sticky; top: 0; z-index: 2; background: #f8fafc; }
@media (max-width: 720px) {
  .category-analysis-wrap { max-height: none; overflow-x: auto; overflow-y: visible; touch-action: pan-x pan-y; }
}

/* v2.1.27 每日订单：四象限工作台与归还确认 */
.daily-orders-head { margin-bottom: 12px; }
.daily-date-card { padding: 14px 16px; margin-bottom: 14px; box-shadow: 0 8px 24px rgba(15, 23, 42, .05); }
.daily-date-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.daily-date-label { display: flex; align-items: center; gap: 9px; color: #475569; font-size: 13px; font-weight: 800; }
.daily-date-label .input { width: 170px; }
.daily-pin-control { background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; }
.daily-date-summary { margin-left: auto; color: #334155; font-size: 14px; font-weight: 900; }
.daily-order-stats { margin-bottom: 14px; }
.daily-order-stats .stat-card { position: relative; overflow: hidden; box-shadow: 0 8px 24px rgba(15, 23, 42, .05); }
.daily-order-stats .stat-card::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--primary); }
.daily-order-stats .stat-card:nth-child(1)::before { background: #16a34a; }
.daily-order-stats .stat-card:nth-child(2)::before { background: #2563eb; }
.daily-order-stats .stat-card:nth-child(3)::before { background: #7c3aed; }
.daily-order-stats .stat-card:nth-child(4)::before { background: #dc2626; }
.daily-order-board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.daily-order-section { padding: 16px; min-width: 0; box-shadow: 0 8px 24px rgba(15, 23, 42, .05); }
.daily-return-section { border-top: 4px solid #16a34a; }
.daily-new-section { border-top: 4px solid #2563eb; }
.daily-ship-section { border-top: 4px solid #7c3aed; }
.daily-overdue-section { border-top: 4px solid #dc2626; }
.daily-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.daily-section-head h3 { margin-top: 2px; font-size: 19px; }
.daily-section-kicker { color: #94a3b8; font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.daily-count-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 10px; border-radius: 999px; background: #f1f5f9; color: #334155; font-size: 15px; font-weight: 900; }
.daily-section-desc { margin: 8px 0 12px; min-height: 38px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.daily-order-list { display: grid; gap: 9px; max-height: 520px; overflow: auto; padding-right: 2px; }
.daily-list-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 2px 2px; color: #475569; font-size: 12px; font-weight: 900; }
.daily-list-title:first-child { padding-top: 0; }
.daily-order-item { display: grid; gap: 7px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.daily-order-item.is-overdue { border-color: #fecaca; background: #fffafa; }
.daily-order-item.is-returned { border-color: #bbf7d0; background: #fbfffc; }
.daily-order-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.daily-order-top strong { font-size: 14px; overflow-wrap: anywhere; }
.daily-order-main { color: #334155; font-size: 13px; font-weight: 800; line-height: 1.45; overflow-wrap: anywhere; }
.daily-order-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.daily-order-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding-top: 2px; }
.daily-order-empty { padding: 20px 12px; border: 1px dashed #d8dee9; border-radius: 12px; color: var(--muted); text-align: center; font-size: 13px; background: #fafbfc; }
.daily-return-button { border: 0; border-radius: 9px; padding: 7px 10px; background: #dcfce7; color: #166534; font-size: 12px; font-weight: 900; }
.daily-return-button:hover { background: #bbf7d0; }
.daily-return-button:disabled { opacity: .5; cursor: not-allowed; }

@media (max-width: 960px) {
  .daily-order-board { grid-template-columns: 1fr; }
  .daily-section-desc { min-height: 0; }
}

@media (max-width: 720px) {
  .daily-date-card { padding: 11px; }
  .daily-date-toolbar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .daily-date-label { grid-column: 1 / -1; justify-content: space-between; }
  .daily-date-label .input { width: min(64vw, 220px); }
  .daily-pin-control, .daily-date-summary { grid-column: 1 / -1; margin-left: 0; }
  .daily-date-toolbar .btn { width: 100%; }
  .daily-order-board { gap: 10px; }
  .daily-order-section { padding: 12px; }
  .daily-order-list { max-height: none; overflow: visible; }
}

/* v2.1.28 多屏幕响应式布局、表格横向浏览、弹窗顶部保存 */
.topbar,
.layout { max-width: 1920px; }
.layout { grid-template-columns: clamp(180px, 12vw, 220px) minmax(0, 1fr); }
.content,
.panel.active { width: 100%; min-width: 0; }

.table-scroll-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
  padding: 8px 10px;
  border: 1px solid #dbe3f0;
  border-radius: 11px;
  background: #f8fbff;
}
.table-scroll-tools[hidden] { display: none !important; }
.table-scroll-hint { color: #526174; font-size: 12px; font-weight: 800; }
.table-scroll-buttons { display: flex; gap: 8px; flex: 0 0 auto; }
.table-scroll-buttons .btn:disabled { opacity: .38; cursor: not-allowed; transform: none; }
.table-wrap {
  scrollbar-width: auto;
  scrollbar-color: #94a3b8 #eef2f7;
  scrollbar-gutter: stable;
}
.table-wrap::-webkit-scrollbar { width: 12px; height: 12px; }
.table-wrap::-webkit-scrollbar-track { background: #eef2f7; border-radius: 999px; }
.table-wrap::-webkit-scrollbar-thumb { background: #94a3b8; border: 3px solid #eef2f7; border-radius: 999px; }
.table-wrap::-webkit-scrollbar-thumb:hover { background: #64748b; }
.table-wrap:focus-visible { outline: 3px solid rgba(37, 99, 235, .24); outline-offset: 2px; }
.table-wrap.has-horizontal-overflow { background-image: linear-gradient(to right, transparent calc(100% - 18px), rgba(15, 23, 42, .05)); }

.order-wide-table { min-width: 1760px; }
.operation-wide-table { min-width: 1260px; }
.inventory-wide-table { min-width: 1420px; }
.order-table-wrap thead th,
.operation-table-wrap thead th,
.inventory-table-wrap thead th { position: sticky; top: 0; z-index: 3; background: #f8fafc; }
.order-wide-table th:first-child,
.order-wide-table td:first-child,
.operation-wide-table th:first-child,
.operation-wide-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 112px;
  background: #fff;
  box-shadow: 8px 0 12px -12px rgba(15, 23, 42, .45);
}
.order-wide-table thead th:first-child,
.operation-wide-table thead th:first-child { z-index: 5; background: #f8fafc; }

.dialog-inner { position: relative; }
.sticky-dialog-head {
  position: sticky;
  top: 0;
  z-index: 40;
  margin: -6px -6px 16px;
  padding: 10px 6px 12px;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid rgba(226, 232, 240, .95);
  backdrop-filter: blur(12px);
}
.dialog-head-actions { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.dialog-head-save { min-width: 116px; box-shadow: 0 7px 18px rgba(37, 99, 235, .18); }
.dialog-head-delete { min-width: 116px; }

/* 新增订单：状态、保存和关闭始终保持同一水平操作行，窄屏也不让按钮掉到下一行。 */
#orderDialog.order-dialog-creating .dialog-head-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  min-width: 0;
}
#orderDialog.order-dialog-creating .order-header-status {
  flex: 1 1 auto;
  min-width: 0;
}
#orderDialog.order-dialog-creating .order-header-status .input {
  width: min(170px, 100%);
}
#orderDialog.order-dialog-creating .dialog-head-save {
  flex: 0 0 auto;
  min-width: 116px;
  white-space: nowrap;
}
#orderDialog.order-dialog-creating .close-dialog {
  flex: 0 0 36px;
}

@media (min-width: 1600px) {
  .topbar { padding-left: 32px; padding-right: 32px; }
  .layout { padding-left: 32px; padding-right: 32px; gap: 20px; }
  .large-dialog { max-width: 1180px; }
  th, td { padding-left: 15px; padding-right: 15px; }
}

@media (min-width: 1081px) and (max-width: 1365px) {
  .topbar { padding: 18px 16px 14px; gap: 14px; }
  .layout { grid-template-columns: 178px minmax(0, 1fr); gap: 12px; padding: 0 16px 24px; }
  .sidebar { padding: 9px; }
  .nav { padding: 10px; font-size: 13px; }
  .side-note { padding: 10px; }
  .section-head { gap: 12px; margin-bottom: 14px; }
  .stats-grid { gap: 10px; }
  .stat-card, .card { padding: 15px; }
  th, td { padding: 11px 12px; }
}

@media (min-width: 761px) {
  .order-table-wrap,
  .operation-table-wrap,
  .inventory-table-wrap { max-height: calc(100vh - 260px); }
}

@media (max-width: 720px) {
  .content,
  .panel.active { width: 100%; min-width: 0; }
  .section-head > .btn { width: 100%; min-height: 42px; }
  .order-toolbar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #orderSearch,
  #shipmentSearch,
  #inspectionSearch,
  .order-toolbar .quick-filter-note { grid-column: 1 / -1; }
  .order-toolbar .input.compact,
  .order-toolbar .input.wide { max-width: none; }
  .table-scroll-tools {
    position: sticky;
    top: 58px;
    z-index: 18;
    margin-bottom: 6px;
    padding: 7px 8px;
    background: rgba(248, 251, 255, .97);
    backdrop-filter: blur(10px);
  }
  .table-scroll-hint { max-width: 42vw; line-height: 1.3; }
  .table-scroll-buttons { gap: 5px; }
  .table-scroll-buttons .btn { padding: 8px 9px; font-size: 12px; }
  .order-wide-table { min-width: 1540px; }
  .operation-wide-table { min-width: 1120px; }
  .inventory-wide-table { min-width: 1260px; }
  .order-wide-table th:first-child,
  .order-wide-table td:first-child,
  .operation-wide-table th:first-child,
  .operation-wide-table td:first-child { min-width: 94px; }
  .dialog-head-actions { gap: 7px; }
  .dialog-head-save { min-width: 104px; padding: 9px 11px; }
  .sticky-dialog-head {
    top: 0;
    margin: -14px -14px 12px;
    padding: 11px 14px 10px;
    align-items: center;
  }
  .sticky-dialog-head h2 { font-size: 18px; }
  .sticky-dialog-head p { display: none; }
  .sticky-dialog-head .icon-btn { width: 36px; height: 36px; }
  .dialog-actions { flex-wrap: wrap; }
  .dialog-actions .spacer { display: none; }
  .dialog-actions .btn { flex: 1 1 calc(50% - 8px); }
}

@media (max-width: 390px) {
  .table-scroll-hint { display: none; }
  .table-scroll-tools { justify-content: flex-end; }
  .table-scroll-buttons { width: 100%; }
  .table-scroll-buttons .btn { flex: 1; }
  .dialog-head-save { min-width: 92px; font-size: 13px; }
}

/* v2.1.29 手机端高密度布局：修复双栏挤压并提高一屏信息量 */
.mobile-system-tools-toggle { display: none; }
.system-tools-group { display: contents; }

@media (max-width: 720px) {
  html,
  body { width: 100%; max-width: 100%; overflow-x: hidden; }

  .topbar {
    display: grid;
    gap: 6px;
    width: 100%;
    padding: 8px 8px 6px;
  }
  .topbar > div:first-child { min-width: 0; }
  .topbar .eyebrow,
  .topbar .subtitle { display: none; }
  .topbar h1 { margin: 0; font-size: 17px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .top-actions {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(112px, .65fr);
    gap: 6px;
    width: 100%;
    margin: 0;
    align-items: stretch;
  }
  .clock-card,
  .user-card {
    grid-column: auto;
    min-width: 0;
    width: auto;
    min-height: 48px;
    border-radius: 10px;
    padding: 7px 9px;
    box-shadow: none;
  }
  .clock-card span { display: none; }
  .clock-card strong { margin: 0; font-size: 12px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .user-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "role exit" "name exit";
    align-items: center;
    column-gap: 6px;
  }
  .user-card span { grid-area: role; font-size: 10px; }
  .user-card strong { grid-area: name; margin: 0; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .user-card .text-btn { grid-area: exit; margin: 0; padding: 6px 0; font-size: 11px; }
  .mobile-system-tools-toggle {
    display: inline-flex;
    grid-column: 1 / -1;
    width: 100%;
    min-height: 34px !important;
    padding: 6px 10px !important;
    font-size: 12px;
  }
  .system-tools-group {
    display: none;
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  body.mobile-tools-open .system-tools-group { display: grid; }
  .system-tools-group > .btn,
  .system-tools-group > .file-label {
    width: 100%;
    min-height: 34px !important;
    padding: 6px 4px !important;
    border-radius: 9px;
    font-size: 10px;
    line-height: 1.2;
    text-align: center;
  }
  .system-tools-group .auto-backup-card {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto 88px minmax(0, 1fr);
    gap: 6px;
    min-width: 0;
    width: 100%;
    padding: 7px 8px;
    border-radius: 10px;
    box-shadow: none;
  }
  .system-tools-group .auto-backup-card label { white-space: nowrap; font-size: 11px; }
  .system-tools-group .auto-backup-card .input { min-width: 0; width: 88px; padding: 6px; font-size: 11px; }
  .system-tools-group .auto-backup-card > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; align-self: center; }

  .layout {
    display: block !important;
    grid-template-columns: none !important;
    width: 100%;
    max-width: 100%;
    padding: 0 6px 14px;
  }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    width: calc(100% + 12px);
    max-width: none;
    margin: 0 -6px 8px;
    padding: 5px 6px;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    border-width: 0 0 1px;
    border-radius: 0;
    scrollbar-width: none;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .06);
  }
  .sidebar::-webkit-scrollbar { display: none; }
  .nav {
    flex: 0 0 auto;
    width: auto;
    min-width: 70px;
    min-height: 34px;
    margin: 0;
    padding: 7px 9px;
    border-radius: 9px;
    font-size: 11px;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
  }
  .content,
  .panel,
  .panel.active { width: 100%; min-width: 0; max-width: 100%; }

  .section-head {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
  }
  .section-head > div:first-child { min-width: 0; }
  .section-head h2 { font-size: 18px; line-height: 1.25; white-space: nowrap; }
  .section-head p { display: none; }
  .section-head > .btn,
  .section-head .header-actions { flex: 0 0 auto; width: auto; }
  .section-head > .btn { min-height: 34px; padding: 7px 10px; font-size: 12px; }
  .header-actions { gap: 5px; }
  .header-actions .btn { min-height: 34px; padding: 7px 8px; font-size: 11px; }

  .card,
  .stat-card { padding: 10px; border-radius: 10px; box-shadow: none; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-bottom: 8px; }
  .stat-card span { font-size: 10px; line-height: 1.25; }
  .stat-card strong { margin-top: 4px; font-size: 18px; line-height: 1.15; }
  .stat-card p { margin-top: 4px; font-size: 10px; line-height: 1.3; }
  .two-col { gap: 8px; }
  .mt { margin-top: 8px; }
  .card-head { gap: 7px; margin-bottom: 8px; }
  .card-head h3 { font-size: 15px; }
  .muted { font-size: 11px; }
  .mini-list { gap: 6px; }
  .mini-item { gap: 7px; padding: 8px; border-radius: 9px; }
  .mini-item p { font-size: 11px; line-height: 1.35; }
  .ops-card { margin-bottom: 8px; }
  .action-grid { gap: 7px; }
  .action-card { min-height: 78px; padding: 9px; border-radius: 10px; gap: 3px; }
  .action-card span { font-size: 10px; }
  .action-card strong { font-size: 21px; }
  .action-card em { font-size: 10px; line-height: 1.25; }

  .toolbar,
  .order-toolbar { gap: 6px; margin-bottom: 7px; }
  .order-toolbar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-toolbar .quick-filter-note { display: none; }
  .toolbar .input,
  .toolbar .btn,
  .inline-checkbox { min-height: 34px; padding: 7px 8px; border-radius: 9px; font-size: 11px; }
  .inline-checkbox { justify-content: center; }
  .inline-checkbox input { width: 15px; height: 15px; }

  .table-scroll-tools {
    top: 44px;
    min-height: 38px;
    margin-bottom: 5px;
    padding: 4px 5px;
    border-radius: 8px;
  }
  .table-scroll-hint { max-width: 38vw; font-size: 10px; line-height: 1.2; }
  .table-scroll-buttons { gap: 4px; }
  .table-scroll-buttons .btn { min-height: 30px; padding: 5px 7px; border-radius: 7px; font-size: 10px; }
  .table-wrap { border-radius: 9px; scrollbar-gutter: auto; }
  .table-wrap::-webkit-scrollbar { width: 8px; height: 8px; }
  table { min-width: 680px; }
  .order-wide-table { min-width: 1320px; }
  .operation-wide-table { min-width: 980px; }
  .inventory-wide-table { min-width: 1100px; }
  th,
  td { padding: 6px 7px; font-size: 10.5px; line-height: 1.3; }
  th { font-size: 10px; }
  .status-pill { padding: 3px 6px; font-size: 9.5px; }
  .order-note-cell { min-width: 86px; max-width: 120px; font-size: 10px; }
  .order-address-cell { min-width: 150px; max-width: 210px; }
  .order-wide-table th:first-child,
  .order-wide-table td:first-child,
  .operation-wide-table th:first-child,
  .operation-wide-table td:first-child { width: 122px; min-width: 122px; max-width: 122px; }
  .row-actions.action-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: 2px 5px;
    width: 108px;
    min-width: 108px;
  }
  .action-column .text-btn { min-width: 0; padding: 3px 0; font-size: 9.5px; line-height: 1.2; white-space: nowrap; text-align: left; }
  .action-column .mini-status { grid-column: 1 / -1; width: 108px; min-width: 108px; max-width: 108px; padding: 4px 5px; font-size: 9.5px; }

  .daily-date-card { margin-bottom: 7px; padding: 8px; }
  .daily-date-toolbar { gap: 5px; }
  .daily-date-toolbar .btn { min-height: 32px; padding: 6px 7px; font-size: 10px; }
  .daily-date-label { font-size: 10px; }
  .daily-date-label .input { height: 32px; font-size: 11px; }
  .daily-date-summary { font-size: 10px; }
  .daily-order-board { gap: 7px; }
  .daily-order-section { padding: 9px; }
  .daily-section-head h3 { font-size: 15px; }
  .daily-section-desc { display: none; }
  .daily-order-list { gap: 5px; }
  .daily-order-item { gap: 4px; padding: 8px; border-radius: 9px; }
  .daily-order-main { font-size: 11px; }
  .daily-order-meta { gap: 2px 8px; font-size: 10px; }

  .dialog { width: calc(100vw - 4px); max-height: calc(100vh - 4px); border-radius: 12px; }
  .dialog-inner { padding: 10px; max-height: calc(100vh - 4px); }
  .sticky-dialog-head { margin: -10px -10px 8px; padding: 8px 10px; }
  .sticky-dialog-head h2 { font-size: 16px; }
  .sticky-dialog-head .icon-btn { width: 32px; height: 32px; font-size: 20px; }
  .dialog-head-save { min-width: 88px; min-height: 32px; padding: 6px 8px; font-size: 11px; }
  .dialog .form-grid,
  .dialog .form-grid.five { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .dialog .span-2 { grid-column: 1 / -1; }
  .dialog .form-grid label { gap: 4px; font-size: 10px; }
  .dialog .input { min-width: 0; padding: 7px 8px; font-size: 12px; }
  .dialog textarea.input { min-height: 58px; }
  .form-section { margin: 7px 0; padding: 8px; border-radius: 10px; }
  .form-section-head { gap: 6px; margin-bottom: 7px; }
  .form-section-head h3 { font-size: 14px; }
  .rent-tip { margin-top: 7px; padding: 7px 8px; border-radius: 8px; font-size: 10px; }
  .source-picker { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .source-picker select { grid-column: 1 / -1; }
  .source-picker .tiny-btn { min-height: 30px; padding: 5px; font-size: 10px; }
  .check-grid { grid-template-columns: 1fr; gap: 5px; }
  .check-card { padding: 7px; border-radius: 9px; }
  .dialog-actions { gap: 6px; margin-top: 8px; }
  .dialog-actions .btn { min-height: 34px; padding: 7px 8px; font-size: 11px; }
}

@media (max-width: 360px) {
  .top-actions { grid-template-columns: minmax(0, 1fr) 104px; }
  .system-tools-group { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .system-tools-group .auto-backup-card { grid-column: 1 / -1; grid-template-columns: auto 82px; }
  .system-tools-group .auto-backup-card > span { grid-column: 1 / -1; }
  .section-head h2 { font-size: 16px; }
  .stats-grid { gap: 5px; }
  .dialog .form-grid,
  .dialog .form-grid.five { gap: 5px; }
}

/* v2.1.31：键盘方向键横移 + 24/27 寸屏幕高密度适配 */
.topbar,
.layout { max-width: none; }
.table-scroll-tools {
  justify-content: flex-start;
  min-height: 30px;
  margin-bottom: 5px;
  padding: 5px 9px;
  border-style: dashed;
  border-radius: 8px;
  background: #f8fbff;
}
.table-scroll-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: none;
  font-size: 11px;
  line-height: 1.25;
}
.table-scroll-hint::before {
  content: "↔";
  color: var(--primary);
  font-size: 15px;
  line-height: 1;
}
.table-scroll-buttons { display: none !important; }
.table-wrap.has-horizontal-overflow { cursor: auto; }
.table-wrap.has-horizontal-overflow:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .24);
  outline-offset: 2px;
}

@media (min-width: 721px) {
  .topbar {
    padding: 13px 18px 9px;
    gap: 14px;
  }
  .topbar > div:first-child { flex: 0 1 520px; min-width: 280px; }
  .topbar h1 { margin-top: 3px; font-size: 23px; line-height: 1.2; }
  .topbar .subtitle { margin-top: 4px; font-size: 12px; line-height: 1.35; }
  .top-actions { flex: 1 1 0; min-width: 0; gap: 6px; }
  .top-actions > .btn,
  .top-actions > .file-label { padding: 7px 9px; border-radius: 9px; font-size: 11px; }
  .clock-card {
    min-width: 178px;
    padding: 8px 11px;
    border-radius: 11px;
    box-shadow: none;
  }
  .clock-card strong { margin-top: 2px; font-size: 14px; }
  .user-card { min-width: 128px; padding: 8px 10px; border-radius: 11px; box-shadow: none; }
  .auto-backup-card {
    min-width: 280px;
    padding: 7px 9px;
    border-radius: 11px;
    font-size: 11px;
    box-shadow: none;
  }
  .auto-backup-card .input { padding-top: 6px; padding-bottom: 6px; }

  .layout {
    grid-template-columns: clamp(158px, 9.5vw, 182px) minmax(0, 1fr);
    gap: 10px;
    padding: 0 18px 18px;
  }
  .sidebar { top: 8px; padding: 7px; max-height: calc(100vh - 16px); }
  .nav { margin-bottom: 3px; padding: 8px 9px; border-radius: 8px; font-size: 12px; }
  .side-note { margin-top: 8px; padding: 9px; border-radius: 9px; font-size: 11px; }
  .side-note strong { margin-bottom: 4px; }
  .side-note p { margin: 4px 0; }

  .section-head { align-items: center; gap: 10px; margin-bottom: 9px; }
  .section-head h2 { font-size: 21px; line-height: 1.25; }
  .section-head p { margin-top: 3px; font-size: 12px; line-height: 1.35; }
  .section-head > .btn,
  .header-actions .btn { min-height: 34px; padding: 7px 10px; border-radius: 9px; font-size: 12px; }
  .toolbar,
  .order-toolbar { gap: 6px; margin-bottom: 6px; }
  .toolbar .input,
  .order-toolbar .input,
  .toolbar .btn,
  .order-toolbar .btn,
  .inline-checkbox { min-height: 34px; padding: 7px 9px; border-radius: 9px; font-size: 11px; }

  .order-table-wrap,
  .operation-table-wrap,
  .inventory-table-wrap { max-height: calc(100dvh - 202px); }
  .table-wrap::-webkit-scrollbar { width: 10px; height: 10px; }
  th,
  td { padding: 7px 8px; font-size: 11.5px; line-height: 1.28; }
  th { font-size: 11px; }
  .muted { font-size: 11px; }
  .status-pill { padding: 3px 6px; font-size: 10px; }
  .action-column { min-width: 138px; gap: 4px 7px; }
  .action-column .text-btn { font-size: 10.5px; line-height: 1.2; }
  .mini-status { width: 130px; min-width: 130px; max-width: 130px; padding: 5px 6px; font-size: 10.5px; }
  .order-note-cell { min-width: 100px; max-width: 150px; font-size: 11px; line-height: 1.3; }
  .order-address-cell { min-width: 180px; max-width: 260px; line-height: 1.3; }
  .order-wide-table { min-width: 1520px; }
  .operation-wide-table { min-width: 1080px; }
  .inventory-wide-table { min-width: 1220px; }
  .order-wide-table th:first-child,
  .order-wide-table td:first-child,
  .operation-wide-table th:first-child,
  .operation-wide-table td:first-child { min-width: 142px; }
}

@media (min-width: 2200px) {
  .topbar { padding-left: 24px; padding-right: 24px; }
  .layout {
    grid-template-columns: 180px minmax(0, 1fr);
    padding-left: 24px;
    padding-right: 24px;
  }
  .order-wide-table { min-width: 1580px; }
  .operation-wide-table { min-width: 1120px; }
  .inventory-wide-table { min-width: 1280px; }
}

@media (min-width: 721px) and (max-height: 900px) {
  .topbar { padding-top: 8px; padding-bottom: 6px; }
  .topbar .eyebrow,
  .topbar .subtitle { display: none; }
  .topbar h1 { margin: 0; font-size: 20px; }
  .section-head { margin-bottom: 6px; }
  .section-head p { display: none; }
  .order-table-wrap,
  .operation-table-wrap,
  .inventory-table-wrap { max-height: calc(100dvh - 132px); }
  th,
  td { padding-top: 5px; padding-bottom: 5px; font-size: 11px; line-height: 1.22; }
  th { font-size: 10.5px; }
  .table-scroll-tools { min-height: 25px; padding-top: 3px; padding-bottom: 3px; }
}

@media (max-width: 720px) {
  .table-scroll-tools {
    position: sticky;
    top: 43px;
    justify-content: flex-start;
    min-height: 26px;
    padding: 3px 6px;
  }
  .table-scroll-hint { width: 100%; max-width: none; font-size: 9.5px; }
  .table-scroll-hint::before { font-size: 13px; }
  .order-wide-table { min-width: 1180px; }
  .operation-wide-table { min-width: 900px; }
  .inventory-wide-table { min-width: 1000px; }
  th,
  td { padding: 5px 6px; font-size: 10px; line-height: 1.24; }
  th { font-size: 9.5px; }
  .order-wide-table th:first-child,
  .order-wide-table td:first-child,
  .operation-wide-table th:first-child,
  .operation-wide-table td:first-child { width: 112px; min-width: 112px; max-width: 112px; }
  .row-actions.action-column { width: 100px; min-width: 100px; }
  .action-column .mini-status { width: 100px; min-width: 100px; max-width: 100px; }
}

/* v2.2.0 参考界面视觉重构：仅调整界面外观，不改业务功能与数据逻辑 */
.sidebar-brand,
.sidebar-label,
.sidebar-rule { display: none; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.eyebrow {
  color: var(--primary);
  letter-spacing: .14em;
}

.btn {
  min-height: 36px;
  border-radius: 9px;
  padding: 8px 13px;
  font-weight: 750;
  box-shadow: none;
}
.btn.primary {
  background: linear-gradient(135deg, #f1194c 0%, #e81342 100%);
  box-shadow: 0 7px 18px rgba(239, 23, 72, .18);
}
.btn.primary:hover { background: var(--primary-dark); }
.btn.secondary {
  background: #fff;
  border-color: #e8ebf0;
  color: #4b5565;
}
.btn.secondary:hover { background: #f8f9fb; border-color: #dce1e8; }
.btn.danger { border: 1px solid #ffd6de; }

.input {
  border-color: #e5e9ef;
  border-radius: 9px;
  background: #fff;
}
.input:focus {
  border-color: rgba(239, 23, 72, .45);
  box-shadow: 0 0 0 4px rgba(239, 23, 72, .08);
}
.input.readonly { background: #f6f7f9; }

.card,
.stat-card,
.table-wrap {
  border-color: #edf0f4;
  background: #fff;
  box-shadow: 0 4px 15px rgba(15, 23, 42, .045);
}
.card,
.stat-card { border-radius: 14px; }
.table-wrap { border-radius: 14px; }

.stat-card {
  position: relative;
  min-height: 108px;
  overflow: hidden;
  padding: 18px 20px;
}
.stat-card::after {
  content: "";
  position: absolute;
  top: 20px;
  right: 20px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e9fbf4;
}
.stat-card:nth-child(2)::after { background: #eaf7ff; }
.stat-card:nth-child(3)::after { background: #f2f2f3; }
.stat-card:nth-child(4)::after { background: #fff3e4; }
.stat-card:nth-child(5)::after { background: #fff0f3; }
.stat-card:nth-child(6)::after { background: #fff6dd; }
.stat-card strong {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  color: #111827;
  font-size: 27px;
}
.stat-card span,
.stat-card p { color: #8a94a4; }

.action-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.action-card {
  min-height: 122px;
  border-color: #edf0f4;
  border-radius: 13px;
  background: #fff;
  box-shadow: none;
}
.action-card:hover {
  border-color: #ffd0db;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
}
.action-card strong { color: #111827; }

.section-head {
  padding: 17px 19px;
  border: 1px solid #edf0f4;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 15px rgba(15, 23, 42, .045);
}
.section-head h2 {
  color: #121827;
  font-size: 22px;
  font-weight: 850;
}
.section-head p { color: #8a94a4; }
.card-head h3 { color: #1a2130; font-weight: 820; }

.toolbar {
  padding: 10px;
  border: 1px solid #edf0f4;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(15, 23, 42, .035);
}
.inline-checkbox {
  border: 1px solid #e9edf2;
  border-radius: 999px;
  background: #f8f9fb;
}

table { background: #fff; }
th {
  background: #f8f9fb;
  color: #727f91;
  font-weight: 800;
}
th,
td { border-bottom-color: #eff1f5; }
tbody tr { transition: background-color .14s ease; }
tbody tr:hover { background: #fafbfc; }
.order-wide-table thead th:first-child,
.operation-wide-table thead th:first-child,
.inventory-table-wrap thead th { background: #f8f9fb; }

.table-scroll-tools {
  border-color: #e6eaf0;
  background: #fff;
}
.table-scroll-hint::before { color: var(--primary); }

.text-btn { color: #4865a8; }
.text-btn:hover { color: var(--primary); }
.status-pill {
  border: 0;
  border-radius: 999px;
  padding: 5px 9px;
  font-weight: 800;
}
.mini-item,
.daily-order-item,
.check-card {
  border-color: #edf0f4;
  background: #fff;
}

.dialog {
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(15, 23, 42, .24);
}
.dialog::backdrop {
  background: rgba(8, 15, 30, .58);
  backdrop-filter: blur(6px);
}
.sticky-dialog-head {
  border-bottom-color: #eceff3;
  background: rgba(255,255,255,.97);
}
.dialog-head-save { box-shadow: 0 7px 18px rgba(239, 23, 72, .18); }
.form-section {
  border-color: #e9edf2;
  background: #fafbfc;
}
.rent-tip { background: #f4f6f8; }

.login-screen {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 14%, rgba(239, 23, 72, .25), transparent 30%),
    radial-gradient(circle at 84% 82%, rgba(42, 111, 246, .18), transparent 34%),
    #0f172a;
}
.login-screen::before {
  content: "租赁 · 库存 · 档期 · 财务";
  position: absolute;
  left: 7vw;
  bottom: 7vh;
  color: rgba(255,255,255,.05);
  font-size: clamp(34px, 5vw, 82px);
  font-weight: 900;
  letter-spacing: .04em;
  white-space: nowrap;
}
.login-card {
  position: relative;
  z-index: 1;
  width: min(430px, 100%);
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 32px 90px rgba(0,0,0,.28);
}
.login-brand::before {
  content: "租";
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff4f74, #e70e40);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(239,23,72,.28);
}
.login-brand h1 { color: #111827; font-size: 27px; }
.login-brand p { color: #7e8999; }
.login-card .btn.primary { min-height: 44px; }

@media (min-width: 721px) {
  body.is-authenticated {
    display: grid;
    grid-template-columns: 256px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 100vh;
  }

  body.is-authenticated .topbar {
    grid-column: 2;
    grid-row: 1;
  }
  body.is-authenticated .layout { display: contents; }
  body.is-authenticated .sidebar {
    grid-column: 1;
    grid-row: 1 / span 2;
  }
  body.is-authenticated .content {
    grid-column: 2;
    grid-row: 2;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    min-height: 72px;
    padding: 10px 28px;
    align-items: center;
    border-bottom: 1px solid #eceff3;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(14px);
  }
  .topbar-brand-copy { flex: 0 1 430px !important; min-width: 240px !important; }
  .topbar .eyebrow { display: none; }
  .topbar h1 {
    margin: 0;
    color: #1a2130;
    font-size: 18px;
    font-weight: 850;
  }
  .topbar .subtitle { margin-top: 3px; color: #919aaa; font-size: 11px; }
  .top-actions { gap: 7px; }
  .clock-card {
    min-width: 164px;
    padding: 8px 11px;
    border: 1px solid #e9edf2;
    border-radius: 10px;
    background: #f7f8fa;
    color: #1f2937;
  }
  .clock-card span { color: #8a94a4; }
  .clock-card strong { color: #1f2937; font-size: 13px; }
  .user-card {
    min-width: 126px;
    padding: 8px 10px;
    border-color: #e9edf2;
    border-radius: 10px;
    background: #fff;
    box-shadow: none;
  }
  .user-card .text-btn { color: var(--primary); }
  .system-tools-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
  }
  .system-tools-group > .btn,
  .system-tools-group > .file-label { min-height: 32px; padding: 6px 8px; font-size: 10.5px; }
  .auto-backup-card {
    min-width: 248px;
    padding: 6px 8px;
    border-color: #e9edf2;
    border-radius: 10px;
    background: #f8f9fb;
    box-shadow: none;
  }

  .sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    align-self: stretch;
    width: 256px;
    height: 100vh;
    max-height: 100vh;
    padding: 17px 12px 14px;
    overflow-y: auto;
    border: 0;
    border-radius: 0;
    background: #0f192d;
    box-shadow: 8px 0 28px rgba(15, 23, 42, .09);
  }
  .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 4px 15px;
    color: #fff;
  }
  .sidebar-brand-mark {
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ff4f74, #e70e40);
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    box-shadow: 0 9px 22px rgba(239, 23, 72, .28);
  }
  .sidebar-brand strong {
    display: block;
    font-size: 16px;
    font-weight: 850;
    letter-spacing: .01em;
  }
  .sidebar-brand span {
    display: block;
    margin-top: 3px;
    color: #8490a7;
    font-size: 10.5px;
  }
  .sidebar-rule {
    display: block;
    height: 1px;
    margin: 0 -12px 12px;
    background: rgba(255,255,255,.065);
  }
  .sidebar-label {
    display: block;
    padding: 0 12px 8px;
    color: #637087;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .16em;
  }
  .nav {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 42px;
    margin-bottom: 4px;
    padding: 9px 13px;
    border-radius: 10px;
    color: #9aa7bb;
    font-size: 13px;
    font-weight: 740;
  }
  .nav::before {
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    color: #77859c;
    font-size: 13px;
    font-weight: 900;
  }
  .nav[data-tab="dashboard"]::before { content: "▦"; }
  .nav[data-tab="dailyOrders"]::before { content: "日"; }
  .nav[data-tab="orders"]::before { content: "▣"; }
  .nav[data-tab="shipment"]::before { content: "⇢"; }
  .nav[data-tab="inspection"]::before { content: "✓"; }
  .nav[data-tab="inventory"]::before { content: "◇"; }
  .nav[data-tab="rentPrices"]::before { content: "¥"; }
  .nav[data-tab="schedule"]::before { content: "□"; }
  .nav[data-tab="analysis"]::before { content: "⌁"; }
  .nav[data-tab="timeLog"]::before { content: "◷"; }
  .nav[data-tab="users"]::before { content: "◎"; }
  .nav:hover {
    background: rgba(255,255,255,.055);
    color: #fff;
  }
  .nav.active,
  .nav.active:hover {
    background: linear-gradient(135deg, #f01a4b, #e51442);
    color: #fff;
    box-shadow: 0 9px 22px rgba(239, 23, 72, .23);
  }
  .nav.active::before { color: #fff; }
  .side-note {
    margin-top: auto;
    padding: 11px 12px;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 10px;
    background: rgba(255,255,255,.045);
    color: #8490a7;
  }
  .side-note strong { color: #c8d0dc; }
  .side-note p { margin: 5px 0; }

  .content {
    width: 100%;
    min-width: 0;
    padding: 24px 28px 36px;
  }
  .panel.active { width: 100%; min-width: 0; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .two-col { gap: 14px; }
}

@media (min-width: 1500px) {
  body.is-authenticated { grid-template-columns: 264px minmax(0, 1fr); }
  .sidebar { width: 264px; }
  .content { padding-left: 34px; padding-right: 34px; }
}

@media (max-width: 1080px) and (min-width: 721px) {
  body.is-authenticated { grid-template-columns: 210px minmax(0, 1fr); }
  .sidebar { width: 210px; }
  .sidebar-brand strong { font-size: 14px; }
  .content { padding: 18px; }
  .topbar { padding-left: 18px; padding-right: 18px; }
  .topbar-brand-copy { flex-basis: 270px !important; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  :root { --radius: 12px; }
  body { background: #f5f6f8; }
  .topbar {
    border-bottom: 1px solid #e9edf2;
    background: #fff;
  }
  .topbar h1 { color: #182032; }
  .topbar .eyebrow { color: var(--primary); }
  .clock-card {
    border: 1px solid #e8ecf1;
    background: #0f192d;
  }
  .sidebar {
    border: 0;
    border-radius: 0;
    background: #0f192d;
    box-shadow: 0 7px 18px rgba(15,23,42,.14);
  }
  .sidebar-brand,
  .sidebar-label,
  .sidebar-rule { display: none; }
  .nav { color: #aab4c4; }
  .nav.active,
  .nav.active:hover {
    background: var(--primary);
    color: #fff;
  }
  .content { padding-top: 10px; }
  .section-head {
    padding: 12px;
    border-radius: 12px;
  }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-card { min-height: 92px; padding: 12px; }
  .stat-card::after { top: 12px; right: 12px; width: 30px; height: 30px; }
  .toolbar { padding: 7px; }
  .login-screen { padding: 14px; }
  .login-card { padding: 24px 20px; border-radius: 16px; }
  .login-screen::before { display: none; }
}

@media (max-width: 420px) {
  .stats-grid,
  .action-grid { grid-template-columns: 1fr; }
}

/* v2.2.1 尺寸校准：按参考站点实测的 256px 侧栏与 1280px 工作区细化 */
:root {
  --bg: #fbfbfd;
  --primary: #e11d48;
  --primary-dark: #be123c;
  --shadow: 0 4px 14px rgba(15, 23, 42, .045);
  --radius: 12px;
}

.card,
.stat-card,
.table-wrap,
.section-head { border-radius: 12px; }

@media (min-width: 721px) {
  body.is-authenticated {
    grid-template-columns: 256px minmax(0, 1fr);
  }

  .sidebar {
    width: 256px;
    padding: 17px 12px 14px;
    background: #0f172a;
  }
  .sidebar-brand {
    min-height: 60px;
    padding: 0 4px 16px;
  }
  .sidebar-brand-mark {
    flex-basis: 42px;
    width: 42px;
    height: 42px;
  }
  .sidebar-rule { margin-bottom: 14px; }
  .sidebar-label {
    padding: 0 16px 10px;
    font-size: 9px;
  }
  .nav {
    width: 100%;
    min-height: 48px;
    margin-bottom: 8px;
    padding: 12px 16px;
    border-radius: 12px;
    gap: 12px;
    color: #94a3b8;
    font-size: 15px;
    line-height: 24px;
  }
  .nav::before {
    width: 18px;
    height: 18px;
    color: #7f8ca2;
    font-size: 14px;
  }
  .nav.active,
  .nav.active:hover {
    background: #e11d48;
    box-shadow: 0 9px 22px rgba(136, 19, 55, .42);
  }

  .topbar {
    min-height: 60px;
    padding: 6px 20px;
    gap: 12px;
    background: rgba(255,255,255,.97);
  }
  .topbar-brand-copy {
    flex: 0 0 218px !important;
    min-width: 218px !important;
  }
  .topbar h1 {
    font-size: 16px;
    line-height: 1.2;
    white-space: nowrap;
  }
  .topbar .subtitle { display: none; }
  .top-actions {
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
    gap: 6px;
  }
  .clock-card {
    flex: 0 0 150px;
    min-width: 150px;
    padding: 6px 9px;
  }
  .clock-card strong { font-size: 12px; }
  .user-card {
    flex: 0 0 116px;
    min-width: 116px;
    padding: 6px 9px;
  }
  .user-card span,
  .user-card .text-btn { font-size: 10px; }
  .user-card strong { font-size: 12px; }
  .system-tools-group {
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
    gap: 5px;
  }
  .system-tools-group > .btn,
  .system-tools-group > .file-label {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 10px;
  }
  .auto-backup-card {
    grid-template-columns: auto 76px minmax(72px, 1fr);
    flex: 1 1 220px;
    min-width: 210px;
    max-width: 290px;
    padding: 5px 7px;
    gap: 5px;
    font-size: 10px;
  }
  .auto-backup-card label { white-space: nowrap; font-size: 10px; }
  .auto-backup-card .input { width: 76px; min-width: 76px; padding: 5px 6px; font-size: 10px; }
  .auto-backup-card > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 9px;
  }

  .content {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px;
  }
  .section-head {
    min-height: 70px;
    margin-bottom: 14px;
    padding: 14px 18px;
  }
  .section-head h2 { font-size: 22px; }
  .section-head p { font-size: 12px; }
  .stats-grid { gap: 12px; margin-bottom: 16px; }
  .stat-card {
    min-height: 108px;
    padding: 16px 18px;
  }
  .stat-card::after {
    top: 18px;
    right: 18px;
    width: 36px;
    height: 36px;
  }
  .stat-card strong { font-size: 25px; }
  .ops-card { padding: 18px; }
  .action-card { min-height: 112px; padding: 14px 15px; }

  .toolbar,
  .order-toolbar {
    gap: 8px;
    margin-bottom: 10px;
    padding: 10px;
  }
  .toolbar .input,
  .order-toolbar .input,
  .toolbar .btn,
  .order-toolbar .btn,
  .inline-checkbox {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 12.5px;
  }
  .table-scroll-tools {
    min-height: 30px;
    margin-bottom: 7px;
    padding: 5px 9px;
  }
  .table-scroll-hint { font-size: 11.5px; }
  .order-table-wrap,
  .operation-table-wrap,
  .inventory-table-wrap { max-height: calc(100dvh - 224px); }
  .order-wide-table { min-width: 1840px; }
  .operation-wide-table { min-width: 1320px; }
  .inventory-wide-table { min-width: 1500px; }
  th,
  td {
    padding: 9px 10px;
    font-size: 12.5px;
    line-height: 1.35;
  }
  th { font-size: 12px; }
  .muted { font-size: 11.5px; }
  .text-btn { font-size: 11.5px; }
  .status-pill { font-size: 10.5px; }
  .action-column { min-width: 150px; gap: 5px 8px; }
  .action-column .text-btn { font-size: 11px; }
  .mini-status {
    width: 136px;
    min-width: 136px;
    max-width: 136px;
    padding: 6px 7px;
    font-size: 11px;
  }
  .order-note-cell { min-width: 120px; max-width: 170px; }
  .order-address-cell { min-width: 220px; max-width: 300px; }
}

@media (min-width: 721px) and (max-width: 1350px) {
  .topbar-brand-copy { display: none; }
  .topbar { padding-left: 14px; padding-right: 14px; }
  .content { padding: 24px; }
  .system-tools-group { flex-wrap: wrap; }
  .top-actions { flex-wrap: wrap; }
}

@media (min-width: 2200px) {
  body.is-authenticated { grid-template-columns: 256px minmax(0, 1fr); }
  .sidebar { width: 256px; }
  .content { max-width: 1440px; }
}

/* v2.2.2 宽表格列宽校准：减少日期、地址和费用内容逐字换行 */
@media (min-width: 721px) {
  .order-wide-table {
    min-width: 2220px;
    table-layout: auto;
  }
  .order-wide-table th:nth-child(1),
  .order-wide-table td:nth-child(1) { width: 180px; min-width: 180px; }
  .order-wide-table th:nth-child(2),
  .order-wide-table td:nth-child(2) { width: 140px; min-width: 140px; }
  .order-wide-table th:nth-child(3),
  .order-wide-table td:nth-child(3) { width: 104px; min-width: 104px; }
  .order-wide-table th:nth-child(4),
  .order-wide-table td:nth-child(4) { width: 184px; min-width: 184px; }
  .order-wide-table th:nth-child(5),
  .order-wide-table td:nth-child(5) { width: 150px; min-width: 150px; }
  .order-wide-table th:nth-child(6),
  .order-wide-table td:nth-child(6) { width: 300px; min-width: 300px; }
  .order-wide-table th:nth-child(7),
  .order-wide-table td:nth-child(7) { width: 105px; min-width: 105px; }
  .order-wide-table th:nth-child(8),
  .order-wide-table td:nth-child(8) { width: 240px; min-width: 240px; }
  .order-wide-table th:nth-child(9),
  .order-wide-table td:nth-child(9) { width: 210px; min-width: 210px; }
  .order-wide-table th:nth-child(10),
  .order-wide-table td:nth-child(10) { width: 176px; min-width: 176px; }
  .order-wide-table th:nth-child(11),
  .order-wide-table td:nth-child(11) { width: 190px; min-width: 190px; }
  .order-wide-table th:nth-child(12),
  .order-wide-table td:nth-child(12) { width: 180px; min-width: 180px; }
  .order-wide-table th:nth-child(13),
  .order-wide-table td:nth-child(13) { width: 150px; min-width: 150px; }
  .order-wide-table tbody td { vertical-align: top; }
  .order-wide-table tbody tr:nth-child(even) { background: #fcfcfd; }
  .order-wide-table tbody tr:hover { background: #f8fafc; }
  .order-wide-table .order-address-cell { line-height: 1.45; }
}

/* v2.3.0 订单工作台：目标站业务阶段、卡片/表格双视图与高级筛选 */
.order-command-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid #e7eaf0;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}
.order-command-bar .btn {
  min-height: 36px;
  border-color: #e2e8f0;
  background: #fff;
  color: #334155;
}
.order-command-bar .btn:hover { border-color: #fda4af; color: #be123c; background: #fff1f2; }
.order-import-label { display: inline-flex; cursor: pointer; }

.order-status-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  padding: 6px;
  overflow-x: auto;
  border: 1px solid #e7eaf0;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
  scrollbar-width: thin;
}
.order-status-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 38px;
  gap: 7px;
  padding: 8px 11px;
  border: 0;
  border-radius: 9px;
  color: #64748b;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  white-space: nowrap;
}
.order-status-tab strong {
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 999px;
  color: #64748b;
  background: #f1f5f9;
  font-size: 10px;
}
.order-status-tab:hover { color: #be123c; background: #fff1f2; }
.order-status-tab.active { color: #fff; background: #e11d48; box-shadow: 0 6px 14px rgba(225, 29, 72, .22); }
.order-status-tab.active strong { color: #be123c; background: #fff; }

.target-order-toolbar { align-items: center; background: #fff; border-color: #e7eaf0; }
.order-search-block { display: grid; flex: 1 1 430px; gap: 4px; }
.order-search-block .input { width: 100%; }
.search-help { padding-left: 2px; color: #94a3b8; font-size: 10.5px; }
.order-view-switch {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 2px;
  padding: 3px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #f8fafc;
}
.view-switch-btn {
  min-height: 30px;
  padding: 5px 11px;
  border: 0;
  border-radius: 7px;
  color: #64748b;
  background: transparent;
  font: inherit;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
}
.view-switch-btn.active { color: #be123c; background: #fff; box-shadow: 0 2px 7px rgba(15, 23, 42, .09); }

.advanced-order-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(135px, 1fr));
  align-items: end;
  gap: 8px;
  margin: -2px 0 10px;
  padding: 11px;
  border: 1px solid #e7eaf0;
  border-radius: 12px;
  background: #fff;
}
.advanced-order-filters > .input,
.advanced-order-filters .inline-checkbox,
.advanced-order-filters .btn { min-height: 38px; }
.date-filter-label { display: grid; gap: 4px; color: #64748b; font-size: 10.5px; font-weight: 750; }
.order-result-summary { margin: 6px 2px 10px; color: #64748b; font-size: 11.5px; }

.order-card-list { display: grid; gap: 12px; }
.target-order-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #e6e9ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(15, 23, 42, .04);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.order-card-completed { border-color: #ccefe2; }
.order-completed-watermark {
  position: absolute;
  top: 18px;
  right: 112px;
  z-index: 3;
  display: grid;
  width: 122px;
  padding: 5px 8px 4px;
  transform: rotate(-13deg);
  border: 3px solid rgba(39, 182, 148, .72);
  border-radius: 6px;
  color: rgba(31, 169, 136, .78);
  background: rgba(236, 253, 245, .2);
  box-shadow: 0 3px 0 rgba(39, 182, 148, .08);
  opacity: .82;
  pointer-events: none;
  text-align: center;
}
.order-completed-watermark { transform-origin: right top; }
@media (max-width: 760px) {
  .order-completed-watermark { top: 12px; right: 72px; transform: scale(.82) rotate(-13deg); }
}
.order-completed-watermark span {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .15em;
  line-height: 1.1;
}
.order-completed-watermark strong {
  margin-top: 1px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: .08em;
  line-height: 1.05;
}
.order-card-completed > :not(.order-completed-watermark) { position: relative; z-index: 1; }
.target-order-card:hover { border-color: #fecdd3; box-shadow: 0 8px 22px rgba(15, 23, 42, .07); transform: translateY(-1px); }
.target-order-card-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 17px;
  border-bottom: 1px solid #edf0f4;
  background: linear-gradient(180deg, #fff, #fdfdfd);
}
.order-customer-block { min-width: 0; }
.order-customer-line,
.order-tag-line { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.order-customer-line strong { color: #0f172a; font-size: 16px; }
.order-customer-line > span:not(.status-pill) { color: #64748b; font-size: 12px; }

/* 2.5.0：设备二维码与扫码出入库闭环 */
.warehouse-inline-progress { display: grid; gap: 4px; margin-top: 8px; min-width: 130px; }
.warehouse-inline-progress span { color: #64748b; font-size: 11px; font-weight: 700; }
.warehouse-inline-progress i { display: block; height: 5px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
.warehouse-inline-progress i b { display: block; height: 100%; border-radius: inherit; background: #e11d48; transition: width .2s ease; }
.warehouse-inline-progress.done span { color: #15803d; }
.warehouse-inline-progress.done i b { background: #22c55e; }

.qr-dialog { width: min(560px, calc(100vw - 24px)); }
.device-qr-sheet { margin: 8px auto 14px; padding: 20px; display: grid; grid-template-columns: minmax(180px, 260px) 1fr; gap: 22px; align-items: center; border: 1px solid #e2e8f0; border-radius: 16px; background: linear-gradient(145deg, #fff, #f8fafc); }
.device-qr-sheet img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 10px; background: #fff; }
.device-qr-copy { display: grid; gap: 9px; min-width: 0; }
.device-qr-copy strong { font-size: 19px; overflow-wrap: anywhere; }
.device-qr-copy span { color: #2563eb; font-size: 15px; font-weight: 800; letter-spacing: .04em; overflow-wrap: anywhere; }
.device-qr-copy small { color: #64748b; line-height: 1.6; overflow-wrap: anywhere; }

.warehouse-scanner-dialog { width: min(1040px, calc(100vw - 22px)); }
.warehouse-scanner-dialog .dialog-inner { max-height: min(900px, calc(100vh - 28px)); }
.inventory-scan-dialog { width: min(720px, calc(100vw - 22px)); }
.inventory-scan-dialog .dialog-inner { max-height: min(820px, calc(100vh - 28px)); }
.inventory-scan-tip { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; padding: 11px 13px; border: 1px solid #bfdbfe; border-radius: 11px; color: #475569; background: #eff6ff; font-size: 12px; }
.inventory-scan-tip strong { color: #1d4ed8; white-space: nowrap; }
.inventory-scan-console { min-height: 0; }
.warehouse-order-summary { display: grid; grid-template-columns: minmax(0, 1fr) 150px 150px; gap: 10px; margin-bottom: 12px; }
.warehouse-order-summary > div { padding: 12px 14px; display: grid; gap: 4px; border: 1px solid #e2e8f0; border-radius: 12px; background: #f8fafc; }
.warehouse-order-summary > div:first-child { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.warehouse-order-summary span { color: #64748b; font-size: 12px; }
.warehouse-order-summary strong { color: #0f172a; }
.warehouse-progress-card { margin-bottom: 14px; padding: 13px 15px; border: 1px solid #fecdd3; border-radius: 12px; background: #fff1f2; }
.warehouse-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.warehouse-progress-head strong { color: #be123c; font-size: 18px; }
.warehouse-progress-head span { color: #64748b; font-size: 12px; }
.warehouse-progress-track { height: 9px; overflow: hidden; border-radius: 999px; background: #ffe4e6; }
.warehouse-progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #e11d48, #fb7185); transition: width .25s ease; }
.warehouse-scan-layout { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr); gap: 16px; min-height: 340px; }
.warehouse-scan-console,
.warehouse-device-panel { padding: 15px; border: 1px solid #e2e8f0; border-radius: 14px; background: #fff; }
.warehouse-scan-console { display: flex; flex-direction: column; gap: 13px; }
.warehouse-code-input { display: grid; gap: 7px; color: #334155; font-size: 12px; font-weight: 700; }
.warehouse-code-input .inline-field .input { min-width: 0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.warehouse-scan-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.warehouse-camera-stage { position: relative; min-height: 260px; overflow: hidden; border-radius: 14px; background: #020617; }
.warehouse-camera-stage video { display: block; width: 100%; height: 300px; object-fit: cover; }
.warehouse-camera-frame { position: absolute; inset: 50% auto auto 50%; width: min(52%, 230px); aspect-ratio: 1; border: 3px solid #fb7185; border-radius: 16px; box-shadow: 0 0 0 999px rgba(2,6,23,.28); transform: translate(-50%,-50%); }
.warehouse-scan-feedback { min-height: 45px; padding: 12px 13px; display: flex; align-items: center; border-radius: 10px; font-size: 13px; font-weight: 700; }
.warehouse-scan-feedback.neutral { color: #334155; background: #f1f5f9; }
.warehouse-scan-feedback.success { color: #166534; background: #dcfce7; }
.warehouse-scan-feedback.warning { color: #92400e; background: #fef3c7; }
.warehouse-scan-feedback.error { color: #b91c1c; background: #fee2e2; }
.warehouse-legacy-confirm { padding: 11px 12px; display: flex; align-items: flex-start; gap: 8px; border: 1px solid #fbbf24; border-radius: 10px; color: #92400e; background: #fffbeb; font-size: 12px; line-height: 1.55; }
.warehouse-legacy-confirm input { margin-top: 3px; }
.warehouse-device-panel { min-height: 0; display: flex; flex-direction: column; }
.warehouse-device-panel h3 { margin: 0 0 10px; font-size: 14px; }
.warehouse-device-checklist { display: grid; gap: 8px; overflow: auto; padding-right: 3px; }
.warehouse-device-item { padding: 10px 11px; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 9px; align-items: center; border: 1px solid #e2e8f0; border-radius: 10px; background: #f8fafc; }
.warehouse-device-item > span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: #64748b; background: #e2e8f0; font-weight: 900; }
.warehouse-device-item > div { display: grid; gap: 3px; min-width: 0; }
.warehouse-device-item strong { font-size: 12.5px; overflow-wrap: anywhere; }
.warehouse-device-item small { color: #64748b; overflow-wrap: anywhere; }
.warehouse-device-item > b { color: #64748b; font-size: 11px; white-space: nowrap; }
.warehouse-device-item.done { border-color: #86efac; background: #f0fdf4; }
.warehouse-device-item.done > span { color: #fff; background: #22c55e; }
.warehouse-device-item.done > b { color: #15803d; }
.warehouse-device-item.blocked { border-color: #fed7aa; background: #fff7ed; }
.warehouse-device-item.blocked > span { color: #c2410c; background: #ffedd5; }
.inventory-device-identifiers { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 760px) {
  .device-qr-sheet { grid-template-columns: 1fr; text-align: center; }
  .device-qr-sheet img { width: min(260px, 100%); margin: auto; }
  .warehouse-order-summary { grid-template-columns: 1fr 1fr; }
  .warehouse-order-summary > div:first-child { grid-column: 1 / -1; }
  .warehouse-scan-layout { grid-template-columns: 1fr; }
  .warehouse-camera-stage video { height: 250px; }
  .warehouse-device-checklist { max-height: 290px; }
  .warehouse-scanner-dialog .dialog-actions { align-items: stretch; }
  .warehouse-scanner-dialog .dialog-actions .spacer { display: none; }
  .inventory-device-identifiers { grid-template-columns: 1fr; }
}
.order-tag-line { margin-top: 7px; }
.order-tag-line span {
  padding: 3px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #64748b;
  background: #f8fafc;
  font-size: 10.5px;
}
.order-amount-block { display: grid; flex: 0 0 auto; justify-items: end; gap: 1px; }
.order-amount-block span,
.order-amount-block small { color: #64748b; font-size: 10.5px; }
.order-amount-block strong { color: #d97706; font-size: 19px; }

.target-order-card-body {
  display: grid;
  grid-template-columns: 1.15fr .95fr .9fr 1.4fr;
}
.order-card-column {
  min-width: 0;
  padding: 14px 16px;
  border-right: 1px solid #edf0f4;
}
.order-card-column:last-child { border-right: 0; }
.order-card-column h4 {
  margin: 0 0 10px;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.order-card-column p { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 7px; margin: 6px 0 0; color: #334155; font-size: 11.5px; line-height: 1.45; }
.order-card-column p span { color: #94a3b8; }
.order-device-line { display: grid; gap: 2px; margin-bottom: 8px; }
.order-device-line strong { color: #172033; font-size: 12.5px; }
.order-device-line span { color: #64748b; font-size: 10.5px; }
.order-card-note {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 8px;
  padding: 9px 16px;
  border-top: 1px solid #edf0f4;
  color: #475569;
  background: #fffbeb;
  font-size: 11.5px;
}
.order-card-note strong { color: #a16207; }
.target-order-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 9px;
  padding: 11px 14px;
  border-top: 1px solid #edf0f4;
  background: #fbfcfe;
}
.order-primary-actions,
.order-secondary-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.target-order-card-actions .btn { min-height: 32px; padding: 6px 9px; font-size: 10.5px; }
.target-order-card-actions .text-btn { padding: 4px; }
.target-order-card-actions .mini-status { min-height: 30px; }
.media-count { color: #94a3b8; font-size: 10.5px; }
.status-closed { color: #64748b; background: #f1f5f9; border-color: #cbd5e1; }

.order-empty-state {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 46px 18px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  color: #64748b;
  background: #fff;
  text-align: center;
}
.order-empty-state strong { color: #334155; font-size: 15px; }
.order-empty-state span { font-size: 12px; }
.order-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #e7eaf0;
  border-radius: 12px;
  color: #64748b;
  background: #fff;
  font-size: 11.5px;
}
.order-pagination label { display: inline-flex; align-items: center; gap: 5px; }
.order-pagination .input { width: 72px; min-height: 32px; padding: 5px 7px; }
.order-pagination .btn { min-height: 32px; }
.order-pagination .btn:disabled { opacity: .45; cursor: not-allowed; }

.order-form-group { margin-top: 12px; border-radius: 12px; background: #fcfcfd; }
.order-form-group > .form-section-head { margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid #e7eaf0; }
.order-form-group > .form-section-head h3 { margin-bottom: 2px; }
.order-option-list { display: grid; gap: 8px; min-height: 120px; }
.order-option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 12px;
  border: 1px solid #e7eaf0;
  border-radius: 10px;
  background: #fff;
}
.order-option-row > span { display: grid; gap: 3px; }
.order-option-row small { color: #94a3b8; font-size: 10.5px; }
.danger-text { color: #be123c !important; }
.order-audit-list { display: grid; gap: 0; min-height: 150px; }
.order-audit-entry { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 9px; padding: 0 0 18px; }
.order-audit-entry::before { content: ''; position: absolute; top: 12px; bottom: -2px; left: 5px; width: 1px; background: #e2e8f0; }
.order-audit-entry:last-child::before { display: none; }
.audit-dot { position: relative; z-index: 1; width: 11px; height: 11px; margin-top: 3px; border: 3px solid #bfdbfe; border-radius: 50%; background: #2563eb; }
.order-audit-entry strong { color: #172033; font-size: 12.5px; }
.order-audit-entry p { margin: 4px 0; color: #475569; font-size: 11.5px; }
.order-audit-entry small { color: #94a3b8; font-size: 10.5px; }
.audit-entry-button { width: 100%; border: 0; color: inherit; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.audit-entry-button:hover { border-radius: 10px; background: #f8fafc; }
.print-frame { position: fixed; width: 1px; height: 1px; right: 0; bottom: 0; border: 0; opacity: .01; pointer-events: none; }

@media (max-width: 1000px) {
  .advanced-order-filters { grid-template-columns: repeat(2, minmax(135px, 1fr)); }
  .target-order-card-body { grid-template-columns: 1fr 1fr; }
  .order-card-column:nth-child(2) { border-right: 0; }
  .order-card-column:nth-child(-n+2) { border-bottom: 1px solid #edf0f4; }
}

@media (max-width: 720px) {
  .order-command-bar { flex-wrap: nowrap; overflow-x: auto; padding: 8px; }
  .order-command-bar .btn { flex: 0 0 auto; }
  .order-status-tabs { margin-left: -2px; margin-right: -2px; }
  .target-order-toolbar { display: grid; grid-template-columns: 1fr auto; }
  .order-search-block { grid-column: 1 / -1; min-width: 0; }
  .quick-filter-note { grid-column: 1 / -1; }
  .advanced-order-filters { grid-template-columns: 1fr; }
  .target-order-card-head { padding: 13px; }
  .target-order-card-body { grid-template-columns: 1fr; }
  .order-card-column { padding: 12px 13px; border-right: 0; border-bottom: 1px solid #edf0f4; }
  .order-card-column:last-child { border-bottom: 0; }
  .order-card-column:nth-child(2) { border-right: 0; }
  .target-order-card-actions { align-items: stretch; padding: 10px; }
  .order-primary-actions,
  .order-secondary-actions { width: 100%; }
  .order-primary-actions .btn { flex: 1 1 30%; }
  .order-secondary-actions .mini-status { width: 100%; max-width: none; }
  .order-pagination { justify-content: center; }
  .order-form-group { padding: 11px; }
  .order-option-row { align-items: flex-start; }
}

/* 2.5.1：参考目标站建立多色操作语义，红色仅用于高风险与醒目标识 */
.btn.primary,
.btn.info {
  border: 1px solid var(--action-blue);
  color: #fff;
  background: linear-gradient(135deg, #2f6df6 0%, var(--action-blue) 100%);
  box-shadow: 0 7px 18px rgba(37, 99, 235, .17);
}
.btn.primary:hover,
.btn.info:hover {
  border-color: var(--action-blue-dark);
  background: var(--action-blue-dark);
}
.btn.success {
  border: 1px solid var(--action-green);
  color: #fff;
  background: linear-gradient(135deg, #16c78a 0%, var(--action-green) 100%);
  box-shadow: 0 7px 18px rgba(16, 185, 129, .17);
}
.btn.success:hover {
  border-color: var(--action-green-dark);
  background: var(--action-green-dark);
  transform: translateY(-1px);
}
.btn.warning {
  border: 1px solid var(--action-yellow);
  color: #422006;
  background: linear-gradient(135deg, #fbbf24 0%, var(--action-yellow) 100%);
  box-shadow: 0 7px 18px rgba(245, 158, 11, .16);
}
.btn.warning:hover {
  border-color: var(--action-yellow-dark);
  background: #f3a60b;
  transform: translateY(-1px);
}
.btn.danger {
  border: 1px solid var(--action-red);
  color: #fff;
  background: var(--action-red);
  box-shadow: 0 7px 18px rgba(225, 29, 72, .16);
}
.btn.danger:hover {
  border-color: var(--action-red-dark);
  background: var(--action-red-dark);
  transform: translateY(-1px);
}
.btn.soft-info {
  border-color: #bfdbfe;
  color: #1d4ed8;
  background: #eff6ff;
}
.btn.soft-info:hover { border-color: #93c5fd; background: #dbeafe; }
.btn.soft-success {
  border-color: #a7f3d0;
  color: #047857;
  background: #ecfdf5;
}
.btn.soft-success:hover { border-color: #6ee7b7; background: #d1fae5; }
.btn.soft-warning {
  border-color: #fde68a;
  color: #92400e;
  background: #fffbeb;
}
.btn.soft-warning:hover { border-color: #fcd34d; background: #fef3c7; }
.text-btn { color: var(--action-blue); }
.text-btn:hover { color: var(--action-blue-dark); }
.text-btn.success-text { color: #059669; }
.text-btn.success-text:hover { color: #047857; }
.text-btn.warning-text { color: #b45309; }
.text-btn.warning-text:hover { color: #92400e; }
.text-btn.danger-text { color: var(--action-red-dark); }

.warehouse-inline-progress.outbound i b { background: var(--action-blue); }
.warehouse-inline-progress.inbound i b { background: var(--action-green); }
.warehouse-inline-progress.done i b { background: #22c55e; }
.warehouse-scanner-dialog.scan-outbound .warehouse-progress-card {
  border-color: #bfdbfe;
  background: #eff6ff;
}
.warehouse-scanner-dialog.scan-outbound .warehouse-progress-head strong { color: #1d4ed8; }
.warehouse-scanner-dialog.scan-outbound .warehouse-progress-track { background: #dbeafe; }
.warehouse-scanner-dialog.scan-outbound .warehouse-progress-track span { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.warehouse-scanner-dialog.scan-inbound .warehouse-progress-card {
  border-color: #a7f3d0;
  background: #ecfdf5;
}
.warehouse-scanner-dialog.scan-inbound .warehouse-progress-head strong { color: #047857; }
.warehouse-scanner-dialog.scan-inbound .warehouse-progress-track { background: #d1fae5; }
.warehouse-scanner-dialog.scan-inbound .warehouse-progress-track span { background: linear-gradient(90deg, #10b981, #34d399); }
.warehouse-scanner-dialog.scan-outbound .warehouse-camera-frame { border-color: #60a5fa; }
.warehouse-scanner-dialog.scan-inbound .warehouse-camera-frame { border-color: #34d399; }
.warehouse-scanner-dialog.scan-outbound #warehouseCodeInput:focus {
  border-color: rgba(37, 99, 235, .55);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .10);
}
.warehouse-scanner-dialog.scan-inbound #warehouseCodeInput:focus {
  border-color: rgba(16, 185, 129, .60);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, .11);
}

/* 2.6.0：单台设备详情与投资回本可视化 */
.inventory-device-name-button,
.inventory-table-device-name {
  max-width: 100%;
  padding: 0;
  border: 0;
  color: #172033;
  background: transparent;
  font: inherit;
  font-weight: 850;
  text-align: left;
  cursor: pointer;
  transition: color .15s ease;
}
.inventory-device-name-button {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inventory-device-name-button:hover,
.inventory-table-device-name:hover {
  color: var(--action-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.inventory-device-name-button:focus-visible,
.inventory-table-device-name:focus-visible {
  border-radius: 4px;
  outline: 3px solid rgba(37, 99, 235, .18);
  outline-offset: 3px;
}

.device-detail-dialog { width: min(1040px, calc(100vw - 24px)); }
.device-detail-dialog .dialog-inner { max-height: min(900px, calc(100vh - 28px)); }
.device-detail-content { display: grid; gap: 14px; }
.device-detail-hero {
  display: grid;
  grid-template-columns: 156px minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: linear-gradient(145deg, #fff, #f8fafc);
}
.device-detail-image {
  display: grid;
  place-items: center;
  min-height: 142px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  color: #94a3b8;
  background: #fff;
  font-size: 12px;
  font-weight: 750;
}
.device-detail-image img { width: 100%; height: 100%; object-fit: contain; }
.device-detail-hero-copy { min-width: 0; }
.device-detail-title-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.device-detail-title-line h3 { margin: 0; color: #0f172a; font-size: 21px; line-height: 1.35; }
.device-detail-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.device-detail-meta span { padding: 4px 8px; border-radius: 999px; color: #475569; background: #eef2f7; font-size: 10.5px; font-weight: 750; }
.device-detail-identifiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.device-detail-identifiers div { min-width: 0; padding: 9px 10px; border: 1px solid #e6eaf0; border-radius: 9px; background: #fff; }
.device-detail-identifiers span { display: block; margin-bottom: 4px; color: #94a3b8; font-size: 9px; font-weight: 850; letter-spacing: .08em; }
.device-detail-identifiers strong { display: block; overflow: hidden; color: #334155; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

.device-payback-card {
  padding: 16px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: linear-gradient(145deg, #eff6ff, #fff);
}
.device-payback-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.device-payback-head span { display: block; margin-bottom: 4px; color: #64748b; font-size: 11px; font-weight: 750; }
.device-payback-head strong { color: #1d4ed8; font-size: 25px; }
.device-payback-head p { max-width: 540px; margin: 2px 0 0; color: #475569; font-size: 11px; line-height: 1.55; text-align: right; }
.device-payback-track { height: 13px; margin: 13px 0 11px; overflow: hidden; border-radius: 999px; background: #dbeafe; box-shadow: inset 0 1px 2px rgba(15, 23, 42, .08); }
.device-payback-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2563eb, #60a5fa); transition: width .3s ease; }
.device-payback-card.tone-warning { border-color: #fde68a; background: linear-gradient(145deg, #fffbeb, #fff); }
.device-payback-card.tone-warning .device-payback-head strong { color: #b45309; }
.device-payback-card.tone-warning .device-payback-track { background: #fef3c7; }
.device-payback-card.tone-warning .device-payback-track span { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.device-payback-card.tone-success { border-color: #a7f3d0; background: linear-gradient(145deg, #ecfdf5, #fff); }
.device-payback-card.tone-success .device-payback-head strong { color: #047857; }
.device-payback-card.tone-success .device-payback-track { background: #d1fae5; }
.device-payback-card.tone-success .device-payback-track span { background: linear-gradient(90deg, #10b981, #34d399); }
.device-payback-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.device-payback-metrics div { padding: 9px 10px; border: 1px solid rgba(148, 163, 184, .20); border-radius: 9px; background: rgba(255,255,255,.74); }
.device-payback-metrics span { display: block; color: #64748b; font-size: 9.5px; }
.device-payback-metrics strong { display: block; margin-top: 4px; color: #172033; font-size: 12px; }

.device-detail-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.device-detail-panel { min-width: 0; padding: 14px; border: 1px solid #e5e9f0; border-radius: 12px; background: #fff; }
.device-detail-panel h4 { margin: 0 0 10px; color: #172033; font-size: 13px; }
.device-detail-list { display: grid; gap: 0; }
.device-detail-list div { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid #f0f2f5; font-size: 11px; line-height: 1.45; }
.device-detail-list div:last-child { border-bottom: 0; }
.device-detail-list span { color: #94a3b8; }
.device-detail-list strong { color: #334155; overflow-wrap: anywhere; }
.device-detail-orders { display: grid; gap: 7px; }
.device-detail-order { display: grid; grid-template-columns: minmax(110px, .8fr) minmax(120px, 1fr) auto; gap: 10px; align-items: center; padding: 9px 10px; border: 1px solid #edf0f4; border-radius: 9px; background: #f8fafc; }
.device-detail-order strong { overflow: hidden; color: #334155; font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.device-detail-order span:not(.status-pill) { overflow: hidden; color: #64748b; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.device-detail-order span:not(.status-pill) small { display: block; margin-top: 3px; color: #94a3b8; font-size: 9px; overflow: hidden; text-overflow: ellipsis; }
.device-detail-order .status-pill { padding: 4px 7px; font-size: 9px; }
.device-detail-empty { padding: 18px; border: 1px dashed #cbd5e1; border-radius: 9px; color: #64748b; background: #f8fafc; font-size: 11px; text-align: center; }
.device-detail-history-note { margin-top: 8px; color: #94a3b8; font-size: 10px; text-align: right; }
.device-detail-actions { position: sticky; bottom: -22px; z-index: 4; margin: 14px -22px -22px; padding: 13px 22px; border-top: 1px solid #e7eaf0; background: rgba(255,255,255,.97); backdrop-filter: blur(8px); }

@media (max-width: 760px) {
  .device-detail-hero { grid-template-columns: 1fr; }
  .device-detail-image { min-height: 170px; }
  .device-detail-identifiers { grid-template-columns: 1fr; }
  .device-payback-head { display: grid; }
  .device-payback-head p { text-align: left; }
  .device-payback-metrics { grid-template-columns: 1fr 1fr; }
  .device-detail-panels { grid-template-columns: 1fr; }
  .device-detail-order { grid-template-columns: 1fr auto; }
  .device-detail-order span:not(.status-pill) { grid-column: 1 / -1; grid-row: 2; }
  .device-detail-actions { align-items: stretch; }
  .device-detail-actions .spacer { display: none; }
  .device-detail-actions .btn { flex: 1 1 44%; }
}

/* v2.6.1：将全局系统栏集中到账号管理，业务页面释放顶部空间 */
.account-system-card {
  margin-bottom: 14px;
  padding: 0;
  overflow: hidden;
  border-color: #e2e8f0;
  background: #fff;
}
.account-system-head {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 22px;
  align-items: center;
  padding: 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #fff 66%, #eff6ff 100%);
}
.account-system-title { min-width: 0; }
.account-system-title h3 { margin-top: 5px; color: #172033; font-size: 20px; }
.account-system-title p { margin-top: 7px; color: #334155; font-size: 13px; font-weight: 800; }
.account-system-title > span { display: block; margin-top: 5px; color: #7c8799; font-size: 11px; }
.account-system-runtime {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(160px, .8fr);
  gap: 10px;
  min-width: 390px;
}
.account-system-card .clock-card,
.account-system-card .user-card {
  width: auto;
  min-width: 0;
  min-height: 88px;
  padding: 13px 15px;
  border: 1px solid #e4e9f0;
  border-radius: 12px;
  box-shadow: none;
}
.account-system-card .clock-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #0f192d;
  color: #fff;
}
.account-system-card .clock-card span { display: block; color: #aeb9ca; font-size: 11px; }
.account-system-card .clock-card strong { margin-top: 6px; color: #fff; font-size: 17px; }
.account-system-card .user-card { display: grid; align-content: center; background: #fff; }
.account-system-card .user-card span { color: #8b95a5; font-size: 11px; }
.account-system-card .user-card strong { margin-top: 3px; color: #172033; font-size: 14px; }
.account-system-card .user-card .text-btn { justify-self: start; margin-top: 7px; padding: 0; }
.account-system-tools { padding: 18px 20px 20px; border-top: 1px solid #edf0f4; }
.account-system-tools-copy {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 13px;
}
.account-system-tools-copy h3 { margin-top: 4px; color: #172033; font-size: 16px; }
.account-system-tools-copy p { color: #7c8799; font-size: 11px; text-align: right; }
.account-system-card .system-tools-group { gap: 8px; align-items: stretch; justify-content: flex-start; }
.account-system-card .system-tools-group > .btn,
.account-system-card .system-tools-group > .file-label { min-height: 40px; padding: 8px 11px; border-radius: 10px; font-size: 11px; }
.account-system-card .auto-backup-card {
  min-width: 0;
  max-width: none;
  min-height: 40px;
  padding: 7px 10px;
  border-radius: 10px;
  background: #f8fafc;
  box-shadow: none;
}

@media (min-width: 721px) {
  body.is-authenticated { grid-template-rows: minmax(0, 1fr); }
  body.is-authenticated .sidebar { grid-row: 1; }
  body.is-authenticated .content { grid-row: 1; }
  .account-system-card .system-tools-group {
    display: grid;
    grid-template-columns: repeat(5, max-content) minmax(250px, 1fr);
  }
}

@media (min-width: 721px) and (max-width: 1180px) {
  .account-system-head { grid-template-columns: 1fr; }
  .account-system-runtime { min-width: 0; }
  .account-system-card .system-tools-group { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .account-system-card .auto-backup-card { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .account-system-card { margin-bottom: 10px; }
  .account-system-head { grid-template-columns: 1fr; gap: 12px; padding: 14px; }
  .account-system-title h3 { font-size: 18px; }
  .account-system-runtime { grid-template-columns: 1fr 1fr; gap: 7px; min-width: 0; }
  .account-system-card .clock-card,
  .account-system-card .user-card { grid-column: auto; min-height: 78px; padding: 10px; }
  .account-system-card .clock-card span { display: block; }
  .account-system-card .clock-card strong { margin-top: 5px; font-size: 13px; white-space: normal; }
  .account-system-card .user-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "role exit" "name exit";
  }
  .account-system-card .user-card span { grid-area: role; }
  .account-system-card .user-card strong { grid-area: name; }
  .account-system-card .user-card .text-btn { grid-area: exit; align-self: center; margin: 0; }
  .account-system-tools { padding: 14px; }
  .account-system-tools-copy { display: grid; gap: 5px; }
  .account-system-tools-copy p { text-align: left; }
  .account-system-card .mobile-system-tools-toggle { display: inline-flex; width: 100%; }
  .account-system-card .system-tools-group { display: none; margin-top: 8px; grid-template-columns: 1fr 1fr; }
  body.mobile-tools-open .account-system-card .system-tools-group { display: grid; }
  .account-system-card .system-tools-group > .btn,
  .account-system-card .system-tools-group > .file-label { min-height: 38px !important; font-size: 10.5px; }
  .account-system-card .auto-backup-card { grid-column: 1 / -1; grid-template-columns: auto 82px; }
  .account-system-card .auto-backup-card > span { grid-column: 1 / -1; }
}

/* v2.9.0：数据分析中心信息架构与图形化总览 */
.analysis-page { --analysis-blue: #2563eb; --analysis-green: #059669; --analysis-violet: #7c3aed; --analysis-amber: #d97706; --analysis-cyan: #0891b2; --analysis-rose: #e11d48; color: #172033; }
.analysis-view-nav { position: sticky; top: 8px; z-index: 7; display: flex; gap: 4px; width: max-content; max-width: 100%; margin: 0 0 14px; padding: 4px; overflow-x: auto; border: 1px solid #e2e8f0; border-radius: 13px; background: rgba(255,255,255,.88); box-shadow: 0 7px 20px rgba(15,23,42,.07); backdrop-filter: blur(14px); scrollbar-width: none; }
.analysis-view-nav::-webkit-scrollbar { display: none; }
.analysis-view-tab { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; min-height: 35px; padding: 8px 13px; border: 0; border-radius: 9px; background: transparent; color: #64748b; font: inherit; font-size: 10.5px; font-weight: 800; white-space: nowrap; cursor: pointer; transition: .16s ease; }
.analysis-view-tab:hover { color: #1e293b; background: #f8fafc; }
.analysis-view-tab.active { color: #fff; background: #172033; box-shadow: 0 5px 12px rgba(15,23,42,.17); }
.analysis-view-dot { width: 7px; height: 7px; border-radius: 999px; background: #cbd5e1; box-shadow: 0 0 0 3px rgba(148,163,184,.12); }
.analysis-view-dot.tone-blue { background: #3b82f6; }
.analysis-view-dot.tone-green { background: #10b981; }
.analysis-view-dot.tone-amber { background: #f59e0b; }
.analysis-view-dot.tone-violet { background: #8b5cf6; }
.analysis-view-dot.tone-cyan { background: #06b6d4; }
.analysis-view-tab.active .analysis-view-dot { background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.18); }
.analysis-section-view { display: none; min-width: 0; }
.analysis-section-view.active { display: block; animation: analysis-view-in .18s ease-out; }
@keyframes analysis-view-in { from { opacity: .65; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
.analysis-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; margin-bottom: 14px; padding: 20px 22px; overflow: hidden; border: 1px solid #dce6f2; border-radius: 18px; background: radial-gradient(circle at 88% 18%, rgba(37,99,235,.13), transparent 34%), linear-gradient(135deg, rgba(255,255,255,.98), rgba(244,248,255,.96)); box-shadow: 0 12px 30px rgba(30,64,175,.07); }
.analysis-hero::after { position: absolute; right: -48px; bottom: -72px; width: 190px; height: 190px; border-radius: 50%; background: rgba(16,185,129,.07); content: ''; pointer-events: none; }
.analysis-hero-title { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; min-width: 0; }
.analysis-hero-title h2 { margin: 3px 0 4px; font-size: 24px; letter-spacing: -.02em; }
.analysis-hero-title p { color: #64748b; font-size: 12px; }
.analysis-title-icon { display: grid; place-items: center; flex: 0 0 50px; width: 50px; height: 50px; border-radius: 15px; color: #fff; background: linear-gradient(145deg, #2563eb, #4f46e5); box-shadow: 0 10px 22px rgba(37,99,235,.24); }
.analysis-title-icon svg, .analysis-section-icon svg, .analysis-kpi-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.analysis-tools { position: relative; z-index: 1; padding: 7px; border: 1px solid rgba(203,213,225,.78); border-radius: 13px; background: rgba(255,255,255,.78); box-shadow: 0 5px 18px rgba(15,23,42,.05); backdrop-filter: blur(12px); }
.analysis-tools .input { border-color: transparent; background: #f8fafc; box-shadow: none; }
.analysis-tools label { color: #475569; font-size: 11px; }

.analysis-overview-card, .analysis-payback-overview-card, .analysis-period-card, .analysis-asset-section { border-color: #e2e8f0; border-radius: 16px; background: rgba(255,255,255,.94); box-shadow: 0 8px 24px rgba(15,23,42,.045); }
.analysis-overview-card { margin-bottom: 14px; padding: 18px; }
.analysis-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.analysis-section-heading > div:first-child { display: flex; align-items: center; gap: 10px; min-width: 0; }
.analysis-section-heading.compact { margin-bottom: 12px; }
.analysis-section-heading h3 { margin: 0; color: #172033; font-size: 16px; letter-spacing: -.01em; }
.analysis-section-heading p { margin: 3px 0 0; color: #8793a6; font-size: 10.5px; }
.analysis-section-icon { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 11px; }
.analysis-section-icon svg { width: 19px; height: 19px; }
.analysis-section-icon.tone-blue { color: #2563eb; background: #eff6ff; }
.analysis-section-icon.tone-green { color: #059669; background: #ecfdf5; }
.analysis-section-icon.tone-violet { color: #7c3aed; background: #f5f3ff; }
.analysis-section-icon.tone-amber { color: #d97706; background: #fffbeb; }
.analysis-section-icon.tone-cyan { color: #0891b2; background: #ecfeff; }
.analysis-range-chip { flex: 0 0 auto; padding: 6px 10px; border: 1px solid #dbeafe; border-radius: 999px; color: #1d4ed8; background: #eff6ff; font-size: 10px; font-weight: 800; }

.analysis-kpi-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.analysis-kpi-card { position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 11px; align-items: start; min-width: 0; min-height: 102px; padding: 14px; overflow: hidden; border: 1px solid #e7edf4; border-radius: 13px; background: linear-gradient(145deg, #fff, #fbfdff); }
.analysis-kpi-card::after { position: absolute; right: -24px; bottom: -36px; width: 86px; height: 86px; border-radius: 50%; background: currentColor; opacity: .045; content: ''; }
.analysis-kpi-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: currentColor; background: #eff6ff; background: color-mix(in srgb, currentColor 11%, white); }
.analysis-kpi-icon svg { width: 19px; height: 19px; }
.analysis-kpi-copy { min-width: 0; }
.analysis-kpi-copy > span { display: block; color: #718096; font-size: 10px; font-weight: 800; }
.analysis-kpi-copy strong { display: block; margin-top: 5px; overflow-wrap: anywhere; color: #172033; font-size: 20px; line-height: 1.16; letter-spacing: -.025em; }
.analysis-kpi-copy small { display: block; margin-top: 7px; color: #94a3b8; font-size: 9.5px; line-height: 1.45; }
.analysis-kpi-card.tone-blue { color: var(--analysis-blue); }
.analysis-kpi-card.tone-green { color: var(--analysis-green); }
.analysis-kpi-card.tone-red { color: #dc2626; }
.analysis-kpi-card.tone-violet { color: var(--analysis-violet); }
.analysis-kpi-card.tone-cyan { color: var(--analysis-cyan); }
.analysis-kpi-card.tone-amber { color: var(--analysis-amber); }
.analysis-kpi-card.tone-rose { color: var(--analysis-rose); }
.analysis-kpi-card.tone-blue .analysis-kpi-icon { background: #eff6ff; }
.analysis-kpi-card.tone-green .analysis-kpi-icon { background: #ecfdf5; }
.analysis-kpi-card.tone-red .analysis-kpi-icon { background: #fef2f2; }
.analysis-kpi-card.tone-violet .analysis-kpi-icon { background: #f5f3ff; }
.analysis-kpi-card.tone-cyan .analysis-kpi-icon { background: #ecfeff; }
.analysis-kpi-card.tone-amber .analysis-kpi-icon { background: #fffbeb; }
.analysis-kpi-card.tone-rose .analysis-kpi-icon { background: #fff1f2; }

.analysis-insight-grid { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr); gap: 14px; margin-bottom: 18px; }
.analysis-payback-overview-card, .analysis-period-card { padding: 17px; }
.analysis-payback-main { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.analysis-payback-main > div > span { display: block; color: #64748b; font-size: 10px; font-weight: 800; }
.analysis-payback-main > div > strong { display: block; margin-top: 3px; color: #047857; font-size: 29px; line-height: 1.1; letter-spacing: -.04em; }
.analysis-payback-main small { display: block; margin-top: 5px; color: #94a3b8; font-size: 9.5px; }
.analysis-payback-badge { padding: 6px 9px; border-radius: 999px; font-size: 9.5px; font-weight: 850; }
.analysis-payback-badge.progress { color: #1d4ed8; background: #dbeafe; }
.analysis-payback-badge.success { color: #047857; background: #d1fae5; }
.analysis-overall-progress { height: 12px; margin: 13px 0; overflow: hidden; border-radius: 999px; background: #e2e8f0; box-shadow: inset 0 1px 2px rgba(15,23,42,.08); }
.analysis-overall-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #10b981, #34d399); box-shadow: 0 0 14px rgba(16,185,129,.25); }
.analysis-payback-breakdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.analysis-payback-breakdown > div { display: grid; grid-template-columns: 8px minmax(0,1fr); gap: 3px 6px; align-items: center; min-width: 0; padding: 8px; border: 1px solid #edf1f5; border-radius: 10px; background: #f8fafc; }
.analysis-payback-breakdown i { grid-row: 1 / 3; width: 7px; height: 24px; border-radius: 999px; background: #cbd5e1; }
.analysis-payback-breakdown i.recovered { background: #10b981; }
.analysis-payback-breakdown i.recovering { background: #3b82f6; }
.analysis-payback-breakdown i.unpriced { background: #f59e0b; }
.analysis-payback-breakdown i.remaining { background: #8b5cf6; }
.analysis-payback-breakdown span { overflow: hidden; color: #94a3b8; font-size: 8.8px; text-overflow: ellipsis; white-space: nowrap; }
.analysis-payback-breakdown strong { overflow: hidden; color: #334155; font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.analysis-period-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.analysis-period-grid .analysis-kpi-card { min-height: 92px; padding: 11px; grid-template-columns: 32px minmax(0,1fr); gap: 8px; }
.analysis-period-grid .analysis-kpi-icon { width: 32px; height: 32px; border-radius: 9px; }
.analysis-period-grid .analysis-kpi-icon svg { width: 16px; height: 16px; }
.analysis-period-grid .analysis-kpi-copy strong { font-size: 16px; }
.analysis-period-grid .analysis-kpi-copy small { margin-top: 4px; }

.analysis-section-title-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 2px 10px; }
.analysis-section-title-row .analysis-section-heading { margin: 0; }
.analysis-switch { display: inline-flex; flex: 0 0 auto; gap: 3px; margin: 0; padding: 3px; border: 1px solid #dfe6ef; border-radius: 11px; background: #f8fafc; }
.analysis-mode { min-width: 62px; padding: 7px 11px; border-radius: 8px; font-size: 10.5px; }
.analysis-mode.active { background: #172033; box-shadow: 0 4px 10px rgba(15,23,42,.14); }
.analysis-visual-grid { grid-template-columns: minmax(0, 1.45fr) repeat(2, minmax(230px, .72fr)); gap: 12px; }
.analysis-page .chart-card { min-height: 330px; padding: 16px; border-color: #e4eaf1; border-radius: 15px; background: linear-gradient(160deg, #fff, #fbfdff); box-shadow: 0 7px 22px rgba(15,23,42,.04); }
.analysis-page .chart-card .card-head { margin-bottom: 10px; }
.analysis-page .chart-card .card-head h3 { font-size: 14px; }
.analysis-page .chart-canvas { height: 228px; border: 0; background: transparent; }
.analysis-page .pie-canvas { height: 205px; }
.analysis-page .chart-legend { gap: 6px 11px; margin-top: 8px; font-size: 9.5px; }
.analysis-page .chart-legend.stack { max-height: 62px; overflow: auto; }

.analysis-asset-section { padding: 0; overflow: hidden; }
.analysis-asset-section > .analysis-section-heading { margin: 0; padding: 16px 17px 13px; border-bottom: 1px solid #edf1f5; }
.analysis-asset-tools { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.analysis-asset-tools .input { min-width: 170px; min-height: 36px; padding: 7px 10px; font-size: 10.5px; }
.analysis-asset-tools input { width: 240px; }
.analysis-asset-wrap { max-height: 650px; overflow: auto; border: 0; border-radius: 0; }
.analysis-asset-table { min-width: 1120px; }
.analysis-asset-table thead th { position: sticky; top: 0; z-index: 2; padding-top: 10px; padding-bottom: 10px; color: #64748b; background: #f8fafc; font-size: 9.5px; letter-spacing: .02em; }
.analysis-asset-table tbody tr { transition: background .15s ease; }
.analysis-asset-table tbody tr:hover { background: #fbfdff; }
.analysis-asset-table td { padding-top: 11px; padding-bottom: 11px; vertical-align: middle; }
.analysis-asset-table th:nth-child(1) { width: 280px; }
.analysis-asset-table th:nth-child(2) { width: 105px; }
.analysis-asset-table th:nth-child(3), .analysis-asset-table th:nth-child(4), .analysis-asset-table th:nth-child(5) { width: 170px; }
.analysis-asset-table th:nth-child(6) { width: 210px; }
.analysis-device-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 5px; color: #94a3b8; font-size: 8.8px; }
.analysis-device-meta span { max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.analysis-financial-state { display: block; width: max-content; margin-top: 6px; font-size: 8.8px; font-weight: 800; }
.analysis-financial-state.tone-success { color: #047857; }
.analysis-financial-state.tone-info { color: #2563eb; }
.analysis-financial-state.tone-warning { color: #b45309; }
.analysis-asset-value { display: grid; gap: 4px; min-width: 0; }
.analysis-asset-value strong { color: #334155; font-size: 10.5px; }
.analysis-asset-value span { color: #94a3b8; font-size: 8.8px; line-height: 1.4; }
.analysis-payback-cell { display: grid; gap: 6px; min-width: 170px; }
.analysis-payback-cell > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.analysis-payback-cell strong { color: #2563eb; font-size: 11.5px; }
.analysis-payback-cell > div:first-child span, .analysis-payback-cell small { color: #64748b; font-size: 8.8px; }
.analysis-payback-track { height: 7px; overflow: hidden; border-radius: 999px; background: #dbeafe; }
.analysis-payback-track > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2563eb, #60a5fa); }
.analysis-payback-cell.tone-warning strong { color: #b45309; }
.analysis-payback-cell.tone-warning .analysis-payback-track { background: #fef3c7; }
.analysis-payback-cell.tone-warning .analysis-payback-track > span { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.analysis-payback-cell.tone-success strong { color: #047857; }
.analysis-payback-cell.tone-success .analysis-payback-track { background: #d1fae5; }
.analysis-payback-cell.tone-success .analysis-payback-track > span { background: linear-gradient(90deg, #10b981, #34d399); }

.analysis-page > .card.mt, .analysis-page .ranking-cards > .card { border-color: #e5eaf1; border-radius: 15px; box-shadow: 0 6px 20px rgba(15,23,42,.035); }
.analysis-page > .card.mt > .card-head, .analysis-page .ranking-cards .card-head { padding-bottom: 11px; border-bottom: 1px solid #eef2f6; }
.analysis-page > .card.mt > .card-head h3, .analysis-page .ranking-cards .card-head h3 { font-size: 14px; }
.analysis-pricing-wrap { max-height: 520px; overflow: auto; }
.analysis-pricing-table { min-width: 1480px; }
.analysis-pricing-table thead th { position: sticky; top: 0; z-index: 2; background: #f8fafc; }
.analysis-page #incomeStats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.analysis-page #incomeStats .analysis-kpi-card { min-height: 92px; padding: 11px; grid-template-columns: 32px minmax(0,1fr); gap: 8px; }
.analysis-page #incomeStats .analysis-kpi-icon { width: 32px; height: 32px; }
.analysis-page #incomeStats .analysis-kpi-copy strong { font-size: 16px; }

@media (max-width: 1180px) {
  .analysis-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analysis-visual-grid { grid-template-columns: minmax(0, 1.3fr) minmax(230px, .8fr); }
  .analysis-visual-grid .trend-card { grid-column: 1 / -1; }
  .analysis-payback-breakdown { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .analysis-view-nav { top: 4px; width: 100%; margin-bottom: 10px; padding: 3px; border-radius: 11px; }
  .analysis-view-tab { min-height: 33px; padding: 7px 11px; font-size: 9.5px; }
  .analysis-view-dot { width: 6px; height: 6px; }
  #tab-analysis .section-head.analysis-hero { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; align-items: stretch !important; width: 100%; max-width: 100%; gap: 12px; padding: 15px; border-radius: 15px; }
  #tab-analysis .analysis-hero-title { width: 100%; }
  #tab-analysis .analysis-hero-title p { display: block; white-space: normal; }
  .analysis-title-icon { flex-basis: 42px; width: 42px; height: 42px; border-radius: 12px; }
  .analysis-title-icon svg { width: 20px; height: 20px; }
  .analysis-hero-title h2 { font-size: 20px; }
  .analysis-hero-title p { font-size: 10px; line-height: 1.45; }
  #tab-analysis .date-range.analysis-tools { position: static; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); width: 100%; min-width: 0; padding: 6px; }
  #tab-analysis .date-range.analysis-tools label { display: grid; grid-column: 1 / -1; grid-template-columns: auto 64px auto; justify-content: start; }
  .date-range.analysis-tools .input { width: 100%; min-width: 0; }
  .analysis-overview-card { padding: 13px; }
  .analysis-section-heading { align-items: flex-start; }
  .analysis-section-heading h3 { font-size: 14px; }
  .analysis-section-heading p { font-size: 9.5px; }
  .analysis-range-chip { max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .analysis-kpi-grid { grid-template-columns: 1fr 1fr; gap: 7px; }
  .analysis-kpi-card { grid-template-columns: 31px minmax(0,1fr); gap: 7px; min-height: 98px; padding: 10px; border-radius: 11px; }
  .analysis-kpi-icon { width: 31px; height: 31px; border-radius: 9px; }
  .analysis-kpi-icon svg { width: 15px; height: 15px; }
  .analysis-kpi-copy > span { font-size: 9px; }
  .analysis-kpi-copy strong { font-size: 15px; }
  .analysis-kpi-copy small { font-size: 8.3px; }
  .analysis-insight-grid { grid-template-columns: 1fr; gap: 10px; }
  .analysis-payback-overview-card, .analysis-period-card { padding: 13px; }
  .analysis-payback-main > div > strong { font-size: 25px; }
  .analysis-payback-breakdown { grid-template-columns: 1fr 1fr; }
  .analysis-period-grid { grid-template-columns: 1fr 1fr; }
  .analysis-period-grid .analysis-kpi-card { min-height: 86px; }
  .analysis-section-title-row { align-items: stretch; }
  .analysis-section-title-row .analysis-section-heading { flex: 1; }
  .analysis-switch { align-self: center; width: auto; }
  .analysis-visual-grid { grid-template-columns: 1fr; }
  .analysis-visual-grid .trend-card { grid-column: auto; }
  .analysis-page .chart-card { min-height: 292px; padding: 13px; }
  .analysis-page .chart-canvas { height: 210px; }
  .analysis-page .pie-canvas { height: 185px; }
  .analysis-asset-section > .analysis-section-heading { display: grid; padding: 13px; }
  .analysis-asset-tools { display: grid; grid-template-columns: minmax(0,1fr) minmax(0, .8fr); width: 100%; }
  .analysis-asset-tools .input, .analysis-asset-tools input { width: 100%; min-width: 0; }
  .analysis-asset-wrap { max-height: 560px; padding: 8px; background: #f6f8fb; }
  .analysis-asset-table { display: block; width: 100%; min-width: 0; }
  .analysis-asset-table thead { display: none; }
  .analysis-asset-table tbody { display: grid; gap: 8px; }
  .analysis-asset-table tbody tr { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 11px; padding: 12px; border: 1px solid #e5eaf1; border-radius: 12px; background: #fff; box-shadow: 0 4px 13px rgba(15,23,42,.035); }
  .analysis-asset-table td { display: block; min-width: 0; padding: 0; border: 0; }
  .analysis-asset-table td:first-child { grid-column: 1 / -1; padding-bottom: 8px; border-bottom: 1px solid #eef2f6; }
  .analysis-asset-table td::before { display: block; margin-bottom: 4px; color: #94a3b8; font-size: 8px; font-weight: 800; letter-spacing: .04em; }
  .analysis-asset-table td:nth-child(2)::before { content: '设备状态'; }
  .analysis-asset-table td:nth-child(3)::before { content: '资产价值'; }
  .analysis-asset-table td:nth-child(4)::before { content: '累计经营'; }
  .analysis-asset-table td:nth-child(5)::before { content: '周期利用'; }
  .analysis-asset-table td:nth-child(6)::before { content: '回本进度'; }
  .analysis-payback-cell { min-width: 0; }
  .analysis-summary-grid { gap: 9px; }
  .analysis-summary-grid .table-wrap { overflow: hidden; }
  .analysis-summary-grid th, .analysis-summary-grid td { padding: 8px 5px; font-size: 9px; }
  .analysis-summary-grid th:first-child, .analysis-summary-grid td:first-child { width: 32%; }
  .analysis-summary-grid th:not(:first-child), .analysis-summary-grid td:not(:first-child) { width: 22.666%; }
  .analysis-section-view[data-analysis-view-panel="calendar"] > .card > .income-head { align-items: stretch; }
  .analysis-section-view[data-analysis-view-panel="calendar"] .income-head .inline-label { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; width: 100%; }
  .analysis-section-view[data-analysis-view-panel="calendar"] .income-head .inline-label .input { width: 100%; max-width: none; min-width: 0; }
  .analysis-page #incomeStats { grid-template-columns: 1fr 1fr; }
  .analysis-page #incomeStats .analysis-kpi-card { min-height: 86px; }
}

/* v2.8.0：全国物流档期查询、库存预测与 SN 精准排期 */
.schedule-panel { --schedule-ink: #0f172a; --schedule-green: #059669; --schedule-indigo: #4f46e5; --schedule-line: #e7edf4; }
.schedule-hero { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: 12px; padding: 22px 24px; border-color: #e4e9f0; background: linear-gradient(135deg, #fff 58%, #f5f8ff); }
.schedule-hero-copy h2 { margin: 3px 0 5px; color: var(--schedule-ink); font-size: 24px; }
.schedule-hero-copy p { color: #718096; font-size: 12px; }
.schedule-eyebrow { color: #059669; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.schedule-hero-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.schedule-indigo-btn { border-color: #4f46e5; background: #4f46e5; color: #fff; }
.schedule-indigo-btn:hover { background: #4338ca; }
.schedule-indigo-soft { border-color: #dfe2ff; background: #eef0ff; color: #4f46e5; }
.schedule-workspace-tabs { display: inline-flex; gap: 4px; margin: 0 0 12px; padding: 4px; border: 1px solid #e5eaf1; border-radius: 12px; background: #fff; }
.schedule-workspace-tab { min-height: 34px; padding: 7px 16px; border: 0; border-radius: 8px; background: transparent; color: #64748b; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.schedule-workspace-tab.active { background: #111827; color: #fff; box-shadow: 0 4px 12px rgba(15, 23, 42, .16); }
.schedule-workspace-view { display: none; }
.schedule-workspace-view.active { display: block; }
.schedule-forecast-card, .availability-query-card, .precise-schedule-card { padding: 0; overflow: hidden; border-color: #e3e9f0; }
.schedule-forecast-toolbar, .precise-schedule-head, .availability-query-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 22px; border-bottom: 1px solid var(--schedule-line); }
.schedule-forecast-toolbar h3, .availability-query-head h3, .precise-schedule-head h3 { margin: 0; color: var(--schedule-ink); font-size: 18px; }
.schedule-forecast-toolbar p, .availability-query-head p, .precise-schedule-head p { margin-top: 4px; color: #94a3b8; font-size: 11px; }
.schedule-date-field { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 9px; background: #f7f9fc; color: #94a3b8; font-size: 10px; }
.schedule-date-field .input { min-width: 138px; border: 0; background: transparent; color: #334155; font-weight: 700; }
.schedule-brand-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 20px; }
.schedule-brand-chips button { padding: 6px 13px; border: 1px solid #e2e8f0; border-radius: 999px; background: #fff; color: #64748b; font: inherit; font-size: 10px; font-weight: 700; cursor: pointer; }
.schedule-brand-chips button.active { border-color: #111827; background: #111827; color: #fff; }
.schedule-forecast-table-wrap { margin: 0; border-top: 1px solid #edf1f5; border-radius: 0; }
.schedule-forecast-table { min-width: 940px; }
.schedule-forecast-table thead th { padding: 12px 14px; background: #f8fafc; color: #718096; font-size: 10px; }
.schedule-forecast-table tbody td { padding: 14px; text-align: center; }
.schedule-forecast-table tbody td:first-child { text-align: left; }
.forecast-model-cell { display: flex; align-items: center; gap: 10px; min-width: 210px; }
.forecast-model-icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border: 1px solid #e5e7eb; border-radius: 10px; background: #f8fafc; color: #64748b; }
.forecast-model-cell div { display: grid; gap: 4px; }
.forecast-model-cell strong { color: #334155; font-size: 12px; }
.forecast-model-cell small { color: #94a3b8; font-size: 9px; }
.metric-cyan { color: #0891b2; }.metric-indigo { color: #4f46e5; }.metric-green { color: #16a34a; font-weight: 700; }
.forecast-available-pill { display: inline-grid; min-width: 34px; height: 24px; padding: 0 8px; place-items: center; border-radius: 999px; background: #dcfce7; color: #15803d; font-weight: 800; }
.schedule-status { display: inline-flex; align-items: center; justify-content: center; min-height: 23px; padding: 4px 9px; border-radius: 7px; font-size: 9px; font-weight: 800; }
.schedule-status.success { background: #dcfce7; color: #15803d; }.schedule-status.warning { background: #fef3c7; color: #b45309; }.schedule-status.danger { background: #fee2e2; color: #b91c1c; }

.schedule-title-with-icon { display: flex; align-items: center; gap: 11px; }
.schedule-title-with-icon > span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; background: #e9fbf4; color: #059669; font-size: 17px; }
.precise-schedule-head .schedule-title-with-icon > span { background: #eef0ff; color: #4f46e5; }
.query-only-badge { display: inline-flex; padding: 5px 9px; border: 1px solid #fde68a; border-radius: 7px; background: #fffbeb; color: #b45309; font-size: 9px; font-weight: 700; white-space: nowrap; }
.availability-form-grid { display: grid; grid-template-columns: 1fr 1fr 1.15fr 1fr 1.05fr minmax(220px, 1.7fr) auto; gap: 10px; align-items: end; padding: 18px 22px 10px; }
.availability-form-grid > label, .availability-method-field { display: grid; min-width: 0; gap: 7px; color: #475569; font-size: 10px; font-weight: 700; }
.availability-form-grid .input { min-width: 0; height: 42px; }
.availability-method-field { margin: 0; padding: 0; border: 0; }
.availability-method-field legend { margin-bottom: 7px; }
.segmented-control { display: grid; grid-template-columns: 1fr 1fr; height: 42px; padding: 3px; border-radius: 9px; background: #eef2f7; }
.segmented-control button { border: 0; border-radius: 7px; background: transparent; color: #64748b; font: inherit; font-size: 10px; font-weight: 700; cursor: pointer; }
.segmented-control button.active { background: #111827; color: #fff; box-shadow: 0 3px 8px rgba(15, 23, 42, .15); }
.availability-submit { min-height: 42px; padding-inline: 20px; }
.availability-rule-note { display: flex; justify-content: space-between; gap: 15px; padding: 0 22px 16px; color: #94a3b8; font-size: 9.5px; }
.availability-rule-note strong { color: #059669; text-align: right; }
.availability-query-result { margin-top: 12px; }
.schedule-empty-state { display: grid; min-height: 280px; place-items: center; align-content: center; gap: 8px; padding: 30px; border: 1px dashed #dbe3ec; border-radius: 13px; background: #fbfcfe; color: #94a3b8; text-align: center; }
.schedule-empty-state > span { font-size: 35px; color: #a5b4c8; }.schedule-empty-state strong { color: #475569; }.schedule-empty-state p { font-size: 10px; }
.schedule-empty-state.compact { min-height: 90px; padding: 18px; }
.availability-summary { display: grid; grid-template-columns: auto 1fr auto; gap: 15px; align-items: center; padding: 18px 22px; border: 1px solid; border-radius: 13px; }
.availability-summary.available { border-color: #a7f3d0; background: #ecfdf5; color: #065f46; }.availability-summary.unavailable { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
.availability-summary-icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 999px; background: #059669; color: #fff; font-size: 22px; font-weight: 900; }
.availability-summary.unavailable .availability-summary-icon { background: #dc2626; }
.availability-summary > div:nth-child(2) { display: grid; gap: 4px; }.availability-summary > div:nth-child(2) > strong { font-size: 15px; }.availability-summary p { font-size: 11px; }.availability-summary p b { font-size: 22px; }
.availability-reserve { display: grid; min-width: 190px; gap: 4px; padding: 11px 15px; border-radius: 10px; background: rgba(255,255,255,.74); text-align: right; }
.availability-reserve span, .availability-reserve small { color: #94a3b8; font-size: 9px; }.availability-reserve strong { color: #334155; font-size: 13px; }
.schedule-data-warning { margin-top: 10px; padding: 10px 14px; border: 1px solid #fcd34d; border-radius: 9px; background: #fffbeb; color: #92400e; font-size: 10px; }
.availability-result-group { margin-top: 10px; padding: 18px 20px; border: 1px solid #dce5ef; border-radius: 13px; background: #fff; }
.availability-result-title { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 12px; }
.availability-result-title h3 { color: #172033; font-size: 14px; }.availability-result-title span { color: #94a3b8; font-size: 9.5px; }
.availability-candidate { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 13px; align-items: center; padding: 13px; border: 1px solid #e5eaf1; border-radius: 11px; }
.availability-candidate + .availability-candidate { margin-top: 8px; }.availability-candidate.recommended { border: 2px solid #34d399; background: #fbfffd; }
.availability-candidate-check { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 999px; background: #059669; color: #fff; font-weight: 900; }
.availability-candidate > div:nth-child(2) { display: grid; gap: 3px; }.availability-candidate > div:nth-child(2) span { color: #059669; font-size: 9px; font-weight: 800; }.availability-candidate > div:nth-child(2) strong { color: #1e293b; font-size: 13px; }.availability-candidate > div:nth-child(2) small { color: #94a3b8; font-size: 9px; }
.availability-candidate-actions { display: flex; gap: 6px; }.btn.dark { border-color: #111827; background: #111827; color: #fff; }
.availability-reasons { display: grid; gap: 7px; }.availability-reasons p { display: flex; justify-content: space-between; gap: 15px; padding: 10px; border-radius: 8px; background: #fef2f2; color: #b91c1c; font-size: 10px; }.availability-reasons strong { color: #475569; }

.precise-schedule-head em { display: inline-flex; margin-left: 6px; padding: 4px 7px; border-radius: 7px; background: #eef0ff; color: #4f46e5; font-size: 9px; font-style: normal; vertical-align: middle; }
.precise-schedule-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #edf1f5; }
.precise-schedule-toolbar .schedule-brand-chips { padding-block: 12px; }
.precise-date-nav { display: flex; align-items: center; gap: 7px; padding-right: 20px; }.precise-date-nav .input { width: 136px; }.precise-date-nav .icon-btn { width: 31px; height: 31px; }.precise-date-nav .btn { min-height: 32px; padding: 6px 12px; }
.precise-search-row { padding: 12px 20px; border-bottom: 1px solid #edf1f5; }.precise-search-row .input { max-width: 460px; background: #f8fafc; }
.precise-legend { display: flex; flex-wrap: wrap; gap: 15px; padding: 10px 20px; background: #fbfcfe; color: #64748b; font-size: 9px; }
.precise-legend span { display: inline-flex; align-items: center; gap: 5px; }.precise-legend i { width: 11px; height: 11px; border: 1px solid; border-radius: 3px; }
.stage-outbound { border-color: #f59e0b !important; background: #fef3c7; }.stage-renting { border-color: #3b82f6 !important; background: #dbeafe; }.stage-return { border-color: #fb7185 !important; background: #ffe4e6; }.stage-overdue { border-color: #ef4444 !important; background: #fee2e2; }.stage-completed { border-color: #94a3b8 !important; background: #e2e8f0; }.stage-free { border-color: #6ee7b7 !important; background: #d1fae5; }
.precise-schedule-scroll { min-height: 430px; max-height: 68vh; overflow: auto; border-top: 1px solid #edf1f5; background: #fff; }
.precise-table { width: calc(280px + var(--precise-width)); min-width: 100%; }
.precise-grid-head, .precise-device-row { display: grid; grid-template-columns: 280px var(--precise-width); min-width: max-content; }
.precise-grid-head { position: sticky; top: 0; z-index: 8; min-height: 54px; border-bottom: 1px solid #dfe6ee; background: #fff; }
.precise-device-column { position: sticky; left: 0; z-index: 5; display: flex; align-items: center; min-width: 0; padding: 9px 13px; border-right: 1px solid #e3e9f0; background: #fff; color: #475569; }
.precise-grid-head .precise-device-column { z-index: 10; background: #f8fafc; font-size: 10px; font-weight: 800; }
.precise-day-header { display: grid; grid-template-columns: repeat(var(--precise-days), 36px); background: #f8fafc; }
.precise-day-header span { display: grid; place-items: center; align-content: center; border-right: 1px solid #e8edf3; color: #94a3b8; }.precise-day-header span.today { background: #eef2ff; color: #4f46e5; }.precise-day-header b { font-size: 10px; }.precise-day-header small { font-size: 8px; }
.precise-model-row { position: sticky; left: 0; z-index: 6; display: flex; align-items: center; gap: 8px; width: calc(280px + var(--precise-width)); min-height: 35px; padding: 7px 13px; border-bottom: 1px solid #e2e8f0; background: #f4f7fa; color: #475569; font-size: 10px; }.precise-model-row span { padding: 2px 6px; border-radius: 6px; background: #e2e8f0; color: #64748b; font-size: 8px; }
.precise-device-row { min-height: 48px; border-bottom: 1px solid #edf1f5; }
.precise-device-button { width: 280px; gap: 9px; border: 0; font: inherit; text-align: left; cursor: pointer; }.precise-device-button:hover { background: #f8fafc; }.precise-device-button i { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 999px; background: #34d399; }.precise-device-button i.busy { background: #60a5fa; }.precise-device-button span { display: grid; gap: 2px; min-width: 0; }.precise-device-button strong { overflow: hidden; color: #475569; font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }.precise-device-button small { overflow: hidden; color: #a0aec0; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.precise-timeline-row { position: relative; width: var(--precise-width); min-height: 48px; background-image: repeating-linear-gradient(to right, transparent 0, transparent 35px, #edf1f5 35px, #edf1f5 36px); }
.precise-stage-bar { position: absolute; top: 9px; z-index: 2; height: 29px; overflow: visible; padding: 0 7px; border: 1px solid; border-radius: 4px; font: inherit; font-size: 8.5px; font-weight: 800; text-align: left; white-space: nowrap; cursor: pointer; }
.precise-stage-bar.outbound { border-color: #f59e0b; background: #fef3c7; color: #b45309; }.precise-stage-bar.renting { border-color: #3b82f6; background: #dbeafe; color: #2563eb; }.precise-stage-bar.return { border-color: #fb7185; background: #ffe4e6; color: #be123c; }.precise-stage-bar.overdue { border-color: #ef4444; background: #fee2e2; color: #b91c1c; }.precise-stage-bar.completed { border-color: #94a3b8; background: #e2e8f0; color: #64748b; }
.precise-stage-popover { position: absolute; top: 34px; left: 50%; z-index: 50; display: none; width: 230px; padding: 12px; transform: translateX(-50%); border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; box-shadow: 0 16px 35px rgba(15,23,42,.2); color: #475569; white-space: normal; }
.precise-stage-popover strong { color: #172033; font-size: 11px; }.precise-stage-popover em { float: right; padding: 2px 5px; border-radius: 5px; background: #eff6ff; color: #2563eb; font-size: 8px; font-style: normal; }.precise-stage-popover small { display: block; margin-top: 6px; font-size: 9px; font-weight: 500; }.precise-stage-bar:hover { z-index: 40; }.precise-stage-bar:hover .precise-stage-popover { display: block; }

.logistics-settings-dialog { width: min(920px, calc(100vw - 28px)); }
.logistics-settings-summary { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 12px; padding: 18px 20px; }
.logistics-settings-summary > label { display: grid; gap: 6px; color: #475569; font-size: 10px; font-weight: 700; }.logistics-settings-summary > div { display: grid; align-content: center; gap: 3px; padding: 12px; border-radius: 10px; background: #ecfdf5; }.logistics-settings-summary > div span, .logistics-settings-summary > div small { color: #64748b; font-size: 9px; }.logistics-settings-summary > div strong { color: #047857; font-size: 14px; }
.logistics-route-grid { display: grid; grid-template-columns: 1fr auto 1fr .7fr auto; gap: 9px; align-items: end; }.logistics-route-grid label { display: grid; gap: 6px; color: #475569; font-size: 10px; font-weight: 700; }.logistics-arrow { padding-bottom: 11px; color: #94a3b8; font-size: 18px; }.logistics-route-grid .btn { min-height: 42px; }
.logistics-override-list { display: grid; gap: 7px; max-height: 290px; overflow: auto; }.logistics-override-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid #e5eaf1; border-radius: 9px; }.logistics-override-row > span { display: grid; gap: 2px; }.logistics-override-row strong { color: #334155; font-size: 11px; }.logistics-override-row small { color: #94a3b8; font-size: 8px; }.logistics-override-row b { color: #4f46e5; font-size: 11px; }

.inventory-qr-selection-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0; padding: 8px 12px; border: 1px solid #dbeafe; border-radius: 9px; background: #f8fbff; color: #2563eb; font-size: 10px; font-weight: 700; }
.inventory-selection-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.inventory-trash-list { display: grid; gap: 10px; margin-top: 12px; }
.inventory-trash-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px; }
.inventory-trash-row label { display: flex; align-items: flex-start; flex: 1 1 220px; gap: 10px; min-width: 0; }
.inventory-trash-row input { flex: 0 0 auto; }
.inventory-trash-row span { display: grid; gap: 5px; overflow-wrap: anywhere; }
.inventory-trash-row small { color: #64748b; }
#inventoryTrashDialog .inventory-selection-actions { margin-top: 12px; }
.inventory-qr-selection-bar small { color: #94a3b8; font-weight: 500; }
.inventory-qr-select, .inventory-qr-inline-select { display: inline-flex; align-items: center; gap: 4px; color: #64748b; font-size: 9px; font-weight: 700; cursor: pointer; }
.inventory-qr-select { margin-right: 7px; vertical-align: middle; }
.inventory-qr-checkbox { width: 15px; height: 15px; accent-color: #2563eb; cursor: pointer; }
.inventory-model-actions [data-qr-model-id] { color: #2563eb; }
.inventory-model-card { position: relative; grid-template-columns: 118px minmax(0, 1fr) 170px; min-height: 118px; overflow: visible; content-visibility: visible; contain: none; }
.inventory-model-card:has(.inventory-card-more[open]) { z-index: 40; }
.inventory-model-body h3 { font-size: 16px; }
.inventory-model-body { padding: 15px 16px; }
.inventory-model-extra { display: none; }
.inventory-model-actions { position: relative; align-content: center; padding: 14px; }
.inventory-model-actions > .btn { width: 100%; justify-content: center; }
.inventory-card-more { position: relative; width: 100%; }
.inventory-card-more > summary { display: flex; width: 100%; justify-content: center; list-style: none; cursor: pointer; }
.inventory-card-more > summary::-webkit-details-marker { display: none; }
.inventory-card-more > div { position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; display: grid; width: 180px; gap: 4px; padding: 8px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; box-shadow: 0 14px 32px rgba(15,23,42,.16); }
.inventory-model-card.menu-open { z-index: 40; }
.inventory-card-more.drop-up > div { top: auto; bottom: calc(100% + 6px); }
.inventory-card-more .text-btn { width: 100%; padding: 7px 8px; border-radius: 7px; text-align: left; }
.inventory-card-more .text-btn:hover { background: #f1f5f9; }
.inventory-view-switch { padding: 3px; border: 1px solid #e2e8f0; border-radius: 10px; background: #f8fafc; }
.inventory-view-switch button { min-height: 31px; padding: 5px 12px; border: 0; border-radius: 7px; color: #64748b; background: transparent; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.inventory-view-switch button.active { background: #111827; color: #fff; box-shadow: 0 3px 8px rgba(15,23,42,.14); }

@media (max-width: 1180px) {
  .availability-form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .availability-submit { width: 100%; }
  .precise-schedule-toolbar { align-items: flex-start; flex-direction: column; padding-bottom: 12px; }.precise-date-nav { padding: 0 20px; }
}

@media (max-width: 720px) {
  .inventory-qr-selection-bar { align-items: flex-start; flex-direction: column; gap: 3px; }
  .inventory-model-card { grid-template-columns: 1fr; grid-template-rows: 130px auto auto; }
  .inventory-model-actions { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #edf0f4; border-left: 0; }
  .inventory-card-more > div { right: 0; left: auto; }
  #deviceDialog .form-grid,
  #inventoryModelDialog .form-grid { grid-template-columns: 1fr; gap: 10px; }
  #deviceDialog .model-autofill-hint { min-height: 54px; }
  .schedule-hero { align-items: stretch; flex-direction: column; padding: 16px; }.schedule-hero-copy h2 { font-size: 20px; }.schedule-hero-actions { display: grid; grid-template-columns: 1fr 1fr; }.schedule-hero-actions .btn:last-child { grid-column: 1 / -1; }
  .schedule-workspace-tabs { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }.schedule-workspace-tab { padding-inline: 8px; }
  .schedule-forecast-toolbar, .precise-schedule-head, .availability-query-head { align-items: flex-start; flex-direction: column; padding: 15px; }.schedule-date-field { width: 100%; }.schedule-date-field .input { flex: 1; }
  .schedule-brand-chips { flex-wrap: nowrap; overflow-x: auto; padding: 11px 14px; }.schedule-brand-chips button { flex: 0 0 auto; }
  .availability-form-grid { grid-template-columns: 1fr 1fr; padding: 14px; }.availability-form-grid > label:nth-last-of-type(1) { grid-column: 1 / -1; }.availability-submit { grid-column: 1 / -1; }.availability-rule-note { align-items: flex-start; flex-direction: column; padding: 0 14px 14px; }.availability-rule-note strong { text-align: left; }
  .availability-summary { grid-template-columns: auto 1fr; padding: 14px; }.availability-reserve { grid-column: 1 / -1; min-width: 0; text-align: left; }.availability-result-group { padding: 13px; }.availability-candidate { grid-template-columns: auto 1fr; }.availability-candidate-actions { grid-column: 1 / -1; }.availability-candidate-actions .btn { flex: 1; }
  .precise-date-nav { flex-wrap: wrap; padding: 0 14px; }.precise-search-row, .precise-legend { padding-inline: 14px; }.precise-schedule-scroll { min-height: 380px; }.precise-grid-head, .precise-device-row { grid-template-columns: 210px var(--precise-width); }.precise-table { width: calc(210px + var(--precise-width)); }.precise-device-column, .precise-device-button { width: 210px; }.precise-model-row { width: calc(210px + var(--precise-width)); }
  .logistics-settings-summary { grid-template-columns: 1fr; padding: 14px; }.logistics-route-grid { grid-template-columns: 1fr 1fr; }.logistics-arrow { display: none; }.logistics-route-grid .btn { grid-column: 1 / -1; }.logistics-override-row { grid-template-columns: 1fr auto; }.logistics-override-row button { grid-column: 1 / -1; justify-self: end; }
}

/* v2.9.15：手机库存页以“高频操作优先、筛选成组、卡片完整可读”为原则重新排布。 */
@media (max-width: 720px) {
  #tab-inventory { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .inventory-section-head { display: grid !important; grid-template-columns: minmax(0, 1fr); align-items: stretch !important; gap: 12px; }
  .inventory-section-head .header-actions { width: 100%; }
  .inventory-section-head > div:first-child > p { max-width: 34em; line-height: 1.55; }
  .inventory-command-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    padding: 0;
  }
  .inventory-command-bar > .btn,
  .inventory-command-bar > .inventory-more-menu > summary {
    min-height: 42px;
    padding-inline: 9px;
    font-size: 11px;
    justify-content: center;
  }
  .inventory-command-bar > .inventory-more-menu { grid-column: span 2; }
  .inventory-command-bar > .btn:nth-child(3) { grid-column: auto; }
  .inventory-more-popover { z-index: 110; }
  .inventory-brand-chips { margin: 10px -2px 9px; padding-inline: 2px; scroll-padding-inline: 2px; scrollbar-width: none; }
  .inventory-brand-chips::-webkit-scrollbar { display: none; }
  .inventory-brand-chip { min-height: 36px; padding-inline: 14px; }
  .inventory-filter-shell { gap: 7px; padding: 10px; border-radius: 14px; }
  .inventory-filter-shell .input,
  .inventory-filter-shell > .btn { min-height: 44px; font-size: 14px; }
  .inventory-search-block span { padding-left: 4px; font-size: 10px; line-height: 1.4; }
  .inventory-view-row { gap: 8px; margin: 10px 0; }
  .inventory-view-switch { min-height: 43px; }
  .inventory-view-switch button { min-height: 37px; padding-inline: 6px; font-size: 11px; }
  #inventoryResultSummary { padding-inline: 3px; font-size: 10.5px; line-height: 1.45; }
  .inventory-qr-selection-bar { padding: 10px 12px; border-radius: 11px; font-size: 10.5px; }
  .inventory-model-grid, .inventory-device-grid { gap: 12px; }
  .inventory-model-card { grid-template-rows: 104px auto auto; border-radius: 14px; }
  .inventory-model-image { min-height: 104px; }
  .inventory-model-body { padding: 13px 14px; }
  .inventory-model-body h3 { overflow: visible; margin-bottom: 7px; font-size: 16px; white-space: normal; overflow-wrap: anywhere; }
  .inventory-model-price strong { font-size: 22px; }
  .inventory-sku { min-height: 28px; overflow: visible; align-items: center; white-space: normal; overflow-wrap: anywhere; }
  .inventory-sku span { align-self: flex-start; margin-left: auto; }
  .inventory-stock-line { max-width: none; padding: 9px 10px; }
  .inventory-stock-line strong { font-size: 12px; }
  .inventory-stock-line span { font-size: 10px; line-height: 1.55; }
  .inventory-model-actions { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; padding: 11px 12px; }
  .inventory-model-actions > .btn,
  .inventory-card-more > summary { min-height: 40px; font-size: 11px; }
  .inventory-card-more > div { position: fixed; right: 12px; left: 12px; top: auto; bottom: max(14px, env(safe-area-inset-bottom)); width: auto; max-height: min(46vh, 340px); overflow: auto; padding: 10px; border-radius: 14px; box-shadow: 0 18px 48px rgba(15,23,42,.22); }
  .inventory-card-more.drop-up > div { top: auto; bottom: max(14px, env(safe-area-inset-bottom)); }
  .inventory-card-more .text-btn { min-height: 42px; padding: 10px; font-size: 12px; }
  .inventory-device-card { border-radius: 14px; }
  .inventory-device-card-head { padding: 14px; }
  .inventory-device-card-head h3 { overflow: visible; white-space: normal; overflow-wrap: anywhere; }
  .inventory-device-identifiers { grid-template-columns: 1fr; padding-inline: 14px; }
  .inventory-device-identifiers button { min-height: 48px; }
  .inventory-device-actions { gap: 0; padding: 4px 8px; }
  .inventory-device-actions .text-btn { min-height: 42px; padding: 7px 9px; }
  .inventory-table-wrap { border-radius: 12px; -webkit-overflow-scrolling: touch; }
}

@media (min-width: 380px) and (max-width: 430px) {
  .inventory-filter-shell { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inventory-filter-shell .inventory-search-block { grid-column: 1 / -1; }
  .inventory-filter-shell > .btn { grid-column: span 2; }
}

/* v2.9.0-final：侧栏玻璃层与 SVG 图标最终覆盖 */
@media (min-width: 721px) {
  body.is-authenticated { background: radial-gradient(circle at 18% 12%, rgba(255,228,238,.45), transparent 32%), radial-gradient(circle at 86% 8%, rgba(219,235,255,.56), transparent 36%), #f4f7fb; }
  body.is-authenticated .sidebar { position: sticky; z-index: 20; overflow: hidden auto; background: linear-gradient(180deg, rgba(255,255,255,.78), rgba(247,250,255,.62)); border-right: 1px solid rgba(148,163,184,.18); box-shadow: 14px 0 34px rgba(48,63,89,.1); backdrop-filter: blur(24px) saturate(145%); -webkit-backdrop-filter: blur(24px) saturate(145%); }
  body.is-authenticated .sidebar::before { position: absolute; inset: 0; z-index: 0; pointer-events: none; content: ""; background: linear-gradient(145deg, rgba(255,255,255,.5), transparent 38%, rgba(226,234,248,.18)); }
  body.is-authenticated .sidebar > * { position: relative; z-index: 1; }
  body.is-authenticated .sidebar-brand, body.is-authenticated .sidebar-label, body.is-authenticated .sidebar-rule { display: block; }
  body.is-authenticated .sidebar-brand { min-height: 62px; padding: 0 8px 18px; color: #162136; }
  body.is-authenticated .sidebar-brand-mark { width: 44px; height: 44px; flex-basis: 44px; border-radius: 13px; background: linear-gradient(145deg,#ff527b,#ea174a 78%); box-shadow: 0 12px 24px rgba(234,23,74,.25); font-size: 20px; }
  body.is-authenticated .sidebar-brand strong { color: #182338; font-size: 16px; letter-spacing: -.01em; }
  body.is-authenticated .sidebar-brand span { color: #7d8ba1; font-size: 10.5px; }
  body.is-authenticated .sidebar-rule { height: 1px; margin: 0 -12px 16px; background: rgba(148,163,184,.2); }
  body.is-authenticated .sidebar-label { padding: 0 14px 10px; color: #8b98ab; font-size: 9px; letter-spacing: .18em; }
  body.is-authenticated .nav { min-height: 50px; margin-bottom: 6px; padding: 8px 12px; gap: 12px; border: 1px solid transparent; border-radius: 14px; color: #526177; font-size: 14px; font-weight: 760; line-height: 1.3; transition: background .18s ease,border-color .18s ease,color .18s ease,transform .18s ease,box-shadow .18s ease; }
  body.is-authenticated .nav:hover { transform: translateX(2px); border-color: rgba(148,163,184,.17); background: rgba(255,255,255,.62); color: #1f2c45; box-shadow: 0 7px 18px rgba(60,79,108,.07); }
  body.is-authenticated .nav.active, body.is-authenticated .nav.active:hover { transform: none; border-color: transparent; background: linear-gradient(135deg,#ff4b77,#ea174a 84%); color: #fff; box-shadow: 0 13px 25px rgba(234,23,74,.24); }
  body.is-authenticated .nav::before { display: none; }
  body.is-authenticated .nav-icon { display: grid; width: 32px; height: 32px; flex: 0 0 32px; place-items: center; border: 1px solid rgba(148,163,184,.23); border-radius: 10px; background: rgba(255,255,255,.48); color: #6f7f96; transition: background .18s ease,border-color .18s ease,color .18s ease,transform .18s ease; }
  body.is-authenticated .nav-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
  body.is-authenticated .nav:hover .nav-icon { border-color: rgba(234,23,74,.2); color: #e11d48; transform: scale(1.04); }
  body.is-authenticated .nav.active .nav-icon { border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.17); color: #fff; }
  body.is-authenticated .side-note { margin: auto 0 1px; padding: 13px 13px 11px; border: 1px solid rgba(148,163,184,.2); border-radius: 14px; background: rgba(255,255,255,.55); color: #708098; box-shadow: 0 10px 26px rgba(63,80,107,.06); backdrop-filter: blur(12px); }
  body.is-authenticated .side-note strong { color: #46566f; font-size: 11px; }
  body.is-authenticated .side-note p { margin: 6px 0; font-size: 11px; }
}
@media (max-width: 720px) {
  .sidebar { background: rgba(255,255,255,.78); border-color: rgba(148,163,184,.2); backdrop-filter: blur(18px) saturate(145%); -webkit-backdrop-filter: blur(18px) saturate(145%); }
  .nav::before { display: none; }
  .nav-icon { display: inline-grid; width: 18px; height: 18px; margin-right: 4px; place-items: center; color: currentColor; vertical-align: middle; }
  .nav-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
}

/* v2.9.1：按界面要求隐藏侧栏状态颜色说明，保留状态色逻辑 */
.side-note { display: none !important; }

/* v2.9.3：让长列表只绘制视口附近的卡片，减少滚动与切换时的布局压力 */
.target-order-card,
.inventory-model-card,
.inventory-device-card {
  content-visibility: auto;
  contain-intrinsic-size: 0 180px;
}

/* v2.9.6：库存“品牌 → 型号 → 名称/编号”层级与设备名称专项编辑 */
.device-auto-classify {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #cfe5ff;
  border-radius: 12px;
  background: linear-gradient(135deg, #f2f8ff, #f8fbff);
  color: #1e3a5f;
}
.device-auto-classify input { width: 18px; height: 18px; accent-color: #2563eb; }
.device-auto-classify span { display: grid; gap: 2px; }
.device-auto-classify small { color: #71849c; font-size: 11px; }
.device-classification-suggestion { margin-top: 12px; padding: 12px 14px; border: 1px solid #cfe5ff; border-radius: 12px; background: #f2f8ff; }
.device-classification-suggestion p { margin: 0 0 10px; overflow-wrap: anywhere; color: #1e3a5f; }
.device-classification-suggestion[hidden] { display: none; }
.device-name-preview {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 3px 12px;
  margin-top: 14px;
  padding: 13px 15px;
  border: 1px solid #d8e4f1;
  border-radius: 12px;
  background: #f8fbff;
}
.device-name-preview > span { grid-row: 1 / 3; padding: 5px 9px; border-radius: 999px; background: #e8f2ff; color: #2563eb; font-size: 11px; font-weight: 750; }
.device-name-preview strong { min-width: 0; color: #152238; font-size: 15px; overflow-wrap: anywhere; }
.device-name-preview small { color: #718096; font-size: 11px; }
.inventory-model-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.inventory-model-meta span { padding: 3px 7px; border-radius: 999px; background: #eef5ff; color: #35618f; font-size: 10px; font-weight: 700; }

@media (max-width: 720px) {
  .device-name-preview { grid-template-columns: 1fr; }
  .device-name-preview > span { grid-row: auto; justify-self: start; }
}

/* v2.9.10：型号卡片包含可展开菜单，不使用内容可见性裁切，避免低高度窗口只显示半张卡片。 */
.inventory-model-grid { overflow: visible; }
.inventory-model-card { overflow: visible; content-visibility: visible; contain: none; }
/* 时间轴详情气泡也需要跨出卡片边界展示，滚动范围由内部时间轴容器负责。 */
.precise-schedule-card { overflow: visible; }

.mobile-bottom-nav { display: none; }

@media (max-width: 720px) {
  .sidebar { display: none; }
  .sidebar.mobile-more-open { position: fixed; inset: 8px 10px auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 72dvh; overflow: auto; padding: 12px; border: 1px solid #e2e8f0; border-radius: 16px; background: rgba(255,255,255,.97); box-shadow: 0 20px 60px rgba(15,23,42,.2); }
  .sidebar.mobile-more-open .sidebar-brand,
  .sidebar.mobile-more-open .sidebar-label,
  .sidebar.mobile-more-open .sidebar-rule { display: none; }
  .sidebar.mobile-more-open .nav { display: flex; min-width: 0; min-height: 44px; justify-content: center; }
  .mobile-bottom-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 90; display: flex; gap: 2px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none; padding: 6px 8px max(6px, env(safe-area-inset-bottom)); border-top: 1px solid #e2e8f0; background: rgba(255,255,255,.96); box-shadow: 0 -6px 24px rgba(15,23,42,.1); }
  .mobile-bottom-nav::-webkit-scrollbar { display: none; }
  .mobile-bottom-nav-item { display: grid; min-width: calc((100vw - 22px) / 4); min-height: 44px; flex: 0 0 calc((100vw - 22px) / 4); scroll-snap-align: center; place-items: center; gap: 1px; padding: 3px 2px; border: 0; border-radius: 10px; color: #64748b; background: transparent; font: inherit; font-size: 10px; font-weight: 800; }
  .mobile-bottom-nav-item svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .mobile-bottom-nav-item.active { color: #e11d48; background: #fff1f2; }
  .layout { padding-bottom: 76px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analysis-finance-grid, .analysis-chart-grid, .analysis-ranking-grid, .rent-price-grid, .time-log-grid, .operation-log-toolbar, .account-grid, .account-form-grid { grid-template-columns: minmax(0, 1fr) !important; min-width: 0 !important; width: 100%; }
  .analysis-chart-card, .analysis-ranking-card, .rent-price-card, .account-system-card, .operation-log-card { min-width: 0; width: 100%; }
  .analysis-ranking-card { max-height: 420px; overflow: auto; }
  .dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  .dialog-inner { display: flex; min-height: 100dvh; flex-direction: column; padding: 12px; padding-top: max(12px, env(safe-area-inset-top)); }
  .dialog-head { position: sticky; top: 0; z-index: 2; margin: -12px -12px 12px; padding: 12px; background: rgba(255,255,255,.97); }
  .dialog-head h2 { font-size: 19px; }
  .dialog-head-actions { flex: 0 0 auto; }
  .dialog-inner > .dialog-actions { position: sticky; bottom: 0; z-index: 2; margin: auto -12px -12px; padding: 10px 12px max(10px, env(safe-area-inset-bottom)); background: rgba(255,255,255,.97); }
  .dialog-actions .spacer { display: none; }
  .daily-date-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .daily-date-toolbar .daily-date-label, .daily-date-toolbar .daily-date-summary { grid-column: 1 / -1; }
  .daily-order-board { gap: 8px; }
  .daily-order-stats { max-height: 180px; }
  .target-order-card { min-width: 0; }
  .rent-price-table-wrap, .operation-log-table-wrap, .account-table-wrap { overflow-x: auto; }
}

@media (max-width: 380px) {
  .mobile-bottom-nav { padding-inline: 4px; }
  .mobile-bottom-nav-item { font-size: 9px; }
  .content { padding-inline: 0; }
}

@media (max-width: 720px) {
  .inventory-model-card { grid-template-rows: 72px auto auto; }
  .inventory-model-image { min-height: 72px; }
  .inventory-model-body { padding: 8px 10px; }
  .inventory-model-meta { gap: 3px; margin-bottom: 3px; }
  .inventory-model-meta span { padding: 2px 5px; font-size: 9px; }
  .inventory-model-body h3 { margin-bottom: 5px; font-size: 14px; }
  .inventory-model-price, .inventory-sku, .inventory-model-extra { display: none; }
  .inventory-stock-line { padding: 6px 8px; }
  .inventory-model-actions { gap: 5px; padding: 5px 8px; }
  .inventory-model-actions > .btn, .inventory-card-more > summary { min-height: 36px; }
  .action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .action-grid > * { min-height: 78px; padding: 9px; }
  .action-grid strong { font-size: 17px; }
  .daily-order-section { padding: 9px; }
  .daily-section-head h3 { font-size: 16px; }
  .daily-section-desc { display: none; }
  .daily-order-list { gap: 6px; }
  .daily-order-item { gap: 4px; padding: 8px; border-radius: 9px; }
  .daily-order-top strong { font-size: 12px; }
  .daily-order-main { font-size: 11px; line-height: 1.35; }
  .daily-order-meta { font-size: 10px; }
  .daily-order-actions { gap: 6px; }
  .daily-order-actions .btn, .daily-return-button { min-height: 36px; padding: 6px 8px; }
  .target-order-card-head { padding: 9px 10px; }
  .order-tag-line { display: none; }
  .order-customer-line { gap: 4px; }
  .order-customer-line strong { font-size: 13px; }
  .order-customer-line > span:not(.status-pill) { font-size: 10px; }
  .order-amount-block strong { font-size: 16px; }
  .target-order-card-body { grid-template-columns: 1fr 1fr; }
  .order-card-column { padding: 8px 10px; }
  .order-card-column h4 { margin-bottom: 5px; font-size: 9px; }
  .order-card-column p { grid-template-columns: 52px minmax(0, 1fr); gap: 4px; margin: 3px 0; font-size: 10px; line-height: 1.3; }
  .delivery-column { display: none; }
  .order-card-note { display: none; }
  .target-order-card-actions { padding: 5px 7px; gap: 4px; }
  .order-primary-actions, .order-secondary-actions { width: auto; flex: 1 1 100%; gap: 4px; }
  .order-primary-actions .btn { flex: 1 1 auto; min-height: 36px; padding: 5px 6px; font-size: 10px; }
  .order-secondary-actions { display: none; }
  .order-card-more { flex: 0 0 auto; }
  .order-card-more > summary { min-height: 36px; padding: 5px 8px; }
  .order-card-more > div { position: fixed; right: 12px; bottom: max(14px, env(safe-area-inset-bottom)); left: 12px; z-index: 100; display: grid; gap: 6px; padding: 10px; border: 1px solid #e2e8f0; border-radius: 14px; background: #fff; box-shadow: 0 18px 48px rgba(15,23,42,.22); }
  .order-card-more > div .btn { min-height: 42px; }
  .order-secondary-actions .mini-status { display: none; }
  .order-pagination { margin-top: 8px; padding: 7px; }
  .inventory-device-card-head { padding: 9px 11px 6px; }
  .inventory-device-card-head h3 { margin-top: 2px; font-size: 13px; }
  .inventory-device-identifiers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; padding: 0 11px 6px; }
  .inventory-device-identifiers button { min-height: 38px; padding: 5px 7px; }
  .inventory-device-identifiers button span { font-size: 8px; }
  .inventory-device-identifiers button strong { font-size: 10px; }
  .inventory-device-metrics span { gap: 1px; padding: 5px 6px; font-size: 8px; }
  .inventory-device-metrics strong { font-size: 9.5px; }
  .inventory-device-note { display: none; }
  .inventory-device-actions { min-height: 42px; padding: 2px 7px; }
  .inventory-device-actions .text-btn { min-height: 38px; padding: 5px 8px; }
  .inventory-device-more { flex: 1 1 auto; }

  /* v2.9.18：核心手机页面采用摘要优先，低频信息按需展开。 */
  .inventory-section-head { gap: 8px !important; padding-bottom: 10px; }
  .inventory-section-head .section-kicker,
  .inventory-section-head > div:first-child > p { display: none; }
  .inventory-section-head h2 { margin: 0; font-size: 20px; }
  .inventory-command-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .inventory-command-bar > .btn,
  .inventory-command-bar > .inventory-more-menu > summary { min-height: 38px; padding: 6px 5px; font-size: 10px; }
  .inventory-command-bar > .btn:first-child { grid-column: span 1; }
  .inventory-command-bar > .inventory-more-menu { grid-column: auto; }
  .inventory-brand-chips { margin-block: 6px; }
  .inventory-brand-chip { min-height: 32px; padding-inline: 11px; font-size: 10px; }
  .inventory-filter-shell { grid-template-columns: minmax(0, 1fr) 82px !important; gap: 6px; padding: 7px; }
  .inventory-search-block { min-width: 0; }
  .inventory-search-block span { display: none; }
  .inventory-filter-shell .input,
  .inventory-filter-shell > .btn { min-height: 40px; }
  .inventory-mobile-filter-toggle { display: inline-flex; justify-content: center; }
  .inventory-advanced-filters { display: none; grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .inventory-advanced-filters.mobile-open { display: grid; }
  .inventory-advanced-filters .btn { min-height: 38px; grid-column: 1 / -1; }
  .inventory-view-row { margin: 7px 0; }
  .inventory-view-switch { min-height: 38px; }
  .inventory-view-switch button { min-height: 32px; }
  #inventoryResultSummary { display: none; }
  .inventory-qr-selection-bar { margin: 6px 0; padding: 7px 9px; }
  .inventory-qr-selection-bar small { display: none; }
  .inventory-device-identifiers { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-bottom: 5px; }
  .inventory-device-identifiers button { min-height: 34px; padding: 4px 6px; }
  .inventory-device-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inventory-device-metrics span { padding: 4px 6px; }
  .inventory-device-metrics span:nth-child(n + 3) { display: none; }
  .inventory-device-actions { min-height: 38px; }
  .inventory-device-actions .text-btn { min-height: 34px; padding: 4px 6px; font-size: 10px; }

  .order-mobile-no { display: inline; overflow: hidden; max-width: 45%; color: #64748b; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
  .order-customer-line > span:not(.status-pill):not(.order-mobile-no) { display: none; }
  .target-order-card-head { min-height: 48px; }
  .order-customer-line strong { font-size: 15px; }
  .order-customer-line .status-pill { font-size: 10px; }
  .order-amount-block strong { font-size: 18px; }
  .order-card-column h4 { font-size: 10px; }
  .order-card-column p { font-size: 11px; line-height: 1.4; }
  .order-amount-block small { display: none; }
  .target-order-card-body { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
  .order-number-column { display: none; }
  .device-column { max-height: none; overflow: visible; }
  .period-column p:first-of-type,
  .period-column p:last-of-type { display: none; }
  .period-column p:nth-of-type(2),
  .period-column p:nth-of-type(3) { display: grid; }
  .target-order-card-actions { flex-wrap: nowrap; min-height: 42px; }
  .order-primary-actions { flex-wrap: nowrap; min-width: 0; }
  .order-primary-actions .btn { min-width: 0; white-space: nowrap; }
  .order-card-more > summary { white-space: nowrap; }
  .order-primary-actions:has(.deposit-refund-btn) { flex-wrap: wrap; }
  .order-primary-actions .deposit-refund-btn { flex: 1 1 100%; min-width: 0; order: -1; }
}

.order-mobile-no { display: none; }
.order-mobile-summary { display: none; }
.order-mobile-info-line { display: none; }

@media (max-width: 720px) {
  html:has(dialog[open]) { overflow: hidden; }
  #orderDialog[open] { overflow: hidden; }
  .order-mobile-no { display: inline; }
  .order-mobile-summary { display: none; }
  .order-mobile-info-line { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 10px; padding: 7px 10px; border-top: 1px solid #f1f5f9; color: #64748b; font-size: 10px; line-height: 1.35; }
  .order-mobile-info-line span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .order-mobile-summary span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .target-order-card-body { min-height: 96px; }
  .ranking-cards,
  #tab-analysis .two-col { grid-template-columns: minmax(0, 1fr) !important; align-items: start !important; width: 100% !important; min-width: 0 !important; }
  .ranking-cards > .card { width: 100% !important; min-width: 0 !important; max-height: 420px; overflow: hidden; }
  .ranking-cards .ranking-table-wrap { width: 100% !important; max-width: 100% !important; max-height: 340px; overflow: auto; }
  #tab-analysis .table-wrap { width: 100%; max-width: 100%; max-height: 460px; overflow: auto; }
  #operationLogList { max-height: min(64dvh, 580px); overflow: auto; overscroll-behavior: contain; padding-right: 2px; }

  /* 手机编辑订单：订单表单不能作为 flex 子项被压缩到只剩标题。让表单自身滚动，
     各彩色信息分区保持完整高度，底部操作栏仍可见。 */
  #orderDialog #orderForm.order-form-shell {
    display: block;
    height: 100dvh;
    min-height: 0;
    max-height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: max(12px, env(safe-area-inset-top)) 12px calc(86px + env(safe-area-inset-bottom));
  }
  #orderDialog #orderForm.order-form-shell > .order-section-tone {
    height: auto !important;
    min-height: 0;
    max-height: none !important;
    overflow: visible !important;
    flex: none;
  }
  #orderDialog #orderForm.order-form-shell > .order-advanced-block {
    flex: none;
  }
  #orderDialog #orderForm.order-form-shell > .dialog-actions {
    position: sticky;
    bottom: 0;
    z-index: 4;
    margin: 12px -12px -12px;
    padding: 10px 12px max(10px, env(safe-area-inset-bottom));
    background: rgba(255,255,255,.97);
    box-shadow: 0 -8px 20px rgba(15,23,42,.08);
  }

  /* 更多菜单是低频操作，采用窄型浮层并避开底部导航，避免铺满屏幕或被遮挡。 */
  .order-card-more > div {
    right: 12px;
    left: auto;
    bottom: calc(64px + env(safe-area-inset-bottom));
    z-index: 220;
    width: min(258px, calc(100vw - 24px));
    max-height: min(54dvh, 420px);
    overflow-y: auto;
    gap: 4px;
    padding: 8px;
  }
  .order-card-more > div .btn {
    min-height: 38px;
    padding: 7px 10px;
    font-size: 11px;
  }

  /* 手机订单卡片采用与桌面一致的四块信息结构：商品/订单信息在上排，
     租赁周期/交付物流在下排。减少重复摘要后，信息更完整且更易扫读。 */
  .target-order-card-head { padding: 11px 12px 10px; }
  .order-customer-line { gap: 6px; }
  .order-customer-line strong { font-size: 16px; }
  .order-customer-line > span:not(.status-pill):not(.order-mobile-no) { display: none; }
  .order-mobile-no { max-width: 46%; font-size: 10px; }
  .order-customer-line .status-pill { padding: 4px 8px; font-size: 11px; }
  .order-amount-block strong { font-size: 20px; }
  .target-order-card-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 0;
  }
  .order-number-column,
  .delivery-column { display: block !important; }
  .order-card-column {
    min-width: 0;
    padding: 8px 10px;
    border-right: 1px solid #edf0f4;
    border-bottom: 1px solid #edf0f4;
  }
  .order-card-column:nth-child(2n) { border-right: 0; }
  .order-card-column:nth-child(n + 3) { border-bottom: 0; }
  .order-card-column h4 { margin-bottom: 5px; font-size: 11px; }
  .order-card-column p {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 4px;
    margin: 2px 0;
    font-size: 12px;
    line-height: 1.25;
    overflow-wrap: anywhere;
    word-break: normal;
  }
  .order-device-line { gap: 2px; margin-bottom: 5px; }
  .order-device-line strong { font-size: 13.5px; line-height: 1.25; overflow-wrap: anywhere; }
  .order-device-line span { font-size: 11px; }
  .order-mobile-info-line { display: none; }
  .order-card-note { display: grid; padding: 6px 10px; font-size: 11px; }
  .order-search-block .search-help { display: none; }

  /* 新增/编辑订单：操作集中到顶部，避免底部重复的取消白条。 */
  #orderDialog .dialog-head-actions { gap: 5px; }
  #orderDialog .sticky-dialog-head { margin: 0 0 8px; padding: 0 0 2px; }
  #orderDialog .order-save-bar { top: 0; margin: 0 0 6px; padding: 0; }
  #orderDialog .order-save-bar .order-sticky-save { min-height: 38px; padding: 8px 16px; font-size: 12px; }
  #orderDialog .dialog-head-actions .order-header-status {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
  }
  #orderDialog .dialog-head-actions .order-header-status .input {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    min-height: 34px;
  }
  #orderDialog .dialog-head-delete {
    /* 与底部保存按钮保持相同的触控尺寸，避免删除按钮被网格拉伸。 */
    min-width: 116px;
    min-height: 38px;
    padding: 8px 16px;
    font-size: 12px;
  }
  #orderDialog.order-dialog-creating .dialog-head-actions { grid-template-columns: minmax(0, 1fr) auto auto; }
  #orderDialog.order-dialog-editing .dialog-head-actions {
    display: grid;
    grid-template-columns: repeat(3, max-content);
    grid-auto-columns: max-content;
    grid-template-rows: auto auto;
    justify-content: end;
    align-items: center;
    width: auto;
  }
  #orderDialog.order-dialog-editing .dialog-head-actions .order-header-status {
    grid-column: 1 / -1;
    width: 100%;
  }
  #orderDialog.order-dialog-editing .dialog-head-actions .dialog-head-save { min-width: 116px; min-height: 38px; padding: 8px 16px; font-size: 12px; }
  #orderDialog.order-dialog-creating .dialog-head-actions { display: flex; justify-content: flex-end; }
  #orderDialog .order-form-legend { gap: 5px 9px; margin-bottom: 8px; padding: 7px 9px; }
  #orderDialog .order-section-tone { margin: 8px 0; padding: 10px; }
  #orderDialog .order-section-tone > .form-section-head { gap: 7px; margin-bottom: 7px; padding-bottom: 7px; }
  #orderDialog .order-section-tone .form-grid { gap: 7px; }
  #orderDialog .order-primary-grid,
  #orderDialog .order-rental-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  #orderDialog .order-primary-grid .span-2,
  #orderDialog .order-rental-grid .span-2 { grid-column: 1 / -1; }
  #orderDialog .order-section-tone label { gap: 3px; font-size: 11px; }
  #orderDialog .order-section-tone .input { min-height: 35px; padding: 7px 8px; font-size: 12px; }
  #orderDialog .order-section-tone textarea.input { min-height: 56px; }
  #orderDialog .field-hint { padding: 2px 5px; font-size: 9px; }

  /* 设备选择列表保持紧凑，脚本只渲染前 10 台并将已选项置顶。 */
  #orderDialog .order-device-workspace { gap: 7px; }
  #orderDialog .order-device-model-groups { gap: 6px; padding-bottom: 4px; }
  #orderDialog .order-device-model-card { flex-basis: 198px; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 7px; padding: 6px; }
  #orderDialog .order-device-model-image { width: 38px; height: 38px; }
  #orderDialog .order-device-active-group { gap: 7px; padding: 7px 9px; }
  #orderDialog .order-device-active-group strong { font-size: 12px; }
  #orderDialog .order-device-active-group span { font-size: 9px; }
  #orderDialog .order-device-checklist { grid-template-columns: 1fr; }
  #orderDialog .order-device-row { gap: 6px; padding: 7px 9px; }
  #orderDialog .order-device-row-copy { gap: 1px; }
  #orderDialog .order-device-row-copy strong { font-size: 11.5px; }
  #orderDialog .order-device-row-copy span,
  #orderDialog .order-device-row-copy small { font-size: 9px; }
  #orderDialog .order-device-row > b { font-size: 8.5px; }
}

/* v2.9.52：库存型号卡片与筛选栏统一尺寸，图片始终在固定方形容器内完整显示。 */
.inventory-model-image,
.inventory-device-thumb {
  min-width: 0;
  min-height: 0;
  place-items: center;
  grid-template-rows: minmax(0, 1fr);
}
.inventory-model-image img,
.inventory-device-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.inventory-command-bar { align-items: stretch; gap: 8px; }
.inventory-command-bar > .btn,
.inventory-command-bar > .inventory-more-menu > summary {
  min-width: 108px;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12px;
}
.inventory-more-menu > summary { justify-content: center; }
.inventory-filter-shell #clearInventoryFiltersBtn {
  width: 86px;
  min-width: 86px;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12px;
  justify-self: end;
}
.inventory-model-body h3 { min-width: 0; }

@media (min-width: 721px) {
  .inventory-model-card {
    grid-template-columns: 128px minmax(0, 1fr) 150px;
    min-height: 150px;
  }
  .inventory-model-image {
    width: 112px;
    height: 112px;
    aspect-ratio: 1 / 1;
    align-self: center;
    justify-self: center;
    border: 1px solid #edf0f4;
    border-radius: 12px;
  }
  .inventory-model-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      'meta meta'
      'title title'
      'price sku'
      'stock stock'
      'totals totals';
    align-content: center;
    gap: 4px 10px;
    padding: 12px 15px;
  }
  .inventory-model-meta { grid-area: meta; margin-bottom: 0; }
  .inventory-model-body h3 { grid-area: title; margin-bottom: 1px; }
  .inventory-model-price { grid-area: price; }
  .inventory-sku {
    grid-area: sku;
    width: auto;
    max-width: 100%;
    margin: 0;
    justify-content: flex-end;
  }
  .inventory-stock-line { grid-area: stock; max-width: none; }
  .inventory-model-totals { grid-area: totals; }
  .inventory-model-actions {
    display: grid;
    grid-template-columns: 1fr;
    align-content: center;
    gap: 8px;
    padding: 12px;
  }
  .inventory-model-actions > .btn,
  .inventory-model-actions > .inventory-card-more > summary { width: 100%; min-height: 36px; }
  .inventory-filter-shell {
    grid-template-columns: minmax(260px, 1.8fr) repeat(3, minmax(128px, .72fr)) auto;
  }
  .inventory-filter-shell #deviceBrandFilter { grid-column: 2; grid-row: 1; }
  .inventory-filter-shell #deviceCategoryFilter { grid-column: 3; grid-row: 1; }
  .inventory-filter-shell #deviceStatusFilter { grid-column: 4; grid-row: 1; }
  .inventory-filter-shell #clearInventoryFiltersBtn { grid-column: 5; grid-row: 1; }
}

@media (max-width: 1100px) and (min-width: 721px) {
  .inventory-filter-shell {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }
  .inventory-filter-shell .inventory-search-block { grid-column: 1 / -1; }
  .inventory-filter-shell #deviceBrandFilter,
  .inventory-filter-shell #deviceCategoryFilter,
  .inventory-filter-shell #deviceStatusFilter,
  .inventory-filter-shell #clearInventoryFiltersBtn {
    grid-column: auto;
    grid-row: auto;
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 900px) and (min-width: 721px) {
  .inventory-command-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
    gap: 7px;
  }
  .inventory-command-bar > .btn,
  .inventory-command-bar > .inventory-more-menu > summary {
    width: 100%;
    min-width: 0;
  }
  .inventory-model-card {
    grid-template-columns: 96px minmax(0, 1fr) 126px;
    min-height: 140px;
  }
  .inventory-model-image { width: 84px; height: 84px; }
  .inventory-model-body { display: block; padding: 10px; }
  .inventory-model-meta { gap: 3px; margin-bottom: 4px; }
  .inventory-model-body h3 { margin-bottom: 4px; font-size: 14px; }
  .inventory-model-price { margin-bottom: 4px; }
  .inventory-sku { display: none; }
  .inventory-stock-line { padding: 7px 8px; }
  .inventory-model-actions { gap: 6px; padding: 10px; }
}

@media (max-width: 720px) {
  .inventory-command-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .inventory-command-bar > .btn,
  .inventory-command-bar > .inventory-more-menu > summary {
    min-width: 0;
    min-height: 40px;
    padding: 8px 6px;
    font-size: 11px;
  }
  .inventory-command-bar > .inventory-more-menu { grid-column: 1 / -1; }
  .inventory-filter-shell {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px;
  }
  .inventory-filter-shell .inventory-search-block { grid-column: 1 / -1 !important; }
  .inventory-filter-shell .inventory-mobile-filter-toggle,
  .inventory-filter-shell > #clearInventoryFiltersBtn {
    grid-column: auto !important;
    width: 100%;
    min-width: 0;
    min-height: 40px;
  }
  .inventory-filter-shell > #clearInventoryFiltersBtn { padding-inline: 8px; }
  .inventory-model-card {
    grid-template-columns: 88px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: stretch;
  }
  .inventory-model-image {
    width: 80px;
    height: 80px;
    min-height: 80px;
    aspect-ratio: 1 / 1;
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    justify-self: center;
    border: 1px solid #edf0f4;
    border-radius: 12px;
  }
  .inventory-model-body {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    padding: 10px 10px 8px 0;
  }
  .inventory-model-actions {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .inventory-model-actions > .btn,
  .inventory-model-actions > .inventory-card-more > summary { min-height: 40px; }
  .inventory-card-more > div {
    position: absolute;
    top: calc(100% + 6px);
    bottom: auto;
    right: 12px;
    left: auto;
    width: min(270px, calc(100vw - 24px));
    max-height: min(52dvh, 360px);
    gap: 4px;
    padding: 8px;
    border-radius: 12px;
  }
  .inventory-card-more.drop-up > div { top: auto; bottom: calc(100% + 6px); }
  .inventory-card-more .text-btn { min-height: 38px; padding: 7px 9px; font-size: 11px; }
}

/* v2.9.53：档期管理移动端统一工作区，减少重复入口并让预测/查询/排期一次看到更多内容。 */
.schedule-hero-actions .btn { min-height: 38px; padding: 8px 14px; border-radius: 10px; }
.schedule-workspace-tab { min-width: 104px; }
.schedule-forecast-table { table-layout: auto; }
.precise-day-header { grid-template-columns: repeat(var(--precise-days), var(--precise-day-width, 36px)); }
.precise-model-label { display: flex; align-items: center; gap: 8px; }
.precise-timeline-row {
  background-image: repeating-linear-gradient(
    to right,
    transparent 0,
    transparent calc(var(--precise-day-width, 36px) - 1px),
    #edf1f5 calc(var(--precise-day-width, 36px) - 1px),
    #edf1f5 var(--precise-day-width, 36px)
  );
}

@media (max-width: 720px) {
  .schedule-hero {
    gap: 10px;
    margin-bottom: 8px;
    padding: 13px 14px;
    border-radius: 14px;
  }
  .schedule-hero-copy h2 { margin-top: 2px; font-size: 20px; }
  .schedule-hero-copy p { max-width: 33em; font-size: 10px; line-height: 1.45; }
  .schedule-hero-actions { display: flex; width: 100%; justify-content: flex-end; gap: 7px; }
  .schedule-hero-actions .btn { width: auto; min-width: 132px; min-height: 36px; padding: 7px 12px; font-size: 11px; }

  .schedule-workspace-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 3px;
    margin-bottom: 8px;
    padding: 3px;
    border-radius: 11px;
  }
  .schedule-workspace-tab { min-width: 0; min-height: 36px; padding: 7px 4px; border-radius: 8px; font-size: 10px; }

  .schedule-forecast-card,
  .availability-query-card,
  .precise-schedule-card { border-radius: 14px; }
  .schedule-forecast-toolbar {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 11px 12px;
  }
  .schedule-forecast-toolbar h3 { font-size: 16px; }
  .schedule-forecast-toolbar p { display: none; }
  .schedule-date-field { width: auto; min-width: 126px; padding: 6px 8px; font-size: 9px; }
  .schedule-date-field .input { min-width: 0; width: 94px; height: 30px; padding: 4px 2px; font-size: 10px; }
  .schedule-brand-chips { gap: 5px; padding: 8px 11px; }
  .schedule-brand-chips button { min-height: 29px; padding: 5px 10px; font-size: 9px; }
  .schedule-forecast-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-color: #94a3b8 transparent;
  }
  .schedule-forecast-table { width: 590px; min-width: 590px; table-layout: fixed; font-size: 10px; }
  .schedule-forecast-table th,
  .schedule-forecast-table td { padding: 8px 6px; white-space: nowrap; }
  .schedule-forecast-table th:first-child,
  .schedule-forecast-table td:first-child { width: 136px; }
  .schedule-forecast-table th:nth-child(2),
  .schedule-forecast-table td:nth-child(2),
  .schedule-forecast-table th:nth-child(3),
  .schedule-forecast-table td:nth-child(3),
  .schedule-forecast-table th:nth-child(4),
  .schedule-forecast-table td:nth-child(4) { width: 56px; }
  .schedule-forecast-table th:nth-child(5),
  .schedule-forecast-table td:nth-child(5),
  .schedule-forecast-table th:nth-child(6),
  .schedule-forecast-table td:nth-child(6),
  .schedule-forecast-table th:nth-child(7),
  .schedule-forecast-table td:nth-child(7),
  .schedule-forecast-table th:nth-child(8),
  .schedule-forecast-table td:nth-child(8) { width: 56px; }
  .schedule-forecast-table th:last-child,
  .schedule-forecast-table td:last-child { width: 62px; }
  .forecast-model-cell { min-width: 0; gap: 6px; }
  .forecast-model-icon { width: 29px; height: 29px; border-radius: 8px; font-size: 11px; }
  .forecast-model-cell div { min-width: 0; gap: 2px; }
  .forecast-model-cell strong { overflow: hidden; font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
  .forecast-model-cell small { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
  .forecast-available-pill { min-width: 29px; height: 21px; padding: 0 5px; }
  .schedule-status { min-height: 20px; padding: 3px 6px; font-size: 8px; }

  .availability-query-head {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 11px 12px;
  }
  .schedule-title-with-icon { min-width: 0; gap: 8px; }
  .schedule-title-with-icon > span { width: 31px; height: 31px; border-radius: 9px; font-size: 14px; }
  .availability-query-head h3 { font-size: 16px; }
  .availability-query-head p { display: none; }
  .query-only-badge { flex: 0 0 auto; padding: 4px 6px; font-size: 8px; }
  .availability-form-grid { gap: 7px; padding: 10px 11px 8px; }
  .availability-form-grid > label, .availability-method-field { gap: 4px; font-size: 9px; }
  .availability-form-grid .input { height: 38px; min-height: 38px; padding: 7px 8px; font-size: 11px; }
  .availability-method-field { grid-column: 1 / -1; }
  .segmented-control { height: 38px; }
  .segmented-control button { font-size: 9px; }
  .availability-form-grid > label:nth-last-of-type(1),
  .availability-submit { grid-column: 1 / -1; }
  .availability-submit { min-height: 39px; font-size: 12px; }
  .availability-rule-note { gap: 3px; padding: 0 11px 10px; font-size: 8px; line-height: 1.4; }
  .availability-rule-note strong { font-size: 8px; }
  .availability-query-result { margin-top: 8px; }
  .schedule-empty-state { min-height: 220px; padding: 24px 14px; }
  .schedule-empty-state > span { font-size: 28px; }
  .schedule-empty-state strong { font-size: 12px; }
  .schedule-empty-state p { font-size: 9px; }

  .precise-schedule-head { align-items: center; gap: 8px; padding: 11px 12px; }
  .precise-schedule-head h3 { font-size: 16px; }
  .precise-schedule-head p { display: none; }
  .precise-schedule-head em { margin-left: 3px; padding: 3px 5px; font-size: 8px; }
  .precise-schedule-toolbar { align-items: stretch; gap: 6px; padding-bottom: 8px; }
  .precise-schedule-toolbar .schedule-brand-chips { padding: 8px 11px 5px; }
  .precise-date-nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 32px 54px 32px;
    gap: 4px;
    padding: 0 11px;
  }
  .precise-date-nav .input { width: auto; min-width: 0; min-height: 34px; height: 34px; padding: 6px 7px; font-size: 10px; }
  .precise-date-nav .icon-btn { width: auto; height: 34px; min-height: 34px; }
  .precise-date-nav .btn { min-height: 34px; padding: 6px 5px; font-size: 10px; }
  .precise-date-nav #preciseScheduleRange { grid-column: 1 / -1; padding: 0 0 2px; text-align: center; font-size: 9px; }
  .precise-search-row { padding: 8px 11px; }
  .precise-search-row .input { width: 100%; min-height: 36px; height: 36px; padding: 7px 9px; font-size: 11px; }
  .precise-legend { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px 4px; padding: 7px 11px; font-size: 8px; }
  .precise-legend span { gap: 3px; min-width: 0; white-space: nowrap; }
  .precise-legend i { width: 9px; height: 9px; flex: 0 0 auto; }
  .precise-schedule-scroll {
    min-height: 410px;
    max-height: min(68dvh, 620px);
    -webkit-overflow-scrolling: touch;
    scrollbar-color: #94a3b8 transparent;
  }
  .precise-grid-head,
  .precise-device-row { grid-template-columns: 148px var(--precise-width); }
  .precise-table { width: calc(148px + var(--precise-width)); }
  .precise-device-column,
  .precise-device-button { width: 148px; padding: 7px 8px; }
  .precise-grid-head .precise-device-column { font-size: 9px; }
  .precise-day-header span { width: var(--precise-day-width, 28px); }
  .precise-day-header b { font-size: 9px; }
  .precise-day-header small { font-size: 7px; }
  .precise-model-row { width: calc(148px + var(--precise-width)); min-height: 29px; padding: 0; gap: 0; font-size: 9px; }
  .precise-model-label { position: sticky; left: 0; z-index: 7; display: flex; width: 148px; min-height: 29px; align-items: center; gap: 5px; padding: 5px 8px; background: #f4f7fa; }
  .precise-model-label strong { overflow: hidden; min-width: 0; text-overflow: ellipsis; white-space: nowrap; }
  .precise-model-label span { flex: 0 0 auto; padding: 2px 5px; font-size: 7px; }
  .precise-device-row, .precise-timeline-row { min-height: 40px; }
  .precise-device-button { gap: 6px; }
  .precise-device-button i { width: 7px; height: 7px; }
  .precise-device-button span { gap: 1px; }
  .precise-device-button strong { font-size: 8.5px; }
  .precise-device-button small { font-size: 7.5px; }
  .precise-stage-bar { top: 7px; height: 26px; padding: 0 4px; border-radius: 3px; font-size: 7.5px; }
  .precise-stage-popover { top: 30px; width: 205px; padding: 9px; }
  .precise-stage-popover strong { font-size: 10px; }
  .precise-stage-popover small { margin-top: 4px; font-size: 8px; }
}

@media (min-width: 721px) and (max-width: 1100px) {
  /* 侧栏占用一部分宽度的平板视图，预测表也保持摘要列可见。 */
  .schedule-forecast-table { width: 760px; min-width: 760px; table-layout: fixed; }
  .schedule-forecast-table th,
  .schedule-forecast-table td { padding: 10px 7px; }
  .schedule-forecast-table th:first-child,
  .schedule-forecast-table td:first-child { width: 180px; }
  .schedule-forecast-table th:nth-child(2),
  .schedule-forecast-table td:nth-child(2),
  .schedule-forecast-table th:nth-child(3),
  .schedule-forecast-table td:nth-child(3),
  .schedule-forecast-table th:nth-child(4),
  .schedule-forecast-table td:nth-child(4),
  .schedule-forecast-table th:nth-child(5),
  .schedule-forecast-table td:nth-child(5),
  .schedule-forecast-table th:nth-child(6),
  .schedule-forecast-table td:nth-child(6),
  .schedule-forecast-table th:nth-child(7),
  .schedule-forecast-table td:nth-child(7),
  .schedule-forecast-table th:nth-child(8),
  .schedule-forecast-table td:nth-child(8) { width: 65px; }
  .schedule-forecast-table th:last-child,
  .schedule-forecast-table td:last-child { width: 70px; }
  .forecast-model-cell { min-width: 0; gap: 7px; }
  .forecast-model-icon { width: 32px; height: 32px; }
  .forecast-model-cell strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* v2.9.57b：错误提示弹窗覆盖移动端长表单的全屏 dialog 规则，始终居中可见。 */
.app-alert-dialog.dialog {
  position: fixed;
  inset: auto;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(460px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  height: fit-content !important;
  min-height: 0;
  max-height: calc(100vh - 36px);
  margin: auto;
  overflow: visible;
  border-radius: 18px;
}
body:not(.is-authenticated) #appAlertDialog[open] { display: block; }
@media (max-width: 720px) {
  .app-alert-dialog.dialog {
    top: 50%;
    left: 50%;
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    height: fit-content !important;
    min-height: 0;
    max-height: calc(100dvh - 32px);
    margin: auto;
    border-radius: 16px;
  }
}

/* v2.9.60：苹果 Safari 视口异常时只缩放页面，不改变原有桌面布局与功能结构。 */
html.apple-touch body {
  display: block !important;
  zoom: var(--apple-page-scale, 1);
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
html.apple-touch .layout {
  display: block !important;
  width: 100%;
  max-width: none;
  padding: 0 10px 84px;
}
html.apple-touch .sidebar {
  display: none !important;
}
html.apple-touch .content {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 12px 0 0 !important;
}
@supports not (zoom: 1) {
  html.apple-touch body {
    transform: scale(var(--apple-page-scale, 1));
    transform-origin: top left;
    width: calc(100% / var(--apple-page-scale, 1));
    min-height: calc(100vh / var(--apple-page-scale, 1));
  }
}

/* v2.11：其他功能设置页，按“单项开关 + 独立保存”组织，避免把第三方配置藏进弹窗。 */
.other-features-head { align-items: flex-start; }
.feature-security-note { color: #64748b; font-size: 12px; padding: 8px 12px; border: 1px solid #dbe5f1; border-radius: 999px; background: rgba(255,255,255,.7); white-space: nowrap; }
.other-features-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.feature-card { min-width: 0; display: grid; gap: 14px; padding: 18px; border: 1px solid #e4ebf4; box-shadow: 0 12px 30px rgba(37, 65, 101, .06); }
.feature-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.feature-card-head > div:first-child { display: flex; gap: 11px; min-width: 0; align-items: flex-start; }
.feature-card h3 { margin: 0; font-size: 16px; color: #172033; }
.feature-card p { margin: 4px 0 0; color: #8090a8; font-size: 12px; line-height: 1.45; }
.feature-icon { display: inline-grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 11px; font-weight: 900; color: #fff; background: linear-gradient(135deg, #0f766e, #14b8a6); }
.feature-icon-tracking { background: linear-gradient(135deg, #2563eb, #60a5fa); font-size: 23px; }
.feature-icon-template { background: linear-gradient(135deg, #7c3aed, #c084fc); font-size: 13px; }
.feature-switch { display: inline-flex; gap: 7px; align-items: center; color: #64748b; font-size: 12px; white-space: nowrap; cursor: pointer; }
.feature-switch input { position: absolute; opacity: 0; pointer-events: none; }
.feature-switch span { width: 38px; height: 22px; border-radius: 999px; background: #cbd5e1; position: relative; transition: .2s ease; }
.feature-switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(15,23,42,.2); transition: .2s ease; }
.feature-switch input:checked + span { background: #10b981; }
.feature-switch input:checked + span::after { transform: translateX(16px); }
.feature-switch b { font-weight: 700; }
.feature-status-row { display: flex; align-items: center; gap: 8px; }
.feature-status { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 9px; border-radius: 999px; color: #64748b; background: #f1f5f9; font-size: 12px; font-weight: 800; }
.feature-status.ok { color: #047857; background: #d1fae5; }
.feature-status.warn { color: #b45309; background: #fef3c7; }
.feature-status-row small { color: #94a3b8; }
.feature-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.feature-form-grid.three { grid-template-columns: 1fr 1.2fr 1fr; }
.feature-form-grid label, .feature-template-editor label { display: grid; gap: 5px; color: #64748b; font-size: 12px; font-weight: 700; min-width: 0; }
.feature-form-grid .input, .feature-template-editor .input { width: 100%; min-width: 0; }
.feature-help { padding: 9px 10px; border-radius: 10px; color: #7b8ba2; background: #f7fafc; font-size: 11px; line-height: 1.55; }
.feature-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.feature-actions .input { flex: 1 1 130px; min-width: 0; }
.feature-actions .btn { flex: 0 0 auto; }
.feature-actions-end { justify-content: flex-end; }
.feature-check { display: flex; align-items: center; gap: 8px; color: #52637a; font-size: 12px; }
.tracking-query-box { display: grid; gap: 9px; padding-top: 12px; border-top: 1px solid #edf1f6; }
.feature-subtitle { color: #334155; font-size: 12px; font-weight: 800; }
.tracking-result { min-height: 30px; padding: 9px 10px; border-radius: 10px; background: #f8fafc; color: #64748b; font-size: 12px; line-height: 1.5; }
.tracking-result-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; color: #334155; }
.tracking-result ol { display: grid; gap: 6px; margin: 8px 0 0; padding-left: 17px; }
.tracking-result li { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 8px; }
.tracking-result time { color: #94a3b8; }
.feature-template-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.feature-template-editor textarea { resize: vertical; line-height: 1.55; }
.tracking-info-link { display: inline; max-width: 100%; padding: 0; border: 0; color: #2563eb; background: transparent; font: inherit; text-align: left; text-decoration: underline; text-decoration-color: #bfdbfe; text-underline-offset: 3px; cursor: pointer; }
.tracking-hover-card { position: fixed; z-index: 1200; width: min(370px, calc(100vw - 24px)); padding: 12px; border: 1px solid #dbe5f2; border-radius: 12px; background: rgba(255,255,255,.98); box-shadow: 0 16px 38px rgba(30,64,175,.18); color: #334155; font-size: 11px; line-height: 1.45; opacity: 0; pointer-events: none; transform: translateY(4px); transition: opacity .12s ease, transform .12s ease; }
.tracking-hover-card.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.tracking-hover-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid #eef2f7; }
.tracking-hover-head > div { display: grid; gap: 2px; min-width: 0; }
.tracking-hover-head strong { color: #0f172a; font-size: 12px; }
.tracking-hover-head span { overflow: hidden; color: #64748b; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.tracking-hover-head em { flex: 0 0 auto; padding: 3px 7px; border-radius: 999px; background: #e0e7ff; color: #4338ca; font-size: 10px; font-style: normal; font-weight: 700; }
.tracking-hover-head em.is-delivered { background: #dcfce7; color: #047857; }
.tracking-hover-dates { display: flex; flex-wrap: wrap; gap: 5px 10px; padding-top: 7px; color: #047857; font-size: 10px; }
.tracking-hover-list { display: grid; gap: 6px; max-height: 172px; margin: 9px 0 0; padding: 0 0 0 16px; overflow: auto; }
.tracking-hover-list li { padding-left: 2px; }
.tracking-hover-list time { display: block; color: #94a3b8; font-size: 10px; }
.tracking-hover-list span { display: block; color: #334155; }
.tracking-hover-empty { margin: 10px 0 3px; color: #64748b; }
.tracking-hover-foot { display: block; padding-top: 8px; color: #94a3b8; font-size: 10px; }
.tracking-hover-error { margin: 7px 0 0; color: #b45309; }
@media (max-width: 1180px) { .other-features-grid { grid-template-columns: 1fr 1fr; } .other-features-grid .feature-card:last-child { grid-column: 1 / -1; } }
@media (max-width: 720px) {
  .other-features-head { gap: 8px; }
  .feature-security-note { white-space: normal; font-size: 11px; }
  .other-features-grid { grid-template-columns: 1fr; gap: 12px; }
  .other-features-grid .feature-card:last-child { grid-column: auto; }
  .feature-card { padding: 14px; gap: 11px; }
  .feature-form-grid, .feature-form-grid.three, .feature-template-editor { grid-template-columns: 1fr; }
  .feature-actions { align-items: stretch; }
  .feature-actions .btn, .feature-actions .input { width: 100%; flex: 1 1 100%; }
  .feature-actions-end { justify-content: stretch; }
  .tracking-result li { grid-template-columns: 1fr; gap: 1px; }
}
/* v2.12：快递100订阅与本地跟踪状态。查询、订阅、取消保持同一操作区，单号点击后可直接查看缓存轨迹。 */
.tracking-subscription-status { display:flex; align-items:center; gap:8px; min-height:28px; padding:6px 9px; border:1px solid #e5ebf4; border-radius:10px; background:#fbfdff; color:#64748b; font-size:11px; line-height:1.45; }
.tracking-subscription-status:empty { display:none; }
.tracking-subscription-status strong { color:#334155; }
.tracking-subscription-status .tracking-subscription-list { display:flex; flex-wrap:wrap; gap:5px; min-width:0; }
.tracking-subscription-chip { display:inline-flex; align-items:center; gap:4px; max-width:100%; padding:3px 7px; border-radius:999px; background:#eef2ff; color:#4f46e5; font-size:10px; font-weight:700; }
.tracking-subscription-chip.is-delivered { background:#dcfce7; color:#047857; }
.tracking-subscription-chip.is-exception { background:#fef3c7; color:#b45309; }
.tracking-subscription-chip.is-cancelled { background:#f1f5f9; color:#64748b; }
.tracking-subscription-chip span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
@media (max-width:720px) {
  .tracking-subscription-status { align-items:flex-start; flex-direction:column; gap:4px; font-size:10px; }
  .tracking-subscription-list { width:100%; }
  .tracking-subscription-chip { font-size:9px; }
}
.tracking-workspace { grid-column: 1 / -1; }
.sms-workspace { grid-column:1 / -1; min-width:0; }
.sms-rules { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.sms-rule { display:grid; align-content:start; gap:12px; padding:18px; border:1px solid #e2e8f0; border-radius:14px; min-width:0; background:#fbfdff; }
.sms-rule label { display:grid; gap:6px; font-size:13px; }
.sms-rule .input { width:100%; min-width:0; box-sizing:border-box; }
.sms-rule-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.sms-rule-head h4 { margin:0; }
.sms-rule-head label,.sms-rule .sms-approved { display:flex; align-items:flex-start; }
.sms-rule details,.sms-rule small { font-size:12px; color:#64748b; }
.sms-rule summary { cursor:pointer; }
.sms-preview { background:#eef4ff; border-radius:8px; padding:12px; margin:0; line-height:1.8; overflow-wrap:anywhere; font-size:13px; }
.sms-schedule { display:flex; align-items:center; gap:24px; }
.sms-schedule label { flex:0 0 230px; display:grid; gap:8px; }
.sms-schedule p { color:#64748b; font-size:13px; line-height:1.8; }
.sms-results { max-height:360px; overflow:auto; }
.sms-results article { border-bottom:1px solid #e2e8f0; padding:12px 0; font-size:12px; overflow-wrap:anywhere; }
#smsDraftStatus { font-size:12px; color:#b45309; }
@media(max-width:1000px) { .sms-rules { grid-template-columns:1fr; } }
@media(max-width:760px) { .sms-schedule { display:block; } .sms-workspace .feature-card-head { flex-wrap:wrap; } }
.tracking-overview { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:18px 0; }
.tracking-overview > div { display:flex; align-items:baseline; gap:12px; padding:18px; background:#f4f7fb; border:1px solid #e5ebf3; border-radius:12px; }
.tracking-overview strong { font-size:28px; color:#1d4ed8; line-height:1; }
.tracking-overview span { color:#64748b; font-size:12px; }
.tracking-layout { display:grid; grid-template-columns:minmax(220px, .7fr) minmax(0,1.8fr); gap:24px; }
.tracking-records { min-width:0; border-right:1px solid #e5ebf3; padding-right:20px; }
#trackingSubscriptionList { max-height:420px; overflow:auto; margin-top:14px; }
.tracking-record { display:grid; gap:5px; width:100%; text-align:left; padding:12px; margin-bottom:8px; border:1px solid #e5ebf3; border-radius:10px; background:#fff; cursor:pointer; overflow-wrap:anywhere; }
.tracking-record:hover, .tracking-record.is-selected { border-color:#93b4ed; background:#eff6ff; }
.tracking-record span,.tracking-record small { color:#64748b; font-size:11px; }
.tracking-workspace .tracking-query-box { margin:0; padding:0; border:0; background:transparent; min-width:0; }
.tracking-workspace .feature-form-grid { margin:14px 0; }
.tracking-actions { display:flex; flex-wrap:wrap; gap:10px; margin:16px 0 8px; }
.tracking-selected-status { margin:0; line-height:1.7; overflow-wrap:anywhere; }
.tracking-config { border-top:1px solid #e5ebf3; margin-top:22px; padding-top:18px; }
.tracking-config summary { cursor:pointer; font-weight:600; color:#334155; }
.tracking-config summary span { font-weight:400; font-size:12px; color:#64748b; margin-left:16px; }
.tracking-callback-field { grid-column:1 / -1; }
.tracking-workspace .btn:disabled { opacity:.6; cursor:default; }
@media (max-width:760px) {
  .tracking-layout { grid-template-columns:1fr; gap:16px; }
  .tracking-records { border-right:0; padding-right:0; }
  #trackingSubscriptionList { max-height:180px; }
  .tracking-overview { gap:6px; }
  .tracking-overview > div { padding:12px 8px; flex-direction:column; gap:8px; }
  .tracking-overview strong { font-size:23px; }
}
.tracking-workspace .feature-card-head > .feature-status { flex-shrink:0; white-space:nowrap; }
/* Model totals use the same per-device source as the batch preview. */
.inventory-model-totals { display:grid; grid-template-columns:minmax(0, .9fr) minmax(0, 1.1fr); gap:7px 12px; padding:9px 0 2px; }
.inventory-model-totals > span { display:grid; gap:4px; color:#64748b; font-size:11px; }
.inventory-model-totals strong { color:#0f172a; font-size:16px; overflow-wrap:anywhere; }
.inventory-model-totals > small { grid-column:1 / -1; color:#a16207; font-size:11px; }
.batch-model-summary { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px; margin:16px 0 8px; }
.batch-model-summary > div { display:grid; align-content:start; gap:6px; min-width:0; padding:13px; background:#f5f8fc; border:1px solid #e2e8f0; border-radius:10px; }
.batch-model-summary span, .batch-model-summary small { color:#64748b; font-size:12px; }
.batch-model-summary strong { color:#0f172a; font-size:19px; overflow-wrap:anywhere; }
.batch-device-preview { margin:14px 0; }
.batch-device-preview > summary { cursor:pointer; font-weight:600; padding:8px 0; }
.batch-device-preview .table-wrap { max-height:340px; overflow:auto; }
.batch-device-preview table { min-width:740px; width:100%; }
.batch-device-preview small { color:#64748b; }
#batchModelError:empty { display:none; }
@media (max-width:540px) {
  .batch-model-summary { grid-template-columns:1fr; }
  .inventory-model-totals { gap:6px; }
  .inventory-model-totals > span { font-size:10px; }
  .inventory-model-totals strong { font-size:14px; }
}
.tracking-confirm-dialog { border:1px solid #e2e8f0; border-radius:16px; padding:24px; width:min(440px, calc(100vw - 32px)); color:#334155; box-shadow:0 24px 70px #0f172a30; }
.tracking-confirm-dialog::backdrop { background:#0f172a66; }
.tracking-confirm-dialog h3 { margin:0 0 16px; }
.tracking-confirm-dialog p { font-size:14px; line-height:1.7; overflow-wrap:anywhere; }
.tracking-confirm-dialog form { display:flex; justify-content:flex-end; gap:12px; margin-top:24px; }
@media (min-width:761px) {
  .other-features-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .other-features-grid .feature-card:last-child { grid-column:auto; }
}
