/* Global rem density — last stylesheet. html font-size comes from
   innerWidth (--gce-root-fs). Never zoom .app. Compact phones stay 16px.
   Laptop 1280–1512 shrinks; ≥1680 is 16px+; 1920+ is a bit larger. */

html {
  font-size: var(--gce-root-fs, 16px);
}

/* Wide CSS viewport must never keep MacBook 10.5px, even if JS lags. */
@media (min-width: 1680px) {
  html {
    font-size: max(16px, var(--gce-root-fs, 16px));
  }
}

@media (min-width: 1920px) {
  html {
    font-size: max(16.5px, var(--gce-root-fs, 16.5px));
  }
}

@media (min-width: 2560px) {
  html {
    font-size: max(18px, var(--gce-root-fs, 18px));
  }
}

html body.gce-viewport-shell #gce-main,
html body.gce-viewport-shell main {
  padding: 0.5rem 0.7rem 0.55rem !important;
}

/* ── Sidebar ── */
html body.gce-viewport-shell .sidebar--field .nav-section-label {
  font-size: 0.625rem !important;
  padding: 0 0.75rem 0.4rem !important;
}

html body.gce-viewport-shell .sidebar--field .nav.nav--field {
  padding: 0.5rem 0.45rem 0.45rem !important;
}

html body.gce-viewport-shell .sidebar--field .nav-section + .nav-section {
  margin-top: 1rem !important;
}

html body.gce-viewport-shell .sidebar--field .nav-item,
html body.gce-viewport-shell .sidebar--field .nav--field .nav-item,
html body.gce-viewport-shell .sidebar--field .sidebar-nav-foot .nav-item {
  font-size: 0.8125rem !important;
  padding: 0.35rem 0.6rem 0.35rem 0.65rem !important;
  min-height: 2.05rem !important;
  gap: 0.5rem !important;
  border-radius: 0.6rem !important;
}

html body.gce-viewport-shell .sidebar--field .brand--field h1,
html body.gce-viewport-shell .sidebar .brand h1 {
  font-size: 0.875rem !important;
}

html body.gce-viewport-shell .sidebar--field .nav-item .nav-icon {
  width: 1.05rem !important;
  height: 1.05rem !important;
}

/* ── Page titles / KPI / filters (all modules) ── */
html body.gce-viewport-shell .stm-page-head h2,
html body.gce-viewport-shell .dash-ops-hero h2,
html body.gce-viewport-shell .fin-mock-header h2,
html body.gce-viewport-shell .fin-page-head h2,
html body.gce-viewport-shell .crw-page-head h2,
html body.gce-viewport-shell .tsk-page-head h2,
html body.gce-viewport-shell .eq-page-head h2,
html body.gce-viewport-shell .sto-page-head h2,
html body.gce-viewport-shell .sfty-page-head h2,
html body.gce-viewport-shell .cal-page-head h2,
html body.gce-viewport-shell .msg-page-head h2,
html body.gce-viewport-shell .personnel-page-head h2,
html body.gce-viewport-shell .stg-page-head h2 {
  font-size: 1.35rem !important;
  line-height: 1.2 !important;
  margin-bottom: 0.25rem !important;
}

html body.gce-viewport-shell .dash-kpi-label,
html body.gce-viewport-shell .stm-kpi-label,
html body.gce-viewport-shell .fin-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 {
  font-size: 0.625rem !important;
}

html body.gce-viewport-shell .dash-kpi-value,
html body.gce-viewport-shell .stm-kpi-value,
html body.gce-viewport-shell .fin-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-value,
html body.gce-viewport-shell .sfty-kpi-value {
  font-size: 1.2rem !important;
  line-height: 1.15 !important;
}

html body.gce-viewport-shell .dash-kpi-card,
html body.gce-viewport-shell .stm-kpi--mockup,
html body.gce-viewport-shell .fin-kpi-card,
html body.gce-viewport-shell .tsk-kpi {
  padding: 0.45rem 0.55rem !important;
  min-height: 0 !important;
}

