/* Sites Management visual system — last-win after liquid-glass.
   Copy header / KPI pills / filter pills / glass cards app-wide.
   NEVER display:block Sites table rows. NEVER restyle week bars or notes grid. */

html body.gce-viewport-shell {
  --gce-sites-card-r: 0.875rem;
  --gce-sites-kpi-r: 0.65rem;
}

/* Page shells stay on milky canvas, not white sheets */
html body.gce-viewport-shell .dash-page,
html body.gce-viewport-shell .dash-page--ops,
html body.gce-viewport-shell .stm-page,
html body.gce-viewport-shell .fin-mockup-shell,
html body.gce-viewport-shell .crw-page,
html body.gce-viewport-shell .tsk-page,
html body.gce-viewport-shell .eq-page,
html body.gce-viewport-shell .sto-page,
html body.gce-viewport-shell .sfty-page,
html body.gce-viewport-shell .cal-page,
html body.gce-viewport-shell .msg-page,
html body.gce-viewport-shell .pnl-page,
html body.gce-viewport-shell .stg-page,
html body.gce-viewport-shell .sfd-page,
html body.gce-viewport-shell .cert-dash {
  background: transparent !important;
  box-shadow: none !important;
}

/* ── Same page header as Sites ── */
html body.gce-viewport-shell .stm-page-head,
html body.gce-viewport-shell .dash-ops-hero,
html body.gce-viewport-shell .dash-page--ops .stm-page-head,
html body.gce-viewport-shell .fin-mock-page-head,
html body.gce-viewport-shell .fin-page-head,
html body.gce-viewport-shell .crw-page-head,
html body.gce-viewport-shell .tsk-page-head,
html body.gce-viewport-shell .eq-page-head,
html body.gce-viewport-shell .sto-page-head,
html body.gce-viewport-shell .sfty-page-head,
html body.gce-viewport-shell .sfd-page-head,
html body.gce-viewport-shell .cal-page-head,
html body.gce-viewport-shell .msg-page-head,
html body.gce-viewport-shell .pnl-head,
html body.gce-viewport-shell .stg-mock-header,
html body.gce-viewport-shell .stg-page-head {
  padding: 12px 14px 10px !important;
  border-radius: 16px !important;
  margin-bottom: 10px !important;
  background: var(--gce-glass-panel) !important;
  border: 1px solid var(--gce-glass-edge) !important;
  box-shadow: var(--gce-glass-shine), var(--gce-glass-shadow) !important;
  backdrop-filter: blur(var(--gce-glass-blur)) saturate(var(--gce-glass-sat)) !important;
  -webkit-backdrop-filter: blur(var(--gce-glass-blur)) saturate(var(--gce-glass-sat)) !important;
}

html body.gce-viewport-shell .dash-ops-crumb,
html body.gce-viewport-shell .dash-page--ops .stm-breadcrumb {
  font-size: 0.6875rem !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: #64748b !important;
  margin-bottom: 0.2rem !important;
}

/* ── KPI / stat pill cards in a row (Sites mockup) ── */
html body.gce-viewport-shell .stm-kpi-grid--mockup,
html body.gce-viewport-shell .dash-page--ops .stm-kpi-grid,
html body.gce-viewport-shell .dash-kpi-grid--4,
html body.gce-viewport-shell .tsk-kpi-grid,
html body.gce-viewport-shell .eq-kpi-grid,
html body.gce-viewport-shell .eq-fleet-kpi,
html body.gce-viewport-shell .sto-kpi-bar,
html body.gce-viewport-shell .sfty-kpi-grid,
html body.gce-viewport-shell .sfd-kpi-grid,
html body.gce-viewport-shell .cert-kpi-grid,
html body.gce-viewport-shell .pnl-kpi-row,
html body.gce-viewport-shell .fin-ov-kpi-row,
html body.gce-viewport-shell .fin-rpt-kpis,
html body.gce-viewport-shell .cal-kpi-grid {
  display: grid !important;
  width: 100% !important;
  box-sizing: border-box !important;
  gap: 0.45rem 0.55rem !important;
  margin: 0 0 0.55rem !important;
  grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)) !important;
}

html body.gce-viewport-shell .dash-page--ops .stm-kpi-grid--mockup,
html body.gce-viewport-shell .dash-kpi-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

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

