/* Shared mobile adaptations for list pages */
@media (max-width: 768px) {
  /* ---------- Global spacing & search/filter area ---------- */
  /* 移动端隐藏面包屑 */
  .crumb-wrap {
    display: none;
  }
  .footer{
    display: none;
  }

  body {
    min-width: 0;
    padding-top: 85px;
  }

  .section-inner {
    padding: 14px;
    width: 100%;
    max-width: 100%;
  }

  .page-title {
    font-size: 20px;
  }

  .search-row {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
  }

  .search-input {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 10px;
  }

  .search-field {
    font-size: 14px;
  }

  .search-field::placeholder {
    font-size: 12px;
  }

  .btn-primary,
  .btn-reset {
    flex: 0 0 auto;
    width: auto;
    padding: 10px 14px;
    border-radius: 10px;
  }

  .filter-panel {
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff;
    display: flex;
    flex-direction: column;
    row-gap: 2px;
    max-height: 68vh;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    overscroll-behavior-x: none;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.8) transparent;
  }

  .filter-panel::-webkit-scrollbar {
    width: 4px;
  }

  .filter-panel::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.7);
    border-radius: 999px;
  }

  .filter-row {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    column-gap: 12px;
    align-items: flex-start;
    padding: 8px 0;
    margin: 0;
    border-bottom: 1px dashed #e2e8f0;
  }

  .filter-row:last-child {
    border-bottom: none;
  }

  .filter-label {
    width: auto;
    margin-bottom: 0;
    font-size: 12px;
    letter-spacing: 0.02em;
    color: #475569;
  }

  .filter-options,
  .filter-options--compact,
  .filter-options--dense {
    display: flex;
    flex-wrap: nowrap;
    column-gap: 10px;
    row-gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    overscroll-behavior-y: none;
    touch-action: pan-x;
    width: 100%;
    min-width: 0;
    padding: 0 12px 4px 0;
    margin: 0;
    scroll-snap-type: x proximity;
  }

  .filter-options > *,
  .filter-options--compact > *,
  .filter-options--dense > * {
    flex: 0 0 auto;
  }

  .filter-options::-webkit-scrollbar,
  .filter-options--compact::-webkit-scrollbar,
  .filter-options--dense::-webkit-scrollbar {
    height: 3px;
  }

  .filter-options::-webkit-scrollbar-thumb,
  .filter-options--compact::-webkit-scrollbar-thumb,
  .filter-options--dense::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.6);
    border-radius: 999px;
  }

  .filter-options .filter-link,
  .filter-options--compact .filter-link,
  .filter-options--dense .filter-link {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    line-height: 1.5;
    white-space: nowrap;
    scroll-snap-align: start;
    margin-left: 0;
  }

  .filter-link:not(.filter-link-disabled):hover {
    color: #2563eb;
    border-bottom-color: #2563eb;
  }

  .custom_time,
  .custom-money-range,
  .filter-option-checkbox {
    flex: 0 0 auto;
    white-space: nowrap;
    margin-left: 0;
  }

  .custom_time {
    display: inline-flex;
    align-items: center;
    width: 100%;
    padding-left: 0;
  }

  #daterange {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    min-width: max-content;
  }

  #custom_daterange_start,
  #custom_daterange_end,
  #minBudgetAmount,
  #maxBudgetAmount {
    width: 108px;
    min-width: 108px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    line-height: 34px;
    text-align: center;
  }

  .to_time,
  .lins {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    line-height: 34px;
    color: #64748b;
    font-size: 13px;
  }

  .custom-money-range {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: max-content;
    padding-left: 0;
  }

  .search_money_btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
  }

  .filter-option-checkbox {
    display: inline-flex;
    align-items: center;
  }

  .filter-option-checkbox a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #475569;
    text-decoration: none;
    font-size: 13px;
  }

  .filter-option-checkbox a svg {
    flex: 0 0 auto;
    margin-right: 0;
  }

  .filter-option-checkbox svg + svg {
    display: none;
  }

  .result-bar {
    margin-top: 16px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .result-text {
    font-size: 13px;
  }

  .card {
    border-radius: 12px;
    background: linear-gradient(180deg, #f8fafc 0%, #f3f4f6 100%);
    border: none;
    box-shadow: none;
  }

  .card__body {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: transparent;
  }

  .data-table {
    min-width: 0;
  }

  .data-table th,
  .data-table td {
    padding: 10px 12px;
  }

  .text-strong-medium {
    font-size: 14px;
  }

  .value-blue {
    font-size: 16px;
  }

  .card__footer {
    padding: 12px;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .card__footer .result-text {
    width: 100%;
    text-align: center;
  }

  .flex-center.gap-8 {
    width: 100%;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
  }

  .pagination-btn {
    padding: 6px 10px;
    font-size: 12px;
  }

  .card__footer .flex-center.gap-8 > .pagination-btn:not(:first-child):not(:last-child),
  .card__footer .flex-center.gap-8 > .text-note {
    display: none;
  }

  /* ---------- Table -> card (mobile layout only) ---------- */
  .data-table thead {
    display: none;
  }

  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table td {
    display: block;
    width: 100%;
  }

  .data-table tr {
    --mobile-card-field-gap: 14px;
    border: none;
    border-radius: 14px;
    margin-bottom: 14px;
    padding: 12px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 10px;
    row-gap: var(--mobile-card-field-gap);
  }

  .data-table tr::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #2563eb 0%, #60a5fa 100%);
    opacity: 0.9;
  }

  .data-table td {
    border: 0;
    padding: 0;
    margin-top: 0;
    position: relative;
    padding-left: 74px;
    min-height: 20px;
  }

  .data-table td:first-child {
    padding-left: 0;
    padding-bottom: 8px;
    margin-bottom: 0;
    border-bottom: 1px dashed #eef2f8;
  }

  .data-table td:first-child::before {
    display: none;
  }

  .data-table td::before {
    position: absolute;
    left: 0;
    top: 1px;
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.02em;
  }

  .data-table td:nth-child(1)::before {
    content: "项目名称";
  }

  .data-table td:nth-child(2)::before {
    content: "建设单位";
  }

  .data-table td:nth-child(3)::before {
    content: "材料估算用量";
  }

  .data-table td:nth-child(4)::before {
    content: "总投资额";
  }

  .data-table td:nth-child(5)::before {
    content: "所在地区";
  }

  /* Fields 1~5 occupy the full row in card layout. */
  .data-table td:nth-child(1),
  .data-table td:nth-child(2),
  .data-table td:nth-child(3),
  .data-table td:nth-child(4),
  .data-table td:nth-child(5) {
    grid-column: 1 / -1;
  }

  /* Fields 2~5 use vertical label/value layout (title above content). */
  .data-table td:nth-child(2),
  .data-table td:nth-child(3),
  .data-table td:nth-child(4),
  .data-table td:nth-child(5) {
    margin-top: 0;
    padding-left: 0;
  }

  .data-table td:nth-child(2)::before,
  .data-table td:nth-child(3)::before,
  .data-table td:nth-child(4)::before,
  .data-table td:nth-child(5)::before {
    position: static;
    display: block;
    margin-bottom: 6px;
  }

  .data-table td:nth-child(6),
  .data-table td:nth-child(6)::before {
    display: none;
  }

  .data-table .text-strong-medium {
    font-size: 15px;
    line-height: 1.5;
    color: #0f172a;
  }

  .data-table .tag-row {
    margin-top: 6px;
    gap: 6px;
    flex-wrap: wrap;
  }

  .data-table .tag-label {
    font-size: 11px;
    color: #94a3b8;
  }

  /* ---------- Material amount ---------- */
  .data-table .material-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
  }

  .data-table .material-values {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    line-height: 1.45;
    justify-content: flex-start;
    column-gap: 4px;
    color: #1e293b;
  }

  .data-table .material-label {
    width: auto;
    min-width: 0;
    color: #6b7280;
  }

  /* ---------- Investment / location ---------- */
  .data-table td:nth-child(4),
  .data-table td:nth-child(5) {
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    row-gap: 6px;
  }

  .data-table td:nth-child(4)::before,
  .data-table td:nth-child(5)::before {
    flex: 0 0 100%;
    margin-bottom: 0;
  }

  .data-table td:nth-child(4) .value-blue {
    flex: 1 1 auto;
    font-size: 18px;
    line-height: 1.2;
    letter-spacing: 0.01em;
  }

  .data-table td:nth-child(4) .location-city {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    margin-top: 0;
    margin-left: 12px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    color: #1d4ed8;
    background: #dbeafe;
    vertical-align: middle;
  }

  .data-table .location-row {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 14px;
  }

  .data-table td:nth-child(5) .location-city {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    margin-top: 0;
    margin-left: 12px;
    padding: 0;
    border-radius: 0;
    font-size: 12px;
    color: #64748b;
    background: transparent;
    white-space: nowrap;
  }

  .detail-btn {
    height: 30px;
    min-width: 30px;
    justify-content: center;
    border-radius: 999px;
    background: #eff6ff;
  }

  /* ---------- Mobile infinite loading tip ---------- */
  .mobile-load-tip {
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
    padding: 12px 0 2px;
  }

  .mobile-load-tip.is-error {
    color: #ef4444;
  }

  .mobile-load-sentinel {
    width: 100%;
    height: 1px;
  }

  /* ---------- GGXM mobile layout ---------- */
  body:has(.data-table thead th:last-child:nth-child(6)) .data-table tr {
    --mobile-card-field-gap: 14px;
    row-gap: var(--mobile-card-field-gap);
  }

  body:has(.data-table thead th:last-child:nth-child(6)) .filter-row:has(.custom_time) .custom_time {
    display: none;
  }

  body:has(.data-table thead th:last-child:nth-child(6)) .filter-row:has(.custom-money-range) > .filter-options,
  body:has(.data-table thead th:last-child:nth-child(6)) .filter-row:has(.custom-money-range) > .filter-options--compact,
  body:has(.data-table thead th:last-child:nth-child(6)) .filter-row:has(.custom-money-range) > .filter-options--dense {
    flex-wrap: wrap;
    overflow-x: visible;
    row-gap: 8px;
    padding-bottom: 0;
  }

  /* Fallback mode needs a slightly looser range row because there is no body class. */
  body:has(.data-table thead th:last-child:nth-child(6)) .filter-row:has(.custom-money-range) > .filter-options,
  body:has(.data-table thead th:last-child:nth-child(6)) .filter-row:has(.custom-money-range) > .filter-options--compact,
  body:has(.data-table thead th:last-child:nth-child(6)) .filter-row:has(.custom-money-range) > .filter-options--dense {
    overflow-y: visible;
    column-gap: 8px;
    padding-right: 0;
    scroll-snap-type: none;
  }

  body:has(.data-table thead th:last-child:nth-child(6)) .filter-row:has(.custom-money-range) .custom-money-range {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    order: 10;
  }

  body:has(.data-table thead th:last-child:nth-child(6)) .filter-row:has(.custom-money-range) .custom-money-range {
    width: 100%;
    min-width: 0;
    flex: 1 1 100%;
    overflow: hidden;
  }

  body:has(.data-table thead th:last-child:nth-child(6)) .filter-row:has(.custom-money-range) #minBudgetAmount,
  body:has(.data-table thead th:last-child:nth-child(6)) .filter-row:has(.custom-money-range) #maxBudgetAmount {
    padding: 0 8px;
    border: none;
    border-radius: 0;
  }

  body:has(.data-table thead th:last-child:nth-child(6)) .filter-row:has(.custom-money-range) #minBudgetAmount,
  body:has(.data-table thead th:last-child:nth-child(6)) .filter-row:has(.custom-money-range) #maxBudgetAmount {
    width: 0;
    min-width: 0;
    max-width: none;
    flex: 1 1 0;
    height: 34px;
    line-height: 34px;
  }

  body:has(.data-table thead th:last-child:nth-child(6)) .filter-row:has(.custom-money-range) #minBudgetAmount::placeholder,
  body:has(.data-table thead th:last-child:nth-child(6)) .filter-row:has(.custom-money-range) #maxBudgetAmount::placeholder {
    font-size: 12px;
  }

  body:has(.data-table thead th:last-child:nth-child(6)) .filter-row:has(.custom-money-range) .lins {
    flex: 0 0 auto;
    font-size: 13px;
    color: #64748b;
  }

  body:has(.data-table thead th:last-child:nth-child(6)) .filter-row:has(.custom-money-range) .lins {
    height: 34px;
    line-height: 34px;
  }

  body:has(.data-table thead th:last-child:nth-child(6)) .filter-row:has(.custom-money-range) .search_money_btn {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 0;
  }

  body:has(.data-table thead th:last-child:nth-child(6)) .filter-row:has(.custom-money-range) .filter-option-checkbox {
    order: 11;
    flex: 0 0 100%;
    justify-content: flex-start;
    padding-left: 0;
  }

  body:has(.data-table thead th:last-child:nth-child(6)) .filter-row:has(.custom-money-range) .filter-option-checkbox a {
    width: auto;
  }

  body:has(.data-table thead th:last-child:nth-child(6)) .data-table td:nth-child(1),
  body:has(.data-table thead th:last-child:nth-child(6)) .data-table td:nth-child(3),
  body:has(.data-table thead th:last-child:nth-child(6)) .data-table td:nth-child(4),
  body:has(.data-table thead th:last-child:nth-child(6)) .data-table td:nth-child(5),
  body:has(.data-table thead th:last-child:nth-child(6)) .data-table td:nth-child(6) {
    grid-column: 1 / -1;
  }

  body:has(.data-table thead th:last-child:nth-child(6)) .data-table td:nth-child(2),
  body:has(.data-table thead th:last-child:nth-child(6)) .data-table td:nth-child(2)::before {
    display: none;
  }

  body:has(.data-table thead th:last-child:nth-child(6)) .data-table td:nth-child(3),
  body:has(.data-table thead th:last-child:nth-child(6)) .data-table td:nth-child(4),
  body:has(.data-table thead th:last-child:nth-child(6)) .data-table td:nth-child(5),
  body:has(.data-table thead th:last-child:nth-child(6)) .data-table td:nth-child(6) {
    margin-top: 0;
    padding-left: 0;
  }

  body:has(.data-table thead th:last-child:nth-child(6)) .data-table td:first-child {
    padding-left: 0;
    padding-bottom: 8px;
    border-bottom: 1px dashed #eef2f8;
  }

  body:has(.data-table thead th:last-child:nth-child(6)) .data-table td:first-child::before {
    display: none;
  }

  body:has(.data-table thead th:last-child:nth-child(6)) .data-table td:nth-child(3)::before {
    content: "发布单位";
  }

  body:has(.data-table thead th:last-child:nth-child(6)) .data-table td:nth-child(4)::before {
    content: "金额信息";
  }

  body:has(.data-table thead th:last-child:nth-child(6)) .data-table td:nth-child(5)::before {
    content: "所在地区";
  }

  body:has(.data-table thead th:last-child:nth-child(6)) .data-table td:nth-child(6)::before {
    content: "发布时间";
  }

  body:has(.data-table thead th:last-child:nth-child(6)) .data-table td:nth-child(3)::before,
  body:has(.data-table thead th:last-child:nth-child(6)) .data-table td:nth-child(4)::before,
  body:has(.data-table thead th:last-child:nth-child(6)) .data-table td:nth-child(5)::before,
  body:has(.data-table thead th:last-child:nth-child(6)) .data-table td:nth-child(6)::before {
    position: static;
    display: block;
    margin-bottom: 6px;
  }

  body:has(.data-table thead th:last-child:nth-child(6)) .data-table .tag-row {
    margin-top: 6px;
    gap: 6px;
    flex-wrap: wrap;
  }

  body:has(.data-table thead th:last-child:nth-child(6)) .data-table .tag-industry {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
  }

  body:has(.data-table thead th:last-child:nth-child(6)) .data-table td:nth-child(3) .text-strong,
  body:has(.data-table thead th:last-child:nth-child(6)) .data-table td:nth-child(3) .text-clip-1 {
    display: block;
    font-size: 14px;
    line-height: 1.5;
    color: #0f172a;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
  }

  body:has(.data-table thead th:last-child:nth-child(6)) .data-table td:nth-child(4),
  body:has(.data-table thead th:last-child:nth-child(6)) .data-table td:nth-child(5),
  body:has(.data-table thead th:last-child:nth-child(6)) .data-table td:nth-child(6) {
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    row-gap: 6px;
  }

  body:has(.data-table thead th:last-child:nth-child(6)) .data-table td:nth-child(4)::before,
  body:has(.data-table thead th:last-child:nth-child(6)) .data-table td:nth-child(5)::before,
  body:has(.data-table thead th:last-child:nth-child(6)) .data-table td:nth-child(6)::before {
    flex: 0 0 100%;
    margin-bottom: 0;
  }

  body:has(.data-table thead th:last-child:nth-child(6)) .data-table .value-green {
    flex: 1 1 auto;
    font-size: 18px;
    line-height: 1.2;
    color: #047857;
  }

  body:has(.data-table thead th:last-child:nth-child(6)) .data-table .value-green {
    min-width: 0;
  }

  body:has(.data-table thead th:last-child:nth-child(6)) .data-table td:nth-child(4) .text-muted {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    margin-left: 12px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    color: #047857;
    background: #d1fae5;
    white-space: nowrap;
  }

  body:has(.data-table thead th:last-child:nth-child(6)) .data-table td:nth-child(5) .text-muted {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    margin-left: 12px;
    padding: 0;
    border-radius: 0;
    font-size: 12px;
    color: #64748b;
    background: transparent;
    white-space: nowrap;
  }

  body:has(.data-table thead th:last-child:nth-child(6)) .data-table .text-strong-sm {
    flex: 1 1 auto;
    font-size: 14px;
    color: #0f172a;
  }

  body:has(.data-table thead th:last-child:nth-child(6)) .data-table td:nth-child(6) .text-muted.text-error {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    margin-left: 12px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    color: #dc2626;
    background: #fee2e2;
    white-space: nowrap;
  }
}
