@media (max-width: 900px) {
  .desktop-app .page[data-panel^="owner-"].active {
    width: 100%;
    min-width: 0;
    padding: 10px 8px 96px;
    overflow-x: hidden;
    background: linear-gradient(180deg, #f6f0e5 0%, #eef2f7 100%);
  }

  .desktop-app .page[data-panel^="owner-"].active > .owner-reconcile-title-strip {
    min-height: auto;
    margin: 0 0 10px;
    padding: 13px 14px;
    border: 1px solid rgba(196, 154, 73, 0.24);
    border-radius: 14px;
    background: #ffffff;
    color: #071225;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .desktop-app .page[data-panel^="owner-"].active > .owner-reconcile-title-strip::after {
    display: none;
  }

  .desktop-app .page[data-panel^="owner-"].active > .owner-reconcile-title-strip h1 {
    margin: 0;
    color: #071225;
    font-size: 20px;
    line-height: 1.2;
    font-weight: 950;
    letter-spacing: 0;
    text-shadow: none;
  }

  .desktop-app .page[data-panel^="owner-"].active > .owner-reconcile-title-strip .owner-accounting-title-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    margin-left: auto;
  }

  .desktop-app .page[data-panel^="owner-"].active > .owner-reconcile-title-strip button,
  .desktop-app .page[data-panel^="owner-"].active .owner-accounting-title-actions button {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 900;
  }

  .desktop-app .page[data-panel^="owner-"].active > .content-card.owner-fuel-card,
  .desktop-app .page[data-panel^="owner-"].active > .owner-fuel-card,
  .desktop-app .page[data-panel^="owner-"].active .owner-fuel-card,
  .desktop-app .page[data-panel^="owner-"].active .owner-expense-card,
  .desktop-app .page[data-panel^="owner-"].active .owner-repair-card {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 10px;
    border: 1px solid rgba(196, 154, 73, 0.18);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
    overflow: visible;
  }

  .desktop-app .page[data-panel^="owner-"].active .owner-fuel-toolbar,
  .desktop-app .page[data-panel^="owner-"].active .owner-accounting-filter-row,
  .desktop-app .page[data-panel^="owner-"].active .owner-profit-hero,
  .desktop-app .page[data-panel^="owner-"].active .owner-profit-period-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: end;
    gap: 8px;
    width: 100%;
  }

  .desktop-app .page[data-panel^="owner-"].active .owner-accounting-filter-row,
  .desktop-app .page[data-panel^="owner-"].active .owner-accounting-filter-row--checkout {
    grid-template-columns: 1fr;
    padding: 10px;
    border: 1px solid rgba(203, 213, 225, 0.74);
    border-radius: 12px;
    background: #f8fafc;
  }

  .desktop-app .page[data-panel^="owner-"].active .owner-fuel-toolbar label,
  .desktop-app .page[data-panel^="owner-"].active .owner-accounting-filter-row label,
  .desktop-app .page[data-panel^="owner-"].active .owner-profit-period-field {
    display: grid;
    gap: 5px;
    min-width: 0;
    margin: 0;
    color: #334155;
    font-size: 12px;
    font-weight: 900;
  }

  .desktop-app .page[data-panel^="owner-"].active :is(select, input[type="date"], input[type="search"], input[type="text"], button) {
    max-width: 100%;
  }

  .desktop-app .page[data-panel^="owner-"].active :is(select, input[type="date"], input[type="search"], input[type="text"]) {
    min-height: 42px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #0f172a;
    font-size: 14px;
    font-weight: 800;
  }

  .desktop-app .page[data-panel^="owner-"].active .agency-report-shell,
  .desktop-app .page[data-panel^="owner-"].active .owner-accounting-cash-page,
  .desktop-app .page[data-panel^="owner-"].active .owner-profit-page,
  .desktop-app .page[data-panel^="owner-"].active .owner-fuel-dashboard-card,
  .desktop-app .page[data-panel^="owner-"].active .owner-expense-dashboard-card,
  .desktop-app .page[data-panel^="owner-"].active .owner-repair-dashboard-card {
    display: grid;
    gap: 10px;
    width: 100%;
    min-width: 0;
  }

  .desktop-app .page[data-panel^="owner-"].active .agency-summary-grid,
  .desktop-app .page[data-panel^="owner-"].active .owner-accounting-summary-grid,
  .desktop-app .page[data-panel^="owner-"].active .owner-staff-commission-summary,
  .desktop-app .page[data-panel^="owner-"].active .owner-profit-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .desktop-app .page[data-panel^="owner-"].active .agency-summary-grid article,
  .desktop-app .page[data-panel^="owner-"].active .owner-accounting-summary-grid article,
  .desktop-app .page[data-panel^="owner-"].active .owner-staff-commission-summary article,
  .desktop-app .page[data-panel^="owner-"].active .owner-profit-summary-grid article {
    min-width: 0;
    min-height: 82px;
    padding: 12px;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  }

  .desktop-app .page[data-panel^="owner-"].active .agency-summary-grid article strong,
  .desktop-app .page[data-panel^="owner-"].active .owner-accounting-summary-grid article strong,
  .desktop-app .page[data-panel^="owner-"].active .owner-staff-commission-summary article strong,
  .desktop-app .page[data-panel^="owner-"].active .owner-profit-summary-grid article strong {
    font-size: clamp(17px, 4.2vw, 21px);
    line-height: 1.12;
    word-break: break-word;
  }

  .desktop-app .page[data-panel^="owner-"].active .owner-accounting-help-card,
  .desktop-app .page[data-panel^="owner-"].active .owner-accounting-pending-card {
    grid-column: 1 / -1;
  }

  .desktop-app .page[data-panel^="owner-"].active .agency-table-card,
  .desktop-app .page[data-panel^="owner-"].active .agency-total-card,
  .desktop-app .page[data-panel^="owner-"].active .agency-note-card,
  .desktop-app .page[data-panel^="owner-"].active .owner-accounting-table-card,
  .desktop-app .page[data-panel^="owner-"].active .owner-accounting-side,
  .desktop-app .page[data-panel^="owner-"].active .owner-repair-sheet,
  .desktop-app .page[data-panel^="owner-"].active .owner-fuel-sheet,
  .desktop-app .page[data-panel^="owner-"].active .owner-expense-sheet,
  .desktop-app .page[data-panel^="owner-"].active .owner-profit-card,
  .desktop-app .page[data-panel^="owner-"].active .owner-profit-table-card {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 12px;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  }

  .desktop-app .page[data-panel^="owner-"].active .agency-bottom-grid,
  .desktop-app .page[data-panel^="owner-"].active .owner-accounting-layout,
  .desktop-app .page[data-panel^="owner-"].active .owner-profit-dashboard-grid,
  .desktop-app .page[data-panel^="owner-"].active .owner-fuel-sheets {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
    min-width: 0;
  }

  .desktop-app .page[data-panel^="owner-"].active .agency-page-actions,
  .desktop-app .page[data-panel^="owner-"].active .owner-accounting-table-head,
  .desktop-app .page[data-panel^="owner-"].active .owner-profit-table-head {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 10px;
  }

  .desktop-app .page[data-panel^="owner-"].active .owner-accounting-head-actions,
  .desktop-app .page[data-panel^="owner-"].active .owner-profit-table-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .desktop-app .page[data-panel^="owner-"].active .agency-page-actions button,
  .desktop-app .page[data-panel^="owner-"].active .owner-accounting-head-actions button,
  .desktop-app .page[data-panel^="owner-"].active .owner-profit-table-actions button {
    width: 100%;
    min-height: 38px;
    border-radius: 10px;
    font-weight: 900;
  }

  .desktop-app .page[data-panel^="owner-"].active .owner-repair-table-wrap,
  .desktop-app .page[data-panel^="owner-"].active .owner-repair-payment-table-wrap,
  .desktop-app .page[data-panel^="owner-"].active .agency-table-card,
  .desktop-app .page[data-panel^="owner-"].active .owner-accounting-table-card,
  .desktop-app .page[data-panel^="owner-"].active .owner-profit-table-card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .desktop-app .page[data-panel^="owner-"].active :is(
    .agency-report-table,
    .remittance-report-table,
    .owner-accounting-table,
    .owner-fuel-table,
    .owner-expense-detail-table,
    .owner-repair-ledger-table,
    .owner-staff-commission-table,
    .owner-staff-commission-detail-table,
    .owner-accounting-batch-table,
    [data-panel="owner-profit-report"] table
  ) {
    width: max-content;
    min-width: 760px;
    border-collapse: collapse;
    table-layout: auto;
    font-size: 12px;
  }

  .desktop-app .page[data-panel^="owner-"].active :is(
    .agency-report-table,
    .remittance-report-table,
    .owner-accounting-table,
    .owner-fuel-table,
    .owner-expense-detail-table,
    .owner-repair-ledger-table,
    .owner-staff-commission-table,
    .owner-staff-commission-detail-table,
    .owner-accounting-batch-table,
    [data-panel="owner-profit-report"] table
  ) th,
  .desktop-app .page[data-panel^="owner-"].active :is(
    .agency-report-table,
    .remittance-report-table,
    .owner-accounting-table,
    .owner-fuel-table,
    .owner-expense-detail-table,
    .owner-repair-ledger-table,
    .owner-staff-commission-table,
    .owner-staff-commission-detail-table,
    .owner-accounting-batch-table,
    [data-panel="owner-profit-report"] table
  ) td {
    min-height: 34px;
    padding: 7px 8px;
    white-space: nowrap;
    font-size: 12px;
    line-height: 1.28;
  }

  .desktop-app .page[data-panel^="owner-"].active .owner-fuel-dashboard-card .owner-fuel-table {
    min-width: 640px;
    table-layout: auto;
  }

  .desktop-app .page[data-panel^="owner-"].active .owner-repair-ledger-footer,
  .desktop-app .page[data-panel^="owner-"].active .remittance-pagination-footer,
  .desktop-app .page[data-panel^="owner-"].active .owner-accounting-checkout-total {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px 0 0;
    text-align: left;
  }

  .desktop-app .page[data-panel^="owner-"].active .remittance-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .desktop-app .page[data-panel^="owner-"].active .remittance-pagination button,
  .desktop-app .page[data-panel^="owner-"].active .agency-view-btn,
  .desktop-app .page[data-panel^="owner-"].active .agency-delete-btn,
  .desktop-app .page[data-panel^="owner-"].active .remittance-view-btn,
  .desktop-app .page[data-panel^="owner-"].active .remittance-delete-btn {
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
  }

  .desktop-app .page[data-panel^="owner-"].active .owner-accounting-center-metrics,
  .desktop-app .page[data-panel^="owner-"].active .owner-accounting-action-stack,
  .desktop-app .page[data-panel^="owner-"].active .owner-accounting-ranking-list {
    display: grid;
    gap: 8px;
  }

  .desktop-app .page[data-panel^="owner-"].active .owner-accounting-side-action {
    width: 100%;
    min-height: 58px;
    padding: 10px 12px;
    border-radius: 12px;
    text-align: left;
  }

  .desktop-app .page[data-panel^="owner-"].active .owner-staff-commission-sheet h2,
  .desktop-app .page[data-panel^="owner-"].active .owner-repair-sheet h2 {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.3;
  }

  .owner-repair-payment-overlay,
  .owner-accounting-batch-overlay,
  .owner-staff-commission-detail-overlay,
  .owner-expense-dialog-overlay,
  .owner-profit-navigation-overlay {
    padding: 10px;
    align-items: stretch;
  }

  .owner-repair-payment-dialog,
  .owner-accounting-batch-dialog,
  .owner-staff-commission-detail-dialog,
  .owner-expense-dialog-card,
  .owner-profit-navigation-dialog {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    overflow: auto;
    border-radius: 14px;
  }

  .owner-repair-payment-dialog header,
  .owner-accounting-batch-dialog header,
  .owner-staff-commission-detail-dialog header,
  .owner-expense-dialog-card header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: start;
    padding: 14px;
  }

  .owner-repair-payment-dialog footer,
  .owner-accounting-batch-dialog footer,
  .owner-staff-commission-detail-dialog footer,
  .owner-expense-dialog-card footer {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px 14px;
  }

  .owner-repair-payment-dialog footer button,
  .owner-accounting-batch-dialog footer button,
  .owner-staff-commission-detail-dialog footer button,
  .owner-expense-dialog-card footer button {
    width: 100%;
    min-height: 40px;
    border-radius: 10px;
  }
}

/* Employee commission mobile ledger: keep exactly one horizontal scroller.
   The general mobile overhaul turns every table into a second scroll box;
   on touch devices that lets the table slide away and leaves a blank panel. */
@media (max-width: 900px) {
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-staff-commission-report"].active,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-staff-commission-report"].active .content-card,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-staff-commission-report"].active .owner-staff-commission-sheet {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
    overscroll-behavior-x: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-staff-commission-report"].active .owner-staff-commission-sheet > .owner-repair-table-wrap {
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overscroll-behavior-x: contain !important;
    -webkit-overflow-scrolling: touch;
    contain: inline-size paint;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-staff-commission-report"].active .owner-staff-commission-sheet > .owner-repair-table-wrap > .owner-staff-commission-table {
    display: table !important;
    box-sizing: border-box !important;
    width: max-content !important;
    max-width: none !important;
    min-width: 1180px !important;
    margin: 0 !important;
    overflow: visible !important;
    border-collapse: collapse !important;
    table-layout: auto !important;
  }
}

/* Sold-detail finance shortcuts and contextual return navigation. */
.sale-report-finance-shortcuts[hidden] {
  display: none !important;
}

.sale-report-finance-shortcuts {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0 0 12px;
}

.sale-report-finance-shortcuts > span {
  color: #7b684d;
  font-size: 12px;
  font-weight: 800;
}

.sale-report-finance-shortcuts button,
.sold-detail-return-bar button {
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid #d8a348;
  border-radius: 10px;
  background: #fffaf1;
  color: #8b5810;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(139, 88, 16, .08);
}

.sale-report-finance-shortcuts button:last-child {
  border-color: #172033;
  background: #172033;
  color: #fff;
}

.sale-report-finance-shortcuts button:hover,
.sold-detail-return-bar button:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(139, 88, 16, .15);
}

.sold-detail-return-bar {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 12px;
}

.sold-detail-return-bar button span {
  margin-right: 5px;
  font-size: 16px;
  line-height: 1;
}

.sales-settlement-search-field {
  flex: 1 1 340px;
  min-width: min(340px, 100%);
}

.sales-settlement-search-field input {
  box-sizing: border-box;
  width: 100%;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #c4d0df;
  border-radius: 9px;
  background: #fff;
  color: #071225;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  outline: none;
}

.sales-settlement-search-field input:focus {
  border-color: #c98b21;
  box-shadow: 0 0 0 3px rgba(201, 139, 33, .14);
}

.sales-settlement-search-field input::placeholder {
  color: #94a3b8;
  font-weight: 650;
}

