/* 同一份记录：手机保留卡片，桌面按字段分列。纸面单据不使用这些类。 */
.desktop-only, .app-table td.desktop-only, .app-table th.desktop-only { display: none; }

@media (min-width: 900px) {
  .app-wrap:has(.desktop-list, > .audit-page) { max-width: 1416px; }
  .app-table.desktop-list { width: 100%; table-layout: fixed; font-size: 14px; }
  .app-table.desktop-list td, .app-table.desktop-list th { padding: 10px 12px; }
  .app-table.desktop-list th { font-size: 14px; font-weight: 600; text-align: left; }
  .app-table.desktop-list td { font-size: 14px; overflow-wrap: anywhere; vertical-align: middle; }
  .app-table.desktop-list td.desktop-only, .app-table.desktop-list th.desktop-only { display: table-cell; }
  .desktop-list .mobile-only, .app-table.desktop-list td.mobile-only, .app-table.desktop-list th.mobile-only { display: none; }
  .desktop-list .list-person, .desktop-list .phone-link, .desktop-list .training-open { min-height: 32px; }
  .desktop-list .list-open strong, .desktop-list .list-person strong { font-size: 15px; line-height: 1.5; }
  .desktop-list .list-identity, .desktop-list .training-identity { display: block; }
  .desktop-list .table-date, .desktop-list .table-phone { white-space: nowrap; font-variant-numeric: tabular-nums; }
  .desktop-list .table-phone .phone-link { position: relative; z-index: 1; }
  .desktop-list .table-code { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
  .app-table.desktop-list :is(td, th).right { text-align: right; }
  .desktop-list .table-actions { text-align: right; white-space: nowrap; }
  .app-table.desktop-list th.table-actions { text-align: right; }
  .desktop-list .table-actions > .btn { position: relative; z-index: 1; white-space: nowrap; }
  .desktop-list .table-flags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
  .desktop-list .table-flags .list-flag { margin-left: 0; }
  .inventory-wrap, .desktop-table-wrap { min-width: 0; max-width: 100%; overflow-x: auto; }
  .app-wrap:has(.desktop-list) .inventory-search { max-width: 520px; }
  .app-wrap:has(.desktop-list) .member-search { grid-template-columns: minmax(0, 440px) auto; justify-content: start; }
  .member-page .member-quick-filters { max-width: 900px; }
  .member-filter-people, .member-filter-grid { display: flex; flex-wrap: wrap; gap: 8px; }
  .member-page .member-quick-button { padding-inline: 14px; }

  .member-list-table.desktop-list { min-width: 1100px; }
  .member-list-table.desktop-list td, .member-list-table.desktop-list th { padding-inline: 8px; }
  .member-list-table.desktop-list .member-list-card-number { width: 11%; min-width: 0; word-break: break-all; }
  .member-list-table.desktop-list .member-list-person { width: 8%; min-width: 0; }
  .member-list-table .member-list-phone-cell { width: 11.5%; }
  .member-list-table .member-list-level { width: 7.5%; }
  .member-list-table.desktop-list .member-list-card-type { width: 12%; white-space: normal; }
  .member-list-table .member-list-paid { width: 10%; }
  .member-list-table .member-list-balance { width: 8.5%; }
  .member-list-table .member-list-last-visit { width: 10%; }
  .member-list-table.desktop-list .member-list-alerts { width: 12.5%; }
  .member-list-table .member-list-operation { width: 9%; }

  .product-list { min-width: 980px; }
  .product-list .product-name { width: 23%; }
  .product-list .product-brand { width: 12%; }
  .product-list .product-spec { width: 22%; }
  .product-list .product-unit { width: 56px; }
  .product-list .product-price { width: 110px; }
  .product-list .product-stock { width: 100px; }
  .product-list .product-state { width: 100px; }
  .product-list .product-operation { width: 78px; }
  .supplier-list { min-width: 780px; }
  .supplier-list .supplier-name { width: 36%; }
  .supplier-list .supplier-person { width: 22%; }
  .supplier-list .supplier-phone { width: 160px; }
  .supplier-list .supplier-state { width: 112px; }
  .supplier-list .supplier-operation { width: 80px; }
  .purchase-list { min-width: 1100px; }
  .purchase-list .purchase-no { width: 176px; }
  .purchase-list .purchase-supplier { width: auto; }
  .purchase-list .purchase-date { width: 112px; }
  .purchase-list .purchase-number { width: 88px; }
  .purchase-list .purchase-money { width: 128px; }
  .purchase-list .purchase-state { width: 100px; }
  .purchase-list .purchase-operation { width: 78px; }
  .storage-table { min-width: 1040px; }
  .storage-table .storage-name { width: auto; }
  .storage-table .storage-member { width: 130px; }
  .storage-table .storage-date { width: 116px; }
  .storage-table .storage-number { width: 88px; }
  .storage-table .storage-state { width: 100px; }
  .storage-table .storage-operation { width: 78px; }
  .rental-table { min-width: 1100px; }
  .rental-table .rental-device { width: auto; }
  .rental-table .rental-number { width: 104px; }
  .rental-table .rental-member { width: 120px; }
  .rental-table .rental-date { width: 112px; }
  .rental-table .rental-deposit { width: 110px; }
  .rental-table .rental-state { width: 132px; }
  .rental-table .rental-operation { width: 78px; }

  .visit-table, .recheck-table { min-width: 870px; }
  .visit-table .visit-person, .recheck-table .recheck-person { width: 19%; min-width: 0; }
  .visit-table .visit-phone-cell, .recheck-table .recheck-phone-cell { width: 146px; }
  .visit-table .visit-day-cell, .recheck-table .recheck-due-cell { width: 150px; }
  .visit-table .visit-eyes-cell { width: auto; }
  .visit-table .visit-result-cell { width: 116px; }
  .recheck-table .recheck-follow-cell { width: auto; }
  .recheck-table .recheck-state-cell { width: 140px; }
  .recheck-due-value { gap: 4px; }
  .training-table { min-width: 760px; }
  .training-list .training-row { display: table-row; }
  .training-table .training-person-cell { width: 26%; }
  .training-table .training-phone-cell { width: 170px; }
  .training-table .training-meta-cell { width: auto; }
  .training-table .training-action-cell { width: 148px; }
  .training-table .training-actions { justify-content: flex-end; }

  .sales-list { min-width: 1100px; }
  .sales-list .sales-list__row { display: table-row; }
  .sales-list .sale-doc-cell { width: 170px; }
  .sales-list .sale-member-cell { width: 96px; }
  .sales-list .sale-date-cell { width: 110px; }
  .sales-list .sale-money-cell { width: 112px; }
  .sales-list .sale-state-cell { width: 108px; }
  .sales-list .sale-actions-cell { width: 180px; }
  .sales-list .sales-list__identity { display: block; }
  .sales-list .sales-list__actions { justify-content: flex-end; gap: 6px; }
  .sales-list .sales-list__actions .btn { padding-inline: 10px; }
  .account-table { min-width: 990px; }
  .account-table th:nth-child(1) { width: auto; }
  .account-table th:nth-child(2) { width: 142px; }
  .account-table th:nth-child(3) { width: 130px; }
  .account-table th:nth-child(4) { width: 116px; }
  .account-table th:nth-child(5) { width: 142px; }
  .account-table th:nth-child(6) { width: 258px; text-align: right; }
  .profile-list { table-layout: fixed; }
  .profile-list .profile-open-cell { width: 30%; }
}

@media (min-width: 1500px) {
  .sales-list .sale-doc-cell { width: 230px; }
  .sales-list .sale-actions-cell { width: 286px; }
}

@media (min-width: 1100px) {
  .profile-tabs { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}

@media (min-width: 900px) and (pointer: fine) {
  .desktop-list .btn { min-height: 34px; }
  .sales-list .sales-list__actions .btn { min-height: 34px; }
}

/* v24：平板横屏与小屏笔记本（900-1199px）为全部真实表格类名提供平滑横滚与清晰列间距 */
@media (min-width: 900px) and (max-width: 1199px) {
  .desktop-table-wrap, .inventory-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .supplier-list, .visit-table, .recheck-table, .training-table {
    min-width: 100%;
  }
}