html body.gce-viewport-shell .stm-kpi--mockup,
html body.gce-viewport-shell .dash-kpi-card,
html body.gce-viewport-shell .dash-kpi-card--ops,
html body.gce-viewport-shell .tsk-kpi,
html body.gce-viewport-shell .tsk-kpi-mock,
html body.gce-viewport-shell .eq-kpi,
html body.gce-viewport-shell .eq-kpi-card,
html body.gce-viewport-shell .sto-kpi,
html body.gce-viewport-shell .sfty-kpi,
html body.gce-viewport-shell .sfd-kpi,
html body.gce-viewport-shell .cert-kpi,
html body.gce-viewport-shell .pnl-kpi,
html body.gce-viewport-shell .fin-ov-kpi,
html body.gce-viewport-shell .fin-kpi-card,
html body.gce-viewport-shell .fin-rpt-kpi,
html body.gce-viewport-shell .cal-kpi {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.55rem !important;
  min-height: 4.15rem !important;
  max-height: none !important;
  padding: 0.6rem 0.75rem !important;
  border-radius: var(--gce-sites-kpi-r) !important;
  overflow: hidden !important;
  position: relative !important;
  background: var(--gce-glass-panel) !important;
  border: 1px solid var(--gce-glass-edge) !important;
  box-shadow: var(--gce-glass-shine), var(--gce-glass-shadow) !important;
  backdrop-filter: blur(var(--gce-glass-blur)) saturate(var(--gce-glass-sat)) !important;
  -webkit-backdrop-filter: blur(var(--gce-glass-blur)) saturate(var(--gce-glass-sat)) !important;
}

html body.gce-viewport-shell .dash-kpi-spark {
  display: none !important;
}

html body.gce-viewport-shell .stm-kpi-label,
html body.gce-viewport-shell .dash-kpi-label,
html body.gce-viewport-shell .tsk-kpi-label,
html body.gce-viewport-shell .eq-kpi-label,
html body.gce-viewport-shell .sto-kpi-label,
html body.gce-viewport-shell .sfty-kpi-label,
html body.gce-viewport-shell .pnl-kpi-label,
html body.gce-viewport-shell .fin-ov-kpi-label,
html body.gce-viewport-shell .fin-kpi-label {
  display: block !important;
  font-size: 0.625rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  color: #475569 !important;
}

html body.gce-viewport-shell .stm-kpi-value,
html body.gce-viewport-shell .dash-kpi-value,
html body.gce-viewport-shell .tsk-kpi-value,
html body.gce-viewport-shell .eq-kpi-value,
html body.gce-viewport-shell .sto-kpi b,
html body.gce-viewport-shell .sfty-kpi-value,
html body.gce-viewport-shell .pnl-kpi-val,
html body.gce-viewport-shell .fin-ov-kpi-value {
  font-size: 1.35rem !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  color: #0f172a !important;
}

html body.gce-viewport-shell .stm-kpi-icon,
html body.gce-viewport-shell .eq-kpi-icon,
html body.gce-viewport-shell .sto-kpi-ico,
html body.gce-viewport-shell .sfty-kpi-icon,
html body.gce-viewport-shell .dash-kpi-icon {
  width: 34px !important;
  height: 34px !important;
  flex: 0 0 34px !important;
  border-radius: 10px !important;
  display: grid !important;
  place-items: center !important;
  font-size: 15px !important;
}

/* ── Filter / tab pills like Sites status ── */
html body.gce-viewport-shell .gce-page-chrome-bar,
html body.gce-viewport-shell .fin-mock-chrome-bar,
html body.gce-viewport-shell .fin-mock-tabs,
html body.gce-viewport-shell .fin-mock-tabs.fin-mock-tabs--mockup,
html body.gce-viewport-shell .pnl-tabs,
html body.gce-viewport-shell .pnl-tabs--mockup,
html body.gce-viewport-shell .tsk-scope-tabs,
html body.gce-viewport-shell .tsk-view-tabs,
html body.gce-viewport-shell .msg-list-filters,
html body.gce-viewport-shell .msg-inbox-tabs,
html body.gce-viewport-shell .cal-view-toggle,
html body.gce-viewport-shell .cert-tabs,
html body.gce-viewport-shell .sfty-filters--mockup,
html body.gce-viewport-shell .dash-ops-status-row,
html body.gce-viewport-shell .stm-status-row {
  background: transparent !important;
  border: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-radius: 0 !important;
  padding: 0.2rem 0 !important;
  gap: 0.45rem !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
}