html body.gce-viewport-shell .stm-btn,
html body.gce-viewport-shell .tsk-btn,
html body.gce-viewport-shell .fin-btn,
html body.gce-viewport-shell .eq-btn,
html body.gce-viewport-shell .sto-btn,
html body.gce-viewport-shell button.stm-btn-sm {
  font-size: 0.75rem !important;
  padding: 0.3rem 0.55rem !important;
}

html body.gce-viewport-shell .stm-filter-select,
html body.gce-viewport-shell .stm-search,
html body.gce-viewport-shell .tsk-filter-select,
html body.gce-viewport-shell .fin-filter-select,
html body.gce-viewport-shell input.stm-search,
html body.gce-viewport-shell .cal-filter select,
html body.gce-viewport-shell .msg-search input {
  font-size: 0.75rem !important;
  padding: 0.28rem 0.45rem !important;
}

html body.gce-viewport-shell .stm-status-tab,
html body.gce-viewport-shell .tsk-scope-tabs > button,
html body.gce-viewport-shell .tsk-view-tabs > button,
html body.gce-viewport-shell .fin-mock-tabs button,
html body.gce-viewport-shell .sfty-filter-chip,
html body.gce-viewport-shell .msg-inbox-tabs button {
  font-size: 0.75rem !important;
  padding: 0.28rem 0.5rem !important;
}

/* ── Tables ── */
html body.gce-viewport-shell .stm-table,
html body.gce-viewport-shell .tsk-table,
html body.gce-viewport-shell .fin-table,
html body.gce-viewport-shell .eq-table,
html body.gce-viewport-shell .sto-table,
html body.gce-viewport-shell .sfty-table,
html body.gce-viewport-shell .cert-table,
html body.gce-viewport-shell .personnel-table,
html body.gce-viewport-shell .crw-table {
  font-size: 0.6875rem !important;
}

html body.gce-viewport-shell .stm-table th,
html body.gce-viewport-shell .stm-table td,
html body.gce-viewport-shell .tsk-table th,
html body.gce-viewport-shell .tsk-table td,
html body.gce-viewport-shell .fin-table th,
html body.gce-viewport-shell .fin-table td,
html body.gce-viewport-shell .eq-table th,
html body.gce-viewport-shell .eq-table td,
html body.gce-viewport-shell .sto-table th,
html body.gce-viewport-shell .sto-table td,
html body.gce-viewport-shell .sfty-table th,
html body.gce-viewport-shell .sfty-table td,
html body.gce-viewport-shell .personnel-table th,
html body.gce-viewport-shell .personnel-table td {
  padding: 0.35rem 0.45rem !important;
}

html body.gce-viewport-shell .stm-table thead th,
html body.gce-viewport-shell .tsk-table thead th,
html body.gce-viewport-shell .fin-table thead th {
  font-size: 0.625rem !important;
}

/* ── Dashboard ── */
html body.gce-viewport-shell .dash-page--ops .dash-ops-hero-sub,
html body.gce-viewport-shell .dash-page--ops .dash-ops-table td,
html body.gce-viewport-shell .dash-page--ops .dash-ops-table th {
  font-size: 0.75rem !important;
}

html body.gce-viewport-shell .dash-page--ops .dash-ops-hero-actions .gce-night-btn,
html body.gce-viewport-shell .dash-page--ops .dash-ops-hero-actions .dash-search-input,
html body.gce-viewport-shell .dash-page--ops .dash-ops-hero-actions .dash-date-range,
html body.gce-viewport-shell .dash-page--ops .dash-ops-hero-actions .dash-week-nav,
html body.gce-viewport-shell .dash-page--ops .dash-ops-live,
html body.gce-viewport-shell .dash-page--ops .dash-ops-new-task,
html body.gce-viewport-shell .dash-page--ops .dash-ops-hero-actions .dash-icon-btn,
html body.gce-viewport-shell .dash-page--ops .dash-ops-avatar {
  height: 2.25rem !important;
  min-height: 2.25rem !important;
  box-sizing: border-box !important;
}

