/* GCE FIELD — fluid UI scale by viewport (large screen = larger, laptop = compact) */
:root {
  --gce-ui-scale: 1;
  --gce-ui-scale-min: 0.60;
  --gce-ui-scale-max: 1;
  --gce-sidebar-w: 252px;
  --gce-scaled-content-w: 1280px;
  --gce-gap-page: clamp(4px, 0.7vw, 10px);
  --gce-gap-card: clamp(6px, 0.8vw, 12px);
}

html[data-gce-viewport="desktop"] {
  --gce-sidebar-w: 252px;
  --gce-gap-page: clamp(4px, 0.6vw, 8px);
}

html[data-gce-viewport="laptop"] {
  --gce-sidebar-w: 228px;
  --gce-gap-page: 6px;
  --gce-gap-card: 6px;
}

html[data-gce-viewport="compact"] {
  --gce-sidebar-w: 0px;
  --gce-gap-page: 4px;
  --gce-gap-card: 6px;
}

/* Scale .app only — avoids clipping sidebar footer from html-level zoom */
.app {
  zoom: var(--gce-ui-scale);
  /*
   * With CSS zoom, layout sizes are multiplied visually. `width:100%` already
   * maps to the viewport. Height must be `100dvh / scale` or scale < 1 leaves
   * a blank band under the app (Dashboard / Sites / every page).
   */
  width: 100%;
  max-width: none !important;
  min-height: calc(100vh / var(--gce-ui-scale));
  min-height: calc(100dvh / var(--gce-ui-scale));
  height: calc(100vh / var(--gce-ui-scale));
  height: calc(100dvh / var(--gce-ui-scale));
  box-sizing: border-box;
}

@supports not (zoom: 1) {
  .app {
    transform: scale(var(--gce-ui-scale));
    transform-origin: top left;
    width: calc(100% / var(--gce-ui-scale));
    min-height: calc(100vh / var(--gce-ui-scale));
    min-height: calc(100dvh / var(--gce-ui-scale));
    height: calc(100vh / var(--gce-ui-scale));
    height: calc(100dvh / var(--gce-ui-scale));
  }
}

/* Sidebar width follows viewport tier */
body.gce-viewport-shell .app {
  grid-template-columns: var(--gce-sidebar-w) minmax(0, 1fr) !important;
}

/* Prevent horizontal overflow / overlap in flex & grid children */
body.gce-viewport-shell .app,
body.gce-viewport-shell #gce-main,
body.gce-viewport-shell main,
body.gce-viewport-shell .main-page,
body.gce-viewport-shell .main-page > [id$="-page-root"],
body.gce-viewport-shell .dash-page,
body.gce-viewport-shell .stm-page,
body.gce-viewport-shell .fin-page,
body.gce-viewport-shell .crw-page,
body.gce-viewport-shell .tsk-page,
body.gce-viewport-shell .cal-page,
body.gce-viewport-shell .eq-page,
body.gce-viewport-shell .stg-page,
body.gce-viewport-shell .sfty-page,
body.gce-viewport-shell .cert-dash,
body.gce-viewport-shell #site-detail-main,
body.gce-viewport-shell #crew-detail-main {
  min-width: 0;
  max-width: 100%;
}

body.gce-viewport-shell #gce-main,
body.gce-viewport-shell main {
  padding: var(--gce-gap-page) clamp(4px, 0.8vw, 10px) var(--gce-gap-page);
}

/* Sites must use the complete scaled viewport, including table row rules. */
body.gce-viewport-shell.gce-sites-mockup #sites-main,
body.gce-viewport-shell.gce-sites-mockup #sites-page-root,
body.gce-viewport-shell.gce-sites-mockup .stm-page,
body.gce-viewport-shell.gce-sites-mockup .stm-list-panel,
body.gce-viewport-shell.gce-sites-mockup .stm-body--full,
body.gce-viewport-shell.gce-sites-mockup .stm-main--full,
body.gce-viewport-shell.gce-sites-mockup #stm-sites-list-view,
body.gce-viewport-shell.gce-sites-mockup .stm-table-card-full,
body.gce-viewport-shell.gce-sites-mockup .stm-table-wrap {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  align-self: stretch;
}

body.gce-viewport-shell.gce-sites-mockup .stm-body.stm-body--full {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0 !important;
}

body.gce-viewport-shell.gce-sites-mockup #stm-sites-list-view.stm-table-card-full {
  flex: 0 0 auto !important;
  min-height: auto !important;
  height: auto !important;
  overflow: visible !important;
  display: flex !important;
  flex-direction: column !important;
}

/* List/Grid exclusivity — must beat the display:flex !important above */
body.gce-viewport-shell.gce-sites-mockup .stm-list-panel[data-stm-view="grid"] #stm-sites-list-view,
body.gce-viewport-shell.gce-sites-mockup .stm-list-panel[data-stm-view="grid"] #stm-sites-list-view.stm-table-card-full,
body.gce-viewport-shell.gce-sites-mockup .stm-list-panel[data-stm-view="grid"] #stm-sites-list-view.hidden {
  display: none !important;
  flex: 0 0 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

body.gce-viewport-shell.gce-sites-mockup .stm-list-panel[data-stm-view="list"] #stm-sites-grid-view,
body.gce-viewport-shell.gce-sites-mockup .stm-list-panel[data-stm-view="list"] #stm-sites-grid-view.hidden {
  display: none !important;
}

body.gce-viewport-shell.gce-sites-mockup .stm-list-panel[data-stm-view="grid"] #stm-sites-grid-view {
  display: block !important;
  flex: 0 0 auto !important;
  min-height: auto !important;
  overflow: visible !important;
}

/*
 * Sites scroll host = #sites-page-root (see scroll-contract.css).
 * List panel + table wrap grow with rows — no nested vertical scroller.
 * Tall overflow:auto fillers on .stm-table-wrap eat wheel events.
 */
body.gce-viewport-shell.gce-sites-mockup .stm-list-panel {
  overflow: visible !important;
  flex: 0 0 auto !important;
  min-height: auto !important;
  height: auto !important;
}