@media (max-width: 900px) {
  .sale-report-finance-shortcuts {
    justify-content: stretch;
    margin-bottom: 10px;
  }

  .sale-report-finance-shortcuts > span {
    display: none;
  }

  .sale-report-finance-shortcuts button {
    flex: 1 1 0;
    min-width: 0;
    min-height: 40px;
  }

  .sold-detail-return-bar {
    justify-content: stretch;
  }

  .sold-detail-return-bar button {
    width: 100%;
    min-height: 42px;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-wallet-settlement-filters > .sales-settlement-search-field {
    grid-column: 1 / -1 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-search-field input {
    min-height: 40px !important;
    font-size: 16px !important;
  }
}

/* Agency reconciliation filters: two compact columns on phones, with status full width. */
.page[data-panel="owner-agency-report"].active .owner-agency-search-field {
  flex: 0 1 200px;
  width: min(200px, 100%);
  min-width: min(180px, 100%);
  max-width: 200px;
}

.page[data-panel="owner-agency-report"].active .owner-agency-search-field input {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #c4d0df;
  border-radius: 8px;
  background: #fff;
  color: #071225;
  font-size: 14px;
  font-weight: 750;
  outline: none;
}

.page[data-panel="owner-agency-report"].active .owner-agency-search-field input:focus {
  border-color: #c98b21;
  box-shadow: 0 0 0 3px rgba(201, 139, 33, .14);
}

.page[data-panel="owner-agency-report"].active .owner-agency-search-field input::placeholder {
  color: #94a3b8;
  font-weight: 650;
}

@media (max-width: 900px) {
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-agency-report"].active .owner-fuel-toolbar {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    align-items: end !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-agency-report"].active .owner-fuel-toolbar > label {
    width: 100% !important;
    min-width: 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-agency-report"].active .owner-fuel-toolbar > label:last-child {
    grid-column: 1 / -1 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-agency-report"].active .owner-agency-search-field {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-agency-report"].active .owner-agency-search-field input {
    min-height: 40px !important;
    font-size: 16px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-agency-report"].active .owner-fuel-toolbar select {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-agency-report"].active .agency-transfer-date-notice {
    align-items: flex-start !important;
    gap: 10px !important;
    padding: 12px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-agency-report"].active .agency-transfer-date-notice b {
    font-size: 13px !important;
  }
}

/* Kept inactive; the final mobile settlement override lives at the end of this file. */
@media (max-width: 0px) {
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr {
    min-height: 148px !important;
    gap: 5px !important;
    padding: 10px 10px 44px !important;
    border-color: #dedbd5 !important;
    border-radius: 12px !important;
    background:
      linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(249, 247, 242, .96)) !important;
    box-shadow: 0 4px 12px rgba(28, 36, 48, .07) !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(1),
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(n+5) {
    display: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(2),
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(3),
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(4) {
    display: grid !important;
    grid-column: 1 / -1 !important;
    gap: 2px !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    font-size: 12px !important;
    font-weight: 850 !important;
    line-height: 1.25 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(2)::before {
    content: "過戶日期" !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(3)::before {
    content: "買方" !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(4)::before {
    content: "業務" !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td::before {
    color: #777064 !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    line-height: 1.1 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(2) {
    color: #172033 !important;
    font-size: 13px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(3) > strong {
    display: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(3) > small {
    display: block !important;
    overflow: hidden !important;
    color: #172033 !important;
    font-size: 12px !important;
    font-weight: 850 !important;
    line-height: 1.25 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-buyer-prefix {
    display: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table .sales-settlement-details-button {
    position: absolute !important;
    right: 10px !important;
    bottom: 9px !important;
    left: 10px !important;
    width: auto !important;
    min-height: 29px !important;
    margin: 0 !important;
    padding: 4px 7px !important;
    border-radius: 8px !important;
    font-size: 11px !important;
    line-height: 1 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr.owner-fuel-empty {
    grid-column: 1 / -1 !important;
    min-height: 64px !important;
    padding: 18px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr.owner-fuel-empty > td[colspan] {
    display: block !important;
    padding: 0 !important;
    text-align: center !important;
  }
}

/* Staff commission summary always uses two rows of three cards. */
.page[data-panel="owner-staff-commission-report"] .owner-staff-commission-sheet .owner-staff-commission-summary {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  grid-auto-flow: row !important;
  grid-auto-columns: auto !important;
  overflow-x: visible !important;
}

html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-staff-commission-report"].active .owner-staff-commission-sheet .owner-staff-commission-summary {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  grid-auto-flow: row !important;
  grid-auto-columns: auto !important;
  overflow-x: visible !important;
}

.page[data-panel="owner-staff-commission-report"] .owner-staff-commission-sheet .owner-staff-commission-summary > article {
  min-width: 0 !important;
}

/* Keep the employee commission table's horizontal movement inside its own scroller. */
.page[data-panel="owner-staff-commission-report"],
.page[data-panel="owner-staff-commission-report"] .owner-staff-commission-sheet {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

.page[data-panel="owner-staff-commission-report"] .owner-staff-commission-sheet > .owner-repair-table-wrap {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  contain: inline-size;
}

@media (max-width: 900px) {
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-staff-commission-report"].active .owner-staff-commission-sheet .owner-staff-commission-summary > article:nth-child(3n) {
    border-right: 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-staff-commission-report"].active .owner-staff-commission-sheet .owner-staff-commission-summary > article:nth-child(-n + 3) {
    border-bottom: 1px solid #dce3ec !important;
  }
}

/* Authoritative mobile business-settlement card/detail layout. Keep at EOF. */
.sales-settlement-detail-mobile-tabs {
  display: none;
}

@media (max-width: 900px) {
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr:not(.owner-fuel-empty) {
    min-height: 0 !important;
    align-content: start !important;
    gap: 4px !important;
    padding: 10px !important;
    cursor: pointer !important;
    touch-action: manipulation;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr:not(.owner-fuel-empty):active {
    transform: scale(.985);
    border-color: #c58a27 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(2) {
    position: static !important;
    z-index: auto !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-date-value,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-mobile-plate,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(3),
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(4) {
    position: relative !important;
    z-index: 1 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-mobile-photo {
    z-index: 0 !important;
    inset: 0 !important;
    border-radius: 11px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table .sales-settlement-details-button {
    display: none !important;
  }
}

@media (max-width: 560px) {
  .sales-settlement-detail-dialog > section {
    display: grid;
    height: 100dvh;
    min-height: 100dvh;
    max-height: 100dvh;
    grid-template-rows: auto auto minmax(0, 1fr);
    overflow: hidden;
  }

  .sales-settlement-detail-dialog > section > header {
    position: relative;
    z-index: 3;
  }

  .sales-settlement-detail-dialog header small {
    display: block;
    max-width: 280px;
    overflow: hidden;
    font-size: 10px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sales-settlement-detail-mobile-tabs {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 8px 10px;
    border-bottom: 1px solid #e5d8c4;
    background: #fffaf1;
  }

  .sales-settlement-detail-mobile-tabs button {
    min-height: 39px;
    border: 1px solid #d9c5a3;
    border-radius: 9px;
    color: #675b49;
    background: #fff;
    font-size: 13px;
    font-weight: 900;
  }

  .sales-settlement-detail-mobile-tabs button.active {
    border-color: #b87a19;
    color: #fff;
    background: linear-gradient(135deg, #d7a13b, #a76813);
    box-shadow: 0 4px 10px rgba(147, 91, 17, .18);
  }

  .sales-settlement-detail-dialog [data-sales-settlement-detail-panel] {
    min-width: 0;
    min-height: 0;
  }

  .sales-settlement-detail-dialog [data-sales-settlement-detail-panel]:not(.active) {
    display: none !important;
  }

  .sales-settlement-detail-reports.active {
    display: block !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding: 10px 10px calc(20px + env(safe-area-inset-bottom)) !important;
  }

  .sales-settlement-detail-dialog > section > footer.active {
    display: grid !important;
    grid-template-columns: 1fr !important;
    align-content: start;
    gap: 8px !important;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 10px 10px calc(18px + env(safe-area-inset-bottom)) !important;
    border-top: 0;
  }
}

/* Mobile business settlement: the whole compact vehicle card opens details. */
.sales-settlement-detail-mobile-tabs {
  display: none;
}

@media (max-width: 900px) {
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr:not(.owner-fuel-empty) {
    min-height: 0 !important;
    align-content: start !important;
    gap: 4px !important;
    padding: 10px !important;
    cursor: pointer !important;
    touch-action: manipulation;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr:not(.owner-fuel-empty):active {
    transform: scale(.985);
    border-color: #c58a27 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(2) {
    position: static !important;
    z-index: auto !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-date-value,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-mobile-plate,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(3),
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(4) {
    position: relative !important;
    z-index: 1 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-mobile-photo {
    z-index: 0 !important;
    inset: 0 !important;
    border-radius: 11px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table .sales-settlement-details-button {
    display: none !important;
  }
}

@media (max-width: 560px) {
  .sales-settlement-detail-dialog > section {
    display: grid;
    height: 100dvh;
    min-height: 100dvh;
    max-height: 100dvh;
    grid-template-rows: auto auto minmax(0, 1fr);
    overflow: hidden;
  }

  .sales-settlement-detail-dialog > section > header {
    position: relative;
    z-index: 3;
  }

  .sales-settlement-detail-dialog header small {
    display: block;
    max-width: 280px;
    overflow: hidden;
    font-size: 10px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sales-settlement-detail-mobile-tabs {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 8px 10px;
    border-bottom: 1px solid #e5d8c4;
    background: #fffaf1;
  }

  .sales-settlement-detail-mobile-tabs button {
    min-height: 39px;
    border: 1px solid #d9c5a3;
    border-radius: 9px;
    color: #675b49;
    background: #fff;
    font-size: 13px;
    font-weight: 900;
  }

  .sales-settlement-detail-mobile-tabs button.active {
    border-color: #b87a19;
    color: #fff;
    background: linear-gradient(135deg, #d7a13b, #a76813);
    box-shadow: 0 4px 10px rgba(147, 91, 17, .18);
  }

  .sales-settlement-detail-dialog [data-sales-settlement-detail-panel] {
    min-width: 0;
    min-height: 0;
  }

  .sales-settlement-detail-dialog [data-sales-settlement-detail-panel]:not(.active) {
    display: none !important;
  }

  .sales-settlement-detail-reports.active {
    display: block !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding: 10px 10px calc(20px + env(safe-area-inset-bottom)) !important;
  }

  .sales-settlement-detail-dialog > section > footer.active {
    display: grid !important;
    grid-template-columns: 1fr !important;
    align-content: start;
    gap: 8px !important;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 10px 10px calc(18px + env(safe-area-inset-bottom)) !important;
    border-top: 0;
  }
}

/* Inactive earlier copy; the authoritative settlement rules are at the end of this file. */
@media (max-width: 0px) {
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-wallet-settlement-filters {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: end !important;
    gap: 8px !important;
    padding: 10px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-wallet-settlement-filters > label {
    display: grid !important;
    gap: 4px !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-wallet-settlement-filters > label > span {
    font-size: 11px !important;
    line-height: 1.2 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-wallet-settlement-filters select {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 30px 0 10px !important;
    border-radius: 9px !important;
    font-size: 13px !important;
    line-height: 40px !important;
  }
}

/* Company profit reconciliation — compact phone dashboard.
   Reflow the existing report blocks only; desktop and report behaviour stay unchanged. */
@media (max-width: 900px) {
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active {
    padding: 7px 5px 92px !important;
    overflow-x: hidden !important;
    background: #f5f3ee !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active > .owner-reconcile-title-strip {
    display: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active > .content-card {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-overview-dashboard {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.03fr) !important;
    grid-template-areas:
      "profit-head profit-head"
      "profit-summary profit-summary"
      "profit-expense profit-loans"
      "profit-ranking profit-income"
      "profit-detail profit-detail" !important;
    gap: 7px !important;
    width: 100% !important;
    padding: 9px 7px 12px !important;
    overflow: hidden !important;
    border: 1px solid #e6e0d7 !important;
    border-radius: 0 !important;
    background: rgba(255, 255, 255, .97) !important;
    box-shadow: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-overview-header {
    grid-area: profit-head;
    display: grid !important;
    grid-template-columns: minmax(0, 2.1fr) minmax(64px, .9fr) minmax(64px, .9fr) !important;
    align-items: end !important;
    gap: 6px !important;
    padding: 2px 1px 7px !important;
    border-bottom: 1px solid #e8e2d9 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-overview-header > div:first-child {
    grid-column: 1 / -1 !important;
    min-width: 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-overview-header h2 {
    margin: 0 !important;
    color: #151515 !important;
    font-size: clamp(18px, 5.2vw, 23px) !important;
    font-weight: 950 !important;
    line-height: 1.12 !important;
    letter-spacing: -.035em !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-overview-header p {
    margin: 3px 0 0 !important;
    overflow: hidden !important;
    color: #716b63 !important;
    font-size: 9px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-header-actions {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1.25fr) minmax(54px, .68fr) repeat(2, minmax(62px, .78fr)) !important;
    align-items: end !important;
    gap: 5px !important;
    width: 100% !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .owner-profit-period-field {
    display: grid !important;
    grid-template-rows: auto 33px !important;
    gap: 2px !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .owner-profit-period-field > span {
    min-height: 11px !important;
    color: #5f5a54 !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .owner-profit-period-field:nth-child(2) > span {
    visibility: hidden !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .owner-profit-period-field select,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-header-actions button {
    width: 100% !important;
    min-width: 0 !important;
    height: 33px !important;
    min-height: 33px !important;
    margin: 0 !important;
    padding: 0 7px !important;
    border-radius: 7px !important;
    font-size: 9.5px !important;
    line-height: 33px !important;
    white-space: nowrap !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .owner-profit-period-field select {
    border: 1px solid #ddd9d2 !important;
    background-color: #fff !important;
    color: #26221d !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-header-actions button[data-owner-profit-settings-open] {
    border-color: #cba766 !important;
    background: #fffaf0 !important;
    color: #8a5c13 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-header-actions button[data-owner-profit-save-month] {
    border-color: #171717 !important;
    background: #171717 !important;
    color: #fff !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-header-actions button:disabled {
    opacity: 1 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-summary-cards {
    grid-area: profit-summary;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-summary-card {
    display: grid !important;
    grid-template-columns: 23px minmax(0, 1fr) !important;
    align-content: start !important;
    align-items: center !important;
    gap: 4px !important;
    min-width: 0 !important;
    min-height: 92px !important;
    padding: 8px 6px 7px !important;
    overflow: hidden !important;
    border-color: #eee9e2 !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 7px rgba(49, 39, 25, .035) !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-summary-icon {
    width: 23px !important;
    height: 23px !important;
    font-size: 12px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-summary-card > div {
    min-width: 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-summary-card small {
    overflow: hidden !important;
    font-size: 9.5px !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-summary-card strong {
    margin-top: 12px !important;
    font-size: clamp(14px, 4vw, 18px) !important;
    line-height: 1 !important;
    letter-spacing: -.035em !important;
    white-space: nowrap !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-summary-card em {
    margin-top: 12px !important;
    overflow: hidden !important;
    font-size: 8px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-dashboard-grid,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-bottom-grid {
    display: contents !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-expense-structure { grid-area: profit-expense; }
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-loan-overview { grid-area: profit-loans; }
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-income-ranking { grid-area: profit-ranking; }
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-income-table-card { grid-area: profit-income; }
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-detail-table-card { grid-area: profit-detail; }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-panel {
    min-width: 0 !important;
    padding: 9px 8px !important;
    overflow: hidden !important;
    border-color: #e8e3dc !important;
    border-radius: 8px !important;
    background: #fff !important;
    box-shadow: 0 2px 8px rgba(43, 34, 22, .035) !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-panel h3 {
    padding: 0 !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-panel > header {
    min-height: 18px !important;
    margin: 0 0 7px !important;
    padding: 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-panel > header button {
    min-height: 20px !important;
    padding: 0 3px !important;
    font-size: 8px !important;
    white-space: nowrap !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-donut-wrap {
    display: grid !important;
    grid-template-columns: 72px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 5px !important;
    margin-top: 8px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-donut {
    width: 68px !important;
    height: 68px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-donut::after {
    inset: 18px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-donut strong {
    font-size: 7.5px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-donut span {
    margin-top: 1px !important;
    font-size: 10px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-expense-structure ul {
    gap: 4px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-expense-structure li {
    grid-template-columns: 7px minmax(0, 1fr) 25px 38px !important;
    gap: 3px !important;
    font-size: 7.5px !important;
    line-height: 1.15 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-loan-cards {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-loan-card {
    gap: 3px !important;
    min-width: 0 !important;
    padding: 6px 5px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-loan-card h4 {
    gap: 3px !important;
    overflow: hidden !important;
    font-size: 8.5px !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-loan-card h4 span {
    width: 16px !important;
    height: 16px !important;
    font-size: 7px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-loan-card dl {
    grid-template-columns: 30px minmax(0, 1fr) !important;
    gap: 2px 3px !important;
    margin-top: 2px !important;
    font-size: 7px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-loan-card i {
    height: 3px !important;
    margin-top: 2px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-income-ranking ol {
    gap: 6px !important;
    margin-top: 8px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-income-ranking li {
    grid-template-columns: 16px minmax(0, 1fr) 35px !important;
    grid-template-areas: "rank-no rank-name rank-value" "rank-no rank-bar rank-value" !important;
    gap: 2px 4px !important;
    font-size: 7.5px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-income-ranking li > b {
    grid-area: rank-no;
    width: 15px !important;
    height: 15px !important;
    font-size: 7px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-income-ranking li > span {
    grid-area: rank-name;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-income-ranking li > i {
    grid-area: rank-bar;
    height: 3px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-income-ranking li > strong {
    grid-area: rank-value;
    font-size: 7px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .owner-profit-table-head {
    display: flex !important;
    min-height: 21px !important;
    margin: 0 !important;
    padding: 0 0 6px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .owner-profit-table-head h3 {
    min-width: 0 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .owner-profit-table-actions {
    display: flex !important;
    flex: 0 0 auto !important;
    gap: 3px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .owner-profit-table-head button,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .owner-profit-row-delete {
    width: auto !important;
    min-width: 0 !important;
    min-height: 20px !important;
    padding: 0 4px !important;
    font-size: 7.5px !important;
    line-height: 20px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-table-scroll {
    width: 100% !important;
    overflow-x: auto !important;
    border: 1px solid #ece7e0 !important;
    border-radius: 5px !important;
    scrollbar-width: thin !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-income-table-card table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-income-table-card th:nth-child(1) { width: 48% !important; }
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-income-table-card th:nth-child(2) { width: 29% !important; }
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-income-table-card th:nth-child(3) { width: 23% !important; }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-detail-table-card table {
    min-width: 700px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-detail-table-card th,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-detail-table-card td,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-income-table-card th,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-income-table-card td {
    height: 23px !important;
    min-height: 23px !important;
    padding: 3px 4px !important;
    overflow: hidden !important;
    font-size: 7.5px !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-detail-table-card thead,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-income-table-card thead {
    background: #111 !important;
    color: #fff !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-detail-table-card tfoot td,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-income-table-card tfoot td {
    height: 25px !important;
    padding: 4px !important;
    color: #b91c1c !important;
    font-size: 9px !important;
    font-weight: 950 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .owner-profit-fixed-pill,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .owner-profit-row-detail {
    min-height: 16px !important;
    padding: 0 3px !important;
    font-size: 6.5px !important;
    line-height: 16px !important;
    white-space: nowrap !important;
  }
}

/* Business settlement / bonus wallet switch and all-member wallet browser. */
.sales-wallet-view-switch {
  display: inline-flex;
  gap: 4px;
  width: fit-content;
  padding: 4px;
  border: 1px solid #ead8ba;
  border-radius: 12px;
  background: #fffaf1;
}

.sales-wallet-view-switch button {
  min-width: 132px;
  min-height: 40px;
  padding: 8px 18px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #715b39;
  font-weight: 900;
}

.sales-wallet-view-switch button.active {
  background: linear-gradient(135deg, #d7a13a, #b97718);
  color: #fff;
  box-shadow: 0 5px 14px rgba(160, 101, 17, 0.22);
}

.sales-wallet-admin {
  display: grid;
  gap: 14px;
}

.sales-wallet-settlement-filters {
  width: 100%;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid #e6dccd;
  border-radius: 12px;
  background: #f8fafc;
}

.sales-wallet-loading,
.sales-wallet-empty {
  padding: 38px 20px;
  color: #7d705c;
  text-align: center;
}

.sales-wallet-overview,
.sales-wallet-person-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.sales-wallet-overview article,
.sales-wallet-person-stats article {
  display: grid;
  gap: 5px;
  min-height: 104px;
  padding: 17px 19px;
  border: 1px solid #eadcc5;
  border-radius: 14px;
  background: linear-gradient(145deg, #fffdf9, #fff6e6);
  box-shadow: 0 8px 22px rgba(71, 48, 15, 0.06);
}

.sales-wallet-overview article span,
.sales-wallet-person-stats article span,
.sales-wallet-overview article small {
  color: #79694f;
}

.sales-wallet-overview article strong,
.sales-wallet-person-stats article strong {
  color: #14213a;
  font-size: 25px;
}

.sales-wallet-ranking,
.sales-wallet-records {
  overflow: hidden;
  border: 1px solid #e4d8c7;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(54, 42, 25, 0.05);
}

.sales-wallet-ranking > header,
.sales-wallet-records > header,
.sales-wallet-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 19px;
  border-bottom: 1px solid #eee4d6;
  background: #fffaf1;
}

.sales-wallet-ranking h2,
.sales-wallet-ranking p,
.sales-wallet-records h2,
.sales-wallet-records p,
.sales-wallet-selected-person h2 {
  margin: 0;
}

.sales-wallet-ranking p,
.sales-wallet-records p {
  margin-top: 4px;
  color: #7b6d5a;
  font-size: 12px;
}

.sales-wallet-ranking > header > span,
.sales-wallet-records > header > span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff0cc;
  color: #986313;
  font-weight: 900;
}

.sales-wallet-member-list {
  display: grid;
}

.sales-wallet-member {
  display: grid;
  grid-template-columns: 44px 52px minmax(160px, 1fr) minmax(150px, auto) 24px;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 82px;
  padding: 13px 19px;
  border: 0;
  border-bottom: 1px solid #eee7dc;
  background: #fff;
  color: #14213a;
  text-align: left;
}

.sales-wallet-member:last-child {
  border-bottom: 0;
}

.sales-wallet-member:hover {
  background: #fffaf2;
}

.sales-wallet-rank {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f3f4f6;
  color: #657085;
  font-weight: 900;
}

.sales-wallet-member:nth-child(1) .sales-wallet-rank,
.sales-wallet-member:nth-child(2) .sales-wallet-rank,
.sales-wallet-member:nth-child(3) .sales-wallet-rank {
  background: #c28a27;
  color: #fff;
}

.sales-wallet-avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #f4e4c5;
  color: #925f14;
  box-shadow: 0 0 0 1px #e7d7ba;
  font-weight: 900;
}

.sales-wallet-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sales-wallet-member-info,
.sales-wallet-member-balance {
  display: grid;
  gap: 4px;
}

.sales-wallet-member-info strong {
  font-size: 16px;
}

.sales-wallet-member-info small,
.sales-wallet-member-balance small,
.sales-wallet-selected-person span,
.sales-wallet-selected-balance span {
  color: #7c7180;
  font-size: 12px;
}

.sales-wallet-member-balance {
  justify-items: end;
}

.sales-wallet-member-balance strong,
.sales-wallet-selected-balance strong {
  color: #a9680b;
  font-size: 21px;
}

.sales-wallet-chevron {
  color: #b57a22;
  font-size: 28px;
}

.sales-wallet-back {
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid #d8b36d;
  border-radius: 9px;
  background: #fff;
  color: #8a5b15;
  font-weight: 900;
}

.sales-wallet-selected-person {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
}

.sales-wallet-selected-balance {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.sales-wallet-person-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sales-wallet-person-stats article {
  min-height: 84px;
}

.sales-wallet-table {
  min-width: 860px;
}

.sales-wallet-table td > small {
  display: block;
  margin-top: 4px;
  color: #827768;
}

.sales-wallet-type,
.sales-wallet-credit {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eaf3ff;
  color: #2869a9;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.sales-wallet-type.mentor {
  background: #f1ebff;
  color: #7049a8;
}

.sales-wallet-credit.wallet {
  background: #e7f7ee;
  color: #117244;
}

.sales-wallet-credit.cash {
  background: #fff0e5;
  color: #b0520b;
}

.sales-wallet-amount {
  color: #087443;
}

@media (max-width: 900px) {
  .sales-wallet-view-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .sales-wallet-view-switch button {
    min-width: 0;
  }

  .sales-wallet-overview {
    grid-template-columns: 1fr;
  }

  .sales-wallet-person-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sales-wallet-member {
    grid-template-columns: 32px 44px minmax(0, 1fr) 18px;
    gap: 9px;
    padding: 12px 10px;
  }

  .sales-wallet-avatar {
    width: 42px;
    height: 42px;
  }

  .sales-wallet-member-balance {
    grid-column: 3;
    justify-items: start;
  }

  .sales-wallet-chevron {
    grid-column: 4;
    grid-row: 1 / span 2;
  }

  .sales-wallet-heading {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .sales-wallet-back {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

/* Agency-fee settlement: persistent batches without a prepaid balance. */
.agency-settlement-overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(196, 154, 73, 0.38);
  border-radius: 12px;
  background: linear-gradient(135deg, #fffaf0 0%, #ffffff 72%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.agency-settlement-metric {
  display: grid;
  gap: 2px;
}

.agency-settlement-metric small,
.agency-settlement-metric span {
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.agency-settlement-metric strong {
  color: #9a6517;
  font-size: 28px;
  font-weight: 950;
  line-height: 1.15;
}

.agency-settlement-metric strong em {
  font-size: 13px;
  font-style: normal;
}

.agency-settlement-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.agency-settlement-actions button {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid rgba(183, 114, 22, 0.34);
  border-radius: 9px;
  background: #fff;
  color: #7a4b08;
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
}

.agency-settlement-actions button.active,
.agency-settlement-actions button.primary {
  border-color: #111827;
  background: #111827;
  color: #fff;
}

.agency-settlement-actions button.primary {
  border-color: #c88920;
  background: linear-gradient(135deg, #efc66a, #bd7c17);
  color: #111827;
}

.agency-settlement-actions button.danger,
.agency-checkout-dialog .agency-batch-restore-button {
  border-color: #dc2626;
  background: #fff7f7;
  color: #b91c1c;
}

.agency-settlement-actions button.danger:hover,
.agency-checkout-dialog .agency-batch-restore-button:hover {
  background: #fee2e2;
  color: #991b1b;
}

.agency-settlement-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.agency-transfer-date-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  border: 1px solid #efc46e;
  border-radius: 12px;
  background: #fff9e9;
  color: #7a4b08;
}

.agency-transfer-date-notice > div {
  display: grid;
  gap: 3px;
}

.agency-transfer-date-notice strong,
.agency-transfer-date-notice b {
  color: #a85d00;
  font-weight: 950;
}

.agency-transfer-date-notice span {
  font-size: 12px;
  font-weight: 750;
}

.agency-transfer-date-notice b {
  white-space: nowrap;
  font-size: 16px;
}

.agency-report-table:not(.agency-report-table-selecting) tbody tr.agency-row-date-pending td:first-child,
.agency-report-table-selecting tbody tr.agency-row-date-pending td:nth-child(2) {
  color: #b45309;
  font-weight: 950;
}

.agency-selection-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 10px 13px;
  border: 1px solid #e5b956;
  border-radius: 10px;
  background: #fff9e9;
  color: #7a4b08;
}

.agency-selection-summary strong,
.agency-selection-summary b {
  font-weight: 950;
}

.agency-selection-summary span {
  font-size: 13px;
  font-weight: 800;
}

.agency-report-table .agency-selection-cell {
  width: 52px;
  min-width: 52px;
  padding-right: 8px;
  padding-left: 8px;
  text-align: center;
}

.agency-table-check {
  display: inline-grid;
  width: 28px;
  height: 28px;
  margin: 0;
  place-items: center;
  cursor: pointer;
}

.agency-table-check input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.agency-table-check > span[aria-hidden="true"] {
  display: grid;
  width: 20px;
  height: 20px;
  border: 2px solid #b7c0cc;
  border-radius: 6px;
  background: #fff;
  place-items: center;
  transition: 0.16s ease;
}

.agency-table-check > span[aria-hidden="true"]::after {
  width: 9px;
  height: 5px;
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  content: "";
  opacity: 0;
  transform: rotate(-45deg) translateY(-1px);
}

.agency-table-check input:checked + span[aria-hidden="true"],
.agency-table-check input:indeterminate + span[aria-hidden="true"] {
  border-color: #c88920;
  background: #c88920;
  box-shadow: 0 0 0 3px rgba(200, 137, 32, 0.14);
}

.agency-table-check input:checked + span[aria-hidden="true"]::after {
  opacity: 1;
}

.agency-table-check input:indeterminate + span[aria-hidden="true"]::after {
  width: 9px;
  height: 0;
  border-bottom: 2px solid #fff;
  border-left: 0;
  opacity: 1;
  transform: none;
}

.agency-table-check input:focus-visible + span[aria-hidden="true"] {
  outline: 3px solid rgba(37, 99, 235, 0.25);
  outline-offset: 2px;
}

.agency-table-check .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.agency-selection-unavailable {
  color: #a7b0bd;
  font-weight: 900;
}

.agency-report-table tbody tr.agency-row-selected,
.agency-report-table tbody tr.agency-row-selected.agency-row-settled {
  background: #fff5d8;
  box-shadow: inset 4px 0 0 #d59a2a;
}

.agency-settlement-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
}

.agency-settlement-status-pill.pending {
  background: #fff4dd;
  color: #a16207;
}

.agency-settlement-status-pill.settled {
  background: #dcfce7;
  color: #047857;
}

.agency-report-table tbody tr.agency-row-settled {
  background: #f8fafc;
  color: #64748b;
}

.agency-settlement-history {
  padding: 16px;
}

.agency-settlement-history .owner-accounting-checkout-list button {
  border-color: rgba(196, 154, 73, 0.28);
  background: #fffaf0;
}

.agency-settlement-history .owner-accounting-checkout-list button:hover {
  border-color: #d8a340;
  background: #fff6df;
}

.agency-settlement-empty {
  margin: 0;
  padding: 42px 18px;
  color: #64748b;
  font-size: 14px;
  font-weight: 850;
  text-align: center;
}

.agency-checkout-dialog,
.agency-batch-dialog {
  width: min(1180px, calc(100vw - 32px));
}

.agency-checkout-table,
.agency-batch-table {
  min-width: 900px;
}

.agency-batch-dialog .agency-batch-restore-button {
  border-color: #efb4b4;
  background: #fff5f5;
  color: #b42318;
  font-weight: 950;
}

.agency-batch-dialog .agency-batch-restore-button:hover {
  border-color: #dc2626;
  background: #fee2e2;
  color: #991b1b;
}

@media (max-width: 900px) {
  .agency-settlement-overview {
    display: grid;
    gap: 12px;
    padding: 14px;
  }

  .agency-settlement-metric strong {
    font-size: clamp(24px, 8vw, 32px);
  }

  .agency-settlement-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .agency-settlement-actions button {
    width: 100%;
    min-height: 42px;
    padding: 0 8px;
    font-size: 12px;
  }

  .agency-settlement-actions button.primary {
    grid-column: 1 / -1;
  }

  .agency-settlement-actions button.primary[data-owner-agency-checkout-open] {
    grid-column: auto;
  }

  .agency-selection-summary {
    display: grid;
    gap: 3px;
  }

  .agency-checkout-dialog,
  .agency-batch-dialog {
    width: calc(100vw - 14px);
    max-height: calc(100dvh - 14px);
  }

  .agency-checkout-dialog .owner-repair-payment-table-wrap,
  .agency-batch-dialog .owner-repair-payment-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .agency-batch-dialog footer,
  .agency-batch-dialog .owner-accounting-checkout-submit-actions {
    align-items: stretch;
  }

  .agency-batch-dialog .owner-accounting-checkout-submit-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

/* Remittance reconciliation: mobile card dashboard and record detail dialog. */
.owner-remittance-mobile-records {
  display: none;
}

.owner-remittance-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 30000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(2px);
}

/* The shared confirmation dialog lives in .modal-layer. Raise that layer only
   while confirming an action from the remittance detail overlay, so the
   confirmation card and its backdrop stay above the open detail dialog. */
body:has(.owner-remittance-detail-overlay) .modal-layer:has([data-action-dialog]:not([hidden])) {
  z-index: 40000 !important;
}

/* Keep the restore confirmation above the agency settlement batch dialog.
   Without this, the shared confirmation layer opens behind the batch overlay
   and makes the restore button appear unresponsive. */
body:has(.agency-batch-overlay) .modal-layer:has([data-action-dialog]:not([hidden])) {
  z-index: 40000 !important;
}

.owner-remittance-detail-dialog {
  display: flex;
  width: min(430px, calc(100vw - 36px));
  max-height: min(760px, calc(100dvh - 36px));
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.94);
  border-radius: 18px;
  background: #f8fafc;
  color: #0f172a;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
}

.owner-remittance-detail-dialog > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 12px;
}

.owner-remittance-detail-dialog > header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 950;
}

.owner-remittance-detail-dialog > header button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #eef2f7;
  color: #0f172a;
  font-size: 27px;
  line-height: 1;
  cursor: pointer;
}

.owner-remittance-detail-body {
  display: grid;
  gap: 4px;
  padding: 0 18px 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.owner-remittance-detail-body > div {
  display: grid;
  min-height: 42px;
  grid-template-columns: minmax(90px, 0.8fr) minmax(0, 1.6fr);
  align-items: center;
  gap: 12px;
  padding: 7px 10px;
  border: 1px solid rgba(226, 232, 240, 0.82);
  border-radius: 7px;
  background: #fff;
}

.owner-remittance-detail-body span {
  color: #334155;
  font-size: 13px;
  font-weight: 900;
}

.owner-remittance-detail-body strong {
  min-width: 0;
  color: #1e293b;
  font-size: 14px;
  font-weight: 850;
  text-align: right;
  overflow-wrap: anywhere;
}

.owner-remittance-detail-body .tone-money strong {
  color: #ad7615;
  font-size: 15px;
}

.owner-remittance-detail-dialog > footer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  padding: 12px 18px 18px;
}

.owner-remittance-detail-dialog > footer button {
  min-width: 0;
  min-height: 44px;
  padding: 0 8px;
  border: 1px solid rgba(194, 126, 45, 0.32);
  border-radius: 9px;
  background: #fff3e8;
  color: #8a4b17;
  font-size: 13px;
  font-weight: 950;
  white-space: nowrap;
  cursor: pointer;
}

.owner-remittance-detail-dialog > footer .detail-delete {
  border-color: rgba(220, 38, 38, 0.22);
  background: #fee2e2;
  color: #b91c1c;
}

.owner-remittance-detail-dialog > footer .detail-complete {
  border-color: #c38a22;
  background: linear-gradient(180deg, #d79d32, #b77711);
  color: #fff;
}

.owner-remittance-detail-dialog > footer button:disabled {
  opacity: 0.58;
  cursor: default;
}

@media (max-width: 900px) {
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-remittance-report"].active {
    padding-right: 8px !important;
    padding-left: 8px !important;
    background: #f8f9fb !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-remittance-report"].active > .owner-reconcile-title-strip {
    margin-bottom: 7px !important;
    padding: 8px 4px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-remittance-report"].active > .owner-reconcile-title-strip h1 {
    font-size: 25px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-remittance-report"].active .owner-remittance-title-actions button {
    min-height: 34px !important;
    padding: 0 11px !important;
    border: 1px solid #475569 !important;
    border-radius: 7px !important;
    background: #fff !important;
    color: #1e293b !important;
    font-size: 11px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-remittance-report"].active > .owner-fuel-card {
    padding: 8px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-remittance-report"].active .owner-fuel-toolbar {
    display: grid !important;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 0.72fr) minmax(0, 1.2fr) 58px !important;
    align-items: end !important;
    gap: 6px !important;
    padding: 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-remittance-report"].active .owner-fuel-toolbar > label {
    min-width: 0 !important;
    gap: 4px !important;
    font-size: 10px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-remittance-report"].active .owner-fuel-toolbar select {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 40px !important;
    padding-right: 17px !important;
    padding-left: 7px !important;
    border-radius: 7px !important;
    font-size: 10px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-remittance-report"].active .owner-remittance-filter-button {
    width: 58px !important;
    min-width: 58px !important;
    min-height: 40px !important;
    padding: 0 5px !important;
    border: 0 !important;
    border-radius: 7px !important;
    background: linear-gradient(180deg, #d99d30, #ad6f0b) !important;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 950 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-remittance-report"].active .owner-remittance-report-shell {
    gap: 10px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-remittance-report"].active .agency-summary-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 0 !important;
    overflow: hidden !important;
    border: 1px solid #d9dee7 !important;
    border-radius: 8px !important;
    background: #fff !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-remittance-report"].active .agency-summary-grid article {
    display: grid !important;
    position: relative !important;
    min-height: 78px !important;
    place-items: center !important;
    align-content: center !important;
    gap: 2px !important;
    padding: 5px 3px !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    text-align: center !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-remittance-report"].active .agency-summary-grid article:last-child {
    border-right: 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-remittance-report"].active .agency-summary-grid article:not(:last-child)::after {
    content: "" !important;
    position: absolute !important;
    top: 9px !important;
    right: 0 !important;
    bottom: 9px !important;
    width: 1px !important;
    background: #e2e8f0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-remittance-report"].active .agency-summary-icon {
    display: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-remittance-report"].active .agency-summary-grid article > div {
    min-width: 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-remittance-report"].active .agency-summary-grid small {
    display: block !important;
    min-height: 17px !important;
    color: #475569 !important;
    font-size: 8.5px !important;
    line-height: 1.15 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-remittance-report"].active .agency-summary-grid strong {
    display: block !important;
    overflow: hidden !important;
    color: #0f172a !important;
    font-size: clamp(13px, 3.7vw, 16px) !important;
    line-height: 1.15 !important;
    letter-spacing: -0.035em !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-remittance-report"].active .agency-summary-grid em {
    display: block !important;
    margin-top: 1px !important;
    color: #475569 !important;
    font-size: 8.5px !important;
    line-height: 1.2 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-remittance-report"].active .owner-remittance-mobile-records {
    display: block !important;
    min-width: 0 !important;
  }

  .owner-remittance-mobile-records > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
  }

  .owner-remittance-mobile-records > header h2 {
    margin: 0;
    color: #1e293b;
    font-size: 13px;
    font-weight: 950;
    white-space: nowrap;
  }

  .owner-remittance-mobile-records > header > div {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .owner-remittance-mobile-records > header select {
    flex: 0 0 96px !important;
    width: 96px !important;
    min-width: 96px !important;
    min-height: 32px !important;
    padding: 0 18px 0 7px !important;
    border: 1px solid #d7dde6 !important;
    border-radius: 7px !important;
    background: #fff !important;
    color: #334155 !important;
    font-size: 10px !important;
    font-weight: 850 !important;
    white-space: nowrap !important;
  }

  .owner-remittance-mobile-records > header button {
    display: inline-grid !important;
    place-items: center !important;
    width: 34px !important;
    min-width: 34px !important;
    min-height: 32px !important;
    padding: 0 !important;
    border: 1px solid #d7dde6 !important;
    border-radius: 8px !important;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    color: #64748b !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  }

  .owner-remittance-mobile-records > header button svg {
    width: 16px !important;
    height: 16px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.8 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
  }

  .owner-remittance-mobile-records > header button.active {
    border-color: #111c33 !important;
    background: linear-gradient(180deg, #17233a 0%, #101a2e 100%) !important;
    color: #fff !important;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.2) !important;
  }

  .owner-remittance-mobile-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .owner-remittance-mobile-card-grid.view-list {
    grid-template-columns: 1fr;
  }

  .owner-remittance-mobile-card {
    position: relative !important;
    display: grid !important;
    overflow: hidden !important;
    min-width: 0 !important;
    min-height: 116px !important;
    align-content: start !important;
    gap: 2px !important;
    padding: 11px 12px !important;
    border: 1px solid #d6dbe3 !important;
    border-radius: 10px !important;
    background: linear-gradient(145deg, #fff 0%, #f1f1f2 100%) !important;
    color: #111827 !important;
    text-align: left !important;
    box-shadow: none !important;
  }

  .owner-remittance-mobile-photo {
    position: absolute;
    z-index: 0;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.2;
    pointer-events: none;
    filter: saturate(0.8) contrast(0.9);
  }

  .owner-remittance-mobile-card > :not(.owner-remittance-mobile-photo) {
    position: relative;
    z-index: 1;
  }

  .owner-remittance-mobile-card > .owner-remittance-business-settlement {
    position: absolute;
    z-index: 2;
    top: 8px;
    right: 8px;
    display: inline-flex;
    width: auto;
    min-height: 22px;
    align-items: center;
    gap: 4px;
    padding: 3px 7px;
    border-radius: 7px;
    background: #fff4db;
    color: #bd7900;
    font-size: 10px;
    font-weight: 850;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(120, 83, 24, 0.08);
  }

  .owner-remittance-mobile-card > .owner-remittance-business-settlement i {
    display: inline-grid;
    width: 13px;
    height: 13px;
    place-items: center;
    border-radius: 50%;
    background: #ffbc2e;
    color: #fff;
    font-size: 8px;
    font-style: normal;
    font-weight: 950;
  }

  .owner-remittance-mobile-card > .owner-remittance-business-settlement.settled {
    background: #dcebdc;
    color: #467d57;
  }

  .owner-remittance-mobile-card > .owner-remittance-business-settlement.settled i {
    background: #5b9870;
  }

  .owner-remittance-mobile-card:active {
    transform: scale(0.99);
    background: #f7f4ed !important;
  }

  .owner-remittance-mobile-date {
    padding-right: 60px;
    color: #334155;
    font-size: 10px;
    font-weight: 850;
  }

  .owner-remittance-mobile-card > strong {
    overflow: hidden;
    color: #101827;
    font-size: 16px;
    line-height: 1.12;
    letter-spacing: 0.03em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .owner-remittance-mobile-card > small {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 5px;
    overflow: hidden;
    color: #475569;
    font-size: 9px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .owner-remittance-mobile-card > small i {
    display: inline-grid;
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    place-items: center;
    border-radius: 3px;
    background: #334155;
    color: #fff;
    font-size: 8px;
    font-style: normal;
    font-weight: 950;
  }

  .owner-remittance-mobile-card > b {
    margin-top: 3px;
    color: #a56f12;
    font-size: 17px;
    line-height: 1.1;
  }

  .owner-remittance-mobile-card > b em {
    margin-right: 2px;
    font-size: 15px;
    font-style: normal;
  }

  .owner-remittance-mobile-empty {
    grid-column: 1 / -1;
    margin: 0;
    padding: 28px 12px;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    color: #64748b;
    text-align: center;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-remittance-report"].active .agency-table-card {
    display: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-remittance-report"].active .agency-bottom-grid {
    display: block !important;
    margin: 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-remittance-report"].active .agency-bottom-grid .agency-total-card,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-remittance-report"].active .agency-bottom-grid .agency-note-card {
    display: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-remittance-report"].active .agency-bottom-grid .agency-note-card.is-mobile-note-visible {
    display: block !important;
    padding: 12px !important;
  }

  .owner-remittance-detail-overlay {
    align-items: center;
    padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
  }

  .owner-remittance-detail-dialog {
    width: min(410px, calc(100vw - 28px));
    max-height: min(720px, calc(100dvh - 28px));
    border-radius: 16px;
  }

  .owner-remittance-detail-dialog > header {
    padding: 15px 16px 10px;
  }

  .owner-remittance-detail-dialog > header h3 {
    font-size: 18px;
  }

  .owner-remittance-detail-body {
    gap: 3px;
    padding: 0 14px 8px;
  }

  .owner-remittance-detail-body > div {
    min-height: 39px;
    padding: 6px 9px;
  }

  .owner-remittance-detail-dialog > footer {
    gap: 7px;
    padding: 10px 14px 14px;
  }

  .owner-remittance-detail-dialog > footer button {
    min-height: 42px;
    padding: 0 5px;
    font-size: 11px;
  }
}

/* Mobile expense table failsafe: the live shell can briefly retain
   body.desktop-page, so do not depend on that body class for five-column fit. */
@media (max-width: 900px) {
  #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active :is(.owner-expense-detail-grid, .owner-expense-detail-card, .owner-expense-detail-table) {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-card {
    overflow: hidden !important;
  }

  #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-mobile-only {
    display: inline !important;
  }

  #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-desktop-only {
    display: none !important;
  }

  #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table,
  #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table :is(thead, tbody, tfoot) {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table thead tr,
  #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table tbody tr.owner-expense-data-row,
  #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-subtotal-row {
    display: grid !important;
    grid-template-columns: 0.88fr 1.25fr 0.95fr 1.5fr 1.18fr !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table :is(th, td) {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 7px 3px !important;
    border: 0 !important;
    border-right: 1px solid #dfe5ec !important;
    border-bottom: 1px solid #dfe5ec !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
    font-size: 9.5px !important;
    line-height: 1.3 !important;
    text-align: center !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table th {
    min-height: 40px !important;
    background: linear-gradient(180deg, #243149, #1b2639) !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    white-space: nowrap !important;
  }

  #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table tbody tr.owner-expense-data-row > td {
    min-height: 50px !important;
    background: #fff !important;
    color: #1e293b !important;
    font-weight: 800 !important;
  }

  #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table :is(th, td):nth-child(1) {
    display: none !important;
  }

  #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table :is(th, td):nth-child(4) { order: 1 !important; }
  #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table :is(th, td):nth-child(2) { order: 2 !important; }
  #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table :is(th, td):nth-child(3) { order: 3 !important; }
  #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table :is(th, td):nth-child(5) { order: 4 !important; }
  #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table :is(th, td):last-child {
    order: 5 !important;
    border-right: 0 !important;
  }

  #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table tbody tr.owner-expense-data-row > td::before,
  #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-empty-row {
    display: none !important;
    content: none !important;
  }

  #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-subtotal-row {
    background: #f6f7f9 !important;
  }

  #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-subtotal-row td:first-child {
    display: flex !important;
    grid-column: 1 / 3 !important;
    justify-content: flex-start !important;
    padding-left: 12px !important;
  }

  #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-subtotal-row td:nth-child(2) {
    display: flex !important;
    grid-column: 3 !important;
    color: #1e293b !important;
    font-weight: 950 !important;
  }

  #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-subtotal-row td:last-child {
    display: flex !important;
    grid-column: 4 / 6 !important;
  }

  #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-accounting-include-check {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 28px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    background: #e9e9e9 !important;
    color: #667085 !important;
  }

  #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-accounting-include-check::after {
    content: "使用會計金";
    font-size: 8px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
  }

  #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table .owner-accounting-include-check input[type="checkbox"] {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    opacity: 0 !important;
  }
}

/* Accounting cash report: purpose-built phone layout. */
.owner-accounting-mobile-value,
.owner-accounting-mobile-count,
.owner-accounting-mobile-title-meta,
.owner-accounting-mobile-view-tabs {
  display: none;
}

@media (max-width: 900px) {
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active {
    width: 100%;
    min-width: 0;
    padding: 8px 8px 94px;
    overflow-x: hidden;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-cash-page {
    display: grid;
    gap: 10px;
    width: 100%;
    min-width: 0;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-fuel-toolbar {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr) !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-summary-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100%;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-summary-grid > article {
    grid-column: auto !important;
    min-width: 0;
    min-height: 104px;
    padding: 11px !important;
    border-radius: 12px;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-summary-grid > article > strong {
    display: block;
    margin-top: 6px;
    font-size: clamp(17px, 5vw, 22px) !important;
    line-height: 1.15;
    white-space: nowrap;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-summary-grid > article > small {
    display: block;
    margin-top: 5px;
    font-size: 10px;
    line-height: 1.35;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-limit-card:first-child {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: static !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-limit-card:first-child > button {
    position: static !important;
    inset: auto !important;
    width: 100% !important;
    min-height: 30px !important;
    margin-top: auto !important;
    padding: 4px 8px !important;
    border-radius: 8px !important;
    font-size: 11px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-help-card {
    display: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-filter-row,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-filter-row--checkout {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: end !important;
    gap: 8px !important;
    width: 100%;
    padding: 10px !important;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-filter-row > span {
    display: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-filter-row > label {
    display: grid;
    gap: 4px;
    min-width: 0;
    font-size: 11px;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-filter-row .owner-accounting-search {
    grid-column: 1 / -1;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-filter-row :is(input, select, button) {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 40px !important;
    height: 40px !important;
    padding: 0 9px !important;
    border-radius: 9px !important;
    font-size: 12px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active :is(.owner-accounting-table-card, .owner-accounting-side) {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table-card {
    padding: 10px !important;
    overflow: hidden !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table-head {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    margin-bottom: 8px;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-head-actions {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-head-actions button {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 38px !important;
    padding: 5px 3px !important;
    border-radius: 9px !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    white-space: normal !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-repair-table-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: visible !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    border: 0;
    overflow: visible !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table thead {
    display: none;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table tbody {
    display: grid;
    gap: 8px;
    width: 100% !important;
    min-width: 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100% !important;
    min-width: 0 !important;
    padding: 7px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    background: #fff;
    overflow: hidden;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table tbody tr > td {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 3px;
    width: auto;
    min-width: 0;
    height: auto !important;
    min-height: 34px;
    padding: 6px 0 !important;
    border: 0;
    border-bottom: 1px solid #edf2f7;
    background: transparent !important;
    font-size: 12px !important;
    line-height: 1.35;
    text-align: left;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table tbody tr > td::before {
    content: attr(data-label);
    color: #64748b;
    font-size: 10px;
    font-weight: 900;
    text-align: left;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table tbody tr > td:nth-child(5),
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table tbody tr > td:nth-child(7),
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table tbody tr > td:nth-child(9) {
    grid-column: 1 / -1;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table tbody tr > td:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table tbody tr > td:nth-child(8),
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table tbody tr > td:nth-child(9) {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table .owner-accounting-empty-row {
    display: block;
    padding: 0;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table .owner-accounting-empty-row > td {
    display: block;
    padding: 22px 10px !important;
    border: 0;
    text-align: center;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table .owner-accounting-empty-row > td::before {
    display: none;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-view-btn {
    margin-left: auto;
    min-width: 72px;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-repair-ledger-footer {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 34px;
    align-items: center;
    justify-content: flex-end;
    padding: 8px 2px 0 !important;
    color: #64748b;
    font-size: 11px;
    line-height: 1.4;
    white-space: normal;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-side {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    padding: 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-side > article {
    width: 100%;
    min-width: 0;
    padding: 12px !important;
    border-radius: 12px;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-center-metrics {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-center-metrics > span {
    min-width: 0;
    padding: 7px 4px;
    border-radius: 8px;
    background: #f8fafc;
    text-align: center;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-center-metrics em {
    font-size: 10px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-center-metrics strong {
    font-size: 14px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-action-stack {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 7px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-side-action {
    grid-template-columns: 40px minmax(0, 1fr) !important;
    min-height: 62px !important;
    padding: 9px 11px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-side-action::before {
    width: 34px !important;
    height: 34px !important;
    font-size: 19px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-side-action strong {
    font-size: 14px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-side-action span {
    font-size: 11px !important;
    line-height: 1.35 !important;
  }
}

/* Accounting cash report mobile presentation aligned with the compact ledger design. */
@media (max-width: 900px) {
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active {
    padding: 16px 14px 96px !important;
    background: #f7f5f1 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active > .owner-reconcile-title-strip {
    margin: 0 0 12px !important;
    padding: 0 4px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active > .owner-reconcile-title-strip h1 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 24px !important;
    font-weight: 900 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active > .owner-reconcile-title-strip h1::after {
    content: none;
    color: #6b7280;
    font-size: 16px;
    font-weight: 500;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-title-actions,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-fuel-toolbar,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-filter-row {
    display: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-fuel-card {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-cash-page {
    gap: 14px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-summary-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0 !important;
    padding: 18px 12px !important;
    overflow: hidden;
    border: 1px solid #ebe7df;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(51, 42, 31, .07);
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-summary-grid > article {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    min-height: 91px !important;
    padding: 0 12px !important;
    border: 0 !important;
    border-right: 1px solid #ece8e2 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-summary-grid > article:nth-child(1) { order: 1; }
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-summary-grid > article:nth-child(4) { order: 2; }
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-summary-grid > article:nth-child(3) { order: 3; border-right: 0 !important; }
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-summary-grid > article:nth-child(2),
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-help-card { display: none !important; }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-summary-grid > article > span {
    color: #68707d;
    font-size: 12px !important;
    font-weight: 700 !important;
    white-space: nowrap;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-summary-grid > article > strong {
    margin-top: 9px !important;
    color: #111827;
    font-size: clamp(21px, 6vw, 28px) !important;
    font-weight: 800 !important;
    letter-spacing: -.04em;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-summary-grid > .owner-accounting-pending-card > strong {
    color: #e05b0d !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-summary-grid > article > strong.green {
    color: #059669 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-summary-grid > article > small {
    margin-top: auto !important;
    color: #6b7280;
    font-size: 10px !important;
    line-height: 1.25;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-limit-card:first-child > button {
    display: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-desktop-value {
    display: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-mobile-value,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-mobile-count {
    display: inline !important;
    margin: 0;
    font-style: normal;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-layout {
    gap: 12px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table-card {
    display: flex;
    flex-direction: column;
    padding: 0 12px 12px !important;
    overflow: hidden !important;
    border: 1px solid #ebe7df;
    border-radius: 14px !important;
    background: #fff;
    box-shadow: 0 8px 24px rgba(51, 42, 31, .06);
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table-head {
    display: contents !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table-head h3 {
    order: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 !important;
    padding: 17px 4px 12px;
    color: #292524;
    font-size: 17px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-mobile-count {
    color: #6b7280;
    font-size: 12px;
    font-weight: 600;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-head-actions {
    order: 1;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0 !important;
    margin: 0 -7px 4px;
    border: 1px solid #ded9d1;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-head-actions .owner-accounting-settle-button {
    display: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-head-actions button {
    min-height: 48px !important;
    padding: 0 !important;
    border: 0 !important;
    border-right: 1px solid #ded9d1 !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: #262626 !important;
    font-size: 15px !important;
    font-weight: 800 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-head-actions button:last-child {
    border-right: 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-head-actions button.active {
    background: #fffaf2 !important;
    color: #a66810 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-repair-table-wrap {
    order: 3;
    overflow: hidden !important;
    border: 1px solid #e5e7eb;
    border-radius: 9px 9px 0 0;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table {
    display: table !important;
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table thead {
    display: table-header-group !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table tbody {
    display: table-row-group !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table tr {
    display: table-row !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table th,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table td {
    display: table-cell !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    padding: 12px 8px !important;
    border: 0 !important;
    border-bottom: 1px solid #eceff2 !important;
    background: #fff !important;
    color: #27272a;
    font-size: 12px !important;
    line-height: 1.35;
    text-align: left !important;
    vertical-align: middle;
    white-space: normal !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table th {
    padding-top: 11px !important;
    padding-bottom: 11px !important;
    background: #102039 !important;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    text-align: center !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table :is(th, td):nth-child(1) { width: 18% !important; text-align: center !important; }
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table :is(th, td):nth-child(3) { width: 34% !important; }
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table :is(th, td):nth-child(4) { width: 25% !important; }
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table :is(th, td):nth-child(6) { width: 18% !important; text-align: right !important; font-weight: 800 !important; white-space: nowrap !important; }
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table :is(th, td):nth-child(9) { width: 5% !important; padding-right: 5px !important; padding-left: 0 !important; }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table :is(th, td):nth-child(2),
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table :is(th, td):nth-child(5),
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table :is(th, td):nth-child(7),
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table :is(th, td):nth-child(8) {
    display: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table td::before {
    display: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table td:nth-child(3) strong,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table td:nth-child(3) small {
    display: block !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table td:nth-child(3) small {
    margin-top: 3px;
    color: #687386;
    font-size: 10px;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table th:nth-child(9) {
    color: transparent !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-view-btn {
    width: 20px !important;
    min-width: 20px !important;
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: transparent !important;
    font-size: 0 !important;
    box-shadow: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-view-btn::after {
    content: "›";
    color: #667085;
    font-size: 24px;
    font-weight: 400;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-repair-ledger-footer {
    order: 4;
    justify-content: center !important;
    min-height: 52px !important;
    padding: 0 !important;
    border: 1px solid #e5e7eb;
    border-top: 0;
    border-radius: 0 0 9px 9px;
    color: #697180;
    font-size: 11px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-side {
    gap: 12px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-checkout-center {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-checkout-center > h3,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-center-metrics,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-side-action.clock {
    display: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-action-stack {
    gap: 9px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-side-action {
    grid-template-columns: 44px minmax(0, 1fr) 20px !important;
    min-height: 72px !important;
    padding: 9px 14px !important;
    border: 1px solid #a8a29e !important;
    border-radius: 9px !important;
    background: #fff !important;
    color: #18181b !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-side-action::before {
    width: 38px !important;
    height: 38px !important;
    color: #111827 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-side-action::after {
    content: "›";
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: center;
    color: #111827;
    font-size: 28px;
    font-weight: 400;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-side-action strong {
    color: #18181b !important;
    font-size: 16px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-side-action span {
    color: #4b5563 !important;
    font-size: 10px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-ranking-card {
    padding: 14px 16px !important;
    border: 1px solid #ebe7df;
    border-radius: 14px !important;
    background: #fff;
    box-shadow: 0 8px 24px rgba(51, 42, 31, .06);
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-ranking-card h3 {
    margin-bottom: 10px;
    font-size: 17px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-ranking-list {
    gap: 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-ranking-list li {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    min-height: 42px;
    padding: 7px 0 !important;
    border-bottom: 1px solid #eeeae4;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-ranking-list b {
    width: 23px;
    height: 23px;
    background: #ff9818;
    color: #fff;
    font-size: 11px;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-ranking-list strong {
    color: #27272a;
    font-size: 12px;
  }
}

/* Finance period controls: keep year/month compact and on one row on mobile.
   This final override intentionally follows the page-specific mobile rules. */
@media (max-width: 900px) {
  html body .desktop-app .page[data-panel^="owner-"].active .owner-fuel-toolbar {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: end !important;
    gap: 6px !important;
  }

  html body .desktop-app .page[data-panel^="owner-"].active .owner-fuel-toolbar > label {
    min-width: 0 !important;
    gap: 3px !important;
  }

  html body .desktop-app .page[data-panel^="owner-"].active .owner-fuel-toolbar > label > span {
    font-size: 11px !important;
    line-height: 1.2 !important;
  }

  html body .desktop-app .page[data-panel^="owner-"].active .owner-fuel-toolbar > label > select,
  html body .desktop-app .page[data-panel^="owner-"].active select[data-owner-reconcile-year],
  html body .desktop-app .page[data-panel^="owner-"].active select[data-owner-reconcile-month],
  html body .desktop-app .page[data-panel="owner-expense-report"].active select[data-owner-expense-year],
  html body .desktop-app .page[data-panel="owner-expense-report"].active select[data-owner-expense-month],
  html body .desktop-app .page[data-panel="owner-repair-report"].active select[data-owner-repair-year],
  html body .desktop-app .page[data-panel="owner-repair-report"].active select[data-owner-repair-month] {
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 28px 0 9px !important;
    font-size: 12px !important;
    line-height: 38px !important;
  }

  html body .desktop-app .page[data-panel="owner-year-end-bonus-report"].active .owner-fuel-toolbar {
    grid-template-columns: minmax(0, 156px) !important;
  }

  html body .desktop-app .page[data-panel="owner-fuel-report"].active .owner-fuel-toolbar {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.8fr) auto !important;
  }

  html body .desktop-app .page[data-panel="owner-fuel-report"].active .owner-fuel-period-field select {
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 28px 0 8px !important;
    font-size: 12px !important;
  }

  html body .desktop-app .page[data-panel="owner-fuel-report"].active [data-owner-fuel-query] {
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 12px !important;
    font-size: 12px !important;
  }

  html body .desktop-app .page[data-panel="owner-profit-report"].active .finance-header-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
    width: 100% !important;
  }

  html body .desktop-app .page[data-panel="owner-profit-report"].active .owner-profit-period-field {
    min-width: 0 !important;
    gap: 3px !important;
  }

  html body .desktop-app .page[data-panel="owner-profit-report"].active .owner-profit-period-field select,
  html body .desktop-app .page[data-panel="owner-profit-report"].active .finance-header-actions button {
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
  }
}

/* Keep the accounting cash page's reference layout authoritative after the
   shared finance-period rules above. This remains phone-only. */
@media (max-width: 900px) {
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .desktop-app .page[data-panel="owner-accounting-cash-report"].active .owner-fuel-toolbar,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-fuel-toolbar {
    display: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active > .owner-reconcile-title-strip h1 {
    color: #18181b !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active > .owner-reconcile-title-strip p {
    display: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-summary-grid > .owner-accounting-used-card,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-summary-grid > .owner-accounting-help-card {
    display: none !important;
  }
}

/* Keep the long ROC year readable on the narrow accounting-cash toolbar. */
@media (max-width: 900px) {
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-fuel-toolbar.owner-fuel-toolbar {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr) !important;
  }
}

/* The authenticated phone layout is rendered inside .mobile-app. */
@media (max-width: 900px) {
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel^="owner-"].active .owner-fuel-toolbar {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: end !important;
    gap: 6px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel^="owner-"].active .owner-fuel-toolbar > label {
    min-width: 0 !important;
    gap: 3px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel^="owner-"].active .owner-fuel-toolbar > label > span {
    font-size: 11px !important;
    line-height: 1.2 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel^="owner-"].active .owner-fuel-toolbar > label > select,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel^="owner-"].active select[data-owner-reconcile-year],
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel^="owner-"].active select[data-owner-reconcile-month],
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active select[data-owner-expense-year],
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active select[data-owner-expense-month],
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-repair-report"].active select[data-owner-repair-year],
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-repair-report"].active select[data-owner-repair-month] {
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 28px 0 9px !important;
    font-size: 12px !important;
    line-height: 38px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-year-end-bonus-report"].active .owner-fuel-toolbar {
    grid-template-columns: minmax(0, 156px) !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-toolbar {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.8fr) auto !important;
  }

  html body .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-period-field select {
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 28px 0 8px !important;
    font-size: 12px !important;
  }

  html body .mobile-app .page[data-panel="owner-fuel-report"].active [data-owner-fuel-query] {
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 12px !important;
    font-size: 12px !important;
  }

  html body .mobile-app .page[data-panel="owner-profit-report"].active .finance-header-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
    width: 100% !important;
  }

  html body .mobile-app .page[data-panel="owner-profit-report"].active .owner-profit-period-field {
    min-width: 0 !important;
    gap: 3px !important;
  }

  html body .mobile-app .page[data-panel="owner-profit-report"].active .owner-profit-period-field select,
  html body .mobile-app .page[data-panel="owner-profit-report"].active .finance-header-actions button {
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
  }
}

/* Superseded draft; retained outside all real viewport sizes. */
@media (max-width: 0px) {
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-card {
    overflow: hidden !important;
    border-color: #d7e0eb !important;
    border-radius: 12px !important;
    background: #f8fafc !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    border-collapse: separate !important;
    table-layout: auto !important;
    background: transparent !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table thead {
    display: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table tbody {
    display: grid !important;
    width: 100% !important;
    gap: 9px !important;
    padding: 10px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table tbody tr.owner-expense-data-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
      "index amount"
      "name name"
      "date payment"
      "accounting accounting"
      "action action" !important;
    align-items: start !important;
    gap: 6px 14px !important;
    width: 100% !important;
    padding: 11px 12px !important;
    border: 1px solid #d9e2ec !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table tbody tr.owner-expense-data-row > td {
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #10213b !important;
    text-align: left !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table tbody tr.owner-expense-data-row > td::before {
    content: attr(data-label) !important;
    display: block !important;
    margin-bottom: 2px !important;
    color: #64748b !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table td[data-label="序號"] {
    grid-area: index !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    justify-self: start !important;
    min-width: 52px !important;
    min-height: 25px !important;
    padding: 4px 10px !important;
    border-radius: 999px !important;
    background: #fff5e7 !important;
    color: #9a6818 !important;
    font-size: 11px !important;
    font-weight: 900 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table td[data-label="序號"]::before {
    content: "#" !important;
    display: inline !important;
    margin: 0 3px 0 0 !important;
    color: inherit !important;
    font-size: inherit !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table td[data-label="名稱"] {
    grid-area: name !important;
    padding: 1px 0 8px !important;
    border-bottom: 1px solid #e5eaf0 !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    line-height: 1.35 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table td[data-label="名稱"]::before,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table td[data-label="金額（元）"]::before {
    content: none !important;
    display: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table td[data-label="金額（元）"] {
    grid-area: amount !important;
    align-self: center !important;
    color: #0f172a !important;
    font-size: 18px !important;
    font-weight: 950 !important;
    line-height: 1.2 !important;
    text-align: right !important;
    white-space: nowrap !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table td[data-label="金額（元）"]::after {
    content: " 元";
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table td[data-label="付款日期"] {
    grid-area: date !important;
    font-size: 12px !important;
    font-weight: 850 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table td[data-label="付款方式"] {
    grid-area: payment !important;
    min-width: 92px !important;
    font-size: 12px !important;
    font-weight: 850 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table td[data-label="使用會計金"] {
    grid-area: accounting !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 28px !important;
    padding-top: 5px !important;
    border-top: 1px dashed #e2e8f0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table td[data-label="使用會計金"]::before {
    display: inline !important;
    margin: 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table td[data-label="操作"] {
    grid-area: action !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table td[data-label="操作"]::before {
    content: none !important;
    display: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table td[data-label="操作"] button {
    width: 100% !important;
    min-height: 34px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table tbody td [contenteditable="true"] {
    width: 100% !important;
    min-width: 0 !important;
    padding: 6px 8px !important;
    border-radius: 7px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table td[data-label="金額（元）"] [contenteditable="true"] {
    text-align: right !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table .owner-expense-empty-row,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table .owner-expense-empty-row td {
    display: block !important;
    width: 100% !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table tfoot {
    display: block !important;
    width: 100% !important;
    padding: 0 10px 10px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-subtotal-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    width: 100% !important;
    min-height: 42px !important;
    padding: 8px 12px !important;
    border: 1px solid #d9e6d4 !important;
    border-radius: 10px !important;
    background: #f4f9f1 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-subtotal-row td {
    display: block !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-subtotal-row td:first-child {
    grid-column: 1 !important;
    font-size: 12px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-subtotal-row td:nth-child(2) {
    grid-column: 2 !important;
    color: #0f6b3f !important;
    font-size: 15px !important;
    font-weight: 950 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-subtotal-row td:last-child:not(:nth-child(2)) {
    display: none !important;
  }
}

/* 寄賣借名表 */
.consignment-nominee-report {
  display: grid;
  gap: 16px;
}

.consignment-nominee-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.consignment-nominee-summary article {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 104px;
  padding: 18px;
  border: 1px solid #eadcc5;
  border-radius: 14px;
  background: linear-gradient(145deg, #fffdf9, #fff8ec);
  box-shadow: 0 8px 22px rgba(71, 48, 15, 0.06);
}

.consignment-nominee-summary article > span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border: 1px solid #e2bd72;
  border-radius: 14px;
  background: #fff8e8;
  color: #a66c12;
  font-size: 17px;
  font-weight: 950;
}

.consignment-nominee-summary article div {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
}

.consignment-nominee-summary small {
  width: 100%;
  color: #6f624f;
  font-size: 13px;
  font-weight: 900;
}

.consignment-nominee-summary strong {
  color: #10203c;
  font-size: 27px;
  line-height: 1;
}

.consignment-nominee-summary em {
  color: #8a7453;
  font-style: normal;
  font-weight: 800;
}

.consignment-nominee-card {
  overflow: hidden;
  border: 1px solid #e5d8c5;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(54, 42, 25, 0.05);
}

.consignment-nominee-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 18px;
  border-bottom: 1px solid #eee4d6;
  background: #fffaf1;
}

.consignment-nominee-card.history > header {
  background: #f8fafc;
}

.consignment-nominee-card h2,
.consignment-nominee-card p {
  margin: 0;
}

.consignment-nominee-card h2 {
  color: #14213a;
  font-size: 18px;
}

.consignment-nominee-card p {
  margin-top: 4px;
  color: #778195;
  font-size: 12px;
}

.consignment-nominee-card header > b {
  flex: 0 0 auto;
  padding: 7px 12px;
  border: 1px solid #dec18b;
  border-radius: 999px;
  background: #fff;
  color: #97651a;
  font-size: 13px;
}

.consignment-nominee-table-scroll {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.consignment-nominee-table {
  width: 100%;
  min-width: 980px;
  table-layout: auto;
}

.consignment-nominee-table th,
.consignment-nominee-table td {
  padding: 12px 14px;
  vertical-align: middle;
  white-space: nowrap;
}

.consignment-nominee-table th:first-child,
.consignment-nominee-table td:first-child {
  min-width: 220px;
}

.consignment-nominee-vehicle {
  display: flex;
  align-items: center;
  gap: 10px;
}

.consignment-nominee-vehicle img,
.consignment-nominee-photo-empty {
  width: 70px;
  height: 48px;
  flex: 0 0 70px;
  border-radius: 8px;
  object-fit: cover;
  background: #f3f4f6;
}

.consignment-nominee-photo-empty {
  display: grid;
  place-items: center;
  color: #b7791f;
  font-size: 13px;
  font-weight: 950;
}

.consignment-nominee-vehicle div {
  display: grid;
  gap: 3px;
}

.consignment-nominee-vehicle strong {
  color: #10203c;
  font-size: 14px;
}

.consignment-nominee-vehicle small {
  color: #7b8494;
  font-size: 12px;
}

.consignment-nominee-badge,
.consignment-record-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.consignment-nominee-badge.yes {
  background: #fff1cf;
  color: #9a620d;
}

.consignment-nominee-badge.no {
  background: #eef2f7;
  color: #657084;
}

.consignment-record-status.in_stock {
  background: #e7f8ed;
  color: #13864c;
}

.consignment-record-status.reserved {
  background: #fff2d8;
  color: #a7670a;
}

.consignment-record-status.sold {
  background: #ece9ff;
  color: #6653b6;
}

.consignment-record-status.deleted,
.consignment-record-status.history {
  background: #feecee;
  color: #bf3a48;
}

.consignment-history-date {
  display: block;
  margin-top: 5px;
  color: #8790a0;
  font-size: 11px;
}

@media (max-width: 900px) {
  .page[data-panel="owner-consignment-nominee-report"].active .consignment-nominee-report {
    gap: 10px;
  }

  .page[data-panel="owner-consignment-nominee-report"].active .consignment-nominee-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .page[data-panel="owner-consignment-nominee-report"].active .consignment-nominee-summary article {
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    align-content: center;
    gap: 7px;
    min-height: 94px;
    padding: 9px 4px;
    text-align: center;
  }

  .page[data-panel="owner-consignment-nominee-report"].active .consignment-nominee-summary article > span {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-radius: 11px;
    font-size: 13px;
  }

  .page[data-panel="owner-consignment-nominee-report"].active .consignment-nominee-summary article div {
    width: 100%;
    justify-content: center;
    gap: 3px;
  }

  .page[data-panel="owner-consignment-nominee-report"].active .consignment-nominee-summary small {
    width: 100%;
    white-space: nowrap;
    font-size: 9px;
    letter-spacing: -0.4px;
  }

  .page[data-panel="owner-consignment-nominee-report"].active .consignment-nominee-summary strong {
    font-size: 20px;
  }

  .page[data-panel="owner-consignment-nominee-report"].active .consignment-nominee-summary em {
    font-size: 11px;
  }

  .page[data-panel="owner-consignment-nominee-report"].active .consignment-nominee-card > header {
    align-items: flex-start;
    padding: 12px;
  }

  .page[data-panel="owner-consignment-nominee-report"].active .consignment-nominee-card h2 {
    font-size: 16px;
  }

  .page[data-panel="owner-consignment-nominee-report"].active .consignment-nominee-card p {
    font-size: 11px;
    line-height: 1.5;
  }

  .page[data-panel="owner-consignment-nominee-report"].active .consignment-nominee-table th,
  .page[data-panel="owner-consignment-nominee-report"].active .consignment-nominee-table td {
    padding: 10px;
  }

  .desktop-app .page[data-panel="owner-consignment-nominee-report"].active .consignment-nominee-report {
    gap: 10px;
  }

  .desktop-app .page[data-panel="owner-consignment-nominee-report"].active .consignment-nominee-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .desktop-app .page[data-panel="owner-consignment-nominee-report"].active .consignment-nominee-summary article {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 7px;
    min-height: 94px;
    padding: 9px 5px;
    text-align: center;
  }

  .desktop-app .page[data-panel="owner-consignment-nominee-report"].active .consignment-nominee-summary article > span {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-radius: 11px;
    font-size: 13px;
  }

  .desktop-app .page[data-panel="owner-consignment-nominee-report"].active .consignment-nominee-summary article div {
    justify-content: center;
    gap: 3px;
  }

  .desktop-app .page[data-panel="owner-consignment-nominee-report"].active .consignment-nominee-summary small {
    font-size: 10px;
  }

  .desktop-app .page[data-panel="owner-consignment-nominee-report"].active .consignment-nominee-summary strong {
    font-size: 20px;
  }

  .desktop-app .page[data-panel="owner-consignment-nominee-report"].active .consignment-nominee-summary em {
    font-size: 11px;
  }

  .desktop-app .page[data-panel="owner-consignment-nominee-report"].active .consignment-nominee-card > header {
    align-items: flex-start;
    padding: 12px;
  }

  .desktop-app .page[data-panel="owner-consignment-nominee-report"].active .consignment-nominee-card h2 {
    font-size: 16px;
  }

  .desktop-app .page[data-panel="owner-consignment-nominee-report"].active .consignment-nominee-card p {
    font-size: 11px;
    line-height: 1.5;
  }

  .desktop-app .page[data-panel="owner-consignment-nominee-report"].active .consignment-nominee-table th,
  .desktop-app .page[data-panel="owner-consignment-nominee-report"].active .consignment-nominee-table td {
    padding: 10px;
  }
}

@media (max-width: 480px) {
  .desktop-app .page[data-panel^="owner-"].active {
    padding-left: 6px;
    padding-right: 6px;
  }

  .desktop-app .page[data-panel^="owner-"].active .agency-summary-grid,
  .desktop-app .page[data-panel^="owner-"].active .owner-accounting-summary-grid,
  .desktop-app .page[data-panel^="owner-"].active .owner-staff-commission-summary,
  .desktop-app .page[data-panel^="owner-"].active .owner-profit-summary-grid {
    grid-template-columns: 1fr;
  }

  .desktop-app .page[data-panel^="owner-"].active .owner-fuel-toolbar,
  .desktop-app .page[data-panel^="owner-"].active .owner-profit-period-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .desktop-app .page[data-panel^="owner-"].active .owner-accounting-head-actions,
  .desktop-app .page[data-panel^="owner-"].active .owner-profit-table-actions {
    grid-template-columns: 1fr;
  }
}

/* The profit dashboard already owns its period controls. On phones, suppress
   only the reconcile shell's duplicate year/month toolbar. */
@media (max-width: 900px) {
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active > .content-card > .owner-fuel-toolbar {
    display: none !important;
  }
}

/* Mobile finance period controls
   All monthly finance reports keep year/month on one compact row. */
@media (max-width: 900px) {
  .page[data-panel^="owner-"].active .owner-fuel-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: end !important;
    gap: 6px !important;
  }

  .page[data-panel^="owner-"].active .owner-fuel-toolbar > label {
    width: 100% !important;
    min-width: 0 !important;
    gap: 3px !important;
  }

  .page[data-panel^="owner-"].active .owner-fuel-toolbar > label > span {
    font-size: 11px !important;
    line-height: 1.2 !important;
  }

  .page[data-panel^="owner-"].active .owner-fuel-toolbar > label > select {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 38px !important;
    height: 38px !important;
    padding: 0 24px 0 8px !important;
    font-size: 12px !important;
    letter-spacing: -0.2px !important;
  }

  .page[data-panel="owner-year-end-bonus-report"].active .owner-fuel-toolbar {
    grid-template-columns: minmax(0, 156px) !important;
  }

  .page[data-panel="owner-fuel-report"].active .owner-fuel-dashboard-card > .owner-fuel-toolbar {
    grid-template-columns: minmax(0, 1.35fr) minmax(62px, .65fr) 76px !important;
    gap: 6px !important;
    padding: 9px 8px !important;
  }

  .page[data-panel="owner-fuel-report"].active .owner-fuel-toolbar .owner-fuel-period-field {
    grid-template-rows: auto 38px !important;
    gap: 3px !important;
  }

  .page[data-panel="owner-fuel-report"].active .owner-fuel-toolbar .owner-fuel-period-field > span {
    font-size: 11px !important;
  }

  .page[data-panel="owner-fuel-report"].active .owner-fuel-toolbar .owner-fuel-period-field select,
  .page[data-panel="owner-fuel-report"].active .owner-fuel-mobile-query {
    min-height: 38px !important;
    height: 38px !important;
    font-size: 12px !important;
  }

  .page[data-panel="owner-profit-report"].active .finance-header-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: end !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .page[data-panel="owner-profit-report"].active .owner-profit-period-field {
    display: grid !important;
    grid-template-rows: auto 38px !important;
    gap: 3px !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  .page[data-panel="owner-profit-report"].active .owner-profit-period-field > span {
    font-size: 11px !important;
    line-height: 1.2 !important;
  }

  .page[data-panel="owner-profit-report"].active .owner-profit-period-field > select {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 38px !important;
    height: 38px !important;
    padding: 0 24px 0 8px !important;
    font-size: 12px !important;
  }

  .page[data-panel="owner-profit-report"].active .finance-header-actions > button {
    min-height: 38px !important;
    height: 38px !important;
    padding: 0 8px !important;
    font-size: 11px !important;
  }
}

/* Mobile fuel reconciliation dashboard */
.owner-fuel-mobile-dashboard,
.owner-fuel-mobile-query {
  display: none;
}

@media (max-width: 900px) {
  .mobile-app .page[data-panel="owner-fuel-report"].active {
    gap: 0;
    padding: 10px 14px 88px;
    background:
      radial-gradient(circle at 88% 4%, rgba(217, 172, 92, 0.12), transparent 22%),
      linear-gradient(180deg, #f9fafc 0%, #f4f5f7 100%);
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active > .owner-reconcile-title-strip {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
    align-items: center;
    margin: 0;
    padding: 14px 4px 16px;
    border: 0;
    border-radius: 0;
    background: #ffffff !important;
    box-shadow: none;
    color: #101827 !important;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active > .owner-reconcile-title-strip h1 {
    font-size: clamp(23px, 5.8vw, 30px);
    letter-spacing: -0.04em;
    color: #101827 !important;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active > .owner-reconcile-title-strip p {
    margin: 4px 0 0;
    color: #7a8494 !important;
    font-size: clamp(12px, 3vw, 14px);
    font-weight: 700;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active > .owner-reconcile-title-strip time {
    align-self: center;
    color: #7b8492 !important;
    font-size: clamp(10px, 2.5vw, 12px);
    font-weight: 800;
    white-space: nowrap;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active > .owner-reconcile-title-strip time span {
    display: inline-block;
    margin-left: 4px;
    color: #506076;
    font-size: 18px;
    vertical-align: -2px;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active > .owner-fuel-dashboard-card {
    display: block;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-dashboard-card > .owner-fuel-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .92fr) minmax(96px, .9fr);
    gap: 10px;
    align-items: end;
    margin: 0 0 10px;
    padding: 13px 14px;
    border: 1px solid #e7e9ee;
    border-radius: 11px;
    background: #ffffff;
    box-shadow: 0 5px 18px rgba(15, 23, 42, 0.04);
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-toolbar .owner-fuel-period-field {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    grid-template-rows: auto 44px;
    gap: 5px 7px;
    align-items: center;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-toolbar .owner-fuel-period-field::before {
    grid-column: 1;
    grid-row: 2;
    color: #101827;
    font-size: 18px;
    text-align: center;
    content: "▣";
    /*
    content: "▣";
  }

    */
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-toolbar .owner-fuel-period-field > span {
    grid-column: 1 / -1;
    color: #263244;
    font-size: 12px;
    font-weight: 900;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-toolbar .owner-fuel-period-field::before {
    width: 14px;
    height: 14px;
    justify-self: center;
    border: 2px solid #101827;
    border-radius: 3px;
    background:
      linear-gradient(#101827, #101827) 0 3px / 100% 2px no-repeat,
      linear-gradient(90deg, transparent 43%, #101827 43% 55%, transparent 55%) 0 7px / 100% 2px no-repeat;
    content: "";
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-toolbar .owner-fuel-period-field select {
    grid-column: 2;
    grid-row: 2;
    width: 100%;
    min-height: 44px;
    padding: 0 30px 0 11px;
    border: 1px solid #dfe3ea;
    border-radius: 8px;
    background-color: #ffffff;
    box-shadow: none;
    font-size: clamp(12px, 3vw, 14px);
    font-weight: 900;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-desktop-control {
    display: none !important;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-mobile-query {
    display: inline-flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #0c1628;
    border-radius: 8px;
    background: #0c1628;
    color: #ffffff;
    box-shadow: 0 5px 12px rgba(12, 22, 40, 0.13);
    font-size: 14px;
    font-weight: 900;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-mobile-query svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-dashboard-card > .owner-fuel-metrics,
  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-dashboard-card > .owner-fuel-sheets,
  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-dashboard-card > .owner-fuel-analysis-grid {
    display: none !important;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-mobile-dashboard {
    display: grid;
    gap: 10px;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-mobile-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
  }

  .owner-fuel-mobile-metric,
  .owner-fuel-mobile-comparison,
  .owner-fuel-mobile-trend,
  .owner-fuel-mobile-detail,
  .owner-fuel-mobile-ranking,
  .owner-fuel-mobile-insights .owner-fuel-share-card {
    border: 1px solid #e8e9ed;
    border-radius: 11px;
    background: #ffffff;
    box-shadow: 0 5px 18px rgba(15, 23, 42, 0.045);
  }

  .owner-fuel-mobile-metric {
    display: grid;
    min-width: 0;
    min-height: 166px;
    place-items: center;
    align-content: start;
    padding: 11px 7px 8px;
    text-align: center;
  }

  .owner-fuel-mobile-metric-icon {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    margin-bottom: 7px;
    border: 1px solid #e2d3b7;
    border-radius: 50%;
    background: #fffaf0;
    color: #0f172a;
  }

  .owner-fuel-mobile-metric-icon svg,
  .owner-fuel-mobile-rank-placeholder svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
  }

  .owner-fuel-mobile-metric > b {
    display: block;
    min-height: 28px;
    color: #283244;
    font-size: clamp(9px, 2.25vw, 12px);
    font-weight: 900;
    line-height: 1.25;
  }

  .owner-fuel-mobile-metric > strong {
    display: block;
    margin-top: 6px;
    color: #101827;
    font-size: clamp(18px, 4.5vw, 25px);
    font-weight: 950;
    letter-spacing: -0.04em;
    white-space: nowrap;
  }

  .owner-fuel-mobile-delta {
    display: flex;
    min-height: 24px;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 5px;
    color: #737d8b;
    font-size: clamp(8px, 2.05vw, 10px);
    font-weight: 800;
    white-space: nowrap;
  }

  .owner-fuel-mobile-delta b {
    font-weight: 950;
  }

  .owner-fuel-mobile-delta.down b,
  .owner-fuel-mobile-comparison-row em.down {
    color: #159a70;
  }

  .owner-fuel-mobile-delta.up b,
  .owner-fuel-mobile-comparison-row em.up {
    color: #d3424e;
  }

  .owner-fuel-mobile-delta.neutral b,
  .owner-fuel-mobile-comparison-row em.neutral {
    color: #7f8896;
  }

  .owner-fuel-sparkline {
    align-self: end;
    width: 100%;
    height: 26px;
    margin-top: 4px;
    overflow: visible;
  }

  .owner-fuel-sparkline polyline {
    fill: none;
    stroke: #697487;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.2;
  }

  .owner-fuel-sparkline circle {
    fill: #1d2738;
  }

  .owner-fuel-mobile-insights {
    display: grid;
    grid-template-columns: minmax(0, .98fr) minmax(0, 1.12fr);
    gap: 8px;
  }

  .owner-fuel-mobile-insights .owner-fuel-share-card {
    display: grid;
    grid-template-columns: 46% minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    min-width: 0;
    min-height: 202px;
    padding: 13px;
  }

  .owner-fuel-mobile-insights .owner-fuel-share-card header,
  .owner-fuel-mobile-insights .owner-fuel-share-card .owner-fuel-share-total {
    grid-column: 1 / -1;
  }

  .owner-fuel-mobile-insights .owner-fuel-share-card header {
    margin: 0;
  }

  .owner-fuel-mobile-insights .owner-fuel-share-card h3,
  .owner-fuel-mobile-comparison h3,
  .owner-fuel-mobile-trend h3,
  .owner-fuel-mobile-detail h3,
  .owner-fuel-mobile-ranking h3 {
    margin: 0;
    color: #182235;
    font-size: clamp(13px, 3.35vw, 17px);
    font-weight: 950;
  }

  .owner-fuel-mobile-insights .owner-fuel-donut {
    width: min(100%, 112px);
    justify-self: center;
  }

  .owner-fuel-mobile-insights .owner-fuel-donut::after {
    inset: 24%;
  }

  .owner-fuel-mobile-insights .owner-fuel-share-legend {
    gap: 10px;
    min-width: 0;
  }

  .owner-fuel-mobile-insights .owner-fuel-share-legend span {
    grid-template-columns: 8px minmax(0, 1fr);
    gap: 5px;
    font-size: clamp(8px, 2.05vw, 10px);
    line-height: 1.3;
  }

  .owner-fuel-mobile-insights .owner-fuel-share-legend i {
    width: 8px;
    height: 8px;
  }

  .owner-fuel-mobile-insights .owner-fuel-share-total {
    justify-self: end;
    font-size: clamp(9px, 2.4vw, 12px);
  }

  .owner-fuel-mobile-comparison {
    min-width: 0;
    min-height: 202px;
    padding: 13px;
  }

  .owner-fuel-mobile-comparison-head,
  .owner-fuel-mobile-comparison-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 5px;
    align-items: center;
  }

  .owner-fuel-mobile-comparison-head {
    margin-top: 10px;
    padding: 7px 0;
    border-bottom: 1px solid #edf0f3;
    color: #697486;
    font-size: clamp(7px, 1.9vw, 10px);
    font-weight: 900;
  }

  .owner-fuel-mobile-comparison-row {
    min-height: 31px;
    border-bottom: 1px solid #f0f1f4;
    font-size: clamp(8px, 2vw, 10px);
  }

  .owner-fuel-mobile-comparison-row:last-child {
    border-bottom: 0;
  }

  .owner-fuel-mobile-comparison-row b,
  .owner-fuel-mobile-comparison-row strong,
  .owner-fuel-mobile-comparison-row em {
    font-style: normal;
    font-weight: 900;
    white-space: nowrap;
  }

  .owner-fuel-mobile-trend {
    min-width: 0;
    min-height: 210px;
    padding: 13px;
  }

  .owner-fuel-mobile-trend > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .owner-fuel-mobile-trend select {
    width: auto;
    min-width: 92px;
    min-height: 34px !important;
    padding: 0 28px 0 10px;
    border-radius: 7px !important;
    font-size: 11px !important;
  }

  .owner-fuel-mobile-trend-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(92px, 23%);
    gap: 12px;
    align-items: center;
    margin-top: 10px;
  }

  .owner-fuel-trend-svg {
    width: 100%;
    height: 148px;
    overflow: visible;
  }

  .owner-fuel-trend-area {
    fill: url("#ownerFuelTrendFill");
  }

  .owner-fuel-trend-line {
    fill: none;
    stroke: #172134;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
  }

  .owner-fuel-trend-svg circle {
    fill: #101827;
  }

  .owner-fuel-trend-svg text {
    fill: #788292;
    font-size: 11px;
    font-weight: 800;
  }

  .owner-fuel-mobile-trend-body aside {
    display: grid;
    align-content: center;
    gap: 5px;
    min-height: 120px;
    padding-left: 12px;
    border-left: 1px solid #edf0f3;
  }

  .owner-fuel-mobile-trend-body aside > span {
    color: #626d7c;
    font-size: clamp(9px, 2.4vw, 12px);
    font-weight: 850;
  }

  .owner-fuel-mobile-trend-body aside > strong {
    color: #101827;
    font-size: clamp(20px, 5.2vw, 28px);
    font-weight: 950;
    white-space: nowrap;
  }

  .owner-fuel-mobile-trend-body aside .owner-fuel-mobile-delta {
    justify-content: flex-start;
    margin: 0;
  }

  .owner-fuel-mobile-bottom-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: 8px;
  }

  .owner-fuel-mobile-detail,
  .owner-fuel-mobile-ranking {
    min-width: 0;
    min-height: 232px;
    padding: 13px;
  }

  .owner-fuel-mobile-detail > header,
  .owner-fuel-mobile-ranking > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 9px;
  }

  .owner-fuel-mobile-detail > header button {
    padding: 0;
    border: 0;
    background: transparent;
    color: #6e7888;
    font-size: 10px;
    font-weight: 900;
  }

  .owner-fuel-mobile-detail-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    margin-bottom: 7px;
  }

  .owner-fuel-mobile-detail-tabs button {
    min-height: 31px;
    padding: 0 5px;
    border: 1px solid #1b2638;
    border-radius: 5px;
    background: #ffffff;
    color: #1b2638;
    font-size: clamp(7px, 1.95vw, 10px);
    font-weight: 900;
  }

  .owner-fuel-mobile-detail-tabs button.active {
    background: #111b2d;
    color: #ffffff;
  }

  .owner-fuel-mobile-detail-list {
    overflow: hidden;
    border-top: 1px solid #e7e9ed;
  }

  .owner-fuel-mobile-detail-head,
  .owner-fuel-mobile-detail-row {
    display: grid;
    grid-template-columns: 30px minmax(45px, 1fr) 50px minmax(40px, .8fr) auto;
    gap: 4px;
    align-items: center;
  }

  .owner-fuel-mobile-detail-head {
    min-height: 29px;
    color: #788292;
    font-size: clamp(6px, 1.6vw, 8px);
    font-weight: 900;
  }

  .owner-fuel-mobile-detail-row {
    width: 100%;
    min-height: 34px;
    padding: 4px 0;
    border: 0;
    border-top: 1px solid #eef0f3;
    border-radius: 0;
    background: transparent;
    color: #253145;
    font-size: clamp(7px, 1.85vw, 9px);
    text-align: left;
  }

  .owner-fuel-mobile-detail-row b,
  .owner-fuel-mobile-detail-row strong {
    overflow: hidden;
    font-weight: 950;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .owner-fuel-mobile-detail > footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 7px;
    color: #687385;
    font-size: 9px;
    font-weight: 850;
  }

  .owner-fuel-mobile-detail > footer strong {
    color: #182235;
  }

  .owner-fuel-mobile-ranking > header {
    align-items: baseline;
  }

  .owner-fuel-mobile-ranking > header span {
    color: #788292;
    font-size: 9px;
    font-weight: 850;
  }

  .owner-fuel-mobile-ranking > div {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .owner-fuel-mobile-rank-card {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 172px;
    justify-items: center;
    align-content: start;
    gap: 6px;
    padding: 8px 6px;
    border: 1px solid #e7e9ed;
    border-radius: 7px;
    background: #ffffff;
  }

  .owner-fuel-mobile-rank-card > i {
    position: absolute;
    top: 6px;
    left: 6px;
    display: grid;
    width: 21px;
    height: 21px;
    place-items: center;
    border-radius: 50%;
    background: #bd7d12;
    color: #ffffff;
    font-size: 10px;
    font-style: normal;
    font-weight: 950;
  }

  .owner-fuel-mobile-rank-card:nth-child(2) > i {
    background: #aab0ba;
  }

  .owner-fuel-mobile-rank-card:nth-child(3) > i {
    background: #b86b32;
  }

  .owner-fuel-mobile-rank-card img,
  .owner-fuel-mobile-rank-placeholder {
    display: grid;
    width: 100%;
    height: 76px;
    place-items: center;
    border-radius: 5px;
    object-fit: contain;
    background: #fafafa;
    color: #a97825;
  }

  .owner-fuel-mobile-rank-card > b {
    display: -webkit-box;
    overflow: hidden;
    color: #253145;
    font-size: clamp(7px, 1.9vw, 9px);
    font-weight: 950;
    line-height: 1.35;
    text-align: center;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .owner-fuel-mobile-rank-card footer {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 3px;
    margin-top: auto;
    color: #253145;
    font-size: clamp(7px, 1.7vw, 8px);
    font-weight: 900;
  }

  .owner-fuel-mobile-empty {
    grid-column: 1 / -1;
    margin: 0;
    padding: 28px 8px;
    color: #8a93a0;
    font-size: 11px;
    font-weight: 800;
    text-align: center;
  }
}

@media (max-width: 520px) {
  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-dashboard-card > .owner-fuel-toolbar {
    grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr) minmax(78px, .82fr);
    gap: 6px;
    padding: 11px 8px;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-toolbar .owner-fuel-period-field {
    grid-template-columns: 17px minmax(0, 1fr);
    gap: 3px;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-toolbar .owner-fuel-period-field::before {
    font-size: 14px;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-toolbar .owner-fuel-period-field select {
    min-width: 0;
    padding: 0 22px 0 6px;
    font-size: clamp(10px, 2.75vw, 12px);
  }

  .owner-fuel-mobile-metric {
    min-height: 154px;
    padding: 10px 4px 7px;
  }

  .owner-fuel-mobile-metric-icon {
    width: 34px;
    height: 34px;
    margin-bottom: 6px;
  }

  .owner-fuel-mobile-metric-icon svg {
    width: 21px;
    height: 21px;
  }

  .owner-fuel-mobile-insights {
    gap: 6px;
  }

  .owner-fuel-mobile-insights .owner-fuel-share-card,
  .owner-fuel-mobile-comparison,
  .owner-fuel-mobile-trend,
  .owner-fuel-mobile-detail,
  .owner-fuel-mobile-ranking {
    padding: 9px;
  }

}

@media (max-width: 390px) {
  .mobile-app .page[data-panel="owner-fuel-report"].active {
    padding-right: 8px;
    padding-left: 8px;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active > .owner-reconcile-title-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active > .owner-reconcile-title-strip time {
    justify-self: start;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-dashboard-card > .owner-fuel-toolbar {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, .78fr) 76px;
  }

  .owner-fuel-mobile-metrics {
    gap: 5px !important;
  }

  .owner-fuel-mobile-metric {
    min-height: 148px;
    padding-right: 3px;
    padding-left: 3px;
  }

  .owner-fuel-mobile-metric > strong {
    font-size: clamp(16px, 4.4vw, 19px);
  }

  .owner-fuel-mobile-insights,
  .owner-fuel-mobile-bottom-grid {
    grid-template-columns: 1fr;
  }

  .owner-fuel-mobile-insights .owner-fuel-share-card,
  .owner-fuel-mobile-comparison,
  .owner-fuel-mobile-detail,
  .owner-fuel-mobile-ranking {
    min-height: 0;
  }
}

/* Mobile fuel report readability: keep the period controls separated and
   enforce a practical minimum font size throughout the dashboard. */
@media (max-width: 900px) {
  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-mobile-metric {
    grid-template-columns: 24px minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
    column-gap: 7px;
    place-items: initial;
    align-items: center;
    text-align: left;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-mobile-metric-icon {
    grid-column: 1;
    grid-row: 1;
    width: 24px;
    height: 24px;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #101827;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-mobile-metric-icon svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.8;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-mobile-metric > b {
    grid-column: 2;
    grid-row: 1;
    min-height: 0;
    text-align: left;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-mobile-metric > strong,
  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-mobile-metric > .owner-fuel-mobile-delta,
  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-mobile-metric > .owner-fuel-sparkline {
    grid-column: 1 / -1;
    justify-self: stretch;
    text-align: center;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-mobile-metric > strong {
    grid-row: 2;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-mobile-metric > .owner-fuel-mobile-delta {
    grid-row: 3;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-mobile-metric > .owner-fuel-sparkline {
    grid-row: 4;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-dashboard-card > .owner-fuel-toolbar {
    grid-template-columns: minmax(0, 1.45fr) minmax(68px, .65fr) minmax(82px, .72fr);
    gap: 8px;
    padding: 12px 10px;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-toolbar .owner-fuel-period-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 46px;
    gap: 6px;
    min-width: 0;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-toolbar .owner-fuel-period-field::before {
    display: none;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-toolbar .owner-fuel-period-field > span {
    grid-column: 1;
    font-size: 13px;
    line-height: 1.2;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-toolbar .owner-fuel-period-field select {
    grid-column: 1;
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 0 28px 0 10px;
    overflow: hidden;
    font-size: 14px;
    letter-spacing: -0.2px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-mobile-query {
    min-width: 0;
    min-height: 46px;
    padding: 0 8px;
    font-size: 14px;
    white-space: nowrap;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-mobile-query svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active > .owner-reconcile-title-strip p {
    font-size: 14px;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active > .owner-reconcile-title-strip time {
    font-size: 12px;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-mobile-metric > b {
    min-height: 30px;
    font-size: 11px;
    line-height: 1.35;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-mobile-delta {
    font-size: 10.5px;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active :is(
    .owner-fuel-mobile-insights .owner-fuel-share-card h3,
    .owner-fuel-mobile-comparison h3,
    .owner-fuel-mobile-trend h3,
    .owner-fuel-mobile-detail h3,
    .owner-fuel-mobile-ranking h3
  ) {
    font-size: 16px;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-mobile-insights .owner-fuel-share-legend span {
    font-size: 10.5px;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-mobile-insights .owner-fuel-share-total {
    font-size: 11px;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-mobile-comparison-head {
    font-size: 9.5px;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-mobile-comparison-row {
    min-height: 34px;
    font-size: 10.5px;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-mobile-trend select {
    font-size: 12px !important;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-trend-svg text {
    font-size: 11px;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-mobile-trend-body aside > span {
    font-size: 12px;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-mobile-detail > header button,
  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-mobile-ranking > header span {
    font-size: 11px;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-mobile-detail-tabs button {
    min-height: 34px;
    font-size: 10.5px;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-mobile-detail-head {
    min-height: 31px;
    font-size: 9px;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-mobile-detail-row {
    min-height: 38px;
    font-size: 10.5px;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-mobile-detail > footer {
    font-size: 10.5px;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-mobile-rank-card > b {
    font-size: 10px;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-mobile-rank-card footer {
    font-size: 9.5px;
  }
}

@media (max-width: 390px) {
  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-dashboard-card > .owner-fuel-toolbar {
    grid-template-columns: minmax(0, 1.4fr) minmax(62px, .62fr) minmax(76px, .7fr);
    gap: 6px;
    padding-right: 7px;
    padding-left: 7px;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-toolbar .owner-fuel-period-field select {
    padding-right: 24px;
    padding-left: 7px;
    font-size: 12.5px;
  }

  .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-mobile-query {
    gap: 5px;
    padding-right: 5px;
    padding-left: 5px;
    font-size: 13px;
  }
}

/* Sales commission checkout: accounting receives sale money, then pays staff and settles with owner. */
.sales-settlement-page {
  display: grid;
  gap: 14px;
}

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

.sales-settlement-summary article {
  display: grid;
  gap: 6px;
  min-height: 112px;
  padding: 18px;
  border: 1px solid #eadcc5;
  border-radius: 14px;
  background: linear-gradient(145deg, #fffdf8, #fff7e8);
  box-shadow: 0 8px 22px rgba(71, 48, 15, 0.06);
}

.sales-settlement-summary span,
.sales-settlement-summary small {
  color: #79694f;
}

.sales-settlement-summary strong {
  color: #13213a;
  font-size: 24px;
}

.sales-settlement-guide {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border: 1px solid #e8c989;
  border-radius: 12px;
  background: #fff8e8;
  color: #705325;
}

.sales-settlement-guide strong {
  flex: 0 0 auto;
  color: #a66c12;
}

.sales-settlement-table-card,
.sales-settlement-owner-checkout,
.sales-settlement-batches {
  overflow: hidden;
  border: 1px solid #e4d8c7;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(54, 42, 25, 0.05);
}

.sales-settlement-table-card > header,
.sales-settlement-batches > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid #eee4d6;
  background: #fffaf1;
}

.sales-settlement-table-card h2,
.sales-settlement-table-card p,
.sales-settlement-batches h2 {
  margin: 0;
}

.sales-settlement-table-card p {
  margin-top: 4px;
  color: #7b6d5a;
  font-size: 12px;
}

.sales-settlement-table {
  min-width: 1320px;
}

.sales-settlement-table td {
  vertical-align: middle;
}

.sales-settlement-table td > small,
.sales-settlement-table td > strong + small,
.sales-settlement-status + small {
  display: block;
  margin-top: 4px;
  color: #827768;
  font-size: 11px;
}

.sales-settlement-table input[type="number"],
.sales-settlement-table input[type="text"],
.sales-settlement-table select {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 116px;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid #d9cfbf;
  border-radius: 8px;
  background: #fff;
}

.sales-settlement-table input[type="text"] {
  min-width: 0;
}

.sales-settlement-table th:nth-child(9),
.sales-settlement-table td:nth-child(9) {
  min-width: 180px;
}

.sales-settlement-status,
.sales-settlement-method {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef3f8;
  color: #476078;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.sales-settlement-mobile-state {
  display: none;
}

.sales-settlement-status.pending {
  background: #fff2d8;
  color: #a26200;
}

.sales-settlement-status.cash,
.sales-settlement-method.cash {
  background: #fff0e5;
  color: #b0520b;
}

.sales-settlement-status.wallet,
.sales-settlement-method.wallet {
  background: #e7f7ee;
  color: #117244;
}

.sales-settlement-status.offset,
.sales-settlement-method.offset {
  background: #f1ecfb;
  color: #6946a4;
}

.sales-settlement-table .is-positive {
  color: #087443;
}

.sales-settlement-table .is-negative {
  color: #bd3030;
}

.sales-settlement-details-button {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  margin-top: 7px;
  padding: 5px 10px;
  border: 1px solid #d69b39;
  border-radius: 8px;
  background: #fffaf0;
  color: #956019;
  font-size: 12px;
  font-weight: 900;
}

.sales-settlement-mobile-photo,
.sales-settlement-mobile-plate {
  display: none;
}

.sales-settlement-confirm,
.sales-settlement-owner-checkout button {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid #b6781e;
  border-radius: 9px;
  background: linear-gradient(135deg, #dca536, #b97818);
  color: #fff;
  font-weight: 900;
  white-space: nowrap;
}

.sales-settlement-owner-checkout {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(220px, 360px) auto;
  align-items: end;
  gap: 16px;
  padding: 18px;
  background: linear-gradient(135deg, #fffaf0, #fff);
}

.sales-settlement-owner-checkout h2,
.sales-settlement-owner-checkout p {
  margin: 0;
}

.sales-settlement-owner-checkout p {
  margin-top: 5px;
  color: #746a5d;
  font-size: 12px;
}

.sales-settlement-owner-checkout label {
  display: grid;
  gap: 5px;
  color: #655b4f;
  font-size: 12px;
  font-weight: 800;
}

.sales-settlement-owner-checkout input {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #d9cfbf;
  border-radius: 9px;
}

.sales-settlement-batches > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
}

.sales-settlement-batches article {
  padding: 14px;
  border: 1px solid #e9dfd0;
  border-radius: 12px;
  background: #fffdf9;
}

.sales-settlement-batches article > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.sales-settlement-batches article dl {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 12px 0 0;
}

.sales-settlement-batches article dl div {
  display: grid;
  gap: 3px;
  padding: 9px;
  border-radius: 8px;
  background: #f8f4ed;
}

.sales-settlement-batches dt {
  color: #7b7061;
  font-size: 11px;
}

.sales-settlement-batches dd {
  margin: 0;
  color: #17233a;
  font-weight: 900;
}

.sales-settlement-batch-details {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.sales-settlement-batch-details > strong {
  color: #5e4a2d;
  font-size: 13px;
}

.sales-settlement-batch-detail-list {
  overflow-x: auto;
  border: 1px solid #ebe1d3;
  border-radius: 9px;
}

.sales-settlement-batch-detail-row {
  display: grid;
  grid-template-columns: 100px minmax(210px, 1fr) 110px 110px 120px 110px;
  align-items: center;
  min-width: 800px;
  border-top: 1px solid #eee6da;
}

.sales-settlement-batch-detail-row:first-child {
  border-top: 0;
}

.sales-settlement-batch-detail-row > * {
  box-sizing: border-box;
  min-width: 0;
  padding: 9px 10px;
}

.sales-settlement-batch-detail-row.is-heading {
  background: #f8f4ed;
  color: #756854;
  font-size: 11px;
  font-weight: 800;
}

.sales-settlement-batch-detail-row:not(.is-heading) {
  color: #263247;
  font-size: 12px;
}

.sales-settlement-batch-detail-row .sales-settlement-method {
  justify-self: start;
  margin: 5px 8px;
  padding: 5px 9px;
}

.sales-settlement-batch-no-details {
  margin: 12px 0 0;
  color: #817668;
  font-size: 12px;
}

.sales-settlement-empty {
  padding: 24px;
  color: #817668;
  text-align: center;
}

body.sales-settlement-detail-open {
  overflow: hidden;
}

.sales-settlement-detail-dialog {
  position: fixed;
  z-index: 10050;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
}

.sales-settlement-detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 18, 34, 0.68);
  backdrop-filter: blur(5px);
}

.sales-settlement-detail-dialog > section {
  position: relative;
  display: grid;
  width: min(1480px, 96vw);
  max-height: 92vh;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid #e5d5b9;
  border-radius: 20px;
  background: #f7f8fa;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.32);
}

.sales-settlement-detail-dialog > section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border-bottom: 1px solid #eadfcd;
  background: linear-gradient(120deg, #fffaf1, #fff);
}

.sales-settlement-detail-dialog header span {
  color: #af7417;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.2px;
}

.sales-settlement-detail-dialog header h2 {
  margin: 3px 0;
  color: #13213a;
  font-size: 22px;
}

.sales-settlement-detail-dialog header small {
  color: #756b5e;
}

.sales-settlement-detail-dialog header button {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid #d9b779;
  border-radius: 999px;
  background: #fff;
  color: #18253b;
  font-size: 30px;
  line-height: 1;
}

.sales-settlement-detail-reports {
  overflow: auto;
  padding: 18px;
}

.sales-settlement-detail-reports .sale-report-layout.three {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  overflow-x: hidden;
}

.sales-settlement-detail-reports .sale-report-layout.three .sale-report-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, calc((100% - 20px) / 3)));
  justify-content: center;
  align-items: start;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.sales-settlement-detail-reports .sale-report-layout.three.two .sale-report-board {
  grid-template-columns: repeat(2, minmax(0, calc((100% - 20px) / 3)));
}

.sales-settlement-detail-reports .sale-report-card {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.sales-settlement-detail-reports .sale-report-card h3 {
  padding: 10px 9px;
  font-size: 15px;
}

.sales-settlement-detail-reports .sale-report-info {
  margin: 7px;
}

.sales-settlement-detail-reports .sale-report-info h4 {
  padding: 6px 8px;
  font-size: 12px;
}

.sales-settlement-detail-reports .sale-report-info span,
.sales-settlement-detail-reports .sale-report-info strong {
  min-height: 29px;
  padding: 5px 4px;
}

.sales-settlement-detail-reports .sale-money-table {
  width: calc(100% - 24px);
  max-width: calc(100% - 24px);
}

.sales-settlement-detail-reports .sale-money-table th {
  height: 40px;
}

.sales-settlement-detail-reports .sale-money-table td {
  height: 31px;
  padding: 4px 5px;
}

.sales-settlement-detail-reports .sale-total {
  min-height: 50px;
}

.sales-settlement-detail-reports .sale-sign-grid {
  gap: 8px;
}

.sales-settlement-detail-reports .sale-sign-grid span {
  min-height: 50px;
}

.sales-settlement-detail-reports .sale-note {
  min-height: 31px;
}

.sales-settlement-detail-reports input:disabled,
.sales-settlement-detail-reports select:disabled,
.sales-settlement-detail-reports textarea:disabled {
  opacity: 1;
  color: inherit;
  -webkit-text-fill-color: currentColor;
}

.sales-settlement-detail-dialog > section > footer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px 18px;
  border-top: 1px solid #eadfcd;
  background: #fffaf1;
}

.sales-settlement-detail-dialog footer > div {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #eadcc5;
  border-radius: 12px;
  background: #fff;
}

.sales-settlement-detail-dialog footer span {
  color: #746854;
  font-size: 12px;
}

.sales-settlement-detail-dialog footer strong {
  color: #13213a;
  font-size: 18px;
}

.sales-settlement-detail-dialog footer .is-final {
  border-color: #d49b36;
  background: linear-gradient(135deg, #fff8e8, #fff);
}

.sales-settlement-detail-mobile-action {
  display: none !important;
}

.personal-income-table-row .income-amount.cash-received {
  color: #a85b18;
}

.owner-year-end-bonus-sheet > h3 {
  margin: 24px 0 12px;
  color: #172033;
  font-size: 18px;
  font-weight: 950;
}

.owner-year-end-bonus-sheet .sales-settlement-guide {
  margin: 14px 0 18px;
}

.owner-year-end-bonus-sheet .owner-staff-commission-summary {
  margin-bottom: 4px;
}

.owner-year-end-bonus-sheet .owner-staff-commission-table {
  min-width: 1180px;
}

@media (min-width: 901px) {
  .desktop-app .page[data-panel="owner-year-end-bonus-report"].active .year-end-desktop-report .owner-repair-table-wrap {
    overflow-x: hidden;
  }

  .desktop-app .page[data-panel="owner-year-end-bonus-report"].active .owner-year-end-bonus-sheet .owner-staff-commission-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    font-size: 13px;
  }

  .desktop-app .page[data-panel="owner-year-end-bonus-report"].active .owner-year-end-bonus-sheet .owner-staff-commission-table :is(th, td) {
    height: 48px;
    padding: 8px 5px;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .desktop-app .page[data-panel="owner-year-end-bonus-report"].active .owner-year-end-bonus-sheet .owner-staff-commission-table th {
    font-size: 12px;
  }

  .desktop-app .page[data-panel="owner-year-end-bonus-report"].active .owner-year-end-bonus-sheet .owner-staff-commission-table :is(th, td):nth-child(1) { width: 9%; }
  .desktop-app .page[data-panel="owner-year-end-bonus-report"].active .owner-year-end-bonus-sheet .owner-staff-commission-table :is(th, td):nth-child(2) { width: 7%; }
  .desktop-app .page[data-panel="owner-year-end-bonus-report"].active .owner-year-end-bonus-sheet .owner-staff-commission-table :is(th, td):nth-child(3) { width: 8%; }
  .desktop-app .page[data-panel="owner-year-end-bonus-report"].active .owner-year-end-bonus-sheet .owner-staff-commission-table :is(th, td):nth-child(4) { width: 10%; }
  .desktop-app .page[data-panel="owner-year-end-bonus-report"].active .owner-year-end-bonus-sheet .owner-staff-commission-table :is(th, td):nth-child(5) { width: 9%; }
  .desktop-app .page[data-panel="owner-year-end-bonus-report"].active .owner-year-end-bonus-sheet .owner-staff-commission-table :is(th, td):nth-child(6) { width: 10%; }
  .desktop-app .page[data-panel="owner-year-end-bonus-report"].active .owner-year-end-bonus-sheet .owner-staff-commission-table :is(th, td):nth-child(7) { width: 10%; }
  .desktop-app .page[data-panel="owner-year-end-bonus-report"].active .owner-year-end-bonus-sheet .owner-staff-commission-table :is(th, td):nth-child(8) { width: 8%; }
  .desktop-app .page[data-panel="owner-year-end-bonus-report"].active .owner-year-end-bonus-sheet .owner-staff-commission-table :is(th, td):nth-child(9) { width: 8%; }
  .desktop-app .page[data-panel="owner-year-end-bonus-report"].active .owner-year-end-bonus-sheet .owner-staff-commission-table :is(th, td):nth-child(10) {
    width: 21%;
    overflow: visible;
  }

  .desktop-app .page[data-panel="owner-year-end-bonus-report"].active .year-end-bonus-row-actions {
    width: 100%;
    gap: 5px;
  }

  .desktop-app .page[data-panel="owner-year-end-bonus-report"].active :is(.year-end-bonus-detail-button, .year-end-bonus-settle-button) {
    width: auto;
    min-width: 96px;
    min-height: 32px;
    flex: 0 1 112px;
    padding: 5px 7px;
    font-size: 12px;
  }
}

@media (min-width: 901px) and (max-width: 1280px) {
  .desktop-app .page[data-panel="owner-year-end-bonus-report"].active .owner-year-end-bonus-sheet .owner-staff-commission-table {
    font-size: 11px;
  }

  .desktop-app .page[data-panel="owner-year-end-bonus-report"].active .owner-year-end-bonus-sheet .owner-staff-commission-table th {
    font-size: 10px;
  }

  .desktop-app .page[data-panel="owner-year-end-bonus-report"].active .owner-year-end-bonus-sheet .owner-staff-commission-table :is(th, td) {
    height: 44px;
    padding: 6px 3px;
  }

  .desktop-app .page[data-panel="owner-year-end-bonus-report"].active :is(.year-end-bonus-detail-button, .year-end-bonus-settle-button) {
    min-width: 82px;
    min-height: 29px;
    flex-basis: 96px;
    gap: 4px;
    padding: 4px 5px;
    font-size: 10px;
  }

  .desktop-app .page[data-panel="owner-year-end-bonus-report"].active :is(.year-end-bonus-detail-button, .year-end-bonus-settle-button) svg {
    width: 12px;
    height: 12px;
    flex-basis: 12px;
  }
}

.year-end-mobile-dashboard {
  display: none;
}

@media (max-width: 900px) {
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-year-end-bonus-report"].active {
    background:
      radial-gradient(circle at 10% 0%, rgba(255, 255, 255, .88), transparent 34%),
      linear-gradient(135deg, #eeeae2 0%, #f7f4ee 46%, #e8e3da 100%) !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-year-end-bonus-report"].active > .page-title-strip,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-year-end-bonus-report"].active > .main-tabs,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-year-end-bonus-report"].active .owner-fuel-toolbar,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-year-end-bonus-report"].active .year-end-desktop-report {
    display: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-year-end-bonus-report"].active > .content-card,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-year-end-bonus-report"].active .owner-year-end-bonus-sheet {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-dashboard {
    display: block;
    min-height: calc(100dvh - 126px);
    padding: 18px 10px 96px;
    color: #28231e;
  }

  .year-end-mobile-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
  }

  .year-end-mobile-heading h2 {
    margin: 0;
    color: #2c2721;
    font-family: "Noto Serif TC", "PMingLiU", serif;
    font-size: 24px;
    font-weight: 500;
    letter-spacing: .15em;
  }

  .year-end-mobile-heading p {
    margin: 5px 0 0;
    color: #716a62;
    font-size: 11px;
    letter-spacing: .16em;
  }

  .year-end-mobile-heading button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 3px 0;
    border: 0;
    background: transparent;
    color: #4b443d;
    font-size: 12px;
    white-space: nowrap;
  }

  .year-end-mobile-heading button span {
    font-size: 16px;
  }

  .year-end-mobile-info {
    margin: -4px 0 12px;
    padding: 10px 12px;
    border: 1px solid rgba(184, 169, 148, .55);
    border-radius: 10px;
    background: rgba(255, 255, 255, .74);
    color: #665d54;
    font-size: 11px;
    line-height: 1.65;
  }

  .year-end-mobile-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
  }

  .year-end-mobile-select,
  .year-end-mobile-export,
  .year-end-mobile-search {
    box-sizing: border-box;
    min-width: 0;
    min-height: 42px;
    border: 1px solid rgba(197, 187, 174, .7);
    border-radius: 8px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 5px 14px rgba(86, 72, 55, .08);
  }

  .year-end-mobile-select {
    position: relative;
    display: flex;
    align-items: center;
    gap: 7px;
    padding-left: 10px;
  }

  .year-end-mobile-select > span {
    flex: 0 0 auto;
    color: #28231e;
    font-size: 15px;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-select select {
    width: 100% !important;
    min-width: 0 !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 24px 0 0 !important;
    border: 0 !important;
    background-color: transparent !important;
    color: #2f2a25 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 40px !important;
    box-shadow: none !important;
  }

  .year-end-mobile-export {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 8px;
    color: #496350;
    font-size: 12px;
    white-space: nowrap;
  }

  .year-end-mobile-export span {
    color: #2f8b53;
    font-size: 17px;
  }

  .year-end-mobile-search {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    padding-left: 10px;
  }

  .year-end-mobile-search > span {
    color: #6a635b;
    font-size: 19px;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-search input {
    width: 100% !important;
    min-width: 0 !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 8px !important;
    border: 0 !important;
    background: transparent !important;
    color: #2f2a25 !important;
    font-size: 12px !important;
    box-shadow: none !important;
  }

  .year-end-mobile-search button {
    align-self: stretch;
    padding: 0 12px;
    border: 0;
    background: transparent;
    color: #3e3833;
    font-size: 12px;
  }

  .year-end-mobile-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
  }

  .year-end-mobile-summary article {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: start;
    gap: 7px;
    min-width: 0;
    min-height: 84px;
    padding: 11px 8px;
    border: 1px solid rgba(199, 190, 179, .68);
    border-radius: 9px;
    background: rgba(255, 255, 255, .84);
    box-shadow: 0 5px 15px rgba(75, 62, 49, .09);
  }

  .year-end-mobile-summary-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(145deg, #fbfaf7, #ebe5dd);
    color: #705333;
    font-size: 17px;
    box-shadow: 0 3px 8px rgba(76, 58, 39, .12);
  }

  .year-end-mobile-summary-icon svg,
  .year-end-mobile-controls svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .year-end-mobile-search button svg {
    width: 15px;
    height: 15px;
    vertical-align: -3px;
  }

  .year-end-mobile-summary article > div {
    display: grid;
    min-width: 0;
  }

  .year-end-mobile-summary article > div > span {
    overflow: hidden;
    color: #423c36;
    font-size: 10px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .year-end-mobile-summary strong {
    margin-top: 4px;
    color: #302923;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(18px, 5.2vw, 25px);
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
  }

  .year-end-mobile-summary small {
    margin-top: 7px;
    overflow: hidden;
    color: #777066;
    font-size: 8px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .year-end-mobile-summary .tone-5 strong {
    color: #aa6819;
    font-family: inherit;
    font-size: clamp(14px, 4vw, 20px);
    font-weight: 500;
  }

  .year-end-mobile-people {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .year-end-mobile-person {
    position: relative;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    min-width: 0;
    min-height: 122px;
    padding: 10px 8px 9px;
    overflow: hidden;
    border: 1px solid rgba(194, 184, 172, .68);
    border-radius: 8px;
    background: rgba(255, 255, 255, .83);
    color: #28231e;
    text-align: left;
    box-shadow: 0 5px 14px rgba(75, 62, 49, .1);
    opacity: 1 !important;
  }

  .year-end-mobile-person[hidden] {
    display: none !important;
  }

  .year-end-mobile-avatar {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    overflow: hidden;
    border-radius: 50%;
    background: #e8e2d8;
    color: #765f45;
    font-size: 13px;
    font-weight: 800;
  }

  .year-end-mobile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .year-end-mobile-person-copy {
    display: grid;
    min-width: 0;
  }

  .year-end-mobile-person-copy > strong {
    overflow: hidden;
    font-family: "Noto Serif TC", "PMingLiU", serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .year-end-mobile-person-copy em {
    justify-self: start;
    margin-top: 4px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #eef1f5;
    color: #58708c;
    font-size: 8px;
    font-style: normal;
  }

  .year-end-mobile-person-copy small {
    grid-column: 1 / -1;
    margin-top: 14px;
    color: #777068;
    font-size: 8px;
    white-space: nowrap;
  }

  .year-end-mobile-person-copy b {
    grid-column: 1 / -1;
    margin-top: 4px;
    color: #3c342c;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(18px, 5vw, 24px);
    font-weight: 500;
    white-space: nowrap;
  }

  .year-end-mobile-person-copy b i {
    font-family: inherit;
    font-size: 9px;
    font-style: normal;
  }

  .year-end-mobile-chevron {
    position: absolute;
    right: 6px;
    bottom: 5px;
    color: #5e5750;
    font-size: 17px;
  }

  .year-end-mobile-empty {
    margin: 10px 0 0;
    padding: 28px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .75);
    color: #777068;
    text-align: center;
    font-size: 12px;
  }
}

@media (max-width: 390px) {
  .year-end-mobile-dashboard {
    padding-right: 7px !important;
    padding-left: 7px !important;
  }

  .year-end-mobile-controls,
  .year-end-mobile-summary,
  .year-end-mobile-people {
    gap: 5px;
  }

  .year-end-mobile-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .year-end-mobile-summary article {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 4px;
    padding-right: 5px;
    padding-left: 5px;
  }

  .year-end-mobile-summary-icon {
    width: 29px;
    height: 29px;
  }

  .year-end-mobile-person {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 5px;
    padding-right: 5px;
    padding-left: 5px;
  }

  .year-end-mobile-avatar {
    width: 50px;
    height: 50px;
  }
}

/* Mobile year-end bonus reference layout. Keep this block isolated from the
   desktop report so the finance desktop pages retain their table layout. */
@media (max-width: 900px) {
  html body:not(.desktop-page):has(.page[data-panel="owner-year-end-bonus-report"].active) .app-header {
    display: none !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app[data-active-page="owner-year-end-bonus-report"] > .app-header {
    display: none !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  html body:not(.desktop-page):has(.page[data-panel="owner-year-end-bonus-report"].active) .backoffice-toolkit,
  html body:not(.desktop-page):has(.page[data-panel="owner-year-end-bonus-report"].active) .public-frontend-shortcut,
  html body:not(.desktop-page):has(.page[data-panel="owner-year-end-bonus-report"].active) .visitor-chat-floating,
  html body:not(.desktop-page):has(.page[data-panel="owner-year-end-bonus-report"].active) .mobile-floating-tools-handle {
    display: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-year-end-bonus-report"].active {
    min-height: 100dvh !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    background:
      linear-gradient(rgba(248, 246, 242, .84), rgba(244, 240, 234, .9)),
      radial-gradient(ellipse at 82% 2%, rgba(199, 187, 170, .7), transparent 37%),
      radial-gradient(ellipse at 9% 64%, rgba(213, 204, 191, .7), transparent 42%),
      linear-gradient(135deg, #eee9e1, #f8f5ef 48%, #e9e3d9) !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-year-end-bonus-report"].active > .content-card,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-year-end-bonus-report"].active .owner-year-end-bonus-sheet,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-year-end-bonus-report"].active .year-end-mobile-dashboard {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-year-end-bonus-report"].active .year-end-mobile-dashboard {
    display: block !important;
    min-height: 100dvh !important;
    padding: 18px 14px 94px !important;
    color: #25211d !important;
    font-family: "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-heading {
    align-items: flex-start !important;
    min-height: 53px !important;
    gap: 10px !important;
    margin: 0 1px 10px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-heading h2 {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #171411 !important;
    font-family: "Noto Serif TC", "PMingLiU", serif !important;
    font-size: 23px !important;
    font-weight: 500 !important;
    line-height: 1.18 !important;
    letter-spacing: .08em !important;
    white-space: nowrap !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-heading p {
    margin: 5px 0 0 !important;
    color: #514b45 !important;
    font-size: 10px !important;
    line-height: 1.25 !important;
    letter-spacing: .12em !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-heading button {
    min-height: 27px !important;
    padding: 1px 2px !important;
    color: #302b26 !important;
    font-size: 11px !important;
    line-height: 1 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-heading button span {
    font-size: 15px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-info {
    margin: 0 0 10px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px !important;
    margin: 0 0 12px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-select,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-export,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-search {
    min-height: 40px !important;
    border: 1px solid rgba(198, 188, 176, .62) !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, .92) !important;
    box-shadow: 0 5px 14px rgba(73, 60, 47, .1) !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-select {
    gap: 6px !important;
    padding-left: 9px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-select > span,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-export > span {
    display: inline-grid !important;
    place-items: center !important;
    width: 17px !important;
    height: 17px !important;
    flex: 0 0 17px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-select > span svg,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-export > span svg {
    width: 15px !important;
    height: 15px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-select select {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 12px 0 0 !important;
    border: 0 !important;
    background-color: transparent !important;
    color: #27231f !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 38px !important;
    box-shadow: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-export {
    gap: 5px !important;
    min-width: 0 !important;
    padding: 0 7px !important;
    color: #315f40 !important;
    font-size: 11px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-export > span {
    color: #257b43 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-search {
    height: 40px !important;
    min-height: 40px !important;
    padding-left: 10px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-search > span {
    font-size: 17px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-search input {
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 8px !important;
    color: #4b4540 !important;
    font-size: 11px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-search button {
    padding: 0 11px !important;
    color: #302b27 !important;
    font-size: 11px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-summary,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-people {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-summary {
    margin-bottom: 8px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-summary article {
    display: grid !important;
    grid-template-columns: 29px minmax(0, 1fr) !important;
    align-items: start !important;
    gap: 5px !important;
    min-width: 0 !important;
    min-height: 96px !important;
    padding: 11px 7px 8px !important;
    overflow: hidden !important;
    border: 1px solid rgba(198, 188, 176, .58) !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, .88) !important;
    box-shadow: 0 5px 13px rgba(73, 60, 47, .1) !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-summary-icon {
    width: 29px !important;
    height: 29px !important;
    color: #654923 !important;
    background: rgba(247, 243, 236, .98) !important;
    box-shadow: 0 2px 8px rgba(70, 54, 36, .1) !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-summary-icon svg {
    width: 15px !important;
    height: 15px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-summary article > div > span {
    display: block !important;
    min-height: 0 !important;
    overflow: visible !important;
    color: #332e29 !important;
    font-size: 9.5px !important;
    line-height: 1.25 !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-summary strong,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-summary .tone-5 strong {
    margin-top: 5px !important;
    overflow: visible !important;
    color: #241f1b !important;
    font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif !important;
    font-size: clamp(17px, 4.7vw, 21px) !important;
    font-weight: 400 !important;
    line-height: 1.05 !important;
    letter-spacing: -.035em !important;
    white-space: nowrap !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-summary .tone-5 strong {
    color: #a66618 !important;
    font-size: clamp(15px, 4vw, 18px) !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-summary small {
    display: block !important;
    margin-top: 7px !important;
    overflow: hidden !important;
    color: #716a62 !important;
    font-size: 8.5px !important;
    line-height: 1.2 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-person {
    display: grid !important;
    grid-template-columns: 38px minmax(0, 1fr) !important;
    align-items: start !important;
    gap: 4px !important;
    min-width: 0 !important;
    min-height: 124px !important;
    padding: 10px 5px 8px !important;
    overflow: hidden !important;
    border: 1px solid rgba(194, 184, 172, .6) !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, .88) !important;
    box-shadow: 0 5px 13px rgba(73, 60, 47, .11) !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-avatar {
    float: none !important;
    width: 38px !important;
    height: 38px !important;
    margin: 0 !important;
    border: 1px solid rgba(153, 133, 108, .48) !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-person-copy {
    display: grid !important;
    min-width: 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-person-copy > strong {
    padding-top: 1px !important;
    overflow: hidden !important;
    color: #211d19 !important;
    font-family: "Noto Serif TC", "PMingLiU", serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-person-copy em {
    display: table !important;
    justify-self: start !important;
    margin-top: 4px !important;
    padding: 2px 6px !important;
    color: #617696 !important;
    font-size: 8.5px !important;
    background: #edf0f5 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-person:nth-child(1) .year-end-mobile-person-copy em {
    color: #795e2c !important;
    background: #f4eee2 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-person-copy small {
    position: absolute !important;
    right: 8px !important;
    bottom: 39px !important;
    left: 8px !important;
    margin: 0 !important;
    overflow: hidden !important;
    color: #777068 !important;
    font-size: 9px !important;
    line-height: 1 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-person-copy b {
    position: absolute !important;
    right: 17px !important;
    bottom: 11px !important;
    left: 8px !important;
    margin: 0 !important;
    overflow: hidden !important;
    color: #25201c !important;
    font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif !important;
    font-size: clamp(17px, 4.7vw, 20px) !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    letter-spacing: -.03em !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-person-copy b i {
    font-size: 9px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-chevron {
    right: 6px !important;
    bottom: 7px !important;
    color: #4d4741 !important;
    font-size: 15px !important;
  }
}

@media (max-width: 370px) {
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-year-end-bonus-report"].active .year-end-mobile-dashboard {
    padding-right: 12px !important;
    padding-left: 12px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-controls,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-summary,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-people {
    gap: 6px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-person {
    grid-template-columns: 39px minmax(0, 1fr) !important;
    gap: 5px !important;
    padding-right: 5px !important;
    padding-left: 5px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .year-end-mobile-avatar {
    width: 39px !important;
    height: 39px !important;
  }
}

.year-end-bonus-row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.owner-staff-commission-table .year-end-bonus-detail-button,
.owner-staff-commission-table .year-end-bonus-settle-button {
  display: inline-flex;
  min-width: 104px;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .02em;
  line-height: 1;
  white-space: nowrap;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, filter .16s ease;
}

.owner-staff-commission-table .year-end-bonus-detail-button svg,
.owner-staff-commission-table .year-end-bonus-settle-button svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.owner-staff-commission-table .year-end-bonus-detail-button {
  border: 1px solid #cbd5e1;
  background: linear-gradient(180deg, #ffffff 0%, #f3f6fa 100%);
  color: #26364e;
  box-shadow: 0 2px 5px rgba(30, 48, 76, .08), inset 0 1px 0 rgba(255, 255, 255, .9);
}

.owner-staff-commission-table .year-end-bonus-settle-button {
  border: 1px solid #b97810;
  background: linear-gradient(135deg, #e8ad3e 0%, #c78312 100%);
  color: #fff;
  box-shadow: 0 3px 8px rgba(181, 111, 8, .22), inset 0 1px 0 rgba(255, 255, 255, .3);
  text-shadow: 0 1px 1px rgba(99, 57, 0, .22);
}

.owner-staff-commission-table .year-end-bonus-detail-button:hover,
.owner-staff-commission-table .year-end-bonus-settle-button:hover {
  transform: translateY(-1px);
}

.owner-staff-commission-table .year-end-bonus-detail-button:hover {
  border-color: #94a7c2;
  box-shadow: 0 4px 10px rgba(30, 48, 76, .13);
}

.owner-staff-commission-table .year-end-bonus-settle-button:hover {
  filter: brightness(1.04);
  box-shadow: 0 5px 12px rgba(181, 111, 8, .28);
}

.owner-staff-commission-table .year-end-bonus-detail-button:focus-visible,
.owner-staff-commission-table .year-end-bonus-settle-button:focus-visible {
  outline: 3px solid rgba(209, 143, 25, .25);
  outline-offset: 2px;
}

.year-end-bonus-remaining {
  color: #b15f08;
}

.year-end-bonus-complete {
  color: #13804d;
}

.year-end-bonus-row-status {
  color: #6f7786;
  font-size: 12px;
  font-weight: 800;
}

.year-end-bonus-payout,
.sales-wallet-type.year-end {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.year-end-bonus-payout.wallet,
.sales-wallet-type.year-end {
  background: #e7f7ee;
  color: #117244;
}

.year-end-bonus-payout.cash {
  background: #fff0e5;
  color: #b0520b;
}

.year-end-bonus-settlement-empty {
  padding: 28px 16px !important;
  color: #7c7365;
  text-align: center;
}

body.year-end-bonus-settlement-open {
  overflow: hidden;
}

.year-end-bonus-settlement-overlay {
  position: fixed;
  inset: 0;
  z-index: 12050;
  display: grid;
  place-items: center;
  padding: 20px;
}

.year-end-bonus-settlement-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(14, 23, 39, 0.62);
  backdrop-filter: blur(5px);
}

.year-end-bonus-settlement-dialog {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid #e5d5b8;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(10, 20, 36, 0.3);
}

.year-end-bonus-settlement-dialog > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid #eee2d1;
  background: linear-gradient(135deg, #fff8e9, #fff);
}

.year-end-bonus-settlement-dialog header span {
  color: #a66a12;
  font-size: 12px;
  font-weight: 900;
}

.year-end-bonus-settlement-dialog h2 {
  margin: 4px 0 0;
  color: #13213a;
  font-size: 23px;
}

.year-end-bonus-settlement-dialog header > button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid #dfd3c2;
  border-radius: 50%;
  background: #fff;
  color: #26344a;
  font-size: 25px;
}

.year-end-bonus-settlement-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 18px 22px 0;
}

.year-end-bonus-settlement-summary article {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid #eadcc5;
  border-radius: 12px;
  background: #fffaf1;
}

.year-end-bonus-settlement-summary span {
  color: #786b58;
  font-size: 12px;
}

.year-end-bonus-settlement-summary strong {
  color: #15223a;
  font-size: 20px;
}

.year-end-bonus-settlement-dialog form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
  padding: 20px 22px 22px;
}

.year-end-bonus-settlement-dialog form label {
  display: grid;
  gap: 7px;
  color: #28364d;
  font-weight: 900;
}

.year-end-bonus-settlement-dialog form label small {
  color: #807563;
  font-size: 11px;
  font-weight: 500;
}

.year-end-bonus-settlement-dialog input,
.year-end-bonus-settlement-dialog select {
  box-sizing: border-box;
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #d8cdbd;
  border-radius: 10px;
  background: #fff;
  color: #14213a;
  font: inherit;
}

.year-end-bonus-settlement-dialog .year-end-bonus-note,
.year-end-bonus-settlement-dialog footer {
  grid-column: 1 / -1;
}

.year-end-bonus-settlement-dialog footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.year-end-bonus-settlement-dialog footer button {
  min-width: 112px;
  min-height: 42px;
  padding: 8px 16px;
  border: 1px solid #dacdbb;
  border-radius: 10px;
  background: #fff;
  color: #26344a;
  font-weight: 900;
}

.year-end-bonus-settlement-dialog footer button.primary {
  border-color: #b87818;
  background: linear-gradient(135deg, #d9a43a, #b97718);
  color: #fff;
}

.year-end-mobile-detail-dialog {
  width: min(760px, 100%);
}

.year-end-mobile-detail-list {
  display: grid;
  gap: 8px;
  padding: 18px 22px;
}

.year-end-mobile-detail-list > article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e8dfd1;
  border-radius: 12px;
  background: #fff;
}

.year-end-mobile-detail-list article > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.year-end-mobile-detail-list strong {
  overflow: hidden;
  color: #17233a;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.year-end-mobile-detail-list small,
.year-end-mobile-detail-list article > span {
  color: #7b7060;
  font-size: 11px;
}

.year-end-mobile-detail-list article > b {
  color: #a86812;
  white-space: nowrap;
}

.year-end-mobile-detail-list > p {
  margin: 0;
  padding: 30px 12px;
  color: #817668;
  text-align: center;
}

.year-end-mobile-detail-total {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: baseline;
  gap: 12px;
  margin: 0 22px 16px;
  padding: 12px 14px;
  border: 1px solid #ead7b7;
  border-radius: 12px;
  background: #fffaf1;
  color: #6c5a40;
}

.year-end-mobile-detail-total strong {
  color: #a86812;
  font-size: 20px;
}

.year-end-mobile-detail-total small {
  color: #827460;
}

.year-end-mobile-detail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 22px 20px;
}

.year-end-mobile-detail-actions button {
  min-width: 112px;
  min-height: 42px;
  padding: 8px 16px;
  border: 1px solid #dacdbb;
  border-radius: 10px;
  background: #fff;
  color: #26344a;
  font-weight: 900;
}

.year-end-mobile-detail-actions button.primary {
  border-color: #b87818;
  background: linear-gradient(135deg, #d9a43a, #b97718);
  color: #fff;
}

@media (max-width: 600px) {
  .year-end-bonus-settlement-overlay {
    align-items: end;
    padding: 8px;
  }

  .year-end-bonus-settlement-dialog {
    max-height: calc(100vh - 16px);
    border-radius: 18px 18px 10px 10px;
  }

  .year-end-bonus-settlement-summary {
    grid-template-columns: 1fr;
  }

  .year-end-bonus-settlement-dialog form {
    grid-template-columns: 1fr;
  }

  .year-end-bonus-settlement-dialog footer {
    grid-column: 1;
  }

  .year-end-bonus-settlement-dialog footer button {
    flex: 1;
  }
}

@media (max-width: 1000px) {
  .sales-settlement-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sales-settlement-owner-checkout {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .sales-settlement-batches > div {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .sales-settlement-detail-reports .sale-report-layout.three .sale-report-board,
  .sales-settlement-detail-reports .sale-report-layout.three.two .sale-report-board {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .sales-settlement-summary {
    grid-template-columns: 1fr;
  }

  .sales-settlement-guide {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .sales-settlement-batches article dl {
    grid-template-columns: repeat(2, 1fr);
  }

  .sales-settlement-detail-dialog {
    padding: 0;
  }

  .sales-settlement-detail-dialog > section {
    width: 100vw;
    max-height: 100dvh;
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .sales-settlement-detail-dialog > section > header {
    padding: 13px 15px;
  }

  .sales-settlement-detail-dialog header h2 {
    font-size: 17px;
  }

  .sales-settlement-detail-reports {
    padding: 10px;
  }

  .sales-settlement-detail-dialog > section > footer {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 9px 10px;
  }

  .sales-settlement-detail-dialog footer > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
  }

  .sales-settlement-detail-dialog footer > div.sales-settlement-detail-mobile-action {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 9px;
    padding: 12px;
    border-color: #ddb969;
    background: #fff8e8;
  }

  .sales-settlement-detail-mobile-action h3,
  .sales-settlement-detail-mobile-action p,
  .sales-settlement-detail-mobile-note,
  .sales-settlement-detail-mobile-action > button {
    grid-column: 1 / -1;
  }

  .sales-settlement-detail-mobile-action h3 {
    margin: 0;
    color: #17233a;
    font-size: 16px;
  }

  .sales-settlement-detail-mobile-action p {
    margin: -4px 0 2px;
    color: #756b5e;
    font-size: 11px;
  }

  .sales-settlement-detail-mobile-action label {
    display: grid;
    gap: 5px;
    min-width: 0;
    color: #625846;
    font-size: 11px;
    font-weight: 900;
  }

  .sales-settlement-detail-mobile-action input,
  .sales-settlement-detail-mobile-action select {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid #d9cfbf;
    border-radius: 9px;
    background: #fff;
    color: #17233a;
    font: inherit;
  }

  .sales-settlement-detail-mobile-action label > strong {
    display: flex;
    min-height: 42px;
    align-items: center;
    padding: 0 10px;
    border: 1px solid #d9cfbf;
    border-radius: 9px;
    background: #fff;
    font-size: 12px;
  }

  .sales-settlement-detail-mobile-action > button {
    min-height: 44px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #d9a43a, #b97718);
    color: #fff;
    font-size: 14px;
    font-weight: 950;
  }

  .sales-settlement-detail-dialog > section {
    grid-template-rows: auto 52px minmax(0, 1fr) !important;
  }

  .sales-settlement-detail-dialog > section > header {
    min-height: 72px;
    padding: 10px 13px !important;
  }

  .sales-settlement-detail-dialog header h2 {
    max-width: calc(100vw - 78px);
    margin: 2px 0 !important;
    overflow: hidden;
    font-size: 18px !important;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sales-settlement-detail-dialog header button {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    flex: 0 0 38px !important;
    padding: 0 !important;
    font-size: 25px !important;
  }

  .sales-settlement-detail-mobile-tabs {
    box-sizing: border-box;
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    align-items: center !important;
    padding: 6px 10px !important;
  }

  .sales-settlement-detail-mobile-tabs button {
    box-sizing: border-box;
    width: 100% !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    margin: 0 !important;
    padding: 0 10px !important;
    line-height: 38px !important;
  }

  .sales-settlement-detail-dialog [data-sales-settlement-detail-panel].active {
    grid-row: 3;
    min-height: 0 !important;
  }

  .sales-settlement-detail-reports.active,
  .sales-settlement-detail-dialog > section > footer.active {
    height: auto !important;
    max-height: none !important;
    align-self: stretch !important;
    overflow-y: auto !important;
  }

  .sales-settlement-detail-dialog > section > footer.active {
    align-content: start !important;
    gap: 8px !important;
    padding: 10px 10px calc(18px + env(safe-area-inset-bottom)) !important;
    background: #fffaf1 !important;
  }

  .sales-settlement-detail-dialog > section > footer.active > div {
    min-height: 48px;
    padding: 10px 12px !important;
    border-radius: 10px;
  }
}

@media (max-width: 600px) {
  .year-end-mobile-detail-total {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 8px;
    margin: 0 10px 12px;
  }

  .year-end-mobile-detail-total small {
    grid-column: 1 / -1;
  }

  .year-end-mobile-detail-dialog .year-end-bonus-settlement-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 12px 10px 0;
  }

  .year-end-mobile-detail-dialog .year-end-bonus-settlement-summary article {
    min-width: 0;
    padding: 9px 7px;
  }

  .year-end-mobile-detail-dialog .year-end-bonus-settlement-summary strong {
    font-size: clamp(15px, 4.6vw, 20px);
    white-space: nowrap;
  }

  .year-end-mobile-detail-list {
    max-height: 52dvh;
    overflow: auto;
    padding: 12px 10px;
  }

  .year-end-mobile-detail-list > article {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 9px;
    padding: 10px;
  }

  .year-end-mobile-detail-list article > span {
    grid-column: 1;
  }

  .year-end-mobile-detail-list article > b {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .year-end-mobile-detail-actions {
    padding: 0 10px 12px;
  }

  .year-end-mobile-detail-actions button {
    flex: 1;
  }
}

/* Only the ROC year selector carries a long bilingual label on mobile. */
@media (max-width: 900px) {
  .desktop-app .page[data-panel^="owner-"].active select[data-owner-reconcile-year] {
    min-width: 0;
    padding-right: 22px;
    padding-left: 7px;
    font-size: 10px !important;
    letter-spacing: -0.2px;
  }
}

/* Mobile miscellaneous-expense report: keep the live table controls, but reflow
   the same DOM into readable cards instead of forcing a 760px desktop table. */
@media (max-width: 900px) {
  .page[data-panel="owner-expense-report"].active .owner-expense-card {
    padding: 8px !important;
    overflow: hidden !important;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-card .owner-fuel-toolbar {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding: 10px !important;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-card .owner-fuel-toolbar > label {
    width: 100% !important;
    min-width: 0 !important;
    gap: 4px !important;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-card .owner-fuel-toolbar > label > span {
    font-size: 11px !important;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-card .owner-fuel-toolbar > label > select {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 38px !important;
    height: 38px !important;
    padding: 0 26px 0 9px !important;
    font-size: 12px !important;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-card .owner-fuel-mode-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    margin: 0;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-card .owner-fuel-mode-actions button {
    width: 100%;
    min-height: 42px;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    padding: 8px 4px;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-summary-grid article {
    min-width: 0;
    min-height: 88px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    justify-items: center;
    gap: 3px;
    padding: 7px 3px;
    border-radius: 10px;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-summary-grid article.total {
    grid-column: 1 / -1;
    order: -1;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-summary-grid article > span {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    font-size: 13px;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-summary-grid article > div {
    min-width: 0;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    text-align: center;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-summary-grid small {
    width: 100%;
    min-height: 24px;
    font-size: 9px;
    line-height: 1.2;
    letter-spacing: -0.25px;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-summary-grid strong {
    display: inline;
    font-size: 15px;
    line-height: 1.1;
    white-space: nowrap;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-summary-grid em {
    display: inline;
    margin-left: 2px;
    font-size: 9px;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-summary-grid b {
    width: 100%;
    margin-top: 2px;
    font-size: 9px;
    line-height: 1.1;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-sheet {
    width: 100%;
    min-width: 0;
    padding: 10px !important;
    overflow: hidden;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-category-tabs {
    display: none;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-sheet h2 {
    padding: 11px 8px;
    border-radius: 10px;
    font-size: 16px;
    line-height: 1.35;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-detail-card {
    border-radius: 10px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-detail-table {
    display: table;
    width: 100% !important;
    min-width: 680px !important;
    table-layout: fixed !important;
    border-collapse: collapse;
    font-size: 12px !important;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-detail-table thead {
    display: table-header-group;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-detail-table tbody,
  .page[data-panel="owner-expense-report"].active .owner-expense-detail-table tfoot {
    display: table-row-group;
    width: auto;
    max-width: none;
    min-width: 0 !important;
    padding: 0;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-detail-table tbody tr.owner-expense-data-row {
    position: static;
    display: table-row;
    width: auto;
    padding: 0;
    border: 0;
    background: #fff;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-detail-table tbody tr.owner-expense-data-row > td {
    display: table-cell;
    width: auto;
    min-width: 0;
    height: 42px;
    min-height: 42px;
    padding: 7px 6px;
    border: 1px solid #dce3ec;
    background: transparent;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-detail-table tbody tr.owner-expense-data-row > td::before {
    content: none;
    display: none;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-detail-table tbody tr.owner-expense-data-row > td:first-child {
    position: static;
    display: table-cell;
    width: 42px;
    min-height: 42px;
    padding: 7px 4px;
    border: 1px solid #dce3ec;
    border-radius: 0;
    background: transparent;
    color: #172033;
    font-size: 12px;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-detail-table tbody tr.owner-expense-data-row > td:first-child::before {
    content: none;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-detail-table tbody tr.owner-expense-data-row > td:nth-child(2),
  .page[data-panel="owner-expense-report"].active .owner-expense-detail-table tbody tr.owner-expense-data-row > td:last-child {
    grid-column: auto;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-detail-table tbody tr.owner-expense-data-row > td:nth-last-child(-n + 2) {
    border-bottom: 1px solid #dce3ec;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-detail-table :is(th, td):nth-child(1) { width: 42px; }
  .page[data-panel="owner-expense-report"].active .owner-expense-detail-table :is(th, td):nth-child(2) { width: 150px; }
  .page[data-panel="owner-expense-report"].active .owner-expense-detail-table :is(th, td):nth-child(3) { width: 100px; }
  .page[data-panel="owner-expense-report"].active .owner-expense-detail-table :is(th, td):nth-child(4) { width: 108px; }
  .page[data-panel="owner-expense-report"].active .owner-expense-detail-table :is(th, td):nth-child(5) { width: 94px; }
  .page[data-panel="owner-expense-report"].active .owner-expense-detail-table :is(th, td):last-child { width: 92px; }

  .page[data-panel="owner-expense-report"].active .owner-expense-detail-table th {
    height: 40px;
    padding: 7px 6px;
    border-color: rgba(255, 255, 255, 0.14);
    font-size: 12px;
    white-space: nowrap;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-detail-table tbody tr:nth-child(even) {
    background: #f8fafc;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-detail-table tbody td [contenteditable="true"] {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 8px;
    border: 1px solid #d8e0eb;
    border-radius: 8px;
    background: #fff;
    text-align: left;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-detail-table.is-editing tbody tr.owner-expense-data-row > td:nth-child(3),
  .page[data-panel="owner-expense-report"].active .owner-expense-detail-table.is-editing tbody tr.owner-expense-data-row > td:nth-child(4) {
    grid-column: auto;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-detail-table.is-editing tbody td [contenteditable="true"] {
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-detail-table .owner-accounting-include-col label {
    justify-self: center;
    width: auto;
    max-width: 100%;
    min-height: 18px;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-detail-table .owner-accounting-include-check input[type="checkbox"] {
    width: 18px !important;
    max-width: 18px !important;
    height: 18px !important;
    min-height: 18px !important;
    margin: 0;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-empty-row {
    display: block;
    width: 100%;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-empty-row td {
    display: block;
    width: 100%;
    height: auto;
    padding: 24px 12px;
    border: 1px dashed #d8e0eb;
    border-radius: 10px;
    color: #64748b;
    text-align: center;
    white-space: normal;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-detail-table tfoot {
    display: table-footer-group;
    padding: 0;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-subtotal-row {
    display: table-row;
    width: auto;
    padding: 0;
    border-radius: 0;
    background: #f3f8ef;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-subtotal-row td {
    display: table-cell;
    width: auto;
    height: 42px;
    padding: 7px 6px;
    border: 1px solid #dce3ec;
    background: #f3f8ef;
    white-space: normal;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-subtotal-row td:nth-child(2),
  .page[data-panel="owner-expense-report"].active .owner-expense-subtotal-row td:nth-child(3) {
    color: #0f5132;
    font-size: 13px;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-insight-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-radius: 12px;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-insight-strip section {
    min-height: 0;
    padding: 10px 11px;
    border-right: 1px solid rgba(148, 163, 184, 0.28);
    border-bottom: 1px solid rgba(148, 163, 184, 0.28);
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-insight-strip section:nth-child(2n) {
    border-right: 0;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-insight-strip section:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-insight-strip section:last-child {
    border-bottom: 0;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-insight-strip h3 {
    margin-bottom: 6px;
    font-size: 13px;
    line-height: 1.35;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-insight-strip p,
  .page[data-panel="owner-expense-report"].active .owner-expense-insight-strip li {
    margin: 3px 0;
    font-size: 11px;
    line-height: 1.45;
  }

  .page[data-panel="owner-expense-report"].active .owner-expense-insight-strip ol {
    gap: 2px;
    padding-left: 14px;
  }

  .owner-expense-dialog-overlay {
    align-items: end;
    padding: 10px;
  }

  .owner-expense-dialog-card {
    max-height: calc(100dvh - 20px);
    border-radius: 16px 16px 10px 10px;
    overflow-y: auto;
  }

  .owner-expense-dialog-body {
    gap: 10px;
    padding: 14px;
  }

  .owner-expense-dialog-body .owner-expense-dialog-check {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    justify-content: start;
    gap: 9px;
    width: 100%;
    min-height: 34px;
    padding-right: 48px;
  }

  .owner-expense-dialog-body .owner-expense-dialog-check input[type="checkbox"] {
    width: 18px !important;
    max-width: 18px !important;
    height: 18px !important;
    min-height: 18px !important;
    margin: 0;
  }

  .owner-expense-dialog-body .owner-expense-dialog-check span {
    min-width: 0;
    line-height: 1.35;
  }
}

@media (max-width: 900px) {
  html body .mobile-app .page[data-panel^="owner-"].active .owner-fuel-toolbar {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: end !important;
    gap: 6px !important;
  }

  html body .mobile-app .page[data-panel^="owner-"].active .owner-fuel-toolbar > label {
    min-width: 0 !important;
    gap: 3px !important;
  }

  html body .mobile-app .page[data-panel^="owner-"].active .owner-fuel-toolbar > label > span {
    font-size: 11px !important;
    line-height: 1.2 !important;
  }

  html body .mobile-app .page[data-panel^="owner-"].active .owner-fuel-toolbar > label > select,
  html body .mobile-app .page[data-panel^="owner-"].active select[data-owner-reconcile-year],
  html body .mobile-app .page[data-panel^="owner-"].active select[data-owner-reconcile-month],
  html body .mobile-app .page[data-panel="owner-expense-report"].active select[data-owner-expense-year],
  html body .mobile-app .page[data-panel="owner-expense-report"].active select[data-owner-expense-month],
  html body .mobile-app .page[data-panel="owner-repair-report"].active select[data-owner-repair-year],
  html body .mobile-app .page[data-panel="owner-repair-report"].active select[data-owner-repair-month] {
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 28px 0 9px !important;
    font-size: 12px !important;
    line-height: 38px !important;
  }

  html body .mobile-app .page[data-panel="owner-year-end-bonus-report"].active .owner-fuel-toolbar {
    grid-template-columns: minmax(0, 156px) !important;
  }

  html body .mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-toolbar {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.8fr) auto !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-period-field select,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-fuel-report"].active [data-owner-fuel-query] {
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-header-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
    width: 100% !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .owner-profit-period-field {
    min-width: 0 !important;
    gap: 3px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .owner-profit-period-field select,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-header-actions button {
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
  }
}

/* Final mobile finance period sizing override. */
@media (max-width: 900px) {
  html body .desktop-app .page[data-panel^="owner-"].active .owner-fuel-toolbar {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: end !important;
    gap: 6px !important;
  }

  html body .desktop-app .page[data-panel^="owner-"].active .owner-fuel-toolbar > label {
    min-width: 0 !important;
    gap: 3px !important;
  }

  html body .desktop-app .page[data-panel^="owner-"].active .owner-fuel-toolbar > label > span {
    font-size: 11px !important;
    line-height: 1.2 !important;
  }

  html body .desktop-app .page[data-panel^="owner-"].active .owner-fuel-toolbar > label > select,
  html body .desktop-app .page[data-panel^="owner-"].active select[data-owner-reconcile-year],
  html body .desktop-app .page[data-panel^="owner-"].active select[data-owner-reconcile-month],
  html body .desktop-app .page[data-panel="owner-expense-report"].active select[data-owner-expense-year],
  html body .desktop-app .page[data-panel="owner-expense-report"].active select[data-owner-expense-month],
  html body .desktop-app .page[data-panel="owner-repair-report"].active select[data-owner-repair-year],
  html body .desktop-app .page[data-panel="owner-repair-report"].active select[data-owner-repair-month] {
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 28px 0 9px !important;
    font-size: 12px !important;
    line-height: 38px !important;
  }

  html body .desktop-app .page[data-panel="owner-year-end-bonus-report"].active .owner-fuel-toolbar {
    grid-template-columns: minmax(0, 156px) !important;
  }

  html body .desktop-app .page[data-panel="owner-fuel-report"].active .owner-fuel-toolbar {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.8fr) auto !important;
  }

  html body .desktop-app .page[data-panel="owner-fuel-report"].active .owner-fuel-period-field select {
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 28px 0 8px !important;
    font-size: 12px !important;
  }

  html body .desktop-app .page[data-panel="owner-fuel-report"].active [data-owner-fuel-query] {
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 12px !important;
    font-size: 12px !important;
  }

  html body .desktop-app .page[data-panel="owner-profit-report"].active .finance-header-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
    width: 100% !important;
  }

  html body .desktop-app .page[data-panel="owner-profit-report"].active .owner-profit-period-field {
    min-width: 0 !important;
    gap: 3px !important;
  }

  html body .desktop-app .page[data-panel="owner-profit-report"].active .owner-profit-period-field select,
  html body .desktop-app .page[data-panel="owner-profit-report"].active .finance-header-actions button {
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
  }
}

/* Keep every mobile finance period selector readable. The ROC year label is
   substantially longer than the month label, so equal columns clip it on
   narrow phones even when the select itself stays inside the card. */
@media (max-width: 900px) {
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel^="owner-"].active .owner-fuel-toolbar {
    grid-template-columns: minmax(0, 1.45fr) minmax(74px, 0.55fr) !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel^="owner-"].active .owner-fuel-toolbar > label > select,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel^="owner-"].active select[data-owner-reconcile-year],
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel^="owner-"].active select[data-owner-reconcile-month],
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active select[data-owner-expense-year],
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active select[data-owner-expense-month],
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-repair-report"].active select[data-owner-repair-year],
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-repair-report"].active select[data-owner-repair-month] {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding-right: 20px !important;
    padding-left: 8px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-year-end-bonus-report"].active .owner-fuel-toolbar {
    grid-template-columns: minmax(0, min(200px, 100%)) !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-toolbar {
    grid-template-columns: minmax(0, 1.75fr) minmax(64px, 0.65fr) minmax(62px, 0.6fr) !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-repair-report"].active .owner-repair-vendor-select-field,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-repair-report"].active .owner-fuel-mode-actions,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-fuel-mode-actions {
    grid-column: 1 / -1 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-header-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .owner-profit-period-field:first-child {
    grid-column: span 3;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .owner-profit-period-field:nth-child(2) {
    grid-column: span 1;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-header-actions > button {
    grid-column: span 2;
  }
}

/* Mobile miscellaneous-expense report layout. Keep the existing data and
   controls, but arrange them as the compact five-column report shown in the
   mobile design reference. Desktop presentation is intentionally untouched. */
@media (max-width: 900px) {
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-card {
    gap: 10px !important;
    padding: 10px 8px 12px !important;
    background: #f8fafc !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-card .owner-fuel-toolbar {
    gap: 10px 8px !important;
    padding: 11px !important;
    border: 1px solid #dfe5ec !important;
    border-radius: 12px !important;
    background: #fff !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-card .owner-fuel-mode-actions {
    grid-column: 1 / -1 !important;
    display: flex !important;
    justify-content: flex-end !important;
    gap: 7px !important;
    width: 100% !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-card .owner-fuel-mode-actions button {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 62px !important;
    min-height: 36px !important;
    padding: 0 14px !important;
    border-radius: 9px !important;
    font-size: 12px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active [data-owner-expense-open-dialog] {
    border-color: #d3b98a !important;
    background: #fff !important;
    color: #76501d !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active [data-owner-expense-mode] {
    border-color: #1c2940 !important;
    background: #1c2940 !important;
    color: #fff !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-summary-grid {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 5px !important;
    padding: 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-summary-grid article,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-summary-grid article.total {
    grid-column: auto !important;
    order: initial !important;
    min-width: 0 !important;
    min-height: 112px !important;
    align-content: start !important;
    justify-items: center !important;
    gap: 4px !important;
    padding: 10px 3px 7px !important;
    border: 1px solid #e1e6ed !important;
    border-radius: 9px !important;
    overflow: hidden !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-summary-grid article.total {
    border-color: #243149 !important;
    background: linear-gradient(160deg, #111b2e, #243149) !important;
    color: #fff !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-summary-grid article > span {
    width: 22px !important;
    height: 22px !important;
    flex: 0 0 22px !important;
    font-size: 11px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-summary-grid article > div {
    width: 100% !important;
    min-width: 0 !important;
    justify-content: center !important;
    text-align: center !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-summary-grid small {
    width: 100% !important;
    min-height: 32px !important;
    color: #334155 !important;
    font-size: 8.5px !important;
    line-height: 1.35 !important;
    letter-spacing: -0.2px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-summary-grid strong {
    max-width: 100% !important;
    color: #132238 !important;
    font-size: clamp(10px, 3vw, 13px) !important;
    line-height: 1.15 !important;
    letter-spacing: -0.45px !important;
    white-space: nowrap !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-summary-grid em,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-summary-grid b {
    font-size: 8px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-summary-grid article.total :is(small, strong, em, b) {
    color: #f4d39b !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-sheet {
    display: grid !important;
    gap: 10px !important;
    padding: 0 !important;
    overflow: visible !important;
    background: transparent !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-sheet > h2 {
    margin: 0 !important;
    padding: 11px 12px !important;
    border: 1px solid #dfe5ec !important;
    border-radius: 8px !important;
    background: #fff !important;
    color: #1e293b !important;
    font-size: 14px !important;
    line-height: 1.35 !important;
    text-align: left !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-sheet > h2::before {
    content: "▦";
    margin-right: 7px;
    color: #b67b28;
    font-size: 12px;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-card {
    overflow: hidden !important;
    border: 1px solid #dfe5ec !important;
    border-radius: 9px !important;
    background: #fff !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-card > header {
    min-height: 42px !important;
    padding: 0 11px !important;
    background: #fff !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-card > header strong {
    font-size: 12px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-card > header small {
    font-size: 10px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    table-layout: auto !important;
    border-collapse: separate !important;
    background: #fff !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table thead,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table tbody,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table tfoot {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table thead tr,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table tbody tr.owner-expense-data-row {
    display: grid !important;
    grid-template-columns: 0.92fr 1.15fr 0.9fr 1.05fr 0.98fr !important;
    width: 100% !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table tbody tr.owner-expense-data-row:nth-child(even) {
    background: #f8fafc !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table :is(th, td) {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 42px !important;
    padding: 6px 3px !important;
    border: 0 !important;
    border-right: 1px solid #dfe5ec !important;
    border-bottom: 1px solid #dfe5ec !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #1e293b !important;
    font-size: 9.5px !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
    text-align: center !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table th {
    min-height: 39px !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
    background: linear-gradient(180deg, #243149, #1b2639) !important;
    color: #fff !important;
    font-size: 9.5px !important;
    font-weight: 900 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table :is(th, td):nth-child(1) {
    display: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table :is(th, td):nth-child(4) { order: 1; }
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table :is(th, td):nth-child(2) { order: 2; }
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table :is(th, td):nth-child(3) { order: 3; }
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table :is(th, td):nth-child(5) { order: 4; }
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table :is(th, td):last-child { order: 5; border-right: 0 !important; }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table tbody tr.owner-expense-data-row > td::before {
    content: none !important;
    display: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table td:nth-child(2) {
    justify-content: flex-start !important;
    text-align: left !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table td:nth-child(3) {
    justify-content: flex-end !important;
    padding-right: 6px !important;
    font-weight: 950 !important;
    text-align: right !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table.is-editing :is(th, td):nth-last-child(2) {
    grid-column: 1 / -1 !important;
    order: 6 !important;
    min-height: 36px !important;
    border-right: 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table.is-editing th:nth-last-child(2) {
    display: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table tbody td [contenteditable="true"] {
    width: 100% !important;
    min-width: 0 !important;
    padding: 5px 3px !important;
    border-radius: 5px !important;
    font-size: 9.5px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table .owner-accounting-include-check input[type="checkbox"] {
    width: 17px !important;
    max-width: 17px !important;
    height: 17px !important;
    min-height: 17px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-empty-row,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-empty-row td {
    display: block !important;
    width: 100% !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-subtotal-row {
    display: grid !important;
    grid-template-columns: 1.15fr 0.9fr 3.93fr !important;
    width: 100% !important;
    padding: 0 !important;
    border: 0 !important;
    background: #f6f7f9 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-subtotal-row td {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-height: 42px !important;
    padding: 6px 4px !important;
    border: 0 !important;
    border-right: 1px solid #dfe5ec !important;
    background: transparent !important;
    font-size: 10px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-subtotal-row td:first-child {
    grid-column: 1 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-subtotal-row td:nth-child(2) {
    grid-column: 2 !important;
    color: #1f4f3a !important;
    font-size: 11px !important;
    font-weight: 950 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-subtotal-row td:last-child {
    grid-column: 3 !important;
    border-right: 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-insight-strip {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    border: 1px solid #dfe5ec !important;
    border-radius: 9px !important;
    background: #fff !important;
    overflow: hidden !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-insight-strip section {
    min-width: 0 !important;
    padding: 9px 6px !important;
    border-right: 1px solid #e2e8f0 !important;
    border-bottom: 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-insight-strip section:last-child {
    border-right: 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-insight-strip h3 {
    min-height: 28px !important;
    margin: 0 0 5px !important;
    font-size: 9px !important;
    line-height: 1.3 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-insight-strip :is(p, li) {
    margin: 2px 0 !important;
    font-size: 8px !important;
    line-height: 1.35 !important;
    overflow-wrap: anywhere !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-insight-strip ol {
    gap: 1px !important;
    padding-left: 12px !important;
  }
}

@media (max-width: 900px) {
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-sheet > h2::before {
    content: "\25A6" !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-insight-strip section {
    background: #fff !important;
    color: #334155 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-insight-strip h3 {
    color: #6f4c1f !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-insight-strip :is(p, li) {
    color: #475569 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-insight-strip strong {
    color: #b46f15 !important;
  }
}

/* Expense detail table: match the compact five-column mobile report. */
.page[data-panel="owner-expense-report"] .owner-expense-mobile-only {
  display: none;
}

@media (max-width: 900px) {
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-mobile-only {
    display: inline !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-desktop-only {
    display: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-card > header {
    min-height: 46px !important;
    border-bottom: 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table thead tr,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table tbody tr.owner-expense-data-row,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-subtotal-row {
    grid-template-columns: 0.88fr 1.25fr 0.95fr 1.5fr 1.18fr !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table th {
    min-height: 40px !important;
    padding: 6px 3px !important;
    font-size: 10px !important;
    white-space: nowrap !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table tbody tr.owner-expense-data-row > td {
    min-height: 50px !important;
    padding: 7px 4px !important;
    font-size: 9.5px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table td:nth-child(4) {
    white-space: nowrap !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table td:nth-child(5) {
    line-height: 1.35 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-subtotal-row td:first-child {
    display: flex !important;
    grid-column: 1 / 3 !important;
    justify-content: flex-start !important;
    padding-left: 12px !important;
    text-align: left !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-subtotal-row td:nth-child(2) {
    display: flex !important;
    grid-column: 3 !important;
    color: #1e293b !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-subtotal-row td:last-child {
    display: flex !important;
    grid-column: 4 / 6 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-accounting-include-check {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 28px !important;
    padding: 0 3px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    background: #e9e9e9 !important;
    color: #667085 !important;
    cursor: pointer !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-accounting-include-check::after {
    content: "使用會計金";
    font-size: 8px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-accounting-include-check:has(input:checked) {
    border-color: #b8cfbf !important;
    background: #e3efe7 !important;
    color: #28613e !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table .owner-accounting-include-check input[type="checkbox"] {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    opacity: 0 !important;
    cursor: pointer !important;
  }
}

/* Final mobile safeguard: keep every expense-table column inside the card even
   while the responsive shell still carries its desktop body class. */
@media (max-width: 900px) {
  html body #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active :is(.owner-expense-detail-grid, .owner-expense-detail-card, .owner-expense-detail-table),
  html body #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table :is(thead, tbody, tfoot) {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  html body #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-mobile-only {
    display: inline !important;
  }

  html body #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-desktop-only {
    display: none !important;
  }

  html body #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table thead tr,
  html body #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table tbody tr.owner-expense-data-row,
  html body #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-subtotal-row {
    display: grid !important;
    grid-template-columns: 0.88fr 1.25fr 0.95fr 1.5fr 1.18fr !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  html body #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table :is(th, td) {
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  html body #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table :is(th, td):nth-child(1) {
    display: none !important;
  }

  html body #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table :is(th, td):nth-child(4) { order: 1 !important; }
  html body #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table :is(th, td):nth-child(2) { order: 2 !important; }
  html body #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table :is(th, td):nth-child(3) { order: 3 !important; }
  html body #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table :is(th, td):nth-child(5) { order: 4 !important; }
  html body #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-detail-table :is(th, td):last-child { order: 5 !important; }

  html body #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-empty-row {
    display: none !important;
  }

  html body #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-subtotal-row td:first-child {
    display: flex !important;
    grid-column: 1 / 3 !important;
  }

  html body #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-subtotal-row td:nth-child(2) {
    display: flex !important;
    grid-column: 3 !important;
  }

  html body #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-subtotal-row td:last-child {
    display: flex !important;
    grid-column: 4 / 6 !important;
  }
}

/* Compact finance period controls on phones. */
@media (max-width: 900px) {
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel^="owner-"].active .owner-fuel-toolbar {
    grid-template-columns: minmax(0, 158px) minmax(64px, 86px) !important;
    justify-content: start !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel^="owner-"].active :is(
    select[data-owner-reconcile-year],
    select[data-owner-fuel-year],
    select[data-owner-expense-year],
    select[data-owner-repair-year]
  ) {
    width: 100% !important;
    min-width: 0 !important;
    padding-right: 18px !important;
    padding-left: 6px !important;
    font-size: 10px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-year-end-bonus-report"].active .owner-fuel-toolbar {
    grid-template-columns: minmax(0, 158px) !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-toolbar {
    grid-template-columns: minmax(0, 158px) minmax(64px, 82px) auto !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-card .owner-fuel-toolbar {
    grid-template-columns: minmax(0, 1fr) minmax(52px, 60px) auto !important;
    align-items: end !important;
    gap: 6px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-card .owner-fuel-toolbar > label {
    width: auto !important;
    min-width: 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-card .owner-fuel-mode-actions {
    grid-column: 3 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 5px !important;
    width: auto !important;
    min-width: 0 !important;
  }

  /* Match the mobile-only rule's specificity so the action group does not
     fall back to a full-width second row on the real page. */
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-card .owner-fuel-mode-actions {
    grid-column: 3 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 5px !important;
    width: auto !important;
    min-width: 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-card .owner-fuel-mode-actions button {
    width: auto !important;
    min-width: 42px !important;
    min-height: 38px !important;
    padding: 0 6px !important;
    font-size: 10.5px !important;
    white-space: nowrap !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-card [data-owner-expense-open-dialog] {
    min-width: 56px !important;
    order: 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-card [data-owner-expense-mode] {
    order: 1 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-header-actions {
    grid-template-columns: minmax(0, 150px) minmax(64px, 78px) repeat(2, minmax(64px, 1fr)) !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .owner-profit-period-field:first-child,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .owner-profit-period-field:nth-child(2),
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-header-actions > button {
    grid-column: auto !important;
  }
}

/* Keep these final because the shared compact finance rules above have the
   same specificity and otherwise restore the two-column toolbar on phones. */
@media (max-width: 900px) {
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-remittance-report"].active > .owner-reconcile-title-strip {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 7px !important;
    padding: 8px !important;
    box-sizing: border-box !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-remittance-report"].active > .owner-reconcile-title-strip h1 {
    color: #0f172a !important;
    text-shadow: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-remittance-report"].active .owner-fuel-toolbar {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 0.72fr) minmax(0, 1.2fr) 58px !important;
    column-gap: 8px !important;
    row-gap: 6px !important;
    margin-bottom: 9px !important;
  }
}

/* Finance phone toolbars: a four-digit Western year only needs a compact
   control. Keep the period filters aligned while returning space to the
   month, account and action controls. */
@media (max-width: 900px) {
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel^="owner-"].active .owner-fuel-toolbar {
    grid-template-columns: 104px minmax(64px, 78px) !important;
    justify-content: start !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-year-end-bonus-report"].active .owner-fuel-toolbar {
    grid-template-columns: 104px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-fuel-report"].active .owner-fuel-toolbar {
    grid-template-columns: 104px 74px 64px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-card .owner-fuel-toolbar {
    grid-template-columns: 104px 74px auto !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-header-actions {
    grid-template-columns: 104px 74px repeat(2, minmax(64px, 1fr)) !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel^="owner-"].active :is(
    select[data-owner-reconcile-year],
    select[data-owner-fuel-year],
    select[data-owner-expense-year],
    select[data-owner-repair-year]
  ) {
    width: 100% !important;
    max-width: 104px !important;
  }

  /* This page already has four controls on one line; its responsive first
     column is naturally 85-100px depending on phone width. */
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-remittance-report"].active .owner-fuel-toolbar {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 0.72fr) minmax(0, 1.2fr) 58px !important;
  }

  /* Vehicle repair reconciliation uses two compact rows:
     year/month, then vendor/actions. */
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-repair-report"].active .owner-fuel-toolbar {
    grid-template-columns: 112px 74px minmax(0, 1fr) !important;
    column-gap: 6px !important;
    row-gap: 8px !important;
    align-items: end !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-repair-report"].active .owner-fuel-toolbar > label:first-child {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-repair-report"].active .owner-fuel-toolbar > label:nth-child(2) {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-repair-report"].active .owner-repair-vendor-select-field {
    grid-column: 1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-repair-report"].active .owner-fuel-mode-actions {
    grid-column: 2 / -1 !important;
    grid-row: 2 !important;
    display: grid !important;
    grid-auto-flow: column !important;
    grid-auto-columns: minmax(0, 1fr) !important;
    gap: 5px !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-repair-report"].active .owner-fuel-mode-actions button {
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 6px !important;
    font-size: 11px !important;
    white-space: nowrap !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-repair-report"].active .owner-fuel-mode-actions:has(button:nth-child(3)) button {
    min-height: 32px !important;
    padding: 2px !important;
    font-size: 9.5px !important;
    line-height: 1.05 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }
}

/* Remittance filters use two compact rows, including account and reconciliation status. */
@media (max-width: 900px) {
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-remittance-report"].active .owner-fuel-toolbar {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 0.72fr) minmax(108px, 1.2fr) !important;
    grid-template-rows: auto auto !important;
    column-gap: 6px !important;
    row-gap: 7px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-remittance-report"].active .owner-fuel-toolbar > label:first-child {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-remittance-report"].active .owner-fuel-toolbar > label:nth-child(2) {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-remittance-report"].active .owner-remittance-account-filter {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-remittance-report"].active .owner-remittance-loan-bank-filter {
    grid-column: 3 !important;
    grid-row: 1 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-remittance-report"].active .owner-remittance-status-filter {
    grid-column: 2 !important;
    grid-row: 2 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-remittance-report"].active .owner-remittance-filter-button {
    grid-column: 3 !important;
    grid-row: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
  }
}
@media (max-width: 899px) {
  body:not(.desktop-page) .mobile-nav-branch-host[data-mobile-nav-branch="finance"] .mobile-nav-branch-sheet {
    max-height: min(76svh, 650px) !important;
  }

  body:not(.desktop-page) .mobile-nav-branch-host[data-mobile-nav-branch="finance"] .mobile-finance-nav-sections {
    display: block !important;
    max-height: calc(min(76svh, 650px) - 56px) !important;
    overflow: auto !important;
    padding: 8px 12px 12px !important;
  }

  .mobile-finance-nav-section {
    padding: 6px 0 9px;
    border-bottom: 1px solid #eee5d8;
  }

  .mobile-finance-nav-section:last-child {
    padding-bottom: 2px;
    border-bottom: 0;
  }

  .mobile-finance-nav-section > header {
    display: grid;
    min-height: 32px;
    grid-template-columns: 22px auto 1fr;
    align-items: center;
    gap: 5px;
    padding: 0 3px 6px;
  }

  .mobile-finance-nav-section > header > span {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    color: #a66d18;
  }

  .mobile-finance-nav-section > header svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-finance-nav-section > header strong {
    color: #97651d;
    font-size: 13px;
    line-height: 1;
  }

  .mobile-finance-nav-section > header small {
    overflow: hidden;
    color: #8e8a83;
    font-size: 8px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body:not(.desktop-page) .mobile-finance-nav-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px 9px !important;
  }

  body:not(.desktop-page) .mobile-finance-nav-grid > button {
    display: grid !important;
    min-width: 0 !important;
    min-height: 42px !important;
    grid-template-columns: 25px minmax(0, 1fr) 14px !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 6px 8px !important;
    border: 1px solid #e9e2d7 !important;
    border-radius: 8px !important;
    background: linear-gradient(180deg, #fff 0%, #fdfbf7 100%) !important;
    color: #27231e !important;
    box-shadow: 0 2px 5px rgba(76, 56, 25, 0.04) !important;
    text-align: left !important;
  }

  body:not(.desktop-page) .mobile-finance-nav-grid > button:active {
    border-color: #c99748 !important;
    background: #fff7e9 !important;
  }

  .mobile-finance-nav-grid > button > i {
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    color: #9f6817;
    font-style: normal;
  }

  .mobile-finance-nav-grid > button > i svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.45;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-finance-nav-grid > button > span {
    overflow: hidden;
    font-size: 11px;
    font-weight: 850;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-finance-nav-grid .mobile-finance-nav-arrow {
    width: 14px !important;
    height: 14px !important;
    color: #af7622;
  }
}

/* Keep the miscellaneous-expense grand total prominent on phones: one full
   width card above four category shortcuts. */
@media (max-width: 900px) {
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-summary-grid article.total {
    grid-column: 1 / -1 !important;
    order: -1 !important;
    min-height: 94px !important;
    display: grid !important;
    grid-template-columns: 46px minmax(0, 1fr) !important;
    align-items: center !important;
    align-content: center !important;
    justify-items: start !important;
    gap: 12px !important;
    padding: 14px 18px !important;
    border-radius: 13px !important;
    overflow: visible !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-summary-grid article.total > span {
    width: 46px !important;
    height: 46px !important;
    flex: 0 0 46px !important;
    font-size: 20px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-summary-grid article.total > div {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: baseline !important;
    justify-content: flex-start !important;
    gap: 0 5px !important;
    text-align: left !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-summary-grid article.total small {
    width: 100% !important;
    min-height: 0 !important;
    margin-bottom: 3px !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    letter-spacing: 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-summary-grid article.total strong {
    max-width: none !important;
    font-size: clamp(27px, 8vw, 36px) !important;
    line-height: 1 !important;
    letter-spacing: -0.7px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-summary-grid article.total em {
    font-size: 12px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-summary-grid article.total b {
    width: 100% !important;
    margin-top: 4px !important;
    font-size: 11px !important;
  }

  /* Keep the four category totals readable without enlarging their row count. */
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-summary-grid .owner-expense-category-card strong {
    font-size: clamp(16px, 4.6vw, 19px) !important;
    line-height: 1.1 !important;
    letter-spacing: -0.35px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-expense-report"].active .owner-expense-summary-grid .owner-expense-category-card em {
    margin-left: 2px !important;
    font-size: 11px !important;
    line-height: 1.1 !important;
  }
}

/* Final phone-only lock for the accounting reference layout. It must follow
   every shared finance toolbar rule in this stylesheet. */
@media (max-width: 900px) {
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app[data-active-page="owner-accounting-cash-report"] > .app-header {
    display: none !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active {
    min-height: 100dvh !important;
    padding: 18px 14px 96px !important;
    overflow-x: hidden !important;
    background: #f8f6f2 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active > .owner-reconcile-title-strip {
    margin: 0 0 14px !important;
    padding: 0 5px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active > .owner-reconcile-title-strip h1 {
    gap: 8px !important;
    color: #151515 !important;
    font-size: 25px !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active > .owner-reconcile-title-strip h1::after {
    content: none !important;
    color: #62676f !important;
    font-size: 16px !important;
    font-weight: 500 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-fuel-toolbar.owner-fuel-toolbar {
    display: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-cash-page {
    gap: 14px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-summary-grid {
    min-height: 132px !important;
    padding: 20px 12px 17px !important;
    border: 0 !important;
    border-radius: 13px !important;
    background: #fff !important;
    box-shadow: 0 7px 22px rgba(50, 43, 34, .08) !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-summary-grid > article {
    min-height: 94px !important;
    padding: 0 12px !important;
    border-right: 1px solid #ece9e3 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-summary-grid > article > span {
    color: #656b76 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-summary-grid > article > strong {
    margin-top: 10px !important;
    font-size: clamp(22px, 6.3vw, 27px) !important;
    font-weight: 800 !important;
    line-height: 1 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-summary-grid > article > small {
    margin-top: auto !important;
    color: #68707b !important;
    font-size: 10px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table-card {
    padding: 0 12px 12px !important;
    border: 0 !important;
    border-radius: 13px !important;
    background: #fff !important;
    box-shadow: 0 7px 22px rgba(50, 43, 34, .075) !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-head-actions {
    margin: 0 -6px 5px !important;
    border: 1px solid #ded9d1 !important;
    border-radius: 9px !important;
    box-shadow: 0 4px 14px rgba(50, 43, 34, .04) !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-head-actions button {
    min-height: 48px !important;
    color: #242424 !important;
    font-size: 15px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-head-actions button.active {
    color: #a66a13 !important;
    background: #fffaf2 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table-head h3 {
    padding: 17px 4px 12px !important;
    color: #242424 !important;
    font-size: 17px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table th {
    height: 43px !important;
    padding: 11px 7px !important;
    background: #102039 !important;
    color: #fff !important;
    font-size: 11px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-table td {
    min-height: 66px !important;
    padding: 12px 7px !important;
    color: #202124 !important;
    font-size: 12px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-view-btn::after {
    content: "›" !important;
    color: #616975 !important;
    font-size: 25px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-repair-ledger-footer {
    min-height: 52px !important;
    color: #68707c !important;
    font-size: 11px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-checkout-center {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-action-stack {
    gap: 9px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-side-action {
    grid-template-columns: 46px minmax(0, 1fr) 22px !important;
    min-height: 74px !important;
    padding: 9px 14px !important;
    border: 1.5px solid #292929 !important;
    border-radius: 9px !important;
    background: #fff !important;
    color: #151515 !important;
    box-shadow: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-side-action::before {
    width: 40px !important;
    height: 40px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #111 !important;
    font-size: 30px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-side-action::after {
    content: "›" !important;
    color: #111 !important;
    font-size: 29px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-side-action strong {
    color: #171717 !important;
    font-size: 16px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-side-action span {
    color: #3f4650 !important;
    font-size: 10px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-ranking-card {
    margin-top: 2px !important;
    padding: 15px 16px !important;
    border: 0 !important;
    border-radius: 13px !important;
    background: #fff !important;
    box-shadow: 0 7px 22px rgba(50, 43, 34, .075) !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-ranking-card h3 {
    margin-bottom: 10px !important;
    font-size: 17px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-ranking-list li {
    min-height: 43px !important;
    font-size: 12px !important;
  }
}

/* Business settlement cards: keep the phone view focused on the six values
   staff need for reconciliation while preserving the full desktop table. */
@media (max-width: 900px) {
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active > .owner-fuel-card,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .owner-remittance-report-shell {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-page {
    box-sizing: border-box !important;
    width: calc(100% - 16px) !important;
    max-width: calc(100% - 16px) !important;
    min-width: 0 !important;
    margin-right: auto !important;
    margin-left: auto !important;
    overflow-x: hidden !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-summary {
    grid-template-columns: 1fr !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-wallet-settlement-filters,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-owner-checkout {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table-card {
    overflow: visible !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table-card > header {
    margin-bottom: 8px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table-card > header h2 {
    font-size: 19px !important;
    line-height: 1.35 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table-card > header p {
    display: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table-card .owner-repair-table-wrap {
    overflow: hidden !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table {
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
    border: 0 !important;
    background: transparent !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table thead {
    display: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody {
    display: grid !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr {
    position: relative !important;
    display: grid !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    min-width: 0 !important;
    min-height: 0 !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-content: start !important;
    gap: 10px !important;
    padding: 15px !important;
    border: 1px solid #d9dee7 !important;
    border-radius: 14px !important;
    background: #fff !important;
    box-shadow: 0 5px 16px rgba(15, 23, 42, 0.07) !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td {
    display: grid !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-width: 0 !important;
    gap: 6px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #172033 !important;
    font-size: 14px !important;
    font-weight: 750 !important;
    line-height: 1.4 !important;
    text-align: left !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td::before {
    color: #64748b !important;
    font-size: 11px !important;
    font-weight: 850 !important;
    line-height: 1.25 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(1),
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(n+8) {
    display: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(2) {
    grid-column: 1 / -1 !important;
    padding: 0 0 10px !important;
    border-bottom: 1px solid #e7eaf0 !important;
    font-size: 15px !important;
    font-weight: 850 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(2)::before { content: "過戶日期" !important; }
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(3)::before { content: "車輛" !important; }
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(4)::before { content: "業務" !important; }
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(5)::before { content: "三明細差額" !important; }
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(6)::before { content: "分潤拆分" !important; }
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(7)::before { content: "最終結算" !important; }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(3) {
    grid-column: 1 / -1 !important;
    gap: 8px !important;
    padding: 3px 0 14px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(3) > strong {
    overflow: visible !important;
    font-size: 18px !important;
    line-height: 1.3 !important;
    text-overflow: clip !important;
    white-space: normal !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table .sales-settlement-details-button {
    position: static !important;
    inset: auto !important;
    float: none !important;
    align-self: start !important;
    width: max-content !important;
    min-height: 34px !important;
    margin: 4px 0 1px !important;
    padding: 6px 11px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 850 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table td > small,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table td > strong + small {
    display: block !important;
    overflow: visible !important;
    margin: 0 !important;
    font-size: 12px !important;
    line-height: 1.45 !important;
    text-overflow: clip !important;
    white-space: normal !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(n+4):nth-child(-n+7) {
    grid-column: 1 / -1 !important;
    min-height: 0 !important;
    align-content: start !important;
    gap: 6px !important;
    padding: 13px 0 7px !important;
    border: 0 !important;
    border-top: 1px solid #e7eaf0 !important;
    border-radius: 0 !important;
    background: transparent !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(n+4):nth-child(-n+7) > strong {
    font-size: 15px !important;
    line-height: 1.45 !important;
    white-space: normal !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(7) > strong {
    color: #a56f12 !important;
    font-size: 16px !important;
    line-height: 1.35 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-batches,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-batches > div,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-batches article,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-batch-details,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-batch-detail-list {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-batches:not(.sales-settlement-legacy-batches) {
    display: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-batches article > div:first-child,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-batches article dl {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-batch-detail-row.is-heading {
    display: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-batch-detail-row:not(.is-heading) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0 !important;
    min-width: 0 !important;
    padding: 8px 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-batch-detail-row:not(.is-heading) > * {
    display: grid !important;
    grid-template-columns: 82px minmax(0, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 7px 10px !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-batch-detail-row:not(.is-heading) > *::before {
    color: #7b7061 !important;
    font-size: 11px !important;
    font-weight: 850 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-batch-detail-row:not(.is-heading) > :nth-child(1)::before { content: "過戶日期"; }
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-batch-detail-row:not(.is-heading) > :nth-child(2)::before { content: "車輛"; }
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-batch-detail-row:not(.is-heading) > :nth-child(3)::before { content: "業務"; }
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-batch-detail-row:not(.is-heading) > :nth-child(4)::before { content: "三明細差額"; }
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-batch-detail-row:not(.is-heading) > :nth-child(5)::before { content: "最終結算"; }
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-batch-detail-row:not(.is-heading) > :nth-child(6)::before { content: "給付／實繳"; }
}

@media (max-width: 430px) {
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr {
    min-height: 0 !important;
    padding: 14px !important;
  }
}

/* Desktop business settlement table: larger copy with tighter fields and rows. */
@media (min-width: 901px) {
  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table {
    min-width: 1280px;
    table-layout: fixed;
    font-size: 14px;
  }

  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table th,
  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table td {
    height: 30px;
    min-height: 30px;
    padding: 4px 5px;
    font-size: 14px;
    line-height: 1.3;
  }

  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table th {
    font-size: 14px;
    font-weight: 900;
  }

  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table td > strong {
    font-size: 14px;
    line-height: 1.32;
  }

  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table td > small,
  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table td > strong + small,
  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-status + small {
    margin-top: 2px;
    font-size: 12px;
    line-height: 1.3;
  }

  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table input[type="number"],
  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table input[type="text"],
  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table select {
    min-width: 0;
    min-height: 31px;
    padding: 4px 6px;
    border-radius: 7px;
    font-size: 13px;
    line-height: 1.2;
  }

  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-status,
  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-method {
    padding: 4px 7px;
    font-size: 12px;
  }

  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-details-button {
    min-height: 28px;
    margin-top: 5px;
    padding: 4px 8px;
    font-size: 12px;
  }

  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-confirm {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 13px;
  }

  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table :is(th, td):nth-child(1) { width: 4%; }
  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table :is(th, td):nth-child(2) { width: 7%; }
  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table :is(th, td):nth-child(3) { width: 11%; }
  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table :is(th, td):nth-child(4) { width: 7%; }
  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table :is(th, td):nth-child(5) { width: 10%; }
  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table :is(th, td):nth-child(6) { width: 9%; }
  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table :is(th, td):nth-child(7) { width: 10%; }
  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table :is(th, td):nth-child(8) { width: 8%; }
  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table :is(th, td):nth-child(9) { width: 9%; min-width: 0; }
  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table :is(th, td):nth-child(10) { width: 9%; }
  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table :is(th, td):nth-child(11) { width: 9%; }
  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table :is(th, td):nth-child(12) { width: 7%; }
}

/* Desktop business reconciliation: denser rows with more readable primary data. */
@media (min-width: 901px) {
  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table {
    font-size: 15px;
  }

  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table th,
  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table td {
    height: 26px;
    min-height: 26px;
    padding: 3px 4px;
    font-size: 15px;
    line-height: 1.18;
    vertical-align: middle;
  }

  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table th {
    padding-top: 7px;
    padding-bottom: 7px;
    font-size: 15px;
    line-height: 1.16;
  }

  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody tr {
    height: 86px;
  }

  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table td:nth-child(2),
  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table td:nth-child(4) {
    font-size: 17px;
    font-weight: 950;
    line-height: 1.1;
    white-space: nowrap;
  }

  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table td:nth-child(3) > strong {
    font-size: 16px;
    line-height: 1.16;
  }

  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table td > strong {
    font-size: 15.5px;
    line-height: 1.16;
  }

  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table td > small,
  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table td > strong + small,
  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-status + small {
    margin-top: 1px;
    font-size: 11.5px;
    line-height: 1.15;
  }

  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table input[type="number"],
  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table input[type="text"],
  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table select {
    min-height: 29px;
    padding: 3px 5px;
    font-size: 14px;
    line-height: 1.1;
  }

  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-status,
  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-method {
    padding: 3px 6px;
    font-size: 12.5px;
    line-height: 1.1;
  }

  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-details-button {
    min-height: 24px;
    margin-top: 3px;
    padding: 3px 7px;
    font-size: 12.5px;
    line-height: 1.1;
  }

  body.desktop-page .desktop-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-confirm {
    min-height: 30px;
    padding: 4px 8px;
    font-size: 14px;
    line-height: 1.1;
  }
}

/* Narrow iPhone layout: prevent the overview from being compressed into
   desktop-like columns on 393px screens. Existing controls and tables remain. */
@media (max-width: 480px) {
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-overview-dashboard {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas:
      "profit-head"
      "profit-summary"
      "profit-expense"
      "profit-loans"
      "profit-ranking"
      "profit-income"
      "profit-detail" !important;
    gap: 10px !important;
    padding: 10px 8px 14px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-overview-header {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 9px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-overview-header h2 {
    font-size: 22px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-overview-header p {
    font-size: 10px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-header-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .owner-profit-period-field:first-child,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .owner-profit-period-field:nth-child(2),
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-header-actions > button {
    grid-column: auto !important;
    width: 100% !important;
    max-width: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .owner-profit-period-field select,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-header-actions button {
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 10px !important;
    font-size: 11px !important;
    line-height: 38px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-summary-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-summary-card {
    grid-template-columns: 34px minmax(0, 1fr) !important;
    gap: 7px !important;
    min-height: 104px !important;
    padding: 11px 10px !important;
    overflow: visible !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-summary-icon {
    width: 32px !important;
    height: 32px !important;
    font-size: 16px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-summary-card small {
    font-size: 11px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-summary-card strong {
    margin-top: 10px !important;
    overflow: visible !important;
    font-size: clamp(19px, 5.5vw, 23px) !important;
    white-space: nowrap !important;
    text-overflow: clip !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-summary-card em {
    margin-top: 10px !important;
    font-size: 9px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-panel {
    padding: 12px 11px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-panel h3 {
    font-size: 15px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-panel > header button {
    min-height: 28px !important;
    padding: 0 7px !important;
    font-size: 10px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-donut-wrap {
    grid-template-columns: 104px minmax(0, 1fr) !important;
    gap: 12px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-donut {
    width: 96px !important;
    height: 96px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-donut::after {
    inset: 26px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-donut strong,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-expense-structure li {
    font-size: 10px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-donut span {
    font-size: 14px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-expense-structure ul {
    width: calc(100% - 12px) !important;
    margin-left: 12px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-expense-structure li {
    grid-template-columns: 8px minmax(0, 1fr) 38px 60px !important;
    gap: 6px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-loan-card {
    padding: 9px 8px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-loan-card h4 {
    font-size: 11px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-loan-card dl {
    grid-template-columns: 43px minmax(0, 1fr) !important;
    gap: 3px 6px !important;
    font-size: 9px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-income-ranking li {
    grid-template-columns: 21px minmax(0, 1fr) 62px !important;
    gap: 3px 7px !important;
    font-size: 10px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-income-ranking li > b {
    width: 20px !important;
    height: 20px !important;
    font-size: 9px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-income-ranking li > strong {
    font-size: 10px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-income-table-card th,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-income-table-card td {
    height: 30px !important;
    min-height: 30px !important;
    padding: 5px 6px !important;
    font-size: 10px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-detail-table-card th,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-profit-report"].active .finance-detail-table-card td {
    height: 28px !important;
    min-height: 28px !important;
    padding: 4px 6px !important;
    font-size: 10px !important;
  }
}

/* Accounting cash: compact phone summary and primary view switch. */
@media (max-width: 900px) {
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active > .owner-reconcile-title-strip {
    margin-bottom: 8px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active > .owner-reconcile-title-strip h1 {
    display: flex !important;
    align-items: center !important;
    min-width: 0 !important;
    font-size: 20px !important;
    white-space: nowrap !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active > .owner-reconcile-title-strip h1::after {
    content: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-mobile-title-meta {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    min-width: 0 !important;
    margin-left: 7px !important;
    color: #6b7280 !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-mobile-title-meta i,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-mobile-title-meta b {
    font-size: 13px !important;
    font-style: normal !important;
    font-weight: 700 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-summary-grid {
    min-height: 108px !important;
    padding: 15px 8px 13px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-summary-grid > article {
    min-height: 78px !important;
    padding: 0 10px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-summary-grid > article > strong {
    margin-top: 8px !important;
    font-size: clamp(18px, 5.3vw, 21px) !important;
    letter-spacing: -.035em !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-summary-grid > .owner-accounting-pending-card > strong {
    color: #f05a0b !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-summary-grid > .owner-accounting-limit-card:nth-child(3) > strong.green {
    color: #009963 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-mobile-view-tabs {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0 !important;
    width: 100% !important;
    min-height: 38px !important;
    overflow: hidden !important;
    border: 1px solid #ded8cf !important;
    border-radius: 8px !important;
    background: #fff !important;
    box-shadow: 0 4px 13px rgba(50, 43, 34, .05) !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-mobile-view-tabs button {
    min-width: 0 !important;
    min-height: 38px !important;
    padding: 0 8px !important;
    border: 0 !important;
    border-right: 1px solid #e3ddd5 !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: #262626 !important;
    font-size: 14px !important;
    font-weight: 800 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-mobile-view-tabs button:last-child {
    border-right: 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-mobile-view-tabs button.active {
    background: #fffaf1 !important;
    color: #b27316 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-head-actions {
    display: none !important;
  }
}

/* Mobile business settlement: compact two-column cards with only the requested overview fields. */
@media (max-width: 900px) {
  /* Vehicle repair reconciliation: year, month and vendor share the first row. */
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-repair-report"].active .owner-fuel-toolbar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(68px, .72fr) minmax(0, 1.3fr) !important;
    column-gap: 6px !important;
    row-gap: 8px !important;
    align-items: end !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-repair-report"].active .owner-fuel-toolbar > label:first-child {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-repair-report"].active .owner-fuel-toolbar > label:nth-child(2) {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-repair-report"].active .owner-repair-vendor-select-field {
    grid-column: 3 !important;
    grid-row: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-repair-report"].active .owner-fuel-toolbar > label select {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 24px 0 8px !important;
    font-size: 11px !important;
    line-height: 38px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-repair-report"].active .owner-fuel-mode-actions {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  /* Shared finance statistics: one white strip with evenly divided columns. */
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page.active :is(
    .agency-summary-grid,
    .sales-settlement-summary,
    .owner-staff-commission-summary,
    .year-end-mobile-summary,
    .owner-accounting-summary-grid,
    .owner-fuel-mobile-metrics,
    .finance-summary-cards,
    .consignment-nominee-summary
  ) {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 0 !important;
    margin-bottom: 10px !important;
    padding: 8px 4px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    border: 1px solid #dce3ec !important;
    border-radius: 8px !important;
    background: #fff !important;
    box-shadow: none !important;
    scrollbar-width: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page.active :is(
    .agency-summary-grid,
    .sales-settlement-summary,
    .owner-accounting-summary-grid,
    .owner-fuel-mobile-metrics,
    .finance-summary-cards
  ) {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page.active .owner-accounting-summary-grid,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page.active .consignment-nominee-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page.active :is(
    .owner-staff-commission-summary,
    .year-end-mobile-summary
  ) {
    display: grid !important;
    grid-template-columns: none !important;
    grid-auto-flow: column !important;
    grid-auto-columns: minmax(84px, 1fr) !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page.active :is(
    .agency-summary-grid,
    .sales-settlement-summary,
    .owner-staff-commission-summary,
    .year-end-mobile-summary,
    .owner-accounting-summary-grid,
    .owner-fuel-mobile-metrics,
    .finance-summary-cards,
    .consignment-nominee-summary
  )::-webkit-scrollbar {
    display: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page.active :is(
    .agency-summary-grid,
    .sales-settlement-summary,
    .owner-staff-commission-summary,
    .year-end-mobile-summary,
    .owner-accounting-summary-grid,
    .owner-fuel-mobile-metrics,
    .finance-summary-cards,
    .consignment-nominee-summary
  ) > article {
    position: relative !important;
    display: flex !important;
    grid-column: auto !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    min-width: 0 !important;
    min-height: 72px !important;
    padding: 5px 4px !important;
    overflow: visible !important;
    border: 0 !important;
    border-right: 1px solid #dce3ec !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #18243a !important;
    text-align: center !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page.active :is(
    .agency-summary-grid,
    .sales-settlement-summary,
    .owner-staff-commission-summary,
    .year-end-mobile-summary,
    .owner-fuel-mobile-metrics,
    .finance-summary-cards,
    .consignment-nominee-summary
  ) > article:last-child,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-summary-grid > article:nth-child(3) {
    border-right: 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page.active :is(
    .agency-summary-grid,
    .year-end-mobile-summary,
    .finance-summary-cards,
    .consignment-nominee-summary
  ) > article > div {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    text-align: center !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page.active :is(
    .agency-summary-icon,
    .year-end-mobile-summary-icon,
    .finance-summary-icon,
    .owner-fuel-mobile-metric-icon
  ),
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page.active .consignment-nominee-summary > article > span:first-child,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page.active .owner-fuel-sparkline {
    display: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page.active :is(
    .agency-summary-grid article div > small,
    .sales-settlement-summary article > span,
    .owner-staff-commission-summary article > span,
    .year-end-mobile-summary article div > span,
    .owner-accounting-summary-grid article > span,
    .owner-fuel-mobile-metric > b,
    .finance-summary-card div > small,
    .consignment-nominee-summary article div > small
  ) {
    display: block !important;
    width: 100% !important;
    min-height: 22px !important;
    overflow: hidden !important;
    color: #4e596d !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    letter-spacing: -.02em !important;
    text-align: center !important;
    text-overflow: ellipsis !important;
    white-space: normal !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page.active :is(
    .agency-summary-grid article strong,
    .sales-settlement-summary article > strong,
    .owner-staff-commission-summary article > strong,
    .year-end-mobile-summary article strong,
    .owner-accounting-summary-grid article > strong,
    .owner-fuel-mobile-metric > strong,
    .finance-summary-card strong,
    .consignment-nominee-summary article strong
  ) {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 2px 0 0 !important;
    overflow: visible !important;
    color: #18243a !important;
    font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif !important;
    font-size: clamp(13px, 3.8vw, 16px) !important;
    font-weight: 850 !important;
    line-height: 1.05 !important;
    letter-spacing: -.045em !important;
    text-align: center !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page.active :is(
    .agency-summary-grid article em,
    .sales-settlement-summary article > small,
    .owner-staff-commission-summary article > small,
    .year-end-mobile-summary article small,
    .owner-accounting-summary-grid article > small,
    .owner-fuel-mobile-delta,
    .finance-summary-card em,
    .consignment-nominee-summary article em
  ) {
    display: block !important;
    width: 100% !important;
    min-height: 0 !important;
    margin: 3px 0 0 !important;
    overflow: hidden !important;
    color: #748095 !important;
    font-size: 8px !important;
    font-style: normal !important;
    font-weight: 650 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-summary-grid > article:nth-child(4) {
    border-right: 1px solid #dce3ec !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active :is(.sales-wallet-overview, .sales-wallet-person-stats) {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0 !important;
    width: 100% !important;
    padding: 8px 4px !important;
    overflow: hidden !important;
    border: 1px solid #dce3ec !important;
    border-radius: 8px !important;
    background: #fff !important;
    box-shadow: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-wallet-person-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active :is(.sales-wallet-overview, .sales-wallet-person-stats) > article {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    min-width: 0 !important;
    min-height: 72px !important;
    padding: 5px 4px !important;
    border: 0 !important;
    border-right: 1px solid #dce3ec !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-align: center !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active :is(.sales-wallet-overview, .sales-wallet-person-stats) > article:last-child {
    border-right: 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active :is(.sales-wallet-overview, .sales-wallet-person-stats) article > span {
    min-height: 22px !important;
    color: #4e596d !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active :is(.sales-wallet-overview, .sales-wallet-person-stats) article > strong {
    margin-top: 2px !important;
    color: #18243a !important;
    font-size: clamp(13px, 3.8vw, 16px) !important;
    font-weight: 850 !important;
    line-height: 1.05 !important;
    letter-spacing: -.045em !important;
    white-space: nowrap !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-wallet-overview article > small {
    width: 100% !important;
    margin-top: 3px !important;
    overflow: hidden !important;
    color: #748095 !important;
    font-size: 8px !important;
    line-height: 1.2 !important;
    text-align: center !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-summary {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-auto-flow: row !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  /* Mobile accounting balance typography and status colors. */
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-summary-grid {
    min-height: 112px !important;
    padding: 15px 8px 13px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-summary-grid > article {
    min-height: 82px !important;
    padding: 0 8px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-summary-grid > article > span {
    color: #5f6570 !important;
    font-size: 12px !important;
    font-weight: 750 !important;
    line-height: 1.2 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-summary-grid > article > strong {
    margin-top: 10px !important;
    color: #111820 !important;
    font-size: clamp(20px, 6vw, 25px) !important;
    font-weight: 850 !important;
    line-height: 1 !important;
    letter-spacing: -.045em !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-summary-grid > article > strong > .owner-accounting-mobile-value {
    display: inline-block !important;
    margin: 0 !important;
    color: inherit !important;
    font-family: inherit !important;
    font-size: inherit !important;
    font-style: normal !important;
    font-weight: inherit !important;
    line-height: inherit !important;
    letter-spacing: inherit !important;
    white-space: nowrap !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-summary-grid > .owner-accounting-pending-card > strong {
    color: #f05a0b !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-summary-grid > .owner-accounting-pending-card > strong > .owner-accounting-mobile-value {
    color: #f05a0b !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-summary-grid > .owner-accounting-limit-card:nth-child(3) > strong,
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-summary-grid > article > strong.green {
    color: #009963 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-summary-grid > .owner-accounting-limit-card:nth-child(3) > strong > .owner-accounting-mobile-value {
    color: #009963 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-accounting-cash-report"].active .owner-accounting-summary-grid > article > small {
    margin-top: auto !important;
    color: #5f6570 !important;
    font-size: 9px !important;
    font-weight: 650 !important;
    line-height: 1.25 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-wallet-settlement-filters {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: end !important;
    gap: 8px !important;
    padding: 10px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-wallet-settlement-filters > label {
    display: grid !important;
    gap: 4px !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-wallet-settlement-filters > label > span {
    font-size: 11px !important;
    line-height: 1.2 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-wallet-settlement-filters select {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 30px 0 10px !important;
    border-radius: 9px !important;
    font-size: 13px !important;
    line-height: 40px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr {
    min-height: 0 !important;
    align-content: start !important;
    gap: 4px !important;
    padding: 10px !important;
    border-color: #dedbd5 !important;
    border-radius: 12px !important;
    background: linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(249, 247, 242, .96)) !important;
    box-shadow: 0 4px 12px rgba(28, 36, 48, .07) !important;
    cursor: pointer !important;
    touch-action: manipulation;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(1),
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(n+5) {
    display: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(2),
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(3),
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(4) {
    display: grid !important;
    grid-column: 1 / -1 !important;
    gap: 2px !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    font-size: 12px !important;
    font-weight: 850 !important;
    line-height: 1.25 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(2)::before {
    content: "過戶日期" !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(3)::before {
    content: "買方" !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(4)::before {
    content: "業務" !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td::before {
    color: #777064 !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    line-height: 1.1 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(2) {
    position: static !important;
    z-index: auto !important;
    color: #172033 !important;
    font-size: 13px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(3),
  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(4) {
    position: relative !important;
    z-index: 1 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-mobile-photo {
    position: absolute !important;
    z-index: 0 !important;
    inset: 0 !important;
    display: block !important;
    overflow: hidden !important;
    border-radius: 11px !important;
    background: #eef1f4 !important;
    pointer-events: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-mobile-photo::after {
    position: absolute !important;
    inset: 0 !important;
    content: "" !important;
    background: linear-gradient(100deg, rgba(255, 255, 255, .42), rgba(255, 255, 255, .24)) !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-mobile-photo img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    opacity: .9 !important;
    filter: saturate(.9) contrast(.96) brightness(.98) !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-mobile-state {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    z-index: 3 !important;
    display: inline-flex !important;
    width: max-content !important;
    min-height: 23px !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    padding: 4px 7px !important;
    border: 1px solid transparent !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, .94) !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    box-shadow: 0 3px 10px rgba(15, 23, 42, .12) !important;
    backdrop-filter: blur(5px);
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-mobile-state i {
    display: grid !important;
    width: 13px !important;
    height: 13px !important;
    place-items: center !important;
    border-radius: 50% !important;
    font-size: 8px !important;
    font-style: normal !important;
    line-height: 1 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-mobile-state.pending {
    border-color: #f5d99a !important;
    color: #a86a00 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-mobile-state.pending i {
    background: #ffbd2e !important;
    color: #ffbd2e !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-mobile-state.settled {
    border-color: #a8dfbf !important;
    background: rgba(230, 247, 237, .96) !important;
    color: #167447 !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-mobile-state.settled i {
    background: #43a875 !important;
    color: #fff !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-date-value {
    display: block !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-mobile-plate {
    display: block !important;
    margin-top: 1px !important;
    overflow: hidden !important;
    color: #162238 !important;
    font-size: clamp(14px, 4.2vw, 17px) !important;
    font-weight: 900 !important;
    line-height: 1.08 !important;
    letter-spacing: .01em !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(3) > strong {
    display: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr > td:nth-child(3) > small {
    display: block !important;
    overflow: hidden !important;
    color: #172033 !important;
    font-size: 12px !important;
    font-weight: 850 !important;
    line-height: 1.25 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-buyer-prefix {
    display: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table .sales-settlement-details-button {
    display: none !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr.owner-fuel-empty {
    grid-column: 1 / -1 !important;
    min-height: 64px !important;
    padding: 18px !important;
  }

  html body:not(.desktop-page) #hongyi-mobile-shell.mobile-app .page[data-panel="owner-sales-settlement-report"].active .sales-settlement-table tbody > tr.owner-fuel-empty > td[colspan] {
    display: block !important;
    padding: 0 !important;
    text-align: center !important;
  }
}