html body.gce-viewport-shell .stm-status-tab,
html body.gce-viewport-shell .fin-mock-tab,
html body.gce-viewport-shell .pnl-tab,
html body.gce-viewport-shell .pnl-chip,
html body.gce-viewport-shell .tsk-scope-tabs > button,
html body.gce-viewport-shell .tsk-view-tabs > button,
html body.gce-viewport-shell .msg-list-filter,
html body.gce-viewport-shell .cal-view-btn,
html body.gce-viewport-shell .cert-tab,
html body.gce-viewport-shell .sfty-review-pill,
html body.gce-viewport-shell .eq-chip,
html body.gce-viewport-shell .sto-chip {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 2.15rem !important;
  height: 2.15rem !important;
  padding: 0 0.85rem !important;
  margin: 0 !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  border-radius: 999px !important;
  border: 1px solid var(--gce-glass-edge) !important;
  border-bottom: 1px solid var(--gce-glass-edge) !important;
  background: var(--gce-glass-fill) !important;
  color: #0f172a !important;
  box-shadow: var(--gce-glass-shine) !important;
  backdrop-filter: blur(18px) saturate(1.5) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.5) !important;
}

html body.gce-viewport-shell .stm-status-tab.active,
html body.gce-viewport-shell .fin-mock-tab.active,
html body.gce-viewport-shell .pnl-tab.active,
html body.gce-viewport-shell .pnl-chip.active,
html body.gce-viewport-shell .tsk-scope-tabs > button.active,
html body.gce-viewport-shell .tsk-view-tabs > button.active,
html body.gce-viewport-shell .msg-list-filter.is-active,
html body.gce-viewport-shell .cal-view-btn.active,
html body.gce-viewport-shell .cert-tab.active,
html body.gce-viewport-shell .sfty-review-pill.active,
html body.gce-viewport-shell .eq-chip.active,
html body.gce-viewport-shell .sto-chip.active {
  background: #1e3a8a !important;
  border-color: #1e3a8a !important;
  color: #fff !important;
  box-shadow: none !important;
}

/* ── Glass table / card language (rounded, not a flat white sheet) ── */
html body.gce-viewport-shell .dash-ops-card,
html body.gce-viewport-shell .dash-ops-map-card,
html body.gce-viewport-shell .dash-ops-sites-card,
html body.gce-viewport-shell .dash-ops-table-wrap,
html body.gce-viewport-shell .tsk-table-card,
html body.gce-viewport-shell .tsk-widget,
html body.gce-viewport-shell .eq-table-wrap,
html body.gce-viewport-shell .eq-card,
html body.gce-viewport-shell .sto-card,
html body.gce-viewport-shell .sto-side-card,
html body.gce-viewport-shell .sfty-card,
html body.gce-viewport-shell .cal-shell-card,
html body.gce-viewport-shell .cal-board-shell,
html body.gce-viewport-shell .msg-aside,
html body.gce-viewport-shell .msg-main,
html body.gce-viewport-shell .pnl-section,
html body.gce-viewport-shell .pnl-table-wrap,
html body.gce-viewport-shell .fin-ov-card,
html body.gce-viewport-shell .fin-rpt-card,
html body.gce-viewport-shell .fin-mock-table-panel,
html body.gce-viewport-shell .fin-mock-sites-panel,
html body.gce-viewport-shell .stg-summary-card,
html body.gce-viewport-shell .crw-table-wrap {
  background: var(--gce-glass-panel) !important;
  border: 1px solid var(--gce-glass-edge) !important;
  border-radius: var(--gce-sites-card-r) !important;
  box-shadow: var(--gce-glass-shine), var(--gce-glass-shadow) !important;
  backdrop-filter: blur(var(--gce-glass-blur)) saturate(var(--gce-glass-sat)) !important;
  -webkit-backdrop-filter: blur(var(--gce-glass-blur)) saturate(var(--gce-glass-sat)) !important;
}

html body.gce-viewport-shell .dash-ops-table-wrap,
html body.gce-viewport-shell .tsk-table-wrap,
html body.gce-viewport-shell .eq-table-wrap,
html body.gce-viewport-shell .sto-table-wrap,
html body.gce-viewport-shell .pnl-table-wrap,
html body.gce-viewport-shell .fin-mock-table-wrap,
html body.gce-viewport-shell .crw-table-wrap {
  overflow-x: auto !important;
  overflow-y: visible !important;
  flex: 0 0 auto !important;
  height: auto !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html body.gce-viewport-shell .dash-ops-table thead th,
html body.gce-viewport-shell .tsk-table thead th,
html body.gce-viewport-shell .eq-table thead th,
html body.gce-viewport-shell .sto-table thead th,
html body.gce-viewport-shell .pnl-table thead th {
  background: rgba(248, 251, 255, 0.55) !important;
  backdrop-filter: blur(18px) saturate(1.35) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.35) !important;
}