body.gce-viewport-shell.gce-sites-mockup .stm-list-panel.hidden {
  display: none !important;
  flex: 0 0 0 !important;
  min-height: 0 !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.gce-viewport-shell.gce-sites-mockup .stm-body.stm-body--full,
body.gce-viewport-shell.gce-sites-mockup .stm-main.stm-main--full {
  flex: 0 0 auto !important;
  min-height: auto !important;
  height: auto !important;
  overflow: visible !important;
}

body.gce-viewport-shell.gce-sites-mockup .stm-table-wrap {
  flex: 0 0 auto !important;
  min-height: auto !important;
  height: auto !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  -webkit-overflow-scrolling: touch;
}

/*
 * Sites table fills the card edge-to-edge. Soft caps only on long text cells
 * so ultra-wide still uses the full width instead of a skinny centered table.
 */
body.gce-viewport-shell.gce-sites-mockup .stm-table {
  width: 100% !important;
  min-width: 100% !important;
  max-width: none !important;
  table-layout: auto !important;
}

body.gce-viewport-shell.gce-sites-mockup .stm-table .stm-name-cell {
  max-width: none;
  min-width: 120px;
}

body.gce-viewport-shell.gce-sites-mockup .stm-table .stm-addr-cell {
  max-width: min(320px, 22vw);
}

body.gce-viewport-shell.gce-sites-mockup .stm-table .stm-vendor-cell,
body.gce-viewport-shell.gce-sites-mockup .stm-table .stm-market-cell,
body.gce-viewport-shell.gce-sites-mockup .stm-table .stm-custom-cell {
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Sticky Sites header must be opaque; theme rules otherwise leave it transparent. */
body.gce-viewport-shell.gce-sites-mockup .stm-table thead {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
}

body.gce-viewport-shell.gce-sites-mockup .stm-table thead th {
  position: sticky;
  top: 0;
  z-index: 21;
  background: #fff !important;
  background-clip: padding-box;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: 0 1px 0 #d8e0ea;
}

body.gce-viewport-shell.gce-sites-mockup:not([data-gce-mode="light"]) .stm-table thead,
body.gce-viewport-shell.gce-sites-mockup:not([data-gce-mode="light"]) .stm-table thead th {
  background: #161b26 !important;
  box-shadow: 0 1px 0 rgba(148, 163, 184, .24);
}

body.gce-viewport-shell.gce-sites-mockup .stm-status-row {
  width: 100%;
  flex-shrink: 0;
}

body.gce-viewport-shell.gce-sites-mockup .stm-page-head,
body.gce-viewport-shell.gce-sites-mockup .stm-kpi-grid,
body.gce-viewport-shell.gce-sites-mockup .stm-table-toolbar,
body.gce-viewport-shell.gce-sites-mockup .stm-table-viewbar {
  flex-shrink: 0;
  width: 100%;
}

/* ── Laptop (typical 13–14") ── */
html[data-gce-viewport="laptop"] body.gce-viewport-shell .sidebar {
  padding-left: 10px;
  padding-right: 10px;
}

html[data-gce-viewport="laptop"] #site-detail-main .sdt-body,
html[data-gce-viewport="desktop"] #site-detail-main .sdt-body {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: var(--gce-gap-card);
}

html[data-gce-viewport="laptop"] #site-detail-main .sdt-aside,
html[data-gce-viewport="desktop"] #site-detail-main .sdt-aside {
  position: static;
  top: auto;
  width: 100%;
  max-width: 100%;
}

html[data-gce-viewport="laptop"] #site-detail-main .sdt-hero-metrics-bar,
html[data-gce-viewport="desktop"] #site-detail-main .sdt-hero-metrics-bar {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

html[data-gce-viewport="laptop"] #site-detail-main .sdt-hero-top,
html[data-gce-viewport="desktop"] #site-detail-main .sdt-hero-top {
  flex-wrap: wrap;
  gap: 12px;
}

html[data-gce-viewport="laptop"] body.gce-certs-mockup .cert-dash-workflow,
html[data-gce-viewport="desktop"] body.gce-certs-mockup .cert-dash-workflow {
  grid-template-columns: minmax(110px, 0.6fr) minmax(140px, 0.78fr) minmax(0, 1.6fr);
  gap: 8px;
  max-height: none;
}

html[data-gce-viewport="laptop"] body.gce-certs-mockup .cert-dash-kpis,
html[data-gce-viewport="desktop"] body.gce-certs-mockup .cert-dash-kpis {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

html[data-gce-viewport="laptop"] body.gce-certs-mockup .cert-dash-kpi,
html[data-gce-viewport="desktop"] body.gce-certs-mockup .cert-dash-kpi {
  padding: 12px 14px;
  gap: 10px;
}

html[data-gce-viewport="laptop"] .fin-page-head,
html[data-gce-viewport="laptop"] .stm-page-head,
html[data-gce-viewport="laptop"] .crw-page-head,
html[data-gce-viewport="laptop"] .tsk-page-head,
html[data-gce-viewport="laptop"] .eq-page-head {
  flex-wrap: wrap;
  gap: 10px;
}

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

html[data-gce-viewport="laptop"] .stm-body,
html[data-gce-viewport="desktop"] .stm-body {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: var(--gce-gap-card);
}

html[data-gce-viewport="laptop"] .stm-aside-col {
  max-height: min(38vh, 300px);
  overflow: auto;
}

html[data-gce-viewport="laptop"] #crew-detail-main .crd-body-grid,
html[data-gce-viewport="desktop"] #crew-detail-main .crd-body-grid {
  grid-template-columns: minmax(0, 0.38fr) minmax(0, 0.62fr) !important;
}

html[data-gce-viewport="laptop"] .tsk-body {
  grid-template-columns: minmax(0, 1fr) !important;
}

html[data-gce-viewport="laptop"] .tsk-aside {
  max-height: min(34vh, 280px);
}

html[data-gce-viewport="laptop"] .eq-body-grid,
html[data-gce-viewport="laptop"] .eq-fleet-split {
  grid-template-columns: minmax(0, 1fr) !important;
}

