/* Shared Estimate/Invoice list migration. Business rendering remains in mobile-sections.js. */
body.mobile-list-page .list-page{max-width:var(--content-wide)}
body.mobile-list-page .list-header{min-height:72px;margin-bottom:var(--space-4);padding:var(--space-3) 0}
body.mobile-list-page .list-header-title h1{color:var(--color-text-primary);font-size:20px;letter-spacing:.04em}
body.mobile-list-page .list-header-title p{color:var(--color-text-secondary)}
body.mobile-list-page .back-link,
body.mobile-list-page .new-link,
body.mobile-list-page .filter-toggle{width:auto!important;min-height:var(--control-height-md);height:var(--control-height-md);padding:0 var(--space-4);border-radius:var(--radius-md);box-shadow:var(--shadow-none)}
body.mobile-list-page .back-link{padding:0 var(--space-2)}
body.mobile-list-page .new-link{color:#fff!important}
body.mobile-list-page .list-controls{gap:var(--space-2);margin-bottom:var(--space-3)}
body.mobile-list-page .mobile-search{min-height:var(--control-height-md);margin:0;border-radius:var(--radius-md)}
body.mobile-list-page .filter-panel{gap:var(--space-3);padding:var(--space-4);border-color:var(--color-border);border-radius:var(--radius-md);background:var(--color-surface);box-shadow:var(--shadow-subtle)}
body.mobile-list-page .filter-panel select{min-height:var(--control-height-md);border-color:var(--color-border-strong);border-radius:var(--radius-md);font-size:16px}
body.mobile-list-page .month-group{border-color:var(--color-border);border-radius:var(--radius-md);box-shadow:var(--shadow-subtle)}
body.mobile-list-page .month-header{background:var(--color-brand-primary-subtle);color:var(--color-brand-primary);border-color:var(--color-border)}
body.mobile-list-page .list-document-row{gap:var(--space-2);padding:var(--space-4);border-color:var(--color-border)}
body.mobile-list-page .list-document-row:focus-visible{outline:0;box-shadow:inset var(--focus-ring)}
body.mobile-list-page .row-client{color:var(--color-text-primary)}
body.mobile-list-page .row-number{color:var(--color-brand-primary)}
body.mobile-list-page .row-project,
body.mobile-list-page .row-date,
body.mobile-list-page .row-history{color:var(--color-text-secondary)}
body.mobile-list-page .row-actions .options-row-action{min-height:44px;height:44px;padding:0 var(--space-4);border-color:var(--color-border);border-radius:var(--radius-md);background:var(--color-surface);color:var(--color-brand-primary);font-size:14px;font-weight:800}
body.mobile-list-page .row-actions .document-action-button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;height:44px;padding:0 var(--space-4);border:1px solid var(--color-border);border-radius:var(--radius-md);background:var(--color-surface);color:var(--color-brand-primary);font-size:14px;font-weight:800;line-height:1;text-decoration:none;box-shadow:var(--shadow-none)}
body.mobile-list-page .row-actions [data-record-payment]{border-color:var(--color-brand-primary);background:var(--color-brand-primary);color:#fff}
body.mobile-list-page .row-balance{color:var(--color-text-primary);font-size:14px;font-weight:800}
body.mobile-list-page .status-badge-mobile{font-size:12px;font-weight:800}
body.mobile-list-page .status-draft,
body.mobile-list-page .status-archived{background:var(--color-surface-muted);color:var(--color-text-secondary);border-color:var(--color-border)}
body.mobile-list-page .status-approved,
body.mobile-list-page .status-paid,
body.mobile-list-page .status-signed{background:var(--color-success-subtle);color:var(--color-success);border-color:#abefc6}
body.mobile-list-page .status-declined,
body.mobile-list-page .status-void,
body.mobile-list-page .status-cancelled{background:var(--color-error-subtle);color:var(--color-error);border-color:#fecdca}
body.mobile-list-page .status-expired,
body.mobile-list-page .status-overdue,
body.mobile-list-page .status-partial{background:var(--color-warning-subtle);color:var(--color-warning);border-color:#fedf89}

.desktop-list-eyebrow,.desktop-list-description,.estimate-summary,.estimate-table-head,.desktop-estimate-cells,.desktop-inline-filter{display:none}

@media(min-width:901px){
  body.desktop-sidebar-shell .list-page{padding:34px 40px 56px;background:#f5f7fa}
  body.desktop-sidebar-shell .list-header{align-items:start;min-height:0;margin-bottom:26px;padding:0}
  body.desktop-sidebar-shell .list-header-title h1{margin:4px 0 7px;color:var(--color-text-primary);font-size:38px;line-height:1.05;letter-spacing:-.02em;text-transform:none}
  body.desktop-sidebar-shell .mobile-list-subtitle{display:none}
  body.desktop-sidebar-shell .desktop-list-eyebrow{display:block;color:#b35f05;font-size:12px;font-weight:900;letter-spacing:.12em}
  body.desktop-sidebar-shell .desktop-list-description{display:block;margin:0;color:var(--color-text-secondary);font-size:16px;font-weight:600}
  body.desktop-sidebar-shell .new-link{min-height:48px!important;height:48px!important;padding:0 18px!important;border-radius:12px!important;font-size:15px}
  body.desktop-sidebar-shell .estimate-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:22px}
  body.desktop-sidebar-shell .estimate-summary>div{box-sizing:border-box;display:grid;gap:7px;min-height:108px;padding:18px 20px;background:#fff;border:1px solid var(--color-border);border-radius:14px;box-shadow:var(--shadow-subtle)}
  body.desktop-sidebar-shell .estimate-summary span{color:var(--color-text-secondary);font-size:14px;font-weight:700}
  body.desktop-sidebar-shell .estimate-summary strong{color:var(--color-text-primary);font-size:30px;line-height:1;font-weight:900}
  body.desktop-sidebar-shell .list-controls{grid-template-columns:minmax(280px,1fr) auto auto;gap:12px;margin-bottom:14px}
  body.desktop-sidebar-shell .mobile-search{min-height:54px;border-radius:12px;font-size:16px}
  body.desktop-sidebar-shell .desktop-inline-filter{display:block}
  body.desktop-sidebar-shell .desktop-inline-filter select{min-width:165px;min-height:54px;padding:0 42px 0 15px;border:1px solid var(--color-border-strong);border-radius:12px;background:#fff;color:var(--color-text-primary);font:inherit;font-size:15px;font-weight:800}
  body.desktop-sidebar-shell .filter-toggle,
  body.desktop-sidebar-shell .filter-panel{display:none!important}
  body.desktop-sidebar-shell .estimate-table-head{display:grid;grid-template-columns:minmax(210px,1.5fr) minmax(150px,.9fr) minmax(110px,.65fr) minmax(120px,.7fr) 48px;gap:16px;align-items:center;padding:15px 18px;background:#eef2f6;border:1px solid var(--color-border);border-bottom:0;border-radius:14px 14px 0 0;color:var(--color-text-secondary);font-size:13px;font-weight:800}
  body.desktop-sidebar-shell #sectionList{display:grid;background:#fff;border:1px solid var(--color-border);border-radius:0 0 14px 14px;overflow:hidden;box-shadow:var(--shadow-subtle)}
  body.desktop-sidebar-shell #sectionList .month-group{display:contents}
  body.desktop-sidebar-shell #sectionList .month-header{display:none}
  body.desktop-sidebar-shell #sectionList .list-document-row,
  body.desktop-sidebar-shell #sectionList .document-card{display:block;margin:0;padding:0;border:0;border-top:1px solid var(--color-border);border-radius:0;box-shadow:none;background:#fff}
  body.desktop-sidebar-shell #sectionList .list-document-row:first-of-type{border-top:0}
  body.desktop-sidebar-shell .desktop-estimate-cells{box-sizing:border-box;display:grid;grid-template-columns:minmax(210px,1.5fr) minmax(150px,.9fr) minmax(110px,.65fr) minmax(120px,.7fr) 48px;gap:16px;align-items:center;min-height:78px;padding:13px 18px}
  body.desktop-sidebar-shell .desktop-estimate-cells>div{min-width:0}
  body.desktop-sidebar-shell .desktop-estimate-cells strong{display:block;overflow:hidden;color:var(--color-text-primary);font-size:15px;font-weight:900;text-overflow:ellipsis;white-space:nowrap}
  body.desktop-sidebar-shell .desktop-estimate-cells span:not(.status-badge-mobile){display:block;overflow:hidden;margin-top:4px;color:var(--color-text-secondary);font-size:13px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}
  body.desktop-sidebar-shell .desktop-estimate-total{color:var(--color-text-primary);font-size:15px;font-weight:900}
  body.desktop-sidebar-shell .desktop-estimate-menu{display:grid;place-items:center;width:40px;height:40px;border:0;border-radius:10px;background:#eef2f6;color:var(--color-brand-primary);font-size:15px;font-weight:900;cursor:pointer}
  body.desktop-sidebar-shell .mobile-estimate-content,
  body.desktop-sidebar-shell .mobile-contract-content,
  body.desktop-sidebar-shell #sectionList .doc-link-note{display:none!important}
  body.desktop-sidebar-shell #sectionList .empty-state{margin:0;border:0;border-radius:0;box-shadow:none}
}

@media(min-width:901px) and (max-width:1120px){
  body.desktop-sidebar-shell .list-page{padding-left:28px;padding-right:28px}
  body.desktop-sidebar-shell .list-controls{grid-template-columns:minmax(180px,1fr) minmax(180px,190px) minmax(180px,190px)}
  body.desktop-sidebar-shell .desktop-inline-filter select{padding-right:34px;padding-left:12px;font-size:14px}
  body.desktop-sidebar-shell .desktop-inline-filter select{width:100%;min-width:0}
  body.desktop-sidebar-shell .estimate-table-head,
  body.desktop-sidebar-shell .desktop-estimate-cells{grid-template-columns:minmax(150px,1.35fr) minmax(115px,.9fr) 90px 100px 40px;gap:10px;padding-left:14px;padding-right:14px}
}

@media(max-width:600px){
  body.mobile-list-page .list-header{grid-template-columns:auto minmax(0,1fr) auto}
  body.mobile-list-page .list-page{padding-left:var(--space-4);padding-right:var(--space-4)}
  body.mobile-list-page .back-link{font-size:14px}
  body.mobile-list-page .new-link{padding:0 var(--space-3);font-size:15px}
}
