/* Compact / hamburger only. Laptop + desktop MacBooks use real CSS pixels
   (no data-gce-tablet, no CSS zoom). Sites table rules live in sites-layout.css. */

html[data-gce-viewport="compact"] body.gce-viewport-shell {
  max-width: 100%;
}

html[data-gce-viewport="compact"] body.gce-viewport-shell .app {
  overflow-x: hidden;
}

html[data-gce-viewport="compact"] body.gce-viewport-shell .app,
html[data-gce-viewport="compact"] body.gce-viewport-shell #gce-main,
html[data-gce-viewport="compact"] body.gce-viewport-shell main,
html[data-gce-viewport="compact"] body.gce-viewport-shell .main-page:not(.hidden) {
  max-width: 100% !important;
  min-width: 0 !important;
}

html[data-gce-viewport="compact"] body.gce-viewport-shell [data-gce-scroll] {
  overflow-x: hidden !important;
  max-width: 100%;
}

html[data-gce-viewport="compact"] body.gce-viewport-shell #gce-main,
html[data-gce-viewport="compact"] body.gce-viewport-shell main {
  padding: 56px 12px 18px !important;
}

html[data-gce-viewport="laptop"] body.gce-viewport-shell .app,
html[data-gce-viewport="desktop"] body.gce-viewport-shell .app {
  overflow-x: hidden;
}

html[data-gce-viewport="laptop"] body.gce-viewport-shell #gce-main,
html[data-gce-viewport="laptop"] body.gce-viewport-shell main,
html[data-gce-viewport="laptop"] body.gce-viewport-shell .main-page:not(.hidden) {
  max-width: 100% !important;
  min-width: 0 !important;
}

html[data-gce-viewport="laptop"] .fin-mock-site-grid,
html[data-gce-viewport="desktop"] .fin-mock-site-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)) !important;
}

html[data-gce-viewport="laptop"] .gce-finance-mockup .fin-mock-site-card,
html[data-gce-viewport="desktop"] .gce-finance-mockup .fin-mock-site-card {
  border-radius: 32px !important;
  padding: 14px 18px 12px !important;
}

html[data-gce-viewport="laptop"] .dash-page--ops .dash-ops-sites-map {
  height: clamp(260px, 36vh, 420px) !important;
}

html[data-gce-viewport="compact"] .dash-page--ops .dash-kpi-grid--4 {
  grid-template-columns: 1fr 1fr !important;
}

html[data-gce-viewport="compact"] .gce-sites-mockup .stm-kpi-grid--mockup {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