/* Tighter typography on laptop so labels don't collide */
html[data-gce-viewport="laptop"] .topbar h2,
html[data-gce-viewport="laptop"] .stm-page-head h2,
html[data-gce-viewport="laptop"] .fin-page-head h2,
html[data-gce-viewport="laptop"] .crw-page-head h2,
html[data-gce-viewport="laptop"] #site-detail-main .sdt-site-title {
  font-size: clamp(20px, 2.4vw, 26px) !important;
  line-height: 1.2;
}

html[data-gce-viewport="laptop"] .btn,
html[data-gce-viewport="laptop"] .sdt-btn,
html[data-gce-viewport="laptop"] .fin-btn,
html[data-gce-viewport="laptop"] .cert-dash-btn {
  white-space: nowrap;
}

html[data-gce-viewport="laptop"] table th,
html[data-gce-viewport="laptop"] table td {
  padding: 8px 10px;
  font-size: 12px;
}

/* ── Compact (< 1200px) ── */
html[data-gce-viewport="compact"] body.gce-viewport-shell .app {
  grid-template-columns: 1fr !important;
}

/* Keep cards dense on short/split-screen desktop viewports. */
@media (max-height: 760px) {
  body.gce-viewport-shell .dash-page,
  body.gce-viewport-shell .stm-page,
  body.gce-viewport-shell .fin-page,
  body.gce-viewport-shell .crw-page,
  body.gce-viewport-shell .tsk-page,
  body.gce-viewport-shell .eq-page,
  body.gce-viewport-shell .stg-page,
  body.gce-viewport-shell .sfty-page {
    gap: 8px !important;
  }

  body.gce-viewport-shell .sfty-card,
  body.gce-viewport-shell .dash-kpi-card,
  body.gce-viewport-shell .stm-kpi,
  body.gce-viewport-shell .fin-card {
    border-radius: 10px;
  }
}

html[data-gce-viewport="compact"] body.gce-certs-mockup .cert-dash-workflow {
  grid-template-columns: 1fr !important;
  max-height: none;
}

@media print {
  .app {
    zoom: 1 !important;
    transform: none !important;
    width: auto !important;
    min-height: 0 !important;
  }
}

/* Subtle state transitions — no full-page flash */
body.gce-viewport-shell .cert-dash-row--active,
body.gce-viewport-shell .cert-dash-cert-grid-item--selected,
body.gce-viewport-shell .crw-row,
body.gce-viewport-shell .tsk-table tbody tr,
body.gce-viewport-shell .stm-table tbody tr {
  transition: background-color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

/* ═══════════════════════════════════════════════════════════════
   GCE Glass UI (light mode) — frosted panels app-wide
   Sticky/scroll headers stay opaque so rows never show through.
   ═══════════════════════════════════════════════════════════════ */
html[data-gce-mode="light"] body.gce-viewport-shell,
html[data-gce-mode="light"] body.gce-viewport-shell.gce-dash-mockup,
html[data-gce-mode="light"] body.gce-viewport-shell.gce-sites-mockup,
html[data-gce-mode="light"] body.gce-viewport-shell.gce-crews-mockup,
html[data-gce-mode="light"] body.gce-viewport-shell.gce-finance-mockup,
html[data-gce-mode="light"] body.gce-viewport-shell.gce-equipment-mockup,
html[data-gce-mode="light"] body.gce-viewport-shell.gce-tasks-mockup,
html[data-gce-mode="light"] body.gce-viewport-shell.gce-calendar-mockup,
html[data-gce-mode="light"] body.gce-viewport-shell.gce-settings-mockup,
html[data-gce-mode="light"] body.gce-viewport-shell.gce-safety-mockup,
html[data-gce-mode="light"] body.gce-viewport-shell.gce-safety-dash-mockup,
html[data-gce-mode="light"] body.gce-viewport-shell.gce-certs-mockup,
html[data-gce-mode="light"] body.gce-viewport-shell.gce-site-detail-mockup,
html[data-gce-mode="light"] body.gce-viewport-shell.gce-crew-detail-mockup {
  background:
    radial-gradient(ellipse 90% 55% at 8% -8%, rgba(147, 197, 253, 0.58), transparent 58%),
    radial-gradient(ellipse 75% 50% at 92% 0%, rgba(196, 181, 253, 0.38), transparent 52%),
    radial-gradient(ellipse 70% 45% at 55% 105%, rgba(165, 243, 252, 0.28), transparent 48%),
    #eef3fb !important;
  background-image:
    radial-gradient(ellipse 90% 55% at 8% -8%, rgba(147, 197, 253, 0.58), transparent 58%),
    radial-gradient(ellipse 75% 50% at 92% 0%, rgba(196, 181, 253, 0.38), transparent 52%),
    radial-gradient(ellipse 70% 45% at 55% 105%, rgba(165, 243, 252, 0.28), transparent 48%) !important;
  background-color: #eef3fb !important;
  background-attachment: fixed !important;
}

html[data-gce-mode="light"] body.gce-viewport-shell main,
html[data-gce-mode="light"] body.gce-viewport-shell #gce-main,
html[data-gce-mode="light"] body.gce-viewport-shell #sites-main,
html[data-gce-mode="light"] body.gce-viewport-shell #finance-main,
html[data-gce-mode="light"] body.gce-viewport-shell #crews-main,
html[data-gce-mode="light"] body.gce-viewport-shell #tasks-main,
html[data-gce-mode="light"] body.gce-viewport-shell #equipment-main,
html[data-gce-mode="light"] body.gce-viewport-shell #settings-main,
html[data-gce-mode="light"] body.gce-viewport-shell #safety-main,
html[data-gce-mode="light"] body.gce-viewport-shell #dashboard-main,
html[data-gce-mode="light"] body.gce-viewport-shell #calendar-main {
  background: transparent !important;
}

html[data-gce-mode="light"] body.gce-viewport-shell .sidebar,
html[data-gce-mode="light"] body.gce-viewport-shell .sidebar.sidebar--field {
  background: rgba(255, 255, 255, 0.52) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.62) !important;
  backdrop-filter: blur(22px) saturate(1.25) !important;
  -webkit-backdrop-filter: blur(22px) saturate(1.25) !important;
  box-shadow: 4px 0 24px rgba(15, 23, 42, 0.04);
}

