.pwa-install { margin-top: 12px; }
.pwa-install[hidden], .pwa-install p[hidden] { display: none; }
.pwa-install button { background: #e8f3ee; color: #123f31; min-height: 44px; }
.pwa-install p { max-width: 680px; margin-top: 10px; font-size: 14px; line-height: 1.7; }
/* Screen only: never change the document/PDF print layout. */
@media screen and (max-width: 1000px) {
  .shell input:not([type=checkbox]):not([type=radio]), .shell select, .shell textarea,
  .shell #quote-view input, .shell #quote-view select, .shell #quote-view textarea,
  .shell #invoice-view input, .shell #invoice-view select, .shell #invoice-view textarea,
  .shell #invoice-view #invoice-products input, .shell #invoice-view #invoice-products textarea,
  .shell #do-dashboard input, .shell #do-dashboard select { font-size: 16px; }
  .shell #invoice-view input, .shell #invoice-view select,
  .shell #invoice-view button { min-height: 44px; }
  .shell { min-width: 0; padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
  .shell > .view, .shell > form, .card, .grid > *, .do-panel { min-width: 0; }
  .module-nav { max-width: 100%; -webkit-overflow-scrolling: touch; }
  .module-nav button { min-height: 44px; height: auto; }
  .table-wrap, .do-table-scroll, .pc-table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .section-head, .actions, .library-head-actions, .record-head-actions { flex-wrap: wrap; }
  dialog { max-width: calc(100vw - 24px); max-height: 85vh; max-height: 85dvh; overflow: auto; }
}
@media screen and (max-width: 700px) {
  .shell { width: calc(100% - 20px); margin-top: max(10px, env(safe-area-inset-top, 0px)); margin-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
  .shell > header { padding: 20px 16px; border-radius: 12px; }
  .shell > header h1 { font-size: 24px; overflow-wrap: anywhere; }
  .card, #quote-view .card { padding: 18px 14px; }
  .grid, .shipping-fields, .customer-editor { grid-template-columns: minmax(0, 1fr); }
  .section-head { gap: 12px; }
  .shell input:not([type=checkbox]):not([type=radio]), .shell select, .shell textarea,
  #quote-view input, #quote-view select, #quote-view textarea, dialog input, dialog select, dialog textarea { font-size: 16px; }
  .shell button, .shell select { min-height: 44px; }
  .shell input[type=checkbox], .shell input[type=radio] { min-height: 22px; min-width: 22px; }
  .actions { gap: 10px; }
  .actions button { min-width: 0; flex: 1 1 140px; }
  .library-head-actions, .record-head-actions { display: flex; gap: 8px; width: 100%; }
  .record-filters { display: flex; flex-wrap: wrap; gap: 12px; }
  .record-filters label { flex: 1 1 160px; min-width: 0; }
  #do-dashboard .do-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px; }
  #do-dashboard .do-filters label:last-child { grid-column: 1 / -1; }
  #do-dashboard .do-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  #do-dashboard .do-metric { min-height: 110px; padding: 14px; }
  #do-dashboard .do-metric strong { font-size: 21px; }
  #do-dashboard .do-rankings, .do-mid-grid, .do-bottom-grid { grid-template-columns: minmax(0, 1fr); }
  .do-heading, .do-panel-heading, #invoice-view .pi-workspace-heading { flex-wrap: wrap; gap: 10px; }
  .qs-dialog .qs-fields, .qs-dialog .qs-fields .qs-fields { grid-template-columns: minmax(0, 1fr); }
  #invoice-view .pi-amount-fields { grid-template-columns: minmax(0, 1fr); }
  .collaboration-status { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
}
@media print { .pwa-install { display: none !important; } }
