/* Shared staff/portal containment. Keep wide data inside its own scroller. */
@media (max-width:800px) {
  *, *::before, *::after {box-sizing:border-box}
  html, body {width:100%;max-width:100%;margin:0;overflow-wrap:anywhere}
  .page, main, .wrap, .standard-wrap, .archive-page, .vehicle-page,
  .vehicle-workspace, .workspace-content, .vehicle-create-shell,
  .remote-card, .card, .auth-card, .legal-card {min-width:0;max-width:100%}
  .page > *, main > *, .grid > *, .remote-grid > *, .archive-heading > *,
  .vehicle-banner > *, .vehicle-title-line > *, .header-inner > * {min-width:0}
  .archive-page {padding:12px 0 24px}
  .standard-wrap {margin:18px auto;padding:0}
  h1, h2, h3, p, label, summary, a, .muted, .remote-badge {overflow-wrap:anywhere}
  .archive-heading, .archive-toolbar, .lookup-actions, .create-actions,
  .vehicle-actions, .job-actions, .job-head, .header-inner, .account,
  .gallery-bulk, .remote-job-heading {flex-wrap:wrap;gap:12px}
  .archive-title-line {min-width:0}
  .archive-title-line > div {min-width:0}
  .archive-car-icon {flex-shrink:0}
  .work-mode-tabs {width:100%;flex-wrap:wrap;gap:6px}
  .work-mode-tabs a.work-mode-tab {flex:1 1 80px;min-width:0;white-space:normal;padding:10px 8px;font-size:13px;text-align:center}
  .archive-heading .add-vehicle {flex-shrink:0;min-width:0;max-width:100%}
  .archive-filters {grid-template-columns:repeat(2,minmax(0,1fr))}
  .archive-filters > *, .filter-field, .filter-search-wrap {min-width:0}
  .vehicle-table-wrap, .mobile-table-scroll {display:block;width:100%;max-width:100%;min-width:0;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
  .mobile-table-scroll:focus-visible {outline:2px solid #47aaff;outline-offset:3px}
  input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea {
    min-width:0;max-width:100%;font-size:16px;
  }
  input[type=file] {width:100%}
  button, .button {max-width:100%;white-space:normal;overflow-wrap:anywhere}
  form, fieldset, .gallery-folder, .remote-item, .remote-chat-bubble {min-width:0;max-width:100%}
  .gallery-bulk input[name=destination] {min-width:0;flex-basis:100%}
  .grid, .upload-grid {grid-template-columns:minmax(0,1fr)}
  .vehicle-banner, .remote-vehicle-summary {min-width:0}
  .vehicle-main, .vehicle-stat, .vehicle-actions {min-width:0}
  .vehicle-actions .button {min-width:0;white-space:normal}
  img, video, iframe, object, embed {max-width:100%}
  pre {max-width:100%;overflow-x:auto}
  .quick-modal {width:min(620px,100%);max-width:100%;max-height:calc(100dvh - 32px)}
  .quick-modal-backdrop {padding:16px}
  .create-actions > * {flex:1 1 160px;min-width:0;text-align:center}
  .registration-plate {max-width:100%;min-width:0}
  .registration-plate input {font-size:clamp(22px,7vw,36px)}
}
@media (max-width:480px) {
  .archive-heading {align-items:stretch;flex-direction:column}
  .archive-heading .add-vehicle {width:100%;text-align:center}
  .archive-title-line h1 {font-size:24px}
  .archive-toolbar {align-items:flex-start;flex-direction:column}
  .archive-filters {grid-template-columns:minmax(0,1fr)}
  .per-page-form {flex-wrap:wrap;max-width:100%}
}