html[data-gce-mode="light"] body.gce-viewport-shell .card,
html[data-gce-mode="light"] body.gce-viewport-shell .sfty-card,
html[data-gce-mode="light"] body.gce-viewport-shell .dash-kpi-card,
html[data-gce-mode="light"] body.gce-viewport-shell .dash-card,
html[data-gce-mode="light"] body.gce-viewport-shell .dash-panel,
html[data-gce-mode="light"] body.gce-viewport-shell .dash-topbar,
html[data-gce-mode="light"] body.gce-viewport-shell .stm-kpi,
html[data-gce-mode="light"] body.gce-viewport-shell .stm-kpi--mockup,
html[data-gce-mode="light"] body.gce-viewport-shell .tsk-kpi,
html[data-gce-mode="light"] body.gce-viewport-shell .tsk-table-card,
html[data-gce-mode="light"] body.gce-viewport-shell .tsk-widget,
html[data-gce-mode="light"] body.gce-viewport-shell .crw-card,
html[data-gce-mode="light"] body.gce-viewport-shell .cal-card,
html[data-gce-mode="light"] body.gce-viewport-shell .cal-main,
html[data-gce-mode="light"] body.gce-viewport-shell .cert-kpi-card,
html[data-gce-mode="light"] body.gce-viewport-shell .fin-card,
html[data-gce-mode="light"] body.gce-viewport-shell .fin-kpi-card,
html[data-gce-mode="light"] body.gce-viewport-shell .fin-mock-header,
html[data-gce-mode="light"] body.gce-viewport-shell .fin-ov-kpi,
html[data-gce-mode="light"] body.gce-viewport-shell .fin-ov-card,
html[data-gce-mode="light"] body.gce-viewport-shell .eq-card,
html[data-gce-mode="light"] body.gce-viewport-shell .stg-card,
html[data-gce-mode="light"] body.gce-viewport-shell .sdt-kpi,
html[data-gce-mode="light"] body.gce-viewport-shell .crd-kpi {
  background: rgba(255, 255, 255, 0.58) !important;
  border: 1px solid rgba(255, 255, 255, 0.7) !important;
  backdrop-filter: blur(18px) saturate(1.2) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.2) !important;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06) !important;
}

html[data-gce-mode="light"] body.gce-viewport-shell .stm-table-toolbar,
html[data-gce-mode="light"] body.gce-viewport-shell .tsk-table-toolbar,
html[data-gce-mode="light"] body.gce-viewport-shell .fin-po-toolbar,
html[data-gce-mode="light"] body.gce-viewport-shell .fin-mock-sites-toolbar {
  background: rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: blur(16px) saturate(1.15) !important;
  -webkit-backdrop-filter: blur(16px) saturate(1.15) !important;
  border-color: rgba(216, 224, 234, 0.85) !important;
}

/* Opaque sticky headers — no glass bleed on scroll (all modules) */
body.gce-viewport-shell .stm-table thead th,
body.gce-viewport-shell .fin-table thead th,
body.gce-viewport-shell .fin-mock-table thead th,
body.gce-viewport-shell .fin-ov-table thead th,
body.gce-viewport-shell .tsk-table thead th,
body.gce-viewport-shell .crw-table thead th,
body.gce-viewport-shell .eq-table thead th,
body.gce-viewport-shell .sfty-table thead th,
body.gce-viewport-shell .cert-dash-table thead th,
body.gce-viewport-shell .dash-table thead th,
body.gce-viewport-shell table.stm-table thead th {
  position: sticky;
  top: 0;
  z-index: 12;
  background: #ffffff !important;
  background-clip: padding-box;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: 0 1px 0 #d8e0ea;
}

body.gce-viewport-shell:not([data-gce-mode="light"]) .stm-table thead th,
body.gce-viewport-shell:not([data-gce-mode="light"]) .fin-table thead th,
body.gce-viewport-shell:not([data-gce-mode="light"]) .tsk-table thead th,
body.gce-viewport-shell:not([data-gce-mode="light"]) .crw-table thead th,
body.gce-viewport-shell:not([data-gce-mode="light"]) .eq-table thead th {
  background: #161b26 !important;
  box-shadow: 0 1px 0 rgba(148, 163, 184, 0.24);
}

/* Table body surfaces stay readable over glass page */
html[data-gce-mode="light"] body.gce-viewport-shell .stm-table-wrap,
html[data-gce-mode="light"] body.gce-viewport-shell .fin-table-wrap,
html[data-gce-mode="light"] body.gce-viewport-shell .fin-mock-table-wrap,
html[data-gce-mode="light"] body.gce-viewport-shell .tsk-table-wrap,
html[data-gce-mode="light"] body.gce-viewport-shell .crw-table-wrap {
  background: rgba(255, 255, 255, 0.88);
  border-radius: 0 0 10px 10px;
}

html[data-gce-mode="light"] body.gce-viewport-shell .stm-table--mockup tbody tr.stm-row-card td {
  background: rgba(255, 255, 255, 0.96) !important;
}

/* ── iOS-style Liquid Glass tab bars ── */
body.gce-viewport-shell :is(
  .stm-status-tabs,
  .crw-status-tabs,
  .crd-tab-bar,
  .fin-tabs,
  .fin-mock-tabs,
  .fin-mock-subtabs,
  .tsk-scope-tabs,
  .tsk-view-tabs,
  .sdt-dw-tabs,
  .eq-info-tabs,
  .vd-tabs,
  .activity-subtabs,
  .sfty-detail-tabs,
  .sfty-review-tabs,
  .cert-dash-tabs--inline,
  .tabs
) {
  position: relative;
  isolation: isolate;
  gap: 5px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.62) !important;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.68), rgba(235, 244, 255, 0.38)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(148, 163, 184, 0.14),
    0 8px 24px rgba(15, 23, 42, 0.09);
  backdrop-filter: blur(22px) saturate(165%);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
}

