﻿/* Page-specific styles split from hongyi-mobile.css: sold */

body:not(.desktop-page) .page[data-panel="sold"] {
  --sold-mobile-width: min(100%, calc(100vw - 28px));
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}

/* Sold vehicle viewer: keep the full-screen report usable on every phone/WebView.
   This final override intentionally wins over desktop modal rules when the viewport
   has already crossed into the mobile navigation layout. */
@media (max-width: 899px) {
  body .sold-view-modal.active {
    position: fixed !important;
    inset: 0 !important;
    display: block !important;
    width: 100vw !important;
    height: 100dvh !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #f3f5f8 !important;
  }

  body .sold-view-modal.active .sold-view-body {
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    padding: 10px 10px calc(22px + env(safe-area-inset-bottom)) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  body .sold-view-modal.active .sold-detail-shell,
  body .sold-view-modal.active .sold-detail-hero,
  body .sold-view-modal.active .sold-detail-panel,
  body .sold-view-modal.active .sold-cost-band,
  body .sold-view-modal.active .sold-reserved-block {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body .sold-view-modal.active .sold-detail-hero,
  body .sold-view-modal.active .sold-detail-two-col,
  body .sold-view-modal.active .sold-profit-layout {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body .sold-view-modal.active .sold-detail-hero {
    gap: 10px !important;
    padding: 0 !important;
  }

  body .sold-view-modal.active .sold-detail-photo {
    display: block;
    width: min(100%, 420px) !important;
    height: auto !important;
    max-height: 230px !important;
    margin: 0 auto !important;
    aspect-ratio: 16 / 10 !important;
    object-fit: contain !important;
  }

  body .sold-view-modal.active .sold-detail-title {
    min-width: 0 !important;
    padding-right: 42px !important;
  }

  body .sold-view-modal.active .sold-detail-title h2,
  body .sold-view-modal.active .sold-detail-title p {
    max-width: 100% !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  body .sold-view-modal.active .sold-inline-actions {
    width: 100% !important;
    flex-wrap: wrap !important;
  }

  body .sold-view-modal.active .sold-inline-actions .sold-photo-action {
    flex: 1 1 calc(33.333% - 6px) !important;
    min-width: 86px !important;
  }

  body .sold-view-modal.active .sold-detail-specs,
  body .sold-view-modal.active .sold-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body .sold-view-modal.active .sold-overview-grid article {
    min-width: 0 !important;
  }

  body .sold-view-modal.active .sold-report-close {
    position: fixed !important;
    top: max(10px, env(safe-area-inset-top)) !important;
    right: 10px !important;
    z-index: 30 !important;
  }
}

/* Standalone fourth report used only by the assigned salesperson. */
body.junior-sales-report-open {
  overflow: hidden !important;
}

.junior-sales-report-dialog {
  position: fixed;
  inset: 0;
  z-index: 10080;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(7px);
}

.junior-sales-report-panel {
  display: flex;
  flex-direction: column;
  width: min(620px, 100%);
  max-height: min(92vh, 920px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  background: #f7f9fc;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.34);
}

.junior-sales-report-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: linear-gradient(135deg, #0f2c58 0%, #1c68aa 100%);
  color: #fff;
}

.junior-sales-report-heading small {
  color: #aad7ff;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.13em;
}

.junior-sales-report-heading h2 {
  margin: 3px 0 4px;
  color: #fff;
  font-size: 22px;
  line-height: 1.15;
}

.junior-sales-report-heading p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  line-height: 1.45;
}

.junior-sales-report-heading > button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 27px;
  line-height: 1;
}

.junior-sales-report-host {
  overflow: auto;
  padding: 14px;
}

.junior-sales-report-card {
  width: 100%;
  margin: 0;
}

.junior-sales-report-card .sale-report-info input,
.junior-sales-report-card .sale-money-table input,
.junior-sales-report-card .sale-sign-grid input {
  width: 100%;
  min-width: 0;
  height: 28px;
  padding: 3px 6px;
  border: 1px solid #cddbea;
  border-radius: 6px;
  background: #fff;
  color: #111827;
  font: inherit;
  font-weight: 750;
}

.junior-sales-report-dialog[data-editing="0"] .junior-sales-report-card input[readonly] {
  padding-inline: 0;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  cursor: default;
  pointer-events: none;
}

.junior-sales-report-dialog[data-editing="0"] .junior-report-row-actions,
.junior-sales-report-dialog[data-editing="0"] [data-junior-report-delete] {
  display: none !important;
}

.junior-sales-report-dialog[data-editing="1"] [data-junior-report-edit] {
  border-color: #1673c3;
  background: #1673c3;
  color: #fff;
}

.junior-sales-report-panel > footer button[hidden] {
  display: none !important;
}

.junior-sales-report-card .junior-report-info-label {
  color: #526173;
  font-weight: 700;
}

.junior-report-cell-editor {
  display: flex;
  align-items: center;
  gap: 4px;
}

.junior-report-cell-editor > input {
  flex: 1 1 auto;
}

.junior-report-cell-editor > button {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  min-height: 0 !important;
  flex: 0 0 23px;
  padding: 0 !important;
  border: 1px solid #fecaca !important;
  border-radius: 50% !important;
  background: #fff5f5 !important;
  color: #dc2626 !important;
  box-shadow: none !important;
  font-size: 15px !important;
}

.junior-report-row-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #e5edf5;
  background: #f8fbff;
}

.junior-report-row-actions button {
  min-height: 34px;
  border: 1px solid #9fc9ed;
  border-radius: 8px;
  background: #fff;
  color: #1768aa;
  font-size: 12px;
  font-weight: 850;
}

.junior-sales-report-card .sale-sign-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin: 0 12px 10px !important;
}

.junior-sales-report-card .sale-sign-grid > span {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 50px;
  gap: 5px;
  padding: 8px 6px;
  text-align: center;
}

.junior-sales-report-panel > footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  padding: 12px 14px;
  border-top: 1px solid #dbe4ee;
  background: #fff;
}