/* Dashboard map lives inside the glass card, not a raw strip */
html body.gce-viewport-shell .dash-ops-fill-row--map {
  display: block !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

html body.gce-viewport-shell .dash-ops-map-card {
  padding: 0.35rem 0.45rem 0.55rem !important;
}

html body.gce-viewport-shell .dash-ops-sites-map {
  border-radius: 0.75rem !important;
  margin: 0.35rem 0.15rem 0.15rem !important;
  border: 1px solid var(--gce-glass-line) !important;
  box-shadow: var(--gce-glass-shine) !important;
}

html body.gce-viewport-shell .stm-page-head,
html body.gce-viewport-shell .dash-ops-hero,
html body.gce-viewport-shell .fin-mock-page-head,
html body.gce-viewport-shell .sfty-page-head,
html body.gce-viewport-shell .cal-page-head,
html body.gce-viewport-shell .pnl-head,
html body.gce-viewport-shell .sto-page-head,
html body.gce-viewport-shell .stg-page-head {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
}

html body.gce-viewport-shell .sto-page-head > .stm-breadcrumb {
  width: 100%;
  flex: 0 0 auto;
}

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

/* Sites table contract — last-win. One collapsed grid; week bars span thead width. */
html body.gce-viewport-shell.gce-sites-mockup .stm-table,
html body.gce-viewport-shell.gce-sites-mockup .stm-table.stm-table--mockup {
  display: table !important;
  width: 100% !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-table thead {
  display: table-header-group !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-table tbody,
html body.gce-viewport-shell.gce-sites-mockup .stm-table tbody.stm-week-group {
  display: table-row-group !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-table tr,
html body.gce-viewport-shell.gce-sites-mockup .stm-table tbody tr.stm-row,
html body.gce-viewport-shell.gce-sites-mockup .stm-table tbody tr.stm-row-card,
html body.gce-viewport-shell.gce-sites-mockup .stm-table tbody tr.stm-week-head,
html body.gce-viewport-shell.gce-sites-mockup .stm-table tbody.stm-week-group tr.stm-week-head {
  display: table-row !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-table thead th,
html body.gce-viewport-shell.gce-sites-mockup .stm-table tbody tr.stm-row > td,
html body.gce-viewport-shell.gce-sites-mockup .stm-table tbody tr.stm-row-card > td,
html body.gce-viewport-shell.gce-sites-mockup .stm-table tbody tr.stm-week-head > td {
  display: table-cell !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-table tbody tr.stm-week-head > td {
  width: auto !important;
  max-width: none !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-week-head-inner {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 1.875rem !important;
  max-height: 1.875rem !important;
  margin: 0 !important;
  padding: 0 0.45rem !important;
  box-sizing: border-box !important;
  background: transparent !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-week-head-inner .stm-week-head-rule,
html body.gce-viewport-shell.gce-sites-mockup .stm-week-head-inner .stm-week-head-rule:first-child,
html body.gce-viewport-shell.gce-sites-mockup .stm-week-head-inner .stm-week-head-rule:last-child {
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 2rem !important;
  height: 1px !important;
  opacity: 0.85 !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-table tbody tr.stm-week-head,
html body.gce-viewport-shell.gce-sites-mockup .stm-table tbody.stm-week-group tr.stm-week-head,
html body.gce-viewport-shell.gce-sites-mockup .stm-table tbody tr.stm-week-head > td {
  height: 1.875rem !important;
  min-height: 1.875rem !important;
  max-height: 1.875rem !important;
}

html body.gce-viewport-shell.gce-sites-mockup #gce-main,
html body.gce-viewport-shell.gce-sites-mockup main {
  padding-left: 0.28rem !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-table-wrap,
html body.gce-viewport-shell.gce-sites-mockup [data-gce-scroll] .stm-table-wrap {
  padding-left: 0 !important;
  padding-right: 0.1rem !important;
}

/* Nested header row inside a Sites-style head is not a second card */
html body.gce-viewport-shell .stm-page-head .stg-mock-header,
html body.gce-viewport-shell .stm-page-head.dash-ops-hero {
  margin-bottom: 0 !important;
}

html body.gce-viewport-shell .stm-page-head > .stg-mock-header {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

html body.gce-viewport-shell .dash-kpi-icon-sites { background: rgba(59,130,246,.12); color: #1e3a8a; }
html body.gce-viewport-shell .dash-kpi-icon-crews { background: rgba(22,101,52,.12); color: #166534; }
html body.gce-viewport-shell .dash-kpi-icon-tasks { background: rgba(30,58,138,.12); color: #1e3a8a; }
html body.gce-viewport-shell .dash-kpi-icon-incidents { background: rgba(161,98,7,.14); color: #a16207; }