body.gce-viewport-shell :is(
  .stm-status-tab,
  .crw-status-tab,
  .crd-tab,
  .fin-tab-btn,
  .fin-mock-tab,
  .tsk-scope-tabs > button,
  .tsk-view-tabs > button,
  .sdt-dw-tabs > button,
  .eq-info-tab-btn,
  .vd-tab,
  .activity-subtab,
  .sfty-detail-tab,
  .sfty-review-tab,
  .cert-dash-tab,
  .tab
) {
  min-height: 34px;
  margin: 0 !important;
  padding: 7px 12px;
  border: 1px solid transparent !important;
  border-radius: 11px !important;
  background: transparent !important;
  color: #475569;
  transition:
    color 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

body.gce-viewport-shell :is(
  .stm-status-tab,
  .crw-status-tab,
  .crd-tab,
  .fin-tab-btn,
  .fin-mock-tab,
  .tsk-scope-tabs > button,
  .tsk-view-tabs > button,
  .sdt-dw-tabs > button,
  .eq-info-tab-btn,
  .vd-tab,
  .activity-subtab,
  .sfty-detail-tab,
  .sfty-review-tab,
  .cert-dash-tab,
  .tab
):hover {
  color: #1e3a8a;
  background: rgba(255, 255, 255, 0.42) !important;
}

body.gce-viewport-shell :is(
  .stm-status-tab.active,
  .crw-status-tab.active,
  .crd-tab.crd-tab--active,
  .fin-tab-btn.active,
  .fin-mock-tab.active,
  .tsk-scope-tabs > button.active,
  .tsk-view-tabs > button.active,
  .sdt-dw-tabs > button.is-active,
  .eq-info-tab-btn.active,
  .vd-tab.active,
  .activity-subtab.active,
  .sfty-detail-tab.active,
  .sfty-review-tab.active,
  .cert-dash-tab.active,
  .tab.active
) {
  color: #1e3a8a !important;
  border-color: rgba(255, 255, 255, 0.88) !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(219, 234, 254, 0.78)) !important;
  box-shadow:
    inset 0 1px 0 #ffffff,
    inset 0 -1px 0 rgba(30, 58, 138, 0.08),
    0 4px 12px rgba(30, 58, 138, 0.14);
  transform: translateY(-1px);
}

body.gce-viewport-shell .sdt-dw-tabs > button.is-active::after {
  display: none;
}

body.gce-viewport-shell .stm-status-row {
  padding: 5px;
  border-bottom: 0 !important;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.2);
}

body.gce-viewport-shell .stm-status-row .stm-status-tabs {
  padding: 0;
  border: 0 !important;
  border-radius: 12px;
  background: transparent !important;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.gce-viewport-shell:not([data-gce-mode="light"]) :is(
  .stm-status-tabs,
  .crw-status-tabs,
  .crd-tab-bar,
  .fin-tabs,
  .fin-mock-tabs,
  .fin-mock-subtabs,
  .tsk-scope-tabs,
  .tsk-view-tabs,
  .sdt-dw-tabs,
  .eq-info-tabs,
  .vd-tabs,
  .activity-subtabs,
  .sfty-detail-tabs,
  .sfty-review-tabs,
  .cert-dash-tabs--inline,
  .tabs
) {
  border-color: rgba(255, 255, 255, 0.12) !important;
  background:
    linear-gradient(135deg, rgba(51, 65, 85, 0.66), rgba(15, 23, 42, 0.44)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22),
    0 10px 28px rgba(0, 0, 0, 0.24);
}

body.gce-viewport-shell:not([data-gce-mode="light"]) :is(
  .stm-status-tab,
  .crw-status-tab,
  .crd-tab,
  .fin-tab-btn,
  .fin-mock-tab,
  .tsk-scope-tabs > button,
  .tsk-view-tabs > button,
  .sdt-dw-tabs > button,
  .eq-info-tab-btn,
  .vd-tab,
  .activity-subtab,
  .sfty-detail-tab,
  .sfty-review-tab,
  .cert-dash-tab,
  .tab
) {
  color: #cbd5e1;
}

body.gce-viewport-shell:not([data-gce-mode="light"]) :is(
  .stm-status-tab.active,
  .crw-status-tab.active,
  .crd-tab.crd-tab--active,
  .fin-tab-btn.active,
  .fin-mock-tab.active,
  .tsk-scope-tabs > button.active,
  .tsk-view-tabs > button.active,
  .sdt-dw-tabs > button.is-active,
  .eq-info-tab-btn.active,
  .vd-tab.active,
  .activity-subtab.active,
  .sfty-detail-tab.active,
  .sfty-review-tab.active,
  .cert-dash-tab.active,
  .tab.active
) {
  color: #dbeafe !important;
  border-color: rgba(147, 197, 253, 0.28) !important;
  background:
    linear-gradient(145deg, rgba(59, 130, 246, 0.30), rgba(30, 58, 138, 0.24)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 5px 16px rgba(0, 0, 0, 0.28);
}

@media (prefers-reduced-motion: reduce) {
  body.gce-viewport-shell :is(
    .stm-status-tab,
    .crw-status-tab,
    .crd-tab,
    .fin-tab-btn,
    .fin-mock-tab,
    .tab
  ) {
    transition: none;
  }
}

/* ═══════════════════════════════════════════════════════════════
   iOS Liquid Glass shell — reference-strength light treatment
   ═══════════════════════════════════════════════════════════════ */
html[data-gce-mode="light"] body.gce-viewport-shell {
  background:
    radial-gradient(ellipse 72% 55% at 2% 0%, rgba(147, 197, 253, 0.52), transparent 64%),
    radial-gradient(ellipse 72% 50% at 100% 2%, rgba(191, 219, 254, 0.50), transparent 62%),
    radial-gradient(ellipse 58% 46% at 54% 100%, rgba(165, 243, 252, 0.34), transparent 60%),
    linear-gradient(145deg, #e8f1ff 0%, #f8fbff 48%, #eaf4ff 100%) !important;
  background-attachment: fixed !important;
}

html[data-gce-mode="light"] body.gce-viewport-shell .app {
  gap: 6px;
  padding: 6px;
  box-sizing: border-box;
}

html[data-gce-mode="light"] body.gce-viewport-shell .sidebar,
html[data-gce-mode="light"] body.gce-viewport-shell .sidebar.sidebar--field {
  top: 0;
  height: 100%;
  max-height: 100%;
  padding: 20px 14px;
  border: 1px solid rgba(255, 255, 255, 0.88) !important;
  border-radius: 21px;
  background:
    radial-gradient(circle at 18% 2%, rgba(255, 255, 255, 0.98), transparent 30%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.76), rgba(235, 244, 255, 0.52)) !important;
  box-shadow:
    inset 0 1px 0 #ffffff,
    inset 0 -1px 0 rgba(148, 163, 184, 0.12),
    0 14px 42px rgba(30, 58, 138, 0.10) !important;
  backdrop-filter: blur(30px) saturate(170%) !important;
  -webkit-backdrop-filter: blur(30px) saturate(170%) !important;
}

html[data-gce-mode="light"] body.gce-viewport-shell main,
html[data-gce-mode="light"] body.gce-viewport-shell #gce-main {
  padding: 0 8px 8px 0 !important;
}

html[data-gce-mode="light"] body.gce-viewport-shell :is(
  .card,
  .sfty-card,
  .dash-section,
  .dash-kpi-card,
  .dash-card,
  .dash-panel,
  .dash-topbar,
  .dash-mini-card,
  .stm-kpi,
  .stm-kpi--mockup,
  .stm-table-card,
  .tsk-kpi,
  .tsk-table-card,
  .tsk-widget,
  .crw-card,
  .crw-table-card,
  .cal-card,
  .cal-main,
  .cert-kpi-card,
  .fin-card,
  .fin-kpi-card,
  .fin-mock-header,
  .fin-ov-kpi,
  .fin-ov-card,
  .eq-card,
  .stg-card,
  .sdt-kpi,
  .sdt-panel,
  .crd-kpi,
  .crd-panel
) {
  border: 1px solid rgba(255, 255, 255, 0.90) !important;
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 255, 255, 0.96), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(240, 247, 255, 0.54)) !important;
  box-shadow:
    inset 0 1px 0 #ffffff,
    inset 0 -1px 0 rgba(148, 163, 184, 0.10),
    0 9px 26px rgba(30, 58, 138, 0.075) !important;
  backdrop-filter: blur(24px) saturate(155%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(155%) !important;
}

