:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --line: #d8dde5;
  --text: #172033;
  --muted: #667085;
  --blue: #2463eb;
  --green: #14804a;
  --amber: #a15c07;
  --red: #be2f2f;
  --shadow: 0 8px 28px rgba(23, 32, 51, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

.topbar {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 24px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  overflow-x: auto;
}

.nav a,
.button,
button {
  min-height: 34px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 6px;
  padding: 7px 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.nav a {
  border: 0;
  color: #344054;
}

.admin-subnav {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  margin: 0 0 16px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-subnav a {
  min-height: 32px;
  padding: 6px 10px;
  color: #344054;
  white-space: nowrap;
}

.userbar {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}

.checkline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #344054;
}

.checkline input {
  width: auto;
}

.page {
  width: min(1280px, calc(100vw - 32px));
  margin: 24px auto 56px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

h1,
h2 {
  margin: 0 0 8px;
  letter-spacing: 0;
}

h1 {
  font-size: 24px;
}

h2 {
  font-size: 17px;
  margin-top: 16px;
}

p {
  margin: 0 0 12px;
}

.muted,
.empty {
  color: var(--muted);
}

.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.secondary {
  background: #eef2f7;
}

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

.push-right {
  margin-left: auto;
}

.wide {
  width: 100%;
}

.auth-panel,
.mobile-shell,
.work-surface,
.print-preview,
.print-page {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.auth-panel {
  width: min(420px, 100%);
  margin: 70px auto;
  padding: 28px;
}

.mobile-shell {
  width: min(460px, 100%);
  margin: 18px auto;
  padding: 22px;
}

.wide-mobile {
  width: min(720px, 100%);
}

.work-surface,
.print-preview {
  padding: 18px;
  margin-bottom: 18px;
}

.narrow {
  width: min(460px, 100%);
}

.stack {
  display: grid;
  gap: 14px;
}

label,
.field-block {
  display: grid;
  gap: 6px;
  color: #344054;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

textarea {
  resize: vertical;
}

.grid.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.inline-form,
.toolbar,
.filters,
.actions,
.row-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.toolbar,
.filters {
  margin: 16px 0;
}

.filters {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.filters input,
.filters select {
  width: auto;
  min-width: 150px;
}

.filters .filter-combobox {
  position: relative;
  width: 220px;
}

.filters .filter-combobox input {
  width: 100%;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 0;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.summary-chip,
.status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef2f7;
  color: #344054;
}

.status-completed {
  background: #e9f8ef;
  border: 1px solid #b7e4c8;
  color: var(--green);
}

.status-waiting-load {
  background: #fff5e6;
  border: 1px solid #ffd599;
  color: var(--amber);
}

.status-waiting-receipt,
.status-exception {
  background: #fff1f1;
  border: 1px solid #ffd1d1;
  color: var(--red);
}

.status-voided {
  background: #f1f3f5;
  border: 1px solid #d8dde5;
  color: #475467;
}

.status-draft,
.status-default {
  background: #edf4ff;
  border: 1px solid #c7dbff;
  color: #1d4ed8;
}

.summary-chip.summary-danger {
  background: #fff1f1;
  border: 1px solid #ffd1d1;
  color: var(--red);
  font-weight: 700;
}

.number-warning {
  margin: -4px 0 12px;
  color: var(--red);
  font-weight: 700;
}

.alert {
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 14px;
}

.alert.danger {
  background: #fff1f1;
  border: 1px solid #ffd1d1;
  color: var(--red);
}

.alert.success {
  background: #edfdf5;
  border: 1px solid #bdebd3;
  color: var(--green);
}

.customer-picker {
  position: relative;
}

.search-results {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  display: grid;
  gap: 2px;
  max-height: 220px;
  overflow: auto;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.search-results[hidden] {
  display: none;
}

.search-results button,
.search-empty {
  width: 100%;
  justify-content: flex-start;
}

.search-empty {
  padding: 8px 10px;
  color: var(--muted);
}

.search-results[data-empty="true"]::before {
  content: "未找到匹配项";
  padding: 8px 10px;
  color: var(--muted);
}

.table-wrap {
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.data-table.fixed {
  table-layout: fixed;
}

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

.data-table td {
  display: table-cell;
}

.data-table th {
  background: #f0f3f8;
  color: #344054;
  font-weight: 700;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table tr.problem-row td {
  background: #fff7f7;
}

.data-table tr.problem-row .cell-input {
  color: var(--red);
  font-weight: 700;
}

.data-table tr.new-number-row td {
  background: #f8fbff;
}

.data-table.compact th,
.data-table.compact td {
  padding: 6px 8px;
}

.driver-identity {
  display: grid;
  gap: 2px;
}

.driver-identity strong {
  font-weight: 700;
}

.driver-identity span,
.detail-grid small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.data-table .row-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  white-space: nowrap;
}

.cell-input {
  border-color: transparent;
  background: transparent;
  padding: 4px;
}

.cell-input:focus {
  border-color: var(--blue);
  background: #fff;
}

.ok {
  color: var(--green);
}

.bad {
  color: var(--red);
}

.warn {
  color: var(--amber);
}

.number-table-footer {
  display: flex;
  justify-content: center;
  padding: 12px 0 0;
}

.add-number-button {
  min-width: 132px;
  font-weight: 700;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.metric-card,
.detail-grid div,
.task-row {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.metric-card {
  color: inherit;
  display: block;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.metric-card:hover,
.metric-card:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 8px 20px rgba(31, 95, 255, 0.12);
  outline: none;
  transform: translateY(-1px);
}

.metric-grid strong {
  display: block;
  font-size: 24px;
}

.metric-grid span,
.detail-grid span {
  color: var(--muted);
}

.metric-section {
  margin-bottom: 10px;
}

.metric-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
}

.metric-section-head h2 {
  font-size: 18px;
}

.metric-section-head span {
  color: var(--muted);
}

.metric-grid--today {
  grid-template-columns: repeat(2, minmax(160px, 1fr));
}

.metric-grid--pending {
  grid-template-columns: repeat(3, minmax(160px, 1fr));
}

.metric-grid small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.filter-summary {
  margin: -2px 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 700;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.detail-grid strong {
  display: block;
  margin-top: 4px;
}

.danger-zone {
  margin-bottom: 16px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  gap: 18px;
}

.detail-list {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.detail-list div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
  font-weight: 700;
}

.task-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.driver-console {
  display: grid;
  gap: 14px;
  width: min(520px, calc(100vw - 24px));
  margin-top: 18px;
}

.driver-console-head {
  display: flex;
  justify-content: flex-end;
}

.task-list-button {
  min-height: 42px;
  padding: 8px 14px;
  font-size: 18px;
  font-weight: 800;
}

.driver-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.driver-tabs button {
  min-height: 72px;
  border-radius: 8px;
  font-size: 22px;
  font-weight: 700;
}

.driver-tabs button.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.driver-panel {
  display: grid;
  gap: 12px;
}

.driver-main-action {
  width: 100%;
  min-height: 180px;
  border-radius: 8px;
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  font-size: 34px;
  font-weight: 800;
}

.scan-message {
  min-height: 32px;
  margin: 0;
  color: var(--muted);
  font-size: 22px;
  font-weight: 700;
  text-align: center;
}

.scan-message.ok {
  color: var(--green);
}

.scan-message.warn {
  color: var(--amber);
}

.scan-message.bad {
  color: var(--red);
}

.driver-confirm,
.driver-upload {
  display: grid;
  gap: 12px;
}

.driver-confirm strong {
  display: block;
  padding: 14px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 24px;
  text-align: center;
}

.driver-file-button {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 26px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.driver-file-button input {
  display: none;
}

.driver-upload input[type="file"] {
  display: none;
}

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

.driver-transfer {
  grid-column: 1 / -1;
  width: 100%;
}

.driver-transfer summary {
  cursor: pointer;
  color: var(--blue);
  font-weight: 800;
}

.driver-transfer form {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.driver-transfer select,
.driver-transfer input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 16px;
}

.inline-transfer-form {
  display: grid;
  gap: 6px;
  min-width: 220px;
}

.inline-transfer-form select,
.inline-transfer-form input {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
}

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

.receipt-preview strong {
  grid-column: 1 / -1;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--green);
  font-size: 20px;
  text-align: center;
}

.receipt-preview img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.driver-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.72);
}

.driver-dialog-overlay[hidden] {
  display: none;
}

.driver-dialog {
  width: min(520px, calc(100vw - 28px));
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}

.driver-dialog h2 {
  font-size: 28px;
  text-align: center;
}

.driver-dialog-detail {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.driver-dialog-detail div,
.driver-task-item {
  display: grid;
  grid-template-columns: 86px 1fr auto;
  gap: 8px;
  align-items: center;
}

.driver-dialog-detail dd {
  grid-column: 2 / -1;
}

.driver-task-list {
  display: grid;
  gap: 8px;
  max-height: min(58vh, 520px);
  overflow: auto;
}

.driver-task-item {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.driver-task-item span {
  color: var(--muted);
}

.driver-task-item em {
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef2f7;
  color: #344054;
  font-style: normal;
  white-space: nowrap;
}

.scanner-open {
  overflow: hidden;
}

.scanner-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
  padding: 18px;
  background: #0f172a;
  color: #fff;
}

.scanner-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.scanner-top strong {
  font-size: 26px;
  font-weight: 800;
}

.scanner-top button {
  min-width: 88px;
  min-height: 48px;
  border-color: rgba(255, 255, 255, 0.55);
  background: transparent;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
}

.scanner-view {
  align-self: center;
  width: 100%;
  min-height: 420px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 8px;
  background: #020617;
}

.scanner-view video {
  width: 100% !important;
  min-height: 420px;
  object-fit: cover;
}

.scanner-overlay .scan-message {
  color: #fff;
}

.scanner-overlay .scan-message.ok {
  color: #86efac;
}

.scanner-overlay .scan-message.warn {
  color: #fde68a;
}

.scanner-overlay .scan-message.bad {
  color: #fca5a5;
}

.print-preview-stack {
  display: grid;
  gap: 18px;
  overflow-x: auto;
  padding: 0 0 10px;
}

.pdf-preview-shell {
  height: calc(100vh - 150px);
  min-height: 720px;
  background: #303030;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.pdf-preview-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #303030;
}

.print-page {
  width: 1932px;
  min-height: 1366px;
  margin: 0 auto;
  padding: 12px 14px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  box-shadow: var(--shadow);
  page-break-after: always;
}

.print-page-head h2 {
  text-align: center;
  font-size: 19px;
  margin-bottom: 6px;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 7px;
  margin-bottom: 7px;
  font-size: 12px;
}

.print-number-table {
  width: 100%;
  border-collapse: collapse;
  align-self: start;
}

.print-number-table th,
.print-number-table td {
  border-bottom: 1px solid #edf0f5;
  padding: 0 3px;
  text-align: left;
  font-size: 14px;
  line-height: 1.18;
  height: 17px;
}

.print-number-table .seq-cell,
.print-number-table th:nth-child(odd) {
  width: 32px;
  color: var(--muted);
}

.print-number-table .number-cell,
.print-number-table th:nth-child(even) {
  width: calc((100% - 192px) / 6);
}

.print-page-foot {
  min-height: 64px;
  display: grid;
  grid-template-columns: 1fr 70px;
  align-items: end;
  gap: 10px;
  padding-top: 6px;
}

.signature-line {
  font-size: 13px;
  padding-bottom: 8px;
}

.qr {
  width: 68px;
  height: 68px;
  object-fit: contain;
  justify-self: end;
}

.page-number {
  grid-column: 1 / -1;
  text-align: right;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

@media print {
  @page {
    size: A4 landscape;
    margin: 0;
  }

  body {
    background: #fff;
  }

  .topbar,
  .section-head {
    display: none;
  }

  .page {
    width: auto;
    margin: 0;
  }

  .print-page {
    width: 297mm;
    min-height: 210mm;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 8mm;
  }
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.photo-thumb {
  display: block;
}

.photo-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  cursor: zoom-in;
  background: #eef2f7;
  display: block;
}

body.modal-open {
  overflow: hidden;
}

.photo-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(7, 12, 22, 0.9);
}

.photo-modal__bar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--line);
}

.photo-modal__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.photo-modal__stage {
  height: calc(100vh - 58px);
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
}

.photo-modal__loading {
  margin: 0;
  padding: 12px 18px;
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-weight: 700;
}

.photo-modal__image {
  max-width: min(1600px, calc(100vw - 36px));
  max-height: calc(100vh - 96px);
  object-fit: contain;
  background: #fff;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.35);
}

.log-list {
  padding-left: 20px;
  color: #344054;
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 16px;
  }

  .page {
    width: min(100vw - 20px, 1280px);
    margin-top: 14px;
  }

  .section-head,
  .grid.two,
  .split,
  .task-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .metric-grid,
  .detail-grid,
  .meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .print-page {
    width: 1932px;
    min-height: 1366px;
    padding: 14px;
  }

  .filters input,
  .filters select,
  .filters a,
  .filters button,
  .filters .filter-combobox,
  .inline-form input,
  .inline-form button {
    width: 100%;
  }

  .push-right {
    margin-left: 0;
  }
}

/* ---------------- PDA 扫描端 ---------------- */
.pda-big-button {
  width: 100%;
  padding: 16px;
  font-size: 18px;
}
.pda-new-task { margin-bottom: 16px; }
.pda-group { margin: 18px 0; }
.pda-group h2 { font-size: 15px; margin-bottom: 8px; color: #4b5563; }
.pda-task-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
}
.pda-task-main { display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.pda-task-main span { margin-top: 4px; }
.pda-task-main strong { font-size: 16px; }
.pda-task-main span { font-size: 12px; color: #6b7280; }
.pda-counter {
  text-align: center;
  padding: 10px 0 16px;
}
.pda-counter strong {
  display: block;
  font-size: 56px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.pda-counter span { color: #6b7280; font-size: 13px; }
.pda-problem-chip {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 10px;
  background: #fef2f2;
  color: #b91c1c;
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
}
.pda-scan-input {
  width: 100%;
  padding: 14px;
  font-size: 18px;
  border: 2px solid #2563eb;
  border-radius: 10px;
}
.pda-actions { margin-top: 14px; }
.pda-actions > button { display: block; width: 100%; }
.pda-actions > button + button { margin-top: 10px; }
.pda-offline-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(153, 27, 27, 0.96);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  z-index: 999;
}
.pda-offline-overlay h2 { font-size: 22px; margin-bottom: 8px; }
.pda-offline-overlay p { margin-bottom: 16px; }
.search-result-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  background: #fff;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
}
.search-result-item:active { background: #eff6ff; }
.metric-card--alert { border-color: #f59e0b; }
.pda-scan-surface .data-table th,
.pda-scan-surface .data-table td {
  padding: 8px 6px;
  font-size: 13px;
  white-space: nowrap;
}
.pda-scan-surface .data-table td:nth-child(2) { font-variant-numeric: tabular-nums; }
.pda-scan-surface .pda-delete-scan { padding: 6px 10px; font-size: 12px; }
.pda-scan-surface .data-table { min-width: 0; }
/* PDA 扫描入口只在窄屏手持设备显示，电脑端隐藏 */
.nav-pda-only { display: none; }
@media (max-width: 768px) {
  .nav-pda-only { display: inline; }
}

/* ---------------- 总览 KPI 条（紧凑单行，替代旧 metric-card 大卡片） ---------------- */
.kpi-bar {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}
.kpi-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  color: inherit;
  text-decoration: none;
  border-right: 1px solid var(--line);
  transition: background 0.15s ease;
}
.kpi-item:last-child { border-right: none; }
.kpi-item:hover,
.kpi-item:focus-visible {
  background: rgba(31, 95, 255, 0.05);
  outline: none;
}
.kpi-item > span {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.kpi-item > strong {
  font-size: 20px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.kpi-item > strong em {
  font-style: normal;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 3px;
}
.kpi-item > small {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 今日组与待办组之间的分隔：加重右边线 */
.kpi-item--divider { border-right: 2px solid #d7dbe3; }
.kpi-item--alert {
  background: #fff7ed;
  box-shadow: inset 3px 0 0 #f59e0b;
}
.kpi-item--alert:hover { background: #ffedd5; }
@media (max-width: 1100px) {
  .kpi-bar { grid-template-columns: repeat(3, 1fr); }
  .kpi-item { border-bottom: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .kpi-bar { grid-template-columns: repeat(2, 1fr); }
}
.input-error { border-color: #dc2626 !important; }
.input-error::placeholder { color: #dc2626; }
.pda-message h1 { margin-bottom: 10px; }
.pda-message .pda-big-button { margin-top: 14px; }

.search-result-empty {
  padding: 10px 12px;
  font-size: 13px;
  color: #6b7280;
  background: #fff;
}