html body.gce-viewport-shell .dash-page--ops .dash-ops-hero-actions .dash-icon-btn,
html body.gce-viewport-shell .dash-page--ops .dash-ops-avatar,
html body.gce-viewport-shell .dash-page--ops .dash-ops-hero-actions .dash-week-nav {
  width: 2.25rem !important;
}

html body.gce-viewport-shell .dash-page--ops .dash-ops-card h3,
html body.gce-viewport-shell .dash-page--ops .dash-ops-panel h3 {
  font-size: 0.8125rem !important;
}

/* ── Finance / Personnel / Messages / Tasks / Fleet / Storage / Safety / Calendar ── */
html body.gce-viewport-shell .fin-mock-header p,
html body.gce-viewport-shell .crw-page-head p,
html body.gce-viewport-shell .tsk-page-head p {
  font-size: 0.75rem !important;
}

html body.gce-viewport-shell .msg-thread-name,
html body.gce-viewport-shell .msg-conv-name {
  font-size: 0.8125rem !important;
}

html body.gce-viewport-shell .msg-bubble,
html body.gce-viewport-shell .msg-preview {
  font-size: 0.75rem !important;
}

html body.gce-viewport-shell .cal-month-title,
html body.gce-viewport-shell .cal-event-title {
  font-size: 0.8125rem !important;
}

html body.gce-viewport-shell .sdt-wf-task-label,
html body.gce-viewport-shell .sdt-wf-phase-title,
html body.gce-viewport-shell .sdt-hero-title {
  font-size: 0.8125rem !important;
}

html body.gce-viewport-shell .sdt-wf-notes-preview,
html body.gce-viewport-shell .sdt-meta,
html body.gce-viewport-shell .sdt-chip {
  font-size: 0.6875rem !important;
}

html body.gce-viewport-shell .gce-ai-fab {
  min-width: 4.5rem !important;
  height: 2.25rem !important;
  padding: 0 0.75rem !important;
  font-size: 0.6875rem !important;
  border-radius: 0.7rem !important;
}