html[data-gce-mode="light"] body.gce-viewport-shell :is(
  .dash-kpi-card,
  .stm-kpi,
  .stm-kpi--mockup,
  .tsk-kpi,
  .fin-kpi-card,
  .fin-ov-kpi,
  .sdt-kpi,
  .crd-kpi
) {
  border-radius: 15px !important;
  box-shadow:
    inset 0 1px 0 #ffffff,
    inset 0 0 0 1px rgba(219, 234, 254, 0.36),
    0 7px 20px rgba(30, 58, 138, 0.07) !important;
}

html[data-gce-mode="light"] body.gce-viewport-shell :is(
  .dash-topbar,
  .stm-page-head,
  .crw-page-head,
  .fin-page-head,
  .tsk-page-head,
  .eq-page-head,
  .stg-page-head
) {
  border: 1px solid rgba(255, 255, 255, 0.92) !important;
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(235, 244, 255, 0.52)) !important;
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 7px 22px rgba(30, 58, 138, 0.07) !important;
  backdrop-filter: blur(26px) saturate(165%) !important;
  -webkit-backdrop-filter: blur(26px) saturate(165%) !important;
}

/* Crew header is also a glass card; keep both text lines inside its shell. */
html[data-gce-mode="light"] body.gce-viewport-shell.gce-crews-mockup .crw-page-head {
  width: 100%;
  flex-shrink: 0;
  padding: 12px 14px;
  box-sizing: border-box;
  overflow: hidden;
}

/* Tasks header — same glass card treatment as Crews */
html[data-gce-mode="light"] body.gce-viewport-shell.gce-tasks-mockup .tsk-page-head {
  width: 100%;
  flex-shrink: 0;
  padding: 14px 16px;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid rgba(216, 224, 234, 0.95) !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(239, 246, 255, 0.88)) !important;
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 6px 18px rgba(30, 58, 138, 0.07) !important;
  backdrop-filter: blur(22px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(160%) !important;
}

html[data-gce-mode="light"] body.gce-viewport-shell.gce-tasks-mockup .tsk-topbar-tools {
  background: rgba(255, 255, 255, 0.78);
  border-color: #d8e0ea;
}

html[data-gce-mode="light"] body.gce-viewport-shell.gce-crews-mockup .crw-page-head-row,
html[data-gce-mode="light"] body.gce-viewport-shell.gce-crews-mockup .crw-page-head-row > div:first-child {
  min-width: 0;
}

html[data-gce-mode="light"] body.gce-viewport-shell.gce-crews-mockup .crw-subtitle {
  max-width: 100%;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

html[data-gce-mode="light"] body.gce-viewport-shell :is(
  .dash-search-input,
  .stm-search,
  .stm-filter-select,
  .tsk-search,
  .fin-filter,
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select
) {
  border-color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 3px 12px rgba(30, 58, 138, 0.05);
  backdrop-filter: blur(15px) saturate(145%);
  -webkit-backdrop-filter: blur(15px) saturate(145%);
}

html[data-gce-mode="light"] body.gce-viewport-shell .nav-item {
  border: 1px solid transparent;
  border-radius: 13px;
}

html[data-gce-mode="light"] body.gce-viewport-shell .nav-item:hover {
  border-color: rgba(255, 255, 255, 0.74);
  background: rgba(255, 255, 255, 0.44);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

html[data-gce-mode="light"] body.gce-viewport-shell .nav-item.active {
  border-color: rgba(255, 255, 255, 0.96) !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(219, 234, 254, 0.76)) !important;
  color: #1e3a8a !important;
  box-shadow:
    inset 0 1px 0 #ffffff,
    inset 0 -1px 0 rgba(30, 58, 138, 0.08),
    0 6px 16px rgba(30, 58, 138, 0.10) !important;
}

html[data-gce-mode="light"] body.gce-viewport-shell .sidebar-logout-btn.nav-item,
html[data-gce-mode="light"] body.gce-viewport-shell .gce-sidebar-clock {
  border-color: rgba(255, 255, 255, 0.82) !important;
  background: rgba(255, 255, 255, 0.48) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

html[data-gce-mode="light"] body.gce-viewport-shell .ai-ops-center {
  margin-left: 8px;
  border: 1px solid rgba(255, 255, 255, 0.90);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.96), transparent 30%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.76), rgba(235, 244, 255, 0.54)) !important;
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 14px 38px rgba(30, 58, 138, 0.10);
  backdrop-filter: blur(28px) saturate(165%);
  -webkit-backdrop-filter: blur(28px) saturate(165%);
}