.junior-sales-report-panel > footer span {
  min-width: 0;
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.junior-sales-report-panel > footer button {
  min-width: 82px;
  min-height: 38px;
  padding: 7px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #1e293b;
  font-weight: 850;
}

.junior-sales-report-panel > footer button.primary {
  border-color: #1673c3;
  background: #1673c3;
  color: #fff;
}

@media (max-width: 560px) {
  .sale-report-card > header:has([data-junior-sales-report-open]) {
    gap: 5px;
  }

  .sale-report-card > header:has([data-junior-sales-report-open]) .sale-report-actions {
    gap: 4px;
  }

  .sale-report-card > header:has([data-junior-sales-report-open]) .sale-report-actions button {
    padding-inline: 8px;
  }

  .junior-sales-report-dialog {
    align-items: end;
    padding: 0;
  }

  .junior-sales-report-panel {
    width: 100%;
    max-height: 96dvh;
    border-radius: 20px 20px 0 0;
  }

  .junior-sales-report-heading {
    padding: 14px 16px;
  }

  .junior-sales-report-heading h2 {
    font-size: 19px;
  }

  .junior-sales-report-host {
    padding: 9px;
  }

  .junior-sales-report-card > header,
  .junior-sales-report-card.customer > header {
    padding-inline: 10px;
  }

  .junior-sales-report-card .sale-money-table td {
    padding-inline: 4px;
  }

  .junior-sales-report-panel > footer {
    grid-template-columns: 1fr 1fr;
  }

  .junior-sales-report-panel > footer span {
    grid-column: 1 / -1;
  }
}

@media (max-width: 350px) {
  body .sold-view-modal.active .sold-overview-grid,
  body .sold-view-modal.active .sold-detail-specs {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* 2026-08-05: sold overview follows the inventory four-card mobile layout. */
@media (max-width: 760px) {
  body:not(.desktop-page) .page[data-panel="sold"] .sold-metrics.sold-summary-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 5px !important;
    width: 100% !important;
    margin: 0 0 10px !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-metrics.sold-summary-grid .metric-card {
    --sold-icon: none;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    min-width: 0 !important;
    min-height: 0 !important;
    aspect-ratio: 3 / 4 !important;
    gap: 2px !important;
    padding: 45px 2px 4px !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: 0 5px 14px rgba(25, 38, 57, 0.08) !important;
    text-align: center !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-metrics.sold-summary-grid .metric-card::before {
    content: "" !important;
    position: absolute !important;
    inset: 11px auto auto 50% !important;
    display: block !important;
    width: 29px !important;
    height: 29px !important;
    transform: translateX(-50%) !important;
    border: 1px solid rgba(197, 147, 62, 0.2) !important;
    border-radius: 50% !important;
    background-color: #fff9ee !important;
    background-image: var(--sold-icon) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 18px 18px !important;
    box-shadow: 0 4px 10px rgba(137, 94, 22, 0.08) !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-metrics.sold-summary-grid .metric-card::after {
    content: none !important;
    display: none !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-metrics.sold-summary-grid .metric-card:nth-child(1) {
    --sold-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a8721f' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 11 1.5-4.2A2.7 2.7 0 0 1 9 5h6a2.7 2.7 0 0 1 2.5 1.8L19 11'/%3E%3Cpath d='M4 11h16v7H4zM7 18v2M17 18v2M7.5 14.5h.01M16.5 14.5h.01'/%3E%3C/svg%3E");
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-metrics.sold-summary-grid .metric-card:nth-child(2) {
    --sold-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a8721f' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Cpath d='M15 8.5h-4.2a2.1 2.1 0 0 0 0 4.2h2.4a2.1 2.1 0 0 1 0 4.2H9M12 6.5v12'/%3E%3C/svg%3E");
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-metrics.sold-summary-grid .metric-card:nth-child(3) {
    --sold-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a8721f' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='3.5' width='14' height='17' rx='2'/%3E%3Cpath d='M8 7.5h8M8 11h2M12 11h2M16 11h.01M8 14.5h2M12 14.5h2M16 14.5h.01M8 18h2M12 18h4'/%3E%3C/svg%3E");
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-metrics.sold-summary-grid .metric-card:nth-child(4) {
    --sold-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a8721f' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3h10v18H7zM9.5 7h5M9.5 11h1M13.5 11h1M9.5 15h1M13.5 15h1'/%3E%3C/svg%3E");
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-metrics.sold-summary-grid .metric-card span {
    position: relative !important;
    z-index: 1 !important;
    display: -webkit-box !important;
    width: 100% !important;
    min-height: 19px !important;
    margin: 0 !important;
    padding: 0 1px !important;
    overflow: hidden !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #4e4a43 !important;
    font-size: 8.5px !important;
    font-weight: 800 !important;
    line-height: 1.1 !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-metrics.sold-summary-grid .metric-card strong {
    position: relative !important;
    z-index: 1 !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    color: #8c5b17 !important;
    font-size: clamp(13px, 3.75vw, 16px) !important;
    font-weight: 900 !important;
    line-height: 1.05 !important;
    letter-spacing: -0.035em !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-metrics.sold-summary-grid .metric-card small {
    position: relative !important;
    z-index: 1 !important;
    display: -webkit-box !important;
    width: 100% !important;
    margin: 1px 0 0 !important;
    padding: 0 1px !important;
    overflow: hidden !important;
    color: #6e7784 !important;
    font-size: 8px !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
  }
}

/* Sale settlement LINE share */
.sale-line-share-open {
  border: 1px solid #05a948 !important;
  background: #06c755 !important;
  color: #fff !important;
  font-weight: 900 !important;
}

.sale-settlement-share-dialog[hidden] {
  display: none !important;
}

.sale-settlement-share-dialog {
  position: fixed;
  inset: 0;
  z-index: 24000;
  display: grid;
  place-items: center;
  padding: 20px;
  box-sizing: border-box;
}

.sale-settlement-share-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: rgba(8, 14, 26, .72);
  backdrop-filter: blur(5px);
}

.sale-settlement-share-panel {
  position: relative;
  width: min(620px, 100%);
  max-height: min(820px, calc(100vh - 40px));
  overflow: auto;
  border: 1px solid #e1c58d;
  border-radius: 26px;
  background: #fffdf8;
  box-shadow: 0 28px 80px rgba(8, 14, 26, .35);
  color: #111827;
}

.sale-settlement-share-panel > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px 20px;
  background: linear-gradient(135deg, #0e2349, #293445 68%, #80642f);
  color: #fff;
}

.sale-settlement-share-panel header small {
  display: block;
  margin-bottom: 6px;
  color: #f1bd51;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .16em;
}

.sale-settlement-share-panel header h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.sale-settlement-share-panel header p {
  margin: 8px 0 0;
  color: #d7deea;
  font-size: 14px;
  font-weight: 700;
}

.sale-settlement-share-close {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 28px;
  line-height: 1;
}

.sale-settlement-share-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 22px 24px 12px;
}

.sale-settlement-share-options label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 14px;
  border: 1px solid #d7dde7;
  border-radius: 16px;
  background: #fff;
  box-sizing: border-box;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.sale-settlement-share-options label:has(input:checked) {
  border-color: #c99022;
  background: #fff9ec;
  box-shadow: 0 7px 20px rgba(180, 123, 16, .12);
}

.sale-settlement-share-options label:hover {
  transform: translateY(-1px);
}

.sale-settlement-share-options label.is-disabled {
  display: none;
}

.sale-settlement-share-options input {
  width: 22px;
  height: 22px;
  accent-color: #06c755;
}

.sale-settlement-share-options span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.sale-settlement-share-options b {
  font-size: 16px;
}

.sale-settlement-share-options small {
  color: #788397;
  font-size: 12px;
  font-weight: 700;
}

.sale-settlement-share-preview {
  margin: 4px 24px 0;
  border: 1px solid #e2e6ed;
  border-radius: 14px;
  background: #f8fafc;
}

.sale-settlement-share-preview summary {
  padding: 13px 15px;
  color: #825b13;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.sale-settlement-share-preview pre {
  max-height: 260px;
  overflow: auto;
  margin: 0;
  padding: 0 15px 15px;
  white-space: pre-wrap;
  word-break: break-word;
  color: #273244;
  font: 700 13px/1.7 "Microsoft JhengHei", sans-serif;
}

.sale-settlement-share-status,
.sale-settlement-share-fallback {
  display: block;
  margin: 12px 24px 0;
  color: #687386;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.sale-settlement-share-fallback {
  min-height: 42px;
  padding: 11px 14px;
  border: 1px solid #06c755;
  border-radius: 12px;
  color: #058b3d;
  text-decoration: none;
  box-sizing: border-box;
}

.sale-settlement-share-panel > footer {
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr;
  gap: 12px;
  padding: 20px 24px 24px;
}

.sale-settlement-share-panel > footer button {
  min-height: 50px;
  border: 1px solid #cad2df;
  border-radius: 14px;
  background: #fff;
  color: #142036;
  font-size: 15px;
  font-weight: 900;
}

.sale-settlement-share-panel > footer .primary {
  border-color: #05a948;
  background: #06c755;
  color: #fff;
}

.sale-settlement-share-panel > footer .sale-settlement-share-copy {
  border-color: #d7a33a;
  background: #fff8e9;
  color: #8a5d0b;
}

@media (max-width: 620px) {
  .sale-settlement-share-dialog {
    align-items: end;
    padding: 0;
  }

  .sale-settlement-share-panel {
    width: 100%;
    max-height: 88vh;
    border-radius: 24px 24px 0 0;
  }

  .sale-settlement-share-panel > header {
    padding: 20px 18px 17px;
  }

  .sale-settlement-share-panel header h2 {
    font-size: 21px;
  }

  .sale-settlement-share-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 14px 14px 8px;
  }

  .sale-settlement-share-options label {
    display: grid !important;
    grid-template-columns: 18px minmax(0, 1fr) !important;
    align-items: center !important;
    justify-content: start !important;
    gap: 9px !important;
    min-width: 0 !important;
    min-height: 72px;
    padding: 10px 11px !important;
    border-radius: 14px;
  }

  .sale-settlement-share-options input[type="checkbox"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    flex: 0 0 18px !important;
    width: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    height: 18px !important;
    min-height: 18px !important;
    margin: 0 !important;
    border: 1.5px solid #94a3b8 !important;
    border-radius: 5px !important;
    background: #fff !important;
    box-sizing: border-box !important;
  }

  .sale-settlement-share-options input[type="checkbox"]:checked {
    border-color: #06b64f !important;
    background: #06c755 !important;
    box-shadow: inset 0 0 0 3px #06c755 !important;
  }

  .sale-settlement-share-options input[type="checkbox"]:checked::after {
    content: "";
    display: block;
    width: 8px;
    height: 4px;
    margin: 4px 0 0 3px;
    border-bottom: 2px solid #fff;
    border-left: 2px solid #fff;
    transform: rotate(-45deg);
  }

  .sale-settlement-share-options span {
    display: grid !important;
    gap: 3px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .sale-settlement-share-options b {
    font-size: 13.5px !important;
    line-height: 1.3 !important;
    letter-spacing: -.02em !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
  }

  .sale-settlement-share-options small {
    margin: 0 !important;
    font-size: 10.5px !important;
    line-height: 1.3 !important;
    word-break: keep-all !important;
  }

  .sale-settlement-share-preview {
    margin-inline: 16px;
  }

  .sale-settlement-share-status,
  .sale-settlement-share-fallback {
    margin-inline: 16px;
  }

  .sale-settlement-share-panel > footer {
    position: sticky;
    bottom: 0;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px 14px max(14px, env(safe-area-inset-bottom));
    background: rgba(255, 253, 248, .96);
    backdrop-filter: blur(12px);
  }

  .sale-settlement-share-panel > footer button {
    min-height: 44px;
    border-radius: 12px;
    font-size: 14px;
  }

  .sale-settlement-share-panel > footer .primary {
    grid-column: 1 / -1;
  }
}

@media (max-width: 350px) {
  .sale-settlement-share-options {
    grid-template-columns: 1fr;
  }
}

/* Modern settlement report skin: visual-only override, keeps existing text and actions intact. */
.sale-report-layout.three,
.sell-report-layout.sale-report-layout.three,
.sold-detail-report-layout.sale-report-layout.three {
  gap: 10px;
}

.sale-report-layout.three .sale-report-board,
.sell-report-layout.sale-report-layout.three .sale-report-board,
.sold-detail-report-layout.sale-report-layout.three .sale-report-board {
  gap: 10px;
  align-items: start;
}

.sale-report-card {
  --sale-accent: #4f8f4d;
  --sale-accent-soft: #edf8ea;
  --sale-ink: #111827;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.96) !important;
  border-radius: 10px;
  background: #fff;
  color: var(--sale-ink);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.sale-report-card.company {
  --sale-accent: #3e8a3d;
  --sale-accent-soft: #eaf7e8;
  --sale-tab-fill-start: #e7edde;
  --sale-tab-fill-mid: #e8efdf;
  --sale-tab-fill-end: #eef6e7;
  --sale-tab-bottom-shade: rgba(220, 232, 210, 0.55);
}

.sale-report-card.business {
  --sale-accent: #1776d2;
  --sale-accent-soft: #e8f3ff;
  --sale-tab-fill-start: #dbeaf7;
  --sale-tab-fill-mid: #e3f1fb;
  --sale-tab-fill-end: #f2f9fe;
  --sale-tab-bottom-shade: rgba(207, 226, 242, 0.55);
}

.sale-report-card.customer {
  --sale-accent: #7c4dcc;
  --sale-accent-soft: #f0e9ff;
  --sale-tab-fill-start: #e8def8;
  --sale-tab-fill-mid: #eee5fb;
  --sale-tab-fill-end: #fbf5ff;
  --sale-tab-bottom-shade: rgba(222, 209, 243, 0.55);
}

.sale-report-card > header,
.sale-report-card.customer > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 12px 14px 8px;
  background: #fff !important;
  color: var(--sale-ink) !important;
}

.sale-report-card > header h3,
.sale-report-card.customer > header h3 {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  color: var(--sale-ink);
  font-size: 15px;
  font-weight: 950;
  line-height: 1.2;
  text-align: left;
}

.sale-report-card > header h3::before {
  content: "";
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border: 1px solid rgba(79, 143, 77, 0.45);
  border-radius: 6px;
  background:
    linear-gradient(var(--sale-accent), var(--sale-accent)) 7px 6px / 8px 2px no-repeat,
    linear-gradient(var(--sale-accent), var(--sale-accent)) 7px 10px / 8px 2px no-repeat,
    linear-gradient(var(--sale-accent), var(--sale-accent)) 7px 14px / 8px 2px no-repeat,
    var(--sale-accent-soft);
}

.sale-report-card > header .sale-report-actions,
.sale-report-card.customer > header .sale-report-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 6px;
  flex: 0 0 auto;
  margin-left: auto;
}

.sale-report-card > header button,
.sale-report-card.customer > header button {
  min-height: 28px;
  padding: 5px 11px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #1f2937;
  box-shadow: 0 2px 9px rgba(15, 23, 42, 0.06);
  font-size: 12px;
  font-weight: 850;
}

.sale-sensitive-label-toggle svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sale-sensitive-label-toggle {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
}

.sale-report-card.customer[data-hide-previous-owner="true"] [data-sale-sensitive-field="previousOwner"],
.sale-report-card.customer[data-hide-seller="true"] [data-sale-sensitive-field="seller"] {
  position: relative;
  color: transparent !important;
  text-shadow: none !important;
  user-select: none;
}

.sale-report-static-info,
.sale-report-info {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  margin: 0 12px 10px;
  border: 1px solid #edf1f6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.sale-report-static-info h4,
.sale-report-info h4 {
  grid-column: 1 / -1;
  margin: 0;
  padding: 10px 12px 6px;
  border: 0;
  background: #fff !important;
  color: var(--sale-accent) !important;
  font-size: 12px;
  font-weight: 950;
}

.sale-report-static-info div {
  display: contents;
}

.sale-report-static-info span,
.sale-report-static-info strong,
.sale-report-info span,
.sale-report-info strong {
  min-height: 29px;
  padding: 6px 8px;
  border: 0;
  background: #fff;
  color: var(--sale-ink);
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
}

.sale-report-static-info span,
.sale-report-info span {
  color: #374151;
  font-weight: 650;
}

.sale-report-static-info strong,
.sale-report-info strong {
  font-weight: 950;
}

.sale-report-static-info span:nth-of-type(4n + 3),
.sale-report-info span:nth-of-type(4n + 3) {
  border-left: 1px solid #eef2f7;
}

.sale-money-table {
  width: calc(100% - 24px);
  margin: 0 12px 10px;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  color: var(--sale-ink);
  font-size: 12px;
}

.sale-money-table th {
  height: 38px;
  border: 0;
  background: linear-gradient(135deg, var(--sale-accent-soft), #fff);
  color: var(--sale-accent);
  font-size: 14px;
  font-weight: 950;
}

.sale-money-table th:first-child {
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

.sale-money-table th + th {
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
  background: #fbfbfc;
  color: #1f2937;
}

.sale-report-card.business .sale-money-table th,
.sale-report-card.customer .sale-money-table th {
  background: linear-gradient(135deg, var(--sale-accent-soft), #fff);
  color: var(--sale-accent);
}

.sale-report-card.business .sale-money-table th + th,
.sale-report-card.customer .sale-money-table th + th {
  background: #fbfbfc;
  color: #1f2937;
}

.sale-money-table td {
  height: 31px;
  padding: 7px 8px;
  border: 0;
  border-bottom: 1px solid #eef2f7;
  background: #fff;
  font-weight: 700;
  text-align: left;
}

.sale-money-table td:nth-child(2),
.sale-money-table td:nth-child(4) {
  text-align: right;
  font-weight: 950;
}

.sale-money-table input {
  height: 25px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #f8fafc;
}

.sale-report-subtotal-row td {
  border-top: 1px solid #e5e7eb;
  border-bottom: 0;
  font-weight: 950;
}

.sale-total {
  justify-content: space-between;
  min-height: 48px;
  margin: 0 12px 10px;
  padding: 0 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--sale-accent-soft), #fff) !important;
  color: var(--sale-accent) !important;
  font-size: 15px;
}

.sale-total [data-sale-report-total-label] {
  color: var(--sale-accent);
  font-size: 17px;
}

.sale-total strong,
.sale-total.neutral strong {
  color: var(--sale-accent) !important;
  font-size: 25px;
}

.sale-total,
.sale-total [data-sale-report-total-label],
.sale-total strong,
.sale-total.neutral strong {
  font-size: 17px !important;
  line-height: 1.1 !important;
}

.sale-total {
  display: grid !important;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center !important;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  text-align: center;
}

.sale-total [data-sale-report-total-label] {
  justify-self: center;
  min-width: 0;
  white-space: nowrap;
}

.sale-total strong,
.sale-total.neutral strong {
  justify-self: end;
  white-space: nowrap;
}

.sale-sign-grid {
  margin: 0 12px 10px;
  gap: 8px;
}

.sale-sign-grid span,
.sale-note {
  min-height: 50px;
  border: 1px solid #edf1f6;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.035);
}

.sale-note {
  margin: 0 12px 12px;
  white-space: pre-line;
}

.sale-report-add-row .sale-report-row-actions {
  width: 100%;
}

.sale-report-add-row .sale-report-row-actions button {
  flex: 1 1 0;
  min-height: 30px;
  border-radius: 999px;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-title-search {
  display: block;
  height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(203, 214, 229, 0.86);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.94);
  color: #071225;
  font-size: 13px;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-title-search,
body:not(.desktop-page) .page[data-panel="sold"] .sold-search-card,
body:not(.desktop-page) .page[data-panel="sold"] .sold-filter-grid,
body:not(.desktop-page) .page[data-panel="sold"] .sold-metrics,
body:not(.desktop-page) .page[data-panel="sold"] .sold-view-toolbar,
body:not(.desktop-page) .page[data-panel="sold"] .filter-card,
body:not(.desktop-page) .page[data-panel="sold"] .sold-list {
  width: var(--sold-mobile-width);
  max-width: none;
  margin-left: 0;
  margin-right: auto;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-search-card {
  grid-template-columns: minmax(0, 1fr);
  margin-top: 12px;
  padding: 10px;
  border-radius: 16px;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-search-card input {
  height: 38px;
  font-size: 13px;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-filter-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(250, 244, 235, 0.96)),
    #fffaf2;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-filter-grid::before {
  inset: 6px;
  border-radius: 12px;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-filter-grid select {
  height: 38px;
  padding: 0 10px;
  font-size: 12px;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-control-row button {
  grid-column: 1 / -1;
  height: 34px;
  border: 1px solid rgba(177, 125, 28, 0.42);
  border-radius: 9px;
  background: #fffaf0;
  color: #071225;
  font-size: 12px;
  font-weight: 900;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-metrics .metric-card {
  min-height: 66px;
  padding: 8px 7px;
  border-radius: 12px;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-metrics .metric-card span {
  font-size: 11px;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-metrics .metric-card strong {
  font-size: 16px;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-view-toolbar,
body:not(.desktop-page) .page[data-panel="sold"] .filter-card {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(205, 190, 170, 0.72);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 253, 247, 0.97), rgba(246, 238, 226, 0.94)),
    #fffaf2;
  box-shadow: 0 12px 24px rgba(72, 50, 24, 0.1);
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-view-toolbar .view-tabs,
body:not(.desktop-page) .page[data-panel="sold"] .filter-card .view-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  padding-top: 0;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-view-toolbar .view-tabs button,
body:not(.desktop-page) .page[data-panel="sold"] .filter-card .view-tabs button {
  min-width: 0;
  height: 34px;
  padding: 0 4px;
  border-radius: 8px;
  font-size: 12px;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-sort-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  color: #071225;
  font-size: 12px;
  font-weight: 900;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-sort-control select {
  width: 100%;
  height: 34px;
  min-width: 0;
  padding: 0 9px;
  border: 1px solid rgba(196, 208, 223, 0.92);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.96);
  color: #071225;
  font-size: 12px;
  font-weight: 850;
}

body:not(.desktop-page) .page[data-panel="sold"] .desktop-table-head,
body:not(.desktop-page) .page[data-panel="sold"] .sold-table-head {
  display: none !important;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-table-cells {
  display: none;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-list[data-view="table"] .sold-table-cells {
  display: contents;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-card {
  display: grid;
  grid-template-columns: minmax(128px, 48%) minmax(0, 1fr);
  grid-template-areas:
    "photo info"
    "profit profit"
    "actions actions";
  gap: 8px 10px;
  align-items: stretch;
  min-width: 0;
  padding: 8px;
  overflow: hidden;
  border: 1px solid rgba(214, 198, 176, 0.86);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(69, 45, 22, 0.12);
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-thumb,
body:not(.desktop-page) .page[data-panel="sold"] .sold-card > img {
  grid-area: photo;
  display: block;
  width: 100%;
  height: 170px;
  max-width: none;
  border-radius: 9px;
  object-fit: cover;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-thumb-empty,
.desktop-app .sold-list .sold-thumb-empty {
  background:
    linear-gradient(135deg, rgba(226, 232, 240, 0.88), rgba(248, 250, 252, 0.96)),
    #eef2f7;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-info {
  grid-area: info;
  min-width: 0;
  padding: 5px 3px 0 0;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-card-head > div:first-child {
  min-width: 0;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-card h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  min-width: 0;
  color: #071225;
  font-size: 20px;
  line-height: 1.08;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-title-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-card-head small {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-card-badges {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-list-status,
body:not(.desktop-page) .page[data-panel="sold"] .sold-rating {
  display: inline-flex;
  flex: 0 0 auto;
  min-width: 46px;
  height: 28px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 950;
  line-height: 1;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-list-status {
  border: 1px solid #fecaca;
  background: #ffe4e6;
  color: #e11d48;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-card p,
body:not(.desktop-page) .page[data-panel="sold"] .sold-meta-line,
body:not(.desktop-page) .page[data-panel="sold"] .sold-extra-line {
  margin: 0;
  color: #596b82;
  font-size: 11px;
  line-height: 1.35;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 7px;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-grid span {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2px;
  min-height: 47px;
  padding: 6px 5px;
  border: 1px solid rgba(214, 198, 176, 0.82);
  border-radius: 7px;
  background: linear-gradient(180deg, #fff 0%, #fffaf5 100%);
  color: #526784;
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-grid b {
  color: #071225;
  font-size: 15px;
  font-weight: 950;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-profit-panel {
  grid-area: profit;
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(214, 226, 241, 0.86);
  border-radius: 12px;
  background: #fff;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-profit-panel span,
body:not(.desktop-page) .page[data-panel="sold"] .sold-profit-panel small {
  color: #586b84;
  font-size: 11px;
  line-height: 1.3;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-profit-panel strong {
  color: #c00000;
  font-size: 23px;
  line-height: 1;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-profit-panel.profit-loss strong {
  color: #15803d;
}

/* 2026-07 mobile visual refresh: styling only, existing mobile layout remains. */
body:not(.desktop-page) .page[data-panel="sold"] {
  --sold-navy: #071225;
  --sold-gold: #c98a2e;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-title-strip {
  min-height: 142px;
  overflow: hidden;
  padding: 30px 22px 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 13px;
  background:
    linear-gradient(90deg, rgba(4, 12, 25, 0.98) 0%, rgba(5, 14, 29, 0.9) 48%, rgba(5, 14, 29, 0.24) 100%),
    url("https://q.hongyicar.tw/hongyi-assets/mock-cars/bmw-x3.jpg") 74% 52% / cover no-repeat,
    #071225;
  box-shadow: 0 14px 30px rgba(7, 18, 37, 0.2);
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-title-strip p {
  color: #e6b65f;
  font-size: 10px;
  letter-spacing: 0.18em;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-title-strip h1 {
  color: #fff;
  font-size: 29px;
  font-weight: 900;
  text-shadow: 0 5px 16px rgba(0, 0, 0, 0.5);
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-search-card,
body:not(.desktop-page) .page[data-panel="sold"] .sold-filter-grid,
body:not(.desktop-page) .page[data-panel="sold"] .sold-view-toolbar,
body:not(.desktop-page) .page[data-panel="sold"] .filter-card {
  border-color: rgba(223, 215, 204, 0.86);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 28px rgba(68, 50, 31, 0.09);
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-title-search,
body:not(.desktop-page) .page[data-panel="sold"] .sold-filter-grid select,
body:not(.desktop-page) .page[data-panel="sold"] .sold-sort-control select {
  border-color: #e4ded5;
  background: #fff;
  color: #172033;
  box-shadow: none;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-metrics .metric-card {
  border-color: rgba(226, 219, 209, 0.88);
  background: linear-gradient(155deg, #fff 0%, #fbf8f3 100%);
  box-shadow: 0 10px 24px rgba(36, 30, 23, 0.08);
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-metrics .metric-card span {
  border-bottom-color: rgba(202, 160, 91, 0.2);
  background: #fbf5eb;
  color: #514b44;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-metrics .metric-card strong {
  color: #7d521c;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-view-toolbar .view-tabs button,
body:not(.desktop-page) .page[data-panel="sold"] .filter-card .view-tabs button {
  border-color: rgba(225, 217, 207, 0.92);
  background: #fbf8f3;
  color: #41403f;
  box-shadow: none;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-view-toolbar .view-tabs button.active,
body:not(.desktop-page) .page[data-panel="sold"] .filter-card .view-tabs button.active {
  border-color: #c58a32;
  background: linear-gradient(145deg, #14243d 0%, #071225 100%);
  color: #fff;
  box-shadow: 0 8px 18px rgba(7, 18, 37, 0.18);
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-card {
  border-color: rgba(226, 219, 209, 0.9);
  background: #fff;
  box-shadow: 0 10px 24px rgba(39, 31, 22, 0.09);
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-thumb,
body:not(.desktop-page) .page[data-panel="sold"] .sold-card > img {
  background-color: #e8e4de;
  box-shadow: inset 0 0 0 1px rgba(7, 18, 37, 0.05);
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-card h2 {
  color: #111827;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-grid span,
body:not(.desktop-page) .page[data-panel="sold"] .sold-profit-panel {
  border-color: #ede7de;
  background: #fcfaf7;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-grid b {
  color: #172033;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-list-status {
  border-color: rgba(201, 138, 46, 0.34);
  background: #fbf0dc;
  color: #8a5b19;
}

body:not(.desktop-page) .page[data-panel="sold"] .card-actions.two,
body:not(.desktop-page) .page[data-panel="sold"] .card-actions {
  grid-area: actions;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding-top: 2px;
}

body:not(.desktop-page) .page[data-panel="sold"] .card-actions button {
  width: 100%;
  height: 32px;
  min-width: 0;
  padding: 0 6px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 900;
}

body:not(.desktop-page) .page[data-panel="sold"] .card-actions.sold-card-actions.boss {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body:not(.desktop-page) .page[data-panel="sold"] .card-actions .delete {
  background: #fff;
  color: #c92828;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-list.sales-only-sold-list {
  gap: 14px;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-list.sales-only-sold-list .sold-table-head,
body:not(.desktop-page) .page[data-panel="sold"] .sold-list.sales-only-sold-list .sold-table-cells {
  display: none !important;
}

body:not(.desktop-page) .page[data-panel="sold"] .sold-list.sales-only-sold-list .sales-sold-card {
  display: grid;
  grid-template-columns: minmax(128px, 48%) minmax(0, 1fr);
  grid-template-areas:
    "photo info"
    "money money"
    "detail detail";
  gap: 8px 10px;
  align-items: stretch;
  padding: 8px;
  border: 1px solid rgba(214, 198, 176, 0.86);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(69, 45, 22, 0.12);
  cursor: pointer;
}

body:not(.desktop-page) .page[data-panel="sold"] .sales-sold-photo-wrap {
  grid-area: photo;
  position: relative;
}

body:not(.desktop-page) .page[data-panel="sold"] .sales-sold-photo {
  width: 100%;
  height: 170px;
  display: block;
  border-radius: 9px;
  object-fit: cover;
}

body:not(.desktop-page) .page[data-panel="sold"] .sales-sold-rating {
  position: absolute;
  top: 0;
  left: 0;
  width: 50px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 0 0 16px 0;
  background: rgba(255, 255, 255, 0.95);
  color: #7c5a22;
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

body:not(.desktop-page) .page[data-panel="sold"] .sales-sold-rating b {
  margin-top: 0;
}

body:not(.desktop-page) .page[data-panel="sold"] .sales-sold-photo-count {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.68);
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
}

body:not(.desktop-page) .page[data-panel="sold"] .sales-sold-main {
  grid-area: info;
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  padding: 5px 3px 0 0;
}

body:not(.desktop-page) .page[data-panel="sold"] .sales-sold-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

body:not(.desktop-page) .page[data-panel="sold"] .sales-sold-title-row h2 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #071225;
  font-size: 20px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.desktop-page) .page[data-panel="sold"] .sales-sold-title-row span {
  min-width: 34px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #f1ece3;
  color: #6f582c;
  font-size: 12px;
  font-weight: 950;
}

body:not(.desktop-page) .page[data-panel="sold"] .sales-sold-meta,
body:not(.desktop-page) .page[data-panel="sold"] .sales-sold-people {
  margin: 0;
  color: #6b7280;
  font-size: 11px;
  font-weight: 850;
}

body:not(.desktop-page) .page[data-panel="sold"] .sales-sold-meta i,
body:not(.desktop-page) .page[data-panel="sold"] .sales-sold-people i {
  padding: 0 8px;
  color: #c5bfb5;
  font-style: normal;
}

body:not(.desktop-page) .page[data-panel="sold"] .sales-sold-stats,
body:not(.desktop-page) .page[data-panel="sold"] .sales-sold-money {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  border: 0;
  border-radius: 0;
  overflow: visible;
}

body:not(.desktop-page) .page[data-panel="sold"] .sales-sold-money {
  grid-area: money;
}

body:not(.desktop-page) .page[data-panel="sold"] .sales-sold-stats span,
body:not(.desktop-page) .page[data-panel="sold"] .sales-sold-money section {
  display: grid;
  gap: 2px;
  min-height: 47px;
  align-content: center;
  justify-items: center;
  padding: 6px 5px;
  border: 1px solid rgba(214, 198, 176, 0.82);
  border-radius: 7px;
  background: linear-gradient(180deg, #fff 0%, #fffaf5 100%);
  text-align: center;
}

body:not(.desktop-page) .page[data-panel="sold"] .sales-sold-stats span:nth-child(2n),
body:not(.desktop-page) .page[data-panel="sold"] .sales-sold-money section:nth-child(2n) {
  border-right: 1px solid rgba(214, 198, 176, 0.82);
}

body:not(.desktop-page) .page[data-panel="sold"] .sales-sold-stats span:nth-last-child(-n + 2),
body:not(.desktop-page) .page[data-panel="sold"] .sales-sold-money section:nth-last-child(-n + 2) {
  border-bottom: 1px solid rgba(214, 198, 176, 0.82);
}

body:not(.desktop-page) .page[data-panel="sold"] .sales-sold-stats small,
body:not(.desktop-page) .page[data-panel="sold"] .sales-sold-money span {
  color: #7b8492;
  font-size: 12px;
  font-weight: 800;
}

body:not(.desktop-page) .page[data-panel="sold"] .sales-sold-stats b,
body:not(.desktop-page) .page[data-panel="sold"] .sales-sold-money strong {
  color: #071225;
  font-size: 15px;
  font-weight: 950;
}

body:not(.desktop-page) .page[data-panel="sold"] .sales-sold-money .tone-danger strong,
body:not(.desktop-page) .page[data-panel="sold"] .sales-sold-money .tone-loss strong {
  color: #b91c1c;
}

body:not(.desktop-page) .page[data-panel="sold"] .sales-sold-money .tone-success strong {
  color: #15803d;
}

body:not(.desktop-page) .page[data-panel="sold"] .sales-sold-money .tone-gold strong {
  color: #9a6b24;
}

body:not(.desktop-page) .page[data-panel="sold"] .sales-sold-detail {
  grid-area: detail;
  height: 32px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 900;
}

@media (max-width: 380px) {
  body:not(.desktop-page) .page[data-panel="sold"] {
    --sold-mobile-width: min(100%, calc(100vw - 24px));
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-metrics:not(.sold-summary-grid) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-metrics .metric-card {
    padding-right: 5px;
    padding-left: 5px;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-view-toolbar .view-tabs,
  body:not(.desktop-page) .page[data-panel="sold"] .filter-card .view-tabs {
    gap: 5px;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-view-toolbar .view-tabs button,
  body:not(.desktop-page) .page[data-panel="sold"] .filter-card .view-tabs button {
    font-size: 11px;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-thumb,
  body:not(.desktop-page) .page[data-panel="sold"] .sold-card > img {
    height: 148px;
  }
}

.mobile-modal[data-modal="sale-detail"] .modal-body {
  overflow: visible;
}

.sold-view-modal.active {
  display: block;
  min-height: 100dvh;
  background: #f5f6f8;
}

.sold-view-body {
  position: relative;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px;
  overflow: hidden;
}

.sold-report-close {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 5;
  border-color: rgba(17, 24, 39, 0.18);
  background: #fffdf8;
  color: #071225;
  box-shadow: 0 12px 28px rgba(7, 18, 41, 0.18);
}

.sold-report-close::before,
.sold-report-close::after {
  width: 18px;
  height: 2px;
  border: 0;
  border-radius: 999px;
  background: currentColor;
}

.sold-report-close::before {
  transform: rotate(45deg);
}

.sold-report-close::after {
  transform: rotate(-45deg);
}

.sold-detail-shell {
  display: grid;
  gap: 18px;
  color: #111827;
  min-width: 0;
}

.sold-detail-hero {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 0.62fr) minmax(300px, 1fr);
  gap: 16px;
  align-items: center;
  padding: 2px 0;
  min-width: 0;
}

.sold-detail-photo {
  width: 100%;
  aspect-ratio: 1.16 / 1;
  border-radius: 9px;
  object-fit: contain;
  object-position: center;
  box-shadow: 0 16px 38px rgba(17, 24, 39, 0.14);
}

.sold-empty-photo {
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  box-shadow: none;
}

.sold-detail-title h2 {
  margin: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: #0f172a;
  font-size: clamp(13.2px, 1.265vw, 15.4px);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: 0;
}

.sold-detail-title p {
  margin: 14px 0 22px;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: #6b7280;
  font-size: clamp(17.6px, 2.2vw, 24.2px);
  font-weight: 500;
}

.sold-detail-title i {
  color: #9ca3af;
  font-style: normal;
}

.sold-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.sold-inline-actions {
  display: flex;
  flex: 1 1 100%;
  flex-wrap: nowrap;
  gap: 6px;
  min-width: 0;
}

.sold-status-badge,
.sold-score-badge {
  display: inline-flex;
  min-width: 70px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 7px;
  font-size: 22px;
  font-weight: 900;
}

.sold-status-badge {
  border: 1px solid #fecaca;
  background: #fee2e2;
  color: #e11d48;
}

.sold-score-badge {
  background: linear-gradient(135deg, #6d4b12 0%, #b57b17 100%);
  color: #fff7d6;
  box-shadow: 0 10px 20px rgba(133, 92, 18, 0.24);
}

.sold-photo-action {
  display: inline-flex;
  min-width: 88px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid rgba(47, 111, 228, 0.3);
  border-radius: 9px;
  background: linear-gradient(180deg, #f8fbff 0%, #e4f0ff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 5px 12px rgba(47, 111, 228, 0.1);
  color: #1859a8;
  font-size: 16.5px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.sold-inline-actions .sold-photo-action {
  flex: 1 1 0;
  min-width: 0;
  white-space: nowrap;
}

.sold-inline-actions .sold-photo-action::before {
  display: none;
}

.sold-photo-action::before {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 5px;
  background: rgba(47, 111, 228, 0.13);
  color: currentColor;
  font-size: 13.2px;
  line-height: 1;
}

.sold-photo-action[data-sql-sale-photo="sub"]::before {
  content: "▦";
}

.sold-photo-action[data-sql-sale-photo="license"]::before {
  content: "▤";
}

.sold-photo-action[data-sql-sale-photo="deposit-detail"]::before {
  content: "▣";
}

.sold-photo-action[data-sql-sold-view-print]::before {
  content: "▤";
}

.sold-photo-action[data-sql-sold-view-screenshot]::before {
  content: "▦";
}

.sold-photo-action.deposit-detail {
  border-color: rgba(16, 122, 94, 0.3);
  background: linear-gradient(180deg, #f4fffb 0%, #dcf8ed 100%);
  color: #0f6f55;
}

.sold-photo-action.deposit-detail::before {
  background: rgba(16, 122, 94, 0.13);
}

.sold-photo-action:hover {
  border-color: rgba(47, 111, 228, 0.48);
  background: linear-gradient(180deg, #ecf5ff 0%, #d5e9ff 100%);
}

.sold-photo-action.deposit-detail:hover {
  border-color: rgba(16, 122, 94, 0.48);
  background: linear-gradient(180deg, #ecfff8 0%, #cdf2e4 100%);
}

.sold-detail-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-left: 1px solid #e5e7eb;
}

.sold-detail-specs div {
  display: grid;
  grid-template-columns: 28px minmax(48px, 0.65fr) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 58px;
  min-width: 0;
  padding: 0 12px;
  border-right: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

.sold-detail-specs div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.sold-detail-specs small,
.sold-detail-specs span:nth-child(2),
.sold-info-table span,
.sold-source-summary span,
.sold-money-row span,
.sold-cost-band span,
.sold-real-profit span {
  color: #374151;
  font-size: 14.5px;
  font-weight: 750;
}

.sold-detail-specs strong {
  min-width: 0;
  overflow: hidden;
  color: #111827;
  font-size: clamp(12.5px, 1.25vw, 15.5px);
  font-weight: 850;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sold-detail-specs span:first-child,
.sold-info-table span:first-child {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: #111827;
  line-height: 1;
}

.sold-row-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sold-detail-panel,
.sold-cost-band,
.sold-reserved-block {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.06);
}

.sold-detail-panel {
  padding: 18px;
}

.sold-detail-panel h3,
.sold-cost-band h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: #111827;
  font-size: 26.4px;
  line-height: 1.15;
  font-weight: 900;
}

.sold-detail-panel h3::before,
.sold-cost-band h3::before {
  content: "";
  width: 4px;
  height: 26px;
  border-radius: 999px;
  background: #111827;
}

.sold-detail-panel h3.accent-amber::before {
  background: #b7791f;
}

.sold-detail-panel h3.sold-panel-title {
  gap: 12px;
  margin-bottom: 18px;
  font-size: 22px;
}

.sold-detail-panel h3.sold-panel-title::before {
  display: none;
}

.sold-detail-panel h3.sold-panel-title .sold-row-icon {
  color: #111827;
}

.sold-detail-panel h3.sold-panel-title.accent-amber .sold-row-icon {
  color: #b7791f;
}

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

.sold-overview-grid article {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  column-gap: 12px;
  align-items: center;
  min-height: 104px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 9px;
  background: #ffffff;
}

.overview-icon {
  display: grid;
  width: 44px;
  height: 44px;
  grid-row: span 3;
  place-items: center;
  border-radius: 50%;
}

.overview-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.overview-icon.blue { background: #dbeafe; color: #2f6fe4; }
.overview-icon.green { background: #dff3e7; color: #15803d; }
.overview-icon.orange { background: #ffedd5; color: #f97316; }
.overview-icon.purple { background: #ede9fe; color: #7c3aed; }

.sold-overview-grid small {
  color: #111827;
  font-size: 14.5px;
  font-weight: 750;
}

.sold-overview-grid strong {
  margin-top: 3px;
  min-width: 0;
  overflow-wrap: anywhere;
  color: #111827;
  font-size: clamp(19px, 2.6vw, 28px);
  line-height: 1;
  font-weight: 900;
}

.sold-overview-grid strong em {
  font-size: 19.8px;
  font-style: normal;
}

.sold-overview-grid p,
.sold-reserved-block p,
.sold-money-row p,
.sold-real-profit p {
  margin: 3px 0 0;
  color: #374151;
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.45;
}

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

.sold-info-table {
  display: grid;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 9px;
  background: #ffffff;
}

.sold-info-table div {
  display: grid;
  grid-template-columns: 38px minmax(120px, 0.9fr) minmax(0, 1.35fr);
  min-height: 53px;
  border-bottom: 1px solid #e5e7eb;
}

.sold-info-table div:last-child {
  border-bottom: 0;
}

.sold-info-table span,
.sold-info-table strong {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0 16px;
}

.sold-info-table span:first-child {
  justify-content: center;
  padding: 0;
  border-right: 0;
}

.sold-info-table span:nth-child(2) {
  border-right: 1px solid #e5e7eb;
}

.sold-info-table strong {
  overflow-wrap: anywhere;
  color: #111827;
  font-size: clamp(13.2px, 1.65vw, 17.6px);
  font-weight: 850;
}

.sold-info-table .sold-highlight-source-row strong {
  color: #dc2626;
  font-size: clamp(14px, 1.7vw, 18px);
  line-height: 1.08;
}

.sold-source-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 9px;
  background: #ffffff;
}

.sold-source-summary div {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 6px 10px;
  align-items: center;
  min-height: 84px;
  padding: 16px;
  text-align: center;
  border-right: 1px solid #e5e7eb;
}

.sold-source-summary div:last-child {
  border-right: 0;
}

.sold-source-summary strong {
  grid-column: 1 / -1;
  min-width: 0;
  overflow-wrap: anywhere;
  color: #111827;
  font-size: clamp(14.3px, 1.705vw, 17.6px);
  font-weight: 900;
}

.sold-source-summary .sold-highlight-source-summary strong {
  color: #dc2626;
  font-size: clamp(15px, 1.78vw, 18px);
  line-height: 1.08;
}

.sold-source-summary .sold-row-icon {
  justify-self: end;
}

.sold-cost-band {
  overflow: hidden;
  border-color: #111827;
  background: #111827;
  color: #ffffff;
}

.sold-cost-band h3 {
  margin: 0;
  padding: 14px 18px;
  color: #ffffff;
  font-size: 19.8px;
}

.sold-cost-band h3::before {
  background: #ffffff;
}

.sold-cost-band > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 8px;
  overflow: hidden;
  border-radius: 8px;
  background: #ffffff;
}

.sold-cost-band article,
.sold-money-row article {
  display: grid;
  gap: 5px;
  min-width: 0;
  min-height: 58px;
  place-content: center;
  padding: 8px 10px;
  text-align: center;
  border-right: 1px solid #e5e7eb;
}

.sold-cost-band article:last-child,
.sold-money-row article:last-child {
  border-right: 0;
}

.sold-cost-band strong,
.sold-money-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #111827;
  font-size: clamp(16px, 1.8vw, 20px);
  font-weight: 900;
}

.sold-money-row strong.profit-pair-value {
  white-space: nowrap;
  overflow-wrap: normal;
}

.sold-profit-panel-new h4 {
  margin: 8px 0 9px;
  color: #111827;
  font-size: 17.6px;
  font-weight: 900;
}

.sold-money-row {
  display: grid;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 9px;
  background: #ffffff;
}

.sold-money-row.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sold-profit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  align-items: start;
}

.sold-money-row.profit-items {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sold-real-profit {
  display: grid;
  gap: 4px;
  align-content: center;
  align-self: start;
  justify-items: center;
  min-width: 0;
  min-height: 0;
  padding: 4px 14px 10px;
  border-radius: 9px;
  background: linear-gradient(135deg, #183f2e 0%, #244b39 100%);
  color: #ffffff;
  text-align: center;
}

.sold-real-profit span,
.sold-real-profit p {
  color: rgba(255, 255, 255, 0.86);
}

.sold-real-profit strong {
  max-width: 100%;
  overflow: hidden;
  color: #ffffff;
  font-size: clamp(24.2px, 3.3vw, 37.4px);
  line-height: 1;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.green-text { color: #15803d !important; }
.blue-text { color: #2457a6 !important; }
.purple-text { color: #7c3aed !important; }
.orange-text { color: #f05a1a !important; }

.sold-reserved-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 62px;
  padding: 12px;
}

.sold-reserved-block > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 2px solid #c7ccd4;
  border-radius: 5px;
  color: #9ca3af;
  font-size: 30.8px;
  line-height: 1;
}

.sold-reserved-block strong {
  color: #111827;
  font-size: 18.7px;
  font-weight: 900;
}

@media (max-width: 1120px) {
  .sold-detail-hero {
    grid-template-columns: minmax(190px, 260px) minmax(0, 1fr);
  }

  .sold-detail-specs {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .sold-view-body {
    padding: 14px 10px;
  }

  .sold-detail-hero,
  .sold-detail-two-col,
  .sold-profit-layout {
    grid-template-columns: 1fr;
  }

  .sold-detail-hero {
    gap: 16px;
  }

  .sold-detail-title h2 {
    font-size: 14.3px;
  }

  .sold-detail-title p {
    font-size: 19.8px;
  }

  .sold-detail-specs {
    grid-template-columns: 1fr;
    border-left: 0;
  }

  .sold-detail-specs div {
    padding: 0 14px;
    border-right: 0;
  }

  .sold-detail-specs div:nth-last-child(-n + 2) {
    border-bottom: 1px solid #e5e7eb;
  }

  .sold-detail-specs div:last-child {
    border-bottom: 0;
  }

  .sold-overview-grid,
  .sold-money-row.four,
  .sold-money-row.profit-items,
  .sold-cost-band > div {
    grid-template-columns: 1fr;
  }

  .sold-overview-grid article,
  .sold-money-row article,
  .sold-cost-band article {
    border-right: 0;
    border-bottom: 1px solid #e5e7eb;
  }

  .sold-overview-grid article:last-child,
  .sold-money-row article:last-child,
  .sold-cost-band article:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 520px) {
  .sold-view-modal.active {
    background: #f3f5f8;
  }

  .sold-view-body {
    padding: 8px 8px 18px;
  }

  .sold-report-close {
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
  }

  .sold-detail-shell {
    gap: 10px;
  }

  .sold-detail-hero {
    gap: 10px;
    padding: 0;
  }

  .sold-detail-photo {
    height: clamp(128px, 34vw, 160px);
    aspect-ratio: auto;
    border-radius: 8px;
    box-shadow: none;
  }

  .sold-empty-photo {
    min-height: clamp(128px, 34vw, 160px);
  }

  .sold-detail-title {
    display: grid;
    grid-template-columns: minmax(94px, auto) minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px;
    align-items: center;
    padding: 0 2px !important;
  }

  .sold-detail-title h2 {
    grid-column: 1;
    min-width: 0;
    font-size: 16.5px;
    line-height: 1.18;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .sold-detail-title p {
    grid-column: 1;
    margin: 0;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
  }

  .sold-detail-badges {
    display: contents;
  }

  .sold-status-badge,
  .sold-score-badge {
    min-width: 44px;
    min-height: 26px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 13px;
  }

  .sold-status-badge {
    grid-column: 2;
    grid-row: 1;
    justify-self: start;
  }

  .sold-score-badge {
    grid-column: 3;
    grid-row: 1;
    justify-self: start;
  }

  .sold-inline-actions {
    grid-column: 2 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 3px;
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  body .sold-view-modal.active .sold-inline-actions .sold-photo-action {
    box-sizing: border-box !important;
    width: 100% !important;
    height: 26px !important;
    max-width: none !important;
    max-height: 26px !important;
    flex: none !important;
    min-width: 0 !important;
    min-height: 26px !important;
    padding: 0 1px !important;
    overflow: hidden !important;
    border-radius: 5px;
    font-size: 9px;
    letter-spacing: -0.04em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sold-photo-action::before {
    width: 16px;
    height: 16px;
    font-size: 12.1px;
  }

  .sold-detail-specs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    border: 0;
  }

  .sold-detail-specs div {
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 4px 8px;
    align-content: center;
    min-height: 62px;
    padding: 8px 9px;
    border: 1px solid #e5e7eb;
    border-radius: 9px;
    background: #ffffff;
  }

  .sold-detail-specs div:nth-last-child(-n + 2),
  .sold-detail-specs div:last-child {
    border-bottom: 1px solid #e5e7eb;
  }

  .sold-detail-specs span:first-child {
    grid-row: 1 / span 2;
    width: 22px;
    height: 22px;
  }

  .sold-row-icon svg {
    width: 18px;
    height: 18px;
  }

  .sold-detail-specs span:nth-child(2) {
    min-width: 0;
    padding: 0;
    color: #64748b;
    font-size: 13.2px;
    line-height: 1.1;
  }

  .sold-detail-specs strong {
    min-width: 0;
    padding: 0;
    font-size: 13.2px;
    line-height: 1.2;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .sold-overview-panel {
    padding: 12px;
  }

  .sold-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .sold-overview-grid article {
    grid-template-columns: 34px minmax(0, 1fr);
    column-gap: 8px;
    min-height: 78px;
    padding: 10px;
  }

  .overview-icon {
    width: 34px;
    height: 34px;
  }

  .overview-icon svg {
    width: 20px;
    height: 20px;
  }

  .sold-overview-grid small {
    font-size: 12.1px;
  }

  .sold-overview-grid strong {
    margin-top: 3px;
    font-size: 17.6px;
  }

  .sold-overview-grid p {
    margin-top: 2px;
    font-size: 11px;
    line-height: 1.25;
  }

  .sold-detail-panel,
  .sold-cost-band,
  .sold-reserved-block {
    border-radius: 8px;
  }

  .sold-detail-panel {
    padding: 12px;
  }

  .sold-detail-panel h3,
  .sold-cost-band h3 {
    margin-bottom: 10px;
    font-size: 18.7px;
  }

  .sold-detail-panel h3.sold-panel-title {
    margin-bottom: 10px;
    font-size: 18.7px;
  }

  .sold-info-table div {
    grid-template-columns: 30px minmax(86px, 0.9fr) minmax(0, 1.15fr);
    min-height: 42px;
  }

  .sold-info-table span {
    min-height: 42px;
    padding: 0 8px;
    font-size: 13.2px;
    border-bottom: 0;
    background: transparent;
  }

  .sold-info-table span:first-child {
    padding: 0;
  }

  .sold-info-table span:nth-child(2) {
    border-right: 1px solid #e5e7eb;
  }

  .sold-info-table strong {
    min-height: 42px;
    padding: 0 8px;
    font-size: 13.2px;
    line-height: 1.25;
  }

  .sold-source-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 10px;
  }

  .sold-source-summary div {
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 68px;
    padding: 10px 6px;
    border-right: 1px solid #e5e7eb;
    border-bottom: 0;
  }

  .sold-source-summary div:last-child {
    border-right: 0;
  }

  .sold-source-summary .sold-row-icon {
    justify-self: center;
  }

  .sold-source-summary span {
    font-size: 12.1px;
  }

  .sold-source-summary strong {
    font-size: 13.2px;
    line-height: 1.25;
  }

  .sold-cost-band h3 {
    padding: 12px;
  }

  .sold-cost-band > div {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sold-cost-band article {
    border-right: 1px solid #e5e7eb;
    border-bottom: 0;
  }

  .sold-cost-band article:last-child {
    border-right: 0;
    border-bottom: 0;
  }

  .sold-money-row.four,
  .sold-money-row.profit-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sold-money-row.four article,
  .sold-money-row.profit-items article {
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
  }

  .sold-money-row.four article:nth-child(2n),
  .sold-money-row.profit-items article:nth-child(2n) {
    border-right: 0;
  }

  .sold-money-row.four article:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .sold-money-row.profit-items article:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    border-right: 0;
    border-bottom: 0;
  }

  .sold-profit-panel-new {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    column-gap: 0;
    align-items: start;
  }

  .sold-profit-panel-new > h4 {
    margin: 4px 0 7px;
    font-size: 14.3px;
  }

  .sold-profit-panel-new > h4:first-of-type {
    grid-column: 1;
    grid-row: 1;
  }

  .sold-profit-panel-new > .sold-money-row.four {
    grid-column: 1;
    grid-row: 2;
  }

  .sold-profit-panel-new > h4:nth-of-type(2) {
    grid-column: 1;
    grid-row: 3;
  }

  body .sold-view-modal.active .sold-profit-panel-new > .sold-profit-layout {
    grid-column: 1;
    grid-row: 4;
    gap: 8px;
  }

  .sold-cost-band article,
  .sold-money-row article {
    min-height: 58px;
    padding: 10px;
  }

  .sold-cost-band strong,
  .sold-money-row strong {
    font-size: 16.5px;
  }

  .sold-profit-panel-new .sold-money-row article {
    min-height: 56px;
    padding: 7px 4px;
  }

  .sold-profit-panel-new .sold-money-row article span {
    font-size: 10px;
    line-height: 1.2;
  }

  .sold-profit-panel-new .sold-money-row strong {
    font-size: 14.3px;
  }

  .sold-profit-panel-new .sold-real-profit {
    min-height: 58px;
    padding: 7px 5px;
  }

  .sold-profit-panel-new .sold-real-profit strong {
    font-size: 19px;
  }

  body .sold-view-modal.active .sold-profit-panel-new > .sold-profit-layout {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0 !important;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 9px;
    background: #ffffff;
  }

  .sold-profit-panel-new .sold-profit-layout > .sold-money-row.profit-items {
    display: contents;
  }

  .sold-profit-panel-new .sold-profit-layout > .sold-money-row.profit-items article,
  .sold-profit-panel-new .sold-profit-layout > .sold-real-profit {
    grid-column: auto !important;
    min-width: 0;
    min-height: 56px;
    padding: 4px 2px;
    border: 0;
    border-right: 1px solid #e5e7eb;
    border-radius: 0;
  }

  .sold-profit-panel-new .sold-profit-layout > .sold-money-row.profit-items article:nth-child(-n + 3) {
    border-bottom: 1px solid #e5e7eb;
  }

  .sold-profit-panel-new .sold-profit-layout > .sold-money-row.profit-items article:nth-child(3n) {
    border-right: 0;
  }

  .sold-profit-panel-new .sold-profit-layout > .sold-real-profit {
    border-right: 0;
  }

  .sold-profit-panel-new .sold-profit-layout > .sold-money-row.profit-items article span,
  .sold-profit-panel-new .sold-profit-layout > .sold-real-profit span {
    font-size: 9.5px;
    line-height: 1.1;
  }

  .sold-profit-panel-new .sold-profit-layout > .sold-money-row.profit-items strong,
  .sold-profit-panel-new .sold-profit-layout > .sold-real-profit strong {
    font-size: 14px;
    line-height: 1.05;
  }

  .sold-reserved-block {
    align-items: flex-start;
    justify-content: flex-start;
  }
}
.sell-settlement-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(9, 16, 28, 0.58);
  backdrop-filter: blur(5px);
}

.sell-settlement-dialog {
  width: min(760px, calc(100vw - 28px));
  max-height: min(86vh, 760px);
  overflow: auto;
  border: 1px solid rgba(217, 161, 52, 0.55);
  border-radius: 14px;
  background: #fffaf1;
  box-shadow: 0 26px 70px rgba(8, 15, 28, 0.34);
}

.sell-settlement-dialog header,
.sell-settlement-dialog footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
}

.sell-settlement-dialog header {
  background: linear-gradient(135deg, #101a2e, #17233a 58%, #a56c18);
  color: #fff;
}

.sell-settlement-dialog header p {
  margin: 0 0 4px;
  color: #f6c15e;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.sell-settlement-dialog header h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
}

.sell-settlement-dialog header span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 800;
}

.sell-settlement-dialog header button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 26px;
  font-weight: 900;
}

.sell-settlement-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 16px 18px 8px;
}

.sell-settlement-grid article {
  display: grid;
  gap: 6px;
  min-height: 104px;
  padding: 13px 14px;
  border: 1px solid #d9e2ee;
  border-radius: 10px;
  background: #fff;
}

.sell-settlement-grid span {
  color: #5a6b82;
  font-size: 13px;
  font-weight: 900;
}

.sell-settlement-grid strong {
  color: #0f1b2d;
  font-size: 24px;
  line-height: 1;
}

.sell-settlement-grid small {
  color: #617089;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.sell-settlement-grid .green strong { color: #07823d; }
.sell-settlement-grid .blue strong { color: #1b64d8; }
.sell-settlement-grid .purple strong { color: #7c3aed; }
.sell-settlement-grid .orange strong { color: #c76700; }
.sell-settlement-grid .gold strong { color: #a66f00; }
.sell-settlement-grid .dark { background: #fff; border-color: #cfd9e7; }
.sell-settlement-grid .dark strong { color: #0f6a4c; }

.sell-settlement-note {
  display: grid;
  gap: 4px;
  margin: 0 18px 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #eff6ff;
  color: #15335b;
  font-size: 13px;
  font-weight: 800;
}

.sell-settlement-dialog footer {
  border-top: 1px solid #ead8b8;
  background: #fff;
}

.sell-settlement-dialog footer button {
  min-width: 132px;
  min-height: 42px;
  border: 1px solid #bfd0e6;
  border-radius: 999px;
  background: #fff;
  color: #102033;
  font-weight: 900;
}

.sell-settlement-dialog footer button.primary {
  border-color: #b97a0c;
  background: linear-gradient(180deg, #f6c760, #c88610);
  color: #101827;
  box-shadow: 0 12px 28px rgba(190, 126, 16, 0.28);
}

@media (max-width: 760px) {
  .sale-report-board {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .sell-settlement-grid {
    grid-template-columns: 1fr;
  }

  .sell-settlement-dialog header,
  .sell-settlement-dialog footer {
    align-items: stretch;
  }

  .sell-settlement-dialog footer {
    flex-direction: column-reverse;
  }
}

/* Final settlement-detail polish: icon, soft tabs, and black grid lines. */
.sale-report-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.96) !important;
  border-radius: 10px;
  background: #fff !important;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.sale-report-card > header,
.sale-report-card.customer > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 12px 14px 8px;
  background: #fff !important;
  color: #111827 !important;
}

.sale-report-card > header h3,
.sale-report-card.customer > header h3 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0;
  background: transparent !important;
  color: #111827 !important;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.2;
  text-align: left;
}

.sale-report-card > header h3::before {
  content: "";
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  margin-left: -7px;
  margin-right: -3px;
  border: 1.4px solid var(--sale-accent, #3e8a3d);
  border-radius: 9px;
  background:
    var(--sale-title-icon, none) center / 29px 29px no-repeat,
    var(--sale-accent-soft, #eaf7e8);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.sale-report-card.company {
  --sale-accent: #3e8a3d;
  --sale-accent-soft: #eaf7e8;
  --sale-title-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233e8a3d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4.5' y='3.5' width='15' height='17' rx='2'/%3E%3Cpath d='M8 8h8M8 12h2M12 12h2M16 12h.1M8 16h2M12 16h2M16 16h.1'/%3E%3C/svg%3E");
  --sale-tab-fill-start: #e7edde;
  --sale-tab-fill-mid: #e8efdf;
  --sale-tab-fill-end: #eef6e7;
  --sale-tab-bottom-shade: rgba(220, 232, 210, 0.55);
}

.sale-report-card.business {
  --sale-accent: #1776d2;
  --sale-accent-soft: #e8f3ff;
  --sale-title-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231776d2' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 20V5.8c0-.7.5-1.3 1.2-1.4l7.6-1.1c.7-.1 1.2.4 1.2 1.1V20'/%3E%3Cpath d='M15 8h4v12M8.5 8h2M8.5 12h2M8.5 16h2M15 12h2M15 16h2M4 20h16'/%3E%3C/svg%3E");
  --sale-tab-fill-start: #dbeaf7;
  --sale-tab-fill-mid: #e3f1fb;
  --sale-tab-fill-end: #f2f9fe;
  --sale-tab-bottom-shade: rgba(207, 226, 242, 0.55);
}

.sale-report-card.customer {
  --sale-accent: #7c4dcc;
  --sale-accent-soft: #f0e9ff;
  --sale-title-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237c4dcc' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 4h8l3 3v13H6V4h2Z'/%3E%3Cpath d='M15 4v4h4M9 12h6M9 16h6M9 8h2'/%3E%3C/svg%3E");
  --sale-tab-fill-start: #e8def8;
  --sale-tab-fill-mid: #eee5fb;
  --sale-tab-fill-end: #fbf5ff;
  --sale-tab-bottom-shade: rgba(222, 209, 243, 0.55);
}

.sale-report-card > header .sale-report-actions,
.sale-report-card.customer > header .sale-report-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 6px;
  flex: 0 0 auto;
  margin-left: auto;
}

.sale-report-card > header button,
.sale-report-card.customer > header button {
  min-height: 28px;
  padding: 5px 11px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #1f2937;
  box-shadow: 0 2px 9px rgba(15, 23, 42, 0.06);
  font-size: 12px;
  font-weight: 850;
}

.sale-report-info,
.sale-report-static-info {
  overflow: hidden;
  margin: 0 12px 10px;
  border: 1px solid #edf1f6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.sale-report-info h4,
.sale-report-static-info h4 {
  background: #fff !important;
  color: var(--sale-accent, #3e8a3d) !important;
}

.sale-money-table {
  width: calc(100% - 24px);
  margin: 0 12px 10px;
  overflow: hidden;
  border: 1px solid #111827;
  border-top: 0;
  border-radius: 12px 12px 3px 3px;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  color: #111827;
}

.sale-money-table thead tr {
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
}

.sale-money-table th {
  position: relative;
  height: 40px;
  border: 0 !important;
  background: #fff !important;
  color: #111827 !important;
  font-size: 14px;
  font-weight: 950;
}

.sale-money-table th:first-child {
  border-radius: 12px 22px 22px 0;
  background: linear-gradient(90deg, var(--sale-accent-soft, #eaf7e8) 0%, var(--sale-accent-soft, #eaf7e8) 72%, rgba(255, 255, 255, 0.94) 100%) !important;
  color: var(--sale-accent, #3e8a3d) !important;
}

.sale-money-table th + th {
  border-radius: 22px 12px 0 22px;
  background: #fff !important;
  color: #111827 !important;
}

.sale-money-table tbody td {
  height: 31px;
  padding: 7px 8px;
  border: 0;
  border-top: 1px solid #111827 !important;
  border-right: 1px solid #111827 !important;
  background: #fff !important;
  color: #111827;
  text-align: left;
  font-weight: 750;
}

.sale-money-table tbody td:nth-child(4n) {
  border-right: 0 !important;
}

.sale-money-table tbody tr:first-child td {
  border-top: 1px solid #111827 !important;
}

.sale-money-table tbody tr:last-child td {
  border-bottom: 0 !important;
}

.sale-money-table td:nth-child(2),
.sale-money-table td:nth-child(4) {
  text-align: right;
  font-weight: 950;
}

.sale-money-table input {
  border-color: #111827;
}

.sale-total {
  margin: 0 12px 10px;
  border-radius: 8px;
}

/* Match the softer accounting table grid used by the vehicle info blocks. */
.sale-money-table {
  border: 1px solid #c8d1dc;
  border-top: 0;
}

.sale-money-table tbody td {
  border-top: 1px solid #c8d1dc !important;
  border-right: 1px solid #c8d1dc !important;
}

.sale-money-table tbody td:nth-child(4n) {
  border-right: 0 !important;
}

.sale-money-table tbody tr:first-child td {
  border-top: 1px solid #c8d1dc !important;
}

.sale-money-table input {
  border-color: #c8d1dc;
}

/* Keep settlement cards soft, not stark white. */
.sale-report-card {
  background: #f7f8fa !important;
}

.sale-report-card > header,
.sale-report-card.customer > header {
  background: #f7f8fa !important;
}

.sale-report-info,
.sale-report-static-info,
.sale-money-table,
.sale-sign-grid span,
.sale-note {
  background: #fbfcfd !important;
}

.sale-report-info span,
.sale-report-info strong,
.sale-report-static-info span,
.sale-report-static-info strong,
.sale-money-table tbody td,
.sale-money-table tbody td input,
.sale-money-table input[readonly],
.sale-money-table .sale-report-locked {
  background: #fbfcfd !important;
}

/* Settlement table tabs must match the soft curved split shown in the reference. */
.sale-money-table {
  display: block;
  overflow: hidden;
  border-top: 0 !important;
  border-radius: 0 0 3px 3px;
  background: transparent !important;
}

.sale-money-table thead {
  position: relative;
  display: block;
  width: 100%;
  height: 38px;
  border: 0 !important;
  background: transparent !important;
}

.sale-money-table thead::before {
  display: none;
}

.sale-money-table thead::after {
  display: none;
}

.sale-money-table thead tr {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  width: 100%;
  height: 38px;
  overflow: hidden;
  border: 0 !important;
  border-radius: 8px 8px 0 0;
  background: #ffffff !important;
  box-shadow: none;
}

.sale-money-table thead tr::before {
  display: none;
}

.sale-money-table thead tr::after {
  display: none;
}

.sale-money-table th {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  width: auto;
  padding: 0 0 2px !important;
  border: 0 !important;
  background: transparent !important;
  color: #111827 !important;
  font-size: 12px;
  font-weight: 700;
  line-height: 38px;
  text-align: center;
  transform: translateY(2px);
  vertical-align: middle;
}

.sale-money-table th:first-child {
  grid-column: 1;
  z-index: 3;
  overflow: visible;
  border-radius: 8px 0 0 0;
  background: linear-gradient(90deg, var(--sale-tab-fill-start, #e7edde) 0%, var(--sale-tab-fill-mid, #e8efdf) 76%, var(--sale-tab-fill-end, #eef6e7) 100%) !important;
  color: var(--sale-accent, #3e8a3d) !important;
  padding-left: 0;
}

.sale-money-table th:first-child::before {
  content: "";
  position: absolute;
  top: 0;
  right: -28px;
  width: 56px;
  height: 38px;
  border-radius: 18px 0 0 0;
  background: #ffffff;
  box-shadow: -10px 0 18px rgba(255, 255, 255, 0.82);
  transform: skewX(-24deg);
  transform-origin: left bottom;
  pointer-events: none;
}

.sale-money-table th + th {
  grid-column: 2;
  z-index: 3;
  overflow: visible;
  border-radius: 0 8px 0 0;
  background: transparent !important;
  color: #111827 !important;
  padding-left: 0;
}

.sale-money-table th + th::before {
  display: none;
}

.sale-money-table tbody {
  display: table;
  width: 100%;
  table-layout: fixed;
}

.sale-money-table tbody td {
  width: 25%;
}

.sale-report-card.company .sale-money-table th:first-child {
  color: #006b1e !important;
}

.sale-report-card.business .sale-money-table th:first-child {
  color: #006aa3 !important;
}

.sale-report-card.customer .sale-money-table th:first-child {
  color: #5730a3 !important;
}

.sale-report-screenshot-export.sale-report-card {
  border: 0 !important;
  background: #ffffff !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08) !important;
}

.sale-report-screenshot-export.sale-report-card > header,
.sale-report-screenshot-export.sale-report-card.customer > header {
  background: #ffffff !important;
}

.sale-report-screenshot-export.sale-report-card > header h3::before {
  display: none !important;
}

.sale-report-screenshot-export .sale-report-shot-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  margin-left: -7px;
  margin-right: -3px;
  border: 1.4px solid var(--sale-accent, #3e8a3d);
  border-radius: 9px;
  background: var(--sale-accent-soft, #eaf7e8);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.sale-report-screenshot-export .sale-report-shot-title-icon svg {
  width: 29px;
  height: 29px;
  display: block;
  color: var(--sale-accent, #3e8a3d);
}

.sale-report-screenshot-export .sale-report-info,
.sale-report-screenshot-export .sale-report-static-info {
  border: 0 !important;
  background: #ffffff !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.035) !important;
}

.sale-report-screenshot-export .sale-report-info h4,
.sale-report-screenshot-export .sale-report-static-info h4 {
  border: 0 !important;
  border-bottom: 0 !important;
  background: #ffffff !important;
}

.sale-report-screenshot-export .sale-report-info span,
.sale-report-screenshot-export .sale-report-info strong,
.sale-report-screenshot-export .sale-report-static-info span,
.sale-report-screenshot-export .sale-report-static-info strong {
  border: 0 !important;
  background: #ffffff !important;
}

.sale-report-screenshot-export .sale-money-table {
  border: 0 !important;
  background: transparent !important;
}

.sale-report-screenshot-export .sale-money-table tbody td {
  border-right: 0 !important;
  border-top: 1px solid rgba(15, 23, 42, 0.07) !important;
  background: #ffffff !important;
  padding-right: 8px !important;
  padding-left: 8px !important;
  color: #071225 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  text-align: center !important;
}

.sale-report-screenshot-export .sale-money-table tbody tr:first-child td {
  border-top: 0 !important;
}

.sale-report-screenshot-export .sale-money-table tbody td:nth-child(2),
.sale-report-screenshot-export .sale-money-table tbody td:nth-child(4) {
  text-align: center !important;
}

.sale-report-screenshot-export .sale-money-table tbody td:nth-child(1),
.sale-report-screenshot-export .sale-money-table tbody td:nth-child(3) {
  font-size: 12.5px !important;
}

.sale-report-screenshot-export .sale-report-screenshot-field,
.sale-report-screenshot-export .sale-money-table input,
.sale-report-screenshot-export .sale-money-table input[readonly],
.sale-report-screenshot-export .sale-money-table .sale-report-locked {
  border: 0 !important;
  background: transparent !important;
  color: #071225 !important;
  font: inherit !important;
  font-weight: 900 !important;
  text-align: center !important;
  box-shadow: none !important;
}

.sale-report-screenshot-export .sale-sign-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin: 0 12px 10px !important;
}

.sale-report-screenshot-export .sale-sign-grid.one {
  grid-template-columns: minmax(0, 1fr) !important;
}

.sale-report-screenshot-export .sale-sign-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.sale-report-screenshot-export .sale-sign-grid span {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 50px !important;
  padding: 8px 6px;
  border: 1px solid #edf1f6 !important;
  border-radius: 7px;
  background: #ffffff !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.035);
  color: #111827;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
}

.sale-report-screenshot-export .sale-sign-grid b {
  display: block;
  min-height: 18px;
  margin-top: 4px;
  color: #111827;
  font-size: 13px;
  font-weight: 950;
  line-height: 1.2;
  white-space: nowrap;
}

/* Layout guard for the live settlement cards. Keep the visual skin above, but
   prevent old table/card rules from stretching each report into a full row. */
.mobile-modal[data-modal="vehicle-sell"] .sell-report-layout.sale-report-layout.three,
.mobile-modal[data-modal="vehicle-sell"] .sold-detail-report-layout.sale-report-layout.three,
.mobile-modal[data-modal="vehicle-sell"] .sale-report-layout.three {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.mobile-modal[data-modal="vehicle-sell"] .sell-report-layout.sale-report-layout.three .sale-report-board,
.mobile-modal[data-modal="vehicle-sell"] .sold-detail-report-layout.sale-report-layout.three .sale-report-board,
.mobile-modal[data-modal="vehicle-sell"] .sale-report-layout.three .sale-report-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, calc((100% - 20px) / 3)));
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  align-items: start;
}

.mobile-modal[data-modal="vehicle-sell"] .sell-report-layout.sale-report-layout.three.two .sale-report-board,
.mobile-modal[data-modal="vehicle-sell"] .sold-detail-report-layout.sale-report-layout.three.two .sale-report-board,
.mobile-modal[data-modal="vehicle-sell"] .sale-report-layout.three.two .sale-report-board {
  grid-template-columns: repeat(2, minmax(0, calc((100% - 20px) / 3)));
}

.mobile-modal[data-modal="vehicle-sell"] .sale-report-card {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.mobile-modal[data-modal="vehicle-sell"] .sale-money-table {
  width: calc(100% - 24px);
  max-width: calc(100% - 24px);
}

@media (max-width: 980px) {
  .mobile-modal[data-modal="vehicle-sell"] .sell-report-layout.sale-report-layout.three .sale-report-board,
  .mobile-modal[data-modal="vehicle-sell"] .sold-detail-report-layout.sale-report-layout.three .sale-report-board,
  .mobile-modal[data-modal="vehicle-sell"] .sale-report-layout.three .sale-report-board,
  .mobile-modal[data-modal="vehicle-sell"] .sell-report-layout.sale-report-layout.three.two .sale-report-board,
  .mobile-modal[data-modal="vehicle-sell"] .sold-detail-report-layout.sale-report-layout.three.two .sale-report-board,
  .mobile-modal[data-modal="vehicle-sell"] .sale-report-layout.three.two .sale-report-board {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Final mobile sold-page composition shared with the approved inventory skin. */
@media (max-width: 560px) {
  body:not(.desktop-page) .page[data-panel="sold"] {
    --sold-mobile-width: 100%;
    padding: 8px 4px 24px !important;
    background: #f7f4ef !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-title-strip {
    position: relative;
    min-height: 107px !important;
    margin: 0 0 12px !important;
    padding: 28px 16px 15px !important;
    overflow: hidden;
    border: 0 !important;
    border-radius: 9px !important;
    background:
      linear-gradient(90deg, rgba(3, 11, 23, .98) 0%, rgba(5, 14, 29, .9) 49%, rgba(5, 14, 29, .16) 100%),
      url("./vehicle-site-assets/contact-hero-car-single.jpg") 78% 52% / cover no-repeat,
      #071225 !important;
    box-shadow: 0 8px 20px rgba(7, 18, 37, .15) !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-title-strip p {
    margin: 0 0 3px !important;
    color: #e6b65f !important;
    font-size: 8px !important;
    line-height: 1 !important;
    letter-spacing: .18em;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-title-strip h1 {
    margin: 0 !important;
    color: #fff !important;
    font-size: 25px !important;
    line-height: 1.06 !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-title-strip::after {
    content: "快速搜尋・完整掌握每筆已售紀錄";
    position: absolute;
    left: 16px;
    bottom: 16px;
    color: rgba(255, 255, 255, .9);
    font-size: 11px;
    font-weight: 600;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-search-card {
    width: 100% !important;
    margin: 0 0 8px !important;
    padding: 12px !important;
    border: 0 !important;
    border-radius: 14px !important;
    background: #fff !important;
    box-shadow: 0 8px 24px rgba(66, 48, 29, .08) !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-search-card input {
    height: 45px !important;
    padding: 0 13px 0 38px !important;
    border: 1px solid #e6e1da !important;
    border-radius: 10px !important;
    background-color: #fff !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236f7781' stroke-width='1.7'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m16 16 5 5'/%3E%3C/svg%3E") !important;
    background-position: 13px center !important;
    background-repeat: no-repeat !important;
    background-size: 16px 16px !important;
    font-size: 12px !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-filter-grid {
    width: 100% !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin: 0 0 10px !important;
    padding: 10px !important;
    border: 0 !important;
    border-radius: 14px !important;
    background: #fff !important;
    box-shadow: 0 8px 24px rgba(66, 48, 29, .08) !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-filter-grid select {
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 11px !important;
    border: 1px solid #e6e1da !important;
    border-radius: 9px !important;
    background: #fff !important;
    font-size: 12px !important;
  }

  body:not(.desktop-page) #hongyi-mobile-shell .page[data-panel="sold"] .sold-filter-grid select:nth-of-type(2) {
    padding-right: 24px !important;
    font-size: 13px !important;
    letter-spacing: -0.03em;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-metrics {
    width: 100% !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px !important;
    margin: 0 0 10px !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-metrics .metric-card {
    min-height: 102px !important;
    padding: 13px 11px !important;
    overflow: hidden;
    border: 0 !important;
    border-radius: 14px !important;
    background: linear-gradient(155deg, #fff 0%, #fbf8f3 100%) !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-metrics .metric-card span {
    min-height: 25px;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    font-size: 10px !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-metrics .metric-card strong {
    margin-top: 6px;
    font-size: 18px !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-view-toolbar {
    width: 100% !important;
    margin: 0 0 12px !important;
    padding: 10px !important;
    border: 0 !important;
    border-radius: 14px !important;
    background: #fff !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-view-toolbar .view-tabs {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-view-toolbar .view-tabs button {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 36px !important;
    padding: 0 4px !important;
    border-radius: 9px !important;
    font-size: 11px !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] [data-view-group="sold"] [data-view="table"] {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-sort-control {
    margin-top: 2px;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-list {
    width: 100% !important;
    gap: 12px !important;
    margin-top: 0 !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-card {
    grid-template-columns: minmax(0, 48%) minmax(0, 52%) !important;
    grid-template-areas: "photo info" "profit profit" "actions actions" !important;
    gap: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 1px solid #e5ded5 !important;
    border-radius: 13px !important;
    background: #fff !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-card > .sold-legacy-table-cells,
  body:not(.desktop-page) .page[data-panel="sold"] .sold-card > .sold-table-cells {
    display: none !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-thumb,
  body:not(.desktop-page) .page[data-panel="sold"] .sold-card > img {
    width: 100% !important;
    height: 170px !important;
    border-radius: 0 !important;
    object-fit: cover !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-info {
    padding: 12px 12px 8px !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-card h2 {
    justify-content: space-between;
    font-size: 17px !important;
    line-height: 1.12 !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-rating {
    min-width: 42px !important;
    height: 24px !important;
    min-height: 24px !important;
    padding: 0 8px !important;
    border-radius: 999px !important;
    font-size: 10px !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-meta-line {
    margin-top: 5px !important;
    font-size: 9px !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px !important;
    margin-top: 8px !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-grid span {
    min-height: 48px !important;
    padding: 5px 3px !important;
    border: 1px solid #ebe4da !important;
    border-radius: 7px !important;
    background: #fffdf9 !important;
    font-size: 9px !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-grid b {
    font-size: 14px !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-extra-line {
    display: none;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-profit-panel {
    display: none !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .card-actions.sold-card-actions,
  body:not(.desktop-page) .page[data-panel="sold"] .card-actions.sold-card-actions.boss,
  body:not(.desktop-page) .page[data-panel="sold"] .card-actions.sold-card-actions.two {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 6px !important;
    padding: 7px 12px 9px !important;
    border-top: 1px solid #eee7dd;
    background: #fff;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .card-actions.sold-card-actions button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 5px !important;
    border-radius: 5px !important;
    font-size: 11px !important;
    white-space: nowrap;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .card-actions.sold-card-actions button::before {
    content: "";
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    margin-right: 6px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .card-actions.sold-card-actions .view {
    border-color: rgba(176, 126, 28, 0.48) !important;
    background: linear-gradient(180deg, #fff9eb 0%, #f6ead2 100%) !important;
    color: #071225 !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .card-actions.sold-card-actions .view::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23071225' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Z'/%3E%3Ccircle cx='12' cy='12' r='2.7'/%3E%3C/svg%3E");
  }

  body:not(.desktop-page) .page[data-panel="sold"] .card-actions.sold-card-actions .sell {
    border-color: rgba(184, 115, 19, 0.52) !important;
    background: linear-gradient(180deg, #fff4d8 0%, #f3c46f 100%) !important;
    color: #5b2d05 !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .card-actions.sold-card-actions .sell::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b2d05' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h12v18l-3-2-3 2-3-2-3 2V3Z'/%3E%3Cpath d='M9 8h6M9 12h6M9 16h3'/%3E%3C/svg%3E");
  }

  body:not(.desktop-page) .page[data-panel="sold"] .card-actions.sold-card-actions .manage {
    border-color: rgba(96, 84, 176, 0.38) !important;
    background: linear-gradient(180deg, #f8f7ff 0%, #ebe8fb 100%) !important;
    color: #071225 !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .card-actions.sold-card-actions .manage::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23071225' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 11 1.5-4.2A2.7 2.7 0 0 1 9 5h6a2.7 2.7 0 0 1 2.5 1.8L19 11'/%3E%3Cpath d='M4 11h16v7H4zM7 18v2M17 18v2M7.5 14.5h.01M16.5 14.5h.01'/%3E%3C/svg%3E");
  }

  body:not(.desktop-page) .page[data-panel="sold"] .card-actions.sold-card-actions .repair::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234b3822' stroke-width='1.45' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.2 6.2 17.8 2.6a5 5 0 0 0-6.5 6.5l-8.1 8.1a2.5 2.5 0 1 0 3.6 3.6l8.1-8.1a5 5 0 0 0 6.5-6.5l-3.6 3.6-3.6-.9-.9-3.6.9-.9Z'/%3E%3C/svg%3E");
  }

  body:not(.desktop-page) .page[data-panel="sold"] .card-actions.sold-card-actions .repair {
    border-color: #ebe5dc !important;
    background: #f7f4ef !important;
    color: #4b3822 !important;
    box-shadow: none !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-card .card-actions.sold-card-actions .delete {
    grid-column: 1 / -1 !important;
    grid-column-start: 1 !important;
    grid-column-end: -1 !important;
    width: 100% !important;
    border-color: rgba(190, 64, 64, 0.38) !important;
    background: #fff !important;
    color: #c92828 !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .card-actions.sold-card-actions .delete::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c92828' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M9 7V4h6v3M7 7l1 14h8l1-14M10 11v6M14 11v6'/%3E%3C/svg%3E");
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-list[data-view="compact"] .sold-card {
    position: relative;
    grid-template-columns: minmax(0, 48%) minmax(0, 52%) !important;
    grid-template-areas: "photo info" "actions actions" !important;
    min-height: 170px;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-list[data-view="compact"] .sold-thumb,
  body:not(.desktop-page) .page[data-panel="sold"] .sold-list[data-view="compact"] .sold-card > img {
    width: 100% !important;
    height: 170px !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-list[data-view="compact"] .sold-info {
    min-width: 0;
    padding: 12px 12px 8px !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-list[data-view="compact"] .sold-card h2 {
    font-size: 17px !important;
    line-height: 1.15 !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-list[data-view="compact"] .sold-rating {
    position: static !important;
    flex: 0 0 auto;
    min-width: 43px !important;
    height: 24px !important;
    min-height: 24px !important;
    padding: 0 8px !important;
    border-radius: 999px !important;
    font-size: 0 !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-list[data-view="compact"] .sold-rating::after {
    content: "已售";
    font-size: 10px;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-list[data-view="compact"] .sold-meta-line {
    margin-top: 5px !important;
    font-size: 9px !important;
    line-height: 1.3 !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-list[data-view="compact"] .sold-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px !important;
    margin-top: 8px !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-list[data-view="compact"] .sold-grid span {
    min-height: 48px !important;
    padding: 5px 3px !important;
    border: 1px solid #ebe4da !important;
    border-radius: 7px !important;
    background: #fffdf9 !important;
    font-size: 9px !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-list[data-view="compact"] .sold-grid b {
    margin-top: 2px;
    font-size: 14px !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-list[data-view="compact"] .card-actions.sold-card-actions {
    grid-template-columns: 1fr !important;
    padding: 5px 8px 7px !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-list[data-view="compact"] .card-actions.sold-card-actions button {
    display: none !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] .sold-list[data-view="compact"] .card-actions.sold-card-actions .repair {
    display: inline-flex !important;
    grid-column: 1 !important;
    width: 100% !important;
    background: #f7f4ef !important;
    color: #4b3822 !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] [data-view-group="sold"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body:not(.desktop-page) .page[data-panel="sold"] [data-view-group="sold"] [data-view="table"] {
    display: none !important;
  }
}

/* The row number and chevron belong exclusively to the desktop management table.
   Keep this at the end of the file so later mobile card/table rules cannot expose them. */
@media (max-width: 899px) {
  body .page[data-panel="sold"] .sold-list .sold-card > .management-row-index,
  body .page[data-panel="sold"] .sold-list .sold-card > .sold-management-row-chevron {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
  }
}