/* ── Sites: rem table chrome, week bars 1.75rem (28px at 16px root) ── */
html body.gce-viewport-shell.gce-sites-mockup .stm-table,
html body.gce-viewport-shell.gce-sites-mockup .stm-table--mockup {
  font-size: 0.6875rem !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-site-name,
html body.gce-viewport-shell.gce-sites-mockup .stm-site-id-link {
  font-size: 0.6875rem !important;
}

html body.gce-viewport-shell.gce-sites-mockup .status-picker-btn {
  font-size: 0.6875rem !important;
  padding: 0.2rem 0.4rem !important;
  white-space: nowrap !important;
}

html body.gce-viewport-shell.gce-sites-mockup .status-picker-btn > span:first-child {
  white-space: nowrap !important;
  word-break: normal !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-table th.stm-col-status,
html body.gce-viewport-shell.gce-sites-mockup .stm-table td.stm-status-cell {
  width: 8.5rem !important;
  min-width: 8.5rem !important;
  max-width: 9.5rem !important;
  overflow: hidden !important;
}

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

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

html body.gce-viewport-shell.gce-sites-mockup .stm-week-head-inner {
  display: flex !important;
  height: 1.875rem !important;
  max-height: 1.875rem !important;
  line-height: 1.875rem !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-week-head-label {
  font-size: 0.6875rem !important;
  line-height: 1.2 !important;
  padding: 0.12rem 0.7rem !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-outage-date,
html body.gce-viewport-shell.gce-sites-mockup .stm-week-range {
  display: block !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-notes-text {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* Wide monitors: air out the Sites table. Tight stays for 1280–1512. */
html[data-gce-density="comfortable"] body.gce-viewport-shell .stm-table th,
html[data-gce-density="comfortable"] body.gce-viewport-shell .stm-table td,
html[data-gce-density="roomy"] body.gce-viewport-shell .stm-table th,
html[data-gce-density="roomy"] body.gce-viewport-shell .stm-table td {
  padding: 0.7rem 0.75rem !important;
}

html[data-gce-density="comfortable"] body.gce-viewport-shell.gce-sites-mockup .stm-table,
html[data-gce-density="roomy"] body.gce-viewport-shell.gce-sites-mockup .stm-table {
  font-size: 0.75rem !important;
}

html[data-gce-density="roomy"] body.gce-viewport-shell.gce-sites-mockup .stm-table {
  font-size: 0.8125rem !important;
}

/* Sites: fill the pane; real table layout so Site # stays in its column. */
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;
  min-width: 100% !important;
  max-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 thead tr {
  display: table-row !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-table thead th {
  display: table-cell !important;
  white-space: nowrap !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-table thead th.stm-col-site_id ~ th.stm-col-site_id {
  display: none !important;
}

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

/* Clip every data cell so text cannot paint over the next column.
   Week section heads stay full-width (colspan) and are not clipped away. */
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 {
  overflow: hidden !important;
  max-width: 0;
  vertical-align: top !important;
  box-sizing: border-box !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-table tbody tr.stm-row > td.stm-actions-cell,
html body.gce-viewport-shell.gce-sites-mockup .stm-table tbody tr.stm-row-card > td.stm-actions-cell,
html body.gce-viewport-shell.gce-sites-mockup .stm-table tbody tr.stm-row > td.stm-notes-col,
html body.gce-viewport-shell.gce-sites-mockup .stm-table tbody tr.stm-row-card > td.stm-notes-col,
html body.gce-viewport-shell.gce-sites-mockup .stm-table tbody tr.stm-row > td.stm-name-cell,
html body.gce-viewport-shell.gce-sites-mockup .stm-table tbody tr.stm-row-card > td.stm-name-cell {
  overflow: hidden !important;
  max-width: none !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-table tbody tr.stm-row > td.stm-actions-cell,
html body.gce-viewport-shell.gce-sites-mockup .stm-table tbody tr.stm-row-card > td.stm-actions-cell {
  overflow: visible !important;
  max-width: none;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-table tbody tr.stm-row > td.stm-id-cell,
html body.gce-viewport-shell.gce-sites-mockup .stm-table tbody tr.stm-row-card > td.stm-id-cell,
html body.gce-viewport-shell.gce-sites-mockup .stm-table tbody tr.stm-row > td.stm-num-cell,
html body.gce-viewport-shell.gce-sites-mockup .stm-table tbody tr.stm-row-card > td.stm-num-cell,
html body.gce-viewport-shell.gce-sites-mockup .stm-table tbody tr.stm-row > td.stm-select-cell,
html body.gce-viewport-shell.gce-sites-mockup .stm-table tbody tr.stm-row-card > td.stm-select-cell {
  overflow: hidden !important;
  max-width: none;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-schedule-col,
html body.gce-viewport-shell.gce-sites-mockup .stm-schedule-cell {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-schedule-cell {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0.22rem !important;
  width: 100% !important;
  margin: 0 !important;
  position: static !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-schedule-cell .stm-schedule-range,
html body.gce-viewport-shell.gce-sites-mockup .stm-schedule-cell b {
  display: block !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  font-size: 0.6875rem !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-schedule-hint {
  display: block !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  font-size: 0.625rem !important;
  line-height: 1.35 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-crew-cell,
html body.gce-viewport-shell.gce-sites-mockup .stm-crew-cell .crew-picker-wrap,
html body.gce-viewport-shell.gce-sites-mockup .stm-crew-cell .crew-picker-btn {
  min-width: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-crew-cell .crew-picker-btn {
  overflow: hidden !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-crew-cell .crew-picker-btn > span:first-child {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-table th.stm-col-notes,
html body.gce-viewport-shell.gce-sites-mockup .stm-notes-col,
html body.gce-viewport-shell.gce-sites-mockup .stm-notes-cell {
  width: 9% !important;
  min-width: 0 !important;
  max-width: none !important;
  overflow: hidden !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-week-col,
html body.gce-viewport-shell.gce-sites-mockup .stm-week-cell {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-week-cell {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.2rem !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-week-num {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-custom-cell,
html body.gce-viewport-shell.gce-sites-mockup .stm-custom-cell--outage,
html body.gce-viewport-shell.gce-sites-mockup .stm-outage-stack {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  white-space: normal !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 tr.stm-week-head td {
  max-width: none !important;
  overflow: hidden !important;
}

/* Sites polish — even rhythm, no zoom, no giant gaps, no cell overlap. */
html body.gce-viewport-shell.gce-sites-mockup .stm-page {
  gap: 0.7rem !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-kpi-grid,
html body.gce-viewport-shell.gce-sites-mockup .stm-kpi-grid--mockup {
  gap: 0.55rem !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-kpi--mockup {
  display: flex !important;
  align-items: center !important;
  gap: 0.55rem !important;
  min-height: 4.15rem !important;
  padding: 0.6rem 0.75rem !important;
  border-radius: 0.75rem !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-kpi--mockup .stm-kpi-label {
  font-size: 0.625rem !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  color: #475569 !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-kpi--mockup .stm-kpi-value {
  font-size: 1.35rem !important;
  line-height: 1.1 !important;
  color: #0f172a !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-kpi-grid--mockup .stm-kpi--mockup small {
  font-size: 0.625rem !important;
  color: #64748b !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-status-row {
  min-height: 2.5rem !important;
  gap: 0.45rem !important;
  padding: 0.2rem 0 !important;
  align-items: center !important;
  border-bottom: 0 !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-status-tab {
  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;
  font-size: 0.75rem !important;
  line-height: 1 !important;
  border-radius: 999px !important;
  border: 1px solid #d8e0ea !important;
  border-bottom: 1px solid #d8e0ea !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-table-toolbar {
  align-items: center !important;
  padding: 0.45rem 0.65rem !important;
  gap: 0.45rem !important;
  border-radius: 0.65rem !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-table-toolbar .stm-search,
html body.gce-viewport-shell.gce-sites-mockup .stm-table-toolbar .stm-filter-select,
html body.gce-viewport-shell.gce-sites-mockup .stm-table-toolbar .stm-toolbar-filter,
html body.gce-viewport-shell.gce-sites-mockup .stm-table-toolbar .stm-ms-trigger {
  height: 2rem !important;
  min-height: 2rem !important;
  padding: 0 0.6rem !important;
  font-size: 0.75rem !important;
  border-radius: 0.5rem !important;
  box-sizing: border-box !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-table-toolbar .stm-search {
  padding-left: 1.75rem !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-table {
  line-height: 1.35 !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-table th,
html body.gce-viewport-shell.gce-sites-mockup .stm-table td {
  padding: 0.75rem 0.8rem !important;
  line-height: 1.35 !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-table thead th {
  padding: 0.55rem 0.7rem !important;
  font-size: 0.625rem !important;
  letter-spacing: 0.05em !important;
  text-align: left !important;
  vertical-align: middle !important;
  color: #64748b !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-table thead th .stm-sort-btn {
  display: inline-flex !important;
  align-items: center !important;
  width: 100% !important;
  padding: 0 !important;
  text-align: left !important;
}

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 {
  min-height: 3.5rem !important;
  vertical-align: middle !important;
  line-height: 1.35 !important;
}

html body.gce-viewport-shell.gce-sites-mockup .status-picker-btn,
html body.gce-viewport-shell.gce-sites-mockup .crew-picker-btn {
  height: 2rem !important;
  min-height: 2rem !important;
  padding: 0 0.6rem !important;
  line-height: 1.35 !important;
  border-radius: 999px !important;
  box-sizing: border-box !important;
  align-items: center !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-week-head-rule {
  flex: 1 1 auto !important;
  height: 1px !important;
  min-width: 1.5rem !important;
  max-height: 1px !important;
  opacity: 0.85 !important;
  background: linear-gradient(90deg, transparent, #93c5fd, #1e3a8a 55%) !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-week-head-rule:last-child {
  background: linear-gradient(90deg, #1e3a8a 45%, #93c5fd, transparent) !important;
}

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

html body.gce-viewport-shell.gce-sites-mockup .stm-notes-cell {
  display: flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-notes-text {
  color: #64748b !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-schedule-cell {
  justify-content: center !important;
}

html[data-gce-density="comfortable"] body.gce-viewport-shell.gce-sites-mockup .stm-table th,
html[data-gce-density="comfortable"] body.gce-viewport-shell.gce-sites-mockup .stm-table td,
html[data-gce-density="roomy"] body.gce-viewport-shell.gce-sites-mockup .stm-table th,
html[data-gce-density="roomy"] body.gce-viewport-shell.gce-sites-mockup .stm-table td {
  padding: 0.8rem 0.85rem !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-table tbody tr.stm-week-head td,
html body.gce-viewport-shell.gce-sites-mockup .stm-table tbody tr.stm-week-gap td {
  padding: 0 0.35rem !important;
  min-height: 1.875rem !important;
  max-height: 1.875rem !important;
  width: auto !important;
  border-radius: 0 !important;
  vertical-align: middle !important;
}

/* SITE # / SITE ID: same width on th and td so the grid lines up, text not clipped. */
html body.gce-viewport-shell.gce-sites-mockup .stm-table th.stm-th-num,
html body.gce-viewport-shell.gce-sites-mockup .stm-table th.stm-th-select,
html body.gce-viewport-shell.gce-sites-mockup .stm-table td.stm-num-cell,
html body.gce-viewport-shell.gce-sites-mockup .stm-table td.stm-select-cell {
  width: 4.25rem !important;
  min-width: 4.25rem !important;
  max-width: 4.25rem !important;
  overflow: hidden !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-table th.stm-col-site_id,
html body.gce-viewport-shell.gce-sites-mockup .stm-table td.stm-id-cell {
  width: 8.5rem !important;
  min-width: 8.5rem !important;
  max-width: 8.5rem !important;
  overflow: hidden !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-site-id-link,
html body.gce-viewport-shell.gce-sites-mockup .stm-row-number {
  display: inline-block !important;
  max-width: 100% !important;
  overflow: visible !important;
  white-space: nowrap !important;
  text-overflow: clip !important;
  word-break: normal !important;
}

/* Rounded table card + row ends. Keep table-row (no display:block on tr).
   Collapsed grid so thead and body share one column track (Project Type included). */
html body.gce-viewport-shell.gce-sites-mockup #stm-sites-list-view.stm-table-card-full {
  border-radius: 1rem !important;
  overflow: visible !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-table-wrap {
  border-radius: 1rem !important;
  background: #eef2f7 !important;
}

html[data-gce-mode="light"] body.gce-viewport-shell.gce-sites-mockup .stm-table thead th:first-child,
html body.gce-viewport-shell.gce-sites-mockup .stm-table thead th:first-child {
  border-radius: 1rem 0 0 0 !important;
}

html[data-gce-mode="light"] body.gce-viewport-shell.gce-sites-mockup .stm-table thead th:last-child,
html body.gce-viewport-shell.gce-sites-mockup .stm-table thead th:last-child {
  border-radius: 0 1rem 0 0 !important;
}

html[data-gce-mode="light"] body.gce-viewport-shell.gce-sites-mockup .stm-table--mockup tbody tr.stm-row-card td:first-child,
html body.gce-viewport-shell.gce-sites-mockup .stm-table tbody tr.stm-row-card td:first-child {
  border-radius: 1rem 0 0 1rem !important;
}

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

html[data-gce-mode="light"] body.gce-viewport-shell.gce-sites-mockup .stm-table,
html[data-gce-mode="light"] body.gce-viewport-shell.gce-sites-mockup .stm-table--mockup,
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;
  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 thead 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 {
  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;
}

/* Pills: status filters + List/Map/Cards. Labels centered. */
html[data-gce-mode="light"] body.gce-viewport-shell.gce-sites-mockup .stm-status-row,
html body.gce-viewport-shell.gce-sites-mockup .stm-status-row {
  align-items: center !important;
  border-bottom: 0 !important;
}

html[data-gce-mode="light"] body.gce-viewport-shell.gce-sites-mockup .stm-status-tab,
html body.gce-viewport-shell.gce-sites-mockup .stm-status-tab {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.35rem !important;
  height: 2.15rem !important;
  min-height: 2.15rem !important;
  padding: 0 0.9rem !important;
  margin: 0 !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  vertical-align: middle !important;
  border-radius: 999px !important;
  border: 1px solid #d8e0ea !important;
  background: #f8fafc !important;
  color: #475569 !important;
  box-sizing: border-box !important;
}

html[data-gce-mode="light"] body.gce-viewport-shell.gce-sites-mockup .stm-status-tab.active,
html body.gce-viewport-shell.gce-sites-mockup .stm-status-tab.active {
  background: #1e3a8a !important;
  border-color: #1e3a8a !important;
  color: #fff !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-status-tab .stm-tab-count {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 1.25rem !important;
  min-height: 1.25rem !important;
  line-height: 1 !important;
  border-radius: 999px !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-status-tab.active .stm-tab-count {
  background: #dbeafe !important;
  color: #1e3a8a !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-view-toggle {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.3rem !important;
  padding: 0.2rem !important;
  border-radius: 999px !important;
  background: #f1f5f9 !important;
  border: 1px solid #d8e0ea !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-view-btn,
html body.gce-viewport-shell.gce-sites-mockup .stm-view-btn--label {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 1.85rem !important;
  min-height: 1.85rem !important;
  padding: 0 0.75rem !important;
  border-radius: 999px !important;
  line-height: 1 !important;
  box-sizing: border-box !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-view-btn.active {
  background: #1e3a8a !important;
  border-color: #1e3a8a !important;
  color: #fff !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 {
  vertical-align: middle !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-notes-cluster {
  display: flex !important;
  align-items: stretch !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 1.85rem !important;
  border: 1px solid #d8e0ea !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  background: #fff !important;
  box-sizing: border-box !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-notes-cluster .stm-notes-cell {
  flex: 1 1 auto !important;
  width: auto !important;
  max-width: none !important;
  height: 100% !important;
  padding: 0 0.6rem !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-notes-add {
  flex: 0 0 1.85rem !important;
  width: 1.85rem !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-left: 1px solid #d8e0ea !important;
  border-radius: 0 !important;
  background: #1e3a8a !important;
  color: #fff !important;
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
}

html body.gce-viewport-shell.gce-sites-mockup .stm-site-actions-col .stm-site-add-btn {
  display: none !important;
}

/* Workflow list table: task shrinks, notes takes leftover */
html body.gce-viewport-shell #site-detail-main .sdt-wf-list-table .sdt-wf-col-resp,
html body.gce-viewport-shell #site-detail-main .sdt-wf-list-table .sdt-wf-col-status {
  width: 148px !important;
  min-width: 148px !important;
  max-width: 148px !important;
}
html body.gce-viewport-shell #site-detail-main .sdt-wf-list-table .sdt-wf-col-notes,
html body.gce-viewport-shell #site-detail-main .sdt-wf-list-table .sdt-wf-col--notes {
  width: 100% !important;
  min-width: 14rem !important;
}
html body.gce-viewport-shell #site-detail-main .sdt-workflow-card--list .sdt-wf-table-head--list,
html body.gce-viewport-shell #site-detail-main .sdt-workflow-card--list .sdt-wf-row--list {
  display: table-row !important;
  grid-template-columns: none !important;
  grid-template-areas: none !important;
}

html body.gce-viewport-shell #site-detail-main .sdt-wf-row--list .sdt-wf-col-task {
  min-width: 0 !important;
  max-width: 22rem !important;
  white-space: nowrap !important;
}

html body.gce-viewport-shell #site-detail-main .sdt-wf-row--list .sdt-wf-resp,
html body.gce-viewport-shell #site-detail-main .sdt-wf-row--list .sdt-wf-resp-select,
html body.gce-viewport-shell #site-detail-main .sdt-wf-row--list .sdt-wf-ms-status.sdt-wf-status-toggle {
  width: 100% !important;
  height: 2.15rem !important;
  min-height: 2.15rem !important;
  max-height: 2.15rem !important;
  box-sizing: border-box !important;
}

html body.gce-viewport-shell #site-detail-main .sdt-wf-row--list .sdt-wf-ms-status.sdt-wf-status-toggle {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 0.5rem !important;
  border-radius: 0 !important;
  min-width: 0 !important;
  pointer-events: auto !important;
}

html body.gce-viewport-shell #site-detail-main .sdt-wf-row--list .sdt-wf-notes-cell {
  width: 100% !important;
  min-width: 14rem !important;
  vertical-align: top !important;
}
html body.gce-viewport-shell #site-detail-main .sdt-wf-row--list .sdt-wf-notes-preview,
html body.gce-viewport-shell #site-detail-main .sdt-wf-row--list .sdt-wf-notes-input {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 4.5rem !important;
  height: 4.5rem !important;
  padding: 0.5rem 0.625rem !important;
  border-radius: 0.5rem !important;
  line-height: 1.35 !important;
  box-sizing: border-box !important;
  resize: vertical !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

html body.gce-viewport-shell #site-detail-main .sdt-wf-row--list .sdt-wf-resp,
html body.gce-viewport-shell #site-detail-main .sdt-wf-row--list .sdt-wf-resp-select,
html body.gce-viewport-shell #site-detail-main .sdt-wf-row--list .sdt-wf-ms-status.sdt-wf-status-toggle {
  width: 100% !important;
  height: 2.15rem !important;
  min-height: 2.15rem !important;
  max-height: 2.15rem !important;
  box-sizing: border-box !important;
}

html body.gce-viewport-shell #site-detail-main .sdt-wf-row--list .sdt-wf-ms-status.sdt-wf-status-toggle {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 0.5rem !important;
  border-radius: 0 !important;
  min-width: 0 !important;
  pointer-events: auto !important;
}

html body.gce-viewport-shell #site-detail-main .sdt-wf-row.is-done,
html body.gce-viewport-shell #site-detail-main .sdt-wf-row--list.is-done {
  background: #fff !important;
}

html body.gce-viewport-shell #site-detail-main .sdt-wf-ms-status.is-approved,
html body.gce-viewport-shell #site-detail-main .sdt-wf-ms-status.is-completed,
html body.gce-viewport-shell #site-detail-main .sdt-wf-ms-status.is-received {
  background: #166534 !important;
  color: #fff !important;
  border-color: #14532d !important;
}

html body.gce-viewport-shell #site-detail-main .sdt-wf-ms-status.is-pending {
  background: #a16207 !important;
  color: #fff !important;
  border-color: #854d0e !important;
}

html body.gce-viewport-shell #site-detail-main .sdt-wf-ms-status.is-review {
  background: #1e3a8a !important;
  color: #fff !important;
  border-color: #1e3a8a !important;
}

html body.gce-viewport-shell #site-detail-main .sdt-wf-row.is-done .sdt-wf-checkbox {
  background: #166534 !important;
  border-color: #14532d !important;
}