html[data-gce-mode="light"] body.gce-viewport-shell .ai-ops-center :is(
  .ai-ops-center-head,
  .ai-ops-priority-row
) {
  border-color: rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.38);
}

/* Keep data rows crisp even when their containing panel is glass. */
html[data-gce-mode="light"] body.gce-viewport-shell :is(
  .stm-table-wrap,
  .crw-table-wrap,
  .tsk-table-wrap,
  .fin-table-wrap,
  .fin-mock-table-wrap
) {
  background: rgba(255, 255, 255, 0.86) !important;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  html[data-gce-mode="light"] body.gce-viewport-shell :is(
    .sidebar,
    .card,
    .sfty-card,
    .dash-section,
    .stm-kpi,
    .crd-panel
  ) {
    background: rgba(248, 251, 255, 0.96) !important;
  }
}

/* ── Sites Management — full Liquid Glass treatment ── */
html[data-gce-mode="light"] body.gce-viewport-shell.gce-sites-mockup .stm-page {
  position: relative;
}

html[data-gce-mode="light"] body.gce-viewport-shell.gce-sites-mockup :is(
  .stm-page-head,
  .stm-kpi--mockup,
  .stm-status-row,
  .stm-table-toolbar,
  .stm-filters-bar,
  .stm-table-viewbar,
  #stm-sites-list-view,
  #stm-sites-grid-view,
  .stm-site-card,
  .stm-selection-bar
) {
  border-color: rgba(255, 255, 255, 0.90) !important;
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 255, 255, 0.96), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(235, 244, 255, 0.52)) !important;
  box-shadow:
    inset 0 1px 0 #ffffff,
    inset 0 -1px 0 rgba(148, 163, 184, 0.10),
    0 8px 24px rgba(30, 58, 138, 0.075) !important;
  backdrop-filter: blur(24px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(160%) !important;
}

html[data-gce-mode="light"] body.gce-viewport-shell.gce-sites-mockup .stm-page-head {
  padding: 12px 14px;
  border-radius: 17px;
}

html[data-gce-mode="light"] body.gce-viewport-shell.gce-sites-mockup .stm-kpi--mockup {
  border-radius: 14px !important;
}

html[data-gce-mode="light"] body.gce-viewport-shell.gce-sites-mockup .stm-status-row {
  padding: 5px 7px;
  border: 1px solid rgba(255, 255, 255, 0.88) !important;
  border-radius: 15px;
}

html[data-gce-mode="light"] body.gce-viewport-shell.gce-sites-mockup .stm-status-row .stm-status-tabs {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 6px !important;
  column-gap: 6px !important;
  row-gap: 6px !important;
  padding: 2px 0 !important;
}

html[data-gce-mode="light"] body.gce-viewport-shell.gce-sites-mockup .stm-status-tab {
  padding: 10px 14px !important;
  min-height: 40px !important;
  font-size: 13px !important;
  margin: 0 !important;
}

html[data-gce-mode="light"] body.gce-viewport-shell.gce-sites-mockup .stm-table-toolbar {
  margin-top: 7px;
  border: 1px solid rgba(255, 255, 255, 0.90) !important;
  border-radius: 14px 14px 0 0;
}

html[data-gce-mode="light"] body.gce-viewport-shell.gce-sites-mockup :is(
  .stm-search,
  .stm-toolbar-filter,
  .stm-operations-view,
  .stm-view-btn,
  .stm-btn-outline
) {
  border-color: rgba(255, 255, 255, 0.92) !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(239, 246, 255, 0.60)) !important;
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 3px 10px rgba(30, 58, 138, 0.055);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}

html[data-gce-mode="light"] body.gce-viewport-shell.gce-sites-mockup .stm-view-btn.active {
  color: #1e3a8a !important;
  border-color: rgba(255, 255, 255, 0.98) !important;
  background:
    linear-gradient(145deg, #ffffff, rgba(219, 234, 254, 0.84)) !important;
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 5px 13px rgba(30, 58, 138, 0.13);
}

html[data-gce-mode="light"] body.gce-viewport-shell.gce-sites-mockup #stm-sites-list-view {
  border: 1px solid #d8e0ea !important;
  border-top: 0 !important;
  border-radius: 0 0 15px 15px;
  background: #f1f5f9 !important;
}

html[data-gce-mode="light"] body.gce-viewport-shell.gce-sites-mockup .stm-table-wrap {
  background: #f8fafc !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 6px 8px 10px !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  flex: 0 0 auto !important;
  min-height: auto !important;
}

/*
 * NEVER put backdrop-filter on <td> — Chromium breaks table layout.
 * Opaque white shells + light tray + tight spacing = readable card rows.
 */
html[data-gce-mode="light"] body.gce-viewport-shell.gce-sites-mockup
  .stm-table--mockup {
  border-collapse: separate !important;
  border-spacing: 0 4px !important;
}

html[data-gce-mode="light"] body.gce-viewport-shell.gce-sites-mockup
  .stm-table--mockup tbody tr.stm-row-card td {
  background: #ffffff !important;
  border-top: 1px solid #e2e8f0 !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}

html[data-gce-mode="light"] body.gce-viewport-shell.gce-sites-mockup
  .stm-table--mockup tbody tr.stm-row-card td:first-child {
  border-left: 3px solid #93c5fd !important;
  border-radius: 8px 0 0 8px !important;
}

html[data-gce-mode="light"] body.gce-viewport-shell.gce-sites-mockup
  .stm-table--mockup tbody tr.stm-row-card td:last-child {
  border-right: 1px solid #d8e0ea !important;
  border-radius: 0 8px 8px 0 !important;
}

html[data-gce-mode="light"] body.gce-viewport-shell.gce-sites-mockup
  .stm-table--mockup tbody tr.stm-row-card:hover td {
  background: #f8fafc !important;
  border-top-color: #93c5fd !important;
  border-bottom-color: #93c5fd !important;
}

html[data-gce-mode="light"] body.gce-viewport-shell.gce-sites-mockup
  .stm-table--mockup tbody tr.stm-row--selected td {
  background: #eff6ff !important;
}

html[data-gce-mode="light"] body.gce-viewport-shell.gce-sites-mockup
  .stm-table--mockup thead th {
  background: #f1f5f9 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html[data-gce-mode="light"] body.gce-viewport-shell.gce-sites-mockup #stm-sites-grid-view {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.90);
  border-radius: 15px;
}

html[data-gce-mode="light"] body.gce-viewport-shell.gce-sites-mockup .stm-site-card {
  border-radius: 15px;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

html[data-gce-mode="light"] body.gce-viewport-shell.gce-sites-mockup .stm-site-card:hover {
  transform: translateY(-2px);
  border-color: rgba(147, 197, 253, 0.72) !important;
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 12px 28px rgba(30, 58, 138, 0.12) !important;
}

/* Sites KPI cards — visible separation on ultrawide */
body.gce-sites-mockup .stm-kpi-grid.stm-kpi-grid--mockup,
body.gce-viewport-shell.gce-sites-mockup .stm-kpi-grid.stm-kpi-grid--mockup {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 22px !important;
  column-gap: 22px !important;
  row-gap: 16px !important;
  width: 100%;
}

body.gce-sites-mockup .stm-kpi-grid.stm-kpi-grid--mockup > .stm-kpi--mockup,
body.gce-viewport-shell.gce-sites-mockup .stm-kpi-grid.stm-kpi-grid--mockup > .stm-kpi--mockup {
  margin: 0 !important;
}

@media (max-width: 1200px) {
  body.gce-sites-mockup .stm-kpi-grid.stm-kpi-grid--mockup,
  body.gce-viewport-shell.gce-sites-mockup .stm-kpi-grid.stm-kpi-grid--mockup {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 720px) {
  body.gce-sites-mockup .stm-kpi-grid.stm-kpi-grid--mockup,
  body.gce-viewport-shell.gce-sites-mockup .stm-kpi-grid.stm-kpi-grid--mockup {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }
}

/* Sites status tabs — readable filter tabs (not squashed) */
body.gce-sites-mockup .stm-status-row .stm-status-tabs,
body.gce-viewport-shell.gce-sites-mockup .stm-status-row .stm-status-tabs {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 6px !important;
  column-gap: 6px !important;
  row-gap: 6px !important;
  width: 100% !important;
}

body.gce-sites-mockup .stm-status-tab,
body.gce-viewport-shell.gce-sites-mockup .stm-status-tab {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 10px 14px !important;
  min-height: 40px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
}

body.gce-sites-mockup .stm-tab-count,
body.gce-viewport-shell.gce-sites-mockup .stm-tab-count {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 22px !important;
  height: 20px !important;
  padding: 0 7px !important;
  margin-left: 2px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}

/* Sites / list pages — keep readable gaps between KPIs and status tabs */
body.gce-viewport-shell.gce-sites-mockup .stm-page {
  gap: 14px !important;
}

body.gce-viewport-shell.gce-sites-mockup .stm-kpi-grid--mockup {
  gap: 18px !important;
  column-gap: 18px !important;
  row-gap: 14px !important;
  margin-bottom: 4px !important;
}

body.gce-viewport-shell.gce-sites-mockup .stm-kpi--mockup {
  min-height: 72px !important;
  padding: 10px 12px !important;
}

body.gce-viewport-shell.gce-sites-mockup .stm-status-row {
  margin-top: 6px !important;
  min-height: 48px !important;
}

body.gce-viewport-shell.gce-sites-mockup .stm-status-row .stm-status-tabs {
  gap: 6px !important;
  column-gap: 6px !important;
  row-gap: 6px !important;
}

body.gce-viewport-shell.gce-sites-mockup .stm-table-wrap {
  padding: 4px 4px 6px !important;
}

body.gce-viewport-shell.gce-sites-mockup .stm-table th,
body.gce-viewport-shell.gce-sites-mockup .stm-table td {
  padding-top: 7px !important;
  padding-bottom: 7px !important;
}

body.gce-viewport-shell.gce-sites-mockup .stm-table--mockup {
  border-spacing: 0 3px !important;
}

body.gce-viewport-shell.gce-sites-mockup
  .stm-table--mockup tbody tr.stm-row-card td {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

html[data-gce-mode="light"] body.gce-viewport-shell.gce-sites-mockup
  .stm-table--mockup {
  border-spacing: 0 3px !important;
}

html[data-gce-mode="light"] body.gce-viewport-shell.gce-sites-mockup
  .stm-table--mockup tbody tr.stm-row-card td {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

html[data-gce-mode="light"] body.gce-viewport-shell.gce-sites-mockup .stm-table-wrap {
  padding: 4px 4px 6px !important;
}

html[data-gce-mode="light"] body.gce-viewport-shell.gce-sites-mockup .stm-status-row .stm-status-tabs {
  gap: 6px !important;
  column-gap: 6px !important;
  row-gap: 6px !important;
}

html[data-gce-mode="light"] body.gce-viewport-shell.gce-sites-mockup .stm-status-tab {
  padding: 10px 14px !important;
  min-height: 40px !important;
  font-size: 13px !important;
}
