
:root {
  --bg: #f3f7fc;
  --surface: rgba(255, 255, 255, 0.66);
  --surface-solid: #ffffff;
  --surface-soft: rgba(255, 255, 255, 0.78);
  --line: rgba(110, 132, 162, 0.18);
  --line-strong: rgba(110, 132, 162, 0.30);
  --text: #111827;
  --muted: #667085;
  --blue: #0a7cff;
  --blue-hover: #006adc;
  --blue-soft: rgba(10, 124, 255, 0.11);
  --blue-glass: rgba(10, 124, 255, 0.16);
  --blue-border: rgba(10, 124, 255, 0.42);
  --blue-shadow: 0 14px 30px rgba(10, 124, 255, 0.22);
  --teal: #00a6d6;
  --green: #34c759;
  --amber: #d97706;
  --red: #f04438;
  --heat-loss: #ef4444;
  --heat-gain: #007aff;
  --ventilation-supply-line: #0284c7;
  --ventilation-supply-flow: #0ea5e9;
  --ventilation-supply-ink: #0369a1;
  --ventilation-supply-soft: rgba(240, 249, 255, 0.94);
  --ventilation-supply-border: rgba(2, 132, 199, 0.58);
  --ventilation-supply-glow: rgba(2, 132, 199, 0.78);
  --ventilation-extract-line: #d97706;
  --ventilation-extract-flow: #f59e0b;
  --ventilation-extract-ink: #b45309;
  --ventilation-extract-soft: rgba(255, 251, 235, 0.94);
  --ventilation-extract-border: rgba(217, 119, 6, 0.6);
  --ventilation-extract-glow: rgba(217, 119, 6, 0.78);
  --glass-bg: rgba(255, 255, 255, 0.50);
  --glass-strong: rgba(255, 255, 255, 0.74);
  --glass-subtle: rgba(255, 255, 255, 0.36);
  --glass-border: rgba(176, 196, 224, 0.42);
  --glass-blur: blur(14px) saturate(138%);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, 0.82), inset 0 -1px 0 rgba(255, 255, 255, 0.28);
  --button-glass: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(242, 247, 255, 0.68));
  --button-glass-hover: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(228, 241, 255, 0.80));
  --input-glass: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.84));
  --tile-glass: linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(246, 250, 255, 0.58));
  --tile-glass-strong: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(238, 246, 255, 0.72));
  --shadow: 0 18px 46px rgba(31, 41, 55, 0.10);
  --tile-shadow: 0 12px 30px rgba(31, 41, 55, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.84);
  --control-hover-bg: var(--button-glass-hover);
  --control-hover-border: rgba(0, 122, 255, 0.32);
  --control-hover-shadow: var(--glass-edge), 0 12px 28px rgba(0, 122, 255, 0.10), 0 4px 14px rgba(0, 0, 0, 0.06);
  --danger-hover-bg: linear-gradient(180deg, #ffffff, #fff1f2);
  --danger-hover-border: rgba(244, 63, 94, 0.5);
  --danger-hover-shadow: inset 0 0 0 1px rgba(244, 63, 94, 0.08), 0 8px 20px rgba(127, 29, 29, 0.08);
  --tooltip-bg: rgba(255, 255, 255, 0.9);
  --tooltip-arrow-bg: rgba(255, 255, 255, 0.9);
  --tooltip-text: #1d1d1f;
  --tooltip-border: rgba(60, 60, 67, 0.2);
  --tooltip-shadow: var(--glass-edge), 0 16px 34px rgba(0, 0, 0, 0.14);
  --radius: 10px;
  --theme-page-bg: radial-gradient(circle at 20% 0%, rgba(10, 124, 255, 0.08), transparent 34%), radial-gradient(circle at 84% 14%, rgba(99, 102, 241, 0.07), transparent 32%), linear-gradient(180deg, #fbfdff 0%, #f4f8fd 46%, #eef3f9 100%);
  --theme-card-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 255, 0.78));
  --theme-card-shadow: 0 18px 42px rgba(31, 41, 55, 0.10), 0 1px 0 rgba(255, 255, 255, 0.92) inset;
  --theme-control-shadow: 0 8px 18px rgba(31, 41, 55, 0.07), 0 1px 0 rgba(255, 255, 255, 0.86) inset;
  --theme-pill-radius: 10px;
  --font-ui: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --type-xs: 0.72rem;
  --type-sm: 0.82rem;
  --type-base: 0.94rem;
  --type-md: 1rem;
  --type-lg: 1.16rem;
  --type-xl: 1.42rem;
  --leading-tight: 1.14;
  --leading-normal: 1.34;
  --leading-loose: 1.52;
  --tracking-ui: 0;
  font-family: var(--font-ui);
}

/* Floor-plan service geometry is nested inside an outer CSS zoom. Keep the
   visible route, terminal points and selection affordances in screen space;
   transparent hit geometry remains deliberately larger than the artwork. */
#sheet .pipe-vertex,
#sheet .pipe-draft-point,
#sheet .pipe-guide-point,
#sheet .pipe-draft-elbow,
#sheet .pipe-snap-target,
#sheet .radiator-connection-anchor,
#sheet .outlet-connection-anchor,
#sheet .ufh-manifold-connection-anchor,
#sheet .district-endpoint-connection-anchor,
#sheet .fire-endpoint-connection-anchor,
#sheet .plant-room-connection-port,
#sheet .floor-plan-plant-room-equipment-port-core,
#sheet .pipe-fitting-screen-marker circle,
#sheet .pipe-fitting-screen-marker path,
#sheet .pipe-valve-screen-marker :is(.pipe-valve-inline-shape, .pipe-valve-inline-line, .pipe-valve-body, .pipe-valve-stem, .pipe-valve-handle, .pipe-valve-occluder) {
  vector-effect: none;
}

#sheet .pipe-vertex,
#sheet .pipe-draft-point,
#sheet .pipe-guide-point,
#sheet .pipe-draft-elbow,
#sheet .pipe-snap-target,
#sheet .radiator-connection-anchor,
#sheet .outlet-connection-anchor,
#sheet .ufh-manifold-connection-anchor,
#sheet .district-endpoint-connection-anchor,
#sheet .fire-endpoint-connection-anchor,
#sheet .plant-room-connection-port,
#sheet .floor-plan-plant-room-equipment-port-core {
  stroke-width: 1px;
  filter: none;
}

#sheet .pipe-fitting-screen-marker circle,
#sheet .pipe-fitting-screen-marker path,
#sheet .pipe-valve-screen-marker :is(.pipe-valve-inline-shape, .pipe-valve-inline-line, .pipe-valve-body, .pipe-valve-stem, .pipe-valve-handle, .pipe-valve-occluder) {
  stroke-width: 1.1px;
  filter: none;
}

#sheet .radiator-connection-stem,
#sheet .outlet-connection-stem,
#sheet .ufh-manifold-connection-stem,
#sheet .district-endpoint-connection-stem,
#sheet .plant-room-port-stem,
#sheet .pipe-guide-axis {
  stroke-width: calc(0.9px * var(--canvas-zoom-inverse, 1));
}

#sheet .drawn-pipe-run.active .drawn-pipe-line,
#sheet .drawn-pipe-segment-line.active {
  filter: drop-shadow(0 0 calc(1.4px * var(--canvas-zoom-inverse, 1)) rgba(37, 99, 235, 0.58));
}

/* Placement ghosts are visual only. Keep every descendant out of hit-testing,
   even when the reusable placed-item symbol enables pointer input later. */
.floor-placement-preview-layer,
.floor-placement-preview-layer *,
.floor-outlet-preview-layer,
.floor-outlet-preview-layer *,
.radiator-preview,
.radiator-preview *,
.ufh-manifold-preview,
.ufh-manifold-preview *,
.district-endpoint.preview,
.district-endpoint.preview *,
.fire-endpoint.preview,
.fire-endpoint.preview *,
.plant-room-planner-placement-preview-layer,
.plant-room-planner-placement-preview-layer *,
.plant-room-planner-equipment-preview-layer,
.plant-room-planner-equipment-preview-layer *,
.plant-room-planner-valve.preview,
.plant-room-planner-valve.preview * {
  pointer-events: none !important;
}

/* Pipework product suitability, operating envelope and evidence */
.dashboard-pipework-compatibility-editor {
  --pipework-status-color: #b45309;
  --pipework-status-border: rgba(217, 119, 6, 0.28);
  --pipework-status-bg: rgba(245, 158, 11, 0.08);
  overflow: hidden;
}

.dashboard-pipework-compatibility-body {
  display: grid;
  gap: 10px;
}

.dashboard-pipework-editor-notice {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid rgba(0, 113, 227, 0.2);
  border-radius: 8px;
  background: rgba(0, 113, 227, 0.06);
  color: var(--text);
}

.dashboard-pipework-editor-notice strong {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(0, 113, 227, 0.12);
  color: var(--blue);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

.dashboard-pipework-editor-notice span {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  line-height: 1.4;
}

.dashboard-pipework-application-groups {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 8px;
}

.dashboard-pipework-application-group,
.dashboard-pipework-envelope,
.dashboard-pipework-evidence {
  min-width: 0;
  margin: 0;
  padding: 9px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.54);
}

.dashboard-pipework-application-group {
  display: grid;
  align-content: start;
  gap: 6px;
}

.dashboard-pipework-application-group legend,
.dashboard-pipework-envelope legend,
.dashboard-pipework-evidence legend {
  max-width: calc(100% - 10px);
  padding: 0 5px;
  color: var(--text);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.035em;
  line-height: 1.2;
  text-transform: uppercase;
}

.dashboard-product-editor-form .dashboard-pipework-application-group > label {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(116px, 0.65fr);
  align-items: center;
  gap: 3px 8px;
  padding: 6px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.5);
  text-transform: none;
}

.dashboard-pipework-application-group > label > span {
  min-width: 0;
  color: var(--text);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.25;
}

.dashboard-product-editor-form .dashboard-pipework-application-group select {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 11px;
}

.dashboard-pipework-application-group > label > small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  line-height: 1.3;
  text-transform: none;
}

.dashboard-pipework-envelope,
.dashboard-pipework-evidence {
  padding: 10px;
}

.dashboard-pipework-envelope > .dashboard-product-editor-section-grid,
.dashboard-pipework-evidence > .dashboard-product-editor-section-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.dashboard-pipework-envelope label,
.dashboard-pipework-evidence label {
  min-width: 0;
}

.dashboard-pipework-location-options {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.4);
}

.dashboard-pipework-location-options > span {
  flex: 0 0 100%;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.dashboard-product-editor-form .dashboard-pipework-location-options label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--text);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-transform: none;
  cursor: pointer;
}

.dashboard-product-editor-form .dashboard-pipework-location-options input {
  width: 14px;
  min-width: 14px;
  height: 14px;
  min-height: 14px;
  margin: 0;
  padding: 0;
  accent-color: var(--blue);
  box-shadow: none;
}

.dashboard-pipework-evidence > .field-note {
  margin: 8px 1px 0;
}

.pipework-compatibility-panel {
  --pipework-status-color: #b45309;
  --pipework-status-border: rgba(217, 119, 6, 0.3);
  --pipework-status-bg: rgba(245, 158, 11, 0.08);
  position: relative;
  padding: 10px;
  border: 1px solid var(--pipework-status-border);
  border-radius: 9px;
  background: linear-gradient(145deg, var(--pipework-status-bg), rgba(255, 255, 255, 0.34));
  overflow: hidden;
}

/* Keep the status treatment when the panel sits inside the generic detail rail. */
.product-detail-panel section.pipework-compatibility-panel {
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--pipework-status-border);
  background: linear-gradient(145deg, var(--pipework-status-bg), rgba(255, 255, 255, 0.34));
}

.pipework-compatibility-panel.is-eligible,
.pipe-product-suitability.is-eligible {
  --pipework-status-color: #047857;
  --pipework-status-border: rgba(5, 150, 105, 0.32);
  --pipework-status-bg: rgba(16, 185, 129, 0.08);
}

.pipework-compatibility-panel.needs-evidence,
.pipe-product-suitability.needs-evidence {
  --pipework-status-color: #b45309;
  --pipework-status-border: rgba(217, 119, 6, 0.32);
  --pipework-status-bg: rgba(245, 158, 11, 0.1);
}

.pipework-compatibility-panel.is-not-suitable,
.pipe-product-suitability.is-not-suitable {
  --pipework-status-color: #b91c1c;
  --pipework-status-border: rgba(220, 38, 38, 0.34);
  --pipework-status-bg: rgba(239, 68, 68, 0.08);
}

.pipework-takeoff-status {
  display: inline-flex;
  align-items: center;
  min-width: max-content;
  padding: 3px 7px;
  border: 1px solid rgba(217, 119, 6, 0.32);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.1);
  color: #92400e;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.2;
}

.pipework-takeoff-status.is-eligible {
  border-color: rgba(5, 150, 105, 0.32);
  background: rgba(16, 185, 129, 0.08);
  color: #047857;
}

.pipework-takeoff-status.is-not-suitable {
  border-color: rgba(220, 38, 38, 0.34);
  background: rgba(239, 68, 68, 0.08);
  color: #b91c1c;
}

.pipework-compatibility-panel > h3 {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 920;
}

.pipework-compatibility-panel > p {
  margin: 0;
}

.pipework-compatibility-summary {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--pipework-status-border);
  border-radius: 7px;
  background: var(--pipework-status-bg);
}

.pipework-compatibility-summary strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--pipework-status-color);
  font-size: 11px;
  font-weight: 950;
}

.pipework-compatibility-summary strong::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px var(--pipework-status-bg);
  content: "";
}

.pipework-compatibility-summary span {
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-align: right;
}

.pipework-application-list,
.pipework-evidence-list {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.pipework-system-suitability-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.pipework-system-suitability-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 6px 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.42);
}

.pipework-system-suitability-row strong,
.pipework-system-suitability-row span {
  min-width: 0;
  font-size: 9px;
  line-height: 1.25;
}

.pipework-system-suitability-row strong {
  color: var(--text);
  font-weight: 850;
}

.pipework-system-suitability-row span {
  color: var(--muted);
  font-weight: 900;
  text-align: right;
}

.pipework-system-suitability-row.is-eligible {
  border-color: rgba(5, 150, 105, 0.28);
  background: rgba(16, 185, 129, 0.07);
}

.pipework-system-suitability-row.is-eligible span {
  color: #047857;
}

.pipework-system-suitability-row.is-review {
  border-color: rgba(217, 119, 6, 0.28);
  background: rgba(245, 158, 11, 0.07);
}

.pipework-system-suitability-row.is-review span {
  color: #b45309;
}

.pipework-system-suitability-row.is-not-suitable {
  border-color: rgba(220, 38, 38, 0.28);
  background: rgba(239, 68, 68, 0.06);
}

.pipework-system-suitability-row.is-not-suitable span {
  color: #b91c1c;
}

.pipework-application-list {
  max-height: 230px;
  overflow: auto;
  padding-right: 2px;
}

.pipework-application-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.42);
}

.pipework-application-row strong {
  min-width: 0;
  color: var(--text);
  font-size: 10px;
  font-weight: 820;
  line-height: 1.3;
}

.pipework-application-row span {
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.25;
  white-space: nowrap;
}

.pipework-application-row.is-declared span {
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
}

.pipework-application-row.needs-evidence span {
  background: rgba(245, 158, 11, 0.1);
  color: #b45309;
}

.pipework-application-row.is-not-suitable span {
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
}

.pipework-evidence-list article {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  padding: 7px 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.42);
}

.pipework-evidence-list article strong,
.pipework-evidence-list article span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.pipework-evidence-list article strong {
  color: var(--text);
  font-size: 10px;
  font-weight: 880;
}

.pipework-evidence-list article span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 9px;
  font-weight: 680;
  line-height: 1.35;
}

.pipework-evidence-list article a {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  color: var(--blue);
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}

.pipework-evidence-list article.is-current {
  border-color: rgba(5, 150, 105, 0.26);
}

.pipework-evidence-list article.is-expired {
  border-color: rgba(220, 38, 38, 0.28);
  background: rgba(239, 68, 68, 0.05);
}

.zone-inline-warning.pipe-product-suitability {
  border-color: var(--pipework-status-border);
  background: var(--pipework-status-bg);
}

.zone-inline-warning.pipe-product-suitability > svg,
.zone-inline-warning.pipe-product-suitability > span > strong {
  color: var(--pipework-status-color);
}

html[data-theme="dark"] .dashboard-pipework-editor-notice {
  border-color: rgba(96, 165, 250, 0.26);
  background: rgba(59, 130, 246, 0.1);
}

html[data-theme="dark"] .dashboard-pipework-editor-notice strong {
  background: rgba(96, 165, 250, 0.16);
  color: #93c5fd;
}

html[data-theme="dark"] .dashboard-pipework-application-group,
html[data-theme="dark"] .dashboard-pipework-envelope,
html[data-theme="dark"] .dashboard-pipework-evidence,
html[data-theme="dark"] .dashboard-pipework-application-group > label,
html[data-theme="dark"] .dashboard-pipework-location-options,
html[data-theme="dark"] .dashboard-pipework-location-options label,
html[data-theme="dark"] .pipework-application-row,
html[data-theme="dark"] .pipework-system-suitability-row,
html[data-theme="dark"] .pipework-evidence-list article {
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.42);
}

html[data-theme="dark"] .pipework-compatibility-panel {
  background: linear-gradient(145deg, var(--pipework-status-bg), rgba(15, 23, 42, 0.38));
}

html[data-theme="dark"] .product-detail-panel section.pipework-compatibility-panel {
  border-color: var(--pipework-status-border);
  background: linear-gradient(145deg, var(--pipework-status-bg), rgba(15, 23, 42, 0.38));
}

html[data-theme="dark"] .zone-inline-warning.pipe-product-suitability {
  border-color: var(--pipework-status-border);
  background: var(--pipework-status-bg);
}

html[data-theme="dark"] .pipework-compatibility-panel.is-eligible,
html[data-theme="dark"] .pipe-product-suitability.is-eligible {
  --pipework-status-color: #6ee7b7;
  --pipework-status-border: rgba(52, 211, 153, 0.32);
  --pipework-status-bg: rgba(16, 185, 129, 0.13);
}

html[data-theme="dark"] .pipework-compatibility-panel.needs-evidence,
html[data-theme="dark"] .pipe-product-suitability.needs-evidence {
  --pipework-status-color: #fbbf24;
  --pipework-status-border: rgba(251, 191, 36, 0.32);
  --pipework-status-bg: rgba(245, 158, 11, 0.14);
}

html[data-theme="dark"] .pipework-compatibility-panel.is-not-suitable,
html[data-theme="dark"] .pipe-product-suitability.is-not-suitable {
  --pipework-status-color: #fca5a5;
  --pipework-status-border: rgba(248, 113, 113, 0.34);
  --pipework-status-bg: rgba(239, 68, 68, 0.13);
}

html[data-theme="dark"] .pipework-application-row.is-declared span {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
}

html[data-theme="dark"] .pipework-application-row.needs-evidence span,
html[data-theme="dark"] .pipework-system-suitability-row.is-review span {
  color: #fbbf24;
}

html[data-theme="dark"] .pipework-system-suitability-row.is-eligible span {
  color: #6ee7b7;
}

html[data-theme="dark"] .pipework-system-suitability-row.is-not-suitable span {
  color: #fca5a5;
}

html[data-theme="dark"] .pipework-application-row.is-not-suitable span {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

html[data-theme="dark"] .pipework-evidence-list article.is-current {
  border-color: rgba(52, 211, 153, 0.28);
}

html[data-theme="dark"] .pipework-evidence-list article.is-expired {
  border-color: rgba(248, 113, 113, 0.3);
  background: rgba(127, 29, 29, 0.14);
}

@media (max-width: 1180px) {
  .dashboard-pipework-envelope > .dashboard-product-editor-section-grid,
  .dashboard-pipework-evidence > .dashboard-product-editor-section-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .dashboard-pipework-application-groups,
  .dashboard-pipework-envelope > .dashboard-product-editor-section-grid,
  .dashboard-pipework-evidence > .dashboard-product-editor-section-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-pipework-editor-notice {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-pipework-editor-notice strong {
    justify-self: start;
  }

  .dashboard-product-editor-form .dashboard-pipework-application-group > label {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-pipework-application-group > label > small {
    grid-column: auto;
  }

  .pipework-compatibility-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .pipework-system-suitability-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .pipework-compatibility-summary span {
    text-align: left;
  }
}

@media (max-width: 440px) {
  .dashboard-pipework-application-group,
  .dashboard-pipework-envelope,
  .dashboard-pipework-evidence,
  .pipework-compatibility-panel {
    padding: 7px;
  }

  .product-detail-panel section.pipework-compatibility-panel {
    padding: 7px;
  }

  .dashboard-pipework-location-options {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-product-editor-form .dashboard-pipework-location-options label {
    width: 100%;
  }

  .pipework-application-row,
  .pipework-evidence-list article {
    grid-template-columns: minmax(0, 1fr);
  }

  .pipework-application-row span {
    justify-self: start;
  }

  .pipework-evidence-list article a {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }
}

/* Placed district-heating consumers */
.district-endpoint {
  --district-device-colour: #7c3aed;
  color: var(--district-device-colour);
  cursor: grab;
  outline: none;
}

.district-endpoint:active {
  cursor: grabbing;
}

.district-endpoint-hit {
  fill: transparent;
  pointer-events: all;
}

.district-endpoint-symbol-body {
  fill: color-mix(in srgb, var(--district-device-colour) 10%, white);
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 2.1;
  vector-effect: non-scaling-stroke;
}

.district-endpoint-symbol-line {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
  vector-effect: non-scaling-stroke;
}

.district-endpoint.needs-input .district-endpoint-symbol-body {
  stroke-dasharray: 3 2;
}

.district-endpoint.invalid .district-endpoint-symbol-body {
  fill: #fee2e2;
  stroke: #b91c1c;
}

.district-endpoint.active .district-endpoint-symbol-body {
  filter: drop-shadow(0 0 3px color-mix(in srgb, var(--district-device-colour) 56%, transparent));
  stroke-width: 3;
}

.district-endpoint.preview {
  opacity: 0.58;
  pointer-events: none;
}

.district-endpoint-reference {
  fill: #172033;
  font-size: calc(10px * var(--canvas-text-scale, 1));
  font-weight: 800;
  paint-order: stroke;
  pointer-events: none;
  stroke: rgba(255, 255, 255, 0.94);
  stroke-width: 3px;
  vector-effect: non-scaling-stroke;
}

.district-endpoint-connection-stem {
  pointer-events: none;
  stroke: currentColor;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.district-endpoint-connection-anchor {
  cursor: crosshair;
  fill: white;
  pointer-events: all;
  stroke: currentColor;
  stroke-width: 1.8;
  vector-effect: non-scaling-stroke;
}

.district-endpoint-connection-anchor.pipe-district-flow,
.district-endpoint-connection-stem.pipe-district-flow {
  color: #dc2626;
}

.district-endpoint-connection-anchor.pipe-district-return,
.district-endpoint-connection-stem.pipe-district-return {
  color: #4338ca;
}

.district-endpoint-connection-anchor:hover {
  fill: currentColor;
  stroke: white;
  stroke-width: 2.4;
}

.district-endpoint-type-options .district-endpoint-type-option {
  min-height: 46px;
}

.district-preliminary-disclaimer {
  background: #faf5ff;
  border-left: 3px solid #8b5cf6;
  margin-top: 12px;
  padding: 9px 10px;
}

/* Preliminary fire-network devices */
.fire-endpoint,
.fire-endpoint-connection-anchor {
  --fire-device-colour: #dc2626;
  color: var(--fire-device-colour);
}

.fire-endpoint.pipe-fire-hydrant,
.fire-endpoint-connection-anchor.pipe-fire-hydrant {
  --fire-device-colour: #7f1d1d;
}

.fire-endpoint.pipe-fire-hose-reel,
.fire-endpoint-connection-anchor.pipe-fire-hose-reel {
  --fire-device-colour: #f97316;
}

.fire-endpoint {
  cursor: grab;
  outline: none;
}

.fire-endpoint:active {
  cursor: grabbing;
}

.fire-endpoint-hit {
  fill: transparent;
  stroke: transparent;
  stroke-width: 14;
  vector-effect: non-scaling-stroke;
  pointer-events: all;
}

.fire-endpoint-symbol-body {
  fill: color-mix(in srgb, var(--fire-device-colour) 12%, white);
  stroke: currentColor;
  stroke-width: 2.1;
  vector-effect: non-scaling-stroke;
}

.fire-endpoint-symbol-line {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  vector-effect: non-scaling-stroke;
}

.fire-endpoint.needs-input .fire-endpoint-symbol-body {
  stroke-dasharray: 3 2;
}

.fire-endpoint.invalid .fire-endpoint-symbol-body {
  fill: #fee2e2;
  stroke: #b91c1c;
}

.fire-endpoint.active .fire-endpoint-symbol-body {
  filter: drop-shadow(0 0 3px color-mix(in srgb, var(--fire-device-colour) 58%, transparent));
  stroke-width: 3;
}

.fire-endpoint.preview {
  opacity: 0.58;
  pointer-events: none;
}

.fire-endpoint-reference {
  fill: #172033;
  font-size: calc(10px * var(--canvas-text-scale, 1));
  font-weight: 800;
  paint-order: stroke;
  pointer-events: none;
  stroke: rgba(255, 255, 255, 0.94);
  stroke-width: 3px;
  vector-effect: non-scaling-stroke;
}

.fire-endpoint-connection-anchor {
  cursor: crosshair;
  fill: white;
  pointer-events: all;
  stroke: currentColor;
  stroke-width: 1.7;
  vector-effect: non-scaling-stroke;
}

.fire-endpoint-connection-anchor:hover {
  fill: currentColor;
  stroke: white;
  stroke-width: 2.4;
}

.fire-endpoint-type-options .fire-endpoint-type-option {
  min-height: 46px;
}

.fire-endpoint-input-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.fire-endpoint-input-grid .field.full {
  grid-column: 1 / -1;
}

.fire-endpoint-status {
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding: 10px 12px;
}

.fire-endpoint-status.has-warnings {
  background: #fff7ed;
  border-color: #fed7aa;
}

.fire-endpoint-status.ready {
  background: #f0fdf4;
}

.fire-endpoint-status ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
}

.fire-hydraulic-settings {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(239, 246, 255, 0.76));
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  margin-top: 12px;
  padding: 12px;
}

.fire-hydraulic-settings-head {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.fire-hydraulic-settings-head > div {
  display: grid;
  gap: 2px;
}

.fire-hydraulic-settings-head span:first-child {
  color: var(--muted);
  font-size: var(--type-xs);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fire-hydraulic-status {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  font-size: var(--type-xs);
  font-weight: 800;
  max-width: 48%;
  padding: 5px 8px;
  text-align: right;
}

.fire-hydraulic-status.status-screen-warning,
.fire-hydraulic-status.status-needs-input {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.fire-hydraulic-status.status-invalid-input {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.fire-preliminary-disclaimer {
  background: #fff7ed;
  border-left: 3px solid #f97316;
  margin-top: 12px;
  padding: 9px 10px;
}

@media (max-width: 720px) {
  .fire-endpoint-input-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .fire-endpoint-input-grid .field.full {
    grid-column: auto;
  }
}

/* Interactive Account Intelligence charts and focused data views. */
.dashboard-account-intelligence-distribution.interactive > div {
  gap: 0.42rem;
}

.dashboard-account-intelligence-distribution.interactive button {
  width: 100%;
  min-width: 0;
  min-height: 2.75rem;
  display: grid;
  gap: 0.25rem;
  margin: 0;
  padding: 0.38rem 0.42rem;
  border: 1px solid transparent;
  border-radius: 0.58rem;
  appearance: none;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: inherit;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.dashboard-account-intelligence-distribution.interactive button:hover {
  border-color: #bfdbfe;
  background: rgba(239, 246, 255, 0.82);
}

.dashboard-account-intelligence-distribution.interactive button > span {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  color: #334155;
  font-size: 0.72rem;
}

.dashboard-account-intelligence-distribution.interactive button strong {
  overflow: hidden;
  display: -webkit-box;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
}

.dashboard-account-intelligence-distribution.interactive button em {
  flex: 0 0 auto;
  color: #475569;
  font-style: normal;
  font-weight: 850;
}

.dashboard-account-intelligence-distribution.interactive button > i {
  height: 0.42rem;
  overflow: hidden;
  border-radius: 99px;
  background: #e2e8f0;
}

.dashboard-account-intelligence-distribution.interactive button > i > b {
  display: block;
  width: var(--account-intelligence-bar);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, hsl(calc(217 + var(--account-intelligence-index) * 12) 91% 54%), hsl(calc(196 + var(--account-intelligence-index) * 14) 90% 46%));
}

[data-account-intelligence-filter-value][aria-pressed="true"],
[data-account-intelligence-period][aria-pressed="true"] {
  border-color: #1d4ed8 !important;
  background: linear-gradient(145deg, rgba(219, 234, 254, 0.92), rgba(238, 242, 255, 0.82)) !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.14), 0 8px 18px rgba(37, 99, 235, 0.1);
}

:is([data-account-intelligence-filter-value], [data-account-intelligence-period]):focus-visible,
.dashboard-account-intelligence-filter-reset:focus-visible {
  outline: 3px solid #1d4ed8;
  outline-offset: 2px;
}

.dashboard-account-intelligence-usage-bars > button {
  flex: 1 0 2.35rem;
  min-width: 2.35rem;
  min-height: 8.8rem;
  height: 8.8rem;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.3rem;
  margin: 0;
  padding: 0.34rem 0.18rem 0.22rem;
  border: 1px solid transparent;
  border-radius: 0.48rem 0.48rem 0 0;
  appearance: none;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  scroll-margin-inline: 0.5rem;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.dashboard-account-intelligence-usage-bars > button:hover {
  border-color: #bfdbfe;
  background: rgba(239, 246, 255, 0.76);
}

.dashboard-account-intelligence-usage-bars > button small {
  font-size: 0.72rem;
  line-height: 1.2;
}

.dashboard-account-intelligence-chart-legend li {
  font-size: 0.72rem;
  line-height: 1.3;
}

.dashboard-account-intelligence-drilldown {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.72rem;
  margin: 0.65rem 0;
  padding: 0.72rem 0.78rem;
  border: 1px solid #93c5fd;
  border-radius: 0.9rem;
  background: linear-gradient(145deg, rgba(239, 246, 255, 0.96), rgba(238, 242, 255, 0.9));
  color: #0f172a;
  box-shadow: 0 9px 24px rgba(37, 99, 235, 0.09);
}

.dashboard-account-intelligence-drilldown > span {
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border-radius: 0.68rem;
  background: #dbeafe;
  color: #1d4ed8;
}

.dashboard-account-intelligence-drilldown > span svg {
  width: 1.05rem;
}

.dashboard-account-intelligence-drilldown > div {
  min-width: 0;
  display: grid;
  gap: 0.08rem;
}

.dashboard-account-intelligence-drilldown small {
  color: #2563eb;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dashboard-account-intelligence-drilldown strong {
  overflow-wrap: anywhere;
  font-size: 0.88rem;
}

.dashboard-account-intelligence-drilldown p {
  margin: 0;
  color: #475569;
  font-size: 0.75rem;
  line-height: 1.38;
}

.dashboard-account-intelligence-filter-reset {
  min-height: 2.5rem;
  align-self: center;
  white-space: nowrap;
}

html[data-theme="dark"] .dashboard-account-intelligence-distribution.interactive button {
  color: #f8fafc;
}

html[data-theme="dark"] .dashboard-account-intelligence-distribution.interactive button:hover {
  border-color: #475569;
  background: rgba(51, 65, 85, 0.55);
}

html[data-theme="dark"] .dashboard-account-intelligence-distribution.interactive button > span,
html[data-theme="dark"] .dashboard-account-intelligence-distribution.interactive button em {
  color: #e2e8f0;
}

html[data-theme="dark"] .dashboard-account-intelligence-distribution.interactive button > i {
  background: #334155;
}

html[data-theme="dark"] [data-account-intelligence-filter-value][aria-pressed="true"],
html[data-theme="dark"] [data-account-intelligence-period][aria-pressed="true"] {
  border-color: #93c5fd !important;
  background: linear-gradient(145deg, rgba(30, 64, 175, 0.34), rgba(76, 29, 149, 0.22)) !important;
  box-shadow: 0 0 0 2px rgba(147, 197, 253, 0.18);
}

html[data-theme="dark"] :is([data-account-intelligence-filter-value], [data-account-intelligence-period]):focus-visible,
html[data-theme="dark"] .dashboard-account-intelligence-filter-reset:focus-visible {
  outline-color: #93c5fd;
}

html[data-theme="dark"] .dashboard-account-intelligence-usage-bars > button small {
  color: #cbd5e1;
}

html[data-theme="dark"] .dashboard-account-intelligence-usage-bars > button:hover {
  border-color: #475569;
  background: rgba(51, 65, 85, 0.48);
}

html[data-theme="dark"] .dashboard-account-intelligence-usage-bars i > b.workspace { background: #60a5fa; }
html[data-theme="dark"] .dashboard-account-intelligence-usage-bars i > b.tools { background: #4ade80; }
html[data-theme="dark"] .dashboard-account-intelligence-usage-bars i > b.products { background: #c084fc; }
html[data-theme="dark"] .dashboard-account-intelligence-usage-bars i > b.exports { background: #fb923c; }

html[data-theme="dark"] .dashboard-account-intelligence-drilldown {
  border-color: #475569;
  background: linear-gradient(145deg, rgba(30, 58, 138, 0.3), rgba(46, 16, 101, 0.24));
  color: #f8fafc;
  box-shadow: 0 9px 24px rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .dashboard-account-intelligence-drilldown > span {
  background: rgba(30, 64, 175, 0.46);
  color: #bfdbfe;
}

html[data-theme="dark"] .dashboard-account-intelligence-drilldown small { color: #93c5fd; }
html[data-theme="dark"] .dashboard-account-intelligence-drilldown p { color: #cbd5e1; }

@media (max-width: 720px) {
  .dashboard-account-intelligence-drilldown {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .dashboard-account-intelligence-filter-reset {
    grid-column: 1 / -1;
    width: 100%;
  }

  .dashboard-account-intelligence-usage-bars > button {
    flex-basis: 2.75rem;
  }
}

/* Room service zones use a native top-layer dialog, above all canvas tools. */
.room-service-zones {
  --rz-ink: #192437; --rz-muted: #61718a; --rz-line: #dbe5f2; --rz-surface: #fff; --rz-subtle: #f5f8fc;
  color: var(--rz-ink); background: var(--rz-surface); border: 1px solid var(--rz-line);
  border-radius: 20px; padding: 0; width: min(1080px, calc(100vw - 40px)); max-width: none;
  height: min(800px, calc(100dvh - 48px)); max-height: none; margin: auto;
  box-shadow: 0 24px 80px #17345438; font-family: inherit; font-size: 14px; line-height: 1.45; overflow: hidden;
}
.room-service-zones[open] { display: flex; flex-direction: column; }
.room-service-zones::backdrop { background: #182b4355; }
.room-service-zones :is(button, input, select) { font: inherit; min-height: 36px; border: 1px solid var(--rz-line); border-radius: 9px; color: var(--rz-ink); background: var(--rz-surface); box-shadow: none; padding: 7px 11px; }
.room-service-zones button { cursor: pointer; font-weight: 600; white-space: normal; }
.room-service-zones button:disabled { opacity: .45; cursor: default; }
.room-service-zones button:not(:disabled):hover { background: var(--rz-subtle); border-color: #aac8ed; }
.room-service-zones :is(button, input, select):focus-visible { outline: 2px solid #1678ed; outline-offset: 2px; }
.room-service-zones :is(h2,h3,h4,p) { margin: 0; }
.room-service-zones h2 { font-size: 23px; line-height: 1.3; letter-spacing: -.4px; }
.room-service-zones h3 { font-size: 19px; }
.room-service-zones h4 { font-size: 14px; margin: 16px 0 10px; }
.room-service-zones small { display: block; color: var(--rz-muted); font-size: 12px; font-weight: 500; }
.rz-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 24px 16px; border-bottom: 1px solid var(--rz-line); background: linear-gradient(110deg, var(--rz-subtle), var(--rz-surface)); }
.rz-header p { color: var(--rz-muted); margin-top: 4px; font-size: 13px; }
.rz-header > button { font-size: 22px; line-height: 1; width: 36px; }
.rz-eyebrow { font-size: 11px; font-weight: 750; letter-spacing: .08em; color: #0870de; text-transform: uppercase; display: block; margin-bottom: 4px; }
.rz-toolbar { display: flex; align-items: center; gap: 12px; padding: 12px 24px; border-bottom: 1px solid var(--rz-line); flex-wrap: wrap; }
.rz-toolbar label { font-weight: 650; }
.rz-toolbar select { min-width: 200px; }
.rz-muted { color: var(--rz-muted); font-size: 13px; }
.rz-layout { display: grid; grid-template-columns: 222px minmax(0, 1fr); min-height: 0; flex: 1; }
.rz-sidebar { background: var(--rz-subtle); padding: 14px; border-right: 1px solid var(--rz-line); overflow-y: auto; overscroll-behavior: contain; }
.rz-sidebar > button { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; margin-bottom: 5px; text-align: left; background: transparent; border-color: transparent; }
.rz-sidebar > button span { overflow-wrap: anywhere; }
.rz-sidebar > button[aria-pressed=true] { color: #0867c9; background: #e7f1ff; border-color: #bdd7fa; }
.rz-sidebar form { display: grid; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--rz-line); }
.rz-sidebar label { font-size: 12px; font-weight: 650; }
.rz-sidebar input { min-width: 0; width: 100%; }
.rz-main { padding: 18px 22px; overflow-y: auto; overscroll-behavior: contain; min-width: 0; }
.rz-scope-head, .rz-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rz-scope-head p { color: var(--rz-muted); font-size: 12px; margin-top: 3px; }
.room-service-zones .rz-colour-tools { margin: 12px 0; padding: 12px; border: 1px solid var(--rz-line); border-radius: 10px; background: var(--rz-subtle); }
.room-service-zones .rz-combined-label { display: inline-block; font-size: 10px; font-weight: 650; line-height: 1.4; color: var(--rz-muted); vertical-align: middle; }
.rz-sidebar .rz-combined-label { display: block; }
.rz-sidebar>button[aria-pressed=true] .rz-combined-label { color: inherit; opacity: .8; }
.room-service-zones .rz-service-tools { margin: 12px 0; padding: 12px; border: 1px solid var(--rz-line); border-radius: 10px; background: var(--rz-surface); }
.rz-service-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 12px; }
.rz-service-heading>span { color: var(--rz-muted); font-size: 11px; }
.rz-service-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.rz-service-chips>span { padding: 4px 9px; border: 1px solid var(--rz-line); border-radius: 6px; background: var(--rz-subtle); font-size: 11px; font-weight: 600; }
.room-service-zones :is(#rz-edit-services,#rz-new-services) summary { cursor: pointer; font-size: 12px; font-weight: 650; color: var(--rz-ink); padding: 6px 0; }
.room-service-zones :is(#rz-edit-services,#rz-new-services) small { font-size: 11px; font-weight: 400; line-height: 1.5; }
.room-service-zones #rz-services-form { display: grid; gap: 10px; margin-top: 8px; }
.room-service-zones #rz-services-form>button { justify-self: start; }
.room-service-zones .rz-service-choices { display: grid; grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); gap: 6px; margin: 8px 0; padding: 0; border: 0; min-width: 0; }
.room-service-zones .rz-service-choices legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.room-service-zones .rz-service-choices label,.room-service-zones .rz-link-existing { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; line-height: 1.4; min-height: 32px; padding: 5px 8px; border: 1px solid var(--rz-line); border-radius: 7px; background: var(--rz-subtle); }
.room-service-zones .rz-service-choices input,.room-service-zones .rz-link-existing input { flex: 0 0 16px; min-height: 16px; height: 16px; width: 16px; padding: 0; margin: 0; accent-color: #1279ea; }
.room-service-zones .rz-membership-choice { display: grid; gap: 5px; font-size: 12px; font-weight: 650; margin: 8px 0; }
.room-service-zones .rz-membership-choice select { width: 100%; min-width: 0; font-size: 12px; }
.rz-colour-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 9px; }
.rz-colour-heading label { font-size: 12px; font-weight: 650; }
.rz-colour-heading>span { font-size: 10px; color: var(--rz-muted); }
.rz-colour-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.room-service-zones input#rz-colour { flex: 0 0 42px; width: 42px; height: 36px; min-height: 36px; padding: 3px !important; cursor: pointer; }
.room-service-zones input#rz-colour::-webkit-color-swatch-wrapper { padding: 0; }
.room-service-zones input#rz-colour::-webkit-color-swatch { border: 0; border-radius: 5px; }
.room-service-zones input#rz-colour::-moz-color-swatch { border: 0; border-radius: 5px; }
.rz-colour-controls output { font-size: 12px; font-family: ui-monospace, monospace; color: var(--rz-ink); }
.rz-colour-preview { position: relative; isolation: isolate; overflow: hidden; border: 1px solid var(--rz-line); border-radius: 6px; background: var(--rz-surface); padding: 7px 12px; margin-left: auto; font-size: 11px; }
.rz-colour-preview::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--zone-colour); opacity: .085; }
.rz-colour-presets { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.room-service-zones .rz-colour-presets button { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 30px; width: 30px; height: 30px; min-height: 30px; padding: 4px !important; border: 1px solid var(--rz-line); border-radius: 7px; background: var(--rz-surface); }
.room-service-zones .rz-colour-presets button>span { width: 100%; height: 100%; min-width: 16px; min-height: 16px; background: var(--zone-colour); border-radius: 3px; border: 1px solid #0001; }
.room-service-zones .rz-colour-presets button[aria-pressed=true] { outline: 2px solid var(--rz-ink); outline-offset: 1px; }
.rz-colour-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 8px; }
.room-service-zones .rz-colour-actions button { font-size: 12px; min-height: 32px; }
.room-service-zones #rz-colour-help { font-size: 11px; font-weight: 400; line-height: 1.5; }
@media(pointer:coarse) { .room-service-zones .rz-colour-presets button { flex-basis: 44px; width: 44px; height: 44px; }.room-service-zones .rz-colour-actions button,.room-service-zones input#rz-colour { min-height: 44px; } }
.rz-tabs { display: flex; gap: 6px; padding: 14px 0; }
.rz-tabs button[aria-selected=true] { color: #0867c9; border-color: #b5d2f6; background: #eaf3ff; }
.rz-notice { background: var(--rz-subtle); color: var(--rz-muted); padding: 10px 12px; border-radius: 9px; font-size: 12px; margin: 0 0 12px !important; }
.rz-message { font-size: 13px; color: #0867c9; overflow-wrap: anywhere; }
.rz-message:not(:empty) { padding: 0 0 12px; }
.rz-filters { display: flex; gap: 8px; }
.rz-filters input { min-width: 0; flex: 1; }
.rz-filters select { max-width: 45%; }
.rz-selection { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 10px 0; font-size: 12px; }
.rz-selection strong { margin-right: auto; }
.rz-selection button { min-height: 30px; padding: 4px 8px; font-size: 12px; }
.rz-room-list { border: 1px solid var(--rz-line); border-radius: 12px; overflow: hidden; }
.rz-room { display: flex; gap: 10px; align-items: center; padding: 12px; border-bottom: 1px solid var(--rz-line); }
.rz-room:last-child { border-bottom: 0; }
.rz-room label { display: flex; gap: 10px; align-items: center; flex: 1; min-width: 0; cursor: pointer; }
.rz-room label strong { display: block; overflow-wrap: anywhere; font-size: 14px; }
.rz-room input[type=checkbox] { appearance: auto; accent-color: #117bec; width: 17px; height: 17px; min-height: 0; flex: 0 0 17px; padding: 0; }
.rz-badge { color: var(--rz-muted); border-radius: 6px; padding: 4px 7px; background: var(--rz-subtle); font-size: 12px; max-width: 140px; overflow-wrap: anywhere; }
.rz-pagination { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--rz-muted); padding: 12px 0; }
.rz-pagination button { font-size: 12px; min-height: 30px; }
.rz-assign { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 14px; border: 1px solid var(--rz-line); border-radius: 12px; background: var(--rz-subtle); }
.rz-assign label, .rz-assign small { grid-column: 1 / -1; }
.rz-assign label { font-size: 13px; font-weight: 650; }
.rz-assign select { min-width: 0; }
.room-service-zones .rz-primary { background: #1279ea; border-color: #1279ea; color: white; }
.room-service-zones .rz-primary:not(:disabled):hover { background: #0867c9; }
.rz-empty { padding: 20px; color: var(--rz-muted); }
.rz-footer { display: flex; align-items: center; gap: 16px; padding: 14px 24px; border-top: 1px solid var(--rz-line); background: var(--rz-subtle); }
.rz-footer > span { flex: 1; color: var(--rz-muted); font-size: 12px; }
.rz-footer button { flex: 0 0 auto; }
.rz-metrics { display: grid; grid-template-columns: repeat(auto-fit,minmax(140px,1fr)); gap: 8px; margin-bottom: 14px; }
.rz-metrics > div { border: 1px solid var(--rz-line); border-radius: 10px; padding: 12px; }
.rz-metrics span { color: var(--rz-muted); font-size: 12px; display: block; }
.rz-metrics strong { font-size: 23px; display: block; margin-top: 4px; }
.rz-metrics strong small { display: inline; font-size: 12px; }
.rz-table-wrap { overflow-x: auto; margin-bottom: 14px; border: 1px solid var(--rz-line); border-radius: 10px; }
.rz-table-wrap table { width: 100%; border-collapse: collapse; font-size: 12px; }
.rz-table-wrap :is(th,td) { padding: 11px 10px; border-bottom: 1px solid var(--rz-line); text-align: right; }
.rz-table-wrap th:first-child { text-align: left; min-width: 150px; }
.rz-table-wrap thead th { background: var(--rz-subtle); font-weight: 650; }
.rz-table-wrap button { min-height: 30px; font-size: 12px; }
.room-zone-launch { display: flex; gap: 8px; align-items: center; width: 100%; font: inherit; padding: 8px 10px; border: 1px solid var(--line, #dbe5f2); border-radius: 9px; background: var(--surface-solid, #fff); color: var(--text, #192437); margin-bottom: 12px; }
.room-zone-launch svg { width: 17px; height: 17px; }
.auto-room-zone-group { border-top: 1px solid #dbe5f2; margin-top: 10px; padding-top: 10px; }
.auto-room-zone-group > strong { display: block; color: #0867c9; font-size: 13px; margin: 0 0 6px; }
.auto-room-zone-notice { display: flex; align-items: center; gap: 10px; padding: 10px; font-size: 12px; }
.auto-room-zone-notice span { flex: 1; }
body:has(.room-service-zones[open]) :is(.thermal-workbench, .thermal-launcher, .canvas-workbench, .canvas-preselection) { visibility: hidden !important; pointer-events: none !important; }
html[data-theme=dark] .room-service-zones, body[data-theme=dark] .room-service-zones, body.dark .room-service-zones { --rz-ink: #e5edf8; --rz-muted: #a5b4c9; --rz-line: #34455d; --rz-surface: #182537; --rz-subtle: #202f43; }
@media (max-width: 700px) {
  .room-service-zones { width: calc(100vw - 16px); height: calc(100dvh - 16px); border-radius: 14px; }
  .rz-header, .rz-toolbar, .rz-main, .rz-footer { padding: 12px; }
  .rz-layout { display: flex; flex-direction: column; }
  .rz-sidebar { display: flex; flex-wrap: wrap; gap: 5px; padding: 8px 12px; max-height: 150px; flex: 0 0 auto; border-right: 0; border-bottom: 1px solid var(--rz-line); }
  .rz-sidebar > button { width: auto; margin: 0; font-size: 12px; }
  .rz-sidebar form { display: flex; width: 100%; margin: 0; padding: 6px 0 0; gap: 6px; border: 0; }
  .rz-sidebar form label { display: none; }
  .rz-sidebar form input { flex: 1; }
  .rz-sidebar form button { white-space: nowrap; }
  .room-service-zones .rz-sidebar #rz-create { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; }
  .room-service-zones #rz-new-services { grid-column: 1/-1; grid-row: 2; }
  .room-service-zones #rz-new-services[open] { padding-bottom: 8px; }
  .room-service-zones .rz-sidebar:has(#rz-new-services[open]) { max-height: 45dvh; }
  .room-service-zones #rz-create>button { grid-column: 2; grid-row: 1; }
  .rz-main { flex: 1; }
  .rz-scope-head { align-items: flex-start; flex-wrap: wrap; }
  .rz-room { flex-wrap: wrap; }
  .rz-room label { flex-basis: 65%; }
  .rz-room .rz-badge { order: 3; margin-left: 27px; max-width: none; }
  .rz-footer { flex-direction: column; align-items: stretch; gap: 8px; }
  .rz-footer span { font-size: 11px; }
  .rz-toolbar .rz-muted { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-account-intelligence :is(
    [data-account-intelligence-filter-value],
    [data-account-intelligence-period],
    .dashboard-account-intelligence-drilldown
  ) {
    scroll-behavior: auto;
    transition: none !important;
  }
}

@media (forced-colors: active) {
  [data-account-intelligence-filter-value][aria-pressed="true"],
  [data-account-intelligence-period][aria-pressed="true"],
  .dashboard-account-intelligence-drilldown {
    border: 2px solid Highlight !important;
  }

  .dashboard-account-intelligence-distribution.interactive button > i > b,
  .dashboard-account-intelligence-usage-bars i > b {
    background: Highlight !important;
  }
}

/* Contractor network, tendering and subcontract workspace. */
.dashboard-app-icon-contractor,
.dashboard-app-icon-contractor-network {
  background: linear-gradient(135deg, #075985 0%, #0a7cff 48%, #14b8a6 100%);
}

.pricing-portal-header-action.contractor {
  border-color: rgba(13, 148, 136, 0.34);
  background: linear-gradient(145deg, rgba(240, 253, 250, 0.96), rgba(219, 234, 254, 0.82));
  color: #075985;
}

.pricing-portal-header-action.contractor:hover {
  border-color: rgba(10, 124, 255, 0.48);
  background: linear-gradient(145deg, #ffffff, rgba(204, 251, 241, 0.92));
  color: #0753a5;
}

.studio-shell.dashboard-shell.dashboard-contractor-shell {
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  grid-template-rows: auto minmax(0, 1fr);
}

.contractor-workspace,
.contractor-workspace *,
.contractor-modal-layer,
.contractor-modal-layer * {
  box-sizing: border-box;
  min-width: 0;
}

.contractor-workspace {
  --contractor-navy: #0f2747;
  --contractor-blue: #0878ed;
  --contractor-teal: #0f9f97;
  --contractor-line: rgba(100, 123, 154, 0.2);
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: none;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 12px;
  padding: 18px 22px 22px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
  background:
    radial-gradient(circle at 5% 0%, rgba(8, 120, 237, 0.1), transparent 28%),
    radial-gradient(circle at 96% 8%, rgba(15, 159, 151, 0.1), transparent 29%),
    linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(239, 245, 251, 0.94));
  color: var(--text);
}

.contractor-workspace :is(input, select, textarea, button) {
  max-width: 100%;
  font: inherit;
}

.contractor-workspace :is(input, select, textarea),
.contractor-composer :is(input, select, textarea) {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(100, 123, 154, 0.28);
  border-radius: 10px;
  background: var(--input-glass);
  color: var(--text);
  padding: 9px 11px;
  font-size: 0.83rem;
  font-weight: 720;
  line-height: 1.35;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 2px 7px rgba(15, 39, 71, 0.035);
}

.contractor-workspace textarea,
.contractor-composer textarea {
  min-height: 84px;
  resize: vertical;
}

.contractor-workspace :is(input, select, textarea):focus,
.contractor-composer :is(input, select, textarea):focus {
  border-color: rgba(8, 120, 237, 0.62);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(8, 120, 237, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.contractor-workspace :is(input, select, textarea):disabled {
  background: rgba(226, 232, 240, 0.68);
  color: #667085;
  cursor: not-allowed;
  opacity: 0.82;
}

.contractor-workspace button:focus-visible,
.contractor-modal-layer button:focus-visible,
.contractor-modal-layer input:focus-visible,
.contractor-modal-layer select:focus-visible,
.contractor-modal-layer textarea:focus-visible {
  outline: 3px solid rgba(8, 120, 237, 0.25);
  outline-offset: 2px;
}

.contractor-workspace label,
.contractor-composer label {
  display: grid;
  align-content: start;
  gap: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.25;
}

.contractor-workspace-header {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
  padding: 18px 20px;
  border: 1px solid rgba(122, 153, 192, 0.28);
  border-radius: 16px;
  background:
    radial-gradient(circle at 92% 12%, rgba(45, 212, 191, 0.19), transparent 34%),
    linear-gradient(128deg, rgba(255, 255, 255, 0.94), rgba(232, 243, 255, 0.82));
  box-shadow: var(--glass-edge), 0 16px 36px rgba(15, 39, 71, 0.08);
}

.contractor-workspace-header::after {
  content: "";
  position: absolute;
  top: -72px;
  right: 12%;
  width: 210px;
  height: 210px;
  border: 38px solid rgba(8, 120, 237, 0.05);
  border-radius: 50%;
  pointer-events: none;
}

.contractor-workspace-title {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
  max-width: 760px;
}

.contractor-workspace-title .dashboard-product-library-dashboard-btn {
  width: fit-content;
  min-height: 32px;
  margin-bottom: 5px;
  padding-inline: 11px;
  background: rgba(255, 255, 255, 0.72);
}

.contractor-workspace-title > span,
.contractor-detail-heading > div > span,
.contractor-tender-detail > header > div > span,
.contractor-company-profile > header > div > span,
.contractor-network-detail > header > div > span,
.contractor-network-detail > section > span,
.contractor-direct-thread > header span,
.contractor-messages-workspace > article > header span {
  color: #4f6685;
  font-size: 0.65rem;
  font-weight: 920;
  letter-spacing: 0.055em;
  line-height: 1.25;
  text-transform: uppercase;
}

.contractor-workspace-title h1 {
  margin: 0;
  color: var(--contractor-navy);
  font-size: clamp(1.65rem, 2.6vw, 2.3rem);
  font-weight: 950;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

.contractor-workspace-title p {
  max-width: 720px;
  margin: 2px 0 0;
  color: #53647d;
  font-size: 0.85rem;
  font-weight: 680;
  line-height: 1.42;
}

.contractor-workspace-actions,
.contractor-network-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.contractor-workspace-actions button {
  min-height: 42px;
}

.contractor-workspace-actions svg {
  width: 17px;
  height: 17px;
}

.contractor-workspace-tabs {
  position: sticky;
  top: -18px;
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  overflow: hidden;
  border: 1px solid var(--contractor-line);
  border-radius: 13px;
  background: rgba(248, 251, 255, 0.9);
  box-shadow: var(--glass-edge), 0 8px 22px rgba(15, 39, 71, 0.06);
  backdrop-filter: blur(15px) saturate(135%);
  -webkit-backdrop-filter: blur(15px) saturate(135%);
}

.contractor-workspace-tabs button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #52647d;
  padding: 8px 10px;
  font-size: 0.74rem;
  font-weight: 880;
  line-height: 1.2;
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.contractor-workspace-tabs button:hover {
  border-color: rgba(100, 123, 154, 0.2);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
}

.contractor-workspace-tabs button.active {
  border-color: rgba(8, 120, 237, 0.32);
  background: linear-gradient(145deg, rgba(219, 234, 254, 0.92), rgba(204, 251, 241, 0.6));
  color: #0753a5;
  box-shadow: 0 5px 14px rgba(8, 120, 237, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.contractor-workspace-tabs button > span {
  min-width: 21px;
  height: 21px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(8, 120, 237, 0.12);
  color: inherit;
  padding: 0 6px;
  font-size: 0.64rem;
}

.contractor-workspace-notice {
  padding: 10px 13px;
  border: 1px solid rgba(15, 159, 151, 0.3);
  border-radius: 10px;
  background: rgba(204, 251, 241, 0.55);
  color: #0f615f;
  font-size: 0.78rem;
  font-weight: 820;
  line-height: 1.35;
}

.contractor-workspace-content {
  min-height: 0;
  display: grid;
  align-content: start;
  overflow: visible;
}

.contractor-overview,
.contractor-network,
.contractor-company-profile,
.contractor-messages-workspace {
  display: grid;
  align-content: start;
  gap: 14px;
}

.contractor-overview-metrics,
.contractor-detail-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.contractor-detail-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.contractor-metric {
  position: relative;
  min-height: 104px;
  display: grid;
  align-content: start;
  gap: 5px;
  overflow: hidden;
  padding: 14px;
  border: 1px solid var(--contractor-line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--glass-edge), 0 9px 22px rgba(15, 39, 71, 0.05);
}

.contractor-metric::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -30px;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: rgba(8, 120, 237, 0.07);
}

.contractor-metric.purple::after { background: rgba(124, 58, 237, 0.08); }
.contractor-metric.amber::after { background: rgba(217, 119, 6, 0.1); }
.contractor-metric.green::after { background: rgba(15, 159, 151, 0.1); }

.contractor-metric > span {
  color: #64748b;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.contractor-metric > strong {
  position: relative;
  z-index: 1;
  overflow-wrap: anywhere;
  color: var(--contractor-navy);
  font-size: clamp(1.15rem, 1.9vw, 1.55rem);
  font-weight: 950;
  line-height: 1.08;
}

.contractor-metric > small {
  position: relative;
  z-index: 1;
  color: #667085;
  font-size: 0.7rem;
  font-weight: 680;
  line-height: 1.35;
}

.contractor-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  gap: 14px;
  align-items: stretch;
}

.contractor-overview-panel,
.contractor-tender-detail,
.contractor-network-detail,
.contractor-company-profile,
.contractor-messages-workspace,
.contractor-profile-gate {
  border: 1px solid var(--contractor-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--glass-edge), 0 12px 30px rgba(15, 39, 71, 0.055);
}

.contractor-overview-panel {
  display: grid;
  align-content: start;
  gap: 13px;
  padding: 15px;
}

.contractor-detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.contractor-detail-heading > div {
  display: grid;
  gap: 3px;
}

.contractor-detail-heading h2,
.contractor-detail-heading h3 {
  margin: 0;
  color: var(--contractor-navy);
  font-size: 1.05rem;
  font-weight: 930;
  letter-spacing: -0.012em;
  line-height: 1.16;
}

.contractor-detail-heading h3 { font-size: 0.94rem; }

.contractor-detail-heading > small {
  max-width: 300px;
  color: #667085;
  font-size: 0.68rem;
  font-weight: 680;
  line-height: 1.35;
  text-align: right;
}

.contractor-pipeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.contractor-pipeline article {
  min-height: 96px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 12px;
  border: 1px solid rgba(100, 123, 154, 0.17);
  border-radius: 11px;
  background: linear-gradient(150deg, rgba(248, 251, 255, 0.96), rgba(233, 241, 249, 0.66));
}

.contractor-pipeline article strong {
  color: var(--contractor-navy);
  font-size: 1.45rem;
  font-weight: 950;
}

.contractor-pipeline article span,
.contractor-next-actions article > span {
  color: #405673;
  font-size: 0.73rem;
  font-weight: 880;
}

.contractor-pipeline article small,
.contractor-next-actions article small {
  color: #718096;
  font-size: 0.66rem;
  font-weight: 650;
  line-height: 1.3;
}

.contractor-next-actions > article {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(100, 123, 154, 0.17);
  border-radius: 11px;
  background: rgba(248, 251, 255, 0.82);
}

.contractor-next-actions > article > strong {
  color: var(--contractor-navy);
  font-size: 0.82rem;
  font-weight: 880;
  line-height: 1.35;
}

.contractor-next-actions > article > button {
  width: fit-content;
  margin-top: 4px;
  border: 0;
  background: transparent;
  color: #0753a5;
  padding: 0;
  font-size: 0.72rem;
  font-weight: 900;
}

.contractor-recent-list {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(100, 123, 154, 0.17);
  border-radius: 11px;
  background: rgba(248, 251, 255, 0.55);
}

.contractor-recent-list > button {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 0;
  border-bottom: 1px solid rgba(100, 123, 154, 0.15);
  background: transparent;
  color: var(--text);
  padding: 10px 12px;
  text-align: left;
}

.contractor-recent-list > button:last-child { border-bottom: 0; }
.contractor-recent-list > button:hover { background: rgba(219, 234, 254, 0.48); }

.contractor-recent-list > button > span:first-child {
  display: grid;
  gap: 3px;
}

.contractor-recent-list strong,
.contractor-recent-list small {
  overflow-wrap: anywhere;
}

.contractor-recent-list strong {
  color: var(--contractor-navy);
  font-size: 0.77rem;
  font-weight: 880;
}

.contractor-recent-list small {
  color: #667085;
  font-size: 0.67rem;
  font-weight: 650;
}

.contractor-status {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 25px;
  border: 1px solid rgba(8, 120, 237, 0.24);
  border-radius: 999px;
  background: rgba(219, 234, 254, 0.7);
  color: #0753a5;
  padding: 4px 9px;
  font-size: 0.64rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.contractor-status.status-review { border-color: rgba(217, 119, 6, 0.3); background: rgba(254, 243, 199, 0.72); color: #92400e; }
.contractor-status.status-awarded { border-color: rgba(15, 159, 151, 0.3); background: rgba(204, 251, 241, 0.75); color: #0f615f; }
.contractor-status.status-closed { border-color: rgba(100, 116, 139, 0.25); background: rgba(226, 232, 240, 0.72); color: #475569; }
.contractor-status.status-cancelled { border-color: rgba(240, 68, 56, 0.28); background: rgba(254, 226, 226, 0.75); color: #b42318; }

.contractor-master-detail,
.contractor-network-layout {
  min-height: min(680px, calc(100dvh - 235px));
  display: grid;
  grid-template-columns: minmax(250px, 330px) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.contractor-master-detail > aside,
.contractor-network-layout > aside {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--contractor-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: var(--glass-edge), 0 12px 28px rgba(15, 39, 71, 0.05);
}

.contractor-master-detail > main,
.contractor-network-layout > main {
  min-height: 0;
  overflow: visible;
}

.contractor-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid rgba(100, 123, 154, 0.17);
  background: rgba(241, 246, 252, 0.72);
}

.contractor-list-heading span {
  color: #5b6d84;
  font-size: 0.67rem;
  font-weight: 900;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.contractor-list-heading strong {
  color: var(--contractor-navy);
  font-size: 0.77rem;
  font-weight: 900;
}

.contractor-tender-list,
.contractor-network-list {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 7px;
  overflow: auto;
  padding: 8px;
  scrollbar-width: thin;
}

.contractor-tender-card,
.contractor-network-card {
  width: 100%;
  display: grid;
  gap: 5px;
  border: 1px solid rgba(100, 123, 154, 0.18);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  padding: 11px;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.66);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.contractor-tender-card:hover,
.contractor-network-card:hover {
  border-color: rgba(8, 120, 237, 0.35);
  background: rgba(239, 246, 255, 0.92);
  transform: translateY(-1px);
}

.contractor-tender-card.selected,
.contractor-network-card.selected {
  border-color: rgba(8, 120, 237, 0.5);
  background: linear-gradient(145deg, rgba(219, 234, 254, 0.82), rgba(236, 253, 245, 0.62));
  box-shadow: 0 7px 18px rgba(8, 120, 237, 0.1), inset 3px 0 0 #0878ed;
}

.contractor-tender-card-head,
.contractor-tender-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.contractor-tender-card-head > strong {
  color: #0753a5;
  font-size: 0.68rem;
  font-weight: 920;
}

.contractor-tender-card > b {
  overflow-wrap: anywhere;
  color: var(--contractor-navy);
  font-size: 0.83rem;
  font-weight: 900;
  line-height: 1.25;
}

.contractor-tender-card > small {
  color: #64748b;
  font-size: 0.66rem;
  font-weight: 650;
  line-height: 1.35;
}

.contractor-tender-card-meta {
  margin-top: 2px;
}

.contractor-tender-card-meta em {
  color: #61718a;
  font-size: 0.63rem;
  font-style: normal;
  font-weight: 790;
}

.contractor-list-empty,
.contractor-empty-inline,
.contractor-detail-empty {
  display: grid;
  place-items: center;
  min-height: 96px;
  border: 1px dashed rgba(100, 123, 154, 0.3);
  border-radius: 10px;
  background: rgba(248, 251, 255, 0.54);
  color: #667085;
  padding: 16px;
  font-size: 0.74rem;
  font-weight: 720;
  line-height: 1.45;
  text-align: center;
}

[data-contractor-composer-empty][hidden],
.contractor-choice-card[hidden] {
  display: none !important;
}

.contractor-detail-empty {
  min-height: 340px;
  border-style: solid;
  background: rgba(255, 255, 255, 0.7);
}

.contractor-tender-detail {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 16px;
}

.contractor-tender-detail > header,
.contractor-company-profile > header,
.contractor-direct-thread > header,
.contractor-messages-workspace > article > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.contractor-tender-detail > header > div,
.contractor-company-profile > header > div,
.contractor-direct-thread > header > div,
.contractor-messages-workspace > article > header > div {
  display: grid;
  gap: 4px;
}

.contractor-tender-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
}

.contractor-tender-detail > header h2,
.contractor-company-profile > header h2 {
  margin: 0;
  color: var(--contractor-navy);
  font-size: clamp(1.18rem, 2vw, 1.5rem);
  font-weight: 950;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.contractor-tender-detail > header p,
.contractor-company-profile > header p {
  max-width: 760px;
  margin: 0;
  color: #61718a;
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.45;
}

.contractor-tender-detail > section,
.contractor-company-profile > section,
.contractor-network-detail > section,
.contractor-quote-builder,
.contractor-message-thread {
  display: grid;
  align-content: start;
  gap: 11px;
  padding: 13px;
  border: 1px solid rgba(100, 123, 154, 0.17);
  border-radius: 12px;
  background: rgba(248, 251, 255, 0.64);
}

.contractor-shared-project {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.contractor-shared-project > div {
  min-height: 70px;
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 10px;
  border: 1px solid rgba(100, 123, 154, 0.16);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.72);
}

.contractor-shared-project > div.withheld {
  border-style: dashed;
  background: rgba(241, 245, 249, 0.7);
}

.contractor-shared-project span,
.contractor-profile-facts span,
.contractor-network-rates > span {
  color: #718096;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.contractor-shared-project strong,
.contractor-profile-facts strong {
  overflow-wrap: anywhere;
  color: var(--contractor-navy);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.3;
}

.contractor-shared-project .withheld strong {
  color: #8290a3;
  font-style: italic;
}

.contractor-scope-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow: auto;
  border: 1px solid rgba(100, 123, 154, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.74);
  scrollbar-width: thin;
}

.contractor-scope-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  color: var(--text);
  font-size: 0.71rem;
}

.contractor-scope-table th,
.contractor-scope-table td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(100, 123, 154, 0.14);
  text-align: right;
  vertical-align: top;
  white-space: nowrap;
}

.contractor-scope-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #edf4fb;
  color: #5a6d86;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.contractor-scope-table th:first-child,
.contractor-scope-table td:first-child {
  min-width: 230px;
  text-align: left;
  white-space: normal;
}

.contractor-scope-table tbody tr:last-child td { border-bottom: 0; }
.contractor-scope-table tbody tr:hover { background: rgba(219, 234, 254, 0.38); }

.contractor-scope-table td strong,
.contractor-scope-table td small {
  display: block;
}

.contractor-scope-table td strong {
  color: var(--contractor-navy);
  font-size: 0.72rem;
  font-weight: 850;
}

.contractor-scope-table td small {
  margin-top: 2px;
  color: #718096;
  font-size: 0.62rem;
  font-weight: 650;
}

.contractor-scope-table-more {
  position: sticky;
  left: 0;
  display: flex;
  width: 100%;
  min-width: min(100%, 720px);
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border-top: 1px solid rgba(100, 123, 154, 0.14);
  background: rgba(244, 248, 252, 0.96);
  color: #667085;
  font-size: 0.64rem;
  font-weight: 750;
}

.contractor-trade-chips {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.contractor-trade-chips > span {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  border: 1px solid rgba(15, 159, 151, 0.23);
  border-radius: 999px;
  background: rgba(204, 251, 241, 0.52);
  color: #0f615f;
  padding: 4px 8px;
  font-size: 0.61rem;
  font-weight: 850;
  line-height: 1;
}

.contractor-rate-grid {
  display: grid;
  gap: 7px;
}

.contractor-rate-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) repeat(2, minmax(110px, 0.7fr));
  gap: 9px;
  align-items: end;
  padding: 9px 10px;
  border: 1px solid rgba(100, 123, 154, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
}

.contractor-rate-row > strong {
  align-self: center;
  color: var(--contractor-navy);
  font-size: 0.76rem;
  font-weight: 880;
}

.contractor-quote-grid,
.contractor-profile-edit-grid {
  display: grid;
  gap: 9px;
}

.contractor-quote-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.contractor-quote-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.contractor-profile-edit-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.contractor-profile-edit-grid .wide { grid-column: span 2; }

.contractor-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 3px;
}

.contractor-form-actions > span {
  color: #667085;
  font-size: 0.68rem;
  font-weight: 670;
  line-height: 1.35;
}

.contractor-permission-note {
  padding: 12px 14px;
  border: 1px solid rgba(217, 119, 6, 0.3);
  border-radius: 10px;
  background: rgba(254, 243, 199, 0.65);
  color: #7c4511;
  font-size: 0.74rem;
  font-weight: 760;
  line-height: 1.4;
}

.contractor-invitation-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border: 1px solid rgba(8, 120, 237, 0.22);
  border-radius: 10px;
  background: rgba(219, 234, 254, 0.46);
}

.contractor-invitation-actions > span {
  margin-right: auto;
  color: #52647d;
  font-size: 0.7rem;
  font-weight: 720;
}

.contractor-invitation-actions > span strong {
  color: #0753a5;
  font-weight: 920;
}

.contractor-recipient-statuses {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.contractor-recipient-statuses > article {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(100, 123, 154, 0.16);
  border-radius: 9px;
  background: rgba(248, 251, 255, 0.72);
}

.contractor-recipient-statuses .contractor-profile-avatar {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  font-size: 0.62rem;
}

.contractor-recipient-statuses > article > span:last-child {
  display: grid;
  gap: 2px;
}

.contractor-recipient-statuses strong {
  overflow-wrap: anywhere;
  color: var(--contractor-navy);
  font-size: 0.7rem;
  font-weight: 870;
}

.contractor-recipient-statuses small {
  color: #5f7087;
  font-size: 0.62rem;
  font-weight: 720;
}

.contractor-recipient-threads {
  display: grid;
  gap: 7px;
}

.contractor-recipient-threads > details {
  overflow: hidden;
  border: 1px solid rgba(100, 123, 154, 0.17);
  border-radius: 10px;
  background: rgba(248, 251, 255, 0.62);
}

.contractor-recipient-threads > details > summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  color: #405673;
  cursor: pointer;
  font-size: 0.71rem;
  font-weight: 850;
  list-style-position: inside;
}

.contractor-recipient-threads > details > summary:hover {
  background: rgba(219, 234, 254, 0.42);
}

.contractor-recipient-threads > details > summary small {
  color: #718096;
  font-size: 0.62rem;
  font-weight: 700;
}

.contractor-recipient-threads > details[open] > summary {
  border-bottom: 1px solid rgba(100, 123, 154, 0.15);
  background: rgba(219, 234, 254, 0.35);
}

.contractor-recipient-threads > details > .contractor-message-thread {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.contractor-quote-workflow {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(8, 120, 237, 0.2);
  border-radius: 11px;
  background:
    radial-gradient(circle at 100% 0, rgba(45, 212, 191, 0.1), transparent 42%),
    rgba(239, 246, 255, 0.6);
}

.contractor-quote-workflow > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.contractor-quote-workflow > header > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.contractor-quote-workflow > header strong {
  color: var(--contractor-navy);
  font-size: 0.77rem;
  font-weight: 920;
}

.contractor-quote-workflow > header :is(span, small) {
  color: #667085;
  font-size: 0.62rem;
  font-weight: 660;
  line-height: 1.38;
}

.contractor-quote-workflow > header > :is(span, strong):last-child {
  min-height: 27px;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(8, 120, 237, 0.24);
  border-radius: 999px;
  background: rgba(219, 234, 254, 0.7);
  color: #0753a5;
  padding: 5px 9px;
  font-size: 0.6rem;
  font-weight: 900;
}

.contractor-quote-workflow[data-status="received"] > header > :is(span, strong):last-child,
.contractor-quote-workflow[data-status="responded"] > header > :is(span, strong):last-child {
  border-color: rgba(124, 58, 237, 0.25);
  background: rgba(237, 233, 254, 0.72);
  color: #5b21b6;
}

.contractor-quote-workflow[data-status="quoted"] > header > :is(span, strong):last-child,
.contractor-quote-workflow[data-status="review"] > header > :is(span, strong):last-child {
  border-color: rgba(217, 119, 6, 0.25);
  background: rgba(254, 243, 199, 0.72);
  color: #92400e;
}

.contractor-quote-workflow[data-status="accepted"] > header > :is(span, strong):last-child,
.contractor-quote-workflow[data-status="implemented"] > header > :is(span, strong):last-child {
  border-color: rgba(15, 159, 151, 0.26);
  background: rgba(204, 251, 241, 0.72);
  color: #0f615f;
}

.contractor-quote-workflow[data-status="declined"] > header > :is(span, strong):last-child {
  border-color: rgba(240, 68, 56, 0.25);
  background: rgba(254, 226, 226, 0.74);
  color: #b42318;
}

.contractor-delivery-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contractor-delivery-timeline > * {
  position: relative;
  min-width: 0;
  min-height: 58px;
  display: grid;
  align-content: start;
  gap: 2px;
  margin: 0;
  padding: 30px 9px 8px;
  border: 0;
  background: transparent;
}

.contractor-delivery-timeline > *::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 9px;
  left: 10px;
  width: 13px;
  height: 13px;
  border: 3px solid rgba(148, 163, 184, 0.78);
  border-radius: 50%;
  background: #f8fbff;
  box-shadow: 0 0 0 3px rgba(248, 251, 255, 0.85);
}

.contractor-delivery-timeline > *:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 17px;
  right: -1px;
  left: 23px;
  height: 2px;
  background: rgba(148, 163, 184, 0.38);
}

.contractor-delivery-timeline > :is(.complete, .is-complete, [data-state="complete"])::before {
  border-color: #0f9f97;
  background: #0f9f97;
}

.contractor-delivery-timeline > :is(.complete, .is-complete, [data-state="complete"]):not(:last-child)::after {
  background: rgba(15, 159, 151, 0.58);
}

.contractor-delivery-timeline > :is(.current, .is-current, [aria-current="step"])::before {
  border-color: #0878ed;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(8, 120, 237, 0.14);
}

.contractor-delivery-timeline > * > :is(strong, b) {
  overflow-wrap: anywhere;
  color: #405673;
  font-size: 0.64rem;
  font-weight: 880;
  line-height: 1.25;
}

.contractor-delivery-timeline > * > :is(span, small, time) {
  overflow-wrap: anywhere;
  color: #718096;
  font-size: 0.56rem;
  font-weight: 650;
  line-height: 1.3;
}

.contractor-quote-workflow-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
  padding-top: 9px;
  border-top: 1px solid rgba(100, 123, 154, 0.16);
}

.contractor-quote-workflow-actions > :is(span, p) {
  min-width: min(280px, 100%);
  margin: 0 auto 0 0;
  color: #5f7087;
  font-size: 0.62rem;
  font-weight: 660;
  line-height: 1.4;
}

.contractor-quote-workflow-actions button {
  min-height: 36px;
}

.contractor-subcontract-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px;
  border: 1px solid rgba(124, 58, 237, 0.22);
  border-radius: 11px;
  background: rgba(237, 233, 254, 0.52);
}

.contractor-subcontract-action > div {
  display: grid;
  gap: 3px;
}

.contractor-subcontract-action strong {
  color: #4c1d95;
  font-size: 0.78rem;
  font-weight: 890;
}

.contractor-subcontract-action span {
  color: #6d5d85;
  font-size: 0.68rem;
  font-weight: 650;
  line-height: 1.35;
}

.contractor-quote-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.contractor-quote-comparison > article {
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(100, 123, 154, 0.19);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.76);
}

.contractor-quote-comparison > article.awarded {
  border-color: rgba(15, 159, 151, 0.44);
  background: linear-gradient(145deg, rgba(236, 253, 245, 0.9), rgba(255, 255, 255, 0.78));
  box-shadow: inset 0 0 0 1px rgba(15, 159, 151, 0.08);
}

.contractor-quote-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 9px;
}

.contractor-quote-card-head > div {
  display: grid;
  gap: 4px;
}

.contractor-quote-card-head strong {
  color: var(--contractor-navy);
  font-size: 0.82rem;
  font-weight: 900;
}

.contractor-quote-comparison > article > b {
  color: #0753a5;
  font-size: 1.35rem;
  font-weight: 950;
  line-height: 1.1;
}

.contractor-quote-comparison dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.contractor-quote-comparison dl > div {
  display: grid;
  gap: 2px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(241, 246, 252, 0.74);
}

.contractor-quote-comparison dt {
  color: #718096;
  font-size: 0.6rem;
  font-weight: 850;
  text-transform: uppercase;
}

.contractor-quote-comparison dd {
  margin: 0;
  color: var(--contractor-navy);
  font-size: 0.71rem;
  font-weight: 820;
}

.contractor-quote-comparison > article > p {
  margin: 0;
  color: #5e6f87;
  font-size: 0.69rem;
  font-weight: 640;
  line-height: 1.42;
}

.contractor-review-form {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(130px, 0.35fr) minmax(240px, 1.2fr) auto;
  align-items: end;
  gap: 10px;
  padding: 13px;
  border: 1px solid rgba(217, 119, 6, 0.27);
  border-radius: 11px;
  background: rgba(255, 251, 235, 0.66);
}

.contractor-review-form > div {
  align-self: center;
  display: grid;
  gap: 2px;
}

.contractor-review-form strong { color: var(--contractor-navy); font-size: 0.77rem; font-weight: 890; }
.contractor-review-form > div > span { color: #667085; font-size: 0.64rem; font-weight: 650; }

.contractor-rating {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #d97706;
  line-height: 1;
}

.contractor-rating > span {
  letter-spacing: 0.02em;
  font-size: 0.76rem;
}

.contractor-rating strong {
  color: #614314;
  font-size: 0.69rem;
  font-weight: 900;
}

.contractor-rating small {
  color: #718096;
  font-size: 0.61rem;
  font-weight: 700;
}

.contractor-message-list {
  display: grid;
  gap: 7px;
  max-height: 320px;
  overflow: auto;
  padding: 3px;
  scrollbar-width: thin;
}

.contractor-message-list > article {
  width: min(88%, 620px);
  display: grid;
  gap: 3px;
  justify-self: start;
  padding: 9px 10px;
  border: 1px solid rgba(100, 123, 154, 0.18);
  border-radius: 10px 10px 10px 3px;
  background: rgba(255, 255, 255, 0.78);
}

.contractor-message-list > article.mine {
  justify-self: end;
  border-color: rgba(8, 120, 237, 0.22);
  border-radius: 10px 10px 3px 10px;
  background: rgba(219, 234, 254, 0.68);
}

.contractor-message-list article strong { color: var(--contractor-navy); font-size: 0.68rem; font-weight: 870; }
.contractor-message-list article p { margin: 0; color: #465a74; font-size: 0.71rem; font-weight: 630; line-height: 1.42; white-space: pre-wrap; }
.contractor-message-list article small { color: #718096; font-size: 0.58rem; font-weight: 650; }

.contractor-message-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}

.contractor-message-form textarea { min-height: 66px; }
.contractor-message-form button { min-height: 42px; }

.contractor-network-filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(115px, 1fr));
  gap: 9px;
  padding: 13px;
  border: 1px solid var(--contractor-line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--glass-edge), 0 10px 24px rgba(15, 39, 71, 0.045);
}

.contractor-network-filters .wide { grid-column: span 2; }

.contractor-network-card {
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
}

.contractor-network-card > span:last-child {
  display: grid;
  gap: 5px;
}

.contractor-network-card > span:last-child > strong {
  color: var(--contractor-navy);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.25;
}

.contractor-network-card > span:last-child > small {
  color: #64748b;
  font-size: 0.64rem;
  font-weight: 690;
}

.contractor-profile-avatar {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(8, 120, 237, 0.28);
  border-radius: 12px;
  background: linear-gradient(135deg, #075985, #0a7cff 58%, #14b8a6);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 950;
  box-shadow: 0 6px 14px rgba(8, 120, 237, 0.17);
}

.contractor-profile-avatar.large {
  width: 68px;
  height: 68px;
  border-radius: 17px;
  font-size: 1rem;
}

.contractor-network-detail {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 17px;
}

.contractor-network-detail > header {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.contractor-network-detail > header > div {
  display: grid;
  gap: 5px;
}

.contractor-network-detail h2 {
  margin: 0;
  color: var(--contractor-navy);
  font-size: 1.35rem;
  font-weight: 950;
  line-height: 1.1;
}

.contractor-network-detail > p {
  margin: 0;
  color: #53647d;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.52;
}

.contractor-profile-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.contractor-profile-facts > div {
  min-height: 76px;
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(100, 123, 154, 0.16);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.72);
}

.contractor-profile-facts small {
  color: #718096;
  font-size: 0.61rem;
  font-weight: 650;
}

.contractor-accreditations {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  color: #667085;
  font-size: 0.7rem;
}

.contractor-accreditations > strong {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(8, 120, 237, 0.2);
  border-radius: 7px;
  background: rgba(219, 234, 254, 0.55);
  color: #255586;
  padding: 5px 8px;
  font-size: 0.65rem;
  font-weight: 850;
}

.contractor-network-rates > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.contractor-network-rates article {
  display: grid;
  gap: 3px;
  padding: 9px;
  border: 1px solid rgba(100, 123, 154, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.contractor-network-rates article span { color: #718096; font-size: 0.62rem; font-weight: 770; }
.contractor-network-rates article strong { color: var(--contractor-navy); font-size: 0.77rem; font-weight: 900; }

.contractor-company-profile {
  padding: 17px;
}

.contractor-company-profile > label.wide {
  display: grid;
}

.contractor-profile-gate {
  min-height: 340px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 28px;
  text-align: center;
}

.contractor-profile-gate h2 { margin: 0; color: var(--contractor-navy); font-size: 1.35rem; font-weight: 950; }
.contractor-profile-gate p { max-width: 620px; margin: 0; color: #5f7087; font-size: 0.78rem; font-weight: 650; line-height: 1.5; }

.contractor-messages-workspace {
  padding: 16px;
}

.contractor-messages-workspace > article,
.contractor-direct-thread {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid rgba(100, 123, 154, 0.17);
  border-radius: 12px;
  background: rgba(248, 251, 255, 0.64);
}

.contractor-direct-thread > header strong,
.contractor-messages-workspace > article > header strong {
  color: var(--contractor-navy);
  font-size: 0.8rem;
  font-weight: 900;
}

.contractor-direct-thread > header > small,
.contractor-messages-workspace > article > header > small {
  color: #718096;
  font-size: 0.63rem;
  font-weight: 700;
}

/* Controlled tender composer. */
.contractor-modal-layer {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
}

.contractor-modal-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: rgba(15, 23, 42, 0.46);
  box-shadow: none;
  cursor: default;
  backdrop-filter: blur(9px) saturate(115%);
  -webkit-backdrop-filter: blur(9px) saturate(115%);
}

.contractor-composer {
  position: relative;
  width: min(1120px, calc(100vw - 36px));
  max-height: calc(100dvh - 36px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(171, 192, 220, 0.62);
  border-radius: 17px;
  background: linear-gradient(180deg, rgba(251, 253, 255, 0.98), rgba(240, 246, 252, 0.98));
  color: var(--text);
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.3), var(--glass-edge);
}

.contractor-composer > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 19px;
  border-bottom: 1px solid rgba(100, 123, 154, 0.18);
  background:
    radial-gradient(circle at 84% 10%, rgba(45, 212, 191, 0.16), transparent 38%),
    linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.92));
}

.contractor-composer > header > div {
  display: grid;
  gap: 3px;
}

.contractor-composer > header span {
  color: #53708e;
  font-size: 0.65rem;
  font-weight: 920;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.contractor-composer > header h2 {
  margin: 0;
  color: #0f2747;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-weight: 950;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

.contractor-composer > header p {
  margin: 0;
  color: #607089;
  font-size: 0.74rem;
  font-weight: 650;
  line-height: 1.4;
}

.contractor-composer > header > button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(100, 123, 154, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  color: #52647d;
  font-size: 1.35rem;
  line-height: 1;
}

.contractor-composer > header > button:hover {
  border-color: rgba(240, 68, 56, 0.3);
  background: rgba(254, 226, 226, 0.72);
  color: #b42318;
}

.contractor-composer-body {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 11px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 13px 16px;
  scrollbar-gutter: stable;
}

.contractor-composer-section {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid rgba(100, 123, 154, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.contractor-composer-scope-first {
  border-color: rgba(8, 120, 237, 0.28);
  background:
    radial-gradient(circle at 100% 0, rgba(45, 212, 191, 0.1), transparent 38%),
    linear-gradient(145deg, rgba(239, 246, 255, 0.82), rgba(255, 255, 255, 0.76));
  box-shadow:
    inset 3px 0 0 rgba(8, 120, 237, 0.72),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.contractor-compliance-requirements {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.contractor-compliance-requirements > .contractor-detail-heading {
  grid-column: 1 / -1;
}

.contractor-credential-group {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 11px;
  border: 1px solid rgba(100, 123, 154, 0.18);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.7);
}

.contractor-credential-group > :is(header, div:first-child) {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.contractor-credential-group > :is(header, div:first-child) strong {
  color: #0f2747;
  font-size: 0.72rem;
  font-weight: 900;
}

.contractor-credential-group > :is(header, div:first-child) small {
  color: #667085;
  font-size: 0.61rem;
  font-weight: 650;
  line-height: 1.35;
}

.contractor-credential-group > legend {
  max-width: 100%;
  margin: 0 0 2px;
  padding: 0;
  color: #0f2747;
  font-size: 0.72rem;
  font-weight: 900;
}

.contractor-credential-group > :is(div, fieldset) {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  border: 0;
}

.contractor-credential-group label {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(100, 123, 154, 0.18);
  border-radius: 999px;
  background: rgba(248, 251, 255, 0.82);
  color: #405673;
  padding: 6px 9px;
  cursor: pointer;
  font-size: 0.63rem;
  font-weight: 820;
  line-height: 1.2;
}

.contractor-credential-group label:has(input:checked) {
  border-color: rgba(8, 120, 237, 0.4);
  background: rgba(219, 234, 254, 0.78);
  color: #0753a5;
  box-shadow: inset 0 0 0 1px rgba(8, 120, 237, 0.08);
}

.contractor-credential-group label > input {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  accent-color: #0878ed;
}

.contractor-privacy-section {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(240, 253, 250, 0.62));
}

.contractor-section-heading {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.contractor-section-heading > span {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 9px;
  background: linear-gradient(135deg, #075985, #0a7cff);
  color: #fff;
  font-size: 0.67rem;
  font-weight: 950;
  box-shadow: 0 5px 12px rgba(8, 120, 237, 0.18);
}

.contractor-section-heading > div {
  display: grid;
  gap: 2px;
}

.contractor-section-heading strong {
  color: #0f2747;
  font-size: 0.78rem;
  font-weight: 900;
}

.contractor-section-heading small {
  color: #667085;
  font-size: 0.65rem;
  font-weight: 650;
  line-height: 1.35;
}

.contractor-composer-contractors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.contractor-choice-card {
  position: relative;
  grid-template-columns: auto 40px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(100, 123, 154, 0.19);
  border-radius: 11px;
  background: rgba(248, 251, 255, 0.72);
  cursor: pointer;
}

.contractor-choice-card:has(input:checked) {
  border-color: rgba(8, 120, 237, 0.5);
  background: linear-gradient(145deg, rgba(219, 234, 254, 0.74), rgba(204, 251, 241, 0.48));
  box-shadow: inset 3px 0 0 #0878ed;
}

.contractor-choice-card > input,
.contractor-line-picker label > input,
.contractor-privacy-grid label > input,
.contractor-scope-options label > input,
.contractor-switch > input {
  width: 18px;
  height: 18px;
  min-height: 0;
  accent-color: #0878ed;
}

.contractor-choice-avatar {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #075985, #0a7cff 58%, #14b8a6);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 950;
}

.contractor-choice-card > span:last-child {
  display: grid;
  gap: 3px;
}

.contractor-choice-card > span:last-child > strong { color: #0f2747; font-size: 0.75rem; font-weight: 900; }
.contractor-choice-card > span:last-child > small { color: #667085; font-size: 0.63rem; font-weight: 660; }

.contractor-contractor-search-controls {
  display: grid;
  grid-template-columns: minmax(180px, 1.8fr) repeat(3, minmax(125px, 0.8fr));
  align-items: end;
  gap: 9px;
  padding: 11px;
  border: 1px solid rgba(100, 123, 154, 0.18);
  border-radius: 11px;
  background: rgba(248, 251, 255, 0.68);
}

.contractor-contractor-search-controls > label {
  min-width: 0;
  display: grid;
  align-content: end;
  gap: 5px;
}

.contractor-contractor-search-controls > label > span:first-child {
  color: #53647d;
  font-size: 0.61rem;
  font-weight: 850;
  letter-spacing: 0.01em;
}

.contractor-contractor-search-controls :is(input, select) {
  width: 100%;
}

.contractor-contractor-search-controls input[type="range"] {
  min-height: 26px;
  padding-inline: 0;
  border: 0;
  background: transparent;
  accent-color: #0878ed;
}

.contractor-contractor-search-controls output,
.contractor-contractor-search-controls label > small {
  color: #0753a5;
  font-size: 0.61rem;
  font-weight: 860;
}

.contractor-composer-match-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border: 1px solid rgba(15, 159, 151, 0.2);
  border-radius: 9px;
  background: rgba(204, 251, 241, 0.4);
  color: #456074;
  font-size: 0.65rem;
  font-weight: 680;
  line-height: 1.35;
}

.contractor-composer-match-summary strong {
  color: #0f615f;
  font-size: 0.7rem;
  font-weight: 920;
}

.contractor-choice-card.is-ineligible {
  border-style: dashed;
  background: rgba(241, 245, 249, 0.64);
  box-shadow: none;
  cursor: not-allowed;
  filter: saturate(0.45);
  opacity: 0.62;
}

.contractor-choice-card.is-ineligible > input {
  pointer-events: none;
}

.contractor-choice-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.contractor-choice-meta > :is(span, small, strong) {
  min-height: 23px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(100, 123, 154, 0.15);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: #53647d;
  padding: 3px 7px;
  font-size: 0.57rem;
  font-weight: 790;
  line-height: 1.15;
}

.contractor-choice-meta > :is(span, small, strong)[data-tone="available"],
.contractor-choice-meta > .available {
  border-color: rgba(15, 159, 151, 0.22);
  background: rgba(204, 251, 241, 0.58);
  color: #0f615f;
}

.contractor-choice-meta > :is(span, small, strong)[data-tone="limited"],
.contractor-choice-meta > .limited {
  border-color: rgba(217, 119, 6, 0.22);
  background: rgba(254, 243, 199, 0.64);
  color: #92400e;
}

.contractor-credential-chips {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.contractor-credential-chips > :is(span, strong, em) {
  min-height: 23px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(8, 120, 237, 0.2);
  border-radius: 7px;
  background: rgba(219, 234, 254, 0.52);
  color: #255586;
  padding: 4px 7px;
  font-size: 0.56rem;
  font-weight: 850;
  line-height: 1.15;
  font-style: normal;
}

.contractor-composer-fields,
.contractor-privacy-grid {
  display: grid;
  gap: 9px;
}

.contractor-composer-fields.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.contractor-privacy-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.contractor-switch {
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 4px 8px;
  min-height: 66px;
  padding: 9px;
  border: 1px solid rgba(100, 123, 154, 0.18);
  border-radius: 10px;
  background: rgba(248, 251, 255, 0.72);
}

.contractor-switch > small {
  grid-column: 2;
  color: #718096;
  font-size: 0.6rem;
  font-weight: 630;
  line-height: 1.3;
}

.contractor-scope-options {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.contractor-scope-options > label,
.contractor-privacy-grid > label {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(100, 123, 154, 0.18);
  border-radius: 9px;
  background: rgba(248, 251, 255, 0.75);
  color: #405673;
  padding: 8px 9px;
  cursor: pointer;
}

.contractor-scope-options > label:has(input:checked),
.contractor-privacy-grid > label:has(input:checked) {
  border-color: rgba(8, 120, 237, 0.35);
  background: rgba(219, 234, 254, 0.65);
  color: #0753a5;
}

.contractor-line-picker {
  max-height: 260px;
  display: grid;
  align-content: start;
  overflow: auto;
  border: 1px solid rgba(100, 123, 154, 0.17);
  border-radius: 10px;
  background: rgba(248, 251, 255, 0.55);
  scrollbar-width: thin;
}

.contractor-line-picker > label {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(100, 123, 154, 0.14);
  cursor: pointer;
}

.contractor-line-picker > label:last-child { border-bottom: 0; }
.contractor-line-picker > label:hover { background: rgba(219, 234, 254, 0.36); }
.contractor-line-picker label > span { display: grid; gap: 2px; }
.contractor-line-picker label strong { overflow-wrap: anywhere; color: #0f2747; font-size: 0.82rem; font-weight: 860; }
.contractor-line-picker label small { overflow-wrap: anywhere; color: #718096; font-size: 0.75rem; font-weight: 640; line-height: 1.3; }
.contractor-line-picker label em { color: #0753a5; font-size: 0.75rem; font-style: normal; font-weight: 890; white-space: nowrap; }

.contractor-design-area-picker { display: grid; gap: 8px; padding: 10px; border: 1px solid rgba(8, 120, 237, 0.18); border-radius: 10px; background: rgba(239, 246, 255, 0.62); }
.contractor-design-area-picker > div:first-child { display: grid; gap: 2px; }
.contractor-design-area-picker > div:first-child strong { color: #0f2747; font-size: 0.875rem; font-weight: 900; }
.contractor-design-area-picker > div:first-child small,
.contractor-design-area-picker > p { color: #667085; font-size: 0.75rem; font-weight: 650; line-height: 1.4; }
.contractor-design-area-picker > div:nth-child(2) { display: flex; gap: 7px; flex-wrap: wrap; }
.contractor-design-area-picker label { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; border: 1px solid rgba(100, 123, 154, 0.18); border-radius: 9px; background: rgba(255, 255, 255, 0.76); padding: 6px 9px; cursor: pointer; }
.contractor-design-area-picker label:has(input:checked) { border-color: rgba(8, 120, 237, 0.4); background: rgba(219, 234, 254, 0.78); color: #0753a5; }
.contractor-design-area-picker input { width: 16px; height: 16px; min-height: 0; accent-color: #0878ed; }
.contractor-design-area-picker label span { font-size: 0.78rem; font-weight: 840; }
.contractor-design-area-picker > p { margin: 0; }

.contractor-notes-field { margin-top: 2px; }

.contractor-composer > footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  padding: 12px 16px;
  border-top: 1px solid rgba(100, 123, 154, 0.18);
  background: rgba(248, 251, 255, 0.95);
}

.contractor-composer > footer > span {
  color: #5f7087;
  font-size: 0.75rem;
  font-weight: 680;
  line-height: 1.35;
}

.contractor-engagement-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.contractor-engagement-options > label {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  min-height: 72px;
  padding: 11px;
  border: 1px solid rgba(100, 123, 154, 0.2);
  border-radius: 11px;
  background: rgba(248, 251, 255, 0.76);
  cursor: pointer;
}

.contractor-engagement-options > label.contract-route:has(input:checked) {
  border-color: rgba(8, 120, 237, 0.48);
  background: linear-gradient(145deg, rgba(219, 234, 254, 0.78), rgba(204, 251, 241, 0.52));
  box-shadow: inset 3px 0 0 #0878ed;
}

.contractor-engagement-options > label.subcontract-route:has(input:checked) {
  border-color: rgba(124, 58, 237, 0.46);
  background: linear-gradient(145deg, rgba(237, 233, 254, 0.86), rgba(250, 245, 255, 0.76));
  box-shadow: inset 3px 0 0 #7c3aed;
}

.contractor-engagement-options > label.subcontract-route input { accent-color: #7c3aed; }

.contractor-engagement-options input { width: 18px; height: 18px; min-height: 0; accent-color: #0878ed; }
.contractor-engagement-options label > span { display: grid; gap: 3px; }
.contractor-engagement-options strong { color: #0f2747; font-size: 0.875rem; font-weight: 920; }
.contractor-engagement-options small { color: #667085; font-size: 0.75rem; font-weight: 650; line-height: 1.35; }

.contractor-engagement-inherited,
.contractor-engagement-notice,
.contractor-design-review-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 13px;
  border: 1px solid rgba(124, 58, 237, 0.23);
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(245, 243, 255, 0.8), rgba(239, 246, 255, 0.72));
}

.contractor-engagement-inherited { display: grid; gap: 3px; }
.contractor-engagement-inherited strong,
.contractor-engagement-notice strong,
.contractor-design-review-callout strong { color: #3d2b79; font-size: 0.82rem; font-weight: 920; }
.contractor-engagement-inherited span,
.contractor-engagement-notice span,
.contractor-design-review-callout span { color: #5f6680; font-size: 0.75rem; font-weight: 660; line-height: 1.4; }
.contractor-engagement-notice { display: grid; justify-content: stretch; gap: 3px; }
.contractor-engagement-notice.contract { border-color: rgba(8, 120, 237, 0.22); background: rgba(239, 246, 255, 0.72); }
.contractor-engagement-notice.contract strong { color: #0753a5; }
.contractor-engagement-notice small { color: #7259a4; font-size: 0.75rem; font-weight: 760; }
.contractor-subcontract-terms { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin: 5px 0 1px; }
.contractor-subcontract-terms > div { display: grid; gap: 2px; padding: 7px 9px; border-radius: 8px; background: rgba(255, 255, 255, 0.54); }
.contractor-subcontract-terms dt { color: #77718e; font-size: 0.7rem; font-weight: 850; text-transform: uppercase; letter-spacing: 0.04em; }
.contractor-subcontract-terms dd { min-width: 0; margin: 0; color: #35285f; font-size: 0.75rem; font-weight: 850; overflow-wrap: anywhere; }
.contractor-engagement-inherited.contract-only { border-color: rgba(8, 120, 237, 0.22); background: rgba(239, 246, 255, 0.76); }
.contractor-engagement-inherited.contract-only strong { color: #0753a5; }

.contractor-engagement-route-details { display: grid; }
.contractor-engagement-route-details article {
  display: none;
  gap: 5px;
  padding: 11px 13px;
  border: 1px solid rgba(8, 120, 237, 0.18);
  border-radius: 11px;
  background: rgba(248, 251, 255, 0.78);
}
.contractor-engagement-route-details strong { color: #0f4f96; font-size: 0.82rem; font-weight: 920; }
.contractor-engagement-route-details span,
.contractor-engagement-route-details li { color: #667085; font-size: 0.75rem; font-weight: 650; line-height: 1.42; }
.contractor-engagement-route-details ul { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 3px 0 0; padding-left: 17px; }
.contractor-composer:not(:has(input[name="engagementType"][value="subcontract"]:checked)) [data-contractor-engagement-panel="contract"],
.contractor-composer:has(input[name="engagementType"][value="contract"]:checked) [data-contractor-engagement-panel="contract"] { display: grid; }
.contractor-composer:has(input[name="engagementType"][value="subcontract"]:checked) [data-contractor-engagement-panel="contract"] { display: none; }
.contractor-composer:has(input[name="engagementType"][value="subcontract"]:checked) [data-contractor-engagement-panel="subcontract"] {
  display: grid;
  border-color: rgba(124, 58, 237, 0.22);
  background: rgba(245, 243, 255, 0.78);
}
.contractor-composer:has(input[name="engagementType"][value="subcontract"]:checked) [data-contractor-engagement-panel="subcontract"] strong { color: #5b21b6; }

.contractor-subcontract-fields {
  display: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 12px;
  background: rgba(245, 243, 255, 0.58);
}
.contractor-composer.is-subcontract-composer .contractor-subcontract-fields,
.contractor-composer:has(input[name="engagementType"][value="subcontract"]:checked) .contractor-subcontract-fields { display: grid; }
.contractor-subcontract-fields > label { align-content: start; }
.contractor-subcontract-fields .wide { grid-column: 1 / -1; }
.contractor-input-with-unit { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 7px; }
.contractor-input-with-unit em { color: #667085; font-size: 0.62rem; font-style: normal; font-weight: 800; }
.contractor-send-engagement [data-send-subcontract] { display: none; }
.contractor-send-status { display: none; align-items: center; gap: 8px; }
.contractor-composer[aria-busy="true"] .contractor-send-engagement [data-send-contract],
.contractor-composer[aria-busy="true"] .contractor-send-engagement [data-send-subcontract] { display: none; }
.contractor-composer[aria-busy="true"] .contractor-send-status { display: inline-flex; }
.contractor-composer[aria-busy="true"] .contractor-send-status::before {
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: currentColor;
  border-radius: 50%;
  content: "";
  animation: contractor-send-spin 0.7s linear infinite;
}
.contractor-composer[aria-busy="true"] .contractor-send-engagement { cursor: wait; opacity: 0.86; }
@keyframes contractor-send-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .contractor-composer[aria-busy="true"] .contractor-send-status::before { animation: none; }
}
[data-engagement-subcontract-copy] { display: none; }
.contractor-composer.is-subcontract-composer .contractor-send-engagement [data-send-contract],
.contractor-composer:has(input[name="engagementType"][value="subcontract"]:checked) .contractor-send-engagement [data-send-contract] { display: none; }
.contractor-composer.is-subcontract-composer .contractor-send-engagement [data-send-subcontract],
.contractor-composer:has(input[name="engagementType"][value="subcontract"]:checked) .contractor-send-engagement [data-send-subcontract] { display: inline; }
.contractor-composer.is-subcontract-composer [data-engagement-contract-copy],
.contractor-composer:has(input[name="engagementType"][value="subcontract"]:checked) [data-engagement-contract-copy] { display: none; }
.contractor-composer.is-subcontract-composer [data-engagement-subcontract-copy],
.contractor-composer:has(input[name="engagementType"][value="subcontract"]:checked) [data-engagement-subcontract-copy] { display: inline; }
.contractor-design-review-callout { border-color: rgba(8, 120, 237, 0.24); background: linear-gradient(145deg, rgba(239, 246, 255, 0.86), rgba(236, 253, 245, 0.7)); }
.contractor-design-review-callout > div { display: grid; gap: 3px; }
.contractor-design-review-callout strong { display: flex; align-items: center; gap: 6px; color: #0753a5; }
.contractor-design-review-callout svg { width: 15px; height: 15px; }

.contractor-empty-project { display: grid; gap: 6px; justify-items: start; padding: 16px; }
.contractor-empty-project strong { color: #0f2747; font-size: 0.78rem; }
.contractor-empty-project span { max-width: 620px; line-height: 1.45; }

.contractor-design-modal {
  position: fixed;
  z-index: 1260;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
}

.contractor-design-modal-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(10px) saturate(112%);
  -webkit-backdrop-filter: blur(10px) saturate(112%);
}

.contractor-design-modal-dialog {
  position: relative;
  width: min(1220px, calc(100vw - 36px));
  max-height: calc(100dvh - 36px);
  overflow: auto;
  border: 1px solid rgba(171, 192, 220, 0.62);
  border-radius: 18px;
  background: linear-gradient(180deg, #fbfdff, #eef4fa);
  box-shadow: 0 32px 100px rgba(15, 23, 42, 0.34);
  scrollbar-gutter: stable;
}

.contractor-design-modal-close {
  position: sticky;
  z-index: 4;
  top: 12px;
  float: right;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin: 12px 12px -50px 0;
  border: 1px solid rgba(100, 123, 154, 0.25);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: #52647d;
  font-size: 1.35rem;
  box-shadow: 0 8px 20px rgba(15, 39, 71, 0.1);
}

.contractor-design-review { display: grid; gap: 14px; padding: 18px; color: #101828; }
.contractor-design-review-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 5px 54px 14px 2px; border-bottom: 1px solid rgba(100, 123, 154, 0.18); }
.contractor-design-review-head > div { display: grid; gap: 4px; }
.contractor-design-review-head span { color: #58708c; font-size: 0.75rem; font-weight: 900; letter-spacing: 0.045em; text-transform: uppercase; }
.contractor-design-review-head h2 { margin: 0; color: #0f2747; font-size: 1.45rem; font-weight: 950; letter-spacing: -0.02em; }
.contractor-design-review-head p { max-width: 760px; margin: 0; color: #667085; font-size: 0.8125rem; font-weight: 650; line-height: 1.45; }
.contractor-read-only-badge { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; border: 1px solid rgba(15, 159, 151, 0.28); border-radius: 999px; background: rgba(204, 251, 241, 0.72); color: #0f615f; padding: 7px 10px; font-size: 0.75rem; font-weight: 920; }
.contractor-read-only-badge svg { width: 14px; height: 14px; }
.contractor-design-scope-strip { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.contractor-design-scope-strip > span:not(.contractor-trade-chips) { border: 1px solid rgba(100, 123, 154, 0.17); border-radius: 999px; background: rgba(255, 255, 255, 0.72); color: #53657d; padding: 5px 9px; font-size: 0.75rem; font-weight: 820; }

.contractor-design-scenes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.contractor-design-scenes > article { min-width: 0; overflow: hidden; border: 1px solid rgba(100, 123, 154, 0.2); border-radius: 13px; background: rgba(255, 255, 255, 0.82); box-shadow: 0 10px 28px rgba(15, 39, 71, 0.06); }
.contractor-design-scenes > article > header { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-bottom: 1px solid rgba(100, 123, 154, 0.17); background: rgba(241, 246, 252, 0.78); }
.contractor-design-scenes > article > header > div { display: grid; gap: 2px; }
.contractor-design-scenes header span { color: #64748b; font-size: 0.72rem; font-weight: 900; letter-spacing: 0.04em; text-transform: uppercase; }
.contractor-design-scenes header strong { color: #0f2747; font-size: 0.82rem; font-weight: 920; }
.contractor-design-scenes header small { color: #718096; font-size: 0.72rem; font-weight: 700; }
.contractor-design-scenes svg { width: 100%; height: clamp(250px, 32vh, 390px); display: block; background-color: #f8fbff; background-image: linear-gradient(rgba(148, 163, 184, 0.14) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, 0.14) 1px, transparent 1px); background-size: 20px 20px; }
.contractor-design-room polygon { fill: rgba(226, 232, 240, 0.44); stroke: #64748b; stroke-width: 1.25; vector-effect: non-scaling-stroke; }
.contractor-design-room text { fill: #52647d; font-size: 8px; font-weight: 800; text-anchor: middle; dominant-baseline: middle; }
.contractor-design-route { fill: none; stroke: #64748b; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.contractor-design-route.trade-mechanical, .contractor-design-key.trade-mechanical { stroke: #ef4444; background: #ef4444; }
.contractor-design-route.trade-electrical, .contractor-design-key.trade-electrical { stroke: #eab308; background: #eab308; }
.contractor-design-route.trade-controls, .contractor-design-key.trade-controls { stroke: #8b5cf6; background: #8b5cf6; }
.contractor-design-route.trade-public-health, .contractor-design-key.trade-public-health { stroke: #1683ff; background: #1683ff; }
.contractor-design-route.trade-ventilation, .contractor-design-key.trade-ventilation { stroke: #0f9f97; background: #0f9f97; }
.contractor-design-item { color: #64748b; }
.contractor-design-item.trade-mechanical { color: #ef4444; }
.contractor-design-item.trade-electrical { color: #eab308; }
.contractor-design-item.trade-controls { color: #8b5cf6; }
.contractor-design-item.trade-public-health { color: #1683ff; }
.contractor-design-item.trade-ventilation { color: #0f9f97; }
.contractor-design-item circle { fill: #fff; stroke: currentColor; stroke-width: 3; vector-effect: non-scaling-stroke; }
.contractor-design-empty-scene { min-height: 150px; display: grid; place-items: center; color: #718096; padding: 24px; font-size: 0.78rem; font-weight: 720; text-align: center; }

.contractor-design-layer-schedule,
.contractor-design-comments { display: grid; gap: 10px; padding: 13px; border: 1px solid rgba(100, 123, 154, 0.18); border-radius: 13px; background: rgba(255, 255, 255, 0.72); }
.contractor-design-layer-schedule > div:last-child { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.contractor-design-layer-schedule article { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; padding: 8px; border: 1px solid rgba(100, 123, 154, 0.14); border-radius: 9px; background: rgba(248, 251, 255, 0.74); }
.contractor-design-layer-schedule article > span:last-child { display: grid; gap: 2px; min-width: 0; }
.contractor-design-layer-schedule article strong { overflow-wrap: anywhere; color: #0f2747; font-size: 0.78rem; font-weight: 860; }
.contractor-design-layer-schedule article small { color: #718096; font-size: 0.72rem; font-weight: 650; }
.contractor-design-key { width: 10px; height: 28px; display: block; border-radius: 999px; background: #64748b; }
.contractor-design-comment-form { display: grid; grid-template-columns: minmax(170px, 0.55fr) minmax(170px, 0.55fr) minmax(0, 1.4fr) auto; align-items: end; gap: 9px; }
.contractor-design-comment-form label { display: grid; gap: 5px; }
.contractor-design-comment-form label > span { color: #53657d; font-size: 0.75rem; font-weight: 850; }
.contractor-design-comment-form textarea { min-height: 72px; resize: vertical; }
.contractor-design-comment-form button { min-height: 40px; }

html[data-theme="dark"] .contractor-design-modal-dialog { border-color: rgba(203, 213, 225, 0.2); background: linear-gradient(180deg, #1d2531, #151c26); }
html[data-theme="dark"] .contractor-design-review { color: #edf6ff; }
html[data-theme="dark"] .contractor-design-review h2,
html[data-theme="dark"] .contractor-design-review h3,
html[data-theme="dark"] .contractor-design-review strong { color: #edf6ff; }
html[data-theme="dark"] :is(.contractor-design-scenes > article, .contractor-design-layer-schedule, .contractor-design-comments, .contractor-design-layer-schedule article) { border-color: rgba(203, 213, 225, 0.16); background: rgba(15, 23, 34, 0.62); }
html[data-theme="dark"] .contractor-design-scenes > article > header { border-color: rgba(203, 213, 225, 0.14); background: rgba(22, 30, 41, 0.96); }
html[data-theme="dark"] .contractor-design-scenes svg { background-color: #121924; }
html[data-theme="dark"] .contractor-design-room polygon { fill: rgba(71, 85, 105, 0.36); stroke: #94a3b8; }
html[data-theme="dark"] .contractor-design-comment-form :is(input, select, textarea) { border-color: rgba(203, 213, 225, 0.2); background: rgba(8, 14, 23, 0.74); color: #edf6ff; }

html[data-theme="dark"] .contractor-workspace {
  --contractor-navy: #edf6ff;
  --contractor-line: rgba(203, 213, 225, 0.16);
  background:
    radial-gradient(circle at 5% 0%, rgba(8, 120, 237, 0.17), transparent 29%),
    radial-gradient(circle at 96% 8%, rgba(15, 159, 151, 0.13), transparent 30%),
    linear-gradient(180deg, #151a23, #10151d);
}

html[data-theme="dark"] :is(
  .contractor-workspace-header,
  .contractor-workspace-tabs,
  .contractor-metric,
  .contractor-overview-panel,
  .contractor-master-detail > aside,
  .contractor-network-layout > aside,
  .contractor-tender-detail,
  .contractor-network-detail,
  .contractor-company-profile,
  .contractor-messages-workspace,
  .contractor-profile-gate
) {
  border-color: rgba(203, 213, 225, 0.16);
  background: linear-gradient(145deg, rgba(37, 45, 57, 0.94), rgba(22, 29, 39, 0.9));
}

html[data-theme="dark"] :is(
  .contractor-pipeline article,
  .contractor-next-actions > article,
  .contractor-recent-list,
  .contractor-tender-card,
  .contractor-network-card,
  .contractor-tender-detail > section,
  .contractor-company-profile > section,
  .contractor-network-detail > section,
  .contractor-quote-builder,
  .contractor-message-thread,
  .contractor-shared-project > div,
  .contractor-rate-row,
  .contractor-quote-comparison > article,
  .contractor-profile-facts > div,
  .contractor-network-rates article,
  .contractor-messages-workspace > article,
  .contractor-direct-thread
) {
  border-color: rgba(203, 213, 225, 0.14);
  background: rgba(15, 23, 34, 0.48);
}

html[data-theme="dark"] .contractor-recipient-threads > details {
  border-color: rgba(203, 213, 225, 0.14);
  background: rgba(15, 23, 34, 0.48);
}

html[data-theme="dark"] .contractor-workspace :is(input, select, textarea) {
  border-color: rgba(203, 213, 225, 0.2);
  background: rgba(15, 23, 34, 0.72);
  color: #edf6ff;
}

html[data-theme="dark"] .contractor-network-filters {
  border-color: rgba(234, 234, 236, 0.18);
  background: var(--theme-card-bg);
  box-shadow: var(--glass-edge), 0 10px 24px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] .contractor-network-filters > label > span {
  color: #cbd5e1;
}

html[data-theme="dark"] .contractor-network-filters :is(input, select) {
  border-color: rgba(234, 234, 236, 0.2);
  background: var(--input-glass);
  color: var(--text);
}

html[data-theme="dark"] .contractor-list-heading {
  border-bottom-color: rgba(234, 234, 236, 0.15);
  background: rgba(27, 28, 32, 0.9);
}

html[data-theme="dark"] .contractor-list-heading span,
html[data-theme="dark"] .contractor-network-card > span:last-child > small,
html[data-theme="dark"] .contractor-rating small,
html[data-theme="dark"] .contractor-network-card .contractor-rating small,
html[data-theme="dark"] .contractor-network-detail .contractor-rating small,
html[data-theme="dark"] .contractor-profile-facts small,
html[data-theme="dark"] .contractor-network-rates article span {
  color: #a9b8ca;
}

html[data-theme="dark"] .contractor-list-heading strong {
  color: var(--text);
}

html[data-theme="dark"] .contractor-workspace-tabs button {
  background: transparent;
  color: #cbd5e1;
}

html[data-theme="dark"] .contractor-workspace-tabs button:hover {
  border-color: rgba(147, 197, 253, 0.32);
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
}

html[data-theme="dark"] .contractor-workspace-tabs button.active {
  border-color: rgba(147, 197, 253, 0.6);
  background: linear-gradient(145deg, rgba(30, 64, 175, 0.72), rgba(15, 118, 110, 0.5));
  color: #eff6ff;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .contractor-rating,
html[data-theme="dark"] .contractor-rating strong,
html[data-theme="dark"] .contractor-network-card .contractor-rating,
html[data-theme="dark"] .contractor-network-card .contractor-rating strong,
html[data-theme="dark"] .contractor-network-detail .contractor-rating,
html[data-theme="dark"] .contractor-network-detail .contractor-rating strong {
  color: #fbbf24;
}

html[data-theme="dark"] .contractor-trade-chips > span,
html[data-theme="dark"] .contractor-network-card .contractor-trade-chips > span,
html[data-theme="dark"] .contractor-network-detail .contractor-trade-chips > span {
  border-color: rgba(94, 234, 212, 0.38);
  background: rgba(13, 148, 136, 0.18);
  color: #99f6e4;
}

html[data-theme="dark"] .contractor-network-card .contractor-credential-chips > :is(span, strong, em) {
  border-color: rgba(96, 165, 250, 0.3);
  background: rgba(8, 63, 115, 0.55);
  color: #bfdbfe;
}

html[data-theme="dark"] .contractor-accreditations > strong {
  border-color: rgba(147, 197, 253, 0.38);
  background: rgba(37, 99, 235, 0.2);
  color: #bfdbfe;
}

html[data-theme="dark"] .contractor-accreditations {
  color: #cbd5e1;
}

html[data-theme="dark"] :is(
  .contractor-list-empty,
  .contractor-empty-inline,
  .contractor-detail-empty
) {
  border-color: rgba(234, 234, 236, 0.2);
  background: rgba(27, 28, 32, 0.82);
  color: #cbd5e1;
}

html[data-theme="dark"] :is(
  .contractor-workspace-title p,
  .contractor-workspace-title > span,
  .contractor-detail-heading > div > span,
  .contractor-detail-heading > small,
  .contractor-tender-detail > header p,
  .contractor-tender-detail > header > div > span,
  .contractor-company-profile > header p,
  .contractor-company-profile > header > div > span,
  .contractor-network-detail > p,
  .contractor-network-detail > header > div > span,
  .contractor-network-detail > section > span,
  .contractor-form-actions > span,
  .contractor-shared-project span,
  .contractor-profile-facts span,
  .contractor-network-rates > span
) {
  color: #a9b8ca;
}

html[data-theme="dark"] .contractor-composer {
  border-color: rgba(203, 213, 225, 0.2);
  background: linear-gradient(180deg, #1d2531, #151c26);
}

html[data-theme="dark"] :is(.contractor-composer > header, .contractor-composer > footer, .contractor-composer-section) {
  border-color: rgba(203, 213, 225, 0.16);
  background: rgba(22, 30, 41, 0.96);
}

html[data-theme="dark"] .contractor-composer :is(input, select, textarea) {
  border-color: rgba(203, 213, 225, 0.2);
  background: rgba(8, 14, 23, 0.72);
  color: #edf6ff;
}

html[data-theme="dark"] .contractor-composer :is(h2, strong) {
  color: #edf6ff;
}

html[data-theme="dark"] :is(
  .contractor-choice-card,
  .contractor-switch,
  .contractor-scope-options > label,
  .contractor-privacy-grid > label,
  .contractor-line-picker
) {
  border-color: rgba(203, 213, 225, 0.16);
  background: rgba(8, 14, 23, 0.48);
}

html[data-theme="dark"] .contractor-privacy-section {
  background: linear-gradient(145deg, rgba(22, 30, 41, 0.96), rgba(13, 55, 57, 0.48));
}

html[data-theme="dark"] :is(.contractor-engagement-options > label, .contractor-engagement-inherited, .contractor-engagement-notice, .contractor-design-review-callout, .contractor-design-area-picker) {
  border-color: rgba(203, 213, 225, 0.16);
  background: rgba(8, 14, 23, 0.52);
}

html[data-theme="dark"] :is(.contractor-engagement-options strong, .contractor-engagement-inherited strong, .contractor-engagement-notice strong, .contractor-design-review-callout strong, .contractor-design-area-picker strong) { color: #edf6ff; }

html[data-theme="dark"] .contractor-engagement-options > label.contract-route:has(input:checked),
html[data-theme="dark"] .contractor-engagement-notice.contract,
html[data-theme="dark"] .contractor-engagement-inherited.contract-only {
  border-color: rgba(96, 165, 250, 0.48);
  background: linear-gradient(145deg, rgba(8, 63, 115, 0.68), rgba(8, 32, 52, 0.74));
}
html[data-theme="dark"] .contractor-engagement-options > label.subcontract-route:has(input:checked),
html[data-theme="dark"] .contractor-engagement-notice.subcontract,
html[data-theme="dark"] .contractor-engagement-inherited,
html[data-theme="dark"] .contractor-subcontract-fields {
  border-color: rgba(167, 139, 250, 0.48);
  background: linear-gradient(145deg, rgba(70, 39, 124, 0.68), rgba(31, 23, 57, 0.78));
}
html[data-theme="dark"] .contractor-engagement-route-details article[data-contractor-engagement-panel="contract"] {
  border-color: rgba(96, 165, 250, 0.34);
  background: rgba(8, 48, 83, 0.68);
}
html[data-theme="dark"] .contractor-engagement-route-details article[data-contractor-engagement-panel="subcontract"] {
  border-color: rgba(167, 139, 250, 0.4);
  background: rgba(54, 35, 93, 0.72);
}
html[data-theme="dark"] .contractor-subcontract-terms > div { background: rgba(8, 14, 23, 0.44); }
html[data-theme="dark"] .contractor-subcontract-terms dt { color: #c4b5fd; }
html[data-theme="dark"] .contractor-subcontract-terms dd { color: #f5f3ff; }

html[data-theme="dark"] .contractor-composer-scope-first {
  border-color: rgba(96, 165, 250, 0.42);
  background: linear-gradient(145deg, rgba(8, 48, 83, 0.72), rgba(13, 55, 57, 0.5));
  box-shadow: inset 3px 0 0 rgba(96, 165, 250, 0.78);
}

html[data-theme="dark"] :is(
  .contractor-credential-group,
  .contractor-contractor-search-controls,
  .contractor-choice-meta > :is(span, small, strong),
  .contractor-quote-workflow
) {
  border-color: rgba(203, 213, 225, 0.16);
  background: rgba(8, 14, 23, 0.5);
}

html[data-theme="dark"] .contractor-credential-group label {
  border-color: rgba(203, 213, 225, 0.18);
  background: rgba(22, 30, 41, 0.82);
  color: #cbd5e1;
}

html[data-theme="dark"] .contractor-credential-group label:has(input:checked) {
  border-color: rgba(96, 165, 250, 0.5);
  background: rgba(8, 63, 115, 0.72);
  color: #dbeafe;
}

html[data-theme="dark"] .contractor-composer-match-summary {
  border-color: rgba(45, 212, 191, 0.3);
  background: rgba(13, 76, 74, 0.48);
  color: #cbd5e1;
}

html[data-theme="dark"] .contractor-composer-match-summary strong { color: #99f6e4; }
html[data-theme="dark"] .contractor-choice-card.is-ineligible { background: rgba(30, 41, 59, 0.46); }

html[data-theme="dark"] .contractor-credential-chips > :is(span, strong, em) {
  border-color: rgba(96, 165, 250, 0.3);
  background: rgba(8, 63, 115, 0.55);
  color: #bfdbfe;
}

html[data-theme="dark"] .contractor-delivery-timeline > *::before {
  border-color: rgba(148, 163, 184, 0.78);
  background: #151c26;
  box-shadow: 0 0 0 3px rgba(21, 28, 38, 0.9);
}

html[data-theme="dark"] .contractor-delivery-timeline > :is(.complete, .is-complete, [data-state="complete"])::before {
  border-color: #2dd4bf;
  background: #0f9f97;
}

html[data-theme="dark"] .contractor-delivery-timeline > :is(.current, .is-current, [aria-current="step"])::before {
  border-color: #60a5fa;
  background: #151c26;
}

html[data-theme="dark"] .contractor-quote-workflow-actions {
  border-color: rgba(203, 213, 225, 0.16);
}

.contractor-delivery-timeline > * > span:empty {
  display: none;
}

.contractor-recipient-statuses .contractor-delivery-timeline {
  grid-template-columns: minmax(0, 1fr);
  margin-top: 4px;
}

.contractor-recipient-statuses .contractor-delivery-timeline > * {
  min-height: 36px;
  padding: 5px 5px 5px 29px;
}

.contractor-recipient-statuses .contractor-delivery-timeline > *::before {
  top: 8px;
  left: 7px;
  width: 10px;
  height: 10px;
  border-width: 2px;
}

.contractor-recipient-statuses .contractor-delivery-timeline > *:not(:last-child)::after {
  top: 19px;
  bottom: -9px;
  left: 12px;
  width: 2px;
  height: auto;
}

@media (max-width: 1180px) {
  .contractor-subcontract-terms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contractor-subcontract-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contractor-contractor-search-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contractor-workspace { padding-inline: 16px; }
  .contractor-workspace-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .contractor-overview-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contractor-overview-grid { grid-template-columns: minmax(0, 1fr); }
  .contractor-master-detail,
  .contractor-network-layout {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
  }
  .contractor-master-detail > aside,
  .contractor-network-layout > aside {
    grid-template-rows: auto auto;
  }
  .contractor-tender-list,
  .contractor-network-list {
    grid-auto-flow: column;
    grid-auto-columns: minmax(255px, 0.8fr);
    overflow-x: auto;
    overflow-y: hidden;
  }
  .contractor-network-list { grid-auto-columns: minmax(280px, 0.8fr); }
  .contractor-network-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .contractor-network-filters .wide { grid-column: span 2; }
  .contractor-quote-grid.four,
  .contractor-profile-edit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contractor-review-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contractor-recipient-statuses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contractor-review-form > button { justify-self: start; }
  .contractor-privacy-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .contractor-design-layer-schedule > div:last-child { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contractor-design-comment-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contractor-design-comment-form .wide { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .contractor-subcontract-terms { grid-template-columns: minmax(0, 1fr); }
  .contractor-subcontract-fields { grid-template-columns: minmax(0, 1fr); }
  .contractor-subcontract-fields .wide { grid-column: auto; }
  .contractor-compliance-requirements { grid-template-columns: minmax(0, 1fr); }
  .studio-shell.dashboard-shell.dashboard-contractor-shell {
    height: 100dvh;
    min-height: 0;
  }
  .contractor-workspace {
    gap: 10px;
    padding: 10px 10px 18px;
  }
  .contractor-workspace-header {
    align-items: stretch;
    flex-direction: column;
    gap: 13px;
    padding: 14px;
    border-radius: 13px;
  }
  .contractor-workspace-actions {
    justify-content: stretch;
  }
  .contractor-workspace-actions > button {
    flex: 1 1 180px;
  }
  .contractor-workspace-tabs {
    position: static;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(124px, 1fr);
    justify-content: start;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
  }
  .contractor-overview-metrics,
  .contractor-detail-summary,
  .contractor-shared-project,
  .contractor-pipeline,
  .contractor-quote-comparison,
  .contractor-network-rates > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .contractor-network-filters,
  .contractor-profile-facts,
  .contractor-composer-fields.three,
  .contractor-privacy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .contractor-network-filters .wide { grid-column: 1 / -1; }
  .contractor-detail-heading,
  .contractor-tender-detail > header,
  .contractor-company-profile > header {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .contractor-tender-header-actions {
    justify-content: flex-start;
  }
  .contractor-detail-heading > small {
    max-width: none;
    text-align: left;
  }
  .contractor-rate-row {
    grid-template-columns: minmax(0, 1fr) repeat(2, minmax(96px, 0.75fr));
  }
  .contractor-quote-grid.four,
  .contractor-quote-grid.two,
  .contractor-profile-edit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .contractor-profile-edit-grid .wide { grid-column: 1 / -1; }
  .contractor-review-form { grid-template-columns: minmax(0, 1fr); }
  .contractor-subcontract-action,
  .contractor-form-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .contractor-invitation-actions {
    justify-content: stretch;
  }
  .contractor-invitation-actions > span {
    width: 100%;
    margin-right: 0;
  }
  .contractor-invitation-actions > button {
    flex: 1 1 170px;
  }
  .contractor-subcontract-action button,
  .contractor-form-actions button { width: 100%; }
  .contractor-modal-layer { padding: 8px; }
  .contractor-design-modal { padding: 8px; }
  .contractor-design-modal-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 13px; }
  .contractor-design-review { padding: 13px; }
  .contractor-design-review-head { align-items: flex-start; flex-direction: column; padding-right: 50px; }
  .contractor-design-scenes { grid-template-columns: minmax(0, 1fr); }
  .contractor-composer {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 13px;
  }
  .contractor-composer > header { padding: 13px; }
  .contractor-composer-body { padding: 9px; }
  .contractor-composer-contractors { grid-template-columns: minmax(0, 1fr); }
  .contractor-engagement-options { grid-template-columns: minmax(0, 1fr); }
  .contractor-composer > footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .contractor-composer > footer > span { grid-column: 1 / -1; }
  .contractor-composer > footer button { width: 100%; }
  .contractor-quote-workflow > header { flex-wrap: wrap; }
  .contractor-quote-workflow-actions { justify-content: stretch; }
  .contractor-quote-workflow-actions > :is(span, p) { width: 100%; margin-right: 0; }
  .contractor-quote-workflow-actions button { flex: 1 1 150px; }
}

@media (max-width: 520px) {
  .contractor-workspace-title h1 { font-size: 1.5rem; }
  .contractor-workspace-title p { font-size: 0.76rem; }
  .contractor-overview-metrics,
  .contractor-detail-summary,
  .contractor-shared-project,
  .contractor-pipeline,
  .contractor-quote-comparison,
  .contractor-network-filters,
  .contractor-profile-facts,
  .contractor-network-rates > div,
  .contractor-recipient-statuses,
  .contractor-quote-grid.four,
  .contractor-quote-grid.two,
  .contractor-profile-edit-grid,
  .contractor-composer-fields.three,
  .contractor-privacy-grid,
  .contractor-contractor-search-controls {
    grid-template-columns: minmax(0, 1fr);
  }
  .contractor-network-filters .wide,
  .contractor-profile-edit-grid .wide { grid-column: auto; }
  .contractor-rate-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .contractor-rate-row > strong { grid-column: 1 / -1; }
  .contractor-message-form {
    grid-template-columns: minmax(0, 1fr);
  }
  .contractor-message-form button { width: 100%; }
  .contractor-message-list > article { width: 96%; }
  .contractor-network-detail > header { flex-direction: column; }
  .contractor-network-actions { justify-content: stretch; }
  .contractor-network-actions button { width: 100%; }
  .contractor-scope-table { min-width: 640px; }
  .contractor-tender-detail,
  .contractor-network-detail,
  .contractor-company-profile,
  .contractor-messages-workspace { padding: 11px; }
  .contractor-composer > footer {
    grid-template-columns: minmax(0, 1fr);
  }
  .contractor-composer > footer > span { grid-column: auto; }
  .contractor-line-picker > label {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .contractor-line-picker label em {
    grid-column: 2;
    justify-self: start;
  }
  .contractor-design-layer-schedule > div:last-child,
  .contractor-design-comment-form { grid-template-columns: minmax(0, 1fr); }
  .contractor-design-comment-form .wide { grid-column: auto; }
  .contractor-design-review-callout { align-items: stretch; flex-direction: column; }
  .contractor-design-review-callout button { width: 100%; }
  .contractor-delivery-timeline { grid-template-columns: minmax(0, 1fr); }
  .contractor-delivery-timeline > * {
    min-height: 50px;
    padding: 9px 9px 9px 35px;
  }
  .contractor-delivery-timeline > *::before {
    top: 12px;
    left: 8px;
  }
  .contractor-delivery-timeline > *:not(:last-child)::after {
    top: 25px;
    bottom: -12px;
    left: 15px;
    width: 2px;
    height: auto;
  }
  .contractor-quote-workflow-actions button { flex-basis: 100%; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .contractor-workspace *,
  .contractor-modal-layer *,
  .contractor-design-modal * {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}


@media (prefers-contrast: more) {
  .contractor-workspace,
  .contractor-modal-layer,
  .contractor-design-modal {
    --contractor-line: rgba(15, 39, 71, 0.48);
  }
  .contractor-workspace :is(input, select, textarea),
  .contractor-composer :is(input, select, textarea),
  .contractor-tender-card,
  .contractor-network-card {
    border-width: 2px;
  }
}

/* Account Intelligence layout is declared after the legacy dashboard layer so
   the five truthful KPIs and twelve-column overview cannot be reduced to the
   older four/three-column templates at wide desktop sizes. */
.dashboard-account-intelligence .dashboard-account-intelligence-metrics,
.dashboard-account-intelligence .dashboard-account-intelligence-kpis {
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

.dashboard-account-intelligence .dashboard-account-intelligence-overview-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.dashboard-account-intelligence .dashboard-account-intelligence-insight-card,
.dashboard-account-intelligence .dashboard-account-intelligence-organisation-card,
.dashboard-account-intelligence .dashboard-account-commercial-card {
  grid-column: span 4;
}

.dashboard-account-intelligence .dashboard-account-intelligence-declared-card {
  grid-column: span 5;
}

.dashboard-account-intelligence .dashboard-account-intelligence-project-card {
  grid-column: span 7;
}

@media (max-width: 1200px) {
  .dashboard-account-intelligence .dashboard-account-intelligence-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-account-intelligence :is(
    .dashboard-account-intelligence-insight-card,
    .dashboard-account-intelligence-organisation-card,
    .dashboard-account-commercial-card,
    .dashboard-account-intelligence-declared-card
  ) {
    grid-column: auto;
  }

  .dashboard-account-intelligence .dashboard-account-intelligence-project-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .dashboard-account-intelligence .dashboard-account-intelligence-overview-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-account-intelligence .dashboard-account-intelligence-project-card {
    grid-column: auto;
  }
}

html[data-theme="dark"] :is(
  .dashboard-account-intelligence-insight-card > header span,
  .dashboard-account-intelligence-organisation-card > header span,
  .dashboard-account-product-copy > span,
  .dashboard-account-intelligence-identity > div > span,
  .dashboard-account-intelligence-hero-actions > span,
  .dashboard-account-commercial-card > header > div > span,
  .dashboard-account-company-facts > header span,
  .dashboard-account-intelligence-mix-card > header span,
  .dashboard-account-intelligence-section-head span,
  .dashboard-account-intelligence-location-card > span,
  .dashboard-account-relationship-map > header > div > span,
  .dashboard-account-relationship-group > header > div > span
) {
  color: #93c5fd;
  font-size: 0.72rem;
}

.dashboard-account-intelligence :is(
  .dashboard-account-product-facts dt,
  .dashboard-account-commercial-metrics small,
  .dashboard-account-insight-grid small,
  .dashboard-account-team-summary small,
  .dashboard-account-intelligence-kpis small,
  .dashboard-account-intelligence-section-head > small
) {
  font-size: 0.75rem;
  line-height: 1.3;
}

.dashboard-account-intelligence .dashboard-account-intelligence-section-head > small {
  min-width: 0;
  white-space: normal;
  text-align: right;
}

html[data-theme="dark"] .dashboard-account-commercial-metrics small {
  color: #cbd5e1;
}

.dashboard-account-intelligence :is(
  .dashboard-account-intelligence-section-head span,
  .dashboard-account-intelligence-location-card > span,
  .dashboard-account-product-copy > span,
  .dashboard-account-intelligence-insight-card > header span,
  .dashboard-account-intelligence-organisation-card > header span,
  .dashboard-account-commercial-card > header > div > span,
  .dashboard-account-company-facts > header span,
  .dashboard-account-intelligence-mix-card > header span
) {
  font-size: 0.75rem;
  line-height: 1.3;
}

.dashboard-account-intelligence .dashboard-account-product-copy p {
  font-size: 0.75rem;
}

.dashboard-account-intelligence .dashboard-account-product-copy code {
  font-size: 0.7rem;
}

.dashboard-account-intelligence .dashboard-account-product-more {
  grid-column: 1 / -1;
  min-width: 0;
  padding: 0.55rem;
  border: 1px solid rgba(147, 197, 253, 0.72);
  border-radius: 0.85rem;
  background: rgba(239, 246, 255, 0.72);
}

.dashboard-account-intelligence .dashboard-account-product-more > summary {
  cursor: pointer;
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.35;
}

.dashboard-account-intelligence .dashboard-account-product-more > .dashboard-account-product-list {
  margin-top: 0.65rem;
}

html[data-theme="dark"] .dashboard-account-intelligence .dashboard-account-product-more {
  border-color: rgba(147, 197, 253, 0.3);
  background: rgba(30, 41, 59, 0.72);
}

html[data-theme="dark"] .dashboard-account-intelligence .dashboard-account-product-more > summary {
  color: #93c5fd;
}

/* Account Intelligence: catalogue-led products and setup-derived company facts. */
.dashboard-account-intelligence-metrics {
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

.dashboard-account-intelligence-metrics > span {
  min-height: 5.4rem;
}

.dashboard-account-intelligence-metrics > span.team > i {
  background: #ecfccb;
  color: #4d7c0f;
}

.dashboard-account-intelligence-overview-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.dashboard-account-intelligence-overview-grid > :is(
  .dashboard-account-intelligence-insight-card,
  .dashboard-account-intelligence-organisation-card,
  .dashboard-account-commercial-card
) {
  grid-column: span 4;
}

.dashboard-account-intelligence-overview-grid > .dashboard-account-intelligence-declared-card {
  grid-column: span 5;
}

.dashboard-account-intelligence-overview-grid > .dashboard-account-intelligence-project-card {
  grid-column: span 7;
}

.dashboard-account-intelligence-insight-card,
.dashboard-account-intelligence-organisation-card {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 0.72rem;
  padding: 0.95rem;
  border: 1px solid #dbeafe;
  border-radius: 1.05rem;
  background: rgba(248, 250, 252, 0.82);
}

.dashboard-account-intelligence-insight-card > header,
.dashboard-account-intelligence-organisation-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.dashboard-account-intelligence-insight-card > header span,
.dashboard-account-intelligence-organisation-card > header span {
  color: #2563eb;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-account-intelligence-insight-card > header h3,
.dashboard-account-intelligence-organisation-card > header h3 {
  margin-top: 0.12rem;
  font-size: 1rem;
}

.dashboard-account-intelligence-insight-card > header em,
.dashboard-account-intelligence-organisation-card > header em {
  flex: 0 0 auto;
  padding: 0.24rem 0.4rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 0.59rem;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.dashboard-account-insight-grid,
.dashboard-account-team-summary {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.dashboard-account-insight-grid > span,
.dashboard-account-team-summary > span {
  min-width: 0;
  display: grid;
  gap: 0.14rem;
  padding: 0.58rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.72rem;
  background: rgba(255, 255, 255, 0.72);
}

.dashboard-account-insight-grid small,
.dashboard-account-team-summary small {
  color: #64748b;
  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.dashboard-account-insight-grid strong,
.dashboard-account-team-summary strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-account-intelligence-insight-card > p,
.dashboard-account-organisation-note {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  margin: 0;
  color: #64748b;
  font-size: 0.65rem;
  font-weight: 650;
  line-height: 1.45;
}

.dashboard-account-intelligence-insight-card > p svg {
  flex: 0 0 0.85rem;
  width: 0.85rem;
  margin-top: 0.08rem;
  color: #2563eb;
}

.dashboard-account-organisation-company {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
  padding: 0.68rem;
  border: 1px solid #bfdbfe;
  border-radius: 0.82rem;
  background: linear-gradient(145deg, #eff6ff, #fff);
}

.dashboard-account-organisation-company > i {
  display: grid;
  width: 2.1rem;
  height: 2.1rem;
  place-items: center;
  border-radius: 0.65rem;
  background: #dbeafe;
  color: #2563eb;
}

.dashboard-account-organisation-company > i svg {
  width: 1rem;
}

.dashboard-account-organisation-company > span {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
}

.dashboard-account-organisation-company strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-account-organisation-company small {
  color: #64748b;
  font-size: 0.65rem;
  font-weight: 700;
}

.dashboard-account-product-kpis {
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
}

.dashboard-account-product-list {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.dashboard-account-product-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 5.25rem minmax(0, 1fr) minmax(7.5rem, 10rem);
  align-items: start;
  gap: 0.72rem;
  padding: 0.78rem;
  border: 1px solid #dbeafe;
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.dashboard-account-product-card.unmatched {
  border-style: dashed;
}

.dashboard-account-product-image {
  position: relative;
  display: grid;
  width: 5.25rem;
  height: 5.25rem;
  overflow: hidden;
  place-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 0.82rem;
  background: linear-gradient(145deg, #f8fafc, #eef2ff);
}

.dashboard-account-product-image > img {
  z-index: 1;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 0.35rem;
  object-fit: contain;
}

.dashboard-account-product-image-fallback {
  display: grid;
  place-items: center;
  color: #64748b;
}

.dashboard-account-product-image-fallback svg {
  width: 2rem;
}

.dashboard-account-product-copy {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 0.18rem;
}

.dashboard-account-product-copy :is(span, h4, p) {
  min-width: 0;
  overflow-wrap: anywhere;
}

.dashboard-account-product-copy > span {
  color: #2563eb;
  font-size: 0.61rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dashboard-account-product-copy h4 {
  margin: 0;
  color: #0f172a;
  font-size: 0.83rem;
  line-height: 1.3;
}

.dashboard-account-product-copy p {
  margin: 0;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.35;
}

.dashboard-account-product-copy code {
  overflow: hidden;
  max-width: 100%;
  color: #64748b;
  font-size: 0.58rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-account-product-facts {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
  gap: 0.38rem;
  margin: 0;
}

.dashboard-account-product-facts > div {
  min-width: 0;
  display: grid;
  gap: 0.1rem;
  padding: 0.48rem 0.52rem;
  border-radius: 0.62rem;
  background: #f8fafc;
}

.dashboard-account-product-facts dt {
  color: #64748b;
  font-size: 0.55rem;
  font-weight: 850;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.dashboard-account-product-facts dd {
  overflow: hidden;
  margin: 0;
  color: #0f172a;
  font-size: 0.69rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-mini-btn.dashboard-account-product-open {
  grid-column: 3;
  grid-row: 1;
  align-self: start;
  justify-self: stretch;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 2.25rem;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.2;
  text-align: center;
}

.dashboard-account-intelligence-section-head.compact {
  margin-top: 0.35rem;
}

.dashboard-account-intelligence-distribution > header span {
  color: #64748b;
}

html[data-theme="dark"] :is(
  .dashboard-account-intelligence-insight-card,
  .dashboard-account-intelligence-organisation-card,
  .dashboard-account-product-card
) {
  border-color: rgba(234, 234, 236, 0.17);
  background: rgba(27, 28, 32, 0.9);
}

html[data-theme="dark"] :is(
  .dashboard-account-insight-grid > span,
  .dashboard-account-team-summary > span,
  .dashboard-account-product-facts > div
) {
  border-color: rgba(234, 234, 236, 0.14);
  background: rgba(38, 39, 43, 0.9);
}

html[data-theme="dark"] .dashboard-account-organisation-company,
html[data-theme="dark"] .dashboard-account-product-image {
  border-color: rgba(96, 165, 250, 0.25);
  background: rgba(31, 32, 36, 0.92);
}

html[data-theme="dark"] :is(
  .dashboard-account-intelligence-insight-card h3,
  .dashboard-account-intelligence-organisation-card h3,
  .dashboard-account-insight-grid strong,
  .dashboard-account-team-summary strong,
  .dashboard-account-organisation-company strong,
  .dashboard-account-product-copy h4,
  .dashboard-account-product-facts dd
) {
  color: #f8fafc;
}

html[data-theme="dark"] :is(
  .dashboard-account-intelligence-insight-card > p,
  .dashboard-account-organisation-note,
  .dashboard-account-insight-grid small,
  .dashboard-account-team-summary small,
  .dashboard-account-organisation-company small,
  .dashboard-account-product-copy p,
  .dashboard-account-product-copy code,
  .dashboard-account-product-facts dt
) {
  color: #cbd5e1;
}

@media (max-width: 1200px) {
  .dashboard-account-intelligence-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-account-intelligence-overview-grid > :is(
    .dashboard-account-intelligence-insight-card,
    .dashboard-account-intelligence-organisation-card,
    .dashboard-account-commercial-card,
    .dashboard-account-intelligence-declared-card
  ) {
    grid-column: span 1;
  }

  .dashboard-account-intelligence-overview-grid > .dashboard-account-intelligence-project-card {
    grid-column: 1 / -1;
  }

  .dashboard-account-product-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .dashboard-account-intelligence-overview-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-account-intelligence-overview-grid > :is(
    .dashboard-account-intelligence-insight-card,
    .dashboard-account-intelligence-organisation-card,
    .dashboard-account-commercial-card,
    .dashboard-account-intelligence-declared-card,
    .dashboard-account-intelligence-project-card
  ) {
    grid-column: auto;
  }

  .dashboard-account-product-card {
    grid-template-columns: 4.25rem minmax(0, 1fr);
  }

  .dashboard-account-product-image {
    width: 4.25rem;
    height: 4.25rem;
  }

  .settings-mini-btn.dashboard-account-product-open {
    grid-column: 1 / -1;
    grid-row: auto;
    justify-self: stretch;
    width: 100%;
  }

  .dashboard-account-product-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 460px) {
  .dashboard-account-insight-grid,
  .dashboard-account-team-summary,
  .dashboard-account-product-facts {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Rich Account Intelligence workspace */
.dashboard-account-intelligence > .dashboard-account-intelligence-hero {
  position: sticky;
  z-index: 18;
  top: 0;
  margin: calc(clamp(1rem, 2vw, 1.4rem) * -1) calc(clamp(1rem, 2vw, 1.4rem) * -1) 0;
  padding: 1rem clamp(1rem, 2vw, 1.4rem) 0.8rem;
  border-bottom: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 1.25rem 1.25rem 0 0;
  background: color-mix(in srgb, #fff 88%, transparent);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px) saturate(145%);
}

.dashboard-account-intelligence-identity-badges em.partial {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #92400e;
}

.dashboard-account-intelligence-load-state {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.72rem 0.8rem;
  border: 1px solid #bfdbfe;
  border-radius: 0.9rem;
  background: #eff6ff;
  color: #1e3a8a;
}

.dashboard-account-intelligence-load-state.error {
  border-color: #fecaca;
  background: #fff7f7;
  color: #991b1b;
}

.dashboard-account-intelligence-load-state > svg {
  width: 1.1rem;
}

.dashboard-account-intelligence-load-state > div {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
}

.dashboard-account-intelligence-load-state strong {
  font-size: 0.75rem;
}

.dashboard-account-intelligence-load-state small {
  color: inherit;
  font-size: 0.64rem;
  font-weight: 650;
  line-height: 1.4;
}

.dashboard-account-intelligence-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid #bfdbfe;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: dashboard-account-intelligence-spin 700ms linear infinite;
}

@keyframes dashboard-account-intelligence-spin {
  to { transform: rotate(360deg); }
}

.dashboard-account-intelligence-tabs {
  min-width: 0;
  display: flex;
  gap: 0.3rem;
  overflow-x: auto;
  padding: 0.28rem;
  border: 1px solid #dbeafe;
  border-radius: 0.9rem;
  background: rgba(239, 246, 255, 0.72);
  scrollbar-width: thin;
}

.dashboard-account-intelligence-tabs > button {
  flex: 1 0 auto;
  min-width: 6.5rem;
  padding: 0.58rem 0.72rem;
  border: 1px solid transparent;
  border-radius: 0.68rem;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 850;
  cursor: pointer;
}

.dashboard-account-intelligence-tabs > button:hover {
  background: rgba(255, 255, 255, 0.72);
  color: #1d4ed8;
}

.dashboard-account-intelligence-tabs > button[aria-selected="true"] {
  border-color: #bfdbfe;
  background: #fff;
  color: #1d4ed8;
  box-shadow: 0 5px 14px rgba(37, 99, 235, 0.1);
}

.dashboard-account-intelligence-tabs > button:focus-visible,
.dashboard-account-intelligence-tab-panel:focus-visible,
.dashboard-account-intelligence-table-scroll:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.3);
  outline-offset: 2px;
}

.dashboard-account-intelligence-tab-panel {
  min-width: 0;
  display: grid;
  gap: 0.85rem;
  scroll-margin-top: 8rem;
}

.dashboard-account-intelligence-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.dashboard-account-intelligence-section-head > div {
  min-width: 0;
}

.dashboard-account-intelligence-section-head span {
  color: #2563eb;
  font-size: 0.63rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.dashboard-account-intelligence-section-head h3 {
  margin: 0.16rem 0;
  font-size: 1.15rem;
}

.dashboard-account-intelligence-section-head p {
  margin: 0;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 650;
  line-height: 1.45;
}

.dashboard-account-intelligence-section-head > small {
  flex: 0 0 auto;
  padding: 0.32rem 0.5rem;
  border-radius: 99px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 0.61rem;
  font-weight: 800;
}

.dashboard-account-intelligence-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.55rem;
}

.dashboard-account-intelligence-kpis > span {
  min-width: 0;
  display: grid;
  gap: 0.18rem;
  padding: 0.72rem;
  border: 1px solid #dbeafe;
  border-radius: 0.82rem;
  background: rgba(248, 250, 252, 0.82);
}

.dashboard-account-intelligence-kpis small {
  color: #64748b;
  font-size: 0.58rem;
  font-weight: 850;
  text-transform: uppercase;
}

.dashboard-account-intelligence-kpis strong {
  overflow-wrap: anywhere;
  color: #0f172a;
  font-size: 0.88rem;
}

.dashboard-account-intelligence-panel-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.72rem;
}

.dashboard-account-intelligence-panel-grid > :is(figure, section, article) {
  min-width: 0;
  margin: 0;
  padding: 0.85rem;
  border: 1px solid #dbeafe;
  border-radius: 0.9rem;
  background: rgba(248, 250, 252, 0.78);
}

.dashboard-account-intelligence-panel-grid > .dashboard-account-intelligence-distribution {
  padding-top: 0.85rem;
  border-top-color: #dbeafe;
}

.dashboard-account-intelligence-usage-chart {
  display: grid;
  gap: 0.7rem;
}

.dashboard-account-intelligence-usage-chart figcaption {
  display: grid;
  gap: 0.1rem;
}

.dashboard-account-intelligence-usage-chart figcaption strong {
  color: #0f172a;
  font-size: 0.8rem;
}

.dashboard-account-intelligence-usage-chart figcaption span {
  color: #64748b;
  font-size: 0.61rem;
  font-weight: 650;
}

.dashboard-account-intelligence-usage-bars {
  min-height: 9rem;
  display: flex;
  align-items: end;
  gap: clamp(0.18rem, 0.8vw, 0.55rem);
  overflow-x: auto;
  padding: 0.45rem 0.2rem 0;
  border-bottom: 1px solid #cbd5e1;
}

.dashboard-account-intelligence-usage-bars > span {
  flex: 1 0 1.7rem;
  min-width: 1.7rem;
  height: 8.2rem;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.3rem;
}

.dashboard-account-intelligence-usage-bars i {
  width: min(100%, 1.55rem);
  height: var(--usage-height);
  min-height: 0.22rem;
  display: flex;
  flex-direction: column-reverse;
  overflow: hidden;
  justify-self: center;
  border-radius: 0.32rem 0.32rem 0 0;
  background: #dbeafe;
}

.dashboard-account-intelligence-usage-bars i > b {
  flex: var(--usage-share) 1 0;
  min-height: 1px;
  background: #2563eb;
}

.dashboard-account-intelligence-usage-bars i > b.tools { background: #16a34a; }
.dashboard-account-intelligence-usage-bars i > b.products { background: #7c3aed; }
.dashboard-account-intelligence-usage-bars i > b.exports { background: #ea580c; }

.dashboard-account-intelligence-usage-bars i > b + b {
  border-bottom: 1px solid rgba(255, 255, 255, 0.42);
}

.dashboard-account-intelligence-usage-bars small {
  overflow: hidden;
  color: #64748b;
  font-size: 0.48rem;
  font-weight: 700;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-account-intelligence-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dashboard-account-intelligence-chart-legend li {
  display: inline-flex;
  align-items: center;
  gap: 0.24rem;
  color: #64748b;
  font-size: 0.55rem;
  font-weight: 700;
}

.dashboard-account-intelligence-chart-legend li::before {
  width: 0.46rem;
  height: 0.46rem;
  border-radius: 0.14rem;
  background: #2563eb;
  content: "";
}

.dashboard-account-intelligence-chart-legend li.tools::before { background: #16a34a; }
.dashboard-account-intelligence-chart-legend li.products::before { background: #7c3aed; }
.dashboard-account-intelligence-chart-legend li.exports::before { background: #ea580c; }

.dashboard-account-intelligence-table-scroll {
  min-width: 0;
  overflow: auto;
  border: 1px solid #dbeafe;
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.dashboard-account-intelligence-table {
  width: 100%;
  min-width: 52rem;
  border-collapse: collapse;
  color: #334155;
  font-size: 0.66rem;
}

.dashboard-account-intelligence-table caption {
  padding: 0.65rem 0.72rem;
  border-bottom: 1px solid #dbeafe;
  color: #0f172a;
  font-size: 0.72rem;
  font-weight: 850;
  text-align: left;
}

.dashboard-account-intelligence-table :is(th, td) {
  padding: 0.58rem 0.66rem;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.dashboard-account-intelligence-table thead th {
  position: sticky;
  z-index: 1;
  top: 0;
  background: #eff6ff;
  color: #475569;
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.dashboard-account-intelligence-table tbody th {
  color: #0f172a;
  font-weight: 800;
}

.dashboard-account-intelligence-table tbody th > :is(strong, small) {
  display: block;
}

.dashboard-account-intelligence-table tbody th small {
  margin-top: 0.13rem;
  color: #64748b;
  font-size: 0.54rem;
  font-weight: 650;
}

.dashboard-account-intelligence-table tbody tr:last-child > * {
  border-bottom: 0;
}

.dashboard-account-intelligence-table tbody tr:hover {
  background: rgba(239, 246, 255, 0.64);
}

.dashboard-account-intelligence-panel-empty {
  min-height: 7rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.72rem;
  padding: 1rem;
  border: 1px dashed #93c5fd;
  border-radius: 0.95rem;
  background: rgba(248, 250, 252, 0.82);
}

.dashboard-account-intelligence-panel-empty.locked {
  border-color: #cbd5e1;
  background: rgba(241, 245, 249, 0.8);
}

.dashboard-account-intelligence-panel-empty > span {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: #dbeafe;
  color: #2563eb;
}

.dashboard-account-intelligence-panel-empty > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.dashboard-account-intelligence-panel-empty :is(strong, p) {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.dashboard-account-intelligence-panel-empty.locked > span {
  background: #e2e8f0;
  color: #64748b;
}

.dashboard-account-intelligence-panel-empty svg {
  width: 1.2rem;
}

.dashboard-account-intelligence-panel-empty strong {
  color: #0f172a;
  font-size: 0.78rem;
}

.dashboard-account-intelligence-panel-empty p {
  margin: 0.2rem 0 0;
  color: #64748b;
  font-size: 0.65rem;
  font-weight: 650;
  line-height: 1.45;
}

.dashboard-account-intelligence-location-card {
  display: grid;
  align-content: center;
  gap: 0.24rem;
}

.dashboard-account-intelligence-location-card > span {
  color: #2563eb;
  font-size: 0.58rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-account-intelligence-location-card h4 {
  margin: 0;
  color: #0f172a;
  font-size: 0.94rem;
}

.dashboard-account-intelligence-location-card p {
  margin: 0;
  color: #64748b;
  font-size: 0.67rem;
  font-weight: 650;
  line-height: 1.45;
}

.dashboard-account-intelligence-profile.compact {
  gap: 0.55rem;
}

.dashboard-account-intelligence-profile.compact .dashboard-account-intelligence-fields {
  gap: 0.42rem;
}

.dashboard-account-intelligence-profile.compact .dashboard-account-intelligence-fields label {
  gap: 0.22rem;
}

.dashboard-account-intelligence-profile.compact .dashboard-account-intelligence-fields :is(input, select) {
  min-height: 2.35rem;
  padding: 0.48rem 0.55rem;
}

.dashboard-account-intelligence-project-card {
  grid-column: 1 / span 2;
}

html[data-theme="dark"] .dashboard-account-intelligence > .dashboard-account-intelligence-hero {
  border-bottom-color: rgba(96, 165, 250, 0.24);
  background: color-mix(in srgb, #111827 90%, transparent);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .dashboard-account-intelligence-tabs,
html[data-theme="dark"] :is(
  .dashboard-account-intelligence-kpis > span,
  .dashboard-account-intelligence-panel-grid > figure,
  .dashboard-account-intelligence-panel-grid > section,
  .dashboard-account-intelligence-panel-grid > article,
  .dashboard-account-intelligence-table-scroll,
  .dashboard-account-intelligence-panel-empty
) {
  border-color: #334155;
  background: rgba(17, 24, 39, 0.82);
}

html[data-theme="dark"] .dashboard-account-intelligence-tabs > button {
  color: #cbd5e1;
}

html[data-theme="dark"] .dashboard-account-intelligence-tabs > button:hover {
  background: rgba(30, 41, 59, 0.8);
  color: #bfdbfe;
}

html[data-theme="dark"] .dashboard-account-intelligence-tabs > button[aria-selected="true"] {
  border-color: #475569;
  background: #1e293b;
  color: #bfdbfe;
}

html[data-theme="dark"] :is(
  .dashboard-account-intelligence-section-head h3,
  .dashboard-account-intelligence-kpis strong,
  .dashboard-account-intelligence-usage-chart figcaption strong,
  .dashboard-account-intelligence-table caption,
  .dashboard-account-intelligence-table tbody th,
  .dashboard-account-intelligence-panel-empty strong,
  .dashboard-account-intelligence-location-card h4
) {
  color: #f8fafc;
}

html[data-theme="dark"] :is(
  .dashboard-account-intelligence-section-head p,
  .dashboard-account-intelligence-kpis small,
  .dashboard-account-intelligence-usage-chart figcaption span,
  .dashboard-account-intelligence-chart-legend li,
  .dashboard-account-intelligence-panel-empty p,
  .dashboard-account-intelligence-location-card p,
  .dashboard-account-intelligence-table tbody th small
) {
  color: #cbd5e1;
}

html[data-theme="dark"] .dashboard-account-intelligence-table {
  color: #e2e8f0;
}

html[data-theme="dark"] .dashboard-account-intelligence-table :is(th, td),
html[data-theme="dark"] .dashboard-account-intelligence-table caption {
  border-color: #334155;
}

html[data-theme="dark"] .dashboard-account-intelligence-table thead th {
  background: #1e293b;
  color: #cbd5e1;
}

html[data-theme="dark"] .dashboard-account-intelligence-table tbody tr:hover {
  background: rgba(30, 64, 175, 0.16);
}

html[data-theme="dark"] .dashboard-account-intelligence-load-state {
  border-color: rgba(96, 165, 250, 0.35);
  background: rgba(30, 64, 175, 0.22);
  color: #bfdbfe;
}

html[data-theme="dark"] .dashboard-account-intelligence-load-state.error {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(127, 29, 29, 0.28);
  color: #fecaca;
}

html[data-theme="dark"] .dashboard-account-intelligence-identity-badges em.partial {
  border-color: rgba(251, 191, 36, 0.42);
  background: rgba(120, 53, 15, 0.34);
  color: #fde68a;
}

@media (max-width: 900px) {
  .dashboard-account-intelligence > .dashboard-account-intelligence-hero,
  .dashboard-account-intelligence-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-account-intelligence-panel-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-account-intelligence-project-card {
    grid-column: auto;
  }
}

@media (max-width: 620px) {
  .dashboard-account-intelligence > .dashboard-account-intelligence-hero {
    position: sticky;
  }

  .dashboard-account-intelligence-tabs > button {
    flex-basis: auto;
    min-width: 5.8rem;
  }

  .dashboard-account-intelligence-load-state {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .dashboard-account-intelligence-load-state > button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .dashboard-account-intelligence-panel-empty {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-account-intelligence-spinner {
    animation: none;
  }
}

.dashboard-app-icon-distributor {
  background: linear-gradient(135deg, #3155ff 0%, #7c3aed 52%, #0891b2 100%);
}

.dashboard-distributor-workspace {
  gap: 18px;
}

.dashboard-distributor-select {
  display: grid;
  gap: 5px;
  min-width: 240px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.dashboard-distributor-select select,
.dashboard-distributor-form select,
.dashboard-distributor-form input,
.dashboard-distributor-form textarea,
.dashboard-distributor-status-select select,
.dashboard-distributor-line-row input {
  min-height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 9px 11px;
  font: inherit;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55);
}

.dashboard-distributor-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-distributor-metric-card small {
  display: block;
  margin-top: 3px;
}

.dashboard-distributor-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.dashboard-distributor-tab {
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  padding: 10px 14px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.dashboard-distributor-tab.active {
  border-color: rgba(37, 99, 235, 0.42);
  background: rgba(37, 99, 235, 0.1);
  color: var(--blue);
}

.dashboard-distributor-quotes-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(440px, 1.35fr);
  gap: 14px;
  align-items: start;
}

.dashboard-distributor-panel,
.dashboard-distributor-quote-detail {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.dashboard-distributor-quote-detail {
  padding: 16px;
}

.dashboard-distributor-table,
.dashboard-distributor-line-table {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
}

.dashboard-distributor-table-head,
.dashboard-distributor-row,
.dashboard-distributor-line-head,
.dashboard-distributor-line-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.45fr 0.58fr 0.58fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  color: var(--muted);
  font-weight: 800;
}

.dashboard-distributor-table.compact .dashboard-distributor-table-head,
.dashboard-distributor-table.compact .dashboard-distributor-row {
  grid-template-columns: 0.7fr 1.45fr 0.6fr 0.6fr 0.65fr;
}

.dashboard-distributor-table-head,
.dashboard-distributor-line-head {
  background: rgba(15, 23, 42, 0.04);
  text-transform: uppercase;
  font-size: 0.72rem;
}

.dashboard-distributor-row {
  width: 100%;
  border-inline: 0;
  border-top: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.dashboard-distributor-row.static {
  cursor: default;
}

.dashboard-distributor-row.active,
.dashboard-distributor-row:hover:not(.static) {
  background: rgba(37, 99, 235, 0.08);
}

.dashboard-distributor-row strong,
.dashboard-distributor-line-row strong,
.dashboard-distributor-quote-detail h3 {
  color: var(--text);
}

.dashboard-distributor-row em {
  font-style: normal;
  color: var(--blue);
}

.dashboard-distributor-quote-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 14px;
}

.dashboard-distributor-status-select,
.dashboard-distributor-form label,
.dashboard-distributor-line-row label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-distributor-quote-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.dashboard-distributor-line-head,
.dashboard-distributor-line-row {
  grid-template-columns: minmax(190px, 1.4fr) 0.75fr 0.35fr 0.55fr 0.65fr;
}

.dashboard-distributor-line-row small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.dashboard-distributor-line-row .pricing-portal-price-basis {
  display: inline-flex;
  margin-top: 4px;
}

.dashboard-distributor-panel-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.dashboard-distributor-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 12px;
  margin-bottom: 14px;
}

.dashboard-distributor-form .wide {
  grid-column: span 2;
}

.dashboard-distributor-installation-options {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.64);
}

.dashboard-distributor-installation-options legend {
  padding: 0 5px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.dashboard-distributor-installation-options label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 8px 10px;
  font-size: 0.82rem;
  font-weight: 900;
}

.dashboard-distributor-installation-options input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 0;
  flex: 0 0 18px;
  padding: 0;
  accent-color: var(--blue);
  box-shadow: none;
}

.dashboard-distributor-form button {
  align-self: end;
  min-height: 42px;
}

.dashboard-distributor-panel .dashboard-distributor-form {
  padding-top: 2px;
}

.dashboard-distributor-panel .dashboard-distributor-form + .dashboard-distributor-form {
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.dashboard-distributor-form input[type="file"] {
  min-height: 42px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.74);
}

.dashboard-distributor-form .primary-mini {
  justify-self: end;
  min-width: 156px;
  border-radius: 8px;
  padding-inline: 16px;
}

.dashboard-distributor-request-list,
.dashboard-distributor-chip-list {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.dashboard-distributor-request-list article,
.dashboard-distributor-chip-list span {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.78);
  padding: 9px 11px;
  color: var(--muted);
  font-weight: 800;
}

.dashboard-distributor-request-list input {
  width: 76px;
}

.dashboard-distributor-request-list button {
  border: 1px solid rgba(37, 99, 235, 0.28);
  border-radius: 7px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--blue);
  font-weight: 900;
  padding: 7px 10px;
}

.dashboard-distributor-profile-preview {
  display: grid;
  grid-template-columns: minmax(210px, 0.36fr) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.72);
}

.dashboard-distributor-profile-cover {
  min-height: 126px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(37,99,235,0.15), rgba(124,58,237,0.14));
  background-size: cover;
  background-position: center;
}

.dashboard-distributor-profile-preview > div:last-child {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: center;
  align-items: center;
  gap: 5px 10px;
  min-width: 0;
  color: var(--muted);
  font-weight: 800;
}

.dashboard-distributor-profile-preview strong {
  min-width: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.12;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-distributor-profile-preview > div:last-child > span:not(.dashboard-distributor-profile-logo),
.dashboard-distributor-profile-preview > div:last-child > small {
  grid-column: 2;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.28;
  text-overflow: ellipsis;
}

.dashboard-distributor-profile-preview > div:last-child > span:not(.dashboard-distributor-profile-logo) {
  display: -webkit-box;
  white-space: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.dashboard-distributor-profile-preview > div:last-child > small {
  white-space: nowrap;
}

.dashboard-distributor-profile-rating-row {
  white-space: normal !important;
}

.dashboard-distributor-profile-logo,
.pricing-portal-distributor-logo {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(37,99,235,0.12), rgba(124,58,237,0.10));
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 950;
  overflow: hidden;
}

.distributor-logo-fallback,
.dashboard-distributor-profile-logo img,
.pricing-portal-distributor-logo img {
  grid-area: 1 / 1;
}

.distributor-logo-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.dashboard-distributor-profile-logo.has-image .distributor-logo-fallback,
.pricing-portal-distributor-logo.has-image .distributor-logo-fallback {
  opacity: 0;
}

.dashboard-distributor-profile-logo.image-failed .distributor-logo-fallback,
.pricing-portal-distributor-logo.image-failed .distributor-logo-fallback {
  opacity: 1;
}

.dashboard-distributor-profile-preview .dashboard-distributor-profile-logo {
  grid-row: 1 / span 4;
  align-self: start;
}

.dashboard-distributor-profile-logo img,
.pricing-portal-distributor-logo img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.dashboard-distributor-profile-logo img[hidden],
.pricing-portal-distributor-logo img[hidden],
.pricing-portal-distributor-profile-cover > img[hidden] {
  display: none;
}

.dashboard-distributor-branch-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.dashboard-distributor-branch-list article {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  background: var(--surface);
  padding: 12px;
  color: var(--muted);
  font-weight: 800;
}

.dashboard-distributor-branch-list strong {
  color: var(--text);
}

.pricing-portal-distributor-support {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 7px;
  min-height: 48px;
  margin: 0;
  padding: 8px 10px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--glass-edge), 0 8px 24px rgba(15, 23, 42, 0.06);
}

.pricing-portal-distributor-support-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.pricing-portal-distributor-support-head > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.pricing-portal-distributor-support-head span,
.pricing-portal-distributor-picker-head span {
  color: var(--blue);
  font-size: 0.64rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.pricing-portal-distributor-support-head strong,
.pricing-portal-distributor-picker-head strong {
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 900;
  line-height: 1.05;
}

.pricing-portal-distributor-support-head small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pricing-portal-distributor-picker-head small {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.18;
}

.pricing-portal-distributor-support-head > div:last-child,
.pricing-portal-distributor-actions {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  min-width: 0;
}

.pricing-portal-distributor-actions {
  position: sticky;
  bottom: -14px;
  z-index: 2;
  align-items: center;
  border-top: 1px solid rgba(148, 163, 184, 0.20);
  background: color-mix(in srgb, var(--surface-solid) 92%, transparent);
  padding: 12px 0 0;
  backdrop-filter: blur(10px);
}

.pricing-portal-distributor-actions .pricing-portal-distributor-selected-count {
  margin-right: auto;
}

.pricing-portal-distributor-support button,
.pricing-portal-distributor-actions button {
  min-height: 32px;
  max-width: 190px;
  overflow: hidden;
  border: 1px solid rgba(37, 99, 235, 0.28);
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--blue);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 6px 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.pricing-portal-distributor-request-modal {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: 24px;
}

.pricing-portal-distributor-request-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  border-radius: 0;
  background: rgba(15, 23, 42, 0.32);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.pricing-portal-distributor-picker {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 12px;
  font-size: 0.86rem;
  width: min(1120px, calc(100vw - 48px));
  max-height: min(860px, calc(100vh - 48px));
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  border: 1px solid rgba(148, 163, 184, 0.30);
  border-radius: 16px;
  background:
    radial-gradient(circle at 12% 0%, rgba(37, 99, 235, 0.10), transparent 34%),
    var(--surface-solid);
  box-shadow: 0 24px 72px rgba(15, 23, 42, 0.26), var(--glass-edge);
  padding: 14px;
}

.pricing-portal-distributor-picker-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.pricing-portal-distributor-picker-head > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.pricing-portal-distributor-picker-head button {
  width: 34px;
  height: 34px;
  padding: 0;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.pricing-portal-distributor-picker-head button:hover {
  border-color: rgba(37, 99, 235, 0.34);
  background: rgba(37, 99, 235, 0.08);
  transform: translateY(-1px);
}

.pricing-portal-distributor-search {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

.pricing-portal-distributor-search input {
  min-height: 38px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  padding: 8px 11px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.46);
}

.pricing-portal-distributor-map {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(240px, 1.1fr);
  gap: 12px;
  align-items: stretch;
}

.pricing-portal-distributor-map-stage {
  position: relative;
  min-height: 210px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(148,163,184,0.10) 1px, transparent 1px),
    linear-gradient(0deg, rgba(148,163,184,0.10) 1px, transparent 1px),
    radial-gradient(circle at center, rgba(37,99,235,0.12), rgba(255,255,255,0.54));
  background-size: 34px 34px, 34px 34px, auto;
  overflow: hidden;
}

.pricing-portal-distributor-map-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px dashed rgba(37, 99, 235, 0.22);
  border-radius: 999px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.pricing-portal-distributor-map-ring.ring-inner {
  width: 86px;
  height: 86px;
}

.pricing-portal-distributor-map-ring.ring-middle {
  width: 148px;
  height: 148px;
}

.pricing-portal-distributor-map-ring.ring-outer {
  width: 204px;
  height: 204px;
}

.pricing-portal-distributor-map-user,
.pricing-portal-distributor-map-point {
  position: absolute;
  z-index: 1;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.pricing-portal-distributor-map-user {
  display: grid;
  place-items: center;
  min-width: 82px;
  min-height: 48px;
  border: 2px solid rgba(37, 99, 235, 0.58);
  background: linear-gradient(135deg, #ffffff, #eff6ff);
  color: #172554;
  font-size: 0.76rem;
  font-weight: 950;
  line-height: 1.05;
  padding: 7px 10px;
  text-align: center;
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.25), 0 0 0 7px rgba(37, 99, 235, 0.13);
}

.pricing-portal-distributor-map-user small {
  display: block;
  margin-top: 3px;
  color: #2563eb;
  font-size: 0.58rem;
  font-weight: 950;
  letter-spacing: 0.01em;
}

.pricing-portal-distributor-map-user-project {
  z-index: 5 !important;
  border-color: rgba(37, 99, 235, 0.68);
  background: linear-gradient(135deg, #ffffff, #dbeafe);
}

.pricing-portal-distributor-map-user-company {
  z-index: 4 !important;
  border-color: rgba(15, 23, 42, 0.42);
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  color: #111827;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.16), 0 0 0 7px rgba(15, 23, 42, 0.10);
}

.pricing-portal-distributor-map-user-company small {
  color: #475569;
}

.pricing-portal-distributor-map-point {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(37, 99, 235, 0.32);
  background: linear-gradient(135deg, #eff6ff, #eef2ff);
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 950;
}

.pricing-portal-distributor-map-list {
  display: grid;
  gap: 8px;
  align-content: start;
}

.pricing-portal-distributor-map-list span {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 9px;
  background: var(--surface);
  padding: 8px 10px;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.15;
}

.pricing-portal-distributor-map-list b {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.10);
  color: var(--blue);
}

.pricing-portal-distributor-map-list small,
.pricing-portal-distributor-map-list em {
  color: var(--muted);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 800;
}

.pricing-portal-distributor-list,
.pricing-portal-returned-quotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.pricing-portal-distributor-support > .pricing-portal-returned-quotes {
  max-height: 156px;
  overflow-y: auto;
  padding-right: 3px;
}

.pricing-portal-distributor-support > .pricing-portal-returned-quotes {
  grid-template-columns: 1fr;
}

.pricing-portal-quote-status-list {
  grid-template-columns: 1fr;
}

.pricing-portal-quotes-panel {
  display: grid;
  gap: 9px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(248, 250, 252, 0.66));
  padding: 10px;
  box-shadow: var(--glass-edge), 0 10px 28px rgba(15, 23, 42, 0.06);
}

.pricing-portal-quotes-panel.collapsed {
  gap: 0;
}

.pricing-portal-quotes-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.pricing-portal-quotes-panel-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.pricing-portal-quotes-panel-title span {
  color: var(--blue);
  font-size: 0.68rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.pricing-portal-quotes-panel-title strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pricing-portal-quotes-panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.pricing-portal-quote-filter {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  background: rgba(226, 232, 240, 0.42);
  padding: 3px;
}

.pricing-portal-quote-filter button,
.pricing-portal-quotes-collapse {
  min-height: 30px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1;
  padding: 6px 9px;
  cursor: pointer;
}

.pricing-portal-quote-filter button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.pricing-portal-quote-filter button span {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.13);
  color: currentColor;
  font-size: 0.64rem;
  font-weight: 950;
}

.pricing-portal-quote-filter button.active {
  border-color: rgba(37, 99, 235, 0.28);
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.16);
}

.pricing-portal-quotes-collapse {
  border-color: rgba(37, 99, 235, 0.22);
  background: rgba(37, 99, 235, 0.08);
  color: var(--blue);
  white-space: nowrap;
}

.pricing-portal-quotes-collapse:hover,
.pricing-portal-quote-filter button:hover {
  border-color: rgba(37, 99, 235, 0.34);
  background: rgba(37, 99, 235, 0.12);
  color: var(--blue);
}

.pricing-portal-quote-filter button.active:hover {
  background: var(--blue-hover);
  color: #fff;
}

.pricing-portal-quotes-panel .pricing-portal-returned-quotes {
  margin-top: 0;
}

.pricing-portal-distributor-list {
  align-content: start;
  min-height: 0;
  max-height: clamp(180px, calc(100vh - 520px), 340px);
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
}

.pricing-portal-distributor-option,
.pricing-portal-returned-quotes article {
  display: grid;
  gap: 9px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  background: var(--surface);
  padding: 10px;
}

.pricing-portal-quote-status-card {
  display: grid;
  grid-template-columns: minmax(112px, 0.5fr) minmax(180px, 1fr) minmax(148px, 0.82fr) minmax(190px, 1fr);
  gap: 8px 12px;
  align-items: center;
  width: 100%;
  min-height: 94px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-left: 5px solid rgba(37, 99, 235, 0.58);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  padding: 9px 11px;
  text-align: left;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.pricing-portal-quote-status-card:hover {
  border-color: rgba(37, 99, 235, 0.34);
  background: linear-gradient(145deg, rgba(239, 246, 255, 0.84), var(--surface));
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.pricing-portal-quote-status-card.received,
.pricing-portal-quote-status-card.accepted {
  border-left-color: rgba(34, 197, 94, 0.8);
}

.pricing-portal-quote-status-card.declined {
  border-left-color: rgba(244, 63, 94, 0.78);
}

.pricing-portal-quote-status-card.support {
  border-left-color: rgba(139, 92, 246, 0.78);
}

.pricing-portal-quote-status-card > span {
  color: var(--blue);
  font-size: 0.68rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.pricing-portal-quote-status-card.received > span,
.pricing-portal-quote-status-card.accepted > span {
  color: #15803d;
}

.pricing-portal-quote-status-card.declined > span {
  color: #be123c;
}

.pricing-portal-quote-status-card.support > span {
  color: #7c3aed;
}

.pricing-portal-quote-status-card strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 950;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pricing-portal-quote-status-card small,
.pricing-portal-quote-status-card em {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pricing-portal-quote-status-card dl {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(118px, 1fr));
  gap: 8px;
  margin: 0;
}

.pricing-portal-quote-status-card dl div {
  display: grid;
  gap: 1px;
  min-width: 0;
  align-content: center;
  border: 1px solid rgba(148, 163, 184, 0.20);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.68);
  padding: 7px 10px;
}

.pricing-portal-quote-status-card dt {
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.pricing-portal-quote-status-card dd {
  margin: 0;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1.05;
}

.pricing-portal-distributor-option {
  align-items: stretch;
}

.pricing-portal-distributor-choice {
  display: grid;
  grid-template-columns: 18px auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: start;
  cursor: pointer;
}

.pricing-portal-distributor-choice > input {
  width: 16px;
  height: 16px;
  margin-top: 14px;
}

.pricing-portal-distributor-option.selected {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.pricing-portal-distributor-choice-text,
.pricing-portal-returned-quotes article {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.22;
}

.pricing-portal-distributor-choice-text strong,
.pricing-portal-returned-quotes strong {
  display: block;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 900;
  line-height: 1.1;
}

.pricing-portal-distributor-choice-text em,
.pricing-portal-distributor-choice-text small {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.22;
}

.distributor-star-ratings {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 9px;
  align-items: center;
  min-width: 0;
}

.distributor-star-ratings.compact {
  gap: 4px 6px;
}

.distributor-star-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
}

.distributor-star-ratings.compact .distributor-star-rating {
  gap: 3px;
  font-size: 0.68rem;
}

.distributor-star-rating-stars {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  height: 13px;
  color: rgba(148, 163, 184, 0.42);
  font-size: 12px;
  letter-spacing: 0;
  line-height: 13px;
  white-space: nowrap;
}

.distributor-star-rating-star {
  position: relative;
  display: inline-block;
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  overflow: hidden;
}

.distributor-star-rating-star-base,
.distributor-star-rating-star-fill {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
}

.distributor-star-rating-star-base {
  color: rgba(148, 163, 184, 0.42);
}

.distributor-star-rating-star-fill {
  color: #f5b301;
  width: var(--star-fill, 0%);
}

.distributor-star-rating strong {
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 950;
}

.distributor-star-rating em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
  text-transform: lowercase;
}

.distributor-star-rating-card {
  align-content: start;
}

.pricing-portal-distributor-choice-text .pricing-portal-distributor-installation {
  color: #047857;
  font-weight: 950;
}

.pricing-portal-distributor-choice b {
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
}

.pricing-portal-distributor-branch-picker {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(148, 163, 184, 0.20);
  border-radius: 9px;
  background: rgba(248, 250, 252, 0.72);
  padding: 9px;
}

.pricing-portal-distributor-branch-suggestions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 6px;
}

.pricing-portal-distributor-branch-suggestion {
  display: grid;
  gap: 1px;
  min-width: 0;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 8px;
  background: rgba(239, 246, 255, 0.68);
  padding: 7px 8px;
}

.pricing-portal-distributor-branch-suggestion b,
.pricing-portal-distributor-branch-picker label > span {
  color: var(--blue);
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.pricing-portal-distributor-branch-suggestion strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 0.8rem;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pricing-portal-distributor-branch-suggestion small,
.pricing-portal-distributor-branch-picker > small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.25;
}

.pricing-portal-distributor-branch-picker label {
  display: grid;
  gap: 5px;
}

.pricing-portal-distributor-branch-picker select {
  width: 100%;
  min-height: 36px;
  border: 1px solid rgba(148, 163, 184, 0.30);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 900;
  padding: 7px 9px;
}

.pricing-portal-distributor-profile-trigger {
  justify-self: stretch;
  min-height: 32px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 8px;
  background: rgba(239, 246, 255, 0.72);
  color: var(--blue);
  font-size: 0.74rem;
  font-weight: 900;
  padding: 6px 10px;
  cursor: pointer;
}

.pricing-portal-distributor-profile-trigger:hover {
  border-color: rgba(37, 99, 235, 0.42);
  background: rgba(219, 234, 254, 0.86);
}

.pricing-portal-distributor-profile-modal {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: grid;
  place-items: center;
  padding: 22px;
}

.pricing-portal-distributor-profile-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  border-radius: 0;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(14px);
  cursor: pointer;
}

.pricing-portal-distributor-profile-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  width: min(960px, calc(100vw - 44px));
  max-height: min(820px, calc(100vh - 44px));
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.30);
  border-radius: 16px;
  background:
    radial-gradient(circle at 16% 0%, rgba(37, 99, 235, 0.12), transparent 36%),
    var(--surface-solid);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28), var(--glass-edge);
  padding: 14px;
}

.pricing-portal-distributor-profile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.pricing-portal-distributor-profile-head > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.pricing-portal-distributor-profile-head span {
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.pricing-portal-distributor-profile-head strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 1.16rem;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pricing-portal-distributor-profile-head small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
}

.pricing-portal-distributor-profile-head button {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0;
}

.pricing-portal-distributor-profile-popout {
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  padding-top: 8px;
}

.pricing-portal-distributor-profile-popout summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  border: 1px solid rgba(37, 99, 235, 0.20);
  border-radius: 8px;
  background: rgba(239, 246, 255, 0.68);
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 950;
  list-style: none;
  padding: 7px 10px;
  cursor: pointer;
}

.pricing-portal-distributor-profile-popout summary::-webkit-details-marker {
  display: none;
}

.pricing-portal-distributor-profile-popout summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--blue);
  font-weight: 950;
}

.pricing-portal-distributor-profile-popout[open] summary::after {
  content: "-";
}

.pricing-portal-distributor-profile-card {
  display: grid;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.pricing-portal-distributor-profile-cover {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 96px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 10px;
  background:
    radial-gradient(circle at 16% 20%, rgba(59,130,246,0.32), transparent 28%),
    linear-gradient(135deg, rgba(15,23,42,0.92), rgba(37,99,235,0.58));
}

.pricing-portal-distributor-profile-cover > img,
.pricing-portal-distributor-profile-cover-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.pricing-portal-distributor-profile-cover > img {
  object-fit: cover;
}

.pricing-portal-distributor-profile-cover-fallback {
  background:
    linear-gradient(90deg, rgba(255,255,255,0.12) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.10) 1px, transparent 1px);
  background-size: 32px 32px;
}

.pricing-portal-distributor-profile-cover > div {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.68), transparent);
}

.pricing-portal-distributor-profile-cover > div > span:last-child {
  color: #fff;
  font-weight: 950;
  text-shadow: 0 1px 8px rgba(15, 23, 42, 0.34);
}

.pricing-portal-distributor-profile-cover .pricing-portal-distributor-logo {
  background: #fff;
}

.pricing-portal-distributor-profile-card > p {
  margin: 0;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.4;
}

.pricing-portal-distributor-profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pricing-portal-distributor-profile-links a,
.pricing-portal-distributor-profile-branches a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border: 1px solid rgba(37, 99, 235, 0.26);
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 950;
  padding: 6px 10px;
  text-decoration: none;
}

.pricing-portal-distributor-profile-links a:hover,
.pricing-portal-distributor-profile-branches a:hover {
  border-color: rgba(37, 99, 235, 0.44);
  background: rgba(37, 99, 235, 0.14);
}

.pricing-portal-distributor-profile-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.pricing-portal-distributor-profile-metrics article {
  display: grid;
  gap: 3px;
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 9px;
  background: rgba(248, 250, 252, 0.72);
  padding: 9px;
}

.pricing-portal-distributor-profile-metrics span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 950;
  text-transform: uppercase;
}

.pricing-portal-distributor-profile-metrics strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 950;
  line-height: 1.2;
  text-overflow: ellipsis;
}

.pricing-portal-distributor-profile-map {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.1fr);
  gap: 10px;
  align-items: stretch;
}

.pricing-portal-distributor-real-map {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(148,163,184,0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(148,163,184,0.08) 1px, transparent 1px),
    rgba(239, 246, 255, 0.78);
  background-size: 30px 30px, 30px 30px, auto;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.66);
}

.pricing-portal-tile-map {
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.pricing-portal-tile-map.dragging {
  cursor: grabbing;
}

.pricing-portal-distributor-real-map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  filter: saturate(0.9) contrast(0.98);
  pointer-events: none;
}

.pricing-portal-distributor-real-map::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 44px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(239, 246, 255, 0), #eef6ff 34%, #eef6ff);
}

.pricing-portal-tile-map::after {
  display: none;
}

.pricing-portal-map-tiles,
.pricing-portal-map-markers {
  position: absolute;
  inset: 0;
}

.pricing-portal-map-tiles {
  z-index: 0;
}

.pricing-portal-map-markers {
  z-index: 2;
  pointer-events: none;
}

.pricing-portal-map-tile {
  position: absolute;
  left: 0;
  top: 0;
  width: 256px;
  height: 256px;
  max-width: none;
  user-select: none;
}

.pricing-portal-map-controls {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 4;
  display: inline-flex;
  gap: 5px;
}

.pricing-portal-map-location-key {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 4;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: calc(100% - 118px);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  padding: 5px 7px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.10);
}

.pricing-portal-map-location-key span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text);
  font-size: 0.62rem;
  font-weight: 950;
  line-height: 1;
}

.pricing-portal-map-location-key b {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.pricing-portal-map-location-key b.company {
  background: #111827;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.14);
}

.pricing-portal-map-controls button {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.90);
  color: var(--blue);
  font-size: 1rem;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.10);
}

.pricing-portal-map-controls button:hover {
  border-color: rgba(37, 99, 235, 0.42);
  background: #fff;
}

.pricing-portal-distributor-request-real-map {
  min-height: 230px;
}

.pricing-portal-distributor-real-map .pricing-portal-distributor-map-user,
.pricing-portal-distributor-real-map .pricing-portal-distributor-map-point {
  z-index: 2;
}

.pricing-portal-distributor-map-open,
.pricing-portal-distributor-map-attribution {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 950;
  padding: 5px 9px;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.10);
}

.pricing-portal-distributor-map-open {
  right: 10px;
  top: 10px;
  color: var(--blue);
}

.pricing-portal-distributor-map-open:hover {
  border-color: rgba(37, 99, 235, 0.38);
  background: #fff;
}

.pricing-portal-distributor-map-attribution {
  left: 10px;
  bottom: 7px;
  min-height: 20px;
  padding: 3px 7px;
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.78);
  color: rgba(71, 85, 105, 0.86);
  font-size: 0.58rem;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.pricing-portal-distributor-profile-branches {
  display: grid;
  gap: 8px;
  align-content: start;
  max-height: 250px;
  overflow: auto;
  padding-right: 3px;
}

.pricing-portal-distributor-profile-branches article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 9px;
  background: rgba(248, 250, 252, 0.72);
  padding: 9px;
}

.pricing-portal-distributor-profile-branches b {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(37, 99, 235, 0.10);
  color: var(--blue);
  font-size: 0.78rem;
}

.pricing-portal-distributor-profile-branches div {
  min-width: 0;
}

.pricing-portal-distributor-profile-branches strong,
.pricing-portal-distributor-profile-branches span,
.pricing-portal-distributor-profile-branches small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pricing-portal-distributor-profile-branches strong {
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 950;
}

.pricing-portal-distributor-profile-branches span,
.pricing-portal-distributor-profile-branches small {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 820;
}

html[data-theme="dark"] .pricing-portal-distributor-profile-dialog {
  border-color: rgba(226, 232, 240, 0.18);
  background:
    radial-gradient(circle at 16% 0%, rgba(10, 132, 255, 0.14), transparent 36%),
    rgba(13, 17, 23, 0.96);
}

html[data-theme="dark"] .pricing-portal-distributor-profile-popout summary,
html[data-theme="dark"] .pricing-portal-distributor-profile-metrics article,
html[data-theme="dark"] .pricing-portal-distributor-profile-branches article {
  border-color: rgba(148, 163, 184, 0.24);
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.82));
  color: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 22px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .pricing-portal-distributor-picker,
html[data-theme="dark"] .pricing-portal-distributor-option,
html[data-theme="dark"] .pricing-portal-distributor-map-list span {
  border-color: rgba(148, 163, 184, 0.22);
  background:
    radial-gradient(circle at 12% 0%, rgba(10, 132, 255, 0.12), transparent 34%),
    rgba(15, 23, 42, 0.94);
  color: #f8fafc;
}

html[data-theme="dark"] .pricing-portal-distributor-search input,
html[data-theme="dark"] .pricing-portal-distributor-branch-picker select {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(2, 6, 23, 0.64);
  color: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

html[data-theme="dark"] .pricing-portal-distributor-map-user-project {
  border-color: rgba(125, 211, 252, 0.72);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.98), rgba(30, 64, 175, 0.86));
  color: #f8fafc;
  box-shadow: 0 16px 34px rgba(10, 132, 255, 0.24), 0 0 0 7px rgba(37, 99, 235, 0.18);
}

html[data-theme="dark"] .pricing-portal-distributor-map-user-project small {
  color: #bfdbfe;
}

html[data-theme="dark"] .pricing-portal-distributor-map-user-company {
  border-color: rgba(226, 232, 240, 0.42);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(51, 65, 85, 0.92));
  color: #f8fafc;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28), 0 0 0 7px rgba(148, 163, 184, 0.12);
}

html[data-theme="dark"] .pricing-portal-distributor-map-user-company small {
  color: rgba(226, 232, 240, 0.86);
}

html[data-theme="dark"] .pricing-portal-map-location-key {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.82);
}

html[data-theme="dark"] .pricing-portal-map-location-key span {
  color: #f8fafc;
}

html[data-theme="dark"] .pricing-portal-distributor-profile-popout summary,
html[data-theme="dark"] .pricing-portal-distributor-profile-metrics strong,
html[data-theme="dark"] .pricing-portal-distributor-profile-branches strong {
  color: #f8fafc;
}

html[data-theme="dark"] .pricing-portal-distributor-profile-metrics span,
html[data-theme="dark"] .pricing-portal-distributor-profile-branches span,
html[data-theme="dark"] .pricing-portal-distributor-profile-branches small {
  color: rgba(203, 213, 225, 0.92);
}

html[data-theme="dark"] .distributor-star-rating {
  color: rgba(226, 232, 240, 0.86);
}

html[data-theme="dark"] .distributor-star-rating-stars {
  color: rgba(148, 163, 184, 0.58);
}

html[data-theme="dark"] .distributor-star-rating-star-fill {
  color: #facc15;
}

html[data-theme="dark"] .distributor-star-rating strong {
  color: #f8fafc;
}

html[data-theme="dark"] .distributor-star-rating em {
  color: rgba(203, 213, 225, 0.9);
}

html[data-theme="dark"] .pricing-portal-distributor-profile-branches b {
  border: 1px solid rgba(96, 165, 250, 0.32);
  background: rgba(37, 99, 235, 0.22);
  color: #7dd3fc;
}

html[data-theme="dark"] .pricing-portal-distributor-branch-picker {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.70);
}

html[data-theme="dark"] .pricing-portal-distributor-branch-suggestion {
  border-color: rgba(96, 165, 250, 0.24);
  background: rgba(30, 41, 59, 0.72);
}

html[data-theme="dark"] .pricing-portal-distributor-branch-suggestion strong {
  color: #f8fafc;
}

html[data-theme="dark"] .pricing-portal-distributor-branch-suggestion small,
html[data-theme="dark"] .pricing-portal-distributor-branch-picker > small {
  color: rgba(203, 213, 225, 0.92);
}

html[data-theme="dark"] .pricing-portal-distributor-profile-links a,
html[data-theme="dark"] .pricing-portal-distributor-profile-branches a {
  border-color: rgba(96, 165, 250, 0.38);
  background: rgba(37, 99, 235, 0.16);
  color: #93c5fd;
}

html[data-theme="dark"] .pricing-portal-distributor-profile-links a:hover,
html[data-theme="dark"] .pricing-portal-distributor-profile-branches a:hover {
  border-color: rgba(125, 211, 252, 0.52);
  background: rgba(37, 99, 235, 0.24);
  color: #dbeafe;
}

.pricing-portal-distributor-profile-copy {
  display: grid;
  gap: 10px;
}

.pricing-portal-distributor-profile-copy p {
  margin: 0;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.35;
}

.pricing-portal-distributor-profile-copy dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.pricing-portal-distributor-profile-copy div,
.pricing-portal-distributor-branch-list article {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.74);
  padding: 8px;
}

.pricing-portal-distributor-profile-copy dt {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 950;
  text-transform: uppercase;
}

.pricing-portal-distributor-profile-copy dd {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 900;
}

.pricing-portal-distributor-branches {
  display: grid;
  gap: 8px;
}

.pricing-portal-distributor-branches label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.pricing-portal-distributor-branches select {
  min-height: 36px;
  border: 1px solid rgba(148, 163, 184, 0.30);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 7px 10px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: none;
}

.pricing-portal-distributor-branch-list {
  display: grid;
  gap: 7px;
}

.pricing-portal-distributor-branch-list strong,
.pricing-portal-distributor-branch-list span,
.pricing-portal-distributor-branch-list small {
  display: block;
}

.pricing-portal-distributor-branch-list strong {
  color: var(--text);
  font-size: 0.82rem;
}

.pricing-portal-distributor-branch-list span,
.pricing-portal-distributor-branch-list small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.pricing-portal-returned-quotes article.accepted {
  border-color: rgba(22, 163, 74, 0.36);
  background: rgba(240, 253, 244, 0.72);
}

.pricing-portal-returned-quotes dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.pricing-portal-returned-quotes div {
  display: grid;
  gap: 2px;
}

.pricing-portal-returned-quotes dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.pricing-portal-returned-quotes dd {
  margin: 0;
  color: var(--text);
  font-weight: 900;
}

.pricing-portal-returned-quotes .pricing-portal-quote-status-card dl {
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(118px, 1fr));
}

.pricing-portal-cost-overridden {
  color: #047857;
}

.pricing-portal-price-value {
  display: block;
  color: inherit;
}

.pricing-portal-price-basis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  margin-top: 3px;
  padding: 2px 6px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  background: rgba(148, 163, 184, 0.11);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
}

.pricing-portal-price-basis.average-online {
  color: #a16207;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.32);
}

.pricing-portal-price-basis.distributor-cost {
  color: #047857;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.28);
}

.pricing-portal-price-basis.product-data,
.pricing-portal-price-basis.configured {
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.11);
  border-color: rgba(59, 130, 246, 0.25);
}

.pricing-portal-cost-overridden .pricing-portal-price-basis {
  display: block;
  color: #047857;
  font-weight: 900;
}

.pricing-portal-distributor-selected-count {
  color: var(--muted);
  font-weight: 800;
}

@media (max-width: 1180px) {
  .dashboard-distributor-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-distributor-quotes-layout,
  .dashboard-distributor-profile-preview,
  .pricing-portal-distributor-map {
    grid-template-columns: 1fr;
  }

  .dashboard-distributor-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-distributor-installation-options {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .dashboard-distributor-summary,
  .dashboard-distributor-form,
  .dashboard-distributor-quote-metrics {
    grid-template-columns: 1fr;
  }

  .dashboard-distributor-form .wide {
    grid-column: auto;
  }

  .dashboard-distributor-installation-options {
    grid-column: auto;
  }

  .pricing-portal-distributor-support-head {
    align-items: stretch;
    grid-template-columns: minmax(0, 1fr);
  }

  .pricing-portal-distributor-support-head > div:last-child {
    justify-content: flex-start;
  }

  .pricing-portal-distributor-profile-dialog {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
  }

  .pricing-portal-distributor-profile-metrics,
  .pricing-portal-distributor-profile-map {
    grid-template-columns: 1fr;
  }

  .pricing-portal-distributor-profile-branches article {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .pricing-portal-distributor-profile-branches a {
    grid-column: 2;
    justify-self: start;
  }
}

html[data-theme="dark"] {
  --bg: #08090b;
  --surface: rgba(24, 24, 27, 0.30);
  --surface-solid: #18191d;
  --surface-soft: rgba(35, 36, 40, 0.34);
  --line: rgba(232, 238, 247, 0.12);
  --line-strong: rgba(232, 238, 247, 0.22);
  --text: #f4f7fb;
  --muted: #a7b0bd;
  --blue: #0a84ff;
  --blue-hover: #409cff;
  --blue-soft: rgba(10, 132, 255, 0.18);
  --blue-glass: rgba(10, 132, 255, 0.22);
  --blue-border: rgba(10, 132, 255, 0.52);
  --blue-shadow: 0 10px 26px rgba(10, 132, 255, 0.28);
  --green: #30d158;
  --heat-loss: #ff6961;
  --heat-gain: #409cff;
  --ventilation-supply-line: #38bdf8;
  --ventilation-supply-flow: #38bdf8;
  --ventilation-supply-ink: #7dd3fc;
  --ventilation-supply-soft: rgba(8, 47, 73, 0.82);
  --ventilation-supply-border: rgba(56, 189, 248, 0.72);
  --ventilation-supply-glow: rgba(56, 189, 248, 0.82);
  --ventilation-extract-line: #fbbf24;
  --ventilation-extract-flow: #fbbf24;
  --ventilation-extract-ink: #fcd34d;
  --ventilation-extract-soft: rgba(69, 26, 3, 0.82);
  --ventilation-extract-border: rgba(251, 191, 36, 0.74);
  --ventilation-extract-glow: rgba(251, 191, 36, 0.82);
  --glass-bg: rgba(10, 10, 12, 0.16);
  --glass-strong: rgba(18, 18, 21, 0.24);
  --glass-subtle: rgba(24, 24, 27, 0.10);
  --glass-border: rgba(239, 246, 255, 0.16);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 -1px 0 rgba(255, 255, 255, 0.06);
  --button-glass: linear-gradient(145deg, rgba(54, 55, 60, 0.30), rgba(10, 10, 12, 0.12));
  --button-glass-hover: linear-gradient(145deg, rgba(76, 77, 84, 0.44), rgba(18, 18, 21, 0.24));
  --input-glass: linear-gradient(145deg, rgba(45, 46, 51, 0.80), rgba(24, 25, 29, 0.62));
  --tile-glass: linear-gradient(145deg, rgba(42, 43, 48, 0.14), rgba(8, 9, 11, 0.015));
  --tile-glass-strong: linear-gradient(145deg, rgba(52, 53, 58, 0.20), rgba(9, 10, 12, 0.04));
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.30);
  --control-hover-bg: var(--button-glass-hover);
  --control-hover-border: rgba(10, 132, 255, 0.44);
  --control-hover-shadow: var(--glass-edge), 0 12px 28px rgba(10, 132, 255, 0.16), 0 4px 14px rgba(0, 0, 0, 0.22);
  --tooltip-bg: rgba(20, 21, 25, 0.9);
  --tooltip-arrow-bg: rgba(20, 21, 25, 0.9);
  --tooltip-text: #f4f7fb;
  --tooltip-border: rgba(232, 238, 247, 0.2);
  --tooltip-shadow: var(--glass-edge), 0 18px 38px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  position: relative;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: var(--type-base);
  font-kerning: normal;
  font-variant-numeric: tabular-nums;
  line-height: var(--leading-normal);
  overflow: hidden;
  text-rendering: optimizeLegibility;
}

html[data-workspace="schematic"],
html[data-workspace="schematic"] body {
  overflow: hidden;
}

html[data-theme="dark"] body {
  background: var(--bg);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

body::before {
  background: linear-gradient(180deg, #fbfbfd 0%, #f5f5f7 42%, #ececf0 100%);
  opacity: 1;
}

body::after {
  background: linear-gradient(180deg, #111214 0%, #08090b 48%, #030405 100%);
  opacity: 0;
}

html[data-theme="dark"] body::before {
  opacity: 0;
}

html[data-theme="dark"] body::after {
  opacity: 1;
}

#app {
  position: relative;
  z-index: 1;
}

html.theme-transition body,
html.theme-transition body::before,
html.theme-transition body::after,
html.theme-transition .studio-shell,
html.theme-transition .topbar,
html.theme-transition .modebar,
html.theme-transition .bottombar,
html.theme-transition .workspace,
html.theme-transition .left-rail,
html.theme-transition .tool-palette,
html.theme-transition .three-workspace,
html.theme-transition .inspector,
html.theme-transition .product-panel,
html.theme-transition .results-panel,
html.theme-transition .floor-plan-popover,
html.theme-transition .brand-menu-popover,
html.theme-transition .project-settings-popover,
html.theme-transition .methodology-popover,
html.theme-transition .history-popover,
html.theme-transition .export-popover,
html.theme-transition .product-library-popover,
html.theme-transition .ghost-btn,
html.theme-transition .ghost-icon,
html.theme-transition .primary-btn,
html.theme-transition .theme-toggle,
html.theme-transition .theme-toggle-track,
html.theme-transition .theme-toggle-knob,
html.theme-transition .mode-tab,
html.theme-transition .floor-row,
html.theme-transition .layer-row,
html.theme-transition .tool-btn,
html.theme-transition .panel-reopen,
html.theme-transition .result-card,
html.theme-transition .field,
html.theme-transition .settings-field,
html.theme-transition .collapsible-section,
html.theme-transition .room-type-preset-card,
html.theme-transition .uvalue-setpoint-card,
html.theme-transition .material-card,
html.theme-transition .settings-tooltip,
html.theme-transition .settings-tooltip-bubble,
html.theme-transition .alpha-preview-badge::after,
html.theme-transition input,
html.theme-transition select,
html.theme-transition textarea {
  transition-duration: 520ms;
  transition-property: background-color, border-color, box-shadow, color, opacity, fill, stroke;
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 520ms;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  mix-blend-mode: normal;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: var(--tracking-ui);
  line-height: var(--leading-tight);
  min-width: 0;
}

button,
a,
[role="button"],
input,
select,
textarea {
  -webkit-tap-highlight-color: rgba(0, 122, 255, 0.18);
}

/* Keep native number controls legible and discoverable in both themes.
   Their increment, limits and keyboard behaviour remain owned by the input's
   HTML attributes; compact controls can still deliberately hide the spinner. */
input[type="number"] {
  color-scheme: light;
}

html[data-theme="dark"] input[type="number"] {
  color-scheme: dark;
}

input[type="number"]::-webkit-inner-spin-button {
  opacity: 1;
}

select {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  line-height: var(--leading-tight);
  color: var(--text);
  background-color: color-mix(in srgb, var(--surface-solid) 84%, transparent);
  border-color: var(--line);
  color-scheme: light;
}

select option,
select optgroup {
  background: color-mix(in srgb, #ffffff 96%, var(--blue-soft));
  color: var(--text);
  font: inherit;
}

select option {
  padding: 10px 14px;
}

select option:checked {
  background: color-mix(in srgb, var(--blue) 18%, #ffffff);
  color: var(--text);
}

select option:hover,
select option:focus {
  background: color-mix(in srgb, var(--blue) 14%, #ffffff);
  color: var(--text);
}

@supports (appearance: base-select) {
  select {
    appearance: base-select;
    -webkit-appearance: base-select;
  }

  select::picker(select) {
    appearance: base-select;
    -webkit-appearance: base-select;
    min-width: anchor-size(width);
    max-height: min(360px, calc(100dvh - 96px));
    margin-top: 6px;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
    color: var(--text);
    box-shadow: var(--glass-edge), 0 18px 42px rgba(15, 23, 42, 0.18);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--blue) 46%, var(--line)) transparent;
  }

  select::picker(select)::-webkit-scrollbar {
    width: 8px;
  }

  select::picker(select)::-webkit-scrollbar-track {
    background: transparent;
  }

  select::picker(select)::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: color-mix(in srgb, var(--blue) 42%, var(--line));
  }

  select::picker-icon {
    color: var(--muted);
    transition: transform 0.16s ease, color 0.16s ease;
  }

  select:open::picker-icon {
    color: var(--blue);
    transform: rotate(180deg);
  }

  select option {
    min-height: 34px;
    align-items: center;
    padding: 8px 14px;
    border: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font-weight: 620;
  }

  select option:hover,
  select option:focus,
  select option:checked:hover {
    background: color-mix(in srgb, var(--blue) 16%, var(--surface-solid));
    color: var(--text);
  }

  select option:checked {
    background: var(--blue-glass);
    color: var(--blue);
    font-weight: 760;
  }

  select option::checkmark {
    display: none;
  }
}

html[data-theme="dark"] select {
  color-scheme: dark;
  background-color: color-mix(in srgb, var(--surface-solid) 78%, transparent);
}

html[data-theme="dark"] select option,
html[data-theme="dark"] select optgroup {
  background: #15171c;
  color: var(--text);
}

html[data-theme="dark"] select option:checked {
  background: color-mix(in srgb, var(--blue) 32%, #15171c);
  color: #ffffff;
}

html[data-theme="dark"] select option:hover,
html[data-theme="dark"] select option:focus {
  background: color-mix(in srgb, var(--blue) 28%, #15171c);
  color: #ffffff;
}

@supports (appearance: base-select) {
  html[data-theme="dark"] select::picker(select) {
    border-color: rgba(239, 246, 255, 0.18);
    background: color-mix(in srgb, #16181d 86%, transparent);
    box-shadow: var(--glass-edge), 0 22px 46px rgba(0, 0, 0, 0.44);
    scrollbar-color: color-mix(in srgb, var(--blue) 62%, #ffffff 18%) transparent;
  }

  html[data-theme="dark"] select::picker(select)::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--blue) 56%, #ffffff 18%);
  }

  html[data-theme="dark"] select option:hover,
  html[data-theme="dark"] select option:focus {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
  }

  html[data-theme="dark"] select option:checked {
    background: rgba(10, 132, 255, 0.22);
    color: #ffffff;
  }
}

button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.studio-shell {
  height: 100%;
  min-width: 1040px;
  display: grid;
  grid-template-rows: minmax(58px, max-content) 62px minmax(0, 1fr) 56px;
  background: transparent;
}

.studio-shell.pricing-portal-shell,
.studio-shell.programme-shell,
.studio-shell.commissioning-shell {
  min-height: 0;
  overflow: hidden;
  grid-template-rows: minmax(58px, max-content) 62px minmax(0, 1fr);
}

.topbar,
.modebar,
.bottombar {
  display: flex;
  align-items: center;
  background: var(--glass-strong);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 1px 0 rgba(60, 60, 67, 0.05);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.topbar {
  justify-content: space-between;
  padding: 0 14px 0 18px;
}

.brand-lockup,
.top-actions,
.mode-tabs,
.system-controls,
.micro-tools,
.bottom-tools,
.zoom-tools,
.view-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--blue);
}

.brand-mark .brand-logo {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  overflow: visible;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.brand-logo img {
  display: block;
  max-width: none;
  user-select: none;
  pointer-events: none;
}

.brand-logo-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.brand-logo-wordmark {
  width: 132px;
  height: 30px;
  justify-content: flex-start;
  align-items: center;
}

.brand-logo-wordmark img {
  width: 132px;
  height: 100%;
  object-fit: contain;
}

.brand-logo-wordmark .brand-logo-image-dark {
  display: none;
}

.project-picker,
.brand-menu-button,
.level-pill {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 14px;
  font-weight: 650;
}

.level-pill {
  color: #334155;
  font-weight: 560;
}

.project-picker,
.brand-menu-button,
.level-pill {
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.brand-menu-button {
  height: 38px;
  min-width: 122px;
  justify-content: center;
  padding: 0 8px;
}

.brand-menu-button .brand-logo-wordmark {
  width: 106px;
  height: 28px;
}

.brand-menu-button .brand-logo-wordmark img {
  width: 106px;
  height: 100%;
  object-fit: contain;
}

.brand-menu-mark {
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.project-picker:hover,
.project-picker.active,
.brand-menu-button:hover,
.brand-menu-button.active,
.brand-menu-mark:hover,
.brand-menu-mark.active,
.level-pill:hover {
  border-color: var(--control-hover-border);
  background: var(--control-hover-bg);
  color: #374151;
  box-shadow: var(--control-hover-shadow);
  transform: translateY(-1px);
}

.dashboard-shell .brand-menu-button.dashboard-logo-button {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.dashboard-shell .brand-menu-button.dashboard-logo-button:focus:not(:focus-visible) {
  outline: none;
}

.dashboard-shell .brand-menu-button.dashboard-logo-button:hover {
  border-color: rgba(0, 113, 227, 0.14);
  background: rgba(0, 113, 227, 0.05);
  box-shadow: none;
  transform: none;
}

.divider {
  width: 1px;
  height: 22px;
  background: var(--line);
  margin: 0 6px;
}

.ghost-btn,
.ghost-icon,
.primary-btn,
.mode-tab,
.micro-tools button,
.bottom-tools button,
.zoom-tools button,
.view-tools button,
.view-tools select {
  display: inline-flex;
  height: 34px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: var(--radius);
  background: var(--button-glass);
  color: var(--text);
  padding: 0 11px;
  font-size: 13px;
  font-weight: 620;
  white-space: nowrap;
  box-shadow: var(--glass-edge), 0 6px 16px rgba(0, 0, 0, 0.055);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.ghost-icon {
  width: 34px;
  padding: 0;
  font-size: 18px;
}

.theme-toggle {
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: var(--radius);
  background: var(--button-glass);
  color: var(--text);
  font-size: 12px;
  font-weight: 760;
  box-shadow: var(--glass-edge), 0 6px 16px rgba(0, 0, 0, 0.055);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.theme-toggle:hover {
  border-color: var(--control-hover-border);
  background: var(--control-hover-bg);
  box-shadow: var(--control-hover-shadow);
  transform: translateY(-1px);
}

.theme-toggle-track {
  width: 34px;
  height: 20px;
  position: relative;
  flex: 0 0 34px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  box-shadow: var(--glass-edge);
}

.theme-toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffffff, #e5e7eb);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
  transition: transform 0.18s ease, background 0.18s ease;
}

.theme-toggle.active {
  border-color: var(--blue-border);
  color: var(--text);
}

.theme-toggle.active .theme-toggle-track {
  background: linear-gradient(145deg, rgba(10, 132, 255, 0.62), rgba(10, 132, 255, 0.28));
  border-color: var(--blue-border);
}

.theme-toggle.active .theme-toggle-knob {
  transform: translateX(14px);
  background: linear-gradient(145deg, #f8fbff, #cfe5ff);
}

.primary-btn {
  border-color: rgba(0, 98, 204, 0.68);
  background: linear-gradient(145deg, rgba(40, 160, 255, 0.94), rgba(0, 122, 255, 0.86));
  color: white;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), inset 0 -1px 0 rgba(0, 68, 153, 0.22), var(--blue-shadow);
}

.primary-btn.wide {
  width: 100%;
  margin-top: 8px;
}

.secondary-btn {
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: var(--radius);
  background: var(--button-glass);
  color: var(--text);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 820;
  box-shadow: var(--glass-edge), 0 7px 18px rgba(15, 23, 42, 0.07);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.secondary-btn svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
}

.secondary-btn.wide {
  width: 100%;
  margin-top: 8px;
}

.danger-btn {
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  background: #fef2f2;
  color: #b42318;
  font-size: 12px;
  font-weight: 780;
}

.danger-btn.wide {
  width: 100%;
  margin: 10px 0 2px;
}

.modebar {
  gap: 18px;
  padding: 0 14px;
  border-bottom-color: var(--line-strong);
  justify-content: space-between;
}

.mode-tabs {
  align-self: stretch;
}

.modebar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.modebar-controls.pricing-modebar-controls {
  justify-content: flex-end;
}

.mode-tab {
  height: 42px;
  min-width: 108px;
  border-color: var(--line-strong);
}

.mode-tab.pricing-design-return {
  min-width: 118px;
  padding: 0 16px;
  gap: 8px;
  color: var(--text);
  background: var(--surface-solid);
  box-shadow: var(--glass-edge), 0 8px 20px rgba(15, 23, 42, 0.08);
}

.mode-tab.pricing-design-return svg {
  width: 17px;
  height: 17px;
  color: var(--blue);
}

.mode-tab.active {
  background: linear-gradient(145deg, rgba(40, 160, 255, 0.94), rgba(0, 122, 255, 0.86));
  border-color: rgba(0, 98, 204, 0.68);
  color: white;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), var(--blue-shadow);
}

.floor-editing-control { display: flex; align-items: center; gap: 8px; align-self: center; min-width: 0; }
.modebar .floor-editing-options { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel-soft, #f4f6fa); }
.modebar .floor-editing-options button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 11px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-family: inherit; font-size: 12px; line-height: 18px; font-weight: 600; min-height: 30px; height: 30px; min-width: 0; white-space: nowrap; box-shadow: none; transition: background .15s, color .15s; }
.modebar .floor-editing-options button svg { width: 14px; height: 14px; flex: 0 0 14px; }
.modebar .floor-editing-options button:not(:disabled):hover { background: var(--blue-glass); color: var(--blue); }
.modebar .floor-editing-options button[aria-pressed="true"] { color: white; background: var(--blue, #0674e8); box-shadow: 0 1px 3px rgba(0, 60, 120, .14); }
.modebar .floor-editing-options button:focus-visible { outline: 2px solid var(--blue, #0674e8); outline-offset: 3px; }
.modebar .floor-editing-options button:disabled { opacity: .5; cursor: not-allowed; }
.floor-editing-hint { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.modebar .floor-editing-review { padding: 5px 8px; border: 1px solid var(--blue-border); border-radius: 7px; background: var(--blue-glass); color: var(--blue); font: 600 11px/1.4 var(--menu-font, sans-serif); box-shadow: none; }
.floor-editing-readonly { color: var(--muted); font-size: 11px; white-space: nowrap; }
.drawing-setup-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.drawing-setup-heading h3 { margin: 0; }
.drawing-setup-heading .floor-drawing-lock-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.floor-drawing-lock-toggle svg { width: 14px; height: 14px; }
.protected-room-info, .building-edit-review { margin: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 12px; line-height: 1.5; }
.building-protection-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 0; }
.building-protection-note > span { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.building-protection-note svg { width: 13px; height: 13px; }
.building-protection-note button, .building-edit-review button { font: inherit; font-size: 12px; padding: 6px 9px; }
.building-edit-review { border-color: var(--blue-border); background: var(--blue-glass); }
.building-edit-review ul { margin: 8px 0; padding-left: 18px; }
html[data-theme="dark"] .floor-editing-options { background: var(--panel); }

.mode-tab.floor-plan-lock {
  min-width: 148px;
  color: white;
}

.mode-tab.floor-plan-lock.unlocked {
  border-color: rgba(0, 98, 204, 0.68);
  background: linear-gradient(145deg, rgba(40, 160, 255, 0.94), rgba(0, 122, 255, 0.86));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), var(--blue-shadow);
}

.mode-tab.floor-plan-lock.locked {
  border-color: rgba(185, 28, 28, 0.72);
  background: linear-gradient(145deg, rgba(248, 113, 113, 0.96), rgba(220, 38, 38, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 12px 28px rgba(220, 38, 38, 0.24);
}

.mode-tab.floor-plan-lock:hover {
  color: white;
}

.ghost-btn.active {
  border-color: var(--blue-border);
  background: var(--blue-glass);
  color: var(--blue);
  box-shadow: var(--glass-edge), 0 10px 24px rgba(0, 122, 255, 0.14);
}

.ghost-icon.active {
  border-color: var(--blue-border);
  background: var(--blue-soft);
  color: var(--blue);
  box-shadow: var(--glass-edge), 0 10px 24px rgba(0, 122, 255, 0.14);
}

.ghost-btn:not(:disabled):hover,
.ghost-icon:not(:disabled):hover,
.mode-tab:not(.active):not(:disabled):hover,
.micro-tools button:not(:disabled):hover,
.bottom-tools button:not(.active):not(:disabled):hover,
.zoom-tools button:not(:disabled):hover,
.view-tools button:not(.active):not(:disabled):hover {
  border-color: var(--control-hover-border);
  background: var(--control-hover-bg);
  color: #374151;
  box-shadow: var(--control-hover-shadow);
  transform: translateY(-1px);
}

.secondary-btn:not(:disabled):hover {
  border-color: var(--control-hover-border);
  background: var(--control-hover-bg);
  color: #374151;
  box-shadow: var(--control-hover-shadow);
  transform: translateY(-1px);
}

html[data-theme="dark"] .secondary-btn {
  border-color: rgba(239, 246, 255, 0.20);
  color: var(--text);
  box-shadow: var(--glass-edge), 0 8px 18px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .secondary-btn:not(:disabled):hover {
  border-color: var(--control-hover-border);
  color: var(--text);
}

.primary-btn:not(:disabled):hover,
.primary-mini:not(:disabled):hover,
.mode-tab.active:hover {
  border-color: rgba(0, 86, 179, 0.78);
  background: linear-gradient(145deg, rgba(65, 174, 255, 0.98), rgba(0, 110, 219, 0.9));
  color: white;
  box-shadow: 0 12px 28px rgba(0, 122, 255, 0.30);
  transform: translateY(-1px);
}

.mode-tab.floor-plan-lock.unlocked:hover {
  border-color: rgba(0, 86, 179, 0.78);
  background: linear-gradient(145deg, rgba(65, 174, 255, 0.98), rgba(0, 110, 219, 0.9));
  color: white;
  box-shadow: 0 12px 28px rgba(0, 122, 255, 0.30);
}

.mode-tab.floor-plan-lock.locked:hover {
  border-color: rgba(153, 27, 27, 0.84);
  background: linear-gradient(145deg, rgba(252, 165, 165, 0.98), rgba(185, 28, 28, 0.92));
  color: white;
  box-shadow: 0 12px 28px rgba(220, 38, 38, 0.32);
}

.mode-tab:disabled,
.mode-tab.disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.system-controls {
  margin-left: 0;
  margin-right: 0;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.system-label {
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.48);
  font-size: 12px;
  font-weight: 750;
}

.system-controls select {
  width: 230px;
  height: 36px;
  min-height: 36px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  border: 0;
  border-left: 1px solid var(--line);
  padding: 0 34px 0 12px;
  line-height: 1;
  color: var(--text);
  background: transparent;
  font-size: 12px;
  font-weight: 680;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@supports (appearance: base-select) {
  .system-controls select {
    align-items: center;
    line-height: 1;
    white-space: nowrap;
  }

  .system-controls select selectedcontent {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .system-controls select option {
    display: flex;
    align-items: center;
  }
}

.view-selector select {
  width: 210px;
}

.drawing-selector select {
  width: 270px;
}

#plantRoomAreaSelect {
  width: 300px;
}

.system-controls select:last-child {
  color: var(--text);
}

.micro-tools button {
  width: 36px;
  padding: 0;
}

.micro-tools button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  box-shadow: none;
  transform: none;
}

.workspace {
  display: grid;
  grid-template-columns: var(--workspace-columns, 220px var(--tools-width, 168px) minmax(360px, 1fr) var(--inspector-width, 280px) var(--product-width, 0px) var(--pipe-width, 0px) var(--results-width, 280px));
  gap: 10px;
  min-height: 0;
  padding: 10px 0 10px 10px;
  background:
    radial-gradient(circle at 18% 18%, rgba(0, 122, 255, 0.08), transparent 28%),
    radial-gradient(circle at 86% 22%, rgba(255, 255, 255, 0.72), transparent 24%),
    linear-gradient(135deg, rgba(242, 244, 248, 0.78), rgba(229, 233, 240, 0.9));
}

html[data-theme="dark"] .workspace {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.035), transparent 30%),
    radial-gradient(circle at 86% 22%, rgba(245, 245, 247, 0.07), transparent 24%),
    linear-gradient(135deg, rgba(18, 18, 21, 0.94), rgba(5, 6, 8, 0.97));
}

.workspace.schematic-workspace-shell {
  grid-template-columns: 292px 92px minmax(520px, 1fr);
  height: 100%;
  min-height: 0;
  overflow: hidden;
  align-items: stretch;
}

.workspace.schematic-workspace-shell.schematic-selection-open {
  grid-template-columns: 292px 92px minmax(420px, 1fr) 328px;
}

.workspace.schematic-workspace-shell.schematic-zone-drawing {
  grid-template-columns: 92px minmax(520px, 1fr);
}

.workspace.schematic-workspace-shell.schematic-zone-drawing.schematic-selection-open {
  grid-template-columns: 92px minmax(420px, 1fr) 328px;
}

.workspace.schematic-workspace-shell > * {
  min-height: 0;
}

.workspace.plant-room-planner-workspace-shell,
.workspace.commissioning-workspace-shell {
  grid-template-columns: minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding-right: 10px;
}

.workspace.commissioning-workspace-shell {
  padding: 10px;
}

.project-commissioning-workspace .dashboard-commissioning-shell {
  padding: 0;
}

.project-commissioning-workspace .dashboard-commissioning-topbar {
  flex-wrap: wrap;
}

.project-commissioning-workspace .dashboard-commissioning-topbar > div:first-child {
  flex: 1 1 240px;
  overflow-wrap: anywhere;
}

.project-commissioning-design-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  flex: 0 0 auto;
}

.workspace.floor-3d-wide {
  grid-template-columns: minmax(0, 1fr);
  padding: 10px;
}

.workspace.floor-3d-wide .three-workspace {
  margin: 8px;
}

.left-rail,
.tool-palette,
.inspector,
.product-panel,
.pipe-panel,
.results-panel {
  position: relative;
  z-index: 4;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  min-height: 0;
  overflow: auto;
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  will-change: transform, opacity;
}

.project-settings-popover,
.brand-menu-popover,
.share-popover,
.workspace-more-popover,
.methodology-popover,
.disclaimer-agreement-popover,
.history-popover,
.team-activity-popover,
.export-popover,
.product-library-popover,
.floor-plan-popover {
  will-change: transform, opacity;
}

.project-settings-popover.tile-opening,
.brand-menu-popover.tile-opening,
.share-popover.tile-opening,
.workspace-more-popover.tile-opening,
.methodology-popover.tile-opening,
.disclaimer-agreement-popover.tile-opening,
.history-popover.tile-opening,
.team-activity-popover.tile-opening,
.export-popover.tile-opening,
.product-library-popover.tile-opening {
  transform-origin: top right;
  animation: popupTileIn 190ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.project-settings-popover.tile-closing,
.brand-menu-popover.tile-closing,
.share-popover.tile-closing,
.workspace-more-popover.tile-closing,
.methodology-popover.tile-closing,
.disclaimer-agreement-popover.tile-closing,
.history-popover.tile-closing,
.team-activity-popover.tile-closing,
.export-popover.tile-closing,
.product-library-popover.tile-closing {
  pointer-events: none;
  transform-origin: top right;
  animation: popupTileOut 170ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.history-popover.tile-opening {
  transform-origin: var(--history-origin-x, 76px) bottom;
  animation: bottomPopupTileIn 190ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.team-activity-popover.tile-opening {
  transform-origin: top right;
  animation: popupTileIn 190ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.history-popover.tile-closing {
  transform-origin: var(--history-origin-x, 76px) bottom;
  animation: bottomPopupTileOut 170ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.team-activity-popover.tile-closing {
  transform-origin: top right;
  animation: popupTileOut 170ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.floor-plan-popover.tile-opening {
  transform-origin: top left;
  animation: popupTileIn 190ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.floor-plan-popover.tile-closing {
  pointer-events: none;
  transform-origin: top left;
  animation: popupTileOut 170ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.inspector.tile-opening,
.product-panel.tile-opening,
.pipe-panel.tile-opening,
.results-panel.tile-opening {
  animation: anchoredTileRightIn 190ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.inspector.tile-closing,
.product-panel.tile-closing,
.pipe-panel.tile-closing,
.results-panel.tile-closing {
  pointer-events: none;
  animation: anchoredTileRightOut 170ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.tool-palette.tile-opening {
  animation: anchoredTileLeftIn 190ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.tool-palette.tile-closing {
  animation: anchoredTileLeftOut 170ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes popupTileIn {
  from {
    opacity: 0;
    filter: blur(2px);
    transform: translateY(-8px) scale(0.985);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

@keyframes popupTileOut {
  from {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    filter: blur(2px);
    transform: translateY(-8px) scale(0.985);
  }
}

@keyframes bottomPopupTileIn {
  from {
    opacity: 0;
    filter: blur(2px);
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

@keyframes bottomPopupTileOut {
  from {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    filter: blur(2px);
    transform: translateY(10px) scale(0.985);
  }
}

@keyframes anchoredTileRightIn {
  from {
    opacity: 0;
    filter: blur(1px);
    transform: translateX(18px) scale(0.99);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateX(0) scale(1);
  }
}

@keyframes anchoredTileRightOut {
  from {
    opacity: 1;
    filter: blur(0);
    transform: translateX(0) scale(1);
  }
  to {
    opacity: 0;
    filter: blur(1px);
    transform: translateX(18px) scale(0.99);
  }
}

@keyframes anchoredTileLeftIn {
  from {
    opacity: 0;
    filter: blur(1px);
    transform: translateX(-14px) scale(0.99);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateX(0) scale(1);
  }
}

@keyframes anchoredTileLeftOut {
  from {
    opacity: 1;
    filter: blur(0);
    transform: translateX(0) scale(1);
  }
  to {
    opacity: 0.48;
    filter: blur(1px);
    transform: translateX(-12px) scale(0.99);
  }
}

@media (prefers-reduced-motion: reduce) {
	  .project-settings-popover.tile-opening,
	  .project-settings-popover.tile-closing,
	  .brand-menu-popover.tile-opening,
	  .brand-menu-popover.tile-closing,
  .workspace-more-popover.tile-opening,
  .workspace-more-popover.tile-closing,
	  .methodology-popover.tile-opening,
	  .methodology-popover.tile-closing,
	  .history-popover.tile-opening,
  .history-popover.tile-closing,
  .team-activity-popover.tile-opening,
  .team-activity-popover.tile-closing,
  .export-popover.tile-opening,
  .export-popover.tile-closing,
  .product-library-popover.tile-opening,
  .product-library-popover.tile-closing,
  .floor-plan-popover.tile-opening,
  .floor-plan-popover.tile-closing,
  .inspector.tile-opening,
  .inspector.tile-closing,
	  .product-panel.tile-opening,
	  .product-panel.tile-closing,
	  .pipe-panel.tile-opening,
	  .pipe-panel.tile-closing,
	  .results-panel.tile-opening,
  .results-panel.tile-closing,
  .tool-palette.tile-opening,
  .tool-palette.tile-closing,
  .tool-palette.tools-swapping .tool-slot {
    animation: none;
    filter: none;
    opacity: 1;
    transform: none;
  }

  html.theme-transition body,
  html.theme-transition body::before,
  html.theme-transition body::after,
  html.theme-transition .studio-shell,
  html.theme-transition .topbar,
  html.theme-transition .modebar,
  html.theme-transition .bottombar,
  html.theme-transition .workspace,
  html.theme-transition .left-rail,
  html.theme-transition .tool-palette,
  html.theme-transition .inspector,
  html.theme-transition .product-panel,
  html.theme-transition .pipe-panel,
  html.theme-transition .results-panel,
	  html.theme-transition .floor-plan-popover,
	  html.theme-transition .brand-menu-popover,
	  html.theme-transition .project-settings-popover,
  html.theme-transition .workspace-more-popover,
	  html.theme-transition .methodology-popover,
  html.theme-transition .history-popover,
  html.theme-transition .export-popover,
  html.theme-transition .product-library-popover,
  html.theme-transition .ghost-btn,
  html.theme-transition .ghost-icon,
  html.theme-transition .primary-btn,
  html.theme-transition .theme-toggle,
  html.theme-transition .theme-toggle-track,
  html.theme-transition .theme-toggle-knob,
  html.theme-transition .mode-tab,
  html.theme-transition .floor-row,
  html.theme-transition .layer-row,
  html.theme-transition .tool-btn,
  html.theme-transition .panel-reopen,
  html.theme-transition .result-card,
  html.theme-transition .field,
  html.theme-transition .settings-field,
  html.theme-transition .collapsible-section,
  html.theme-transition .room-type-preset-card,
  html.theme-transition .uvalue-setpoint-card,
  html.theme-transition .material-card,
  html.theme-transition .settings-tooltip,
  html.theme-transition .settings-tooltip-bubble,
  html.theme-transition .alpha-preview-badge::after,
  html.theme-transition input,
  html.theme-transition select,
  html.theme-transition textarea,
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.01ms;
    transition-duration: 0.01ms;
  }
}

.left-rail,
.tool-palette,
.inspector,
.product-panel,
.pipe-panel,
.results-panel,
	.floor-plan-popover,
	.brand-menu-popover,
  .share-popover,
  .workspace-more-popover,
	.project-settings-popover,
	.methodology-popover,
	.history-popover,
  .export-popover,
  .product-library-popover {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.left-rail::-webkit-scrollbar,
.tool-palette::-webkit-scrollbar,
.inspector::-webkit-scrollbar,
.product-panel::-webkit-scrollbar,
.pipe-panel::-webkit-scrollbar,
.results-panel::-webkit-scrollbar,
	.floor-plan-popover::-webkit-scrollbar,
	.brand-menu-popover::-webkit-scrollbar,
  .workspace-more-popover::-webkit-scrollbar,
	.project-settings-popover::-webkit-scrollbar,
	.methodology-popover::-webkit-scrollbar,
	.history-popover::-webkit-scrollbar,
  .export-popover::-webkit-scrollbar,
  .product-library-popover::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.results-panel {
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
}

.product-panel {
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
}

.pipe-panel {
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
}

.product-selection-section {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.product-selection-card,
.product-selection-empty {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: var(--tile-glass);
  box-shadow: var(--glass-edge);
}

.product-selection-card strong,
.product-selection-empty strong {
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 820;
  overflow-wrap: anywhere;
}

.product-selection-card small,
.product-selection-empty span,
.product-selection-card em {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.product-selection-eyebrow {
  color: var(--accent);
  font-size: 10px;
  font-weight: 880;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.product-model-override {
  margin-top: 6px;
  grid-template-columns: 1fr;
}

.product-model-override select {
  width: 100%;
}

.product-static-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.28);
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
}

.product-static-row strong {
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
}

.product-toggle-switch {
  min-width: 0;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.34);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  box-shadow: var(--glass-edge);
  cursor: pointer;
}

.product-toggle-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.product-toggle-switch-track {
  position: relative;
  flex: 0 0 auto;
  width: 34px;
  height: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.38);
  transition: background 0.18s ease, border-color 0.18s ease;
}

.product-toggle-switch-track::after {
  content: "";
  position: absolute;
  left: 1px;
  top: 1px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.22);
  transition: transform 0.18s ease;
}

.product-toggle-switch input:checked + .product-toggle-switch-track {
  border-color: rgba(0, 122, 255, 0.68);
  background: rgba(0, 122, 255, 0.78);
}

.product-toggle-switch input:checked + .product-toggle-switch-track::after {
  transform: translateX(16px);
}

.product-toggle-switch-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-selection-facts {
  margin: 4px 0 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.product-selection-facts div {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px;
  border: 1px solid var(--glass-border);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.34);
}

.product-selection-facts dt {
  color: var(--muted);
  font-size: 9px;
  font-weight: 820;
  text-transform: uppercase;
}

.product-selection-facts dd {
  margin: 0;
  color: var(--text);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
  text-align: right;
}

.manifold-room-list {
  display: grid;
  gap: 7px;
  margin-top: 4px;
}

.manifold-room-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--glass-border);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.34);
}

.manifold-room-row input {
  accent-color: var(--accent);
}

.manifold-room-row span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.manifold-room-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manifold-loop-card {
  gap: 9px;
}

.manifold-loop-controls {
  margin-top: 6px;
}

.manifold-loop-controls .settings-field {
  min-width: 0;
}

.ufh-loop-breakdown {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}

.ufh-loop-card {
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.32);
}

.ufh-loop-card.blocked {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(254, 226, 226, 0.42);
}

.ufh-loop-card.limited {
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(255, 247, 237, 0.46);
}

.ufh-loop-card.blocked .ufh-loop-swatch {
  background: #ef4444;
}

.ufh-loop-card-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ufh-loop-card-head strong,
.ufh-loop-card-head small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ufh-loop-card-head small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.ufh-loop-swatch {
  width: 12px;
  height: 12px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  background: var(--ufh-loop-color, #f97316);
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.08);
}

.ufh-loop-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin: 0;
}

.ufh-loop-facts div {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--glass-border);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.28);
}

.ufh-loop-facts dt {
  color: var(--muted);
  font-size: 9px;
  font-weight: 820;
  text-transform: uppercase;
}

.ufh-loop-facts dd {
  margin: 0;
  color: var(--text);
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.manifold-load-checks .ufh-loop-facts div,
.ufh-circuit-breakdown .ufh-loop-facts div {
  display: grid;
  align-content: start;
  gap: 4px;
}

.manifold-load-checks .ufh-loop-facts dd,
.ufh-circuit-breakdown .ufh-loop-facts dd,
.manifold-changeover-card .product-selection-facts dd {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.ufh-loop-season-title {
  margin: 12px 0 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.pipe-fitting-card {
  overflow: hidden;
}

.pipe-fitting-subtitle {
  margin-top: 8px;
}

.pipe-fitting-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.pipe-fitting-summary span {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.24);
  color: var(--text);
  font-size: 10px;
  font-weight: 820;
  line-height: 1.2;
}

.pipe-fitting-table-wrap {
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.24);
}

.pipe-fitting-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 9px;
  color: var(--text);
}

.pipe-fitting-table .pipe-size-col {
  width: 18%;
}

.pipe-fitting-table .pipe-count-col {
  width: 8.2%;
}

.pipe-fitting-table th,
.pipe-fitting-table td {
  padding: 7px 4px;
  border-bottom: 1px solid var(--glass-border);
  text-align: center;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.pipe-fitting-table th:first-child,
.pipe-fitting-table td:first-child {
  text-align: left;
}

.pipe-fitting-table th {
  color: var(--muted);
  font-size: 7.6px;
  font-weight: 850;
  line-height: 1.08;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.pipe-fitting-table td {
  font-weight: 760;
}

.pipe-fitting-table tbody tr:last-child td {
  border-bottom: 0;
}

.pipe-fitting-table td strong,
.pipe-fitting-table td span {
  display: block;
  min-width: 0;
}

.pipe-fitting-table td strong {
  color: var(--text);
  font-size: 10px;
  font-weight: 850;
}

.pipe-fitting-table td span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 720;
}

.pipe-fitting-size-main {
  color: var(--text) !important;
  font-size: 9.5px !important;
  font-weight: 900 !important;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.pipe-fitting-size-meta {
  margin-top: 2px;
  color: var(--muted) !important;
  font-size: 8px !important;
  font-weight: 760 !important;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.fitting-count {
  display: inline-grid;
  width: 28px;
  max-width: 100%;
  height: 23px;
  place-items: center;
  border: 1px solid var(--glass-border);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.26);
  color: var(--muted);
  font-weight: 880;
}

.fitting-count.active {
  border-color: rgba(10, 132, 255, 0.34);
  background: rgba(10, 132, 255, 0.12);
  color: var(--accent);
}

.pipe-fitting-table td .fitting-count {
  display: inline-grid;
  margin-inline: auto;
  color: var(--muted);
  font-size: 9px;
  line-height: 1;
}

.pipe-fitting-table td .fitting-count.active {
  color: var(--accent);
}

html[data-theme="dark"] .pipe-fitting-table-wrap,
html[data-theme="dark"] .fitting-count {
  background: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .fitting-count.active {
  background: rgba(10, 132, 255, 0.18);
}

html[data-theme="dark"] .left-rail,
html[data-theme="dark"] .tool-palette,
html[data-theme="dark"] .inspector,
html[data-theme="dark"] .product-panel,
html[data-theme="dark"] .pipe-panel,
html[data-theme="dark"] .results-panel {
  background: var(--glass-strong);
  border-color: var(--glass-border);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .results-panel {
  border-left-color: var(--glass-border);
}

html[data-theme="dark"] .mode-tab.floor-plan-lock:hover {
  color: white;
}

html[data-theme="dark"] .product-toggle-switch {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .product-toggle-switch-track {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(148, 163, 184, 0.26);
}

html[data-theme="dark"] .product-toggle-switch input:checked + .product-toggle-switch-track {
  border-color: rgba(10, 132, 255, 0.72);
  background: rgba(10, 132, 255, 0.78);
}

html[data-theme="dark"] .topbar,
html[data-theme="dark"] .modebar,
html[data-theme="dark"] .bottombar {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.closed-panel {
  width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

.rail-section {
  padding: 12px 10px 8px;
  border-bottom: 1px solid var(--line);
}

.rail-title,
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 780;
}

.rail-title {
  gap: 6px;
}

.rail-title button,
.panel-head button {
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--muted);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.rail-toggle {
  min-width: 0;
  flex: 1;
  min-height: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 6px;
  color: #152033;
  font: inherit;
  text-align: left;
}

.rail-action {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  font-weight: 900;
}

.rail-title button:hover {
  border-color: var(--control-hover-border);
  background: var(--control-hover-bg);
  color: #374151;
  box-shadow: var(--control-hover-shadow);
  transform: translateY(-1px);
}

.rail-section.is-collapsed {
  padding-bottom: 10px;
}

.rail-section.is-collapsed > .rail-title {
  margin-bottom: 0;
}

.rail-section.is-collapsed .collapse-chevron {
  transform: rotate(-90deg);
}

.floor-row,
.layer-row {
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 13px;
  color: #26344c;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.floor-row + .floor-row,
.layer-row + .layer-row {
  margin-top: 5px;
}

.floor-row span,
.layer-row span:first-child {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.floor-row span span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.floor-row small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.floor-row svg,
.layer-row svg {
  width: 14px;
  height: 14px;
  color: #475569;
}

.layer-row .layer-google-earth-logo-frame {
  position: relative;
  display: inline-block;
  flex: 0 1 84px;
  width: 84px;
  max-width: 84px;
  height: 18px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 0;
  background: transparent;
  line-height: 0;
}

.layer-row .layer-google-earth-logo-frame img {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 84px;
  max-width: none;
  height: 84px;
  object-fit: contain;
  transform: translate(-50%, -50%);
}

.floor-row strong {
  color: #475569;
  font-size: 11px;
}

.floor-row.active {
  background: var(--blue-soft);
  border-color: var(--blue-border);
  color: #0057b8;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.56), 0 6px 16px rgba(0, 122, 255, 0.10);
}

.floor-row:not(.active):hover,
.layer-row:hover {
  border-color: var(--control-hover-border);
  background: var(--control-hover-bg);
  color: #374151;
  box-shadow: var(--control-hover-shadow);
  transform: translateY(-1px);
}

.floor-row:hover svg,
.layer-row:hover svg,
.floor-row:hover strong {
  color: #4b5563;
}

.layer-row .eye {
  color: var(--blue);
  font-size: 11px;
}

.layer-row.muted {
  color: #9aa5b4;
}

.layer-row .eye.off {
  color: #aab3c2;
}

.layer-row.locked {
  cursor: not-allowed;
  opacity: 0.72;
}

.layer-row.locked:hover {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.layer-premium-badge {
  flex: 0 0 auto;
  padding: 3px 6px;
  border: 1px solid rgba(10, 124, 255, 0.24);
  border-radius: 6px;
  background: rgba(10, 124, 255, 0.08);
  color: var(--blue);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.mini-wrap {
  border-bottom: 0;
}

.minimap {
  position: relative;
  height: 148px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--tile-glass);
  overflow: hidden;
  box-shadow: var(--glass-edge), 0 10px 24px rgba(0, 0, 0, 0.055);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.floor-plan-popover.floor-trace-review-popover {
  right: 14px;
  left: auto;
  width: min(460px, calc(100% - 28px));
  height: calc(100% - 28px);
  max-height: calc(100% - 28px);
  padding: 11px;
  background: rgba(248, 251, 255, 0.94);
}

.floor-trace-review-popover > .floor-trace-review {
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
}

.minimap svg {
  width: 100%;
  height: 100%;
}

.minimap svg {
  cursor: crosshair;
}

.mini-viewport {
  fill: rgba(0, 122, 255, 0.10);
  stroke: var(--blue);
  stroke-width: 3;
}

.mini-zoom {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: grid;
  gap: 4px;
}

.mini-zoom button {
  width: 26px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 4px;
  background: var(--button-glass);
  color: var(--text);
  box-shadow: var(--glass-edge), 0 5px 12px rgba(0, 0, 0, 0.06);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.mini-zoom button:hover {
  border-color: var(--control-hover-border);
  background: var(--control-hover-bg);
  color: #374151;
  box-shadow: var(--control-hover-shadow);
  transform: translateY(-1px);
}

.tool-palette {
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.tool-palette-head {
  min-height: 28px;
  display: flex;
  justify-content: flex-end;
}

.floor-selection-mode-control {
  width: 100%;
  display: grid;
  gap: 5px;
  padding: 5px;
  border: 1px solid rgba(0, 122, 255, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.floor-selection-mode-head {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  padding: 0 3px;
  color: var(--muted);
}

.floor-selection-mode-head span {
  min-width: 0;
  font-size: 9px;
  font-weight: 850;
  line-height: 1.2;
  text-transform: uppercase;
}

.floor-selection-mode-head small {
  min-width: 0;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.floor-selection-mode-options {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.floor-selection-mode-options .tool-btn {
  min-height: 42px;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  padding: 5px 3px;
  text-align: center;
}

.floor-selection-mode-options .tool-btn span {
  font-size: 10px;
  font-weight: 760;
  white-space: nowrap;
}

.tool-group {
  width: 100%;
  display: grid;
  gap: 6px;
  padding-top: 3px;
}

.tool-group-divider {
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, transparent, rgba(100, 116, 139, 0.34), transparent);
}

.tool-group-title {
  padding: 0 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}

.tool-palette.compact .tool-group {
  gap: 6px;
  padding-top: 4px;
}

.tool-palette.compact .tool-group-title {
  display: none;
}

.tool-palette.compact .tool-group-divider {
  margin: 3px 0;
  background: rgba(100, 116, 139, 0.34);
}

.tool-palette.compact .floor-selection-mode-control {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.tool-palette.compact .floor-selection-mode-head {
  display: none;
}

.tool-palette.compact .floor-selection-mode-options {
  grid-template-columns: 1fr;
  gap: 6px;
}

.tool-palette.compact .floor-selection-mode-options .tool-btn {
  min-height: 38px;
  flex-direction: row;
  padding: 0;
}

html[data-theme="dark"] .floor-selection-mode-control {
  border-color: rgba(125, 188, 255, 0.22);
  background: rgba(15, 23, 42, 0.46);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .tool-palette.compact .floor-selection-mode-control {
  background: transparent;
  box-shadow: none;
}

.tool-palette-toggle {
  width: 30px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: var(--radius);
  background: var(--button-glass);
  color: #475569;
  font-size: 18px;
  font-weight: 850;
  line-height: 1;
  box-shadow: var(--glass-edge), 0 6px 14px rgba(0, 0, 0, 0.055);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.tool-palette-toggle:hover {
  border-color: var(--control-hover-border);
  background: var(--control-hover-bg);
  color: #374151;
  box-shadow: var(--control-hover-shadow);
  transform: translateY(-1px);
}

.tool-slot {
  display: grid;
  width: 100%;
  gap: 5px;
}

.tool-palette.tools-swapping .tool-slot {
  animation: toolSlotSwapInUnlocked 240ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(var(--tool-index, 0) * 22ms);
}

.tool-palette.tool-mode-locked.tools-swapping .tool-slot {
  animation-name: toolSlotSwapInLocked;
}

.tool-palette.tools-swapping .tool-btn {
  transition-duration: 220ms;
}

@keyframes toolSlotSwapInUnlocked {
  from {
    opacity: 0;
    filter: blur(1px);
    transform: translateX(10px) scale(0.975);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateX(0) scale(1);
  }
}

@keyframes toolSlotSwapInLocked {
  from {
    opacity: 0;
    filter: blur(1px);
    transform: translateX(-10px) scale(0.975);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateX(0) scale(1);
  }
}

.tool-btn,
.upload-card {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 39px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: var(--radius);
  background: var(--button-glass);
  color: #243148;
  font-size: 12px;
  font-weight: 650;
  text-align: left;
  box-shadow: var(--glass-edge), 0 6px 16px rgba(0, 0, 0, 0.055);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.tool-btn svg,
.upload-card svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
}

.tool-btn span {
  min-width: 0;
  line-height: 1.12;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

/* Match the dashboard's compact actions. Keep selection labels at their
   smaller size and let wrapped drawing-tool names determine button height. */
.tool-palette .tool-btn {
  font-family: var(--font-ui);
  font-weight: 760;
  line-height: var(--leading-tight);
  height: auto;
  padding-block: 7px;
}

.tool-palette .tool-btn span {
  line-height: var(--leading-tight);
}

.tool-btn.active {
  border-color: var(--blue-border);
  background: var(--blue-soft);
  color: #0057b8;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.56), 0 6px 16px rgba(0, 122, 255, 0.10);
}

.tool-btn:not(.active):hover {
  border-color: var(--control-hover-border);
  background: var(--control-hover-bg);
  color: #374151;
  box-shadow: var(--control-hover-shadow);
  transform: translateY(-1px);
}

.tool-btn:hover svg {
  color: #4b5563;
}

@keyframes autoPipeGradientFlow {
  0%,
  100% {
    background-position: 0% 50%, 0% 50%;
  }
  50% {
    background-position: 0% 50%, 100% 50%;
  }
}

.tool-btn[data-tool="autoPipe"] {
  border-color: rgba(99, 102, 241, 0.42);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.22)),
    linear-gradient(120deg, rgba(10, 132, 255, 0.40), rgba(37, 99, 235, 0.34), rgba(124, 58, 237, 0.34), rgba(168, 85, 247, 0.24));
  background-size: 100% 100%, 240% 240%;
  color: #2242b5;
  animation: autoPipeGradientFlow 6.5s ease-in-out infinite;
  box-shadow: var(--glass-edge), 0 8px 18px rgba(79, 70, 229, 0.14);
}

.tool-btn[data-tool="autoPipe"]:not(.active):hover {
  border-color: rgba(124, 58, 237, 0.52);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.24)),
    linear-gradient(120deg, rgba(10, 132, 255, 0.48), rgba(37, 99, 235, 0.40), rgba(124, 58, 237, 0.42), rgba(168, 85, 247, 0.30));
  background-size: 100% 100%, 240% 240%;
  color: #1d35a8;
  box-shadow: var(--glass-edge), 0 10px 22px rgba(79, 70, 229, 0.18);
}

.tool-btn[data-tool="autoPipe"].active {
  border-color: rgba(168, 85, 247, 0.78);
  color: #ffffff;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04)),
    linear-gradient(120deg, #0a84ff, #2563eb, #7c3aed, #a855f7);
  background-size: 100% 100%, 260% 260%;
  animation: autoPipeGradientFlow 5s ease-in-out infinite;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34), 0 10px 22px rgba(79, 70, 229, 0.26);
}

.tool-palette.compact {
  padding: 8px 7px;
  gap: 6px;
  overflow: visible;
}

.tool-palette.compact .tool-palette-head {
  justify-content: center;
}

.tool-palette.compact .tool-palette-toggle {
  width: 100%;
  min-width: 0;
}

.tool-palette.compact .tool-slot {
  place-items: center;
}

.tool-palette.compact .tool-slot.expanded {
  gap: 0;
  position: relative;
}

.tool-palette.compact .tool-btn {
  width: 38px;
  min-height: 38px;
  justify-content: center;
  gap: 0;
  padding: 0;
}

.tool-palette.compact .tool-btn span {
  display: none;
}

.tool-palette.compact .tool-btn svg {
  width: 17px;
  height: 17px;
}

.tool-palette.compact .tool-btn::before,
.tool-palette.compact .tool-btn::after {
  position: absolute;
  top: 50%;
  left: calc(100% + 8px);
  z-index: 30;
  pointer-events: none;
  opacity: 0;
  transform: translate(-4px, -50%);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.tool-palette.compact .tool-btn::before {
  content: "";
  left: calc(100% + 3px);
  border: 5px solid transparent;
  border-right-color: var(--tooltip-arrow-bg);
}

.tool-palette.compact .tool-btn::after {
  content: attr(aria-label);
  min-width: max-content;
  max-width: 160px;
  padding: 5px 8px;
  border: 1px solid var(--tooltip-border);
  border-radius: 5px;
  background: var(--tooltip-bg);
  color: var(--tooltip-text);
  box-shadow: var(--tooltip-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  font-size: 11px;
  font-weight: 780;
  line-height: 1.15;
  white-space: nowrap;
}

.tool-palette.compact .tool-btn:hover::before,
.tool-palette.compact .tool-btn:hover::after,
.tool-palette.compact .tool-btn.show-tooltip::before,
.tool-palette.compact .tool-btn.show-tooltip::after,
.tool-palette.compact .tool-btn:focus::before,
.tool-palette.compact .tool-btn:focus::after,
.tool-palette.compact .tool-btn:focus-visible::before,
.tool-palette.compact .tool-btn:focus-visible::after {
  opacity: 1;
  transform: translate(0, -50%);
}

.door-type-options {
  box-sizing: border-box;
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: var(--radius);
  background: var(--tile-glass);
  box-shadow: var(--glass-edge), 0 8px 18px rgba(0, 0, 0, 0.045);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.tool-palette.compact .tool-slot.expanded .tool-btn::before,
.tool-palette.compact .tool-slot.expanded .tool-btn::after {
  display: none;
}

.tool-palette.compact .tool-btn[data-tool-preview]::before,
.tool-palette.compact .tool-btn[data-tool-preview]::after,
.plant-room-planner-sidebar .plant-room-tool-button[data-tool-preview]::before,
.plant-room-planner-sidebar .plant-room-tool-button[data-tool-preview]::after {
  display: none;
}

.tool-preview-popover {
  position: fixed;
  z-index: 10050;
  width: min(328px, calc(100vw - 20px));
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px) scale(0.98);
  transform-origin: left center;
  transition: opacity 0.14s ease, transform 0.14s ease;
  padding: 10px;
  border: 1px solid var(--tooltip-border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--tooltip-bg) 92%, var(--card) 8%);
  color: var(--tooltip-text);
  box-shadow: var(--tooltip-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.tool-preview-popover.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.tool-preview-popover[data-placement="left"] {
  transform-origin: right center;
}

.tool-preview-popover[data-placement="bottom"] {
  transform-origin: top center;
}

.tool-preview-popover::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -5px;
  width: 9px;
  height: 9px;
  border-left: 1px solid var(--tooltip-border);
  border-bottom: 1px solid var(--tooltip-border);
  background: color-mix(in srgb, var(--tooltip-bg) 92%, var(--card) 8%);
  transform: translateY(-50%) rotate(45deg);
}

.tool-preview-popover[data-placement="left"]::before {
  left: auto;
  right: -5px;
  border: 0;
  border-top: 1px solid var(--tooltip-border);
  border-right: 1px solid var(--tooltip-border);
}

.tool-preview-popover[data-placement="bottom"]::before {
  top: -5px;
  left: 50%;
  border: 0;
  border-top: 1px solid var(--tooltip-border);
  border-left: 1px solid var(--tooltip-border);
  transform: translateX(-50%) rotate(45deg);
}

.product-category-label-tooltip {
  position: fixed;
  z-index: 10060;
  max-width: min(240px, calc(100vw - 20px));
  padding: 8px 11px;
  border: 1px solid var(--tooltip-border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--tooltip-bg) 94%, var(--card) 6%);
  color: var(--tooltip-text);
  box-shadow: var(--tooltip-shadow);
  font-size: 12px;
  font-weight: 820;
  line-height: 1.2;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-4px) scale(0.98);
  transform-origin: left center;
  transition: opacity 0.13s ease, transform 0.13s ease, visibility 0s linear 0.13s;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.product-category-label-tooltip.visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
  transition-delay: 0s;
}

.product-category-label-tooltip[data-placement="left"] {
  transform-origin: right center;
}

.product-category-label-tooltip[data-placement="bottom"] {
  transform-origin: top center;
}

.product-category-label-tooltip::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -5px;
  width: 9px;
  height: 9px;
  border-left: 1px solid var(--tooltip-border);
  border-bottom: 1px solid var(--tooltip-border);
  background: color-mix(in srgb, var(--tooltip-bg) 94%, var(--card) 6%);
  transform: translateY(-50%) rotate(45deg);
}

.product-category-label-tooltip[data-placement="left"]::before {
  right: -5px;
  left: auto;
  border: 0;
  border-top: 1px solid var(--tooltip-border);
  border-right: 1px solid var(--tooltip-border);
}

.product-category-label-tooltip[data-placement="bottom"]::before {
  top: -5px;
  left: 50%;
  border: 0;
  border-top: 1px solid var(--tooltip-border);
  border-left: 1px solid var(--tooltip-border);
  transform: translateX(-50%) rotate(45deg);
}

@media (prefers-reduced-motion: reduce) {
  .product-category-label-tooltip {
    transition: none;
  }
}

.tool-preview-demo {
  height: 164px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--tooltip-border) 72%, transparent);
  border-radius: 11px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--line) 50%, transparent) 1px, transparent 1px),
    linear-gradient(color-mix(in srgb, var(--line) 50%, transparent) 1px, transparent 1px),
    linear-gradient(145deg, rgba(10, 132, 255, 0.08), rgba(168, 85, 247, 0.06));
  background-size: 18px 18px, 18px 18px, 100% 100%;
}

.tool-preview-popover strong,
.tool-preview-popover h3,
.tool-preview-popover p {
  line-height: var(--leading-normal);
}

.tool-preview-demo-svg {
  width: 100%;
  height: 100%;
  display: block;
  max-width: 100%;
  max-height: 100%;
  overflow: visible;
  --canvas-text-scale: 0.55;
}

.tool-preview-demo-svg * {
  pointer-events: none;
}

.tool-preview-demo-svg .demo-project-canvas {
  opacity: 1;
}

.tool-preview-demo-svg .room-canvas-label,
.tool-preview-demo-svg .demo-standard-plant-area,
.tool-preview-demo-svg .demo-standard-pipe,
.tool-preview-demo-svg:not(.demo-window) .wall-window,
.tool-preview-demo-svg:not(.demo-door) .wall-door,
.tool-preview-demo-svg:not(.demo-auto-pipe) .demo-standard-zone-node,
.tool-preview-demo-svg:not(.demo-auto-pipe) .demo-standard-emitter,
.tool-preview-demo-svg.demo-noise .demo-standard-room,
.tool-preview-demo-svg.demo-pan .demo-standard-room {
  display: none;
}

.tool-preview-demo-svg .demo-standard-room .room-fill {
  stroke: rgba(148, 163, 184, 0.28);
  stroke-width: 0.8;
}

.tool-preview-demo-svg .room-wall {
  vector-effect: non-scaling-stroke;
}

.tool-preview-demo-svg .cavity-wall-tie {
  stroke-width: 0.7;
  vector-effect: non-scaling-stroke;
}

.tool-preview-demo-svg .demo-standard-plant-area polygon,
.tool-preview-demo-svg .plant-room-area.demo-tool-action polygon {
  fill: rgba(34, 197, 94, 0.12);
  stroke: rgba(34, 197, 94, 0.78);
  stroke-dasharray: 5 4;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.tool-preview-demo-svg .demo-standard-plant-area text,
.tool-preview-demo-svg .plant-room-area.demo-tool-action text {
  fill: #15803d;
  font-size: 6.4px;
  font-weight: 900;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 2px;
}

.tool-preview-demo-svg .room-canvas-label text {
  stroke-width: 2px;
}

.tool-preview-demo-svg .room-name-label {
  font-size: 7px;
}

.tool-preview-demo-svg .room-area-label,
.tool-preview-demo-svg .room-heat-loss-label,
.tool-preview-demo-svg .room-heat-gain-label {
  font-size: 5.8px;
}

.tool-preview-demo-svg .demo-standard-pipe .drawn-pipe-line {
  opacity: 0.46;
  stroke-width: 2.5;
}

.tool-preview-demo-svg .drawn-pipe-run.demo-tool-action .drawn-pipe-line,
.tool-preview-demo-svg .drawn-pipe-run.demo-tool-action .pipe-draft-line {
  stroke-width: 4.2;
}

.tool-preview-demo-svg .pipe-vertex {
  stroke-width: 1.35;
}

.tool-preview-demo-svg .pipe-snap-target {
  fill: rgba(255, 255, 255, 0.38);
}

.tool-preview-demo-svg .demo-select-outline {
  fill: rgba(10, 132, 255, 0.08);
  stroke: #0a84ff;
  stroke-width: 1.6;
  stroke-dasharray: 5 3;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 4px 10px rgba(10, 132, 255, 0.22));
}

.tool-preview-demo-svg .demo-selection-grip {
  fill: #ffffff;
  stroke: #0a84ff;
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
}

.tool-preview-demo-svg .plant-room-node text,
.tool-preview-demo-svg .riser-node text {
  font-size: 6px;
  stroke-width: 1.7px;
}

.tool-preview-demo-svg .demo-standard-zone-node {
  opacity: 0.78;
}

.tool-preview-demo-svg .demo-standard-emitter {
  opacity: 0.76;
}

.tool-preview-demo-svg .radiator-body {
  fill: #111827;
  stroke: #60a5fa;
  stroke-width: 1.3;
  vector-effect: non-scaling-stroke;
}

.tool-preview-demo-svg .radiator-panel,
.tool-preview-demo-svg .radiator-connection-anchor {
  stroke: #93c5fd;
  vector-effect: non-scaling-stroke;
}

.tool-preview-demo-svg .radiator-panel {
  fill: none;
  stroke-width: 0.75;
}

.tool-preview-demo-svg .radiator-connection-anchor {
  fill: #ffffff;
  stroke-width: 1.2;
}

.tool-preview-demo-svg .floor-outlet .outlet-symbol-body {
  fill: rgba(219, 234, 254, 0.28);
  stroke: #0a84ff;
}

.tool-preview-demo-svg .floor-outlet .outlet-symbol-glyph {
  fill: none;
  stroke: #0f172a;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.tool-preview-demo-svg .floor-outlet .outlet-reference {
  font-size: 6.5px;
}

.tool-preview-demo-svg .drawn-duct-band {
  opacity: 0.95;
}

.tool-preview-demo-svg .plant-room-planner-equipment-body {
  fill: rgba(255, 255, 255, 0.94);
  stroke: rgba(0, 120, 255, 0.34);
  stroke-width: 1.3;
  vector-effect: non-scaling-stroke;
}

.tool-preview-demo-svg .floor-plan-dimension-label {
  fill: #374151;
  font-size: 7px;
  font-weight: 800;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 2px;
}

.tool-preview-demo-svg .drawing-note-select-box {
  fill: rgba(255, 255, 255, 0.88);
  stroke: rgba(10, 132, 255, 0.72);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.tool-preview-demo-svg .demo-note-pointer {
  fill: none;
  stroke: rgba(10, 132, 255, 0.78);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-dasharray: 5 4;
  vector-effect: non-scaling-stroke;
}

.tool-preview-demo-svg .demo-note-drop-target {
  fill: rgba(10, 132, 255, 0.13);
  stroke: rgba(10, 132, 255, 0.86);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.tool-preview-demo-svg .demo-note-edit-menu rect {
  fill: rgba(255, 255, 255, 0.94);
  stroke: rgba(148, 163, 184, 0.58);
  stroke-width: 1;
  filter: drop-shadow(0 8px 16px rgba(15, 23, 42, 0.16));
  vector-effect: non-scaling-stroke;
}

.tool-preview-demo-svg .demo-note-edit-menu text {
  fill: #1f2937;
  font-size: 8px;
  font-weight: 900;
}

.tool-preview-demo-svg .demo-note-colour-chip {
  stroke: rgba(255, 255, 255, 0.95);
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
}

.tool-preview-demo-svg .demo-note-colour-chip.service-heating {
  fill: #ef4444;
}

.tool-preview-demo-svg .demo-note-colour-chip.service-gas {
  fill: #f6c400;
}

.tool-preview-demo-svg .demo-note-stepper {
  fill: none;
  stroke: #0a84ff;
  stroke-width: 1.5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.tool-preview-demo-svg .demo-plan-paper {
  fill: rgba(248, 250, 252, 0.84);
  stroke: color-mix(in srgb, var(--tooltip-border) 86%, transparent);
  stroke-width: 1.5;
}

.tool-preview-demo-svg .demo-plan-grid-minor,
.tool-preview-demo-svg .demo-plan-grid-major {
  fill: none;
  pointer-events: none;
}

.tool-preview-demo-svg .demo-plan-grid-minor {
  stroke: rgba(148, 163, 184, 0.18);
  stroke-width: 0.75;
}

.tool-preview-demo-svg .demo-plan-grid-major {
  stroke: rgba(100, 116, 139, 0.24);
  stroke-width: 1.15;
}

.tool-preview-demo-svg .demo-project-canvas {
  opacity: 0.94;
}

.tool-preview-demo-svg .demo-room-zone {
  fill: rgba(210, 232, 245, 0.45);
  stroke: rgba(10, 132, 255, 0.55);
  stroke-width: 1.2;
}

.tool-preview-demo-svg .demo-room-zone.secondary {
  fill: rgba(226, 232, 240, 0.56);
}

.tool-preview-demo-svg .demo-plant-room {
  fill: rgba(34, 197, 94, 0.16);
  stroke: rgba(34, 197, 94, 0.72);
  stroke-dasharray: 5 4;
  stroke-width: 2;
}

.tool-preview-demo-svg .demo-real-wall {
  fill: none;
  stroke: #253142;
  stroke-width: 3.4;
  stroke-linejoin: round;
}

.tool-preview-demo-svg .demo-real-wall.active {
  stroke: #0a84ff;
  stroke-width: 4;
  filter: drop-shadow(0 5px 12px rgba(10, 132, 255, 0.24));
}

.tool-preview-demo-svg .demo-drawing-line {
  fill: none;
  stroke: #0a84ff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 4px 9px rgba(10, 132, 255, 0.22));
}

.tool-preview-demo-svg .demo-draw-handle {
  fill: rgba(255, 255, 255, 0.96);
  stroke: #0a84ff;
  stroke-width: 3;
  filter: drop-shadow(0 4px 8px rgba(10, 132, 255, 0.2));
}

.tool-preview-demo-svg .demo-window-marker {
  fill: rgba(186, 230, 253, 0.82);
  stroke: #0284c7;
  stroke-width: 2;
}

.tool-preview-demo-svg .demo-window-marker.active {
  fill: rgba(125, 211, 252, 0.95);
  filter: drop-shadow(0 4px 10px rgba(14, 165, 233, 0.28));
}

.tool-preview-demo-svg .demo-door-marker {
  fill: none;
  stroke: #64748b;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tool-preview-demo-svg .demo-door-marker.active {
  stroke: #0f172a;
  filter: drop-shadow(0 4px 10px rgba(15, 23, 42, 0.2));
}

.tool-preview-demo-svg .demo-opening-detail {
  fill: none;
  stroke: #0a84ff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tool-preview-demo-svg .demo-room-title {
  fill: #152033;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 3px;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0;
}

.tool-preview-demo-svg .demo-room-title.active {
  fill: #0a84ff;
}

.tool-preview-demo-svg .demo-room-load {
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.94);
  stroke-width: 2.6px;
  font-size: 7px;
  font-weight: 850;
  letter-spacing: 0;
}

.tool-preview-demo-svg .demo-room-load.heat {
  fill: #ef4444;
}

.tool-preview-demo-svg .demo-room-load.cool {
  fill: #0a84ff;
}

.tool-preview-demo-svg .demo-zone-node rect {
  fill: #ef4444;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 2.2;
}

.tool-preview-demo-svg .demo-zone-node path {
  fill: rgba(255, 255, 255, 0.95);
}

.tool-preview-copy {
  display: grid;
  gap: 4px;
  padding: 9px 3px 1px;
}

.tool-preview-copy strong {
  font-size: 13px;
  font-weight: 860;
  letter-spacing: 0;
  color: var(--tooltip-text);
}

.tool-preview-copy span {
  color: color-mix(in srgb, var(--tooltip-text) 74%, transparent);
  font-size: 11px;
  font-weight: 690;
  line-height: 1.35;
}

html[data-theme="dark"] .tool-preview-popover {
  border-color: rgba(148, 163, 184, 0.34);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(241, 245, 249, 0.88));
  color: #111827;
  box-shadow: var(--glass-edge), 0 18px 42px rgba(2, 6, 23, 0.34);
}

html[data-theme="dark"] .tool-preview-popover::before {
  border-color: rgba(148, 163, 184, 0.34);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(241, 245, 249, 0.88));
}

html[data-theme="dark"] .tool-preview-demo {
  border-color: rgba(148, 163, 184, 0.28);
}

html[data-theme="dark"] .tool-preview-copy strong {
  color: #111827;
  text-shadow: none;
}

html[data-theme="dark"] .tool-preview-copy span {
  color: #4b5563;
  text-shadow: none;
}

.tool-preview-demo-svg .demo-fill.cool {
  fill: rgba(10, 132, 255, 0.13);
}

.tool-preview-demo-svg .demo-fill.plant {
  fill: rgba(34, 197, 94, 0.16);
}

.tool-preview-demo-svg .demo-fill.window {
  fill: rgba(56, 189, 248, 0.22);
}

.tool-preview-demo-svg .demo-outline,
.tool-preview-demo-svg .demo-dash,
.tool-preview-demo-svg .demo-arc,
.tool-preview-demo-svg .demo-arrow,
.tool-preview-demo-svg .demo-grid,
.tool-preview-demo-svg .demo-wave {
  fill: none;
  stroke: color-mix(in srgb, var(--tooltip-text) 78%, transparent);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tool-preview-demo-svg .demo-outline.light {
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 3;
}

.tool-preview-demo-svg .demo-dash,
.tool-preview-demo-svg .demo-grid {
  stroke: color-mix(in srgb, var(--tooltip-text) 36%, transparent);
  stroke-width: 2.4;
}

.tool-preview-demo-svg .demo-wall {
  fill: none;
  stroke: #1f2937;
  stroke-width: 8;
  stroke-linecap: round;
}

.tool-preview-demo-svg .demo-pipe {
  fill: none;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tool-preview-demo-svg .demo-base-pipe {
  opacity: 0.42;
  stroke-width: 3.4;
}

.tool-preview-demo-svg .demo-pipe.thin {
  stroke-width: 5;
}

.tool-preview-demo-svg .demo-pipe.hot {
  stroke: #ef4444;
}

.tool-preview-demo-svg .demo-pipe.cold {
  stroke: #0a84ff;
}

.tool-preview-demo-svg .demo-pipe.neutral {
  stroke: #f97316;
}

.tool-preview-demo-svg .demo-node {
  fill: #334155;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 3;
}

.tool-preview-demo-svg .demo-node.zone {
  fill: #ef4444;
}

.tool-preview-demo-svg .demo-base-zone {
  opacity: 0.68;
}

.tool-preview-demo-svg .demo-node.small {
  fill: #0f172a;
  stroke-width: 2;
}

.tool-preview-demo-svg .demo-duct,
.tool-preview-demo-svg .demo-riser,
.tool-preview-demo-svg .demo-equipment {
  fill: #e2e8f0;
  stroke: #64748b;
  stroke-width: 3;
}

.tool-preview-demo-svg .demo-emitter {
  fill: #111827;
  stroke: #60a5fa;
  stroke-width: 3;
}

.tool-preview-demo-svg .demo-base-emitter {
  opacity: 0.52;
  stroke-width: 2.2;
}

.tool-preview-demo-svg .demo-basin,
.tool-preview-demo-svg .demo-diffuser,
.tool-preview-demo-svg .demo-note,
.tool-preview-demo-svg .demo-label {
  fill: rgba(255, 255, 255, 0.82);
  stroke: #94a3b8;
  stroke-width: 3;
}

.tool-preview-demo-svg .demo-valve {
  fill: rgba(255, 255, 255, 0.85);
  stroke: #ef4444;
  stroke-width: 4;
  stroke-linejoin: round;
}

.tool-preview-demo-svg .demo-barrier {
  fill: #94a3b8;
}

.tool-preview-demo-svg .demo-source {
  fill: #f97316;
}

.tool-preview-demo-svg .demo-receptor {
  fill: #22c55e;
}

.tool-preview-demo-svg .demo-wave {
  stroke: rgba(249, 115, 22, 0.56);
  stroke-width: 3;
}

.tool-preview-demo-svg .demo-cursor {
  fill: #111827;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 2;
  stroke-linejoin: round;
}

.tool-preview-demo-svg .demo-cursor-live {
  filter: drop-shadow(0 6px 10px rgba(15, 23, 42, 0.28));
}

.tool-preview-demo-svg .demo-click-ring {
  fill: none;
  stroke: #0a84ff;
  stroke-width: 2.5;
  transform-box: fill-box;
  transform-origin: center;
  animation: toolPreviewClick 2.8s ease-in-out infinite;
}

.tool-preview-demo-svg .demo-live-path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: toolPreviewTrace 2.8s ease-in-out infinite;
}

.tool-preview-demo-svg .demo-live-path.delay-1 {
  animation-delay: 0.18s;
}

.tool-preview-demo-svg .demo-live-path.delay-2 {
  animation-delay: 0.36s;
}

.tool-preview-demo-svg .demo-object-pop {
  animation: toolPreviewObjectPop 2.8s ease-in-out infinite;
}

.tool-preview-demo-svg .demo-object-pop.delay-1 {
  animation-delay: 0.28s;
}

.tool-preview-demo-svg .demo-object-pop.delay-2 {
  animation-delay: 0.5s;
}

.tool-preview-demo-svg .demo-mini-label {
  fill: color-mix(in srgb, var(--tooltip-text) 88%, transparent);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0;
}

.tool-preview-demo-svg .demo-plant-label {
  fill: #16a34a;
  font-size: 7px;
}

.tool-preview-demo-svg .demo-typing {
  animation: toolPreviewTyping 2.8s steps(3, end) infinite;
}

.tool-preview-demo-svg .demo-pan-map {
  transform-box: fill-box;
  transform-origin: center;
  animation: toolPreviewPan 2.8s ease-in-out infinite;
}

@keyframes toolPreviewTrace {
  0%,
  12% {
    stroke-dashoffset: 1;
    opacity: 0.18;
  }
  45%,
  76% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 0.5;
  }
}

@keyframes toolPreviewObjectPop {
  0%,
  22% {
    opacity: 0;
    filter: saturate(0.92);
  }
  42%,
  82% {
    opacity: 1;
    filter: saturate(1.12);
  }
  100% {
    opacity: 0.72;
    filter: saturate(1);
  }
}

@keyframes toolPreviewClick {
  0%,
  66%,
  100% {
    opacity: 0;
    transform: scale(0.45);
  }
  74% {
    opacity: 0.9;
    transform: scale(0.85);
  }
  84% {
    opacity: 0.85;
    transform: scale(1.18);
  }
  94% {
    opacity: 0;
    transform: scale(1.85);
  }
}

@keyframes toolPreviewTyping {
  0%,
  26% {
    opacity: 0.25;
  }
  64%,
  100% {
    opacity: 1;
  }
}

@keyframes toolPreviewPan {
  0%,
  100% {
    transform: translate(0, 0);
  }
  45%,
  76% {
    transform: translate(-8px, 5px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tool-preview-demo-svg .demo-click-ring,
  .tool-preview-demo-svg .demo-live-path,
  .tool-preview-demo-svg .demo-object-pop,
  .tool-preview-demo-svg .demo-typing,
  .tool-preview-demo-svg .demo-pan-map {
    animation: none;
  }

  .tool-preview-demo-svg .demo-live-path {
    stroke-dashoffset: 0;
  }
}

.tool-palette.compact .door-type-options {
  position: absolute;
  top: 0;
  left: 100%;
  right: auto;
  z-index: 120;
  width: 160px;
  margin-left: 10px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.9);
  justify-self: start;
}

.door-type-option {
  box-sizing: border-box;
  width: 100%;
  min-height: 30px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  padding: 0 7px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #334155;
  font-size: 11px;
  font-weight: 760;
  text-align: left;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.door-type-option small {
  color: #64748b;
  font-size: 9px;
  font-weight: 800;
}

.door-type-empty-note {
  padding: 9px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.34);
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  line-height: 1.3;
}

.heat-emitter-type-options {
  min-width: 0;
  max-height: min(32vh, calc(100dvh - 220px), 320px);
  overflow-y: auto;
}

.tool-palette.compact .heat-emitter-type-options {
  position: absolute;
  top: 0;
  left: 100%;
  right: auto;
  z-index: 120;
  width: min(260px, calc(100vw - 96px));
  max-height: min(56vh, calc(100dvh - 160px), 520px);
  margin-left: 10px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.9);
  justify-self: start;
}

.tool-palette:not(.compact) .heat-emitter-type-options {
  justify-self: stretch;
  width: 100%;
  max-width: 100%;
}

.outlet-type-options {
  width: min(290px, calc(100vw - 32px));
  max-height: min(34vh, calc(100dvh - 220px), 320px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.tool-palette.compact .outlet-type-options {
  width: min(300px, calc(100vw - 96px));
  max-height: min(38vh, calc(100dvh - 220px), 360px);
}

.tool-palette:not(.compact) .outlet-type-options {
  justify-self: stretch;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.outlet-type-option {
  min-height: 38px;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  line-height: 1.15;
}

.outlet-type-option span {
  display: block;
  min-width: 0;
}

.outlet-type-option span svg {
  display: none;
}

.outlet-type-option strong {
  display: block;
  min-width: 0;
  color: inherit;
  font-size: 11px;
  font-weight: 820;
  line-height: 1.15;
  white-space: normal;
  overflow-wrap: anywhere;
}

.outlet-type-option small {
  justify-self: end;
  align-self: center;
  min-width: 42px;
  text-align: right;
  white-space: nowrap;
  font-size: 10px;
}

.outlet-custom-create-option {
  border-top: 1px solid var(--line);
  margin-top: 2px;
}

.valve-type-options {
  width: min(320px, calc(100vw - 32px));
  min-width: 0;
  max-height: min(42vh, calc(100dvh - 220px), 430px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.tool-palette:not(.compact) .valve-type-options {
  justify-self: stretch;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.tool-palette.compact .valve-type-options {
  width: min(240px, calc(100vw - 96px));
  max-height: min(46vh, calc(100dvh - 200px), 440px);
}

.valve-type-category {
  display: none;
  padding: 8px 9px 3px;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.valve-type-option {
  min-width: 0;
  min-height: 36px;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  line-height: 1.12;
}

.valve-type-option span {
  display: block;
  min-width: 0;
}

.valve-type-option span svg {
  display: none;
}

.valve-type-option strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: 11px;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.valve-type-option small {
  justify-self: end;
  min-width: 34px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  text-align: right;
  white-space: nowrap;
}

.zone-node-type-options {
  width: 100%;
}

.tool-palette.compact .zone-node-type-options {
  width: 220px;
}

.zone-node-type-option {
  min-height: 34px;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
}

.zone-node-type-option small {
  white-space: normal;
}

.door-type-options,
.heat-emitter-type-options,
.outlet-type-options,
.valve-type-options,
.zone-node-type-options {
  overscroll-behavior: contain;
  pointer-events: auto;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--blue) 42%, var(--line)) transparent;
}

.door-type-options::-webkit-scrollbar,
.heat-emitter-type-options::-webkit-scrollbar,
.outlet-type-options::-webkit-scrollbar,
.valve-type-options::-webkit-scrollbar,
.zone-node-type-options::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

.door-type-options::-webkit-scrollbar-track,
.heat-emitter-type-options::-webkit-scrollbar-track,
.outlet-type-options::-webkit-scrollbar-track,
.valve-type-options::-webkit-scrollbar-track,
.zone-node-type-options::-webkit-scrollbar-track {
  background: transparent;
}

.door-type-options::-webkit-scrollbar-thumb,
.heat-emitter-type-options::-webkit-scrollbar-thumb,
.outlet-type-options::-webkit-scrollbar-thumb,
.valve-type-options::-webkit-scrollbar-thumb,
.zone-node-type-options::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: color-mix(in srgb, var(--blue) 38%, var(--line));
}

.heat-emitter-type-option:not(.active):hover,
.outlet-type-option:not(.active):hover,
.valve-type-option:not(.active):hover,
.zone-node-type-option:not(.active):hover {
  border-color: var(--control-hover-border);
  background: var(--control-hover-bg);
  color: #374151;
  box-shadow: var(--control-hover-shadow);
  transform: translateY(-1px);
}

.heat-emitter-type-option span {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.heat-emitter-type-option,
.valve-type-option {
  grid-template-columns: minmax(0, 1fr);
}

.duct-inline-component-type-option {
  grid-template-columns: minmax(0, 1fr) max-content;
}

.heat-emitter-type-option span svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

.heat-emitter-type-option span {
  white-space: normal;
}

.door-type-option.active {
  border-color: var(--blue-border);
  background: var(--blue-soft);
  color: #0057b8;
  box-shadow: var(--glass-edge), 0 5px 12px rgba(0, 122, 255, 0.08);
}

.door-type-option:not(.active):hover {
  border-color: var(--control-hover-border);
  background: var(--control-hover-bg);
  color: #374151;
  box-shadow: var(--control-hover-shadow);
  transform: translateY(-1px);
}

.floor-setup-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  margin-top: 6px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: var(--radius);
  background: var(--tile-glass);
  box-shadow: var(--glass-edge), 0 8px 20px rgba(0, 0, 0, 0.045);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.floor-setup-card label {
  display: grid;
  gap: 4px;
  color: #334155;
  font-size: 11px;
  font-weight: 760;
}

.floor-setup-card select,
.floor-setup-card input {
  width: 100%;
  height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--input-glass);
  color: var(--text);
  padding: 0 7px;
  font-size: 12px;
  font-weight: 650;
  box-shadow: var(--glass-edge), 0 1px 2px rgba(0, 0, 0, 0.035);
}

.floor-setup-card > small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
}

.mini-input-unit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px;
  align-items: center;
  gap: 5px;
}

.mini-input-unit small {
  color: var(--muted);
  font-size: 10px;
}

.upload-card {
  min-height: 76px;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  margin-top: 6px;
  cursor: pointer;
  background: var(--tile-glass-strong);
  box-shadow: var(--glass-edge), 0 10px 24px rgba(0, 0, 0, 0.06);
}

.upload-card small {
  max-width: 100%;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
}

.canvas-stage {
  position: relative;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0)),
    #ebedf0;
  border-radius: var(--radius);
}

html[data-theme="dark"] .canvas-stage {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0)),
    #ebedf0;
}

.three-stage {
  grid-template-rows: minmax(0, 1fr) 28px;
}

.three-workspace {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  margin: 14px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 10px;
  background:
    radial-gradient(circle at 22% 18%, rgba(0, 122, 255, 0.16), transparent 28%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.08));
  box-shadow: var(--glass-edge), 0 20px 56px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(26px) saturate(170%);
  -webkit-backdrop-filter: blur(26px) saturate(170%);
}

html[data-theme="dark"] .three-workspace {
  border-color: rgba(239, 246, 255, 0.16);
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.05), transparent 32%),
    linear-gradient(145deg, rgba(39, 40, 45, 0.32), rgba(6, 7, 9, 0.18));
  box-shadow: var(--glass-edge), 0 24px 64px rgba(0, 0, 0, 0.38);
}

.three-canvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  cursor: grab;
}

.three-canvas:active {
  cursor: grabbing;
}

.google-earth-3d-buildings-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: var(--google-earth-3d-opacity, 0.65);
  pointer-events: auto;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(219, 234, 254, 0.45), rgba(240, 249, 255, 0.18)),
    #dbeafe;
}

.google-earth-3d-buildings-layer gmp-map-3d {
  pointer-events: auto;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}

.google-earth-3d-buildings-layer gmp-map-3d:active {
  cursor: grabbing;
}

.three-workspace[data-google-earth-3d-mode="photorealistic"] .google-earth-3d-buildings-layer {
  pointer-events: auto;
  /* Model3DElement and the imagery share one Maps compositor. Fading this
     container also fades the building, washing out its PBR shading. Keep the
     native Earth scene opaque; the same control still applies to the 2D map. */
  opacity: 1;
}

.three-workspace[data-google-earth-3d-mode="photorealistic"] .google-earth-3d-buildings-layer gmp-map-3d {
  pointer-events: auto;
}

.three-workspace[data-google-earth-3d-mode="photorealistic"] .three-canvas {
  z-index: 3;
  display: none;
  opacity: 0;
  pointer-events: none;
}

.google-earth-3d-buildings-layer[data-google-earth-3d-buildings="loading"],
.google-earth-3d-buildings-layer[data-google-earth-3d-buildings="missing-query"],
.google-earth-3d-buildings-layer[data-google-earth-3d-buildings="missing-key"],
.google-earth-3d-buildings-layer[data-google-earth-3d-buildings="locked"],
.google-earth-3d-buildings-layer[data-google-earth-3d-buildings="error"] {
  z-index: 3;
  display: grid;
  place-items: center;
  background: rgba(248, 250, 252, 0.72);
}

.google-earth-3d-buildings-status {
  max-width: min(360px, calc(100% - 32px));
  padding: 12px 16px;
  border: 1px solid rgba(147, 197, 253, 0.78);
  border-radius: 8px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  text-align: center;
}

.google-earth-3d-buildings-status strong {
  font-size: 13px;
  font-weight: 850;
}

html[data-theme="dark"] .google-earth-3d-buildings-layer {
  background:
    linear-gradient(145deg, rgba(15, 23, 42, 0.62), rgba(2, 6, 23, 0.2)),
    #0f172a;
}

html[data-theme="dark"] .google-earth-3d-buildings-layer[data-google-earth-3d-buildings="loading"],
html[data-theme="dark"] .google-earth-3d-buildings-layer[data-google-earth-3d-buildings="missing-query"],
html[data-theme="dark"] .google-earth-3d-buildings-layer[data-google-earth-3d-buildings="missing-key"],
html[data-theme="dark"] .google-earth-3d-buildings-layer[data-google-earth-3d-buildings="locked"],
html[data-theme="dark"] .google-earth-3d-buildings-layer[data-google-earth-3d-buildings="error"] {
  background: rgba(15, 23, 42, 0.76);
}

html[data-theme="dark"] .google-earth-3d-buildings-status {
  border-color: rgba(96, 165, 250, 0.5);
  color: #e5edf8;
  background: rgba(15, 23, 42, 0.86);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.38);
}

/* Shared overlay layout: independent absolute corners caused display menus,
   map alignment and heat-map keys to cover one another. Keep cards in flow. */
.three-workspace,
.plant-room-planner-3d-workspace {
  container-type: inline-size;
}

.three-overlay-layout {
  position: absolute;
  z-index: 12;
  inset: 14px var(--three-visibility-screen-inset, 56px) 14px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 370px);
  gap: 12px;
  min-width: 0;
  min-height: 0;
  pointer-events: none;
}

.three-context-dock,
.three-overlay-dock {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  pointer-events: none;
}

.three-context-dock {
  align-self: start;
  width: min(520px, 100%);
  overflow: auto;
  overscroll-behavior: contain;
}

.three-overlay-dock {
  align-self: end;
}

/* Leave the native map's attribution strip clear. */
.three-workspace[data-google-earth-3d-mode="photorealistic"] .three-overlay-layout,
.plant-room-planner-3d-workspace.has-google-earth-3d .three-overlay-layout {
  bottom: 32px;
}

:is(.three-workspace, .plant-room-planner-3d-workspace) .three-overlay-layout > .three-context-dock > :is(.three-hud, .plant-room-planner-3d-hud, .google-earth-underlay-controls),
:is(.three-workspace, .plant-room-planner-3d-workspace) .three-overlay-layout > .three-overlay-dock > :is(.three-visibility-controls, .network-performance-heat-map-legend) {
  position: static;
  inset: auto;
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  margin: 0;
  pointer-events: auto;
}

:is(.three-workspace, .plant-room-planner-3d-workspace) .three-overlay-layout > .three-context-dock > :is(.three-hud, .plant-room-planner-3d-hud) {
  display: grid;
  grid-template-columns: repeat(var(--three-summary-columns, 3), minmax(0, 1fr));
  flex: none;
}

.three-overlay-layout :is(.three-hud, .plant-room-planner-3d-hud) > div:first-child {
  grid-column: 1 / -1;
}

:is(.three-workspace, .plant-room-planner-3d-workspace) .three-overlay-layout > .three-context-dock > .google-earth-underlay-controls {
  flex: none;
  width: min(260px, 100%);
}

:is(.three-workspace, .plant-room-planner-3d-workspace) .three-overlay-layout > .three-overlay-dock > .three-visibility-controls {
  flex: 0 1 auto;
  min-height: 76px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
}

:is(.three-workspace, .plant-room-planner-3d-workspace) .three-overlay-layout > .three-overlay-dock > .network-performance-heat-map-legend {
  flex: 0 0 auto;
  min-height: 64px;
  max-height: min(180px, 40%);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.three-overlay-layout .three-visibility-head {
  position: sticky;
  top: -12px;
  z-index: 1;
  padding-block: 6px;
  background: #f4f7fb;
}

html[data-theme="dark"] .three-overlay-layout .three-visibility-head {
  background: #1e293b;
}

.plant-room-planner-canvas.has-right-panel .three-overlay-layout {
  right: max(var(--three-visibility-screen-inset, 56px), var(--plant-room-right-panel-reserve, 340px));
}

@media (max-width: 820px) {
  /* The plant-room inspector already reserves the upper portion on phones. */
  .plant-room-planner-canvas.has-right-panel .three-overlay-layout {
    inset: auto 10px 32px;
    height: 178px;
    max-height: calc(100% - 28px);
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
  }

  .plant-room-planner-canvas.has-right-panel .three-overlay-layout > .three-context-dock {
    display: none;
  }
}

@container (max-width: 760px) {
  .three-overlay-layout {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
  }

  .three-context-dock {
    flex: 0 1 auto;
    align-self: stretch;
    width: 100%;
    max-height: 28%;
  }

  .three-overlay-dock {
    flex: 0 1 auto;
    width: min(370px, 100%);
    margin-top: auto;
  }

  .three-overlay-dock .room-demand-heat-map-legend .network-performance-heat-map-note {
    display: none;
  }
}

/* Three well-spaced anchors leave room for the unit on the end tick. */
.three-overlay-dock .room-demand-heat-map-legend .has-positioned-ticks > span:nth-child(2),
.three-overlay-dock .room-demand-heat-map-legend .has-positioned-ticks > span:nth-child(4) {
  display: none;
}

.three-hud,
.three-visibility-controls,
.three-empty {
  position: absolute;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.22);
  box-shadow: var(--glass-edge), 0 14px 32px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(24px) saturate(165%);
  -webkit-backdrop-filter: blur(24px) saturate(165%);
}

html[data-theme="dark"] .three-hud,
html[data-theme="dark"] .three-visibility-controls,
html[data-theme="dark"] .three-empty {
  border-color: rgba(239, 246, 255, 0.16);
  background: rgba(14, 15, 18, 0.36);
  box-shadow: var(--glass-edge), 0 16px 38px rgba(0, 0, 0, 0.34);
}

.three-hud {
  top: 14px;
  left: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(86px, auto));
  gap: 8px;
  padding: 8px;
  border-radius: 10px;
}

.three-hud > div {
  min-width: 0;
  padding: 8px 10px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.26);
}

html[data-theme="dark"] .three-hud > div {
  background: rgba(255, 255, 255, 0.055);
}

.three-hud span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.three-hud strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.three-hud .loss strong {
  color: var(--heat-loss);
}

.three-hud .gain strong {
  color: var(--heat-gain);
}

.three-visibility-controls {
  right: var(--three-visibility-screen-inset, 56px);
  bottom: 14px;
  box-sizing: border-box;
  width: min(430px, calc(100vw - 112px));
  max-width: min(430px, calc(100vw - 112px));
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px;
  border-radius: 14px;
  overflow: hidden;
}

.three-visibility-title {
  align-self: center;
  box-sizing: border-box;
  width: 92px;
  max-width: 92px;
  padding: 6px 7px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  color: var(--muted);
  font-size: 10px;
  font-weight: 820;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-align: center;
  white-space: normal;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.three-visibility-title:hover {
  border-color: rgba(0, 122, 255, 0.44);
  background: rgba(255, 255, 255, 0.34);
  color: var(--text);
}

.three-visibility-controls.collapsed {
  width: min(380px, calc(100vw - 112px));
  display: grid;
  grid-template-columns: minmax(68px, 82px) repeat(var(--three-visibility-toggle-count, 3), minmax(54px, 62px));
  align-items: center;
  gap: 6px;
  padding: 7px;
  border-radius: 16px;
}

.three-visibility-controls.collapsed .three-visibility-title {
  width: auto;
  min-width: 0;
  max-width: none;
  padding: 6px 8px;
  border-radius: 999px;
  font-size: 9px;
  letter-spacing: 0;
  line-height: 1.08;
  white-space: normal;
  overflow: hidden;
}

.three-visibility-compact-toggle {
  display: grid;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  padding: 5px 6px;
}

.three-visibility-compact-toggle span {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 820;
  text-transform: uppercase;
  letter-spacing: 0;
  white-space: nowrap;
}

.three-visibility-compact-toggle strong {
  min-width: 32px;
  justify-self: center;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
}

.three-visibility-compact-toggle.active strong {
  background: rgba(0, 122, 255, 0.15);
  color: #0057b8;
}

.three-visibility-control {
  display: grid;
  grid-template-rows: auto 88px auto;
  justify-items: center;
  gap: 6px;
  min-width: 62px;
  padding: 6px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.16);
}

.three-visibility-control-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  min-height: 28px;
  padding: 6px 8px;
  border: 1px solid rgba(0, 122, 255, 0.34);
  border-radius: 999px;
  background: rgba(0, 122, 255, 0.12);
  color: #0057b8;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.05;
  text-align: center;
}

.three-visibility-map-control {
  border-color: rgba(0, 122, 255, 0.28);
  background: rgba(239, 246, 255, 0.22);
}

.three-visibility-controls button {
  min-width: 54px;
  padding: 6px 10px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.three-visibility-controls button:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 122, 255, 0.44);
  color: var(--text);
  background: rgba(255, 255, 255, 0.36);
}

.three-visibility-controls button.active {
  border-color: var(--blue-border);
  background: rgba(0, 122, 255, 0.15);
  color: #0057b8;
}

.three-visibility-controls.collapsed .three-visibility-compact-toggle {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto;
  justify-items: center;
  gap: 3px;
  padding: 5px 6px;
}

.three-visibility-controls.collapsed .three-visibility-compact-toggle span {
  overflow: visible;
  font-size: 9px;
  line-height: 1;
  text-overflow: clip;
}

.three-visibility-controls.collapsed .three-visibility-compact-toggle strong {
  min-width: 30px;
  padding: 3px 6px;
  font-size: 10px;
}

html[data-theme="dark"] .three-visibility-controls button {
  border-color: rgba(239, 246, 255, 0.14);
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted);
}

html[data-theme="dark"] .three-visibility-controls button:hover {
  border-color: rgba(10, 132, 255, 0.48);
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
}

html[data-theme="dark"] .three-visibility-controls button.active {
  border-color: rgba(10, 132, 255, 0.62);
  background: rgba(10, 132, 255, 0.18);
  color: #7bb8ff;
}

html[data-theme="dark"] .three-visibility-title {
  border-color: rgba(239, 246, 255, 0.14);
  background: rgba(255, 255, 255, 0.055);
}

html[data-theme="dark"] .three-visibility-title:hover {
  border-color: rgba(10, 132, 255, 0.48);
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
}

html[data-theme="dark"] .three-visibility-compact-toggle.active strong {
  background: rgba(10, 132, 255, 0.18);
  color: #7bb8ff;
}

.three-opacity-slider {
  width: 22px;
  height: 88px;
  margin: 0;
  writing-mode: vertical-lr;
  direction: rtl;
  accent-color: var(--blue);
  cursor: ns-resize;
}

.three-opacity-slider:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.three-visibility-control strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
}

html[data-theme="dark"] .three-visibility-control {
  border-color: rgba(239, 246, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .three-visibility-control strong {
  color: #f8fafc;
}

html[data-theme="dark"] .three-visibility-control-label {
  border-color: rgba(10, 132, 255, 0.46);
  background: rgba(10, 132, 255, 0.18);
  color: #7bb8ff;
}

html[data-theme="dark"] .three-visibility-map-control {
  border-color: rgba(10, 132, 255, 0.24);
  background: rgba(10, 132, 255, 0.08);
}

@media (max-width: 900px), (max-height: 720px) {
  .three-visibility-controls {
    right: var(--three-visibility-screen-inset, 40px);
    bottom: 10px;
    width: min(360px, calc(100vw - 80px));
    max-width: min(360px, calc(100vw - 80px));
    gap: 6px;
    padding: 6px;
  }

  .three-visibility-title {
    width: 76px;
    max-width: 76px;
    padding: 6px;
    font-size: 9px;
    letter-spacing: 0;
  }

  .three-visibility-control {
    grid-template-rows: auto 74px auto;
    min-width: 54px;
    padding: 5px;
  }

  .three-opacity-slider {
    height: 74px;
  }

  .three-visibility-controls.collapsed {
    width: min(350px, calc(100vw - 80px));
    grid-template-columns: minmax(62px, 74px) repeat(var(--three-visibility-toggle-count, 3), minmax(50px, 56px));
  }

  .three-visibility-controls.collapsed .three-visibility-title {
    font-size: 8.5px;
  }

  .three-visibility-compact-toggle {
    gap: 2px;
    padding: 5px;
  }

  .three-visibility-compact-toggle span {
    font-size: 9px;
  }
}

/* Compact 3D display panel: view mode first, then simple horizontal visibility rows. */
.three-visibility-controls,
.three-visibility-controls.collapsed {
  z-index: 6;
  right: var(--three-visibility-screen-inset, 56px);
  bottom: 14px;
  box-sizing: border-box;
  width: min(350px, calc(100vw - 112px));
  max-width: min(350px, calc(100vw - 112px));
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  justify-content: stretch;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  overflow: hidden;
}

.three-visibility-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.three-visibility-title,
.three-visibility-controls.collapsed .three-visibility-title {
  width: auto;
  max-width: none;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: default;
}

.three-visibility-title:hover {
  border-color: transparent;
  background: transparent;
  color: var(--text);
}

.three-visibility-title strong,
.three-visibility-title span {
  display: block;
}

.three-visibility-title strong {
  font-size: 12px;
  font-weight: 860;
  letter-spacing: 0.01em;
  text-transform: none;
}

.three-visibility-title span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: none;
}

.three-visibility-controls .three-visibility-collapse {
  display: inline-grid;
  width: 28px;
  min-width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  border-radius: 8px;
}

.three-visibility-collapse svg {
  width: 14px;
  height: 14px;
}

.three-view-switch {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.12);
}

.three-presentation-controls { display: grid; gap: 5px; padding: 6px 0; }
.three-presentation-controls > span { font-size: 11px; font-weight: 700; color: var(--muted); }
.three-presentation-controls > small { font-size: 10px; line-height: 1.4; color: var(--muted); }
.three-presentation-switch { grid-template-columns: 1fr 1fr; }

.three-visibility-controls .three-view-switch button {
  min-width: 0;
  min-height: 31px;
  padding: 6px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  font-size: 11px;
  font-weight: 820;
  transform: none;
}

.three-visibility-controls .three-view-switch button:hover {
  border: 0;
  background: rgba(255, 255, 255, 0.28);
  transform: none;
}

.three-visibility-controls .three-view-switch button.active {
  border: 0;
  background: rgba(255, 255, 255, 0.76);
  color: #0057b8;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
}

.three-view-switch .three-view-premium-badge {
  margin-left: 4px;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(0, 122, 255, 0.12);
  color: #0057b8;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.three-view-switch button[data-three-google-earth-mode="earth"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.three-view-switch button .google-earth-logo-frame {
  position: relative;
  display: inline-block;
  flex: 0 1 118px;
  width: 118px;
  max-width: 118px;
  height: 24px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 0;
  background: transparent;
  line-height: 0;
}

.three-view-switch .google-earth-logo-frame img {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 118px;
  max-width: none;
  height: 118px;
  object-fit: contain;
  transform: translate(-50%, -50%);
}

.three-visibility-controls .three-view-switch button.locked {
  opacity: 0.64;
}

.three-visibility-list {
  display: grid;
  gap: 5px;
}

.three-visibility-control,
.three-visibility-map-control {
  box-sizing: border-box;
  min-width: 0;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 40px;
  grid-template-rows: auto;
  align-items: center;
  justify-items: stretch;
  gap: 8px;
  padding: 5px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.12);
}

.three-visibility-controls .three-visibility-control > button,
.three-visibility-control-label {
  box-sizing: border-box;
  min-width: 0;
  min-height: 28px;
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}

.three-visibility-control-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-color: rgba(0, 122, 255, 0.24);
}

.three-visibility-site-note {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.three-earth-control-hint {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  padding: 6px 8px;
  border: 1px solid rgba(100, 116, 139, 0.22);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.68);
  color: #475569;
  font-size: 9px;
  font-weight: 720;
  line-height: 1.25;
}

.three-earth-control-hint strong {
  color: #0f172a;
  font-weight: 900;
}

.three-visibility-border-input {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(46px, 62px) auto;
  align-items: center;
  gap: 5px;
  color: #475569;
  font-size: 10px;
  font-weight: 780;
  white-space: nowrap;
}

.three-visibility-border-input input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 27px;
  border: 1px solid rgba(100, 116, 139, 0.34);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  padding: 4px 5px;
  font: inherit;
  font-weight: 850;
}

.three-visibility-border-input input:focus {
  border-color: rgba(0, 122, 255, 0.66);
  outline: 2px solid rgba(0, 122, 255, 0.18);
  outline-offset: 1px;
}

html[data-theme="dark"] .three-visibility-border-input {
  color: #cbd5e1;
}

html[data-theme="dark"] .three-visibility-border-input input {
  border-color: rgba(148, 163, 184, 0.42);
  background: rgba(30, 41, 59, 0.94);
  color: #f8fafc;
}

.three-opacity-slider,
.three-visibility-control .three-opacity-slider {
  width: 100%;
  height: 18px;
  margin: 0;
  writing-mode: horizontal-tb;
  direction: ltr;
  cursor: pointer;
}

.three-visibility-control strong {
  min-width: 0;
  color: var(--text);
  font-size: 10px;
  text-align: right;
}

.three-visibility-controls.collapsed {
  width: min(315px, calc(100vw - 112px));
  grid-template-columns: auto minmax(178px, 1fr) 28px;
  align-items: center;
  gap: 7px;
  padding: 7px;
}

.three-visibility-controls.collapsed .three-visibility-title {
  padding-left: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 820;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.three-visibility-controls.collapsed .three-view-switch {
  grid-template-columns: 0.7fr 1.3fr;
  padding: 3px;
}

.three-visibility-controls.collapsed .three-view-switch button {
  min-height: 27px;
  padding: 5px 7px;
  font-size: 10px;
}

.three-visibility-controls.collapsed .three-view-switch button .google-earth-logo-frame {
  flex-basis: 74px;
  width: 74px;
  max-width: 74px;
  height: 18px;
}

.three-visibility-controls.collapsed .three-view-switch .google-earth-logo-frame img {
  width: 74px;
  height: 74px;
}

.three-visibility-controls.collapsed .three-view-premium-badge {
  margin-left: 0;
  padding: 2px 4px;
  font-size: 7px;
}

html[data-theme="dark"] .three-visibility-controls .three-view-switch button.active {
  background: rgba(10, 132, 255, 0.2);
  color: #91c4ff;
  box-shadow: none;
}

html[data-theme="dark"] .three-view-switch .three-view-premium-badge {
  background: rgba(10, 132, 255, 0.2);
  color: #91c4ff;
}

/* Keep the display controls legible over high-contrast Google Earth imagery. */
.three-workspace[data-google-earth-3d-mode="photorealistic"] .three-visibility-controls {
  width: min(370px, calc(100vw - 112px));
  max-width: min(370px, calc(100vw - 112px));
  padding: 12px;
  gap: 10px;
  border-color: rgba(255, 255, 255, 0.9);
  background: rgba(244, 247, 251, 0.88);
  box-shadow:
    0 0 0 1px rgba(71, 85, 105, 0.22),
    0 18px 44px rgba(15, 23, 42, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  /* A live Maps 3D surface is already GPU-composited. Blurring it below this
     panel forces another full-frame pass during every orbit and zoom. */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.three-workspace[data-google-earth-3d-mode="photorealistic"] .three-visibility-title strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

.three-workspace[data-google-earth-3d-mode="photorealistic"] .three-visibility-title span {
  color: #475569;
  font-size: 10px;
  font-weight: 760;
}

.three-workspace[data-google-earth-3d-mode="photorealistic"] .three-visibility-collapse {
  border-color: rgba(100, 116, 139, 0.28);
  background: rgba(226, 232, 240, 0.9);
  color: #334155;
}

.three-workspace[data-google-earth-3d-mode="photorealistic"] .three-view-switch {
  border-color: rgba(100, 116, 139, 0.3);
  background: rgba(203, 213, 225, 0.62);
}

.three-workspace[data-google-earth-3d-mode="photorealistic"] .three-visibility-controls .three-view-switch button {
  color: #334155;
  font-size: 12px;
  font-weight: 850;
}

.three-workspace[data-google-earth-3d-mode="photorealistic"] .three-visibility-controls .three-view-switch button.active {
  background: rgba(255, 255, 255, 0.96);
  color: #0057b8;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.14);
}

.three-workspace[data-google-earth-3d-mode="photorealistic"] .three-view-switch .three-view-premium-badge {
  background: #dbeafe;
  color: #0759b5;
}

.three-workspace[data-google-earth-3d-mode="photorealistic"] .three-visibility-list {
  gap: 7px;
}

.three-workspace[data-google-earth-3d-mode="photorealistic"] .three-visibility-control,
.three-workspace[data-google-earth-3d-mode="photorealistic"] .three-visibility-map-control {
  grid-template-columns: 82px minmax(0, 1fr) 42px;
  padding: 7px;
  border-color: rgba(100, 116, 139, 0.26);
  background: rgba(248, 250, 252, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.three-workspace[data-google-earth-3d-mode="photorealistic"] .three-visibility-controls .three-visibility-control > button,
.three-workspace[data-google-earth-3d-mode="photorealistic"] .three-visibility-control-label {
  min-height: 31px;
  border-color: rgba(37, 99, 235, 0.36);
  background: rgba(239, 246, 255, 0.88);
  color: #0759b5;
  font-size: 11px;
  font-weight: 880;
}

.three-workspace[data-google-earth-3d-mode="photorealistic"] .three-visibility-controls .three-visibility-control > button:not(.active) {
  border-color: rgba(100, 116, 139, 0.38);
  background: rgba(226, 232, 240, 0.9);
  color: #334155;
}

.three-workspace[data-google-earth-3d-mode="photorealistic"] .three-visibility-site-note {
  color: #475569;
  font-size: 10px;
  font-weight: 780;
}

.three-workspace[data-google-earth-3d-mode="photorealistic"] .three-earth-control-hint {
  border-color: rgba(100, 116, 139, 0.28);
  background: rgba(248, 250, 252, 0.82);
  color: #475569;
  font-size: 10px;
}

.three-workspace[data-google-earth-3d-mode="photorealistic"] .three-visibility-control strong {
  color: #0f172a;
  font-size: 11px;
  font-weight: 900;
}

html[data-theme="dark"] .three-workspace[data-google-earth-3d-mode="photorealistic"] .three-visibility-controls {
  border-color: rgba(226, 232, 240, 0.34);
  background: rgba(15, 23, 42, 0.9);
  box-shadow:
    0 0 0 1px rgba(148, 163, 184, 0.24),
    0 18px 44px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .three-workspace[data-google-earth-3d-mode="photorealistic"] .three-visibility-title strong,
html[data-theme="dark"] .three-workspace[data-google-earth-3d-mode="photorealistic"] .three-visibility-control strong {
  color: #f8fafc;
}

html[data-theme="dark"] .three-workspace[data-google-earth-3d-mode="photorealistic"] .three-visibility-title span,
html[data-theme="dark"] .three-workspace[data-google-earth-3d-mode="photorealistic"] .three-visibility-site-note {
  color: #cbd5e1;
}

html[data-theme="dark"] .three-workspace[data-google-earth-3d-mode="photorealistic"] .three-earth-control-hint {
  border-color: rgba(148, 163, 184, 0.3);
  background: rgba(30, 41, 59, 0.82);
  color: #cbd5e1;
}

html[data-theme="dark"] .three-workspace[data-google-earth-3d-mode="photorealistic"] .three-earth-control-hint strong {
  color: #f8fafc;
}

html[data-theme="dark"] .three-workspace[data-google-earth-3d-mode="photorealistic"] .three-view-switch,
html[data-theme="dark"] .three-workspace[data-google-earth-3d-mode="photorealistic"] .three-visibility-collapse {
  border-color: rgba(148, 163, 184, 0.34);
  background: rgba(51, 65, 85, 0.88);
  color: #e2e8f0;
}

html[data-theme="dark"] .three-workspace[data-google-earth-3d-mode="photorealistic"] .three-visibility-control,
html[data-theme="dark"] .three-workspace[data-google-earth-3d-mode="photorealistic"] .three-visibility-map-control {
  border-color: rgba(148, 163, 184, 0.3);
  background: rgba(30, 41, 59, 0.84);
}

html[data-theme="dark"] .three-workspace[data-google-earth-3d-mode="photorealistic"] .three-visibility-controls .three-view-switch button,
html[data-theme="dark"] .three-workspace[data-google-earth-3d-mode="photorealistic"] .three-visibility-controls .three-visibility-control > button:not(.active) {
  color: #e2e8f0;
}

html[data-theme="dark"] .three-workspace[data-google-earth-3d-mode="photorealistic"] .three-visibility-controls .three-visibility-control > button:not(.active) {
  border-color: rgba(148, 163, 184, 0.42);
  background: rgba(51, 65, 85, 0.9);
}

/* Use the readable Earth surface treatment for every 3D overlay, including Model view. */
.three-workspace .three-visibility-controls {
  width: min(370px, calc(100vw - 112px));
  max-width: min(370px, calc(100vw - 112px));
  padding: 12px;
  gap: 10px;
  border-color: rgba(255, 255, 255, 0.9);
  background: rgba(244, 247, 251, 0.9);
  box-shadow:
    0 0 0 1px rgba(71, 85, 105, 0.22),
    0 18px 44px rgba(15, 23, 42, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(30px) saturate(112%);
  -webkit-backdrop-filter: blur(30px) saturate(112%);
}

.three-workspace .three-visibility-title strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

.three-workspace .three-visibility-title span {
  color: #475569;
  font-size: 10px;
  font-weight: 760;
}

.three-workspace .three-visibility-collapse {
  border-color: rgba(100, 116, 139, 0.28);
  background: rgba(226, 232, 240, 0.9);
  color: #334155;
}

.three-workspace .three-view-switch {
  border-color: rgba(100, 116, 139, 0.3);
  background: rgba(203, 213, 225, 0.62);
}

.three-workspace .three-visibility-controls .three-view-switch button {
  color: #334155;
  font-size: 12px;
  font-weight: 850;
}

.three-workspace .three-visibility-controls .three-view-switch button.active {
  background: rgba(255, 255, 255, 0.96);
  color: #0057b8;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.14);
}

.three-workspace .three-view-switch .three-view-premium-badge {
  background: #dbeafe;
  color: #0759b5;
}

.three-workspace .three-visibility-list {
  gap: 7px;
}

.three-workspace .three-visibility-control,
.three-workspace .three-visibility-map-control {
  grid-template-columns: 82px minmax(0, 1fr) 42px;
  padding: 7px;
  border-color: rgba(100, 116, 139, 0.26);
  background: rgba(248, 250, 252, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.three-workspace .three-visibility-controls .three-visibility-control > button,
.three-workspace .three-visibility-control-label {
  min-height: 31px;
  border-color: rgba(37, 99, 235, 0.36);
  background: rgba(239, 246, 255, 0.88);
  color: #0759b5;
  font-size: 11px;
  font-weight: 880;
}

.three-workspace .three-visibility-controls .three-visibility-control > button:not(.active) {
  border-color: rgba(100, 116, 139, 0.38);
  background: rgba(226, 232, 240, 0.9);
  color: #334155;
}

.three-workspace .three-visibility-site-note {
  color: #475569;
  font-size: 10px;
  font-weight: 780;
}

.three-workspace .three-visibility-control strong {
  color: #0f172a;
  font-size: 11px;
  font-weight: 900;
}

.three-workspace .three-hud {
  border-color: rgba(255, 255, 255, 0.9);
  background: rgba(244, 247, 251, 0.9);
  box-shadow:
    0 0 0 1px rgba(71, 85, 105, 0.2),
    0 16px 38px rgba(15, 23, 42, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(30px) saturate(112%);
  -webkit-backdrop-filter: blur(30px) saturate(112%);
}

.three-workspace .three-hud > div {
  border: 1px solid rgba(100, 116, 139, 0.14);
  background: rgba(248, 250, 252, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.three-workspace .three-hud span {
  color: #5b6b82;
}

.three-workspace .three-hud strong {
  color: #0f172a;
}

.three-workspace .three-hud .loss strong {
  color: var(--heat-loss);
}

.three-workspace .three-hud .gain strong {
  color: var(--heat-gain);
}

html[data-theme="dark"] .three-workspace .three-visibility-controls,
html[data-theme="dark"] .three-workspace .three-hud {
  border-color: rgba(226, 232, 240, 0.34);
  background: rgba(15, 23, 42, 0.92);
  box-shadow:
    0 0 0 1px rgba(148, 163, 184, 0.24),
    0 18px 44px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .three-workspace .three-visibility-title strong,
html[data-theme="dark"] .three-workspace .three-visibility-control strong,
html[data-theme="dark"] .three-workspace .three-hud strong {
  color: #f8fafc;
}

html[data-theme="dark"] .three-workspace .three-hud .loss strong {
  color: var(--heat-loss);
}

html[data-theme="dark"] .three-workspace .three-hud .gain strong {
  color: var(--heat-gain);
}

html[data-theme="dark"] .three-workspace .three-visibility-title span,
html[data-theme="dark"] .three-workspace .three-visibility-site-note,
html[data-theme="dark"] .three-workspace .three-hud span {
  color: #cbd5e1;
}

html[data-theme="dark"] .three-workspace .three-view-switch,
html[data-theme="dark"] .three-workspace .three-visibility-collapse {
  border-color: rgba(148, 163, 184, 0.34);
  background: rgba(51, 65, 85, 0.88);
  color: #e2e8f0;
}

html[data-theme="dark"] .three-workspace .three-visibility-control,
html[data-theme="dark"] .three-workspace .three-visibility-map-control,
html[data-theme="dark"] .three-workspace .three-hud > div {
  border-color: rgba(148, 163, 184, 0.3);
  background: rgba(30, 41, 59, 0.84);
}

html[data-theme="dark"] .three-workspace .three-visibility-controls .three-view-switch button,
html[data-theme="dark"] .three-workspace .three-visibility-controls .three-visibility-control > button:not(.active) {
  color: #e2e8f0;
}

html[data-theme="dark"] .three-workspace .three-visibility-controls .three-view-switch button.active,
html[data-theme="dark"] .three-workspace .three-visibility-controls .three-visibility-control > button.active {
  border-color: rgba(10, 132, 255, 0.62);
  background: rgba(10, 132, 255, 0.2);
  color: #91c4ff;
  box-shadow: none;
}

html[data-theme="dark"] .three-workspace .three-view-switch .three-view-premium-badge {
  background: rgba(10, 132, 255, 0.2);
  color: #91c4ff;
}

html[data-theme="dark"] .three-workspace .three-visibility-controls .three-visibility-control > button:not(.active) {
  border-color: rgba(148, 163, 184, 0.42);
  background: rgba(51, 65, 85, 0.9);
}

@media (max-width: 900px), (max-height: 720px) {
  .three-visibility-controls,
  .three-visibility-controls.collapsed {
    right: var(--three-visibility-screen-inset, 40px);
    bottom: 10px;
    max-width: calc(100vw - 80px);
  }

  .three-visibility-controls {
    width: min(330px, calc(100vw - 80px));
  }

  .three-visibility-controls.collapsed {
    width: min(300px, calc(100vw - 80px));
  }
}

.three-empty {
  left: 50%;
  top: 50%;
  display: grid;
  gap: 5px;
  min-width: 280px;
  padding: 18px 20px;
  border-radius: 12px;
  text-align: center;
  transform: translate(-50%, -50%);
}

.three-empty strong {
  color: var(--text);
  font-size: 16px;
}

.three-empty span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}

.schematic-library-panel,
.schematic-toolbox,
.schematic-stage,
.schematic-selection-panel {
  position: relative;
  z-index: 4;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--glass-strong);
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.schematic-library-panel {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  padding: 10px;
  isolation: isolate;
  background: var(--glass-strong);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.schematic-library-panel[aria-busy="true"]::after {
  content: "";
  position: absolute;
  z-index: 8;
  top: 0;
  left: 0;
  width: 38%;
  height: 2px;
  border-radius: 999px;
  background: var(--blue);
  animation: schematic-library-loading 680ms ease-in-out infinite alternate;
}

@keyframes schematic-library-loading {
  from { transform: translateX(0); }
  to { transform: translateX(165%); }
}

.schematic-panel-head {
  display: grid;
  gap: 3px;
  padding: 5px 5px 11px;
  border-bottom: 1px solid var(--line);
}

.schematic-panel-head span,
.schematic-canvas-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.schematic-panel-head strong,
.schematic-canvas-head strong {
  color: var(--text);
  font-size: 17px;
  font-weight: 860;
}

.schematic-panel-head small {
  max-width: 26ch;
  color: var(--muted);
  font-size: 10px;
  font-weight: 680;
  line-height: 1.3;
}

.schematic-library-controls {
  display: grid;
  gap: 8px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--line);
}

.schematic-library-controls label {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.schematic-library-controls label > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 820;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.schematic-library-controls select,
.schematic-library-controls input {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--input-glass);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 720;
  outline: none;
  box-shadow: var(--glass-edge);
}

.schematic-library-controls input {
  padding: 0 10px;
}

.schematic-library-search-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 0;
  height: 36px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--input-glass);
  box-shadow: var(--glass-edge);
}

.schematic-library-search-row:focus-within {
  border-color: var(--blue-border);
  box-shadow: var(--glass-edge), 0 0 0 3px rgba(0, 122, 255, 0.10);
}

.schematic-library-search-icon {
  width: 30px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.schematic-library-search-icon svg {
  width: 15px;
  height: 15px;
}

.schematic-library-controls .schematic-library-search-row input {
  height: 34px;
  padding: 0 3px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.schematic-library-controls .schematic-library-search-row input:focus {
  outline: 0;
}

.schematic-library-search-clear {
  width: 30px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 18px;
  font-weight: 720;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
}

.schematic-library-search-clear:hover {
  background: rgba(0, 122, 255, 0.09);
  color: var(--blue);
}

.schematic-library-search-clear[hidden] {
  display: none;
}

.schematic-library-search-row:has(.schematic-library-search-clear[hidden]) {
  grid-template-columns: 30px minmax(0, 1fr);
}

.schematic-library-quick-filters {
  min-width: 0;
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding: 1px 0 2px;
  scrollbar-width: none;
}

.schematic-library-quick-filters::-webkit-scrollbar {
  display: none;
}

.schematic-library-filter-chip {
  min-width: max-content;
  height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--button-glass);
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--glass-edge);
}

.schematic-library-filter-chip small {
  min-width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  padding: 0 4px;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.10);
  color: inherit;
  font-size: 8px;
  font-weight: 850;
}

.schematic-library-filter-chip:hover,
.schematic-library-filter-chip.active {
  border-color: var(--blue-border);
  background: rgba(0, 122, 255, 0.12);
  color: var(--blue);
}

.schematic-library-filter-chip:focus-visible,
.schematic-library-results-summary button:focus-visible,
.schematic-library-show-more:focus-visible,
.schematic-symbol-card:focus-visible,
.schematic-empty-section button:focus-visible {
  outline: 3px solid rgba(0, 122, 255, 0.22);
  outline-offset: 2px;
}

.schematic-plant-room-mode {
  min-width: 0;
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(0, 122, 255, 0.20);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(0, 122, 255, 0.075), rgba(255, 255, 255, 0.42));
  box-shadow: var(--glass-edge);
  overflow: hidden;
}

.schematic-plant-room-mode.manual {
  border-color: rgba(0, 122, 255, 0.28);
  background: linear-gradient(145deg, rgba(0, 122, 255, 0.10), rgba(255, 255, 255, 0.48));
}

.schematic-plant-room-mode > div:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.schematic-plant-room-mode strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 840;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schematic-plant-room-mode span {
  display: block;
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.schematic-mode-switch {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(0, 122, 255, 0.20);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.38);
  contain: layout paint;
}

.schematic-mode-switch button {
  min-width: 0;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  font-weight: 840;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: none;
  cursor: pointer;
  position: relative;
  z-index: 2;
  transition: background-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.schematic-mode-switch button.active {
  background: linear-gradient(180deg, rgba(0, 122, 255, 0.18), rgba(0, 122, 255, 0.09));
  color: var(--blue);
  box-shadow: inset 0 0 0 1px rgba(0, 122, 255, 0.12);
}

.schematic-mode-switch button:hover,
.schematic-mode-switch button:focus-visible {
  background: rgba(0, 122, 255, 0.12);
  color: var(--blue);
  outline: none;
}

.schematic-mode-switch button.active:hover,
.schematic-mode-switch button.active:focus-visible {
  background: linear-gradient(180deg, rgba(0, 122, 255, 0.22), rgba(0, 122, 255, 0.12));
}

.schematic-canvas-head small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}

.schematic-symbol-list {
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 10px 2px 2px;
  contain: layout paint style;
  transition: opacity 100ms ease;
}

.schematic-library-panel[aria-busy="true"] .schematic-symbol-list {
  opacity: 0.72;
}

.schematic-symbol-list::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.schematic-product-section {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
}

.schematic-library-project-items:empty {
  display: none;
}

.schematic-library-project-items,
.schematic-library-results {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.schematic-project-products-toggle {
  min-width: 0;
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  padding: 7px 9px;
  border: 1px solid rgba(0, 122, 255, 0.18);
  border-radius: 10px;
  background: rgba(0, 122, 255, 0.06);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.schematic-project-products-toggle:hover,
.schematic-project-products-toggle:focus-visible {
  border-color: var(--blue-border);
  background: rgba(0, 122, 255, 0.10);
  outline: none;
}

.schematic-project-products-toggle > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.schematic-project-products-toggle strong,
.schematic-project-products-toggle small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schematic-project-products-toggle strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 850;
}

.schematic-project-products-toggle small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 680;
}

.schematic-project-products-toggle > b {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--blue);
}

.schematic-project-products-toggle > b > span {
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(0, 122, 255, 0.10);
  font-size: 9px;
  font-weight: 850;
}

.schematic-project-products-toggle svg {
  width: 14px;
  height: 14px;
}

.schematic-library-project-items:not(:empty) + .schematic-library-results {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.schematic-product-grid {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.schematic-product-section + .schematic-product-section {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.schematic-library-results-summary {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
}

.schematic-library-results-summary > span {
  min-width: 0;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.schematic-library-results-summary strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 860;
}

.schematic-library-results-summary button {
  min-width: max-content;
  padding: 3px 7px;
  border: 0;
  border-radius: 7px;
  background: rgba(0, 122, 255, 0.09);
  color: var(--blue);
  font: inherit;
  font-size: 9px;
  font-weight: 820;
  cursor: pointer;
}

.schematic-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
}

.schematic-section-title h3 {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 840;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schematic-section-title span {
  min-width: 24px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.10);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.schematic-empty-section {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 11px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
  line-height: 1.35;
}

.schematic-empty-section.compact {
  padding-block: 9px;
}

.schematic-empty-section-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(0, 122, 255, 0.08);
  color: var(--blue);
}

.schematic-empty-section-icon svg {
  width: 17px;
  height: 17px;
}

.schematic-empty-section > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.schematic-empty-section strong,
.schematic-empty-section small {
  display: block;
  min-width: 0;
}

.schematic-empty-section strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 820;
}

.schematic-empty-section small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 680;
  line-height: 1.35;
}

.schematic-empty-section button {
  grid-column: 1 / -1;
  min-height: 30px;
  border: 1px solid var(--blue-border);
  border-radius: 8px;
  background: rgba(0, 122, 255, 0.09);
  color: var(--blue);
  font: inherit;
  font-size: 10px;
  font-weight: 820;
  cursor: pointer;
}

.schematic-library-show-more {
  min-width: 0;
  width: 100%;
  min-height: 42px;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 6px 10px;
  border: 1px solid rgba(0, 122, 255, 0.24);
  border-radius: 10px;
  background: rgba(0, 122, 255, 0.08);
  color: var(--blue);
  font: inherit;
  cursor: pointer;
  box-shadow: var(--glass-edge);
}

.schematic-library-show-more:hover {
  border-color: var(--blue-border);
  background: rgba(0, 122, 255, 0.13);
}

.schematic-library-show-more span {
  font-size: 11px;
  font-weight: 850;
}

.schematic-library-show-more small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 710;
}

.schematic-symbol-card {
  min-width: 0;
  width: 100%;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 86px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--button-glass);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  box-shadow: none;
  transition: border-color 0.12s ease, background-color 0.12s ease;
  content-visibility: auto;
  contain: layout paint style;
  contain-intrinsic-size: 86px;
}

.schematic-symbol-card:hover {
  border-color: var(--control-hover-border);
  background: var(--control-hover-bg);
  box-shadow: none;
}

.schematic-symbol-card.active {
  border-color: var(--blue-border);
  background: rgba(0, 122, 255, 0.14);
  box-shadow: inset 3px 0 0 var(--blue);
}

.schematic-symbol-card.selected-product {
  border-color: rgba(0, 122, 255, 0.34);
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.12), rgba(255, 255, 255, 0.12));
}

.schematic-symbol-icon {
  width: 58px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--blue);
}

.schematic-symbol-glyph {
  width: 52px;
  height: 50px;
}

.schematic-symbol-asset {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.schematic-symbol-radiator {
  width: 100%;
  height: 100%;
}

.schematic-symbol-ufh-manifold,
.schematic-symbol-pumped-ufh-manifold {
  width: 100%;
  height: 100%;
}

.schematic-symbol-icon .schematic-symbol-ufh-manifold,
.schematic-symbol-icon .schematic-symbol-pumped-ufh-manifold,
.schematic-product-symbol .schematic-symbol-ufh-manifold,
.schematic-product-symbol .schematic-symbol-pumped-ufh-manifold {
  width: 100%;
  height: 100%;
}

.schematic-product-visual {
  position: relative;
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.34);
}

.schematic-symbol-card:has(.schematic-symbol-ufh-manifold) .schematic-product-visual,
.schematic-symbol-card:has(.schematic-symbol-pumped-ufh-manifold) .schematic-product-visual {
  width: 70px;
  height: 70px;
  overflow: hidden;
}

.schematic-product-visual > img {
  position: relative;
  z-index: 1;
  max-width: calc(100% - 10px);
  max-height: calc(100% - 10px);
  object-fit: contain;
  border-radius: 5px;
  mix-blend-mode: multiply;
  filter: none;
}

.schematic-product-symbol {
  display: grid;
  place-items: center;
  color: var(--blue);
}

.schematic-evomax2-cascade-preview {
  display: block;
  width: 64px;
  height: 64px;
  overflow: visible;
}

.dashboard-product-tool-default-schematic-symbol .schematic-evomax2-cascade-preview {
  width: 100%;
  height: 100%;
}

.schematic-product-visual.symbol-only .schematic-product-symbol .schematic-symbol-glyph {
  width: 58px;
  height: 54px;
}

.schematic-product-symbol-badge {
  position: absolute;
  z-index: 3;
  top: 3px;
  left: 3px;
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(0, 122, 255, 0.22);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.90);
  color: var(--blue);
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.10);
}

.schematic-product-symbol-badge .schematic-symbol-glyph {
  width: 21px;
  height: 19px;
}

html[data-theme="dark"] .schematic-symbol-asset {
  filter: invert(1) brightness(1.25);
}

.schematic-symbol-card:has(.schematic-symbol-ufh-manifold) .schematic-product-brand,
.schematic-symbol-card:has(.schematic-symbol-pumped-ufh-manifold) .schematic-product-brand {
  display: none;
}

.schematic-product-brand {
  position: absolute;
  right: 3px;
  bottom: 2px;
  max-width: 42px;
  max-height: 12px;
  display: grid;
  place-items: center;
  padding: 1px 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
  font-size: 7px;
  font-weight: 860;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.schematic-product-brand img,
.schematic-product-brand .product-brand-logo {
  width: auto;
  max-width: 38px;
  height: auto;
  max-height: 9px;
  object-fit: contain;
}

.schematic-symbol-copy {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 3px;
}

.schematic-symbol-kicker {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  overflow: hidden;
  color: var(--blue);
  font-size: 8px;
  font-weight: 840;
  letter-spacing: 0.035em;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.schematic-symbol-kicker b {
  flex: 0 0 auto;
  padding: 3px 5px;
  border-radius: 999px;
  background: rgba(0, 122, 255, 0.09);
  font-size: 7px;
  font-weight: 840;
  letter-spacing: 0;
  text-transform: none;
}

.schematic-symbol-copy strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 820;
  line-height: 1.18;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.schematic-symbol-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schematic-symbol-card-footer {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.schematic-symbol-card-footer em {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schematic-symbol-card-footer > span {
  flex: 0 0 auto;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.09);
  color: var(--muted);
  font-size: 8px;
  font-weight: 820;
}

.schematic-library-picker-host {
  position: absolute;
  z-index: 30;
  inset: 0;
  display: none;
  min-width: 0;
  min-height: 0;
  padding: 10px;
  background: rgba(248, 250, 252, 0.97);
}

.schematic-library-picker-host:not(:empty) {
  display: block;
}

.schematic-library-range-picker {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
}

.schematic-library-range-head {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 9px;
  padding: 4px 2px 10px;
  border-bottom: 1px solid var(--line);
}

.schematic-library-range-head > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.schematic-library-range-head span,
.schematic-library-model-search > span:first-child {
  color: var(--muted);
  font-size: 9px;
  font-weight: 840;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.schematic-library-range-head strong {
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 870;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schematic-library-range-head small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.schematic-library-range-head > button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--button-glass);
  color: var(--muted);
  font: inherit;
  font-size: 18px;
  cursor: pointer;
}

.schematic-library-model-search {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.schematic-library-model-search > span:last-child {
  min-width: 0;
  height: 38px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--input-glass);
  box-shadow: var(--glass-edge);
}

.schematic-library-model-search > span:last-child:focus-within {
  border-color: var(--blue-border);
  box-shadow: var(--glass-edge), 0 0 0 3px rgba(0, 122, 255, 0.10);
}

.schematic-library-model-search i {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.schematic-library-model-search i svg {
  width: 15px;
  height: 15px;
}

.schematic-library-model-search input {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 8px 0 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 11px;
  font-weight: 720;
  outline: none;
}

.schematic-library-model-list {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 7px;
}

.schematic-library-model-count {
  min-width: 0;
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.schematic-library-model-count strong {
  color: var(--text);
  font-size: 10px;
  font-weight: 850;
}

.schematic-library-model-count small {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.3;
}

.schematic-library-model-options {
  min-width: 0;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 6px;
  overflow: auto;
  padding-right: 2px;
  scrollbar-width: thin;
}

.schematic-library-model-option {
  min-width: 0;
  width: 100%;
  min-height: 54px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.54);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  content-visibility: auto;
  contain: layout paint style;
  contain-intrinsic-size: 54px;
}

.schematic-library-model-option:hover,
.schematic-library-model-option:focus-visible,
.schematic-library-model-option.active {
  border-color: var(--blue-border);
  background: rgba(0, 122, 255, 0.09);
  outline: none;
}

.schematic-library-model-option > span:first-child {
  width: 42px;
  height: 40px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--blue);
}

.schematic-library-model-option .schematic-symbol-glyph {
  width: 40px;
  height: 38px;
}

.schematic-library-model-option > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.schematic-library-model-option strong,
.schematic-library-model-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schematic-library-model-option strong {
  color: var(--text);
  font-size: 10px;
  font-weight: 820;
}

.schematic-library-model-option small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 680;
}

.schematic-library-model-option > b {
  padding: 4px 6px;
  border-radius: 7px;
  background: rgba(0, 122, 255, 0.09);
  color: var(--blue);
  font-size: 8px;
  font-weight: 840;
}

html[data-theme="dark"] .schematic-library-picker-host {
  background: rgba(15, 17, 21, 0.98);
}

html[data-theme="dark"] .schematic-library-model-option {
  background: rgba(255, 255, 255, 0.04);
}

.schematic-symbol-card:hover .schematic-symbol-card-footer > span,
.schematic-symbol-card.active .schematic-symbol-card-footer > span {
  background: rgba(0, 122, 255, 0.11);
  color: var(--blue);
}

@media (prefers-reduced-motion: reduce) {
  .schematic-library-panel[aria-busy="true"]::after {
    animation: none;
    width: 100%;
  }

  .schematic-symbol-list {
    transition: none;
  }
}

.schematic-toolbox {
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 12px 8px;
  position: relative;
  z-index: 12;
  overflow: visible;
}

.schematic-tool-btn {
  min-width: 0;
  width: 100%;
  min-height: 62px;
  display: grid;
  place-items: center;
  gap: 5px;
  padding: 8px 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--button-glass);
  color: var(--text);
  font-size: 10px;
  font-weight: 820;
  cursor: pointer;
  box-shadow: var(--glass-edge);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.schematic-tool-btn svg {
  width: 22px;
  height: 22px;
}

.schematic-tool-btn span {
  text-align: center;
  line-height: 1.15;
}

.schematic-tool-btn:hover {
  transform: translateY(-1px);
  border-color: var(--control-hover-border);
  background: var(--control-hover-bg);
  color: var(--blue);
}

.schematic-tool-btn.active {
  border-color: var(--blue-border);
  background: rgba(0, 122, 255, 0.16);
  color: var(--blue);
  box-shadow: var(--glass-edge), var(--blue-shadow);
}

.schematic-clipboard-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.schematic-clipboard-tools button {
  min-width: 0;
  padding: 7px 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--button-glass);
  box-shadow: var(--glass-edge);
  color: var(--text);
  font: inherit;
  font-size: 10px;
  font-weight: 760;
  cursor: pointer;
}

.schematic-clipboard-tools button:hover:not(:disabled) {
  border-color: var(--control-hover-border);
  background: var(--control-hover-bg);
  color: var(--blue);
}

.schematic-clipboard-tools button:disabled {
  cursor: default;
  opacity: 0.45;
}

.schematic-zone-node-picker {
  position: absolute;
  z-index: 30;
  top: 82px;
  left: calc(100% + 10px);
  width: min(260px, 42vw);
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--glass-strong);
  box-shadow: var(--float-shadow);
  backdrop-filter: blur(22px) saturate(1.25);
}

.schematic-zone-node-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.schematic-zone-node-picker-head strong {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--blue);
  background: var(--button-glass);
}

.schematic-zone-node-option {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--button-glass);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  box-shadow: var(--glass-edge);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.schematic-zone-node-option:hover,
.schematic-zone-node-option.active {
  transform: translateY(-1px);
  border-color: var(--blue-border);
  background: rgba(0, 122, 255, 0.14);
}

.schematic-zone-node-option.placed {
  border-color: rgba(52, 199, 89, 0.32);
}

.schematic-zone-node-option.custom-node {
  border-style: dashed;
}

.schematic-zone-node-option span {
  font-size: 13px;
  font-weight: 850;
}

.schematic-zone-node-option small,
.schematic-zone-node-empty {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.35;
}

.schematic-zone-node-empty {
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.28);
}

.schematic-pipe-tool-panel {
  position: absolute;
  z-index: 30;
  top: 164px;
  left: calc(100% + 10px);
  width: min(286px, 44vw);
  display: grid;
  gap: 9px;
  padding: 11px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--glass-strong);
  box-shadow: var(--float-shadow);
  backdrop-filter: blur(22px) saturate(1.25);
}

.schematic-pipe-tool-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.schematic-pipe-tool-head strong {
  color: var(--text);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}

.schematic-pipe-tool-panel label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 820;
  text-transform: uppercase;
}

.schematic-pipe-tool-panel select {
  min-width: 0;
  width: 100%;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 820;
}

.schematic-pipe-tool-panel dl {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin: 0;
}

.schematic-pipe-tool-panel dl > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--button-glass);
}

.schematic-pipe-tool-panel dt,
.schematic-pipe-tool-panel dd,
.schematic-pipe-tool-panel p {
  margin: 0;
}

.schematic-pipe-tool-panel dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 780;
}

.schematic-pipe-tool-panel dd {
  min-width: 0;
  color: var(--text);
  font-size: 11px;
  font-weight: 830;
  text-align: right;
}

.schematic-pipe-tool-panel p {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  line-height: 1.35;
}

.schematic-selection-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  align-content: start;
  gap: 12px;
  padding: 12px;
  overflow: auto;
  scrollbar-width: none;
}

.schematic-selection-panel::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.schematic-plant-equipment-panel {
  grid-template-rows: none;
  grid-auto-rows: max-content;
}

.schematic-virtual-parent-equipment {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.schematic-virtual-parent-equipment > .schematic-readonly-note {
  margin: 0;
}

.schematic-plant-equipment-editor {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-solid);
  box-shadow: var(--glass-edge);
}

.schematic-plant-equipment-editor-head {
  display: grid;
  gap: 4px;
}

.schematic-plant-equipment-editor-head strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 860;
}

.schematic-plant-equipment-editor-head small,
.schematic-plant-equipment-fields .schematic-reference-field small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.schematic-plant-equipment-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.schematic-plant-equipment-model {
  grid-column: 1 / -1;
}

.schematic-plant-equipment-advanced {
  min-width: 0;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.schematic-plant-equipment-advanced summary {
  color: var(--blue);
  cursor: pointer;
  font-size: 11px;
  font-weight: 820;
  list-style-position: inside;
}

.schematic-plant-equipment-advanced-content {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin: 0;
  border: 0;
  padding-inline: 0;
  padding-top: 12px;
}

.schematic-plant-equipment-advanced-content > * {
  min-width: 0;
  max-width: 100%;
}

.schematic-plant-equipment-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.schematic-plant-equipment-editor-actions button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--button-glass);
  color: var(--text);
  cursor: pointer;
  font-size: 10.5px;
  font-weight: 800;
  padding: 0 10px;
}

.schematic-plant-equipment-editor-actions button.danger {
  color: var(--heat-loss);
  border-color: color-mix(in srgb, var(--heat-loss) 35%, var(--line));
}

.schematic-plant-equipment-editor-actions button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.schematic-selection-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.schematic-selection-head > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.schematic-selection-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 840;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.schematic-selection-head strong {
  color: var(--text);
  font-size: 17px;
  font-weight: 880;
}

.schematic-selection-head button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--button-glass);
  color: var(--muted);
  font-size: 18px;
  font-weight: 820;
  cursor: pointer;
  box-shadow: var(--glass-edge);
}

.schematic-reference-field {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.schematic-reference-field > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 830;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.schematic-reference-field input,
.schematic-reference-field select {
  width: 100%;
  min-width: 0;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--input-glass);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 760;
  padding: 0 10px;
  outline: none;
  box-shadow: var(--glass-edge);
}

.schematic-reference-field input:disabled,
.schematic-reference-field select:disabled {
  opacity: 0.72;
}

.schematic-node-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.schematic-node-editor-grid .wide {
  grid-column: 1 / -1;
}

.schematic-readonly-note {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(0, 122, 255, 0.22);
  border-radius: 10px;
  background: rgba(0, 122, 255, 0.08);
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.35;
  box-shadow: var(--glass-edge);
}

.schematic-model-card {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 12px;
}

.schematic-deadleg-card {
  min-width: 0;
  display: grid;
  gap: 9px;
  padding: 11px;
  border: 1px solid rgba(245, 158, 11, 0.30);
  border-radius: 12px;
  background: rgba(255, 251, 235, 0.66);
  box-shadow: var(--glass-edge);
}

.schematic-deadleg-card > .product-selection-eyebrow {
  color: #b45309;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.schematic-deadleg-card .public-health-deadleg-note,
.schematic-deadleg-card .public-health-deadleg-empty {
  padding: 7px;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.06);
}

.schematic-pipe-hero > span {
  color: var(--blue);
  border-color: rgba(10, 132, 255, 0.30);
  background: rgba(10, 132, 255, 0.08);
}

.schematic-model-hero {
  min-width: 0;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.24);
  box-shadow: var(--glass-edge);
}

.schematic-model-hero > img,
.schematic-model-hero > span {
  width: 76px;
  height: 58px;
  display: grid;
  place-items: center;
  object-fit: contain;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.22);
}

.schematic-model-hero > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.schematic-model-hero span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 860;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.schematic-model-hero strong {
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 880;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schematic-model-hero small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schematic-model-facts {
  grid-template-columns: 1fr;
}

.schematic-stage {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) 30px;
  padding: 14px;
  background:
    radial-gradient(circle at 15% 15%, rgba(0, 122, 255, 0.10), transparent 24%),
    var(--glass-strong);
}

/* Canvas-only tools yield to main menus and drawing setup/review panels.
   Drawing setup is not a main-menu popup; match its mounted panel as well.
   Keep DOM/drafts intact, including the thermal workbench mounted on body. */
body:has(.studio-shell.workspace-popup-active, .floor-plan-popover, .project-setup-backdrop) :is(.canvas-workbench, .canvas-preselection, .thermal-workbench:not(.thermal-setup-templates), .thermal-launcher) {
  visibility: hidden !important;
  pointer-events: none !important;
}

/* These floating canvas conversations otherwise cover the setup form too,
   especially while a retained thermal draft has shifted their launchers. */
body:has(.floor-plan-popover, .project-setup-backdrop) :is(#workspaceAssistantRoot, .my-day-designer-comments) {
  visibility: hidden !important;
  pointer-events: none !important;
}

.studio-shell.workspace-popup-active .schematic-stage,
.studio-shell.workspace-popup-active .canvas-scroll,
.studio-shell.workspace-popup-active .three-workspace,
.studio-shell.workspace-popup-active .minimap {
  transition: filter 180ms ease, opacity 180ms ease;
}

.studio-shell.workspace-popup-active .schematic-stage::after,
.studio-shell.workspace-popup-active .canvas-scroll::after,
.studio-shell.workspace-popup-active .three-workspace::after,
.studio-shell.workspace-popup-active .minimap::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: transparent;
  pointer-events: none;
  z-index: 8;
}

html[data-theme="dark"] .studio-shell.workspace-popup-active .schematic-stage,
html[data-theme="dark"] .studio-shell.workspace-popup-active .canvas-scroll,
html[data-theme="dark"] .studio-shell.workspace-popup-active .three-workspace,
html[data-theme="dark"] .studio-shell.workspace-popup-active .minimap {
  filter: brightness(0.52) saturate(0.6);
  opacity: 0.56;
}

html[data-theme="dark"] .studio-shell.workspace-popup-active .schematic-stage::after,
html[data-theme="dark"] .studio-shell.workspace-popup-active .canvas-scroll::after,
html[data-theme="dark"] .studio-shell.workspace-popup-active .three-workspace::after,
html[data-theme="dark"] .studio-shell.workspace-popup-active .minimap::after {
  background: rgba(0, 0, 0, 0.38);
}

.schematic-canvas-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 0 2px 12px;
}

.schematic-canvas-head > div {
  display: grid;
  gap: 3px;
}

.schematic-canvas-head dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(86px, auto));
  gap: 8px;
  margin: 0;
}

.schematic-canvas-head dl > div {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: var(--glass-edge);
}

.schematic-canvas-head dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 780;
  text-transform: uppercase;
}

.schematic-canvas-head dd {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 830;
}

.schematic-service-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}

.schematic-service-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: var(--text);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

.schematic-service-legend > span strong {
  font-size: 11px;
  font-weight: 780;
}

.schematic-service-legend i {
  width: 22px;
  height: 0;
  border-top: 3px solid currentColor;
  border-radius: 999px;
}

.schematic-service-legend i.dhw {
  color: #ef4444;
}

.schematic-service-legend i.secondary-return {
  color: #f97316;
}

.schematic-service-legend i.cws {
  color: #0a84ff;
}

@media (max-width: 1180px) {
  .schematic-service-legend {
    order: 3;
    width: 100%;
    margin-left: 0;
  }
}

.schematic-canvas-wrap {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: none;
  contain: layout paint size;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: var(--glass-edge), inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.schematic-cad-canvas {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
  cursor: grab;
  contain: layout paint style;
  touch-action: none;
  user-select: none;
}

.schematic-stage.placing .schematic-cad-canvas {
  cursor: crosshair;
}

.schematic-cad-canvas.is-panning,
.schematic-stage.placing .schematic-cad-canvas.is-panning {
  cursor: grabbing;
  shape-rendering: optimizeSpeed;
  text-rendering: optimizeSpeed;
}

.schematic-cad-canvas.is-panning .schematic-pipe-label,
.schematic-cad-canvas.is-zooming .schematic-pipe-label,
.schematic-cad-canvas.is-touch-zooming .schematic-pipe-label,
.schematic-cad-canvas.is-panning .schematic-generated-label,
.schematic-cad-canvas.is-zooming .schematic-generated-label,
.schematic-cad-canvas.is-touch-zooming .schematic-generated-label {
  opacity: 0;
  transition: none;
}

.schematic-grid-bg {
  fill: rgba(248, 250, 252, 0.82);
}

.schematic-grid-plate {
  fill: rgba(255, 255, 255, 0.34);
  stroke: var(--line-strong);
}

.schematic-grid-small,
.schematic-grid-large {
  fill: none;
  stroke: rgba(148, 163, 184, 0.22);
  stroke-width: 1;
}

.schematic-floor-guide {
  pointer-events: none;
}

.schematic-floor-guide line {
  fill: none;
  stroke: rgba(71, 85, 105, 0.36);
  stroke-width: 1.6;
  stroke-dasharray: 12 10;
  vector-effect: non-scaling-stroke;
}

.schematic-floor-guide text {
  fill: rgba(15, 23, 42, 0.76);
  stroke: rgba(255, 255, 255, 0.78);
  stroke-width: 3px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.02em;
  paint-order: stroke fill;
}

.schematic-grid-large {
  stroke: rgba(100, 116, 139, 0.26);
  stroke-width: 1.2;
}

.schematic-main-flow,
.schematic-branch-flow {
  fill: none;
  stroke: var(--heat-loss);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.schematic-main-return,
.schematic-branch-return {
  fill: none;
  stroke: var(--heat-gain);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.schematic-branch-flow,
.schematic-branch-return {
  stroke-width: 3.4;
  opacity: 0.86;
}

.schematic-flow-arrow {
  fill: var(--heat-loss);
}

.schematic-return-arrow {
  fill: var(--heat-gain);
}

.schematic-pipe-run,
.schematic-pipe-draft {
  pointer-events: none;
}

.schematic-pipe-run {
  cursor: pointer;
  pointer-events: visiblePainted;
}

.schematic-pipe-run.generated {
  pointer-events: visiblePainted;
}

.schematic-pipe-line,
.schematic-pipe-draft-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.schematic-pipe-line {
  filter: drop-shadow(0 2px 4px rgba(15, 23, 42, 0.16));
}

/* Keep calculated pipe carriers legible at fit-to-view scales. Route roles
   form a small visual hierarchy: mains, risers, headers, then outlet drops. */
.schematic-cad-canvas .schematic-pipe-line {
  vector-effect: non-scaling-stroke;
}

.schematic-cad-canvas .schematic-pipe-run.generated .schematic-pipe-line {
  filter: none;
}

.schematic-cad-canvas .schematic-pipe-run.route-common-main .schematic-pipe-line,
.schematic-cad-canvas .schematic-pipe-run.route-common-source .schematic-pipe-line {
  stroke-width: 2.6 !important;
}

.schematic-cad-canvas .schematic-pipe-run.route-riser-trunk .schematic-pipe-line {
  stroke-width: 2.15 !important;
}

.schematic-cad-canvas .schematic-pipe-run.route-group-header .schematic-pipe-line {
  stroke-width: 1.8 !important;
}

.schematic-cad-canvas .schematic-pipe-run.route-terminal-drop .schematic-pipe-line,
.schematic-cad-canvas .schematic-pipe-run.route-tee-bridge .schematic-pipe-line {
  stroke-width: 1.35 !important;
}

.schematic-pipe-junction-layer {
  pointer-events: none;
}

.schematic-pipe-junction {
  color: #334155;
}

.schematic-pipe-junction-body {
  fill: var(--surface-solid, #ffffff);
  stroke: currentColor;
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
}

.schematic-pipe-junction-arms {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.schematic-pipe-run.pipe-flow .schematic-pipe-line,
.schematic-pipe-draft.pipe-flow .schematic-pipe-draft-line {
  stroke: #ef4444;
}

.schematic-pipe-run.pipe-flow {
  --schematic-pipe-active-glow: rgba(239, 68, 68, 0.82);
}

.schematic-pipe-run.pipe-return .schematic-pipe-line,
.schematic-pipe-draft.pipe-return .schematic-pipe-draft-line {
  stroke: #0a84ff;
}

.schematic-pipe-run.pipe-return {
  --schematic-pipe-active-glow: rgba(10, 132, 255, 0.82);
}

.schematic-pipe-run.pipe-cooling-flow .schematic-pipe-line,
.schematic-pipe-draft.pipe-cooling-flow .schematic-pipe-draft-line {
  stroke: #38bdf8;
}

.schematic-pipe-run.pipe-cooling-flow {
  --schematic-pipe-active-glow: rgba(56, 189, 248, 0.82);
}

.schematic-pipe-run.pipe-cooling-return .schematic-pipe-line,
.schematic-pipe-draft.pipe-cooling-return .schematic-pipe-draft-line {
  stroke: #a855f7;
}

.schematic-pipe-run.pipe-cooling-return {
  --schematic-pipe-active-glow: rgba(168, 85, 247, 0.82);
}

.schematic-pipe-run.pipe-domestic-hot-water .schematic-pipe-line,
.schematic-pipe-draft.pipe-domestic-hot-water .schematic-pipe-draft-line {
  stroke: #ef4444;
}

.schematic-pipe-run.pipe-domestic-hot-water {
  --schematic-pipe-active-glow: rgba(239, 68, 68, 0.82);
}

.schematic-pipe-run.pipe-domestic-cold-water .schematic-pipe-line,
.schematic-pipe-draft.pipe-domestic-cold-water .schematic-pipe-draft-line {
  stroke: #0a84ff;
}

.schematic-pipe-run.pipe-domestic-cold-water {
  --schematic-pipe-active-glow: rgba(10, 132, 255, 0.82);
}

.schematic-pipe-run.pipe-mixed-water .schematic-pipe-line,
.schematic-pipe-draft.pipe-mixed-water .schematic-pipe-draft-line {
  stroke: #14b8a6;
}

.schematic-pipe-run.pipe-mixed-water {
  --schematic-pipe-active-glow: rgba(20, 184, 166, 0.82);
}

.schematic-pipe-run.pipe-boosted-cold-water .schematic-pipe-line,
.schematic-pipe-draft.pipe-boosted-cold-water .schematic-pipe-draft-line {
  stroke: #22c55e;
}

.schematic-pipe-run.pipe-boosted-cold-water {
  --schematic-pipe-active-glow: rgba(34, 197, 94, 0.82);
}

.schematic-pipe-run.pipe-secondary-return .schematic-pipe-line,
.schematic-pipe-draft.pipe-secondary-return .schematic-pipe-draft-line {
  stroke: #f97316;
}

.schematic-pipe-run.pipe-secondary-return {
  --schematic-pipe-active-glow: rgba(249, 115, 22, 0.82);
}

.schematic-pipe-run.pipe-gas .schematic-pipe-line,
.schematic-pipe-draft.pipe-gas .schematic-pipe-draft-line {
  stroke: #facc15;
}

.schematic-pipe-run.pipe-gas {
  --schematic-pipe-active-glow: rgba(250, 204, 21, 0.9);
}

.schematic-pipe-hit-line {
  fill: none;
  stroke: transparent;
  stroke-width: 24;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: stroke;
}

.schematic-pipe-run.active .schematic-pipe-line {
  opacity: 1;
  filter: drop-shadow(0 0 7px var(--schematic-pipe-active-glow, rgba(10, 132, 255, 0.82))) drop-shadow(0 2px 5px rgba(15, 23, 42, 0.18));
}

.schematic-generated-label {
  pointer-events: none;
}

.schematic-generated-label rect {
  fill: rgba(255, 255, 255, 0.92);
  stroke: rgba(15, 23, 42, 0.28);
  stroke-width: 1.2;
  filter: drop-shadow(0 5px 12px rgba(15, 23, 42, 0.14));
}

.schematic-generated-label text {
  fill: #0f172a;
  stroke: rgba(255, 255, 255, 0.86);
  stroke-width: 2.2px;
  font-size: 12px;
  font-weight: 900;
  paint-order: stroke fill;
}

.schematic-generated-label.pipe-flow rect {
  stroke: rgba(239, 68, 68, 0.54);
}

.schematic-generated-label.pipe-flow text {
  fill: #ef4444;
}

.schematic-generated-label.pipe-return rect {
  stroke: rgba(10, 132, 255, 0.56);
}

.schematic-generated-label.pipe-return text {
  fill: #0a84ff;
}

.schematic-generated-label.pipe-cooling-flow rect {
  stroke: rgba(56, 189, 248, 0.56);
}

.schematic-generated-label.pipe-cooling-flow text {
  fill: #0284c7;
}

.schematic-generated-label.pipe-cooling-return rect {
  stroke: rgba(168, 85, 247, 0.56);
}

.schematic-generated-label.pipe-cooling-return text {
  fill: #9333ea;
}

.schematic-generated-label.pipe-domestic-hot-water rect {
  stroke: rgba(239, 68, 68, 0.54);
}

.schematic-generated-label.pipe-domestic-hot-water text {
  fill: #ef4444;
}

.schematic-generated-label.pipe-domestic-cold-water rect {
  stroke: rgba(10, 132, 255, 0.56);
}

.schematic-generated-label.pipe-domestic-cold-water text {
  fill: #0a84ff;
}

.schematic-generated-label.pipe-boosted-cold-water rect {
  stroke: rgba(34, 197, 94, 0.56);
}

.schematic-generated-label.pipe-boosted-cold-water text {
  fill: #16a34a;
}

.schematic-generated-label.pipe-secondary-return rect {
  stroke: rgba(249, 115, 22, 0.56);
}

.schematic-generated-label.pipe-secondary-return text {
  fill: #ea580c;
}

html[data-theme="dark"] .schematic-generated-label rect {
  fill: rgba(15, 23, 42, 0.88);
  stroke: rgba(226, 232, 240, 0.36);
}

html[data-theme="dark"] .schematic-generated-label text {
  fill: #f8fafc;
  stroke: rgba(0, 0, 0, 0.62);
}

html[data-theme="dark"] .schematic-generated-label.pipe-flow text {
  fill: #ff6b6b;
}

html[data-theme="dark"] .schematic-generated-label.pipe-return text {
  fill: #5aa9ff;
}

html[data-theme="dark"] .schematic-generated-label.pipe-cooling-flow text {
  fill: #67e8f9;
}

html[data-theme="dark"] .schematic-generated-label.pipe-cooling-return text {
  fill: #c084fc;
}

html[data-theme="dark"] .schematic-generated-label.pipe-domestic-hot-water text {
  fill: #ff6b6b;
}

html[data-theme="dark"] .schematic-generated-label.pipe-domestic-cold-water text {
  fill: #5aa9ff;
}

html[data-theme="dark"] .schematic-generated-label.pipe-boosted-cold-water text {
  fill: #4ade80;
}

html[data-theme="dark"] .schematic-generated-label.pipe-secondary-return text {
  fill: #fb923c;
}

.schematic-pipe-label {
  filter: drop-shadow(0 2px 4px rgba(15, 23, 42, 0.12));
  transition: opacity 0.12s ease;
}

.schematic-device > rect,
.schematic-legend rect,
.schematic-empty-callout rect {
  fill: rgba(255, 255, 255, 0.72);
  stroke: rgba(100, 116, 139, 0.42);
  stroke-width: 1.3;
  filter: drop-shadow(0 12px 22px rgba(15, 23, 42, 0.10));
}

.schematic-device-symbol {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--text);
}

.schematic-device-symbol .schematic-symbol-glyph {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

#schematicCanvas .schematic-symbol-outlet-floor-plan,
.my-day-native-svg .schematic-symbol-outlet-floor-plan {
  filter: grayscale(1) brightness(0);
}

.schematic-device-symbol .schematic-symbol-radiator,
.schematic-device-symbol .schematic-symbol-ufh-manifold,
.schematic-device-symbol .schematic-symbol-pumped-ufh-manifold {
  max-width: 100%;
  max-height: 100%;
}

.schematic-radiator-art {
  opacity: 0.96;
}

.schematic-symbol-inline {
  color: currentColor;
  fill: none;
  pointer-events: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3.4;
  vector-effect: non-scaling-stroke;
}

.schematic-symbol-inline rect,
.schematic-symbol-inline circle,
.schematic-symbol-inline polygon {
  fill: var(--surface);
  fill-opacity: 0.95;
}

.schematic-dhw-cylinder-symbol {
  color: var(--text);
  pointer-events: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.schematic-dhw-cylinder-symbol * {
  vector-effect: non-scaling-stroke;
}

.schematic-dhw-cylinder-shell,
.schematic-dhw-cylinder-vent,
.schematic-dhw-cylinder-vent-cap {
  fill: var(--surface-solid, #ffffff);
  stroke: currentColor;
  stroke-width: 1.5;
}

.schematic-dhw-cylinder-vent {
  fill: none;
  stroke-width: 1.15;
}

.schematic-dhw-cylinder-service {
  fill: none;
  stroke-width: 1.65;
}

.schematic-dhw-cylinder-service.pipe-flow {
  stroke: #e60706;
}

.schematic-dhw-cylinder-service.pipe-return {
  stroke: #13c1d9;
}

.schematic-dhw-cylinder-service.pipe-domestic-hot-water {
  stroke: #ef4444;
}

.schematic-dhw-cylinder-service.pipe-secondary-return {
  stroke: #f97316;
}

.schematic-dhw-cylinder-service.pipe-domestic-cold-water {
  stroke: #1685ff;
}

.schematic-dhw-cylinder-coil {
  stroke-linecap: round;
  stroke-linejoin: round;
}

.schematic-dhw-cylinder-service.drain {
  stroke-width: 1.05;
}

.schematic-placement-dhw-cylinder.selected .schematic-dhw-cylinder-symbol {
  filter: drop-shadow(0 0 6px rgba(0, 122, 255, 0.44));
}

.schematic-symbol-evomax2-cascade {
  color: var(--text);
  pointer-events: none;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.schematic-symbol-evomax2-cascade * {
  vector-effect: non-scaling-stroke;
}

.schematic-placement.selected .schematic-symbol-evomax2-cascade {
  filter: drop-shadow(0 0 6px rgba(0, 122, 255, 0.46));
}

.schematic-evomax2-cascade-boiler-shell,
.schematic-evomax2-cascade-separator-shell,
.schematic-evomax2-cascade-header-body {
  fill: #fff !important;
  fill-opacity: 1 !important;
  stroke: var(--text);
  stroke-width: 1.45;
}

.schematic-evomax2-cascade-boiler.rear .schematic-evomax2-cascade-boiler-shell {
  fill: color-mix(in srgb, var(--surface-solid) 82%, var(--muted) 18%);
  stroke: var(--muted);
  stroke-dasharray: 5 3;
}

.schematic-evomax2-cascade-boiler-inner-panel,
.schematic-evomax2-cascade-boiler-lower-detail,
.schematic-evomax2-cascade-boiler-side-rail,
.schematic-evomax2-cascade-boiler-lower-bay,
.schematic-evomax2-cascade-frame-base {
  fill: none;
  stroke: var(--text);
  stroke-width: 0.8;
}

.schematic-evomax2-cascade-boiler-top,
.schematic-evomax2-cascade-boiler-detail,
.schematic-evomax2-cascade-frame-support path,
.schematic-evomax2-cascade-frame-top-rail,
.schematic-evomax2-cascade-frame-mid-rails,
.schematic-evomax2-cascade-service-ticks,
.schematic-evomax2-cascade-header-cap,
.schematic-evomax2-cascade-separator-vent,
.schematic-evomax2-cascade-separator-drain,
.schematic-evomax2-cascade-phex-plate,
.schematic-evomax2-cascade-phex-end-plate {
  fill: none;
  stroke: var(--text);
  stroke-width: 1.15;
}

.schematic-evomax2-cascade-boiler-top,
.schematic-evomax2-cascade-boiler-detail {
  stroke: var(--text);
  stroke-width: 1;
}

.schematic-evomax2-cascade-boiler.rear .schematic-evomax2-cascade-boiler-top,
.schematic-evomax2-cascade-boiler.rear .schematic-evomax2-cascade-boiler-detail {
  stroke: var(--muted);
}

.schematic-evomax2-cascade-boiler-control {
  fill: var(--text) !important;
  fill-opacity: 1 !important;
  stroke: none;
}

.schematic-evomax2-cascade-boiler-lower-bay {
  stroke-width: 1;
}

.schematic-evomax2-cascade-boiler-bracket,
.schematic-evomax2-cascade-frame-foot,
.schematic-evomax2-cascade-header-flange,
.schematic-evomax2-cascade-separator-flange {
  fill: #fff !important;
  fill-opacity: 1 !important;
  stroke: var(--text);
  stroke-width: 1.05;
}

.schematic-evomax2-cascade-frame-support path,
.schematic-evomax2-cascade-frame-top-rail,
.schematic-evomax2-cascade-frame-mid-rails {
  stroke: var(--text);
  stroke-width: 1.25;
}

.schematic-evomax2-cascade-frame-base {
  stroke-width: 1.25;
}

.schematic-evomax2-cascade-takeoff,
.schematic-evomax2-cascade-service,
.schematic-evomax2-cascade-separator-nozzle path {
  fill: none;
  stroke: var(--text);
  stroke-width: 1.65;
}

.schematic-evomax2-cascade-header-body {
  fill: #fff !important;
  fill-opacity: 1 !important;
  stroke: var(--text);
  stroke-width: 1.8;
}

.schematic-evomax2-cascade-header-bracket path {
  fill: none;
  stroke: var(--text);
  stroke-width: 0.72;
}

.schematic-evomax2-cascade-service.gas {
  stroke-dasharray: 6 3;
  stroke-width: 1.15;
}

.schematic-evomax2-cascade-service.electrical {
  stroke-dasharray: 2.5 3;
  stroke-width: 1.15;
}

.schematic-evomax2-cascade-separator-shell {
  fill: #fff !important;
  fill-opacity: 1 !important;
  stroke-width: 1.7;
}

.schematic-evomax2-cascade-separator.mllh .schematic-evomax2-cascade-separator-shell {
  stroke: var(--text);
}

.schematic-evomax2-cascade-phex-plate {
  stroke-width: 0.8;
}

.schematic-evomax2-cascade-phex-end-plate {
  stroke: var(--text);
  stroke-width: 1.35;
}

.schematic-evomax2-cascade-phex-bolt {
  fill: var(--text) !important;
  fill-opacity: 1 !important;
  stroke: none;
}

.schematic-evomax2-cascade-magnet {
  fill: none;
  stroke: var(--text);
  stroke-width: 1.65;
}

.schematic-placement text.schematic-evomax2-cascade-separator-label {
  fill: var(--muted);
  font-size: 5.3px;
  font-weight: 930;
  letter-spacing: 0.02em;
  paint-order: stroke;
  stroke: var(--surface-solid);
  stroke-width: 1.8px;
}

.schematic-placement-boiler:has([data-evomax2-cascade-schematic="true"]) .schematic-connection-point {
  opacity: 0.18;
  r: 2.6px;
  transition: opacity 120ms ease, r 120ms ease;
}

.schematic-placement-boiler:has([data-evomax2-cascade-schematic="true"]):hover .schematic-connection-point,
.schematic-placement-boiler.selected:has([data-evomax2-cascade-schematic="true"]) .schematic-connection-point {
  opacity: 1;
  r: 4.5px;
}

.schematic-symbol-imax-xtra2-cascade {
  color: var(--text);
  pointer-events: none;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.schematic-symbol-imax-xtra2-cascade * {
  vector-effect: non-scaling-stroke;
}

.schematic-placement.selected .schematic-symbol-imax-xtra2-cascade {
  filter: drop-shadow(0 0 6px rgba(0, 122, 255, 0.46));
}

.schematic-imax-xtra2-cascade-boiler-shell,
.schematic-imax-xtra2-cascade-separator-shell,
.schematic-imax-xtra2-cascade-header-body,
.schematic-imax-xtra2-cascade-header-flange,
.schematic-imax-xtra2-cascade-wheel {
  fill: #fff !important;
  fill-opacity: 1 !important;
  stroke: var(--text);
}

.schematic-imax-xtra2-cascade-boiler-shell {
  stroke-width: 1.6;
}

.schematic-imax-xtra2-cascade-boiler.standby .schematic-imax-xtra2-cascade-boiler-shell {
  fill: color-mix(in srgb, var(--surface-solid) 90%, var(--amber) 10%) !important;
  stroke-dasharray: 4 2;
}

.schematic-imax-xtra2-cascade-fascia,
.schematic-imax-xtra2-cascade-door,
.schematic-imax-xtra2-cascade-flue,
.schematic-imax-xtra2-cascade-handle,
.schematic-imax-xtra2-cascade-continuation path,
.schematic-imax-xtra2-cascade-phex-plate,
.schematic-imax-xtra2-cascade-magnet,
.schematic-imax-xtra2-cascade-separator.none path {
  fill: none;
  stroke: var(--text);
}

.schematic-imax-xtra2-cascade-fascia,
.schematic-imax-xtra2-cascade-door {
  stroke-width: .9;
}

.schematic-imax-xtra2-cascade-continuation path {
  stroke: var(--muted);
  stroke-dasharray: 5 3;
  stroke-width: 1.05;
}

.schematic-imax-xtra2-cascade-display-bezel {
  fill: color-mix(in srgb, var(--text) 82%, var(--surface-solid)) !important;
  stroke: var(--text);
  stroke-width: 0.8;
}

.schematic-imax-xtra2-cascade-display {
  fill: #38bdf8 !important;
  stroke: #075985;
  stroke-width: 0.65;
}

.schematic-imax-xtra2-cascade-handle {
  fill: var(--text) !important;
  stroke-width: 0.7;
}

.schematic-imax-xtra2-cascade-wheel {
  stroke-width: 1;
}

.schematic-imax-xtra2-cascade-takeoff,
.schematic-imax-xtra2-cascade-separator-nozzle,
.schematic-imax-xtra2-cascade-service {
  fill: none;
  stroke: var(--text);
  stroke-width: 1.65;
}

.schematic-imax-xtra2-cascade-takeoff.flow {
  stroke: var(--heat-loss);
}

.schematic-imax-xtra2-cascade-takeoff.return {
  stroke: var(--heat-gain);
}

.schematic-imax-xtra2-cascade-takeoff.gas {
  stroke: #d6a800;
  stroke-width: 1.35;
}

.schematic-imax-xtra2-cascade-pump {
  fill: #fff !important;
  stroke: var(--heat-loss);
  stroke-width: 1.45;
}

.schematic-imax-xtra2-cascade-pump-arrow {
  fill: none;
  stroke: var(--heat-loss);
  stroke-width: 1.15;
}

.schematic-imax-xtra2-cascade-header-body {
  stroke-width: 1.8;
}

.schematic-imax-xtra2-cascade-header.flow .schematic-imax-xtra2-cascade-header-body {
  stroke: var(--heat-loss);
}

.schematic-imax-xtra2-cascade-header.return .schematic-imax-xtra2-cascade-header-body {
  stroke: var(--heat-gain);
}

.schematic-imax-xtra2-cascade-header.gas .schematic-imax-xtra2-cascade-header-body {
  stroke: #d6a800;
}

.schematic-imax-xtra2-cascade-header-flange {
  stroke-width: 0.9;
}

.schematic-imax-xtra2-cascade-separator-shell {
  stroke-width: 1.7;
}

.schematic-imax-xtra2-cascade-phex-plate,
.schematic-imax-xtra2-cascade-magnet {
  stroke-width: 0.9;
}

.schematic-imax-xtra2-cascade-service.electrical {
  stroke-dasharray: 2.5 3;
  stroke-width: 1.1;
}

.schematic-imax-xtra2-cascade-review-placeholder {
  fill: color-mix(in srgb, var(--amber) 8%, var(--surface-solid)) !important;
  stroke: var(--amber);
  stroke-dasharray: 5 3;
  stroke-width: 1.45;
}

.schematic-imax-xtra2-cascade-separator.review .schematic-imax-xtra2-cascade-separator-label {
  fill: color-mix(in srgb, var(--amber) 80%, var(--text));
}

.schematic-placement text.schematic-imax-xtra2-cascade-separator-label {
  fill: var(--muted);
  font-size: 5.3px;
  font-weight: 930;
  letter-spacing: 0.02em;
  paint-order: stroke;
  stroke: var(--surface-solid);
  stroke-width: 1.8px;
}

.schematic-placement-boiler:has([data-imax-xtra2-cascade-schematic="true"]) .schematic-connection-point {
  opacity: 0.18;
  r: 2.6px;
  transition: opacity 120ms ease, r 120ms ease;
}

.schematic-placement-boiler:has([data-imax-xtra2-cascade-schematic="true"]):hover .schematic-connection-point,
.schematic-placement-boiler.selected:has([data-imax-xtra2-cascade-schematic="true"]) .schematic-connection-point {
  opacity: 1;
  r: 4.5px;
}

.schematic-symbol-buffer-vessel {
  stroke-width: 2.2;
  pointer-events: all;
}

.schematic-buffer-vessel-shell {
  fill: var(--surface-solid);
  fill-opacity: 1;
  stroke: currentColor;
  stroke-width: 2.4;
}

.schematic-buffer-vessel-nozzle {
  fill: none;
  stroke-width: 2;
}

.schematic-buffer-vessel-nozzle.flow {
  stroke: var(--heat-loss);
}

.schematic-buffer-vessel-nozzle.return {
  stroke: var(--heat-gain);
}

.schematic-buffer-vessel-flange {
  stroke-width: 1.35;
}

.schematic-buffer-vessel-vent,
.schematic-buffer-vessel-drain,
.schematic-buffer-vessel-sensor {
  color: currentColor;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.schematic-buffer-vessel-vent-cap,
.schematic-buffer-vessel-sensor rect:not(.schematic-buffer-accessory-hitbox) {
  fill: var(--surface-solid);
  stroke: currentColor;
  stroke-width: 1.2;
}

.schematic-buffer-vessel-vent-chevron {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
}

.schematic-buffer-vessel-drain {
  color: var(--heat-gain);
  stroke: var(--heat-gain);
}

.schematic-buffer-vessel-drain-valve {
  fill: var(--surface-solid);
  stroke: var(--heat-gain);
  stroke-width: 1.2;
}

.schematic-placement .schematic-buffer-vessel-sensor text {
  fill: var(--text);
  font-size: 9px;
  font-weight: 900;
  stroke: var(--surface-solid, #fff);
  stroke-width: 1.4px;
  paint-order: stroke;
}

.schematic-buffer-accessory { cursor: pointer; pointer-events: all; }
.schematic-symbol-inline .schematic-buffer-accessory-hitbox { fill: transparent; stroke: none; pointer-events: all; }
.schematic-buffer-accessory-overlay-hitbox,
.schematic-buffer-accessory-overlay-port { fill: transparent; stroke: none; pointer-events: all; cursor: pointer; }
.schematic-buffer-accessory:hover,
.schematic-buffer-accessory.selected { color: var(--accent, #1766d2); }
.schematic-buffer-accessory.selected > rect:not(.schematic-buffer-accessory-hitbox) { stroke-width: 2.2; }
.schematic-buffer-sensor-control { stroke: #64748b; stroke-width: 1.1; stroke-dasharray: 2 1.6; }
.plant-room-buffer-accessories { display: grid; gap: 10px; padding: 12px; margin-top: 10px; border: 1px solid var(--border, #d8e2f0); border-radius: 12px; background: var(--surface, #fff); }
.plant-room-buffer-accessories-heading { display: grid; gap: 2px; }
.plant-room-buffer-accessories-heading small { color: var(--muted, #64748b); }
.plant-room-buffer-accessories-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.plant-room-buffer-accessories-list { display: grid; gap: 7px; max-height: 270px; overflow: auto; }
.plant-room-buffer-accessory-row { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; padding: 8px; border: 1px solid var(--border, #d8e2f0); border-radius: 9px; }
.plant-room-buffer-accessory-row.selected { border-color: #3b82f6; background: color-mix(in srgb, #3b82f6 9%, var(--surface-solid, #fff)); }
.plant-room-buffer-accessory-row > strong { min-width: 100%; font-size: .88rem; }
.buffer-accessory-field { display: grid; gap: 3px; min-width: 74px; flex: 1 1 76px; font-size: .73rem; color: var(--muted, #64748b); }
.buffer-accessory-field select { width: 100%; min-width: 0; padding: 6px; border: 1px solid var(--border, #d8e2f0); border-radius: 7px; color: var(--text, #1e293b); background: var(--surface-solid, #fff); }

.schematic-buffer-accessory-panel { grid-template-rows: auto minmax(0, 1fr); }
.schematic-buffer-accessory-content { min-width: 0; display: grid; align-content: start; gap: 11px; }
.schematic-buffer-accessory-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.schematic-buffer-accessory-identity > div { min-width: 0; display: grid; gap: 2px; }
.schematic-buffer-accessory-identity strong { color: var(--text); font-size: 13px; line-height: 1.25; }
.schematic-buffer-accessory-identity small { color: var(--muted); font-size: 10px; line-height: 1.25; }
.schematic-buffer-accessory-reference { display: grid; flex: 0 0 auto; place-items: center; min-width: 42px; height: 42px; padding: 0 7px; border: 1px solid color-mix(in srgb, var(--accent, #1766d2) 30%, var(--line)); border-radius: 11px; background: color-mix(in srgb, var(--accent, #1766d2) 8%, var(--surface-solid, #fff)); color: var(--accent, #1766d2); font-size: 16px; font-weight: 900; }
.schematic-buffer-accessory-section { min-width: 0; display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-solid, #fff); }
.schematic-buffer-accessory-section-head { display: grid; gap: 2px; }
.schematic-buffer-accessory-section-head strong { color: var(--text); font-size: 12px; font-weight: 850; }
.schematic-buffer-accessory-section-head small { color: var(--muted); font-size: 10px; line-height: 1.3; }
.schematic-buffer-accessory-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.schematic-buffer-accessory-field { min-width: 0; display: grid; align-content: start; gap: 5px; }
.schematic-buffer-accessory-field > span { color: var(--muted); font-size: 10px; font-weight: 780; }
.schematic-buffer-accessory-field > span small { font-size: inherit; font-weight: 600; }
.schematic-buffer-accessory-field select,
.schematic-buffer-accessory-field input { width: 100%; min-width: 0; height: 36px; padding: 0 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-solid, #fff); color: var(--text); font: inherit; font-size: 11px; }
.schematic-buffer-accessory-field :is(select, input):focus-visible { outline: 2px solid var(--accent, #1766d2); outline-offset: 2px; }
.schematic-buffer-accessory-product { min-width: 0; display: grid; gap: 2px; padding: 9px 10px; border-radius: 9px; background: color-mix(in srgb, var(--accent, #1766d2) 5%, var(--surface-solid, #fff)); }
.schematic-buffer-accessory-product strong { color: var(--text); font-size: 11px; line-height: 1.25; }
.schematic-buffer-accessory-product span,
.schematic-buffer-accessory-product small { color: var(--muted); font-size: 10px; line-height: 1.3; }
.schematic-buffer-accessory-library-link { justify-self: start; min-height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--button-glass); color: var(--accent, #1766d2); font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.schematic-buffer-accessory-library-link:hover { border-color: var(--accent, #1766d2); }
.schematic-buffer-accessory-note { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.4; }

.schematic-heat-emitter-shell {
  fill: var(--surface);
  stroke: currentColor;
  stroke-width: 3.2;
}

.schematic-heat-emitter-rail,
.schematic-heat-emitter-fin,
.schematic-heat-emitter-detail {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3.2;
}

.schematic-heat-emitter-fill {
  fill: currentColor;
  opacity: 0.96;
  stroke: none;
}

.schematic-device text,
.schematic-legend text,
.schematic-empty-callout text,
.schematic-placement text {
  fill: var(--text);
  font-size: 13px;
  font-weight: 830;
}

.schematic-device text.muted,
.schematic-empty-callout text.muted,
.schematic-placement text.muted {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.schematic-placement {
  cursor: move;
  touch-action: none;
}

.schematic-placement.generated {
  cursor: pointer;
  pointer-events: visiblePainted;
}

.schematic-symbol-tbox-zone-pump-group[data-schematic-generated-placement] {
  cursor: pointer;
  pointer-events: visiblePainted;
}

.schematic-symbol-daytan-component[data-schematic-generated-placement] {
  cursor: pointer;
  pointer-events: visiblePainted;
}

.schematic-symbol-tbox-zone-pump-group.selected,
.schematic-symbol-daytan-component.selected {
  filter: drop-shadow(0 0 8px rgba(0, 122, 255, 0.7));
}

.schematic-distribution-part-hit {
  fill: transparent;
  stroke: transparent;
  stroke-width: 1.35px;
  vector-effect: non-scaling-stroke;
  pointer-events: all;
  cursor: pointer;
  filter: none;
  transition: stroke 140ms ease, stroke-width 140ms ease;
}

.schematic-distribution-part-hit:hover {
  stroke: var(--menu-accent, #1766d2);
  stroke-opacity: .58;
}

.schematic-distribution-part-hit:is(.selected, [aria-pressed="true"]) {
  stroke: var(--menu-accent, #1766d2);
  stroke-opacity: .9;
  stroke-width: 1.7px;
}

.schematic-distribution-part-hit:focus-visible {
  outline: none;
  stroke: var(--menu-accent, #1766d2);
  stroke-opacity: 1;
  stroke-width: 2.2px;
}

.schematic-placement-hitbox {
  fill: transparent;
  stroke: none;
  pointer-events: all;
}

.schematic-placement-outlet-tmv {
  color: #111827;
}

.schematic-outlet-tmv-symbol > * {
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
}

.schematic-outlet-tmv-port {
  stroke-width: 1;
}

.schematic-outlet-tmv-port.tmv-hot {
  fill: #fecaca;
  stroke: #dc2626;
}

.schematic-outlet-tmv-port.tmv-cold {
  fill: #bfdbfe;
  stroke: #2563eb;
}

.schematic-outlet-tmv-port.tmv-mixed {
  fill: #ccfbf1;
  stroke: #14b8a6;
}

.schematic-outlet-tmv-body {
  fill: #ffffff;
  stroke: #334155;
  stroke-width: 1;
}

.schematic-outlet-tmv-adjuster {
  fill: none;
  stroke: #334155;
  stroke-width: .9;
  stroke-linecap: round;
}

.schematic-placement-outlet-tmv .schematic-device-name {
  fill: var(--text);
  font-size: 8px;
  font-weight: 850;
  paint-order: stroke;
  stroke: var(--surface-solid);
  stroke-linejoin: round;
  stroke-width: 2.5px;
}

.schematic-placement-outlet-tmv .schematic-connection-point {
  stroke-width: 1.8;
}

.schematic-placement-outlet-tmv.selected .schematic-outlet-tmv-symbol {
  filter: drop-shadow(0 0 5px rgba(124, 58, 237, 0.42));
}

.schematic-placement-outlet-tmv[data-schematic-valve-id]:hover .schematic-outlet-tmv-symbol,
.schematic-placement-outlet-tmv[data-schematic-valve-id]:focus-visible .schematic-outlet-tmv-symbol {
  filter: drop-shadow(0 0 5px rgba(124, 58, 237, 0.42));
}

.schematic-placement .schematic-device-symbol {
  color: var(--blue);
}

.schematic-placement.selected .schematic-device-symbol {
  color: var(--blue);
  filter: drop-shadow(0 0 5px rgba(0, 122, 255, 0.45));
}

.schematic-device-radiator .schematic-device-symbol,
.schematic-placement-radiator .schematic-device-symbol {
  color: var(--text);
}

.schematic-placement-riser .schematic-device-symbol {
  color: var(--muted);
}

.schematic-placement-radiator.selected .schematic-device-symbol {
  color: var(--text);
  filter: drop-shadow(0 0 5px rgba(0, 122, 255, 0.55));
}

.schematic-placement:is(
  .schematic-placement-radiator,
  .schematic-placement-fan-convector,
  .schematic-placement-radiant-heater,
  .schematic-placement-trench-heater,
  .schematic-placement-towel-rail,
  .schematic-placement-fan-coil-unit,
  .schematic-placement-unit-heater,
  .schematic-placement-finned-pipe-coil,
  .schematic-placement-pipe-coil,
  .schematic-placement-air-handling-unit,
  .schematic-placement-air-curtain,
  .schematic-placement-duct-heating-coil,
  .schematic-placement-ufh-manifold,
  .schematic-placement-pumped-ufh-manifold,
  .schematic-placement-manifold
) .schematic-device-symbol {
  color: #111827;
}

.schematic-placement:is(
  .schematic-placement-radiator,
  .schematic-placement-fan-convector,
  .schematic-placement-radiant-heater,
  .schematic-placement-trench-heater,
  .schematic-placement-towel-rail,
  .schematic-placement-fan-coil-unit,
  .schematic-placement-unit-heater,
  .schematic-placement-finned-pipe-coil,
  .schematic-placement-pipe-coil,
  .schematic-placement-air-handling-unit,
  .schematic-placement-air-curtain,
  .schematic-placement-duct-heating-coil,
  .schematic-placement-ufh-manifold,
  .schematic-placement-pumped-ufh-manifold,
  .schematic-placement-manifold
) .schematic-symbol-asset {
  filter: grayscale(1) brightness(0);
}

html[data-theme="dark"] .schematic-placement:is(
  .schematic-placement-radiator,
  .schematic-placement-fan-convector,
  .schematic-placement-radiant-heater,
  .schematic-placement-trench-heater,
  .schematic-placement-towel-rail,
  .schematic-placement-fan-coil-unit,
  .schematic-placement-unit-heater,
  .schematic-placement-finned-pipe-coil,
  .schematic-placement-pipe-coil,
  .schematic-placement-air-handling-unit,
  .schematic-placement-air-curtain,
  .schematic-placement-duct-heating-coil,
  .schematic-placement-ufh-manifold,
  .schematic-placement-pumped-ufh-manifold,
  .schematic-placement-manifold
) .schematic-device-symbol {
  color: #f8fafc;
}

html[data-theme="dark"] .schematic-placement:is(
  .schematic-placement-radiator,
  .schematic-placement-fan-convector,
  .schematic-placement-radiant-heater,
  .schematic-placement-trench-heater,
  .schematic-placement-towel-rail,
  .schematic-placement-fan-coil-unit,
  .schematic-placement-unit-heater,
  .schematic-placement-finned-pipe-coil,
  .schematic-placement-pipe-coil,
  .schematic-placement-air-handling-unit,
  .schematic-placement-air-curtain,
  .schematic-placement-duct-heating-coil,
  .schematic-placement-ufh-manifold,
  .schematic-placement-pumped-ufh-manifold,
  .schematic-placement-manifold
) .schematic-symbol-asset {
  filter: grayscale(1) invert(1) brightness(1.22) drop-shadow(0 1px 0 rgba(255, 255, 255, 0.08));
}

.schematic-placement.selected text {
  fill: var(--blue);
}

.schematic-placement-outlet-tmv.selected .schematic-device-name {
  fill: var(--text);
}

.schematic-placement-zone.schematic-zone-system-heating,
.schematic-placement-zone.schematic-zone-system-heating .schematic-device-symbol,
.schematic-placement-zone.schematic-zone-system-heating.selected .schematic-device-symbol,
.schematic-placement-zone.schematic-zone-system-heating text {
  color: #ef4444;
  fill: #ef4444;
}

.schematic-placement-zone.schematic-zone-system-cooling,
.schematic-placement-zone.schematic-zone-system-cooling .schematic-device-symbol,
.schematic-placement-zone.schematic-zone-system-cooling.selected .schematic-device-symbol,
.schematic-placement-zone.schematic-zone-system-cooling text {
  color: #0a84ff;
  fill: #0a84ff;
}

.schematic-placement-zone.schematic-zone-system-public-health,
.schematic-placement-zone.schematic-zone-system-public-health .schematic-device-symbol,
.schematic-placement-zone.schematic-zone-system-public-health.selected .schematic-device-symbol,
.schematic-placement-zone.schematic-zone-system-public-health text {
  color: #16a34a;
  fill: #16a34a;
}

.schematic-placement-zone.schematic-zone-system-gas,
.schematic-placement-zone.schematic-zone-system-gas .schematic-device-symbol,
.schematic-placement-zone.schematic-zone-system-gas.selected .schematic-device-symbol,
.schematic-placement-zone.schematic-zone-system-gas text {
  color: #facc15;
  fill: #facc15;
}

.schematic-placement-zone.schematic-zone-system-public-health text.muted,
.schematic-placement-zone.schematic-zone-system-cooling text.muted,
.schematic-placement-zone.schematic-zone-system-heating text.muted,
.schematic-placement-zone.schematic-zone-system-gas text.muted {
  fill: var(--muted);
}

.schematic-zone-card {
  pointer-events: none;
}

.schematic-zone-card-shell {
  fill: #fff;
  stroke: #b7c6d8;
  stroke-width: 1.15;
  filter: drop-shadow(0 2px 4px rgba(15, 23, 42, 0.09));
}

.schematic-placement.selected .schematic-zone-card-shell {
  stroke: rgba(0, 122, 255, 0.78);
  stroke-width: 2;
}

.schematic-zone-card-header {
  fill: currentColor;
  opacity: 0.055;
}

.schematic-zone-card-divider {
  fill: none;
  stroke: #dbe3ec;
  stroke-width: 1;
}

.schematic-zone-card-tag {
  fill: color-mix(in srgb, currentColor 8%, white);
  stroke: color-mix(in srgb, currentColor 36%, white);
  stroke-width: 1;
}

.schematic-zone-ports {
  pointer-events: none;
}

.schematic-zone-port-socket {
  fill: #fff;
  stroke: var(--zone-port-color);
  stroke-width: 1.7;
}

.schematic-zone-port-neck {
  stroke: var(--zone-port-color);
  stroke-width: 2;
  stroke-linecap: round;
}

.schematic-zone-port-core {
  fill: var(--zone-port-color);
  stroke: none;
}

.schematic-placement-zone text.schematic-zone-card-code,
.schematic-placement-zone text.schematic-zone-card-title,
.schematic-placement-zone text.schematic-zone-card-subtitle,
.schematic-placement-zone text.schematic-zone-card-metric-label,
.schematic-placement-zone text.schematic-zone-card-metric-value {
  font-family: Inter, Arial, sans-serif;
  stroke: none;
}

.schematic-placement-zone text.schematic-zone-card-code {
  fill: currentColor;
  font-size: 10px;
  font-weight: 850;
}

.schematic-placement-zone.schematic-zone-system-gas text.schematic-zone-card-code {
  fill: #9a6700;
}

.schematic-placement-zone text.schematic-zone-card-title {
  fill: var(--text);
  font-size: 15px;
  font-weight: 850;
}

.schematic-placement-zone text.schematic-zone-card-subtitle,
.schematic-placement-zone text.schematic-zone-card-metric-label {
  fill: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.schematic-placement-zone text.schematic-zone-card-metric-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.schematic-placement-zone text.schematic-zone-card-metric-value {
  fill: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.schematic-connection-point {
  fill: rgba(255, 255, 255, 0.92);
  stroke-width: 2.3;
  filter: drop-shadow(0 2px 4px rgba(15, 23, 42, 0.18));
  }

.schematic-connection-point.flow {
  stroke: var(--heat-loss);
}

.schematic-connection-point.return {
  stroke: var(--heat-gain);
}

.schematic-connection-point.any {
  stroke: var(--muted);
}

.schematic-connection-point.pipe-domestic-hot-water {
  stroke: var(--heat-loss);
}

.schematic-connection-point.pipe-domestic-cold-water {
  stroke: #0a84ff;
}

.schematic-connection-point.pipe-mixed-water {
  stroke: #14b8a6;
}

.schematic-connection-point.pipe-boosted-cold-water {
  stroke: #22c55e;
}

.schematic-connection-point.pipe-secondary-return {
  stroke: #f97316;
}

.schematic-connection-point.gas,
.schematic-connection-point.pipe-gas {
  fill: #fffbea;
  stroke: #facc15;
}

.schematic-pipe-snap-target {
  pointer-events: none;
}

.schematic-pipe-snap-target circle {
  fill: rgba(255, 255, 255, 0.16);
  stroke-width: 2;
  stroke-dasharray: 4 3;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 2px 5px rgba(15, 23, 42, 0.22));
}

.schematic-pipe-snap-target.pipe-flow circle {
  stroke: #ef4444;
}

.schematic-pipe-snap-target.pipe-return circle {
  stroke: #0a84ff;
}

.schematic-pipe-snap-target.pipe-cooling-flow circle {
  stroke: #38bdf8;
}

.schematic-pipe-snap-target.pipe-cooling-return circle {
  stroke: #a855f7;
}

.schematic-pipe-snap-target.pipe-domestic-hot-water circle {
  stroke: #ef4444;
}

.schematic-pipe-snap-target.pipe-domestic-cold-water circle {
  stroke: #0a84ff;
}

.schematic-pipe-snap-target.pipe-boosted-cold-water circle {
  stroke: #22c55e;
}

.schematic-pipe-snap-target.pipe-secondary-return circle {
  stroke: #f97316;
}

.schematic-legend text {
  font-size: 12px;
}

.schematic-status {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  overflow: hidden;
  padding: 7px 4px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.schematic-status span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schematic-status strong {
  color: var(--text);
}

.schematic-selection-delete {
  min-width: max-content;
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(239, 68, 68, 0.38);
  border-radius: 9px;
  background: rgba(239, 68, 68, 0.10);
  color: var(--heat-loss);
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: var(--glass-edge);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.schematic-selection-delete:hover {
  transform: translateY(-1px);
  border-color: rgba(239, 68, 68, 0.62);
  background: rgba(239, 68, 68, 0.16);
}

.schematic-selection-menu {
  position: absolute;
  z-index: 9;
  top: 12px;
  right: 12px;
  max-width: min(440px, calc(100% - 24px));
  min-width: min(330px, calc(100% - 24px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px auto;
  align-items: center;
  gap: 7px;
  padding: 7px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.88);
  box-shadow: var(--glass-edge), 0 14px 36px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
}

.schematic-selection-menu-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 0 4px;
}

.schematic-selection-menu-copy small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 820;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.schematic-selection-menu-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  font-weight: 840;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schematic-selection-menu-close {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--button-glass);
  color: var(--muted);
  font: inherit;
  font-size: 18px;
  font-weight: 720;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--glass-edge);
}

html[data-theme="dark"] .schematic-selection-menu {
  border-color: rgba(226, 232, 240, 0.18);
  background: rgba(15, 23, 42, 0.84);
  box-shadow: var(--glass-edge), 0 16px 38px rgba(0, 0, 0, 0.34);
}

html[data-theme="dark"] .schematic-library-panel,
html[data-theme="dark"] .schematic-toolbox,
html[data-theme="dark"] .schematic-zone-node-picker,
html[data-theme="dark"] .schematic-pipe-tool-panel,
html[data-theme="dark"] .schematic-selection-panel,
html[data-theme="dark"] .schematic-stage {
  border-color: rgba(239, 246, 255, 0.16);
  background: rgba(16, 17, 20, 0.34);
  box-shadow: var(--glass-edge), 0 22px 58px rgba(0, 0, 0, 0.34);
}

html[data-theme="dark"] .schematic-deadleg-card {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(120, 53, 15, 0.13);
}

html[data-theme="dark"] .schematic-deadleg-card > .product-selection-eyebrow {
  color: #fde68a;
}

html[data-theme="dark"] .schematic-canvas-head dl > div,
html[data-theme="dark"] .schematic-service-legend > span,
html[data-theme="dark"] .schematic-canvas-wrap {
  border-color: rgba(239, 246, 255, 0.13);
  background: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .schematic-symbol-icon,
html[data-theme="dark"] .schematic-product-visual {
  border-color: rgba(239, 246, 255, 0.13);
  background: rgba(255, 255, 255, 0.055);
}

html[data-theme="dark"] .schematic-product-symbol-badge {
  border-color: rgba(125, 188, 255, 0.28);
  background: rgba(17, 24, 39, 0.90);
}

html[data-theme="dark"] .schematic-symbol-card,
html[data-theme="dark"] .schematic-tool-btn,
html[data-theme="dark"] .schematic-zone-node-option,
html[data-theme="dark"] .schematic-zone-node-empty,
html[data-theme="dark"] .schematic-pipe-tool-panel dl > div,
html[data-theme="dark"] .schematic-pipe-tool-panel select,
html[data-theme="dark"] .schematic-selection-head button,
html[data-theme="dark"] .schematic-reference-field input,
html[data-theme="dark"] .schematic-reference-field select,
html[data-theme="dark"] .schematic-readonly-note,
html[data-theme="dark"] .schematic-model-hero,
html[data-theme="dark"] .schematic-model-hero > img,
html[data-theme="dark"] .schematic-model-hero > span,
html[data-theme="dark"] .schematic-empty-section,
html[data-theme="dark"] .schematic-library-controls select,
html[data-theme="dark"] .schematic-library-controls input,
html[data-theme="dark"] .schematic-plant-room-mode {
  border-color: rgba(239, 246, 255, 0.13);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

html[data-theme="dark"] .schematic-plant-room-mode.manual {
  border-color: rgba(10, 132, 255, 0.28);
  background: linear-gradient(145deg, rgba(10, 132, 255, 0.13), rgba(17, 24, 39, 0.72));
}

html[data-theme="dark"] .schematic-mode-switch {
  border-color: rgba(125, 188, 255, 0.20);
  background: rgba(15, 23, 42, 0.45);
}

html[data-theme="dark"] .schematic-mode-switch button.active {
  background: rgba(10, 132, 255, 0.22);
  color: #9dccff;
  box-shadow: inset 0 0 0 1px rgba(157, 204, 255, 0.12);
}

html[data-theme="dark"] .schematic-mode-switch button {
  color: rgba(226, 232, 240, 0.74);
}

html[data-theme="dark"] .schematic-mode-switch button:hover {
  background: rgba(10, 132, 255, 0.16);
  color: #9dccff;
}

html[data-theme="dark"] .schematic-mode-switch button.active:hover,
html[data-theme="dark"] .schematic-mode-switch button.active:focus-visible {
  background: rgba(10, 132, 255, 0.28);
  color: #d7ebff;
}

html[data-theme="dark"] .schematic-symbol-card.active,
html[data-theme="dark"] .schematic-tool-btn.active,
html[data-theme="dark"] .schematic-zone-node-option.active {
  border-color: rgba(10, 132, 255, 0.62);
  background: rgba(10, 132, 255, 0.18);
}

html[data-theme="dark"] .schematic-symbol-card.selected-product {
  border-color: rgba(10, 132, 255, 0.46);
  background: linear-gradient(135deg, rgba(10, 132, 255, 0.16), rgba(255, 255, 255, 0.05));
}

html[data-theme="dark"] .schematic-product-brand {
  background: rgba(17, 24, 39, 0.82);
  color: var(--text);
}

html[data-theme="dark"] .schematic-grid-bg {
  fill: rgba(9, 10, 13, 0.88);
}

html[data-theme="dark"] .schematic-grid-plate {
  fill: rgba(255, 255, 255, 0.03);
  stroke: rgba(239, 246, 255, 0.15);
}

html[data-theme="dark"] .schematic-grid-small {
  stroke: rgba(148, 163, 184, 0.13);
}

html[data-theme="dark"] .schematic-grid-large {
  stroke: rgba(203, 213, 225, 0.16);
}

html[data-theme="dark"] .schematic-floor-guide line {
  stroke: rgba(226, 232, 240, 0.28);
}

html[data-theme="dark"] .schematic-floor-guide text {
  fill: rgba(248, 250, 252, 0.82);
  stroke: rgba(0, 0, 0, 0.72);
}

html[data-theme="dark"] .schematic-device > rect,
html[data-theme="dark"] .schematic-legend rect,
html[data-theme="dark"] .schematic-empty-callout rect {
  fill: rgba(22, 24, 29, 0.78);
  stroke: rgba(239, 246, 255, 0.18);
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.35));
}

html[data-theme="dark"] .schematic-connection-point {
  fill: rgba(10, 10, 12, 0.92);
}

html[data-theme="dark"] #schematicCanvas .schematic-symbol-outlet-floor-plan,
html[data-theme="dark"] .my-day-native-svg .schematic-symbol-outlet-floor-plan {
  filter: brightness(0) invert(1) drop-shadow(0 2px 5px rgba(0, 0, 0, 0.46));
}

html[data-theme="dark"] .schematic-outlet-tmv-body {
  fill: #0f172a;
  stroke: #e2e8f0;
}

html[data-theme="dark"] .schematic-outlet-tmv-adjuster {
  stroke: #e2e8f0;
}

html[data-theme="dark"] .schematic-outlet-tmv-port.tmv-hot {
  fill: #7f1d1d;
  stroke: #f87171;
}

html[data-theme="dark"] .schematic-outlet-tmv-port.tmv-cold {
  fill: #1e3a8a;
  stroke: #60a5fa;
}

html[data-theme="dark"] .schematic-outlet-tmv-port.tmv-mixed {
  fill: #134e4a;
  stroke: #5eead4;
}

html[data-theme="dark"] .schematic-placement-outlet-tmv .schematic-device-name,
html[data-theme="dark"] .schematic-placement-outlet-tmv.selected .schematic-device-name {
  fill: var(--text);
  stroke: var(--surface-solid);
}

html[data-theme="dark"] .schematic-connection-point.gas,
html[data-theme="dark"] .schematic-connection-point.pipe-gas {
  fill: rgba(66, 52, 6, 0.92);
  stroke: #fde047;
}

html[data-theme="dark"] .schematic-pipe-snap-target circle {
  fill: rgba(10, 10, 12, 0.22);
}

.panel-reopen-stack {
  position: absolute;
  z-index: 6;
  top: 12px;
  right: 12px;
  display: grid;
  gap: 8px;
}

.panel-reopen {
  height: 32px;
  padding: 0 11px;
  border: 1px solid #b8c7da;
  border-radius: var(--radius);
  background: var(--glass-strong);
  color: var(--text);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.1);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  font-size: 12px;
  font-weight: 760;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.panel-reopen:hover {
  border-color: var(--control-hover-border);
  background: var(--control-hover-bg);
  color: #374151;
  box-shadow: var(--control-hover-shadow);
  transform: translateY(-1px);
}

.google-earth-underlay-controls {
  position: absolute;
  z-index: 32;
  top: 12px;
  left: 12px;
  display: grid;
  width: 238px;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(147, 197, 253, 0.78);
  border-radius: 8px;
  background: rgba(248, 251, 255, 0.88);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
  color: var(--text);
  pointer-events: auto;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

.google-earth-underlay-controls.is-collapsed {
  width: auto;
  min-width: 124px;
  gap: 0;
  padding: 6px;
}

.three-workspace .google-earth-underlay-controls {
  top: 104px;
  left: 14px;
  z-index: 5;
}

.google-earth-underlay-controls-head,
.google-earth-underlay-rotate,
.google-earth-underlay-fields {
  display: flex;
  align-items: center;
  gap: 7px;
}

.google-earth-underlay-controls-head {
  justify-content: space-between;
}

.google-earth-underlay-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.google-earth-underlay-controls-head strong {
  font-size: 12px;
  font-weight: 850;
}

.google-earth-underlay-collapsed-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 10px;
  min-height: 30px;
  padding: 0 8px 0 10px;
  border: 1px solid rgba(148, 163, 184, 0.54);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.86);
  color: #0f172a;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
  font-size: 12px;
  font-weight: 850;
}

.google-earth-underlay-collapsed-button:hover {
  border-color: #60a5fa;
  background: #eff6ff;
  color: #0a63d8;
}

.google-earth-underlay-collapsed-button svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.google-earth-underlay-icon-button {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.54);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.84);
  color: #0f172a;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
  touch-action: none;
  user-select: none;
}

.google-earth-underlay-icon-button:hover {
  border-color: #60a5fa;
  background: #eff6ff;
  color: #0a63d8;
}

.google-earth-underlay-icon-button:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 7px rgba(15, 23, 42, 0.14);
}

.google-earth-underlay-icon-button svg {
  width: 15px;
  height: 15px;
}

.google-earth-underlay-nudge {
  display: grid;
  grid-template-columns: repeat(3, 30px);
  justify-content: center;
  gap: 5px;
}

.google-earth-underlay-nudge-dot {
  align-self: center;
  justify-self: center;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.google-earth-underlay-rotate label,
.google-earth-underlay-fields label {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.google-earth-underlay-rotate label {
  flex: 1;
}

.google-earth-underlay-fields label {
  flex: 1;
}

.google-earth-underlay-rotate input,
.google-earth-underlay-fields input {
  width: 100%;
  min-width: 0;
  height: 28px;
  padding: 0 7px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

html[data-theme="dark"] .google-earth-underlay-controls {
  background: rgba(248, 251, 255, 0.88);
  color: #0f172a;
}

.canvas-scroll {
  position: relative;
  z-index: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  display: grid;
  place-items: center;
  overscroll-behavior: none;
  padding: 34px 34px 26px;
  touch-action: none;
  contain: layout paint style;
}

.pan-active .canvas-scroll {
  cursor: grab;
}

/* Select keeps object editing, while unclaimed blank-canvas drags pan. Child
   edit handles retain their more specific move/resize/pointer cursors. */
.select-pan-active .canvas-scroll {
  cursor: grab;
}

.canvas-scroll.pipe-box-select-ready {
  cursor: crosshair;
}

.pan-active .canvas-scroll.is-panning {
  cursor: grabbing;
  user-select: none;
}

.canvas-scroll.is-panning {
  cursor: grabbing;
  user-select: none;
}

.canvas-scroll.is-zooming {
  cursor: zoom-in;
}

.canvas-scroll.is-box-selecting {
  cursor: crosshair;
  user-select: none;
}

.canvas-scroll.is-panning .sheet,
.canvas-scroll.is-zooming .sheet,
.canvas-scroll.is-touch-zooming .sheet,
.canvas-scroll.is-box-selecting .sheet {
  user-select: none;
}

.canvas-scroll.is-panning .sheet,
.canvas-scroll.is-zooming .sheet,
.canvas-scroll.is-touch-zooming .sheet {
  will-change: transform;
}

/* Keep the SVG's paint quality stable through navigation. Switching inherited
   text/shape rendering on every gesture invalidates the entire dense drawing
   twice; compositor transforms already provide the motion fast path. */

.plant-room-planner-svg.is-panning,
.plant-room-planner-svg.is-zooming,
.plant-room-planner-svg.is-touch-zooming {
  shape-rendering: optimizeSpeed;
  text-rendering: optimizeSpeed;
}

.pipe-connection-warning {
  position: absolute;
  top: 12px;
  left: 50%;
  z-index: 24;
  width: min(430px, calc(100% - 48px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 6px 9px;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 11px;
  background: rgba(255, 251, 235, 0.78);
  box-shadow: 0 10px 24px rgba(146, 64, 14, 0.08);
  color: #92400e;
  pointer-events: none;
  backdrop-filter: blur(10px);
  opacity: 0.88;
}

.pipe-connection-warning-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

.pipe-connection-warning-icon svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.15;
}

.pipe-connection-warning strong,
.pipe-connection-warning small {
  display: block;
  min-width: 0;
}

.pipe-connection-warning strong {
  color: #7c2d12;
  font-size: 10.5px;
  font-weight: 900;
}

.pipe-connection-warning small {
  margin-top: 1px;
  color: #9a3412;
  font-size: 9px;
  font-weight: 740;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-theme="dark"] .pipe-connection-warning {
  border-color: rgba(245, 158, 11, 0.22);
  background: rgba(31, 25, 13, 0.66);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
  color: #fbbf24;
}

html[data-theme="dark"] .pipe-connection-warning-icon {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
}

html[data-theme="dark"] .pipe-connection-warning strong {
  color: #fde68a;
}

html[data-theme="dark"] .pipe-connection-warning small {
  color: #facc15;
}

/* Navigation coordinates belong only to the sheet. Inheriting them through
   every SVG descendant needlessly invalidates dense plans after each gesture. */
@property --zoom {
  syntax: "<number>";
  inherits: false;
  initial-value: 1;
}
@property --pan-x {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}
@property --pan-y {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

.sheet {
  position: relative;
  width: 980px;
  height: 610px;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72), 0 18px 46px rgba(0, 0, 0, 0.12);
  contain: layout paint style;
  transform-origin: center;
  /* Keep the settled drawing on its normal high-quality paint path. Gesture
     frames temporarily install a translate3d transform from JavaScript and
     the motion selectors above promote it only while it is moving. */
  transform: translate(var(--pan-x, 0px), var(--pan-y, 0px)) scale(var(--zoom));
}

/* Do not toggle the architectural image filter during motion: restoring it
   rerasterizes large PDF backgrounds just as the next gesture starts. */

.canvas-scroll.floor-complexity-large:is(.is-panning, .is-zooming, .is-touch-zooming) .pipe-fitting-screen-marker,
.canvas-scroll.floor-complexity-huge:is(.is-panning, .is-zooming, .is-touch-zooming) .pipe-fitting-screen-marker {
  opacity: 0;
  pointer-events: none;
}

.sheet > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  contain: layout paint style;
  shape-rendering: geometricPrecision;
  text-rendering: geometricPrecision;
}

.pdf-image-svg {
  filter: saturate(0.1) contrast(0.94);
}

.fallback-plan.hidden {
  display: none;
}

.show-grid::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.045) 1px, transparent 1px);
  background-size: 28px 28px;
}

.fallback-plan {
  color: #5b6675;
}

.plan-lines {
  fill: none;
  stroke: #5f6b7a;
  stroke-width: 2;
}

.furniture {
  fill: none;
  stroke: #a7b1bf;
  stroke-width: 1.3;
}

.dimensions {
  fill: #64748b;
  stroke: #9aa6b5;
  font-size: 10px;
  font-weight: 500;
}

.floor-plan-dimensions {
  pointer-events: none;
}

.floor-plan-dimension-line,
.floor-plan-dimension-tick,
.dimension-alignment-axis {
  fill: none;
  stroke: #6b7280;
  stroke-linecap: round;
  stroke-width: 1.7;
  vector-effect: non-scaling-stroke;
}

.floor-plan-dimension-hit {
  cursor: pointer;
  fill: none;
  pointer-events: stroke;
  stroke: transparent;
  stroke-linecap: round;
  stroke-width: 16;
}

.floor-plan-dimension-tick {
  stroke-width: 1.9;
}

.floor-plan-dimension.active .floor-plan-dimension-line,
.floor-plan-dimension.active .floor-plan-dimension-tick {
  stroke: #4b5563;
  stroke-width: 2.2;
}

.floor-plan-dimension.draft .floor-plan-dimension-line,
.floor-plan-dimension.draft .floor-plan-dimension-tick {
  stroke-dasharray: 5 4;
}

.floor-plan-dimension-point {
  fill: #ffffff;
  stroke: #6b7280;
  stroke-width: 1.8;
  vector-effect: non-scaling-stroke;
}

.floor-plan-dimension-point.draft-start {
  fill: #f3f4f6;
}

.floor-plan-dimension-handle {
  cursor: grab;
  fill: #f9fafb;
  pointer-events: all;
  stroke: #4b5563;
  stroke-width: 2.2;
  vector-effect: non-scaling-stroke;
}

.floor-plan-dimension-handle:active {
  cursor: grabbing;
}

.measurement-label.floor-plan-dimension-label {
  fill: #374151;
}

.dimension-alignment-axis {
  opacity: 0.42;
  stroke-dasharray: 4 5;
}

.dimension-selection-panel {
  width: max-content;
  max-width: calc(100vw - 64px);
}

.dimension-selection-card {
  gap: 6px;
}

.dimension-selection-panel .pipe-draft-actions {
  justify-content: center;
}

.dimension-panel-delete {
  border-color: rgba(239, 68, 68, 0.36);
  background: #fef2f2;
  color: #dc2626;
}

.dimension-panel-delete:hover {
  border-color: rgba(220, 38, 38, 0.48);
  background: #fee2e2;
  color: #b91c1c;
}

.drawing-note-layer {
  pointer-events: none;
}

.drawing-note {
  cursor: move;
  pointer-events: all;
}

.drawing-note.dragging {
  cursor: grabbing;
}

.drawing-note:focus-visible .drawing-note-hit {
  stroke: var(--blue);
  stroke-width: 2;
  stroke-dasharray: 4 3;
}

.drawing-note-leader,
.drawing-note-leader * {
  pointer-events: none;
}

.drawing-note-leader-halo,
.drawing-note-leader-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.drawing-note-leader-halo {
  stroke: rgba(255, 255, 255, 0.94);
  stroke-width: 5.5;
}

.drawing-note-leader-line {
  stroke: var(--drawing-note-color, #334155);
  stroke-width: 2.2;
}

.drawing-note-leader-arrow {
  fill: var(--drawing-note-color, #334155);
  stroke: rgba(255, 255, 255, 0.94);
  stroke-width: 1.4;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.drawing-note-leader-target {
  fill: rgba(255, 255, 255, 0.96);
  stroke: var(--drawing-note-color, #334155);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.drawing-note-hit {
  fill: transparent;
  pointer-events: all;
  stroke: transparent;
}

.drawing-note-select-box {
  fill: rgba(255, 255, 255, 0.72);
  stroke: #0a84ff;
  stroke-dasharray: 5 4;
  stroke-width: 1.8;
  vector-effect: non-scaling-stroke;
}

.drawing-note-text {
  fill: var(--drawing-note-color, #334155);
  font-size: var(--drawing-note-font-size, 16px);
  font-weight: 860;
  paint-order: stroke;
  pointer-events: none;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-linejoin: round;
  stroke-width: 4px;
}

.drawing-note.placeholder .drawing-note-text {
  opacity: 0.68;
  font-style: italic;
}

.drawing-note.is-link-picking,
.drawing-note.is-link-picking * {
  pointer-events: none;
}

.drawing-note.is-link-picking {
  opacity: 0.42;
}

.plant-room-planner-svg .drawing-note-text {
  stroke-width: 1.2px;
}

.drawing-note-panel {
  z-index: 22;
  width: min(390px, calc(100vw - 48px));
  padding: 10px;
  gap: 8px;
}

.drawing-note-move-hint {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.drawing-note-panel.is-link-picking {
  inset: 12px 12px auto auto;
  width: min(360px, calc(100vw - 48px));
  max-height: none;
  padding: 8px;
}

.drawing-note-panel.is-link-picking .drawing-note-link-card {
  margin: 0;
}

.drawing-note-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.drawing-note-panel-title {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
}

.drawing-note-panel-title strong,
.drawing-note-panel-title small {
  display: block;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawing-note-panel-title strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.05;
}

.drawing-note-panel-title small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
}

.drawing-note-reference {
  display: inline-grid;
  min-width: 38px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  box-shadow: var(--glass-edge), 0 6px 16px rgba(15, 23, 42, 0.08);
}

.drawing-note-save {
  min-height: 30px;
  padding: 0 12px;
}

.drawing-note-panel-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.drawing-note-delete {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
  border-color: rgba(239, 68, 68, 0.36);
  background: #fef2f2;
  color: #dc2626;
}

.drawing-note-delete:hover {
  border-color: rgba(220, 38, 38, 0.52);
  background: #fee2e2;
  color: #b91c1c;
}

.drawing-note-delete svg {
  width: 13px;
  height: 13px;
  stroke-width: 2.15;
}

@media (max-width: 480px) {
  .drawing-note-panel-head {
    flex-wrap: wrap;
  }

  .drawing-note-panel-actions {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .drawing-note-panel-actions .secondary-mini {
    width: 100%;
  }
}

.drawing-note-editor-card {
  display: grid;
  gap: 7px;
  padding: 9px;
}

.drawing-note-editor-card .field {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 4px;
}

.drawing-note-message-field {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}

.drawing-note-message-field textarea {
  min-height: 64px;
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--input-glass);
  color: var(--text);
  font: inherit;
  font-weight: 760;
  line-height: 1.25;
  padding: 8px;
  box-shadow: var(--glass-edge), 0 1px 2px rgba(0, 0, 0, 0.035);
}

.drawing-note-link-card {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(239, 246, 255, 0.66);
  box-shadow: var(--glass-edge), 0 1px 2px rgba(15, 23, 42, 0.035);
}

.drawing-note-link-card > span:nth-child(2) {
  min-width: 0;
}

.drawing-note-link-card strong,
.drawing-note-link-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawing-note-link-card strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
}

.drawing-note-link-card small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 760;
  line-height: 1.25;
}

.drawing-note-link-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  background: rgba(10, 132, 255, 0.1);
  color: #0868d7;
}

.drawing-note-link-icon svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.1;
}

.drawing-note-link-card.is-picking {
  border-color: rgba(10, 132, 255, 0.5);
  background: rgba(219, 234, 254, 0.86);
  box-shadow: var(--glass-edge), 0 0 0 3px rgba(10, 132, 255, 0.11);
}

.drawing-note-link-card.is-missing {
  border-color: rgba(245, 158, 11, 0.38);
  background: rgba(255, 247, 237, 0.8);
}

.drawing-note-link-card.is-missing .drawing-note-link-icon {
  background: rgba(245, 158, 11, 0.13);
  color: #b45309;
}

.drawing-note-link-card .secondary-mini {
  min-height: 29px;
  padding: 0 9px;
  font-size: 10px;
}

.drawing-note-link-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.drawing-note-control-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  align-items: end;
}

.drawing-note-control-grid input[type="number"],
.drawing-note-control-grid input[type="color"],
.drawing-note-control-grid select,
.drawing-note-size-stepper input {
  width: 100%;
  min-height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--input-glass);
  color: var(--text);
  font: inherit;
  font-weight: 820;
  padding: 0 8px;
  box-shadow: var(--glass-edge), 0 1px 2px rgba(0, 0, 0, 0.035);
}

.drawing-note-control-grid select {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, currentColor 50%) right 12px top calc(50% - 3px) / 6px 6px no-repeat,
    linear-gradient(135deg, currentColor 50%, transparent 50%) right 7px top calc(50% - 3px) / 6px 6px no-repeat,
    var(--input-glass);
  padding-right: 24px;
}

.drawing-note-colour-row {
  display: grid;
  grid-template-columns: 34px minmax(64px, 96px);
  gap: 6px;
  align-items: center;
  justify-content: start;
}

.drawing-note-colour-swatch {
  display: block;
  width: 34px;
  height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--drawing-note-swatch, #334155);
  box-shadow: var(--glass-edge), inset 0 0 0 2px rgba(255, 255, 255, 0.34);
}

.drawing-note-control-grid input[type="color"] {
  padding: 2px;
}

.drawing-note-colour-field.is-inherited input[type="color"] {
  cursor: not-allowed;
  opacity: 0.58;
}

.drawing-note-size-field {
  gap: 4px;
}

.drawing-note-size-stepper {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 6px;
}

.drawing-note-size-stepper input {
  min-height: 36px;
}

.drawing-note-size-buttons {
  display: grid;
  gap: 4px;
}

.drawing-note-size-buttons button {
  display: grid;
  min-width: 34px;
  min-height: 16px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  box-shadow: var(--glass-edge), 0 1px 2px rgba(0, 0, 0, 0.035);
  cursor: pointer;
}

.drawing-note-size-buttons button:hover {
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(239, 246, 255, 0.9);
}

.drawing-note-size-buttons svg {
  width: 13px;
  height: 13px;
  stroke-width: 2.2;
}

html[data-theme="dark"] .drawing-note-text {
  stroke: rgba(255, 255, 255, 0.92);
}

html[data-theme="dark"] .drawing-note-select-box {
  fill: rgba(255, 255, 255, 0.72);
}

html[data-theme="dark"] .drawing-note-message-field textarea,
html[data-theme="dark"] .drawing-note-control-grid input[type="number"],
html[data-theme="dark"] .drawing-note-control-grid input[type="color"],
html[data-theme="dark"] .drawing-note-control-grid select,
html[data-theme="dark"] .drawing-note-size-stepper input,
html[data-theme="dark"] .drawing-note-size-buttons button,
html[data-theme="dark"] .drawing-note-reference {
  border-color: rgba(239, 246, 255, 0.22);
  background:
    linear-gradient(145deg, rgba(73, 78, 89, 0.82), rgba(37, 40, 48, 0.72));
  color: var(--text);
}

html[data-theme="dark"] .drawing-note-link-card {
  border-color: rgba(239, 246, 255, 0.2);
  background: linear-gradient(145deg, rgba(73, 78, 89, 0.7), rgba(37, 40, 48, 0.68));
}

html[data-theme="dark"] .drawing-note-link-card.is-picking {
  border-color: rgba(96, 165, 250, 0.52);
  background: rgba(30, 64, 175, 0.26);
}

html[data-theme="dark"] .drawing-note-link-card.is-missing {
  border-color: rgba(251, 191, 36, 0.38);
  background: rgba(120, 53, 15, 0.24);
}

html[data-theme="dark"] .drawing-note-delete {
  border-color: rgba(248, 113, 113, 0.42);
  background: rgba(127, 29, 29, 0.34);
  color: #fecaca;
}

html[data-theme="dark"] .drawing-note-delete:hover {
  border-color: rgba(252, 165, 165, 0.58);
  background: rgba(153, 27, 27, 0.46);
  color: #fee2e2;
}

.dimension-panel-delete svg {
  width: 13px;
  height: 13px;
  stroke-width: 2.1;
}

.empty-floor-label {
  fill: #334155;
  font-size: 18px;
  font-weight: 820;
}

.empty-floor-hint {
  fill: #64748b;
  font-size: 12px;
  font-weight: 650;
}

.overlay {
  z-index: 3;
  overflow: visible;
}

.zone rect {
  stroke-width: 1.8;
}

.google-earth-building-floor-layer {
  pointer-events: none;
}

.google-earth-building-floor {
  fill: rgba(255, 255, 255, 0.94);
  stroke: none;
}

.zone.active rect {
  stroke-width: 3;
  filter: drop-shadow(0 0 0.35rem rgba(75, 85, 99, 0.25));
}

.zone.plant-room-assign-target {
  cursor: pointer;
}

.zone.plant-room-assign-target rect,
.drawn-room.plant-room-assign-target .room-fill {
  stroke: #0ea5e9;
  stroke-width: 2.5;
  stroke-dasharray: 8 5;
  filter: drop-shadow(0 0 0.35rem rgba(14, 165, 233, 0.28));
  vector-effect: non-scaling-stroke;
}

.zone text {
  pointer-events: none;
}

.room-canvas-label {
  pointer-events: none;
}

.room-canvas-label text {
  letter-spacing: 0;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.96);
  stroke-linejoin: round;
  stroke-width: calc(4px * var(--canvas-text-scale, 1));
  transform: translateY(calc(var(--room-label-line-offset, 0px) * var(--canvas-text-scale, 1)));
}

.room-name-label {
  fill: #0f172a;
  font-size: calc(12px * var(--canvas-text-scale, 1));
  font-weight: 820;
}

.room-area-label {
  fill: #334155;
  font-size: calc(10px * var(--canvas-text-scale, 1));
  font-weight: 680;
}

.room-heat-loss-label {
  fill: var(--heat-loss);
  font-size: calc(10px * var(--canvas-text-scale, 1));
  font-weight: 820;
}

.room-heat-gain-label {
  fill: var(--heat-gain);
  font-size: calc(10px * var(--canvas-text-scale, 1));
  font-weight: 820;
}

.room-ventilation-label {
  fill: #16a34a;
  font-size: calc(10px * var(--canvas-text-scale, 1));
  font-weight: 820;
}

.room-plant-room-services-label {
  fill: #0ea5e9;
  font-size: calc(10px * var(--canvas-text-scale, 1));
  font-weight: 900;
}

.sheet.label-lod-compact .room-heat-gain-label,
.sheet.label-lod-compact .room-ventilation-label {
  display: none;
}

.sheet.label-lod-overview .room-area-label,
.sheet.label-lod-overview .room-heat-loss-label,
.sheet.label-lod-overview .room-heat-gain-label,
.sheet.label-lod-overview .room-ventilation-label,
.sheet.label-lod-overview .room-plant-room-services-label {
  display: none;
}

/* These labels use each room's real screen footprint, not drawing calibration.
   Their visible rows are already laid out together; global LOD must not leave
   gaps by hiding individual rows a second time. Hit testing stays on geometry. */
.sheet .room-canvas-label.adaptive-room-label text {
  display: inline;
  font-size: calc(var(--room-label-font-size, 10px) * var(--canvas-text-scale, 1));
  stroke-width: calc(2px * var(--canvas-text-scale, 1));
}

.pipe {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pipe.supply {
  stroke: var(--red);
}

.pipe.return {
  stroke: #4b5563;
  stroke-dasharray: 9 7;
}

#pipeDraftLayer,
#pipeDraftLayer * {
  pointer-events: none;
}

.drawn-pipe-line,
.pipe-draft-line {
  fill: none;
  stroke-width: calc(var(--pipe-visual-stroke-width, 1.4px) * var(--canvas-zoom-inverse, 1));
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.drawn-pipe-hit-line {
  fill: none;
  stroke: transparent;
  stroke-width: 0;
  pointer-events: none;
}

/* Dense plans use one run-wide hit path. Segment selection and dragging still
   resolve the nearest segment from the pointer coordinate, avoiding hundreds
   of otherwise identical invisible SVG paths in large projects. */
.drawn-pipe-run.collapsed-segment-hit-targets > .drawn-pipe-hit-line {
  cursor: move;
  pointer-events: stroke;
  stroke-width: calc(5.5px * var(--canvas-zoom-inverse, 1) * var(--floor-interaction-precision, 1));
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.drawn-pipe-segment-hit {
  fill: none;
  stroke: transparent;
  stroke-width: calc(5.5px * var(--canvas-zoom-inverse, 1) * var(--floor-interaction-precision, 1));
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  pointer-events: stroke;
}

.drawn-pipe-segment-hit {
  cursor: move;
}

.drawn-pipe-run {
  cursor: pointer;
}

.pipe-vertex-layer {
  pointer-events: all;
}

.pipe-edit-overlay,
.heat-emitter-offset-edit-overlay {
  pointer-events: none;
}

.pipe-edit-overlay .pipe-vertex-layer,
.pipe-edit-overlay .pipe-vertex-layer * {
  pointer-events: all;
}

.pipe-edit-overlay .pipe-edit-run,
.pipe-edit-overlay .pipe-edit-run .drawn-pipe-segment-hit,
.heat-emitter-offset-edit-overlay .pipe-edit-run,
.heat-emitter-offset-edit-overlay .drawn-pipe-segment-hit {
  pointer-events: none;
}

.pipe-vertex-hit {
  cursor: grab;
  fill: rgba(255, 255, 255, 0.001);
  pointer-events: all;
  stroke: transparent;
  transform: scale(var(--canvas-marker-scale, 1)) scale(var(--floor-interaction-precision, 1));
  transform-box: fill-box;
  transform-origin: center;
  vector-effect: non-scaling-stroke;
}

.pipe-vertex-hit:active {
  cursor: grabbing;
}

.pipe-edit-hit-run .drawn-pipe-segment-hit,
.heat-emitter-offset-edit-hit {
  cursor: grab;
  stroke-width: calc(6px * var(--canvas-zoom-inverse, 1) * var(--floor-interaction-precision, 1));
}

.pipe-edit-run {
  cursor: pointer;
}

.pipe-selection-box {
  pointer-events: none;
}

.pipe-selection-box rect {
  fill: rgba(0, 122, 255, 0.12);
  stroke: rgba(0, 122, 255, 0.82);
  stroke-width: 1.5;
  stroke-dasharray: 5 4;
  vector-effect: non-scaling-stroke;
}

.pipe-selection-box-contain rect {
  fill: rgba(147, 51, 234, 0.17);
  stroke: rgba(126, 34, 206, 0.94);
}

.drawn-pipe-run.active .drawn-pipe-line,
.drawn-pipe-segment-line.active {
  opacity: 1;
}

.drawn-pipe-run.pipe-flow.active .drawn-pipe-line,
.drawn-pipe-run.pipe-flow .drawn-pipe-segment-line.active {
  filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.82)) drop-shadow(0 2px 5px rgba(15, 23, 42, 0.18));
}

.drawn-pipe-run.pipe-return.active .drawn-pipe-line,
.drawn-pipe-run.pipe-return .drawn-pipe-segment-line.active {
  filter: drop-shadow(0 0 6px rgba(10, 132, 255, 0.82)) drop-shadow(0 2px 5px rgba(15, 23, 42, 0.18));
}

.drawn-pipe-run.pipe-cooling-flow.active .drawn-pipe-line,
.drawn-pipe-run.pipe-cooling-flow .drawn-pipe-segment-line.active {
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.82)) drop-shadow(0 2px 5px rgba(15, 23, 42, 0.18));
}

.drawn-pipe-run.pipe-cooling-return.active .drawn-pipe-line,
.drawn-pipe-run.pipe-cooling-return .drawn-pipe-segment-line.active {
  filter: drop-shadow(0 0 6px rgba(168, 85, 247, 0.82)) drop-shadow(0 2px 5px rgba(15, 23, 42, 0.18));
}

.drawn-pipe-run.pipe-domestic-hot-water.active .drawn-pipe-line,
.drawn-pipe-run.pipe-domestic-hot-water .drawn-pipe-segment-line.active {
  filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.82)) drop-shadow(0 2px 5px rgba(15, 23, 42, 0.18));
}

.drawn-pipe-run.pipe-domestic-cold-water.active .drawn-pipe-line,
.drawn-pipe-run.pipe-domestic-cold-water .drawn-pipe-segment-line.active {
  filter: drop-shadow(0 0 6px rgba(10, 132, 255, 0.82)) drop-shadow(0 2px 5px rgba(15, 23, 42, 0.18));
}

.drawn-pipe-run.pipe-boosted-cold-water.active .drawn-pipe-line,
.drawn-pipe-run.pipe-boosted-cold-water .drawn-pipe-segment-line.active {
  filter: drop-shadow(0 0 6px rgba(34, 197, 94, 0.82)) drop-shadow(0 2px 5px rgba(15, 23, 42, 0.18));
}

.drawn-pipe-run.pipe-secondary-return.active .drawn-pipe-line,
.drawn-pipe-run.pipe-secondary-return .drawn-pipe-segment-line.active {
  filter: drop-shadow(0 0 6px rgba(249, 115, 22, 0.82)) drop-shadow(0 2px 5px rgba(15, 23, 42, 0.18));
}

.drawn-pipe-run.pipe-gas.active .drawn-pipe-line,
.drawn-pipe-run.pipe-gas .drawn-pipe-segment-line.active {
  filter: drop-shadow(0 0 6px rgba(250, 204, 21, 0.9)) drop-shadow(0 2px 5px rgba(15, 23, 42, 0.18));
}

.drawn-pipe-run.pipe-electrical-cable.active .drawn-pipe-line,
.drawn-pipe-run.pipe-electrical-cable .drawn-pipe-segment-line.active {
  filter: drop-shadow(0 0 6px rgba(17, 24, 39, 0.78)) drop-shadow(0 2px 5px rgba(15, 23, 42, 0.18));
}

.pipe-connection-warning-layer {
  pointer-events: none;
}

.pipe-connection-warning-highlight {
  pointer-events: none;
}

.pipe-connection-warning-pipe {
  fill: none;
  stroke: #f59e0b;
  stroke-width: 3.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.34;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 3px rgba(245, 158, 11, 0.24));
}

.pipe-connection-warning-target-ring {
  fill: rgba(255, 247, 237, 0.3);
  stroke: #f59e0b;
  stroke-width: 1.35;
  opacity: 0.68;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 3px rgba(245, 158, 11, 0.26));
}

.pipe-connection-warning-target-crosshair {
  fill: none;
  stroke: #92400e;
  stroke-width: 0.9;
  stroke-linecap: round;
  opacity: 0.54;
  vector-effect: non-scaling-stroke;
}

.pipe-connection-warning-callout rect {
  fill: rgba(255, 251, 235, 0.72);
  stroke: rgba(245, 158, 11, 0.28);
  stroke-width: 0.75;
  vector-effect: non-scaling-stroke;
  filter: none;
}

.pipe-connection-warning-callout text {
  fill: #7c2d12;
  font-size: calc(3.8px * var(--canvas-text-scale, 1));
  font-weight: 840;
  opacity: 0.72;
  paint-order: stroke;
  stroke: rgba(255, 251, 235, 0.78);
  stroke-width: calc(1.35px * var(--canvas-text-scale, 1));
  vector-effect: non-scaling-stroke;
}

.pipe-connection-warning-callout text + text {
  fill: #b45309;
  font-size: calc(3px * var(--canvas-text-scale, 1));
  font-weight: 780;
}

html[data-theme="dark"] .pipe-connection-warning-pipe {
  stroke: #fbbf24;
  filter: drop-shadow(0 0 3px rgba(251, 191, 36, 0.28));
}

html[data-theme="dark"] .pipe-connection-warning-target-ring {
  fill: rgba(69, 46, 12, 0.3);
  stroke: #fbbf24;
  filter: drop-shadow(0 0 3px rgba(251, 191, 36, 0.28));
}

html[data-theme="dark"] .pipe-connection-warning-target-crosshair {
  stroke: #fde68a;
}

html[data-theme="dark"] .pipe-connection-warning-callout rect {
  fill: rgba(31, 25, 13, 0.7);
  stroke: rgba(251, 191, 36, 0.3);
}

html[data-theme="dark"] .pipe-connection-warning-callout text {
  fill: #fde68a;
  stroke: rgba(31, 25, 13, 0.95);
}

html[data-theme="dark"] .pipe-connection-warning-callout text + text {
  fill: #facc15;
}

.pipe-flow .drawn-pipe-line,
.pipe-flow .pipe-draft-line {
  stroke: #ef4444;
}

.pipe-return .drawn-pipe-line,
.pipe-return .pipe-draft-line {
  stroke: #0a84ff;
}

.pipe-cooling-flow .drawn-pipe-line,
.pipe-cooling-flow .pipe-draft-line {
  stroke: #38bdf8;
}

.pipe-cooling-return .drawn-pipe-line,
.pipe-cooling-return .pipe-draft-line {
  stroke: #a855f7;
}

.pipe-domestic-hot-water .drawn-pipe-line,
.pipe-domestic-hot-water .pipe-draft-line {
  stroke: #ef4444;
}

.pipe-domestic-cold-water .drawn-pipe-line,
.pipe-domestic-cold-water .pipe-draft-line {
  stroke: #0a84ff;
}

.pipe-boosted-cold-water .drawn-pipe-line,
.pipe-boosted-cold-water .pipe-draft-line {
  stroke: #22c55e;
}

.pipe-secondary-return .drawn-pipe-line,
.pipe-secondary-return .pipe-draft-line {
  stroke: #f97316;
}

.pipe-gas .drawn-pipe-line,
.pipe-gas .pipe-draft-line {
  stroke: #facc15;
}

.pipe-electrical-cable .drawn-pipe-line,
.pipe-electrical-cable .pipe-draft-line {
  stroke: #111827;
}

.pipe-valves {
  pointer-events: none;
}

.pipe-valve-node {
  --pipe-valve-color: #64748b;
  color: var(--pipe-valve-color);
  cursor: grab;
  pointer-events: all;
}

.pipe-valve-node.pipe-flow,
.pipe-valve-node.pipe-domestic-hot-water {
  --pipe-valve-color: #ef4444;
}

.pipe-valve-node.pipe-return,
.pipe-valve-node.pipe-domestic-cold-water {
  --pipe-valve-color: #0a84ff;
}

.pipe-valve-node.pipe-cooling-flow {
  --pipe-valve-color: #38bdf8;
}

.pipe-valve-node.pipe-cooling-return {
  --pipe-valve-color: #a855f7;
}

.pipe-valve-node.pipe-boosted-cold-water {
  --pipe-valve-color: #22c55e;
}

.pipe-valve-node.pipe-secondary-return {
  --pipe-valve-color: #f97316;
}

.pipe-valve-node.pipe-gas {
  --pipe-valve-color: #facc15;
}

.pipe-valve-node.pipe-district-flow {
  --pipe-valve-color: #b91c1c;
}

.pipe-valve-node.pipe-district-return {
  --pipe-valve-color: #4f46e5;
}

.pipe-valve-node.pipe-fire-sprinkler {
  --pipe-valve-color: #dc2626;
}

.pipe-valve-node.pipe-fire-hydrant {
  --pipe-valve-color: #7f1d1d;
}

.pipe-valve-node.pipe-fire-hose-reel {
  --pipe-valve-color: #f97316;
}

.pipe-valve-node.pipe-drainage-soil {
  --pipe-valve-color: #78350f;
}

.pipe-valve-node.pipe-drainage-waste {
  --pipe-valve-color: #92400e;
}

.pipe-valve-node.pipe-drainage-rainwater {
  --pipe-valve-color: #a16207;
}

.pipe-valve-node.pipe-electrical-cable {
  --pipe-valve-color: #111827;
}

.pipe-valve-node.active {
  cursor: grabbing;
}

.pipe-valve-screen-marker,
.pipe-fitting-screen-marker {
  transform: scale(var(--canvas-marker-scale, 1));
  transform-box: view-box;
  transform-origin: 0 0;
}

.pipe-valve-hit {
  fill: transparent;
  stroke: none;
  stroke-width: 0;
  pointer-events: all;
}

/* Artwork follows calibrated overview density; its transparent pick target
   deliberately remains screen-sized. Inspecting a valve restores full detail. */
#sheet .floor-pipe-valve-artwork {
  --floor-valve-artwork-scale: var(--floor-valve-visual-scale, 1);
  transform: scale(var(--floor-valve-artwork-scale));
  transform-box: view-box;
  transform-origin: 0 0;
}

#sheet .pipe-valve-node.active .floor-pipe-valve-artwork {
  --floor-valve-artwork-scale: 1;
}

@media (hover: hover) {
  #sheet .pipe-valve-node:hover .floor-pipe-valve-artwork {
    --floor-valve-artwork-scale: 1;
  }
}

#sheet .floor-pipe-valve-artwork :is(.pipe-valve-inline-shape, .pipe-valve-inline-line, .pipe-valve-body, .pipe-valve-stem, .pipe-valve-handle, .pipe-valve-occluder) {
  stroke-width: calc(1.1px / var(--floor-valve-artwork-scale, 1));
}

/* This marker already cancels both drawing scale and canvas zoom. Scale all
   artwork normally inside it, including actuator lines/rectangles/polygons. */
#sheet .pipe-valve-screen-marker .pipe-valve-hit {
  fill: transparent;
  stroke: none;
  stroke-width: 0;
}

#sheet .pipe-valve-screen-marker .pipe-valve-reference {
  font-size: 9px;
  font-weight: 700;
  stroke: #fff;
  stroke-width: 2.5px;
  vector-effect: none;
}

#sheet [data-canvas-native-pick="valve"] .pipe-valve-reference {
  pointer-events: bounding-box;
  cursor: pointer;
}

@media (hover: hover) {
  #sheet [data-canvas-native-pick="valve"]:hover .pipe-valve-hit {
    fill: rgba(0, 111, 238, 0.04);
    stroke: rgba(0, 111, 238, 0.45);
    stroke-width: 1;
  }
}

.pipe-valve-reference,
.plant-room-planner-valve-reference {
  fill: currentColor;
  font-family: Inter, Arial, sans-serif;
  font-size: 4px;
  font-weight: 800;
  paint-order: stroke;
  stroke: var(--surface, #fff);
  stroke-linejoin: round;
  stroke-width: 1.3px;
  pointer-events: none;
}

.plant-room-planner-valve-reference {
  font-size: 2.7px;
  stroke-width: 0.9px;
}

.pipe-valve-body,
.pipe-valve-stem {
  fill: none;
  stroke: var(--pipe-valve-color);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.1;
  vector-effect: non-scaling-stroke;
}

.pipe-valve-handle {
  fill: var(--surface);
  stroke: var(--pipe-valve-color);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.pipe-valve-symbol-asset {
  pointer-events: none;
  overflow: visible;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.72));
}

.pipe-valve-symbol-fill {
  fill: var(--pipe-valve-color);
  pointer-events: none;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.72));
}

.pipe-valve-symbol-backdrop {
  fill: #fff;
  pointer-events: none;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.58));
}

.pipe-valve-inline-symbol {
  color: var(--pipe-valve-color, currentColor);
  pointer-events: none;
}

.pipe-valve-inline-shape {
  fill: #fff;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.15;
  vector-effect: non-scaling-stroke;
}

.pipe-valve-inline-line {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.15;
  vector-effect: non-scaling-stroke;
}

.pipe-valve-inline-text {
  fill: currentColor;
  font-family: Inter, Arial, sans-serif;
  font-weight: 900;
  paint-order: stroke;
  stroke: #fff;
  stroke-linejoin: round;
  stroke-width: .85px;
}

.schematic-generated-valve .pipe-valve-reference {
  fill: #0f172a;
  stroke: #fff;
  stroke-width: 2;
  paint-order: stroke;
  stroke-linejoin: round;
  font: 800 7px Inter, Arial, sans-serif;
  pointer-events: none;
}

.pipe-valve-occluder {
  fill: #fff;
  stroke: color-mix(in srgb, var(--pipe-valve-color) 28%, transparent);
  stroke-width: 0.8;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.pipe-valve-node.active .pipe-valve-body,
.pipe-valve-node.active .pipe-valve-stem,
.pipe-valve-node.active .pipe-valve-handle,
.pipe-valve-node.active .pipe-valve-symbol-asset,
.pipe-valve-node.active .pipe-valve-symbol-fill {
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--pipe-valve-color) 72%, transparent));
  stroke-width: 2.8;
}

.schematic-generated-valve {
  cursor: pointer;
  pointer-events: all;
}

.schematic-generated-valve:focus-visible .pipe-valve-body,
.schematic-generated-valve:focus-visible .pipe-valve-stem,
.schematic-generated-valve:focus-visible .pipe-valve-handle {
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--pipe-valve-color) 72%, transparent));
}

.schematic-generated-valve .pipe-valve-hit {
  pointer-events: all;
}

.schematic-generated-valve .pipe-valve-body,
.schematic-generated-valve .pipe-valve-stem {
  stroke-width: 2.8;
}

.schematic-generated-valve .pipe-valve-handle {
  fill: color-mix(in srgb, var(--surface) 88%, transparent);
}

html[data-theme="dark"] .pipe-valve-symbol-asset {
  filter: invert(1) brightness(1.35) drop-shadow(0 0 3px rgba(0, 0, 0, 0.55));
}

html[data-theme="dark"] .pipe-valve-symbol-backdrop {
  fill: rgba(15, 18, 24, 0.94);
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.55));
}

html[data-theme="dark"] .pipe-valve-occluder {
  fill: rgba(15, 18, 24, 0.92);
}

html[data-theme="dark"] .pipe-valve-node.active .pipe-valve-symbol-asset,
html[data-theme="dark"] .pipe-valve-node.active .pipe-valve-symbol-fill {
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--pipe-valve-color) 70%, transparent));
}

html[data-theme="dark"] .schematic-generated-valve .pipe-valve-handle {
  fill: rgba(9, 10, 13, 0.94);
}

html[data-theme="dark"] .schematic-generated-valve .pipe-valve-occluder {
  fill: rgba(9, 10, 13, 0.94);
}

.pipe-draft-line.pipe-flow {
  stroke: #ef4444;
}

.pipe-draft-line.pipe-return {
  stroke: #0a84ff;
}

.pipe-draft-line.pipe-cooling-flow {
  stroke: #38bdf8;
}

.pipe-draft-line.pipe-cooling-return {
  stroke: #a855f7;
}

.pipe-draft-line.pipe-domestic-hot-water {
  stroke: #ef4444;
}

.pipe-draft-line.pipe-domestic-cold-water {
  stroke: #0a84ff;
}

.pipe-draft-line.pipe-boosted-cold-water {
  stroke: #22c55e;
}

.pipe-draft-line.pipe-secondary-return {
  stroke: #f97316;
}

.pipe-draft-line.pipe-gas {
  stroke: #facc15;
}

.pipe-draft-line.pipe-electrical-cable {
  stroke: #111827;
}

.pipe-draft-line {
  stroke-dasharray: 8 6;
  opacity: 0.82;
}

.multi-pipe-centre-line {
  fill: none;
  stroke: rgba(15, 23, 42, 0.32);
  stroke-width: 1.2;
  stroke-dasharray: 3 5;
  stroke-linecap: round;
  pointer-events: none;
}

.multi-pipe-capture {
  pointer-events: none;
}

.multi-pipe-capture-circle {
  fill: rgba(37, 99, 235, 0.07);
  stroke: rgba(37, 99, 235, 0.72);
  stroke-width: 1.2;
  stroke-dasharray: 5 5;
  vector-effect: non-scaling-stroke;
}

.multi-pipe-capture-link {
  fill: none;
  stroke: rgba(37, 99, 235, 0.62);
  stroke-width: 1;
  stroke-dasharray: 3 4;
  vector-effect: non-scaling-stroke;
}

.multi-pipe-capture-target {
  fill: rgba(255, 255, 255, 0.92);
}

.pipe-draft-point,
.pipe-guide-point,
.pipe-vertex {
  fill: rgba(255, 255, 255, 0.92);
  stroke: #111827;
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
}

.pipe-flow .pipe-draft-point,
.pipe-flow .pipe-guide-point,
.pipe-flow .pipe-vertex {
  stroke: #ef4444;
}

.pipe-return .pipe-draft-point,
.pipe-return .pipe-guide-point,
.pipe-return .pipe-vertex {
  stroke: #0a84ff;
}

.pipe-cooling-flow .pipe-draft-point,
.pipe-cooling-flow .pipe-guide-point,
.pipe-cooling-flow .pipe-vertex {
  stroke: #38bdf8;
}

.pipe-cooling-return .pipe-draft-point,
.pipe-cooling-return .pipe-guide-point,
.pipe-cooling-return .pipe-vertex {
  stroke: #a855f7;
}

.pipe-domestic-hot-water .pipe-draft-point,
.pipe-domestic-hot-water .pipe-guide-point,
.pipe-domestic-hot-water .pipe-vertex {
  stroke: #ef4444;
}

.pipe-domestic-cold-water .pipe-draft-point,
.pipe-domestic-cold-water .pipe-guide-point,
.pipe-domestic-cold-water .pipe-vertex {
  stroke: #0a84ff;
}

.pipe-boosted-cold-water .pipe-draft-point,
.pipe-boosted-cold-water .pipe-guide-point,
.pipe-boosted-cold-water .pipe-vertex {
  stroke: #22c55e;
}

.pipe-secondary-return .pipe-draft-point,
.pipe-secondary-return .pipe-guide-point,
.pipe-secondary-return .pipe-vertex {
  stroke: #f97316;
}

.pipe-gas .pipe-draft-point,
.pipe-gas .pipe-guide-point,
.pipe-gas .pipe-vertex {
  stroke: #facc15;
}

.pipe-electrical-cable .pipe-draft-point,
.pipe-electrical-cable .pipe-guide-point,
.pipe-electrical-cable .pipe-vertex {
  stroke: #111827;
}

.pipe-vertex {
  cursor: grab;
  stroke-width: 2;
  transform: scale(var(--canvas-marker-scale, 1));
  transform-box: fill-box;
  transform-origin: center;
  filter: drop-shadow(0 1px 3px rgba(15, 23, 42, 0.22));
}

.pipe-draft-point,
.pipe-guide-point,
.pipe-draft-elbow,
.pipe-snap-target,
.ufh-manifold-connection-anchor,
.district-endpoint-connection-anchor,
.fire-endpoint-connection-anchor,
.plant-room-connection-port,
.floor-plan-plant-room-equipment-port-core,
.auto-pipe-heat-emitter-target-hit,
.auto-pipe-heat-emitter-target-ring,
.auto-pipe-riser-target-hit,
.auto-pipe-riser-target-ring {
  /* These markers survive lightweight wheel zooms, so render-time radii can
     otherwise become stale and balloon as the drawing transform changes. */
  transform: scale(var(--canvas-marker-scale, 1));
  transform-box: fill-box;
  transform-origin: center;
}

.riser-screen-marker {
  transform: scale(var(--canvas-marker-scale, 1));
  transform-box: view-box;
  transform-origin: 0 0;
}

.pipe-vertex.active {
  fill: #ffffff;
}

.drawn-duct-run {
  cursor: pointer;
}

.duct-edit-overlay {
  pointer-events: none;
}

.duct-edit-overlay .duct-edit-run,
.duct-edit-overlay .duct-vertex-layer {
  pointer-events: all;
}

.drawn-duct-segment-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 18;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  pointer-events: stroke;
  cursor: grab;
  touch-action: none;
}

.drawn-duct-segment-hit:active,
.duct-edit-run:active {
  cursor: grabbing;
}

.duct-vertex-layer {
  pointer-events: all;
}

.duct-vertex-hit {
  fill: rgba(255, 255, 255, 0.001);
  stroke: transparent;
  vector-effect: non-scaling-stroke;
  pointer-events: all;
  cursor: grab;
  touch-action: none;
}

.duct-vertex-hit:active,
.duct-vertex:active {
  cursor: grabbing;
}

.duct-vertex {
  fill: #ffffff;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  pointer-events: all;
  cursor: grab;
  filter: drop-shadow(0 1px 3px rgba(15, 23, 42, 0.24));
  touch-action: none;
}

.duct-vertex.duct-vertex-tee {
  stroke-width: 3;
  filter: drop-shadow(0 0 4px rgba(14, 165, 233, 0.42));
}

.duct-vertex-hit.duct-vertex-tee {
  cursor: move;
}

.duct-supply .duct-vertex {
  stroke: #0284c7;
}

.duct-extract .duct-vertex {
  stroke: #d97706;
}

html[data-theme="dark"] .duct-vertex {
  fill: #0f172a;
}

.canvas-scroll.is-zooming .duct-edit-overlay,
.canvas-scroll.is-panning .duct-edit-overlay,
.canvas-scroll.is-touch-zooming .duct-edit-overlay,
#sheet.is-zooming .duct-edit-overlay,
#sheet.is-panning .duct-edit-overlay,
#sheet.is-touch-zooming .duct-edit-overlay {
  opacity: 0;
  pointer-events: none;
}

.drawn-duct-hit-line {
  fill: none;
  stroke: transparent;
  stroke-width: 24;
  stroke-linecap: square;
  stroke-linejoin: miter;
  vector-effect: non-scaling-stroke;
  pointer-events: stroke;
}

.drawn-duct-band,
.duct-draft-band {
  fill: none;
  stroke-linecap: square;
  stroke-linejoin: miter;
  pointer-events: none;
}

.drawn-duct-centreline,
.duct-draft-centreline {
  fill: none;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 7 5;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.duct-supply .drawn-duct-band,
.duct-supply .duct-draft-band {
  stroke: rgba(14, 165, 233, 0.24);
}

.duct-supply .drawn-duct-centreline,
.duct-supply .duct-draft-centreline {
  stroke: #0284c7;
}

.duct-extract .drawn-duct-band,
.duct-extract .duct-draft-band {
  stroke: rgba(245, 158, 11, 0.28);
}

.duct-extract .drawn-duct-centreline,
.duct-extract .duct-draft-centreline {
  stroke: #d97706;
}

.duct-airflow-direction {
  --duct-airflow-colour: #0ea5e9;
  --duct-airflow-highlight: #e0f2fe;
  color: var(--duct-airflow-colour);
  pointer-events: none;
}

.duct-airflow-direction.duct-airflow-extract {
  --duct-airflow-colour: #f59e0b;
  --duct-airflow-highlight: #fff7ed;
}

.duct-airflow-compact .duct-airflow-chevron {
  animation: none;
  opacity: 0.9;
}

.duct-airflow-compact .duct-airflow-stream-a {
  stroke: currentColor;
  stroke-width: 2;
  opacity: 0.9;
}

.duct-airflow-haze,
.duct-airflow-stream {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.duct-airflow-haze {
  stroke: currentColor;
  stroke-width: 6.5;
  opacity: 0.12;
  animation: duct-airflow-breathe 1.8s ease-in-out infinite;
}

.duct-airflow-stream-a {
  stroke: var(--duct-airflow-highlight);
  stroke-width: 2.7;
  stroke-dasharray: 0.1 11.9;
  opacity: 0.95;
  animation: duct-airflow-particles var(--duct-airflow-duration, 1s) linear infinite;
}

.duct-airflow-stream-b {
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-dasharray: 6 23;
  opacity: 0.82;
  animation: duct-airflow-wisps var(--duct-airflow-secondary-duration, 1.58s) linear infinite;
}

.duct-airflow-chevron {
  fill: var(--duct-airflow-highlight);
  stroke: currentColor;
  stroke-width: 0.8;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
  transform-box: fill-box;
  transform-origin: center;
  animation: duct-airflow-chevron-pulse var(--duct-airflow-duration, 1s) ease-in-out infinite;
}

@keyframes duct-airflow-particles {
  from {
    stroke-dashoffset: 12;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes duct-airflow-wisps {
  from {
    stroke-dashoffset: 29;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes duct-airflow-breathe {
  0%,
  100% {
    opacity: 0.08;
  }
  50% {
    opacity: 0.17;
  }
}

@keyframes duct-airflow-chevron-pulse {
  0%,
  100% {
    opacity: 0.72;
  }
  50% {
    opacity: 1;
  }
}

.drawn-duct-run.active .drawn-duct-band,
.drawn-duct-run.active .drawn-duct-centreline {
  filter: drop-shadow(0 0 7px rgba(2, 132, 199, 0.48)) drop-shadow(0 2px 5px rgba(15, 23, 42, 0.18));
}

.drawn-duct-run.active.duct-extract .drawn-duct-band,
.drawn-duct-run.active.duct-extract .drawn-duct-centreline {
  filter: drop-shadow(0 0 7px rgba(217, 119, 6, 0.5)) drop-shadow(0 2px 5px rgba(15, 23, 42, 0.18));
}

.duct-inline-components {
  pointer-events: none;
}

.canvas-scroll.is-zooming .duct-inline-components,
.canvas-scroll.is-panning .duct-inline-components,
.canvas-scroll.is-touch-zooming .duct-inline-components,
.sheet.is-zooming .duct-inline-components,
.sheet.is-touch-zooming .duct-inline-components {
  opacity: 0;
  pointer-events: none;
}

.duct-inline-component-node {
  --duct-component-color: #0284c7;
  cursor: grab;
  pointer-events: all;
  touch-action: none;
}

.duct-inline-component-node.duct-extract {
  --duct-component-color: #d97706;
}

.duct-inline-component-node.active {
  cursor: grabbing;
}

.duct-inline-component-hit {
  fill: transparent;
  pointer-events: all;
}

.duct-inline-component-stem {
  fill: none;
  stroke: var(--duct-component-color);
  stroke-linecap: round;
  stroke-width: 2.2;
  vector-effect: non-scaling-stroke;
}

.duct-inline-component-body {
  fill: rgba(255, 255, 255, 0.97);
  stroke: var(--duct-component-color);
  stroke-width: 1.7;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 1px 3px rgba(15, 23, 42, 0.24));
}

.duct-inline-component-tag {
  fill: var(--duct-component-color);
  font-family: Inter, Arial, sans-serif;
  font-size: 4.2px;
  font-weight: 900;
  letter-spacing: -0.02em;
  pointer-events: none;
}

.duct-inline-component-node.active .duct-inline-component-body,
.duct-inline-component-node.active .duct-inline-component-stem {
  stroke-width: 2.5;
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--duct-component-color) 72%, transparent));
}

html[data-theme="dark"] .duct-inline-component-body {
  fill: rgba(15, 23, 42, 0.96);
}

html[data-theme="dark"] .duct-inline-component-tag {
  fill: color-mix(in srgb, var(--duct-component-color) 78%, white);
}

.duct-tee-fitting {
  pointer-events: none;
}

.duct-tee-fitting.editable {
  pointer-events: all;
  cursor: move;
  touch-action: none;
}

.duct-tee-fitting.editable:active {
  cursor: grabbing;
}

.duct-tee-band {
  fill: rgba(224, 242, 254, 0.96);
  stroke: #0284c7;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 1px 3px rgba(15, 23, 42, 0.2));
}

.duct-tee-centre {
  fill: #0284c7;
  stroke: rgba(255, 255, 255, 0.96);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.duct-tee-fitting.duct-extract .duct-tee-band {
  fill: rgba(255, 247, 237, 0.97);
  stroke: #d97706;
}

.duct-tee-fitting.duct-extract .duct-tee-centre {
  fill: #d97706;
}

.duct-size-label {
  pointer-events: none;
}

.duct-size-label.duct-supply .pipe-size-label-pill-bg {
  fill: rgba(240, 249, 255, 0.9);
  stroke: rgba(2, 132, 199, 0.62);
}

.duct-size-label.duct-extract .pipe-size-label-pill-bg {
  fill: rgba(255, 247, 237, 0.92);
  stroke: rgba(217, 119, 6, 0.64);
}

.duct-size-label.duct-supply .pipe-size-label {
  fill: #0369a1;
}

.duct-size-label.duct-extract .pipe-size-label {
  fill: #b45309;
}

.drawn-duct-run.active .duct-size-label .pipe-size-label-pill-bg {
  stroke-width: max(0.7px, calc(1px * var(--pipe-label-scale, var(--canvas-text-scale, 1))));
}

html[data-theme="dark"] .duct-size-label.duct-supply .pipe-size-label-pill-bg {
  fill: rgba(8, 47, 73, 0.9);
  stroke: rgba(56, 189, 248, 0.68);
}

html[data-theme="dark"] .duct-size-label.duct-extract .pipe-size-label-pill-bg {
  fill: rgba(67, 36, 12, 0.9);
  stroke: rgba(251, 191, 36, 0.7);
}

html[data-theme="dark"] .duct-size-label.duct-supply .pipe-size-label {
  fill: #7dd3fc;
}

html[data-theme="dark"] .duct-size-label.duct-extract .pipe-size-label {
  fill: #fcd34d;
}

.ventilation-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 6px 0 2px;
}

.ventilation-valve-design-grid {
  margin-top: 10px;
}

.ventilation-auto-balance-field {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.07);
}

.ventilation-auto-balance-field input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
}

.duct-inline-component-warnings {
  display: grid;
  gap: 6px;
  margin: 10px 0 2px;
  padding: 0;
  list-style: none;
}

.duct-inline-component-warnings li {
  padding: 8px 10px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 11px;
  background: rgba(245, 158, 11, 0.09);
  color: #92400e;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
}

html[data-theme="dark"] .duct-inline-component-warnings li {
  color: #fcd34d;
}

.ventilation-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.ventilation-status.pass {
  border-color: rgba(34, 197, 94, 0.34);
  background: rgba(34, 197, 94, 0.13);
  color: #15803d;
}

.ventilation-status.review {
  border-color: rgba(245, 158, 11, 0.34);
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
}

.ventilation-status.fail {
  border-color: rgba(239, 68, 68, 0.34);
  background: rgba(239, 68, 68, 0.13);
  color: #b91c1c;
}

.ventilation-status.info {
  border-color: rgba(59, 130, 246, 0.34);
  background: rgba(59, 130, 246, 0.13);
  color: #1d4ed8;
}

.ventilation-capture-grid textarea {
  min-height: 74px;
  resize: vertical;
}

.ventilation-room-balance-list {
  display: grid;
  gap: 7px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.ventilation-room-balance-list li {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--glass-border);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.34);
}

.ventilation-room-balance-list strong,
.ventilation-room-balance-list span,
.ventilation-room-balance-list small {
  display: block;
  min-width: 0;
}

.ventilation-room-balance-list strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.ventilation-room-balance-list span,
.ventilation-room-balance-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.35;
}

.public-health-design-card {
  gap: 10px;
}

.public-health-demand-list li {
  border-color: rgba(14, 165, 233, 0.18);
}

.public-health-hygiene-list {
  display: grid;
  gap: 7px;
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.public-health-hygiene-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 8px;
  align-items: center;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.34);
}

html[data-theme="dark"] .public-health-hygiene-list li {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.public-health-hygiene-list strong {
  min-width: 0;
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
}

.public-health-hygiene-list small {
  grid-column: 1 / -1;
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.35;
}

.duct-draft {
  pointer-events: none;
}

.duct-alignment-guides {
  pointer-events: none;
}

.duct-guide-axis {
  fill: none;
  stroke: rgba(2, 132, 199, 0.42);
  stroke-width: 1.15;
  stroke-dasharray: 7 7;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.duct-alignment-guides.duct-extract .duct-guide-axis {
  stroke: rgba(217, 119, 6, 0.46);
}

.duct-right-angle-guide {
  fill: none;
  stroke: rgba(2, 132, 199, 0.82);
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.duct-alignment-guides.duct-extract .duct-right-angle-guide {
  stroke: rgba(217, 119, 6, 0.86);
}

.duct-draft-band {
  opacity: 0.82;
}

.duct-draft-point,
.duct-guide-point,
.duct-snap-target {
  fill: rgba(255, 255, 255, 0.94);
  stroke: #0284c7;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.duct-extract .duct-draft-point,
.duct-extract .duct-guide-point,
.duct-extract .duct-snap-target {
  stroke: #d97706;
}

.duct-snap-target {
  fill: rgba(224, 242, 254, 0.88);
  stroke-width: 2;
  filter: drop-shadow(0 0 4px rgba(2, 132, 199, 0.45));
}

.duct-snap-target.diffuser-target {
  fill: rgba(255, 255, 255, 0.28);
  stroke-dasharray: 3 2;
  transform-box: fill-box;
  transform-origin: center;
  animation: duct-diffuser-magnet-pulse 900ms ease-in-out infinite alternate;
}

.duct-snap-target.zone-node-target {
  fill: rgba(219, 234, 254, 0.34);
  stroke-dasharray: 3 2;
  transform-box: fill-box;
  transform-origin: center;
  animation: duct-diffuser-magnet-pulse 900ms ease-in-out infinite alternate;
}

.duct-snap-target.equipment-target {
  fill: rgba(204, 251, 241, 0.42);
  stroke: #0f766e;
  stroke-dasharray: 3 2;
  transform-box: fill-box;
  transform-origin: center;
  animation: duct-diffuser-magnet-pulse 900ms ease-in-out infinite alternate;
}

.duct-extract .duct-snap-target {
  fill: rgba(255, 247, 237, 0.9);
  filter: drop-shadow(0 0 4px rgba(217, 119, 6, 0.45));
}

.ventilation-diffuser {
  cursor: pointer;
  pointer-events: all;
}

.diffuser-throw-overlays,
.diffuser-throw-room-clip,
.diffuser-throw-overlay {
  pointer-events: none;
}

.diffuser-extract-overlay,
.diffuser-extract-overlay * {
  pointer-events: none;
}

.diffuser-extract-area {
  fill: rgba(245, 158, 11, 0.07);
  stroke: rgba(217, 119, 6, 0.68);
  stroke-width: 1.15;
  stroke-dasharray: 7 5;
  vector-effect: non-scaling-stroke;
}

.diffuser-extract-inward-arrow {
  fill: none;
  stroke: rgba(217, 119, 6, 0.65);
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.diffuser-throw-area {
  fill: rgba(56, 189, 248, 0.08);
  stroke: rgba(2, 132, 199, 0.68);
  stroke-width: 1.15;
  stroke-dasharray: 7 5;
  vector-effect: non-scaling-stroke;
}

.diffuser-throw-guide {
  fill: none;
  stroke: rgba(2, 132, 199, 0.72);
  stroke-width: 1;
  stroke-dasharray: 4 4;
  vector-effect: non-scaling-stroke;
}

.diffuser-throw-core {
  fill: rgba(14, 165, 233, 0.4);
  stroke: rgba(2, 132, 199, 0.8);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.ventilation-diffuser.duct-extract .diffuser-throw-area,
.ventilation-diffuser.duct-extract .diffuser-throw-guide,
.ventilation-diffuser.duct-extract .diffuser-throw-core {
  stroke: rgba(217, 119, 6, 0.72);
}

.ventilation-diffuser.duct-extract .diffuser-throw-area {
  fill: rgba(245, 158, 11, 0.08);
}

.diffuser-hit {
  fill: transparent;
}

.diffuser-body {
  fill: rgba(255, 255, 255, 0.96);
  stroke: #0284c7;
  stroke-width: 1.7;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 1px 3px rgba(15, 23, 42, 0.18));
}

.diffuser-symbol {
  fill: none;
  stroke: #0284c7;
  stroke-width: 1.2;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.ventilation-diffuser text {
  fill: #0f172a;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.ventilation-diffuser.duct-extract .diffuser-body,
.ventilation-diffuser.duct-extract .diffuser-symbol {
  stroke: #d97706;
}

.ventilation-diffuser.active .diffuser-body,
.ventilation-diffuser.active .diffuser-symbol {
  stroke-width: 2.4;
  filter: drop-shadow(0 0 6px rgba(2, 132, 199, 0.55));
}

.ventilation-diffuser.active.duct-extract .diffuser-body,
.ventilation-diffuser.active.duct-extract .diffuser-symbol {
  filter: drop-shadow(0 0 6px rgba(217, 119, 6, 0.55));
}

.ventilation-diffuser.duct-snap-active .diffuser-body,
.ventilation-diffuser.duct-snap-active .diffuser-symbol {
  stroke-width: 2.6;
  filter: drop-shadow(0 0 7px rgba(2, 132, 199, 0.75));
}

.ventilation-diffuser.duct-snap-active.duct-extract .diffuser-body,
.ventilation-diffuser.duct-snap-active.duct-extract .diffuser-symbol {
  filter: drop-shadow(0 0 7px rgba(217, 119, 6, 0.75));
}

.plant-room-node.duct-snap-active .plant-room-marker,
.plant-room-node.duct-snap-active .plant-room-connection-port {
  stroke-width: 2.5;
  filter: drop-shadow(0 0 8px rgba(37, 99, 235, 0.78));
}

.plant-room-node.duct-snap-active .plant-room-halo {
  opacity: 1;
}

@keyframes duct-diffuser-magnet-pulse {
  from { transform: scale(0.92); opacity: 0.72; }
  to { transform: scale(1.14); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .duct-snap-target.diffuser-target,
  .duct-snap-target.zone-node-target,
  .duct-snap-target.equipment-target {
    animation: none;
  }
}

.pipe-snap-target {
  fill: rgba(255, 255, 255, 0.16);
  stroke-width: 2;
  stroke-dasharray: 4 3;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.pipe-snap-target.pipe-flow {
  stroke: #ef4444;
}

.pipe-snap-target.pipe-return {
  stroke: #0a84ff;
}

.pipe-snap-target.pipe-cooling-flow {
  stroke: #38bdf8;
}

.pipe-snap-target.pipe-cooling-return {
  stroke: #a855f7;
}

.pipe-snap-target.pipe-domestic-hot-water {
  stroke: #ef4444;
}

.pipe-snap-target.pipe-domestic-cold-water {
  stroke: #0a84ff;
}

.pipe-snap-target.pipe-boosted-cold-water {
  stroke: #22c55e;
}

.pipe-snap-target.pipe-secondary-return {
  stroke: #f97316;
}

.pipe-snap-target.pipe-gas {
  stroke: #facc15;
}

.pipe-snap-target.pipe-electrical-cable {
  stroke: #111827;
}

.pipe-alignment-guides {
  pointer-events: none;
}

.pipe-guide-axis {
  stroke: rgba(15, 23, 42, 0.22);
  stroke-width: 1.1;
  stroke-dasharray: 7 7;
  vector-effect: non-scaling-stroke;
}

.pipe-alignment-guides.pipe-flow .pipe-guide-axis {
  stroke: rgba(239, 68, 68, 0.35);
}

.pipe-alignment-guides.pipe-return .pipe-guide-axis {
  stroke: rgba(10, 132, 255, 0.35);
}

.pipe-alignment-guides.pipe-cooling-flow .pipe-guide-axis {
  stroke: rgba(56, 189, 248, 0.38);
}

.pipe-alignment-guides.pipe-cooling-return .pipe-guide-axis {
  stroke: rgba(168, 85, 247, 0.38);
}

.pipe-alignment-guides.pipe-domestic-hot-water .pipe-guide-axis {
  stroke: rgba(239, 68, 68, 0.35);
}

.pipe-alignment-guides.pipe-domestic-cold-water .pipe-guide-axis {
  stroke: rgba(10, 132, 255, 0.35);
}

.pipe-alignment-guides.pipe-boosted-cold-water .pipe-guide-axis {
  stroke: rgba(34, 197, 94, 0.38);
}

.pipe-alignment-guides.pipe-secondary-return .pipe-guide-axis {
  stroke: rgba(249, 115, 22, 0.38);
}

.pipe-alignment-guides.pipe-gas .pipe-guide-axis {
  stroke: rgba(250, 204, 21, 0.44);
}

.pipe-alignment-guides.pipe-electrical-cable .pipe-guide-axis {
  stroke: rgba(17, 24, 39, 0.42);
}

.pipe-flow-direction {
  pointer-events: none;
  color: #ef4444;
  filter: drop-shadow(0 1px 1.5px rgba(15, 23, 42, 0.2));
  isolation: isolate;
}

.drawing-content .pipe-flow-direction:not(.schematic-flow-direction):not(.plant-room-planner-flow-direction) > .pipe-flow-direction-screen-marker {
  transform: scale(var(--canvas-marker-scale, 1));
  transform-box: view-box;
  transform-origin: 0 0;
}

.pipe-flow-direction-compact {
  filter: none;
  isolation: auto;
}

.pipe-flow-direction-compact .pipe-flow-direction-rail {
  stroke-width: 1.2;
  stroke-dasharray: none;
  opacity: 0.3;
}

.pipe-flow-direction-compact .pipe-flow-direction-chevron {
  animation-name: pipe-flow-direction-compact-travel;
  animation-duration: 1.15s;
  animation-timing-function: cubic-bezier(0.42, 0, 0.2, 1);
}

.pipe-flow-direction-glow {
  fill: none;
  stroke: currentColor;
  stroke-width: 4.8;
  stroke-linecap: round;
  opacity: 0.1;
  vector-effect: non-scaling-stroke;
  animation: pipe-flow-direction-glow 1.65s ease-in-out infinite;
}

.pipe-flow-direction-rail {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-dasharray: 1.2 2.2;
  opacity: 0.2;
  vector-effect: non-scaling-stroke;
}

.pipe-flow-direction-stream {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-dasharray: 0.1 4.4;
  opacity: 0.72;
  vector-effect: non-scaling-stroke;
  animation: pipe-flow-direction-stream 1.1s linear infinite;
}

.pipe-flow-direction-stream-b {
  stroke-width: 0.95;
  opacity: 0.36;
  animation-duration: 1.48s;
  animation-delay: -0.34s;
}

.pipe-flow-direction-chevron-shadow {
  fill: rgba(255, 255, 255, 0.9);
  opacity: 0.92;
  stroke: none;
  transform-box: fill-box;
  transform-origin: center;
  animation: pipe-flow-direction-chevron 1.35s ease-in-out infinite;
}

.pipe-flow-direction-chevron {
  fill: currentColor;
  stroke: rgba(255, 255, 255, 0.82);
  stroke-width: 0.52;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  transform-box: fill-box;
  transform-origin: center;
  animation: pipe-flow-direction-chevron 1.35s ease-in-out infinite;
}

.pipe-flow-direction-dot {
  fill: currentColor;
  opacity: 0.84;
  transform-box: fill-box;
  transform-origin: center;
  animation: pipe-flow-direction-particle 1.35s cubic-bezier(0.42, 0, 0.2, 1) infinite;
}

.pipe-flow-direction-dot-b {
  opacity: 0.4;
  animation-duration: 1.68s;
  animation-delay: -0.58s;
}

.pipe-flow-direction.pipe-return {
  color: #0a84ff;
}

.pipe-flow-direction.pipe-cooling-flow {
  color: #38bdf8;
}

.pipe-flow-direction.pipe-cooling-return {
  color: #a855f7;
}

.pipe-flow-direction.pipe-domestic-hot-water {
  color: #ef4444;
}

.pipe-flow-direction.pipe-domestic-cold-water {
  color: #0a84ff;
}

.pipe-flow-direction.pipe-boosted-cold-water {
  color: #22c55e;
}

.pipe-flow-direction.pipe-secondary-return {
  color: #f97316;
}

.pipe-flow-direction.pipe-gas {
  color: #eab308;
}

.pipe-flow-direction.pipe-electrical-cable {
  color: #111827;
}

.schematic-flow-direction .pipe-flow-direction-glow {
  stroke-width: 6.4;
  opacity: 0.14;
}

.schematic-flow-direction .pipe-flow-direction-rail {
  stroke-width: 1.8;
  opacity: 0.26;
}

.schematic-flow-direction .pipe-flow-direction-stream {
  stroke-width: 2.15;
}

.schematic-flow-direction .pipe-flow-direction-stream-b {
  stroke-width: 1.25;
}

.schematic-flow-direction .pipe-flow-direction-chevron {
  stroke-width: 0.72;
}

@keyframes pipe-flow-direction-stream {
  0% {
    stroke-dashoffset: 7.6;
    opacity: 0;
  }
  18% {
    opacity: 0.72;
  }
  72% {
    opacity: 0.52;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 0;
  }
}

@keyframes pipe-flow-direction-particle {
  0% {
    opacity: 0;
    transform: translateX(-4.8px) scale(0.52);
  }
  22% {
    opacity: 0.92;
    transform: translateX(-2.1px) scale(1);
  }
  68% {
    opacity: 0.78;
    transform: translateX(2.4px) scale(0.9);
  }
  100% {
    opacity: 0;
    transform: translateX(5.6px) scale(0.5);
  }
}

@keyframes pipe-flow-direction-chevron {
  0%,
  100% {
    opacity: 0.86;
    transform: translateX(0) scale(0.94);
  }
  48% {
    opacity: 1;
    transform: translateX(0.8px) scale(1.06);
  }
}

@keyframes pipe-flow-direction-compact-travel {
  0% {
    opacity: 0.28;
    transform: translateX(-2.8px) scale(0.88);
  }
  22% {
    opacity: 0.92;
  }
  76% {
    opacity: 1;
  }
  100% {
    opacity: 0.24;
    transform: translateX(3px) scale(0.96);
  }
}

@keyframes pipe-flow-direction-glow {
  0%,
  100% {
    opacity: 0.08;
  }
  50% {
    opacity: 0.18;
  }
}

@media (prefers-reduced-motion: reduce) {
  .duct-airflow-haze,
  .duct-airflow-stream,
  .duct-airflow-chevron,
  .pipe-flow-direction-glow,
  .pipe-flow-direction-stream,
  .pipe-flow-direction-dot,
  .pipe-flow-direction-chevron,
  .pipe-flow-direction-chevron-shadow {
    animation: none;
  }

  .pipe-flow-direction-dot {
    opacity: 0.58;
  }
}

.pipe-reference {
  fill: var(--text);
  font-size: calc(10px * var(--canvas-text-scale, 1));
  font-weight: 900;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 3px;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.pipe-size-label-grid {
  pointer-events: none;
}

#sheet .pipe-size-label-screen-marker {
  transform: scale(calc(var(--canvas-marker-scale, 1) * var(--pipe-label-scale-compensation, 1)));
  transform-box: view-box;
  transform-origin: 0 0;
}

#sheet .floor-pipe-size-label-artwork {
  transform: scale(var(--floor-pipe-label-visual-scale, 1));
  transform-box: view-box;
  transform-origin: 0 0;
}

#sheet .pipe-size-label-grid.active .floor-pipe-size-label-artwork {
  transform: scale(1);
}

#sheet .pipe-size-label-pill-bg {
  fill: #ffffff;
  stroke-linejoin: round;
  /* The label's geometry and marker already cancel zoom. Author the stroke
     in those same local units; a non-scaling stroke still scales with the
     outer HTML transform and turns into a thick band at high zoom. */
  stroke-width: calc(0.9px * var(--pipe-label-scale, var(--canvas-text-scale, 1)));
  vector-effect: none;
}

#sheet .pipe-pill-label.compact .pipe-size-label-pill-bg {
  fill: #ffffff;
}

#sheet .pipe-size-label {
  fill: #0f172a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: 0.01em;
  paint-order: normal;
  stroke: none;
}

#sheet .pipe-size-label-grid.compact .pipe-size-label {
  font-size: calc(10px * var(--pipe-label-scale, var(--canvas-text-scale, 1)));
}

#sheet .pipe-size-label-grid.expanded .pipe-size-label {
  font-size: calc(11px * var(--pipe-label-scale, var(--canvas-text-scale, 1)));
}

#sheet .pipe-size-label-grid.pipe-flow .pipe-size-label-pill-bg,
#sheet .pipe-size-label-grid.pipe-domestic-hot-water .pipe-size-label-pill-bg {
  fill: rgba(255, 255, 255, 0.98);
  stroke: rgba(185, 28, 28, 0.76);
}

#sheet .pipe-size-label-grid.pipe-return .pipe-size-label-pill-bg,
#sheet .pipe-size-label-grid.pipe-domestic-cold-water .pipe-size-label-pill-bg {
  fill: rgba(255, 255, 255, 0.98);
  stroke: rgba(3, 105, 161, 0.76);
}

#sheet .pipe-size-label-grid.pipe-cooling-flow .pipe-size-label-pill-bg {
  stroke: rgba(3, 105, 161, 0.76);
}

#sheet .pipe-size-label-grid.pipe-cooling-return .pipe-size-label-pill-bg {
  stroke: rgba(107, 33, 168, 0.76);
}

#sheet .pipe-size-label-grid.pipe-boosted-cold-water .pipe-size-label-pill-bg {
  stroke: rgba(22, 101, 52, 0.76);
}

#sheet .pipe-size-label-grid.pipe-secondary-return .pipe-size-label-pill-bg {
  stroke: rgba(154, 52, 18, 0.76);
}

#sheet .pipe-size-label-grid.pipe-gas .pipe-size-label-pill-bg {
  stroke: rgba(133, 77, 14, 0.78);
}

#sheet .pipe-size-label-grid.pipe-flow .pipe-size-label,
#sheet .pipe-size-label-grid.pipe-domestic-hot-water .pipe-size-label {
  fill: #b91c1c;
}

#sheet .pipe-size-label-grid.pipe-return .pipe-size-label,
#sheet .pipe-size-label-grid.pipe-domestic-cold-water .pipe-size-label,
#sheet .pipe-size-label-grid.pipe-cooling-flow .pipe-size-label {
  fill: #075985;
}

#sheet .pipe-size-label-grid.pipe-cooling-return .pipe-size-label {
  fill: #6b21a8;
}

#sheet .pipe-size-label-grid.pipe-boosted-cold-water .pipe-size-label {
  fill: #166534;
}

#sheet .pipe-size-label-grid.pipe-secondary-return .pipe-size-label {
  fill: #9a3412;
}

#sheet .pipe-size-label-grid.pipe-gas .pipe-size-label {
  fill: #854d0e;
}

#sheet .pipe-size-label-grid.pipe-drainage-soil .pipe-size-label-pill-bg {
  fill: rgba(255, 251, 235, 0.98);
  stroke: rgba(120, 53, 15, 0.78);
}

#sheet .pipe-size-label-grid.pipe-drainage-waste .pipe-size-label-pill-bg {
  fill: rgba(255, 251, 235, 0.98);
  stroke: rgba(146, 64, 14, 0.78);
}

#sheet .pipe-size-label-grid.pipe-drainage-rainwater .pipe-size-label-pill-bg {
  fill: rgba(255, 251, 235, 0.98);
  stroke: rgba(161, 98, 7, 0.78);
}

#sheet .pipe-size-label-grid.pipe-drainage-soil .pipe-size-label {
  fill: #78350f;
}

#sheet .pipe-size-label-grid.pipe-drainage-waste .pipe-size-label {
  fill: #92400e;
}

#sheet .pipe-size-label-grid.pipe-drainage-rainwater .pipe-size-label {
  fill: #854d0e;
}

#sheet .pipe-size-label-grid.pipe-district-flow .pipe-size-label-pill-bg {
  fill: rgba(255, 255, 255, 0.98);
  stroke: rgba(185, 28, 28, 0.76);
}

#sheet .pipe-size-label-grid.pipe-district-return .pipe-size-label-pill-bg {
  fill: rgba(255, 255, 255, 0.98);
  stroke: rgba(79, 70, 229, 0.76);
}

#sheet .pipe-size-label-grid.pipe-district-flow .pipe-size-label {
  fill: #b91c1c;
}

#sheet .pipe-size-label-grid.pipe-district-return .pipe-size-label {
  fill: #4f46e5;
}

#sheet .duct-size-label.duct-supply .pipe-size-label-pill-bg {
  fill: rgba(240, 249, 255, 0.98);
  stroke: rgba(2, 132, 199, 0.76);
}

#sheet .duct-size-label.duct-extract .pipe-size-label-pill-bg {
  fill: rgba(255, 247, 237, 0.98);
  stroke: rgba(180, 83, 9, 0.76);
}

#sheet .duct-size-label.duct-supply .pipe-size-label {
  fill: #0369a1;
}

#sheet .duct-size-label.duct-extract .pipe-size-label {
  fill: #9a3412;
}

#sheet .pipe-size-label-grid.expanded .pipe-size-label-secondary {
  fill: #334155;
  font-size: calc(9.5px * var(--pipe-label-scale, var(--canvas-text-scale, 1)));
  font-weight: 700;
  opacity: 1;
}

.pipe-label-layer {
  pointer-events: none;
}

.pipe-pill-label {
  filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.16));
}

/* Floor labels live inside the zoomed drawing coordinate system. Cancel that
   outer zoom for the shadow so a close view cannot turn a subtle halo into a
   thick outline around the pill and its text. */
#sheet .pipe-pill-label {
  filter: drop-shadow(
    0
    calc(1px * var(--canvas-zoom-inverse, 1))
    calc(2px * var(--canvas-zoom-inverse, 1))
    rgba(15, 23, 42, 0.12)
  );
}

.sheet.is-zooming .pipe-pill-label,
.sheet.is-touch-zooming .pipe-pill-label,
#sheet.is-zooming .pipe-pill-label,
#sheet.is-panning .pipe-pill-label,
#sheet.is-touch-zooming .pipe-pill-label,
.canvas-scroll.is-zooming #sheet .pipe-pill-label,
.canvas-scroll.is-panning #sheet .pipe-pill-label,
.canvas-scroll.is-touch-zooming #sheet .pipe-pill-label,
.canvas-scroll.is-zooming .pipe-pill-label,
.canvas-scroll.is-panning .pipe-pill-label,
.canvas-scroll.is-touch-zooming .pipe-pill-label,
.canvas-scroll.is-zooming .pipe-size-label-grid,
.canvas-scroll.is-panning .pipe-size-label-grid,
.canvas-scroll.is-touch-zooming .pipe-size-label-grid {
  /* Preserve the composited text during navigation; hiding then restoring
     hundreds of labels forces two additional whole-SVG paints. */
  pointer-events: none;
  transition: none;
}

.plant-room-planner-svg.is-panning .plant-room-planner-pipe-label,
.plant-room-planner-svg.is-zooming .plant-room-planner-pipe-label,
.plant-room-planner-svg.is-touch-zooming .plant-room-planner-pipe-label {
  filter: none;
  opacity: 0;
  pointer-events: none;
  transition: none;
}

.canvas-scroll.is-zooming .auto-pipe-heat-emitter-targets,
.canvas-scroll.is-panning .auto-pipe-heat-emitter-targets,
.canvas-scroll.is-touch-zooming .auto-pipe-heat-emitter-targets,
.canvas-scroll.is-zooming .auto-pipe-riser-targets,
.canvas-scroll.is-panning .auto-pipe-riser-targets,
.canvas-scroll.is-touch-zooming .auto-pipe-riser-targets,
.canvas-scroll.is-panning .drawn-pipe-segment-hit,
.canvas-scroll.is-touch-zooming .drawn-pipe-segment-hit,
.canvas-scroll.is-zooming .drawn-pipe-run.collapsed-segment-hit-targets > .drawn-pipe-hit-line,
.canvas-scroll.is-panning .drawn-pipe-run.collapsed-segment-hit-targets > .drawn-pipe-hit-line,
.canvas-scroll.is-touch-zooming .drawn-pipe-run.collapsed-segment-hit-targets > .drawn-pipe-hit-line,
#sheet.is-zooming .auto-pipe-heat-emitter-targets,
#sheet.is-panning .auto-pipe-heat-emitter-targets,
#sheet.is-touch-zooming .auto-pipe-heat-emitter-targets,
#sheet.is-zooming .auto-pipe-riser-targets,
#sheet.is-panning .auto-pipe-riser-targets,
#sheet.is-touch-zooming .auto-pipe-riser-targets,
#sheet.is-panning .drawn-pipe-segment-hit,
#sheet.is-touch-zooming .drawn-pipe-segment-hit,
#sheet.is-zooming .drawn-pipe-run.collapsed-segment-hit-targets > .drawn-pipe-hit-line,
#sheet.is-panning .drawn-pipe-run.collapsed-segment-hit-targets > .drawn-pipe-hit-line,
#sheet.is-touch-zooming .drawn-pipe-run.collapsed-segment-hit-targets > .drawn-pipe-hit-line {
  opacity: 0;
  pointer-events: none;
}

.pipe-size-label-pill-bg {
  fill: rgba(255, 255, 255, 0.98);
  stroke: rgba(100, 116, 139, 0.34);
  stroke-width: max(0.45px, calc(0.7px * var(--pipe-label-scale, var(--canvas-text-scale, 1))));
  vector-effect: non-scaling-stroke;
}

.pipe-pill-label.compact .pipe-size-label-pill-bg {
  fill: rgba(255, 255, 255, 0.96);
}

.pipe-size-label-grid.pipe-flow .pipe-size-label-pill-bg,
.pipe-size-label-grid.pipe-domestic-hot-water .pipe-size-label-pill-bg {
  stroke: rgba(239, 68, 68, 0.54);
  fill: rgba(255, 255, 255, 0.86);
}

.pipe-size-label-grid.pipe-return .pipe-size-label-pill-bg,
.pipe-size-label-grid.pipe-domestic-cold-water .pipe-size-label-pill-bg {
  stroke: rgba(10, 132, 255, 0.54);
  fill: rgba(255, 255, 255, 0.86);
}

.pipe-size-label-grid.pipe-cooling-flow .pipe-size-label-pill-bg {
  stroke: rgba(2, 132, 199, 0.54);
}

.pipe-size-label-grid.pipe-cooling-return .pipe-size-label-pill-bg {
  stroke: rgba(147, 51, 234, 0.54);
}

.pipe-size-label-grid.pipe-boosted-cold-water .pipe-size-label-pill-bg {
  stroke: rgba(22, 163, 74, 0.54);
}

.pipe-size-label-grid.pipe-secondary-return .pipe-size-label-pill-bg {
  stroke: rgba(234, 88, 12, 0.54);
}

.pipe-size-label-grid.pipe-gas .pipe-size-label-pill-bg {
  stroke: rgba(202, 138, 4, 0.6);
}

.pipe-size-label-grid.pipe-electrical-cable .pipe-size-label-pill-bg {
  stroke: rgba(17, 24, 39, 0.58);
}

.pipe-size-label-grid.pipe-drainage-soil .pipe-size-label-pill-bg {
  fill: rgba(255, 251, 235, 0.96);
  stroke: rgba(120, 53, 15, 0.72);
}

.pipe-size-label-grid.pipe-drainage-waste .pipe-size-label-pill-bg {
  fill: rgba(255, 251, 235, 0.96);
  stroke: rgba(146, 64, 14, 0.72);
}

.pipe-size-label-grid.pipe-drainage-rainwater .pipe-size-label-pill-bg {
  fill: rgba(255, 251, 235, 0.96);
  stroke: rgba(161, 98, 7, 0.72);
}

.pipe-size-label-grid.compact .pipe-size-label {
  font-size: calc(10px * var(--pipe-label-scale, var(--canvas-text-scale, 1)));
}

.pipe-size-label-grid.expanded .pipe-size-label {
  font-size: calc(11px * var(--pipe-label-scale, var(--canvas-text-scale, 1)));
}

.pipe-size-label-secondary {
  opacity: 0.92;
}

.pipe-size-label-grid .pipe-label-divider {
  stroke: rgba(71, 85, 105, 0.52);
  stroke-width: max(0.45px, calc(0.85px * var(--pipe-label-scale, var(--canvas-text-scale, 1))));
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.pipe-size-label-grid.pipe-flow .pipe-label-divider {
  stroke: rgba(239, 68, 68, 0.46);
}

.pipe-size-label-grid.pipe-return .pipe-label-divider {
  stroke: rgba(10, 132, 255, 0.46);
}

.pipe-size-label-grid.pipe-cooling-flow .pipe-label-divider {
  stroke: rgba(56, 189, 248, 0.5);
}

.pipe-size-label-grid.pipe-cooling-return .pipe-label-divider {
  stroke: rgba(168, 85, 247, 0.5);
}

.pipe-size-label-grid.pipe-domestic-hot-water .pipe-label-divider {
  stroke: rgba(239, 68, 68, 0.46);
}

.pipe-size-label-grid.pipe-domestic-cold-water .pipe-label-divider {
  stroke: rgba(10, 132, 255, 0.46);
}

.pipe-size-label-grid.pipe-boosted-cold-water .pipe-label-divider {
  stroke: rgba(34, 197, 94, 0.48);
}

.pipe-size-label-grid.pipe-secondary-return .pipe-label-divider {
  stroke: rgba(249, 115, 22, 0.5);
}

.pipe-size-label-grid.pipe-gas .pipe-label-divider {
  stroke: rgba(202, 138, 4, 0.52);
}

.pipe-size-label-grid.pipe-electrical-cable .pipe-label-divider {
  stroke: rgba(17, 24, 39, 0.5);
}

.pipe-size-label-grid.pipe-drainage-soil .pipe-label-divider {
  stroke: rgba(120, 53, 15, 0.58);
}

.pipe-size-label-grid.pipe-drainage-waste .pipe-label-divider {
  stroke: rgba(146, 64, 14, 0.58);
}

.pipe-size-label-grid.pipe-drainage-rainwater .pipe-label-divider {
  stroke: rgba(161, 98, 7, 0.58);
}

.pipe-size-label {
  font-size: calc(11px * var(--pipe-label-scale, var(--canvas-text-scale, 1)));
  font-weight: 800;
  letter-spacing: 0.01em;
  text-anchor: middle;
  paint-order: normal;
  stroke: none;
  stroke-width: 0;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.pipe-size-label-grid.pipe-flow .pipe-size-label,
.pipe-size-label.pipe-flow {
  fill: #ef4444;
}

.pipe-size-label-grid.pipe-return .pipe-size-label,
.pipe-size-label.pipe-return {
  fill: #0a84ff;
}

.pipe-size-label-grid.pipe-cooling-flow .pipe-size-label,
.pipe-size-label.pipe-cooling-flow {
  fill: #0284c7;
}

.pipe-size-label-grid.pipe-cooling-return .pipe-size-label,
.pipe-size-label.pipe-cooling-return {
  fill: #9333ea;
}

.pipe-size-label-grid.pipe-domestic-hot-water .pipe-size-label,
.pipe-size-label.pipe-domestic-hot-water {
  fill: #ef4444;
}

.pipe-size-label-grid.pipe-domestic-cold-water .pipe-size-label,
.pipe-size-label.pipe-domestic-cold-water {
  fill: #0a84ff;
}

.pipe-size-label-grid.pipe-boosted-cold-water .pipe-size-label,
.pipe-size-label.pipe-boosted-cold-water {
  fill: #16a34a;
}

.pipe-size-label-grid.pipe-secondary-return .pipe-size-label,
.pipe-size-label.pipe-secondary-return {
  fill: #ea580c;
}

.pipe-size-label-grid.pipe-gas .pipe-size-label,
.pipe-size-label.pipe-gas {
  fill: #ca8a04;
}

.pipe-size-label-grid.pipe-drainage-soil .pipe-size-label,
.pipe-size-label.pipe-drainage-soil {
  fill: #78350f;
}

.pipe-size-label-grid.pipe-drainage-waste .pipe-size-label,
.pipe-size-label.pipe-drainage-waste {
  fill: #92400e;
}

.pipe-size-label-grid.pipe-drainage-rainwater .pipe-size-label,
.pipe-size-label.pipe-drainage-rainwater {
  fill: #a16207;
}

.sheet.label-lod-compact .pipe-size-label-grid {
  opacity: 0.9;
}

.sheet.label-lod-overview .pipe-elbow:not(.active) text,
.sheet.label-lod-overview .pipe-tee-fitting:not(.active) text,
.sheet.label-lod-overview .pipe-reducer-fitting:not(.active) text,
.sheet.label-lod-compact .pipe-elbow:not(.active) text,
.sheet.label-lod-compact .pipe-tee-fitting:not(.active) text,
.sheet.label-lod-compact .pipe-reducer-fitting:not(.active) text {
  display: none;
}

/* Text LOD follows the effective on-screen drawing scale (viewport zoom ×
   floor-plan alignment scale), independently of geometry/edit-handle LOD.
   Only label children are removed from paint; object bodies and hit targets
   remain available, while active selections retain their identifiers. */
.sheet.label-lod-overview .pipe-size-label-grid:not(.active),
.sheet.label-lod-overview .pipe-valve-node:not(.active) .pipe-valve-inline-text,
.sheet.label-lod-overview .pipe-valve-node:not(.active) .pipe-valve-reference,
.sheet.label-lod-overview .plant-room-planner-floor-overlay .plant-room-planner-valve:not(.selected) .plant-room-planner-valve-reference,
.sheet.label-lod-overview .duct-inline-component-node:not(.active) .duct-inline-component-tag,
.sheet.label-lod-overview .floor-outlet:not(.active) .outlet-reference,
.sheet.label-lod-overview .outlet-tmv-plan-assembly:not(.selected) .outlet-tmv-label,
.sheet.label-lod-overview .wall-radiator:not(.active) .radiator-reference-wrap,
.sheet.label-lod-overview .ufh-manifold:not(.active) .ufh-manifold-reference,
.sheet.label-lod-overview .ventilation-diffuser:not(.active) text,
.sheet.label-lod-overview .district-endpoint:not(.active) .district-endpoint-reference,
.sheet.label-lod-overview .fire-endpoint:not(.active) .fire-endpoint-reference,
.sheet.label-lod-overview .plant-room-planner-equipment.floor-plan-silhouette:not(.active) .plant-room-planner-equipment-ref,
.sheet.label-lod-overview .plant-room-planner-equipment.floor-plan-silhouette:not(.active) .plant-room-planner-equipment-name,
.sheet.label-lod-overview .plant-room-planner-equipment.floor-plan-silhouette:not(.active) .plant-room-planner-equipment-size {
  display: none;
}

/* Mid-scale plans keep their routes and symbols, but defer individual sizes
   and references until the item is selected or the drawing is zoomed in. */
.sheet.label-lod-compact .pipe-size-label-grid:not(.active),
.sheet.label-lod-compact .pipe-valve-node:not(.active) .pipe-valve-inline-text,
.sheet.label-lod-compact .pipe-valve-node:not(.active) .pipe-valve-reference,
.sheet.label-lod-compact .plant-room-planner-floor-overlay .plant-room-planner-valve:not(.selected) .plant-room-planner-valve-reference,
.sheet.label-lod-compact .duct-inline-component-node:not(.active) .duct-inline-component-tag,
.sheet.label-lod-compact .floor-outlet:not(.active) .outlet-reference,
.sheet.label-lod-compact .outlet-tmv-plan-assembly:not(.selected) .outlet-tmv-label,
.sheet.label-lod-compact .wall-radiator:not(.active) .radiator-reference-wrap,
.sheet.label-lod-compact .ufh-manifold:not(.active) .ufh-manifold-reference,
.sheet.label-lod-compact .ventilation-diffuser:not(.active) text,
.sheet.label-lod-compact .district-endpoint:not(.active) .district-endpoint-reference,
.sheet.label-lod-compact .fire-endpoint:not(.active) .fire-endpoint-reference,
.sheet.label-lod-compact .plant-room-planner-equipment.floor-plan-silhouette:not(.active) .plant-room-planner-equipment-ref,
.sheet.label-lod-compact .plant-room-planner-equipment.floor-plan-silhouette:not(.active) .plant-room-planner-equipment-name,
.sheet.label-lod-compact .plant-room-planner-equipment.floor-plan-silhouette:not(.active) .plant-room-planner-equipment-size {
  display: none;
}

/* Valve identities are inspection details, not permanent drawing clutter.
   Keep their symbols/hit areas intact and leave exported drawing labels alone. */
#sheet .pipe-valve-node:not(.active):not(:hover):not(:focus-within) .pipe-valve-reference,
#sheet .plant-room-planner-valve:not(.selected):not(:hover):not(:focus-within) .plant-room-planner-valve-reference,
.plant-room-planner-svg .plant-room-planner-valve:not(.selected):not(:hover):not(:focus-within) .plant-room-planner-valve-reference,
#schematicCanvas .pipe-valve-node:not(.active):not(:hover):not(:focus-within) .schematic-valve-reference-annotation {
  display: none;
}

/* Hover inspection also works at overview zoom; selection remains the touch
   equivalent on phones/tablets. No rerender or calculation is needed. */
#sheet .pipe-valve-node:hover .pipe-valve-reference,
#sheet .pipe-valve-node:focus-within .pipe-valve-reference,
#sheet .plant-room-planner-valve:hover .plant-room-planner-valve-reference,
#sheet .plant-room-planner-valve:focus-within .plant-room-planner-valve-reference {
  display: inline;
}

.sheet.zoom-lod-overview .pipe-elbow circle,
.sheet.zoom-lod-overview .pipe-tee-fitting circle,
.sheet.zoom-lod-overview .pipe-reducer-fitting circle,
.sheet.zoom-lod-overview .pipe-draft-elbow,
.sheet.zoom-lod-overview .pipe-vertex:not(.active),
.sheet.zoom-lod-overview .pipe-snap-target,
.sheet.zoom-lod-overview .radiator-connection-anchor,
.sheet.zoom-lod-overview .ufh-manifold-connection-anchor,
.sheet.zoom-lod-overview .outlet-connection-anchor,
.sheet.zoom-lod-overview .outlet-connection-anchor-hit,
.sheet.zoom-lod-overview .plant-room-connection-port,
.sheet.zoom-lod-overview .riser-halo,
.sheet.zoom-lod-overview .riser-marker {
  opacity: 0.52;
}

.sheet.zoom-lod-overview .radiator-connection-stem,
.sheet.zoom-lod-overview .ufh-manifold-connection-stem,
.sheet.zoom-lod-overview .outlet-connection-stem,
.sheet.zoom-lod-overview .plant-room-port-stem {
  opacity: 0.45;
}

.sheet.label-lod-overview .riser-node:not(.active) text,
.sheet.label-lod-overview .plant-room-node:not(.active) text {
  display: none;
}

.sheet.label-lod-compact .riser-node:not(.active) text,
.sheet.label-lod-compact .plant-room-node:not(.active) text {
  opacity: 0.78;
}

.sheet.is-zooming .room-canvas-label,
.sheet.is-touch-zooming .room-canvas-label,
.canvas-scroll.is-zooming .room-canvas-label,
.canvas-scroll.is-panning .room-canvas-label,
.canvas-scroll.is-touch-zooming .room-canvas-label,
.sheet.is-zooming .pipe-reference,
.canvas-scroll.is-zooming .pipe-reference,
.canvas-scroll.is-panning .pipe-reference,
.canvas-scroll.is-touch-zooming .pipe-reference,
.sheet.is-touch-zooming .pipe-reference {
  pointer-events: none;
  transition: none;
}

.canvas-scroll.is-zooming .room-vertex,
.canvas-scroll.is-panning .room-vertex,
.canvas-scroll.is-touch-zooming .room-vertex,
.sheet.is-zooming .room-vertex,
.sheet.is-touch-zooming .room-vertex,
.canvas-scroll.is-zooming .window-handle,
.canvas-scroll.is-panning .window-handle,
.canvas-scroll.is-touch-zooming .window-handle,
.sheet.is-zooming .window-handle,
.sheet.is-touch-zooming .window-handle,
.canvas-scroll.is-zooming .door-handle,
.canvas-scroll.is-panning .door-handle,
.canvas-scroll.is-touch-zooming .door-handle,
.sheet.is-zooming .door-handle,
.sheet.is-touch-zooming .door-handle,
.canvas-scroll.is-zooming .skylight-handle,
.canvas-scroll.is-panning .skylight-handle,
.canvas-scroll.is-touch-zooming .skylight-handle,
.sheet.is-zooming .skylight-handle,
.sheet.is-touch-zooming .skylight-handle,
.canvas-scroll.is-zooming .radiator-handle,
.canvas-scroll.is-panning .radiator-handle,
.canvas-scroll.is-touch-zooming .radiator-handle,
.sheet.is-zooming .radiator-handle,
.sheet.is-touch-zooming .radiator-handle,
.canvas-scroll.is-zooming .measurement-label,
.canvas-scroll.is-panning .measurement-label,
.canvas-scroll.is-touch-zooming .measurement-label,
.sheet.is-zooming .measurement-label,
.sheet.is-touch-zooming .measurement-label,
.canvas-scroll.is-zooming .radiator-connection-anchor,
.canvas-scroll.is-panning .radiator-connection-anchor,
.canvas-scroll.is-touch-zooming .radiator-connection-anchor,
.canvas-scroll.is-zooming .riser-selection-grip,
.canvas-scroll.is-panning .riser-selection-grip,
.canvas-scroll.is-touch-zooming .riser-selection-grip,
.canvas-scroll.is-zooming .radiator-connection-stem,
.canvas-scroll.is-panning .radiator-connection-stem,
.canvas-scroll.is-touch-zooming .radiator-connection-stem,
.canvas-scroll.is-zooming .ufh-manifold-connection-anchor,
.canvas-scroll.is-panning .ufh-manifold-connection-anchor,
.canvas-scroll.is-touch-zooming .ufh-manifold-connection-anchor,
.canvas-scroll.is-zooming .ufh-manifold-connection-stem,
.canvas-scroll.is-panning .ufh-manifold-connection-stem,
.canvas-scroll.is-touch-zooming .ufh-manifold-connection-stem,
.canvas-scroll.is-zooming .outlet-connection-anchor,
.canvas-scroll.is-panning .outlet-connection-anchor,
.canvas-scroll.is-touch-zooming .outlet-connection-anchor,
.canvas-scroll.is-zooming .outlet-connection-anchor-hit,
.canvas-scroll.is-panning .outlet-connection-anchor-hit,
.canvas-scroll.is-touch-zooming .outlet-connection-anchor-hit,
.canvas-scroll.is-zooming .outlet-connection-stem,
.canvas-scroll.is-panning .outlet-connection-stem,
.canvas-scroll.is-touch-zooming .outlet-connection-stem,
.canvas-scroll.is-zooming .plant-room-connection-port,
.canvas-scroll.is-panning .plant-room-connection-port,
.canvas-scroll.is-touch-zooming .plant-room-connection-port,
.canvas-scroll.is-zooming .plant-room-port-stem,
.canvas-scroll.is-panning .plant-room-port-stem,
.canvas-scroll.is-touch-zooming .plant-room-port-stem {
  opacity: 0;
  pointer-events: none;
  transition: none;
}

.canvas-scroll.is-zooming .pipe-flow-direction,
.canvas-scroll.is-panning .pipe-flow-direction,
.canvas-scroll.is-touch-zooming .pipe-flow-direction,
.sheet.is-zooming .pipe-flow-direction,
.sheet.is-touch-zooming .pipe-flow-direction,
.canvas-scroll.is-zooming .duct-airflow-direction,
.canvas-scroll.is-panning .duct-airflow-direction,
.canvas-scroll.is-touch-zooming .duct-airflow-direction,
.sheet.is-zooming .duct-airflow-direction,
.sheet.is-touch-zooming .duct-airflow-direction,
.canvas-scroll.is-zooming .pipe-vertex-layer,
.canvas-scroll.is-panning .pipe-vertex-layer,
.canvas-scroll.is-touch-zooming .pipe-vertex-layer,
.sheet.is-zooming .pipe-vertex-layer,
.sheet.is-touch-zooming .pipe-vertex-layer,
.canvas-scroll.is-zooming .pipe-elbow,
.canvas-scroll.is-panning .pipe-elbow,
.canvas-scroll.is-touch-zooming .pipe-elbow,
.canvas-scroll.is-zooming .pipe-tee-fitting,
.canvas-scroll.is-panning .pipe-tee-fitting,
.canvas-scroll.is-touch-zooming .pipe-tee-fitting,
.canvas-scroll.is-zooming .pipe-reducer-fitting,
.canvas-scroll.is-panning .pipe-reducer-fitting,
.canvas-scroll.is-touch-zooming .pipe-reducer-fitting {
  opacity: 0;
  pointer-events: none;
  transition: none;
}

/* Valve geometry remains useful visual context during viewport motion. Only
 * suspend its hit target so a pan/zoom cannot turn into a valve selection or
 * drag; settled label LOD continues to control optional inline text. */
.canvas-scroll.is-zooming .pipe-valve-node,
.canvas-scroll.is-panning .pipe-valve-node,
.canvas-scroll.is-touch-zooming .pipe-valve-node,
.sheet.is-zooming .pipe-valve-node,
.sheet.is-panning .pipe-valve-node,
.sheet.is-touch-zooming .pipe-valve-node {
  pointer-events: none;
}

.canvas-scroll.is-zooming .pipe-valve-node *,
.canvas-scroll.is-panning .pipe-valve-node *,
.canvas-scroll.is-touch-zooming .pipe-valve-node *,
.sheet.is-zooming .pipe-valve-node *,
.sheet.is-panning .pipe-valve-node *,
.sheet.is-touch-zooming .pipe-valve-node * {
  pointer-events: none;
}

.canvas-scroll.is-zooming .pipe-flow-direction *,
.canvas-scroll.is-panning .pipe-flow-direction *,
.canvas-scroll.is-touch-zooming .pipe-flow-direction *,
.sheet.is-zooming .pipe-flow-direction *,
.sheet.is-touch-zooming .pipe-flow-direction *,
.canvas-scroll.is-zooming .duct-airflow-direction *,
.canvas-scroll.is-panning .duct-airflow-direction *,
.canvas-scroll.is-touch-zooming .duct-airflow-direction *,
.sheet.is-zooming .duct-airflow-direction *,
.sheet.is-touch-zooming .duct-airflow-direction * {
  animation: none !important;
  transition: none !important;
}

.canvas-scroll.is-zooming .pipe-label-layer,
.canvas-scroll.is-panning .pipe-label-layer,
.canvas-scroll.is-touch-zooming .pipe-label-layer,
.canvas-scroll.is-zooming .pipe-size-label-grid,
.canvas-scroll.is-panning .pipe-size-label-grid,
.canvas-scroll.is-touch-zooming .pipe-size-label-grid,
.canvas-scroll.is-zooming .pipe-flow-direction,
.canvas-scroll.is-panning .pipe-flow-direction,
.canvas-scroll.is-touch-zooming .pipe-flow-direction,
.canvas-scroll.is-zooming .pipe-vertex-layer,
.canvas-scroll.is-panning .pipe-vertex-layer,
.canvas-scroll.is-touch-zooming .pipe-vertex-layer,
.canvas-scroll.is-zooming .pipe-elbow,
.canvas-scroll.is-panning .pipe-elbow,
.canvas-scroll.is-touch-zooming .pipe-elbow,
.canvas-scroll.is-zooming .pipe-tee-fitting,
.canvas-scroll.is-panning .pipe-tee-fitting,
.canvas-scroll.is-touch-zooming .pipe-tee-fitting,
.canvas-scroll.is-zooming .pipe-reducer-fitting,
.canvas-scroll.is-panning .pipe-reducer-fitting,
.canvas-scroll.is-touch-zooming .pipe-reducer-fitting,
.canvas-scroll.is-zooming .room-vertex,
.canvas-scroll.is-panning .room-vertex,
.canvas-scroll.is-touch-zooming .room-vertex,
.canvas-scroll.is-zooming .window-handle,
.canvas-scroll.is-panning .window-handle,
.canvas-scroll.is-touch-zooming .window-handle,
.canvas-scroll.is-zooming .door-handle,
.canvas-scroll.is-panning .door-handle,
.canvas-scroll.is-touch-zooming .door-handle,
.canvas-scroll.is-zooming .skylight-handle,
.canvas-scroll.is-panning .skylight-handle,
.canvas-scroll.is-touch-zooming .skylight-handle,
.canvas-scroll.is-zooming .radiator-handle,
.canvas-scroll.is-panning .radiator-handle,
.canvas-scroll.is-touch-zooming .radiator-handle,
.sheet.is-zooming .pipe-label-layer,
.sheet.is-touch-zooming .pipe-label-layer,
.sheet.is-zooming .pipe-size-label-grid,
.sheet.is-touch-zooming .pipe-size-label-grid,
.sheet.is-zooming .pipe-flow-direction,
.sheet.is-touch-zooming .pipe-flow-direction,
.sheet.is-zooming .pipe-vertex-layer,
.sheet.is-touch-zooming .pipe-vertex-layer,
.plant-room-planner-svg.is-zooming .plant-room-planner-label-layer,
.plant-room-planner-svg.is-panning .plant-room-planner-label-layer,
.plant-room-planner-svg.is-touch-zooming .plant-room-planner-label-layer,
.plant-room-planner-svg.is-zooming .plant-room-planner-pipe-node-layer,
.plant-room-planner-svg.is-panning .plant-room-planner-pipe-node-layer,
.plant-room-planner-svg.is-touch-zooming .plant-room-planner-pipe-node-layer,
.plant-room-planner-svg.is-zooming .plant-room-planner-pipe-label,
.plant-room-planner-svg.is-panning .plant-room-planner-pipe-label,
.plant-room-planner-svg.is-touch-zooming .plant-room-planner-pipe-label,
.plant-room-planner-svg.is-zooming .pipe-flow-direction,
.plant-room-planner-svg.is-panning .pipe-flow-direction,
.plant-room-planner-svg.is-touch-zooming .pipe-flow-direction,
.plant-room-planner-svg.is-zooming .pipe-tee-fitting,
.plant-room-planner-svg.is-panning .pipe-tee-fitting,
.plant-room-planner-svg.is-touch-zooming .pipe-tee-fitting,
.plant-room-planner-svg.is-zooming .plant-room-planner-valve,
.plant-room-planner-svg.is-panning .plant-room-planner-valve,
.plant-room-planner-svg.is-touch-zooming .plant-room-planner-valve,
.schematic-cad-canvas.is-zooming .schematic-pipe-label,
.schematic-cad-canvas.is-panning .schematic-pipe-label,
.schematic-cad-canvas.is-touch-zooming .schematic-pipe-label,
#schematicCanvas.is-zooming .schematic-pipe-label-layer,
#schematicCanvas.is-panning .schematic-pipe-label-layer,
#schematicCanvas.is-touch-zooming .schematic-pipe-label-layer,
#schematicCanvas.is-zooming .schematic-flow-direction,
#schematicCanvas.is-panning .schematic-flow-direction,
#schematicCanvas.is-touch-zooming .schematic-flow-direction,
#schematicCanvas.is-zooming .schematic-generated-valve,
#schematicCanvas.is-panning .schematic-generated-valve,
#schematicCanvas.is-touch-zooming .schematic-generated-valve,
#schematicCanvas.is-zooming .schematic-generated-label,
#schematicCanvas.is-panning .schematic-generated-label,
#schematicCanvas.is-touch-zooming .schematic-generated-label,
#schematicCanvas.is-zooming .schematic-floor-guide,
#schematicCanvas.is-panning .schematic-floor-guide,
#schematicCanvas.is-touch-zooming .schematic-floor-guide {
  display: none !important;
}

#schematicCanvas:is(.is-zooming, .is-panning, .is-touch-zooming) .schematic-pipe-line,
#schematicCanvas:is(.is-zooming, .is-panning, .is-touch-zooming) .schematic-connection-point,
#schematicCanvas:is(.is-zooming, .is-panning, .is-touch-zooming) .schematic-zone-card-shell,
#schematicCanvas:is(.is-zooming, .is-panning, .is-touch-zooming) .schematic-device > rect,
#schematicCanvas:is(.is-zooming, .is-panning, .is-touch-zooming) .schematic-pipe-run.active .schematic-pipe-line {
  filter: none !important;
}

.plant-room-node {
  cursor: grab;
}

/*
 * Unlocked floor plans are reserved for architectural editing. Service
 * geometry remains visible as context, but clicks pass through to the room,
 * wall and opening layers underneath until the floor plan is locked again.
 */
.workspace:not(.locked-floor-plan) .drawn-pipes,
.workspace:not(.locked-floor-plan) .drawn-pipes *,
.workspace:not(.locked-floor-plan) .drawn-ducts,
.workspace:not(.locked-floor-plan) .drawn-ducts *,
.workspace:not(.locked-floor-plan) .duct-edit-overlay,
.workspace:not(.locked-floor-plan) .duct-edit-overlay *,
.workspace:not(.locked-floor-plan) .duct-inline-component-layer,
.workspace:not(.locked-floor-plan) .duct-inline-component-layer *,
.workspace:not(.locked-floor-plan) .plant-room-nodes,
.workspace:not(.locked-floor-plan) .plant-room-nodes *,
.workspace:not(.locked-floor-plan) .riser-nodes,
.workspace:not(.locked-floor-plan) .riser-nodes *,
.workspace:not(.locked-floor-plan) .plant-room-planner-floor-overlays,
.workspace:not(.locked-floor-plan) .plant-room-planner-floor-overlays * {
  pointer-events: none !important;
  cursor: default;
}

.riser-node {
  cursor: grab;
}

.riser-node.reference {
  cursor: pointer;
  opacity: 0.62;
}

.riser-node.reference.active {
  opacity: 1;
}

.riser-read-only-note {
  margin: 2px 0 0;
  padding: 10px 11px;
  border: 1px solid rgba(100, 116, 139, 0.28);
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.1);
  color: var(--muted);
}

.riser-read-only-note strong {
  color: var(--text);
}

html[data-theme="dark"] .riser-read-only-note {
  border-color: rgba(212, 212, 216, 0.2);
  background: rgba(255, 255, 255, 0.055);
}

.plant-room-node:active,
.riser-node.editable:active {
  cursor: grabbing;
}

/* Floor-only connection block. Planner, schematic and print symbols retain
   their own layouts; native pipe/duct socket coordinates are never scaled. */
.canvas-stage #sheet .floor-zone-connection-block .floor-zone-block-body {
  fill:var(--surface-solid,#fff);stroke:var(--line-strong,var(--border,#cbd5e1));stroke-width:calc(1px * var(--canvas-zoom-inverse,1));filter:none;
}
.canvas-stage #sheet .floor-zone-connection-block.active .floor-zone-block-body,
.canvas-stage #sheet .floor-zone-connection-block.duct-snap-active .floor-zone-block-body,
.canvas-stage #sheet .floor-zone-connection-block:hover .floor-zone-block-body,
.canvas-stage #sheet .floor-zone-connection-block:focus-within .floor-zone-block-body {stroke:var(--blue,#1478ef);stroke-width:calc(1.5px * var(--canvas-zoom-inverse,1))}
.canvas-stage #sheet .floor-zone-block-halo {fill:none;stroke:transparent;filter:none;pointer-events:none}
.canvas-stage #sheet .floor-zone-block-hit {fill:transparent;stroke:none;stroke-width:0!important;pointer-events:all}
.canvas-stage #sheet .floor-zone-core text {display:inline;opacity:1;fill:var(--text,#172335);stroke:none;font:700 8.5px var(--font-ui,Inter,Arial,sans-serif);letter-spacing:0}
.canvas-stage #sheet .floor-zone-block-label {display:inline;opacity:1;fill:var(--text,#172335);stroke:var(--surface-solid,#fff);stroke-width:2;paint-order:stroke;font-family:var(--font-ui,Inter,Arial,sans-serif);font-weight:650;letter-spacing:0;pointer-events:none}
.canvas-stage #sheet .floor-zone-socket {--socket-color:#64748b;cursor:crosshair}
.canvas-stage #sheet .floor-zone-socket:is(.pipe-flow,.pipe-domestic-hot-water,.pipe-district-flow,.pipe-fire-sprinkler,.pipe-drainage-soil){--socket-color:#ef4444}
.canvas-stage #sheet .floor-zone-socket:is(.pipe-return,.pipe-domestic-cold-water,.pipe-ventilation-supply){--socket-color:#1478ef}
.canvas-stage #sheet .floor-zone-socket.pipe-cooling-flow{--socket-color:#0ea5e9}
.canvas-stage #sheet .floor-zone-socket:is(.pipe-cooling-return,.pipe-electrical-cable){--socket-color:#a855f7}
.canvas-stage #sheet .floor-zone-socket:is(.pipe-secondary-return,.pipe-district-return,.pipe-fire-hose-reel,.pipe-drainage-rainwater){--socket-color:#ea7b13}
.canvas-stage #sheet .floor-zone-socket:is(.pipe-boosted-cold-water,.pipe-ventilation-extract,.pipe-drainage-waste){--socket-color:#16a34a}
.canvas-stage #sheet .floor-zone-socket.pipe-gas{--socket-color:#ca8a04}
.canvas-stage #sheet .floor-zone-socket.pipe-fire-hydrant{--socket-color:#9f1239}
.canvas-stage #sheet .floor-zone-entry{fill:var(--socket-color);stroke:none;opacity:.18;pointer-events:none}
.canvas-stage #sheet .floor-zone-socket.connected .floor-zone-entry{opacity:1}
.canvas-stage #sheet .floor-zone-socket-ring{transform:none;fill:var(--surface-solid,#fff);stroke:var(--socket-color);stroke-width:calc(1px * var(--canvas-zoom-inverse,1));filter:none;vector-effect:non-scaling-stroke}
.canvas-stage #sheet .floor-zone-socket.connected .floor-zone-socket-ring{fill:var(--socket-color)}
.canvas-stage #sheet .floor-zone-socket.review .floor-zone-socket-ring{fill:var(--surface-solid,#fff);stroke:#d97706;stroke-dasharray:1 1}
.canvas-stage #sheet .floor-zone-socket-hit{fill:transparent;stroke:none;pointer-events:all}
.canvas-stage #sheet .floor-zone-socket:is(:hover,:focus-visible) .floor-zone-socket-ring{stroke-width:calc(2px * var(--canvas-zoom-inverse,1));stroke-dasharray:none}
.canvas-stage #sheet .floor-zone-socket.is-available .floor-zone-entry{opacity:.4}
.canvas-stage #sheet .floor-zone-socket.is-available .floor-zone-socket-ring{fill:var(--surface-solid,#fff);stroke-width:calc(1.5px * var(--canvas-zoom-inverse,1))}

.duct-geometry-edit-notice{margin:12px 0;padding:10px 12px;border-left:3px solid #d97706;border-radius:6px;background:#fff4d9;color:#663c09;line-height:1.45;font-weight:500}
.duct-geometry-edit-notice[hidden]{display:none!important}
html[data-theme="dark"] .duct-geometry-edit-notice{background:#382c18;color:#ffdda0}
.floor-duct-geometry-edit-notice{position:absolute;left:12px;bottom:36px;max-width:min(460px,calc(100% - 24px));z-index:35;pointer-events:none;box-shadow:0 2px 10px #0002}

.plant-room-halo {
  fill: rgba(14, 165, 233, 0.08);
  stroke: rgba(14, 165, 233, 0.26);
  stroke-width: 0.9;
  vector-effect: non-scaling-stroke;
}

.plant-room-node-hit {
  fill: transparent;
  pointer-events: all;
  stroke: transparent;
  stroke-width: 0;
}

.plant-room-marker {
  fill: rgba(255, 255, 255, 0.94);
  stroke: #0f172a;
  stroke-width: 1.15;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 1px 3px rgba(15, 23, 42, 0.18));
}

.plant-room-symbol {
  fill: none;
  stroke: #0a84ff;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.plant-room-node.plant-room-system-heating .plant-room-halo {
  fill: rgba(239, 68, 68, 0.09);
  stroke: rgba(239, 68, 68, 0.32);
}

.plant-room-node.plant-room-system-heating .plant-room-marker {
  fill: rgba(254, 242, 242, 0.92);
  stroke: #ef4444;
}

.plant-room-node.plant-room-system-heating .plant-room-symbol {
  stroke: #ef4444;
}

.plant-room-node.plant-room-system-heating text {
  fill: #991b1b;
}

.plant-room-node.plant-room-system-cooling .plant-room-halo {
  fill: rgba(14, 165, 233, 0.1);
  stroke: rgba(14, 165, 233, 0.34);
}

.plant-room-node.plant-room-system-cooling .plant-room-marker {
  fill: rgba(240, 249, 255, 0.92);
  stroke: #0a84ff;
}

.plant-room-node.plant-room-system-cooling .plant-room-symbol {
  stroke: #0a84ff;
}

.plant-room-node.plant-room-system-cooling text {
  fill: #075985;
}

.plant-room-node.plant-room-system-public-health .plant-room-halo {
  fill: rgba(34, 197, 94, 0.1);
  stroke: rgba(34, 197, 94, 0.34);
}

.plant-room-node.plant-room-system-public-health .plant-room-marker {
  fill: rgba(240, 253, 244, 0.92);
  stroke: #16a34a;
}

.plant-room-node.plant-room-system-public-health .plant-room-symbol {
  stroke: #16a34a;
}

.plant-room-node.plant-room-system-public-health text {
  fill: #166534;
}

.plant-room-node.plant-room-system-gas .plant-room-halo {
  fill: rgba(250, 204, 21, 0.11);
  stroke: rgba(202, 138, 4, 0.36);
}

.plant-room-node.plant-room-system-gas .plant-room-marker {
  fill: rgba(255, 251, 235, 0.94);
  stroke: #eab308;
}

.plant-room-node.plant-room-system-gas .plant-room-symbol {
  stroke: #eab308;
}

.plant-room-node.plant-room-system-gas text {
  fill: #854d0e;
}

.plant-room-node.plant-room-system-electrical .plant-room-halo {
  fill: rgba(168, 85, 247, 0.1);
  stroke: rgba(126, 34, 206, 0.34);
}

.plant-room-node.plant-room-system-electrical .plant-room-marker {
  fill: rgba(250, 245, 255, 0.94);
  stroke: #a855f7;
}

.plant-room-node.plant-room-system-electrical .plant-room-symbol {
  stroke: #7e22ce;
}

.plant-room-node.plant-room-system-electrical text {
  fill: #6b21a8;
}

.plant-room-node.active .plant-room-marker {
  stroke-width: 1.7;
}

.plant-room-node.active .plant-room-halo {
  filter: drop-shadow(0 0 4px currentColor);
}

.plant-room-port-stem {
  fill: none;
  stroke-width: 1.25;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.plant-room-port-flow,
.plant-room-connection-flow {
  stroke: #ef4444;
}

.plant-room-port-return,
.plant-room-connection-return {
  stroke: #0a84ff;
}

.plant-room-port-cooling-flow,
.plant-room-connection-cooling-flow {
  stroke: #38bdf8;
}

.plant-room-port-cooling-return,
.plant-room-connection-cooling-return {
  stroke: #a855f7;
}

.plant-room-port-domestic-hot-water,
.plant-room-connection-domestic-hot-water {
  stroke: #ef4444;
}

.plant-room-port-domestic-cold-water,
.plant-room-connection-domestic-cold-water {
  stroke: #0a84ff;
}

.plant-room-port-boosted-cold-water,
.plant-room-connection-boosted-cold-water {
  stroke: #22c55e;
}

.plant-room-port-secondary-return,
.plant-room-connection-secondary-return {
  stroke: #f97316;
}

.plant-room-port-gas,
.plant-room-connection-gas {
  stroke: #facc15;
}

.plant-room-port-fire-sprinkler,
.plant-room-connection-fire-sprinkler {
  stroke: #dc2626;
}

.plant-room-port-fire-hydrant,
.plant-room-connection-fire-hydrant {
  stroke: #7f1d1d;
}

.plant-room-port-fire-hose-reel,
.plant-room-connection-fire-hose-reel {
  stroke: #f97316;
}

.plant-room-port-electrical-cable,
.plant-room-connection-electrical-cable {
  stroke: #111827;
}

.plant-room-connection-port {
  fill: rgba(255, 255, 255, 0.94);
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.2));
}

.plant-room-connection-flow {
  fill: rgba(254, 226, 226, 0.94);
}

.plant-room-connection-return {
  fill: rgba(219, 234, 254, 0.94);
}

.plant-room-connection-cooling-flow {
  fill: rgba(224, 242, 254, 0.94);
}

.plant-room-connection-cooling-return {
  fill: rgba(243, 232, 255, 0.94);
}

.plant-room-connection-domestic-hot-water {
  fill: rgba(254, 226, 226, 0.94);
}

.plant-room-connection-domestic-cold-water {
  fill: rgba(219, 234, 254, 0.94);
}

.plant-room-connection-boosted-cold-water {
  fill: rgba(220, 252, 231, 0.94);
}

.plant-room-connection-secondary-return {
  fill: rgba(255, 237, 213, 0.94);
}

.plant-room-connection-gas {
  fill: rgba(254, 243, 199, 0.94);
}

.plant-room-connection-fire-sprinkler {
  fill: rgba(254, 226, 226, 0.94);
}

.plant-room-connection-fire-hydrant {
  fill: rgba(254, 202, 202, 0.94);
}

.plant-room-connection-fire-hose-reel {
  fill: rgba(255, 237, 213, 0.94);
}

.plant-room-connection-electrical-cable {
  fill: rgba(17, 24, 39, 0.94);
}

.plant-room-node text {
  fill: var(--text);
  font-size: calc(7px * var(--canvas-text-scale, 1));
  font-weight: 900;
  letter-spacing: 0;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 2px;
  text-rendering: geometricPrecision;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.plant-room-node.plant-room-system-heating text {
  fill: #991b1b;
}

.plant-room-node.plant-room-system-cooling text {
  fill: #075985;
}

.plant-room-node.plant-room-system-public-health text {
  fill: #166534;
}

.riser-halo {
  fill: rgba(245, 158, 11, 0.12);
  stroke: rgba(245, 158, 11, 0.42);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.riser-marker {
  fill: rgba(255, 255, 255, 0.9);
  stroke: #92400e;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 3px 8px rgba(15, 23, 42, 0.2));
}

.riser-symbol {
  fill: none;
  stroke: #d97706;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.riser-node.pipe-flow .riser-halo {
  fill: rgba(239, 68, 68, 0.14);
  stroke: rgba(239, 68, 68, 0.5);
}

.riser-node.pipe-flow .riser-marker {
  stroke: #ef4444;
}

.riser-node.pipe-flow .riser-symbol {
  stroke: #ef4444;
}

.riser-node.pipe-flow text {
  fill: #ef4444;
}

.riser-node.pipe-return .riser-halo {
  fill: rgba(10, 132, 255, 0.14);
  stroke: rgba(10, 132, 255, 0.54);
}

.riser-node.pipe-return .riser-marker {
  stroke: #0a84ff;
}

.riser-node.pipe-return .riser-symbol {
  stroke: #0a84ff;
}

.riser-node.pipe-return text {
  fill: #0a84ff;
}

.riser-node.pipe-cooling-flow .riser-halo {
  fill: rgba(56, 189, 248, 0.14);
  stroke: rgba(56, 189, 248, 0.54);
}

.riser-node.pipe-cooling-flow .riser-marker {
  stroke: #38bdf8;
}

.riser-node.pipe-cooling-flow .riser-symbol {
  stroke: #38bdf8;
}

.riser-node.pipe-cooling-flow text {
  fill: #0284c7;
}

.riser-node.pipe-cooling-return .riser-halo {
  fill: rgba(168, 85, 247, 0.14);
  stroke: rgba(168, 85, 247, 0.54);
}

.riser-node.pipe-cooling-return .riser-marker {
  stroke: #a855f7;
}

.riser-node.pipe-cooling-return .riser-symbol {
  stroke: #a855f7;
}

.riser-node.pipe-cooling-return text {
  fill: #9333ea;
}

.riser-node.pipe-domestic-hot-water .riser-halo {
  fill: rgba(239, 68, 68, 0.14);
  stroke: rgba(239, 68, 68, 0.5);
}

.riser-node.pipe-domestic-hot-water .riser-marker,
.riser-node.pipe-domestic-hot-water .riser-symbol {
  stroke: #ef4444;
}

.riser-node.pipe-domestic-hot-water text {
  fill: #ef4444;
}

.riser-node.pipe-domestic-cold-water .riser-halo {
  fill: rgba(10, 132, 255, 0.14);
  stroke: rgba(10, 132, 255, 0.54);
}

.riser-node.pipe-domestic-cold-water .riser-marker,
.riser-node.pipe-domestic-cold-water .riser-symbol {
  stroke: #0a84ff;
}

.riser-node.pipe-domestic-cold-water text {
  fill: #0a84ff;
}

.riser-node.pipe-boosted-cold-water .riser-halo {
  fill: rgba(34, 197, 94, 0.14);
  stroke: rgba(34, 197, 94, 0.54);
}

.riser-node.pipe-boosted-cold-water .riser-marker,
.riser-node.pipe-boosted-cold-water .riser-symbol {
  stroke: #22c55e;
}

.riser-node.pipe-boosted-cold-water text {
  fill: #16a34a;
}

.riser-node.pipe-secondary-return .riser-halo {
  fill: rgba(249, 115, 22, 0.14);
  stroke: rgba(249, 115, 22, 0.54);
}

.riser-node.pipe-secondary-return .riser-marker,
.riser-node.pipe-secondary-return .riser-symbol {
  stroke: #f97316;
}

.riser-node.pipe-secondary-return text {
  fill: #ea580c;
}

.riser-node.active .riser-marker {
  stroke-width: 2;
}

.riser-selection-grips {
  pointer-events: none;
}

.riser-selection-grip {
  fill: rgba(34, 197, 94, 0.96);
  stroke: rgba(255, 255, 255, 0.96);
  stroke-width: 1.3;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.24));
}

.riser-node text {
  fill: var(--text);
  font-size: calc(8.5px * var(--canvas-text-scale, 1));
  font-weight: 900;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 3px;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.pipe-plant-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.pipe-elbow circle,
.pipe-draft-elbow {
  fill: rgba(255, 255, 255, 0.96);
  stroke: #334155;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.18));
}

.pipe-tee-fitting,
.pipe-reducer-fitting {
  pointer-events: none;
}

.pipe-tee-fitting.editable {
  pointer-events: all;
  cursor: move;
  touch-action: none;
}

.pipe-tee-fitting.editable:active {
  cursor: grabbing;
}

.pipe-tee-fitting circle,
.pipe-reducer-fitting circle {
  fill: rgba(255, 255, 255, 0.97);
  stroke: #334155;
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.2));
}

.pipe-tee-fitting path,
.pipe-reducer-fitting path {
  fill: none;
  stroke: #334155;
  stroke-width: 1.5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.pipe-tee-fitting.pipe-flow circle,
.pipe-tee-fitting.pipe-flow path,
.pipe-junction-elbow.pipe-flow circle,
.pipe-reducer-fitting.pipe-flow circle,
.pipe-reducer-fitting.pipe-flow path {
  stroke: #ef4444;
}

.pipe-tee-fitting.pipe-return circle,
.pipe-tee-fitting.pipe-return path,
.pipe-junction-elbow.pipe-return circle,
.pipe-reducer-fitting.pipe-return circle,
.pipe-reducer-fitting.pipe-return path {
  stroke: #0a84ff;
}

.pipe-tee-fitting.pipe-cooling-flow circle,
.pipe-tee-fitting.pipe-cooling-flow path,
.pipe-junction-elbow.pipe-cooling-flow circle,
.pipe-reducer-fitting.pipe-cooling-flow circle,
.pipe-reducer-fitting.pipe-cooling-flow path {
  stroke: #38bdf8;
}

.pipe-tee-fitting.pipe-cooling-return circle,
.pipe-tee-fitting.pipe-cooling-return path,
.pipe-junction-elbow.pipe-cooling-return circle,
.pipe-reducer-fitting.pipe-cooling-return circle,
.pipe-reducer-fitting.pipe-cooling-return path {
  stroke: #a855f7;
}

.pipe-tee-fitting.pipe-domestic-hot-water circle,
.pipe-tee-fitting.pipe-domestic-hot-water path,
.pipe-junction-elbow.pipe-domestic-hot-water circle,
.pipe-reducer-fitting.pipe-domestic-hot-water circle,
.pipe-reducer-fitting.pipe-domestic-hot-water path {
  stroke: #ef4444;
}

.pipe-tee-fitting.pipe-domestic-cold-water circle,
.pipe-tee-fitting.pipe-domestic-cold-water path,
.pipe-junction-elbow.pipe-domestic-cold-water circle,
.pipe-reducer-fitting.pipe-domestic-cold-water circle,
.pipe-reducer-fitting.pipe-domestic-cold-water path {
  stroke: #0a84ff;
}

.pipe-tee-fitting.pipe-boosted-cold-water circle,
.pipe-tee-fitting.pipe-boosted-cold-water path,
.pipe-junction-elbow.pipe-boosted-cold-water circle,
.pipe-reducer-fitting.pipe-boosted-cold-water circle,
.pipe-reducer-fitting.pipe-boosted-cold-water path {
  stroke: #22c55e;
}

.pipe-tee-fitting.pipe-secondary-return circle,
.pipe-tee-fitting.pipe-secondary-return path,
.pipe-junction-elbow.pipe-secondary-return circle,
.pipe-reducer-fitting.pipe-secondary-return circle,
.pipe-reducer-fitting.pipe-secondary-return path {
  stroke: #f97316;
}

.pipe-tee-fitting.pipe-gas circle,
.pipe-tee-fitting.pipe-gas path,
.pipe-junction-elbow.pipe-gas circle,
.pipe-reducer-fitting.pipe-gas circle,
.pipe-reducer-fitting.pipe-gas path {
  stroke: #facc15;
}

.pipe-tee-fitting.pipe-electrical-cable circle,
.pipe-tee-fitting.pipe-electrical-cable path,
.pipe-junction-elbow.pipe-electrical-cable circle,
.pipe-reducer-fitting.pipe-electrical-cable circle,
.pipe-reducer-fitting.pipe-electrical-cable path {
  stroke: #111827;
}

.pipe-reducer-fitting path {
  fill: rgba(255, 255, 255, 0.88);
}

.pipe-tee-fitting.reducing-tee circle {
  stroke-width: 2.2;
}

.pipe-elbow text,
.pipe-tee-fitting text,
.pipe-reducer-fitting text {
  fill: #334155;
  font-size: calc(6.5px * var(--canvas-text-scale, 1));
  font-weight: 900;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 2px;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.pipe-measurement {
  fill: #172033;
  font-size: calc(9px * var(--canvas-text-scale, 1));
  font-weight: 850;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.88);
  stroke-width: 2px;
  vector-effect: non-scaling-stroke;
}

.node {
  stroke: white;
  stroke-width: 2;
}

.node.red {
  fill: var(--red);
}

.node.blue {
  fill: #4b5563;
}

.radiator rect {
  fill: rgba(240, 68, 56, 0.1);
  stroke: var(--red);
  stroke-width: 2;
}

.radiator path {
  stroke: var(--red);
  stroke-width: 1.4;
}

.equipment rect {
  fill: #f8fafc;
  stroke: #475569;
  stroke-width: 2;
}

.equipment text {
  fill: #172033;
  font-size: 10px;
  font-weight: 800;
}

.calibration-line path {
  stroke: #111827;
  stroke-width: 2.5;
}

.calibration-line circle {
  fill: var(--blue);
  stroke: white;
  stroke-width: 2;
}

.calibration-line text {
  fill: white;
  font-size: 11px;
  font-weight: 800;
}

.calibration-line.editing path {
  stroke: var(--blue);
  stroke-dasharray: 8 5;
}

.alignment-marker {
  pointer-events: none;
}

.alignment-marker path {
  stroke: var(--teal);
  stroke-width: 2.5;
}

.alignment-marker circle {
  fill: rgba(107, 114, 128, 0.15);
  stroke: var(--teal);
  stroke-width: 2;
}

.alignment-marker text {
  fill: #4b5563;
  font-size: 11px;
  font-weight: 800;
}

.alignment-marker.editing path,
.alignment-marker.editing circle {
  filter: drop-shadow(0 0 0.25rem rgba(107, 114, 128, 0.35));
}

.drawn-room .room-fill {
  stroke: transparent;
  stroke-width: 0;
}

/* Service-zone fills reuse the existing room hit surface, never an extra
   pointer-catching overlay. Analysis colours always take precedence. */
.sheet:has(#roomSimulationOverlay) .room-service-zone-fill {
  fill-opacity: 0;
}

.room-zone-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 3px;
  background: var(--zone-colour);
  border: 1px solid rgba(0, 0, 0, .12);
}

.room-service-zones .rz-zone-name,
.room-service-zones .rz-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.room-service-zones .room-zone-colour-key {
  margin: 16px 0 0;
  padding: 12px 0 0;
  width: 100%;
  min-width: 0;
  border: 0;
  border-top: 1px solid var(--menu-border, #d8e1ec);
  border-radius: 0;
  background: transparent;
  color: var(--menu-ink, #182333);
  font: 500 12px/1.4 var(--menu-font, sans-serif);
}
.room-service-zones .room-zone-colour-key summary { cursor: pointer; font-size: 12px; font-weight: 600; }
.room-service-zones .room-zone-colour-key summary small { margin-left: 6px; font-size: 11px; font-weight: 400; color: var(--menu-muted, #5c6b7e); }
.room-service-zones .room-zone-colour-key label { display: block; margin: 10px 0 4px; font-size: 11px; }
html .room-service-zones .room-zone-colour-key select { width: 100%; min-width: 0; min-height: 30px; height: 30px; font-size: 12px !important; padding: 4px 8px !important; }
.room-service-zones .room-zone-colour-key ul { display: grid; gap: 6px; margin: 10px 0; padding: 0; list-style: none; max-height: 156px; overflow: auto; }
.room-service-zones .room-zone-colour-key li { display: flex; align-items: center; gap: 7px; }
.room-service-zones .room-zone-colour-key li span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.room-service-zones .room-zone-colour-key li small { font-size: 11px; color: var(--menu-muted, #5c6b7e); }
.room-service-zones .room-zone-colour-key p { margin: 6px 0 0; font-size: 11px; font-weight: 400; color: var(--menu-muted, #5c6b7e); }
.room-service-zones .room-zone-colour-key summary:hover { color: var(--menu-accent, #075fc4); }
.room-service-zones .room-zone-colour-key summary:focus-visible { outline: 2px solid var(--menu-primary, #0968d5); outline-offset: 3px; border-radius: 3px; }

.drawn-room.active .room-fill {
  stroke: rgba(75, 85, 99, 0.45);
  stroke-width: 1.5;
  filter: drop-shadow(0 0 0.28rem rgba(75, 85, 99, 0.22));
}

.lower-floor-room-underlay,
.lower-floor-room-underlay * {
  pointer-events: none;
}

.lower-floor-room-reference {
  opacity: 0.34;
}

.lower-floor-room-fill {
  fill: rgba(107, 114, 128, 0.18);
  stroke: rgba(107, 114, 128, 0.62);
  stroke-width: 1.6;
  stroke-dasharray: 9 7;
}

.lower-floor-room-reference .room-wall {
  opacity: 0.68;
}

.lower-floor-room-reference .wall-window,
.lower-floor-room-reference .wall-door,
.lower-floor-room-reference .roof-skylight {
  opacity: 0.72;
}

.room-wall-group {
  pointer-events: none;
}

.room-wall {
  fill: none;
  stroke-linecap: square;
  stroke-linejoin: miter;
  pointer-events: none;
}

.room-wall-stack.wall-placement-xray .room-wall,
.room-wall-stack.wall-placement-xray .cavity-wall-tie {
  opacity: 0.5;
  transition: opacity 120ms ease;
}

.room-wall-segment-hit {
  fill: none;
  stroke: transparent;
  stroke-width: calc(14px * var(--floor-interaction-precision, 1));
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  cursor: move;
  pointer-events: stroke;
}

.room-wall.cavity-wall-casing.external {
  stroke: #253244;
}

.room-wall.cavity-wall-void.external {
  stroke: #f8fafc;
}

.cavity-wall-tie {
  fill: none;
  stroke: rgba(71, 85, 105, 0.42);
  stroke-linecap: round;
  stroke-width: 0.36;
  pointer-events: none;
}

.wall-window,
.wall-door {
  cursor: grab;
  pointer-events: visibleStroke;
}

.shared-door-opening-only:not(.wall-door) {
  pointer-events: none;
}

.roof-skylight {
  cursor: grab;
  pointer-events: all;
}

.radiant-effect-zone {
  fill: rgba(249, 115, 22, 0.5);
  stroke: rgba(194, 65, 12, 0.72);
  stroke-width: 1.4;
  stroke-dasharray: 8 6;
  mix-blend-mode: multiply;
  pointer-events: none;
}

html[data-theme="dark"] .radiant-effect-zone {
  fill: rgba(251, 146, 60, 0.46);
  stroke: rgba(253, 186, 116, 0.76);
  mix-blend-mode: screen;
}

.heat-map-layer,
.heat-map-layer * {
  pointer-events: none;
}

.heat-map-layer {
  mix-blend-mode: normal;
}

.heat-map-layer.heat-map-fade-in {
  animation: heatMapFadeIn 220ms ease-out both;
}

.heat-map-layer.heat-map-fade-out {
  animation: heatMapFadeOut 240ms ease-in both;
}

@keyframes heatMapFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes heatMapFadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .heat-map-layer.heat-map-fade-in,
  .heat-map-layer.heat-map-fade-out {
    animation-duration: 1ms;
  }
}

.heat-map-diffuse-field {
  opacity: 0.92;
}

.heat-map-warm-override-field {
  opacity: 0.92;
  mix-blend-mode: normal;
}

.sheet.is-zooming .heat-map-layer,
.sheet.is-zooming .heat-map-layer *,
.canvas-scroll.is-panning .heat-map-layer,
.canvas-scroll.is-panning .heat-map-layer *,
.canvas-scroll.is-touch-zooming .heat-map-layer,
.canvas-scroll.is-touch-zooming .heat-map-layer *,
.plant-room-planner-svg.is-panning .plant-room-noise-heatmap,
.plant-room-planner-svg.is-panning .plant-room-noise-heatmap *,
.plant-room-planner-svg.is-zooming .plant-room-noise-heatmap,
.plant-room-planner-svg.is-zooming .plant-room-noise-heatmap * {
  animation: none !important;
  transition: none !important;
}

.sheet.is-zooming .heat-map-layer,
.canvas-scroll.is-panning .heat-map-layer,
.canvas-scroll.is-touch-zooming .heat-map-layer,
.plant-room-planner-svg.is-panning .plant-room-noise-heatmap,
.plant-room-planner-svg.is-zooming .plant-room-noise-heatmap {
  opacity: 0 !important;
  visibility: hidden;
}

.sheet.is-zooming .heat-map-diffuse-field,
.canvas-scroll.is-panning .heat-map-diffuse-field,
.canvas-scroll.is-panning .heat-map-warm-override-field,
.canvas-scroll.is-touch-zooming .heat-map-diffuse-field,
.canvas-scroll.is-touch-zooming .heat-map-warm-override-field,
.sheet.is-zooming .heat-map-warm-override-field {
  display: none;
}

.ventilation-map-diffuser-field {
  opacity: 0.96;
  mix-blend-mode: normal;
}

.cooling-map-emitter-field {
  opacity: 0.96;
  mix-blend-mode: normal;
}

.heat-map-room-loss,
.cooling-map-room-gain,
.ventilation-map-room-demand {
  fill: var(--heat-map-fill, rgba(250, 204, 21, 0.22));
  opacity: var(--heat-map-opacity, 0.18);
}

.heat-map-room-cold-balance,
.heat-map-horizontal-cold,
.heat-map-cold-band,
.heat-map-cold-opening,
.heat-map-cold-opening-zone,
.cooling-map-solar-gain,
.cooling-map-solar-opening,
.ventilation-map-opening,
.ventilation-map-chimney,
.ventilation-map-diffuser-effect {
  opacity: var(--heat-map-opacity, 0.18);
}

.heat-map-room-cold-balance {
  fill: #7dd3fc;
}

.heat-map-horizontal-cold.roof {
  fill: #38bdf8;
}

.heat-map-horizontal-cold.floor {
  fill: #93c5fd;
}

.heat-map-cold-band,
.heat-map-cold-opening,
.cooling-map-solar-opening,
.ventilation-map-opening {
  fill: none;
  stroke: #0284c7;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: var(--heat-map-stroke-width, 12);
  vector-effect: non-scaling-stroke;
}

.heat-map-cold-band.diffuse,
.heat-map-cold-opening.diffuse,
.cooling-map-solar-opening,
.ventilation-map-opening {
  stroke-linecap: round;
  stroke-linejoin: round;
}

.heat-map-cold-band.internal {
  stroke: #38bdf8;
  stroke-dasharray: 10 8;
}

.heat-map-cold-opening.window,
.heat-map-cold-opening.skylight {
  stroke: #0ea5e9;
}

.heat-map-cold-opening.door {
  stroke: #60a5fa;
}

.heat-map-cold-opening-zone {
  fill: #38bdf8;
  pointer-events: none;
  mix-blend-mode: multiply;
}

.heat-map-cold-opening-zone.window {
  fill: #0ea5e9;
}

.heat-map-cold-opening-zone.door {
  fill: #60a5fa;
}

.cooling-map-solar-gain {
  fill: #fb923c;
}

.cooling-map-solar-opening.window {
  stroke: #dc2626;
}

.cooling-map-solar-opening.skylight {
  stroke: #f97316;
}

.ventilation-map-opening.window {
  stroke: #fb923c;
}

.ventilation-map-opening.door {
  stroke: #f97316;
}

.ventilation-map-chimney {
  fill: #ef4444;
}

.ventilation-map-diffuser-effect {
  fill: #22c55e;
  filter: blur(7px) saturate(1.12);
}

.ventilation-map-diffuser-source.duct-extract .ventilation-map-diffuser-effect {
  fill: #06b6d4;
}

.ventilation-map-diffuser-core {
  fill: #16a34a;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 1.3;
  vector-effect: non-scaling-stroke;
}

.ventilation-map-diffuser-source.duct-extract .ventilation-map-diffuser-core {
  fill: #0891b2;
}

.heat-map-source-convective,
.heat-map-source-radiant {
  opacity: var(--heat-map-opacity, 0.16);
}

.heat-map-source-convective {
  fill: #fb923c;
}

.heat-map-source-radiant {
  fill: #ef4444;
}

.heat-map-source-core {
  fill: #f97316;
  stroke: rgba(255, 255, 255, 0.88);
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
}

.cooling-map-layer .heat-map-source-convective {
  fill: #38bdf8;
}

.cooling-map-layer .heat-map-source-radiant {
  fill: #2563eb;
}

.heat-map-emitter-source.diffuse .heat-map-source-convective,
.heat-map-emitter-source.diffuse .heat-map-source-radiant {
  filter: blur(5px) saturate(1.08);
}

.heat-map-emitter-source.warm-override .heat-map-source-convective,
.heat-map-emitter-source.warm-override .heat-map-source-radiant {
  filter: blur(8px) saturate(1.12);
}

.heat-map-emitter-source.warm-override .heat-map-source-core {
  filter: none;
}

.heat-map-emitter-source.cool-override .heat-map-source-convective,
.heat-map-emitter-source.cool-override .heat-map-source-radiant {
  filter: blur(8px) saturate(1.14);
}

.heat-map-emitter-source.cool-override .heat-map-source-core {
  fill: #0ea5e9;
  filter: none;
}

html[data-theme="dark"] .heat-map-diffuse-field {
  opacity: 0.88;
}

html[data-theme="dark"] .heat-map-layer {
  mix-blend-mode: normal;
}

/* Calculated network performance overlays (pressure drop, velocity and flow). */
.network-performance-heat-map-layer,
.network-performance-heat-map-layer * {
  pointer-events: none;
}

.network-performance-heat-map-layer {
  isolation: isolate;
  opacity: 1;
  transition: opacity 180ms ease-out;
}

.network-performance-heat-map-route {
  fill: none;
  stroke: var(--network-performance-stroke, var(--network-performance-color, #0891b2));
  stroke-width: calc(var(--network-performance-width, 1.8px) * var(--canvas-zoom-inverse, 1));
  stroke-opacity: var(--network-performance-opacity, 0.88);
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  shape-rendering: geometricPrecision;
  filter: none;
  transition: stroke-opacity 160ms ease;
}

.network-performance-heat-map-route.is-missing {
  stroke-dasharray: 5 5;
  filter: none;
}

.network-performance-heat-map-alert {
  fill: none;
  stroke: rgba(127, 29, 29, 0.84);
  stroke-width: calc(var(--network-performance-alert-width, 0.6px) * var(--canvas-zoom-inverse, 1));
  stroke-dasharray: 1 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  shape-rendering: geometricPrecision;
  opacity: 0.9;
}

.sheet.is-zooming .network-performance-heat-map-layer,
.canvas-scroll.is-panning .network-performance-heat-map-layer,
.canvas-scroll.is-touch-zooming .network-performance-heat-map-layer {
  visibility: hidden;
  opacity: 0;
  transition: none;
}

.network-performance-heat-map-legend {
  position: absolute;
  right: 64px;
  bottom: calc(28px + 12px);
  z-index: 12;
  width: clamp(190px, 21vw, 248px);
  max-width: calc(100% - 76px);
  display: grid;
  gap: 6px;
  padding: 9px 10px;
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  box-shadow: var(--glass-edge), 0 10px 28px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(14px) saturate(1.12);
  -webkit-backdrop-filter: blur(14px) saturate(1.12);
  pointer-events: none;
}

.room-demand-heat-map-legend {
  width: clamp(220px, 23vw, 276px);
}

.network-performance-heat-map-legend-head {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.network-performance-heat-map-legend-head strong,
.network-performance-heat-map-legend-head span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.network-performance-heat-map-legend-head strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.network-performance-heat-map-legend-head span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 820;
  text-align: right;
}

.network-performance-heat-map-gradient {
  position: relative;
  min-height: 10px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 999px;
  background: var(
    --network-performance-gradient,
    linear-gradient(90deg, #2563eb 0%, #0891b2 28%, #10b981 52%, #facc15 68%, #f59e0b 80%, #dc2626 100%)
  );
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.2);
}

.network-performance-heat-map-gradient.is-limit {
  --network-performance-gradient: linear-gradient(90deg, #2563eb 0%, #0891b2 28%, #10b981 52%, #facc15 68%, #f59e0b 80%, #dc2626 100%);
}

.network-performance-heat-map-gradient.is-flow {
  --network-performance-gradient: linear-gradient(90deg, #440154 0%, #3b528b 25%, #21918c 50%, #5ec962 75%, #fde725 100%);
}

.network-performance-heat-map-target-marker {
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: 80%;
  width: 2px;
  border-radius: 999px;
  background: #0f172a;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.72);
  transform: translateX(-1px);
}

.network-performance-heat-map-legend-head small {
  color: inherit;
  font-size: 0.86em;
  font-weight: 760;
}

.network-performance-heat-map-gradient > i,
.network-performance-heat-map-gradient > span,
.network-performance-heat-map-scale i,
.network-performance-heat-map-scale [data-heat-map-swatch] {
  display: inline-block;
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border: 1px solid rgba(15, 23, 42, 0.22);
  border-radius: 3px;
  background: var(--network-performance-color, currentColor);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.16);
}

.network-performance-heat-map-scale {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  color: #475569;
  font-size: 9.5px;
  font-weight: 820;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.network-performance-heat-map-scale.has-positioned-ticks {
  position: relative;
  display: block;
  height: 10px;
}

.network-performance-heat-map-scale.has-positioned-ticks > span {
  position: absolute;
  top: 0;
  left: var(--heat-map-tick, 0%);
  transform: translateX(-50%);
}

.network-performance-heat-map-scale.has-positioned-ticks > span:first-child {
  transform: none;
}

.network-performance-heat-map-scale.has-positioned-ticks > span:last-child {
  transform: translateX(-100%);
}

.network-performance-heat-map-scale > span {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.network-performance-heat-map-scale > span:first-child {
  justify-content: flex-start;
  text-align: left;
}

.network-performance-heat-map-scale > span:last-child {
  justify-content: flex-end;
  text-align: right;
}

.room-demand-heat-map-cues {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 9px;
  color: #475569;
  font-size: 9.5px;
  font-weight: 780;
  line-height: 1.2;
}

.room-demand-heat-map-cues > span {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.room-demand-heat-map-cues [data-heat-map-swatch] {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border: 1px solid rgba(15, 23, 42, 0.22);
  border-radius: 3px;
  background: var(--network-performance-color, currentColor);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.16);
}

.network-performance-heat-map-note,
.network-performance-heat-map-empty {
  margin: 0;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.3;
}

.network-performance-heat-map-empty {
  padding: 7px 8px;
  border: 1px dashed rgba(148, 163, 184, 0.54);
  border-radius: 8px;
  background: rgba(241, 245, 249, 0.72);
  text-align: center;
}

html[data-theme="dark"] .network-performance-heat-map-route {
  filter: none;
}

html[data-theme="dark"] .network-performance-heat-map-alert {
  stroke: rgba(254, 226, 226, 0.86);
}

html[data-theme="dark"] .network-performance-heat-map-target-marker {
  background: #f8fafc;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.74);
}

html[data-theme="dark"] .network-performance-heat-map-legend {
  border-color: rgba(148, 163, 184, 0.34);
  background: rgba(15, 23, 42, 0.9);
  color: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 12px 30px rgba(0, 0, 0, 0.38);
}

html[data-theme="dark"] .network-performance-heat-map-legend-head strong {
  color: #f8fafc;
}

html[data-theme="dark"] .network-performance-heat-map-legend-head span,
html[data-theme="dark"] .network-performance-heat-map-note,
html[data-theme="dark"] .network-performance-heat-map-empty {
  color: #cbd5e1;
}

html[data-theme="dark"] .network-performance-heat-map-gradient {
  border-color: rgba(226, 232, 240, 0.24);
  box-shadow: inset 0 1px 2px rgba(2, 6, 23, 0.72);
}

html[data-theme="dark"] .network-performance-heat-map-scale {
  color: #e2e8f0;
}

html[data-theme="dark"] .room-demand-heat-map-cues {
  color: #e2e8f0;
}

html[data-theme="dark"] .room-demand-heat-map-cues [data-heat-map-swatch] {
  border-color: rgba(248, 250, 252, 0.38);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.36);
}

html[data-theme="dark"] .network-performance-heat-map-gradient > i,
html[data-theme="dark"] .network-performance-heat-map-gradient > span,
html[data-theme="dark"] .network-performance-heat-map-scale i,
html[data-theme="dark"] .network-performance-heat-map-scale [data-heat-map-swatch] {
  border-color: rgba(248, 250, 252, 0.38);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.36);
}

html[data-theme="dark"] .network-performance-heat-map-empty {
  border-color: rgba(148, 163, 184, 0.36);
  background: rgba(30, 41, 59, 0.72);
}

@media (max-width: 760px) {
  .network-performance-heat-map-legend {
    right: 56px;
    bottom: calc(28px + 8px);
    width: min(224px, calc(100% - 64px));
    max-width: calc(100% - 64px);
    padding: 8px 9px;
  }

  .network-performance-heat-map-note {
    display: none;
  }

  .room-demand-heat-map-legend .network-performance-heat-map-note {
    display: block;
  }
}

@media (forced-colors: active) {
  .room-demand-heat-map-legend .network-performance-heat-map-gradient,
  .room-demand-heat-map-cues [data-heat-map-swatch] {
    border: 1px solid CanvasText;
  }
}

@media (prefers-reduced-motion: reduce) {
  .network-performance-heat-map-layer,
  .network-performance-heat-map-route {
    transition: none;
  }
}

@media print {
  .network-performance-heat-map-route {
    filter: none;
  }

  .network-performance-heat-map-alert {
    stroke: #7f1d1d;
  }

  .network-performance-heat-map-legend {
    border-color: #94a3b8;
    background: #ffffff;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}

.wall-radiator {
  cursor: grab;
  pointer-events: all;
}

.wall-window:active,
.wall-door:active,
.roof-skylight:active,
.wall-radiator:active {
  cursor: grabbing;
}

.wall-window .window-opening,
.wall-window .window-frame,
.wall-window .window-pane,
.wall-window .window-jamb {
  pointer-events: stroke;
}

.wall-door .door-opening,
.wall-door .door-hit,
.wall-door .door-leaf,
.wall-door .door-swing,
.wall-door .door-jamb {
  pointer-events: stroke;
}

.window-preview {
  filter: drop-shadow(0 0 0.18rem rgba(75, 85, 99, 0.55));
  opacity: 0.94;
  pointer-events: none;
}

.window-preview .window-opening {
  stroke: rgba(75, 85, 99, 0.24);
}

.window-preview .window-glass {
  fill: rgba(156, 163, 175, 0.42);
  stroke: rgba(75, 85, 99, 0.4);
}

.window-preview .window-frame,
.window-preview .window-jamb,
.window-preview .window-pane {
  stroke: #4b5563;
  stroke-dasharray: 2.4 1.6;
}

.door-preview {
  filter: drop-shadow(0 0 0.18rem rgba(107, 114, 128, 0.5));
  opacity: 0.95;
  pointer-events: none;
}

.door-preview .door-opening {
  stroke: rgba(107, 114, 128, 0.24);
}

.door-preview .door-leaf,
.door-preview .door-swing,
.door-preview .door-jamb {
  stroke: #6b7280;
  stroke-dasharray: 2.4 1.6;
}

.skylight-preview {
  filter: drop-shadow(0 0 0.18rem rgba(107, 114, 128, 0.52));
  opacity: 0.9;
  pointer-events: none;
}

.skylight-preview .skylight-opening {
  stroke: #6b7280;
  stroke-dasharray: 2.4 1.6;
}

.skylight-preview .skylight-glass {
  fill: rgba(209, 213, 219, 0.46);
  stroke: rgba(2, 132, 199, 0.42);
}

.skylight-preview .skylight-pane {
  stroke: #6b7280;
  stroke-dasharray: 2.4 1.6;
}

.radiator-preview {
  filter: drop-shadow(0 0 0.18rem rgba(0, 122, 255, 0.38));
  opacity: 0.9;
  pointer-events: none;
}

.radiator-preview.invalid {
  filter: drop-shadow(0 0 0.2rem rgba(239, 68, 68, 0.45));
}

.radiator-preview.invalid .radiator-body {
  fill: rgba(254, 226, 226, 0.86);
  stroke: #ef4444;
}

.radiator-preview.invalid .radiator-panel,
.radiator-preview.invalid .radiator-end-cap,
.radiator-preview.invalid .radiator-convector-fin {
  stroke: #ef4444;
}

.ufh-manifold-preview {
  filter: drop-shadow(0 0 0.18rem rgba(245, 158, 11, 0.38));
  opacity: 0.88;
  pointer-events: none;
}

.ufh-manifold-preview.invalid {
  filter: drop-shadow(0 0 0.2rem rgba(239, 68, 68, 0.45));
}

.ufh-manifold-preview.invalid .ufh-manifold-body {
  fill: rgba(254, 226, 226, 0.72);
  stroke: #ef4444;
}

.ufh-manifold-preview.invalid .ufh-manifold-port {
  stroke: #ef4444;
}

.window-opening {
  fill: none;
  stroke: #ffffff;
  stroke-linecap: butt;
  stroke-linejoin: miter;
}

.door-opening {
  fill: none;
  stroke: #ffffff;
  stroke-linecap: butt;
  stroke-linejoin: miter;
}

.door-hit {
  fill: none;
  stroke: rgba(0, 0, 0, 0);
  stroke-linecap: square;
  pointer-events: stroke;
}

.window-glass {
  fill: rgba(209, 213, 219, 0.38);
  stroke: rgba(75, 85, 99, 0.16);
  stroke-width: 0.45;
  pointer-events: none;
}

.window-frame {
  fill: none;
  stroke: #4b5563;
  stroke-linecap: butt;
  stroke-linejoin: miter;
}

.window-jamb {
  fill: none;
  stroke: #4b5563;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.window-pane {
  fill: none;
  stroke: #9ca3af;
  stroke-linecap: butt;
  stroke-linejoin: miter;
}

.door-leaf,
.door-jamb {
  fill: none;
  stroke: #374151;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.door-fold {
  stroke-linejoin: round;
}

.door-swing {
  fill: none;
  stroke: rgba(107, 114, 128, 0.72);
  stroke-width: 0.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.skylight-hit {
  fill: rgba(0, 0, 0, 0);
  stroke: transparent;
  pointer-events: all;
}

.skylight-opening {
  fill: rgba(229, 231, 235, 0.42);
  stroke: #0f172a;
  stroke-width: 1.15;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.skylight-glass {
  fill: rgba(209, 213, 219, 0.72);
  stroke: rgba(107, 114, 128, 0.42);
  stroke-width: 0.7;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.skylight-pane {
  fill: none;
  stroke: rgba(107, 114, 128, 0.72);
  stroke-width: 0.75;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

/* SVG non-scaling strokes still grow with the sheet's outer CSS zoom. Use
   ordinary strokes, compensate for the full view scale, and cap them to the
   physical symbol depth. Ports, labels and generous hit targets stay separate. */
#sheet .heat-emitter-plan-artwork {
  --emitter-artwork-scale: min(var(--canvas-marker-scale, 1), var(--emitter-stroke-limit, 1));
}

#sheet .heat-emitter-plan-artwork * {
  vector-effect: none;
}

.radiator-body {
  fill: rgba(255, 255, 255, 0.58);
  stroke: #0f172a;
  stroke-width: calc(0.85px * var(--emitter-artwork-scale, 1));
  vector-effect: non-scaling-stroke;
  pointer-events: all;
}

.radiator-route-hit {
  fill: rgba(37, 99, 235, 0.001);
  stroke: transparent;
  pointer-events: all;
  cursor: pointer;
}

.radiator-panel,
.radiator-end-cap,
.radiator-convector-fin,
.heat-emitter-grille,
.heat-emitter-line,
.heat-emitter-side-rail,
.heat-emitter-towel-bar,
.heat-emitter-radiant-line,
.heat-emitter-radiant-wave,
.heat-emitter-radiant-edge,
.heat-emitter-radiant-header,
.heat-emitter-radiant-tube,
.heat-emitter-radiant-strap,
.heat-emitter-coil,
.heat-emitter-fin,
.heat-emitter-towel-upright,
.heat-emitter-finned-core,
.heat-emitter-finned-shell,
.heat-emitter-finned-rib,
.heat-emitter-finned-collar,
.heat-emitter-finned-pipe-end,
.heat-emitter-pipe-core,
.heat-emitter-pipe-shell,
.heat-emitter-pipe-collar,
.heat-emitter-pipe-end,
.heat-emitter-trench-frame,
.heat-emitter-trench-slat,
.heat-emitter-trench-coil,
.heat-emitter-fcu-edge,
.heat-emitter-fcu-panel,
.heat-emitter-fcu-fold,
.heat-emitter-fcu-duct-tail,
.heat-emitter-coil-bank,
.heat-emitter-fan-ring,
.heat-emitter-fan-blade {
  fill: none;
  stroke: rgba(51, 65, 85, 0.78);
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.radiator-panel {
  stroke: rgba(15, 23, 42, 0.92);
  stroke-width: calc(2.2px * var(--emitter-artwork-scale, 1));
}

.radiator-end-cap {
  stroke: rgba(15, 23, 42, 0.72);
  stroke-width: calc(1.05px * var(--emitter-artwork-scale, 1));
}

.radiator-convector-fin {
  stroke: rgba(51, 65, 85, 0.64);
  stroke-width: calc(0.82px * var(--emitter-artwork-scale, 1));
}

.heat-emitter-grille,
.heat-emitter-fin {
  stroke: rgba(15, 23, 42, 0.66);
  stroke-width: calc(0.9px * var(--emitter-artwork-scale, 1));
}

.radiator-type-trench-heater .radiator-body {
  fill: rgba(15, 23, 42, 0.12);
  stroke: rgba(15, 23, 42, 0.32);
}

.heat-emitter-trench-void {
  fill: rgba(15, 23, 42, 0.74);
  stroke: none;
  pointer-events: none;
}

.heat-emitter-trench-frame {
  stroke: rgba(226, 232, 240, 0.95);
  stroke-width: calc(2.1px * var(--emitter-artwork-scale, 1));
}

.heat-emitter-trench-slat {
  stroke: rgba(248, 250, 252, 0.92);
  stroke-width: calc(1.2px * var(--emitter-artwork-scale, 1));
}

.heat-emitter-trench-coil {
  stroke: rgba(71, 85, 105, 0.78);
  stroke-width: calc(1.45px * var(--emitter-artwork-scale, 1));
}

html[data-theme="dark"] .radiator-type-trench-heater .radiator-body {
  fill: rgba(248, 250, 252, 0.05);
  stroke: rgba(226, 232, 240, 0.24);
}

.radiator-type-fan-coil .radiator-body {
  fill: rgba(248, 250, 252, 0.42);
  stroke: rgba(15, 23, 42, 0.32);
}

.heat-emitter-fcu-case {
  fill: rgba(248, 250, 252, 0.72);
  stroke: rgba(15, 23, 42, 0.26);
  stroke-width: calc(0.8px * var(--emitter-artwork-scale, 1));
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.heat-emitter-fcu-edge {
  stroke: rgba(15, 23, 42, 0.68);
  stroke-width: calc(1.3px * var(--emitter-artwork-scale, 1));
}

.heat-emitter-fcu-panel,
.heat-emitter-fcu-fold {
  stroke: rgba(100, 116, 139, 0.74);
  stroke-width: calc(1px * var(--emitter-artwork-scale, 1));
}

.heat-emitter-fcu-duct-tail {
  stroke: rgba(15, 23, 42, 0.58);
  stroke-width: calc(1.6px * var(--emitter-artwork-scale, 1));
}

.heat-emitter-fcu-duct-rim {
  fill: rgba(226, 232, 240, 0.86);
  stroke: rgba(71, 85, 105, 0.62);
  stroke-width: calc(0.5px * var(--emitter-artwork-scale, 1));
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.heat-emitter-fcu-duct {
  fill: rgba(15, 23, 42, 0.82);
  stroke: none;
  pointer-events: none;
}

html[data-theme="dark"] .radiator-type-fan-coil .radiator-body {
  fill: rgba(248, 250, 252, 0.08);
  stroke: rgba(226, 232, 240, 0.24);
}

html[data-theme="dark"] .heat-emitter-fcu-case {
  fill: rgba(226, 232, 240, 0.28);
  stroke: rgba(248, 250, 252, 0.2);
}

.heat-emitter-line,
.heat-emitter-coil-bank,
.heat-emitter-towel-bar,
.heat-emitter-side-rail,
.heat-emitter-towel-upright {
  stroke: rgba(15, 23, 42, 0.82);
  stroke-width: calc(1.4px * var(--emitter-artwork-scale, 1));
}

.radiator-type-towel-rail .radiator-body {
  fill: rgba(248, 250, 252, 0.28);
  stroke: rgba(15, 23, 42, 0.28);
}

.heat-emitter-towel-upright {
  stroke-width: calc(2.1px * var(--emitter-artwork-scale, 1));
}

.heat-emitter-towel-bar {
  stroke: rgba(15, 23, 42, 0.88);
  stroke-width: calc(1.55px * var(--emitter-artwork-scale, 1));
}

.heat-emitter-towel-valve {
  fill: rgba(15, 23, 42, 0.82);
  stroke: rgba(248, 250, 252, 0.86);
  stroke-width: calc(0.45px * var(--emitter-artwork-scale, 1));
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.heat-emitter-coil,
.heat-emitter-radiant-wave {
  stroke: rgba(15, 23, 42, 0.8);
  stroke-width: calc(1.15px * var(--emitter-artwork-scale, 1));
}

.radiator-type-finned-coil .radiator-body {
  fill: rgba(148, 163, 184, 0.12);
  stroke: rgba(15, 23, 42, 0.26);
}

.heat-emitter-finned-core {
  stroke: rgba(15, 23, 42, 0.92);
  stroke-width: calc(2.25px * var(--emitter-artwork-scale, 1));
}

.heat-emitter-finned-shell {
  stroke: rgba(15, 23, 42, 0.84);
  stroke-width: calc(1.35px * var(--emitter-artwork-scale, 1));
}

.heat-emitter-finned-rib {
  stroke: rgba(15, 23, 42, 0.9);
  stroke-width: calc(1.05px * var(--emitter-artwork-scale, 1));
}

.heat-emitter-finned-collar {
  stroke: rgba(71, 85, 105, 0.86);
  stroke-width: calc(1.55px * var(--emitter-artwork-scale, 1));
}

.heat-emitter-finned-pipe-end {
  stroke: rgba(100, 116, 139, 0.82);
  stroke-width: calc(2px * var(--emitter-artwork-scale, 1));
}

.radiator-type-pipe-coil .radiator-body {
  fill: rgba(148, 163, 184, 0.1);
  stroke: rgba(15, 23, 42, 0.22);
}

.heat-emitter-pipe-core {
  stroke: rgba(71, 85, 105, 0.9);
  stroke-width: calc(3px * var(--emitter-artwork-scale, 1));
}

.heat-emitter-pipe-shell {
  stroke: rgba(15, 23, 42, 0.72);
  stroke-width: calc(1.5px * var(--emitter-artwork-scale, 1));
}

.heat-emitter-pipe-collar {
  stroke: rgba(15, 23, 42, 0.72);
  stroke-width: calc(1.45px * var(--emitter-artwork-scale, 1));
}

.heat-emitter-pipe-end {
  stroke: rgba(100, 116, 139, 0.8);
  stroke-width: calc(1.35px * var(--emitter-artwork-scale, 1));
}

.heat-emitter-radiant-line {
  stroke: rgba(14, 165, 233, 0.62);
  stroke-width: calc(1px * var(--emitter-artwork-scale, 1));
}

.radiator-type-radiant-heater .radiator-body {
  fill: rgba(248, 250, 252, 0.22);
  stroke: rgba(15, 23, 42, 0.28);
}

.heat-emitter-radiant-panel-face {
  fill: rgba(248, 250, 252, 0.76);
  stroke: rgba(15, 23, 42, 0.26);
  stroke-width: calc(0.7px * var(--emitter-artwork-scale, 1));
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.heat-emitter-radiant-edge {
  stroke: rgba(15, 23, 42, 0.72);
  stroke-width: calc(1.15px * var(--emitter-artwork-scale, 1));
}

.heat-emitter-radiant-header {
  stroke: rgba(15, 23, 42, 0.76);
  stroke-width: calc(2.2px * var(--emitter-artwork-scale, 1));
}

.heat-emitter-radiant-tube {
  stroke: rgba(30, 41, 59, 0.72);
  stroke-width: calc(1.45px * var(--emitter-artwork-scale, 1));
}

.heat-emitter-radiant-strap {
  stroke: rgba(71, 85, 105, 0.72);
  stroke-width: calc(1.2px * var(--emitter-artwork-scale, 1));
}

.heat-emitter-radiant-pitch-arrow,
.heat-emitter-radiant-pitch-head {
  fill: none;
  stroke: rgba(249, 115, 22, 0.86);
  stroke-width: calc(1.45px * var(--emitter-artwork-scale, 1));
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

html[data-theme="dark"] .radiator-type-radiant-heater .radiator-body {
  fill: rgba(226, 232, 240, 0.05);
  stroke: rgba(226, 232, 240, 0.24);
}

html[data-theme="dark"] .heat-emitter-radiant-panel-face {
  fill: rgba(226, 232, 240, 0.18);
  stroke: rgba(226, 232, 240, 0.34);
}

html[data-theme="dark"] .heat-emitter-radiant-edge,
html[data-theme="dark"] .heat-emitter-radiant-header,
html[data-theme="dark"] .heat-emitter-radiant-tube,
html[data-theme="dark"] .heat-emitter-radiant-strap {
  stroke: rgba(248, 250, 252, 0.76);
}

html[data-theme="dark"] .heat-emitter-radiant-pitch-arrow,
html[data-theme="dark"] .heat-emitter-radiant-pitch-head {
  stroke: rgba(251, 146, 60, 0.92);
}

.heat-emitter-fan-ring,
.heat-emitter-fan-blade {
  stroke: rgba(15, 23, 42, 0.72);
  stroke-width: 1.05;
}

.heat-emitter-fan-hub {
  fill: rgba(15, 23, 42, 0.72);
  stroke: none;
  pointer-events: none;
}

.radiator-connection-anchors {
  pointer-events: none;
}

.radiator-connection-stem {
  fill: none;
  stroke: rgba(15, 23, 42, 0.64);
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.radiator-connection-anchor {
  fill: rgba(255, 255, 255, 0.9);
  stroke-width: 1.35;
  transform: scale(var(--canvas-marker-scale, 1));
  transform-box: fill-box;
  transform-origin: center;
  vector-effect: non-scaling-stroke;
  pointer-events: all;
  filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.24));
}

.radiator-connection-anchor-hit {
  fill: rgba(37, 99, 235, 0.012);
  stroke: transparent;
  transform: scale(var(--canvas-marker-scale, 1)) scale(var(--floor-interaction-precision, 1));
  transform-box: fill-box;
  transform-origin: center;
  pointer-events: all;
  cursor: pointer;
}

.radiator-connection-stem.radiator-connection-flow,
.radiator-connection-anchor.radiator-connection-flow {
  stroke: #ef4444;
}

.radiator-connection-stem.radiator-connection-return,
.radiator-connection-anchor.radiator-connection-return {
  stroke: #0a84ff;
}

.radiator-connection-stem.radiator-connection-cooling-flow,
.radiator-connection-anchor.radiator-connection-cooling-flow {
  stroke: #38bdf8;
}

.radiator-connection-stem.radiator-connection-cooling-return,
.radiator-connection-anchor.radiator-connection-cooling-return {
  stroke: #a855f7;
}

.radiator-connection-anchor.radiator-connection-flow {
  fill: rgba(254, 226, 226, 0.94);
}

.radiator-connection-anchor.radiator-connection-return {
  fill: rgba(219, 234, 254, 0.94);
}

.radiator-connection-anchor.radiator-connection-cooling-flow {
  fill: rgba(224, 242, 254, 0.94);
}

.radiator-connection-anchor.radiator-connection-cooling-return {
  fill: rgba(243, 232, 255, 0.94);
}

.auto-pipe-heat-emitter-targets {
  pointer-events: none;
}

.auto-pipe-heat-emitter-target {
  pointer-events: none;
}

.auto-pipe-heat-emitter-target-hit {
  fill: rgba(37, 99, 235, 0.012);
  stroke: transparent;
  pointer-events: all;
  cursor: pointer;
}

.auto-pipe-heat-emitter-target-ring {
  fill: rgba(255, 255, 255, 0.28);
  stroke: rgba(37, 99, 235, 0.78);
  stroke-width: 2.1;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
  filter: drop-shadow(0 1px 3px rgba(15, 23, 42, 0.28));
}

.auto-pipe-heat-emitter-target:hover .auto-pipe-heat-emitter-target-ring {
  fill: rgba(37, 99, 235, 0.16);
  stroke: rgba(37, 99, 235, 0.96);
  stroke-width: 2.6;
}

.auto-pipe-heat-emitter-target.selected .auto-pipe-heat-emitter-target-ring {
  fill: rgba(34, 197, 94, 0.22);
  stroke: rgba(22, 163, 74, 0.98);
  stroke-width: 2.8;
}

.auto-pipe-riser-targets {
  pointer-events: all;
}

.auto-pipe-riser-target {
  pointer-events: all;
}

.auto-pipe-riser-target-hit {
  fill: rgba(37, 99, 235, 0.012);
  stroke: transparent;
  pointer-events: all;
  cursor: pointer;
}

.auto-pipe-riser-target-ring {
  fill: rgba(255, 255, 255, 0.28);
  stroke: rgba(37, 99, 235, 0.78);
  stroke-width: 2.1;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
  filter: drop-shadow(0 1px 3px rgba(15, 23, 42, 0.28));
}

.auto-pipe-riser-target:hover .auto-pipe-riser-target-ring {
  fill: rgba(37, 99, 235, 0.16);
  stroke: rgba(37, 99, 235, 0.96);
  stroke-width: 2.6;
}

.auto-pipe-riser-target.selected .auto-pipe-riser-target-ring {
  fill: rgba(34, 197, 94, 0.22);
  stroke: rgba(22, 163, 74, 0.98);
  stroke-width: 2.8;
}

.auto-pipe-riser-target-source .auto-pipe-riser-target-ring {
  stroke-dasharray: 4 3;
}

.floor-outlet {
  cursor: pointer;
  pointer-events: all;
}

.floor-outlet-preview-layer,
.floor-outlet-preview-layer * {
  pointer-events: none;
}

.floor-outlet.preview {
  filter: drop-shadow(0 0 0.18rem rgba(10, 132, 255, 0.32));
  opacity: 0.78;
  pointer-events: none;
}

.floor-outlet.preview .outlet-symbol-body {
  fill: rgba(219, 234, 254, 0.2);
  stroke: #0a84ff;
  stroke-dasharray: 4 3;
  stroke-width: 1.8;
}

.floor-outlet.preview .outlet-symbol-asset,
.floor-outlet.preview .outlet-symbol-glyph {
  opacity: 0.72;
}

.floor-outlet.preview.invalid {
  filter: drop-shadow(0 0 0.18rem rgba(239, 68, 68, 0.32));
}

.floor-outlet.preview.invalid .outlet-symbol-body {
  fill: rgba(254, 226, 226, 0.22);
  stroke: #ef4444;
}

.floor-outlet-preview-layer .outlet-connection-stem {
  opacity: 0.72;
  stroke-dasharray: 3 2;
}

.floor-outlet-preview-layer .outlet-connection-anchor {
  opacity: 0.86;
}

.outlet-symbol-body {
  fill: rgba(255, 255, 255, 0.01);
  stroke: transparent;
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
  pointer-events: all;
}

.outlet-symbol-asset {
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(15, 23, 42, 0.16));
}

.outlet-symbol-glyph {
  color: #0f172a;
  pointer-events: none;
}

.outlet-reference {
  fill: #0f172a;
  font-size: calc(8px * var(--canvas-text-scale, 1));
  font-weight: 900;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.86);
  stroke-width: 2.2px;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

#sheet .outlet-reference {
  transform: translateY(calc(6px * var(--canvas-marker-scale, 1)));
}

.outlet-connection-anchors {
  pointer-events: none;
}

.outlet-tmv-plan-assembly {
  color: #0f172a;
  pointer-events: none;
}

.outlet-tmv-plan-assembly[data-outlet-tmv-valve-id] {
  cursor: pointer;
  pointer-events: visiblePainted;
}

.outlet-tmv-plan-assembly[data-outlet-tmv-valve-id]:hover .outlet-tmv-screen-marker,
.outlet-tmv-plan-assembly[data-outlet-tmv-valve-id]:focus-visible .outlet-tmv-screen-marker,
.outlet-tmv-plan-assembly[data-outlet-tmv-valve-id].selected .outlet-tmv-screen-marker {
  filter: drop-shadow(0 0 5px rgba(139, 92, 246, 0.72));
}

.outlet-tmv-screen-marker {
  transform: scale(var(--canvas-marker-scale, 1));
  transform-box: view-box;
  transform-origin: 0 0;
}

.outlet-tmv-port-symbol,
.outlet-tmv-body,
.outlet-tmv-adjuster {
  vector-effect: none;
}

.outlet-tmv-port-line {
  fill: none;
  stroke-linecap: round;
  stroke-width: calc(var(--pipe-visual-stroke-width, 1.4px) * var(--canvas-zoom-inverse, 1));
  vector-effect: non-scaling-stroke;
}

.outlet-tmv-port-line.hot { stroke: #dc2626; }
.outlet-tmv-port-line.cold { stroke: #2563eb; }
.outlet-tmv-port-line.mixed { stroke: #14b8a6; }

.outlet-tmv-port-symbol {
  stroke-width: 1;
  stroke-linejoin: round;
}

.outlet-tmv-port-symbol.hot { fill: #fecaca; stroke: #dc2626; }
.outlet-tmv-port-symbol.cold { fill: #bfdbfe; stroke: #2563eb; }
.outlet-tmv-port-symbol.mixed { fill: #ccfbf1; stroke: #14b8a6; }

.outlet-tmv-body {
  fill: #ffffff;
  stroke: #334155;
  stroke-width: 1.1;
}

.outlet-tmv-adjuster {
  fill: none;
  stroke: #334155;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1;
}

.outlet-tmv-hit-target {
  fill: transparent;
  pointer-events: all;
  stroke: transparent;
}

.outlet-tmv-label {
  fill: #0f172a;
  font-size: calc(5.6px * var(--canvas-text-scale, 1));
  font-weight: 900;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.94);
  stroke-linejoin: round;
  stroke-width: 2px;
}

#sheet .outlet-tmv-screen-marker .outlet-tmv-label {
  font-size: 5.2px;
  stroke-width: 1.4px;
}

.outlet-connection-stem {
  fill: none;
  stroke-linecap: round;
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.outlet-connection-anchor {
  fill: rgba(255, 255, 255, 0.9);
  stroke-width: 1.35;
  transform: scale(var(--canvas-marker-scale, 1));
  transform-box: fill-box;
  transform-origin: center;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.24));
}

.outlet-connection-anchor-hit {
  fill: rgba(37, 99, 235, 0.001);
  stroke: transparent;
  transform: scale(var(--canvas-marker-scale, 1)) scale(var(--floor-interaction-precision, 1));
  transform-box: fill-box;
  transform-origin: center;
  pointer-events: all;
  cursor: pointer;
}

/* Connection magnets are route affordances, not Select-tool targets. Their
   visible symbols remain in place, while the transparent capture circles stop
   stealing clicks from nearby devices and pipework until a routing tool is active. */
.sheet:not(.route-targeting-active) .radiator-connection-anchor-hit,
.sheet:not(.route-targeting-active) .outlet-connection-anchor-hit {
  pointer-events: none;
}

.outlet-connection-hot {
  stroke: #ef4444;
  fill: rgba(254, 226, 226, 0.94);
}

.outlet-connection-cold {
  stroke: #0a84ff;
  fill: rgba(219, 234, 254, 0.94);
}

.outlet-connection-drainage {
  stroke: #92400e;
  fill: rgba(254, 243, 199, 0.94);
}

.floor-outlet.active .outlet-symbol-body {
  fill: rgba(219, 234, 254, 0.18);
  stroke: #0a84ff;
}

.ufh-manifold {
  cursor: pointer;
}

.ufh-loop-layer {
  pointer-events: none;
}

.ufh-loop-path {
  fill: none;
  stroke: var(--ufh-loop-color, rgba(245, 158, 11, 0.74));
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.5;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 1px 2px rgba(120, 53, 15, 0.16));
  transition: opacity 160ms ease, stroke-width 160ms ease;
}

.ufh-loop-path.active {
  opacity: 1;
  stroke-width: 1.7;
}

.ufh-loop-path.inactive {
  opacity: 0.5;
}

.ufh-loop-connector {
  fill: none;
  stroke: rgba(245, 158, 11, 0.5);
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 4 3;
  vector-effect: non-scaling-stroke;
}

.ufh-loop-pattern-linear {
  stroke-dasharray: none;
}

.ufh-loop-pattern-spiral {
  stroke: var(--ufh-loop-color, rgba(217, 119, 6, 0.82));
}

.ufh-manifold-body {
  fill: rgba(245, 158, 11, 0.2);
  stroke: rgba(120, 53, 15, 0.88);
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 3px 8px rgba(15, 23, 42, 0.2));
  pointer-events: all;
}

.ufh-manifold-port {
  fill: none;
  stroke: rgba(120, 53, 15, 0.58);
  stroke-width: 0.9;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.ufh-manifold-connection-anchors {
  pointer-events: none;
}

.ufh-manifold-connection-stem {
  fill: none;
  stroke-linecap: round;
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.ufh-manifold-connection-anchor {
  fill: rgba(255, 255, 255, 0.9);
  stroke-width: 1.35;
  vector-effect: non-scaling-stroke;
  pointer-events: all;
  filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.24));
}

.ufh-manifold-connection-flow {
  stroke: #ef4444;
}

.ufh-manifold-connection-return {
  stroke: #0a84ff;
}

.ufh-manifold-connection-cooling-flow {
  stroke: #0284c7;
}

.ufh-manifold-connection-cooling-return {
  stroke: #6366f1;
}

.ufh-manifold.active .ufh-manifold-body {
  fill: rgba(254, 243, 199, 0.74);
  stroke: #f59e0b;
}

.ufh-manifold-reference {
  fill: #78350f;
  font-size: calc(9px * var(--canvas-text-scale, 1));
  font-weight: 900;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.86);
  stroke-width: 2.4px;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.wall-radiator.active .radiator-connection-anchor {
  stroke-width: 1.75;
}

.radiator-reference-wrap {
  pointer-events: none;
}

.radiator-reference {
  fill: #0f172a;
  font-size: calc(9px * var(--canvas-text-scale, 1));
  font-weight: 900;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.82);
  stroke-width: calc(2.4px * var(--canvas-text-scale, 1));
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
  text-rendering: geometricPrecision;
}

.wall-radiator.active .radiator-body {
  fill: rgba(219, 234, 254, 0.92);
  stroke: #0a84ff;
  stroke-width: calc(1.25px * var(--emitter-artwork-scale, 1));
}

.wall-radiator.active .radiator-panel,
.wall-radiator.active .radiator-end-cap,
.wall-radiator.active .radiator-convector-fin {
  stroke: #0a84ff;
}

.wall-window.active .window-frame,
.wall-window.active .window-jamb {
  stroke: #f59e0b;
}

.wall-window.active .window-opening {
  stroke: #fff7ed;
}

.wall-door.active .door-leaf,
.wall-door.active .door-jamb,
.wall-door.active .door-swing {
  stroke: #f59e0b;
}

.wall-door.active .door-opening {
  stroke: #fff7ed;
}

.roof-skylight.active .skylight-opening {
  stroke: #f59e0b;
  stroke-width: 1.6;
}

.roof-skylight.active .skylight-pane {
  stroke: #f59e0b;
}

.window-handle,
.door-handle,
.skylight-handle,
.radiator-handle {
  fill: #ffffff;
  stroke: #f59e0b;
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
  pointer-events: all;
}

.rotation-grab-control {
  color: #0a84ff;
  cursor: grab;
  pointer-events: all;
}

.rotation-grab-control:active {
  cursor: grabbing;
}

.rotation-grab-stem {
  pointer-events: none;
  stroke: currentColor;
  stroke-dasharray: 3 2;
  stroke-linecap: round;
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
}

.rotation-grab-hit {
  cursor: grab;
  fill: transparent;
  pointer-events: all;
  stroke: transparent;
}

.rotation-grab-dot {
  fill: #ffffff;
  pointer-events: none;
  stroke: currentColor;
  stroke-width: 1.8;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 2px 4px rgba(15, 23, 42, 0.24));
}

.rotation-grab-glyph {
  fill: none;
  pointer-events: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.15;
  vector-effect: non-scaling-stroke;
}

.canvas-scroll.is-zooming .rotation-grab-control,
.canvas-scroll.is-panning .rotation-grab-control,
.canvas-scroll.is-touch-zooming .rotation-grab-control,
.sheet.is-zooming .rotation-grab-control,
.sheet.is-touch-zooming .rotation-grab-control {
  opacity: 0;
  pointer-events: none;
}

html[data-theme="dark"] .rotation-grab-dot {
  fill: #0f172a;
}

.window-handle,
.door-handle,
.radiator-handle {
  cursor: ew-resize;
}

.lower-floor-room-underlay .wall-window,
.lower-floor-room-underlay .wall-door,
.lower-floor-room-underlay .roof-skylight,
.lower-floor-room-underlay .window-opening,
.lower-floor-room-underlay .window-frame,
.lower-floor-room-underlay .window-pane,
.lower-floor-room-underlay .window-jamb,
.lower-floor-room-underlay .door-opening,
.lower-floor-room-underlay .door-hit,
.lower-floor-room-underlay .door-leaf,
.lower-floor-room-underlay .door-swing,
.lower-floor-room-underlay .door-jamb,
.lower-floor-room-underlay .skylight-hit,
.lower-floor-room-underlay .skylight-opening,
.lower-floor-room-underlay .skylight-glass,
.lower-floor-room-underlay .skylight-pane,
.lower-floor-room-underlay .window-handle,
.lower-floor-room-underlay .door-handle,
.lower-floor-room-underlay .skylight-handle,
.lower-floor-room-underlay .radiator-handle,
.reference-opening {
  cursor: default;
  pointer-events: none;
}

.skylight-handle.width {
  cursor: ew-resize;
}

.skylight-handle.height {
  cursor: ns-resize;
}

.measurement-label {
  fill: #111827;
  font-size: calc(10px * var(--canvas-text-scale, 1));
  font-weight: 800;
  letter-spacing: 0;
  paint-order: stroke;
  pointer-events: none;
  stroke: rgba(255, 255, 255, 0.96);
  stroke-linejoin: round;
  stroke-width: calc(4px * var(--canvas-text-scale, 1));
}

.measurement-label.editable {
  cursor: text;
  pointer-events: all;
}

.room-wall-measurement {
  fill: #4b5563;
}

.window-measurement {
  fill: #b45309;
}

.door-measurement {
  fill: #4b5563;
}

.skylight-measurement {
  fill: #4b5563;
}

.skylight-measurement.editable {
  pointer-events: bounding-box;
}

.window-measurement.preview {
  fill: #4b5563;
}

.door-measurement.preview {
  fill: #4b5563;
}

.skylight-measurement.preview {
  fill: #6b7280;
}

.radiator-measurement {
  fill: #007aff;
  font-weight: 880;
}

.radiator-measurement.invalid {
  fill: #ef4444;
}

.measurement-editor-object {
  overflow: visible;
  pointer-events: all;
}

.measurement-editor {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  width: 124px;
  height: 34px;
  padding: 3px 8px 3px 4px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 9px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.055) 48%, rgba(255, 255, 255, 0.15)),
    rgba(255, 255, 255, 0.075);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -1px 0 rgba(255, 255, 255, 0.12),
    inset 0 0 18px rgba(255, 255, 255, 0.10),
    0 14px 30px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(38px) saturate(2.15);
  -webkit-backdrop-filter: blur(38px) saturate(2.15);
}

.measurement-editor::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.16) 31%, transparent 56%),
    radial-gradient(circle at 14% 0%, rgba(255, 255, 255, 0.42), transparent 42%);
  opacity: 0.78;
}

.measurement-editor input {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.09);
  color: #111827;
  font-size: 12px;
  font-weight: 800;
  outline: 0;
  padding: 0 4px 0 7px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px) saturate(1.45);
  -webkit-backdrop-filter: blur(10px) saturate(1.45);
}

.measurement-editor span {
  position: relative;
  z-index: 1;
  color: #334155;
  font-size: 10px;
  font-weight: 800;
}

html[data-theme="dark"] .measurement-editor {
  color-scheme: dark;
  border-color: rgba(239, 246, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(58, 61, 68, 0.48), rgba(15, 17, 22, 0.28) 48%, rgba(255, 255, 255, 0.08)),
    rgba(7, 9, 13, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 20px rgba(255, 255, 255, 0.045),
    0 16px 34px rgba(0, 0, 0, 0.48);
}

html[data-theme="dark"] .measurement-editor::before {
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.07) 31%, transparent 56%),
    radial-gradient(circle at 14% 0%, rgba(255, 255, 255, 0.16), transparent 42%);
  opacity: 0.74;
}

html[data-theme="dark"] .measurement-editor input {
  color-scheme: dark;
  border-color: rgba(239, 246, 255, 0.14);
  background:
    linear-gradient(145deg, rgba(37, 40, 48, 0.72), rgba(10, 12, 16, 0.48)),
    rgba(10, 12, 16, 0.32);
  color: #f8fafc;
  caret-color: var(--blue);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04),
    0 1px 0 rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .measurement-editor span {
  color: rgba(226, 232, 240, 0.72);
}

.room-wall.wall-casing.internal {
  stroke: #64748b;
}

.room-wall.wall-face.internal {
  stroke: #eef2f7;
}

.room-wall.wall-centre.internal {
  stroke: #475569;
}

.room-draft polyline {
  fill: none;
  stroke: #4b5563;
  stroke-width: 3;
  stroke-dasharray: 7 5;
}

.room-draft .room-completion-preview {
  fill: rgba(37, 99, 235, 0.14);
  stroke: #2563eb;
  stroke-width: 2;
  stroke-dasharray: 6 4;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

html[data-theme="dark"] .room-draft .room-completion-preview {
  fill: rgba(96, 165, 250, 0.2);
  stroke: #60a5fa;
}

.room-completion-hint {
  flex-basis: 100%;
  color: var(--muted, #64748b);
  font-size: 11px;
  line-height: 1.4;
}

.room-draft .room-overlap-repair-preview {
  fill: rgba(13, 148, 136, 0.12);
  stroke: #0d9488;
  stroke-width: 2;
  stroke-dasharray: 4 3;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.room-overlap-repair-hint {
  flex-basis: 100%;
  color: #0f766e;
  font-size: 11px;
  line-height: 1.4;
}

.room-overlap-repair-notice {
  position: absolute;
  top: 72px;
  left: 24px;
  z-index: 7;
  max-width: min(540px, calc(100% - 48px));
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid #99cfc7;
  border-radius: 10px;
  background: #f0fdfa;
  color: #115e59;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
  font-size: 12px;
  line-height: 1.4;
}

html[data-theme="dark"] .room-draft .room-overlap-repair-preview {
  fill: rgba(45, 212, 191, 0.15);
  stroke: #5eead4;
}

html[data-theme="dark"] .room-overlap-repair-hint { color: #5eead4; }
html[data-theme="dark"] .room-overlap-repair-notice {
  background: #123530;
  color: #ccfbf1;
  border-color: #327c72;
}

.room-completion-hint.ready {
  color: var(--accent, #2563eb);
}

html[data-theme="dark"] .room-completion-hint.ready {
  color: #93c5fd;
}

.room-draft-panel .completion-ready {
  border-color: #60a5fa;
  background: rgba(37, 99, 235, 0.1);
}

.room-guide-line {
  fill: none;
  stroke: #6b7280;
  stroke-width: 2.5;
  stroke-dasharray: 10 6;
  pointer-events: none;
}

.room-guide-point {
  fill: white;
  stroke: #6b7280;
  stroke-width: 2.5;
}

.room-alignment-guides {
  pointer-events: none;
}

.room-drawing-alignment-guides {
  pointer-events: none;
}

.room-drawing-alignment-line {
  stroke: #0d9488;
  stroke-width: 1.5;
  stroke-dasharray: 6 4;
  vector-effect: non-scaling-stroke;
}

.room-drawing-right-angle {
  fill: none;
  stroke: #0d9488;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.room-draft .room-drawing-alignment-source {
  fill: #f0fdfa;
  stroke: #0d9488;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.room-drawing-alignment-badge rect {
  fill: #f0fdfa;
  stroke: #0f766e;
  stroke-width: 1;
}

.room-drawing-alignment-badge text {
  fill: #115e59;
  font-family: inherit;
  font-size: 11px;
  font-weight: 650;
}

html[data-theme="dark"] .room-drawing-alignment-badge rect {
  fill: #134e4a;
  stroke: #5eead4;
}

html[data-theme="dark"] .room-drawing-alignment-badge text {
  fill: #ccfbf1;
}

.room-alignment-axis {
  fill: none;
  stroke: rgba(37, 99, 235, 0.32);
  stroke-width: 1.15;
  stroke-dasharray: 8 7;
  vector-effect: non-scaling-stroke;
}

.room-corner-guides circle {
  fill: #fefce8;
  stroke: #ca8a04;
  stroke-width: 2;
  pointer-events: none;
}

.room-snap-target {
  fill: rgba(250, 204, 21, 0.22);
  stroke: #ca8a04;
  stroke-width: 2.5;
  pointer-events: none;
}

.vertex-drag-guide path {
  fill: none;
  stroke: #6b7280;
  stroke-width: 2.5;
  stroke-dasharray: 10 6;
  pointer-events: none;
}

.vertex-drag-guide circle {
  fill: white;
  stroke: #4b5563;
  stroke-width: 2.5;
  pointer-events: none;
}

.room-draft circle {
  fill: white;
  stroke: #4b5563;
  stroke-width: 2.5;
}

.room-draft .room-snap-target,
.vertex-drag-guide .room-snap-target {
  fill: rgba(250, 204, 21, 0.22);
  stroke: #ca8a04;
  stroke-width: 2.5;
}

.room-vertex {
  fill: white;
  stroke: #4b5563;
  stroke-width: 2.5;
  cursor: move;
  pointer-events: all;
}

.room-vertex:hover {
  fill: #f1f3f5;
  stroke-width: 3.5;
}

.drawing-origin path {
  stroke: #4b5563;
  stroke-width: 2.5;
}

.drawing-origin circle {
  fill: #4b5563;
  stroke: white;
  stroke-width: 2;
}

.drawing-origin text {
  fill: #4b5563;
  font-size: 11px;
  font-weight: 800;
}

.north,
.scale-text {
  fill: #172033;
  font-size: 13px;
  font-weight: 800;
}

.north-arrow {
  fill: rgba(15, 23, 42, 0.1);
  stroke: #172033;
  stroke-width: 1.5;
}

.calibration-popover {
  position: absolute;
  z-index: 5;
  top: 12px;
  left: 24px;
  width: min(920px, calc(100% - 48px));
  display: none;
  padding: 13px 14px 12px;
  background: var(--glass-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.calibration-popover.active {
  display: block;
}

.floor-plan-popover {
  position: absolute;
  z-index: 7;
  top: 12px;
  left: 24px;
  width: min(1180px, calc(100% - 48px));
  height: calc(100% - 42px);
  max-height: calc(100% - 42px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  padding: 13px 14px 12px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.floor-plan-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.floor-plan-head div {
  display: grid;
  gap: 3px;
}

.floor-plan-head strong {
  font-size: 13px;
  font-weight: 820;
}

.floor-plan-head span,
.plan-note {
  color: var(--muted);
  font-size: 11px;
  font-weight: 620;
}

.floor-plan-head button {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #647184;
  font-size: 18px;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.floor-plan-head button:hover {
  border-color: var(--control-hover-border);
  background: var(--control-hover-bg);
  color: #374151;
  box-shadow: var(--control-hover-shadow);
  transform: translateY(-1px);
}

html[data-theme="dark"] .floor-plan-head button {
  color: var(--muted);
}

html[data-theme="dark"] .floor-plan-head button:hover {
  color: var(--text);
}

.settings-backdrop {
  position: fixed;
  z-index: 12;
  inset: 0;
  pointer-events: none;
}

/* Compact design chrome uses layers 30–40. Keep these modals' entire
   hit-testing surfaces above that chrome, including their close buttons, without
   changing the export panel or the existing small-screen modal layer. */
.studio-shell > :is(.settings-backdrop, .history-backdrop) {
  z-index: 50;
}

.brand-menu-backdrop {
  position: fixed;
  z-index: 15;
  inset: 0;
  pointer-events: none;
}

.project-settings-popover {
  position: absolute;
  top: 72px;
  right: 18px;
  width: min(860px, calc(100vw - 36px));
  max-height: calc(100vh - 104px);
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--glass-strong);
  box-shadow: var(--shadow);
  pointer-events: auto;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.brand-menu-popover {
  position: absolute;
  inset: 64px 14px 14px;
  overflow: auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--glass-strong);
  box-shadow: var(--shadow);
  pointer-events: auto;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.history-backdrop {
  position: fixed;
  z-index: 13;
  inset: 0;
  pointer-events: none;
}

.team-activity-backdrop {
  position: fixed;
  z-index: 160;
  inset: 0;
  padding: 18px;
  background: rgba(15, 23, 42, 0.16);
  pointer-events: auto;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.workspace-more-backdrop {
  position: fixed;
  z-index: 14;
  inset: 0;
  pointer-events: none;
}

.share-backdrop {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  pointer-events: auto;
  background:
    radial-gradient(circle at 18% 8%, rgba(22, 119, 255, 0.16), transparent 34%),
    rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(8px) saturate(1.08);
  -webkit-backdrop-filter: blur(8px) saturate(1.08);
}

.methodology-backdrop {
  position: fixed;
  z-index: 13;
  inset: 0;
  pointer-events: none;
}

.export-backdrop {
  position: fixed;
  z-index: 11000;
  inset: 0;
  isolation: isolate;
  pointer-events: auto;
}

/* Ask Axio and product preview helpers are mounted outside the workspace
   shell. Suppress those detached surfaces while Export owns the modal layer,
   otherwise their independent stacking contexts can cover the dialog. */
html.workspace-export-open #workspaceAssistantRoot,
html.workspace-export-open .tool-preview-popover,
html.workspace-export-open .product-category-label-tooltip {
  visibility: hidden;
  pointer-events: none;
}

.history-popover {
  position: absolute;
  top: auto;
  bottom: 66px;
  left: clamp(18px, calc(50vw - 330px), calc(100vw - 448px));
  right: auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(430px, calc(100vw - 36px));
  max-height: calc(100dvh - 104px);
  overflow: hidden;
  overscroll-behavior: contain;
  padding: 14px;
  box-sizing: border-box;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--glass-strong);
  box-shadow: var(--shadow);
  pointer-events: auto;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.team-activity-popover {
  position: absolute;
  top: 78px;
  right: 18px;
  width: min(760px, calc(100vw - 36px));
  max-height: calc(100dvh - 104px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--line) 82%, var(--blue) 18%);
  border-radius: 22px;
  background: color-mix(in srgb, var(--surface-solid) 96%, transparent);
  box-shadow: 0 28px 72px rgba(15, 23, 42, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.86);
  pointer-events: auto;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.workspace-more-popover {
  position: absolute;
  top: 62px;
  right: 106px;
  width: min(290px, calc(100vw - 36px));
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--glass-strong);
  box-shadow: var(--shadow);
  pointer-events: auto;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.share-popover {
  position: relative;
  width: min(980px, calc(100vw - 48px));
  max-height: min(850px, calc(100dvh - 48px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--blue) 26%, var(--glass-border));
  border-radius: 28px;
  background: color-mix(in srgb, var(--surface-solid) 97%, transparent);
  box-shadow: 0 36px 110px rgba(15, 23, 42, 0.34), 0 1px 0 rgba(255, 255, 255, 0.86) inset;
  pointer-events: auto;
  backdrop-filter: blur(28px) saturate(1.12);
  -webkit-backdrop-filter: blur(28px) saturate(1.12);
}

.share-popover-head {
  position: relative;
  min-height: 150px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: start;
  gap: 18px 24px;
  padding: 24px 26px 20px;
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 88% 15%, rgba(255, 255, 255, 0.23), transparent 26%),
    linear-gradient(122deg, #0d57ca 0%, #087ff3 58%, #36aafc 100%);
}

.share-popover-head::before,
.share-popover-head::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}

.share-popover-head::before {
  width: 280px;
  height: 280px;
  right: -110px;
  top: -170px;
  box-shadow: 0 0 0 34px rgba(255, 255, 255, 0.035), 0 0 0 68px rgba(255, 255, 255, 0.025);
}

.share-popover-head::after {
  width: 150px;
  height: 150px;
  left: 39%;
  bottom: -128px;
}

.share-hero-brand {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.share-hero-brand > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.share-hero-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 17px;
  color: white;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 16px 28px rgba(3, 48, 122, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.share-hero-icon svg {
  width: 26px;
  height: 26px;
  stroke-width: 2.1;
}

.share-hero-brand > div > span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.share-hero-brand strong {
  overflow: hidden;
  color: white;
  font-size: 23px;
  font-weight: 950;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-hero-brand small {
  color: rgba(255, 255, 255, 0.76);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.35;
}

.share-popover-head-actions {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 9px;
}

.share-live-status {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(5, 40, 94, 0.18);
  font-size: 10px;
  font-weight: 900;
}

.share-live-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.62);
}

.share-live-status.active i {
  background: #4ade80;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.18);
}

.share-popover-head-actions > button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  color: white;
  background: rgba(5, 40, 94, 0.18);
}

.share-popover-head-actions > button svg {
  width: 18px;
  height: 18px;
}

.share-popover-head-actions > button:hover,
.share-popover-head-actions > button:focus-visible {
  border-color: rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.18);
}

.share-hero-stats {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, max-content));
  gap: 9px;
}

.share-hero-stats > div {
  min-height: 42px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1px 8px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
}

.share-hero-stats strong {
  grid-row: 1 / 3;
  color: white;
  font-size: 16px;
  font-weight: 950;
}

.share-hero-stats span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 9px;
  font-weight: 830;
  line-height: 1.15;
}

.share-tabs {
  min-height: 62px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, var(--blue-soft));
}

.share-tabs button {
  min-width: 0;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: var(--muted);
  background: transparent;
  text-align: left;
}

.share-tabs button svg {
  width: 18px;
  height: 18px;
}

.share-tabs button span {
  overflow: hidden;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-tabs button em {
  min-width: 23px;
  display: inline-grid;
  place-items: center;
  padding: 3px 6px;
  border-radius: 999px;
  color: var(--muted);
  background: color-mix(in srgb, var(--control-bg) 88%, transparent);
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
}

.share-tabs button:hover,
.share-tabs button:focus-visible {
  border-color: var(--control-hover-border);
  color: var(--blue);
  background: var(--control-hover-bg);
}

.share-tabs button.active {
  border-color: color-mix(in srgb, var(--blue) 28%, var(--line));
  color: var(--blue);
  background: color-mix(in srgb, var(--blue-soft) 82%, var(--surface));
  box-shadow: 0 8px 20px rgba(22, 119, 255, 0.08);
}

.share-tabs button.active em {
  color: white;
  background: var(--blue);
}

.share-popover-body {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 20px 22px 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 116, 139, 0.42) transparent;
}

.share-settings-pane {
  display: grid;
  gap: 17px;
}

.share-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.share-section-heading > div {
  display: grid;
  gap: 3px;
}

.share-section-heading > div > span {
  color: var(--blue);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.share-section-heading h3 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 950;
  line-height: 1.15;
}

.share-section-heading p,
.share-section-heading > small {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.4;
}

.share-section-heading.compact {
  align-items: end;
  padding-top: 3px;
}

.share-link-switch {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 3px 9px;
  color: var(--text);
  cursor: pointer;
}

.share-link-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.share-link-switch > span {
  grid-row: 1 / 3;
  width: 42px;
  height: 24px;
  position: relative;
  border: 1px solid var(--control-border);
  border-radius: 999px;
  background: var(--control-bg);
  transition: 160ms ease;
}

.share-link-switch > span::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.18);
  transition: 160ms ease;
}

.share-link-switch input:checked + span {
  border-color: var(--blue);
  background: var(--blue);
}

.share-link-switch input:checked + span::after {
  left: 20px;
  background: white;
}

.share-link-switch strong {
  font-size: 11px;
  font-weight: 900;
}

.share-choice-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.share-choice-group {
  min-width: 0;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.share-choice-group legend {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.share-choice-card {
  min-width: 0;
  min-height: 68px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid var(--control-border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  cursor: pointer;
  transition: 150ms ease;
}

.share-choice-card:hover {
  border-color: var(--blue-border);
  transform: translateY(-1px);
}

.share-choice-card.selected {
  border-color: color-mix(in srgb, var(--blue) 54%, var(--line));
  background: color-mix(in srgb, var(--blue-soft) 72%, var(--surface));
  box-shadow: 0 10px 22px rgba(22, 119, 255, 0.09);
}

.share-choice-card.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.share-choice-card input,
.share-scope-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.share-choice-icon,
.share-scope-icon,
.share-add-person-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--blue);
  background: color-mix(in srgb, var(--blue-soft) 82%, var(--surface));
}

.share-choice-icon svg,
.share-scope-icon svg,
.share-add-person-icon svg {
  width: 18px;
  height: 18px;
}

.share-choice-card > span:nth-child(3),
.share-scope-card > span:nth-child(3) {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.share-choice-card strong,
.share-scope-card strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 920;
  line-height: 1.2;
}

.share-choice-card small,
.share-scope-card small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 730;
  line-height: 1.3;
}

.share-choice-card > i,
.share-scope-card > i {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 1px solid var(--control-border);
  border-radius: 50%;
  color: transparent;
  background: var(--surface);
}

.share-choice-card > i svg,
.share-scope-card > i svg {
  width: 11px;
  height: 11px;
  stroke-width: 3;
}

.share-choice-card.selected > i,
.share-scope-card.selected > i {
  border-color: var(--blue);
  color: white;
  background: var(--blue);
}

.share-security-note {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--green) 28%, var(--line));
  border-radius: 13px;
  color: color-mix(in srgb, var(--green) 76%, var(--text));
  background: color-mix(in srgb, var(--green-soft) 78%, var(--surface));
}

.share-security-note > svg {
  width: 20px;
  height: 20px;
  justify-self: center;
}

.share-security-note span {
  font-size: 10px;
  font-weight: 740;
  line-height: 1.4;
}

.share-security-note strong {
  font-weight: 920;
}

.share-scope-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.share-scope-card {
  min-width: 0;
  min-height: 84px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--control-border);
  border-radius: 13px;
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  cursor: pointer;
  transition: 150ms ease;
}

.share-scope-card:hover {
  border-color: var(--blue-border);
  transform: translateY(-1px);
}

.share-scope-card.selected {
  border-color: color-mix(in srgb, var(--blue) 36%, var(--line));
  background: color-mix(in srgb, var(--blue-soft) 58%, var(--surface));
}

.share-scope-card.sensitive .share-scope-icon {
  color: #b45309;
  background: color-mix(in srgb, #fef3c7 82%, var(--surface));
}

.share-add-person-card {
  display: grid;
  grid-template-columns: 48px minmax(220px, 1fr) minmax(150px, 0.6fr) auto;
  align-items: end;
  gap: 11px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--blue) 22%, var(--line));
  border-radius: 17px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--blue-soft) 62%, var(--surface)), var(--surface));
}

.share-add-person-card.external {
  grid-template-columns: 48px minmax(150px, 0.8fr) minmax(220px, 1.2fr) minmax(130px, 0.6fr) auto;
}

.share-add-person-card > label {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.share-add-person-card > label > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}

.share-add-person-card :is(input, select) {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--input-border);
  border-radius: 11px;
  color: var(--text);
  background: var(--input-bg);
  font-size: 11px;
  font-weight: 800;
  padding: 8px 9px;
}

.share-add-person-card > button {
  min-height: 38px;
  padding-inline: 14px;
  white-space: nowrap;
}

.share-people-list {
  display: grid;
  gap: 8px;
}

.share-person-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto 122px 34px;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid var(--control-border);
  border-radius: 14px;
  background: var(--surface);
}

.share-person-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.share-person-copy strong,
.share-person-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-person-copy strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
}

.share-person-copy span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 730;
}

.share-person-kind {
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 8px;
  font-weight: 930;
  text-transform: uppercase;
}

.share-person-kind.external {
  color: #8a4b0f;
  background: #fff4d6;
}

.share-person-row select {
  min-width: 0;
  min-height: 32px;
  border: 1px solid var(--input-border);
  border-radius: 9px;
  color: var(--text);
  background: var(--input-bg);
  font-size: 10px;
  font-weight: 800;
  padding: 6px 8px;
}

.share-person-remove {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
}

.share-person-remove:hover,
.share-person-remove:focus-visible {
  border-color: #fecaca;
  color: #dc2626;
  background: #fff1f2;
}

.share-person-remove svg {
  width: 15px;
  height: 15px;
}

.share-external-avatar {
  color: #9a5a14;
  background: #fff4d6;
}

.share-people-empty {
  min-height: 150px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  border: 1px dashed var(--control-border);
  border-radius: 17px;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface) 76%, transparent);
  text-align: center;
}

.share-people-empty svg {
  width: 25px;
  height: 25px;
  margin-bottom: 4px;
  color: var(--blue);
}

.share-people-empty strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.share-people-empty span {
  font-size: 10px;
  font-weight: 720;
}

.share-popover-footer {
  display: grid;
  grid-template-columns: minmax(210px, auto) minmax(220px, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, var(--blue-soft));
  box-shadow: 0 -12px 30px rgba(15, 23, 42, 0.035);
}

.share-footer-status {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.share-footer-status-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--blue);
  background: var(--blue-soft);
  font-weight: 950;
}

.share-footer-status-icon svg {
  width: 16px;
  height: 16px;
}

.share-footer-status-icon.saving {
  animation: shareStatusPulse 850ms ease-in-out infinite alternate;
}

@keyframes shareStatusPulse {
  to { transform: scale(0.92); opacity: 0.62; }
}

.share-footer-status > span:last-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.share-footer-status strong,
.share-footer-status small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-footer-status strong {
  color: var(--text);
  font-size: 10px;
  font-weight: 900;
}

.share-footer-status small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 730;
}

.share-footer-link {
  min-width: 0;
  min-height: 38px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 7px 8px 7px 11px;
  border: 1px dashed var(--control-border);
  border-radius: 11px;
  color: var(--muted);
  background: var(--input-bg);
}

.share-footer-link.ready {
  border-style: solid;
  border-color: color-mix(in srgb, var(--blue) 28%, var(--line));
  color: var(--text);
}

.share-footer-link > span,
.share-footer-link > input {
  min-width: 0;
  overflow: hidden;
  font-size: 9px;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-footer-link > input {
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: text;
}

.share-footer-link > input:focus {
  text-overflow: clip;
}

.share-footer-link > input::selection {
  color: var(--text);
  background: color-mix(in srgb, var(--blue) 24%, transparent);
}

.share-footer-link a {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--blue);
  background: var(--blue-soft);
}

.share-footer-link a svg {
  width: 14px;
  height: 14px;
}

.share-footer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.share-footer-actions .primary-btn,
.share-footer-actions .secondary-btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 11px;
  font-size: 10px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.share-footer-actions svg {
  width: 15px;
  height: 15px;
}

.workspace-more-menu-item {
  width: 100%;
  min-height: 52px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.workspace-more-menu-item svg {
  width: 18px;
  height: 18px;
  justify-self: center;
  color: var(--blue);
  stroke-width: 2.2;
}

.workspace-more-menu-item span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.workspace-more-menu-item strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
}

.workspace-more-menu-item small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
  line-height: 1.25;
}

.workspace-more-menu-item:hover {
  border-color: var(--control-hover-border);
  background: var(--control-hover-bg);
  box-shadow: var(--control-hover-shadow);
}

.methodology-popover {
  position: absolute;
  top: 72px;
  right: clamp(18px, calc(100vw - 778px), 156px);
  width: min(760px, calc(100vw - 36px));
  max-height: calc(100vh - 104px);
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--glass-strong);
  box-shadow: var(--shadow);
  pointer-events: auto;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.disclaimer-agreement-backdrop {
  position: fixed;
  z-index: 70;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  pointer-events: auto;
  background:
    radial-gradient(circle at 18% 7%, rgba(10, 124, 255, 0.2), transparent 34%),
    radial-gradient(circle at 88% 92%, rgba(79, 70, 229, 0.14), transparent 32%),
    rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(10px) saturate(1.08);
  -webkit-backdrop-filter: blur(10px) saturate(1.08);
}

.disclaimer-agreement-popover {
  position: relative;
  width: min(1060px, calc(100vw - 48px));
  max-height: min(880px, calc(100dvh - 48px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--blue) 28%, var(--glass-border));
  border-radius: 26px;
  background: color-mix(in srgb, var(--surface-solid) 97%, transparent);
  color: var(--text);
  box-shadow:
    0 36px 96px rgba(15, 23, 42, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  pointer-events: auto;
  backdrop-filter: blur(22px) saturate(1.08);
  -webkit-backdrop-filter: blur(22px) saturate(1.08);
}

.disclaimer-agreement-head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 20px;
  border-bottom: 1px solid color-mix(in srgb, var(--blue) 18%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--blue) 9%, var(--surface-solid)), var(--surface-solid) 58%),
    var(--surface-solid);
}

.disclaimer-agreement-brand {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 15px;
  min-width: 0;
}

.disclaimer-agreement-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--blue) 36%, transparent);
  border-radius: 17px;
  background: linear-gradient(145deg, #0a7cff, #4f46e5);
  color: #fff;
  box-shadow: 0 14px 28px rgba(10, 124, 255, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.disclaimer-agreement-mark svg {
  width: 27px;
  height: 27px;
  stroke-width: 1.9;
}

.disclaimer-agreement-eyebrow {
  display: block;
  margin-bottom: 3px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 920;
  letter-spacing: 0.13em;
  line-height: 1.2;
  text-transform: uppercase;
}

.disclaimer-agreement-head h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.disclaimer-agreement-head p {
  max-width: 720px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.disclaimer-agreement-close {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--button-glass);
  color: var(--text);
  box-shadow: var(--glass-edge), 0 8px 18px rgba(15, 23, 42, 0.08);
}

.disclaimer-agreement-close:hover,
.disclaimer-agreement-close:focus-visible {
  border-color: var(--blue-border);
  background: var(--control-hover-bg);
  color: var(--blue);
}

.disclaimer-agreement-close svg {
  width: 19px;
  height: 19px;
}

.disclaimer-agreement-scroll {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 22px 24px 26px;
  scrollbar-gutter: stable;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--blue) 3%, transparent), transparent 180px),
    color-mix(in srgb, var(--surface-solid) 94%, transparent);
}

.disclaimer-agreement-notice {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(250px, 0.6fr);
  align-items: center;
  gap: 22px;
  padding: 20px;
  border: 1px solid color-mix(in srgb, var(--blue) 30%, var(--line));
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0, rgba(255, 255, 255, 0.34), transparent 32%),
    linear-gradient(135deg, color-mix(in srgb, var(--blue) 12%, var(--surface-solid)), color-mix(in srgb, #4f46e5 7%, var(--surface-solid)));
  box-shadow: 0 16px 34px rgba(10, 124, 255, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.disclaimer-agreement-notice > div {
  display: grid;
  gap: 6px;
}

.disclaimer-agreement-notice > div > span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.disclaimer-agreement-notice strong {
  color: var(--text);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.28;
}

.disclaimer-agreement-notice p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.5;
}

.disclaimer-agreement-notice ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.disclaimer-agreement-notice li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid color-mix(in srgb, var(--blue) 18%, var(--line));
  border-radius: 11px;
  background: color-mix(in srgb, var(--surface-solid) 76%, transparent);
  color: var(--text);
  font-size: 11px;
  font-weight: 820;
}

.disclaimer-agreement-notice li svg {
  width: 20px;
  height: 20px;
  padding: 4px;
  border-radius: 50%;
  background: color-mix(in srgb, #22c55e 14%, transparent);
  color: #16a34a;
}

.disclaimer-agreement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.disclaimer-agreement-card {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-content: start;
  gap: 11px;
  min-width: 0;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--line) 84%, var(--blue) 16%);
  border-radius: 17px;
  background: color-mix(in srgb, var(--surface-solid) 90%, transparent);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.055), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.disclaimer-agreement-card-wide {
  grid-column: 1 / -1;
}

.disclaimer-agreement-card-critical,
.disclaimer-agreement-card-restrictions,
.disclaimer-agreement-card-enforcement {
  border-color: color-mix(in srgb, #f59e0b 28%, var(--line));
  background: linear-gradient(145deg, color-mix(in srgb, #f59e0b 6%, var(--surface-solid)), color-mix(in srgb, var(--surface-solid) 94%, transparent));
}

.disclaimer-agreement-card-liability {
  border-color: color-mix(in srgb, #22c55e 26%, var(--line));
  background: linear-gradient(145deg, color-mix(in srgb, #22c55e 5%, var(--surface-solid)), color-mix(in srgb, var(--surface-solid) 94%, transparent));
}

.disclaimer-agreement-card-number {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--blue) 22%, var(--line));
  border-radius: 11px;
  background: color-mix(in srgb, var(--blue) 8%, var(--surface-solid));
  color: var(--blue);
  font-size: 10px;
  font-weight: 920;
  letter-spacing: 0.05em;
}

.disclaimer-agreement-card h3 {
  margin: 2px 0 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.disclaimer-agreement-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 620;
  line-height: 1.55;
}

.disclaimer-agreement-card p + p {
  margin-top: 8px;
}

.disclaimer-agreement-card p strong {
  color: var(--text);
  font-weight: 840;
}

.disclaimer-agreement-card ul {
  display: grid;
  gap: 6px;
  margin: 9px 0 0;
  padding: 0;
  list-style: none;
}

.disclaimer-agreement-card li {
  position: relative;
  padding-left: 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 620;
  line-height: 1.48;
}

.disclaimer-agreement-card li::before {
  content: "";
  position: absolute;
  top: 0.68em;
  left: 1px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #f59e0b;
  transform: translateY(-50%);
}

.disclaimer-agreement-footer {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 15px 24px;
  border-top: 1px solid color-mix(in srgb, var(--blue) 16%, var(--line));
  background: color-mix(in srgb, var(--surface-solid) 97%, transparent);
  box-shadow: 0 -12px 28px rgba(15, 23, 42, 0.05);
}

.disclaimer-agreement-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 620;
  line-height: 1.45;
}

.disclaimer-agreement-footer p strong {
  color: var(--text);
  font-weight: 840;
}

.disclaimer-agreement-footer .primary-btn {
  min-width: 154px;
}

.workspace-more-menu-item-legal svg {
  color: #4f46e5;
}

html[data-theme="dark"] .disclaimer-agreement-backdrop {
  background:
    radial-gradient(circle at 18% 7%, rgba(37, 99, 235, 0.22), transparent 34%),
    radial-gradient(circle at 88% 92%, rgba(79, 70, 229, 0.18), transparent 32%),
    rgba(2, 6, 23, 0.72);
}

html[data-theme="dark"] .disclaimer-agreement-popover,
html[data-theme="dark"] .disclaimer-agreement-head,
html[data-theme="dark"] .disclaimer-agreement-footer {
  border-color: rgba(96, 165, 250, 0.25);
  background-color: rgba(15, 23, 42, 0.96);
  box-shadow: 0 38px 100px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

html[data-theme="dark"] .disclaimer-agreement-scroll {
  background-color: rgba(15, 23, 42, 0.94);
}

html[data-theme="dark"] .disclaimer-agreement-notice,
html[data-theme="dark"] .disclaimer-agreement-card {
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.23), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .disclaimer-agreement-notice li {
  background: rgba(15, 23, 42, 0.66);
}

@media (max-width: 760px) {
  .disclaimer-agreement-backdrop {
    place-items: stretch;
    padding: 8px;
  }

  .disclaimer-agreement-popover {
    width: 100%;
    max-height: calc(100dvh - 16px);
    border-radius: 20px;
  }

  .disclaimer-agreement-head {
    padding: 17px;
  }

  .disclaimer-agreement-brand {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 11px;
  }

  .disclaimer-agreement-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .disclaimer-agreement-mark svg {
    width: 22px;
    height: 22px;
  }

  .disclaimer-agreement-head h2 {
    font-size: 20px;
  }

  .disclaimer-agreement-head p {
    display: none;
  }

  .disclaimer-agreement-scroll {
    padding: 14px;
  }

  .disclaimer-agreement-notice,
  .disclaimer-agreement-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .disclaimer-agreement-notice {
    gap: 14px;
    padding: 16px;
  }

  .disclaimer-agreement-card-wide {
    grid-column: auto;
  }

  .disclaimer-agreement-footer {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 12px 14px;
  }

  .disclaimer-agreement-footer .primary-btn {
    width: 100%;
  }
}

@media (max-width: 440px) {
  .disclaimer-agreement-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .disclaimer-agreement-card-number {
    width: 30px;
    height: 30px;
  }

  .disclaimer-agreement-footer p {
    display: none;
  }
}

.export-popover {
  position: absolute;
  inset: 64px 14px 14px;
  overflow: auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--glass-strong);
  box-shadow: var(--shadow);
  pointer-events: auto;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.product-library-backdrop {
  position: fixed;
  z-index: 50;
  inset: 0;
  pointer-events: none;
}

.studio-shell.product-library-open .plant-room-planner-sidebar {
  pointer-events: none;
  visibility: hidden;
}

.product-library-popover {
  position: absolute;
  inset: 64px 14px 14px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--glass-strong);
  box-shadow: var(--shadow);
  pointer-events: auto;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.mode-tab.product-library-tab {
  min-width: 154px;
}

.product-library-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.product-library-head div {
  display: grid;
  gap: 3px;
}

.product-library-head strong {
  color: #172033;
  font-size: 15px;
  font-weight: 860;
}

.product-library-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.product-library-head button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #647184;
  font-size: 20px;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.product-library-head button:hover {
  border-color: var(--control-hover-border);
  background: var(--control-hover-bg);
  color: #374151;
  box-shadow: var(--control-hover-shadow);
  transform: translateY(-1px);
}

.product-library-body {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(500px, 1fr) minmax(380px, 520px);
  gap: 14px;
  align-content: stretch;
  overflow: hidden;
  transition: grid-template-columns 0.22s ease;
}

.product-library-body.sidebar-collapsed {
  grid-template-columns: 66px minmax(560px, 1fr) minmax(400px, 540px);
}

.product-library-rail,
.product-library-main,
.product-detail-panel {
  min-width: 0;
  min-height: 0;
  height: 100%;
  align-self: stretch;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: var(--radius);
  background: var(--tile-glass);
  box-shadow: var(--glass-edge), 0 16px 30px rgba(0, 0, 0, 0.07);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.product-library-rail,
.product-library-main {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
}

.product-library-body.sidebar-collapsed .product-library-rail {
  padding: 12px 7px;
}

.product-library-rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
  text-transform: uppercase;
}

.product-library-sidebar-toggle,
.dashboard-product-mail-sidebar-toggle {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--button-glass);
  color: var(--blue);
  box-shadow: var(--glass-edge);
}

.product-library-sidebar-toggle:hover,
.product-library-sidebar-toggle:focus-visible,
.dashboard-product-mail-sidebar-toggle:hover,
.dashboard-product-mail-sidebar-toggle:focus-visible {
  border-color: var(--blue-border);
  background: var(--blue-soft);
  outline: none;
}

.product-library-sidebar-toggle svg,
.dashboard-product-mail-sidebar-toggle svg {
  width: 16px;
  height: 16px;
}

.product-library-rail-head strong {
  color: var(--blue);
  font-size: 12px;
}

.product-category-list {
  display: grid;
  gap: 8px;
}

.product-category-card {
  width: 100%;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.36);
  color: #172033;
  text-align: left;
  box-shadow: var(--glass-edge);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.product-category-card i {
  min-width: 0;
  display: grid;
  place-items: center;
  color: var(--blue);
}

.product-category-card i svg {
  width: 20px;
  height: 20px;
}

.product-category-card span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.product-category-card strong {
  font-size: 12px;
  font-weight: 840;
}

.product-category-card small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.25;
}

.product-category-card em {
  min-width: 28px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid var(--blue-border);
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 10px;
  font-style: normal;
  font-weight: 860;
}

.product-category-card-summary {
  margin-bottom: 2px;
}

.product-library-sidebar-subcategories {
  display: grid;
  gap: 6px;
  margin: -2px 0 2px 14px;
  padding-left: 12px;
  border-left: 2px solid rgba(0, 122, 255, 0.28);
}

.product-category-card-compact {
  min-height: 36px;
  padding: 8px;
  grid-template-columns: 24px minmax(0, 1fr) auto;
}

.product-category-card-compact strong {
  font-size: 11px;
}

.product-library-body.sidebar-collapsed .product-library-rail-head > span,
.product-library-body.sidebar-collapsed .product-category-card span,
.product-library-body.sidebar-collapsed .product-category-card em,
.product-library-body.sidebar-collapsed .product-library-sidebar-subcategories {
  display: none;
}

.product-library-body.sidebar-collapsed .product-library-rail-head {
  justify-content: center;
}

.product-library-body.sidebar-collapsed .product-category-list {
  gap: 7px;
}

.product-library-body.sidebar-collapsed .product-category-card {
  grid-template-columns: 1fr;
  justify-items: center;
  min-height: 44px;
  padding: 8px;
}

.product-library-body.sidebar-collapsed .product-category-card i svg {
  width: 22px;
  height: 22px;
}

.product-category-card.active,
.product-category-card:hover {
  border-color: var(--control-hover-border);
  background: var(--control-hover-bg);
  box-shadow: var(--control-hover-shadow);
  transform: translateY(-1px);
}

.product-category-card.active {
  border-color: var(--blue-border);
  color: #0057b8;
}

.product-library-title-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 7px;
  background: var(--tile-glass-strong);
  box-shadow: var(--glass-edge);
}

.product-library-title-card div {
  display: grid;
  gap: 2px;
}

.product-library-title-card span,
.product-library-title-card em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 760;
  text-transform: uppercase;
}

.product-library-title-card strong {
  color: #172033;
  font-size: 18px;
  font-weight: 880;
}

.product-library-title-card small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.3;
}

.product-subcategory-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.product-subcategory-tabs button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  color: #334155;
  font-size: 11px;
  font-weight: 780;
  box-shadow: var(--glass-edge);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.product-subcategory-tabs button span {
  color: var(--muted);
  font-size: 10px;
}

.product-subcategory-tabs button.active,
.product-subcategory-tabs button:hover {
  border-color: var(--blue-border);
  background: var(--blue-glass);
  color: var(--blue);
  box-shadow: var(--glass-edge), 0 8px 18px rgba(0, 122, 255, 0.12);
  transform: translateY(-1px);
}

.product-subcategory-tabs-main {
  display: none;
}

.product-library-body.sidebar-collapsed .product-subcategory-tabs-main {
  display: flex;
}

.product-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.product-search,
.product-filter-grid label {
  display: grid;
  gap: 5px;
  color: #334155;
  font-size: 11px;
  font-weight: 760;
}

.product-search input,
.product-filter-grid input,
.product-filter-grid select {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--input-glass);
  color: #172033;
  font-size: 12px;
  font-weight: 700;
  padding: 0 9px;
  box-shadow: var(--glass-edge);
}

.product-clear-filters {
  height: 34px;
  white-space: nowrap;
}

.product-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  gap: 8px;
}

.product-results-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}

.product-results-head div {
  display: grid;
  gap: 2px;
}

.product-results-head span,
.product-results-head small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  text-transform: uppercase;
}

.product-results-head strong {
  color: #172033;
  font-size: 14px;
  font-weight: 860;
}

.product-result-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 10px;
}

.product-range-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 12px;
}

.product-model-groups {
  display: grid;
  gap: 14px;
}

.product-model-group {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.product-model-group-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.38);
  box-shadow: var(--glass-edge);
}

.product-model-group-head div {
  display: grid;
  gap: 2px;
}

.product-model-group-head span,
.product-model-group-head small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 780;
  text-transform: uppercase;
}

.product-model-group-head strong {
  color: #172033;
  font-size: 15px;
  font-weight: 880;
}

.product-model-group-head small {
  text-align: right;
  line-height: 1.35;
}

.product-result-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.36);
  color: #172033;
  text-align: left;
  box-shadow: var(--glass-edge), 0 10px 24px rgba(0, 0, 0, 0.045);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.product-result-card:hover,
.product-result-card.active {
  border-color: var(--blue-border);
  background: var(--control-hover-bg);
  box-shadow: var(--control-hover-shadow);
  transform: translateY(-1px);
}

.product-result-card.sponsored {
  border-color: rgba(0, 122, 255, 0.36);
}

.product-range-card {
  grid-template-columns: 124px minmax(0, 1fr);
  align-items: center;
  padding: 12px;
  text-align: left;
}

.product-range-card .product-card-copy strong {
  font-size: 15px;
}

.product-range-card .product-card-copy,
.product-range-card .product-card-kicker,
.product-range-card .product-card-summary,
.product-range-card .product-card-range {
  justify-content: start;
  justify-items: start;
  text-align: left;
}

.product-card-summary {
  color: #334155;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.35;
}

.product-card-suitability {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 3px 7px;
  border: 1px solid rgba(0, 122, 255, 0.24);
  border-radius: 999px;
  background: rgba(0, 122, 255, 0.08);
  color: #075fb8;
  font-size: 10px;
  font-weight: 880;
  line-height: 1.2;
}

.product-range-cta {
  width: fit-content;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: 4px;
  padding: 0 12px;
  border: 1px solid rgba(0, 122, 255, 0.48);
  border-radius: 7px;
  background: linear-gradient(145deg, rgba(0, 122, 255, 0.96), rgba(10, 132, 255, 0.84));
  color: white;
  font-size: 11px;
  font-weight: 840;
  line-height: 1;
  box-shadow: 0 10px 20px rgba(0, 122, 255, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.product-range-card .product-card-copy .product-range-cta {
  color: white;
}

.product-detail-select {
  width: 100%;
  min-height: 36px;
  margin-top: 0;
  cursor: pointer;
  font-size: 12px;
  letter-spacing: 0;
}

.product-detail-select:focus-visible {
  outline: 2px solid rgba(10, 132, 255, 0.4);
  outline-offset: 2px;
}

.product-range-card:hover .product-range-cta,
.product-range-card.active .product-range-cta,
.product-detail-select:hover {
  border-color: rgba(0, 122, 255, 0.72);
  background: linear-gradient(145deg, #0a84ff, #0066d6);
  box-shadow: 0 12px 24px rgba(0, 122, 255, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

.product-range-card .product-card-metrics i {
  min-height: 32px;
  font-size: 10px;
  place-items: center start;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-align: left;
}

.product-result-card .product-photo {
  grid-row: span 2;
}

.product-card-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.product-card-kicker {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.product-card-kicker em {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border: 1px solid var(--blue-border);
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 9px;
  font-style: normal;
  font-weight: 880;
  text-transform: uppercase;
}

.product-card-kicker small,
.product-card-description,
.product-card-copy > span:last-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  line-height: 1.3;
}

.product-card-range {
  display: block;
  color: #475569;
  font-size: 12px;
  font-weight: 820;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.product-compatible-with {
  min-width: 0;
  display: grid;
  gap: 4px;
  margin-top: 2px;
}

.product-compatible-with small {
  color: var(--blue);
  font-size: 11px;
  font-weight: 860;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

.product-compatible-with > span {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.product-compatible-with i {
  max-width: 100%;
  min-height: 18px;
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border: 1px solid rgba(0, 122, 255, 0.18);
  border-radius: 999px;
  background: rgba(0, 122, 255, 0.07);
  color: #1d4ed8;
  font-size: 11px;
  font-style: normal;
  font-weight: 780;
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-align: left;
}

.product-compatible-with-detail {
  gap: 8px;
}

.product-compatible-with-detail > .product-compatible-summary {
  gap: 6px;
}

.product-compatible-with-detail i {
  min-height: 24px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 820;
}

.product-compatible-card-grid {
  display: grid;
  gap: 8px;
}

.product-compatible-card-group {
  display: grid;
  gap: 7px;
}

.product-compatible-card-group h4 {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #172033;
  font-size: 10px;
  font-weight: 880;
  line-height: 1.2;
  text-transform: uppercase;
}

.product-compatible-card-group h4 small {
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  padding: 0 6px;
  border: 1px solid rgba(0, 122, 255, 0.20);
  border-radius: 999px;
  background: rgba(0, 122, 255, 0.08);
  color: var(--blue);
  font-size: 9px;
  font-weight: 860;
}

.product-compatible-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.36);
  color: #172033;
  text-align: left;
  box-shadow: var(--glass-edge), 0 8px 18px rgba(15, 23, 42, 0.04);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.product-compatible-card:hover {
  border-color: var(--blue-border);
  background: var(--control-hover-bg);
  box-shadow: var(--control-hover-shadow);
  transform: translateY(-1px);
}

.product-compatible-card .product-photo {
  min-height: 52px;
  padding: 5px;
  border-radius: 7px;
}

.product-compatible-card .product-photo-image > img:not(.product-brand-logo) {
  height: 36px;
}

.product-compatible-card .product-photo .product-brand-logo {
  max-width: 46px;
  height: 12px;
}

.product-compatible-card > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.product-compatible-card small,
.product-compatible-card em {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 760;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-compatible-card strong {
  min-width: 0;
  color: #172033;
  font-size: 12px;
  font-weight: 860;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.product-card-copy strong {
  overflow-wrap: anywhere;
  color: #172033;
  font-size: 13px;
  font-weight: 860;
}

.product-card-metrics {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 6px;
}

.product-range-card .product-card-metrics {
  grid-column: 1 / -1;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
}

.product-card-metrics i {
  min-width: 0;
  display: grid;
  place-items: center;
  min-height: 26px;
  padding: 3px 5px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 6px;
  background: var(--tile-glass);
  color: #334155;
  font-size: 10px;
  font-style: normal;
  font-weight: 820;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-align: center;
  box-shadow: var(--glass-edge);
}

.product-photo {
  position: relative;
  min-height: 74px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 8px;
  color: white;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26), 0 10px 22px rgba(15, 23, 42, 0.08);
}

.product-photo svg {
  width: 24px;
  height: 24px;
}

.product-photo .product-image-fallback {
  width: 100%;
  min-height: 52px;
  display: grid;
  place-items: center;
  color: #718096;
}

.product-photo .product-image-fallback[hidden] {
  display: none;
}

.product-photo .product-image-fallback svg {
  width: 30px;
  height: 30px;
}

.product-photo span {
  font-size: 9px;
  font-weight: 820;
  text-align: center;
}

.product-photo-image {
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.10), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01));
  color: #334155;
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.product-photo-image > img:not(.product-brand-logo) {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  height: 62px;
  object-fit: contain;
  border-radius: 6px;
  mix-blend-mode: normal;
  filter: saturate(1.06) contrast(1.03) drop-shadow(0 9px 14px rgba(15, 23, 42, 0.12));
}

.product-range-card .product-photo-image {
  min-height: 112px;
  padding: 12px;
  border-color: rgba(255, 255, 255, 0.54);
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.10), transparent 50%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(226, 232, 240, 0.02));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 10px 22px rgba(15, 23, 42, 0.04);
}

.product-range-card .product-photo-image > img:not(.product-brand-logo) {
  max-width: 100%;
  height: 80px;
}

.product-photo .product-brand-logo {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 14px;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(15, 23, 42, 0.10));
}

.product-photo-brand {
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  width: min(88px, 100%);
  min-width: 0;
  max-width: 100%;
  min-height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 7px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.90);
  box-shadow: 0 5px 12px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.92);
  color: #334155;
  pointer-events: none;
  backdrop-filter: blur(9px) saturate(140%);
  -webkit-backdrop-filter: blur(9px) saturate(140%);
}

.product-photo-brand > span {
  min-width: 0;
  overflow: hidden;
  color: #334155;
  font-size: 10px;
  font-weight: 860;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-detail-panel .product-photo-image > img:not(.product-brand-logo) {
  max-width: min(100%, 320px);
  height: clamp(170px, 20vh, 220px);
}

.product-detail-panel .product-image-fallback {
  min-height: clamp(170px, 20vh, 220px);
}

.product-detail-panel .product-image-fallback svg {
  width: 46px;
  height: 46px;
}

.product-detail-panel .product-photo .product-brand-logo {
  max-width: 118px;
  height: auto;
  max-height: 20px;
}

.product-detail-panel .product-photo-brand {
  width: min(150px, 100%);
  min-height: 28px;
  max-width: min(160px, 100%);
  padding: 4px 9px;
  border-radius: 9px;
}

.product-photo-blue {
  background: linear-gradient(145deg, #0ea5e9, #1d4ed8);
}

.product-photo-green {
  background: linear-gradient(145deg, #10b981, #047857);
}

.product-photo-warm {
  background: linear-gradient(145deg, #f97316, #b45309);
}

.product-photo-amber,
.product-photo-copper,
.product-photo-brass {
  background: linear-gradient(145deg, #d97706, #92400e);
}

.product-photo-neutral {
  background: linear-gradient(145deg, #64748b, #334155);
}

.product-detail-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 12px;
}

.product-detail-panel .product-photo {
  min-height: 250px;
  height: clamp(250px, 30vh, 320px);
  padding: 16px;
}

.product-detail-title {
  display: grid;
  gap: 4px;
}

.product-detail-title span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 860;
  text-transform: uppercase;
}

.product-detail-title strong {
  color: #172033;
  font-size: 18px;
  font-weight: 880;
  line-height: 1.12;
}

.product-detail-title small,
.product-detail-panel p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
}

.product-detail-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.product-detail-facts div {
  min-width: 0;
  display: grid;
  justify-items: start;
  gap: 2px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: var(--glass-edge);
  text-align: left;
}

.product-detail-facts dt {
  width: 100%;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-align: left;
  text-transform: uppercase;
}

.product-detail-facts dd {
  width: 100%;
  min-width: 0;
  margin: 0;
  color: #172033;
  font-size: 12px;
  font-weight: 850;
  overflow-wrap: anywhere;
  text-align: left;
}

.product-detail-panel section {
  display: grid;
  gap: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.product-compatibility-section {
  gap: 8px;
}

.product-compatibility-list {
  display: grid;
  gap: 10px;
  max-height: 320px;
  overflow: auto;
  padding-right: 4px;
}

.product-compatibility-group {
  display: grid;
  gap: 6px;
}

.product-compatibility-group h4 {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
  font-weight: 860;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.product-compatibility-group h4 span {
  padding: 2px 7px;
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.08);
  color: var(--blue);
  font-size: 10px;
}

.product-compatibility-row {
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 1px solid rgba(203, 213, 225, 0.62);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.38);
  box-shadow: var(--glass-edge);
}

.product-compatibility-row strong {
  color: #172033;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
}

.product-compatibility-row span,
.product-compatibility-row small,
.product-compatibility-row em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 650;
  line-height: 1.35;
}

.product-compatibility-row small {
  color: #334155;
}

.product-document-section {
  display: grid;
  gap: 10px;
}

.product-document-featured,
.product-document-grid,
.product-document-group {
  display: grid;
  gap: 8px;
}

.product-document-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.product-document-group h4 {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 860;
  text-transform: uppercase;
}

.product-document-link {
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(203, 213, 225, 0.66);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
  color: #172033;
  text-decoration: none;
  box-shadow: var(--glass-edge);
}

.product-document-link:hover {
  border-color: rgba(0, 102, 255, 0.42);
  background: rgba(0, 102, 255, 0.08);
}

.product-document-link svg {
  width: 20px;
  height: 20px;
  color: var(--blue);
}

.product-document-link span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.product-document-link strong,
.product-document-link small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-document-link strong {
  color: inherit;
  font-size: 11px;
  font-weight: 850;
}

.product-document-link small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.product-document-link.featured {
  border-color: rgba(0, 102, 255, 0.38);
  background: linear-gradient(145deg, rgba(0, 102, 255, 0.12), rgba(255, 255, 255, 0.52));
}

.product-document-source {
  margin: 0;
}

.product-document-source a {
  color: var(--blue);
  font-weight: 820;
}

.radiator-model-finder {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(203, 213, 225, 0.64);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.34);
  box-shadow: var(--glass-edge);
}

.radiator-model-finder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.radiator-model-finder-head span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 820;
  text-transform: uppercase;
}

.radiator-model-search {
  display: grid;
  gap: 5px;
}

.radiator-model-search span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
}

.radiator-model-search input {
  width: 100%;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--input-glass);
  color: #172033;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: var(--glass-edge);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.radiator-model-results {
  max-height: 230px;
  display: grid;
  gap: 6px;
  overflow: auto;
  scrollbar-width: none;
}

.radiator-model-results::-webkit-scrollbar {
  display: none;
}

.radiator-model-results button {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(203, 213, 225, 0.74);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
  color: #172033;
  text-align: left;
  box-shadow: var(--glass-edge);
}

.radiator-model-results button:hover,
.radiator-model-results button.active {
  border-color: var(--blue-border);
  background: var(--control-hover-bg);
  color: var(--blue);
}

.radiator-model-results strong {
  font-size: 11px;
  font-weight: 860;
}

.radiator-model-results span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
  text-align: right;
}

.radiator-model-info {
  padding: 10px;
  border: 1px solid rgba(203, 213, 225, 0.64);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.28);
  box-shadow: var(--glass-edge);
}

.heat-pump-performance-panel {
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(203, 213, 225, 0.64);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(14, 165, 233, 0.10), rgba(255, 255, 255, 0.24)),
    rgba(255, 255, 255, 0.30);
  box-shadow: var(--glass-edge);
}

.dashboard-product-model-detail-body > .heat-pump-performance-panel {
  grid-column: 1 / -1;
}

.heat-pump-performance-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.heat-pump-performance-head div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.heat-pump-performance-head p {
  margin: 0;
}

.heat-pump-performance-head > span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--blue-border);
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.heat-pump-performance-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.heat-pump-performance-controls label,
.heat-pump-performance-setpoint {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px 8px;
  padding: 8px;
  border: 1px solid rgba(203, 213, 225, 0.70);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: var(--glass-edge);
}

.heat-pump-performance-controls label span,
.heat-pump-performance-setpoint span {
  min-width: 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  line-height: 1.15;
  text-transform: uppercase;
}

.heat-pump-performance-controls label strong,
.heat-pump-performance-setpoint strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 950;
}

.heat-pump-performance-controls input[type="range"] {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  accent-color: var(--blue);
}

.heat-pump-flow-setpoint-control {
  grid-template-columns: minmax(0, 1fr) minmax(74px, 92px);
}

.heat-pump-flow-setpoint-control > strong {
  display: none;
}

.heat-pump-flow-setpoint-input {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  min-width: 0;
  height: 30px;
  padding: 0 7px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--input-glass);
  color: var(--text);
  text-transform: none;
  box-shadow: var(--glass-edge);
}

.heat-pump-flow-setpoint-input input {
  width: 45px;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 950;
  text-align: right;
}

.heat-pump-flow-setpoint-input small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.heat-pump-compare-select {
  grid-column: 1 / -1;
}

.heat-pump-compare-select select {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--input-glass);
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
  padding: 0 8px;
  box-shadow: var(--glass-edge);
}

.heat-pump-performance-chart {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.heat-pump-chart-bg {
  fill: rgba(255, 255, 255, 0.54);
  stroke: rgba(148, 163, 184, 0.35);
}

.heat-pump-chart-grid {
  stroke: rgba(100, 116, 139, 0.20);
  stroke-width: 1;
}

.heat-pump-chart-grid.is-vertical {
  stroke-dasharray: 3 5;
}

.heat-pump-chart-label,
.heat-pump-chart-axis {
  fill: var(--muted);
  font-size: 9px;
  font-weight: 850;
}

.heat-pump-chart-axis {
  font-size: 10px;
}

.heat-pump-chart-empty {
  fill: #b45309;
  font-size: 11px;
  font-weight: 950;
}

.heat-pump-chart-marker-line {
  stroke: rgba(15, 23, 42, 0.36);
  stroke-width: 1.2;
  stroke-dasharray: 4 4;
}

.heat-pump-chart-line {
  fill: none;
  stroke: var(--series-colour, var(--blue));
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.heat-pump-chart-marker {
  fill: var(--series-colour, var(--blue));
  stroke: white;
  stroke-width: 2;
}

.heat-pump-chart-hover-point {
  outline: none;
}

.heat-pump-chart-hover-target {
  fill: transparent;
  stroke: transparent;
  pointer-events: all;
  cursor: crosshair;
}

.heat-pump-chart-tooltip {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

.heat-pump-chart-tooltip rect {
  fill: rgba(15, 23, 42, 0.94);
  stroke: var(--series-colour, var(--blue));
  stroke-width: 1.25;
}

.heat-pump-chart-tooltip text {
  fill: #ffffff;
  font-size: 9px;
  font-weight: 850;
}

.heat-pump-chart-tooltip text:first-of-type {
  fill: rgba(255, 255, 255, 0.72);
  font-size: 8px;
  text-transform: uppercase;
}

.heat-pump-chart-hover-point:hover .heat-pump-chart-hover-target,
.heat-pump-chart-hover-point:focus .heat-pump-chart-hover-target,
.heat-pump-chart-hover-point:focus-within .heat-pump-chart-hover-target {
  fill: var(--series-colour, var(--blue));
  fill-opacity: 0.16;
  stroke: var(--series-colour, var(--blue));
  stroke-width: 1.5;
}

.heat-pump-chart-hover-point:hover .heat-pump-chart-tooltip,
.heat-pump-chart-hover-point:focus .heat-pump-chart-tooltip,
.heat-pump-chart-hover-point:focus-within .heat-pump-chart-tooltip {
  opacity: 1;
}

.heat-pump-performance-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.heat-pump-performance-metrics span {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 1px solid rgba(203, 213, 225, 0.70);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: var(--glass-edge);
}

.heat-pump-performance-metrics small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.heat-pump-performance-metrics strong {
  min-width: 0;
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.heat-pump-performance-metrics em {
  color: var(--blue);
  font-size: 13px;
  font-style: normal;
  font-weight: 950;
}

.heat-pump-performance-metrics em.is-warning {
  color: #b45309;
  font-size: 11px;
  line-height: 1.15;
}

.heat-pump-performance-source {
  margin: 0;
  padding: 7px 8px;
  border-radius: 7px;
  background: rgba(148, 163, 184, 0.12);
  font-size: 10px;
  line-height: 1.35;
}

.product-detail-panel h3 {
  margin: 0;
  color: #172033;
  font-size: 12px;
  font-weight: 850;
}

.product-detail-empty,
.product-empty-state {
  min-height: 160px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.product-detail-empty svg,
.product-empty-state svg {
  width: 28px;
  height: 28px;
}

.product-detail-empty strong {
  color: #172033;
  font-size: 14px;
  font-weight: 860;
}

.project-settings-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.project-settings-head div {
  display: grid;
  gap: 3px;
}

.project-settings-head strong {
  color: #172033;
  font-size: 14px;
  font-weight: 840;
}

.project-settings-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.project-settings-head button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #647184;
  font-size: 18px;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.project-settings-head button:hover {
  border-color: var(--control-hover-border);
  background: var(--control-hover-bg);
  color: #374151;
  box-shadow: var(--control-hover-shadow);
  transform: translateY(-1px);
}

.history-popover-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.history-popover-head div {
  display: grid;
  gap: 3px;
}

.history-popover-head strong {
  color: #172033;
  font-size: 14px;
  font-weight: 840;
}

.history-popover-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.history-popover-head button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #647184;
  font-size: 18px;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.history-popover-head button:hover {
  border-color: var(--control-hover-border);
  background: var(--control-hover-bg);
  color: #374151;
  box-shadow: var(--control-hover-shadow);
  transform: translateY(-1px);
}

.export-popover-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.export-popover-head div {
  display: grid;
  gap: 3px;
}

.export-popover-head strong {
  color: #172033;
  font-size: 15px;
  font-weight: 860;
}

.export-popover-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.export-popover-head button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #647184;
  font-size: 20px;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.export-popover-head button:hover {
  border-color: var(--control-hover-border);
  background: var(--control-hover-bg);
  color: #374151;
  box-shadow: var(--control-hover-shadow);
  transform: translateY(-1px);
}

.export-popover-body {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  align-content: start;
  gap: 14px;
}

.brand-menu-body {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(270px, 360px) minmax(0, 1fr);
  align-content: start;
  gap: 14px;
}

.brand-menu-hero,
.export-hero {
  display: grid;
  gap: 14px;
  align-self: start;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: var(--radius);
  background: var(--tile-glass-strong);
  box-shadow: var(--glass-edge), 0 16px 32px rgba(0, 0, 0, 0.08);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.brand-menu-logo-lockup {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.brand-menu-logo {
  width: 50px;
  height: 50px;
}

.brand-menu-logo .brand-logo {
  width: 42px;
  height: 42px;
}

.brand-menu-logo .brand-logo-icon img {
  width: 42px;
  height: 42px;
}

.brand-menu-wordmark {
  display: inline-flex;
  width: 150px;
  height: 34px;
  overflow: visible;
}

.brand-menu-wordmark .brand-logo-wordmark {
  width: 150px;
  height: 34px;
}

.brand-menu-wordmark .brand-logo-wordmark img {
  width: 150px;
  height: 100%;
  object-fit: contain;
}

.brand-menu-logo-lockup > div:last-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.brand-menu-logo-lockup span,
.brand-menu-logo-lockup small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 740;
}

.brand-menu-logo-lockup strong {
  color: var(--text);
  font-size: 28px;
  line-height: 1;
  letter-spacing: 0;
}

.brand-menu-logo-lockup strong.brand-menu-wordmark {
  color: inherit;
  font-size: 0;
  line-height: 0;
}

.brand-menu-head-logo {
  display: inline-flex;
  width: 118px;
  height: 30px;
  overflow: visible;
}

.brand-menu-head-logo .brand-logo-wordmark {
  width: 118px;
  height: 30px;
}

.brand-menu-head-logo .brand-logo-wordmark img {
  width: 118px;
  height: 100%;
  object-fit: contain;
}

.brand-menu-hero dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.brand-menu-hero dl div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 4px;
  background: var(--tile-glass);
  box-shadow: var(--glass-edge);
}

.brand-menu-hero dt,
.brand-menu-hero dd {
  margin: 0;
  font-size: 11px;
  font-weight: 780;
}

.brand-menu-hero dt {
  color: var(--muted);
}

.brand-menu-hero dd {
  color: var(--text);
  text-align: right;
}

.brand-menu-hero .heat-loss-text {
  color: var(--heat-loss);
}

.brand-menu-hero .heat-gain-text {
  color: var(--heat-gain);
}

.brand-menu-content {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 12px;
}

.brand-menu-body-logout {
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
}

.brand-logout-screen {
  width: min(560px, 100%);
  display: grid;
  place-items: center;
}

.brand-logout-card {
  width: 100%;
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.50);
  border-radius: var(--radius);
  background: var(--tile-glass-strong);
  box-shadow: var(--glass-edge), 0 20px 42px rgba(0, 0, 0, 0.10);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.brand-logout-logo,
.auth-gate-logo {
  width: 180px;
  height: 44px;
  display: inline-flex;
  overflow: visible;
}

.brand-logout-logo .brand-logo-wordmark,
.auth-gate-logo .brand-logo-wordmark {
  width: 180px;
  height: 44px;
}

.brand-logout-logo .brand-logo-wordmark img,
.auth-gate-logo .brand-logo-wordmark img {
  width: 180px;
  height: 100%;
  object-fit: contain;
}

.brand-logout-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 22px;
  font-weight: 880;
}

.brand-logout-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.brand-logout-profile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.brand-logout-profile .user-profile-avatar {
  width: 72px;
  height: 72px;
}

.brand-logout-profile span,
.brand-logout-summary span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.brand-logout-profile strong,
.brand-logout-summary strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 16px;
  font-weight: 880;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-logout-profile small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-logout-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.brand-logout-summary > div {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 8px;
  background: var(--tile-glass);
  box-shadow: var(--glass-edge);
}

.brand-logout-actions,
.auth-gate-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.brand-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.brand-action-card span {
  display: grid;
  gap: 5px;
}

.brand-action-card i {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--blue-border);
  border-radius: 6px;
  background: var(--blue-glass);
  color: var(--blue);
  font-style: normal;
}

.export-hero > div {
  display: grid;
  gap: 4px;
}

.export-hero > div > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 740;
}

.export-hero > div > strong {
  color: var(--text);
  font-size: 22px;
  line-height: 1.1;
}

.export-hero dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.export-hero dl div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 4px;
  background: var(--tile-glass);
  box-shadow: var(--glass-edge);
}

.export-hero dt,
.export-hero dd {
  margin: 0;
  font-size: 11px;
  font-weight: 780;
}

.export-hero dt {
  color: var(--muted);
}

.export-hero dd {
  color: var(--text);
  text-align: right;
}

.export-revision-policy {
  min-width: 0;
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(176, 196, 224, 0.46);
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(10, 132, 255, 0.08), rgba(255, 255, 255, 0.42)),
    var(--tile-glass);
  box-shadow: var(--glass-edge);
}

.export-revision-policy > header {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.export-revision-policy > header span {
  color: var(--blue);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.export-revision-policy > header strong {
  max-width: 50%;
  padding: 3px 7px;
  border: 1px solid var(--blue-border);
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  overflow: hidden;
  font-size: 9px;
  font-weight: 880;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.export-revision-policy-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.export-revision-policy-grid > label {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.export-revision-policy-grid > label > span {
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 820;
  line-height: 1.1;
}

.export-revision-policy-grid select,
.export-revision-policy-grid input {
  width: 100%;
  min-width: 0;
  min-height: 31px;
  box-sizing: border-box;
  padding: 5px 8px;
  border: 1px solid var(--blue-border);
  border-radius: 7px;
  outline: 0;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  font: inherit;
  font-size: 10px;
  font-weight: 820;
}

.export-revision-policy-grid input {
  font-weight: 900;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}

.export-revision-policy-grid select:focus,
.export-revision-policy-grid input:focus {
  border-color: var(--blue);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.13);
}

.export-revision-policy > p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.3;
}

.export-hero-revision {
  align-items: center;
}

.export-hero-revision label {
  cursor: text;
}

.export-hero-revision input {
  width: 76px;
  min-height: 28px;
  box-sizing: border-box;
  padding: 4px 8px;
  border: 1px solid var(--blue-border);
  border-radius: 7px;
  outline: 0;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  color: var(--text);
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.export-hero-revision input:hover {
  border-color: rgba(10, 132, 255, 0.44);
}

.export-hero-revision input:focus {
  border-color: var(--blue);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.14);
}

html[data-theme="dark"] .export-hero-revision input {
  border-color: rgba(96, 165, 250, 0.36);
  background: rgba(15, 23, 42, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .export-hero-revision input:focus {
  border-color: var(--blue);
  background: rgba(15, 23, 42, 0.94);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.export-branding-toggle {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(176, 196, 224, 0.42);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 10px 24px rgba(31, 41, 55, 0.06);
  cursor: pointer;
}

.export-branding-toggle-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.export-branding-toggle-title {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.export-branding-toggle-copy strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 860;
}

.export-branding-premium-badge {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 2px 7px;
  border: 1px solid rgba(10, 124, 255, 0.24);
  border-radius: 999px;
  color: #075fca;
  background: rgba(10, 124, 255, 0.1);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.export-branding-toggle-copy small {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.25;
}

.export-branding-toggle-switch {
  position: relative;
  width: 44px;
  height: 26px;
  flex: 0 0 auto;
}

.export-branding-toggle-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.export-branding-toggle-switch span {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.22);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
  transition: background 0.16s ease, border-color 0.16s ease;
}

.export-branding-toggle-switch span::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.2);
  transition: transform 0.16s ease;
}

.export-branding-toggle-switch input:checked + span {
  border-color: rgba(10, 124, 255, 0.58);
  background: linear-gradient(135deg, #0b63ff, #0a8cff);
}

.export-branding-toggle-switch input:checked + span::after {
  transform: translateX(18px);
}

html[data-theme="dark"] .export-branding-toggle {
  border-color: rgba(239, 246, 255, 0.14);
  background: linear-gradient(145deg, rgba(42, 48, 60, 0.34), rgba(16, 19, 25, 0.16));
}

html[data-theme="dark"] .export-branding-premium-badge {
  border-color: rgba(96, 165, 250, 0.38);
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.2);
}

.export-branding-toggle-summary {
  padding: 8px;
  border-color: rgba(255, 255, 255, 0.34);
  border-radius: 4px;
  background: var(--tile-glass);
  box-shadow: var(--glass-edge);
}

.export-branding-toggle-summary .export-branding-toggle-copy {
  gap: 1px;
}

.export-branding-toggle-summary .export-branding-toggle-copy strong {
  font-size: 11px;
  font-weight: 820;
  line-height: 1.15;
}

.export-branding-toggle-summary .export-branding-premium-badge {
  min-height: 16px;
  padding: 2px 6px;
  font-size: 8px;
}

.export-branding-toggle-summary .export-branding-toggle-copy small {
  font-size: 9.5px;
  line-height: 1.2;
}

.export-section {
  margin-top: 0;
}

.export-section-wide {
  grid-column: 1 / -1;
}

.export-report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 84px;
  align-items: stretch;
  gap: 10px;
}

.export-section-wide .export-report-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.export-empty-note {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: var(--radius);
  background: var(--tile-glass);
  color: var(--muted);
  box-shadow: var(--glass-edge), 0 10px 22px rgba(0, 0, 0, 0.055);
  font-size: 12px;
  font-weight: 760;
}

.export-report-card {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: var(--radius);
  background: var(--tile-glass);
  color: var(--text);
  box-shadow: var(--glass-edge), 0 10px 22px rgba(0, 0, 0, 0.055);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.export-report-card.has-inline-revision {
  grid-template-columns: minmax(0, 1fr) minmax(86px, 96px);
}

.export-report-card:not(.export-info-card):hover {
  border-color: var(--control-hover-border);
  background: var(--control-hover-bg);
  box-shadow: var(--control-hover-shadow);
  transform: translateY(-1px);
}

.export-report-card-action {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto minmax(0, 1fr);
  align-items: start;
  gap: 3px 7px;
  padding: 7px 10px;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.export-report-card-action:focus-visible {
  box-shadow: inset 0 0 0 3px rgba(10, 132, 255, 0.24);
}

.export-report-card-action:disabled {
  cursor: default;
}

.export-report-card.export-busy {
  opacity: 0.58;
}

.export-report-card.is-loading {
  opacity: 1;
  border-color: var(--blue-border);
  background: linear-gradient(145deg, rgba(0, 122, 255, 0.14), rgba(255, 255, 255, 0.50));
  box-shadow: var(--glass-edge), 0 14px 30px rgba(0, 122, 255, 0.13);
}

.export-generation-overlay {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 11020;
  width: min(360px, calc(100vw - 28px));
  pointer-events: none;
}

.export-generation-card {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px 12px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(244, 249, 255, 0.74));
  box-shadow: var(--glass-edge), 0 24px 54px rgba(15, 23, 42, 0.16);
  text-align: left;
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.export-generation-spinner {
  grid-row: 1 / span 3;
  width: 32px;
  height: 32px;
  border: 3px solid rgba(0, 122, 255, 0.16);
  border-top-color: var(--blue);
  border-radius: 999px;
  animation: export-generation-spin 0.82s linear infinite;
}

.export-generation-card span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.export-generation-card strong {
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 880;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.export-generation-progress {
  grid-column: 1 / -1;
  width: 100%;
  height: 8px;
  overflow: hidden;
  border: 1px solid rgba(0, 122, 255, 0.18);
  border-radius: 999px;
  background: rgba(0, 122, 255, 0.10);
}

.export-generation-progress i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0a84ff, #6d5dfc);
  transition: width 0.18s ease;
}

.export-generation-card b {
  min-width: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
}

.export-generation-card small {
  min-width: 0;
  max-width: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  line-height: 1.35;
}

.export-generation-card em {
  justify-self: end;
  color: var(--blue);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.3;
}

.export-generation-card b,
.export-generation-card small,
.export-generation-card em {
  grid-column: 2;
}

.export-generation-card .export-generation-progress + b {
  grid-column: 1 / -1;
}

.export-generation-card .export-generation-progress + b + small {
  grid-column: 1 / -1;
}

.export-generation-card .export-generation-progress + b + small + em {
  grid-column: 1 / -1;
  justify-self: start;
  color: var(--blue);
}

@keyframes export-generation-spin {
  to {
    transform: rotate(360deg);
  }
}

.export-report-card-copy {
  display: contents;
}

.export-report-card-copy strong {
  min-width: 0;
  overflow: hidden;
  display: -webkit-box;
  grid-column: 1;
  grid-row: 1;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  font-size: 13px;
  font-weight: 860;
  line-height: 1.16;
}

.export-report-card-copy small {
  min-width: 0;
  overflow: hidden;
  display: -webkit-box;
  grid-column: 1 / -1;
  grid-row: 2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.3;
}

.export-report-card-meta {
  max-width: 108px;
  grid-column: 2;
  grid-row: 1;
  padding: 3px 6px;
  border: 1px solid var(--blue-border);
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  overflow: hidden;
  font-size: 10px;
  font-style: normal;
  font-weight: 840;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.export-info-card {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto minmax(0, 1fr);
  align-items: start;
  gap: 3px 7px;
  padding: 7px 10px;
  cursor: default;
}

.export-report-card-revision {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 7px;
  border-left: 1px solid var(--line);
  background: rgba(234, 243, 255, 0.42);
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 860;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.export-report-card-revision input {
  width: 100%;
  min-width: 0;
  min-height: 28px;
  box-sizing: border-box;
  padding: 5px 7px;
  border: 1px solid var(--blue-border);
  border-radius: 8px;
  outline: 0;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}

.export-report-card-revision input:focus {
  border-color: var(--blue);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.13);
}

.export-report-card-revision input:disabled {
  opacity: 0.68;
  cursor: default;
}

html[data-theme="dark"] .export-report-card-revision {
  border-color: rgba(203, 213, 225, 0.18);
  background: rgba(30, 41, 59, 0.46);
}

html[data-theme="dark"] .export-report-card-revision input {
  border-color: rgba(96, 165, 250, 0.36);
  background: rgba(15, 23, 42, 0.78);
  color: var(--text);
}

html[data-theme="dark"] .export-report-card-revision input:focus {
  border-color: var(--blue);
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22);
}

@media (max-width: 700px) {
  .export-report-card.has-inline-revision {
    grid-template-columns: minmax(0, 1fr) minmax(84px, 92px);
  }

  .export-report-card-revision {
    min-width: 0;
    padding-inline: 9px;
  }
}

@media (max-width: 420px) {
  .export-revision-policy-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .export-report-grid {
    grid-auto-rows: 122px;
  }

  .export-report-card.has-inline-revision {
    grid-template-columns: minmax(0, 1fr);
  }

  .export-report-card-revision {
    width: min(180px, 100%);
    box-sizing: border-box;
    justify-self: end;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

.export-project-pack-launch {
  min-width: 0;
  align-self: start;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(10, 132, 255, 0.34);
  border-radius: calc(var(--radius) + 2px);
  background:
    radial-gradient(circle at 88% 12%, rgba(109, 93, 252, 0.18), transparent 32%),
    linear-gradient(135deg, rgba(10, 132, 255, 0.13), rgba(255, 255, 255, 0.66) 58%, rgba(109, 93, 252, 0.09));
  box-shadow: var(--glass-edge), 0 16px 34px rgba(10, 92, 190, 0.10);
}

.export-primary-column {
  min-width: 0;
  align-self: start;
  display: grid;
  align-content: start;
  gap: 14px;
}

.export-project-pack-launch-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 13px;
  background: linear-gradient(145deg, #087cff, #11b5ff 58%, #6d5dfc);
  box-shadow: 0 12px 24px rgba(10, 132, 255, 0.22);
  color: #fff;
}

.export-project-pack-launch-icon svg {
  width: 21px;
  height: 21px;
}

.export-project-pack-launch > div:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.export-project-pack-launch > div:nth-child(2) > span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.export-project-pack-launch > div:nth-child(2) > strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 920;
}

.export-project-pack-launch p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.35;
}

.export-project-pack-launch-meta {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.export-project-pack-launch-meta small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 820;
}

.export-project-pack-launch-meta button {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(10, 132, 255, 0.38);
  border-radius: 12px;
  background: linear-gradient(145deg, var(--blue), #087cff 56%, #11a8ff);
  box-shadow: 0 10px 22px rgba(10, 132, 255, 0.20);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.export-project-pack-launch-meta button svg {
  width: 16px;
  height: 16px;
}

.export-project-pack-launch-meta button:disabled {
  opacity: 0.48;
  cursor: default;
}

.project-export-pack-selection-layer {
  position: fixed;
  z-index: 34;
  inset: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 22px;
  background:
    radial-gradient(circle at 50% 8%, rgba(10, 132, 255, 0.17), transparent 38%),
    rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(11px) saturate(1.08);
  -webkit-backdrop-filter: blur(11px) saturate(1.08);
}

.project-export-pack-selection-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: default;
}

.project-export-pack-selection-dialog {
  position: relative;
  z-index: 1;
  width: min(900px, calc(100vw - 40px));
  height: min(720px, calc(100dvh - 56px));
  max-height: min(720px, calc(100dvh - 56px));
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--glass-border);
  border-radius: calc(var(--radius) + 5px);
  outline: 0;
  background: var(--glass-strong);
  box-shadow: var(--glass-edge), 0 34px 90px rgba(15, 23, 42, 0.31);
  color: var(--text);
}

.project-export-pack-selection-header {
  flex: 0 0 auto;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px 13px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 88% 0, rgba(109, 93, 252, 0.14), transparent 34%),
    linear-gradient(145deg, rgba(239, 246, 255, 0.88), rgba(255, 255, 255, 0.58));
}

.project-export-pack-selection-header > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.project-export-pack-selection-header span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-export-pack-selection-header h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(20px, 2.4vw, 24px);
  font-weight: 920;
  line-height: 1.08;
}

.project-export-pack-selection-header p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

.project-export-pack-selection-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--blue-border);
  border-radius: 13px;
  background: var(--tile-glass);
  color: var(--blue);
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.project-export-pack-selection-toolbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(237, 245, 255, 0.54);
}

.project-export-pack-selection-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.project-export-pack-selection-toolbar p strong {
  color: var(--text);
  font-weight: 900;
}

.project-export-pack-selection-toolbar > div {
  display: flex;
  gap: 8px;
}

.project-export-pack-selection-toolbar button,
.project-export-pack-group-toggle,
.project-export-pack-selection-footer button {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid var(--blue-border);
  border-radius: 10px;
  background: var(--tile-glass);
  color: var(--blue);
  font-size: 10px;
  font-weight: 880;
  cursor: pointer;
}

.project-export-pack-selection-toolbar button:disabled,
.project-export-pack-group-toggle:disabled,
.project-export-pack-selection-footer button:disabled {
  opacity: 0.44;
  cursor: default;
}

.project-export-pack-selection-error {
  flex: 0 0 auto;
  margin: 10px 22px 0;
  padding: 9px 11px;
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.09);
  color: #b91c1c;
  font-size: 10px;
  font-weight: 780;
}

.project-export-pack-selection-body {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 10px;
  padding: 12px 18px 14px;
}

.project-export-pack-group {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.34);
}

.project-export-pack-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(234, 243, 255, 0.64);
}

.project-export-pack-group-header > div {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.project-export-pack-group-header h3 {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.project-export-pack-group-header p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 780;
}

.project-export-pack-group-items {
  display: grid;
}

.project-export-pack-selection-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(96px, 116px);
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  transition: background 0.15s ease;
}

.project-export-pack-selection-row:first-child {
  border-top: 0;
}

.project-export-pack-selection-row:hover {
  background: var(--control-hover-bg);
}

.project-export-pack-selection-row.is-disabled {
  opacity: 0.5;
}

.project-export-pack-item-choice {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  cursor: pointer;
}

.project-export-pack-item-choice input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--blue);
}

.project-export-pack-item-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.project-export-pack-item-copy strong,
.project-export-pack-item-copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-export-pack-item-copy strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 860;
}

.project-export-pack-item-copy small {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
}

.project-export-pack-item-badge {
  max-width: 132px;
  padding: 5px 8px;
  border: 1px solid var(--blue-border);
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  overflow: hidden;
  font-size: 9px;
  font-weight: 860;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-export-pack-item-revision {
  min-width: 0;
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 860;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.project-export-pack-item-revision input {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  box-sizing: border-box;
  padding: 5px 8px;
  border: 1px solid var(--blue-border);
  border-radius: 8px;
  outline: 0;
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}

.project-export-pack-item-revision input:focus {
  border-color: var(--blue);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.13);
}

.project-export-pack-empty {
  margin: 0;
  padding: 18px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
  text-align: center;
}

.project-export-pack-selection-footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 18px 12px;
  border-top: 1px solid var(--line);
  background: rgba(248, 251, 255, 0.74);
}

.project-export-pack-selection-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
}

.project-export-pack-selection-footer > div {
  display: flex;
  gap: 9px;
}

.project-export-pack-selection-footer .primary {
  min-width: 130px;
  border-color: rgba(10, 132, 255, 0.48);
  background: linear-gradient(145deg, var(--blue), #087cff 58%, #11a8ff);
  box-shadow: 0 10px 22px rgba(10, 132, 255, 0.18);
  color: #fff;
}

html[data-theme="dark"] .export-project-pack-launch {
  border-color: rgba(96, 165, 250, 0.34);
  background:
    radial-gradient(circle at 88% 12%, rgba(109, 93, 252, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(10, 132, 255, 0.16), rgba(30, 41, 59, 0.72) 58%, rgba(109, 93, 252, 0.12));
  box-shadow: var(--glass-edge), 0 18px 38px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .project-export-pack-selection-layer {
  background:
    radial-gradient(circle at 50% 8%, rgba(10, 132, 255, 0.19), transparent 38%),
    rgba(3, 7, 18, 0.72);
}

html[data-theme="dark"] .project-export-pack-selection-dialog {
  border-color: rgba(239, 246, 255, 0.18);
  background: linear-gradient(145deg, rgba(25, 31, 43, 0.98), rgba(12, 16, 24, 0.97));
  box-shadow: var(--glass-edge), 0 36px 94px rgba(0, 0, 0, 0.58);
}

html[data-theme="dark"] .project-export-pack-selection-header,
html[data-theme="dark"] .project-export-pack-selection-footer {
  background:
    radial-gradient(circle at 88% 0, rgba(109, 93, 252, 0.17), transparent 34%),
    linear-gradient(145deg, rgba(39, 47, 63, 0.78), rgba(18, 23, 32, 0.74));
}

html[data-theme="dark"] .project-export-pack-selection-toolbar,
html[data-theme="dark"] .project-export-pack-group-header {
  background: rgba(42, 52, 70, 0.58);
}

html[data-theme="dark"] .project-export-pack-group {
  border-color: rgba(203, 213, 225, 0.18);
  background: rgba(17, 22, 31, 0.68);
}

html[data-theme="dark"] .project-export-pack-selection-row:hover {
  background: rgba(59, 130, 246, 0.13);
}

html[data-theme="dark"] .project-export-pack-selection-toolbar button,
html[data-theme="dark"] .project-export-pack-group-toggle,
html[data-theme="dark"] .project-export-pack-selection-footer button,
html[data-theme="dark"] .project-export-pack-selection-close {
  border-color: rgba(96, 165, 250, 0.36);
  background: rgba(30, 41, 59, 0.76);
}

html[data-theme="dark"] .project-export-pack-item-revision input {
  border-color: rgba(96, 165, 250, 0.36);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: var(--text);
}

html[data-theme="dark"] .project-export-pack-item-revision input:focus {
  border-color: var(--blue);
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22);
}

html[data-theme="dark"] .project-export-pack-selection-error {
  border-color: rgba(248, 113, 113, 0.34);
  background: rgba(127, 29, 29, 0.28);
  color: #fecaca;
}

@media (max-width: 760px) {
  .export-project-pack-launch {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 12px;
  }

  .export-project-pack-launch-icon {
    width: 38px;
    height: 38px;
  }

  .export-project-pack-launch-meta {
    grid-column: 1 / -1;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .project-export-pack-selection-layer {
    padding: 10px;
  }

  .project-export-pack-selection-dialog {
    width: calc(100vw - 20px);
    height: min(720px, calc(100dvh - 20px));
    max-height: min(720px, calc(100dvh - 20px));
  }

  .project-export-pack-selection-header,
  .project-export-pack-selection-toolbar,
  .project-export-pack-selection-body,
  .project-export-pack-selection-footer {
    padding-inline: 15px;
  }

  .project-export-pack-selection-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .project-export-pack-item-revision {
    width: min(180px, 100%);
    grid-column: 1 / -1;
    justify-self: end;
  }

  .project-export-pack-selection-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .project-export-pack-selection-footer > div {
    justify-content: flex-end;
  }
}

@media (max-width: 480px) {
  .project-export-pack-selection-header {
    gap: 10px;
  }

  .project-export-pack-selection-header p,
  .project-export-pack-selection-footer p {
    font-size: 9px;
  }

  .project-export-pack-selection-toolbar,
  .project-export-pack-group-header {
    align-items: stretch;
    flex-direction: column;
  }

  .project-export-pack-selection-toolbar > div,
  .project-export-pack-selection-footer > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-export-pack-selection-toolbar button,
  .project-export-pack-selection-footer button {
    width: 100%;
  }

  .project-export-pack-selection-row {
    gap: 9px;
    padding-inline: 11px;
  }

  .project-export-pack-item-badge {
    max-width: 92px;
  }

  .project-export-pack-item-revision {
    width: 100%;
  }
}

@media (max-height: 640px) {
  .project-export-pack-selection-layer {
    padding: 8px;
  }

  .project-export-pack-selection-dialog {
    width: calc(100vw - 16px);
    height: calc(100dvh - 16px);
    max-height: calc(100dvh - 16px);
  }

  .project-export-pack-selection-header {
    padding-block: 12px 10px;
  }

  .project-export-pack-selection-header p,
  .project-export-pack-selection-footer > p {
    display: none;
  }

  .project-export-pack-selection-toolbar {
    padding-block: 8px;
  }

  .project-export-pack-selection-body {
    padding-block: 10px;
  }

  .project-export-pack-selection-footer {
    padding-block: 9px;
  }
}

.drawing-export-selection-layer {
  position: fixed;
  z-index: 32;
  inset: 0;
  display: grid;
  place-items: center;
  min-height: 0;
  overflow: hidden;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 10%, rgba(10, 132, 255, 0.16), transparent 38%),
    rgba(15, 23, 42, 0.38);
  pointer-events: auto;
  backdrop-filter: blur(10px) saturate(1.08);
  -webkit-backdrop-filter: blur(10px) saturate(1.08);
}

.drawing-export-selection-dialog {
  width: min(860px, calc(100vw - 32px));
  height: min(820px, calc(100dvh - 40px));
  max-height: min(820px, calc(100dvh - 40px));
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  border: 1px solid var(--glass-border);
  border-radius: calc(var(--radius) + 4px);
  background: var(--glass-strong);
  box-shadow: var(--glass-edge), 0 30px 80px rgba(15, 23, 42, 0.28);
  color: var(--text);
}

.drawing-export-selection-head {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(239, 246, 255, 0.82), rgba(255, 255, 255, 0.58));
}

.drawing-export-selection-head > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.drawing-export-selection-head span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.drawing-export-selection-head strong {
  color: var(--text);
  font-size: clamp(19px, 2.2vw, 26px);
  font-weight: 900;
  line-height: 1.08;
}

.drawing-export-selection-head small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.drawing-export-selection-head > button {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--blue-border);
  border-radius: 12px;
  background: var(--tile-glass);
  color: var(--blue);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.drawing-export-selection-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(237, 245, 255, 0.52);
}

.drawing-export-selection-toolbar > span {
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
}

.drawing-export-selection-toolbar > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.drawing-export-selection-toolbar button {
  min-height: 32px;
  padding: 6px 11px;
  border: 1px solid var(--blue-border);
  border-radius: 10px;
  background: var(--tile-glass);
  color: var(--blue);
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.drawing-export-selection-toolbar button:disabled {
  opacity: 0.48;
  cursor: default;
}

.drawing-export-revision-panel {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(210px, 0.72fr) minmax(0, 1.28fr);
  align-items: center;
  gap: 18px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(10, 132, 255, 0.08), rgba(255, 255, 255, 0.46)),
    rgba(248, 251, 255, 0.68);
}

.drawing-export-revision-controls {
  min-width: 0;
  display: grid;
  gap: 9px;
}

.drawing-export-revision-field {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(104px, 132px);
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 11px;
  font-weight: 850;
}

.drawing-export-revision-field > label,
.drawing-export-revision-field > span,
.drawing-export-revision-field > strong {
  min-width: 0;
}

.drawing-export-revision-field input,
.drawing-export-revision-field select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  box-sizing: border-box;
  padding: 8px 12px;
  border: 1px solid var(--blue-border);
  border-radius: 11px;
  outline: 0;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.drawing-export-revision-field select {
  appearance: auto;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}

.drawing-export-revision-field input:hover,
.drawing-export-revision-field select:hover {
  border-color: rgba(10, 132, 255, 0.44);
}

.drawing-export-revision-field input:focus,
.drawing-export-revision-field select:focus {
  border-color: var(--blue);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.14);
}

.drawing-export-revision-summary {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
  color: var(--text);
  font-size: 11px;
  font-weight: 780;
  line-height: 1.35;
}

.drawing-export-revision-summary > strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 880;
}

.drawing-export-revision-meta {
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
}

.drawing-export-selection-body {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 14px;
  padding: 16px 22px 20px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.drawing-export-selection-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.34);
}

.drawing-export-selection-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(234, 243, 255, 0.62);
}

.drawing-export-selection-group > header strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 880;
}

.drawing-export-selection-group > header span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.drawing-export-selection-list {
  display: grid;
}

.drawing-export-selection-row {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto minmax(112px, 140px);
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.15s ease;
}

.drawing-export-selection-row:first-child {
  border-top: 0;
}

.drawing-export-selection-row:hover {
  background: var(--control-hover-bg);
}

.drawing-export-selection-row input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--blue);
}

.drawing-export-selection-row > span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.drawing-export-selection-row strong {
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawing-export-selection-row small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawing-export-selection-row em {
  max-width: 150px;
  padding: 5px 8px;
  border: 1px solid var(--blue-border);
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  overflow: hidden;
  font-size: 9px;
  font-style: normal;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawing-export-row-revision {
  min-width: 0;
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.drawing-export-row-revision input {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  box-sizing: border-box;
  padding: 5px 8px;
  border: 1px solid var(--blue-border);
  border-radius: 8px;
  outline: 0;
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}

.drawing-export-row-revision input:focus {
  border-color: var(--blue);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.13);
}

.drawing-export-row-revision input:disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

.drawing-export-selection-loading,
.drawing-export-selection-empty {
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 28px;
  border: 1px dashed var(--blue-border);
  border-radius: var(--radius);
  background: var(--blue-soft);
  color: var(--muted);
  text-align: center;
}

.drawing-export-selection-loading > span {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(10, 132, 255, 0.18);
  border-top-color: var(--blue);
  border-radius: 999px;
  animation: export-generation-spin 0.82s linear infinite;
}

.drawing-export-selection-loading strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 880;
}

.drawing-export-selection-loading small,
.drawing-export-selection-empty {
  font-size: 11px;
  font-weight: 720;
  line-height: 1.4;
}

.drawing-export-selection-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px 18px;
  border-top: 1px solid var(--line);
  background: rgba(248, 251, 255, 0.72);
}

.drawing-export-selection-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.drawing-export-selection-footer > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawing-export-selection-footer button {
  min-height: 38px;
  padding: 8px 14px;
}

.drawing-export-selection-footer .primary-btn:disabled {
  opacity: 0.45;
  box-shadow: none;
  cursor: default;
}

@media (max-width: 700px) {
  .drawing-export-selection-layer {
    padding: 10px;
  }

  .drawing-export-selection-dialog {
    width: calc(100vw - 20px);
    height: calc(100dvh - 20px);
    max-height: calc(100dvh - 20px);
  }

  .drawing-export-selection-head {
    padding: 16px;
  }

  .drawing-export-selection-toolbar {
    align-items: flex-start;
    padding: 10px 16px;
  }

  .drawing-export-revision-panel {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 12px 16px;
  }

  .drawing-export-revision-field {
    grid-template-columns: minmax(0, 1fr) minmax(96px, 122px);
  }

  .drawing-export-revision-summary {
    padding: 0;
    border-left: 0;
  }

  .drawing-export-selection-body {
    padding: 12px 16px 16px;
  }

  .drawing-export-selection-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .drawing-export-selection-row em {
    grid-column: 2;
    justify-self: start;
  }

  .drawing-export-row-revision {
    width: min(190px, 100%);
    grid-column: 2;
  }

  .drawing-export-selection-footer {
    align-items: stretch;
    flex-direction: column;
    padding: 12px 16px 16px;
  }

  .drawing-export-selection-footer > div {
    justify-content: flex-end;
  }
}

@media (max-height: 640px) {
  .drawing-export-selection-layer {
    padding: 8px;
  }

  .drawing-export-selection-dialog {
    height: calc(100dvh - 16px);
    max-height: calc(100dvh - 16px);
  }

  .drawing-export-selection-head {
    padding-block: 12px 10px;
  }

  .drawing-export-selection-toolbar {
    padding-block: 8px;
  }

  .drawing-export-revision-panel {
    padding-block: 9px;
  }

  .drawing-export-selection-footer {
    padding-block: 10px;
  }
}

.export-info-card:hover {
  border-color: rgba(255, 255, 255, 0.46);
  background: var(--tile-glass);
  box-shadow: var(--glass-edge), 0 10px 22px rgba(0, 0, 0, 0.055);
  transform: none;
}

.dashboard-app-icon-engineering {
  color: #ffffff;
  background: linear-gradient(145deg, #0ea5e9, #6d5dfc 54%, #9b5cff);
}

.dashboard-app-icon-commissioning {
  color: #ffffff;
  background: linear-gradient(145deg, #2563eb, #7c3aed 54%, #0ea5e9);
}

.dashboard-engineering-workspace {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background:
    radial-gradient(circle at 14% 10%, rgba(14, 165, 233, 0.14), transparent 34%),
    radial-gradient(circle at 86% 8%, rgba(109, 93, 252, 0.16), transparent 28%),
    var(--app-bg);
}

.dashboard-engineering-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
}

.dashboard-engineering-nav,
.dashboard-engineering-panel {
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 18px;
  background: var(--tile-glass);
  box-shadow: var(--glass-edge), 0 18px 42px rgba(15, 23, 42, 0.09);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.dashboard-engineering-nav {
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
}

.dashboard-engineering-nav-head,
.dashboard-engineering-panel-head,
.dashboard-engineering-result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.dashboard-engineering-nav-head {
  padding: 4px 4px 8px;
  display: grid;
}

.dashboard-engineering-nav-head span,
.dashboard-engineering-panel-head span,
.dashboard-engineering-result-head span,
.dashboard-engineering-metric span,
.dashboard-engineering-notes strong,
.dashboard-engineering-table-card h3 {
  color: var(--muted);
  font-size: 10px;
  font-weight: 860;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.dashboard-engineering-nav-head strong,
.dashboard-engineering-panel-head strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 880;
  line-height: 1.15;
}

.dashboard-engineering-nav button {
  min-height: 76px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-areas:
    "icon title"
    "icon copy";
  gap: 3px 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.20);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.42);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.dashboard-engineering-nav button:hover,
.dashboard-engineering-nav button.active {
  border-color: var(--blue-border);
  background: linear-gradient(145deg, rgba(14, 165, 233, 0.16), rgba(109, 93, 252, 0.14), rgba(255, 255, 255, 0.58));
  box-shadow: 0 12px 26px rgba(59, 130, 246, 0.13);
  transform: translateY(-1px);
}

.dashboard-engineering-nav button > span {
  grid-area: icon;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(14, 165, 233, 0.18), rgba(109, 93, 252, 0.16));
  color: var(--blue);
}

.dashboard-engineering-nav button svg {
  width: 19px;
  height: 19px;
}

.dashboard-engineering-nav button strong {
  grid-area: title;
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 860;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-engineering-nav button small {
  grid-area: copy;
  min-width: 0;
  color: var(--muted);
  overflow: hidden;
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.dashboard-engineering-main {
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(430px, 1.3fr);
  gap: 14px;
  align-content: start;
}

.dashboard-engineering-panel {
  min-width: 0;
  padding: 16px;
}

.dashboard-engineering-panel-head {
  margin-bottom: 14px;
}

.dashboard-engineering-panel-head small {
  max-width: 260px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  line-height: 1.35;
  text-align: right;
}

.dashboard-engineering-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-engineering-field {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.dashboard-engineering-field > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
}

.dashboard-engineering-field small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  text-transform: none;
}

.dashboard-engineering-field input,
.dashboard-engineering-field select {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
  font: inherit;
  font-size: 13px;
  font-weight: 780;
}

.dashboard-engineering-results {
  display: grid;
  gap: 14px;
}

.dashboard-engineering-result-head h2 {
  margin: 2px 0 4px;
  color: var(--text);
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.02;
}

.dashboard-engineering-result-head p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.dashboard-engineering-status {
  flex: 0 0 auto;
  padding: 8px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-engineering-status.pass {
  background: rgba(34, 197, 94, 0.14);
  color: #15803d;
}

.dashboard-engineering-status.review {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
}

.dashboard-engineering-status.fail {
  background: rgba(239, 68, 68, 0.14);
  color: #b91c1c;
}

.dashboard-engineering-status.info {
  background: var(--blue-soft);
  color: var(--blue);
}

.dashboard-engineering-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-engineering-metric {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.48);
}

.dashboard-engineering-metric strong {
  min-width: 0;
  color: var(--text);
  overflow: hidden;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
}

.dashboard-engineering-metric small {
  min-height: 28px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}

.dashboard-engineering-table-card {
  display: grid;
  gap: 8px;
}

.dashboard-engineering-table-wrap {
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
}

.dashboard-engineering-table-wrap table {
  width: 100%;
  min-width: 360px;
  border-collapse: collapse;
  font-size: 12px;
}

.dashboard-engineering-table-wrap th,
.dashboard-engineering-table-wrap td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  text-align: left;
}

.dashboard-engineering-table-wrap th {
  background: rgba(59, 130, 246, 0.08);
  color: var(--text);
  font-weight: 860;
}

.dashboard-engineering-table-wrap td {
  color: var(--muted);
  font-weight: 720;
}

.dashboard-engineering-notes {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid rgba(14, 165, 233, 0.16);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(14, 165, 233, 0.08), rgba(255, 255, 255, 0.36));
}

.dashboard-engineering-notes ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 690;
  line-height: 1.45;
}

.dashboard-engineering-assumption-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.dashboard-engineering-assumption-strip span {
  padding: 6px 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
}

.dashboard-commissioning-workspace {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  background:
    radial-gradient(circle at 12% 10%, rgba(37, 99, 235, 0.13), transparent 34%),
    radial-gradient(circle at 88% 8%, rgba(124, 58, 237, 0.13), transparent 30%),
    var(--app-bg);
}

.dashboard-commissioning-shell {
  height: 100%;
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 14px;
}

.dashboard-commissioning-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-solid);
  box-shadow: var(--glass-edge), 0 12px 30px rgba(15, 23, 42, 0.06);
}

.dashboard-commissioning-topbar > div:first-child {
  min-width: 0;
}

.dashboard-commissioning-topbar span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.dashboard-commissioning-topbar h1 {
  margin: 0;
  color: var(--text);
  font-size: 25px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0;
}

.dashboard-commissioning-topbar p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.dashboard-commissioning-topbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 8px;
  min-width: min(340px, 42vw);
  max-width: 100%;
}

.dashboard-commissioning-topbar-actions .dashboard-commissioning-project-select {
  flex: 1 1 240px;
  min-width: 0;
}

.dashboard-commissioning-project-select {
  min-width: min(340px, 38vw);
  display: grid;
  gap: 5px;
}

.dashboard-commissioning-project-select span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 860;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.dashboard-commissioning-project-select select {
  min-height: 40px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 820;
}

.dashboard-commissioning-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-commissioning-summary article {
  display: grid;
  gap: 4px;
  padding: 13px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  background: var(--tile-glass);
  box-shadow: var(--glass-edge), 0 14px 30px rgba(15, 23, 42, 0.06);
}

.dashboard-commissioning-summary span,
.dashboard-commissioning-area-head span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 860;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.dashboard-commissioning-summary strong {
  color: var(--text);
  font-size: 24px;
  font-weight: 920;
  line-height: 1;
}

.dashboard-commissioning-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.08), rgba(255, 255, 255, 0.46));
}

.dashboard-commissioning-actions span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.dashboard-commissioning-customer-report-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 10px 24px rgba(37, 99, 235, 0.08);
}

.dashboard-commissioning-customer-report-button,
.dashboard-commissioning-customer-copy-button {
  min-height: 34px;
  border-radius: 11px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.dashboard-commissioning-customer-report-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  color: #ffffff;
  text-decoration: none;
  background: linear-gradient(135deg, #0a84ff 0%, #2563eb 52%, #6d5dfc 100%);
  box-shadow: 0 14px 26px rgba(37, 99, 235, 0.22);
}

.dashboard-commissioning-customer-report-button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.dashboard-commissioning-actions .dashboard-commissioning-customer-report-button span {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.dashboard-commissioning-customer-copy-button {
  padding: 0 11px;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.86);
}

.dashboard-commissioning-customer-report-button:hover,
.dashboard-commissioning-customer-copy-button:hover {
  transform: translateY(-1px);
}

.dashboard-commissioning-area-list {
  display: grid;
  gap: 14px;
}

.dashboard-commissioning-area {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  background: var(--tile-glass);
  box-shadow: var(--glass-edge), 0 18px 42px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.dashboard-commissioning-area-head,
.dashboard-commissioning-zone-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-commissioning-area-head {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.42);
}

.dashboard-commissioning-area-head h3 {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.1;
}

.dashboard-commissioning-area-head > strong {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.dashboard-commissioning-zone {
  display: grid;
  gap: 10px;
  padding: 14px 16px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.dashboard-commissioning-zone:first-of-type {
  border-top: 0;
}

.dashboard-commissioning-zone-head {
  justify-content: flex-start;
}

.dashboard-commissioning-zone-head strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 880;
}

.dashboard-commissioning-zone-head small {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.commissioning-badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.commissioning-badge.gas {
  background: rgba(250, 204, 21, 0.22);
  color: #8a5a00;
}

.commissioning-badge.ventilation {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
}

.commissioning-badge.public-health {
  background: rgba(14, 165, 233, 0.14);
  color: #0369a1;
}

.commissioning-badge.electrical {
  background: rgba(124, 58, 237, 0.14);
  color: #6d28d9;
}

.commissioning-badge.controls {
  background: rgba(217, 70, 239, 0.13);
  color: #86198f;
}

.commissioning-badge.district {
  background: rgba(20, 184, 166, 0.14);
  color: #0f766e;
}

.dashboard-commissioning-task-list {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.42);
}

.dashboard-commissioning-task {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.28);
}

.dashboard-commissioning-task:last-child {
  border-bottom: 0;
}

.dashboard-commissioning-task.complete {
  border-color: rgba(34, 197, 94, 0.28);
  background: linear-gradient(145deg, rgba(34, 197, 94, 0.08), rgba(255, 255, 255, 0.52));
}

.dashboard-commissioning-task.needs-attention {
  box-shadow: inset 3px 0 0 rgba(239, 68, 68, 0.72);
}

.dashboard-commissioning-task-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.dashboard-commissioning-ref {
  min-width: 54px;
  padding: 7px 8px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.dashboard-commissioning-task-head strong {
  display: block;
  min-width: 0;
  color: var(--text);
  overflow: hidden;
  font-size: 14px;
  font-weight: 880;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-commissioning-task-head small,
.dashboard-commissioning-evidence-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 710;
  line-height: 1.3;
}

.dashboard-commissioning-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
}

.dashboard-commissioning-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.dashboard-commissioning-check input:disabled {
  cursor: default;
  opacity: 1;
}

.dashboard-commissioning-status-stack {
  display: grid;
  justify-items: end;
  gap: 1px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 820;
  line-height: 1.1;
  text-transform: uppercase;
}

.dashboard-commissioning-status-stack strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.dashboard-commissioning-status-stack small {
  color: var(--blue);
  font-size: 10px;
  font-weight: 880;
}

.dashboard-commissioning-task-attention {
  color: #b91c1c;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.2;
  text-transform: none;
}

.dashboard-commissioning-task-toggle {
  min-height: 28px;
  margin-top: 5px;
  padding: 5px 9px;
  border: 1px solid rgba(0, 122, 255, 0.24);
  border-radius: 9px;
  background: rgba(239, 246, 255, 0.7);
  color: var(--blue);
  font: inherit;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
}

.dashboard-commissioning-task-toggle:hover {
  border-color: rgba(0, 122, 255, 0.42);
  background: rgba(219, 234, 254, 0.82);
}

.dashboard-commissioning-task-toggle:focus-visible {
  outline: 3px solid rgba(0, 122, 255, 0.24);
  outline-offset: 2px;
}

.dashboard-commissioning-task.expanded {
  background: rgba(255, 255, 255, 0.58);
}

.dashboard-commissioning-task-detail {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.dashboard-commissioning-task-detail[hidden] {
  display: none;
}

.dashboard-commissioning-service-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dashboard-commissioning-service-panel-list {
  display: grid;
  gap: 0;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  overflow: hidden;
}

.dashboard-commissioning-service-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 0;
  background: rgba(248, 250, 252, 0.62);
}

.dashboard-commissioning-service-panel:last-child {
  border-bottom: 0;
}

.dashboard-commissioning-service-panel-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.dashboard-commissioning-service-panel-head small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-commissioning-check-info {
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(0, 122, 255, 0.12);
  border-radius: 10px;
  background: rgba(239, 246, 255, 0.5);
}

.dashboard-commissioning-check-info > strong {
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.dashboard-commissioning-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 6px;
}

.dashboard-commissioning-check-grid div {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 6px 7px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.dashboard-commissioning-check-grid span {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.dashboard-commissioning-check-grid strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-commissioning-document-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dashboard-commissioning-document-list a,
.dashboard-commissioning-document-list > span {
  display: inline-grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  max-width: 260px;
  padding: 6px 8px;
  border: 1px solid rgba(0, 122, 255, 0.16);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--text);
  text-decoration: none;
}

.share-footer-actions .primary-btn:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.dashboard-commissioning-document-list svg {
  width: 16px;
  height: 16px;
  color: var(--blue);
}

.dashboard-commissioning-document-list strong,
.dashboard-commissioning-document-list small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-commissioning-document-list strong {
  font-size: 11px;
  font-weight: 850;
}

.dashboard-commissioning-document-list small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

.dashboard-commissioning-action-list {
  display: grid;
  gap: 7px;
  padding: 8px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.dashboard-commissioning-action-list > strong {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.dashboard-commissioning-action-items {
  display: grid;
  gap: 5px;
}

.dashboard-commissioning-action-item {
  display: inline-grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 7px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.46);
  color: var(--text);
  font-size: 11px;
  font-weight: 780;
  line-height: 1.2;
}

.dashboard-commissioning-action-item.requires-value {
  grid-template-columns: 18px minmax(170px, 1fr) minmax(150px, 0.48fr) minmax(190px, 0.72fr) auto;
}

.dashboard-commissioning-action-item.requires-value:not(.has-check) {
  grid-template-columns: 18px minmax(170px, 1fr) minmax(150px, 0.48fr) auto;
}

.dashboard-commissioning-action-item.has-check:not(.requires-value) {
  grid-template-columns: 18px minmax(170px, 1fr) minmax(190px, 0.72fr) auto;
}

.dashboard-commissioning-action-item > input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}

.dashboard-commissioning-action-value-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  min-height: 30px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.84);
  overflow: hidden;
}

.dashboard-commissioning-action-value-wrap.has-unit {
  grid-template-columns: minmax(0, 1fr) auto;
}

.dashboard-commissioning-action-value-wrap.has-status {
  grid-template-columns: minmax(0, 1fr) auto;
}

.dashboard-commissioning-action-value-wrap.has-unit.has-status {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.dashboard-commissioning-action-value-wrap.tolerance-pass {
  border-color: rgba(34, 197, 94, 0.34);
  background: rgba(240, 253, 244, 0.86);
}

.dashboard-commissioning-action-value-wrap.tolerance-fail {
  border-color: rgba(239, 68, 68, 0.36);
  background: rgba(254, 242, 242, 0.88);
}

.dashboard-commissioning-action-value {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0;
  outline: 0;
  padding: 0 8px;
}

.dashboard-commissioning-action-unit,
.dashboard-commissioning-action-tolerance {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-left: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(239, 246, 255, 0.72);
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.dashboard-commissioning-action-tolerance {
  border-left-color: rgba(148, 163, 184, 0.18);
  color: #475569;
}

.dashboard-commissioning-action-value-wrap.tolerance-pass .dashboard-commissioning-action-tolerance {
  background: rgba(34, 197, 94, 0.14);
  color: #15803d;
}

.dashboard-commissioning-action-value-wrap.tolerance-fail .dashboard-commissioning-action-tolerance {
  background: rgba(239, 68, 68, 0.14);
  color: #b91c1c;
}

.dashboard-commissioning-action-check-cell {
  display: grid;
  align-self: stretch;
  gap: 3px;
  min-width: 0;
  padding: 5px 7px;
  border: 1px solid rgba(0, 122, 255, 0.16);
  border-radius: 9px;
  background: rgba(239, 246, 255, 0.56);
}

.dashboard-commissioning-action-check-cell > small {
  color: var(--blue);
  font-size: 8px;
  font-weight: 940;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.dashboard-commissioning-action-check-cell > span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.dashboard-commissioning-action-check-cell em,
.dashboard-commissioning-action-check-cell strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-commissioning-action-check-cell em {
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
  font-weight: 840;
  text-transform: uppercase;
}

.dashboard-commissioning-action-check-cell strong {
  color: var(--text);
  font-size: 10px;
  font-weight: 920;
}

.dashboard-commissioning-action-check-cell.is-empty {
  background: rgba(248, 250, 252, 0.72);
  border-color: rgba(148, 163, 184, 0.18);
}

.dashboard-commissioning-action-check-cell.has-documents {
  background: rgba(255, 251, 235, 0.58);
  border-color: rgba(245, 158, 11, 0.2);
}

.dashboard-commissioning-action-document-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--blue);
  text-decoration: none;
}

.dashboard-commissioning-action-document-link:hover {
  text-decoration: underline;
}

.dashboard-commissioning-action-document-link em,
.dashboard-commissioning-action-document-link strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-commissioning-action-document-link em {
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
  font-weight: 840;
  text-transform: uppercase;
}

.dashboard-commissioning-action-document-link strong {
  color: var(--blue);
  font-size: 10px;
  font-weight: 920;
}

.dashboard-commissioning-action-photo-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  min-width: 0;
}

.dashboard-commissioning-action-photo-upload {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 10px;
  cursor: pointer;
}

.dashboard-commissioning-action-photo-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.dashboard-commissioning-action-photo-chip {
  display: inline-grid;
  grid-template-columns: minmax(0, 92px) 20px;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.dashboard-commissioning-action-photo-chip img,
.dashboard-commissioning-action-photo-chip svg {
  width: 24px;
  height: 20px;
  border-radius: 6px;
  object-fit: cover;
}

.dashboard-commissioning-action-photo-chip strong {
  overflow: hidden;
  color: var(--text);
  font-size: 9px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-commissioning-action-photo-chip button {
  width: 20px;
  height: 20px;
  border: 1px solid rgba(239, 68, 68, 0.22);
  border-radius: 6px;
  background: rgba(254, 242, 242, 0.82);
  color: #b91c1c;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

.dashboard-commissioning-task-grid {
  display: grid;
  grid-template-columns: minmax(150px, 0.36fr) minmax(280px, 1fr);
  gap: 9px;
}

.dashboard-commissioning-task-grid label,
.dashboard-commissioning-task-check-field {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 860;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.dashboard-commissioning-task-grid input,
.dashboard-commissioning-task-grid textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: none;
}

.dashboard-commissioning-task-grid textarea {
  resize: vertical;
}

.dashboard-commissioning-inline-checks {
  display: grid;
  gap: 5px;
  min-height: 38px;
  padding: 5px;
  border: 1px solid rgba(0, 122, 255, 0.16);
  border-radius: 12px;
  background: rgba(239, 246, 255, 0.5);
}

.dashboard-commissioning-inline-checks div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 4px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.dashboard-commissioning-inline-checks small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.dashboard-commissioning-inline-checks strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.dashboard-commissioning-inline-checks em {
  align-self: center;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 760;
  text-transform: none;
}

.dashboard-commissioning-evidence-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dashboard-commissioning-lead-card {
  min-width: min(360px, 100%);
  flex: 1 1 360px;
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(180px, 1fr);
  align-items: end;
  gap: 10px;
}

.dashboard-commissioning-lead-select {
  display: grid;
  gap: 5px;
}

.dashboard-commissioning-lead-select span,
.dashboard-commissioning-lead-card small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 860;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.dashboard-commissioning-lead-select select {
  min-height: 40px;
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 820;
}

.dashboard-commissioning-lead-card small {
  line-height: 1.25;
  text-transform: none;
}

.dashboard-commissioning-lead-card.commissioning-review-card {
  flex: 1 1 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  padding: 12px;
  border: 1px solid var(--border, rgba(148, 163, 184, .35));
  border-radius: 12px;
  overflow-wrap: anywhere;
}
.commissioning-review-card form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.commissioning-review-card form label { display: flex; flex: 1 1 260px; align-items: center; gap: 8px; font-size: 12px; }
.commissioning-review-card input[type="checkbox"] { flex: 0 0 18px; width: 18px; height: 18px; }
.commissioning-reading-verification { min-width: 0; padding: 8px 2px; border-top: 1px solid var(--border, rgba(148,163,184,.25)); }
.commissioning-reading-verification summary { cursor: pointer; line-height: 1.5; }
.commissioning-reading-verification p, .commissioning-reading-verification small { color: var(--muted); line-height: 1.5; }
.commissioning-reading-verification label { display: grid; min-width: 0; gap: 4px; font-size: 11px; }
.commissioning-reading-verification input { box-sizing: border-box; width: 100%; min-width: 0; min-height: 36px; font-size: 12px; }
.commissioning-reading-verification form > button { margin: 8px 6px 6px 0; }
.commissioning-reading-verification ol { max-height: 200px; overflow: auto; padding-left: 20px; }
.commissioning-reading-verification li { margin: 6px 0; line-height: 1.5; overflow-wrap: anywhere; }
.dashboard-commissioning-action-value-wrap.tolerance-invalid { border-color: #dc2626; }
.dashboard-commissioning-action-value-wrap.tolerance-recorded { border-color: #b7791f; }

.dashboard-commissioning-photo-upload {
  flex: 0 0 auto;
  cursor: pointer;
}

.dashboard-commissioning-photo-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.dashboard-commissioning-photo-chip {
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: center;
  gap: 7px;
  max-width: 260px;
  padding: 5px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
}

.dashboard-commissioning-photo-chip img,
.dashboard-commissioning-photo-chip svg {
  width: 32px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
}

.dashboard-commissioning-photo-chip strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-commissioning-photo-chip button {
  width: 24px;
  height: 24px;
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 8px;
  background: rgba(254, 242, 242, 0.82);
  color: #b91c1c;
  font-weight: 900;
  cursor: pointer;
}

.dashboard-commissioning-evidence-file-link {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.dashboard-commissioning-action-photo-chip .dashboard-commissioning-evidence-file-link {
  grid-template-columns: 24px minmax(0, 64px);
  gap: 4px;
}

.dashboard-commissioning-evidence-file-link.is-pdf svg {
  color: #dc2626;
  stroke: currentColor;
}

.dashboard-commissioning-evidence-file-link:hover strong {
  color: var(--blue);
  text-decoration: underline;
}

.dashboard-commissioning-load-card {
  display: grid;
  gap: 10px;
}

.dashboard-commissioning-load-card h2 {
  margin: 0;
  color: var(--text);
}

.dashboard-commissioning-load-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 720;
}

@media (max-width: 980px) {
  .dashboard-commissioning-summary,
  .dashboard-commissioning-task-grid {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-commissioning-notes-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .dashboard-commissioning-summary,
  .dashboard-commissioning-task-grid,
  .dashboard-commissioning-lead-card,
  .dashboard-commissioning-task-head,
  .dashboard-commissioning-service-panel-head,
  .dashboard-commissioning-action-item,
  .dashboard-commissioning-action-item.requires-value {
    grid-template-columns: 1fr;
  }

  .dashboard-commissioning-action-photo-cell {
    justify-content: flex-start;
  }

  .dashboard-commissioning-action-check-cell {
    width: 100%;
  }

  .dashboard-commissioning-status-stack {
    justify-items: start;
  }

  .dashboard-commissioning-check,
  .dashboard-commissioning-actions,
  .dashboard-engineering-panel-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

html[data-theme="dark"] .dashboard-commissioning-workspace {
  background:
    radial-gradient(circle at 12% 10%, rgba(10, 132, 255, 0.10), transparent 34%),
    radial-gradient(circle at 88% 8%, rgba(124, 58, 237, 0.10), transparent 30%),
    linear-gradient(135deg, rgba(15, 18, 24, 0.98), rgba(4, 6, 10, 0.98));
  color: var(--text);
}

html[data-theme="dark"] :is(
  .dashboard-commissioning-topbar,
  .dashboard-commissioning-summary article,
  .dashboard-commissioning-area,
  .dashboard-commissioning-load-card
) {
  border-color: rgba(226, 232, 240, 0.14);
  background: rgba(15, 23, 42, 0.68);
  box-shadow: var(--glass-edge), 0 18px 42px rgba(0, 0, 0, 0.34);
}

html[data-theme="dark"] .dashboard-commissioning-actions {
  border-color: rgba(10, 132, 255, 0.24);
  background: linear-gradient(145deg, rgba(10, 132, 255, 0.12), rgba(15, 23, 42, 0.72));
}

html[data-theme="dark"] .dashboard-commissioning-customer-report-actions {
  border-color: rgba(10, 132, 255, 0.22);
  background: rgba(2, 6, 23, 0.48);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 24px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] .dashboard-commissioning-customer-copy-button {
  border-color: rgba(96, 165, 250, 0.28);
  background: rgba(15, 23, 42, 0.78);
  color: #bfdbfe;
}

html[data-theme="dark"] .dashboard-commissioning-area-head {
  border-bottom-color: rgba(226, 232, 240, 0.12);
  background: rgba(15, 23, 42, 0.84);
}

html[data-theme="dark"] .dashboard-commissioning-area-head > strong {
  background: rgba(10, 132, 255, 0.18);
  color: #93c5fd;
}

html[data-theme="dark"] .dashboard-commissioning-zone {
  border-top-color: rgba(226, 232, 240, 0.10);
}

html[data-theme="dark"] .dashboard-commissioning-task-list,
html[data-theme="dark"] .dashboard-commissioning-service-panel-list {
  border-color: rgba(226, 232, 240, 0.12);
  background: rgba(2, 6, 23, 0.42);
}

html[data-theme="dark"] .dashboard-commissioning-task {
  border-bottom-color: rgba(226, 232, 240, 0.12);
  background: rgba(15, 23, 42, 0.58);
}

html[data-theme="dark"] .dashboard-commissioning-task.complete {
  border-color: rgba(74, 222, 128, 0.28);
  background: linear-gradient(145deg, rgba(21, 128, 61, 0.20), rgba(15, 23, 42, 0.64));
}

html[data-theme="dark"] .dashboard-commissioning-task-attention {
  color: #fca5a5;
}

html[data-theme="dark"] .dashboard-commissioning-task.expanded {
  background: rgba(20, 31, 52, 0.86);
}

html[data-theme="dark"] .dashboard-commissioning-task-toggle {
  border-color: rgba(96, 165, 250, 0.3);
  background: rgba(30, 64, 175, 0.2);
  color: #93c5fd;
}

html[data-theme="dark"] .dashboard-commissioning-task-toggle:hover {
  border-color: rgba(96, 165, 250, 0.48);
  background: rgba(30, 64, 175, 0.32);
}

html[data-theme="dark"] .dashboard-commissioning-ref {
  background: rgba(148, 163, 184, 0.16);
  color: #f8fafc;
}

html[data-theme="dark"] .dashboard-commissioning-service-panel {
  border-bottom-color: rgba(226, 232, 240, 0.10);
  background: rgba(15, 23, 42, 0.72);
}

html[data-theme="dark"] :is(
  .dashboard-commissioning-action-item,
  .dashboard-commissioning-check-info,
  .dashboard-commissioning-check-grid div,
  .dashboard-commissioning-document-list a,
  .dashboard-commissioning-document-list > span,
  .dashboard-commissioning-inline-checks,
  .dashboard-commissioning-inline-checks div,
  .dashboard-commissioning-photo-chip,
  .dashboard-commissioning-action-photo-chip
) {
  border-color: rgba(226, 232, 240, 0.12);
  background: rgba(2, 6, 23, 0.46);
  color: var(--text);
}

html[data-theme="dark"] .dashboard-commissioning-action-item {
  background: rgba(15, 23, 42, 0.74);
}

html[data-theme="dark"] .dashboard-commissioning-action-item:hover {
  border-color: rgba(96, 165, 250, 0.28);
  background: rgba(20, 31, 52, 0.88);
}

html[data-theme="dark"] .dashboard-commissioning-action-value-wrap,
html[data-theme="dark"] .dashboard-commissioning-task-grid input,
html[data-theme="dark"] .dashboard-commissioning-task-grid textarea,
html[data-theme="dark"] .dashboard-commissioning-project-select select,
html[data-theme="dark"] .dashboard-commissioning-lead-select select {
  border-color: rgba(226, 232, 240, 0.16);
  background: rgba(2, 6, 23, 0.68);
  color: var(--text);
}

html[data-theme="dark"] .dashboard-commissioning-action-value::placeholder,
html[data-theme="dark"] .dashboard-commissioning-task-grid input::placeholder,
html[data-theme="dark"] .dashboard-commissioning-task-grid textarea::placeholder {
  color: rgba(203, 213, 225, 0.58);
}

html[data-theme="dark"] .dashboard-commissioning-action-unit,
html[data-theme="dark"] .dashboard-commissioning-action-tolerance {
  border-left-color: rgba(226, 232, 240, 0.14);
  background: rgba(10, 132, 255, 0.14);
  color: #93c5fd;
}

html[data-theme="dark"] .dashboard-commissioning-action-value-wrap.tolerance-pass {
  border-color: rgba(74, 222, 128, 0.34);
  background: rgba(20, 83, 45, 0.38);
}

html[data-theme="dark"] .dashboard-commissioning-action-value-wrap.tolerance-fail {
  border-color: rgba(248, 113, 113, 0.38);
  background: rgba(127, 29, 29, 0.38);
}

html[data-theme="dark"] .dashboard-commissioning-action-check-cell {
  border-color: rgba(96, 165, 250, 0.24);
  background: rgba(15, 23, 42, 0.72);
}

html[data-theme="dark"] .dashboard-commissioning-action-check-cell.is-empty {
  border-color: rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.48);
}

html[data-theme="dark"] .dashboard-commissioning-action-check-cell.has-documents {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(120, 53, 15, 0.24);
}

html[data-theme="dark"] .dashboard-commissioning-action-check-cell > small,
html[data-theme="dark"] .dashboard-commissioning-check-info > strong {
  color: #60a5fa;
}

html[data-theme="dark"] .dashboard-commissioning-action-check-cell em,
html[data-theme="dark"] .dashboard-commissioning-action-document-link em,
html[data-theme="dark"] .dashboard-commissioning-check-grid span,
html[data-theme="dark"] .dashboard-commissioning-inline-checks small {
  color: #94a3b8;
}

html[data-theme="dark"] .dashboard-commissioning-action-check-cell strong,
html[data-theme="dark"] .dashboard-commissioning-check-grid strong,
html[data-theme="dark"] .dashboard-commissioning-inline-checks strong,
html[data-theme="dark"] .dashboard-commissioning-photo-chip strong,
html[data-theme="dark"] .dashboard-commissioning-action-photo-chip strong {
  color: #f8fafc;
}

html[data-theme="dark"] .dashboard-commissioning-action-document-link strong,
html[data-theme="dark"] .dashboard-commissioning-document-list svg,
html[data-theme="dark"] .dashboard-commissioning-evidence-file-link:hover strong {
  color: #60a5fa;
}

html[data-theme="dark"] .dashboard-commissioning-action-photo-upload,
html[data-theme="dark"] .dashboard-commissioning-photo-upload {
  border-color: rgba(226, 232, 240, 0.18);
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.86));
  color: #f8fafc;
  box-shadow: var(--glass-edge), 0 8px 18px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .dashboard-commissioning-action-photo-upload:hover,
html[data-theme="dark"] .dashboard-commissioning-photo-upload:hover {
  border-color: rgba(96, 165, 250, 0.42);
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.34), rgba(15, 23, 42, 0.92));
  color: #ffffff;
}

html[data-theme="dark"] .dashboard-commissioning-photo-chip button,
html[data-theme="dark"] .dashboard-commissioning-action-photo-chip button {
  border-color: rgba(248, 113, 113, 0.36);
  background: rgba(127, 29, 29, 0.42);
  color: #fecaca;
}

html[data-theme="dark"] .commissioning-badge {
  background: rgba(96, 165, 250, 0.18);
  color: #93c5fd;
}

html[data-theme="dark"] .commissioning-badge.gas {
  background: rgba(234, 179, 8, 0.20);
  color: #fde68a;
}

html[data-theme="dark"] .commissioning-badge.ventilation {
  background: rgba(16, 185, 129, 0.18);
  color: #86efac;
}

html[data-theme="dark"] .commissioning-badge.public-health {
  background: rgba(14, 165, 233, 0.18);
  color: #7dd3fc;
}

html[data-theme="dark"] .commissioning-badge.electrical {
  background: rgba(124, 58, 237, 0.22);
  color: #c4b5fd;
}

html[data-theme="dark"] .commissioning-badge.controls {
  background: rgba(217, 70, 239, 0.20);
  color: #f0abfc;
}

html[data-theme="dark"] .commissioning-badge.district {
  background: rgba(20, 184, 166, 0.18);
  color: #99f6e4;
}

html[data-theme="dark"] .project-settings-section h3 {
  color: var(--text);
}

html[data-theme="dark"] :is(
  .dashboard-engineering-nav,
  .dashboard-engineering-panel,
  .dashboard-empty-state,
  .account-message,
  .export-application-autofill
) {
  border-color: rgba(226, 232, 240, 0.14);
  background: rgba(15, 23, 42, 0.68);
  color: var(--text);
  box-shadow: var(--glass-edge), 0 18px 42px rgba(0, 0, 0, 0.30);
}

html[data-theme="dark"] .dashboard-engineering-nav button {
  border-color: rgba(226, 232, 240, 0.12);
  background: rgba(2, 6, 23, 0.48);
  color: var(--text);
}

html[data-theme="dark"] .dashboard-engineering-nav button:hover,
html[data-theme="dark"] .dashboard-engineering-nav button.active {
  border-color: rgba(96, 165, 250, 0.36);
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.26), rgba(15, 23, 42, 0.86));
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .dashboard-engineering-nav button > span {
  background: rgba(96, 165, 250, 0.16);
  color: #93c5fd;
}

html[data-theme="dark"] .dashboard-engineering-nav button small {
  color: #94a3b8;
}

html[data-theme="dark"] .export-application-data-card {
  border-color: rgba(226, 232, 240, 0.12);
  background: rgba(2, 6, 23, 0.44);
  color: var(--text);
}

.export-application-autofill {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(0, 122, 255, 0.18);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(233, 242, 255, 0.54));
  box-shadow: var(--glass-edge), 0 14px 30px rgba(0, 122, 255, 0.08);
}

.export-application-autofill-head {
  display: grid;
  gap: 4px;
}

.export-application-autofill-head span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 880;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.export-application-autofill-head strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 820;
  line-height: 1.25;
}

.export-application-data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.export-application-data-card {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.54);
  box-shadow: var(--glass-edge);
}

.export-application-data-card h4 {
  margin: 0 0 2px;
  color: var(--text);
  font-size: 12px;
  font-weight: 860;
}

.export-application-data-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(86px, 0.78fr) minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  padding-top: 6px;
  border-top: 1px solid rgba(101, 116, 139, 0.16);
}

.export-application-data-row span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 780;
}

.export-application-data-row strong {
  min-width: 0;
  color: var(--text);
  overflow: hidden;
  font-size: 11px;
  font-weight: 820;
  line-height: 1.25;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.export-application-data-row.is-empty strong {
  color: var(--muted);
  font-style: italic;
}

.export-application-video {
  display: grid;
  grid-template-columns: minmax(160px, 0.42fr) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: var(--radius);
  background: var(--tile-glass);
  box-shadow: var(--glass-edge), 0 10px 22px rgba(0, 0, 0, 0.055);
}

.export-application-video-preview {
  min-height: 104px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background:
    radial-gradient(circle at 58% 42%, rgba(0, 122, 255, 0.24), transparent 28%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(0, 122, 255, 0.44));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.export-application-video-preview span {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  clip-path: polygon(32% 22%, 32% 78%, 80% 50%);
}

.export-application-video strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 860;
}

.export-application-video p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  line-height: 1.35;
}

.change-log-list {
  display: grid;
  gap: 10px;
  min-height: 0;
  max-height: min(560px, calc(100dvh - 190px));
  margin: 12px 0 0;
  padding: 0 4px 2px 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--blue) 38%, var(--line)) transparent;
  list-style: none;
}

.change-log-list::-webkit-scrollbar {
  width: 7px;
}

.change-log-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: color-mix(in srgb, var(--blue) 34%, var(--line));
}

.change-log-item {
  display: grid;
  gap: 8px;
}

.change-log-entry {
  width: 100%;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: var(--radius);
  background: var(--tile-glass);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
  box-shadow: var(--glass-edge), 0 8px 18px rgba(0, 0, 0, 0.045);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.change-log-entry:hover,
.change-log-entry:focus-visible,
.change-log-item.restore-pending .change-log-entry {
  border-color: var(--blue-border);
  background: var(--control-hover-bg);
  box-shadow: var(--control-hover-shadow);
  transform: translateY(-1px);
}

.change-log-entry.persisted-history-entry {
  cursor: default;
}

.change-log-entry.persisted-history-entry:hover {
  border-color: rgba(255, 255, 255, 0.58);
  background: var(--tile-glass);
  box-shadow: var(--glass-edge), 0 8px 18px rgba(0, 0, 0, 0.045);
  transform: none;
}

.history-feed-status {
  justify-self: start;
  margin-top: 2px;
  padding: 3px 6px;
  border: 1px solid color-mix(in srgb, var(--blue) 20%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--blue) 7%, var(--surface-soft));
  color: color-mix(in srgb, var(--blue) 72%, var(--muted));
  font-size: 9px;
  font-weight: 850;
  line-height: 1;
}

.history-restore-confirm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--blue-border);
  border-radius: var(--radius);
  background: var(--blue-soft);
  box-shadow: var(--glass-edge), 0 12px 26px rgba(0, 122, 255, 0.1);
}

.history-restore-confirm span {
  color: var(--text);
  font-size: 12px;
  font-weight: 820;
}

.history-restore-confirm div {
  display: flex;
  gap: 8px;
}

.history-restore-confirm button {
  min-height: 32px;
  padding-inline: 14px;
}

.methodology-intro,
.methodology-summary {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: var(--radius);
  background: var(--tile-glass);
  color: var(--text);
  box-shadow: var(--glass-edge), 0 8px 18px rgba(0, 0, 0, 0.045);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.methodology-intro p,
.methodology-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  font-weight: 650;
}

.methodology-coverage {
  display: grid;
  gap: 11px;
  margin-top: 12px;
  padding: 13px;
  border: 1px solid color-mix(in srgb, var(--blue) 24%, var(--line));
  border-radius: 14px;
  background:
    radial-gradient(circle at 92% 8%, color-mix(in srgb, var(--blue) 15%, transparent), transparent 36%),
    color-mix(in srgb, var(--surface-solid) 92%, transparent);
  box-shadow: var(--glass-edge), 0 12px 28px rgba(0, 122, 255, 0.08);
}

.methodology-coverage-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.methodology-coverage-head > div {
  display: grid;
  gap: 3px;
}

.methodology-coverage-head span {
  color: var(--blue);
  font-size: 9px;
  font-weight: 920;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.methodology-coverage-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.methodology-coverage-head > small {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid color-mix(in srgb, var(--blue) 22%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--blue) 8%, var(--surface-solid));
  color: color-mix(in srgb, var(--blue) 74%, var(--muted));
  font-size: 9px;
  font-weight: 850;
}

.methodology-system-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.methodology-system-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  min-height: 118px;
  padding: 10px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--blue) 19%, var(--line));
  border-radius: 11px;
  background: color-mix(in srgb, var(--surface-solid) 93%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 7px 17px rgba(15, 23, 42, 0.045);
}

.methodology-system-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--blue);
}

.methodology-system-card.is-disabled {
  filter: saturate(0.55);
  opacity: 0.64;
}

.methodology-system-card.is-disabled::before {
  background: var(--muted);
}

.methodology-system-card > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}

.methodology-system-card strong {
  min-width: 0;
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
}

.methodology-system-status {
  flex: 0 0 auto;
  max-width: 92px;
  padding: 4px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--blue) 10%, var(--surface-soft));
  color: color-mix(in srgb, var(--blue) 72%, var(--text));
  font-size: 7.5px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
}

.methodology-system-card p {
  margin: 0;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 650;
  line-height: 1.35;
}

.methodology-system-card > small {
  align-self: end;
  color: color-mix(in srgb, var(--blue) 68%, var(--muted));
  font-size: 8px;
  font-weight: 850;
}

.methodology-status-note {
  margin: 0;
  padding: 9px 10px;
  border: 1px solid color-mix(in srgb, #f59e0b 34%, var(--line));
  border-radius: 9px;
  background: color-mix(in srgb, #f59e0b 8%, var(--surface-soft));
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.45;
}

.methodology-status-note strong {
  color: var(--text);
}

.methodology-summary-advisory {
  border-color: color-mix(in srgb, #f59e0b 32%, var(--line));
  background: color-mix(in srgb, #f59e0b 7%, var(--tile-glass));
}

.methodology-summary-manual {
  border-color: color-mix(in srgb, #64748b 34%, var(--line));
  background: color-mix(in srgb, #64748b 7%, var(--tile-glass));
}

.methodology-sections {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.methodology-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.method-card {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: var(--radius);
  background: var(--tile-glass);
  box-shadow: var(--glass-edge), 0 8px 18px rgba(0, 0, 0, 0.045);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.method-card h4 {
  margin: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 840;
}

.method-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  font-weight: 620;
}

.method-card code {
  display: block;
  padding: 8px 9px;
  border: 1px solid rgba(0, 122, 255, 0.18);
  border-radius: 6px;
  background: rgba(0, 122, 255, 0.08);
  color: #174ea6;
  font-size: 11px;
  font-weight: 760;
  white-space: normal;
}

.methodology-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.method-detail-card {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: var(--radius);
  background: var(--tile-glass);
  box-shadow: var(--glass-edge), 0 8px 18px rgba(0, 0, 0, 0.04);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.method-detail-card h4 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 840;
}

.method-detail-card ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.method-detail-card li {
  position: relative;
  padding-left: 13px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.38;
  font-weight: 620;
}

.method-detail-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
  transform: translateY(-50%);
}

.method-flow {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: method-step;
}

.method-flow li {
  counter-increment: method-step;
  position: relative;
  display: grid;
  gap: 3px;
  min-height: 42px;
  padding: 9px 10px 9px 44px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: var(--radius);
  background: var(--tile-glass);
  box-shadow: var(--glass-edge), 0 8px 18px rgba(0, 0, 0, 0.04);
}

.method-flow li::before {
  content: counter(method-step);
  position: absolute;
  left: 10px;
  top: 10px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 11px;
  font-weight: 840;
}

.method-flow strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 820;
}

.method-flow span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  font-weight: 620;
}

@media (max-width: 780px) {
  .methodology-system-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .methodology-detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .methodology-coverage-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .methodology-system-grid,
  .methodology-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .methodology-system-card {
    min-height: 0;
  }
}

.change-log-entry time {
  color: #526176;
  font-size: 11px;
  font-weight: 760;
}

.change-log-entry div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.change-log-entry strong {
  color: #172033;
  font-size: 12px;
  font-weight: 820;
}

.change-log-entry span {
  color: #647184;
  font-size: 11px;
  font-weight: 620;
  overflow-wrap: anywhere;
}

.change-log-empty {
  min-height: 190px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #647184;
  text-align: center;
}

.change-log-empty svg {
  color: #4b5563;
}

.change-log-empty strong {
  color: #172033;
  font-size: 13px;
  font-weight: 820;
}

.change-log-empty span {
  max-width: 260px;
  font-size: 12px;
  font-weight: 620;
}

.project-settings-tabs {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
  margin: 12px 0 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.44);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scroll-padding-inline: 3px;
}

.project-settings-tabs button {
  flex: 1 0 auto;
  height: auto;
  min-height: 34px;
  padding: 7px 11px;
  line-height: 1.35;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #526176;
  font-size: 12px;
  font-weight: 780;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.project-settings-tabs button.active,
.project-settings-tabs button[aria-selected="true"] {
  border-color: var(--blue-border);
  background: linear-gradient(180deg, rgba(0, 122, 255, 0.16), rgba(0, 122, 255, 0.09));
  color: #0057b8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76), 0 6px 18px rgba(0, 122, 255, 0.10);
}

.project-settings-tabs button:not(.active):not([aria-selected="true"]):hover {
  border-color: var(--control-hover-border);
  background: var(--control-hover-bg);
  color: #374151;
  box-shadow: var(--control-hover-shadow);
  transform: translateY(-1px);
}

html[data-theme="dark"] .project-settings-tabs {
  border-color: rgba(239, 246, 255, 0.12);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: var(--glass-edge);
}

html[data-theme="dark"] .project-settings-tabs button {
  color: var(--muted);
}

html[data-theme="dark"] .project-settings-tabs button.active,
html[data-theme="dark"] .project-settings-tabs button[aria-selected="true"] {
  border-color: var(--blue-border);
  background: linear-gradient(180deg, rgba(10, 132, 255, 0.30), rgba(10, 132, 255, 0.14));
  color: #e0f2fe;
  box-shadow: var(--glass-edge), 0 8px 20px rgba(10, 132, 255, 0.16);
}

html[data-theme="dark"] .project-settings-tabs button:not(.active):not([aria-selected="true"]):hover {
  color: var(--text);
}

.project-settings-tab-panel {
  min-height: 280px;
}

.project-settings-section {
  padding: 12px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.project-settings-tab-panel > .settings-collapsible-section {
  margin-top: 0;
  margin-bottom: 10px;
}

.project-settings-section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.project-settings-section h3 {
  margin: 0 0 8px;
  color: #223047;
  font-size: 12px;
  font-weight: 820;
}

.settings-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.settings-section-head h3 {
  margin: 0;
}

.settings-mini-btn,
.danger-mini {
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 780;
  white-space: nowrap;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.settings-mini-btn {
  border: 1px solid rgba(255, 255, 255, 0.62);
  background: var(--button-glass);
  color: #4b5563;
  box-shadow: var(--glass-edge), 0 5px 12px rgba(0, 0, 0, 0.05);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.danger-mini {
  border: 1px solid #fecaca;
  background: #fff7f7;
  color: #991b1b;
}

.danger-mini:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.settings-mini-btn:not(:disabled):hover,
.secondary-mini:not(.active):not(:disabled):hover {
  border-color: var(--control-hover-border);
  background: var(--control-hover-bg);
  color: #374151;
  box-shadow: var(--control-hover-shadow);
  transform: translateY(-1px);
}

.settings-mini-btn.danger {
  border-color: #fecaca;
  color: #991b1b;
}

.danger-btn:not(:disabled):hover,
.danger-mini:not(:disabled):hover {
  border-color: var(--danger-hover-border);
  background: var(--danger-hover-bg);
  color: #be123c;
  box-shadow: var(--danger-hover-shadow);
  transform: translateY(-1px);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 12px;
}

.settings-grid.uvalue-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.user-account-tile,
.company-logo-card {
  display: grid;
  grid-template-columns: minmax(190px, 240px) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.user-profile-card,
.company-logo-preview,
.company-logo-copy {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.50);
  border-radius: var(--radius);
  background: var(--tile-glass);
  box-shadow: var(--glass-edge), 0 10px 22px rgba(0, 0, 0, 0.055);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.user-profile-card {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 14px;
}

.user-profile-avatar {
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  border: 1px solid var(--blue-border);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(0, 122, 255, 0.24), rgba(255, 255, 255, 0.34));
  color: var(--blue);
  overflow: hidden;
  box-shadow: var(--glass-edge), 0 14px 28px rgba(0, 122, 255, 0.14);
}

.user-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-profile-avatar span {
  font-size: 28px;
  font-weight: 880;
  letter-spacing: 0;
}

.user-profile-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.user-account-fields {
  min-width: 0;
}

.auth-cloud-card {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.50);
  border-radius: var(--radius);
  background: var(--tile-glass);
  box-shadow: var(--glass-edge), 0 10px 22px rgba(0, 0, 0, 0.055);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.auth-cloud-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.auth-cloud-head > div,
.auth-cloud-meta {
  min-width: 0;
}

.auth-cloud-head span,
.auth-cloud-meta span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.auth-cloud-head strong,
.auth-cloud-meta strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 13px;
  font-weight: 860;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-cloud-head small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 680;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-cloud-actions {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 8px;
}

.auth-cloud-message {
  margin: 0;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.48);
  color: #334155;
  font-size: 11px;
  font-weight: 720;
}

.auth-cloud-message.saved {
  border-color: rgba(34, 197, 94, 0.28);
  background: rgba(240, 253, 244, 0.72);
  color: #166534;
}

.auth-cloud-message.error {
  border-color: rgba(248, 113, 113, 0.36);
  background: rgba(254, 242, 242, 0.82);
  color: #991b1b;
}

.auth-company-requests {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.50);
  border-radius: var(--radius);
  background: var(--tile-glass);
  box-shadow: var(--glass-edge), 0 10px 22px rgba(0, 0, 0, 0.055);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.auth-company-requests-head,
.auth-company-request {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.auth-company-requests-head span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.auth-company-requests-head strong,
.auth-company-request strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 860;
}

.auth-company-request-list {
  display: grid;
  gap: 8px;
}

.auth-company-request {
  align-items: flex-start;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.42);
}

.auth-company-request small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 680;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 3px 8px;
  border: 1px solid var(--blue-border);
  border-radius: 999px;
  background: rgba(0, 122, 255, 0.10);
  color: var(--blue);
  font-size: 10px;
  font-weight: 860;
  letter-spacing: 0.02em;
}

.auth-company-request-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.auth-gate-backdrop {
  position: fixed;
  z-index: 60;
  inset: 0;
  display: grid;
  place-items: start center;
  overflow-y: auto;
  padding: 24px;
  pointer-events: auto;
  background:
    radial-gradient(circle at 50% 18%, rgba(0, 122, 255, 0.14), transparent 34%),
    rgba(241, 245, 249, 0.62);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.auth-gate-card {
  width: min(560px, calc(100vw - 32px));
  margin-block: auto;
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.48));
  box-shadow: var(--glass-edge), 0 28px 72px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(28px) saturate(170%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
}

.auth-gate-kicker {
  color: var(--blue);
  font-size: 11px;
  font-weight: 860;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-gate-card h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
  font-weight: 900;
}

.auth-gate-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 720;
}

.auth-gate-form {
  display: grid;
  gap: 12px;
}

.auth-gate-form .settings-field {
  min-height: auto;
  padding: 10px;
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(255, 255, 255, 0.58);
}

.auth-gate-form .settings-field > span {
  font-size: 11px;
  color: var(--muted);
}

.auth-gate-form input,
.auth-gate-form select {
  min-height: 38px;
}

.auth-legal-summary {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(236, 253, 245, 0.94), rgba(239, 246, 255, 0.82));
}

.auth-legal-summary strong {
  color: #047857;
  font-size: 12px;
  font-weight: 900;
}

.auth-legal-summary p {
  color: #475569;
  font-size: 11px;
  line-height: 1.45;
  font-weight: 700;
}

.auth-legal-consent {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 11px 12px;
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-radius: 12px;
  background: rgba(239, 246, 255, 0.72);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  font-weight: 720;
}

.auth-legal-consent input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 1px 0 0;
  accent-color: var(--blue);
}

.auth-remember-device { color: var(--text); font-size: 13px; }
.auth-remember-device small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 500; }

.auth-legal-consent button {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font: inherit;
  font-weight: 880;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.auth-legal-consent button:hover,
.auth-legal-consent button:focus-visible {
  color: var(--blue-strong, #005ecb);
}

.auth-gate-primary,
.auth-gate-secondary {
  min-width: 150px;
  justify-content: center;
}

.auth-gate-meta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.auth-gate-meta span {
  color: var(--blue);
  font-weight: 880;
}

.auth-gate-meta strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-service-recovery,
.auth-service-recovery-actions {
  display: grid;
  gap: 8px;
}

.auth-service-recovery-actions {
  grid-template-columns: repeat(auto-fit, minmax(150px, max-content));
  align-items: center;
}

.auth-service-recovery-actions .settings-mini-btn {
  justify-content: center;
  text-decoration: none;
}

.project-setup-backdrop {
  position: fixed;
  z-index: 130;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: auto;
  background:
    radial-gradient(circle at 50% 18%, rgba(0, 122, 255, 0.12), transparent 34%),
    rgba(241, 245, 249, 0.58);
  backdrop-filter: blur(16px) saturate(145%);
  -webkit-backdrop-filter: blur(16px) saturate(145%);
}

.project-setup-card {
  --setup-chevron-a: rgba(255, 255, 255, 0.50);
  --setup-chevron-b: rgba(0, 122, 255, 0.15);
  --setup-chevron-line: rgba(0, 122, 255, 0.23);
  --setup-firework-blue: var(--blue);
  --setup-firework-pale: rgba(255, 255, 255, 0.96);
  width: min(1040px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  display: grid;
  gap: 14px;
  padding: 22px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.54));
  box-shadow: var(--glass-edge), 0 28px 72px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(28px) saturate(170%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
}

.project-setup-card.project-setup-floor-active {
  width: min(1280px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 8px;
  padding: 14px;
  overflow: hidden;
}

.project-setup-card.project-setup-defaults-active {
  width: min(1180px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  gap: 8px;
  padding: 14px;
}

.project-setup-header {
  display: grid;
  grid-template-columns: minmax(120px, 190px) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding-bottom: 4px;
}

.project-setup-floor-active .project-setup-header {
  grid-template-columns: minmax(130px, 180px) minmax(0, 1fr);
  gap: 18px;
  padding-bottom: 0;
}

.project-setup-defaults-active .project-setup-header {
  grid-template-columns: minmax(110px, 155px) minmax(0, 1fr);
  gap: 14px;
  padding-bottom: 0;
}

.project-setup-floor-active .project-setup-logo .brand-logo-wordmark {
  max-width: 170px;
}

.project-setup-defaults-active .project-setup-logo .brand-logo-wordmark {
  max-width: 150px;
}

.project-setup-logo .brand-logo-wordmark {
  width: 100%;
  max-width: 180px;
}

.project-setup-kicker {
  color: var(--blue);
  font-size: 11px;
  font-weight: 880;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-setup-card h1,
.project-setup-card h2,
.project-setup-card p {
  margin: 0;
}

.project-setup-card h1 {
  color: var(--text);
  font-size: clamp(24px, 3.6vw, 40px);
  line-height: 1.04;
  font-weight: 900;
}

.project-setup-card p {
  color: var(--muted);
  max-width: 720px;
  font-size: clamp(12px, 1.25vw, 15px);
  line-height: 1.45;
  font-weight: 760;
}

.project-setup-card.project-setup-floor-active .project-setup-header h1 {
  max-width: 100%;
  font-size: clamp(26px, 3.4vw, 48px);
  line-height: 0.98;
}

.project-setup-card.project-setup-floor-active .project-setup-header p {
  max-width: none;
  font-size: clamp(11px, 1.05vw, 14px);
  line-height: 1.22;
}

.project-setup-card.project-setup-defaults-active .project-setup-header h1 {
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1;
}

.project-setup-card.project-setup-defaults-active .project-setup-header p {
  max-width: none;
  font-size: 11px;
  line-height: 1.25;
}

.project-setup-progress {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--setup-step-count, 4), minmax(0, 1fr));
  gap: 7px;
  padding: 6px 0 5px;
  overflow: hidden;
}

.project-setup-defaults-active .project-setup-progress {
  gap: 5px;
  padding: 3px 0;
}

.project-setup-progress-flow {
  display: none;
}

.project-setup-progress-flow span {
  min-width: 0;
  opacity: 0.78;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 10px;
  background:
    linear-gradient(90deg, var(--setup-chevron-a), var(--setup-chevron-b)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 62%);
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 50%, calc(100% - 24px) 100%, 0 100%, 18px 50%);
  transform: translateX(-7px);
}

.project-setup-progress-flow span:nth-child(2) {
  animation-delay: -0.9s;
}

.project-setup-progress-flow span:nth-child(3) {
  animation-delay: -1.8s;
}

.project-setup-step {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto auto;
  gap: 6px;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 34px;
  padding: 6px 8px;
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.30);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.56);
  overflow: hidden;
  isolation: isolate;
}

.project-setup-defaults-active .project-setup-step {
  min-height: 30px;
  padding: 4px 7px;
}

.project-setup-step::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  opacity: 0.76;
  background: linear-gradient(90deg, var(--setup-chevron-a), var(--setup-chevron-b));
}

.project-setup-step::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  opacity: 0.40;
  background-color: var(--setup-chevron-line);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 42 42'%3E%3Cpath d='M3 4H18L38 21L18 38H3L23 21Z' fill='black'/%3E%3C/svg%3E");
  -webkit-mask-position: center;
  -webkit-mask-size: calc(100% / 6) 100%;
  -webkit-mask-repeat: repeat-x;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 42 42'%3E%3Cpath d='M3 4H18L38 21L18 38H3L23 21Z' fill='black'/%3E%3C/svg%3E");
  mask-position: center;
  mask-size: calc(100% / 6) 100%;
  mask-repeat: repeat-x;
  transition: opacity 220ms ease, transform 220ms ease;
}

.project-setup-step span {
  position: relative;
  z-index: 1;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
}

.project-setup-defaults-active .project-setup-step span {
  width: 18px;
  height: 18px;
  font-size: 9px;
}

.project-setup-step strong {
  position: relative;
  z-index: 1;
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: 10.5px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-setup-defaults-active .project-setup-step strong {
  font-size: 10px;
}

.project-setup-step.active,
.project-setup-step.complete {
  color: var(--blue);
  border-color: rgba(0, 122, 255, 0.34);
  background: rgba(0, 122, 255, 0.16);
  --setup-chevron-line: rgba(0, 122, 255, 0.32);
  --setup-chevron-a: rgba(255, 255, 255, 0.52);
  --setup-chevron-b: rgba(0, 122, 255, 0.20);
}

.project-setup-step.active::after {
  opacity: 0.55;
  animation: projectSetupChevronPulse 1.8s ease-in-out infinite;
}

.project-setup-step.active span,
.project-setup-step.complete span {
  color: white;
  border-color: rgba(0, 122, 255, 0.42);
  background: var(--blue);
}

.project-setup-section {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.32);
}

.project-setup-step-panel:not([hidden]) {
  animation: projectSetupStepPanelIn 260ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.project-setup-card [hidden] {
  display: none !important;
}

.project-setup-section h2 {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.project-setup-defaults-panel {
  gap: 8px;
  padding: 10px;
}

.project-setup-defaults-panel h2 {
  font-size: 12px;
  line-height: 1.1;
}

.project-setup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.project-setup-grid .full {
  grid-column: 1 / -1;
}

.project-system-selection {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.30);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.project-system-selection-setup {
  margin-top: 2px;
}

.project-system-selection-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.project-system-selection-head > div {
  display: grid;
  gap: 2px;
}

.project-system-selection-head strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.project-system-selection-head span,
.project-system-selection-head > small,
.project-system-selection-note {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.35;
}

.project-system-selection-head > small {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--blue);
  background: rgba(0, 122, 255, 0.10);
  font-weight: 800;
}

.project-system-selection-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.project-system-option {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  min-height: 58px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.project-system-option:hover {
  border-color: rgba(0, 122, 255, 0.42);
  transform: translateY(-1px);
}

.project-system-option:has(input:checked) {
  border-color: rgba(0, 122, 255, 0.50);
  background: rgba(0, 122, 255, 0.09);
}

.project-system-option input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--blue);
}

.project-system-option > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.project-system-option strong {
  color: var(--text);
  font-size: 11.5px;
  font-weight: 850;
}

.project-system-option small {
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.25;
}

.project-system-selection-note {
  margin: 0;
}

.project-system-selection.has-error {
  border-color: rgba(220, 38, 38, 0.62);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.10);
}

.project-system-selection.has-error .project-system-selection-note {
  color: #b91c1c;
  font-weight: 750;
}

.project-setup-temperature-group {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.28);
}

.project-setup-default-controls {
  grid-template-columns: minmax(150px, 0.8fr) minmax(170px, 1fr) minmax(170px, 1fr);
  gap: 8px;
}

.project-setup-default-controls .project-setup-toggle {
  min-height: 44px;
  padding: 0 9px;
  justify-content: flex-start;
}

.project-setup-default-controls .settings-field,
.project-setup-compact-temperatures .settings-field,
.project-setup-pipe-system-selection .settings-field {
  gap: 3px;
}

.project-setup-compact-temperatures {
  gap: 7px;
  padding: 8px;
}

.project-setup-compact-temperatures .project-setup-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.project-setup-compact-temperatures .settings-field input,
.project-setup-compact-temperatures .settings-field select,
.project-setup-default-controls .settings-field input,
.project-setup-default-controls .settings-field select,
.project-setup-default-controls .settings-toggle,
.project-setup-pipe-system-selection .settings-field select {
  height: 30px;
  font-size: 11.5px;
}

.project-setup-compact-temperatures .input-unit {
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 3px;
}

.project-setup-compact-temperatures .settings-field-label,
.project-setup-default-controls .settings-field-label {
  min-height: 14px;
  font-size: 10px;
}

.project-setup-group-head {
  display: grid;
  gap: 3px;
}

.project-setup-group-head strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
}

.project-setup-group-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  line-height: 1.25;
}

.pipe-system-selection-group {
  margin-top: 10px;
}

.project-setup-pipe-system-selection {
  gap: 7px;
  margin-top: 0;
  padding: 8px;
}

.settings-pipe-system-selection {
  margin: 10px 0;
}

.pipe-system-selection-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.pipe-system-selection-card {
  display: grid;
  min-width: 0;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.34);
}

.project-setup-pipe-system-selection .pipe-system-selection-grid {
  gap: 7px;
}

.project-setup-pipe-system-selection .pipe-system-selection-card {
  gap: 6px;
  padding: 7px;
}

.project-setup-pipe-system-selection .project-setup-group-head span {
  display: none;
}

.project-setup-pipe-system-selection .pipe-system-selection-title span {
  font-size: 9.5px;
}

.project-setup-pipe-system-selection .pipe-system-selection-card .settings-field {
  padding: 6px;
}

.pipe-system-selection-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.pipe-system-selection-title strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
}

.pipe-system-selection-title span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pipe-system-selection-card .settings-field {
  min-height: 0;
  padding: 8px;
}

.pipe-system-selection-card .settings-field-label {
  font-size: 10px;
}

.pipe-system-selection-card .settings-field select {
  min-width: 0;
  height: 36px;
  font-size: 12px;
}

.pipe-system-selection-note {
  margin: 0;
  padding: 9px 10px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.72);
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  line-height: 1.35;
}

.project-setup-toggle {
  min-height: 70px;
  align-self: stretch;
}

.project-setup-uvalues {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.project-setup-uvalue-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.project-setup-floor-panel {
  padding: 10px;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.project-setup-floor-grid {
  display: grid;
  grid-template-columns: minmax(230px, 0.38fr) minmax(0, 1.62fr);
  gap: 10px;
  align-items: start;
  min-height: 100%;
  height: auto;
}

.project-setup-floor-side {
  display: grid;
  gap: 8px;
  min-height: 0;
  align-content: start;
}

.project-setup-floor-manager {
  gap: 5px;
}

.project-setup-floor-manager .cal-meta,
.project-setup-floor-meta {
  padding: 6px;
}

.project-setup-floor-guide {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52);
}

.project-setup-guide-kicker {
  width: max-content;
  padding: 3px 7px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  border: 1px solid rgba(0, 122, 255, 0.24);
  border-radius: 999px;
  background: rgba(0, 122, 255, 0.08);
}

.project-setup-guide-list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: setup-guide;
}

.project-setup-guide-list li {
  counter-increment: setup-guide;
  position: relative;
  display: grid;
  gap: 2px;
  padding: 6px 6px 6px 30px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.24);
}

.project-setup-guide-list li::before {
  content: counter(setup-guide);
  position: absolute;
  left: 6px;
  top: 7px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: white;
  font-size: 11px;
  font-weight: 900;
  border-radius: 999px;
  background: var(--blue);
}

.project-setup-guide-list strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
}

.project-setup-guide-list span,
.project-setup-skip-note {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  font-weight: 720;
}

.project-setup-pdf-card {
  display: grid;
  grid-template-rows: none;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 8px;
  min-height: 0;
  min-width: 0;
  overflow: visible;
}

.project-setup-pdf-card.floor-plan-card-pdf .datum-preview-wrap {
  height: clamp(220px, 30vh, 330px);
  min-height: 0;
}

.project-setup-pdf-card.floor-plan-card-pdf .datum-preview {
  height: 100%;
  min-height: 0;
}

.project-setup-calibration-strip {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.project-setup-calibration-strip .cal-setup {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.project-setup-calibration-strip .cal-steps {
  grid-template-columns: minmax(0, 1fr) minmax(120px, 0.8fr) auto auto;
  gap: 6px;
}

.project-setup-calibration-strip .cal-meta {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
}

.project-setup-calibration-strip label {
  font-size: 10px;
}

.project-setup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  align-items: center;
}

.project-setup-action-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.project-setup-actions .primary-mini {
  min-width: 150px;
  justify-content: center;
}

.project-setup-complete-card {
  min-height: min(460px, calc(100vh - 96px));
  place-items: center;
  overflow: hidden;
}

.project-setup-complete {
  position: relative;
  width: 100%;
  min-height: 380px;
  display: grid;
  place-items: center;
  text-align: center;
}

.project-setup-complete-copy {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58), 0 20px 54px rgba(15, 23, 42, 0.13);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

.project-setup-complete-copy h1 {
  font-size: clamp(30px, 4.2vw, 48px);
}

.project-setup-fireworks {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.project-setup-firework {
  position: absolute;
  width: var(--firework-size, 150px);
  height: var(--firework-size, 150px);
  border-radius: 999px;
  opacity: 0;
  background:
    radial-gradient(circle, var(--setup-firework-pale) 0 4px, transparent 5px),
    conic-gradient(
      from var(--firework-rotation, 0deg),
      transparent 0deg 10deg,
      var(--setup-firework-blue) 10deg 14deg,
      transparent 14deg 42deg,
      var(--setup-firework-pale) 42deg 47deg,
      transparent 47deg 78deg,
      rgba(0, 122, 255, 0.72) 78deg 83deg,
      transparent 83deg 116deg,
      var(--setup-firework-pale) 116deg 121deg,
      transparent 121deg 166deg,
      var(--setup-firework-blue) 166deg 170deg,
      transparent 170deg 214deg,
      var(--setup-firework-pale) 214deg 219deg,
      transparent 219deg 256deg,
      rgba(0, 122, 255, 0.68) 256deg 261deg,
      transparent 261deg 312deg,
      var(--setup-firework-pale) 312deg 317deg,
      transparent 317deg 360deg
    );
  filter: drop-shadow(0 12px 28px rgba(0, 122, 255, 0.28));
  mask: radial-gradient(circle, transparent 0 22%, #000 23% 58%, transparent 59%);
  -webkit-mask: radial-gradient(circle, transparent 0 22%, #000 23% 58%, transparent 59%);
  animation: projectSetupFirework 1.35s ease-out infinite;
}

.firework-one {
  --firework-size: 176px;
  --firework-rotation: -12deg;
  left: 8%;
  top: 12%;
}

.firework-two {
  --firework-size: 132px;
  --firework-rotation: 28deg;
  right: 12%;
  top: 18%;
  animation-delay: 0.24s;
}

.firework-three {
  --firework-size: 210px;
  --firework-rotation: 58deg;
  left: 54%;
  bottom: -2%;
  animation-delay: 0.42s;
}

@keyframes projectSetupChevronPulse {
  0%,
  100% {
    opacity: 0.42;
    transform: translateX(0);
  }

  50% {
    opacity: 0.62;
    transform: translateX(2px);
  }
}

@keyframes projectSetupStepPanelIn {
  from {
    opacity: 0;
    transform: translateX(12px) scale(0.994);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@media (max-height: 860px) {
  .project-setup-card.project-setup-floor-active {
    width: min(1320px, calc(100vw - 16px));
    max-height: calc(100vh - 12px);
    padding: 10px;
  }

  .project-setup-floor-active .project-setup-header {
    grid-template-columns: minmax(112px, 150px) minmax(0, 1fr);
    gap: 14px;
  }

  .project-setup-floor-active .project-setup-logo .brand-logo-wordmark {
    max-width: 145px;
  }

  .project-setup-card.project-setup-floor-active .project-setup-header h1 {
    font-size: clamp(22px, 2.8vw, 38px);
  }

  .project-setup-card.project-setup-floor-active .project-setup-header p {
    font-size: 11px;
  }

  .project-setup-floor-active .project-setup-progress {
    gap: 5px;
    padding: 4px 0;
  }

  .project-setup-floor-active .project-setup-step {
    min-height: 30px;
    padding: 5px 7px;
  }

  .project-setup-pdf-card.floor-plan-card-pdf .datum-preview-wrap {
    height: clamp(180px, 24vh, 250px);
  }

  .project-setup-skip-note {
    display: none;
  }
}

@keyframes projectSetupFirework {
  0% {
    opacity: 0;
    transform: scale(0.16) rotate(-8deg);
  }

  26% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: scale(1.16) rotate(18deg);
  }
}

@media (max-width: 720px) {
  .project-setup-header,
  .project-setup-actions {
    grid-template-columns: 1fr;
  }

  .project-setup-progress,
  .project-setup-grid,
  .project-setup-uvalue-grid,
  .pipe-system-selection-grid,
  .project-system-selection-grid,
  .project-setup-temperature-group .project-setup-grid,
  .project-setup-floor-grid {
    grid-template-columns: 1fr;
  }

  .project-setup-action-buttons {
    justify-content: stretch;
  }

  .project-setup-action-buttons > button {
    flex: 1 1 140px;
  }

  .project-setup-progress-flow {
    display: none;
  }
}

.company-logo-preview {
  min-height: 144px;
  display: grid;
  place-items: center;
  gap: 5px;
  padding: 12px;
  color: var(--muted);
  text-align: center;
  overflow: hidden;
}

.company-logo-preview.has-logo {
  background:
    linear-gradient(45deg, rgba(148, 163, 184, 0.10) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(148, 163, 184, 0.10) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(148, 163, 184, 0.10) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(148, 163, 184, 0.10) 75%),
    var(--tile-glass);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

.company-logo-preview img {
  max-width: 100%;
  max-height: 118px;
  object-fit: contain;
}

.company-logo-empty {
  display: grid;
  place-items: center;
  gap: 6px;
}

.company-logo-preview svg {
  width: 30px;
  height: 30px;
  color: var(--blue);
}

.company-logo-preview strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 820;
}

.company-logo-preview small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.company-logo-copy {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 14px;
}

.company-logo-copy strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 840;
}

.company-logo-copy p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  font-weight: 650;
}

.company-logo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.company-logo-actions .settings-field-label {
  flex-basis: 100%;
}

html[data-theme="dark"] .user-profile-avatar {
  background: linear-gradient(145deg, rgba(10, 132, 255, 0.26), rgba(255, 255, 255, 0.06));
}

.uvalue-setpoint-card {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 5px;
  background: var(--tile-glass);
  box-shadow: var(--glass-edge), 0 8px 18px rgba(0, 0, 0, 0.045);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.uvalue-setpoint-note {
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
  line-height: 1.35;
}

.infiltration-preset-card {
  display: grid;
  gap: 8px;
  margin-bottom: 9px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: var(--radius);
  background: var(--tile-glass);
  box-shadow: var(--glass-edge), 0 8px 18px rgba(0, 0, 0, 0.045);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.ventilation-sizing-preset-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(240px, 1fr);
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--blue) 26%, var(--line));
  border-radius: var(--radius);
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--blue) 9%, var(--surface-solid)),
    color-mix(in srgb, #7c3aed 7%, var(--surface-solid))
  );
  box-shadow: var(--glass-edge), 0 8px 18px rgba(0, 0, 0, 0.045);
}

.ventilation-ductwork-defaults {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--blue) 22%, var(--line));
  border-radius: var(--radius);
  background: var(--tile-glass);
  box-shadow: var(--glass-edge), 0 8px 18px rgba(0, 0, 0, 0.045);
}

.ventilation-sizing-group-head {
  display: grid;
  gap: 2px;
}

.ventilation-sizing-group-head strong {
  color: var(--ink);
  font-size: 13px;
}

.ventilation-sizing-group-head small,
.ventilation-ductwork-default-grid .settings-field > small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
}

.settings-grid.defaults-grid.ventilation-ductwork-default-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ventilation-sizing-preset-card p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  line-height: 1.45;
}

.ventilation-sizing-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.ventilation-sizing-group {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(176, 196, 224, 0.44);
  border-radius: var(--radius);
  background: var(--tile-glass);
  box-shadow: var(--glass-edge), 0 8px 18px rgba(0, 0, 0, 0.045);
}

.ventilation-sizing-group > div:first-child {
  display: grid;
  gap: 2px;
}

.ventilation-sizing-group strong {
  color: var(--ink);
  font-size: 13px;
}

.ventilation-sizing-group small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
}

.ventilation-sizing-group .settings-grid.defaults-grid {
  grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 980px) {
  .ventilation-sizing-groups {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-grid.defaults-grid.ventilation-ductwork-default-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 620px) {
  .ventilation-sizing-preset-card {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }
}

/* Manufacturer-backed drainage pipe catalogue */
.pipe-system-selection-card.drainage-pipe-defaults {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.drainage-pipe-system-default-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  min-width: 0;
}

.drainage-pipe-system-default {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.drainage-pipe-system-default-list > .pipe-system-selection-note {
  grid-column: 1 / -1;
  padding: 6px 8px;
}

.drainage-pipe-system-default .settings-field {
  min-width: 0;
  padding: 6px;
}

.drainage-pipe-system-default .settings-field select {
  width: 100%;
  max-width: 100%;
  height: 34px;
  overflow: hidden;
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drainage-pipe-system-default .pipe-product-suitability {
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 5px;
  min-height: 54px;
  margin: 0;
  padding: 6px;
  border-radius: 6px;
  box-shadow: none;
}

.drainage-pipe-system-default .pipe-product-suitability > svg {
  width: 14px;
  height: 14px;
}

.drainage-pipe-system-default .pipe-product-suitability strong {
  font-size: 9px;
}

.drainage-pipe-system-default .pipe-product-suitability small {
  font-size: 8.5px;
  line-height: 1.22;
}

.drainage-pipe-insulation-default .settings-field {
  align-self: start;
}

.pipework-takeoff-product-meta,
.pipework-takeoff-data-basis {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  line-height: 1.25;
}

.pipework-takeoff-data-basis {
  max-width: 260px;
  overflow-wrap: anywhere;
}

@media (max-width: 1050px) {
  .drainage-pipe-system-default-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .drainage-pipe-system-default-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .drainage-pipe-system-default-list > .pipe-system-selection-note {
    grid-column: auto;
  }
}

/* Manufacturer-backed electrical cable catalogue and preliminary selection */
.pipe-system-selection-card.electrical-cable-defaults {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.electrical-cable-system-default-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  min-width: 0;
}

.electrical-cable-system-default-list > .pipe-system-selection-note {
  grid-column: 1 / -1;
  padding: 6px 8px;
}

.electrical-cable-system-default-list .settings-field {
  min-width: 0;
  padding: 6px;
}

.electrical-cable-system-default-list .settings-field input,
.electrical-cable-system-default-list .settings-field select {
  width: 100%;
  max-width: 100%;
  height: 34px;
  overflow: hidden;
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.electrical-cable-checkbox-field {
  grid-template-columns: 18px minmax(0, 1fr) !important;
  align-items: center;
  align-content: center;
  min-height: 46px;
}

.electrical-cable-checkbox-field > input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  margin: 0;
}

.electrical-cable-checkbox-field > span,
.electrical-cable-checkbox-field > .settings-field-label {
  min-width: 0;
  line-height: 1.25;
}

.electrical-cable-design-status {
  display: grid;
  gap: 3px;
  padding: 8px 9px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.78);
}

.electrical-cable-design-status.pass {
  border-color: rgba(34, 197, 94, 0.34);
  background: rgba(240, 253, 244, 0.84);
}

.electrical-cable-design-status.fail {
  border-color: rgba(239, 68, 68, 0.36);
  background: rgba(254, 242, 242, 0.86);
}

.electrical-cable-design-status.review {
  border-color: rgba(245, 158, 11, 0.38);
  background: rgba(255, 251, 235, 0.86);
}

.electrical-cable-design-status strong {
  color: var(--ink);
  font-size: 11px;
}

.electrical-cable-design-status small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 720;
  line-height: 1.3;
}

.electrical-cable-design-issues {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 8px 8px 8px 24px;
  border-radius: 8px;
  background: rgba(255, 251, 235, 0.72);
  color: var(--muted);
  font-size: 9px;
  font-weight: 720;
  line-height: 1.35;
}

.electrical-cable-defaults-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.electrical-cable-draft-spec {
  grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 1050px) {
  .electrical-cable-system-default-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .electrical-cable-system-default-list,
  .electrical-cable-defaults-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .electrical-cable-system-default-list > .pipe-system-selection-note {
    grid-column: auto;
  }
}

.settings-grid.defaults-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pipe-panel .pipe-plant-card .settings-grid.defaults-grid {
  grid-template-columns: minmax(0, 1fr);
}

.pipe-panel .compact-field-grid {
  grid-template-columns: minmax(0, 1fr);
}

.pipe-panel .pipe-plant-card .field {
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) minmax(86px, 104px);
}

.pipe-panel .product-selection-facts dt,
.pipe-panel .product-selection-facts dd {
  min-width: 0;
  overflow-wrap: anywhere;
}

.pipe-panel .product-selection-facts dd {
  white-space: normal;
}

.pipe-panel-actions.top-actions {
  display: grid;
  gap: 6px;
}

.simplified-pipe-card {
  gap: 8px;
}

.pipe-menu-card.product-selection-card {
  gap: 9px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.pipe-menu-card > .product-selection-eyebrow,
.pipe-menu-card > strong,
.pipe-menu-card > small {
  padding: 0 2px;
}

.pipe-menu-card > small {
  margin-bottom: 1px;
}

.pipe-menu-section {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 9px;
  overflow: hidden;
  border: 1px solid rgba(147, 197, 253, 0.45);
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(248, 251, 255, 0.76)),
    color-mix(in srgb, var(--surface-solid) 90%, transparent);
  box-shadow: var(--glass-edge), 0 9px 22px rgba(15, 23, 42, 0.045);
}

.pipe-menu-section--top {
  border-color: rgba(59, 130, 246, 0.42);
  background:
    linear-gradient(145deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.78)),
    color-mix(in srgb, var(--surface-solid) 92%, transparent);
}

.pipe-menu-section-head {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.pipe-menu-section-head span {
  color: var(--blue);
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.035em;
  line-height: 1.08;
  text-transform: uppercase;
}

.pipe-menu-section-head small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 760;
  line-height: 1.2;
}

.pipe-menu-section-body {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.pipe-panel .pipe-menu-section .compact-field-grid {
  gap: 7px;
}

.pipe-panel .pipe-menu-section .field {
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 760;
}

.pipe-panel .pipe-menu-section .settings-toggle-inline {
  width: 100%;
  min-height: 32px;
  margin: 0;
  padding: 7px 8px;
  border: 1px solid rgba(148, 163, 184, 0.20);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
  box-shadow: var(--glass-edge);
}

.pipe-panel .pipe-menu-section .pipe-selection-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.pipe-panel .pipe-menu-section .pipe-selection-facts div {
  min-width: 0;
  padding: 7px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-solid) 90%, transparent);
  box-shadow: var(--glass-edge);
}

.pipe-panel .pipe-menu-section .pipe-selection-facts dt {
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 850;
  letter-spacing: 0.025em;
  line-height: 1.05;
  text-transform: uppercase;
}

.pipe-panel .pipe-menu-section .pipe-selection-facts dd {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 10.5px;
  font-weight: 880;
  line-height: 1.12;
  white-space: normal;
}

.pipe-panel .pipe-menu-section .field-note {
  padding: 7px;
  border: 1px solid rgba(10, 132, 255, 0.16);
  border-radius: 8px;
  background: rgba(10, 132, 255, 0.06);
}

.pipe-menu-section--actions {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(248, 250, 252, 0.62)),
    color-mix(in srgb, var(--surface-solid) 88%, transparent);
}

html[data-theme="dark"] .pipe-menu-section {
  border-color: rgba(234, 234, 236, 0.18);
  background:
    linear-gradient(145deg, rgba(40, 41, 45, 0.54), rgba(17, 18, 20, 0.32)),
    var(--glass-strong);
  box-shadow: var(--glass-edge), 0 12px 28px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] .pipe-menu-section--top {
  border-color: rgba(234, 234, 236, 0.22);
  background:
    linear-gradient(145deg, rgba(48, 49, 54, 0.54), rgba(19, 20, 23, 0.34)),
    var(--glass-strong);
}

html[data-theme="dark"] .pipe-menu-section--actions {
  background:
    linear-gradient(145deg, rgba(38, 39, 43, 0.46), rgba(16, 17, 19, 0.30)),
    var(--glass-strong);
}

html[data-theme="dark"] .pipe-panel .pipe-menu-section .settings-toggle-inline,
html[data-theme="dark"] .pipe-panel .pipe-menu-section .pipe-selection-facts div,
html[data-theme="dark"] .pipe-panel .pipe-menu-section .field-note {
  border-color: rgba(234, 234, 236, 0.13);
  background: rgba(25, 26, 29, 0.42);
}

html[data-theme="dark"] .pipe-panel .pipe-menu-section .settings-toggle-inline,
html[data-theme="dark"] .pipe-panel .pipe-menu-section .pipe-selection-facts dd {
  color: var(--text);
}

.workspace.locked-floor-plan .product-panel:not(.closed-panel),
.workspace.locked-floor-plan .pipe-panel:not(.closed-panel) {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 10px;
  border-color: rgba(147, 197, 253, 0.48);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(241, 247, 255, 0.80)),
    color-mix(in srgb, var(--glass-strong) 88%, transparent);
  box-shadow: var(--glass-edge), 0 18px 46px rgba(15, 23, 42, 0.12);
  overscroll-behavior: contain;
}

.workspace.locked-floor-plan .product-panel .panel-head,
.workspace.locked-floor-plan .pipe-panel .panel-head {
  position: sticky;
  top: 0;
  z-index: 6;
  min-width: 0;
  margin: -2px -2px 0;
  padding: 8px 9px;
  border: 1px solid rgba(147, 197, 253, 0.48);
  border-radius: 11px;
  background:
    linear-gradient(145deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.84)),
    color-mix(in srgb, var(--surface-solid) 92%, transparent);
  box-shadow: var(--glass-edge), 0 8px 18px rgba(15, 23, 42, 0.055);
  backdrop-filter: blur(20px) saturate(1.18);
  -webkit-backdrop-filter: blur(20px) saturate(1.18);
}

.workspace.locked-floor-plan .product-panel .panel-head h2,
.workspace.locked-floor-plan .pipe-panel .panel-head h2 {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace.locked-floor-plan .product-panel .panel-head button,
.workspace.locked-floor-plan .pipe-panel .panel-head button {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
  color: var(--muted);
  font-size: 18px;
  font-weight: 780;
  line-height: 1;
  box-shadow: var(--glass-edge);
}

.workspace.locked-floor-plan .product-panel .panel-head button:hover,
.workspace.locked-floor-plan .pipe-panel .panel-head button:hover {
  border-color: rgba(10, 132, 255, 0.30);
  background: rgba(10, 132, 255, 0.10);
  color: var(--blue);
  transform: translateY(-1px);
}

.workspace.locked-floor-plan .product-panel .product-selection-section,
.workspace.locked-floor-plan .pipe-panel .product-selection-section {
  gap: 9px;
}

.workspace.locked-floor-plan .product-panel .product-selection-section > .field.full,
.workspace.locked-floor-plan .pipe-panel .product-selection-section > .field.full {
  padding: 9px;
  border: 1px solid rgba(147, 197, 253, 0.34);
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(248, 251, 255, 0.70)),
    color-mix(in srgb, var(--surface-solid) 90%, transparent);
  box-shadow: var(--glass-edge), 0 7px 16px rgba(15, 23, 42, 0.035);
}

.workspace.locked-floor-plan .product-panel .product-selection-card:not(.pipe-menu-card),
.workspace.locked-floor-plan .product-panel .product-selection-empty,
.workspace.locked-floor-plan .pipe-panel .product-selection-card:not(.pipe-menu-card),
.workspace.locked-floor-plan .pipe-panel .product-selection-empty {
  gap: 8px;
  padding: 9px;
  overflow: hidden;
  border: 1px solid rgba(147, 197, 253, 0.42);
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(248, 251, 255, 0.76)),
    color-mix(in srgb, var(--surface-solid) 90%, transparent);
  box-shadow: var(--glass-edge), 0 9px 22px rgba(15, 23, 42, 0.045);
}

.workspace.locked-floor-plan .product-panel .product-selection-card:not(.pipe-menu-card) > .product-selection-eyebrow:first-child,
.workspace.locked-floor-plan .pipe-panel .product-selection-card:not(.pipe-menu-card) > .product-selection-eyebrow:first-child,
.workspace.locked-floor-plan .product-panel .product-selection-empty > strong:first-child,
.workspace.locked-floor-plan .pipe-panel .product-selection-empty > strong:first-child {
  display: block;
  min-width: 0;
  margin: -9px -9px 1px;
  padding: 7px 9px;
  border-bottom: 1px solid rgba(147, 197, 253, 0.36);
  border-radius: 9px 9px 0 0;
  background:
    linear-gradient(180deg, rgba(239, 246, 255, 0.96), rgba(230, 242, 255, 0.74));
  color: var(--blue);
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.035em;
  line-height: 1.12;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace.locked-floor-plan .product-panel .product-selection-empty > strong:first-child,
.workspace.locked-floor-plan .pipe-panel .product-selection-empty > strong:first-child {
  color: var(--text);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
}

.workspace.locked-floor-plan .product-panel .product-selection-card:not(.pipe-menu-card) > strong,
.workspace.locked-floor-plan .pipe-panel .product-selection-card:not(.pipe-menu-card) > strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.15;
}

.workspace.locked-floor-plan .product-panel .product-selection-card:not(.pipe-menu-card) > small,
.workspace.locked-floor-plan .product-panel .product-selection-card:not(.pipe-menu-card) > em,
.workspace.locked-floor-plan .pipe-panel .product-selection-card:not(.pipe-menu-card) > small,
.workspace.locked-floor-plan .pipe-panel .product-selection-card:not(.pipe-menu-card) > em {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 740;
  line-height: 1.35;
}

.workspace.locked-floor-plan .product-panel .field,
.workspace.locked-floor-plan .product-panel .settings-field,
.workspace.locked-floor-plan .pipe-panel .field,
.workspace.locked-floor-plan .pipe-panel .settings-field {
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 5px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 780;
  line-height: 1.15;
}

.workspace.locked-floor-plan .product-panel .settings-grid.defaults-grid,
.workspace.locked-floor-plan .product-panel .compact-field-grid,
.workspace.locked-floor-plan .pipe-panel .settings-grid.defaults-grid,
.workspace.locked-floor-plan .pipe-panel .compact-field-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
}

.workspace.locked-floor-plan .product-panel .field select,
.workspace.locked-floor-plan .product-panel .field > input,
.workspace.locked-floor-plan .product-panel .settings-field input,
.workspace.locked-floor-plan .product-panel .settings-field select,
.workspace.locked-floor-plan .product-panel .input-unit input,
.workspace.locked-floor-plan .pipe-panel .field select,
.workspace.locked-floor-plan .pipe-panel .field > input,
.workspace.locked-floor-plan .pipe-panel .settings-field input,
.workspace.locked-floor-plan .pipe-panel .settings-field select,
.workspace.locked-floor-plan .pipe-panel .input-unit input {
  height: 32px;
  border-color: rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
  font-size: 11.5px;
  font-weight: 720;
}

.workspace.locked-floor-plan .product-panel .input-unit,
.workspace.locked-floor-plan .pipe-panel .input-unit {
  grid-template-columns: minmax(0, 1fr) max-content;
  border-radius: 8px;
}

.workspace.locked-floor-plan .product-panel .input-unit small,
.workspace.locked-floor-plan .pipe-panel .input-unit small {
  min-width: 24px;
  padding-inline: 2px;
  text-align: right;
}

.workspace.locked-floor-plan .product-panel .pipe-panel-actions.top-actions,
.workspace.locked-floor-plan .pipe-panel .pipe-panel-actions.top-actions {
  gap: 6px;
  padding: 7px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
  box-shadow: var(--glass-edge);
}

.workspace.locked-floor-plan .product-panel .secondary-btn.wide,
.workspace.locked-floor-plan .product-panel .danger-btn.wide,
.workspace.locked-floor-plan .pipe-panel .secondary-btn.wide,
.workspace.locked-floor-plan .pipe-panel .danger-btn.wide {
  min-height: 32px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 850;
}

.workspace.locked-floor-plan .product-panel .product-selection-facts,
.workspace.locked-floor-plan .pipe-panel .product-selection-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.workspace.locked-floor-plan .product-panel .product-selection-facts div,
.workspace.locked-floor-plan .pipe-panel .product-selection-facts div {
  min-width: 0;
  display: grid;
  gap: 2px;
  align-items: start;
  justify-content: stretch;
  padding: 7px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-solid) 90%, transparent);
  box-shadow: var(--glass-edge);
}

.workspace.locked-floor-plan .product-panel .product-selection-facts dt,
.workspace.locked-floor-plan .pipe-panel .product-selection-facts dt {
  min-width: 0;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 850;
  letter-spacing: 0.025em;
  line-height: 1.05;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.workspace.locked-floor-plan .product-panel .product-selection-facts dd,
.workspace.locked-floor-plan .pipe-panel .product-selection-facts dd {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: 10.5px;
  font-weight: 880;
  line-height: 1.12;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

.workspace.locked-floor-plan .product-panel .field-note,
.workspace.locked-floor-plan .pipe-panel .field-note {
  padding: 7px;
  border: 1px solid rgba(10, 132, 255, 0.16);
  border-radius: 8px;
  background: rgba(10, 132, 255, 0.06);
  color: var(--muted);
  font-size: 10.5px;
}

.workspace.locked-floor-plan .product-panel .product-static-row,
.workspace.locked-floor-plan .pipe-panel .product-static-row,
.workspace.locked-floor-plan .product-panel .product-toggle-switch,
.workspace.locked-floor-plan .pipe-panel .product-toggle-switch {
  border-color: rgba(148, 163, 184, 0.20);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
}

.workspace.locked-floor-plan .product-panel .custom-heat-emitter-editor,
.workspace.locked-floor-plan .product-panel .custom-outlet-editor,
.workspace.locked-floor-plan .pipe-panel .custom-heat-emitter-editor,
.workspace.locked-floor-plan .pipe-panel .custom-outlet-editor {
  padding: 9px;
  border-color: rgba(147, 197, 253, 0.36);
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(239, 246, 255, 0.82), rgba(255, 255, 255, 0.64)),
    color-mix(in srgb, var(--surface-solid) 88%, transparent);
}

html[data-theme="dark"] .workspace.locked-floor-plan .product-panel:not(.closed-panel),
html[data-theme="dark"] .workspace.locked-floor-plan .pipe-panel:not(.closed-panel) {
  border-color: rgba(234, 234, 236, 0.20);
  background:
    linear-gradient(180deg, rgba(42, 43, 47, 0.58), rgba(17, 18, 20, 0.44)),
    var(--glass-strong);
  box-shadow: var(--glass-edge), 0 18px 46px rgba(0, 0, 0, 0.30);
}

html[data-theme="dark"] .workspace.locked-floor-plan .product-panel .panel-head,
html[data-theme="dark"] .workspace.locked-floor-plan .pipe-panel .panel-head,
html[data-theme="dark"] .workspace.locked-floor-plan .product-panel .product-selection-card:not(.pipe-menu-card),
html[data-theme="dark"] .workspace.locked-floor-plan .product-panel .product-selection-empty,
html[data-theme="dark"] .workspace.locked-floor-plan .pipe-panel .product-selection-card:not(.pipe-menu-card),
html[data-theme="dark"] .workspace.locked-floor-plan .pipe-panel .product-selection-empty,
html[data-theme="dark"] .workspace.locked-floor-plan .product-panel .product-selection-section > .field.full,
html[data-theme="dark"] .workspace.locked-floor-plan .pipe-panel .product-selection-section > .field.full {
  border-color: rgba(234, 234, 236, 0.16);
  background:
    linear-gradient(145deg, rgba(39, 40, 44, 0.52), rgba(17, 18, 20, 0.34)),
    var(--glass-strong);
}

html[data-theme="dark"] .workspace.locked-floor-plan .product-panel .product-selection-card:not(.pipe-menu-card) > .product-selection-eyebrow:first-child,
html[data-theme="dark"] .workspace.locked-floor-plan .pipe-panel .product-selection-card:not(.pipe-menu-card) > .product-selection-eyebrow:first-child,
html[data-theme="dark"] .workspace.locked-floor-plan .product-panel .product-selection-empty > strong:first-child,
html[data-theme="dark"] .workspace.locked-floor-plan .pipe-panel .product-selection-empty > strong:first-child {
  border-bottom-color: rgba(234, 234, 236, 0.16);
  background:
    linear-gradient(180deg, rgba(50, 51, 56, 0.48), rgba(20, 21, 24, 0.32));
}

html[data-theme="dark"] .workspace.locked-floor-plan .product-panel .field select,
html[data-theme="dark"] .workspace.locked-floor-plan .product-panel .field > input,
html[data-theme="dark"] .workspace.locked-floor-plan .product-panel .settings-field input,
html[data-theme="dark"] .workspace.locked-floor-plan .product-panel .settings-field select,
html[data-theme="dark"] .workspace.locked-floor-plan .product-panel .input-unit input,
html[data-theme="dark"] .workspace.locked-floor-plan .pipe-panel .field select,
html[data-theme="dark"] .workspace.locked-floor-plan .pipe-panel .field > input,
html[data-theme="dark"] .workspace.locked-floor-plan .pipe-panel .settings-field input,
html[data-theme="dark"] .workspace.locked-floor-plan .pipe-panel .settings-field select,
html[data-theme="dark"] .workspace.locked-floor-plan .pipe-panel .input-unit input,
html[data-theme="dark"] .workspace.locked-floor-plan .product-panel .pipe-panel-actions.top-actions,
html[data-theme="dark"] .workspace.locked-floor-plan .pipe-panel .pipe-panel-actions.top-actions,
html[data-theme="dark"] .workspace.locked-floor-plan .product-panel .product-selection-facts div,
html[data-theme="dark"] .workspace.locked-floor-plan .pipe-panel .product-selection-facts div,
html[data-theme="dark"] .workspace.locked-floor-plan .product-panel .product-static-row,
html[data-theme="dark"] .workspace.locked-floor-plan .pipe-panel .product-static-row,
html[data-theme="dark"] .workspace.locked-floor-plan .product-panel .product-toggle-switch,
html[data-theme="dark"] .workspace.locked-floor-plan .pipe-panel .product-toggle-switch {
  border-color: rgba(234, 234, 236, 0.13);
  background: rgba(25, 26, 29, 0.42);
}

html[data-theme="dark"] .workspace.locked-floor-plan .product-panel .field-note,
html[data-theme="dark"] .workspace.locked-floor-plan .pipe-panel .field-note {
  border-color: rgba(96, 165, 250, 0.18);
  background: rgba(10, 132, 255, 0.10);
}

.compact-facts {
  gap: 5px;
}

.settings-collapsible-section {
  margin-top: 0;
}

.internal-gain-defaults,
.internal-gain-counts {
  display: grid;
  gap: 6px;
}

.internal-gain-default-head,
.internal-gain-default-row,
.internal-gain-count-head,
.internal-gain-count-row {
  display: grid;
  align-items: center;
  gap: 8px;
}

.internal-gain-default-head,
.internal-gain-default-row {
  grid-template-columns: minmax(180px, 1fr) minmax(130px, 190px);
}

.internal-gain-count-head,
.internal-gain-count-row {
  grid-template-columns: minmax(0, 1fr) 58px 72px;
}

.internal-gain-default-head,
.internal-gain-count-head {
  padding: 0 2px;
  color: #64748b;
  font-size: 10px;
  font-weight: 820;
  text-transform: uppercase;
}

.internal-gain-default-head span:last-child,
.internal-gain-count-head span:nth-child(2),
.internal-gain-count-head span:last-child {
  text-align: right;
}

.internal-gain-default-row,
.internal-gain-count-row {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 5px;
  background: var(--tile-glass);
  color: #223047;
  font-size: 11px;
  font-weight: 720;
  box-shadow: var(--glass-edge);
}

.internal-gain-default-row > span:first-child,
.internal-gain-count-row > span:first-child {
  min-width: 0;
}

.internal-gain-count-row > span:first-child {
  display: grid;
  gap: 2px;
  overflow-wrap: anywhere;
  line-height: 1.22;
}

.internal-gain-count-row small {
  color: #64748b;
  font-size: 10px;
  font-weight: 650;
}

.internal-gain-count-row input {
  min-width: 0;
  height: 27px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--input-glass);
  color: var(--text);
  padding: 0 6px;
  text-align: right;
  font-size: 11px;
  font-weight: 720;
}

.internal-gain-count-row strong {
  color: #172033;
  text-align: right;
  font-size: 11px;
  font-weight: 820;
}

.inspector .internal-gain-count-head {
  display: none;
}

.inspector .internal-gain-count-row {
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 7px;
}

.inspector .internal-gain-count-row strong {
  grid-column: 1 / -1;
  color: #475569;
  text-align: left;
  font-size: 10px;
}

.settings-field {
  display: grid;
  gap: 5px;
  color: #354259;
  font-size: 11px;
  font-weight: 680;
  position: relative;
}

.settings-field-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  max-width: 100%;
  min-height: 16px;
}

.settings-cost-source {
  color: var(--muted);
  font-size: 9px;
  font-weight: 680;
  line-height: 1.25;
}

.settings-tooltip-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.settings-tooltip {
  width: 15px;
  height: 15px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--blue-border);
  border-radius: 999px;
  background: var(--button-glass);
  color: var(--blue);
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  cursor: help;
  box-shadow: var(--glass-edge);
}

.settings-tooltip:focus {
  outline: 2px solid rgba(75, 85, 99, 0.3);
  outline-offset: 2px;
}

.settings-tooltip-bubble {
  position: absolute;
  z-index: 50;
  left: 50%;
  bottom: calc(100% + 8px);
  width: 260px;
  max-width: min(260px, calc(100vw - 56px));
  padding: 8px 9px;
  border: 1px solid var(--tooltip-border);
  border-radius: 6px;
  background: var(--tooltip-bg);
  color: var(--tooltip-text);
  box-shadow: var(--tooltip-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
  text-transform: none;
  display: none;
  transform: translate(calc(-50% + var(--tooltip-shift-x, 0px)), 4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.settings-tooltip-wrap.align-left .settings-tooltip-bubble {
  left: 0;
  transform: translate(var(--tooltip-shift-x, 0px), 4px);
}

.settings-tooltip-wrap.align-right .settings-tooltip-bubble {
  right: 0;
  left: auto;
  transform: translate(var(--tooltip-shift-x, 0px), 4px);
}

.settings-tooltip-wrap.align-below .settings-tooltip-bubble {
  top: calc(100% + 8px);
  bottom: auto;
}

.settings-tooltip-bubble::after {
  content: "";
  position: absolute;
  left: calc(50% - var(--tooltip-shift-x, 0px));
  top: 100%;
  width: 8px;
  height: 8px;
  background: var(--tooltip-arrow-bg);
  border-right: 1px solid var(--tooltip-border);
  border-bottom: 1px solid var(--tooltip-border);
  transform: translate(-50%, -4px) rotate(45deg);
}

.settings-tooltip-wrap.align-left .settings-tooltip-bubble::after {
  left: 12px;
  transform: translate(0, -4px) rotate(45deg);
}

.settings-tooltip-wrap.align-right .settings-tooltip-bubble::after {
  right: 12px;
  left: auto;
  transform: translate(0, -4px) rotate(45deg);
}

.settings-tooltip-wrap.align-below .settings-tooltip-bubble::after {
  top: auto;
  bottom: 100%;
  transform: translate(-50%, 4px) rotate(45deg);
}

.settings-tooltip-wrap.align-left.align-below .settings-tooltip-bubble::after,
.settings-tooltip-wrap.align-right.align-below .settings-tooltip-bubble::after {
  transform: translate(0, 4px) rotate(45deg);
}

.settings-tooltip-wrap:hover .settings-tooltip,
.settings-tooltip:focus {
  border-color: var(--blue-border);
  background: var(--blue-soft);
  color: var(--blue);
}

.settings-tooltip-wrap:hover .settings-tooltip-bubble,
.settings-tooltip:focus + .settings-tooltip-bubble,
.settings-tooltip-wrap.open .settings-tooltip-bubble {
  display: block;
  opacity: 1;
  transform: translate(calc(-50% + var(--tooltip-shift-x, 0px)), 0);
}

.settings-tooltip-wrap.align-left:hover .settings-tooltip-bubble,
.settings-tooltip-wrap.align-left .settings-tooltip:focus + .settings-tooltip-bubble,
.settings-tooltip-wrap.align-left.open .settings-tooltip-bubble,
.settings-tooltip-wrap.align-right:hover .settings-tooltip-bubble,
.settings-tooltip-wrap.align-right .settings-tooltip:focus + .settings-tooltip-bubble,
.settings-tooltip-wrap.align-right.open .settings-tooltip-bubble {
  transform: translate(var(--tooltip-shift-x, 0px), 0);
}

.settings-field.full {
  grid-column: 1 / -1;
}

.settings-field input,
.settings-field select,
.settings-toggle {
  min-width: 0;
  height: 31px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--input-glass);
  color: var(--text);
  padding: 0 8px;
  font-size: 12px;
  font-weight: 640;
  box-shadow: var(--glass-edge), 0 1px 2px rgba(0, 0, 0, 0.035);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.settings-field input[readonly] {
  background: rgba(245, 245, 247, 0.72);
  color: #475569;
}

.address-autocomplete-menu {
  position: absolute;
  z-index: 120;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  gap: 4px;
  max-height: min(260px, 42vh);
  padding: 6px;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow), var(--glass-edge);
  backdrop-filter: blur(22px) saturate(1.28);
  -webkit-backdrop-filter: blur(22px) saturate(1.28);
}

.address-autocomplete-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 34px;
  padding: 7px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 720;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}

.address-autocomplete-option:hover,
.address-autocomplete-option:focus-visible {
  outline: none;
  background: var(--blue-soft);
  color: var(--blue);
}

.address-autocomplete-postcode {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
  font-weight: 820;
}

html[data-theme="dark"] .settings-field input[readonly] {
  border-color: rgba(239, 246, 255, 0.16);
  background: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}

html[data-theme="dark"] .address-autocomplete-menu {
  border-color: rgba(239, 246, 255, 0.18);
  background: rgba(18, 24, 34, 0.9);
}

html[data-theme="dark"] .address-autocomplete-option:hover,
html[data-theme="dark"] .address-autocomplete-option:focus-visible {
  background: rgba(0, 122, 255, 0.18);
  color: #dbeafe;
}

.settings-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  color: #223047;
  font-size: 12px;
  font-weight: 740;
}

.settings-toggle-inline {
  margin-bottom: 8px;
}

.settings-toggle-field {
  width: 100%;
  align-self: end;
}

.settings-toggle input {
  width: 15px;
  height: 15px;
  padding: 0;
}

.room-service-toggles,
.annual-energy-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 6px 0 0;
}

.room-service-toggles .settings-toggle,
.annual-energy-controls .settings-toggle {
  min-height: 32px;
  margin-bottom: 0;
}

.annual-energy-controls .settings-toggle {
  padding: 8px 10px;
  border: 1px solid rgba(10, 132, 255, 0.2);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(239, 246, 255, 0.28));
  box-shadow: var(--glass-edge), 0 8px 18px rgba(15, 23, 42, 0.055);
}

html[data-theme="dark"] .annual-energy-controls .settings-toggle {
  border-color: rgba(10, 132, 255, 0.24);
  background: linear-gradient(145deg, rgba(42, 43, 48, 0.34), rgba(8, 9, 11, 0.12));
  box-shadow: var(--glass-edge), 0 10px 22px rgba(0, 0, 0, 0.18);
}

.room-service-note {
  margin-top: 6px;
}

.linked-space-summary {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(241, 245, 249, 0.42));
  box-shadow: var(--glass-edge), 0 8px 20px rgba(15, 23, 42, 0.055);
}

.linked-space-summary.active {
  border-color: rgba(10, 132, 255, 0.28);
  background: linear-gradient(145deg, rgba(239, 246, 255, 0.8), rgba(255, 255, 255, 0.56));
}

.linked-space-summary > span,
.linked-room-section-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 860;
  text-transform: uppercase;
}

.linked-space-summary dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.linked-space-summary dl div {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
}

.linked-space-summary dt,
.linked-space-summary dd {
  margin: 0;
}

.linked-space-summary dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.linked-space-summary dd {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.linked-room-current,
.linked-room-options {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.linked-room-row,
.linked-room-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.linked-room-option {
  cursor: pointer;
  color: var(--text);
  text-align: left;
}

.linked-room-row span,
.linked-room-option span {
  min-width: 0;
  font-size: 12px;
  font-weight: 860;
}

.linked-room-row small,
.linked-room-option small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.linked-room-option strong {
  color: #0a84ff;
  font-size: 11px;
  font-weight: 900;
}

.secondary-btn.compact {
  height: 30px;
  font-size: 11px;
}

html[data-theme="dark"] .linked-space-summary,
html[data-theme="dark"] .linked-room-row,
html[data-theme="dark"] .linked-room-option {
  border-color: rgba(148, 163, 184, 0.24);
  background: linear-gradient(145deg, rgba(42, 43, 48, 0.34), rgba(8, 9, 11, 0.12));
}

html[data-theme="dark"] .linked-space-summary.active {
  border-color: rgba(10, 132, 255, 0.32);
  background: linear-gradient(145deg, rgba(10, 132, 255, 0.14), rgba(8, 9, 11, 0.16));
}

html[data-theme="dark"] .linked-space-summary dl div {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.045);
}

.zone-inline-warning {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  margin: 8px 0 10px;
  padding: 10px 11px;
  border: 1px solid rgba(245, 158, 11, 0.62);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.20), rgba(245, 158, 11, 0.12));
  color: #92400e;
  font-size: 11px;
  font-weight: 720;
  line-height: 1.35;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.64), 0 8px 18px rgba(245, 158, 11, 0.10);
}

.zone-inline-warning-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(245, 158, 11, 0.48);
  border-radius: 999px;
  background: rgba(255, 251, 235, 0.72);
  color: #b45309;
}

.zone-inline-warning-icon svg {
  width: 16px;
  height: 16px;
}

/* Text-only warnings have no icon occupying the first grid track. Let their
   copy span the whole card instead of wrapping inside the 28px icon slot. */
.zone-inline-warning > span:only-child {
  grid-column: 1 / -1;
  min-width: 0;
}

.zone-inline-warning strong,
.zone-inline-warning small {
  display: block;
}

.zone-inline-warning strong {
  color: #7c2d12;
  font-size: 11px;
  font-weight: 860;
}

.zone-inline-warning small {
  margin-top: 2px;
  color: #92400e;
  font-size: 10px;
  font-weight: 670;
}

.settings-section-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.settings-note {
  margin: 8px 0;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.48);
  color: #334155;
  font-size: 11px;
  font-weight: 650;
}

.settings-auto-completed-banner {
  margin: 8px 0 7px;
  padding: 8px 9px;
  border: 1px solid rgba(100, 116, 139, 0.26);
  border-radius: 6px;
  background: linear-gradient(145deg, rgba(241, 245, 249, 0.92), rgba(226, 232, 240, 0.66));
  color: #475569;
  font-size: 11px;
  font-weight: 860;
  box-shadow: var(--glass-edge), 0 6px 14px rgba(15, 23, 42, 0.05);
}

.settings-auto-completed-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.settings-auto-completed-fieldset.is-auto-completed {
  padding: 8px;
  border: 1px solid rgba(100, 116, 139, 0.22);
  border-radius: 8px;
  background: rgba(241, 245, 249, 0.58);
}

.settings-auto-completed-fieldset.is-auto-completed .settings-field,
.settings-auto-completed-fieldset.is-auto-completed .settings-note {
  opacity: 0.66;
}

.settings-auto-completed-fieldset.is-auto-completed input,
.settings-auto-completed-fieldset.is-auto-completed select {
  cursor: not-allowed;
}

.settings-field.has-auto-indicator > input,
.settings-field.has-auto-indicator > select,
.settings-field.has-auto-indicator .input-unit input {
  padding-right: 58px;
}

.settings-field.has-auto-indicator.has-select-control > select {
  padding-right: 78px;
}

.settings-auto-field-indicator {
  position: absolute;
  z-index: 2;
  right: 8px;
  bottom: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 17px;
  padding: 0 6px;
  border: 1px solid rgba(71, 85, 105, 0.26);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.9);
  color: #64748b;
  font-size: 8px;
  font-weight: 920;
  letter-spacing: 0.02em;
  line-height: 1;
  pointer-events: none;
  text-transform: uppercase;
  box-shadow: var(--glass-edge), 0 2px 6px rgba(15, 23, 42, 0.06);
}

.settings-field.has-auto-indicator.has-select-control .settings-auto-field-indicator {
  right: 28px;
}

.settings-field.has-auto-indicator.has-input-unit .settings-auto-field-indicator {
  right: 52px;
}

html[data-theme="dark"] .settings-toggle {
  color: var(--text);
}

html[data-theme="dark"] .zone-inline-warning {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.22), rgba(146, 64, 14, 0.16));
  border-color: rgba(251, 191, 36, 0.42);
  color: #fcd34d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 18px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .zone-inline-warning-icon {
  background: rgba(120, 53, 15, 0.48);
  border-color: rgba(251, 191, 36, 0.42);
  color: #fbbf24;
}

html[data-theme="dark"] .zone-inline-warning strong {
  color: #fde68a;
}

html[data-theme="dark"] .zone-inline-warning small {
  color: #fcd34d;
}

html[data-theme="dark"] .settings-note {
  border-color: rgba(239, 246, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
}

html[data-theme="dark"] .settings-note strong {
  color: var(--text);
}

html[data-theme="dark"] .settings-auto-completed-banner {
  border-color: rgba(226, 232, 240, 0.16);
  background: linear-gradient(145deg, rgba(51, 65, 85, 0.58), rgba(30, 41, 59, 0.44));
  color: #cbd5e1;
}

html[data-theme="dark"] .settings-auto-completed-fieldset.is-auto-completed {
  border-color: rgba(226, 232, 240, 0.14);
  background: rgba(51, 65, 85, 0.22);
}

html[data-theme="dark"] .settings-auto-field-indicator {
  border-color: rgba(226, 232, 240, 0.18);
  background: rgba(15, 23, 42, 0.78);
  color: #cbd5e1;
}

html[data-theme="dark"] .auth-cloud-card {
  border-color: rgba(239, 246, 255, 0.16);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.04));
  box-shadow: var(--glass-edge), 0 12px 24px rgba(0, 0, 0, 0.20);
}

html[data-theme="dark"] .auth-cloud-message {
  border-color: rgba(239, 246, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
}

html[data-theme="dark"] .auth-cloud-message.saved {
  border-color: rgba(74, 222, 128, 0.30);
  background: rgba(22, 101, 52, 0.20);
  color: #bbf7d0;
}

html[data-theme="dark"] .auth-cloud-message.error {
  border-color: rgba(248, 113, 113, 0.34);
  background: rgba(127, 29, 29, 0.24);
  color: #fecaca;
}

html[data-theme="dark"] .auth-gate-backdrop {
  background:
    radial-gradient(circle at 50% 18%, rgba(0, 122, 255, 0.20), transparent 34%),
    rgba(2, 6, 12, 0.66);
}

html[data-theme="dark"] .auth-gate-card,
html[data-theme="dark"] .brand-logout-card {
  border-color: rgba(239, 246, 255, 0.18);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.045));
  box-shadow: var(--glass-edge), 0 30px 70px rgba(0, 0, 0, 0.42);
}

html[data-theme="dark"] .auth-gate-form .settings-field {
  border-color: rgba(239, 246, 255, 0.14);
  background: rgba(255, 255, 255, 0.065);
}

html[data-theme="dark"] .auth-legal-summary {
  border-color: rgba(52, 211, 153, 0.28);
  background: linear-gradient(145deg, rgba(6, 78, 59, 0.32), rgba(30, 64, 175, 0.18));
}

html[data-theme="dark"] .auth-legal-summary strong {
  color: #6ee7b7;
}

html[data-theme="dark"] .auth-legal-summary p,
html[data-theme="dark"] .auth-legal-consent {
  color: #cbd5e1;
}

html[data-theme="dark"] .auth-legal-consent {
  border-color: rgba(96, 165, 250, 0.28);
  background: rgba(30, 64, 175, 0.16);
}

html[data-theme="dark"] .project-setup-backdrop {
  background:
    radial-gradient(circle at 50% 18%, rgba(0, 122, 255, 0.16), transparent 34%),
    rgba(2, 6, 12, 0.72);
}

html[data-theme="dark"] .project-setup-card {
  --setup-chevron-a: rgba(71, 85, 105, 0.42);
  --setup-chevron-b: rgba(0, 122, 255, 0.20);
  --setup-firework-pale: rgba(226, 232, 240, 0.94);
  border-color: rgba(239, 246, 255, 0.18);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.045));
  box-shadow: var(--glass-edge), 0 30px 70px rgba(0, 0, 0, 0.44);
}

html[data-theme="dark"] .project-setup-section {
  border-color: rgba(239, 246, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .project-setup-temperature-group {
  border-color: rgba(239, 246, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .project-system-selection {
  border-color: rgba(239, 246, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .project-system-option {
  border-color: rgba(239, 246, 255, 0.14);
  background: rgba(255, 255, 255, 0.055);
}

html[data-theme="dark"] .project-system-option:has(input:checked) {
  border-color: rgba(56, 189, 248, 0.54);
  background: rgba(0, 122, 255, 0.17);
}

html[data-theme="dark"] .pipe-system-selection-card {
  border-color: rgba(239, 246, 255, 0.14);
  background: rgba(255, 255, 255, 0.055);
}

html[data-theme="dark"] .pipe-system-selection-note {
  border-color: rgba(239, 246, 255, 0.12);
  background: rgba(15, 23, 42, 0.58);
}

html[data-theme="dark"] .project-setup-step {
  border-color: rgba(239, 246, 255, 0.14);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

html[data-theme="dark"] .project-setup-step span {
  color: rgba(226, 232, 240, 0.78);
  border-color: rgba(239, 246, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .project-setup-step.active,
html[data-theme="dark"] .project-setup-step.complete {
  color: var(--blue);
  border-color: rgba(0, 122, 255, 0.38);
  background: rgba(0, 122, 255, 0.15);
}

html[data-theme="dark"] .project-setup-step.active span,
html[data-theme="dark"] .project-setup-step.complete span {
  color: white;
  background: var(--blue);
}

html[data-theme="dark"] .project-setup-complete-copy {
  border-color: rgba(239, 246, 255, 0.16);
  background: rgba(15, 23, 42, 0.36);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 22px 58px rgba(0, 0, 0, 0.36);
}

html[data-theme="dark"] .brand-logout-summary > div {
  border-color: rgba(239, 246, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}

.room-type-category-list,
.room-type-preset-list {
  display: grid;
  gap: 10px;
}

.room-type-category {
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 5px;
  background: var(--tile-glass);
  overflow: hidden;
  box-shadow: var(--glass-edge), 0 8px 20px rgba(0, 0, 0, 0.045);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.room-type-category-head,
.collapsible-section-head {
  width: 100%;
  min-height: 36px;
  min-width: 0;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(60, 60, 67, 0.16);
  border-radius: var(--radius);
  background: var(--tile-glass);
  color: var(--text);
  text-align: left;
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0;
  box-shadow: var(--glass-edge), 0 6px 14px rgba(0, 0, 0, 0.045);
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

html[data-theme="dark"] .room-type-category-head,
html[data-theme="dark"] .collapsible-section-head {
  border-color: rgba(239, 246, 255, 0.16);
  background: var(--tile-glass);
  color: var(--text);
  box-shadow: var(--glass-edge), 0 6px 14px rgba(0, 0, 0, 0.12);
}

.room-type-category-head:hover,
.collapsible-section-head:hover {
  border-color: rgba(60, 60, 67, 0.28);
  background: var(--button-glass-hover);
  box-shadow: var(--glass-edge), 0 8px 18px rgba(0, 0, 0, 0.065);
  transform: translateY(-1px);
}

html[data-theme="dark"] .room-type-category-head:hover,
html[data-theme="dark"] .collapsible-section-head:hover {
  border-color: rgba(245, 245, 247, 0.26);
  background: var(--button-glass-hover);
  box-shadow: var(--glass-edge), 0 8px 18px rgba(0, 0, 0, 0.22);
}

.room-type-category-head {
  height: 34px;
  padding: 0 10px;
}

.room-type-category-head small,
.collapsible-section-head small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.collapse-chevron {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(60, 60, 67, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  color: #647184;
  font-size: 11px;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
  transition: transform 0.12s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

html[data-theme="dark"] .collapse-chevron {
  border-color: rgba(245, 245, 247, 0.16);
  background: rgba(255, 255, 255, 0.055);
  color: #c7cbd1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.room-type-category-head:hover .collapse-chevron,
.collapsible-section-head:hover .collapse-chevron {
  border-color: rgba(60, 60, 67, 0.32);
  background: rgba(255, 255, 255, 0.48);
  color: #3f4856;
}

html[data-theme="dark"] .room-type-category-head:hover .collapse-chevron,
html[data-theme="dark"] .collapsible-section-head:hover .collapse-chevron {
  border-color: rgba(245, 245, 247, 0.28);
  background: rgba(255, 255, 255, 0.11);
  color: #ffffff;
}

.is-collapsed > .room-type-category-head .collapse-chevron,
.is-collapsed > .collapsible-section-head .collapse-chevron {
  transform: rotate(-90deg);
}

.room-type-category .room-type-preset-list {
  padding: 10px;
  border-top: 1px solid var(--line);
}

.room-type-preset-card {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 5px;
  background: var(--tile-glass);
  box-shadow: var(--glass-edge), 0 8px 18px rgba(0, 0, 0, 0.045);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.room-type-preset-card.new-room-type {
  border-color: var(--blue-border);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(222, 239, 255, 0.54));
  box-shadow: var(--glass-edge), 0 10px 24px rgba(0, 122, 255, 0.12);
}

.room-type-new-callout {
  padding: 7px 8px;
  border: 1px solid rgba(75, 85, 99, 0.24);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.72);
  color: #374151;
  font-size: 11px;
  font-weight: 820;
}

.room-type-preset-head {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.room-type-reference-card {
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.36);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.room-type-reference-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text);
  font-size: 11px;
  font-weight: 820;
}

.room-type-reference-title span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
}

.room-type-reference-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 7px;
  margin: 0;
}

.room-type-reference-grid div {
  display: grid;
  grid-template-columns: minmax(86px, 0.75fr) minmax(0, 1.25fr);
  align-items: start;
  gap: 8px;
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.34);
}

.room-type-reference-grid dt {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 780;
}

.room-type-reference-grid dd {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: 11px;
  font-weight: 720;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-align: left;
}

.outlet-type-preset-head {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr) auto;
}

.outlet-type-meta-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.outlet-standard-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: 9px;
}

.outlet-standard-card {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.outlet-standard-card-head {
  display: grid;
  gap: 2px;
}

.outlet-standard-card-head strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 840;
  line-height: 1.2;
}

.outlet-standard-card-head small {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.outlet-standard-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

html[data-theme="dark"] .outlet-standard-card {
  border-color: rgba(239, 246, 255, 0.14);
  background: rgba(255, 255, 255, 0.065);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.material-category-list {
  display: grid;
  gap: 12px;
}

.material-library-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin: 10px 0 12px;
}

.material-library-toolbar > span {
  padding-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  white-space: nowrap;
}

.material-search-field input {
  height: 34px;
}

.material-category {
  min-width: 0;
  display: grid;
  gap: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 6px;
  background: var(--tile-glass);
  overflow: hidden;
  box-shadow: var(--glass-edge), 0 8px 20px rgba(0, 0, 0, 0.045);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.material-category-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 0;
  padding: 8px;
  border-bottom: 1px solid var(--line);
}

.material-category.is-collapsed .material-category-head {
  border-bottom: 0;
}

.material-category-toggle {
  min-width: 0;
  height: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-size: 12px;
  font-weight: 820;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
}

.material-category-toggle:hover {
  border-color: var(--control-hover-border);
  background: var(--control-hover-bg);
  box-shadow: var(--control-hover-shadow);
}

.material-category-toggle small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
  white-space: nowrap;
}

.material-category.is-collapsed .material-category-toggle .collapse-chevron {
  transform: rotate(-90deg);
}

.material-list {
  display: grid;
  gap: 9px;
  padding: 10px;
}

.material-card {
  min-width: 0;
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 5px;
  background: var(--tile-glass);
  box-shadow: var(--glass-edge), 0 8px 18px rgba(0, 0, 0, 0.045);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.material-card.new-material {
  border-color: var(--blue-border);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(222, 239, 255, 0.54));
  box-shadow: var(--glass-edge), 0 10px 24px rgba(0, 122, 255, 0.12);
}

.material-new-callout {
  padding: 7px 8px;
  border: 1px solid rgba(75, 85, 99, 0.24);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.76);
  color: #374151;
  font-size: 11px;
  font-weight: 820;
  overflow-wrap: anywhere;
}

html[data-theme="dark"] .material-card.new-material {
  border-color: rgba(96, 165, 250, 0.72);
  background:
    linear-gradient(145deg, rgba(10, 132, 255, 0.16), rgba(10, 132, 255, 0.045)),
    var(--tile-glass-strong);
  box-shadow:
    inset 0 1px 0 rgba(191, 219, 254, 0.14),
    0 12px 28px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(10, 132, 255, 0.08);
}

html[data-theme="dark"] .material-card.new-material .material-new-callout {
  border-color: rgba(147, 197, 253, 0.32);
  background: rgba(10, 132, 255, 0.13);
  color: #dbeafe;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .material-card.new-material .input-unit small {
  color: #cbd5e1;
}

html[data-theme="dark"] .material-card .danger-mini:not(:disabled):hover {
  border-color: rgba(251, 113, 133, 0.68);
  background: linear-gradient(145deg, rgba(190, 24, 93, 0.30), rgba(127, 29, 29, 0.24));
  color: #ffe4e6;
  box-shadow: inset 0 0 0 1px rgba(251, 113, 133, 0.12), 0 8px 20px rgba(0, 0, 0, 0.28);
}

.material-card-head {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(130px, 0.55fr) minmax(130px, 0.55fr) auto;
  align-items: end;
  gap: 10px;
}

.material-card :is(.settings-field, .input-unit, input) {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 520px) {
  .material-library-toolbar,
  .material-category-head,
  .material-card-head {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .material-library-toolbar > span {
    padding-bottom: 0;
    white-space: normal;
  }

  .material-category-toggle > span:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .material-category-head > .settings-mini-btn,
  .material-card-head > .danger-mini {
    width: 100%;
  }
}

.floor-plan-grid {
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(420px, 1.28fr);
  gap: 10px;
}

@media (min-width: 1100px) {
  .floor-plan-popover {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .floor-plan-popover .floor-plan-grid {
    grid-template-columns: minmax(230px, 0.58fr) minmax(460px, 1.45fr) minmax(270px, 0.72fr);
    align-items: stretch;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .floor-plan-popover .floor-plan-card {
    min-height: 0;
    overflow: hidden;
  }

  .floor-plan-popover .floor-plan-card.wide {
    grid-column: auto;
  }

  .floor-plan-popover .floor-plan-card-pdf {
    grid-template-rows: auto auto auto auto minmax(0, 1fr) auto auto auto auto;
    align-content: stretch;
    gap: 7px;
  }

  .floor-plan-popover .floor-plan-card-pdf .datum-preview-wrap {
    min-height: 170px;
    height: clamp(170px, 27vh, 300px);
    max-height: 300px;
  }

  .floor-plan-popover .floor-upload {
    min-height: 66px;
    padding: 9px 11px;
  }

  .floor-plan-popover .floor-upload-icon {
    width: 34px;
    height: 34px;
  }

  .floor-plan-popover .floor-upload-icon svg {
    width: 18px;
    height: 18px;
  }

  .floor-plan-popover .floor-trace-actions {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-width: 0;
  }

  .floor-plan-popover .floor-trace-actions .primary-mini {
    width: max-content;
    max-width: 100%;
    min-width: 0;
    white-space: nowrap;
  }

  .floor-plan-popover .floor-trace-actions .plan-note {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .floor-plan-popover .pdf-setup-status,
  .floor-plan-popover .trace-status {
    padding: 6px 7px;
  }

  .floor-plan-popover .datum-status {
    min-height: 30px;
    padding: 5px 7px;
  }

  .floor-plan-popover .floor-plan-card-pdf > .plan-note:last-child {
    display: none;
  }

  .floor-plan-popover .cal-setup,
  .floor-plan-popover .cal-steps,
  .floor-plan-popover .cal-meta {
    gap: 7px;
  }

  .floor-plan-popover .cal-setup {
    padding-bottom: 7px;
    margin-bottom: 7px;
  }

  .floor-plan-popover .cal-steps {
    align-items: stretch;
  }

  .floor-plan-popover .cal-steps label {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
  }

  .floor-plan-popover .cal-steps label input {
    width: 90px;
  }
}

.floor-plan-card {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: var(--radius);
  background: var(--tile-glass);
  box-shadow: var(--glass-edge), 0 9px 22px rgba(0, 0, 0, 0.05);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.floor-plan-card.wide {
  grid-column: 1 / -1;
}

.floor-plan-card-pdf .datum-preview-wrap {
  min-height: clamp(320px, 44vh, 560px);
}

.floor-plan-card-pdf .datum-preview {
  height: 100%;
  min-height: inherit;
}

.floor-plan-card h3 {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 820;
}

.auto-setup-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 17px;
  padding: 0 7px;
  border: 1px solid rgba(0, 122, 255, 0.32);
  border-radius: 999px;
  background: rgba(0, 122, 255, 0.12);
  color: var(--blue);
  font-size: 9px;
  font-weight: 880;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0;
  box-shadow: var(--glass-edge);
}

html[data-theme="dark"] .auto-setup-badge {
  border-color: rgba(96, 165, 250, 0.42);
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
}

.floor-plan-card label {
  display: grid;
  gap: 4px;
  color: #334155;
  font-size: 11px;
  font-weight: 740;
}

.floor-trace-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}

.floor-plan-popover .floor-plan-card-pdf {
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
}

.floor-plan-popover .floor-trace-actions {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

@media (min-width: 1100px) {
  .floor-plan-popover .floor-plan-grid {
    grid-template-columns: minmax(210px, 0.72fr) minmax(0, 1.28fr);
    align-items: start;
    height: 100%;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
  }

  .floor-plan-popover .floor-plan-card {
    overflow: visible;
  }

  .floor-plan-popover .floor-plan-card.wide {
    grid-column: 1 / -1;
  }

  .floor-plan-popover .floor-plan-card-pdf {
    grid-template-rows: none;
    grid-auto-rows: auto;
    align-content: start;
    height: max-content;
    min-height: max-content;
    overflow: visible;
  }
}

/* AI floor-plan trace review */
.floor-trace-mode {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(248, 251, 255, 0.66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.66);
}

.floor-trace-mode > :is(label, button) {
  min-width: 0;
  min-height: 42px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  margin: 0;
  border: 1px solid rgba(100, 123, 154, 0.19);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.7);
  color: #405673;
  padding: 7px 9px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 760;
  line-height: 1.25;
  text-align: left;
}

.floor-trace-mode > :is(label, button):hover {
  border-color: rgba(0, 122, 255, 0.3);
  background: rgba(239, 246, 255, 0.86);
}

.floor-trace-mode > label:has(input:checked),
.floor-trace-mode > button:is(.active, [aria-pressed="true"]) {
  border-color: rgba(0, 122, 255, 0.44);
  background: linear-gradient(145deg, rgba(219, 234, 254, 0.82), rgba(236, 253, 245, 0.62));
  color: #0753a5;
  box-shadow: inset 3px 0 0 var(--blue);
}

.floor-plan-card .floor-trace-mode input {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  accent-color: var(--blue);
}

.floor-trace-mode :is(strong, span) {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.floor-trace-mode > label:not(.floor-trace-consent) > span {
  display: grid;
  gap: 2px;
}

.floor-trace-mode > label:not(.floor-trace-consent) small {
  color: #64748b;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: normal;
}

.floor-trace-premium-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 17px;
  margin-left: 5px;
  padding: 2px 7px;
  border: 1px solid rgba(10, 124, 255, 0.22);
  border-radius: 999px;
  background: rgba(10, 124, 255, 0.1);
  color: #0759b5;
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

.floor-trace-mode > .floor-trace-cloud-ai-toggle.locked {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(248, 250, 252, 0.72);
  color: #64748b;
  cursor: not-allowed;
  box-shadow: none;
}

.floor-trace-mode > .floor-trace-cloud-ai-toggle.locked:hover {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(248, 250, 252, 0.72);
}

.floor-trace-cloud-ai-toggle.locked input {
  opacity: 0.58;
}

.floor-trace-premium-cta > span:last-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.floor-trace-premium-cta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: linear-gradient(145deg, #0a84ff, #6d5dfc);
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  box-shadow: 0 5px 12px rgba(10, 132, 255, 0.24);
}

.floor-trace-consent,
.floor-plan-card .floor-trace-consent {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 8px 10px;
  padding: 10px;
  border: 1px solid rgba(217, 119, 6, 0.24);
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(255, 251, 235, 0.84), rgba(255, 255, 255, 0.68));
  color: #69451d;
  white-space: normal;
}

.floor-trace-consent:has(input:checked) {
  border-color: rgba(15, 159, 151, 0.26);
  background: linear-gradient(145deg, rgba(236, 253, 245, 0.86), rgba(255, 255, 255, 0.7));
  box-shadow: inset 3px 0 0 #0f9f97;
}

.floor-plan-card .floor-trace-consent > input {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 1px 0 0;
  accent-color: #0f9f97;
}

.floor-trace-consent > :is(div, span) {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.floor-trace-consent strong {
  color: #60401b;
  font-size: 11px;
  font-weight: 840;
}

.floor-trace-consent :is(small, p) {
  margin: 0;
  color: #7c6040;
  font-size: 10px;
  font-weight: 640;
  line-height: 1.4;
}

.floor-trace-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.floor-trace-action-row > :is(div, span, p) {
  min-width: 0;
  margin: 0 auto 0 0;
}

.floor-trace-action-row > button {
  min-height: 34px;
}

.floor-trace-action-row > button:disabled {
  cursor: not-allowed;
  filter: saturate(0.55);
  opacity: 0.48;
  box-shadow: none;
}

.floor-trace-review {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 9px;
  overflow: hidden;
  border: 1px solid rgba(0, 122, 255, 0.2);
  border-radius: 11px;
  background:
    radial-gradient(circle at 100% 0, rgba(45, 212, 191, 0.1), transparent 38%),
    rgba(255, 255, 255, 0.74);
  box-shadow: var(--glass-edge), 0 10px 26px rgba(15, 39, 71, 0.06);
}

.floor-trace-review-head {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border-bottom: 1px solid rgba(100, 123, 154, 0.16);
  background: linear-gradient(145deg, rgba(239, 246, 255, 0.82), rgba(255, 255, 255, 0.68));
}

.floor-trace-review-head > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.floor-trace-review-head > span:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.floor-trace-review-head :is(h3, strong) {
  margin: 0;
  color: #0f2747;
  font-size: 12px;
  font-weight: 880;
  line-height: 1.25;
}

.floor-trace-review-head :is(p, small, span) {
  margin: 0;
  color: #667085;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.38;
}

.floor-trace-review-list {
  min-width: 0;
  max-height: min(42vh, 430px);
  display: grid;
  align-content: start;
  gap: 6px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 10px;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
}

.floor-trace-review-overlay {
  min-width: 0;
  display: grid;
  gap: 7px;
  margin-inline: 10px;
  overflow: hidden;
  border: 1px solid rgba(0, 122, 255, 0.22);
  border-radius: 10px;
  background: rgba(241, 245, 249, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.floor-trace-review-overlay-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 9px 0;
}

.floor-trace-review-overlay-head > span:first-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.floor-trace-review-overlay-head strong {
  color: #183654;
  font-size: 10.5px;
  font-weight: 850;
}

.floor-trace-review-overlay-head small,
.floor-trace-review-overlay-help {
  color: #667085;
  font-size: 9px;
  font-weight: 650;
  line-height: 1.3;
}

.floor-trace-overlay-legend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #52647d;
  font-size: 8.5px;
  font-weight: 760;
  white-space: nowrap;
}

.floor-trace-overlay-legend i {
  width: 9px;
  height: 3px;
  display: inline-block;
  border-radius: 99px;
  background: #0878ed;
}

.floor-trace-overlay-legend i.window { background: #0f9f97; }
.floor-trace-overlay-legend i.door { background: #ef4444; }

.floor-trace-review-overlay-canvas {
  width: 100%;
  height: auto;
  aspect-ratio: 980 / 610;
  display: block;
  overflow: hidden;
  border-block: 1px solid rgba(100, 123, 154, 0.14);
  background: #fff;
}

.floor-trace-review-overlay-help {
  display: block;
  padding: 0 9px 8px;
}

.floor-trace-review-source {
  filter: grayscale(0.16) contrast(0.9);
}

.floor-trace-review-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  flex-wrap: wrap;
  padding: 0 11px;
  color: #53647d;
  font-size: 10px;
  font-weight: 760;
  line-height: 1.3;
}

.floor-trace-review-row,
.floor-plan-card .floor-trace-review-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px;
  border: 1px solid rgba(100, 123, 154, 0.16);
  border-radius: 8px;
  background: rgba(248, 251, 255, 0.72);
  transition: border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}

.floor-trace-review-row:has(> input[type="checkbox"]) {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.floor-trace-review-row:hover,
.floor-trace-review-row:focus-within {
  border-color: rgba(0, 122, 255, 0.28);
  background: rgba(239, 246, 255, 0.84);
  box-shadow: 0 5px 14px rgba(15, 39, 71, 0.06);
}

.floor-plan-card .floor-trace-review-row > input[type="checkbox"],
.floor-trace-review-row > input[type="checkbox"] {
  width: 17px;
  height: 17px;
  min-height: 0;
  margin: 0;
  accent-color: var(--blue);
}

.floor-trace-review-row > :is(div, label) {
  min-width: 0;
  display: grid;
  gap: 3px;
  margin: 0;
}

.floor-trace-room-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.floor-trace-room-copy > :is(input, select) {
  min-width: 0;
}

.floor-trace-room-copy > select {
  height: 30px;
  min-height: 30px;
  border-radius: 6px;
  padding: 4px 28px 4px 8px;
  font-size: 10px;
  font-weight: 720;
}

.floor-trace-confidence-breakdown {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.floor-trace-confidence-breakdown small {
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.76);
}

.floor-trace-review-row-actions {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.floor-trace-review-row.focused {
  border-color: rgba(0, 122, 255, 0.55);
  background: rgba(219, 234, 254, 0.76);
  box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.1), 0 7px 18px rgba(15, 39, 71, 0.08);
}

.floor-trace-review-openings {
  min-width: 0;
  border: 1px solid rgba(100, 123, 154, 0.16);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.64);
}

.floor-trace-review-openings summary {
  cursor: pointer;
  padding: 6px 7px;
  color: #405673;
  font-size: 9.5px;
  font-weight: 780;
}

.floor-trace-review-opening-list {
  display: grid;
  gap: 4px;
  padding: 0 6px 6px;
}

.floor-trace-review-opening-row {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(78px, 1fr) auto;
  align-items: center;
  gap: 5px;
  padding: 5px;
  border-radius: 6px;
  background: rgba(241, 245, 249, 0.78);
}

.floor-trace-review-opening-row.excluded { opacity: 0.48; }

.floor-trace-review-opening-row > input {
  width: 15px;
  height: 15px;
  min-height: 0;
  margin: 0;
  accent-color: var(--blue);
}

.floor-trace-review-opening-row > select {
  min-width: 0;
  height: 28px;
  min-height: 28px;
  padding: 3px 24px 3px 7px;
  font-size: 9.5px;
}

.floor-trace-review-row :is(strong, b) {
  overflow-wrap: anywhere;
  color: #193554;
  font-size: 11px;
  font-weight: 830;
  line-height: 1.25;
}

.floor-trace-review-row :is(small, p) {
  margin: 0;
  color: #718096;
  font-size: 10px;
  font-weight: 640;
  line-height: 1.35;
}

.floor-trace-confidence {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 0 0 auto;
  border: 1px solid rgba(100, 123, 154, 0.2);
  border-radius: 999px;
  background: rgba(241, 245, 249, 0.82);
  color: #52647d;
  padding: 4px 8px;
  font-size: 9.5px;
  font-weight: 860;
  line-height: 1;
  white-space: nowrap;
}

.floor-trace-confidence.high {
  border-color: rgba(15, 159, 151, 0.28);
  background: rgba(204, 251, 241, 0.7);
  color: #0f615f;
}

.floor-trace-confidence.medium {
  border-color: rgba(217, 119, 6, 0.28);
  background: rgba(254, 243, 199, 0.72);
  color: #92400e;
}

.floor-trace-confidence.low {
  border-color: rgba(240, 68, 56, 0.28);
  background: rgba(254, 226, 226, 0.74);
  color: #b42318;
}

.floor-trace-review-options {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 0 10px;
}

.floor-trace-review-options > label,
.floor-plan-card .floor-trace-review-options > label {
  min-height: 32px;
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 6px;
  margin: 0;
  border: 1px solid rgba(100, 123, 154, 0.18);
  border-radius: 999px;
  background: rgba(248, 251, 255, 0.78);
  color: #405673;
  padding: 6px 9px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 760;
}

.floor-trace-review-options > label:has(input:checked) {
  border-color: rgba(0, 122, 255, 0.36);
  background: rgba(219, 234, 254, 0.72);
  color: #0753a5;
}

.floor-plan-card .floor-trace-review-options input {
  width: 15px;
  height: 15px;
  min-height: 0;
  margin: 0;
  accent-color: var(--blue);
}

.floor-trace-review-options > small {
  flex: 1 1 220px;
  color: #667085;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.38;
}

.floor-trace-review-warnings {
  display: grid;
  gap: 4px;
  margin-inline: 10px;
  padding: 9px 10px;
  border: 1px solid rgba(217, 119, 6, 0.24);
  border-radius: 8px;
  background: rgba(254, 243, 199, 0.52);
  color: #7c4511;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.35;
}

.floor-trace-review-warnings strong {
  color: #92400e;
  font-size: 10.5px;
  font-weight: 850;
}

.floor-trace-privacy {
  display: block;
  margin-inline: 10px;
  padding: 9px 10px;
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 8px;
  background: rgba(245, 243, 255, 0.66);
  color: #554579;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.4;
}

.floor-trace-privacy > :is(svg, .icon) {
  width: 16px;
  height: 16px;
  color: #7c3aed;
}

.floor-trace-privacy :is(p, span) {
  min-width: 0;
  margin: 0;
}

.manual-room-ai-review {
  min-width: 0;
  display: grid;
  gap: 9px;
  margin: 10px;
  border: 1px solid rgba(124, 58, 237, 0.24);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(245, 243, 255, 0.92), rgba(239, 246, 255, 0.9));
  padding: 10px;
  box-shadow: 0 8px 22px rgba(76, 29, 149, 0.08);
}

.manual-room-ai-review.analysing,
.manual-room-ai-review.error {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.manual-room-ai-review.error {
  border-color: rgba(217, 119, 6, 0.28);
  background: rgba(255, 251, 235, 0.92);
}

.manual-room-ai-review-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(145deg, #7c3aed, #2563eb);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  box-shadow: 0 5px 14px rgba(76, 29, 149, 0.2);
}

.manual-room-ai-review > span:not(.manual-room-ai-review-icon),
.manual-room-ai-review-head > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.manual-room-ai-review :is(strong, p) {
  margin: 0;
  color: #172033;
}

.manual-room-ai-review small,
.manual-room-ai-review > p {
  margin: 0;
  color: #667085;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.4;
}

.manual-room-ai-review-head,
.manual-room-ai-review-footer {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.manual-room-ai-review-head strong {
  font-size: 12px;
  font-weight: 850;
}

.manual-room-ai-fields {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 6px;
}

.manual-room-ai-fields > :is(input, select) {
  min-width: 0;
  min-height: 34px;
  height: 34px;
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 10.5px;
}

.manual-room-ai-choice {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  border: 1px solid rgba(100, 123, 154, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  padding: 6px 7px;
}

.manual-room-ai-choice > input {
  width: 15px;
  height: 15px;
  min-height: 0;
  margin: 0;
  accent-color: #7c3aed;
}

.manual-room-ai-choice > span {
  min-width: 0;
  display: grid;
}

.manual-room-ai-choice strong { font-size: 10px; }
.manual-room-ai-choice small { font-size: 8.8px; }

.manual-room-ai-openings {
  background: rgba(255, 255, 255, 0.66);
}

.manual-room-ai-empty {
  display: block;
  padding: 0 8px 8px;
}

.manual-room-ai-warning {
  border-left: 3px solid #d97706;
  background: rgba(255, 251, 235, 0.72);
  padding: 6px 8px;
}

.manual-room-ai-review-footer {
  flex-wrap: wrap;
  border-top: 1px solid rgba(100, 123, 154, 0.14);
  padding-top: 8px;
}

.manual-room-ai-review-footer > small {
  flex: 1 1 140px;
}

.manual-room-ai-review-actions {
  display: flex !important;
  grid-template-columns: none !important;
  gap: 6px !important;
}

.floor-trace-review-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-top: 1px solid rgba(100, 123, 154, 0.16);
  background: rgba(248, 251, 255, 0.78);
}

.floor-trace-review-actions > :is(span, p) {
  min-width: min(240px, 100%);
  margin: 0 auto 0 0;
  color: #667085;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.35;
}

.floor-trace-review-actions button {
  min-height: 34px;
}

.floor-trace-preview {
  position: relative;
  min-width: 0;
  min-height: 210px;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(0, 122, 255, 0.2);
  border-radius: 10px;
  background:
    linear-gradient(rgba(148, 163, 184, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.12) 1px, transparent 1px),
    rgba(248, 251, 255, 0.82);
  background-size: 20px 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.floor-trace-preview > svg,
.floor-trace-preview > canvas {
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: block;
}

.floor-trace-canvas-overlay :is(.source, [data-trace-source]) {
  opacity: 0.46;
  filter: saturate(0.72) contrast(0.94);
}

.floor-trace-canvas-overlay :is(.polygon, [data-trace-polygon], .floor-trace-preview-room > polygon) {
  fill: rgba(0, 122, 255, 0.13);
  stroke: #0878ed;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.floor-trace-canvas-overlay :is(.confidence.high .polygon, .polygon.high, [data-confidence="high"], .floor-trace-preview-room.high > polygon) {
  fill: rgba(15, 159, 151, 0.15);
  stroke: #0f9f97;
}

.floor-trace-canvas-overlay :is(.confidence.medium .polygon, .polygon.medium, [data-confidence="medium"], .floor-trace-preview-room.medium > polygon) {
  fill: rgba(217, 119, 6, 0.14);
  stroke: #d97706;
  stroke-dasharray: 6 3;
}

.floor-trace-canvas-overlay :is(.confidence.low .polygon, .polygon.low, [data-confidence="low"], .floor-trace-preview-room.low > polygon) {
  fill: rgba(240, 68, 56, 0.12);
  stroke: #ef4444;
  stroke-dasharray: 4 3;
}

.floor-trace-canvas-overlay :is(.opening, [data-trace-opening], .floor-trace-preview-opening) {
  fill: none;
  stroke: #7c3aed;
  stroke-width: 3;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.floor-trace-canvas-overlay :is(.label, [data-trace-label], .floor-trace-preview-room > text) {
  fill: #0f2747;
  color: #0f2747;
  font-size: 10px;
  font-weight: 820;
  line-height: 1.2;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 3px;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.floor-trace-preview-room.excluded {
  opacity: 0.28;
}

.floor-trace-preview-room.deemphasised { opacity: 0.16; }

.floor-trace-preview-room.focused > polygon {
  stroke-width: 4;
  filter: drop-shadow(0 2px 4px rgba(15, 39, 71, 0.24));
}

.floor-trace-canvas-overlay.review .floor-trace-preview-room {
  pointer-events: all;
  cursor: pointer;
}

.floor-trace-canvas-overlay.workspace {
  pointer-events: none;
}

.floor-trace-preview-opening.excluded {
  opacity: 0.24;
  stroke-dasharray: 3 3;
}

.floor-trace-uncertain-region > rect {
  fill: rgba(245, 158, 11, 0.08);
  stroke: rgba(217, 119, 6, 0.74);
  stroke-width: 1.5;
  stroke-dasharray: 5 4;
  vector-effect: non-scaling-stroke;
}

.floor-trace-preview-opening.window { stroke: #0f9f97; }
.floor-trace-preview-opening.door { stroke: #ef4444; }

.manual-room-ai-preview {
  pointer-events: none;
}

.manual-room-ai-preview > polygon {
  fill: rgba(124, 58, 237, 0.06);
  stroke: #7c3aed;
  stroke-width: 2;
  stroke-dasharray: 6 4;
  vector-effect: non-scaling-stroke;
}

.manual-room-ai-preview-opening {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.26));
}

.manual-room-ai-preview-opening.window { stroke: #0f9f97; }
.manual-room-ai-preview-opening.door { stroke: #ef4444; }
.manual-room-ai-preview-opening.excluded { opacity: 0.22; stroke-dasharray: 3 3; }

.manual-room-ai-preview > text {
  fill: #4c1d95;
  stroke: rgba(255, 255, 255, 0.94);
  stroke-width: 3px;
  paint-order: stroke fill;
  font-size: 11px;
  font-weight: 850;
  vector-effect: non-scaling-stroke;
}

html[data-theme="dark"] :is(.floor-trace-mode, .floor-trace-review, .floor-trace-review-row, .floor-trace-review-actions) {
  border-color: rgba(203, 213, 225, 0.17);
  background: rgba(15, 23, 34, 0.72);
}

html[data-theme="dark"] .manual-room-ai-review {
  border-color: rgba(167, 139, 250, 0.3);
  background: linear-gradient(145deg, rgba(46, 30, 72, 0.92), rgba(15, 29, 52, 0.92));
}

html[data-theme="dark"] .manual-room-ai-review.error {
  border-color: rgba(245, 158, 11, 0.32);
  background: rgba(69, 48, 16, 0.9);
}

html[data-theme="dark"] .manual-room-ai-review :is(strong, p),
html[data-theme="dark"] .manual-room-ai-choice strong {
  color: #f8fafc;
}

html[data-theme="dark"] .manual-room-ai-review small,
html[data-theme="dark"] .manual-room-ai-review > p {
  color: #cbd5e1;
}

html[data-theme="dark"] .manual-room-ai-choice,
html[data-theme="dark"] .manual-room-ai-openings {
  border-color: rgba(203, 213, 225, 0.18);
  background: rgba(15, 23, 42, 0.6);
}

html[data-theme="dark"] .manual-room-ai-mode {
  border-color: rgba(167, 139, 250, 0.34);
  background: rgba(76, 29, 149, 0.24);
}

html[data-theme="dark"] .manual-room-ai-mode > span strong { color: #ddd6fe; }
html[data-theme="dark"] .manual-room-ai-mode > span small,
html[data-theme="dark"] .manual-room-ai-consent > span { color: #c4b5fd; }

html[data-theme="dark"] .existing-room-ai-head strong { color: #f8fafc; }
html[data-theme="dark"] .existing-room-ai-head small,
html[data-theme="dark"] .existing-room-ai-assist > p,
html[data-theme="dark"] .existing-room-ai-status small { color: #cbd5e1; }
html[data-theme="dark"] .existing-room-ai-status {
  border-color: rgba(167, 139, 250, 0.34);
  background: rgba(76, 29, 149, 0.24);
}

html[data-theme="dark"] .ai-room-assist-section > .collapsible-section-head > small,
html[data-theme="dark"] .manual-room-ai-premium-badge {
  border-color: rgba(96, 165, 250, 0.34);
  background: rgba(10, 132, 255, 0.2);
  color: #bfdbfe;
}

html[data-theme="dark"] .existing-room-ai-premium-lock {
  border-color: rgba(96, 165, 250, 0.3);
  background: rgba(30, 64, 175, 0.2);
}

html[data-theme="dark"] .existing-room-ai-premium-lock strong { color: #bfdbfe; }
html[data-theme="dark"] .existing-room-ai-premium-lock small { color: #cbd5e1; }
html[data-theme="dark"] .existing-room-ai-status strong { color: #ddd6fe; }

html[data-theme="dark"] .floor-trace-mode > :is(label, button) {
  border-color: rgba(203, 213, 225, 0.18);
  background: rgba(8, 14, 23, 0.56);
  color: #cbd5e1;
}

html[data-theme="dark"] .floor-trace-mode > label:has(input:checked),
html[data-theme="dark"] .floor-trace-mode > button:is(.active, [aria-pressed="true"]) {
  border-color: rgba(96, 165, 250, 0.48);
  background: linear-gradient(145deg, rgba(8, 63, 115, 0.7), rgba(13, 76, 74, 0.5));
  color: #dbeafe;
}

html[data-theme="dark"] .floor-trace-premium-badge {
  border-color: rgba(96, 165, 250, 0.34);
  background: rgba(10, 132, 255, 0.2);
  color: #bfdbfe;
}

html[data-theme="dark"] .floor-trace-mode > .floor-trace-cloud-ai-toggle.locked,
html[data-theme="dark"] .floor-trace-mode > .floor-trace-cloud-ai-toggle.locked:hover {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.58);
  color: #94a3b8;
}

html[data-theme="dark"] .floor-trace-consent {
  border-color: rgba(251, 191, 36, 0.32);
  background: rgba(92, 56, 10, 0.34);
  color: #fde68a;
}

html[data-theme="dark"] .floor-trace-consent:has(input:checked) {
  border-color: rgba(45, 212, 191, 0.32);
  background: rgba(13, 76, 74, 0.38);
}

html[data-theme="dark"] .floor-trace-consent :is(strong, small, p) { color: inherit; }

html[data-theme="dark"] .floor-trace-review-head {
  border-color: rgba(203, 213, 225, 0.16);
  background: rgba(22, 30, 41, 0.94);
}

html[data-theme="dark"] .floor-trace-review-head :is(h3, strong),
html[data-theme="dark"] .floor-trace-review-row :is(strong, b) { color: #edf6ff; }

html[data-theme="dark"] :is(.floor-trace-review-summary, .floor-trace-review-options > small) {
  color: #a9b8ca;
}

html[data-theme="dark"] .floor-trace-review-row:hover,
html[data-theme="dark"] .floor-trace-review-row:focus-within {
  border-color: rgba(96, 165, 250, 0.38);
  background: rgba(8, 48, 83, 0.54);
}

html[data-theme="dark"] .floor-trace-review-options > label {
  border-color: rgba(203, 213, 225, 0.18);
  background: rgba(8, 14, 23, 0.54);
  color: #cbd5e1;
}

html[data-theme="dark"] .floor-trace-review-options > label:has(input:checked) {
  border-color: rgba(96, 165, 250, 0.46);
  background: rgba(8, 63, 115, 0.66);
  color: #dbeafe;
}

html[data-theme="dark"] .floor-trace-privacy {
  border-color: rgba(167, 139, 250, 0.3);
  background: rgba(70, 39, 124, 0.4);
  color: #ddd6fe;
}

html[data-theme="dark"] .floor-trace-review-warnings {
  border-color: rgba(251, 191, 36, 0.3);
  background: rgba(92, 56, 10, 0.34);
  color: #fde68a;
}

html[data-theme="dark"] .floor-trace-review-warnings strong { color: #facc15; }

html[data-theme="dark"] .floor-trace-preview {
  border-color: rgba(96, 165, 250, 0.26);
  background:
    linear-gradient(rgba(148, 163, 184, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.09) 1px, transparent 1px),
    rgba(8, 14, 23, 0.72);
  background-size: 20px 20px;
}

html[data-theme="dark"] .floor-plan-popover.floor-trace-review-popover {
  background: rgba(8, 14, 23, 0.95);
}

html[data-theme="dark"] .floor-trace-review-overlay {
  border-color: rgba(96, 165, 250, 0.28);
  background: rgba(8, 14, 23, 0.78);
}

html[data-theme="dark"] .floor-trace-review-overlay-canvas { background: #111827; }

html[data-theme="dark"] .floor-trace-review-overlay-head strong,
html[data-theme="dark"] .floor-trace-review-openings summary { color: #e5eef9; }

html[data-theme="dark"] .floor-trace-review-openings,
html[data-theme="dark"] .floor-trace-review-opening-row {
  border-color: rgba(203, 213, 225, 0.16);
  background: rgba(8, 14, 23, 0.52);
}

html[data-theme="dark"] .floor-trace-canvas-overlay :is(.label, [data-trace-label], .floor-trace-preview-room > text) {
  fill: #edf6ff;
  color: #edf6ff;
  stroke: rgba(8, 14, 23, 0.94);
}

@media (max-width: 760px) {
  .floor-plan-popover.floor-trace-review-popover { right: 8px; width: calc(100% - 16px); }
  .floor-trace-review-head { flex-wrap: wrap; }
  .floor-trace-action-row { align-items: stretch; }
  .floor-trace-action-row > button { flex: 1 1 150px; }
  .floor-trace-review-actions { justify-content: stretch; }
  .floor-trace-review-actions > :is(span, p) { width: 100%; margin-right: 0; }
  .floor-trace-review-actions button { flex: 1 1 145px; }
  .floor-trace-preview { min-height: 180px; }
}

@media (max-width: 520px) {
  .floor-trace-mode { grid-template-columns: minmax(0, 1fr); }
  .floor-trace-review-row { grid-template-columns: minmax(0, 1fr) auto; }
  .floor-trace-review-row:has(> input[type="checkbox"]) {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .floor-trace-review-row > .floor-trace-confidence {
    grid-column: 2;
    justify-self: start;
  }
  .floor-trace-review-options { align-items: stretch; flex-direction: column; }
  .floor-trace-review-options > label { width: 100%; border-radius: 8px; }
  .floor-trace-review-actions button { flex-basis: 100%; width: 100%; }
  .floor-trace-preview { min-height: 160px; }
}

.pdf-setup-status {
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: var(--radius);
  background: rgba(245, 158, 11, 0.08);
  color: #92400e;
  box-shadow: var(--glass-edge);
}

.pdf-setup-status strong {
  font-size: 11px;
  font-weight: 840;
}

.pdf-setup-status span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 660;
  line-height: 1.25;
}

html[data-theme="dark"] .pdf-setup-status {
  border-color: rgba(251, 191, 36, 0.36);
  background: rgba(251, 191, 36, 0.10);
  color: #facc15;
}

.trace-alpha-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.trace-alpha-button:disabled {
  pointer-events: none;
}

.alpha-preview-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  padding: 0 7px;
  border: 1px solid rgba(180, 83, 9, 0.36);
  border-radius: 999px;
  background: linear-gradient(145deg, rgba(254, 240, 138, 0.98), rgba(250, 204, 21, 0.92));
  color: #713f12;
  font-size: 9px;
  font-weight: 860;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58), 0 4px 10px rgba(202, 138, 4, 0.18);
}

.alpha-preview-badge::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 50;
  width: max-content;
  max-width: 180px;
  padding: 6px 8px;
  border: 1px solid var(--tooltip-border);
  border-radius: 8px;
  background: var(--tooltip-bg);
  color: var(--tooltip-text);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.1;
  text-transform: none;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
  box-shadow: var(--tooltip-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.floor-trace-actions:hover .alpha-preview-badge::after,
.trace-alpha-button:hover .alpha-preview-badge::after,
.alpha-preview-badge:hover::after,
.alpha-preview-badge:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

html[data-theme="dark"] .alpha-preview-badge {
  border-color: rgba(250, 204, 21, 0.52);
  background: linear-gradient(145deg, rgba(253, 224, 71, 0.96), rgba(202, 138, 4, 0.92));
  color: #1f1300;
}

.trace-status {
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 1px solid rgba(0, 122, 255, 0.22);
  border-radius: var(--radius);
  background: rgba(0, 122, 255, 0.07);
  color: #1d4ed8;
  box-shadow: var(--glass-edge);
}

.trace-status strong {
  font-size: 11px;
  font-weight: 820;
}

.trace-status span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.25;
}

html[data-theme="dark"] .floor-plan-card label {
  color: var(--text);
}

.floor-plan-card select,
.floor-plan-card input {
  width: 100%;
  height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--input-glass);
  color: var(--text);
  padding: 0 8px;
  font-size: 12px;
  font-weight: 650;
  box-shadow: var(--glass-edge), 0 1px 2px rgba(0, 0, 0, 0.035);
}

.inline-unit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 26px;
  align-items: center;
  gap: 6px;
}

.inline-unit small {
  color: var(--muted);
  font-size: 10px;
}

.floor-rename-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.floor-rename-row label {
  min-width: 0;
  margin: 0;
}

.floor-rename-row .secondary-mini {
  min-width: 76px;
  white-space: nowrap;
}

.add-floor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 6px;
  align-items: end;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.add-floor button {
  grid-column: 1 / -1;
}

.floor-actions {
  display: grid;
  gap: 6px;
}

.floor-actions .danger-mini {
  width: 100%;
  height: 30px;
}

.floor-upload {
  position: relative;
  min-height: 84px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  margin-top: 0;
  border-style: dashed;
  border-color: rgba(0, 122, 255, 0.30);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(233, 244, 255, 0.54));
  box-shadow: var(--glass-edge), 0 10px 26px rgba(0, 122, 255, 0.08);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.floor-upload:hover {
  border-color: rgba(0, 122, 255, 0.48);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(222, 239, 255, 0.7));
  box-shadow: var(--glass-edge), 0 14px 30px rgba(0, 122, 255, 0.12);
  transform: translateY(-1px);
}

.floor-upload-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 122, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--blue);
  box-shadow: var(--glass-edge);
}

.floor-upload-icon svg {
  width: 21px;
  height: 21px;
}

.floor-upload-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.floor-upload-copy strong {
  color: #172033;
  font-size: 13px;
  font-weight: 840;
  line-height: 1.2;
}

.floor-upload-copy small {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.floor-upload-action {
  align-self: center;
  padding: 6px 9px;
  border: 1px solid rgba(75, 85, 99, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: #374151;
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

html[data-theme="dark"] .floor-upload {
  border-color: rgba(10, 132, 255, 0.36);
  background: linear-gradient(145deg, rgba(10, 132, 255, 0.18), rgba(255, 255, 255, 0.045));
  box-shadow: var(--glass-edge), 0 12px 28px rgba(10, 132, 255, 0.10);
}

html[data-theme="dark"] .floor-upload:hover {
  border-color: rgba(64, 156, 255, 0.58);
  background: linear-gradient(145deg, rgba(10, 132, 255, 0.25), rgba(255, 255, 255, 0.07));
  box-shadow: var(--glass-edge), 0 16px 34px rgba(10, 132, 255, 0.16);
}

html[data-theme="dark"] .floor-upload-icon,
html[data-theme="dark"] .floor-upload-action {
  border-color: rgba(239, 246, 255, 0.16);
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  box-shadow: var(--glass-edge);
}

html[data-theme="dark"] .floor-upload-action {
  border-color: rgba(64, 156, 255, 0.48);
  background: rgba(10, 132, 255, 0.24);
  color: #f8fbff;
}

html[data-theme="dark"] .floor-upload-copy strong {
  color: var(--text);
}

html[data-theme="dark"] .floor-upload-copy small {
  color: var(--muted);
}

.floor-drawing-rotation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 7px 8px 7px 10px;
  border: 1px solid rgba(0, 122, 255, 0.18);
  border-radius: 7px;
  background: rgba(239, 246, 255, 0.62);
  box-shadow: var(--glass-edge);
}

.floor-drawing-rotation > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.floor-drawing-rotation > span strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 820;
}

.floor-drawing-rotation > span small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 680;
  line-height: 1.2;
}

.floor-drawing-rotation > div {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.floor-drawing-rotation button {
  width: 34px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(0, 122, 255, 0.26);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--blue);
  font-size: 18px;
  font-weight: 780;
  line-height: 1;
  box-shadow: var(--glass-edge), 0 3px 10px rgba(0, 122, 255, 0.08);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.floor-drawing-rotation button:hover:not(:disabled) {
  border-color: rgba(0, 122, 255, 0.52);
  background: #ffffff;
  transform: translateY(-1px);
}

.floor-drawing-rotation button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
  box-shadow: none;
}

html[data-theme="dark"] .floor-drawing-rotation {
  border-color: rgba(96, 165, 250, 0.26);
  background: rgba(30, 64, 175, 0.12);
}

html[data-theme="dark"] .floor-drawing-rotation button {
  border-color: rgba(96, 165, 250, 0.34);
  background: rgba(15, 23, 42, 0.72);
  color: #93c5fd;
}

.floor-drawing-stack-manager {
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(0, 122, 255, 0.18);
  border-radius: 8px;
  background: rgba(239, 246, 255, 0.46);
  box-shadow: var(--glass-edge);
}

.floor-drawing-stack-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.floor-drawing-stack-head > span {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.floor-drawing-stack-head strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 840;
}

.floor-drawing-stack-head small,
.floor-drawing-stack-tools > small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 670;
  line-height: 1.3;
}

.floor-drawing-stack-head button {
  min-height: 27px;
  padding: 0 9px;
  border: 1px solid rgba(0, 122, 255, 0.28);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--blue);
  font-size: 10px;
  font-weight: 820;
}

.floor-drawing-stack-head button[aria-pressed="true"] {
  background: var(--blue);
  color: #fff;
}

.floor-drawing-stack-status {
  margin: 0;
  padding: 5px 7px;
  border-radius: 5px;
  background: rgba(0, 122, 255, 0.08);
  color: var(--muted);
  font-size: 9px;
  font-weight: 720;
}

.floor-drawing-stack-list {
  max-height: 146px;
  overflow: auto;
  display: grid;
  gap: 4px;
}

.floor-drawing-stack-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 28px 28px;
  align-items: stretch;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.66);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
}

.floor-drawing-stack-row.is-selected {
  border-color: rgba(0, 122, 255, 0.34);
  background: linear-gradient(145deg, rgba(219, 234, 254, 0.74), rgba(239, 246, 255, 0.6));
  box-shadow: inset 3px 0 0 rgba(0, 122, 255, 0.72);
}

.floor-drawing-stack-row.active {
  border-color: rgba(0, 122, 255, 0.52);
  box-shadow: inset 0 0 0 1px rgba(0, 122, 255, 0.15), 0 4px 12px rgba(0, 122, 255, 0.08);
}

.floor-drawing-stack-row.active.is-selected {
  border-color: rgba(0, 122, 255, 0.68);
  background: linear-gradient(145deg, rgba(191, 219, 254, 0.78), rgba(239, 246, 255, 0.7));
  box-shadow: inset 3px 0 0 var(--blue), inset 0 0 0 1px rgba(0, 122, 255, 0.18), 0 5px 14px rgba(0, 122, 255, 0.11);
}

.floor-drawing-stack-row.hidden-drawing {
  opacity: 1;
}

.floor-drawing-stack-row.hidden-drawing :is(.floor-drawing-stack-select, .floor-drawing-stack-icon) {
  opacity: 0.52;
}

.floor-drawing-stack-row.hidden-drawing.is-selected {
  border-color: rgba(0, 122, 255, 0.4);
}

.floor-drawing-stack-row.hidden-drawing.is-selected .floor-drawing-stack-check {
  opacity: 1;
}

.floor-drawing-stack-check,
.floor-drawing-stack-select,
.floor-drawing-stack-icon {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
}

.floor-drawing-stack-check {
  width: 30px;
  min-width: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.floor-drawing-stack-check > span {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: color-mix(in srgb, var(--surface-solid) 86%, transparent);
  color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.64);
}

.floor-drawing-stack-check:hover {
  background: color-mix(in srgb, var(--blue-soft) 62%, transparent);
  color: var(--blue);
}

.floor-drawing-stack-check:is(.active, [aria-pressed="true"]) {
  background: color-mix(in srgb, var(--blue-soft) 78%, transparent);
  color: #ffffff;
}

.floor-drawing-stack-check:is(.active, [aria-pressed="true"]) > span {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), 0 2px 6px rgba(0, 122, 255, 0.2);
}

.floor-drawing-stack-check:focus-visible,
.floor-drawing-stack-select:focus-visible,
.floor-drawing-stack-icon:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid color-mix(in srgb, var(--blue) 34%, transparent);
  outline-offset: -3px;
}

.floor-drawing-stack-select {
  min-width: 0;
  padding: 5px 7px;
  text-align: left;
}

.floor-drawing-stack-select > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.floor-drawing-stack-select strong,
.floor-drawing-stack-select small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.floor-drawing-stack-select strong {
  font-size: 10px;
  font-weight: 820;
}

.floor-drawing-stack-select small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 680;
}

.floor-drawing-stack-icon {
  border-left: 1px solid var(--line);
  font-size: 15px;
  font-weight: 780;
}

.floor-drawing-stack-icon.danger {
  color: #b42318;
  font-size: 17px;
}

.floor-drawing-stack-icon:disabled {
  cursor: not-allowed;
  opacity: 0.34;
}

.floor-drawing-stack-tools {
  display: grid;
  gap: 6px;
}

.floor-drawing-selection-summary {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 5px 7px;
  border: 1px solid rgba(0, 122, 255, 0.24);
  border-radius: 6px;
  background: color-mix(in srgb, var(--blue-soft) 64%, var(--surface-soft));
  color: var(--text);
  font-size: 9px;
  font-weight: 760;
  line-height: 1.25;
}

.floor-drawing-selection-summary[hidden],
.floor-drawing-title-block-cleanup[hidden],
.floor-drawing-transform-nudge > button[hidden] {
  display: none !important;
}

.floor-drawing-selection-summary > span {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.floor-drawing-selection-summary > span > :is(strong, small) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.floor-drawing-selection-summary > :is(span, strong) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.floor-drawing-selection-summary > button {
  flex: 0 0 auto;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid rgba(0, 122, 255, 0.28);
  border-radius: 5px;
  background: var(--button-glass);
  color: var(--blue);
  font: inherit;
  font-size: 9px;
  font-weight: 820;
}

.floor-drawing-selection-summary > button:hover {
  border-color: var(--control-hover-border);
  background: var(--control-hover-bg);
  box-shadow: var(--control-hover-shadow);
}

.floor-drawing-selection-summary > button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--blue) 34%, transparent);
  outline-offset: 2px;
}

.floor-drawing-opacity {
  display: grid !important;
  grid-template-columns: auto minmax(80px, 1fr) 34px;
  align-items: center;
  gap: 7px !important;
  margin: 0 !important;
  color: var(--muted);
  font-size: 9px !important;
  font-weight: 740 !important;
}

.floor-drawing-opacity input {
  height: 20px !important;
  padding: 0 !important;
  box-shadow: none !important;
}

.floor-drawing-opacity output {
  color: var(--text);
  font-size: 9px;
  font-weight: 800;
  text-align: right;
}

.floor-drawing-scale-override {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-soft) 84%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.floor-drawing-scale-override.has-override {
  border-color: rgba(0, 122, 255, 0.34);
  background: color-mix(in srgb, var(--blue-soft) 66%, var(--surface-soft));
  box-shadow: inset 3px 0 0 rgba(0, 122, 255, 0.68), inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.floor-drawing-scale-override:focus-within {
  border-color: var(--blue-border);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--blue) 12%, transparent), 0 0 0 3px color-mix(in srgb, var(--blue) 12%, transparent);
}

.floor-drawing-scale-override:is(.is-invalid, :has(input[aria-invalid="true"])) {
  border-color: color-mix(in srgb, var(--red) 58%, var(--line-strong));
  background: color-mix(in srgb, var(--red) 7%, var(--surface-soft));
}

.floor-drawing-scale-head {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 7px;
}

.floor-drawing-scale-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.floor-drawing-scale-copy > :is(strong, small) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.floor-drawing-scale-copy > strong {
  color: var(--text);
  font-size: 9px;
  font-weight: 830;
}

.floor-drawing-scale-copy > small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 670;
  line-height: 1.25;
}

.floor-drawing-scale-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 17px;
  padding: 2px 6px;
  border: 1px solid rgba(0, 122, 255, 0.28);
  border-radius: 999px;
  background: rgba(0, 122, 255, 0.1);
  color: var(--blue);
  font-size: 8px;
  font-style: normal;
  font-weight: 880;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.floor-drawing-scale-badge[hidden] {
  display: none !important;
}

.floor-drawing-scale-actions {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 5px;
}

.floor-drawing-scale-override .floor-drawing-scale-field {
  min-width: 0;
  min-height: 31px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0 0 0 7px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--input-glass);
  color: var(--muted);
  font-size: 10px;
  font-weight: 790;
  box-shadow: var(--glass-edge), 0 1px 2px rgba(15, 23, 42, 0.04);
}

.floor-drawing-scale-override .floor-drawing-scale-field:focus-within {
  border-color: var(--blue);
  box-shadow: var(--glass-edge), 0 0 0 2px color-mix(in srgb, var(--blue) 16%, transparent);
}

.floor-drawing-scale-field > span {
  white-space: nowrap;
  pointer-events: none;
}

.floor-drawing-scale-field > input,
.floor-plan-card .floor-drawing-scale-field > input {
  width: 100%;
  height: 29px;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0 7px 0 2px;
  border: 0;
  border-radius: 0 5px 5px 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 11px;
  font-weight: 820;
  line-height: 1;
  text-align: right;
  box-shadow: none;
}

.floor-drawing-scale-field > input[aria-invalid="true"] {
  color: var(--red);
}

.floor-drawing-scale-reset {
  min-width: 50px;
  min-height: 31px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 7px;
  border: 1px solid rgba(0, 122, 255, 0.26);
  border-radius: 6px;
  background: var(--button-glass);
  color: var(--blue);
  font: inherit;
  font-size: 9px;
  font-weight: 820;
  line-height: 1;
  white-space: nowrap;
  box-shadow: var(--glass-edge), 0 2px 7px rgba(15, 23, 42, 0.045);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.floor-drawing-scale-reset:hover:not(:disabled) {
  border-color: var(--control-hover-border);
  background: var(--control-hover-bg);
  color: var(--blue-hover);
  box-shadow: var(--control-hover-shadow);
}

.floor-drawing-scale-reset:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--blue) 34%, transparent);
  outline-offset: 2px;
  border-color: var(--blue);
}

.floor-drawing-scale-reset:disabled {
  cursor: not-allowed;
  opacity: 0.38;
  box-shadow: none;
}

.floor-drawing-scale-note {
  min-width: 0;
  margin: 0;
  color: var(--muted);
  font-size: 8px;
  font-weight: 650;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.floor-drawing-scale-override:is(.is-invalid, :has(input[aria-invalid="true"])) .floor-drawing-scale-note {
  color: color-mix(in srgb, var(--red) 82%, var(--text));
}

.floor-drawing-title-block-cleanup {
  display: grid !important;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: start;
  gap: 7px !important;
  margin: 0 !important;
  padding: 6px 7px;
  border: 1px solid rgba(0, 122, 255, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--text);
}

.floor-drawing-title-block-cleanup input {
  width: 14px !important;
  height: 14px !important;
  min-height: 0 !important;
  margin: 1px 0 0 !important;
  padding: 0 !important;
}

.floor-drawing-title-block-cleanup span {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.floor-drawing-title-block-cleanup strong {
  font-size: 9px;
  font-weight: 820;
}

.floor-drawing-title-block-cleanup small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 650;
  line-height: 1.25;
}

.floor-drawing-nudge {
  display: grid;
  grid-template-columns: repeat(4, 30px) minmax(52px, 1fr);
  gap: 4px;
}

.floor-drawing-nudge button {
  height: 26px;
  padding: 0 5px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--button-glass);
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
}

.floor-plan-drawing-selection {
  fill: rgba(0, 122, 255, 0.045);
  stroke: #007aff;
  stroke-width: 2;
  stroke-dasharray: 8 5;
  pointer-events: none;
}

.datum-preview-wrap.is-arranging .datum-preview,
.datum-preview-wrap.is-arranging.zoomed .datum-preview {
  cursor: grabbing;
  user-select: none;
}

.datum-preview-wrap.arrange-enabled .datum-preview,
.datum-preview-wrap.arrange-enabled.zoomed .datum-preview {
  cursor: grab;
}

.datum-preview-wrap.arrange-enabled.is-arranging .datum-preview {
  cursor: grabbing;
}

/* Drawing transform toolbar and full-screen alignment editor. */
.floor-drawing-transform-controls {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(0, 122, 255, 0.2);
  border-radius: 8px;
  background: color-mix(in srgb, var(--blue-soft) 48%, var(--surface-soft));
  box-shadow: var(--glass-edge), 0 7px 18px rgba(15, 23, 42, 0.055);
}

.floor-drawing-transform-controls > :is(header, .floor-drawing-transform-head) {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.floor-drawing-transform-controls > :is(header, .floor-drawing-transform-head) > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.floor-drawing-transform-controls :is(strong, small) {
  min-width: 0;
  overflow-wrap: anywhere;
}

.floor-drawing-transform-controls strong {
  color: var(--text);
  font-size: 10px;
  font-weight: 840;
}

.floor-drawing-transform-controls small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 670;
  line-height: 1.3;
}

.floor-drawing-transform-actions {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}

.floor-drawing-transform-actions > button,
.floor-drawing-transform-nudge > button {
  min-width: 0;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--button-glass);
  color: var(--text);
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
  box-shadow: var(--glass-edge), 0 3px 9px rgba(15, 23, 42, 0.045);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.floor-drawing-transform-actions > button:hover:not(:disabled),
.floor-drawing-transform-nudge > button:hover:not(:disabled) {
  border-color: var(--control-hover-border);
  background: var(--control-hover-bg);
  box-shadow: var(--control-hover-shadow);
  color: var(--blue-hover);
  transform: translateY(-1px);
}

.floor-drawing-transform-actions > button:is(.active, [aria-pressed="true"]),
.floor-drawing-transform-nudge > button:is(.active, [aria-pressed="true"]) {
  border-color: var(--blue);
  background: linear-gradient(135deg, var(--blue), color-mix(in srgb, var(--blue) 72%, #4f46e5));
  color: #ffffff;
  box-shadow: var(--blue-shadow);
}

.floor-drawing-transform-actions > button:disabled,
.floor-drawing-transform-nudge > button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
  box-shadow: none;
  transform: none;
}

.floor-drawing-transform-actions > button:focus-visible,
.floor-drawing-transform-nudge > button:focus-visible,
.floor-drawing-editor-dialog button:focus-visible,
.floor-drawing-editor-dialog :is(input, select, textarea):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--blue) 34%, transparent);
  outline-offset: 2px;
  border-color: var(--blue);
}

.floor-drawing-transform-nudge {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(30px, 40px)) minmax(64px, 1fr);
  gap: 5px;
}

.floor-drawing-transform-nudge > button {
  min-height: 28px;
  padding-inline: 5px;
}

.datum-preview-wrap.crop-enabled .datum-preview,
.datum-preview-wrap.crop-enabled.zoomed .datum-preview {
  cursor: crosshair;
}

.datum-preview-wrap.is-cropping,
.datum-preview-wrap.is-cropping .datum-preview {
  cursor: crosshair;
  user-select: none;
  touch-action: none;
}

.floor-plan-drawing-crop {
  pointer-events: none;
}

.floor-plan-drawing-crop-shade {
  fill: rgba(8, 15, 28, 0.5);
  fill-rule: evenodd;
  pointer-events: none;
}

.floor-plan-drawing-crop-selection {
  fill: rgba(10, 124, 255, 0.06);
  stroke: #0a7cff;
  stroke-width: 3;
  stroke-dasharray: 10 6;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 4px rgba(10, 124, 255, 0.32));
  pointer-events: none;
}

.datum-preview-wrap.editor {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  border-radius: 8px;
  background:
    linear-gradient(rgba(148, 163, 184, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.09) 1px, transparent 1px),
    color-mix(in srgb, var(--surface-solid) 94%, var(--bg));
  background-size: 24px 24px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42), 0 12px 30px rgba(15, 23, 42, 0.1);
}

.datum-preview-wrap.editor .datum-preview {
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
}

.floor-drawing-editor-overlay,
.floor-drawing-editor-overlay * {
  box-sizing: border-box;
}

.floor-drawing-editor-overlay {
  position: fixed;
  z-index: 4600;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 12px;
  isolation: isolate;
  overscroll-behavior: contain;
}

.floor-drawing-editor-backdrop {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(8, 15, 28, 0.66);
  box-shadow: none;
  cursor: default;
  backdrop-filter: blur(9px) saturate(118%);
  -webkit-backdrop-filter: blur(9px) saturate(118%);
}

.floor-drawing-editor-dialog {
  position: relative;
  width: min(1880px, calc(100vw - 24px));
  height: calc(100vh - 24px);
  height: calc(100dvh - 24px);
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--blue-border) 55%, var(--line-strong));
  border-radius: 14px;
  background:
    radial-gradient(circle at 5% 0%, color-mix(in srgb, var(--blue-soft) 56%, transparent), transparent 33%),
    color-mix(in srgb, var(--surface-solid) 96%, var(--bg));
  color: var(--text);
  box-shadow: 0 30px 90px rgba(8, 15, 28, 0.32), var(--glass-edge);
}

.floor-drawing-editor-overlay.is-entering .floor-drawing-editor-backdrop {
  animation: floor-drawing-editor-backdrop-in 0.18s ease-out both;
}

.floor-drawing-editor-overlay.is-entering .floor-drawing-editor-dialog {
  animation: floor-drawing-editor-dialog-in 0.2s ease-out both;
}

.floor-drawing-editor-head {
  min-width: 0;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 13px 10px 16px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-soft) 92%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.floor-drawing-editor-head > :is(div, span) {
  min-width: 0;
}

.floor-drawing-editor-head h2,
.floor-drawing-editor-head p {
  margin: 0;
}

.floor-drawing-editor-head h2 {
  color: var(--text);
  font-size: clamp(15px, 1.6vw, 20px);
  font-weight: 860;
  line-height: 1.15;
}

.floor-drawing-editor-head p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 670;
  line-height: 1.3;
}

.floor-drawing-editor-head > button {
  flex: 0 0 auto;
  min-width: 38px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--button-glass);
  color: var(--text);
  font-size: 11px;
  font-weight: 820;
  box-shadow: var(--theme-control-shadow);
}

.floor-drawing-editor-head > button:hover {
  border-color: var(--control-hover-border);
  background: var(--control-hover-bg);
  box-shadow: var(--control-hover-shadow);
}

.floor-drawing-editor-body {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 300px;
  gap: 10px;
  padding: 10px;
  overflow: hidden;
}

.floor-drawing-editor-rail,
.floor-drawing-editor-inspector {
  min-width: 0;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 1px 3px 1px 1px;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--blue) 34%, transparent) transparent;
}

.floor-drawing-editor-viewport {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  overflow: hidden;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg) 76%, var(--surface-solid));
  box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.05);
}

.floor-drawing-editor-control-card {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--tile-glass);
  box-shadow: var(--glass-edge), 0 6px 15px rgba(15, 23, 42, 0.045);
}

.floor-drawing-editor-control-card > :is(header, .floor-drawing-editor-control-head) {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.floor-drawing-editor-control-card :is(h3, h4, p) {
  margin: 0;
}

.floor-drawing-editor-control-card :is(h3, h4) {
  color: var(--text);
  font-size: 11px;
  font-weight: 840;
}

.floor-drawing-editor-control-card p {
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  line-height: 1.35;
}

.floor-drawing-editor-control-card label {
  min-width: 0;
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 740;
}

.floor-drawing-editor-control-card :is(input:not([type="checkbox"]):not([type="radio"]), select) {
  width: 100%;
  min-width: 0;
}

.floor-drawing-editor-footer {
  min-width: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 13px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-soft) 92%, transparent);
  color: var(--muted);
  font-size: 10px;
  font-weight: 680;
}

.floor-drawing-editor-footer > :is(div, span) {
  min-width: 0;
}

.floor-drawing-editor-footer > div:last-child {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

@keyframes floor-drawing-editor-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes floor-drawing-editor-dialog-in {
  from { opacity: 0; transform: translateY(8px) scale(0.992); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

html[data-theme="dark"] .floor-drawing-transform-controls {
  border-color: rgba(96, 165, 250, 0.27);
  background: color-mix(in srgb, rgba(30, 64, 175, 0.16) 62%, var(--surface-soft));
}

html[data-theme="dark"] .floor-drawing-transform-actions > button,
html[data-theme="dark"] .floor-drawing-transform-nudge > button,
html[data-theme="dark"] .floor-drawing-editor-head > button {
  border-color: rgba(148, 163, 184, 0.3);
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.8));
  color: #e5edf8;
}

html[data-theme="dark"] .floor-drawing-transform-actions > button:is(.active, [aria-pressed="true"]),
html[data-theme="dark"] .floor-drawing-transform-nudge > button:is(.active, [aria-pressed="true"]) {
  border-color: rgba(96, 165, 250, 0.72);
  background: linear-gradient(135deg, #0a7cff, #4f46e5);
  color: #ffffff;
}

html[data-theme="dark"] .datum-preview-wrap.editor {
  background:
    linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    #111827;
  background-size: 24px 24px;
}

html[data-theme="dark"] .floor-plan-drawing-crop-shade {
  fill: rgba(2, 6, 23, 0.66);
}

html[data-theme="dark"] .floor-plan-drawing-crop-selection {
  fill: rgba(96, 165, 250, 0.08);
  stroke: #60a5fa;
}

html[data-theme="dark"] .floor-drawing-editor-dialog {
  border-color: rgba(96, 165, 250, 0.34);
  background:
    radial-gradient(circle at 5% 0%, rgba(30, 64, 175, 0.2), transparent 34%),
    color-mix(in srgb, var(--surface-solid) 96%, #0f172a);
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .floor-drawing-editor-head,
html[data-theme="dark"] .floor-drawing-editor-footer {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .floor-drawing-editor-viewport {
  border-color: rgba(148, 163, 184, 0.26);
  background: #0f172a;
}

html[data-theme="dark"] .floor-drawing-editor-control-card {
  border-color: rgba(148, 163, 184, 0.24);
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.72));
}

@media (max-width: 1000px) {
  .floor-drawing-editor-body {
    grid-template-columns: minmax(0, 1fr) 280px;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .floor-drawing-editor-rail {
    grid-column: 1 / -1;
    grid-row: 1;
    max-height: 156px;
    display: flex;
    align-items: stretch;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1px 1px 4px;
  }

  .floor-drawing-editor-rail > * {
    flex: 0 0 min(340px, 78vw);
  }

  .floor-drawing-editor-viewport {
    grid-column: 1;
    grid-row: 2;
  }

  .floor-drawing-editor-inspector {
    grid-column: 2;
    grid-row: 2;
  }

  .floor-drawing-transform-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .floor-drawing-editor-overlay {
    padding: 0;
  }

  .floor-drawing-editor-dialog {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    border-width: 0;
    border-radius: 0;
  }

  .floor-drawing-editor-head {
    min-height: 52px;
    align-items: flex-start;
    padding: max(9px, env(safe-area-inset-top)) 10px 8px;
  }

  .floor-drawing-editor-head p {
    display: none;
  }

  .floor-drawing-editor-body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(280px, 48dvh) auto auto;
    gap: 8px;
    padding: 8px;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .floor-drawing-editor-viewport {
    grid-column: 1;
    grid-row: 1;
    min-height: 280px;
    padding: 4px;
  }

  .floor-drawing-editor-rail,
  .floor-drawing-editor-inspector {
    grid-column: 1;
    max-height: none;
    overflow: visible;
  }

  .floor-drawing-editor-rail {
    grid-row: 2;
    display: grid;
    padding: 0;
  }

  .floor-drawing-editor-rail > * {
    width: auto;
    flex-basis: auto;
  }

  .floor-drawing-editor-inspector {
    grid-row: 3;
    padding: 0;
  }

  .floor-drawing-editor-footer {
    min-height: 42px;
    padding: 6px max(9px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(9px, env(safe-area-inset-left));
  }

  .floor-drawing-editor-footer > span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .floor-drawing-transform-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .floor-drawing-transform-nudge {
    grid-template-columns: repeat(4, minmax(30px, 1fr));
  }

  .floor-drawing-transform-nudge > button:last-child {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .floor-drawing-editor-backdrop,
  .floor-drawing-editor-dialog {
    animation: none;
  }

  .floor-drawing-transform-actions > button,
  .floor-drawing-transform-nudge > button {
    transition: none;
  }
}

html[data-theme="dark"] .floor-drawing-stack-manager {
  border-color: rgba(96, 165, 250, 0.26);
  background: rgba(30, 64, 175, 0.10);
}

html[data-theme="dark"] .floor-drawing-stack-row,
html[data-theme="dark"] .floor-drawing-stack-head button {
  background: rgba(15, 23, 42, 0.72);
}

html[data-theme="dark"] .floor-drawing-stack-row.is-selected {
  border-color: rgba(96, 165, 250, 0.42);
  background: linear-gradient(145deg, rgba(30, 64, 175, 0.32), rgba(15, 23, 42, 0.72));
  box-shadow: inset 3px 0 0 rgba(96, 165, 250, 0.76);
}

html[data-theme="dark"] .floor-drawing-stack-check {
  border-color: rgba(148, 163, 184, 0.24);
  color: #94a3b8;
}

html[data-theme="dark"] .floor-drawing-stack-check > span {
  border-color: rgba(148, 163, 184, 0.42);
  background: rgba(15, 23, 42, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .floor-drawing-stack-check:is(.active, [aria-pressed="true"]) > span {
  border-color: #60a5fa;
  background: #3b82f6;
  color: #ffffff;
}

html[data-theme="dark"] .floor-drawing-selection-summary {
  border-color: rgba(96, 165, 250, 0.3);
  background: rgba(30, 64, 175, 0.18);
}

html[data-theme="dark"] .floor-drawing-selection-summary > button {
  border-color: rgba(96, 165, 250, 0.36);
  background: rgba(15, 23, 42, 0.72);
  color: #93c5fd;
}

html[data-theme="dark"] .floor-drawing-scale-override {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.56);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .floor-drawing-scale-override.has-override {
  border-color: rgba(96, 165, 250, 0.36);
  background: rgba(30, 64, 175, 0.2);
  box-shadow: inset 3px 0 0 rgba(96, 165, 250, 0.72), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .floor-drawing-scale-override:focus-within {
  border-color: rgba(96, 165, 250, 0.58);
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.12), 0 0 0 3px rgba(59, 130, 246, 0.16);
}

html[data-theme="dark"] .floor-drawing-scale-override:is(.is-invalid, :has(input[aria-invalid="true"])) {
  border-color: rgba(248, 113, 113, 0.58);
  background: rgba(127, 29, 29, 0.18);
}

html[data-theme="dark"] .floor-drawing-scale-badge {
  border-color: rgba(96, 165, 250, 0.4);
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
}

html[data-theme="dark"] .floor-drawing-scale-override .floor-drawing-scale-field {
  border-color: rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.76);
  color: #94a3b8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .floor-drawing-scale-field > input {
  color: #e2e8f0;
}

html[data-theme="dark"] .floor-drawing-scale-reset {
  border-color: rgba(96, 165, 250, 0.36);
  background: rgba(15, 23, 42, 0.72);
  color: #93c5fd;
}

html[data-theme="dark"] .floor-drawing-title-block-cleanup {
  border-color: rgba(96, 165, 250, 0.24);
  background: rgba(15, 23, 42, 0.56);
}

html[data-theme="dark"] .floor-drawing-stack-row.active {
  border-color: rgba(96, 165, 250, 0.62);
}

html[data-theme="dark"] .floor-drawing-stack-row.active.is-selected {
  border-color: rgba(96, 165, 250, 0.78);
  background: linear-gradient(145deg, rgba(30, 64, 175, 0.44), rgba(15, 23, 42, 0.76));
  box-shadow: inset 3px 0 0 #60a5fa, inset 0 0 0 1px rgba(96, 165, 250, 0.24), 0 5px 15px rgba(0, 0, 0, 0.24);
}

.datum-preview-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.datum-preview-wrap.picking {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 1px rgba(75, 85, 99, 0.24);
}

.datum-preview-floating-actions {
  position: absolute;
  z-index: 3;
  top: 6px;
  left: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}

.datum-preview-expand {
  min-width: 40px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(148, 163, 184, 0.52);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-solid) 78%, transparent);
  color: #17437a;
  font: inherit;
  font-size: 10px;
  font-weight: 840;
  line-height: 1;
  white-space: nowrap;
  box-shadow: var(--glass-edge), 0 7px 20px rgba(15, 23, 42, 0.14);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  pointer-events: auto;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.datum-preview-expand > svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.datum-preview-expand-label {
  display: inline;
}

.datum-preview-expand:hover {
  border-color: var(--control-hover-border);
  background: var(--control-hover-bg);
  color: var(--blue-hover);
  box-shadow: var(--control-hover-shadow);
  transform: translateY(-1px);
}

.datum-preview-expand:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--blue) 36%, transparent);
  outline-offset: 2px;
  border-color: var(--blue);
}

.datum-preview-wrap.editor .datum-preview-floating-actions {
  display: none;
}

.datum-preview-tools {
  position: absolute;
  z-index: 2;
  top: 6px;
  right: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.datum-preview-tools button {
  min-width: 25px;
  height: 24px;
  padding: 0 6px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 4px;
  background: var(--button-glass);
  color: #17437a;
  font-size: 11px;
  font-weight: 840;
  box-shadow: var(--glass-edge);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.datum-preview-tools button:hover {
  border-color: var(--control-hover-border);
  background: var(--control-hover-bg);
  color: #374151;
  box-shadow: var(--control-hover-shadow);
  transform: translateY(-1px);
}

.datum-preview-tools strong {
  min-width: 38px;
  color: #334155;
  font-size: 10px;
  font-weight: 850;
  text-align: center;
}

html[data-theme="dark"] .datum-preview-wrap {
  border-color: rgba(148, 163, 184, 0.30);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.76));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 24px rgba(0, 0, 0, 0.20);
}

html[data-theme="dark"] .datum-preview-wrap.picking {
  border-color: rgba(96, 165, 250, 0.70);
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.34), 0 12px 28px rgba(37, 99, 235, 0.20);
}

html[data-theme="dark"] .datum-preview-expand {
  border-color: rgba(148, 163, 184, 0.34);
  background: rgba(15, 23, 42, 0.8);
  color: #dbeafe;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 26px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .datum-preview-expand:hover {
  border-color: rgba(96, 165, 250, 0.54);
  background: rgba(30, 64, 175, 0.46);
  color: #eff6ff;
}

html[data-theme="dark"] .datum-preview-tools {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .datum-preview-tools button {
  border-color: rgba(148, 163, 184, 0.24);
  color: #dbeafe;
}

html[data-theme="dark"] .datum-preview-tools strong {
  color: #e2e8f0;
}

@media (max-width: 700px) {
  .datum-preview-floating-actions {
    top: 7px;
    left: 7px;
  }

  .datum-preview-expand {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
  }

  .datum-preview-expand-label {
    display: none;
  }

  .floor-drawing-stack-row {
    grid-template-columns: 40px minmax(0, 1fr) 36px 36px;
    min-height: 44px;
  }

  .floor-drawing-stack-check {
    width: 40px;
    min-width: 40px;
  }

  .floor-drawing-selection-summary {
    flex-wrap: wrap;
  }

  .floor-drawing-selection-summary > button {
    min-height: 30px;
    margin-left: auto;
  }

  .floor-drawing-scale-override .floor-drawing-scale-field {
    min-height: 40px;
  }

  .floor-drawing-scale-field > input,
  .floor-plan-card .floor-drawing-scale-field > input {
    height: 38px;
    min-height: 38px;
    font-size: 16px;
  }

  .floor-drawing-scale-reset {
    min-width: 62px;
    min-height: 40px;
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .datum-preview-expand,
  .floor-drawing-stack-row,
  .floor-drawing-stack-check,
  .floor-drawing-scale-override,
  .floor-drawing-scale-reset {
    transition: none;
  }
}

.datum-preview {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 980 / 610;
  cursor: crosshair;
}

.datum-preview-wrap.zoomed .datum-preview {
  cursor: grab;
}

.datum-preview-wrap.zoomed.picking .datum-preview {
  cursor: crosshair;
}

.datum-preview-wrap.is-panning .datum-preview,
.datum-preview-wrap.zoomed.is-panning .datum-preview,
.datum-preview-wrap.zoomed.picking.is-panning .datum-preview {
  cursor: grabbing;
  user-select: none;
}

.datum-preview text {
  fill: #64748b;
  font-size: 24px;
  font-weight: 720;
}

.datum-preview-origin path {
  fill: none;
  stroke: #4b5563;
  stroke-width: 8;
}

.datum-preview-origin circle {
  fill: rgba(15, 118, 110, 0.22);
  stroke: #4b5563;
  stroke-width: 6;
}

.datum-preview-marker {
  pointer-events: none;
}

.datum-preview-calibration {
  pointer-events: none;
}

.datum-preview-calibration path {
  fill: none;
  stroke: #b45309;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 18 12;
}

.datum-preview-calibration circle {
  fill: #fffbeb;
  stroke: #b45309;
  stroke-width: 6;
}

.datum-preview-calibration text {
  fill: #78350f;
  font-size: 18px;
  font-weight: 840;
}

.datum-preview-calibration.editing path {
  stroke: #f59e0b;
}

.datum-preview-marker path {
  stroke: var(--blue);
  stroke-width: 8;
  stroke-linecap: round;
}

.datum-preview-marker circle {
  fill: rgba(75, 85, 99, 0.2);
  stroke: var(--blue);
  stroke-width: 6;
}

.datum-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.62);
  color: #475569;
  font-size: 11px;
  font-weight: 650;
}

.datum-status strong {
  color: #172033;
  font-weight: 790;
}

html[data-theme="dark"] .datum-status strong {
  color: var(--text);
}

html[data-theme="dark"] .datum-status {
  border-color: rgba(148, 163, 184, 0.30);
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.86));
  color: #cbd5e1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 18px rgba(0, 0, 0, 0.20);
}

html[data-theme="dark"] .datum-status span {
  color: #cbd5e1;
}

html[data-theme="dark"] .floor-plan-card .datum-status strong,
html[data-theme="dark"] .project-setup-calibration-strip .datum-status strong {
  color: #f8fafc;
}

.floor-height-meta {
  padding-top: 0;
}

.room-draft-panel {
  position: absolute;
  z-index: 6;
  left: 24px;
  bottom: 42px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
  color: #334155;
  font-size: 12px;
}

.room-draft-panel strong {
  color: #172033;
  font-weight: 820;
}

.manual-room-draft-panel {
  width: min(720px, calc(100vw - 72px));
}

.manual-room-draft-status {
  min-width: 86px;
  display: grid;
  gap: 1px;
}

.manual-room-draft-status small {
  color: #64748b;
  font-size: 10px;
  font-weight: 680;
}

.manual-room-ai-mode,
.manual-room-ai-consent {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  border: 1px solid rgba(124, 58, 237, 0.22);
  border-radius: 10px;
  background: rgba(245, 243, 255, 0.76);
  padding: 6px 9px;
  cursor: pointer;
}

.existing-room-ai-assist {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 2px 0 4px;
}

.ai-room-assist-section > .collapsible-section-head > small,
.manual-room-ai-premium-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 17px;
  padding: 2px 7px;
  border: 1px solid rgba(10, 124, 255, 0.22);
  border-radius: 999px;
  background: rgba(10, 124, 255, 0.1);
  color: #0759b5;
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.existing-room-ai-head {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.existing-room-ai-head > span:last-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.existing-room-ai-head strong {
  color: #172033;
  font-size: 12px;
  font-weight: 850;
}

.existing-room-ai-head small,
.existing-room-ai-assist > p,
.existing-room-ai-status small {
  margin: 0;
  color: #667085;
  font-size: 9.5px;
  font-weight: 650;
  line-height: 1.4;
}

.existing-room-ai-actions {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.existing-room-ai-actions > button {
  width: 100%;
  min-height: 38px;
  padding-inline: 7px;
  white-space: normal;
  line-height: 1.25;
}

.existing-room-ai-options {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.manual-room-ai-mode.compact,
.manual-room-ai-consent.compact {
  min-height: 38px;
  padding: 7px 8px;
}

.manual-room-ai-mode.compact > span strong {
  font-size: 9.5px;
  line-height: 1.2;
}

.existing-room-ai-premium-lock {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(10, 124, 255, 0.2);
  border-radius: 10px;
  background: rgba(239, 246, 255, 0.82);
  padding: 8px 9px;
}

.existing-room-ai-premium-lock > span {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.existing-room-ai-premium-lock strong {
  color: #0759b5;
  font-size: 10.5px;
}

.existing-room-ai-premium-lock small {
  color: #64748b;
  font-size: 9px;
  font-weight: 650;
}

.existing-room-ai-status {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 3px 8px;
  border: 1px solid rgba(124, 58, 237, 0.22);
  border-radius: 10px;
  background: rgba(245, 243, 255, 0.76);
  padding: 8px 9px;
}

.existing-room-ai-status strong {
  color: #4c1d95;
  font-size: 10.5px;
}

.existing-room-ai-status small {
  grid-column: 1 / -1;
}

.existing-room-ai-status > button {
  grid-column: 2;
  grid-row: 1;
}

.manual-room-ai-mode.disabled {
  opacity: 0.56;
  cursor: default;
}

.manual-room-ai-mode > input,
.manual-room-ai-consent > input {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  accent-color: #7c3aed;
}

.manual-room-ai-mode > span {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.manual-room-ai-mode > span strong {
  color: #4c1d95;
  font-size: 10.5px;
}

.manual-room-ai-mode > span small,
.manual-room-ai-consent > span {
  color: #6d5a8e;
  font-size: 9.5px;
  font-weight: 680;
  line-height: 1.25;
}

.manual-room-ai-consent {
  border-color: rgba(217, 119, 6, 0.26);
  background: rgba(255, 251, 235, 0.84);
}

.room-draft-warning {
  max-width: min(360px, calc(100vw - 120px));
  padding: 5px 8px;
  border: 1px solid rgba(245, 158, 11, 0.5);
  border-radius: 8px;
  background: rgba(255, 247, 237, 0.88);
  color: #92400e;
  font-weight: 780;
}

.room-draft-panel button:disabled {
  opacity: 0.45;
  cursor: default;
}

.pipe-draft-panel {
  width: min(390px, calc(100vw - 64px));
  max-height: min(420px, calc(100vh - 180px));
  display: grid;
  align-items: stretch;
  gap: 7px;
  padding: 8px 10px;
  overflow: auto;
  scrollbar-width: none;
}

.pipe-draft-panel::-webkit-scrollbar {
  display: none;
}

/* Focused route editing uses Axio's existing surfaces, not a second theme. */
html[data-route-focused="true"] .canvas-stage :is(.canvas-workbench-bar,.canvas-workbench-panel,.canvas-workbench-hint,.panel-reopen-stack) { display:none !important; }
html[data-route-focused="true"] .pipe-draft-panel { top:16px; right:16px; bottom:auto; left:auto; height:auto; align-content:start; width:min(320px,calc(100% - 32px)); max-height:calc(100% - 80px); padding:12px; border-radius:16px; }
.route-operation-settings { border-top:1px solid var(--border,#d9e3ef); padding-top:5px; }
.route-operation-settings > summary { padding:7px 0; font-size:12px; font-weight:700; cursor:pointer; }
.rw-operation-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:11px; color:var(--muted); }
.rw-operation-heading [data-rw-focus] { min-height:30px; padding:5px 9px; }
.rw-operation-heading [aria-pressed="true"] { color:var(--blue,#126ee3); background:var(--blue-soft,#eaf3ff); border-color:currentColor; }
.rw-capture-status { margin:5px 0; font-size:11px; color:var(--muted); overflow-wrap:anywhere; }
.route-inspector-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px; padding:4px; margin:10px 0; border-radius:12px; background:var(--surface-alt,#eef5ff); }
.route-inspector-tabs button { min-width:0; min-height:36px; padding:6px; font-size:12px; border:1px solid transparent; background:transparent; border-radius:8px; }
.route-inspector-tabs button[aria-selected="true"] { color:var(--blue,#126ee3); background:var(--surface-solid,#fff); border-color:var(--border,#d9e3ef); }
.route-inspector-page[hidden] { display:none !important; }
.route-inspector-page > .settings-grid { margin-bottom:12px; }
html[data-theme="dark"] .route-inspector-tabs { background:#242c38; border-color:#405065; }
html[data-theme="dark"] .route-inspector-tabs button[aria-selected="true"] { background:#183e70; color:#cfe5ff; }
html[data-theme="dark"] .rw-operation-heading [aria-pressed="true"] { background:#183e70; color:#cfe5ff; border-color:#548cc4; }
@media(pointer:coarse) { .rw-operation-heading [data-rw-focus],.route-inspector-tabs button,.route-operation-settings > summary { min-height:44px; } }

.pipe-draft-summary,
.pipe-draft-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.pipe-draft-summary {
  justify-content: space-between;
}

.pipe-draft-summary span {
  color: var(--muted);
  font-weight: 740;
}

.pipe-draft-panel .pipe-drawing-defaults {
  padding: 8px;
  gap: 7px;
}

.pipe-draft-panel .field,
.pipe-draft-panel select {
  min-width: 0;
  width: 100%;
}

.pipe-defaults-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pipe-defaults-heading span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
}

.pipe-defaults-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: 8px;
}

.multi-pipe-defaults-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pipe-defaults-grid .field {
  grid-template-columns: 1fr;
  gap: 4px;
}

.heat-emitter-draft-panel {
  width: min(430px, calc(100vw - 64px));
  max-height: min(460px, calc(100dvh - 164px));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--blue) 38%, var(--line)) transparent;
}

.outlet-draft-panel {
  width: min(470px, calc(100vw - 64px));
  max-height: min(460px, calc(100dvh - 164px));
}

.heat-emitter-draft-panel::-webkit-scrollbar {
  display: block;
  width: 7px;
}

.heat-emitter-draft-panel::-webkit-scrollbar-track {
  background: transparent;
}

.heat-emitter-draft-panel::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: color-mix(in srgb, var(--blue) 38%, var(--line));
}

.heat-emitter-placement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  align-items: end;
  gap: 10px;
}

.heat-emitter-placement-grid .field {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 5px;
  min-width: 0;
  width: 100%;
}

.heat-emitter-placement-grid .input-unit {
  grid-template-columns: minmax(0, 1fr) max-content;
}

.heat-emitter-custom-fields,
.outlet-custom-fields,
.custom-heat-emitter-editor,
.custom-outlet-editor {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  min-width: 0;
}

.custom-heat-emitter-editor,
.custom-outlet-editor {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--card) 86%, transparent);
}

.custom-heat-emitter-editor > strong,
.custom-heat-emitter-editor > small,
.custom-heat-emitter-editor > .product-selection-eyebrow,
.custom-outlet-editor > strong,
.custom-outlet-editor > small,
.custom-outlet-editor > .product-selection-eyebrow {
  grid-column: 1 / -1;
}

.custom-heat-emitter-required,
.custom-outlet-required {
  grid-column: 1 / -1;
  margin: 0;
}

.heat-emitter-static-field {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.heat-emitter-static-field strong {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--input-glass);
  color: var(--text);
  font-size: 12px;
  font-weight: 760;
  box-shadow: var(--glass-edge), 0 1px 2px rgba(0, 0, 0, 0.035);
}

.pipe-compact-spec {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 820;
}

.pipe-compact-spec span {
  padding: 4px 6px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: var(--glass-edge);
}

.multi-pipe-service-list {
  gap: 6px;
}

.pipe-service-chip {
  color: var(--text);
}

.pipe-service-chip.pipe-flow,
.pipe-service-chip.pipe-domestic-hot-water {
  border-color: rgba(239, 68, 68, 0.36);
  color: #dc2626;
}

.pipe-service-chip.pipe-return,
.pipe-service-chip.pipe-domestic-cold-water {
  border-color: rgba(10, 132, 255, 0.36);
  color: #0a84ff;
}

.pipe-service-chip.pipe-cooling-flow {
  border-color: rgba(56, 189, 248, 0.4);
  color: #0284c7;
}

.pipe-service-chip.pipe-cooling-return {
  border-color: rgba(168, 85, 247, 0.4);
  color: #7e22ce;
}

.pipe-service-chip.pipe-boosted-cold-water {
  border-color: rgba(34, 197, 94, 0.42);
  color: #15803d;
}

.pipe-service-chip.pipe-secondary-return {
  border-color: rgba(249, 115, 22, 0.42);
  color: #c2410c;
}

.pipe-service-chip.pipe-gas {
  border-color: rgba(250, 204, 21, 0.52);
  color: #ca8a04;
}

.auto-pipe-panel {
  top: auto;
  right: 18px;
  bottom: 48px;
  left: auto;
  width: min(360px, calc(100vw - 64px));
  max-height: min(520px, calc(100% - 96px), calc(100dvh - 176px));
  overflow-y: auto;
  overscroll-behavior: contain;
  contain: layout paint style;
}

.auto-pipe-panel.is-collapsed {
  width: min(660px, calc(100vw - 64px));
  max-height: none;
  overflow: visible;
}

.auto-pipe-panel-head {
  flex-wrap: nowrap;
}

.auto-pipe-panel-head > div {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.auto-pipe-panel-head strong,
.auto-pipe-panel-head span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auto-pipe-panel-toggle {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.82);
  color: #334155;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.auto-pipe-panel-toggle svg {
  width: 16px;
  height: 16px;
}

.auto-pipe-routing-mode {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 11px;
  background: rgba(226, 232, 240, 0.7);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
}

.auto-pipe-routing-mode button {
  min-width: 0;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  font-size: 11.5px;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.auto-pipe-routing-mode button:hover:not(:disabled) {
  color: #1d4ed8;
  background: rgba(255, 255, 255, 0.72);
}

.auto-pipe-routing-mode button.is-selected {
  border-color: rgba(96, 165, 250, 0.52);
  background: rgba(255, 255, 255, 0.96);
  color: #075ec8;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.1), inset 0 1px 0 #ffffff;
}

.auto-pipe-routing-mode button.is-ai.is-selected {
  border-color: rgba(99, 102, 241, 0.48);
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.98), rgba(245, 243, 255, 0.98));
  color: #4f46e5;
}

.auto-pipe-routing-mode button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.auto-pipe-ai-spark {
  flex: 0 0 auto;
  color: #6366f1;
  font-size: 14px;
  line-height: 1;
}

.auto-pipe-ai-notice {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: start;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid rgba(129, 140, 248, 0.28);
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.9), rgba(245, 243, 255, 0.88));
  color: #475569;
  font-size: 10.5px;
  font-weight: 760;
  line-height: 1.35;
}

.auto-pipe-ai-notice.is-busy .auto-pipe-ai-spark {
  animation: auto-pipe-ai-pulse 900ms ease-in-out infinite alternate;
}

.auto-pipe-ai-privacy {
  margin: -2px 2px 0;
  color: #64748b;
  font-size: 9.75px;
  font-weight: 700;
  line-height: 1.35;
}

@keyframes auto-pipe-ai-pulse {
  from { opacity: 0.45; transform: scale(0.86) rotate(-8deg); }
  to { opacity: 1; transform: scale(1.08) rotate(8deg); }
}

.auto-pipe-compact-controls {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(190px, 0.8fr) minmax(118px, max-content);
  align-items: center;
  column-gap: 10px;
  row-gap: 10px;
}

.auto-pipe-compact-controls .auto-pipe-service-field {
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 0;
}

.auto-pipe-routing-mode.is-compact {
  align-self: stretch;
  padding: 3px;
}

.auto-pipe-routing-mode.is-compact button {
  min-height: 34px;
  padding-inline: 8px;
}

.auto-pipe-compact-controls .auto-pipe-service-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.1;
}

.auto-pipe-service-select-shell {
  position: relative;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  height: 40px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(147, 197, 253, 0.9);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94));
  color: #172033;
  box-shadow: var(--glass-edge), 0 4px 12px rgba(15, 23, 42, 0.08);
}

.auto-pipe-service-select-shell::after {
  content: "";
  position: absolute;
  right: 13px;
  top: 50%;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid #64748b;
  transform: translateY(-40%);
  pointer-events: none;
}

.auto-pipe-service-select-shell:focus-within {
  border-color: var(--blue-border);
  box-shadow: var(--glass-edge), 0 0 0 3px rgba(0, 122, 255, 0.14), 0 6px 16px rgba(15, 23, 42, 0.10);
}

.auto-pipe-service-value {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 34px 0 12px;
  color: #172033;
  font-size: 13px;
  font-weight: 820;
  line-height: 40px;
  pointer-events: none;
}

.auto-pipe-compact-controls .field select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.auto-pipe-service-select-shell select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: transparent;
  -webkit-text-fill-color: transparent;
  cursor: pointer;
  opacity: 0;
  appearance: none;
  -webkit-appearance: none;
}

@supports (appearance: base-select) {
  .auto-pipe-service-select-shell select selectedcontent {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

.auto-pipe-sections {
  display: grid;
  gap: 8px;
}

.auto-pipe-section {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.72);
}

.auto-pipe-section-head,
.auto-pipe-choice {
  min-width: 0;
  display: grid;
  align-items: center;
}

.auto-pipe-section-head {
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 8px;
}

.auto-pipe-section-head-actions,
.auto-pipe-target-bulk-actions {
  display: inline-flex;
  align-items: center;
}

.auto-pipe-section-head-actions {
  justify-content: flex-end;
  gap: 6px;
}

.auto-pipe-target-bulk-actions {
  gap: 3px;
}

.auto-pipe-target-bulk-actions button {
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid rgba(96, 165, 250, 0.42);
  border-radius: 6px;
  background: rgba(239, 246, 255, 0.9);
  color: #075ec8;
  font: inherit;
  font-size: 10px;
  font-weight: 820;
  line-height: 1;
  cursor: pointer;
}

.auto-pipe-target-bulk-actions button:hover:not(:disabled) {
  border-color: rgba(37, 99, 235, 0.58);
  background: rgba(219, 234, 254, 0.96);
}

.auto-pipe-target-bulk-actions button:disabled {
  cursor: default;
  opacity: 0.42;
}

.auto-pipe-section-head span,
.auto-pipe-empty,
.auto-pipe-choice small,
.auto-pipe-choice em,
.auto-pipe-message {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.auto-pipe-choice {
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px;
  padding: 7px;
  border: 1px solid rgba(203, 213, 225, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.auto-pipe-choice input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.auto-pipe-choice span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.auto-pipe-choice strong,
.auto-pipe-choice small,
.auto-pipe-choice em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auto-pipe-choice em {
  grid-column: 2;
  font-style: normal;
}

.auto-pipe-riser-group {
  display: grid;
  gap: 6px;
}

.auto-pipe-riser-group > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
}

.auto-pipe-empty,
.auto-pipe-message {
  margin: 0;
}

.auto-pipe-run-button {
  min-width: 112px;
}

.auto-pipe-panel.is-collapsed .auto-pipe-run-button {
  min-width: 118px;
  height: 40px;
  white-space: nowrap;
}

.pipe-draft-actions {
  justify-content: flex-end;
}

.pipe-draft-panel.dimension-selection-panel {
  width: max-content;
  max-width: calc(100vw - 64px);
}

@media (max-width: 520px) {
  .manual-room-ai-fields {
    grid-template-columns: 1fr;
  }

  .manual-room-ai-review.analysing,
  .manual-room-ai-review.error {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .manual-room-ai-review.analysing > button,
  .manual-room-ai-review.error > .manual-room-ai-review-actions {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .auto-pipe-compact-controls {
    grid-template-columns: 1fr;
  }

  .auto-pipe-panel.is-collapsed .auto-pipe-run-button {
    width: 100%;
  }
}

@media (min-width: 521px) and (max-width: 760px) {
  .auto-pipe-compact-controls {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 0.9fr);
  }

  .auto-pipe-compact-controls .auto-pipe-run-button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

html[data-theme="dark"] .room-draft-panel {
  border-color: rgba(239, 246, 255, 0.18);
  background:
    linear-gradient(145deg, rgba(26, 28, 34, 0.90), rgba(10, 11, 14, 0.82));
  color: var(--text);
  box-shadow: var(--glass-edge), 0 18px 42px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
}

html[data-theme="dark"] .room-draft-panel strong {
  color: var(--text);
}

html[data-theme="dark"] .auto-pipe-service-select-shell {
  border-color: rgba(96, 165, 250, 0.52);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.9));
  color: var(--text);
}

html[data-theme="dark"] .auto-pipe-service-select-shell::after {
  border-top-color: rgba(203, 213, 225, 0.88);
}

html[data-theme="dark"] .auto-pipe-service-value {
  color: var(--text);
}

html[data-theme="dark"] .pipe-draft-summary span,
html[data-theme="dark"] .pipe-defaults-heading span {
  color: var(--muted);
}

html[data-theme="dark"] .auto-pipe-panel-toggle {
  border-color: rgba(239, 246, 255, 0.16);
  background:
    linear-gradient(145deg, rgba(58, 64, 76, 0.76), rgba(23, 26, 34, 0.62));
  color: var(--text);
  box-shadow: var(--glass-edge), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .auto-pipe-routing-mode {
  border-color: rgba(226, 232, 240, 0.16);
  background: rgba(15, 23, 42, 0.7);
}

html[data-theme="dark"] .auto-pipe-routing-mode button {
  color: #94a3b8;
}

html[data-theme="dark"] .auto-pipe-routing-mode button:hover:not(:disabled),
html[data-theme="dark"] .auto-pipe-routing-mode button.is-selected {
  border-color: rgba(96, 165, 250, 0.38);
  background: rgba(51, 65, 85, 0.88);
  color: #bfdbfe;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] .auto-pipe-routing-mode button.is-ai.is-selected,
html[data-theme="dark"] .auto-pipe-ai-notice {
  border-color: rgba(129, 140, 248, 0.34);
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.32), rgba(76, 29, 149, 0.28));
  color: #cbd5e1;
}

html[data-theme="dark"] .auto-pipe-ai-privacy {
  color: #94a3b8;
}

html[data-theme="dark"] .auto-pipe-target-bulk-actions button {
  border-color: rgba(96, 165, 250, 0.36);
  background: rgba(30, 58, 138, 0.3);
  color: #bfdbfe;
}

html[data-theme="dark"] .auto-pipe-target-bulk-actions button:hover:not(:disabled) {
  border-color: rgba(147, 197, 253, 0.56);
  background: rgba(30, 64, 175, 0.42);
}

html[data-theme="dark"] .pipe-draft-panel .pipe-drawing-defaults {
  border-color: rgba(240, 240, 242, 0.14);
  background:
    linear-gradient(145deg, rgba(41, 42, 46, 0.66), rgba(15, 16, 18, 0.52));
  box-shadow: var(--glass-edge), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .pipe-draft-panel select,
html[data-theme="dark"] .pipe-draft-panel .input-unit input {
  border-color: rgba(240, 240, 242, 0.22);
  background:
    linear-gradient(145deg, rgba(68, 69, 74, 0.88), rgba(34, 35, 39, 0.80));
  color: var(--text);
  box-shadow: var(--glass-edge), 0 8px 18px rgba(0, 0, 0, 0.20);
}

html[data-theme="dark"] .pipe-draft-panel select:focus,
html[data-theme="dark"] .pipe-draft-panel .input-unit input:focus {
  border-color: rgba(10, 132, 255, 0.72);
  box-shadow: var(--glass-edge), 0 0 0 3px rgba(10, 132, 255, 0.20);
}

html[data-theme="dark"] .pipe-compact-spec span {
  border-color: rgba(239, 246, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

html[data-theme="dark"] .auto-pipe-section {
  border-color: rgba(239, 246, 255, 0.12);
  background: rgba(15, 23, 42, 0.32);
}

html[data-theme="dark"] .auto-pipe-choice {
  border-color: rgba(239, 246, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
}

html[data-theme="dark"] .multi-pipe-centre-line {
  stroke: rgba(226, 232, 240, 0.34);
}

html[data-theme="dark"] .room-draft-warning {
  border-color: rgba(251, 191, 36, 0.42);
  background: rgba(120, 53, 15, 0.46);
  color: #fde68a;
}

.cal-title {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
}

.cal-setup,
.cal-steps,
.cal-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: #475569;
  font-size: 12px;
}

html[data-theme="dark"] .cal-setup,
html[data-theme="dark"] .cal-steps,
html[data-theme="dark"] .cal-meta {
  color: var(--muted);
}

html[data-theme="dark"] .cal-meta strong {
  color: var(--text);
}

.cal-setup {
  align-items: end;
  padding-bottom: 9px;
  margin-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.cal-setup label {
  display: grid;
  gap: 4px;
  min-width: 112px;
  color: #334155;
  font-size: 11px;
  font-weight: 740;
}

.cal-setup select,
.cal-setup input {
  height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--input-glass);
  color: var(--text);
  padding: 0 8px;
  font-size: 12px;
  font-weight: 650;
  box-shadow: var(--glass-edge), 0 1px 2px rgba(0, 0, 0, 0.035);
}

.muted-control {
  opacity: 0.52;
}

.step-dot {
  width: 19px;
  height: 19px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: white;
  font-size: 11px;
  font-weight: 800;
}

.arrow {
  color: #94a3b8;
}

.cal-steps label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
}

.cal-steps input {
  width: 82px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 8px;
}

.primary-mini {
  height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(0, 98, 204, 0.68);
  border-radius: 4px;
  color: white;
  background: linear-gradient(145deg, rgba(40, 160, 255, 0.94), rgba(0, 122, 255, 0.86));
  font-size: 12px;
  font-weight: 760;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), 0 8px 18px rgba(0, 122, 255, 0.20);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.secondary-mini {
  height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 4px;
  background: var(--button-glass);
  color: #243148;
  font-size: 12px;
  font-weight: 760;
  box-shadow: var(--glass-edge), 0 5px 12px rgba(0, 0, 0, 0.05);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.secondary-mini.active {
  border-color: #f59e0b;
  background: #fffbeb;
  color: #92400e;
}

html[data-theme="dark"] .secondary-mini,
html[data-theme="dark"] .settings-mini-btn {
  border-color: rgba(239, 246, 255, 0.20);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.06));
  color: var(--text);
  box-shadow: var(--glass-edge), 0 7px 16px rgba(0, 0, 0, 0.12);
}

html[data-theme="dark"] .secondary-mini.active {
  border-color: rgba(245, 158, 11, 0.62);
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.24), rgba(120, 53, 15, 0.18));
  color: #fde68a;
}

html[data-theme="dark"] .danger-mini {
  border-color: rgba(248, 113, 113, 0.36);
  background: rgba(127, 29, 29, 0.24);
  color: #fecaca;
}

html[data-theme="dark"] .danger-mini:disabled {
  border-color: rgba(239, 246, 255, 0.16);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(244, 247, 251, 0.82);
  opacity: 1;
}

.cal-meta {
  padding-top: 9px;
}

.green {
  color: var(--green);
}

.canvas-status {
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 14px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  font-size: 12px;
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
}

.canvas-status span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-theme="dark"] .canvas-status {
  border-top-color: rgba(239, 246, 255, 0.12);
  background: rgba(16, 19, 25, 0.62);
  color: var(--muted);
}

.three-bottombar .three-navigation-hint,
.schematic-bottombar .three-navigation-hint,
.plant-room-planner-bottombar .three-navigation-hint {
  height: 34px;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: var(--radius);
  background: var(--button-glass);
  color: var(--muted);
  font-size: 12px;
  box-shadow: var(--glass-edge), 0 10px 24px rgba(0, 122, 255, 0.08);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.three-bottombar .three-navigation-hint strong,
.schematic-bottombar .three-navigation-hint strong,
.plant-room-planner-bottombar .three-navigation-hint strong {
  min-width: 0;
  height: auto;
  display: inline-flex;
  align-items: center;
  padding: 0 10px 0 0;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 820;
}

.three-bottombar .three-navigation-hint span,
.schematic-bottombar .three-navigation-hint span,
.plant-room-planner-bottombar .three-navigation-hint span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-theme="dark"] .three-bottombar .three-navigation-hint,
html[data-theme="dark"] .schematic-bottombar .three-navigation-hint,
html[data-theme="dark"] .plant-room-planner-bottombar .three-navigation-hint {
  border-color: rgba(239, 246, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: var(--glass-edge), 0 10px 24px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] .three-bottombar .three-navigation-hint strong,
html[data-theme="dark"] .schematic-bottombar .three-navigation-hint strong,
html[data-theme="dark"] .plant-room-planner-bottombar .three-navigation-hint strong {
  border-right-color: rgba(239, 246, 255, 0.14);
  color: var(--text);
}

.inspector,
.product-panel,
.pipe-panel,
.results-panel {
  padding: 14px 12px;
}

.inspector.closed-panel,
.product-panel.closed-panel,
.pipe-panel.closed-panel,
.results-panel.closed-panel {
  display: none;
  width: 0;
  min-width: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
}

.panel-head h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 820;
}

.panel-head button {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #647184;
  font-size: 18px;
  line-height: 1;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.panel-head button:hover {
  border-color: var(--control-hover-border);
  background: var(--control-hover-bg);
  color: #374151;
  box-shadow: var(--control-hover-shadow);
  transform: translateY(-1px);
}

/* The header is panel chrome only. Zone review belongs with its result scope,
   where the movable inspector cannot format it as a square icon button. */
.results-panel > .results-panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.results-panel > .results-panel-head > h2 {
  flex: 1 1 100px;
  min-width: 0;
  margin: 0;
  line-height: 1.3;
  overflow-wrap: break-word;
}
.results-panel > .results-panel-head > [data-close-panel] {
  flex: 0 0 auto;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  align-self: start;
}
.results-panel > .results-panel-context {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  min-width: 0;
  padding: 12px;
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--input-bg);
}
.results-panel-context > .side-menu-scope { flex: 1 1 130px; margin: 0; gap: 4px; }
.results-panel .results-panel-context > .results-zone-review-button {
  flex: 0 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  max-width: 100%;
  height: auto !important;
  min-height: 36px !important;
  padding: 8px 11px !important;
  margin: 0;
  font: 760 12px/1.3 var(--font-ui, system-ui, sans-serif);
  white-space: nowrap;
  overflow-wrap: break-word;
  text-align: left;
}

html[data-theme="dark"] .panel-head button:hover {
  color: var(--text);
}

.id-chip {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.wall-list {
  display: grid;
  gap: 6px;
}

.wall-list .wall-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 78px;
  align-items: end;
  gap: 6px 8px;
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 4px;
  background: var(--tile-glass);
  color: #334155;
  font-size: 11px;
  font-weight: 720;
  box-shadow: var(--glass-edge);
}

.wall-list .wall-item-title {
  grid-column: 1 / -1;
  display: grid;
  gap: 2px;
  min-width: 0;
}

.wall-list small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 620;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wall-list select {
  width: 100%;
  height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--input-glass);
  color: var(--text);
  padding: 0 6px;
  font-size: 11px;
  font-weight: 650;
}

.wall-list select:disabled {
  background: rgba(242, 242, 247, 0.72);
  color: #475569;
  opacity: 1;
}

.material-select-control {
  grid-column: 1 / -1;
  min-width: 0;
  display: grid;
  gap: 4px;
}

.material-select-control span {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: #334155;
  font-size: 10px;
  font-weight: 780;
}

.material-select-control span small {
  color: #64748b;
  font-size: 9px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-select-control select {
  height: 28px;
}

.opening-material-item {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.66), rgba(233, 244, 255, 0.42));
}

.opening-material-item .material-summary {
  grid-column: 1 / -1;
  color: #526176;
}

.roof-type-controls {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 8px;
  padding-top: 2px;
}

.roof-type-controls label {
  min-width: 0;
  display: grid;
  gap: 4px;
  color: #334155;
  font-size: 10px;
  font-weight: 780;
}

.roof-type-controls select,
.roof-type-controls input {
  width: 100%;
  min-width: 0;
}

.roof-type-controls > small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 10px;
  font-weight: 680;
}

.wall-thickness-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px;
  align-items: center;
  gap: 4px;
}

.wall-thickness-control input {
  width: 100%;
  min-width: 0;
  height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--input-glass);
  color: var(--text);
  padding: 0 5px;
  font-size: 11px;
  font-weight: 720;
}

.wall-thickness-control input:disabled {
  background: rgba(242, 242, 247, 0.72);
  color: #64748b;
  opacity: 1;
}

.wall-thickness-control small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.window-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  margin-top: 2px;
  padding-top: 6px;
  border-top: 1px solid rgba(148, 163, 184, 0.32);
}

.window-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) 26px;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.56);
  color: #334155;
}

.window-row.active {
  outline: 1px solid rgba(75, 85, 99, 0.35);
  background: rgba(242, 242, 247, 0.86);
}

.room-panel-focus-target {
  position: relative;
  border-color: rgba(0, 122, 255, 0.58) !important;
  background: linear-gradient(145deg, rgba(0, 122, 255, 0.12), rgba(255, 255, 255, 0.68)) !important;
  box-shadow: var(--glass-edge), 0 0 0 3px rgba(0, 122, 255, 0.14), 0 12px 26px rgba(0, 122, 255, 0.13) !important;
  animation: room-panel-focus-pulse 1.2s ease-out 1;
}

.window-row.room-panel-focus-target {
  outline: 1px solid rgba(0, 122, 255, 0.5);
}

@keyframes room-panel-focus-pulse {
  0% {
    transform: translateY(-1px);
    box-shadow: var(--glass-edge), 0 0 0 6px rgba(0, 122, 255, 0.22), 0 16px 32px rgba(0, 122, 255, 0.16);
  }
  100% {
    transform: translateY(0);
  }
}

.window-row > span {
  grid-column: 1 / -1;
  color: #334155;
  font-size: 10px;
  font-weight: 780;
}

.window-row label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  gap: 3px;
}

.window-row .window-row-wide {
  grid-column: 1 / 3;
  grid-template-columns: minmax(0, 1fr) 42px;
}

.window-row .window-glass-solar {
  grid-template-columns: minmax(0, 1fr) 78px;
}

.glazing-optical-fields .settings-field {
  min-width: 0;
}

.window-row input {
  width: 100%;
  min-width: 0;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--input-glass);
  padding: 0 4px;
  color: #172033;
  font-size: 10px;
  font-weight: 720;
}

.window-row small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.window-row > .opening-fit-warning {
  grid-column: 1 / -1;
  width: 100%;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  font-weight: 500;
  white-space: normal;
}

.window-row button {
  grid-column: -2 / -1;
  height: 24px;
  border: 1px solid #fecaca;
  border-radius: 4px;
  background: #fff7f7;
  color: #991b1b;
  font-weight: 800;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.window-row button:hover {
  border-color: var(--danger-hover-border);
  background: var(--danger-hover-bg);
  color: #be123c;
  box-shadow: var(--danger-hover-shadow);
  transform: translateY(-1px);
}

.door-orientation-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.window-row .door-orientation-actions button {
  flex: 1 1 auto;
  height: auto;
  min-height: 30px;
  padding: 5px 8px;
  border-color: var(--line);
  border-radius: 7px;
  background: var(--input-glass);
  color: var(--text);
  font: inherit;
  font-size: 11px;
  font-weight: 650;
}

.window-row .door-orientation-actions button:hover:not(:disabled) {
  border-color: var(--blue);
  background: var(--button-glass-hover);
  color: var(--blue);
  box-shadow: none;
  transform: none;
}

.door-orientation-actions small {
  flex-basis: 100%;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.boundary-summary {
  display: grid;
  gap: 5px;
  margin: 8px 0 10px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 4px;
  background: var(--tile-glass);
  color: #475569;
  font-size: 11px;
  font-weight: 650;
  box-shadow: var(--glass-edge);
}

.boundary-summary strong {
  color: #172033;
  text-transform: capitalize;
}

html[data-theme="dark"] .boundary-summary strong {
  color: var(--text);
}

.inspector h3,
.result-card h3 {
  margin: 13px 0 8px;
  color: #223047;
  font-size: 12px;
  font-weight: 800;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.field-grid.compact {
  gap: 6px;
}

.field {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(92px, 1fr) 104px;
  align-items: center;
  gap: 8px;
  color: #354259;
  font-size: 11px;
  font-weight: 650;
}

.field.full {
  grid-template-columns: 1fr;
  gap: 5px;
}

.collapsible-section {
  margin-top: 9px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  overflow: visible;
  box-shadow: none;
}

.collapsible-section-head {
  height: 36px;
  padding: 0 8px;
}

.collapsible-section-body {
  display: grid;
  gap: 8px;
  margin-top: 6px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: var(--radius);
  background: var(--tile-glass);
  box-shadow: var(--glass-edge), 0 8px 20px rgba(0, 0, 0, 0.045);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.inspector .collapsible-section-body,
.inspector .wall-list .wall-item {
  /* These are interactive forms, not catalogue rows. A full redraw replaces
     their remembered intrinsic heights; estimating them while restoring the
     focused field lets scroll anchoring move the inspector after the edit. */
  content-visibility: visible;
  contain-intrinsic-size: none;
}

.field-note {
  margin: 0;
  color: #64748b;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
}

.override-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin: 8px 0 10px;
  padding: 7px 8px;
  border: 1px solid #fde68a;
  border-radius: 4px;
  background: #fffbeb;
  color: #7c2d12;
  font-size: 11px;
  font-weight: 720;
}

.override-note span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.override-note button {
  height: 24px;
  border: 1px solid #fbbf24;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.72);
  color: #92400e;
  padding: 0 8px;
  font-size: 10px;
  font-weight: 800;
}

html[data-theme="dark"] .override-note {
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(120, 53, 15, 0.26);
  color: #fed7aa;
}

html[data-theme="dark"] .override-note button {
  border-color: rgba(245, 158, 11, 0.46);
  background: rgba(255, 255, 255, 0.08);
  color: #fde68a;
}

.field select,
.field > input,
.input-unit {
  min-width: 0;
  width: 100%;
}

.field select,
.field > input,
.input-unit input {
  min-width: 0;
  height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--input-glass);
  color: var(--text);
  padding: 0 7px;
  font-size: 12px;
  font-weight: 620;
  box-shadow: var(--glass-edge), 0 1px 2px rgba(0, 0, 0, 0.035);
}

/* Long emitter names must not escape the closed control or cover its arrow.
   Use the platform select here: base-select's anonymous flex label cannot
   reliably ellipsize without replacing the native markup/keyboard behaviour. */
.field select[data-room-emitter-type] {
  appearance: auto;
  -webkit-appearance: auto;
  display: block;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  padding-inline-end: 34px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.product-selection-card .field.product-auto-height-limit,
.product-selection-card .field.product-model-override {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 5px;
}

.product-selection-card .field.product-auto-height-limit select,
.product-selection-card .field.product-model-override select {
  width: 100%;
  max-width: 100%;
  height: 34px;
  min-height: 34px;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  text-wrap: nowrap;
  white-space: nowrap;
  padding-right: 28px;
}

.input-unit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  gap: 5px;
}

.input-unit small {
  color: var(--muted);
  font-size: 10px;
}

.result-card {
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: var(--radius);
  background: var(--tile-glass-strong);
  box-shadow: var(--glass-edge), 0 10px 24px rgba(0, 0, 0, 0.055);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.result-load-card {
  padding: 0;
  overflow: hidden;
}

.result-load-head {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  text-align: left;
  cursor: pointer;
}

.result-load-head:hover {
  background: rgba(255, 255, 255, 0.18);
}

.result-load-summary {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.result-load-title {
  color: #334155;
  font-size: 12px;
  font-weight: 760;
}

.result-load-summary strong {
  display: block;
  color: #0f172a;
  font-size: 29px;
  line-height: 1;
  letter-spacing: 0;
}

.result-geometry-card .result-load-summary strong {
  color: #172033;
}

.result-load-summary em {
  color: #334155;
  font-size: 14px;
  font-style: normal;
  font-weight: 750;
}

.result-load-body {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
  border-top: 1px solid var(--line);
}

.result-load-body h3 {
  margin: 10px 0 0;
}

.result-load-card.is-collapsed .result-load-head {
  min-height: 94px;
}

.public-health-results-card .result-load-summary strong {
  color: var(--text);
  font-size: 25px;
}

.public-health-results-card .result-load-summary em {
  max-width: 100%;
  font-size: 11px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.public-health-results-body {
  min-width: 0;
  gap: 0;
}

.public-health-results-section {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.public-health-results-body h3 {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.public-health-results-metrics,
.public-health-results-facts {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.public-health-results-metrics > div,
.public-health-results-facts > div {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 7px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
}

.public-health-results-metrics dt,
.public-health-results-facts dt,
.public-health-results-daily dt {
  min-width: 0;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 850;
  line-height: 1.15;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.public-health-results-metrics dd {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin: 0;
  color: var(--text);
  line-height: 1;
}

.public-health-results-metrics dd strong {
  min-width: 0;
  font-size: 15px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.public-health-results-metrics dd strong.is-text-value {
  font-size: 10px;
  line-height: 1.2;
}

.public-health-results-metrics dd span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  white-space: nowrap;
}

.public-health-results-card .field-note {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.public-health-results-sr-status {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 8px;
  border: 1px solid rgba(34, 197, 94, 0.24);
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.07);
}

.public-health-results-sr-status.is-partial {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.09);
}

.public-health-results-sr-status.is-unresolved {
  border-color: rgba(239, 68, 68, 0.28);
  background: rgba(239, 68, 68, 0.08);
}

.public-health-results-sr-status.is-absent {
  border-color: rgba(59, 130, 246, 0.24);
  background: rgba(59, 130, 246, 0.07);
}

.public-health-results-sr-status > div {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.public-health-results-sr-status > div > strong {
  min-width: 0;
  color: var(--text);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.public-health-results-sr-status > p {
  min-width: 0;
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.public-health-results-daily {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin: 0;
}

.public-health-results-daily > div {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 7px 5px;
  border-radius: 7px;
  background: rgba(148, 163, 184, 0.1);
  text-align: center;
}

.public-health-results-daily dd {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: 9.5px;
  font-weight: 850;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.public-health-daily-allowance-editor {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(100, 116, 139, 0.24);
  border-radius: 9px;
  background: rgba(100, 116, 139, 0.07);
}

.public-health-daily-allowance-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.public-health-daily-allowance-head strong {
  min-width: 0;
  color: var(--text);
  font-size: 10px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.public-health-daily-allowance-head span {
  flex: 0 0 auto;
  max-width: 55%;
  padding: 3px 6px;
  border-radius: 999px;
  color: #475569;
  background: rgba(100, 116, 139, 0.13);
  font-size: 8px;
  font-weight: 850;
  line-height: 1.2;
  text-align: right;
  overflow-wrap: anywhere;
}

.public-health-daily-allowance-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.public-health-daily-allowance-grid > label,
.public-health-daily-derived {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.public-health-daily-allowance-grid > label > span:first-child,
.public-health-daily-derived > span {
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 850;
  line-height: 1.2;
  text-transform: uppercase;
}

.public-health-daily-allowance-grid .input-unit {
  min-width: 0;
}

.public-health-daily-allowance-grid input {
  min-width: 0;
  width: 100%;
  height: 30px;
  padding: 5px 36px 5px 7px;
  border-color: rgba(100, 116, 139, 0.28);
  border-radius: 7px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 850;
}

.public-health-daily-allowance-grid input:focus-visible {
  border-color: var(--blue);
  outline: 2px solid rgba(10, 132, 255, 0.2);
  outline-offset: 1px;
}

.public-health-daily-allowance-grid .input-unit small {
  right: 7px;
  font-size: 7.5px;
}

.public-health-daily-derived {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 6px 7px;
  border-radius: 7px;
  background: rgba(148, 163, 184, 0.1);
}

.public-health-daily-derived strong {
  min-width: 0;
  color: var(--text);
  font-size: 10px;
  font-weight: 900;
  text-align: right;
  overflow-wrap: anywhere;
}

.public-health-daily-allowance-editor > p {
  margin: 0;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.public-health-daily-reset {
  width: 100%;
  min-height: 30px;
  padding: 6px 8px;
  font-size: 9px;
}

.public-health-results-section-head {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 7px;
}

.public-health-results-section-head > span {
  min-width: 0;
}

.public-health-results-facts dd {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.public-health-results-disclaimer,
.public-health-results-basis {
  min-width: 0;
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.public-health-results-disclaimer {
  padding: 8px;
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.08);
  color: #92400e;
}

.public-health-pressure-overview,
.public-health-results-empty {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 9px;
  border: 1px solid rgba(10, 132, 255, 0.24);
  border-radius: 9px;
  background: rgba(10, 132, 255, 0.07);
}

.public-health-pressure-overview > span,
.public-health-results-empty > span {
  min-width: 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.public-health-pressure-overview > strong,
.public-health-results-empty > strong {
  min-width: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.public-health-pressure-overview > small {
  min-width: 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.public-health-results-card .public-health-pressure-row {
  gap: 7px;
  padding: 8px;
}

.public-health-results-card .public-health-pressure-row-head {
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
}

.public-health-results-card .public-health-pressure-service {
  font-size: 12px;
}

.public-health-results-card .public-health-pressure-route {
  min-width: 0;
  font-size: 9px;
  text-align: left;
  overflow-wrap: anywhere;
}

.public-health-results-card .public-health-pressure-metrics div {
  padding: 6px;
}

.public-health-results-card .public-health-pressure-metrics dt {
  font-size: 8px;
}

.public-health-results-card .public-health-pressure-metrics dd strong {
  font-size: 12px;
}

.public-health-results-card .public-health-pressure-metrics dd span {
  font-size: 9px;
}

.public-health-results-basis {
  padding: 10px 0 11px;
}

html[data-theme="dark"] .public-health-results-card .result-load-summary strong {
  color: var(--text);
}

html[data-theme="dark"] .public-health-results-metrics > div,
html[data-theme="dark"] .public-health-results-facts > div,
html[data-theme="dark"] .public-health-results-daily > div {
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .public-health-daily-allowance-editor {
  border-color: rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.035);
}

html[data-theme="dark"] .public-health-daily-allowance-head span {
  color: #d1d5db;
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .public-health-daily-allowance-grid input {
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
}

html[data-theme="dark"] .public-health-daily-derived {
  background: rgba(255, 255, 255, 0.045);
}

html[data-theme="dark"] .public-health-results-disclaimer {
  border-color: rgba(245, 158, 11, 0.24);
  background: rgba(120, 53, 15, 0.15);
  color: #fde68a;
}

html[data-theme="dark"] .public-health-results-card .ventilation-status.pass {
  border-color: rgba(74, 222, 128, 0.4);
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
}

html[data-theme="dark"] .public-health-results-card .ventilation-status.review {
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(245, 158, 11, 0.17);
  color: #fde68a;
}

html[data-theme="dark"] .public-health-results-card .ventilation-status.fail {
  border-color: rgba(248, 113, 113, 0.42);
  background: rgba(239, 68, 68, 0.16);
  color: #fca5a5;
}

html[data-theme="dark"] .public-health-results-card .ventilation-status.info {
  border-color: rgba(96, 165, 250, 0.42);
  background: rgba(59, 130, 246, 0.16);
  color: #bfdbfe;
}

html[data-theme="dark"] .public-health-results-sr-status {
  background: rgba(34, 197, 94, 0.08);
}

html[data-theme="dark"] .public-health-results-sr-status.is-partial {
  background: rgba(120, 53, 15, 0.15);
}

html[data-theme="dark"] .public-health-results-sr-status.is-unresolved {
  background: rgba(127, 29, 29, 0.14);
}

html[data-theme="dark"] .public-health-results-sr-status.is-absent {
  background: rgba(30, 64, 175, 0.12);
}

html[data-theme="dark"] .public-health-pressure-overview,
html[data-theme="dark"] .public-health-results-empty {
  border-color: rgba(96, 165, 250, 0.22);
  background: rgba(10, 132, 255, 0.08);
}

.ventilation-requirement-card {
  display: grid;
  gap: 8px;
}

.ventilation-requirement-card h3 {
  margin: 0;
}

.result-primary-value {
  display: block;
  color: var(--blue);
  font-size: 28px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1;
}

.monthly-load-card {
  display: grid;
  gap: 9px;
}

.monthly-load-head {
  display: grid;
  gap: 3px;
}

.monthly-load-head h3 {
  margin: 0;
}

.monthly-load-head span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
}

.monthly-load-chart {
  height: 112px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: end;
  gap: 4px;
  padding: 8px 6px 6px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: var(--radius);
  background:
    linear-gradient(to top, rgba(100, 116, 139, 0.14) 1px, transparent 1px) 0 0 / 100% 25%,
    var(--tile-glass);
  box-shadow: var(--glass-edge);
}

.monthly-load-column {
  min-width: 0;
  height: 100%;
  align-self: stretch;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 14px;
  align-items: end;
  gap: 4px;
}

.monthly-load-column > span {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-overflow: clip;
}

.monthly-load-bar {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-start;
  overflow: hidden;
  border: 1px solid rgba(100, 116, 139, 0.18);
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.10);
}

.monthly-load-segment {
  display: block;
  width: 100%;
  min-height: 0;
}

.monthly-load-segment.loss {
  background: linear-gradient(180deg, color-mix(in srgb, var(--heat-loss) 82%, white), var(--heat-loss));
}

.monthly-load-segment.gain {
  background: linear-gradient(180deg, color-mix(in srgb, var(--heat-gain) 80%, white), var(--heat-gain));
}

.monthly-load-legend,
.monthly-load-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.monthly-load-legend span,
.monthly-load-summary div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
}

.monthly-load-legend i {
  width: 9px;
  height: 9px;
  display: inline-block;
  border-radius: 2px;
}

.monthly-load-legend .loss {
  background: var(--heat-loss);
}

.monthly-load-legend .gain {
  background: var(--heat-gain);
}

.monthly-load-summary {
  margin: 0;
}

.monthly-load-summary div {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
  justify-content: stretch;
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 4px;
  background: var(--tile-glass);
  box-shadow: var(--glass-edge);
}

.monthly-load-summary .loss {
  border-color: color-mix(in srgb, var(--heat-loss) 34%, rgba(255, 255, 255, 0.38));
}

.monthly-load-summary .gain {
  border-color: color-mix(in srgb, var(--heat-gain) 34%, rgba(255, 255, 255, 0.38));
}

.monthly-load-summary dt,
.monthly-load-summary dd {
  margin: 0;
}

.monthly-load-summary dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 820;
  line-height: 1.1;
  white-space: nowrap;
}

.monthly-load-summary dd {
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.1;
  text-align: left;
}

.floor-setup-card select,
.floor-setup-card input,
.settings-field input,
.settings-field select,
.floor-plan-card select,
.floor-plan-card input,
.cal-setup select,
.cal-setup input,
.wall-list select,
.wall-thickness-control input,
.field select,
.field > input,
.input-unit input,
.window-row input,
.internal-gain-count-row input {
  border-color: var(--line-strong);
  color: #111827;
  box-shadow: var(--glass-edge), 0 1px 3px rgba(0, 0, 0, 0.05);
}

.floor-setup-card select:focus,
.floor-setup-card input:focus,
.settings-field input:focus,
.settings-field select:focus,
.floor-plan-card select:focus,
.floor-plan-card input:focus,
.cal-setup select:focus,
.cal-setup input:focus,
.wall-list select:focus,
.wall-thickness-control input:focus,
.field select:focus,
.field > input:focus,
.input-unit input:focus,
.window-row input:focus,
.internal-gain-count-row input:focus {
  outline: none;
  border-color: var(--blue-border);
  box-shadow: var(--glass-edge), 0 0 0 3px rgba(0, 122, 255, 0.12);
}

.result-card,
.collapsible-section,
.room-type-preset-card,
.uvalue-setpoint-card,
.infiltration-preset-card,
.material-card,
.floor-plan-card,
.boundary-summary,
.wall-list .wall-item,
.internal-gain-default-row,
.internal-gain-count-row {
  color: #1d2433;
}

html[data-theme="dark"] .project-picker,
html[data-theme="dark"] .brand-menu-button,
html[data-theme="dark"] .brand-menu-mark,
html[data-theme="dark"] .level-pill,
html[data-theme="dark"] .floor-row,
html[data-theme="dark"] .layer-row,
html[data-theme="dark"] .tool-btn,
html[data-theme="dark"] .upload-card,
html[data-theme="dark"] .system-controls select,
html[data-theme="dark"] .project-settings-head strong,
html[data-theme="dark"] .methodology-head strong,
html[data-theme="dark"] .history-popover-head strong,
html[data-theme="dark"] .export-popover-head strong,
html[data-theme="dark"] .product-library-head strong,
html[data-theme="dark"] .inspector h2,
html[data-theme="dark"] .product-panel h2,
html[data-theme="dark"] .results-panel h2,
html[data-theme="dark"] .inspector h3,
html[data-theme="dark"] .result-card h3,
html[data-theme="dark"] .field,
html[data-theme="dark"] .settings-field,
html[data-theme="dark"] .settings-field-label,
html[data-theme="dark"] .settings-section-head h3,
html[data-theme="dark"] .project-settings-section h3,
html[data-theme="dark"] .collapsible-section,
html[data-theme="dark"] .collapsible-section-body,
html[data-theme="dark"] .room-type-category-head,
html[data-theme="dark"] .collapsible-section-head,
html[data-theme="dark"] .room-type-category-list,
html[data-theme="dark"] .room-type-preset-list,
html[data-theme="dark"] .material-category,
html[data-theme="dark"] .material-list,
html[data-theme="dark"] .internal-gain-defaults,
html[data-theme="dark"] .internal-gain-counts,
html[data-theme="dark"] .room-type-preset-card,
html[data-theme="dark"] .uvalue-setpoint-card,
html[data-theme="dark"] .infiltration-preset-card,
html[data-theme="dark"] .material-card,
html[data-theme="dark"] .product-library-rail,
html[data-theme="dark"] .product-library-main,
html[data-theme="dark"] .product-detail-panel,
html[data-theme="dark"] .product-category-card,
html[data-theme="dark"] .product-library-title-card strong,
html[data-theme="dark"] .product-results-head strong,
html[data-theme="dark"] .product-model-group-head strong,
html[data-theme="dark"] .product-result-card,
html[data-theme="dark"] .product-card-copy strong,
html[data-theme="dark"] .product-card-metrics i,
html[data-theme="dark"] .product-detail-title strong,
html[data-theme="dark"] .product-detail-facts dd,
html[data-theme="dark"] .radiator-model-finder h3,
html[data-theme="dark"] .radiator-model-info h3,
html[data-theme="dark"] .heat-pump-performance-panel h3,
html[data-theme="dark"] .heat-pump-performance-controls label strong,
html[data-theme="dark"] .heat-pump-performance-metrics strong,
html[data-theme="dark"] .radiator-model-results strong,
html[data-theme="dark"] .product-detail-panel h3,
html[data-theme="dark"] .product-detail-empty strong,
html[data-theme="dark"] .floor-plan-card,
html[data-theme="dark"] .boundary-summary,
html[data-theme="dark"] .wall-list .wall-item,
html[data-theme="dark"] .internal-gain-default-row,
html[data-theme="dark"] .internal-gain-count-row,
html[data-theme="dark"] .methodology-intro,
html[data-theme="dark"] .methodology-summary,
html[data-theme="dark"] .method-card,
html[data-theme="dark"] .method-detail-card,
html[data-theme="dark"] .method-flow li,
html[data-theme="dark"] .result-card {
  color: var(--text);
}

html[data-theme="dark"] .floor-row small,
html[data-theme="dark"] .project-settings-head span,
html[data-theme="dark"] .methodology-head span,
html[data-theme="dark"] .history-popover-head span,
html[data-theme="dark"] .export-popover-head span,
html[data-theme="dark"] .product-library-head span,
html[data-theme="dark"] .product-category-card small,
html[data-theme="dark"] .product-library-title-card span,
html[data-theme="dark"] .product-library-title-card small,
html[data-theme="dark"] .product-library-title-card em,
html[data-theme="dark"] .product-results-head span,
html[data-theme="dark"] .product-results-head small,
html[data-theme="dark"] .product-model-group-head span,
html[data-theme="dark"] .product-model-group-head small,
html[data-theme="dark"] .product-card-kicker small,
html[data-theme="dark"] .product-card-copy > span:last-child,
html[data-theme="dark"] .product-card-summary,
html[data-theme="dark"] .product-card-range,
html[data-theme="dark"] .product-detail-title small,
html[data-theme="dark"] .product-detail-panel p,
html[data-theme="dark"] .product-detail-facts dt,
html[data-theme="dark"] .radiator-model-finder-head span,
html[data-theme="dark"] .radiator-model-search span,
html[data-theme="dark"] .heat-pump-performance-controls label span,
html[data-theme="dark"] .heat-pump-performance-metrics small,
html[data-theme="dark"] .radiator-model-results span,
html[data-theme="dark"] .export-report-card small,
html[data-theme="dark"] .field-note,
html[data-theme="dark"] .settings-note,
html[data-theme="dark"] .room-type-category-head small,
html[data-theme="dark"] .collapsible-section-head small,
html[data-theme="dark"] .internal-gain-default-head,
html[data-theme="dark"] .internal-gain-count-head,
html[data-theme="dark"] .internal-gain-count-row small,
html[data-theme="dark"] .window-row small,
html[data-theme="dark"] .input-unit small,
html[data-theme="dark"] .mini-input-unit small,
html[data-theme="dark"] .plan-note {
  color: var(--muted);
}

html[data-theme="dark"] .change-log-entry {
  border-color: rgba(239, 246, 255, 0.22);
  background: linear-gradient(145deg, rgba(42, 43, 48, 0.24), rgba(8, 9, 11, 0.06));
  color: var(--text);
  box-shadow: var(--glass-edge), 0 12px 24px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .change-log-entry time {
  color: #a9b6ca;
}

html[data-theme="dark"] .change-log-entry strong,
html[data-theme="dark"] .change-log-empty strong {
  color: var(--text);
}

html[data-theme="dark"] .change-log-entry span,
html[data-theme="dark"] .change-log-empty {
  color: var(--muted);
}

html[data-theme="dark"] .change-log-empty svg {
  color: #8fa0b7;
}

html[data-theme="dark"] .change-log-entry:hover,
html[data-theme="dark"] .change-log-entry:focus-visible,
html[data-theme="dark"] .change-log-item.restore-pending .change-log-entry {
  border-color: rgba(10, 132, 255, 0.58);
  background: rgba(10, 132, 255, 0.16);
  box-shadow: 0 0 0 1px rgba(10, 132, 255, 0.18), 0 18px 30px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .change-log-entry.persisted-history-entry:hover {
  border-color: rgba(239, 246, 255, 0.22);
  background: linear-gradient(145deg, rgba(42, 43, 48, 0.24), rgba(8, 9, 11, 0.06));
  box-shadow: var(--glass-edge), 0 12px 24px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .history-restore-confirm {
  border-color: rgba(10, 132, 255, 0.5);
  background: rgba(10, 132, 255, 0.14);
  box-shadow: var(--glass-edge), 0 18px 30px rgba(0, 0, 0, 0.26);
}

html[data-theme="dark"] .history-restore-confirm span {
  color: var(--text);
}

html[data-theme="dark"] .method-card code {
  border-color: rgba(10, 132, 255, 0.28);
  background: rgba(10, 132, 255, 0.12);
  color: #8fc5ff;
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .input-unit input {
  color: var(--text);
}

html[data-theme="dark"] .material-select-control span,
html[data-theme="dark"] .window-row > span,
html[data-theme="dark"] .door-type-option {
  color: var(--text);
}

html[data-theme="dark"] .material-select-control span small,
html[data-theme="dark"] .door-type-option small {
  color: var(--muted);
}

html[data-theme="dark"] .opening-material-item,
html[data-theme="dark"] .window-row {
  border: 1px solid rgba(239, 246, 255, 0.14);
  background: linear-gradient(145deg, rgba(42, 48, 60, 0.36), rgba(16, 19, 25, 0.18));
  color: var(--text);
  box-shadow: var(--glass-edge);
}

html[data-theme="dark"] .window-row.active {
  outline-color: rgba(10, 132, 255, 0.46);
  background: linear-gradient(145deg, rgba(48, 58, 74, 0.46), rgba(18, 22, 31, 0.24));
}

html[data-theme="dark"] .room-panel-focus-target {
  border-color: rgba(10, 132, 255, 0.68) !important;
  background: linear-gradient(145deg, rgba(10, 132, 255, 0.2), rgba(20, 23, 30, 0.52)) !important;
  box-shadow: var(--glass-edge), 0 0 0 3px rgba(10, 132, 255, 0.2), 0 16px 30px rgba(0, 0, 0, 0.28) !important;
}

html[data-theme="dark"] .opening-material-item .material-summary {
  color: var(--muted);
}

html[data-theme="dark"] .wall-list select:disabled,
html[data-theme="dark"] .wall-thickness-control input:disabled,
html[data-theme="dark"] .window-row input {
  border-color: rgba(232, 238, 247, 0.16);
  background: var(--input-glass);
  color: var(--text);
  opacity: 1;
}

html[data-theme="dark"] .window-row button {
  border-color: rgba(248, 113, 113, 0.42);
  background: rgba(127, 29, 29, 0.24);
  color: #fecaca;
}

html[data-theme="dark"] .window-row button:hover {
  border-color: rgba(248, 113, 113, 0.68);
  background: rgba(153, 27, 27, 0.32);
  color: #ffffff;
}

html[data-theme="dark"] .door-type-options {
  border-color: rgba(239, 246, 255, 0.18);
  background: linear-gradient(145deg, rgba(42, 48, 60, 0.42), rgba(16, 19, 25, 0.20));
}

html[data-theme="dark"] .door-type-options,
html[data-theme="dark"] .heat-emitter-type-options,
html[data-theme="dark"] .outlet-type-options,
html[data-theme="dark"] .valve-type-options,
html[data-theme="dark"] .zone-node-type-options {
  scrollbar-color: color-mix(in srgb, var(--blue) 60%, #ffffff 14%) transparent;
}

html[data-theme="dark"] .door-type-options::-webkit-scrollbar-thumb,
html[data-theme="dark"] .heat-emitter-type-options::-webkit-scrollbar-thumb,
html[data-theme="dark"] .outlet-type-options::-webkit-scrollbar-thumb,
html[data-theme="dark"] .valve-type-options::-webkit-scrollbar-thumb,
html[data-theme="dark"] .zone-node-type-options::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--blue) 54%, #ffffff 16%);
}

html[data-theme="dark"] .tool-palette.compact .door-type-options {
  background: linear-gradient(145deg, rgba(30, 35, 45, 0.94), rgba(12, 15, 21, 0.9));
}

html[data-theme="dark"] .door-type-option.active {
  border-color: var(--blue-border);
  background: var(--blue-glass);
  color: #dbeafe;
}

html[data-theme="dark"] .door-type-option:not(.active):hover {
  color: var(--text);
}

html[data-theme="dark"] .heat-emitter-type-option:not(.active):hover,
html[data-theme="dark"] .outlet-type-option:not(.active):hover,
html[data-theme="dark"] .valve-type-option:not(.active):hover,
html[data-theme="dark"] .zone-node-type-option:not(.active):hover {
  border-color: rgba(148, 163, 184, 0.42);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  box-shadow: var(--glass-edge), 0 10px 22px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .radiator-connection-stem {
  stroke: rgba(226, 232, 240, 0.62);
}

html[data-theme="dark"] .radiator-connection-anchor {
  fill: rgba(15, 18, 24, 0.86);
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.42));
}

html[data-theme="dark"] .radiator-connection-anchor.radiator-connection-flow {
  fill: rgba(127, 29, 29, 0.72);
}

html[data-theme="dark"] .radiator-connection-anchor.radiator-connection-return {
  fill: rgba(30, 64, 175, 0.72);
}

html[data-theme="dark"] .radiator-connection-anchor.radiator-connection-cooling-flow {
  fill: rgba(14, 116, 144, 0.68);
}

html[data-theme="dark"] .radiator-connection-anchor.radiator-connection-cooling-return {
  fill: rgba(88, 28, 135, 0.68);
}

html[data-theme="dark"] .outlet-symbol-body {
  fill: rgba(15, 18, 24, 0.01);
  stroke: transparent;
}

html[data-theme="dark"] .outlet-symbol-asset {
  filter: brightness(0) invert(1) drop-shadow(0 2px 5px rgba(0, 0, 0, 0.46));
}

html[data-theme="dark"] .outlet-symbol-glyph,
html[data-theme="dark"] .outlet-reference {
  color: #e2e8f0;
  fill: #e2e8f0;
  stroke: rgba(9, 12, 18, 0.92);
}

html[data-theme="dark"] .outlet-connection-anchor {
  fill: rgba(15, 18, 24, 0.86);
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.42));
}

html[data-theme="dark"] .outlet-tmv-plan-assembly { color: #e2e8f0; }
html[data-theme="dark"] .outlet-tmv-body { fill: #111827; stroke: #e2e8f0; }
html[data-theme="dark"] .outlet-tmv-port-symbol.hot { fill: #7f1d1d; stroke: #f87171; }
html[data-theme="dark"] .outlet-tmv-port-symbol.cold { fill: #1e3a8a; stroke: #60a5fa; }
html[data-theme="dark"] .outlet-tmv-port-symbol.mixed { fill: #134e4a; stroke: #5eead4; }
html[data-theme="dark"] .outlet-tmv-adjuster { stroke: #e2e8f0; }
html[data-theme="dark"] .outlet-tmv-label { fill: #e2e8f0; stroke: rgba(9, 12, 18, 0.94); }

html[data-theme="dark"] .outlet-connection-hot {
  fill: rgba(127, 29, 29, 0.72);
}

html[data-theme="dark"] .outlet-connection-cold {
  fill: rgba(30, 64, 175, 0.72);
}

html[data-theme="dark"] .outlet-connection-drainage {
  fill: rgba(120, 53, 15, 0.78);
}

html[data-theme="dark"] .floor-outlet.active .outlet-symbol-body {
  fill: rgba(10, 132, 255, 0.16);
  stroke: #60a5fa;
}

html[data-theme="dark"] .pipe-elbow circle,
html[data-theme="dark"] .pipe-tee-fitting circle,
html[data-theme="dark"] .pipe-reducer-fitting circle,
html[data-theme="dark"] .pipe-reducer-fitting path,
html[data-theme="dark"] .pipe-draft-elbow,
html[data-theme="dark"] .pipe-draft-point,
html[data-theme="dark"] .pipe-guide-point,
html[data-theme="dark"] .pipe-vertex {
  fill: rgba(15, 18, 24, 0.88);
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.36));
}

html[data-theme="dark"] .pipe-elbow text,
html[data-theme="dark"] .pipe-tee-fitting text,
html[data-theme="dark"] .pipe-reducer-fitting text,
html[data-theme="dark"] .pipe-measurement,
html[data-theme="dark"] .pipe-reference,
html[data-theme="dark"] .pipe-size-label {
  fill: #e2e8f0;
  stroke: rgba(9, 12, 18, 0.9);
}

html[data-theme="dark"] .pipe-pill-label {
  filter: drop-shadow(0 7px 16px rgba(0, 0, 0, 0.36));
}

html[data-theme="dark"] .pipe-size-label-pill-bg {
  fill: rgba(16, 19, 25, 0.82);
  stroke: rgba(226, 232, 240, 0.18);
}

html[data-theme="dark"] .pipe-pill-label.compact .pipe-size-label-pill-bg {
  fill: rgba(16, 19, 25, 0.72);
}

html[data-theme="dark"] .pipe-size-label-grid.pipe-flow .pipe-size-label-pill-bg,
html[data-theme="dark"] .pipe-size-label-grid.pipe-domestic-hot-water .pipe-size-label-pill-bg {
  stroke: rgba(255, 107, 107, 0.6);
}

html[data-theme="dark"] .pipe-size-label-grid.pipe-return .pipe-size-label-pill-bg,
html[data-theme="dark"] .pipe-size-label-grid.pipe-domestic-cold-water .pipe-size-label-pill-bg {
  stroke: rgba(90, 167, 255, 0.6);
}

html[data-theme="dark"] .pipe-size-label-grid.pipe-cooling-flow .pipe-size-label-pill-bg {
  stroke: rgba(103, 232, 249, 0.58);
}

html[data-theme="dark"] .pipe-size-label-grid.pipe-cooling-return .pipe-size-label-pill-bg {
  stroke: rgba(192, 132, 252, 0.58);
}

html[data-theme="dark"] .pipe-size-label-grid.pipe-boosted-cold-water .pipe-size-label-pill-bg {
  stroke: rgba(74, 222, 128, 0.58);
}

html[data-theme="dark"] .pipe-size-label-grid.pipe-secondary-return .pipe-size-label-pill-bg {
  stroke: rgba(251, 146, 60, 0.6);
}

html[data-theme="dark"] .pipe-size-label-grid.pipe-gas .pipe-size-label-pill-bg {
  stroke: rgba(253, 224, 71, 0.66);
}

html[data-theme="dark"] .pipe-size-label.pipe-flow {
  fill: #ff6b6b;
}

html[data-theme="dark"] .pipe-size-label-grid.pipe-flow .pipe-size-label {
  fill: #ff6b6b;
}

html[data-theme="dark"] .pipe-size-label.pipe-return {
  fill: #5aa7ff;
}

html[data-theme="dark"] .pipe-size-label-grid.pipe-return .pipe-size-label {
  fill: #5aa7ff;
}

html[data-theme="dark"] .pipe-size-label.pipe-cooling-flow,
html[data-theme="dark"] .pipe-size-label-grid.pipe-cooling-flow .pipe-size-label {
  fill: #67e8f9;
}

html[data-theme="dark"] .pipe-size-label.pipe-cooling-return,
html[data-theme="dark"] .pipe-size-label-grid.pipe-cooling-return .pipe-size-label {
  fill: #c084fc;
}

html[data-theme="dark"] .pipe-size-label.pipe-gas,
html[data-theme="dark"] .pipe-size-label-grid.pipe-gas .pipe-size-label {
  fill: #fde047;
}

html[data-theme="dark"] .pipe-size-label-grid .pipe-label-divider {
  stroke: rgba(226, 232, 240, 0.4);
}

html[data-theme="dark"] .pipe-size-label-grid.pipe-flow .pipe-label-divider {
  stroke: rgba(255, 107, 107, 0.5);
}

html[data-theme="dark"] .pipe-size-label-grid.pipe-return .pipe-label-divider {
  stroke: rgba(90, 167, 255, 0.5);
}

html[data-theme="dark"] .pipe-size-label-grid.pipe-cooling-flow .pipe-label-divider {
  stroke: rgba(103, 232, 249, 0.5);
}

html[data-theme="dark"] .pipe-size-label-grid.pipe-cooling-return .pipe-label-divider {
  stroke: rgba(192, 132, 252, 0.5);
}

html[data-theme="dark"] .pipe-size-label-grid.pipe-gas .pipe-label-divider {
  stroke: rgba(253, 224, 71, 0.56);
}

html[data-theme="dark"] .canvas-stage .sheet {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72), 0 18px 46px rgba(0, 0, 0, 0.12);
}

html[data-theme="dark"] .canvas-stage .canvas-status {
  border-top-color: var(--line);
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
}

html[data-theme="dark"] .canvas-stage .pipe-connection-warning {
  border-color: rgba(245, 158, 11, 0.22);
  background: rgba(255, 251, 235, 0.78);
  box-shadow: 0 10px 24px rgba(146, 64, 14, 0.08);
  color: #92400e;
}

html[data-theme="dark"] .canvas-stage .pipe-connection-warning-icon {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

html[data-theme="dark"] .canvas-stage .pipe-connection-warning strong {
  color: #7c2d12;
}

html[data-theme="dark"] .canvas-stage .pipe-connection-warning small {
  color: #9a3412;
}

html[data-theme="dark"] .canvas-stage .show-grid::after {
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.045) 1px, transparent 1px);
}

html[data-theme="dark"] .canvas-stage .fallback-plan {
  color: #5b6675;
}

html[data-theme="dark"] .canvas-stage .plan-lines {
  stroke: #5f6b7a;
}

html[data-theme="dark"] .canvas-stage .furniture {
  stroke: #a7b1bf;
}

html[data-theme="dark"] .canvas-stage .dimensions {
  fill: #64748b;
  stroke: #9aa6b5;
}

html[data-theme="dark"] .canvas-stage .empty-floor-label {
  fill: #334155;
}

html[data-theme="dark"] .canvas-stage .empty-floor-hint {
  fill: #64748b;
}

html[data-theme="dark"] .canvas-stage .radiator-connection-stem {
  stroke: rgba(15, 23, 42, 0.64);
}

html[data-theme="dark"] .canvas-stage .radiator-connection-anchor,
html[data-theme="dark"] .canvas-stage .outlet-connection-anchor,
html[data-theme="dark"] .canvas-stage .pipe-draft-elbow,
html[data-theme="dark"] .canvas-stage .pipe-draft-point,
html[data-theme="dark"] .canvas-stage .pipe-guide-point,
html[data-theme="dark"] .canvas-stage .pipe-vertex,
html[data-theme="dark"] .canvas-stage .pipe-elbow circle,
html[data-theme="dark"] .canvas-stage .pipe-tee-fitting circle,
html[data-theme="dark"] .canvas-stage .pipe-reducer-fitting circle {
  fill: rgba(255, 255, 255, 0.94);
  filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.2));
}

html[data-theme="dark"] .canvas-stage .radiator-connection-anchor.radiator-connection-flow {
  fill: rgba(254, 226, 226, 0.94);
}

html[data-theme="dark"] .canvas-stage .radiator-connection-anchor.radiator-connection-return {
  fill: rgba(219, 234, 254, 0.94);
}

html[data-theme="dark"] .canvas-stage .radiator-connection-anchor.radiator-connection-cooling-flow {
  fill: rgba(224, 242, 254, 0.94);
}

html[data-theme="dark"] .canvas-stage .radiator-connection-anchor.radiator-connection-cooling-return {
  fill: rgba(243, 232, 255, 0.94);
}

html[data-theme="dark"] .canvas-stage .outlet-symbol-body {
  fill: rgba(255, 255, 255, 0.01);
  stroke: transparent;
}

html[data-theme="dark"] .canvas-stage .outlet-symbol-asset {
  filter: drop-shadow(0 2px 4px rgba(15, 23, 42, 0.16));
}

html[data-theme="dark"] .canvas-stage .outlet-symbol-glyph,
html[data-theme="dark"] .canvas-stage .outlet-reference {
  color: #0f172a;
  fill: #0f172a;
  stroke: none;
}

html[data-theme="dark"] .canvas-stage .floor-outlet.active .outlet-symbol-body {
  fill: rgba(219, 234, 254, 0.2);
  stroke: #0a84ff;
}

html[data-theme="dark"] .canvas-stage .pipe-reducer-fitting path {
  fill: rgba(255, 255, 255, 0.88);
}

html[data-theme="dark"] .canvas-stage .pipe-elbow text,
html[data-theme="dark"] .canvas-stage .pipe-tee-fitting text,
html[data-theme="dark"] .canvas-stage .pipe-reducer-fitting text,
html[data-theme="dark"] .canvas-stage .pipe-measurement,
html[data-theme="dark"] .canvas-stage .pipe-reference {
  fill: #334155;
  stroke: rgba(255, 255, 255, 0.9);
}

html[data-theme="dark"] .canvas-stage .pipe-pill-label {
  filter: drop-shadow(0 2px 5px rgba(15, 23, 42, 0.1));
}

html[data-theme="dark"] .canvas-stage .pipe-size-label-pill-bg {
  fill: rgba(255, 255, 255, 0.86);
  stroke: rgba(100, 116, 139, 0.34);
}

html[data-theme="dark"] .canvas-stage .pipe-pill-label.compact .pipe-size-label-pill-bg {
  fill: rgba(255, 255, 255, 0.78);
}

html[data-theme="dark"] .canvas-stage .pipe-size-label-grid.pipe-flow .pipe-size-label-pill-bg,
html[data-theme="dark"] .canvas-stage .pipe-size-label-grid.pipe-domestic-hot-water .pipe-size-label-pill-bg {
  fill: rgba(255, 255, 255, 0.86);
  stroke: rgba(239, 68, 68, 0.54);
}

html[data-theme="dark"] .canvas-stage .pipe-size-label-grid.pipe-return .pipe-size-label-pill-bg,
html[data-theme="dark"] .canvas-stage .pipe-size-label-grid.pipe-domestic-cold-water .pipe-size-label-pill-bg {
  fill: rgba(255, 255, 255, 0.86);
  stroke: rgba(10, 132, 255, 0.54);
}

html[data-theme="dark"] .canvas-stage .pipe-size-label-grid.pipe-cooling-flow .pipe-size-label-pill-bg {
  stroke: rgba(2, 132, 199, 0.54);
}

html[data-theme="dark"] .canvas-stage .pipe-size-label-grid.pipe-cooling-return .pipe-size-label-pill-bg {
  stroke: rgba(147, 51, 234, 0.54);
}

html[data-theme="dark"] .canvas-stage .pipe-size-label-grid.pipe-boosted-cold-water .pipe-size-label-pill-bg {
  stroke: rgba(22, 163, 74, 0.54);
}

html[data-theme="dark"] .canvas-stage .pipe-size-label-grid.pipe-secondary-return .pipe-size-label-pill-bg {
  stroke: rgba(234, 88, 12, 0.54);
}

html[data-theme="dark"] .canvas-stage .pipe-size-label-grid.pipe-gas .pipe-size-label-pill-bg {
  stroke: rgba(202, 138, 4, 0.6);
}

html[data-theme="dark"] .canvas-stage .pipe-size-label-grid .pipe-label-divider {
  stroke: rgba(71, 85, 105, 0.52);
}

html[data-theme="dark"] .canvas-stage .pipe-size-label-grid.pipe-flow .pipe-label-divider,
html[data-theme="dark"] .canvas-stage .pipe-size-label-grid.pipe-domestic-hot-water .pipe-label-divider {
  stroke: rgba(239, 68, 68, 0.46);
}

html[data-theme="dark"] .canvas-stage .pipe-size-label-grid.pipe-return .pipe-label-divider,
html[data-theme="dark"] .canvas-stage .pipe-size-label-grid.pipe-domestic-cold-water .pipe-label-divider {
  stroke: rgba(10, 132, 255, 0.46);
}

html[data-theme="dark"] .canvas-stage .pipe-size-label-grid.pipe-cooling-flow .pipe-label-divider {
  stroke: rgba(56, 189, 248, 0.5);
}

html[data-theme="dark"] .canvas-stage .pipe-size-label-grid.pipe-cooling-return .pipe-label-divider {
  stroke: rgba(168, 85, 247, 0.5);
}

html[data-theme="dark"] .canvas-stage .pipe-size-label-grid.pipe-boosted-cold-water .pipe-label-divider {
  stroke: rgba(34, 197, 94, 0.48);
}

html[data-theme="dark"] .canvas-stage .pipe-size-label-grid.pipe-secondary-return .pipe-label-divider {
  stroke: rgba(249, 115, 22, 0.5);
}

html[data-theme="dark"] .canvas-stage .pipe-size-label-grid.pipe-gas .pipe-label-divider {
  stroke: rgba(202, 138, 4, 0.52);
}

html[data-theme="dark"] .canvas-stage .pipe-size-label {
  stroke: rgba(255, 255, 255, 0.95);
}

html[data-theme="dark"] .canvas-stage .pipe-size-label-grid.pipe-flow .pipe-size-label,
html[data-theme="dark"] .canvas-stage .pipe-size-label.pipe-flow {
  fill: #ef4444;
}

html[data-theme="dark"] .canvas-stage .pipe-size-label-grid.pipe-return .pipe-size-label,
html[data-theme="dark"] .canvas-stage .pipe-size-label.pipe-return {
  fill: #0a84ff;
}

html[data-theme="dark"] .canvas-stage .pipe-size-label-grid.pipe-cooling-flow .pipe-size-label,
html[data-theme="dark"] .canvas-stage .pipe-size-label.pipe-cooling-flow {
  fill: #0284c7;
}

html[data-theme="dark"] .canvas-stage .pipe-size-label-grid.pipe-cooling-return .pipe-size-label,
html[data-theme="dark"] .canvas-stage .pipe-size-label.pipe-cooling-return {
  fill: #9333ea;
}

html[data-theme="dark"] .canvas-stage .pipe-size-label-grid.pipe-domestic-hot-water .pipe-size-label,
html[data-theme="dark"] .canvas-stage .pipe-size-label.pipe-domestic-hot-water {
  fill: #ef4444;
}

html[data-theme="dark"] .canvas-stage .pipe-size-label-grid.pipe-domestic-cold-water .pipe-size-label,
html[data-theme="dark"] .canvas-stage .pipe-size-label.pipe-domestic-cold-water {
  fill: #0a84ff;
}

html[data-theme="dark"] .canvas-stage .pipe-size-label-grid.pipe-boosted-cold-water .pipe-size-label,
html[data-theme="dark"] .canvas-stage .pipe-size-label.pipe-boosted-cold-water {
  fill: #16a34a;
}

html[data-theme="dark"] .canvas-stage .pipe-size-label-grid.pipe-secondary-return .pipe-size-label,
html[data-theme="dark"] .canvas-stage .pipe-size-label.pipe-secondary-return {
  fill: #ea580c;
}

html[data-theme="dark"] .canvas-stage .pipe-size-label-grid.pipe-gas .pipe-size-label,
html[data-theme="dark"] .canvas-stage .pipe-size-label.pipe-gas {
  fill: #ca8a04;
}

html[data-theme="dark"] .canvas-stage .pipe-valve-symbol-asset,
html[data-theme="dark"] .canvas-stage .pipe-valve-symbol-fill {
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.72));
}

html[data-theme="dark"] .canvas-stage .pipe-valve-symbol-backdrop {
  fill: #fff;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.58));
}

html[data-theme="dark"] .canvas-stage .pipe-valve-occluder {
  fill: #fff;
}

html[data-theme="dark"] .canvas-stage .plant-room-marker {
  fill: rgba(255, 255, 255, 0.88);
  stroke: #0f172a;
}

html[data-theme="dark"] .canvas-stage .plant-room-connection-port {
  fill: rgba(255, 255, 255, 0.94);
  filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.2));
}

html[data-theme="dark"] .canvas-stage .plant-room-connection-flow,
html[data-theme="dark"] .canvas-stage .plant-room-connection-domestic-hot-water {
  fill: rgba(254, 226, 226, 0.94);
}

html[data-theme="dark"] .canvas-stage .plant-room-connection-return,
html[data-theme="dark"] .canvas-stage .plant-room-connection-domestic-cold-water {
  fill: rgba(219, 234, 254, 0.94);
}

html[data-theme="dark"] .canvas-stage .plant-room-connection-cooling-flow {
  fill: rgba(224, 242, 254, 0.94);
}

html[data-theme="dark"] .canvas-stage .plant-room-connection-cooling-return {
  fill: rgba(243, 232, 255, 0.94);
}

html[data-theme="dark"] .canvas-stage .plant-room-connection-gas {
  fill: rgba(254, 243, 199, 0.94);
}

html[data-theme="dark"] .canvas-stage .plant-room-connection-electrical-cable {
  fill: rgba(17, 24, 39, 0.94);
}

html[data-theme="dark"] .canvas-stage .plant-room-node text {
  fill: var(--text);
  stroke: rgba(255, 255, 255, 0.92);
}

html[data-theme="dark"] .canvas-stage .plant-room-node.plant-room-system-heating .plant-room-marker {
  fill: rgba(254, 242, 242, 0.92);
  stroke: #ef4444;
}

html[data-theme="dark"] .canvas-stage .plant-room-node.plant-room-system-heating text {
  fill: #991b1b;
}

html[data-theme="dark"] .canvas-stage .plant-room-node.plant-room-system-cooling .plant-room-marker {
  fill: rgba(240, 249, 255, 0.92);
  stroke: #0a84ff;
}

html[data-theme="dark"] .canvas-stage .plant-room-node.plant-room-system-cooling text {
  fill: #075985;
}

html[data-theme="dark"] .canvas-stage .plant-room-node.plant-room-system-public-health .plant-room-marker {
  fill: rgba(240, 253, 244, 0.92);
  stroke: #16a34a;
}

html[data-theme="dark"] .canvas-stage .plant-room-node.plant-room-system-public-health text {
  fill: #166534;
}

html[data-theme="dark"] .canvas-stage .plant-room-node.plant-room-system-gas .plant-room-marker {
  fill: rgba(255, 251, 235, 0.94);
  stroke: #eab308;
}

html[data-theme="dark"] .canvas-stage .plant-room-node.plant-room-system-gas text {
  fill: #854d0e;
}

html[data-theme="dark"] .canvas-stage .plant-room-node.plant-room-system-electrical .plant-room-marker {
  fill: rgba(250, 245, 255, 0.94);
  stroke: #a855f7;
}

html[data-theme="dark"] .canvas-stage .plant-room-node.plant-room-system-electrical text {
  fill: #6b21a8;
}

html[data-theme="dark"] .canvas-stage .riser-marker {
  fill: rgba(255, 255, 255, 0.9);
  stroke: #92400e;
  filter: drop-shadow(0 3px 8px rgba(15, 23, 42, 0.2));
}

html[data-theme="dark"] .canvas-stage .riser-symbol {
  stroke: #d97706;
}

html[data-theme="dark"] .canvas-stage .riser-node text {
  fill: var(--text);
  stroke: rgba(255, 255, 255, 0.92);
}

html[data-theme="dark"] .canvas-stage .riser-node.pipe-flow .riser-marker,
html[data-theme="dark"] .canvas-stage .riser-node.pipe-flow .riser-symbol,
html[data-theme="dark"] .canvas-stage .riser-node.pipe-domestic-hot-water .riser-marker,
html[data-theme="dark"] .canvas-stage .riser-node.pipe-domestic-hot-water .riser-symbol {
  stroke: #ef4444;
}

html[data-theme="dark"] .canvas-stage .riser-node.pipe-flow text,
html[data-theme="dark"] .canvas-stage .riser-node.pipe-domestic-hot-water text {
  fill: #ef4444;
}

html[data-theme="dark"] .canvas-stage .riser-node.pipe-return .riser-marker,
html[data-theme="dark"] .canvas-stage .riser-node.pipe-return .riser-symbol,
html[data-theme="dark"] .canvas-stage .riser-node.pipe-domestic-cold-water .riser-marker,
html[data-theme="dark"] .canvas-stage .riser-node.pipe-domestic-cold-water .riser-symbol {
  stroke: #0a84ff;
}

html[data-theme="dark"] .canvas-stage .riser-node.pipe-return text,
html[data-theme="dark"] .canvas-stage .riser-node.pipe-domestic-cold-water text {
  fill: #0a84ff;
}

html[data-theme="dark"] .canvas-stage .riser-node.pipe-cooling-flow .riser-marker,
html[data-theme="dark"] .canvas-stage .riser-node.pipe-cooling-flow .riser-symbol {
  stroke: #38bdf8;
}

html[data-theme="dark"] .canvas-stage .riser-node.pipe-cooling-flow text {
  fill: #0284c7;
}

html[data-theme="dark"] .canvas-stage .riser-node.pipe-cooling-return .riser-marker,
html[data-theme="dark"] .canvas-stage .riser-node.pipe-cooling-return .riser-symbol {
  stroke: #a855f7;
}

html[data-theme="dark"] .canvas-stage .riser-node.pipe-cooling-return text {
  fill: #9333ea;
}

html[data-theme="dark"] .canvas-stage .riser-node.pipe-boosted-cold-water .riser-marker,
html[data-theme="dark"] .canvas-stage .riser-node.pipe-boosted-cold-water .riser-symbol {
  stroke: #22c55e;
}

html[data-theme="dark"] .canvas-stage .riser-node.pipe-boosted-cold-water text {
  fill: #16a34a;
}

html[data-theme="dark"] .canvas-stage .riser-node.pipe-secondary-return .riser-marker,
html[data-theme="dark"] .canvas-stage .riser-node.pipe-secondary-return .riser-symbol {
  stroke: #f97316;
}

html[data-theme="dark"] .canvas-stage .riser-node.pipe-secondary-return text {
  fill: #ea580c;
}

html[data-theme="dark"] .plant-room-marker {
  fill: rgba(15, 18, 24, 0.9);
  stroke: rgba(226, 232, 240, 0.84);
}

html[data-theme="dark"] .plant-room-connection-port {
  fill: rgba(15, 18, 24, 0.88);
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.42));
}

html[data-theme="dark"] .plant-room-connection-flow {
  fill: rgba(127, 29, 29, 0.72);
}

html[data-theme="dark"] .plant-room-connection-return {
  fill: rgba(30, 64, 175, 0.72);
}

html[data-theme="dark"] .plant-room-connection-cooling-flow {
  fill: rgba(14, 116, 144, 0.72);
}

html[data-theme="dark"] .plant-room-connection-cooling-return {
  fill: rgba(88, 28, 135, 0.72);
}

html[data-theme="dark"] .plant-room-connection-gas {
  fill: rgba(113, 63, 18, 0.74);
}

html[data-theme="dark"] .plant-room-connection-electrical-cable {
  fill: rgba(17, 24, 39, 0.92);
}

html[data-theme="dark"] .plant-room-node text {
  fill: #e2e8f0;
  stroke: rgba(9, 12, 18, 0.92);
}

html[data-theme="dark"] .plant-room-node.plant-room-system-heating .plant-room-halo {
  fill: rgba(239, 68, 68, 0.12);
  stroke: rgba(255, 107, 107, 0.42);
}

html[data-theme="dark"] .plant-room-node.plant-room-system-heating .plant-room-marker {
  fill: rgba(127, 29, 29, 0.32);
  stroke: #ff6b6b;
}

html[data-theme="dark"] .plant-room-node.plant-room-system-heating .plant-room-symbol,
html[data-theme="dark"] .plant-room-node.plant-room-system-heating text {
  stroke: rgba(9, 12, 18, 0.92);
}

html[data-theme="dark"] .plant-room-node.plant-room-system-heating .plant-room-symbol {
  stroke: #ff6b6b;
}

html[data-theme="dark"] .plant-room-node.plant-room-system-heating text {
  fill: #fecaca;
}

html[data-theme="dark"] .plant-room-node.plant-room-system-cooling .plant-room-halo {
  fill: rgba(10, 132, 255, 0.12);
  stroke: rgba(90, 167, 255, 0.42);
}

html[data-theme="dark"] .plant-room-node.plant-room-system-cooling .plant-room-marker {
  fill: rgba(30, 64, 175, 0.32);
  stroke: #5aa9ff;
}

html[data-theme="dark"] .plant-room-node.plant-room-system-cooling .plant-room-symbol {
  stroke: #5aa9ff;
}

html[data-theme="dark"] .plant-room-node.plant-room-system-cooling text {
  fill: #bfdbfe;
}

html[data-theme="dark"] .plant-room-node.plant-room-system-public-health .plant-room-halo {
  fill: rgba(34, 197, 94, 0.12);
  stroke: rgba(74, 222, 128, 0.42);
}

html[data-theme="dark"] .plant-room-node.plant-room-system-public-health .plant-room-marker {
  fill: rgba(20, 83, 45, 0.32);
  stroke: #4ade80;
}

html[data-theme="dark"] .plant-room-node.plant-room-system-public-health .plant-room-symbol {
  stroke: #4ade80;
}

html[data-theme="dark"] .plant-room-node.plant-room-system-public-health text {
  fill: #bbf7d0;
}

html[data-theme="dark"] .plant-room-node.plant-room-system-gas .plant-room-halo {
  fill: rgba(250, 204, 21, 0.13);
  stroke: rgba(253, 224, 71, 0.46);
}

html[data-theme="dark"] .plant-room-node.plant-room-system-gas .plant-room-marker {
  fill: rgba(113, 63, 18, 0.34);
  stroke: #fde047;
}

html[data-theme="dark"] .plant-room-node.plant-room-system-gas .plant-room-symbol {
  stroke: #fde047;
}

html[data-theme="dark"] .plant-room-node.plant-room-system-gas text {
  fill: #fef3c7;
}

html[data-theme="dark"] .plant-room-node.plant-room-system-electrical .plant-room-halo {
  fill: rgba(168, 85, 247, 0.13);
  stroke: rgba(196, 181, 253, 0.46);
}

html[data-theme="dark"] .plant-room-node.plant-room-system-electrical .plant-room-marker {
  fill: rgba(88, 28, 135, 0.34);
  stroke: #c084fc;
}

html[data-theme="dark"] .plant-room-node.plant-room-system-electrical .plant-room-symbol {
  stroke: #c084fc;
}

html[data-theme="dark"] .plant-room-node.plant-room-system-electrical text {
  fill: #f3e8ff;
}

html[data-theme="dark"] .schematic-placement-zone.schematic-zone-system-heating,
html[data-theme="dark"] .schematic-placement-zone.schematic-zone-system-heating .schematic-device-symbol,
html[data-theme="dark"] .schematic-placement-zone.schematic-zone-system-heating text {
  color: #ff6b6b;
  fill: #ff6b6b;
}

html[data-theme="dark"] .schematic-placement-zone.schematic-zone-system-cooling,
html[data-theme="dark"] .schematic-placement-zone.schematic-zone-system-cooling .schematic-device-symbol,
html[data-theme="dark"] .schematic-placement-zone.schematic-zone-system-cooling text {
  color: #5aa9ff;
  fill: #5aa9ff;
}

html[data-theme="dark"] .schematic-placement-zone.schematic-zone-system-public-health,
html[data-theme="dark"] .schematic-placement-zone.schematic-zone-system-public-health .schematic-device-symbol,
html[data-theme="dark"] .schematic-placement-zone.schematic-zone-system-public-health text {
  color: #4ade80;
  fill: #4ade80;
}

html[data-theme="dark"] .schematic-placement-zone.schematic-zone-system-gas,
html[data-theme="dark"] .schematic-placement-zone.schematic-zone-system-gas .schematic-device-symbol,
html[data-theme="dark"] .schematic-placement-zone.schematic-zone-system-gas text {
  color: #fde047;
  fill: #fde047;
}

html[data-theme="dark"] .schematic-placement-zone.schematic-zone-system-public-health text.muted,
html[data-theme="dark"] .schematic-placement-zone.schematic-zone-system-cooling text.muted,
html[data-theme="dark"] .schematic-placement-zone.schematic-zone-system-heating text.muted,
html[data-theme="dark"] .schematic-placement-zone.schematic-zone-system-gas text.muted {
  fill: var(--muted);
}

html[data-theme="dark"] .schematic-zone-card-shell {
  fill: rgba(17, 24, 39, 0.94);
  stroke: rgba(148, 163, 184, 0.58);
}

html[data-theme="dark"] .schematic-zone-card-divider {
  stroke: #334155;
}

html[data-theme="dark"] .schematic-zone-port-socket {
  fill: #111827;
}

html[data-theme="dark"] .schematic-zone-card-tag {
  fill: rgba(15, 23, 42, 0.92);
}

html[data-theme="dark"] .schematic-placement-zone text.schematic-zone-card-title,
html[data-theme="dark"] .schematic-placement-zone text.schematic-zone-card-metric-value {
  fill: var(--text);
}

html[data-theme="dark"] .schematic-placement-zone text.schematic-zone-card-subtitle,
html[data-theme="dark"] .schematic-placement-zone text.schematic-zone-card-metric-label {
  fill: var(--muted);
}

html[data-theme="dark"] .schematic-placement-zone text.schematic-zone-card-code {
  fill: currentColor;
}

html[data-theme="dark"] .riser-marker {
  fill: rgba(15, 18, 24, 0.9);
  stroke: rgba(251, 191, 36, 0.86);
}

html[data-theme="dark"] .riser-node.pipe-flow .riser-marker,
html[data-theme="dark"] .riser-node.pipe-flow .riser-symbol {
  stroke: #ff6b6b;
}

html[data-theme="dark"] .riser-node.pipe-flow text {
  fill: #ff6b6b;
}

html[data-theme="dark"] .riser-node.pipe-return .riser-marker,
html[data-theme="dark"] .riser-node.pipe-return .riser-symbol {
  stroke: #5aa9ff;
}

html[data-theme="dark"] .riser-node.pipe-return text {
  fill: #5aa9ff;
}

html[data-theme="dark"] .riser-node.pipe-cooling-flow .riser-marker,
html[data-theme="dark"] .riser-node.pipe-cooling-flow .riser-symbol {
  stroke: #67e8f9;
}

html[data-theme="dark"] .riser-node.pipe-cooling-flow text {
  fill: #67e8f9;
}

html[data-theme="dark"] .riser-node.pipe-cooling-return .riser-marker,
html[data-theme="dark"] .riser-node.pipe-cooling-return .riser-symbol {
  stroke: #c084fc;
}

html[data-theme="dark"] .riser-node.pipe-cooling-return text {
  fill: #c084fc;
}

html[data-theme="dark"] .riser-node text {
  fill: #fef3c7;
  stroke: rgba(9, 12, 18, 0.92);
}

html[data-theme="dark"] .riser-node.pipe-domestic-hot-water .riser-marker,
html[data-theme="dark"] .riser-node.pipe-domestic-hot-water .riser-symbol {
  stroke: #ff6b6b;
}

html[data-theme="dark"] .riser-node.pipe-domestic-hot-water text {
  fill: #ff6b6b;
}

html[data-theme="dark"] .riser-node.pipe-domestic-cold-water .riser-marker,
html[data-theme="dark"] .riser-node.pipe-domestic-cold-water .riser-symbol {
  stroke: #5aa9ff;
}

html[data-theme="dark"] .riser-node.pipe-domestic-cold-water text {
  fill: #5aa9ff;
}

html[data-theme="dark"] .riser-node.pipe-boosted-cold-water .riser-marker,
html[data-theme="dark"] .riser-node.pipe-boosted-cold-water .riser-symbol {
  stroke: #34d399;
}

html[data-theme="dark"] .riser-node.pipe-boosted-cold-water text {
  fill: #34d399;
}

html[data-theme="dark"] .riser-node.pipe-secondary-return .riser-marker,
html[data-theme="dark"] .riser-node.pipe-secondary-return .riser-symbol {
  stroke: #fb923c;
}

html[data-theme="dark"] .riser-node.pipe-secondary-return text {
  fill: #fb923c;
}

html[data-theme="dark"] .ufh-manifold-body {
  fill: rgba(180, 83, 9, 0.24);
  stroke: rgba(251, 191, 36, 0.78);
}

html[data-theme="dark"] .ufh-loop-path {
  stroke: var(--ufh-loop-color, rgba(251, 191, 36, 0.78));
  filter: drop-shadow(0 1px 2px rgba(9, 12, 18, 0.52));
}

html[data-theme="dark"] .ufh-loop-connector {
  stroke: rgba(251, 191, 36, 0.54);
}

html[data-theme="dark"] .ufh-loop-pattern-spiral {
  stroke: var(--ufh-loop-color, rgba(253, 186, 116, 0.86));
}

html[data-theme="dark"] .ufh-manifold.active .ufh-manifold-body {
  fill: rgba(217, 119, 6, 0.36);
  stroke: #fbbf24;
}

html[data-theme="dark"] .ufh-manifold-port {
  stroke: rgba(254, 243, 199, 0.58);
}

html[data-theme="dark"] .ufh-manifold-reference {
  fill: #fde68a;
  stroke: rgba(9, 12, 18, 0.92);
}

html[data-theme="dark"] .manifold-room-row {
  background: rgba(15, 18, 24, 0.5);
}

html[data-theme="dark"] .ufh-loop-card {
  background: rgba(15, 18, 24, 0.46);
}

html[data-theme="dark"] .ufh-loop-card.blocked {
  border-color: rgba(248, 113, 113, 0.42);
  background: rgba(127, 29, 29, 0.28);
}

html[data-theme="dark"] .ufh-loop-card.limited {
  border-color: rgba(251, 191, 36, 0.44);
  background: rgba(120, 53, 15, 0.24);
}

html[data-theme="dark"] .ufh-loop-facts div {
  background: rgba(15, 18, 24, 0.36);
}

html[data-theme="dark"] .ufh-loop-swatch {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 2px rgba(9, 12, 18, 0.35);
}

html[data-theme="dark"] .ghost-btn:not(:disabled):hover,
html[data-theme="dark"] .ghost-icon:not(:disabled):hover,
html[data-theme="dark"] .mode-tab:not(.active):not(:disabled):hover,
html[data-theme="dark"] .micro-tools button:not(:disabled):hover,
html[data-theme="dark"] .bottom-tools button:not(.active):not(:disabled):hover,
html[data-theme="dark"] .zoom-tools button:not(:disabled):hover,
html[data-theme="dark"] .view-tools button:not(.active):not(:disabled):hover,
html[data-theme="dark"] .project-picker:hover,
html[data-theme="dark"] .project-picker.active,
html[data-theme="dark"] .brand-menu-button:hover,
html[data-theme="dark"] .brand-menu-button.active,
html[data-theme="dark"] .brand-menu-mark:hover,
html[data-theme="dark"] .brand-menu-mark.active,
html[data-theme="dark"] .level-pill:hover,
html[data-theme="dark"] .project-settings-head button:hover,
html[data-theme="dark"] .history-popover-head button:hover,
html[data-theme="dark"] .export-popover-head button:hover,
html[data-theme="dark"] .product-library-head button:hover,
html[data-theme="dark"] .export-report-card:hover,
html[data-theme="dark"] .product-category-card:hover,
html[data-theme="dark"] .product-category-card.active,
html[data-theme="dark"] .product-subcategory-tabs button:hover,
html[data-theme="dark"] .product-subcategory-tabs button.active,
html[data-theme="dark"] .product-result-card:hover,
html[data-theme="dark"] .product-result-card.active,
html[data-theme="dark"] .tool-btn:not(.active):hover,
html[data-theme="dark"] .floor-row:not(.active):hover,
html[data-theme="dark"] .layer-row:hover {
  color: var(--text);
}

html[data-theme="dark"] .mode-tab.floor-plan-lock.unlocked:hover,
html[data-theme="dark"] .mode-tab.floor-plan-lock.locked:hover {
  color: white;
}

html[data-theme="dark"] .export-popover-head button {
  color: var(--muted);
}

html[data-theme="dark"] .product-library-head button {
  color: var(--muted);
}

html[data-theme="dark"] .export-report-card {
  border-color: rgba(239, 246, 255, 0.14);
  background: linear-gradient(145deg, rgba(42, 48, 60, 0.34), rgba(16, 19, 25, 0.16));
}

html[data-theme="dark"] .export-info-card:hover {
  border-color: rgba(239, 246, 255, 0.14);
  background: linear-gradient(145deg, rgba(42, 48, 60, 0.34), rgba(16, 19, 25, 0.16));
  box-shadow: var(--glass-edge), 0 10px 22px rgba(0, 0, 0, 0.055);
}

html[data-theme="dark"] .export-report-card.is-loading {
  border-color: var(--blue-border);
  background: linear-gradient(145deg, rgba(10, 132, 255, 0.26), rgba(20, 24, 32, 0.68));
}

html[data-theme="dark"] .drawing-export-selection-layer {
  background:
    radial-gradient(circle at 50% 10%, rgba(10, 132, 255, 0.18), transparent 38%),
    rgba(3, 7, 18, 0.68);
}

html[data-theme="dark"] .drawing-export-selection-dialog {
  border-color: rgba(239, 246, 255, 0.18);
  background: linear-gradient(145deg, rgba(25, 31, 43, 0.97), rgba(12, 16, 24, 0.95));
  box-shadow: var(--glass-edge), 0 34px 90px rgba(0, 0, 0, 0.54);
}

html[data-theme="dark"] .drawing-export-selection-head,
html[data-theme="dark"] .drawing-export-selection-footer {
  background: linear-gradient(145deg, rgba(39, 47, 63, 0.72), rgba(18, 23, 32, 0.70));
}

html[data-theme="dark"] .drawing-export-selection-toolbar,
html[data-theme="dark"] .drawing-export-selection-group > header {
  background: rgba(42, 52, 70, 0.52);
}

html[data-theme="dark"] .drawing-export-revision-panel {
  background:
    linear-gradient(135deg, rgba(10, 132, 255, 0.15), rgba(30, 41, 59, 0.34)),
    rgba(17, 22, 31, 0.66);
}

html[data-theme="dark"] .drawing-export-revision-field input,
html[data-theme="dark"] .drawing-export-revision-field select,
html[data-theme="dark"] .drawing-export-row-revision input {
  border-color: rgba(96, 165, 250, 0.36);
  background: rgba(15, 23, 42, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: var(--text);
}

html[data-theme="dark"] .drawing-export-revision-field input:hover,
html[data-theme="dark"] .drawing-export-revision-field select:hover,
html[data-theme="dark"] .drawing-export-row-revision input:hover {
  border-color: rgba(96, 165, 250, 0.58);
}

html[data-theme="dark"] .drawing-export-revision-field input:focus,
html[data-theme="dark"] .drawing-export-revision-field select:focus,
html[data-theme="dark"] .drawing-export-row-revision input:focus {
  border-color: var(--blue);
  background: rgba(15, 23, 42, 0.94);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

html[data-theme="dark"] .drawing-export-selection-group {
  background: rgba(17, 22, 31, 0.60);
}

html[data-theme="dark"] .drawing-export-selection-row:hover {
  background: rgba(59, 130, 246, 0.13);
}

html[data-theme="dark"] .drawing-export-selection-head > button,
html[data-theme="dark"] .drawing-export-selection-toolbar button {
  background: rgba(30, 41, 59, 0.72);
}

html[data-theme="dark"] .export-application-autofill {
  border-color: rgba(10, 132, 255, 0.28);
  background: linear-gradient(145deg, rgba(10, 132, 255, 0.16), rgba(20, 24, 32, 0.56));
  box-shadow: var(--glass-edge), 0 16px 34px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] .export-application-data-card,
html[data-theme="dark"] .export-application-video {
  border-color: rgba(239, 246, 255, 0.14);
  background: linear-gradient(145deg, rgba(42, 48, 60, 0.28), rgba(12, 15, 20, 0.22));
}

html[data-theme="dark"] .export-application-data-row {
  border-top-color: rgba(239, 246, 255, 0.12);
}

html[data-theme="dark"] .export-generation-overlay {
  background: transparent;
}

html[data-theme="dark"] .export-generation-card {
  border-color: rgba(239, 246, 255, 0.16);
  background: linear-gradient(145deg, rgba(31, 36, 48, 0.92), rgba(14, 17, 23, 0.86));
  box-shadow: var(--glass-edge), 0 26px 58px rgba(0, 0, 0, 0.36);
}

html[data-theme="dark"] .export-generation-progress {
  border-color: rgba(96, 165, 250, 0.28);
  background: rgba(96, 165, 250, 0.12);
}

html[data-theme="dark"] .product-compatible-with small {
  color: #8ab4ff;
}

html[data-theme="dark"] .product-compatible-with i {
  border-color: rgba(96, 165, 250, 0.24);
  background: rgba(59, 130, 246, 0.14);
  color: #bfdbfe;
}

html[data-theme="dark"] .product-compatible-card,
html[data-theme="dark"] .product-compatible-card-group h4 small {
  border-color: rgba(239, 246, 255, 0.14);
  background: linear-gradient(145deg, rgba(42, 48, 60, 0.34), rgba(16, 19, 25, 0.16));
}

html[data-theme="dark"] .product-compatible-card strong,
html[data-theme="dark"] .product-compatible-card-group h4 {
  color: var(--text);
}

html[data-theme="dark"] .product-compatible-card small,
html[data-theme="dark"] .product-compatible-card em {
  color: var(--muted);
}

html[data-theme="dark"] .product-category-card,
html[data-theme="dark"] .product-library-title-card,
html[data-theme="dark"] .product-subcategory-tabs button,
html[data-theme="dark"] .product-model-group-head,
html[data-theme="dark"] .product-result-card,
html[data-theme="dark"] .product-card-metrics i,
html[data-theme="dark"] .product-detail-facts div,
html[data-theme="dark"] .product-compatibility-row,
html[data-theme="dark"] .radiator-model-finder,
html[data-theme="dark"] .radiator-model-info,
html[data-theme="dark"] .heat-pump-performance-panel,
html[data-theme="dark"] .heat-pump-performance-controls label,
html[data-theme="dark"] .heat-pump-performance-setpoint,
html[data-theme="dark"] .heat-pump-performance-metrics span,
html[data-theme="dark"] .radiator-model-results button {
  border-color: rgba(239, 246, 255, 0.14);
  background: linear-gradient(145deg, rgba(42, 48, 60, 0.34), rgba(16, 19, 25, 0.16));
}

html[data-theme="dark"] .heat-pump-chart-bg {
  fill: rgba(15, 23, 42, 0.48);
  stroke: rgba(226, 232, 240, 0.15);
}

html[data-theme="dark"] .heat-pump-chart-marker {
  stroke: #0f172a;
}

html[data-theme="dark"] .product-compatibility-row strong,
html[data-theme="dark"] .product-compatibility-row small {
  color: rgba(248, 250, 252, 0.92);
}

html[data-theme="dark"] .product-document-link {
  border-color: rgba(239, 246, 255, 0.14);
  background: linear-gradient(145deg, rgba(42, 48, 60, 0.36), rgba(16, 19, 25, 0.18));
  color: rgba(248, 250, 252, 0.92);
}

html[data-theme="dark"] .product-document-link:hover {
  border-color: rgba(96, 165, 250, 0.44);
  background: rgba(96, 165, 250, 0.16);
}

html[data-theme="dark"] .product-document-link.featured {
  border-color: rgba(96, 165, 250, 0.38);
  background: linear-gradient(145deg, rgba(0, 102, 255, 0.18), rgba(16, 19, 25, 0.22));
}

html[data-theme="dark"] .product-document-link small,
html[data-theme="dark"] .product-document-group h4 {
  color: rgba(203, 213, 225, 0.72);
}

html[data-theme="dark"] .product-compatibility-group h4,
html[data-theme="dark"] .product-compatibility-row span,
html[data-theme="dark"] .product-compatibility-row em {
  color: rgba(203, 213, 225, 0.72);
}

html[data-theme="dark"] .radiator-model-results button:hover,
html[data-theme="dark"] .radiator-model-results button.active {
  border-color: var(--blue-border);
  background: var(--blue-glass);
  color: #dbeafe;
}

html[data-theme="dark"] .product-range-cta {
  border-color: rgba(10, 132, 255, 0.58);
  background: linear-gradient(145deg, rgba(10, 132, 255, 0.92), rgba(0, 102, 214, 0.82));
  color: white;
  box-shadow: 0 12px 24px rgba(10, 132, 255, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

html[data-theme="dark"] .product-photo-image {
  border-color: rgba(239, 246, 255, 0.20);
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.08), transparent 48%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(15, 23, 42, 0.03));
  color: var(--text-primary);
}

html[data-theme="dark"] .product-range-card .product-photo-image {
  border-color: rgba(239, 246, 255, 0.20);
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.08), transparent 50%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(15, 23, 42, 0.03));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 12px 24px rgba(0, 0, 0, 0.16);
}

html[data-theme="dark"] .product-photo-image > img:not(.product-brand-logo) {
  mix-blend-mode: normal;
  filter: saturate(1.08) contrast(1.05) drop-shadow(0 9px 16px rgba(0, 0, 0, 0.18));
}

html[data-theme="dark"] .schematic-product-visual > img {
  mix-blend-mode: normal;
}

html[data-theme="dark"] .product-search input,
html[data-theme="dark"] .product-filter-grid input,
html[data-theme="dark"] .product-filter-grid select,
html[data-theme="dark"] .radiator-model-search input {
  border-color: rgba(239, 246, 255, 0.16);
  background: var(--input-glass);
  color: var(--text);
}

.hero-result span {
  display: block;
  font-size: 12px;
  font-weight: 760;
  color: #334155;
}

.hero-result strong {
  display: block;
  margin-top: 8px;
  color: #0f172a;
  font-size: 29px;
  line-height: 1;
  letter-spacing: 0;
}

.hero-result em {
  display: block;
  margin-top: 7px;
  color: #334155;
  font-size: 14px;
  font-style: normal;
  font-weight: 750;
}

.heat-loss-result strong,
.heat-loss-breakdown dl .total,
.heat-loss-breakdown dl .total dd {
  color: var(--heat-loss);
}

.heat-gain-result strong,
.heat-gain-breakdown dl .total,
.heat-gain-breakdown dl .total dd {
  color: var(--heat-gain);
}

dl {
  margin: 0;
}

dl div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 23px;
  color: #475569;
  font-size: 11px;
}

dt {
  font-weight: 650;
}

dd {
  margin: 0;
  color: #172033;
  font-weight: 740;
  text-align: right;
}

dl .total {
  margin-top: 4px;
  padding-top: 5px;
  border-top: 1px solid var(--line);
  color: #172033;
}

dl .subtotal {
  margin-top: 3px;
  padding-top: 4px;
  border-top: 1px dashed rgba(148, 163, 184, 0.55);
  color: #334155;
}

.breakdown-list {
  display: grid;
  gap: 8px;
}

.breakdown-list .breakdown-row {
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: var(--radius);
  background: var(--tile-glass);
  box-shadow: var(--glass-edge);
}

.breakdown-list .breakdown-row dt {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.breakdown-list .breakdown-row dt span:first-child {
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.breakdown-list .breakdown-row small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 670;
  line-height: 1.25;
}

.breakdown-list .breakdown-row dd {
  min-width: 52px;
  display: grid;
  gap: 2px;
  font-size: 12px;
  font-weight: 840;
  text-align: right;
}

.breakdown-list .breakdown-row dd .energy-cost {
  color: var(--muted);
  font-size: 10px;
  font-weight: 780;
  line-height: 1.15;
}

.breakdown-meter {
  width: 100%;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.16);
}

.breakdown-meter span {
  display: block;
  width: var(--bar, 0%);
  height: 100%;
  border-radius: inherit;
  background: currentColor;
  opacity: 0.82;
}

.heat-loss-breakdown .breakdown-meter {
  color: var(--heat-loss);
}

.heat-gain-breakdown .breakdown-meter {
  color: var(--heat-gain);
}

.annual-energy-card .result-load-summary strong {
  color: #172033;
}

.annual-energy-list .energy-row.loss .breakdown-meter,
.annual-energy-list .energy-row.loss dd {
  color: var(--heat-loss);
}

.annual-energy-list .energy-row.gain .breakdown-meter,
.annual-energy-list .energy-row.gain dd {
  color: var(--heat-gain);
}

.mcs031-star-card,
.annual-energy-list .energy-row,
.annual-energy-list .total {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(10, 132, 255, 0.22);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(239, 246, 255, 0.28));
  box-shadow: var(--glass-edge), 0 8px 18px rgba(15, 23, 42, 0.055);
}

.annual-energy-list .energy-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.annual-energy-list .fuel-use-row dt {
  gap: 5px;
}

.annual-energy-bar-legend {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(10, 132, 255, 0.2);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(239, 246, 255, 0.42);
  font-size: 9px;
  line-height: 1.3;
}

.annual-energy-bar-legend strong {
  color: var(--text);
  font-size: 10px;
  font-weight: 850;
}

.annual-energy-useful-demand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.annual-energy-useful-demand strong {
  color: var(--text);
  font-size: 9px;
  font-weight: 820;
  white-space: nowrap;
}

.annual-energy-purchased-meter {
  position: relative;
  display: block;
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.13);
}

.annual-energy-purchased-meter > span {
  display: block;
  width: var(--purchased-bar, 0%);
  height: 100%;
  border-radius: inherit;
  background: currentColor;
  opacity: 0.84;
}

.annual-energy-list .fuel-use-row.loss .annual-energy-purchased-meter {
  color: var(--heat-loss);
}

.annual-energy-list .fuel-use-row.gain .annual-energy-purchased-meter {
  color: var(--heat-gain);
}

.annual-energy-cost-only {
  width: fit-content;
  padding: 3px 6px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(100, 116, 139, 0.1);
  font-size: 8px !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.annual-energy-list .total {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0;
  border-top: 0;
}

.mcs031-star-card span {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mcs031-star-card small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 820;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.mcs031-star-card strong {
  color: var(--blue);
  font-size: 17px;
  line-height: 1;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.mcs031-stars {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

.mcs031-star {
  color: var(--blue);
  font-size: 15px;
  line-height: 1;
}

.mcs031-star.is-empty {
  color: transparent;
  -webkit-text-stroke: 1px rgba(10, 132, 255, 0.58);
  text-stroke: 1px rgba(10, 132, 255, 0.58);
}

.mcs031-star-card em {
  color: #334155;
  font-size: 11px;
  font-style: normal;
  font-weight: 720;
}

.annual-carbon-summary-card,
.annual-carbon-comparison {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(22, 163, 74, 0.22);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(240, 253, 244, 0.32));
  box-shadow: var(--glass-edge), 0 8px 18px rgba(15, 23, 42, 0.055);
}

.annual-carbon-summary-card span,
.annual-carbon-comparison-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.annual-carbon-summary-card small,
.annual-carbon-comparison-head span,
.annual-carbon-row-main small,
.annual-carbon-row-values small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 820;
}

.annual-carbon-summary-card span small,
.annual-carbon-comparison-head span {
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.annual-carbon-summary-card strong {
  color: #16a34a;
  font-size: 18px;
  line-height: 1;
  white-space: nowrap;
}

.annual-carbon-summary-card em {
  color: #334155;
  font-size: 11px;
  font-style: normal;
  font-weight: 760;
}

.annual-carbon-comparison {
  border-color: rgba(10, 132, 255, 0.18);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(239, 246, 255, 0.28));
}

.annual-fuel-comparison-card .annual-carbon-comparison {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.annual-fuel-comparison-card .result-load-body {
  padding-top: 12px;
}

.annual-carbon-comparison-head strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 920;
}

.annual-carbon-comparison-row {
  --carbon-color: #94a3b8;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 8px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.54);
  overflow: hidden;
}

.annual-carbon-comparison-row.selected {
  --carbon-color: var(--blue);
  border-color: rgba(10, 132, 255, 0.34);
}

.annual-carbon-comparison-row.lowest {
  --carbon-color: #16a34a;
  border-color: rgba(22, 163, 74, 0.34);
}

.annual-carbon-row-main,
.annual-carbon-row-values {
  min-width: 0;
  position: relative;
  z-index: 1;
}

.annual-carbon-row-main span {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.annual-carbon-row-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.annual-carbon-row-values {
  text-align: right;
}

.annual-carbon-row-values strong {
  display: block;
  color: var(--carbon-color);
  font-size: 12px;
  line-height: 1.15;
  white-space: nowrap;
}

.annual-carbon-row-values small {
  display: block;
  white-space: nowrap;
}

.annual-carbon-bar {
  grid-column: 1 / -1;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.13);
}

.annual-carbon-bar span {
  display: block;
  width: var(--bar, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--carbon-color);
}

.breakdown-list .breakdown-row.negative .breakdown-meter,
.breakdown-list .breakdown-row.negative dd {
  color: var(--muted);
}

.breakdown-list .total {
  min-height: 30px;
}

.warning-card {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: 24px 1fr;
  grid-template-rows: auto auto;
  column-gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 1px solid #f4bd63;
  border-radius: var(--radius);
  background: #fff7ed;
  color: #7c2d12;
  text-align: left;
}

.warning-card span {
  grid-row: 1 / span 2;
  font-size: 16px;
}

.warning-card strong {
  font-size: 12px;
}

.warning-card small {
  color: #9a3412;
  font-size: 10px;
}

.bottombar {
  justify-content: center;
  gap: 28px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 0;
}

.bottom-tools button.active,
.view-tools button.active {
  color: #0057b8;
  border-color: var(--blue-border);
  background: var(--blue-soft);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.54), 0 6px 16px rgba(0, 122, 255, 0.10);
}

.bottom-tools .history-action {
  min-width: 76px;
  border-color: var(--blue-border);
  background: linear-gradient(180deg, rgba(0, 122, 255, 0.14), rgba(0, 122, 255, 0.08));
  color: #0057b8;
  font-weight: 820;
  box-shadow: 0 6px 16px rgba(0, 122, 255, 0.12);
}

.bottom-tools .history-action.active {
  border-color: rgba(0, 98, 204, 0.62);
  background: linear-gradient(180deg, rgba(0, 122, 255, 0.24), rgba(0, 122, 255, 0.14));
  color: #004a9f;
  box-shadow: 0 10px 22px rgba(0, 122, 255, 0.18);
}

.bottom-tools .history-action svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.2;
}

.bottom-tools .history-action:not(:disabled):hover {
  border-color: rgba(0, 98, 204, 0.58);
  background: linear-gradient(180deg, rgba(0, 122, 255, 0.20), rgba(0, 122, 255, 0.12));
  color: #004a9f;
  box-shadow: 0 9px 20px rgba(0, 122, 255, 0.16);
  transform: translateY(-1px);
}

.bottom-tools .history-action:disabled {
  border-color: #dbe4ef;
  background: rgba(255, 255, 255, 0.52);
  color: #94a3b8;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.76;
  transform: none;
}

.bottom-tools button.active:hover,
.view-tools button.active:hover,
.tool-btn.active:hover,
.floor-row.active:hover {
  border-color: rgba(0, 98, 204, 0.58);
  background: linear-gradient(180deg, rgba(0, 122, 255, 0.18), rgba(0, 122, 255, 0.10));
  color: #004a9f;
  box-shadow: 0 8px 20px rgba(0, 122, 255, 0.14);
  transform: translateY(-1px);
}

.zoom-tools strong {
  min-width: 48px;
  height: 34px;
  display: grid;
  place-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.66);
  color: #334155;
  font-size: 12px;
}

html[data-theme="dark"] .system-label,
html[data-theme="dark"] .rail-toggle,
html[data-theme="dark"] .floor-row svg,
html[data-theme="dark"] .layer-row svg,
html[data-theme="dark"] .floor-row strong,
html[data-theme="dark"] .hero-result strong,
html[data-theme="dark"] dd,
html[data-theme="dark"] dl .total,
html[data-theme="dark"] .zoom-tools strong {
  color: var(--text);
}

html[data-theme="dark"] .hero-result span,
html[data-theme="dark"] .hero-result em,
html[data-theme="dark"] .result-load-title,
html[data-theme="dark"] .result-load-summary em,
html[data-theme="dark"] dl div,
html[data-theme="dark"] dl .subtotal,
html[data-theme="dark"] .warning-card small {
  color: var(--muted);
}

html[data-theme="dark"] .result-load-head:hover {
  background: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .result-geometry-card .result-load-summary strong {
  color: var(--text);
}

html[data-theme="dark"] .annual-energy-card .result-load-summary strong {
  color: var(--text);
}

html[data-theme="dark"] .annual-fuel-comparison-card .result-load-summary strong {
  color: var(--text);
}

html[data-theme="dark"] .mcs031-star-card,
html[data-theme="dark"] .annual-energy-list .energy-row,
html[data-theme="dark"] .annual-energy-list .total {
  border-color: rgba(10, 132, 255, 0.26);
  background: linear-gradient(145deg, rgba(42, 43, 48, 0.34), rgba(8, 9, 11, 0.12));
  box-shadow: var(--glass-edge), 0 10px 22px rgba(0, 0, 0, 0.18);
}

html[data-theme="dark"] .annual-energy-bar-legend {
  border-color: rgba(96, 165, 250, 0.22);
  background: rgba(15, 23, 42, 0.32);
}

html[data-theme="dark"] .annual-energy-cost-only {
  background: rgba(148, 163, 184, 0.12);
}

html[data-theme="dark"] .mcs031-star.is-empty {
  -webkit-text-stroke-color: rgba(96, 165, 250, 0.62);
  text-stroke-color: rgba(96, 165, 250, 0.62);
}

html[data-theme="dark"] .mcs031-star-card em {
  color: var(--muted);
}

html[data-theme="dark"] .annual-carbon-summary-card,
html[data-theme="dark"] .annual-carbon-comparison {
  border-color: rgba(10, 132, 255, 0.24);
  background: linear-gradient(145deg, rgba(42, 43, 48, 0.34), rgba(8, 9, 11, 0.12));
  box-shadow: var(--glass-edge), 0 10px 22px rgba(0, 0, 0, 0.18);
}

html[data-theme="dark"] .annual-fuel-comparison-card .annual-carbon-comparison {
  border: 0;
  background: transparent;
  box-shadow: none;
}

html[data-theme="dark"] .annual-carbon-summary-card em {
  color: var(--muted);
}

html[data-theme="dark"] .annual-carbon-comparison-row {
  background: rgba(255, 255, 255, 0.045);
}

html[data-theme="dark"] .heat-loss-result strong,
html[data-theme="dark"] .heat-loss-breakdown dl .total,
html[data-theme="dark"] .heat-loss-breakdown dl .total dd {
  color: var(--heat-loss);
}

html[data-theme="dark"] .heat-gain-result strong,
html[data-theme="dark"] .heat-gain-breakdown dl .total,
html[data-theme="dark"] .heat-gain-breakdown dl .total dd {
  color: var(--heat-gain);
}

html[data-theme="dark"] .system-label,
html[data-theme="dark"] .zoom-tools strong {
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .warning-card {
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(120, 53, 15, 0.28);
  color: #fed7aa;
}

html[data-theme="dark"] .bottom-tools button.active,
html[data-theme="dark"] .view-tools button.active,
html[data-theme="dark"] .bottom-tools .history-action {
  color: #dbeafe;
  border-color: var(--blue-border);
  background: linear-gradient(180deg, rgba(10, 132, 255, 0.28), rgba(10, 132, 255, 0.14));
  box-shadow: var(--glass-edge), 0 8px 20px rgba(10, 132, 255, 0.18);
}

html[data-theme="dark"] .bottom-tools .history-action:disabled {
  border-color: rgba(239, 246, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(226, 232, 240, 0.46);
}

html[data-theme="dark"] .bottom-tools .history-action:not(:disabled):hover,
html[data-theme="dark"] .bottom-tools button.active:hover,
html[data-theme="dark"] .view-tools button.active:hover,
html[data-theme="dark"] .tool-btn.active:hover,
html[data-theme="dark"] .floor-row.active:hover {
  color: #ffffff;
  border-color: rgba(64, 156, 255, 0.72);
  background: linear-gradient(180deg, rgba(10, 132, 255, 0.36), rgba(10, 132, 255, 0.20));
  box-shadow: var(--glass-edge), 0 10px 24px rgba(10, 132, 255, 0.24);
}

.tool-btn[data-tool="autoPipe"].active,
.tool-btn[data-tool="autoPipe"].active:hover,
html[data-theme="dark"] .tool-btn[data-tool="autoPipe"].active,
html[data-theme="dark"] .tool-btn[data-tool="autoPipe"].active:hover {
  border-color: rgba(168, 85, 247, 0.78);
  color: #ffffff;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)),
    linear-gradient(120deg, #0a84ff, #2563eb, #7c3aed, #a855f7);
  background-size: 100% 100%, 260% 260%;
  animation: autoPipeGradientFlow 5s ease-in-out infinite;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34), 0 10px 22px rgba(79, 70, 229, 0.28);
}

@media (prefers-reduced-motion: reduce) {
  .tool-btn[data-tool="autoPipe"],
  .tool-btn[data-tool="autoPipe"].active,
  .tool-btn[data-tool="autoPipe"].active:hover,
  html[data-theme="dark"] .tool-btn[data-tool="autoPipe"].active,
  html[data-theme="dark"] .tool-btn[data-tool="autoPipe"].active:hover {
    animation: none;
  }
}

@media (max-width: 820px) {
  .history-popover {
    bottom: calc(66px + env(safe-area-inset-bottom, 0px));
    max-height: calc(100dvh - 96px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    overflow: hidden;
  }

  .change-log-list {
    max-height: calc(100dvh - 182px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  }
}

.zoom-tools button {
  min-width: 38px;
}

.view-tools select {
  padding-right: 22px;
}

.heat-map-mode-menu {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 3px 0 10px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.54);
  box-shadow: var(--glass-edge), 0 6px 16px rgba(15, 23, 42, 0.05);
}

.heat-map-mode-menu.active {
  border-color: var(--blue-border);
  background: var(--blue-soft);
}

.heat-map-mode-menu span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 720;
  white-space: nowrap;
}

.heat-map-mode-menu svg {
  width: 16px;
  height: 16px;
}

.view-tools .heat-map-mode-menu select {
  height: 28px;
  min-width: 184px;
  padding: 0 24px 0 9px;
  border: 0;
  border-radius: 7px;
  background-color: rgba(255, 255, 255, 0.74);
  box-shadow: none;
}

#heatMapModeSelect,
.view-tools .heat-map-mode-menu #heatMapModeSelect {
  width: clamp(210px, 19vw, 260px);
  min-width: 210px;
  max-width: 260px;
}

.view-tools .three-floor-view-menu select {
  min-width: 132px;
}

html[data-theme="dark"] .heat-map-mode-menu {
  border-color: rgba(191, 219, 254, 0.16);
  background: rgba(15, 23, 42, 0.44);
}

html[data-theme="dark"] .heat-map-mode-menu.active {
  border-color: var(--blue-border);
  background: linear-gradient(180deg, rgba(10, 132, 255, 0.22), rgba(10, 132, 255, 0.11));
}

html[data-theme="dark"] .heat-map-mode-menu span {
  color: #e2e8f0;
}

html[data-theme="dark"] .view-tools .heat-map-mode-menu select {
  background-color: rgba(15, 23, 42, 0.68);
  color: #f8fafc;
}

.pulse-results .hero-result {
  animation: resultPulse 320ms ease;
}

.topbar-profile-button {
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 190px;
  padding: 0 10px 0 5px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 999px;
  background: var(--button-glass);
  color: var(--text);
  font-size: 12px;
  font-weight: 760;
  box-shadow: var(--glass-edge), 0 8px 20px rgba(0, 0, 0, 0.06);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.topbar-profile-button:hover,
.topbar-profile-button.active,
.dashboard-top-button.active {
  border-color: var(--blue-border);
  background: var(--control-hover-bg);
  color: var(--blue);
  box-shadow: var(--control-hover-shadow);
}

.topbar-profile-button > span:not(.topbar-profile-chevron) {
  min-width: 0;
  max-width: 104px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-profile-chevron {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.topbar-profile-avatar,
.dashboard-profile-avatar,
.account-profile-avatar {
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--blue-border);
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 900;
  box-shadow: var(--glass-edge);
}

.topbar-profile-avatar {
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.dashboard-profile-avatar {
  width: 48px;
  height: 48px;
  font-size: 15px;
}

.account-profile-avatar {
  width: 82px;
  height: 82px;
  font-size: 24px;
}

.topbar-profile-avatar img,
.dashboard-profile-avatar img,
.account-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard-shell {
  grid-template-rows: 58px minmax(0, 1fr);
}

.dashboard-workspace {
  min-height: 0;
  overflow: auto;
  padding: 28px;
}

.dashboard-hero {
  min-height: 190px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.08));
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.dashboard-hero span,
.dashboard-tile-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dashboard-hero h1 {
  max-width: 720px;
  margin: 6px 0;
  color: var(--text);
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.02;
}

.dashboard-hero p,
.dashboard-tile p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
}

.dashboard-start-button {
  height: 44px;
  padding: 0 20px;
  font-size: 14px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.dashboard-tile {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: var(--tile-glass-strong);
  box-shadow: var(--glass-edge), 0 16px 36px rgba(0, 0, 0, 0.08);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.dashboard-tile-large {
  grid-column: span 2;
}

.dashboard-tile-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.dashboard-tile-head strong {
  color: var(--text);
  font-size: 22px;
  font-weight: 900;
  text-align: right;
}

.dashboard-project-list {
  display: grid;
  gap: 8px;
}

.dashboard-project-row {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--button-glass);
  color: var(--text);
  text-align: left;
  box-shadow: var(--glass-edge);
}

.dashboard-project-row span,
.dashboard-account-row span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.dashboard-project-row strong,
.dashboard-account-row strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 840;
}

.dashboard-project-row small,
.dashboard-account-row small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.dashboard-project-row em {
  color: var(--blue);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.dashboard-empty-state {
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.dashboard-chip-row,
.dashboard-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.dashboard-chip-row span {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass-subtle);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.dashboard-account-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dashboard-summary-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.dashboard-summary-list div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.dashboard-summary-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.dashboard-summary-list dd {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.dashboard-summary-list dd.danger {
  color: var(--heat-loss);
}

.dashboard-summary-list dd.accent {
  color: var(--heat-gain);
}

.dashboard-secondary-action {
  width: fit-content;
  margin-top: auto;
}

.account-menu-backdrop {
  position: fixed;
  z-index: 16;
  inset: 0;
  pointer-events: none;
}

.account-menu-popover {
  position: absolute;
  top: 70px;
  right: 16px;
  width: min(900px, calc(100vw - 32px));
  max-height: calc(100vh - 92px);
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  background: var(--glass-strong);
  box-shadow: var(--shadow);
  pointer-events: auto;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.account-menu-head,
.account-menu-actions,
.product-submission-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.account-menu-head {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.account-menu-head div,
.account-section-title,
.product-submission-head div {
  display: grid;
  gap: 3px;
}

.account-menu-head strong,
.account-menu-section h3,
.product-submission-head strong {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.account-menu-head span,
.account-section-title span,
.product-submission-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 680;
}

.account-menu-head button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--muted);
  font-size: 20px;
}

.account-menu-body {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  padding-top: 14px;
}

.account-profile-card {
  align-self: start;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 16px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--tile-glass);
  text-align: center;
}

.account-profile-card strong {
  max-width: 100%;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 900;
}

.account-profile-card span,
.account-profile-card em {
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-style: normal;
  font-weight: 760;
}

.account-menu-main {
  display: grid;
  gap: 12px;
}

.account-menu-section,
.product-submission-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--tile-glass);
}

.account-menu-grid,
.product-submission-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.settings-field textarea {
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--input-glass);
  color: var(--text);
  padding: 8px;
  font-size: 12px;
  font-weight: 640;
  resize: vertical;
  box-shadow: var(--glass-edge), 0 1px 2px rgba(0, 0, 0, 0.035);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.account-image-control {
  display: grid;
  gap: 6px;
  align-content: end;
  color: #354259;
  font-size: 11px;
  font-weight: 680;
}

.account-image-control > div {
  display: flex;
  gap: 7px;
}

.settings-mini-btn.disabled {
  pointer-events: none;
  opacity: 0.45;
}

.account-password-button {
  align-self: end;
  height: 31px;
}

.account-message {
  align-self: center;
  margin-left: auto;
  color: var(--green);
  font-size: 11px;
  font-weight: 760;
}

.account-message.error {
  color: var(--red);
}

.product-library-head-actions {
  display: flex !important;
  align-items: center;
  gap: 8px;
}

.product-library-head-actions #toggleProductSubmissions {
  width: auto;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 850;
}

.product-library-head-actions #toggleProductSubmissions.active {
  border-color: var(--blue-border);
  background: var(--blue-soft);
  color: var(--blue);
}

.product-submission-head em {
  color: var(--green);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.product-submission-form .primary-mini,
.product-submission-form .settings-field.full {
  grid-column: 1 / -1;
}

.product-submission-list {
  display: grid;
  gap: 8px;
}

.product-submission-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--button-glass);
}

.product-submission-card span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.product-submission-card strong,
.product-submission-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-submission-card strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
}

.product-submission-card small,
.product-submission-card em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 720;
}

.product-submission-card small.product-submission-file-notice {
  overflow: visible;
  color: #92400e;
  line-height: 1.3;
  text-overflow: clip;
  white-space: normal;
}

html[data-theme="dark"] .product-submission-card small.product-submission-file-notice {
  color: #fcd34d;
}

.product-submission-card.status-approved em {
  color: var(--green);
}

.product-submission-card.status-rejected em {
  color: var(--red);
}

html[data-theme="dark"] .dashboard-hero,
html[data-theme="dark"] .dashboard-tile,
html[data-theme="dark"] .account-menu-popover,
html[data-theme="dark"] .account-profile-card,
html[data-theme="dark"] .account-menu-section,
html[data-theme="dark"] .product-submission-panel,
html[data-theme="dark"] .product-submission-card {
  border-color: rgba(239, 246, 255, 0.16);
  background: linear-gradient(145deg, rgba(38, 39, 44, 0.42), rgba(8, 9, 11, 0.16));
}

html[data-theme="dark"] .account-image-control,
html[data-theme="dark"] .settings-field {
  color: #dbe4ef;
}

@keyframes resultPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(75, 85, 99, 0.3);
  }
  100% {
    box-shadow: 0 0 0 8px rgba(75, 85, 99, 0);
  }
}

.dashboard-top-button.active,
.topbar-profile-button.active {
  border-color: rgba(0, 113, 227, 0.38);
  color: var(--blue);
  background: rgba(0, 113, 227, 0.1);
}

.topbar-profile-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 38px;
  min-width: 0;
  padding: 0 10px 0 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: var(--button-glass);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), var(--button-shadow);
  font-weight: 800;
  cursor: pointer;
}

.dashboard-role-preview-control {
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0 7px 0 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--button-glass);
  box-shadow: var(--theme-control-shadow);
  color: var(--muted);
  font-size: 11px;
  font-weight: 860;
  white-space: nowrap;
}

.dashboard-role-preview-control select {
  min-width: 118px;
  height: 28px;
  padding: 0 28px 0 10px;
  border: 1px solid rgba(0, 113, 227, 0.24);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  outline: none;
}

.dashboard-role-preview-control select:focus {
  border-color: var(--blue-border);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12);
}

.topbar-profile-button small {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-profile-avatar,
.dashboard-profile-avatar,
.account-profile-avatar {
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(0, 113, 227, 0.24);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.18), rgba(255, 255, 255, 0.54));
  color: var(--blue);
  font-weight: 900;
}

.topbar-profile-avatar {
  width: 28px;
  height: 28px;
  font-size: 12px;
}

.dashboard-profile-avatar,
.account-profile-avatar {
  width: 54px;
  height: 54px;
  font-size: 18px;
}

.account-profile-avatar {
  width: 74px;
  height: 74px;
  font-size: 22px;
}

.topbar-profile-avatar img,
.dashboard-profile-avatar img,
.account-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.studio-shell.dashboard-shell {
  grid-template-rows: 58px minmax(0, 1fr);
}

.studio-shell.dashboard-shell.dashboard-quick-tool-shell {
  grid-template-rows: minmax(0, 1fr);
}

.dashboard-workspace {
  height: 100%;
  min-height: 0;
  overflow: auto;
  padding: 14px;
  background:
    radial-gradient(circle at 12% 4%, rgba(0, 113, 227, 0.08), transparent 32%),
    radial-gradient(circle at 82% 16%, rgba(148, 163, 184, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(241, 245, 249, 0.7));
  scrollbar-width: none;
}

.dashboard-workspace::-webkit-scrollbar {
  display: none;
}

.dashboard-unlock-transition {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 58%, rgba(0, 113, 227, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(239, 246, 255, 0.38));
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  animation: dashboardUnlockFade 0.96s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.dashboard-unlock-transition::before {
  content: "";
  position: absolute;
  inset: -8%;
  background:
    linear-gradient(120deg, transparent 0 18%, rgba(255, 255, 255, 0.52) 24%, transparent 34% 100%),
    radial-gradient(circle at 52% 64%, rgba(0, 113, 227, 0.18), transparent 32%);
  opacity: 0.9;
  transform: translateY(0) scale(1);
  animation: dashboardUnlockLift 0.96s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.dashboard-unlock-sheet {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(460px, 78vw);
  min-height: 330px;
  place-items: center;
  gap: 22px;
  padding: 36px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76), 0 28px 90px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  animation: dashboardUnlockSheet 0.96s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.dashboard-unlock-logo .brand-logo-wordmark {
  width: min(260px, 62vw);
  height: 62px;
}

.dashboard-unlock-logo .brand-logo-wordmark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dashboard-unlock-icons {
  display: grid;
  grid-template-columns: repeat(4, 40px);
  gap: 14px;
}

.dashboard-unlock-icons span {
  display: block;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 13px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(226, 232, 240, 0.42)),
    radial-gradient(circle at 28% 24%, rgba(0, 113, 227, 0.34), transparent 45%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 10px 24px rgba(0, 113, 227, 0.14);
  opacity: 0;
  transform: translateY(18px) scale(0.82);
  animation: dashboardUnlockIconPop 0.54s cubic-bezier(0.18, 1.35, 0.42, 1) forwards;
  animation-delay: calc(var(--unlock-index) * 26ms);
}

.dashboard-unlock-glint {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0 38%, rgba(255, 255, 255, 0.62) 48%, transparent 60% 100%);
  transform: translateX(-100%);
  opacity: 0.7;
  animation: dashboardUnlockGlint 0.74s ease-out forwards;
}

html[data-theme="dark"] .dashboard-unlock-transition {
  background:
    radial-gradient(circle at 50% 58%, rgba(0, 113, 227, 0.22), transparent 36%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.78), rgba(15, 23, 42, 0.56));
}

html[data-theme="dark"] .dashboard-unlock-transition::before {
  background:
    linear-gradient(120deg, transparent 0 18%, rgba(59, 130, 246, 0.18) 24%, transparent 34% 100%),
    radial-gradient(circle at 52% 64%, rgba(148, 163, 184, 0.16), transparent 34%);
}

html[data-theme="dark"] .dashboard-unlock-sheet {
  border-color: rgba(148, 163, 184, 0.32);
  background: rgba(15, 23, 42, 0.52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 34px 100px rgba(0, 0, 0, 0.42);
}

html[data-theme="dark"] .dashboard-unlock-icons span {
  border-color: rgba(148, 163, 184, 0.24);
  background:
    linear-gradient(145deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.72)),
    radial-gradient(circle at 28% 24%, rgba(0, 113, 227, 0.48), transparent 45%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 12px 26px rgba(0, 113, 227, 0.20);
}

@keyframes dashboardUnlockFade {
  0%,
  66% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes dashboardUnlockLift {
  0% {
    opacity: 0.94;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-18%) scale(1.08);
  }
}

@keyframes dashboardUnlockSheet {
  0% {
    opacity: 0;
    transform: translateY(34px) scale(0.92);
  }
  36% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-42px) scale(1.08);
  }
}

@keyframes dashboardUnlockIconPop {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.82);
  }
  72% {
    opacity: 1;
    transform: translateY(-2px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes dashboardUnlockGlint {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(115%);
  }
}

.dashboard-build-transition {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  overflow: hidden;
  pointer-events: none;
  background:
    linear-gradient(rgba(0, 113, 227, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 113, 227, 0.06) 1px, transparent 1px),
    radial-gradient(circle at 50% 56%, rgba(0, 113, 227, 0.20), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(239, 246, 255, 0.48));
  background-size: 42px 42px, 42px 42px, auto, auto;
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  animation: dashboardBuildFade 1.28s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.dashboard-build-stage {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(560px, 84vw);
  min-height: 430px;
  place-items: center;
  gap: 10px;
  transform-style: preserve-3d;
  perspective: 920px;
}

.dashboard-build-logo {
  position: absolute;
  top: 18px;
  left: 50%;
  z-index: 2;
  transform: translateX(-50%);
  opacity: 0;
  animation: dashboardBuildLogo 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.18s forwards;
}

.dashboard-build-logo .brand-logo-wordmark {
  width: min(220px, 58vw);
  height: 54px;
}

.dashboard-build-logo .brand-logo-wordmark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dashboard-build-model {
  width: min(500px, 82vw);
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 28px 46px rgba(15, 23, 42, 0.20));
  transform: rotateX(4deg) translateY(18px) scale(0.98);
}

.dashboard-build-blueprint {
  fill: none;
  stroke: rgba(0, 113, 227, 0.28);
  stroke-dasharray: 8 8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  opacity: 0;
  animation: dashboardBuildBlueprint 1.1s ease-out forwards;
}

.dashboard-build-floor,
.dashboard-build-wall,
.dashboard-build-column-set,
.dashboard-build-core,
.dashboard-build-roof {
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  animation: dashboardBuildPiece 0.72s cubic-bezier(0.18, 1.2, 0.34, 1) forwards;
  animation-delay: var(--build-delay, 0s);
}

.dashboard-build-floor polygon,
.dashboard-build-roof polygon {
  fill: rgba(255, 255, 255, 0.60);
  stroke: rgba(0, 113, 227, 0.76);
  stroke-width: 2.2;
  stroke-linejoin: round;
}

.dashboard-build-floor polyline,
.dashboard-build-roof path {
  fill: none;
  stroke: rgba(0, 113, 227, 0.86);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.dashboard-build-wall polygon {
  fill: rgba(0, 113, 227, 0.16);
  stroke: rgba(0, 113, 227, 0.62);
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.dashboard-build-column-set path {
  fill: none;
  stroke: rgba(0, 113, 227, 0.78);
  stroke-linecap: round;
  stroke-width: 4;
}

.dashboard-build-core polygon {
  fill: rgba(255, 255, 255, 0.72);
  stroke: rgba(15, 23, 42, 0.20);
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.dashboard-build-roof polygon {
  fill: rgba(0, 113, 227, 0.24);
}

.dashboard-build-scan {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0 32%, rgba(0, 113, 227, 0.18) 48%, transparent 64% 100%);
  transform: translateY(90%);
  opacity: 0.9;
  animation: dashboardBuildScan 1.05s ease-out forwards;
}

html[data-theme="dark"] .dashboard-build-transition {
  background:
    linear-gradient(rgba(148, 163, 184, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 50% 56%, rgba(0, 113, 227, 0.22), transparent 36%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.82), rgba(15, 23, 42, 0.62));
  background-size: 42px 42px, 42px 42px, auto, auto;
}

html[data-theme="dark"] .dashboard-build-model {
  filter: drop-shadow(0 34px 60px rgba(0, 0, 0, 0.46));
}

html[data-theme="dark"] .dashboard-build-blueprint {
  stroke: rgba(147, 197, 253, 0.30);
}

html[data-theme="dark"] .dashboard-build-floor polygon,
html[data-theme="dark"] .dashboard-build-roof polygon {
  fill: rgba(15, 23, 42, 0.62);
  stroke: rgba(255, 255, 255, 0.70);
}

html[data-theme="dark"] .dashboard-build-wall polygon {
  fill: rgba(0, 113, 227, 0.20);
  stroke: rgba(147, 197, 253, 0.52);
}

html[data-theme="dark"] .dashboard-build-column-set path,
html[data-theme="dark"] .dashboard-build-floor polyline,
html[data-theme="dark"] .dashboard-build-roof path {
  stroke: rgba(147, 197, 253, 0.88);
}

html[data-theme="dark"] .dashboard-build-core polygon {
  fill: rgba(30, 41, 59, 0.78);
  stroke: rgba(255, 255, 255, 0.20);
}

@keyframes dashboardBuildFade {
  0%,
  72% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes dashboardBuildLogo {
  0% {
    opacity: 0;
    transform: translate(-50%, 18px) scale(0.92);
  }
  40%,
  78% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -16px) scale(1.04);
  }
}

@keyframes dashboardBuildBlueprint {
  0% {
    opacity: 0;
    stroke-dashoffset: 46;
  }
  20%,
  78% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    stroke-dashoffset: 0;
  }
}

@keyframes dashboardBuildPiece {
  0% {
    opacity: 0;
    transform: translateY(48px) scale(0.84);
  }
  64% {
    opacity: 1;
    transform: translateY(-3px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes dashboardBuildScan {
  0% {
    transform: translateY(82%);
  }
  100% {
    transform: translateY(-120%);
  }
}

body.dashboard-route-transition-active,
body.dashboard-route-transition-exiting {
  cursor: progress;
}

body.dashboard-route-transition-active::before,
body.dashboard-route-transition-exiting::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 10001;
  pointer-events: auto;
  background: rgba(248, 250, 252, 0.88);
  will-change: opacity;
}

body.dashboard-route-transition-active::after,
body.dashboard-route-transition-exiting::after {
  content: attr(data-dashboard-route-transition-label);
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 10002;
  min-width: min(260px, calc(100vw - 52px));
  padding: 13px 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 880;
  line-height: 1.2;
  text-align: center;
  border: 1px solid rgba(203, 213, 225, 0.76);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.12);
  transform: translate(-50%, -50%);
  will-change: opacity, transform;
}

body.dashboard-route-transition-active::before {
  animation: dashboardRouteFadeIn 110ms ease-out both;
}

body.dashboard-route-transition-active::after {
  animation: dashboardRouteCardIn 130ms ease-out both;
}

body.dashboard-route-transition-exiting::before {
  animation: dashboardRouteFadeOut 180ms ease-in both;
}

body.dashboard-route-transition-exiting::after {
  animation: dashboardRouteCardOut 180ms ease-in both;
}

html[data-theme="dark"] body.dashboard-route-transition-active::before,
html[data-theme="dark"] body.dashboard-route-transition-exiting::before {
  background: rgba(2, 6, 23, 0.88);
}

html[data-theme="dark"] body.dashboard-route-transition-active::after,
html[data-theme="dark"] body.dashboard-route-transition-exiting::after {
  color: rgba(226, 232, 240, 0.88);
  border-color: rgba(148, 163, 184, 0.32);
  background: rgba(15, 23, 42, 0.94);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.34);
}

body.dashboard-route-transition-active::before,
body.dashboard-route-transition-active::after,
body.dashboard-route-transition-exiting::before,
body.dashboard-route-transition-exiting::after {
  content: none;
  display: none;
}

.dashboard-route-transition-surface {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: grid;
  place-items: center;
  padding: 24px;
  pointer-events: none;
  background: rgba(248, 250, 252, 0.88);
  opacity: 0;
  contain: layout paint;
  will-change: opacity;
}

.dashboard-route-transition-surface.active {
  animation: dashboardRouteFadeIn 110ms ease-out both;
}

.dashboard-route-transition-surface.exiting {
  animation: dashboardRouteFadeOut 180ms ease-in both;
}

.dashboard-route-transition-panel {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: min(360px, calc(100vw - 56px));
  padding: 24px 28px;
  text-align: center;
  border: 1px solid rgba(203, 213, 225, 0.76);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.12);
  transform: translateY(0) scale(1);
  will-change: opacity, transform;
}

.dashboard-route-transition-surface.active .dashboard-route-transition-panel {
  animation: dashboardRouteCardIn 130ms ease-out both;
}

.dashboard-route-transition-surface.exiting .dashboard-route-transition-panel {
  animation: dashboardRouteCardOut 180ms ease-in both;
}

.dashboard-route-transition-logo .brand-logo-wordmark {
  width: min(190px, 58vw);
  height: 46px;
}

.dashboard-route-transition-logo .brand-logo-wordmark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dashboard-route-transition-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 880;
  line-height: 1.2;
}

html[data-theme="dark"] .dashboard-route-transition-surface {
  background: rgba(2, 6, 23, 0.88);
}

html[data-theme="dark"] .dashboard-route-transition-panel {
  border-color: rgba(148, 163, 184, 0.32);
  background: rgba(15, 23, 42, 0.94);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.34);
}

html[data-theme="dark"] .dashboard-route-transition-label {
  color: rgba(226, 232, 240, 0.88);
}

.dashboard-route-transition {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: grid;
  place-items: center;
  overflow: hidden;
  pointer-events: auto;
  contain: layout paint;
  background: rgba(248, 250, 252, 0.88);
  animation: dashboardRouteFadeIn 110ms ease-out both;
  will-change: opacity;
}

.dashboard-route-transition::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(0, 113, 227, 0.12), transparent 42%);
  opacity: 0.9;
}

.dashboard-route-transition.exiting {
  animation: dashboardRouteFadeOut 180ms ease-in both;
}

.dashboard-route-transition-card {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 10px;
  min-width: min(340px, calc(100vw - 52px));
  padding: 24px 30px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 18px 42px rgba(15, 23, 42, 0.12);
  transform: translateY(0) scale(1);
  animation: dashboardRouteCardIn 130ms ease-out both;
  will-change: opacity, transform;
}

.dashboard-route-transition.exiting .dashboard-route-transition-card {
  animation: dashboardRouteCardOut 180ms ease-in both;
}

.dashboard-route-transition-logo .brand-logo-wordmark {
  width: min(190px, 54vw);
  height: 46px;
}

.dashboard-route-transition-logo .brand-logo-wordmark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dashboard-route-transition-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 880;
  letter-spacing: 0;
}

html[data-theme="dark"] .dashboard-route-transition {
  background: rgba(2, 6, 23, 0.88);
}

html[data-theme="dark"] .dashboard-route-transition::before {
  background: radial-gradient(circle at 50% 50%, rgba(0, 113, 227, 0.18), transparent 44%);
}

html[data-theme="dark"] .dashboard-route-transition-card {
  border-color: rgba(148, 163, 184, 0.32);
  background: rgba(15, 23, 42, 0.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 24px 56px rgba(0, 0, 0, 0.34);
}

@keyframes dashboardRouteFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes dashboardRouteFadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes dashboardRouteCardIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes dashboardRouteCardOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-12px) scale(1.03);
  }
}

.dashboard-topbar-summary {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 620px;
  margin-inline: 18px auto;
  gap: 2px;
}

.dashboard-topbar-summary strong {
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-topbar-summary span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 auto 10px;
  max-width: 1380px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.48);
  box-shadow: var(--tile-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.dashboard-hero span,
.dashboard-tile-head span,
.dashboard-summary-list dt,
.product-submission-head span,
.account-menu-head span,
.account-section-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dashboard-hero h1 {
  margin: 1px 0 2px;
  color: var(--text);
  font-size: clamp(22px, 2.1vw, 30px);
  line-height: 1;
}

.dashboard-hero p,
.dashboard-tile p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.dashboard-start-button {
  min-width: 180px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.88fr) minmax(520px, 1.62fr);
  gap: 10px;
  max-width: 1380px;
  margin: 0 auto;
}

.dashboard-tile {
  display: flex;
  min-height: 176px;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: var(--tile-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.dashboard-tile-large {
  grid-row: span 2;
}

.dashboard-projects-tile {
  grid-row: span 2;
}

.dashboard-project-adjacent-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-self: stretch;
}

.dashboard-project-adjacent-tiles .dashboard-company-entry-tile {
  min-height: 154px;
}

.dashboard-premium-tile {
  min-height: 0;
}

.dashboard-premium-plan,
.dashboard-premium-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dashboard-premium-plan {
  padding: 10px;
  border: 1px solid rgba(10, 124, 255, 0.18);
  border-radius: 8px;
  background: rgba(10, 124, 255, 0.06);
}

.dashboard-premium-plan > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.dashboard-premium-plan strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 920;
}

.dashboard-premium-plan small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.dashboard-premium-addon-list {
  display: grid;
  gap: 8px;
}

.dashboard-premium-addon {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
}

.dashboard-premium-addon-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.dashboard-premium-addon-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-premium-addon-copy small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
  line-height: 1.25;
}

.dashboard-premium-addon-status {
  padding: 5px 8px;
  border: 1px solid rgba(10, 124, 255, 0.22);
  border-radius: 6px;
  background: rgba(10, 124, 255, 0.08);
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.dashboard-premium-addon-status.active {
  border-color: rgba(22, 163, 74, 0.32);
  background: rgba(22, 163, 74, 0.10);
  color: #15803d;
}

.dashboard-premium-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.dashboard-premium-plan-buttons {
  min-width: min(100%, 250px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.dashboard-premium-plan-button {
  width: 100%;
  height: auto;
  min-height: 42px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 2px;
  padding: 7px 10px;
  text-align: left;
}

.dashboard-premium-plan-button strong,
.dashboard-premium-plan-button small {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-premium-plan-button strong {
  font-size: 12px;
  font-weight: 860;
}

.dashboard-premium-plan-button small {
  font-size: 10px;
  font-weight: 720;
  opacity: 0.88;
}

.export-branding-toggle.locked {
  cursor: default;
  opacity: 0.78;
}

.export-branding-toggle.locked .export-branding-toggle-switch {
  cursor: not-allowed;
}

.dashboard-library-tile {
  grid-column: auto;
}

.dashboard-news-tile {
  grid-column: 1 / -1;
}

.dashboard-tile-head,
.dashboard-account-row,
.dashboard-action-row,
.account-menu-head,
.product-submission-head,
.account-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-tile-head strong {
  color: var(--text);
  font-size: 18px;
}

.dashboard-tile-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-project-list {
  display: grid;
  gap: 6px;
}

.dashboard-project-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.58);
  text-align: left;
}

.dashboard-open-project-btn {
  flex: 0 0 auto;
}

.dashboard-project-row span,
.dashboard-account-row span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.dashboard-project-row strong,
.dashboard-account-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-project-row small,
.dashboard-account-row small,
.dashboard-project-row em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.dashboard-empty-state {
  display: grid;
  min-height: 84px;
  place-items: center;
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.dashboard-team-setup-tile {
  min-height: 0;
}

.dashboard-team-setup-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.dashboard-company-entry-tile {
  min-height: 154px;
}

.dashboard-company-entry-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.42);
}

.dashboard-company-entry-logo {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--blue);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
}

.dashboard-company-entry-logo img {
  width: 86%;
  height: 86%;
  object-fit: contain;
}

.dashboard-company-entry-logo strong {
  font-size: 12px;
  font-weight: 900;
}

.dashboard-project-team-logo {
  color: var(--blue);
}

.dashboard-project-team-logo svg {
  width: 24px;
  height: 24px;
}

.dashboard-company-entry-card > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.dashboard-company-entry-card strong {
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-company-entry-card small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.dashboard-company-entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

.dashboard-company-entry-meta span {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
}

.dashboard-company-entry-meta span.warning {
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(255, 247, 237, 0.78);
  color: #92400e;
}

.dashboard-company-workspace .dashboard-product-library-header {
  max-width: 1180px;
}

.dashboard-analytics-workspace.dashboard-company-workspace {
  overflow: auto;
}

.dashboard-company-workspace-layout {
  display: grid;
  width: min(1180px, calc(100vw - 32px));
  min-height: 0;
  margin: 0 auto;
  padding-bottom: 24px;
}

.dashboard-company-team-workspace-card {
  min-height: 0;
  max-height: none;
  overflow: visible;
}

.dashboard-company-team-setup-tile {
  grid-row: span 2;
}

.dashboard-company-setup-form {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.42);
}

.dashboard-company-identity {
  display: grid;
  grid-template-columns: minmax(190px, 0.92fr) minmax(0, 1fr);
  gap: 9px;
  align-items: stretch;
}

.dashboard-company-header-preview {
  display: grid;
  min-height: 92px;
  align-content: end;
  gap: 8px;
  padding: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(0, 113, 227, 0.16), rgba(255, 255, 255, 0.24)),
    rgba(226, 232, 240, 0.76);
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.54);
}

.dashboard-company-logo-preview {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--blue);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12);
}

.dashboard-company-logo-preview img {
  width: 86%;
  height: 86%;
  object-fit: contain;
}

.dashboard-company-logo-preview strong {
  font-size: 12px;
  font-weight: 900;
}

.dashboard-company-header-preview > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.dashboard-company-header-preview > div strong,
.dashboard-team-section-head strong {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-company-header-preview > div small,
.dashboard-team-section-head small,
.dashboard-company-save-row span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.dashboard-company-file-actions {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.dashboard-company-file-actions .settings-mini-btn {
  min-height: 31px;
  padding-inline: 10px;
  border-radius: 10px;
  font-size: 11px;
}

.dashboard-company-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.dashboard-company-fields label {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.dashboard-company-fields span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.dashboard-company-fields input,
.dashboard-company-fields textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--input-glass);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 820;
}

.dashboard-company-fields input {
  min-height: 34px;
  padding: 0 10px;
}

.dashboard-company-fields textarea {
  min-height: 62px;
  resize: vertical;
  padding: 9px 10px;
  line-height: 1.35;
}

.dashboard-company-bio {
  grid-column: span 2;
}

.dashboard-company-work-controls {
  display: grid;
  grid-column: span 2;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.36);
}

.dashboard-company-work-controls legend {
  grid-column: 1 / -1;
  padding: 0 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.dashboard-company-work-group {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.42);
}

.dashboard-company-work-controls label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  background: var(--input-glass);
}

.dashboard-company-work-primary {
  min-height: 36px;
}

.dashboard-company-work-primary span {
  font-weight: 920;
}

.dashboard-company-work-trades {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.dashboard-company-work-controls input {
  width: 16px;
  height: 16px;
  min-height: 0;
  padding: 0;
  accent-color: var(--blue);
}

.dashboard-company-work-controls span {
  color: var(--text);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.15;
  text-transform: none;
}

.dashboard-company-quote-controls {
  display: grid;
  grid-column: span 2;
  grid-template-columns: 1fr;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.72);
}

.dashboard-company-quote-controls legend {
  grid-column: 1 / -1;
  padding: 0 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.dashboard-company-quote-settings {
  display: grid;
  grid-template-columns: minmax(160px, 0.7fr) minmax(180px, 1fr);
  gap: 8px;
  align-content: start;
}

.dashboard-company-quote-toggle,
.dashboard-company-quote-distance {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  background: var(--input-glass);
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
}

.dashboard-company-quote-toggle input {
  width: 16px;
  height: 16px;
  min-height: 0;
  padding: 0;
  accent-color: var(--blue);
}

.dashboard-company-quote-distance {
  justify-content: space-between;
}

.dashboard-company-quote-distance input {
  width: 86px;
  min-height: 30px;
  padding: 0 8px;
  text-align: right;
}

.dashboard-company-quote-map {
  position: relative;
  min-height: 210px;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(148, 163, 184, 0.13) 1px, transparent 1px),
    linear-gradient(0deg, rgba(148, 163, 184, 0.13) 1px, transparent 1px),
    radial-gradient(circle at center, rgba(37, 99, 235, 0.14), rgba(255, 255, 255, 0.72));
  background-size: 28px 28px, 28px 28px, auto;
}

.dashboard-company-quote-map-frame,
.dashboard-company-quote-map-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.dashboard-company-quote-map-frame {
  border: 0;
  filter: saturate(0.9) contrast(0.98);
}

.dashboard-company-quote-map-svg {
  display: block;
  background: #eef4ff;
}

.dashboard-company-quote-map-water {
  fill: #eaf3fb;
}

.dashboard-company-quote-map-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 4px;
  padding: 12px;
  color: var(--text);
  text-align: center;
}

.dashboard-company-quote-map-empty b {
  font-size: 13px;
  font-weight: 920;
}

.dashboard-company-quote-map-empty span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
}

.dashboard-company-quote-map-radius {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: var(--quote-area-width, 32%);
  height: var(--quote-area-height, 72%);
  border: 2px solid rgba(37, 99, 235, 0.28);
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.dashboard-company-quote-map-radius-svg {
  fill: rgba(37, 99, 235, 0.13);
  stroke: rgba(37, 99, 235, 0.48);
  stroke-width: 2.4;
  vector-effect: non-scaling-stroke;
}

.dashboard-company-quote-map-centre {
  fill: var(--blue);
  stroke: #fff;
  stroke-width: 3.5;
  vector-effect: non-scaling-stroke;
}

.dashboard-company-quote-map-pin {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  gap: 2px;
  min-width: 118px;
  padding: 8px 10px;
  border: 1px solid rgba(37, 99, 235, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  text-align: center;
  transform: translate(-50%, -50%);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12);
}

.dashboard-company-quote-map-pin b {
  font-size: 12px;
  font-weight: 950;
}

.dashboard-company-quote-map-pin span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.dashboard-company-quote-map-link {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  padding: 6px 9px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1);
}

.dashboard-company-quote-map-controls {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

.dashboard-company-quote-map-controls button {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  min-height: 0;
  padding: 0;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--blue);
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
}

.dashboard-company-quote-map-controls button:hover {
  background: var(--blue);
  color: #fff;
}

.dashboard-company-quote-map-controls span {
  min-width: 54px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-align: center;
}

.dashboard-company-quote-map-scale {
  position: absolute;
  right: 84px;
  bottom: 13px;
  z-index: 3;
  display: grid;
  gap: 2px;
  justify-items: center;
  padding: 5px 7px 4px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
}

.dashboard-company-quote-map-scale span {
  display: block;
  width: var(--quote-scale-width, 80px);
  max-width: 154px;
  height: 7px;
  border-right: 2px solid rgba(15, 23, 42, 0.72);
  border-bottom: 2px solid rgba(15, 23, 42, 0.72);
  border-left: 2px solid rgba(15, 23, 42, 0.72);
}

.dashboard-company-save-row,
.dashboard-team-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dashboard-company-save-row .primary-mini {
  flex: 0 0 auto;
  min-height: 32px;
  padding-inline: 12px;
}

.dashboard-team-section-head {
  padding-top: 2px;
}

.dashboard-team-section-head > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

html[data-theme="dark"] .dashboard-company-setup-form,
html[data-theme="dark"] .dashboard-company-entry-card,
html[data-theme="dark"] .dashboard-team-row,
html[data-theme="dark"] .dashboard-team-certifications,
html[data-theme="dark"] .dashboard-team-holidays,
html[data-theme="dark"] .dashboard-team-schedule {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.42);
}

html[data-theme="dark"] .dashboard-company-entry-logo {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.72);
}

html[data-theme="dark"] .dashboard-company-header-preview {
  border-color: rgba(148, 163, 184, 0.28);
  background:
    linear-gradient(145deg, rgba(37, 99, 235, 0.24), rgba(15, 23, 42, 0.32)),
    rgba(15, 23, 42, 0.72);
}

.dashboard-team-add-form {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(150px, 1.1fr) minmax(106px, 0.7fr) auto;
  gap: 8px;
  align-items: end;
}

.dashboard-team-add-form label,
.dashboard-team-row label,
.dashboard-team-member label {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.dashboard-team-add-form span,
.dashboard-team-row label span,
.dashboard-team-member label span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.dashboard-team-add-form input,
.dashboard-team-add-form select,
.dashboard-team-row input,
.dashboard-team-row select {
  min-width: 0;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 10px;
  background: var(--input-glass);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 820;
}

.dashboard-team-list {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.dashboard-team-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(170px, 1fr) minmax(112px, 0.72fr) auto;
  gap: 8px;
  align-items: end;
  padding: 8px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--programme-trade, var(--accent));
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
}

.dashboard-team-member {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 8px;
  align-items: end;
  min-width: 0;
}

.dashboard-team-row.trade-mechanical {
  --programme-trade: #ef4444;
}

.dashboard-team-row.trade-electrical {
  --programme-trade: #7e22ce;
}

.dashboard-team-row.trade-control {
  --programme-trade: #2563eb;
}

.dashboard-team-row .settings-mini-btn,
.dashboard-team-add-form .primary-mini {
  min-height: 34px;
  align-self: end;
}

.dashboard-project-team-card {
  gap: 12px;
}

.dashboard-team-list.enhanced {
  display: grid;
  gap: 12px;
}

.dashboard-team-row-expanded {
  align-items: start;
  grid-template-columns: minmax(190px, 1.1fr) minmax(190px, 1fr) minmax(130px, 0.75fr) minmax(145px, 0.8fr) minmax(125px, 0.75fr) auto;
}

.dashboard-team-row-details {
  display: grid;
  grid-column: 1 / -1;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.dashboard-team-subsection-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dashboard-team-subsection-head > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.dashboard-team-subsection-head strong,
.dashboard-team-schedule > strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-team-subsection-head small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 820;
}

.dashboard-team-certifications,
.dashboard-team-holidays,
.dashboard-team-schedule {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.42);
}

.dashboard-team-schedule {
  grid-column: 1 / -1;
}

.dashboard-team-cert-row,
.dashboard-team-holiday-row {
  display: grid;
  align-items: end;
  gap: 8px;
  grid-template-columns: minmax(140px, 1fr) minmax(118px, 0.55fr) minmax(160px, 1fr) auto;
  min-width: 0;
}

.dashboard-team-cert-row {
  grid-template-columns: minmax(0, 1.2fr) minmax(118px, 0.55fr) minmax(150px, 0.9fr) auto;
}

.dashboard-team-cert-row.warning {
  padding: 8px;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 12px;
  background: rgba(255, 247, 237, 0.62);
}

.dashboard-team-cert-row em {
  grid-column: 1 / 4;
  align-self: center;
  color: #92400e;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.dashboard-team-cert-row label,
.dashboard-team-cert-row select,
.dashboard-team-cert-row input {
  min-width: 0;
  width: 100%;
}

.dashboard-team-cert-row .settings-mini-btn {
  justify-self: end;
}

.dashboard-team-cert-upload input {
  min-height: 34px;
  padding: 7px;
}

.dashboard-team-cert-upload small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-team-schedule ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dashboard-team-schedule li {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--programme-trade);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.74);
}

.dashboard-team-schedule li span {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.dashboard-team-schedule li small,
.dashboard-team-schedule > p,
.dashboard-team-schedule > small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
}

.dashboard-empty-state.compact {
  min-height: 44px;
  padding: 8px;
  font-size: 11px;
}

.dashboard-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.dashboard-chip-row span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.dashboard-app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
  gap: 10px 14px;
  margin-top: 0;
  align-items: start;
}

.dashboard-role-tools-tile {
  min-height: 0;
}

.dashboard-quick-tools-tile {
  min-height: 0;
}

.dashboard-role-app-grid {
  grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
}

.dashboard-quick-tools-grid.collapsed {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-quick-tools-grid.expanded {
  grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
}

.dashboard-see-all-btn {
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
}

.dashboard-quick-tools-count {
  justify-self: end;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.dashboard-app-tool {
  display: grid;
  place-items: start center;
  gap: 6px;
  min-width: 0;
  padding: 2px;
  border: 0;
  color: var(--text);
  background: transparent;
  cursor: default;
}

.dashboard-app-tool-active {
  cursor: pointer;
}

.dashboard-app-tool:disabled {
  opacity: 0.55;
}

.dashboard-app-tool-active:hover .dashboard-app-icon {
  transform: translateY(-3px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.66),
    inset 0 -18px 24px rgba(0, 0, 0, 0.12),
    0 20px 36px rgba(0, 113, 227, 0.24);
}

.dashboard-app-icon {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 15px;
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    inset 0 -18px 24px rgba(0, 0, 0, 0.13),
    0 16px 28px rgba(15, 23, 42, 0.14);
  opacity: 0.76;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.dashboard-app-tool-active .dashboard-app-icon {
  opacity: 1;
}

.dashboard-app-icon-library {
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.48), transparent 30%),
    linear-gradient(145deg, rgba(0, 113, 227, 0.98), rgba(6, 182, 212, 0.72));
}

.dashboard-app-icon-analytics {
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.48), transparent 30%),
    linear-gradient(145deg, rgba(20, 184, 166, 0.96), rgba(37, 99, 235, 0.72));
}

.dashboard-app-icon-advertising {
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.52), transparent 31%),
    linear-gradient(145deg, rgba(37, 99, 235, 0.96), rgba(124, 58, 237, 0.76));
}

.dashboard-app-icon-products {
  background: linear-gradient(145deg, rgba(22, 163, 74, 0.95), rgba(0, 113, 227, 0.5));
}

.dashboard-app-icon-tender {
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.58), transparent 30%),
    linear-gradient(145deg, rgba(14, 165, 233, 0.96), rgba(22, 163, 74, 0.62));
}

.dashboard-app-icon-pipe {
  background: linear-gradient(145deg, rgba(10, 132, 255, 0.95), rgba(31, 111, 235, 0.64));
}

.dashboard-app-icon-hydraulic {
  background:
    radial-gradient(circle at 31% 24%, rgba(255, 255, 255, 0.68), transparent 28%),
    radial-gradient(circle at 63% 68%, rgba(255, 255, 255, 0.26), transparent 34%),
    linear-gradient(145deg, rgba(7, 132, 255, 0.98), rgba(43, 94, 168, 0.76));
}

.dashboard-app-icon-hydraulic svg {
  width: 35px;
  height: 35px;
  filter: drop-shadow(0 8px 12px rgba(0, 42, 107, 0.2));
}

.dashboard-app-icon-gas {
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.62), transparent 30%),
    radial-gradient(circle at 66% 70%, rgba(255, 255, 255, 0.28), transparent 34%),
    linear-gradient(145deg, rgba(250, 204, 21, 0.98), rgba(245, 158, 11, 0.78));
}

.dashboard-app-icon-gas svg {
  width: 35px;
  height: 35px;
  filter: drop-shadow(0 8px 12px rgba(146, 64, 14, 0.24));
}

.dashboard-app-icon-dhw {
  background: linear-gradient(145deg, rgba(14, 165, 233, 0.95), rgba(0, 113, 227, 0.58));
}

.dashboard-app-icon-unit {
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.92), rgba(0, 113, 227, 0.52));
}

.dashboard-app-icon-heat-loss {
  background: linear-gradient(145deg, rgba(239, 68, 68, 0.94), rgba(0, 113, 227, 0.44));
}

.dashboard-app-icon-heat-gain {
  background: linear-gradient(145deg, rgba(0, 113, 227, 0.94), rgba(244, 114, 182, 0.52));
}

.dashboard-app-icon-takeoff {
  background: linear-gradient(145deg, rgba(20, 184, 166, 0.92), rgba(15, 23, 42, 0.52));
}

.dashboard-app-icon-schedules {
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.94), rgba(0, 113, 227, 0.44));
}

.dashboard-app-icon-compliance {
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.92), rgba(124, 58, 237, 0.58));
}

.dashboard-app-icon svg {
  width: 27px;
  height: 27px;
}

.dashboard-app-tool strong {
  display: block;
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  line-height: 1.15;
}

.dashboard-library-showcase {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: stretch;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(0, 113, 227, 0.12), rgba(255, 255, 255, 0.44)),
    rgba(255, 255, 255, 0.28);
}

.dashboard-product-network {
  position: relative;
  min-height: 132px;
  overflow: hidden;
  border: 1px solid rgba(0, 113, 227, 0.14);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 45%, rgba(10, 132, 255, 0.14), transparent 40%),
    rgba(255, 255, 255, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.dashboard-network-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.dashboard-network-lines line {
  stroke: rgba(10, 132, 255, 0.3);
  stroke-width: 0.72;
  stroke-dasharray: 4 7;
  vector-effect: non-scaling-stroke;
  animation: dashboardNetworkPulse 4.8s ease-in-out infinite;
}

.dashboard-network-node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow:
    0 14px 28px rgba(15, 23, 42, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  color: var(--blue);
  font-size: 11px;
  font-weight: 950;
  transform: translate(-50%, -50%) translate(calc(var(--network-x, 0px) * var(--depth)), calc(var(--network-y, 0px) * var(--depth)));
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  animation: dashboardNodeFloat 5.8s ease-in-out infinite;
  animation-delay: var(--delay);
}

.dashboard-product-network:hover .dashboard-network-node {
  border-color: rgba(10, 132, 255, 0.42);
  box-shadow:
    0 18px 34px rgba(10, 132, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.dashboard-network-node img {
  width: 84%;
  height: 84%;
  object-fit: contain;
}

.dashboard-network-node-brand,
.dashboard-network-node-category {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.8), rgba(234, 242, 255, 0.62)),
    rgba(255, 255, 255, 0.58);
}

.dashboard-library-showcase h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.05;
}

.dashboard-library-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-library-categories span {
  padding: 7px 10px;
  border: 1px solid rgba(0, 113, 227, 0.18);
  border-radius: 999px;
  color: var(--blue);
  background: rgba(0, 113, 227, 0.08);
  font-size: 12px;
  font-weight: 900;
}

.dashboard-news-feed {
  display: grid;
  gap: 16px;
}

.dashboard-news-curation-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.dashboard-news-list .dashboard-news-publication {
  white-space: normal;
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: none;
}

.dashboard-news-copy .dashboard-news-read-more {
  color: var(--blue);
  font-weight: 800;
  margin-top: 3px;
}

.dashboard-news-source-action {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.dashboard-news-source-action p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.dashboard-news-source-action a {
  display: grid;
  gap: 4px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}

.dashboard-news-source-action a span {
  font-size: 11px;
  font-weight: 500;
}

.dashboard-news-source-action a:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.dashboard-news-list {
  display: grid;
  gap: 20px;
}

.dashboard-news-section {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  gap: 12px 14px;
}

.dashboard-news-section-head {
  display: flex;
  grid-column: 1 / -1;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 2px;
}

.dashboard-news-section-head span {
  color: var(--text);
  font-size: clamp(18px, 1.9vw, 25px);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
}

.dashboard-news-section-head strong {
  color: var(--muted);
  max-width: 280px;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
  text-align: right;
}

.dashboard-news-story {
  position: relative;
  display: grid;
  align-content: start;
  gap: 9px;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.dashboard-news-story::after {
  content: "";
  position: absolute;
  inset: -7px;
  z-index: -1;
  border-radius: 13px;
  background: color-mix(in srgb, var(--blue) 9%, transparent);
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 160ms ease, transform 160ms ease;
}

.dashboard-news-story:hover .dashboard-news-thumb {
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36), 0 18px 34px rgba(15, 23, 42, 0.16);
}

.dashboard-news-story:hover::after,
.dashboard-news-story:focus-visible::after {
  opacity: 1;
  transform: scale(1);
}

.dashboard-news-story:focus-visible {
  outline: none;
}

.dashboard-news-thumb {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 9;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 9px;
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), 0 16px 28px rgba(15, 23, 42, 0.12);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.dashboard-news-thumb .dashboard-news-example-pill {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 1;
  max-width: calc(100% - 18px);
  padding: 5px 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.66);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
  color: #ffffff;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.08em;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.dashboard-news-thumb.has-image {
  background-position: center;
  background-size: cover;
}

.dashboard-news-thumb svg {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.18));
}

.dashboard-news-thumb-public,
.dashboard-news-thumb-industry {
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.28), transparent 30%),
    linear-gradient(135deg, rgba(0, 113, 227, 0.9), rgba(14, 165, 233, 0.52)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 6px, transparent 6px 14px);
}

.dashboard-news-thumb-products {
  background:
    radial-gradient(circle at 24% 28%, rgba(255, 255, 255, 0.24), transparent 28%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(0, 113, 227, 0.62)),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.1) 0 8px, transparent 8px 18px);
}

.dashboard-news-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.dashboard-news-copy strong,
.dashboard-advert-tile > strong {
  color: var(--text);
  font-weight: 950;
  font-size: clamp(14px, 1.3vw, 18px);
  line-height: 1.12;
}

.dashboard-news-copy span {
  color: var(--muted);
  display: -webkit-box;
  overflow: hidden;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.32;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.dashboard-news-list small {
  color: var(--muted);
  overflow: hidden;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-news-more {
  display: grid;
  gap: 10px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.dashboard-news-see-more {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(0, 113, 227, 0.18);
  border-radius: 10px;
  background: rgba(0, 113, 227, 0.07);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.dashboard-news-see-more span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 950;
}

.dashboard-news-see-more strong {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.dashboard-news-timeline {
  display: grid;
  gap: 0;
  padding: 5px 0 0;
}

.dashboard-news-timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  min-width: 0;
  padding: 9px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.dashboard-news-timeline-item:last-child {
  border-bottom: 0;
}

.dashboard-news-timeline-marker {
  position: relative;
  width: 22px;
  min-height: 100%;
}

.dashboard-news-timeline-marker::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 9px;
  width: 1px;
  height: calc(100% + 10px);
  background: rgba(0, 113, 227, 0.18);
}

.dashboard-news-timeline-item:last-child .dashboard-news-timeline-marker::before {
  height: 13px;
}

.dashboard-news-timeline-marker::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 5px;
  width: 9px;
  height: 9px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12);
}

.dashboard-news-timeline-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.dashboard-news-timeline-copy small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dashboard-news-timeline-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-news-timeline-copy em {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 760;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-news-popout-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.dashboard-news-popout {
  position: relative;
  width: min(920px, 100%);
  max-height: min(860px, calc(100vh - 56px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
}

.dashboard-news-popout-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.dashboard-news-popout-hero {
  min-height: 250px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
  padding: 34px;
  background:
    radial-gradient(circle at 84% 18%, rgba(255, 255, 255, 0.32), transparent 32%),
    linear-gradient(135deg, rgba(0, 113, 227, 0.94), rgba(124, 58, 237, 0.72));
  background-position: center;
  background-size: cover;
  color: #ffffff;
}

.dashboard-news-popout-hero.has-image {
  position: relative;
}

.dashboard-news-popout-hero.has-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.12));
}

.dashboard-news-popout-hero > * {
  position: relative;
  z-index: 1;
}

.dashboard-news-popout-hero small {
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dashboard-news-popout-hero h2 {
  max-width: 760px;
  margin: 7px 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.02;
  letter-spacing: 0;
}

.dashboard-news-popout-hero span {
  display: block;
  max-width: 720px;
  font-size: 15px;
  font-weight: 780;
  line-height: 1.35;
}

.dashboard-news-popout-hero em {
  display: block;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0;
}

.dashboard-news-company-context {
  max-width: min(100%, 430px);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  padding: 7px 10px 7px 7px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.dashboard-news-popout-hero .dashboard-news-company-logo {
  width: 30px;
  height: 30px;
  max-width: none;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
}

.dashboard-news-company-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard-news-popout-hero .dashboard-news-company-copy {
  max-width: min(230px, 45vw);
  display: grid;
  gap: 1px;
  line-height: 1.05;
}

.dashboard-news-popout-hero .dashboard-news-company-copy small {
  color: rgba(255, 255, 255, 0.68);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-news-company-copy strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 12px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-news-popout-hero .dashboard-news-company-role {
  max-width: none;
  display: block;
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.9);
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
}

.dashboard-news-popout-icon {
  display: grid;
  width: 96px;
  height: 96px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.dashboard-news-popout-icon svg {
  width: 48px;
  height: 48px;
}

.dashboard-news-popout-body {
  min-height: 0;
  display: grid;
  gap: 12px;
  padding: 18px;
  overflow: auto;
  scrollbar-width: thin;
}

.dashboard-news-popout-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
}

.dashboard-news-popout-card > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dashboard-news-popout-card p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 720;
  line-height: 1.55;
}

.dashboard-news-popout-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0 0 0 21px;
  color: var(--text);
  font-size: 14px;
  font-weight: 720;
  line-height: 1.48;
}

.dashboard-news-popout-card li::marker {
  color: var(--blue);
}

.dashboard-news-popout-card h3,
.dashboard-news-popout-card h4 {
  margin: 4px 0 0;
  color: var(--text);
  letter-spacing: 0;
}

.dashboard-news-popout-card h3 {
  font-size: 24px;
  font-weight: 950;
  line-height: 1.12;
}

.dashboard-news-popout-card h4 {
  font-size: 18px;
  font-weight: 900;
  line-height: 1.22;
}

.dashboard-news-popout-card blockquote {
  margin: 2px 0;
  padding: 10px 12px;
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  background: rgba(0, 113, 227, 0.08);
  color: var(--text);
  font-size: 15px;
  font-style: italic;
  font-weight: 760;
  line-height: 1.5;
}

.dashboard-news-caption {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.45;
}

.dashboard-news-inline-bold {
  font-weight: 950;
}

.dashboard-news-inline-regular {
  font-weight: 650;
}

.dashboard-news-inline-thin {
  font-weight: 420;
}

.dashboard-news-inline-italic {
  font-style: italic;
}

.dashboard-news-popout-card a {
  color: var(--accent);
  font-weight: 900;
  text-decoration: none;
}

.dashboard-news-popout-card a:hover {
  text-decoration: underline;
}

.dashboard-news-inline-image {
  min-width: 0;
  margin: 2px 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.72);
}

.dashboard-news-inline-image img {
  display: block;
  width: 100%;
  max-height: min(52vh, 520px);
  object-fit: cover;
}

.dashboard-news-inline-image figcaption {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
}

.dashboard-news-video-embed {
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(0, 113, 227, 0.18);
  border-radius: 12px;
  background: #0f172a;
  aspect-ratio: 16 / 9;
}

.dashboard-news-video-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.dashboard-news-embedded-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.dashboard-news-embedded-images figure {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.72);
}

.dashboard-news-embedded-images img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.dashboard-news-embedded-images figcaption {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
}

.dashboard-news-popout-graph article {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) 54px;
  gap: 10px;
  align-items: center;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.dashboard-news-popout-graph article div {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
}

.dashboard-news-popout-graph article i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(0, 113, 227, 0.92), rgba(124, 58, 237, 0.78));
}

.dashboard-news-popout-graph article em {
  color: var(--muted);
  font-style: normal;
  text-align: right;
}

.dashboard-news-graph-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 10px;
  min-height: 190px;
  align-items: end;
}

.dashboard-news-graph-columns article {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(118px, 1fr) auto;
  gap: 7px;
  justify-items: center;
  text-align: center;
}

.dashboard-news-graph-columns article div {
  width: 28px;
  height: 100%;
  display: flex;
  align-items: end;
  border-radius: 999px;
}

.dashboard-news-graph-columns article i {
  width: 100%;
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.86), rgba(0, 113, 227, 0.92));
}

.dashboard-news-graph-columns article em {
  max-width: 100%;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-news-graph-line {
  display: grid;
  gap: 10px;
}

.dashboard-news-graph-line svg {
  width: 100%;
  min-height: 170px;
  overflow: visible;
}

.dashboard-news-graph-line path {
  fill: none;
  stroke: rgba(148, 163, 184, 0.34);
  stroke-width: 2;
}

.dashboard-news-graph-line polyline {
  fill: none;
  stroke: #0071e3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 6;
  filter: drop-shadow(0 8px 12px rgba(0, 113, 227, 0.2));
}

.dashboard-news-graph-line circle {
  fill: #ffffff;
  stroke: #7c3aed;
  stroke-width: 5;
}

.dashboard-news-graph-line > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.dashboard-news-graph-line span,
.dashboard-news-graph-donut span {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.52);
}

.dashboard-news-graph-line strong,
.dashboard-news-graph-donut strong {
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-news-graph-line em,
.dashboard-news-graph-donut em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.dashboard-news-graph-donut {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.dashboard-news-donut {
  position: relative;
  width: 158px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.24), 0 18px 38px rgba(15, 23, 42, 0.14);
}

.dashboard-news-donut::after {
  content: "";
  position: absolute;
  inset: 34px;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.9);
}

.dashboard-news-donut span {
  position: relative;
  z-index: 1;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 20px;
  font-weight: 950;
}

.dashboard-news-graph-donut > div:last-child {
  display: grid;
  gap: 7px;
}

.dashboard-news-graph-donut i {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 999px;
}

.dashboard-news-popout-links a {
  justify-self: start;
  padding: 9px 12px;
  border: 1px solid var(--blue-border);
  border-radius: 8px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 12px;
  font-weight: 950;
  text-decoration: none;
}

.dashboard-news-example-notice {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(0, 113, 227, 0.18);
  border-radius: 10px;
  background: rgba(0, 113, 227, 0.07);
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
  line-height: 1.45;
}

.dashboard-advert-tile {
  min-height: 214px;
  padding: 0;
  overflow: hidden;
}

.dashboard-advert-image {
  position: relative;
  display: grid;
  min-height: 214px;
  place-items: center;
  overflow: hidden;
  border-radius: inherit;
  background-color: rgba(255, 255, 255, 0.44);
  background-position: center;
  background-size: cover;
}

.dashboard-advert-carousel,
.dashboard-advert-slide {
  position: absolute;
  inset: 0;
}

.dashboard-advert-carousel {
  overflow: hidden;
}

.dashboard-advert-slide {
  opacity: 0;
  transition: opacity 0.55s ease;
}

.dashboard-advert-slide.active {
  opacity: 1;
}

.dashboard-advert-photo {
  background-position: center;
  background-size: cover;
}

.dashboard-advert-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}

.dashboard-advert-click-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  cursor: pointer;
}

.dashboard-advert-tile.has-link .dashboard-advert-image {
  cursor: pointer;
}

.dashboard-advert-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    linear-gradient(145deg, rgba(0, 113, 227, 0.22), rgba(255, 255, 255, 0.36)),
    radial-gradient(circle at 82% 16%, rgba(0, 113, 227, 0.22), transparent 38%);
}

.dashboard-advert-placeholder .brand-logo-wordmark {
  width: min(240px, 82%);
}

.dashboard-advert-overlay {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.64));
  color: #ffffff;
}

.dashboard-advert-overlay span {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dashboard-advert-overlay strong {
  font-size: 17px;
  line-height: 1.05;
}

.dashboard-advert-admin {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: min(620px, calc(100% - 24px));
  justify-content: flex-end;
}

.dashboard-advert-admin .settings-mini-btn {
  min-height: 34px;
  border-color: rgba(255, 255, 255, 0.62);
  background: var(--button-glass);
  color: var(--text);
}

.dashboard-advert-admin .settings-mini-btn.active {
  border-color: var(--blue-border);
  background: var(--blue-soft);
  color: var(--blue);
}

.dashboard-advert-link-field {
  display: grid;
  grid-template-columns: auto minmax(170px, 260px);
  gap: 8px;
  align-items: center;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 6px;
  background: var(--button-glass);
  color: var(--text);
  box-shadow: var(--glass-edge), 0 5px 12px rgba(0, 0, 0, 0.05);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.dashboard-advert-link-field span {
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--muted);
}

.dashboard-advert-link-field input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 800;
}

.dashboard-advert-link-field input::placeholder {
  color: var(--muted);
  opacity: 0.74;
}

.dashboard-advert-manager {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  max-height: min(74%, 360px);
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--glass-edge), 0 18px 36px rgba(15, 23, 42, 0.16);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  overflow: hidden;
}

.dashboard-advert-manager-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 0.74rem;
}

.dashboard-advert-manager-head strong {
  color: var(--text);
}

.dashboard-advert-manager-list {
  min-height: 0;
  max-height: 260px;
  display: grid;
  align-content: start;
  gap: 7px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  padding-right: 2px;
}

.dashboard-advert-manager-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.dashboard-advert-manager-thumb {
  display: grid;
  width: 58px;
  height: 38px;
  place-items: center;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.18), rgba(124, 58, 237, 0.16));
  background-position: center;
  background-size: cover;
  color: var(--blue);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-advert-manager-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.dashboard-advert-manager-copy strong,
.dashboard-advert-manager-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-advert-manager-copy strong {
  color: var(--text);
  font-weight: 900;
}

.dashboard-advert-manager-copy small,
.dashboard-advert-manager-empty {
  color: var(--muted);
  font-weight: 800;
}

.dashboard-advert-manager-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dashboard-advertising-workspace {
  background:
    radial-gradient(circle at 12% 0%, rgba(124, 58, 237, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(246, 249, 252, 0.96), rgba(236, 243, 247, 0.9));
}

.dashboard-advertising-layout {
  min-height: 0;
  display: grid;
  grid-auto-rows: min-content;
  gap: 14px;
  overflow: auto;
  scrollbar-width: thin;
}

.dashboard-advertising-panel {
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: var(--glass-edge);
  box-sizing: border-box;
}

.dashboard-advertising-control-panel,
.dashboard-advertising-file-manager,
.dashboard-advertising-view-table {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.dashboard-advertising-control-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(280px, 1fr) auto;
  align-items: stretch;
  gap: 12px;
}

.dashboard-advertising-upload-card,
.dashboard-advertising-link-field {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--text);
  box-sizing: border-box;
}

.dashboard-advertising-upload-card {
  cursor: pointer;
}

.dashboard-advertising-upload-card:hover {
  border-color: var(--blue-border);
  background: var(--blue-soft);
}

.dashboard-advertising-upload-card span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.96), rgba(124, 58, 237, 0.76));
  color: #ffffff;
}

.dashboard-advertising-upload-card span svg {
  width: 20px;
  height: 20px;
}

.dashboard-advertising-upload-card strong,
.dashboard-advertising-link-field span {
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
}

.dashboard-advertising-upload-card small,
.dashboard-advertising-link-field small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.dashboard-advertising-link-field input {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  font: inherit;
  font-weight: 850;
  box-sizing: border-box;
}

.dashboard-advertising-open-link {
  align-self: center;
  justify-self: end;
  text-decoration: none;
}

.dashboard-advertising-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-advertising-content-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(340px, 0.86fr) minmax(0, 1.14fr);
  gap: 14px;
  align-items: start;
}

.dashboard-advertising-file-manager {
  min-height: 420px;
  max-height: min(64vh, 620px);
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.dashboard-advertising-file-list {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 3px;
  scrollbar-width: thin;
}

.dashboard-advertising-file-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.6);
}

.dashboard-advertising-table {
  display: grid;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  overflow: hidden;
}

.dashboard-advertising-table-head,
.dashboard-advertising-table-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) 96px 104px 86px minmax(140px, 0.9fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
}

.dashboard-advertising-table-head {
  background: rgba(226, 232, 240, 0.5);
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.dashboard-advertising-table-row {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.dashboard-advertising-table-row > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-advertising-table-row strong,
.dashboard-advertising-table-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-advertising-table-row small,
.dashboard-advertising-table-empty {
  color: var(--muted);
  font-weight: 800;
}

.dashboard-advertising-table-empty {
  padding: 16px;
  text-align: center;
}

.dashboard-news-analytics-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.dashboard-news-analytics-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-news-analytics-head,
.dashboard-news-analytics-row {
  grid-template-columns: minmax(220px, 1.25fr) 130px 92px 72px minmax(112px, 0.75fr) minmax(130px, 0.85fr);
}

.dashboard-news-admin-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(0, 1.05fr);
  gap: 14px;
  align-items: start;
}

.dashboard-news-admin-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.dashboard-news-admin-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-news-admin-form label {
  min-width: 0;
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.dashboard-news-admin-form label.wide,
.dashboard-news-rich-editor.wide,
.dashboard-news-admin-actions {
  grid-column: 1 / -1;
}

.dashboard-news-admin-form input,
.dashboard-news-admin-form select,
.dashboard-news-admin-form textarea {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 9px 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: none;
  box-sizing: border-box;
}

.dashboard-news-admin-form textarea {
  min-height: 120px;
  resize: vertical;
}

.dashboard-news-admin-form small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.dashboard-news-media-dropzone {
  position: relative;
  min-height: 126px;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 16px;
  overflow: hidden;
  border: 1px dashed rgba(0, 113, 227, 0.42);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(0, 113, 227, 0.1), rgba(99, 102, 241, 0.08)),
    rgba(248, 250, 252, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
}

.dashboard-news-media-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.dashboard-news-media-dropzone span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.dashboard-news-media-dropzone strong {
  max-width: 100%;
  color: var(--text);
  font-size: 15px;
  font-weight: 950;
  line-height: 1.2;
  text-transform: none;
}

.dashboard-news-media-dropzone small {
  max-width: 300px;
  font-size: 11px;
  line-height: 1.35;
}

.dashboard-news-media-dropzone.is-dragging,
.dashboard-news-media-dropzone:focus-within {
  border-color: rgba(0, 113, 227, 0.82);
  box-shadow: 0 16px 36px rgba(0, 113, 227, 0.14), inset 0 0 0 1px rgba(0, 113, 227, 0.18);
  transform: translateY(-1px);
}

.dashboard-news-media-dropzone.has-file {
  border-style: solid;
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(0, 113, 227, 0.08)),
    rgba(248, 250, 252, 0.82);
}

.dashboard-news-rich-editor {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.58);
}

.dashboard-news-rich-editor-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.dashboard-news-rich-editor-head span {
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: none;
}

.dashboard-news-rich-editor-head small {
  max-width: 430px;
  text-align: right;
  line-height: 1.35;
}

.dashboard-news-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dashboard-news-editor-toolbar button {
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(0, 113, 227, 0.18);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(226, 232, 240, 0.72));
  color: var(--text);
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  cursor: pointer;
}

.dashboard-news-editor-toolbar button:hover {
  border-color: rgba(0, 113, 227, 0.4);
  color: var(--accent);
}

.dashboard-news-editor-toolbar button[data-dashboard-news-format="thin"] {
  font-weight: 520;
}

.dashboard-news-editor-toolbar button[data-dashboard-news-format="italic"] {
  font-style: italic;
}

.dashboard-news-rich-editor textarea[data-dashboard-news-body] {
  min-height: 190px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.82));
  line-height: 1.5;
}

.dashboard-news-rich-editor textarea[data-dashboard-news-body].is-dragging {
  border-color: rgba(0, 113, 227, 0.7);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.11);
}

.dashboard-news-body-media-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dashboard-news-body-media-chip,
.dashboard-news-body-media-empty {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: none;
}

.dashboard-news-body-media-chip img {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 999px;
  object-fit: cover;
}

.dashboard-news-body-media-chip span {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-news-graph-editor {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.52);
}

.dashboard-news-graph-editor-head,
.dashboard-news-graph-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(84px, 0.5fr);
  gap: 8px;
  align-items: center;
}

.dashboard-news-graph-editor-head {
  color: var(--muted);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dashboard-news-graph-row input {
  min-height: 34px;
  padding: 7px 9px;
}

.dashboard-news-admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dashboard-news-admin-list {
  min-height: 0;
  max-height: 520px;
  display: grid;
  align-content: start;
  gap: 8px;
  overflow: auto;
  padding-right: 3px;
  scrollbar-width: thin;
}

.dashboard-news-admin-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.6);
}

.dashboard-news-admin-row .dashboard-news-thumb {
  width: 64px;
  height: 54px;
}

.dashboard-news-admin-row .dashboard-news-thumb svg {
  width: 28px;
  height: 28px;
}

.dashboard-news-admin-row > span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.dashboard-news-admin-row strong,
.dashboard-news-admin-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-news-admin-row strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
}

.dashboard-news-admin-row small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
}

.dashboard-news-admin-row > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

@keyframes dashboardNetworkPulse {
  0%,
  100% {
    opacity: 0.34;
  }
  50% {
    opacity: 0.72;
  }
}

@keyframes dashboardNodeFloat {
  0%,
  100% {
    margin-top: 0;
  }
  50% {
    margin-top: -7px;
  }
}

.dashboard-summary-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.dashboard-summary-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.48);
}

.dashboard-summary-list dt,
.dashboard-summary-list dd {
  margin: 0;
}

.dashboard-summary-list dd {
  color: var(--text);
  font-weight: 900;
}

.dashboard-summary-list dd.danger {
  color: var(--heat-loss);
}

.dashboard-summary-list dd.accent {
  color: var(--heat-gain);
}

.dashboard-secondary-action {
  margin-top: auto;
}

.account-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
}

.account-menu-popover {
  position: absolute;
  top: 64px;
  right: 14px;
  width: min(940px, calc(100vw - 28px));
  max-height: calc(100vh - 78px);
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  background: rgba(248, 250, 252, 0.86);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.2);
  backdrop-filter: blur(22px);
  pointer-events: auto;
}

.account-menu-head {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.account-menu-head strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.15;
}

.account-menu-head span,
.account-section-title span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-transform: none;
}

.account-menu-head button,
.product-library-head-actions button#closeProductLibraryPanel {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: var(--button-glass);
  cursor: pointer;
}

.account-menu-body {
  display: grid;
  grid-template-columns: minmax(250px, 280px) minmax(0, 1fr);
  gap: 16px;
  padding-top: 16px;
}

.account-profile-card,
.account-menu-section,
.product-submission-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.46);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.account-profile-card {
  display: flex;
  align-items: center;
  align-self: start;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  text-align: center;
}

.account-profile-card strong {
  max-width: 100%;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-profile-card span,
.account-profile-card em {
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 760;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-main {
  display: grid;
  gap: 14px;
}

.account-menu-section {
  padding: 16px;
}

.account-menu-section h3 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.15;
}

.account-menu-grid,
.product-submission-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.account-menu-grid .full,
.product-submission-form .full {
  grid-column: 1 / -1;
}

.settings-field textarea {
  resize: vertical;
  min-height: 86px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: var(--input-glass);
  font: inherit;
  font-size: 12px;
  font-weight: 640;
}

.account-image-control {
  display: grid;
  gap: 8px;
  align-content: start;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.account-image-control div,
.account-menu-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-mini-btn.disabled {
  opacity: 0.48;
  cursor: not-allowed;
  pointer-events: none;
}

.account-password-button {
  align-self: end;
  min-height: 42px;
}

.account-message {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.2;
}

.account-message.error {
  color: var(--red);
}

.dashboard-project-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.dashboard-project-search,
.dashboard-company-toggle {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
  line-height: 1.2;
}

.dashboard-project-search svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.dashboard-project-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
  font-size: 11px;
  font-weight: 780;
}

.dashboard-project-search input::placeholder {
  color: var(--muted);
  opacity: 0.84;
}

.dashboard-company-toggle {
  cursor: pointer;
  white-space: nowrap;
}

.dashboard-company-toggle.disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

.dashboard-project-stage-slider {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(0, 113, 227, 0.13);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(239, 246, 255, 0.76), rgba(255, 255, 255, 0.6));
}

.dashboard-project-stage-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  padding: 4px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.dashboard-project-stage-track button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
  min-height: 38px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.dashboard-project-stage-track button:hover {
  border-color: rgba(0, 113, 227, 0.18);
  background: rgba(0, 113, 227, 0.07);
  color: var(--text);
}

.dashboard-project-stage-track button.active {
  border-color: rgba(0, 113, 227, 0.36);
  background: linear-gradient(135deg, var(--blue), #7c3aed);
  color: #fff;
  box-shadow: 0 10px 22px rgba(0, 113, 227, 0.22);
}

.dashboard-project-stage-track button span,
.dashboard-project-stage-track button em {
  min-width: 0;
}

.dashboard-project-stage-track button span {
  overflow: hidden;
  font-size: 11px;
  font-weight: 860;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-project-stage-track button em {
  display: inline-grid;
  min-width: 24px;
  height: 22px;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: inherit;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.dashboard-project-stage-track button.active em {
  background: rgba(255, 255, 255, 0.22);
}

.dashboard-project-stage-slider > small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 740;
  line-height: 1.25;
}

.dashboard-project-stage-retry {
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font: inherit;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dashboard-project-stage-retry:hover {
  color: var(--blue-hover);
}

.dashboard-project-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 9px 10px;
}

.dashboard-project-row.overlay-open {
  z-index: 30;
}

.dashboard-projects-tile:has(.dashboard-project-action-menu),
.dashboard-projects-tile:has(.dashboard-project-confirm) {
  position: relative;
  z-index: 20;
}

.dashboard-project-row.expanded {
  align-items: start;
}

.dashboard-project-row .dashboard-project-primary {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.dashboard-project-row .dashboard-project-primary strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 820;
  line-height: 1.18;
}

.dashboard-project-row .dashboard-project-primary small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.18;
}

.dashboard-project-row .dashboard-project-owner {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 170px;
  gap: 7px;
  padding: 3px 7px 3px 3px;
  border: 1px solid rgba(0, 113, 227, 0.12);
  border-radius: 999px;
  background: rgba(0, 113, 227, 0.06);
}

.dashboard-project-row .dashboard-project-owner-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(0, 113, 227, 0.18);
  border-radius: 50%;
  background: rgba(0, 113, 227, 0.1);
  color: var(--blue);
  font-size: 10px;
  font-weight: 820;
}

.dashboard-project-row .dashboard-project-owner-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard-project-row .dashboard-project-owner > strong {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-project-row .dashboard-project-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.dashboard-project-more {
  min-width: 34px;
  min-height: 34px;
  padding-inline: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 780;
  line-height: 1;
}

.dashboard-project-row .dashboard-open-project-btn {
  height: 28px;
  padding: 0 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 760;
}

.dashboard-project-commissioning-btn {
  height: 28px;
  padding: 0 9px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 760;
}

.dashboard-project-inline-form {
  grid-column: 1 / -1;
  margin-top: 10px;
}

.dashboard-project-action-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% - 4px);
  right: 10px;
  display: grid;
  min-width: 168px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.92);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.dashboard-project-action-menu button {
  min-height: 32px;
  padding: 0 11px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: var(--text);
  background: transparent;
  font-size: 11px;
  font-weight: 780;
  line-height: 1.15;
  text-align: left;
  cursor: pointer;
}

.dashboard-project-action-menu button:last-child {
  border-bottom: 0;
}

.dashboard-project-action-menu button.menu-section-start {
  border-top: 1px solid var(--line);
}

.dashboard-project-action-menu button.share-item {
  color: var(--blue);
}

.dashboard-project-action-menu button:hover {
  background: rgba(0, 113, 227, 0.08);
}

.dashboard-project-action-menu button.danger,
.dashboard-project-confirm .danger {
  color: var(--red);
}

.dashboard-project-inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: end;
}

.dashboard-project-confirm {
  position: absolute;
  z-index: 13;
  top: calc(100% - 4px);
  right: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 196px;
  padding: 7px;
  border: 1px solid rgba(239, 68, 68, 0.18);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.94);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.dashboard-project-confirm strong {
  color: var(--text);
}

.dashboard-project-confirm span {
  flex: 1 1 auto;
  color: var(--text);
  font-size: 11px;
  font-weight: 780;
  line-height: 1.2;
}

.dashboard-project-confirm .primary-mini,
.dashboard-project-confirm .settings-mini-btn {
  min-height: 26px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 780;
}

.dashboard-project-confirm [data-confirm-choice="yes"] {
  border-color: rgba(220, 38, 38, 0.82);
  background: linear-gradient(145deg, rgba(248, 113, 113, 0.98), rgba(220, 38, 38, 0.94));
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(220, 38, 38, 0.24);
}

.dashboard-project-confirm [data-confirm-choice="yes"]:hover {
  border-color: rgba(185, 28, 28, 0.9);
  background: linear-gradient(145deg, rgba(239, 68, 68, 1), rgba(185, 28, 28, 0.96));
  color: #ffffff;
}

.account-profile-card {
  position: relative;
}

.account-avatar-button {
  display: grid;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.account-avatar-button:hover .account-profile-avatar,
.company-overview-logo.clickable:hover {
  border-color: rgba(0, 113, 227, 0.45);
  box-shadow:
    0 18px 34px rgba(0, 113, 227, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.account-profile-name {
  max-width: 100%;
  border: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-profile-name:hover {
  color: var(--blue);
}

.account-profile-actions,
.account-popout-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.account-profile-actions {
  width: 100%;
  margin-top: 6px;
}

.account-popout {
  z-index: 3;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
}

.account-image-popout {
  justify-items: stretch;
}

.account-image-popout strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 820;
  line-height: 1.2;
  text-align: center;
}

.account-user-image-popout {
  position: absolute;
  top: 86px;
  right: 16px;
  left: 16px;
}

.account-name-popout {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  left: 0;
}

.account-password-popout {
  position: static;
  width: 100%;
  box-sizing: border-box;
  margin-top: 2px;
}

.account-password-heading {
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.2;
}

.account-password-requirements,
.account-password-feedback {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

.account-password-requirements {
  color: var(--muted);
}

.account-password-feedback {
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--blue) 28%, var(--line));
  border-radius: 10px;
  color: var(--blue);
  background: color-mix(in srgb, var(--blue) 7%, var(--surface-solid));
}

.account-password-feedback[hidden] {
  display: none;
}

.account-password-feedback.error {
  border-color: color-mix(in srgb, var(--red) 38%, var(--line));
  color: var(--red);
  background: color-mix(in srgb, var(--red) 7%, var(--surface-solid));
}

.account-password-feedback.success {
  border-color: color-mix(in srgb, var(--green) 38%, var(--line));
  color: var(--green);
  background: color-mix(in srgb, var(--green) 7%, var(--surface-solid));
}

.account-password-popout[data-status="loading"] input {
  opacity: 0.68;
  cursor: wait;
}

.company-overview-card {
  display: grid;
  position: relative;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.48);
}

.company-overview-card.editing {
  background: rgba(255, 255, 255, 0.62);
}

.company-overview-header {
  position: relative;
  display: flex;
  min-height: 132px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(0, 113, 227, 0.18), rgba(255, 255, 255, 0.2)),
    rgba(226, 232, 240, 0.7);
  background-size: cover;
  background-position: center;
  border-radius: 16px 16px 0 0;
}

.company-overview-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.06), rgba(15, 23, 42, 0.24));
  pointer-events: none;
}

.company-overview-header > * {
  position: relative;
  z-index: 1;
}

.company-header-image-button {
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.company-header-image-button:hover {
  background: rgba(0, 113, 227, 0.08);
}

.company-overview-logo {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--blue);
  font-size: 14px;
  font-weight: 860;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.16);
  cursor: default;
}

.company-overview-logo.clickable {
  z-index: 2;
  cursor: pointer;
}

.company-overview-header > .settings-mini-btn {
  z-index: 2;
}

.company-overview-header > .company-header-save {
  z-index: 2;
  min-width: 64px;
}

.company-overview-logo:disabled {
  opacity: 1;
}

.company-overview-logo img {
  width: 86%;
  height: 86%;
  object-fit: contain;
}

.company-logo-image-popout,
.company-header-image-popout {
  position: absolute;
  min-width: 168px;
}

.company-logo-image-popout {
  top: 82px;
  left: 12px;
}

.company-header-image-popout {
  top: 12px;
  right: 92px;
}

.company-overview-copy {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.company-overview-copy strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.15;
}

.company-overview-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.company-overview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.company-overview-meta span {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.15;
}

.company-inline-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.company-inline-field {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.company-inline-field > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.2;
}

.company-inline-field input,
.company-inline-field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: var(--input-glass);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.company-inline-field input {
  min-height: 36px;
  padding: 0 10px;
}

.company-inline-field textarea {
  min-height: 74px;
  resize: vertical;
  padding: 9px 10px;
  color: var(--muted);
  line-height: 1.45;
}

.company-name-field input {
  min-height: 40px;
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.15;
}

.company-inline-fields .company-inline-field input {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.15;
}

.company-overview-field {
  margin-top: 2px;
}

.company-inline-actions {
  justify-content: flex-start;
  margin-top: 4px;
}

.account-invite-button {
  align-self: end;
  min-height: 42px;
}

.account-company-members {
  display: grid;
  gap: 12px;
}

.company-member-invite {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px auto;
  gap: 10px;
  align-items: end;
}

.company-member-table {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.company-member-row {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1.76fr) minmax(88px, 0.82fr) minmax(80px, 0.76fr) minmax(86px, 0.84fr);
  align-items: center;
  gap: 7px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.42);
}

.company-member-head {
  min-height: 28px;
  padding-block: 5px;
  background: rgba(255, 255, 255, 0.28);
}

.company-member-head span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 0.04em;
  line-height: 1.15;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.company-member-name {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  gap: 8px;
}

.company-member-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.company-member-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 820;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-member-copy small,
.company-member-login,
.company-member-muted,
.company-member-empty,
.company-member-revoke-confirm span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.2;
}

.company-member-status,
.company-member-actions {
  display: flex;
  align-items: center;
  min-width: 0;
}

.company-member-status,
.company-member-actions {
  justify-content: flex-start;
}

.company-member-login {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-member-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(0, 113, 227, 0.16);
  border-radius: 50%;
  background: rgba(0, 113, 227, 0.08);
  color: var(--blue);
  font-size: 10px;
  font-weight: 820;
}

.company-member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.company-member-status-select {
  width: 100%;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
  color: var(--text);
  background: var(--input-glass);
  font: inherit;
  font-size: 11px;
  font-weight: 760;
}

.company-member-status-pill {
  display: inline-flex;
  max-width: 100%;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-member-status-pill.owner,
.company-member-status-pill.admin {
  border-color: rgba(0, 113, 227, 0.18);
  background: rgba(0, 113, 227, 0.08);
  color: var(--blue);
}

.company-member-revoke-btn {
  min-width: 66px;
}

.company-member-revoke-confirm {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 4px;
}

.company-member-revoke-confirm .settings-mini-btn {
  min-height: 26px;
  padding: 0 7px;
  border-radius: 8px;
  font-size: 11px;
}

.company-member-revoke-confirm [data-company-member-revoke-confirm] {
  border-color: rgba(220, 38, 38, 0.82);
  background: linear-gradient(145deg, rgba(248, 113, 113, 0.98), rgba(220, 38, 38, 0.94));
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(220, 38, 38, 0.22);
}

.company-member-empty {
  min-width: 320px;
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 10px;
}

html[data-theme="dark"] .dashboard-project-search,
html[data-theme="dark"] .dashboard-company-toggle,
html[data-theme="dark"] .dashboard-project-action-menu,
html[data-theme="dark"] .dashboard-project-confirm,
html[data-theme="dark"] .account-popout,
html[data-theme="dark"] .company-overview-card,
html[data-theme="dark"] .dashboard-team-row,
html[data-theme="dark"] .company-member-row,
html[data-theme="dark"] .company-member-status-pill,
html[data-theme="dark"] .company-overview-meta span {
  background: rgba(17, 24, 39, 0.74);
  border-color: rgba(148, 163, 184, 0.22);
}

html[data-theme="dark"] .company-overview-header {
  background:
    linear-gradient(135deg, rgba(10, 132, 255, 0.18), rgba(15, 23, 42, 0.3)),
    rgba(17, 24, 39, 0.84);
}

.product-library-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-library-head-actions button:not(#closeProductLibraryPanel) {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: var(--button-glass);
  font-weight: 900;
  cursor: pointer;
}

.product-library-head-actions button.active:not(#closeProductLibraryPanel) {
  border-color: rgba(0, 113, 227, 0.4);
  color: var(--blue);
  background: rgba(0, 113, 227, 0.1);
}

.product-submission-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
  padding: 16px;
}

.product-submission-head strong {
  display: block;
  color: var(--text);
  font-size: 18px;
}

.dashboard-dhw-workspace {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  padding: 14px 24px 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 0%, rgba(0, 113, 227, 0.14), transparent 30%),
    linear-gradient(180deg, rgba(245, 249, 255, 0.98), rgba(236, 242, 250, 0.94));
}

.hydraulic-header.dashboard-quick-tool-header {
  margin: 0;
  border: 1px solid rgba(209, 217, 230, 0.86);
  border-bottom-color: rgba(148, 163, 184, 0.28);
  border-radius: 24px 24px 0 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.9), transparent 32%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(245, 249, 255, 0.9));
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
}

.dashboard-quick-tool-header .hydraulic-close {
  min-width: 104px;
  transition:
    border-color 0.18s ease,
    background-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.dashboard-quick-tool-header .hydraulic-close:hover,
.dashboard-quick-tool-header .hydraulic-close:focus-visible {
  border-color: rgba(0, 113, 227, 0.46);
  background: rgba(0, 113, 227, 0.08);
  color: #0f7cff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 12px 26px rgba(0, 113, 227, 0.14);
  transform: translateY(-1px);
}

.dashboard-quick-tool-header .hydraulic-header-actions {
  gap: 10px;
}

.dashboard-dhw-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 12px;
  overflow: hidden;
}

.dashboard-dhw-panel,
.dashboard-dhw-results {
  min-width: 0;
}

.dashboard-dhw-panel {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 18px;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.7), transparent 42%),
    rgba(255, 255, 255, 0.68);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 14px 30px rgba(15, 23, 42, 0.08);
  box-sizing: border-box;
  overflow: hidden;
}

.dashboard-dhw-inputs,
.dashboard-dhw-results {
  min-height: 0;
  overflow: auto;
}

.dashboard-dhw-results {
  display: grid;
  align-content: start;
  gap: 14px;
}

.dashboard-dhw-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 2px;
}

.dashboard-dhw-panel-head span,
.dashboard-dhw-controls-grid label > span,
.dashboard-dhw-outlet-head span,
.dashboard-dhw-outlet-row span,
.dashboard-dhw-metric span,
.dashboard-dhw-hero-result small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: none;
}

.dashboard-dhw-panel-head strong {
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
  line-height: 1.08;
}

.dashboard-dhw-controls-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.dashboard-dhw-controls-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-dhw-controls-grid label,
.dashboard-dhw-outlet-row label,
.dashboard-dhw-outlet-row > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.dashboard-dhw-controls-grid input,
.dashboard-dhw-controls-grid select,
.dashboard-dhw-outlet-row input,
.dashboard-dhw-outlet-row select {
  width: 100%;
  min-width: 0;
  min-height: 29px;
  padding: 0 9px;
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
}

.dashboard-dhw-outlet-table {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.dashboard-dhw-outlet-head,
.dashboard-dhw-outlet-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 70px minmax(76px, 0.55fr) minmax(76px, 0.55fr) 34px;
  align-items: center;
  gap: 6px;
}

.dashboard-dhw-outlet-head {
  padding: 0 8px;
}

.dashboard-dhw-outlet-row {
  padding: 9px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.5);
}

.dashboard-dhw-outlet-row strong {
  display: block;
  min-width: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-dhw-outlet-row .settings-mini-btn {
  width: 34px;
  min-width: 34px;
  height: 29px;
  padding: 0;
  border-radius: 10px;
}

.dashboard-dhw-outlet-row .settings-mini-btn svg {
  width: 16px;
  height: 16px;
}

.dashboard-dhw-add-row {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 29px;
  padding: 0 10px;
  border: 1px solid rgba(0, 113, 227, 0.24);
  border-radius: 10px;
  background: rgba(0, 113, 227, 0.08);
  color: #0f7cff;
  font-size: 12px;
  font-weight: 950;
}

.dashboard-dhw-add-row svg {
  width: 18px;
  height: 18px;
}

.dashboard-dhw-hero-result {
  position: relative;
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid rgba(0, 113, 227, 0.2);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(15, 124, 255, 0.13), rgba(255, 255, 255, 0.62));
}

.dashboard-dhw-hero-result span {
  color: #0f7cff;
  font-size: 28px;
  font-weight: 950;
  line-height: 0.95;
}

.dashboard-dhw-hero-result strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
  line-height: 1.18;
}

.dashboard-dhw-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.dashboard-dhw-metric {
  position: relative;
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 6px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.54);
}

.dashboard-dhw-metric strong {
  display: block;
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-dhw-metric small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-dhw-service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.dashboard-dhw-service-card {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-top-width: 3px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
}

.dashboard-dhw-service-card.hot {
  border-top-color: #ef4444;
}

.dashboard-dhw-service-card.cold {
  border-top-color: #0f7cff;
}

.dashboard-dhw-service-card.mains {
  border-top-color: #22c55e;
}

.dashboard-dhw-service-title {
  display: grid;
  gap: 2px;
}

.dashboard-dhw-service-title span {
  color: var(--text);
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
}

.dashboard-dhw-service-card.hot .dashboard-dhw-service-title span {
  color: #dc2626;
}

.dashboard-dhw-service-card.cold .dashboard-dhw-service-title span {
  color: #0f7cff;
}

.dashboard-dhw-service-card.mains .dashboard-dhw-service-title span {
  color: #16a34a;
}

.dashboard-dhw-service-title small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.1;
}

.dashboard-dhw-service-value {
  position: relative;
  min-width: 0;
  display: grid;
  gap: 2px;
  min-height: 52px;
  padding: 7px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.56);
  text-align: left;
}

.dashboard-dhw-service-value span,
.dashboard-dhw-load-summary span,
.dashboard-dhw-storage-result span,
.dashboard-dhw-recommendation-head span,
.dashboard-dhw-product-match span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.dashboard-dhw-service-value strong,
.dashboard-dhw-load-summary strong,
.dashboard-dhw-storage-result strong {
  min-width: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 950;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-dhw-service-value small,
.dashboard-dhw-load-summary small,
.dashboard-dhw-storage-result small,
.dashboard-dhw-product-match small {
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.15;
}

.dashboard-dhw-load-summary,
.dashboard-dhw-storage-result {
  position: relative;
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.56);
}

.dashboard-dhw-storage-result {
  border-color: rgba(34, 197, 94, 0.24);
  background: linear-gradient(145deg, rgba(34, 197, 94, 0.1), rgba(255, 255, 255, 0.62));
}

.dashboard-dhw-storage-result strong {
  color: #16a34a;
  font-size: 24px;
}

.dashboard-dhw-controls-grid.storage {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-dhw-recommendations {
  min-height: 0;
  max-height: min(38vh, 420px);
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
}

.dashboard-dhw-recommendation-grid {
  min-height: 0;
  display: grid;
  gap: 8px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}

.dashboard-dhw-recommendation-card {
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.54);
}

.dashboard-dhw-recommendation-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.dashboard-dhw-recommendation-head strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 950;
  line-height: 1.15;
  text-align: right;
}

.dashboard-dhw-recommendation-list {
  display: grid;
  gap: 5px;
}

.dashboard-dhw-product-match {
  display: grid;
  gap: 2px;
  padding: 7px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.46);
}

.dashboard-dhw-product-match strong {
  min-width: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 950;
  line-height: 1.1;
}

.dashboard-dhw-toggle {
  min-height: 29px;
  align-self: end;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
}

.dashboard-dhw-toggle input {
  width: 16px;
  min-height: 16px;
  box-shadow: none;
}

.dashboard-dhw-toggle span {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  text-transform: none;
}

.dashboard-unit-workspace {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  padding: 14px 24px 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 0%, rgba(0, 113, 227, 0.14), transparent 30%),
    linear-gradient(180deg, rgba(245, 249, 255, 0.98), rgba(236, 242, 250, 0.94));
}

.dashboard-unit-header small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.dashboard-unit-header {
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.dashboard-unit-header h1 {
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1;
}

.dashboard-unit-header .dashboard-product-library-dashboard-btn {
  min-width: 96px;
  min-height: 42px;
  border: 1px solid rgba(0, 113, 227, 0.28);
  border-radius: 13px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  font-weight: 900;
}

.dashboard-unit-slider {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  padding: 3px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  background: rgba(226, 232, 240, 0.42);
  box-sizing: border-box;
}

.dashboard-unit-slider button {
  min-width: 0;
  min-height: 29px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
}

.dashboard-unit-slider button:hover,
.dashboard-unit-slider button.active {
  color: #ffffff;
  background: linear-gradient(145deg, #0f7cff, #0067d9);
  box-shadow: 0 10px 22px rgba(0, 113, 227, 0.22);
}

.dashboard-unit-section-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: auto;
}

.dashboard-unit-section {
  min-width: 0;
  max-width: 100%;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 18px;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.7), transparent 42%),
    rgba(255, 255, 255, 0.68);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 14px 30px rgba(15, 23, 42, 0.08);
  box-sizing: border-box;
  overflow: hidden;
}

.dashboard-unit-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-unit-section-controls {
  display: inline-flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.dashboard-unit-decimal-field {
  display: grid;
  gap: 3px;
  min-width: 106px;
}

.dashboard-unit-decimal-field span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.dashboard-unit-decimal-field input,
.dashboard-unit-decimal-field select {
  width: 100%;
  min-height: 29px;
  padding: 0 9px;
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
}

.dashboard-unit-section-head > div:first-child {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.dashboard-unit-section-head span,
.dashboard-unit-section-head small,
.dashboard-unit-card-head span,
.dashboard-unit-converter-grid label > span,
.dashboard-unit-result span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: none;
}

.dashboard-unit-section-head strong {
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
  line-height: 1.12;
}

.dashboard-unit-card-list {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

.dashboard-unit-card {
  min-width: 0;
  max-width: 100%;
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.5);
  box-sizing: border-box;
  overflow: hidden;
}

.dashboard-unit-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dashboard-unit-card-head span {
  color: var(--text);
  font-size: 14px;
  line-height: 1.08;
  font-weight: 950;
  text-transform: none;
}

.dashboard-unit-converter-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr) 34px minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: 6px;
  min-width: 0;
}

.dashboard-unit-converter-grid label {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.dashboard-unit-converter-grid input,
.dashboard-unit-converter-grid select {
  width: 100%;
  min-width: 0;
  min-height: 29px;
  padding: 0 9px;
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
}

.dashboard-unit-swap {
  display: grid;
  width: 34px;
  height: 29px;
  place-items: center;
  border: 1px solid rgba(0, 113, 227, 0.24);
  border-radius: 10px;
  background: rgba(0, 113, 227, 0.08);
  color: #0f7cff;
}

.dashboard-unit-swap svg {
  width: 15px;
  height: 15px;
}

.dashboard-unit-result {
  position: relative;
  min-width: 0;
  display: grid;
  gap: 2px;
  min-height: 48px;
  padding: 6px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.54);
}

.dashboard-copyable-result {
  cursor: copy;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.dashboard-copyable-result:hover,
.dashboard-copyable-result:focus-visible {
  border-color: rgba(0, 113, 227, 0.42);
  box-shadow: 0 10px 22px rgba(0, 113, 227, 0.12);
}

.dashboard-copyable-result:active {
  transform: translateY(1px);
}

.dashboard-copyable-result[data-copy-feedback]::after {
  content: attr(data-copy-feedback);
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  padding: 3px 7px;
  border: 1px solid rgba(34, 197, 94, 0.32);
  border-radius: 999px;
  background: rgba(220, 252, 231, 0.94);
  color: #15803d;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 8px 16px rgba(22, 163, 74, 0.16);
}

.dashboard-copyable-result.copy-failed[data-copy-feedback]::after {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(254, 226, 226, 0.94);
  color: #b91c1c;
  box-shadow: 0 8px 16px rgba(239, 68, 68, 0.14);
}

.dashboard-unit-result strong {
  display: block;
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-unit-result small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-quick-tender-workspace {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  padding: 14px 24px 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 0%, rgba(0, 113, 227, 0.14), transparent 30%),
    linear-gradient(180deg, rgba(245, 249, 255, 0.98), rgba(236, 242, 250, 0.94));
}

.quick-tender-shell {
  min-height: 0;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 310px;
  gap: 12px;
  overflow: hidden;
}

.quick-tender-side,
.quick-tender-main,
.quick-tender-summary,
.quick-tender-product-picker,
.quick-tender-sponsored-panel {
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 18px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.72), transparent 42%),
    rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 14px 30px rgba(15, 23, 42, 0.08);
}

.quick-tender-side {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 10px;
  padding: 10px;
  overflow: hidden;
}

.quick-tender-upload-zone {
  display: grid;
  gap: 8px;
  min-height: 154px;
  padding: 14px;
  border: 1px dashed rgba(0, 113, 227, 0.36);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(0, 113, 227, 0.1), rgba(255, 255, 255, 0.62));
  color: var(--text);
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.quick-tender-upload-zone:hover,
.quick-tender-upload-zone.dragging {
  border-color: rgba(0, 113, 227, 0.72);
  box-shadow: 0 14px 28px rgba(0, 113, 227, 0.14);
  transform: translateY(-1px);
}

.quick-tender-upload-zone svg {
  width: 34px;
  height: 34px;
  color: #0f7cff;
}

.quick-tender-upload-zone strong,
.quick-tender-main-head h1,
.quick-tender-sponsored-panel h2,
.quick-tender-product-picker h2 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 950;
  line-height: 1.04;
}

.quick-tender-upload-zone small,
.quick-tender-main-head p,
.quick-tender-message,
.quick-tender-sponsored-panel p,
.quick-tender-product-picker p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.25;
}

.quick-tender-file-list {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 7px;
  overflow: auto;
  padding-right: 3px;
}

.quick-tender-file-chip {
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.56);
}

.quick-tender-file-chip svg {
  width: 20px;
  height: 20px;
  color: #0f7cff;
}

.quick-tender-file-chip strong,
.quick-tender-file-chip small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-tender-file-chip strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 950;
}

.quick-tender-file-chip small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.quick-tender-side-actions {
  display: grid;
  gap: 7px;
}

.quick-tender-side-actions button,
.quick-tender-product-actions button,
.quick-tender-row-remove,
.quick-tender-sponsored-panel button,
.quick-tender-product-picker button,
.quick-tender-summary button {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--text);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
}

.quick-tender-side-actions button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 0 10px;
}

.quick-tender-side-actions button svg {
  width: 16px;
  height: 16px;
  color: #0f7cff;
}

.quick-tender-main {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  overflow: hidden;
}

.quick-tender-main-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.quick-tender-main-head span,
.quick-tender-table th,
.quick-tender-summary-head span,
.quick-tender-summary-grid span,
.quick-tender-pricing-controls label > span,
.quick-tender-sponsored-panel header span,
.quick-tender-product-picker header span,
.quick-tender-sponsored-editor label > span,
.quick-tender-picker-toolbar label > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.quick-tender-table-wrap {
  min-height: 0;
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.48);
}

.quick-tender-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.quick-tender-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 9px 8px;
  background: rgba(247, 250, 255, 0.96);
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.quick-tender-table td {
  padding: 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
  vertical-align: top;
}

.quick-tender-table tr:last-child td {
  border-bottom: 0;
}

.quick-tender-table th:nth-child(1) { width: 220px; }
.quick-tender-table th:nth-child(2) { width: 66px; }
.quick-tender-table th:nth-child(3) { width: 140px; }
.quick-tender-table th:nth-child(4) { width: 172px; }
.quick-tender-table th:nth-child(5) { width: 280px; }
.quick-tender-table th:nth-child(6) { width: 100px; }
.quick-tender-table th:nth-child(7) { width: 92px; }
.quick-tender-table th:nth-child(8) { width: 122px; }
.quick-tender-table th:nth-child(9) { width: 106px; }
.quick-tender-table th:nth-child(10) { width: 46px; }

.quick-tender-table input,
.quick-tender-table select,
.quick-tender-sponsored-editor input,
.quick-tender-sponsored-editor select,
.quick-tender-picker-toolbar input,
.quick-tender-picker-toolbar select,
.quick-tender-pricing-controls input,
.quick-tender-pricing-controls select {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid rgba(148, 163, 184, 0.36);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
}

.quick-tender-table select + select {
  margin-top: 6px;
}

.quick-tender-requirement-cell {
  display: grid;
  gap: 4px;
}

.quick-tender-requirement-cell small,
.quick-tender-table small {
  display: block;
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.18;
}

.quick-tender-qty-input {
  text-align: center;
}

.quick-tender-product-cell {
  display: grid;
  gap: 7px;
}

.quick-tender-product-pill {
  width: 100%;
  display: grid;
  gap: 2px;
  padding: 8px;
  border-color: rgba(0, 113, 227, 0.24);
  text-align: left;
  background: linear-gradient(145deg, rgba(0, 113, 227, 0.08), rgba(255, 255, 255, 0.6));
}

.quick-tender-product-pill span,
.quick-tender-product-pill small,
.quick-tender-no-match {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.quick-tender-product-pill strong {
  min-width: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 950;
  line-height: 1.1;
}

.quick-tender-no-match {
  display: block;
  padding: 8px;
  border: 1px dashed rgba(148, 163, 184, 0.36);
  border-radius: 10px;
}

.quick-tender-product-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.quick-tender-product-actions button {
  min-height: 28px;
  padding: 0 9px;
}

.quick-tender-product-actions span {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
}

.quick-tender-product-actions span.strong {
  color: #15803d;
  background: rgba(34, 197, 94, 0.12);
}

.quick-tender-product-actions span.review {
  color: #0f7cff;
  background: rgba(0, 113, 227, 0.12);
}

.quick-tender-product-actions span.weak {
  color: #b45309;
  background: rgba(245, 158, 11, 0.14);
}

.quick-tender-table .numeric {
  text-align: right;
}

.quick-tender-table .numeric strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 950;
}

.quick-tender-row-remove {
  width: 30px;
  height: 30px;
  padding: 0;
  color: #b91c1c;
}

.quick-tender-empty,
.quick-tender-empty-mini {
  display: grid;
  place-items: center;
  gap: 7px;
  min-height: 140px;
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.quick-tender-empty svg {
  width: 34px;
  height: 34px;
  color: #0f7cff;
}

.quick-tender-empty strong,
.quick-tender-empty-mini strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
}

.quick-tender-empty span,
.quick-tender-empty-mini {
  font-size: 11px;
  font-weight: 850;
}

.quick-tender-summary {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  overflow: auto;
}

.quick-tender-summary-head {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(0, 113, 227, 0.18);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(0, 113, 227, 0.12), rgba(255, 255, 255, 0.62));
}

.quick-tender-summary-head strong {
  color: var(--text);
  font-size: 26px;
  font-weight: 950;
  line-height: 1;
}

.quick-tender-summary-head small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.quick-tender-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.quick-tender-summary-grid article {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 9px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.54);
}

.quick-tender-summary-grid strong {
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quick-tender-pricing-controls {
  display: grid;
  align-content: start;
  gap: 8px;
}

.quick-tender-pricing-controls label {
  display: grid;
  gap: 3px;
}

.quick-tender-pricing-controls .pricing-portal-rate-menu-toggle {
  width: 100%;
}

.quick-tender-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  padding: 24px;
}

.quick-tender-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.34);
}

.quick-tender-product-picker,
.quick-tender-sponsored-panel {
  position: relative;
  z-index: 1;
  width: min(1040px, 96vw);
  max-height: min(780px, 92vh);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  overflow: hidden;
}

.quick-tender-product-picker header,
.quick-tender-sponsored-panel header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.quick-tender-product-picker header > div,
.quick-tender-sponsored-panel header > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.quick-tender-product-picker header button,
.quick-tender-sponsored-panel header button {
  min-width: 84px;
  min-height: 36px;
}

.quick-tender-picker-toolbar,
.quick-tender-sponsored-editor {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(150px, 0.55fr));
  gap: 8px;
}

.quick-tender-sponsored-editor {
  grid-template-columns: repeat(4, minmax(0, 1fr)) 130px;
  align-items: end;
}

.quick-tender-picker-search {
  position: relative;
}

.quick-tender-picker-search svg {
  position: absolute;
  left: 10px;
  top: 50%;
  width: 16px;
  height: 16px;
  color: var(--muted);
  transform: translateY(-50%);
}

.quick-tender-picker-search input {
  padding-left: 32px;
}

.quick-tender-picker-list,
.quick-tender-sponsored-list {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  overflow: auto;
  padding-right: 4px;
}

.quick-tender-picker-list button {
  min-width: 0;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px;
  text-align: left;
}

.quick-tender-picker-list button.selected {
  border-color: rgba(0, 113, 227, 0.5);
  background: rgba(0, 113, 227, 0.1);
}

.quick-tender-picker-thumb {
  display: grid;
  width: 64px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
  overflow: hidden;
}

.quick-tender-picker-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.quick-tender-picker-list strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
}

.quick-tender-picker-list small,
.quick-tender-picker-list em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.quick-tender-sponsored-list article {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.2fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.54);
}

.quick-tender-sponsored-list span,
.quick-tender-sponsored-list small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.quick-tender-sponsored-list strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
}

.dashboard-product-library-workspace {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  padding: 0 24px 24px;
  overflow: hidden;
}

.dashboard-product-library-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 4px;
}

.dashboard-product-library-header > div:first-child {
  display: grid;
  gap: 4px;
}

.dashboard-product-library-header span,
.dashboard-product-library-panel-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-product-library-header h1 {
  color: var(--text);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0;
}

.dashboard-product-library-header-actions,
.dashboard-product-library-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-product-library-tabs {
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--button-glass);
}

.dashboard-product-library-tabs button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.dashboard-product-library-tabs button.active {
  border-color: var(--blue-border);
  background: var(--blue-soft);
  color: var(--blue);
}

.dashboard-product-library-dashboard-btn {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--button-glass);
  font-size: 12px;
  font-weight: 900;
  box-shadow: var(--glass-edge);
}

.dashboard-product-library-dashboard-btn:hover {
  border-color: var(--blue-border);
  color: var(--blue);
  background: var(--blue-soft);
}

.dashboard-analytics-workspace {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  padding: 0 24px 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 0%, rgba(20, 184, 166, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(246, 249, 252, 0.96), rgba(236, 243, 247, 0.9));
}

.dashboard-analytics-header .dashboard-product-library-dashboard-btn:disabled {
  opacity: 0.62;
  cursor: wait;
}

.dashboard-analytics-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  gap: 14px;
  overflow: hidden;
}

.dashboard-analytics-sidebar,
.dashboard-analytics-main,
.dashboard-analytics-panel,
.dashboard-analytics-summary {
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: var(--glass-edge);
  box-sizing: border-box;
}

.dashboard-analytics-sidebar {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  overflow: hidden;
}

.dashboard-analytics-main {
  min-height: 0;
  display: grid;
  grid-auto-rows: min-content;
  gap: 12px;
  padding: 12px;
  overflow: auto;
  scrollbar-width: thin;
}

.dashboard-analytics-summary {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
}

.dashboard-analytics-summary > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.dashboard-analytics-summary span,
.dashboard-analytics-panel-head span,
.dashboard-analytics-metric span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.dashboard-analytics-summary h2 {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: 24px;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1.02;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-analytics-summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.dashboard-analytics-summary em {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.12);
  color: #0f766e;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
}

.dashboard-analytics-controls {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(132px, 160px) minmax(132px, 160px) auto;
  align-items: end;
  gap: 8px;
}

.dashboard-analytics-scale {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: rgba(226, 232, 240, 0.44);
}

.dashboard-analytics-scale button,
.dashboard-analytics-reset {
  min-width: 0;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 950;
}

.dashboard-analytics-scale button:hover,
.dashboard-analytics-scale button.active,
.dashboard-analytics-reset:hover {
  border-color: rgba(20, 184, 166, 0.34);
  background: rgba(20, 184, 166, 0.12);
  color: #0f766e;
}

.dashboard-analytics-controls label {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.dashboard-analytics-controls label span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-analytics-controls input {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  box-sizing: border-box;
}

.dashboard-analytics-reset {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.56);
}

.dashboard-analytics-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dashboard-analytics-panel-head strong {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-analytics-list,
.dashboard-analytics-card-list {
  min-height: 0;
  display: grid;
  grid-auto-rows: min-content;
  align-content: start;
  gap: 8px;
  overflow: auto;
  padding-right: 2px;
  scrollbar-width: thin;
}

.dashboard-analytics-list-search {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.dashboard-analytics-list-search span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-analytics-list-search input {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  box-sizing: border-box;
}

.dashboard-analytics-limited-list {
  max-height: calc((62px * 5) + (8px * 4));
}

.dashboard-analytics-limited-list.is-model-list {
  max-height: calc((56px * 5) + (8px * 4));
}

.dashboard-analytics-list button,
.dashboard-analytics-card {
  width: 100%;
  min-width: 0;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--text);
  text-align: left;
}

.dashboard-analytics-list button:hover,
.dashboard-analytics-card:hover,
.dashboard-analytics-list button.active,
.dashboard-analytics-card.active {
  border-color: rgba(20, 184, 166, 0.42);
  background: rgba(20, 184, 166, 0.1);
  box-shadow: 0 10px 24px rgba(20, 184, 166, 0.1);
}

.dashboard-analytics-list button span,
.dashboard-analytics-card span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.dashboard-analytics-list button strong,
.dashboard-analytics-card strong {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
  line-height: 1.12;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-analytics-list button small,
.dashboard-analytics-card small {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-analytics-list button em,
.dashboard-analytics-card em {
  flex: 0 0 auto;
  min-width: 52px;
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
  text-align: center;
}

.dashboard-analytics-list-note {
  padding: 9px;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.25;
}

.dashboard-analytics-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(104px, 1fr));
  gap: 8px;
}

.dashboard-analytics-metric {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.dashboard-analytics-metric strong {
  min-width: 0;
  color: var(--text);
  font-size: 22px;
  font-weight: 950;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-analytics-chart-grid,
.dashboard-analytics-table-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-analytics-chart-panel {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: var(--glass-edge);
  overflow: hidden;
}

.dashboard-analytics-chart {
  width: 100%;
  height: auto;
  display: block;
}

.dashboard-analytics-chart-bg {
  fill: rgba(248, 250, 252, 0.72);
}

.dashboard-analytics-chart-axis {
  stroke: rgba(148, 163, 184, 0.5);
  stroke-width: 1;
}

.dashboard-analytics-chart-line {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-analytics-chart-line.views {
  stroke: #0f7cff;
}

.dashboard-analytics-chart-line.tools {
  stroke: #14b8a6;
}

.dashboard-analytics-chart-hover-target {
  fill: transparent;
  pointer-events: all;
}

.dashboard-analytics-chart-hover-line {
  stroke: rgba(15, 23, 42, 0.2);
  stroke-width: 1;
  stroke-dasharray: 4 4;
  opacity: 0;
  pointer-events: none;
}

.dashboard-analytics-chart-hover-dot {
  stroke: #fff;
  stroke-width: 2;
  opacity: 0;
  pointer-events: none;
}

.dashboard-analytics-chart-hover-dot.views {
  fill: #0f7cff;
}

.dashboard-analytics-chart-hover-dot.tools {
  fill: #14b8a6;
}

.dashboard-analytics-chart-tooltip {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.14s ease;
}

.dashboard-analytics-chart-tooltip rect {
  fill: rgba(15, 23, 42, 0.94);
  stroke: rgba(255, 255, 255, 0.16);
}

.dashboard-analytics-chart-tooltip text {
  fill: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  font-weight: 850;
}

.dashboard-analytics-chart-tooltip text.title {
  fill: #fff;
  font-weight: 950;
}

.dashboard-analytics-chart-hover-point:hover .dashboard-analytics-chart-hover-line,
.dashboard-analytics-chart-hover-point:focus .dashboard-analytics-chart-hover-line,
.dashboard-analytics-chart-hover-point:focus-within .dashboard-analytics-chart-hover-line,
.dashboard-analytics-chart-hover-point:hover .dashboard-analytics-chart-hover-dot,
.dashboard-analytics-chart-hover-point:focus .dashboard-analytics-chart-hover-dot,
.dashboard-analytics-chart-hover-point:focus-within .dashboard-analytics-chart-hover-dot,
.dashboard-analytics-chart-hover-point:hover .dashboard-analytics-chart-tooltip,
.dashboard-analytics-chart-hover-point:focus .dashboard-analytics-chart-tooltip,
.dashboard-analytics-chart-hover-point:focus-within .dashboard-analytics-chart-tooltip {
  opacity: 1;
}

.dashboard-analytics-chart-label,
.dashboard-analytics-chart-value {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.dashboard-analytics-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dashboard-analytics-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.dashboard-analytics-chart-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.dashboard-analytics-chart-legend .views,
.dashboard-analytics-status-bar.active,
.dashboard-analytics-chart-legend .active {
  background: #0f7cff;
  fill: #0f7cff;
}

.dashboard-analytics-chart-legend .tools {
  background: #14b8a6;
}

.dashboard-analytics-status-bar.completed,
.dashboard-analytics-chart-legend .completed {
  background: #16a34a;
  fill: #16a34a;
}

.dashboard-analytics-status-bar.lost,
.dashboard-analytics-chart-legend .lost {
  background: #ef4444;
  fill: #ef4444;
}

.dashboard-analytics-drilldown {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 12px;
  overflow: hidden;
}

.dashboard-analytics-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  overflow: hidden;
}

.dashboard-analytics-card-list.compact .dashboard-analytics-card {
  min-height: 56px;
}

.dashboard-analytics-projects {
  min-height: 170px;
  max-height: 240px;
}

.dashboard-analytics-table-panel {
  min-height: 260px;
}

.dashboard-analytics-data-table {
  min-height: 0;
  display: grid;
  gap: 6px;
  overflow: auto;
  scrollbar-width: thin;
}

.dashboard-analytics-data-head,
.dashboard-analytics-data-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.8fr) repeat(6, minmax(70px, 0.6fr));
  align-items: center;
  gap: 8px;
}

.dashboard-analytics-data-head {
  padding: 0 8px;
}

.dashboard-analytics-data-head span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-analytics-data-row {
  min-height: 40px;
  position: relative;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.54);
}

.dashboard-analytics-data-row strong,
.dashboard-analytics-data-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-analytics-data-row strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 950;
}

.dashboard-analytics-data-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.dashboard-analytics-data-row::after {
  content: attr(data-dashboard-analytics-row-figure);
  position: absolute;
  right: 8px;
  top: 50%;
  max-width: min(520px, calc(100% - 16px));
  padding: 7px 9px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 7px;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-50%) translateX(4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 4;
}

.dashboard-analytics-data-row:hover,
.dashboard-analytics-data-row:focus-visible,
.dashboard-analytics-data-row:focus-within {
  border-color: rgba(20, 184, 166, 0.42);
  background: rgba(20, 184, 166, 0.1);
}

.dashboard-analytics-data-row:hover::after,
.dashboard-analytics-data-row:focus-visible::after,
.dashboard-analytics-data-row:focus-within::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.dashboard-analytics-data-cell {
  cursor: help;
}

.dashboard-analytics-compare {
  min-height: 0;
}

.dashboard-analytics-compare-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.dashboard-analytics-compare-controls label {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.dashboard-analytics-compare-controls label span,
.dashboard-analytics-compare-title span,
.dashboard-analytics-compare-row > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-analytics-compare-controls select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.dashboard-analytics-compare-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px 12px;
}

.dashboard-analytics-compare-title,
.dashboard-analytics-compare-row {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.dashboard-analytics-compare-title {
  display: grid;
  gap: 4px;
}

.dashboard-analytics-compare-title strong {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-analytics-compare-title.competitor {
  border-color: rgba(99, 102, 241, 0.24);
  background: rgba(99, 102, 241, 0.08);
}

.dashboard-analytics-compare-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(120px, 0.72fr) minmax(0, 1fr) minmax(104px, 0.42fr);
  align-items: center;
  gap: 10px;
}

.dashboard-analytics-compare-bars {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.dashboard-analytics-compare-bars i {
  width: var(--value);
  min-width: 8px;
  height: 10px;
  border-radius: 999px;
}

.dashboard-analytics-compare-bars .primary {
  background: linear-gradient(90deg, #14b8a6, #0f7cff);
}

.dashboard-analytics-compare-bars .competitor {
  background: linear-gradient(90deg, #818cf8, #c084fc);
}

.dashboard-analytics-compare-row em {
  justify-self: end;
  min-width: 0;
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.12);
  color: #0f766e;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
  text-align: center;
  white-space: nowrap;
}

.dashboard-analytics-compare-row.behind em {
  background: rgba(99, 102, 241, 0.12);
  color: #4338ca;
}

.dashboard-analytics-compare-row.close em {
  background: rgba(234, 179, 8, 0.14);
  color: #92400e;
}

.dashboard-analytics-compare-note {
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
  line-height: 1.25;
}

.dashboard-analytics-project-table {
  min-height: 0;
  display: grid;
  gap: 7px;
  overflow: auto;
  scrollbar-width: thin;
}

.dashboard-analytics-project-head,
.dashboard-analytics-project-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(130px, 0.8fr) minmax(130px, 0.8fr) minmax(96px, 0.55fr);
  align-items: center;
  gap: 8px;
}

.dashboard-analytics-project-head {
  padding: 0 8px;
}

.dashboard-analytics-project-head span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-analytics-project-row {
  min-height: 42px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.54);
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.dashboard-analytics-project-row:hover {
  border-color: rgba(20, 184, 166, 0.42);
  background: rgba(20, 184, 166, 0.1);
  box-shadow: 0 10px 24px rgba(20, 184, 166, 0.1);
}

.dashboard-analytics-project-row strong,
.dashboard-analytics-project-row span,
.dashboard-analytics-project-row small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-analytics-project-row strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 950;
}

.dashboard-analytics-project-row span,
.dashboard-analytics-project-row small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.dashboard-analytics-project-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
}

.dashboard-analytics-project-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.38);
}

.dashboard-analytics-project-popup {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 32px));
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.96);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
  overflow: auto;
}

.dashboard-analytics-project-popup > header,
.dashboard-analytics-project-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-analytics-project-modal-head.compact {
  align-items: center;
}

.dashboard-analytics-project-popup > header div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.dashboard-analytics-project-popup > header span,
.dashboard-analytics-project-modal-head span,
.dashboard-analytics-project-value-grid span,
.dashboard-analytics-project-action-form span,
.dashboard-analytics-profile-head small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-analytics-project-popup h2 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1.08;
}

.dashboard-analytics-project-popup header small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.dashboard-analytics-project-value-grid,
.dashboard-analytics-project-identity-grid,
.dashboard-analytics-project-activity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-analytics-project-value-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-analytics-project-value-grid article,
.dashboard-analytics-company-identity-card,
.dashboard-analytics-user-identity-card,
.dashboard-analytics-profile-card,
.dashboard-analytics-project-action-form,
.dashboard-analytics-project-products,
.dashboard-analytics-project-activity {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: var(--glass-edge);
}

.dashboard-analytics-company-identity-card {
  padding: 0;
  overflow: hidden;
}

.dashboard-analytics-company-cover {
  min-height: 118px;
  display: flex;
  align-items: flex-start;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.28), rgba(20, 184, 166, 0.18)),
    linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.42));
  background-position: center;
  background-size: cover;
}

.dashboard-analytics-company-cover span {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
  box-shadow: var(--glass-edge);
}

.dashboard-analytics-company-profile-row {
  min-width: 0;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 0 12px 8px;
  margin-top: -36px;
}

.dashboard-analytics-company-avatar {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 4px solid rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  background: #fff;
  color: #0f766e;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}

.dashboard-analytics-company-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dashboard-analytics-company-profile-row > span:last-child {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding-bottom: 4px;
}

.dashboard-analytics-company-profile-row small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.dashboard-analytics-company-profile-row strong {
  min-width: 0;
  color: var(--text);
  font-size: 19px;
  font-weight: 950;
  line-height: 1.05;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-analytics-company-profile-row em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 820;
  line-height: 1.24;
}

.dashboard-analytics-project-value-grid strong {
  min-width: 0;
  color: var(--text);
  font-size: 19px;
  font-weight: 950;
  line-height: 1.04;
  overflow-wrap: anywhere;
}

.dashboard-analytics-project-value-grid small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.22;
}

.dashboard-analytics-profile-head {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-analytics-profile-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(20, 184, 166, 0.12);
  color: #0f766e;
  overflow: hidden;
}

.dashboard-analytics-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard-analytics-profile-head span:last-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.dashboard-analytics-profile-head strong {
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-analytics-profile-card dl {
  margin: 0;
  display: grid;
  gap: 6px;
}

.dashboard-analytics-company-identity-card dl,
.dashboard-analytics-user-identity-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 12px 12px;
}

.dashboard-analytics-user-identity-card dl {
  padding: 0;
}

.dashboard-analytics-company-identity-card dl div,
.dashboard-analytics-user-identity-card dl div,
.dashboard-analytics-profile-card dl div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.dashboard-analytics-company-identity-card dt,
.dashboard-analytics-user-identity-card dt,
.dashboard-analytics-profile-card dt {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-analytics-company-identity-card dd,
.dashboard-analytics-user-identity-card dd,
.dashboard-analytics-profile-card dd {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 820;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.dashboard-analytics-project-products {
  gap: 10px;
}

.dashboard-analytics-project-product-list {
  display: grid;
  gap: 8px;
}

.dashboard-analytics-project-product-list article {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(241, 245, 249, 0.58);
}

.dashboard-analytics-project-product-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
}

.dashboard-analytics-project-product-row span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.dashboard-analytics-project-product-row strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.dashboard-analytics-project-product-row small,
.dashboard-analytics-project-no-accessories {
  color: var(--muted);
  font-size: 10px;
  font-weight: 820;
  line-height: 1.25;
}

.dashboard-analytics-project-product-row b,
.dashboard-analytics-project-product-row em {
  color: var(--text);
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

.dashboard-analytics-project-accessory-list {
  display: grid;
  gap: 6px;
}

.dashboard-analytics-project-accessory-list span {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 6px 8px;
  align-items: center;
  padding: 7px 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
}

.dashboard-analytics-project-accessory-list i {
  color: #0f766e;
  font-size: 9px;
  font-style: normal;
  font-weight: 950;
  text-transform: uppercase;
}

.dashboard-analytics-project-accessory-list strong {
  min-width: 0;
  color: var(--text);
  font-size: 11px;
  font-weight: 920;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-analytics-project-accessory-list small {
  grid-column: 2 / 4;
  color: var(--muted);
  font-size: 10px;
  font-weight: 780;
  line-height: 1.24;
}

.dashboard-analytics-project-accessory-list b {
  color: var(--text);
  font-size: 10px;
  font-weight: 950;
}

.dashboard-analytics-project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-analytics-project-action-form label {
  display: grid;
  gap: 6px;
}

.dashboard-analytics-project-action-form textarea {
  width: 100%;
  min-height: 118px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  resize: vertical;
  box-sizing: border-box;
}

.dashboard-analytics-project-action-form > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-analytics-project-activity article {
  display: grid;
  gap: 4px;
  padding: 8px;
  border-radius: 7px;
  background: rgba(241, 245, 249, 0.72);
}

.dashboard-analytics-project-activity p {
  margin: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 820;
  line-height: 1.28;
}

.dashboard-analytics-project-activity small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 820;
}

.dashboard-product-library-workspace.storefront-mode {
  display: block;
  min-height: 0;
  overflow: auto;
  padding: 0 24px 36px;
  background:
    radial-gradient(circle at 14% 0%, rgba(255, 255, 255, 0.7), transparent 28%),
    linear-gradient(180deg, rgba(245, 247, 251, 0.84), rgba(238, 243, 249, 0.78));
}

.dashboard-product-library-workspace.storefront-mode .dashboard-product-library-header,
.dashboard-product-storefront {
  width: min(100%, 1520px);
  margin: 0 auto;
}

.dashboard-product-library-workspace.storefront-mode .dashboard-product-library-header {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 14px 0 8px;
  background: linear-gradient(180deg, rgba(245, 247, 251, 0.94), rgba(245, 247, 251, 0.72));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.dashboard-product-storefront {
  display: grid;
  gap: 42px;
  padding: 26px 0 20px;
}

.dashboard-product-store-hero {
  min-height: 190px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  align-items: end;
  gap: 28px;
  padding: 26px 0 10px;
}

.dashboard-product-store-hero > div {
  display: grid;
  gap: 10px;
}

.dashboard-product-store-hero span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-product-store-hero h2 {
  color: var(--text);
  font-size: 68px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.98;
  margin: 0;
}

.dashboard-product-store-hero p {
  max-width: 720px;
  color: var(--muted);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.22;
  margin: 0;
}

.dashboard-product-store-hero aside {
  justify-self: end;
  display: grid;
  justify-items: end;
  gap: 10px;
  color: var(--text);
  text-align: right;
}

.dashboard-product-store-hero aside strong {
  max-width: 320px;
  color: var(--text);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.08;
}

.dashboard-product-store-hero aside small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-product-store-categories,
.dashboard-product-feature-rail {
  min-width: 0;
  display: grid;
  grid-auto-flow: column;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

.dashboard-product-store-categories {
  grid-auto-columns: 132px;
  align-items: start;
  gap: 26px;
  padding: 4px 0 8px;
}

.dashboard-product-store-category {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: center;
}

.dashboard-product-store-category-visual {
  width: 106px;
  height: 86px;
  display: grid;
  place-items: center;
}

.dashboard-product-store-category .product-photo {
  width: 106px;
  min-height: 78px;
  padding: 8px;
  border-radius: 8px;
}

.dashboard-product-store-category .product-photo-image > img:not(.product-brand-logo) {
  max-width: 100%;
  height: 52px;
}

.dashboard-product-store-category strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.15;
}

.dashboard-product-store-category small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
}

.dashboard-product-store-category:hover strong,
.dashboard-product-store-category.active strong {
  color: var(--blue);
}

.dashboard-product-store-section {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.dashboard-product-store-section-head {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.dashboard-product-store-section-head h2 {
  color: var(--text);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0;
}

.dashboard-product-store-section-head span {
  color: var(--muted);
  font-size: 28px;
  font-weight: 850;
}

.dashboard-product-feature-rail {
  grid-auto-columns: minmax(340px, 430px);
  gap: 18px;
  padding: 2px 4px 14px 0;
}

.dashboard-product-feature-card {
  min-width: 0;
  min-height: 420px;
  display: grid;
  grid-template-rows: auto minmax(180px, 1fr) auto;
  align-content: start;
  gap: 16px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  text-align: left;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08), var(--glass-edge);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.dashboard-product-feature-card:hover {
  border-color: var(--blue-border);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.12), var(--glass-edge);
  transform: translateY(-2px);
}

.dashboard-product-feature-copy {
  display: grid;
  gap: 8px;
}

.dashboard-product-feature-copy em {
  color: #b45309;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-product-feature-copy strong {
  color: var(--text);
  font-size: 27px;
  font-weight: 900;
  line-height: 1.05;
}

.dashboard-product-feature-copy span {
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.28;
}

.dashboard-product-feature-copy small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
  line-height: 1.35;
}

.dashboard-product-feature-card .product-photo {
  width: 100%;
  min-height: 190px;
  align-self: end;
}

.dashboard-product-feature-card .product-photo-image > img:not(.product-brand-logo) {
  max-width: 100%;
  height: 154px;
}

.dashboard-product-feature-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.dashboard-product-feature-metrics i {
  min-width: 0;
  min-height: 34px;
  display: grid;
  place-items: center;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(248, 250, 252, 0.72);
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
}

.dashboard-product-store-explore {
  padding-bottom: 8px;
}

.dashboard-product-store-explore .dashboard-product-library-title,
.dashboard-product-store-explore .product-search-row,
.dashboard-product-store-explore .product-filter-grid,
.dashboard-product-store-explore .product-results-head {
  width: 100%;
}

.dashboard-product-store-results .product-result-list,
.dashboard-product-store-results .product-range-list {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.dashboard-product-store-results .product-result-card {
  min-height: 230px;
  border-color: rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07), var(--glass-edge);
}

.dashboard-product-library-workspace.mail-mode {
  padding: 0 18px 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 0%, rgba(255, 255, 255, 0.62), transparent 28%),
    linear-gradient(180deg, rgba(245, 247, 251, 0.88), rgba(238, 243, 249, 0.82));
}

.dashboard-product-library-workspace.mail-mode .dashboard-product-library-header {
  padding: 12px 0 8px;
}

.dashboard-product-library-workspace.management-mode {
  padding: 0 18px 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 0%, rgba(255, 255, 255, 0.62), transparent 28%),
    linear-gradient(180deg, rgba(245, 247, 251, 0.9), rgba(238, 243, 249, 0.84));
}

.dashboard-product-library-workspace.management-mode .dashboard-product-library-header {
  padding: 12px 0 8px;
}

.dashboard-product-library-workspace,
.dashboard-product-range-popup {
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
}

.dashboard-product-library-workspace button,
.dashboard-product-library-workspace input,
.dashboard-product-library-workspace select,
.dashboard-product-library-workspace textarea,
.dashboard-product-range-popup button,
.dashboard-product-range-popup input,
.dashboard-product-range-popup select,
.dashboard-product-range-popup textarea {
  letter-spacing: 0;
}

.dashboard-product-library-workspace h2,
.dashboard-product-library-workspace h3,
.dashboard-product-range-popup h2,
.dashboard-product-range-popup h3 {
  letter-spacing: 0;
  line-height: 1.12;
}

.dashboard-product-library-workspace small,
.dashboard-product-library-workspace p,
.dashboard-product-library-workspace label,
.dashboard-product-range-popup small,
.dashboard-product-range-popup p,
.dashboard-product-range-popup label {
  line-height: 1.35;
}

.dashboard-product-mail {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: var(--tile-glass);
  box-shadow: var(--glass-edge), 0 18px 42px rgba(15, 23, 42, 0.1);
  overflow: hidden;
}

.dashboard-product-mail-toolbar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--tile-glass-strong);
}

.dashboard-product-mail-toolbar > div:first-child,
.dashboard-product-mail-list-head > div,
.dashboard-product-mail-reader-head > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.dashboard-product-mail-toolbar span,
.dashboard-product-mail-list-head span,
.dashboard-product-mail-reader-head span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-product-mail-toolbar strong,
.dashboard-product-mail-list-head strong {
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-product-mail-toolbar small,
.dashboard-product-mail-list-head small,
.dashboard-product-mail-reader-head small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-product-mail-reader-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.dashboard-product-mail-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(218px, 258px) minmax(330px, 420px) minmax(0, 1fr);
  overflow: hidden;
  transition: grid-template-columns 0.22s ease;
}

.dashboard-product-mail-layout.sidebar-collapsed {
  grid-template-columns: 66px minmax(320px, 390px) minmax(0, 1fr);
}

.dashboard-product-mail-sidebar,
.dashboard-product-mail-list-pane,
.dashboard-product-mail-reader {
  min-width: 0;
  min-height: 0;
  overflow: auto;
}

.dashboard-product-mail-sidebar {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 14px 10px;
  border-right: 1px solid var(--line);
  background: rgba(248, 250, 252, 0.52);
  transition: padding 0.22s ease;
}

.dashboard-product-mail-sidebar-controls {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 4px;
}

.dashboard-product-mail-sidebar-controls > span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

#dashboardProductLibraryCategories {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.dashboard-product-mailbox-section {
  display: grid;
  gap: 6px;
}

.dashboard-product-mailbox-subcategories {
  display: grid;
  gap: 5px;
  padding-left: 14px;
  border-left: 2px solid color-mix(in srgb, var(--blue) 42%, transparent);
}

.dashboard-product-mailbox-heading {
  padding: 0 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.dashboard-product-mailbox-row {
  min-width: 0;
  width: 100%;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.dashboard-product-mail-layout.sidebar-collapsed .dashboard-product-mail-sidebar {
  padding: 14px 7px;
  gap: 8px;
}

.dashboard-product-mail-layout.sidebar-collapsed .dashboard-product-mail-sidebar-controls {
  justify-content: center;
  padding: 0;
}

.dashboard-product-mail-layout.sidebar-collapsed .dashboard-product-mail-sidebar-controls > span {
  display: none;
}

.dashboard-product-mail-layout.sidebar-collapsed .dashboard-product-mailbox-heading,
.dashboard-product-mail-layout.sidebar-collapsed .dashboard-product-mailbox-row span,
.dashboard-product-mail-layout.sidebar-collapsed .dashboard-product-mailbox-row em,
.dashboard-product-mail-layout.sidebar-collapsed .dashboard-product-mailbox-subcategories {
  display: none;
}

.dashboard-product-mail-layout.sidebar-collapsed .dashboard-product-mailbox-section {
  gap: 7px;
}

.dashboard-product-mail-layout.sidebar-collapsed .dashboard-product-mailbox-row {
  min-height: 44px;
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 8px;
}

.dashboard-product-mail-layout.sidebar-collapsed .dashboard-product-mailbox-row i svg {
  width: 22px;
  height: 22px;
}

.dashboard-product-mail-layout.sidebar-collapsed .dashboard-product-mail-reader-hero {
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
}

.dashboard-product-mailbox-row.compact {
  min-height: 36px;
}

.dashboard-product-mailbox-row.is-summary {
  opacity: 1;
}

.dashboard-product-mailbox-row i,
.dashboard-product-mail-icon {
  display: grid;
  place-items: center;
  color: var(--blue);
}

.dashboard-product-mailbox-row i svg {
  width: 20px;
  height: 20px;
}

.dashboard-product-mailbox-row span {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.dashboard-product-mailbox-row strong,
.dashboard-product-mailbox-row small,
.dashboard-product-mailbox-row em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-product-mailbox-row strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.dashboard-product-mailbox-row small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
}

.dashboard-product-mailbox-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.dashboard-product-mailbox-row:hover,
.dashboard-product-mailbox-row.active {
  border-color: var(--blue-border);
  background: var(--blue-soft);
}

.dashboard-product-mail-list-pane {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.36);
}

.dashboard-product-mail-list-head {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 10px;
}

.dashboard-product-mail-icon {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--button-glass);
}

.dashboard-product-mail-icon svg {
  width: 17px;
  height: 17px;
}

.dashboard-product-mail-search {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin: 0 14px 10px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--input-bg);
}

.dashboard-product-mail-search svg {
  width: 16px;
  height: 16px;
}

.dashboard-product-mail-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.dashboard-product-mail-filter-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 14px 12px;
}

.dashboard-product-mail-filter-strip label {
  min-width: 0;
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.dashboard-product-mail-filter-strip select {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--input-bg);
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  padding: 0 8px;
}

.dashboard-product-mail-list {
  min-height: 0;
  overflow: auto;
  border-top: 1px solid var(--line);
}

.product-library-show-more {
  width: calc(100% - 24px);
  min-height: 48px;
  display: grid;
  place-items: center;
  gap: 2px;
  margin: 12px;
  padding: 8px 14px;
  border: 1px solid var(--blue-border);
  border-radius: 9px;
  background: var(--blue-soft);
  color: var(--blue);
  box-shadow: var(--glass-edge);
}

.product-library-show-more:hover,
.product-library-show-more:focus-visible {
  background: var(--control-hover-bg);
  box-shadow: var(--control-hover-shadow);
  outline: none;
}

.product-library-show-more strong {
  font-size: 12px;
  font-weight: 900;
}

.product-library-show-more small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
}

.dashboard-product-mail-item {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  padding: 11px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  background: transparent;
  text-align: left;
}

.dashboard-product-mail-item:hover,
.dashboard-product-mail-item.active {
  background: var(--blue-soft);
}

.dashboard-product-mail-item.active {
  box-shadow: inset 4px 0 0 var(--blue);
}

.dashboard-product-mail-item-photo {
  min-width: 0;
}

.dashboard-product-mail-item-photo .product-photo {
  width: 54px;
  min-height: 54px;
  padding: 5px;
  border-radius: 8px;
}

.dashboard-product-mail-item-photo .product-photo-image > img:not(.product-brand-logo) {
  max-width: 100%;
  height: 34px;
}

.dashboard-product-mail-item-photo .product-photo-brand {
  display: none;
}

.dashboard-product-mail-item-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.dashboard-product-mail-item-copy > span {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.dashboard-product-mail-item-copy strong,
.dashboard-product-mail-item-copy small,
.dashboard-product-mail-item-copy b,
.dashboard-product-mail-item-copy i,
.dashboard-product-mail-item-copy em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-product-mail-item-copy strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.dashboard-product-mail-item-copy em {
  color: var(--blue);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.dashboard-product-mail-item-copy small,
.dashboard-product-mail-item-copy i {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 780;
}

.dashboard-product-mail-item-copy small.dashboard-product-mail-suitability {
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 2px 6px;
  border: 1px solid rgba(0, 122, 255, 0.22);
  border-radius: 999px;
  background: rgba(0, 122, 255, 0.07);
  color: #075fb8;
  font-size: 9px;
  font-weight: 900;
}

.dashboard-product-mail-item-copy b {
  color: var(--text);
  font-size: 12px;
  font-weight: 820;
}

.dashboard-product-mail-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.dashboard-product-mail-empty svg {
  width: 18px;
  height: 18px;
}

.dashboard-product-mail-reader {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.18);
}

.dashboard-product-mail-reader-head {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.dashboard-product-mail-reader-head h2 {
  overflow: hidden;
  color: var(--text);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.05;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-product-mail-avatar {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--button-glass);
  overflow: hidden;
}

.dashboard-product-mail-avatar img {
  max-width: 60px;
  max-height: 36px;
  object-fit: contain;
}

.dashboard-product-mail-avatar span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.dashboard-product-mail-reader-hero {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.dashboard-product-mail-reader-hero .product-photo {
  width: 100%;
  min-height: 220px;
  border-radius: 8px;
}

.dashboard-product-mail-reader-hero .product-photo-image > img:not(.product-brand-logo) {
  max-width: 100%;
  height: 158px;
}

.dashboard-product-mail-reader-hero .product-brand-logo,
.dashboard-product-range-visual .product-brand-logo,
.dashboard-product-model-media .product-brand-logo {
  display: none;
}

.dashboard-product-mail-reader-summary {
  display: grid;
  align-content: start;
  gap: 12px;
}

.dashboard-product-mail-reader-summary p {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 850;
  line-height: 1.35;
}

.dashboard-product-mail-reader-summary div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-product-mail-reader-summary span {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--button-glass);
  font-size: 12px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.dashboard-product-mail-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--tile-glass);
}

.dashboard-product-mail-section h3 {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  margin: 0;
}

.dashboard-product-mail-copy-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-product-mail-reader-empty {
  align-self: center;
  justify-self: center;
  max-width: 360px;
  display: grid;
  justify-items: center;
  gap: 10px;
  color: var(--muted);
  text-align: center;
}

.dashboard-product-mail-reader-empty svg {
  width: 42px;
  height: 42px;
  color: var(--blue);
}

.dashboard-product-mail-reader-empty strong {
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}

.dashboard-product-library-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 14px;
  overflow: hidden;
}

.dashboard-product-library-rail,
.dashboard-product-library-results,
.dashboard-product-admin-panel {
  min-width: 0;
  min-height: 0;
  position: relative;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: var(--tile-glass);
  box-shadow: var(--glass-edge), 0 18px 32px rgba(15, 23, 42, 0.08);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.dashboard-product-library-rail,
.dashboard-product-library-results,
.dashboard-product-admin-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  overflow: auto;
}

.dashboard-product-library-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-product-library-panel-head > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.dashboard-product-library-panel-head strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.dashboard-product-workspace-panel {
  border-color: var(--blue-border);
  outline: 1px solid rgba(10, 132, 255, 0.16);
  outline-offset: -2px;
}

.dashboard-product-review-queue-toggle {
  flex: 0 0 auto;
  position: relative;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--blue-border);
  border-radius: 6px;
  padding: 0 10px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: var(--glass-edge);
  overflow: hidden;
  white-space: nowrap;
}

.dashboard-product-review-queue-toggle-label {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.05;
}

.dashboard-product-review-queue-toggle-rail {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: 38px;
  min-height: 0;
  height: 100%;
  padding: 12px 0;
  border-width: 0 1px 0 0;
  border-radius: 8px 0 0 8px;
  background: linear-gradient(180deg, rgba(10, 132, 255, 0.16), rgba(10, 132, 255, 0.28));
  letter-spacing: 0;
}

.dashboard-product-review-queue-toggle-tab {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 3;
  width: 44px;
  min-height: 0;
  height: 100%;
  padding: 52px 0 16px;
  border-width: 1px 1px 1px 0;
  border-radius: 0 8px 8px 0;
  background: linear-gradient(180deg, rgba(10, 132, 255, 0.16), rgba(10, 132, 255, 0.28));
  box-shadow: var(--glass-edge), 0 14px 28px rgba(10, 132, 255, 0.12);
}

.dashboard-product-review-queue-toggle-rail .dashboard-product-review-queue-toggle-label,
.dashboard-product-review-queue-toggle-tab .dashboard-product-review-queue-toggle-label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  letter-spacing: 0;
}

.dashboard-product-review-queue-toggle-badge {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 28px;
  height: 34px;
  display: grid;
  grid-template-rows: 15px 1fr;
  place-items: center;
  transform: translateX(-50%);
  border: 1px solid rgba(10, 132, 255, 0.24);
  border-radius: 999px;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--glass-edge), 0 8px 16px rgba(10, 132, 255, 0.16);
}

.dashboard-product-review-queue-toggle-badge svg {
  width: 12px;
  height: 12px;
  margin-top: 4px;
}

.dashboard-product-review-queue-toggle-badge strong {
  color: var(--blue);
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
}

.dashboard-product-review-queue-toggle-badge.is-empty {
  color: var(--muted);
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.68);
}

.dashboard-product-review-queue-toggle-badge.is-empty strong {
  color: var(--muted);
}

.dashboard-product-category-grid,
.dashboard-product-subcategory-list {
  display: grid;
  gap: 8px;
}

.dashboard-product-category,
.dashboard-product-subcategory-list button {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.42);
  color: var(--text);
  text-align: left;
}

.dashboard-product-category {
  grid-template-columns: minmax(0, 1fr) auto;
}

.dashboard-product-category span,
.dashboard-product-subcategory-list span {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.dashboard-product-category small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
}

.dashboard-product-category strong,
.dashboard-product-subcategory-list strong {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.dashboard-product-category:hover,
.dashboard-product-category.active,
.dashboard-product-subcategory-list button:hover,
.dashboard-product-subcategory-list button.active {
  border-color: var(--blue-border);
  background: var(--blue-soft);
}

.dashboard-product-library-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--tile-glass-strong);
}

.dashboard-product-library-title div {
  display: grid;
  gap: 3px;
}

.dashboard-product-library-title span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-product-library-title h2 {
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0;
}

.dashboard-product-library-title small {
  max-width: 420px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
  text-align: right;
}

.dashboard-product-range-backdrop {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  padding: 18px;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.dashboard-product-range-popup {
  width: min(1500px, 100%);
  max-height: calc(100vh - 36px);
  justify-self: center;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: var(--glass-strong);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-align: left;
}

.dashboard-product-range-head {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.22);
}

.dashboard-product-range-title {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.dashboard-product-range-title > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-product-range-head h2 {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.05;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-product-range-head small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-product-range-head p {
  max-width: 760px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
  line-height: 1.32;
  margin: 0;
}

.dashboard-product-range-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-product-range-body {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  overflow: hidden;
}

.dashboard-product-range-hero-card,
.dashboard-product-range-overview,
.dashboard-product-range-main,
.dashboard-product-range-section,
.dashboard-product-range-copy-grid article {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--tile-glass);
  box-shadow: var(--glass-edge);
}

.dashboard-product-range-overview {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 14px;
  border-width: 0 1px 0 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.18);
  overflow: auto;
}

.dashboard-product-range-hero-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.38fr) minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
}

.dashboard-product-range-visual {
  display: grid;
  align-content: start;
  min-width: 0;
}

.dashboard-product-range-visual .product-photo {
  width: 100%;
  min-height: 220px;
  border-radius: 8px;
}

.dashboard-product-range-visual .product-photo-image > img:not(.product-brand-logo) {
  max-width: 100%;
  height: 158px;
}

.dashboard-product-range-hero-copy {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 12px;
}

.dashboard-product-range-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-product-range-chip-row span {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--button-glass);
  font-size: 12px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.dashboard-product-range-summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 0;
}

.dashboard-product-range-summary div {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  justify-items: start;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.1);
  text-align: left;
}

.dashboard-product-range-summary dt,
.dashboard-product-model-table th {
  width: 100%;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
}

.dashboard-product-range-summary dd {
  width: 100%;
  min-width: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  margin: 0;
  overflow-wrap: anywhere;
  text-align: right;
}

.dashboard-product-range-main {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 14px;
  border-width: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.18);
  overflow: auto;
}

.dashboard-product-range-section,
.dashboard-product-range-copy-grid article {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.dashboard-product-range-section h3,
.dashboard-product-range-copy-grid h3 {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  margin: 0;
}

.dashboard-product-range-copy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-product-range-copy-grid p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
}

.dashboard-product-model-table-wrap {
  overflow: auto;
}

.dashboard-product-model-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.dashboard-product-model-table th,
.dashboard-product-model-table td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.dashboard-product-model-table td {
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
}

.dashboard-product-model-table tr.active td {
  background: var(--blue-soft);
}

.dashboard-product-model-pick {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  text-align: left;
}

.dashboard-product-model-pick.active,
.dashboard-product-model-pick:hover {
  color: var(--blue);
}

.dashboard-product-model-selector {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.38);
  box-shadow: var(--glass-edge);
}

.dashboard-product-model-selector-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dashboard-product-model-selector-head div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.dashboard-product-model-selector-head span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-product-model-selector-head strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.dashboard-product-model-selector-head small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-product-model-search {
  min-width: 0;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--button-glass);
}

.dashboard-product-model-search svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
  flex: 0 0 auto;
}

.dashboard-product-model-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.dashboard-product-model-selector-list {
  width: 100%;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-auto-flow: row;
  gap: 8px;
  max-height: calc((88px * 3) + (8px * 2));
  overflow-y: auto;
  padding-right: 3px;
  overscroll-behavior: contain;
  scrollbar-color: rgba(100, 116, 139, 0.44) transparent;
  scrollbar-width: thin;
}

.dashboard-product-model-selector-list::-webkit-scrollbar {
  width: 8px;
}

.dashboard-product-model-selector-list::-webkit-scrollbar-track {
  background: transparent;
}

.dashboard-product-model-selector-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.34);
}

.dashboard-product-model-selector-list > p {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin: 0;
}

.dashboard-product-model-select-card {
  width: 100%;
  min-width: 0;
  min-height: 88px;
  height: 88px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(72px, auto);
  grid-template-rows: auto auto;
  column-gap: 12px;
  row-gap: 7px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--tile-glass);
  box-shadow: var(--glass-edge);
  text-align: left;
  cursor: pointer;
}

.dashboard-product-model-select-card span,
.dashboard-product-model-select-card em {
  grid-column: 1;
}

.dashboard-product-model-select-card .dashboard-product-model-select-title {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.dashboard-product-model-select-card .dashboard-product-model-select-facts {
  grid-column: 1 / -1;
  grid-row: 2;
  min-width: 0;
  display: flex;
  flex-wrap: nowrap;
  align-self: end;
  align-items: center;
  gap: 8px;
  max-height: none;
  overflow: hidden;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.dashboard-product-model-select-facts i {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-product-model-select-facts i + i::before {
  content: "·";
  flex: 0 0 auto;
  margin-right: 8px;
  color: var(--muted);
  opacity: 0.76;
}

.dashboard-product-model-select-card b {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  max-width: 120px;
  text-align: left;
  overflow-wrap: anywhere;
}

.dashboard-product-model-select-card:hover,
.dashboard-product-model-select-card.active {
  border-color: var(--blue-border);
  background: var(--blue-soft);
}

.dashboard-product-model-select-card strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-product-model-select-card small,
.dashboard-product-model-select-card em {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.3;
  text-overflow: ellipsis;
}

.dashboard-product-model-select-card em {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.dashboard-product-model-select-card b {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.dashboard-product-model-detail {
  gap: 14px;
}

.dashboard-product-model-detail-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-product-model-detail-head div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.dashboard-product-model-detail-head span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-product-model-detail-head small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-product-model-detail-body {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.28fr);
  gap: 14px;
}

.dashboard-product-model-media,
.dashboard-product-model-copy {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 10px;
}

.dashboard-product-model-copy .product-detail-facts {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.dashboard-product-model-media .product-photo {
  width: 100%;
  min-height: 190px;
}

.dashboard-product-model-media .product-photo-image > img:not(.product-brand-logo) {
  max-width: 100%;
  height: 132px;
}

.dashboard-product-model-chip-row,
.dashboard-product-model-notes {
  display: grid;
  gap: 8px;
}

.dashboard-product-model-chip-row {
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
}

.dashboard-product-model-chip-row span {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: var(--button-glass);
  overflow-wrap: anywhere;
}

.dashboard-product-model-chip-row small {
  min-width: 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.dashboard-product-model-chip-row b {
  min-width: 0;
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.dashboard-product-model-notes {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-product-model-notes article {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.4);
}

.dashboard-product-model-notes h4 {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  margin: 0;
}

.dashboard-product-model-notes p {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
  overflow-wrap: anywhere;
}

.dashboard-product-model-documents {
  padding-top: 2px;
}

.dashboard-product-model-insights {
  grid-column: 1 / -1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-product-insight-card {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.4);
  box-shadow: var(--glass-edge);
}

.dashboard-product-dimension-card {
  gap: 9px;
}

.dashboard-product-insight-card > div:first-child {
  display: grid;
  gap: 2px;
}

.dashboard-product-insight-card > div:first-child span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-product-insight-card > div:first-child strong {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.dashboard-product-insight-bars {
  display: grid;
  gap: 9px;
}

.dashboard-product-insight-bar {
  display: grid;
  gap: 5px;
}

.dashboard-product-insight-bar span {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 8px;
  text-align: left;
}

.dashboard-product-insight-bar strong {
  min-width: 0;
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.dashboard-product-insight-bar em {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  text-align: left;
  overflow-wrap: anywhere;
}

.dashboard-product-insight-bar i {
  height: 8px;
  position: relative;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
}

.dashboard-product-insight-bar i::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--bar-size, 0%);
  border-radius: inherit;
  background: var(--blue);
}

.dashboard-product-insight-bar.is-efficiency i::before {
  background: var(--green);
}

.dashboard-product-insight-bar.is-dimension i::before {
  background: #64748b;
}

.dashboard-product-insight-bar.is-sound i::before {
  background: #f59e0b;
}

.dashboard-product-clearance-note {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.1);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  margin: 0;
  overflow-wrap: anywhere;
}

.dashboard-product-dimension-visual {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.dashboard-product-dimension-stage {
  min-height: 286px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 40%, rgba(0, 122, 255, 0.12), transparent 48%),
    rgba(255, 255, 255, 0.34);
  perspective: 780px;
  perspective-origin: 50% 42%;
}

.dashboard-product-dimension-source {
  max-width: calc(100% - 24px);
  position: absolute;
  z-index: 5;
  left: 10px;
  top: 10px;
  display: grid;
  gap: 2px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: color-mix(in srgb, var(--surface-solid) 84%, var(--blue-soft));
  box-shadow: var(--glass-edge);
}

.dashboard-product-dimension-source small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 950;
  line-height: 1.05;
  text-transform: uppercase;
}

.dashboard-product-dimension-source strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.16;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-product-dimension-stage::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 62%;
  width: calc(var(--box-w) + var(--box-d) * 1.4);
  height: calc(var(--box-d) * 1.08);
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(15, 23, 42, 0.18), transparent 70%);
  filter: blur(10px);
  transform: translate(-50%, calc(var(--box-h) * 0.42));
  opacity: 0.62;
}

.dashboard-product-dimension-canvas-wrap {
  position: absolute;
  inset: 24px 8px 14px;
  z-index: 1;
  display: grid;
  place-items: center;
  overscroll-behavior: contain;
  pointer-events: auto;
}

.dashboard-product-dimension-stage.has-clearances .dashboard-product-dimension-canvas-wrap {
  inset: 24px 8px 14px;
}

.dashboard-product-dimension-canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}

.dashboard-product-dimension-canvas-wrap canvas:active {
  cursor: grabbing;
}

.dashboard-product-dimension-data {
  display: grid;
  gap: 6px;
}

.dashboard-product-dimension-values,
.dashboard-product-clearance-callouts {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(62px, 1fr));
  gap: 5px;
}

.dashboard-product-dimension-values span,
.dashboard-product-clearance-callouts span {
  min-width: 0;
  display: grid;
  gap: 1px;
  padding: 5px 6px;
  border-radius: 7px;
  box-shadow: var(--glass-edge);
}

.dashboard-product-dimension-values span {
  border: 1px solid var(--blue-border);
  color: var(--blue-dark);
  background: color-mix(in srgb, var(--surface-solid) 78%, var(--blue-soft));
}

.dashboard-product-dimension-values .is-scale-note {
  grid-column: 1 / -1;
  border-style: dashed;
  background: color-mix(in srgb, var(--surface-solid) 88%, var(--blue-soft));
}

.dashboard-product-dimension-values small,
.dashboard-product-clearance-callouts small {
  font-size: 8px;
  font-weight: 950;
  line-height: 1;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.dashboard-product-dimension-values small {
  color: var(--muted);
}

.dashboard-product-dimension-values strong,
.dashboard-product-clearance-callouts strong {
  font-size: 10px;
  font-weight: 950;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.dashboard-product-dimension-values strong {
  color: var(--text);
}

.dashboard-product-clearance-envelope {
  width: calc(var(--box-w) + var(--box-d) * 0.7 + var(--clearance-left, 0px) + var(--clearance-right, 0px));
  height: calc(var(--box-h) + var(--box-d) * 0.36 + var(--clearance-top, 0px) + var(--clearance-bottom, 0px) + var(--clearance-front, 0px) + var(--clearance-rear, 0px));
  position: absolute;
  z-index: 0;
  top: 52%;
  left: 50%;
  border: 2px dashed rgba(245, 158, 11, 0.74);
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.08);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.14);
  pointer-events: none;
  transform: translate(-50%, -50%) rotateX(-13deg) rotateY(28deg);
  transform-style: preserve-3d;
}

.dashboard-product-clearance-envelope span {
  position: absolute;
  border: 1px solid rgba(245, 158, 11, 0.52);
  background: rgba(245, 158, 11, 0.13);
}

.dashboard-product-clearance-envelope .is-front {
  left: var(--clearance-left, 0px);
  right: var(--clearance-right, 0px);
  bottom: 0;
  height: var(--clearance-front, 0px);
}

.dashboard-product-clearance-envelope .is-rear {
  left: var(--clearance-left, 0px);
  right: var(--clearance-right, 0px);
  top: 0;
  height: var(--clearance-rear, 0px);
}

.dashboard-product-clearance-envelope .is-left {
  top: var(--clearance-top, 0px);
  bottom: calc(var(--clearance-bottom, 0px) + var(--clearance-front, 0px));
  left: 0;
  width: var(--clearance-left, 0px);
}

.dashboard-product-clearance-envelope .is-right {
  top: var(--clearance-top, 0px);
  right: 0;
  bottom: calc(var(--clearance-bottom, 0px) + var(--clearance-front, 0px));
  width: var(--clearance-right, 0px);
}

.dashboard-product-clearance-envelope .is-top {
  left: var(--clearance-left, 0px);
  right: var(--clearance-right, 0px);
  top: var(--clearance-rear, 0px);
  height: var(--clearance-top, 0px);
}

.dashboard-product-clearance-envelope .is-bottom {
  left: var(--clearance-left, 0px);
  right: var(--clearance-right, 0px);
  bottom: var(--clearance-front, 0px);
  height: var(--clearance-bottom, 0px);
}

.dashboard-product-clearance-callouts span {
  border: 1px solid rgba(245, 158, 11, 0.42);
  color: #92400e;
  background: rgba(255, 251, 235, 0.9);
}

.dashboard-product-clearance-callouts small {
  color: #b45309;
}

.dashboard-product-clearance-callouts strong {
  color: #78350f;
}

.dashboard-product-dimension-box {
  width: var(--box-w);
  height: var(--box-h);
  position: absolute;
  z-index: 1;
  top: 52%;
  left: 50%;
  transform: translate(-50%, -50%) rotateX(-13deg) rotateY(28deg);
  transform-style: preserve-3d;
}

.dashboard-product-dimension-face {
  position: absolute;
  display: block;
  border: 1px solid rgba(100, 116, 139, 0.5);
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

.dashboard-product-dimension-face.front {
  inset: 0 auto auto 0;
  width: var(--box-w);
  height: var(--box-h);
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(226, 232, 240, 0.78)),
    linear-gradient(90deg, rgba(0, 122, 255, 0.08), transparent 42%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.80), 0 18px 28px rgba(15, 23, 42, 0.14);
  transform: translateZ(calc(var(--box-d) / 2));
}

.dashboard-product-dimension-face.front::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(100, 116, 139, 0.14);
  border-radius: 5px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.34), transparent 58%),
    repeating-linear-gradient(90deg, transparent 0 26px, rgba(100, 116, 139, 0.07) 27px 28px);
  pointer-events: none;
}

.dashboard-product-dimension-face.top {
  left: 0;
  bottom: 100%;
  width: var(--box-w);
  height: var(--box-d);
  transform: rotateX(90deg);
  transform-origin: bottom center;
  border-radius: 7px 7px 3px 3px;
  background:
    linear-gradient(140deg, rgba(248, 250, 252, 0.92), rgba(203, 213, 225, 0.66)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.38), transparent);
}

.dashboard-product-dimension-face.side {
  left: 100%;
  top: 0;
  width: var(--box-d);
  height: var(--box-h);
  transform: rotateY(90deg);
  transform-origin: left top;
  border-radius: 3px 7px 7px 3px;
  background:
    linear-gradient(145deg, rgba(203, 213, 225, 0.82), rgba(148, 163, 184, 0.56)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent);
}

.dashboard-product-dimension-model-detail {
  position: absolute;
  z-index: 2;
  display: block;
  border: 1px solid rgba(100, 116, 139, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  transform: translateZ(calc(var(--box-d) / 2 + 2px));
}

.dashboard-product-dimension-box .detail-a {
  left: 12%;
  top: 16%;
  width: 32%;
  height: 10%;
}

.dashboard-product-dimension-box .detail-b {
  right: 12%;
  top: 16%;
  width: 18%;
  height: 10%;
}

.dashboard-product-dimension-box .detail-c {
  left: 12%;
  right: 12%;
  bottom: 14%;
  height: 20%;
  border-radius: 6px;
}

.dashboard-product-dimension-box.is-heat-pump .detail-a,
.dashboard-product-dimension-box.is-equipment .detail-a {
  width: 46%;
  height: 34%;
  border-radius: 6px;
  background:
    repeating-linear-gradient(90deg, rgba(15, 23, 42, 0.24) 0 2px, transparent 2px 7px),
    rgba(255, 255, 255, 0.58);
}

.dashboard-product-dimension-box.is-heat-pump .detail-c {
  height: 16%;
  background:
    repeating-linear-gradient(0deg, rgba(15, 23, 42, 0.18) 0 2px, transparent 2px 8px),
    rgba(255, 255, 255, 0.5);
}

.dashboard-product-dimension-box.is-boiler .detail-a,
.dashboard-product-dimension-box.is-boiler .detail-b {
  top: 14%;
  width: 18%;
  height: 18%;
  border-radius: 6px;
}

.dashboard-product-dimension-box.is-boiler .detail-c {
  left: 25%;
  right: 25%;
  bottom: 12%;
  height: 38%;
}

.dashboard-product-dimension-box.is-vessel .dashboard-product-dimension-face.front {
  border-radius: 999px / 36px;
}

.dashboard-product-dimension-box.is-vessel .detail-a {
  left: 32%;
  top: 8%;
  width: 36%;
  height: 84%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.74), rgba(148, 163, 184, 0.22));
}

.dashboard-product-dimension-box.is-vessel .detail-b,
.dashboard-product-dimension-box.is-vessel .detail-c {
  display: none;
}

.dashboard-product-dimension-box.is-pump .detail-a {
  left: 20%;
  top: 28%;
  width: 36%;
  height: 36%;
  border-radius: 999px;
}

.dashboard-product-dimension-box.is-pump .detail-b {
  right: 16%;
  top: 36%;
  width: 24%;
  height: 18%;
}

.dashboard-product-dimension-box.is-pipe .detail-a,
.dashboard-product-dimension-box.is-outlet .detail-a {
  left: 8%;
  right: 8%;
  top: 42%;
  width: auto;
  height: 16%;
  border-radius: 999px;
}

.dashboard-product-dimension-box.is-pipe .detail-b,
.dashboard-product-dimension-box.is-pipe .detail-c,
.dashboard-product-dimension-box.is-outlet .detail-b,
.dashboard-product-dimension-box.is-outlet .detail-c {
  display: none;
}

.dashboard-product-dimension-axis {
  box-sizing: border-box;
  min-width: 0;
  max-width: calc(100% - 24px);
  position: absolute;
  z-index: 3;
  display: grid;
  gap: 1px;
  padding: 6px 8px;
  border: 1px solid var(--blue-border);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-solid) 78%, var(--blue-soft));
  box-shadow: var(--glass-edge);
}

.dashboard-product-dimension-axis::before,
.dashboard-product-dimension-axis::after {
  content: "";
  position: absolute;
  background: var(--blue);
  opacity: 0.62;
}

.dashboard-product-dimension-axis small {
  min-width: 0;
  max-width: 100%;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  overflow-wrap: anywhere;
  text-align: left;
  text-transform: uppercase;
  white-space: normal;
}

.dashboard-product-dimension-axis strong {
  min-width: 0;
  max-width: 100%;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  overflow-wrap: anywhere;
  text-align: left;
  white-space: normal;
}

.dashboard-product-dimension-axis.is-width {
  left: 50%;
  bottom: 14px;
  min-width: min(var(--box-w), 72%);
  text-align: left;
  transform: translateX(-50%);
}

.dashboard-product-dimension-stage.has-clearances {
  min-height: 320px;
}

.dashboard-product-dimension-stage.has-clearances .dashboard-product-dimension-axis.is-width {
  bottom: 72px;
  min-width: min(var(--box-w), 62%);
}

.dashboard-product-dimension-axis.is-width::before {
  height: 2px;
  left: 10px;
  right: 10px;
  bottom: -8px;
}

.dashboard-product-dimension-axis.is-width::after {
  width: 8px;
  height: 8px;
  left: 50%;
  bottom: -11px;
  border-radius: 50%;
  transform: translateX(-50%);
}

.dashboard-product-dimension-axis.is-height {
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
}

.dashboard-product-dimension-axis.is-height::before {
  width: 2px;
  top: 10px;
  bottom: 10px;
  right: -8px;
}

.dashboard-product-dimension-axis.is-height::after {
  width: 8px;
  height: 8px;
  top: 50%;
  right: -11px;
  border-radius: 50%;
  transform: translateY(-50%);
}

.dashboard-product-dimension-axis.is-depth {
  top: 18px;
  right: 12px;
}

.dashboard-product-dimension-axis.is-depth::before {
  width: 54px;
  height: 2px;
  left: -48px;
  bottom: -12px;
  transform: rotate(-28deg);
  transform-origin: right center;
}

.dashboard-product-dimension-axis.is-depth::after {
  width: 8px;
  height: 8px;
  left: -51px;
  bottom: -22px;
  border-radius: 50%;
}

.dashboard-product-dimension-caption {
  display: none;
}

.dashboard-product-quick-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 7px;
}

.dashboard-product-quick-stats span {
  min-width: 0;
  display: grid;
  justify-items: start;
  gap: 2px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(148, 163, 184, 0.1);
  text-align: left;
}

.dashboard-product-quick-stats small {
  width: 100%;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
}

.dashboard-product-quick-stats b {
  width: 100%;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  text-align: left;
}

.dashboard-product-highlight-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.dashboard-product-highlight-strip em {
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid var(--blue-border);
  border-radius: 7px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-align: left;
}

.dashboard-product-documents {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-product-documents > span:not(.dashboard-product-document-link) {
  min-width: 0;
  max-width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: var(--button-glass);
  font-size: 11px;
  font-weight: 800;
  overflow-wrap: anywhere;
  text-align: left;
}

.dashboard-product-document-link {
  min-width: 0;
  max-width: 100%;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: var(--button-glass);
  text-align: left;
  text-decoration: none;
  box-shadow: var(--glass-edge);
}

.dashboard-product-document-link:hover {
  border-color: var(--blue-border);
  color: var(--blue);
  background: var(--blue-soft);
}

.dashboard-product-document-link.disabled {
  opacity: 0.72;
  cursor: default;
}

.dashboard-product-document-link svg {
  width: 14px;
  height: 14px;
  color: var(--blue);
}

.dashboard-product-document-link span {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.dashboard-product-document-link strong,
.dashboard-product-document-link small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-product-document-link strong {
  color: inherit;
  font-size: 11px;
  font-weight: 850;
}

.dashboard-product-document-link small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.dashboard-product-range-backdrop {
  background: #f5f7fb;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.dashboard-product-range-popup {
  border-color: #d8dee8;
  background: #f8fafc;
  box-shadow: 0 22px 46px rgba(15, 23, 42, 0.12);
}

.dashboard-product-range-head {
  background: #ffffff;
}

.dashboard-product-range-overview,
.dashboard-product-range-main {
  border-color: #d8dee8;
  background: #f8fafc;
  box-shadow: none;
}

.dashboard-product-range-popup .dashboard-product-range-section,
.dashboard-product-range-popup .dashboard-product-range-copy-grid article,
.dashboard-product-range-popup .dashboard-product-model-selector,
.dashboard-product-range-popup .dashboard-product-model-select-card,
.dashboard-product-range-popup .dashboard-product-model-notes article,
.dashboard-product-range-popup .dashboard-product-insight-card,
.dashboard-product-range-popup .dashboard-product-accessory-cards article,
.dashboard-product-range-popup .product-detail-facts div,
.dashboard-product-range-popup .dashboard-product-model-chip-row span,
.dashboard-product-range-popup .dashboard-product-quick-stats span,
.dashboard-product-range-popup .dashboard-product-clearance-note,
.dashboard-product-range-popup .dashboard-product-dimension-stage,
.dashboard-product-range-popup .dashboard-product-document-link,
.dashboard-product-range-popup .dashboard-product-documents > span:not(.dashboard-product-document-link),
.dashboard-product-range-popup .dashboard-product-range-summary div,
.dashboard-product-range-popup .dashboard-product-range-chip-row span,
.dashboard-product-range-popup .dashboard-product-model-search {
  border-color: #d8dee8;
  background: #ffffff;
  box-shadow: none;
}

.dashboard-product-range-popup .dashboard-product-model-select-card:hover,
.dashboard-product-range-popup .dashboard-product-model-select-card.active,
.dashboard-product-range-popup .dashboard-product-document-link:hover,
.dashboard-product-range-popup .dashboard-product-highlight-strip em {
  border-color: var(--blue-border);
  background: var(--blue-soft);
}

.dashboard-product-range-popup .product-photo {
  border-color: #d8dee8;
  background: #ffffff;
  color: var(--text);
  box-shadow: none;
}

.dashboard-product-range-popup .product-photo-image {
  background: #f8fafc;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.dashboard-product-range-popup .product-photo-image > img:not(.product-brand-logo) {
  filter: saturate(1.03) contrast(1.02) drop-shadow(0 8px 14px rgba(15, 23, 42, 0.10));
}

.dashboard-product-range-popup .dashboard-product-dimension-stage {
  background: #ffffff;
}

.dashboard-product-range-popup .dashboard-product-dimension-axis {
  background: #ffffff;
  box-shadow: none;
}

.dashboard-product-range-popup .dashboard-product-dimension-face.front {
  background: linear-gradient(135deg, #ffffff, #edf2f7);
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.10);
}

.dashboard-product-range-popup .dashboard-product-dimension-face.top {
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
}

.dashboard-product-range-popup .dashboard-product-dimension-face.side {
  background: linear-gradient(145deg, #dbe3ec, #cbd5e1);
}

.dashboard-product-management-shell {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
}

.dashboard-product-management-hero {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.95fr);
  align-items: stretch;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: var(--tile-glass);
  box-shadow: var(--glass-edge), 0 18px 36px rgba(15, 23, 42, 0.08);
}

.dashboard-product-management-hero > div:first-child {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 5px;
}

.dashboard-product-management-hero span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-product-management-hero h2 {
  color: var(--text);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.08;
  margin: 0;
}

.dashboard-product-management-hero p {
  max-width: 720px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
  line-height: 1.35;
  margin: 0;
}

.dashboard-product-management-stats {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  gap: 8px;
}

.dashboard-product-management-stats span {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--button-glass);
  text-transform: none;
}

.dashboard-product-management-stats small,
.dashboard-product-management-stats strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-product-management-stats small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-product-management-stats strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.dashboard-product-admin-layout {
  min-height: 0;
  position: relative;
  display: grid;
  grid-template-columns: minmax(560px, 1.35fr) minmax(320px, 0.75fr);
  gap: 12px;
  overflow: hidden;
}

.dashboard-product-admin-layout.queue-collapsed {
  grid-template-columns: minmax(0, 1fr);
  padding-right: 50px;
}

.dashboard-product-workspace-panel {
  grid-column: auto;
}

.dashboard-product-editor-panel {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.dashboard-product-queue-panel {
  grid-template-rows: auto minmax(0, 1fr);
}

.dashboard-product-management-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.dashboard-product-management-actions button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  color: var(--muted);
  background: var(--button-glass);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: var(--glass-edge);
}

.dashboard-product-management-actions button.active {
  color: var(--blue);
  border-color: var(--blue-border);
  background: var(--blue-soft);
}

.dashboard-product-management-actions button.danger {
  color: #991b1b;
  border-color: #fecaca;
  background: rgba(254, 242, 242, 0.78);
}

.dashboard-product-management-body {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(286px, 0.48fr);
  gap: 14px;
  overflow: hidden;
}

.dashboard-product-management-body.queue-collapsed {
  grid-template-columns: minmax(0, 1fr);
}

.dashboard-product-editor-main {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.dashboard-product-bulk-upload-disclosure {
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--tile-glass);
  box-shadow: var(--glass-edge);
}

.dashboard-product-bulk-upload-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
  list-style: none;
}

.dashboard-product-bulk-upload-disclosure > summary::-webkit-details-marker { display: none; }
.dashboard-product-bulk-upload-disclosure > summary::after { content: "⌄"; color: var(--muted); }
.dashboard-product-bulk-upload-disclosure[open] > summary::after { transform: rotate(180deg); }
.dashboard-product-bulk-upload-disclosure > summary small { color: var(--muted); font-size: 11px; font-weight: 600; }

.dashboard-product-bulk-upload-disclosure .dashboard-product-bulk-upload {
  margin: 0 10px 10px;
}

.dashboard-product-bulk-upload {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 12px;
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(0, 113, 227, 0.10), rgba(20, 184, 166, 0.08) 54%, rgba(245, 158, 11, 0.08)),
    var(--tile-glass);
  box-shadow: var(--glass-edge);
}

.dashboard-product-bulk-upload-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.dashboard-product-bulk-upload-copy span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-product-bulk-upload-copy strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.15;
}

.dashboard-product-bulk-upload-copy small {
  max-width: 760px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.32;
}

.dashboard-product-bulk-upload-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-product-bulk-upload-actions .settings-mini-btn {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.dashboard-product-bulk-upload-actions svg {
  width: 16px;
  height: 16px;
}

.dashboard-product-bulk-upload-file {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.dashboard-product-bulk-upload-file input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.dashboard-product-bulk-upload-meta {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.dashboard-product-bulk-upload-meta span {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.30);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.44);
}

.dashboard-product-bulk-upload-meta small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-product-bulk-upload-meta strong {
  min-width: 0;
  color: var(--text);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
}

.dashboard-product-embedded-queue {
  min-width: 0;
  min-height: 0;
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  padding-left: 48px;
  border-left: 1px solid var(--line);
  overflow: auto;
}

.dashboard-product-embedded-queue .dashboard-product-review-tile {
  padding-right: 2px;
}

.dashboard-product-review-side-menu {
  grid-template-rows: auto minmax(0, 1fr);
  padding-left: 48px;
  overflow: auto;
}

.dashboard-product-review-side-menu .dashboard-product-review-tile {
  padding-right: 2px;
}

.dashboard-product-editor-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: start;
  overflow: auto;
  padding-right: 2px;
}

.dashboard-product-editor-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.2;
  text-transform: uppercase;
}

.dashboard-product-editor-form label.full,
.dashboard-product-editor-form .full,
.dashboard-product-editor-form .primary-mini {
  grid-column: 1 / -1;
}

.dashboard-product-editor-form input,
.dashboard-product-editor-form select,
.dashboard-product-editor-form textarea {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: var(--input-bg);
  font: inherit;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.28;
  padding: 8px 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.dashboard-product-editor-form textarea {
  resize: vertical;
}

.dashboard-product-editor-section {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
}

.dashboard-product-editor-section.is-collapsed {
  gap: 0;
}

.dashboard-product-editor-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-product-editor-section-head div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.dashboard-product-editor-section-head span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-product-editor-section-head strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.15;
}

.dashboard-product-editor-section-head small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.dashboard-product-editor-section-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-product-editor-section-toggle {
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(0, 113, 227, 0.22);
  border-radius: 999px;
  color: var(--blue);
  background: rgba(0, 113, 227, 0.08);
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  box-shadow: var(--glass-edge);
  cursor: pointer;
}

.dashboard-product-editor-section-toggle:hover,
.dashboard-product-editor-section-toggle:focus-visible {
  border-color: rgba(0, 113, 227, 0.42);
  background: rgba(0, 113, 227, 0.14);
  outline: none;
}

.dashboard-product-editor-section-body {
  min-width: 0;
}

.dashboard-product-editor-section.is-collapsed .dashboard-product-editor-section-body {
  display: none;
}

.dashboard-product-editor-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.product-rich-description {
  min-width: 0;
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(0, 113, 227, 0.2);
  border-radius: 12px;
  background:
    radial-gradient(circle at 100% 0, rgba(0, 113, 227, 0.1), transparent 38%),
    rgba(255, 255, 255, 0.62);
  box-shadow: var(--glass-edge);
  overflow: hidden;
}

.product-rich-description-head {
  display: grid;
  gap: 3px;
}

.product-rich-description-head span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.product-rich-description-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 950;
  line-height: 1.15;
}

.product-rich-description-body,
.dashboard-product-rich-surface {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 620;
  line-height: 1.58;
  overflow-wrap: anywhere;
}

.product-rich-description-body > :first-child,
.dashboard-product-rich-surface > :first-child {
  margin-top: 0;
}

.product-rich-description-body > :last-child,
.dashboard-product-rich-surface > :last-child {
  margin-bottom: 0;
}

.product-rich-description-body h2,
.product-rich-description-body h3,
.product-rich-description-body h4,
.dashboard-product-rich-surface h2,
.dashboard-product-rich-surface h3,
.dashboard-product-rich-surface h4 {
  margin: 1em 0 0.42em;
  color: var(--text);
  font-weight: 950;
  line-height: 1.2;
}

.product-rich-description-body h2,
.dashboard-product-rich-surface h2 {
  font-size: 20px;
}

.product-rich-description-body h3,
.dashboard-product-rich-surface h3 {
  font-size: 17px;
}

.product-rich-description-body p,
.dashboard-product-rich-surface p {
  margin: 0 0 0.82em;
}

.product-rich-description-body ul,
.product-rich-description-body ol,
.dashboard-product-rich-surface ul,
.dashboard-product-rich-surface ol {
  display: grid;
  gap: 6px;
  margin: 0.6em 0 1em;
  padding-left: 22px;
}

.product-rich-description-body blockquote,
.dashboard-product-rich-surface blockquote {
  margin: 12px 0;
  padding: 10px 12px;
  border-left: 4px solid var(--blue);
  border-radius: 0 8px 8px 0;
  color: var(--muted);
  background: rgba(0, 113, 227, 0.07);
}

.product-rich-description-body a,
.dashboard-product-rich-surface a {
  color: var(--blue);
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.product-rich-table {
  width: 100%;
  margin: 14px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--tile-glass);
}

.product-rich-table table,
.product-rich-description-body table,
.dashboard-product-rich-surface table {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
  font-size: 12px;
}

.product-rich-table th,
.product-rich-table td,
.product-rich-description-body th,
.product-rich-description-body td,
.dashboard-product-rich-surface th,
.dashboard-product-rich-surface td {
  padding: 9px 10px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.product-rich-table th,
.product-rich-description-body th,
.dashboard-product-rich-surface th {
  color: var(--text);
  background: rgba(0, 113, 227, 0.08);
  font-weight: 900;
}

.product-rich-media {
  width: min(100%, 760px);
  display: grid;
  gap: 7px;
  margin: 14px auto;
}

.product-rich-media img,
.product-rich-media video,
.product-rich-media iframe {
  width: 100%;
  max-height: 520px;
  display: block;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #101522;
  object-fit: contain;
}

.product-rich-media iframe {
  aspect-ratio: 16 / 9;
  min-height: 240px;
}

.product-rich-media figcaption,
.product-rich-chart figcaption {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.35;
}

.product-rich-chart {
  display: grid;
  gap: 9px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 113, 227, 0.05);
}

.product-rich-chart-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(90px, 0.8fr) minmax(120px, 2fr) minmax(44px, auto);
  align-items: center;
  gap: 9px;
}

.product-rich-chart-row span,
.product-rich-chart-row strong {
  font-size: 11px;
  line-height: 1.2;
}

.product-rich-chart-row progress {
  width: 100%;
  height: 12px;
  accent-color: var(--blue);
}

.product-detail-sales-description {
  margin: 2px 0 6px;
}

.dashboard-product-mail-sales-description,
.dashboard-product-range-sales-description {
  margin: 0;
}

.dashboard-product-rich-editor {
  min-width: 0;
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--input-bg);
  box-shadow: var(--glass-edge);
  overflow: hidden;
}

.dashboard-product-rich-toolbar {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
}

.dashboard-product-rich-toolbar button,
.dashboard-product-rich-toolbar select {
  width: auto;
  min-width: 34px;
  min-height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--text);
  background: transparent;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
}

.dashboard-product-rich-toolbar button:hover,
.dashboard-product-rich-toolbar button:focus-visible,
.dashboard-product-rich-toolbar select:focus-visible {
  border-color: rgba(0, 113, 227, 0.28);
  color: var(--blue);
  background: rgba(0, 113, 227, 0.08);
  outline: none;
}

.dashboard-product-rich-format-label {
  display: block !important;
  text-transform: none !important;
}

.dashboard-product-rich-toolbar .dashboard-product-rich-format-label select {
  min-width: 112px;
  border-color: var(--line);
  background: var(--input-bg);
}

.dashboard-product-rich-toolbar-separator {
  width: 1px;
  height: 24px;
  margin: 0 2px;
  background: var(--line);
}

.dashboard-product-rich-composer {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid rgba(0, 113, 227, 0.24);
  background:
    radial-gradient(circle at 100% 0, rgba(0, 113, 227, 0.12), transparent 44%),
    rgba(247, 251, 255, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.dashboard-product-rich-composer[hidden],
.dashboard-product-rich-composer-fields[hidden] {
  display: none !important;
}

.dashboard-product-rich-composer-head {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-product-rich-composer-head > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.dashboard-product-rich-composer-head span {
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
}

.dashboard-product-rich-composer-head small,
.dashboard-product-rich-composer-fields label > small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.35;
}

.dashboard-product-rich-composer-head > button {
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--tile-glass);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.dashboard-product-rich-composer-fields {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(180px, 0.75fr);
  gap: 10px;
}

.dashboard-product-rich-composer-fields.compact {
  grid-template-columns: repeat(2, minmax(120px, 220px));
}

.dashboard-product-rich-composer-fields.chart {
  grid-template-columns: minmax(180px, 0.55fr) minmax(0, 1.45fr);
}

.dashboard-product-rich-composer-fields label {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.dashboard-product-rich-composer-fields input,
.dashboard-product-rich-composer-fields textarea {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--input-bg);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  outline: none;
}

.dashboard-product-rich-composer-fields textarea {
  min-height: 76px;
  resize: vertical;
}

.dashboard-product-rich-composer-fields input:focus,
.dashboard-product-rich-composer-fields textarea:focus {
  border-color: rgba(0, 113, 227, 0.52);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.dashboard-product-rich-composer-status {
  min-height: 14px;
  margin: 0;
  color: #b42318;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.35;
}

.dashboard-product-rich-composer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.dashboard-product-rich-composer-actions button {
  width: auto;
  min-width: 100px;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--tile-glass);
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.dashboard-product-rich-composer-actions button.primary {
  border-color: rgba(0, 113, 227, 0.5);
  color: #fff;
  background: linear-gradient(135deg, #1487ff, var(--blue));
}

.dashboard-product-rich-surface {
  min-height: 270px;
  max-height: 620px;
  padding: 18px;
  overflow: auto;
  background: rgba(255, 255, 255, 0.34);
  outline: none;
}

@media (max-width: 720px) {
  .dashboard-product-rich-composer-fields,
  .dashboard-product-rich-composer-fields.compact,
  .dashboard-product-rich-composer-fields.chart {
    grid-template-columns: 1fr;
  }
}

.dashboard-product-rich-surface:focus {
  box-shadow: inset 0 0 0 2px rgba(0, 113, 227, 0.2);
}

.dashboard-product-rich-surface:empty::before {
  color: var(--muted);
  content: attr(data-placeholder);
  pointer-events: none;
}

.dashboard-product-rich-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 7px 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.46);
  font-size: 9px;
  font-weight: 760;
  line-height: 1.3;
}

.dashboard-product-ai-assistant {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 0.34fr) auto;
  align-items: end;
  gap: 10px;
  padding: 13px;
  border-top: 1px solid rgba(0, 113, 227, 0.22);
  background:
    radial-gradient(circle at 0 0, rgba(139, 92, 246, 0.15), transparent 42%),
    linear-gradient(135deg, rgba(0, 113, 227, 0.11), rgba(20, 184, 166, 0.08));
}

.dashboard-product-ai-assistant-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.dashboard-product-ai-assistant-copy > span {
  width: max-content;
  padding: 3px 7px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #6d28d9, var(--blue));
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dashboard-product-ai-assistant-copy strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
  line-height: 1.2;
}

.dashboard-product-ai-assistant-copy small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
}

.dashboard-product-ai-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.dashboard-product-ai-actions button {
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid rgba(0, 113, 227, 0.28);
  border-radius: 8px;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.7);
  font: inherit;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

.dashboard-product-ai-actions button:first-child {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #6d28d9, var(--blue));
}

.dashboard-product-ai-actions button:disabled {
  opacity: 0.56;
  cursor: wait;
}

.dashboard-product-ai-assistant > p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  line-height: 1.35;
}

.dashboard-product-standard-labour {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 113, 227, 0.06);
}

.dashboard-product-standard-labour span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-product-standard-labour strong {
  min-width: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
}

.dashboard-product-upload-zone {
  position: relative;
  min-width: 0;
  min-height: 112px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px dashed rgba(0, 113, 227, 0.34);
  border-radius: 8px;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(0, 113, 227, 0.12), rgba(22, 163, 74, 0.08) 52%, rgba(245, 158, 11, 0.08)),
    var(--tile-glass);
  box-shadow: var(--glass-edge), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.dashboard-product-upload-zone:hover,
.dashboard-product-upload-zone.drag-over {
  border-color: var(--blue);
  box-shadow: var(--glass-edge), 0 14px 26px rgba(0, 113, 227, 0.12);
  transform: translateY(-1px);
}

.dashboard-product-upload-zone.has-files {
  border-style: solid;
  border-color: var(--blue-border);
}

.dashboard-product-upload-zone.tone-documents {
  background:
    linear-gradient(135deg, rgba(0, 113, 227, 0.1), rgba(99, 102, 241, 0.08) 50%, rgba(20, 184, 166, 0.08)),
    var(--tile-glass);
}

.dashboard-product-upload-zone input[data-product-upload-input] {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  border: 0;
  opacity: 0;
  cursor: pointer;
}

.dashboard-product-upload-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 113, 227, 0.24);
  border-radius: 8px;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.66);
  box-shadow: var(--glass-edge);
}

.dashboard-product-upload-icon svg {
  width: 22px;
  height: 22px;
}

.dashboard-product-upload-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.dashboard-product-upload-copy em,
.dashboard-product-upload-copy strong,
.dashboard-product-upload-copy small,
.dashboard-product-upload-status {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-product-upload-copy em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-product-upload-copy strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.dashboard-product-upload-copy small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
}

.dashboard-product-upload-status {
  grid-column: 1 / -1;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  font-weight: 850;
}

.dashboard-product-upload-zone.has-files .dashboard-product-upload-status {
  color: var(--blue);
  border-color: var(--blue-border);
  background: var(--blue-soft);
}

.dashboard-product-tool-assets {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.38);
}

.dashboard-product-tool-assets-head {
  display: grid;
  gap: 2px;
}

.dashboard-product-tool-assets-head span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-product-tool-assets-head strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}

.dashboard-product-tool-asset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.dashboard-product-tool-asset-card {
  position: relative;
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px dashed rgba(0, 113, 227, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(0, 113, 227, 0.1), rgba(20, 184, 166, 0.07)),
    var(--tile-glass);
  box-shadow: var(--glass-edge);
  cursor: default;
}

.dashboard-product-tool-asset-card.tone-model {
  background:
    linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(0, 113, 227, 0.08) 55%, rgba(15, 23, 42, 0.04)),
    var(--tile-glass);
}

.dashboard-product-tool-asset-card.has-files {
  border-style: solid;
  border-color: var(--blue-border);
}

.dashboard-product-tool-asset-card input[data-product-tool-asset-input] {
  width: 100%;
  min-height: 30px;
  padding: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.dashboard-product-tool-asset-card input[data-product-tool-asset-input]::file-selector-button {
  min-height: 24px;
  margin-right: 6px;
  border: 1px solid var(--blue-border);
  border-radius: 6px;
  color: var(--blue);
  background: var(--blue-soft);
  font: inherit;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

.dashboard-product-tool-asset-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.dashboard-product-tool-asset-copy em,
.dashboard-product-tool-asset-copy strong,
.dashboard-product-tool-asset-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-product-tool-asset-copy em {
  white-space: nowrap;
}

.dashboard-product-tool-asset-copy strong,
.dashboard-product-tool-asset-copy small {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  white-space: normal;
}

.dashboard-product-tool-asset-copy strong {
  -webkit-line-clamp: 2;
}

.dashboard-product-tool-asset-copy small {
  -webkit-line-clamp: 3;
}

.dashboard-product-tool-asset-copy em {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-product-tool-asset-copy strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.dashboard-product-tool-asset-copy small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 780;
}

.dashboard-product-tool-asset-preview {
  position: relative;
  min-height: 150px;
  display: grid;
  gap: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.62);
}

.dashboard-product-tool-preview-empty,
.dashboard-product-tool-drawing-preview {
  height: 100%;
  min-height: 150px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  padding: 12px;
  text-align: center;
}

.dashboard-product-tool-preview-empty strong,
.dashboard-product-tool-drawing-preview strong {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.dashboard-product-tool-preview-empty span,
.dashboard-product-tool-drawing-preview small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.dashboard-product-tool-default-preview {
  min-height: 180px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 14px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 34%, rgba(0, 113, 227, 0.12), transparent 42%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(241, 245, 249, 0.7));
}

.dashboard-product-tool-default-preview strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 950;
}

.dashboard-product-tool-default-preview span {
  max-width: 100%;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.dashboard-product-tool-default-schematic-symbol {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  padding: 12px;
  border: 1px solid var(--blue-border);
  border-radius: 8px;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.dashboard-product-tool-default-schematic-symbol .schematic-symbol-glyph {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dashboard-product-tool-default-floor-plan {
  width: min(100%, 190px);
  height: 118px;
  color: var(--blue);
  filter: drop-shadow(0 14px 24px rgba(15, 23, 42, 0.1));
}

.dashboard-product-tool-default-floor-plan .default-plan-grid {
  fill: rgba(255, 255, 255, 0.78);
  stroke: rgba(148, 163, 184, 0.42);
  stroke-width: 1.2;
}

.dashboard-product-tool-default-floor-plan .default-plan-body {
  fill: rgba(0, 113, 227, 0.12);
  stroke: currentColor;
  stroke-width: 3;
}

.dashboard-product-tool-default-floor-plan .default-plan-band,
.dashboard-product-tool-default-floor-plan .default-plan-port {
  fill: #ffffff;
  stroke: currentColor;
  stroke-width: 2.4;
}

.dashboard-product-tool-default-floor-plan .default-plan-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-product-tool-drawing-preview > span {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid var(--blue-border);
  border-radius: 8px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 12px;
  font-weight: 950;
}

.dashboard-product-tool-image-preview,
.dashboard-product-tool-pdf-preview,
.dashboard-product-tool-3d-viewer {
  width: 100%;
  height: 180px;
  min-height: 180px;
  margin: 0;
}

.dashboard-product-tool-image-preview {
  position: relative;
  background: rgba(15, 23, 42, 0.04);
}

.dashboard-product-tool-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.dashboard-product-tool-image-preview figcaption,
.dashboard-product-tool-3d-viewer > span {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 5px 7px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
  font-size: 10px;
  font-weight: 850;
}

.dashboard-product-tool-pdf-preview {
  display: block;
  border: 0;
}

.dashboard-product-tool-current-model-preview {
  min-width: 0;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 35% 22%, rgba(255, 255, 255, 0.9), transparent 35%),
    linear-gradient(135deg, rgba(0, 113, 227, 0.14), rgba(20, 184, 166, 0.1) 52%, rgba(99, 102, 241, 0.12));
}

.dashboard-product-tool-current-model-preview .dashboard-product-dimension-stage {
  min-height: 220px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.dashboard-product-tool-current-model-preview .dashboard-product-dimension-canvas-wrap {
  inset: 10px 8px 10px;
}

.dashboard-product-tool-current-model-preview .dashboard-product-dimension-data {
  display: none;
}

.dashboard-product-tool-current-model-preview > span {
  position: absolute;
  z-index: 3;
  left: 8px;
  right: 8px;
  bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 5px 7px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.84);
  font-size: 10px;
  font-weight: 850;
}

.dashboard-product-tool-current-model-preview > span strong {
  margin-right: 6px;
  color: var(--blue);
}

.dashboard-product-tool-front-label {
  position: absolute;
  z-index: 3;
  right: 8px;
  top: 8px;
  display: inline-grid;
  place-items: center;
  min-width: 56px;
  min-height: 24px;
  padding: 4px 9px;
  border: 1px solid rgba(0, 113, 227, 0.28);
  border-radius: 999px;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  font-size: 9px;
  font-style: normal;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
  pointer-events: none;
}

.dashboard-product-tool-front-label::before {
  content: "↑";
  margin-right: 4px;
  font-size: 12px;
  line-height: 1;
}

.dashboard-product-tool-3d-viewer {
  position: relative;
  background:
    radial-gradient(circle at 35% 22%, rgba(255, 255, 255, 0.86), transparent 34%),
    linear-gradient(135deg, rgba(0, 113, 227, 0.13), rgba(99, 102, 241, 0.12));
}

.dashboard-product-tool-3d-viewer.is-standard-model {
  background:
    radial-gradient(circle at 35% 22%, rgba(255, 255, 255, 0.9), transparent 35%),
    linear-gradient(135deg, rgba(0, 113, 227, 0.14), rgba(20, 184, 166, 0.1) 52%, rgba(99, 102, 241, 0.12));
}

.dashboard-product-tool-3d-viewer canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}

.dashboard-product-tool-3d-viewer canvas:active {
  cursor: grabbing;
}

.dashboard-product-tool-3d-viewer > span strong {
  margin-right: 6px;
  color: var(--blue);
}

.dashboard-product-tool-asset-file-list {
  display: grid;
  gap: 4px;
  padding: 0 8px 8px;
}

.dashboard-product-tool-asset-file-list label {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: inherit;
  background: rgba(255, 255, 255, 0.54);
}

.dashboard-product-tool-asset-file-list span {
  flex: 0 0 auto;
  color: var(--blue);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.dashboard-product-tool-asset-file-list select {
  min-width: 0;
  flex: 1 1 auto;
  height: 30px;
  padding: 0 26px 0 9px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 6px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.88);
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.dashboard-product-tool-transform-controls {
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.5);
}

.dashboard-product-tool-transform-head {
  display: grid;
  gap: 2px;
}

.dashboard-product-tool-transform-head strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-product-tool-transform-head small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.28;
}

.dashboard-product-tool-transform-list {
  display: grid;
  gap: 6px;
}

.dashboard-product-tool-transform-row {
  display: none;
  gap: 6px;
}

.dashboard-product-tool-transform-row.active {
  display: grid;
}

.dashboard-product-tool-transform-row > span {
  min-width: 0;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
}

.dashboard-product-tool-transform-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.dashboard-product-tool-transform-actions button {
  min-width: 0;
  min-height: 28px;
  padding: 5px 6px;
  border: 1px solid rgba(0, 113, 227, 0.22);
  border-radius: 6px;
  color: var(--blue);
  background: rgba(0, 113, 227, 0.08);
  font: inherit;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.08;
  cursor: pointer;
}

.dashboard-product-tool-transform-actions button:hover {
  border-color: var(--blue-border);
  background: var(--blue-soft);
}

.dashboard-product-tool-connection-pins {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}

.dashboard-product-tool-connection-pin {
  position: absolute;
  left: var(--connection-x);
  top: var(--connection-y);
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  color: #ffffff;
  background: var(--connection-colour, var(--blue));
  box-shadow: 0 5px 12px rgba(15, 23, 42, 0.22);
  font-size: 8px;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
  transform: translate(-50%, -50%);
}

.dashboard-product-tool-connection-pin.is-surface {
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--connection-colour, var(--blue)) 22%, transparent),
    0 7px 16px rgba(15, 23, 42, 0.28);
}

.dashboard-product-tool-connection-pin.is-hidden {
  opacity: 0;
}

.dashboard-product-tool-connections {
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.48);
}

.dashboard-product-tool-connections-head {
  display: grid;
  gap: 2px;
}

.dashboard-product-tool-connections-head strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-product-tool-connections-head small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.28;
}

.dashboard-product-tool-service-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.dashboard-product-tool-service-picker button {
  min-width: 0;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: var(--button-glass);
  font: inherit;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.1;
  cursor: pointer;
}

.dashboard-product-tool-service-picker button::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--connection-colour, var(--blue));
}

.dashboard-product-tool-service-picker button.active {
  border-color: var(--blue-border);
  color: var(--blue);
  background: var(--blue-soft);
}

.dashboard-product-tool-service-picker button.is-placed {
  border-color: color-mix(in srgb, var(--connection-colour, var(--blue)) 42%, var(--line));
}

.dashboard-product-tool-connection-list {
  display: grid;
  gap: 5px;
}

.dashboard-product-tool-connection-list p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.dashboard-product-tool-connection-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.54);
}

.dashboard-product-tool-connection-row > span {
  min-width: 0;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.dashboard-product-tool-connection-row em {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--connection-colour, var(--blue));
}

.dashboard-product-tool-connection-row strong,
.dashboard-product-tool-connection-row small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-product-tool-connection-row strong {
  color: var(--text);
  font-size: 10px;
  font-weight: 900;
}

.dashboard-product-tool-connection-row small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.dashboard-product-scope-editor,
.dashboard-product-property-editor,
.dashboard-product-accessory-editor {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
}

.dashboard-product-scope-editor.is-embedded,
.dashboard-product-property-editor.is-embedded {
  padding: 0;
  border: 0;
  background: transparent;
}

.dashboard-product-scope-head,
.dashboard-product-property-head,
.dashboard-product-accessory-head,
.dashboard-product-review-workspace-head,
.dashboard-product-review-tile-head,
.dashboard-product-upload-assignment-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.dashboard-product-scope-head,
.dashboard-product-property-head div,
.dashboard-product-accessory-head div,
.dashboard-product-review-workspace-head div,
.dashboard-product-review-tile-head,
.dashboard-product-upload-assignment-head {
  min-width: 0;
}

.dashboard-product-scope-head span,
.dashboard-product-property-head span,
.dashboard-product-accessory-head span,
.dashboard-product-review-workspace-head span,
.dashboard-product-review-tile-head span,
.dashboard-product-upload-assignment-head span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-product-scope-head strong,
.dashboard-product-property-head strong,
.dashboard-product-accessory-head strong,
.dashboard-product-review-workspace-head strong,
.dashboard-product-review-tile-head strong,
.dashboard-product-upload-assignment-head strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.dashboard-product-scope-head strong {
  max-width: none;
  text-align: left;
  font-size: 12px;
  line-height: 1.2;
}

.dashboard-product-scope-head {
  display: grid;
  justify-content: stretch;
  gap: 4px;
}

.dashboard-product-scope-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 6px;
}

.dashboard-product-scope-toggle {
  display: grid;
  grid-template-columns: 15px minmax(0, 1fr) auto;
  grid-template-areas: "check label state";
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--button-glass);
}

.dashboard-product-scope-toggle input,
.dashboard-product-property-shared input {
  width: 15px;
  height: 15px;
  min-height: 15px;
  margin: 0;
  accent-color: var(--blue);
  box-shadow: none;
}

.dashboard-product-scope-toggle input {
  grid-area: check;
  align-self: center;
}

.dashboard-product-property-shared span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 900;
}

.dashboard-product-scope-toggle span {
  grid-area: label;
  color: var(--text);
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.16;
}

.dashboard-product-scope-toggle em {
  grid-area: state;
  justify-self: start;
  padding: 1px 6px;
  border: 1px solid rgba(100, 116, 139, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  font-size: 7px;
  font-weight: 900;
  font-style: normal;
  text-transform: uppercase;
}

.dashboard-product-property-list {
  display: grid;
  gap: 8px;
}

.dashboard-product-property-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.75fr) minmax(170px, 1fr) auto auto;
  align-items: center;
  gap: 8px;
}

.dashboard-product-property-shared {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

.dashboard-product-upload-assignment {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.38);
}

.dashboard-product-upload-assignment-list {
  display: grid;
  gap: 7px;
}

.dashboard-product-upload-assignment-list p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.dashboard-product-upload-assignment-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(170px, 0.7fr) auto;
  align-items: center;
  gap: 8px;
}

.dashboard-product-upload-assignment-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
}

.dashboard-product-upload-shared-lock {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid rgba(0, 113, 227, 0.2);
  border-radius: 7px;
  color: var(--blue);
  background: rgba(0, 113, 227, 0.08);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.dashboard-product-upload-assignment-remove {
  min-height: 34px;
  padding-inline: 12px;
  white-space: nowrap;
}

.dashboard-product-existing-media {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.62), rgba(248, 250, 252, 0.42)),
    var(--tile-glass);
}

.dashboard-product-existing-media-head {
  display: grid;
  gap: 2px;
}

.dashboard-product-existing-media-head span,
.dashboard-product-existing-media-group > em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-product-existing-media-head strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.dashboard-product-existing-media-group {
  display: grid;
  gap: 6px;
}

.dashboard-product-existing-media-group > div,
.dashboard-product-accessory-current-files {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 7px;
}

.dashboard-product-existing-media-group.is-documents > div {
  max-height: 230px;
  overflow: auto;
  padding-right: 3px;
}

.dashboard-product-existing-media-card {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 7px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 7px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.58);
  text-decoration: none;
}

.dashboard-product-existing-media-card.is-document {
  grid-template-columns: 24px minmax(0, 1fr) minmax(132px, 210px);
  grid-template-areas: "icon copy actions";
  min-height: 82px;
  overflow: hidden;
}

.dashboard-product-existing-media-card.is-model {
  border-color: rgba(0, 113, 227, 0.24);
  background:
    radial-gradient(circle at 10% 10%, rgba(0, 113, 227, 0.12), transparent 48%),
    rgba(255, 255, 255, 0.64);
}

.dashboard-product-existing-media-card img {
  grid-area: icon;
  width: 44px;
  height: 38px;
  object-fit: contain;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.8);
}

.dashboard-product-existing-media-card > svg {
  grid-area: icon;
  width: 19px;
  height: 19px;
  color: var(--blue);
}

.dashboard-product-existing-media-card figcaption,
.dashboard-product-existing-media-card > span:not(.dashboard-product-existing-media-actions) {
  grid-area: copy;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.dashboard-product-existing-media-card strong,
.dashboard-product-existing-media-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-product-existing-media-card strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
}

.dashboard-product-existing-media-card small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.dashboard-product-existing-media-actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
}

.dashboard-product-existing-media-actions .settings-mini-btn {
  min-height: 26px;
  padding: 4px 8px;
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}

.dashboard-product-existing-media-actions .settings-mini-btn.primary {
  border-color: var(--blue-border);
  color: var(--blue);
  background: var(--blue-soft);
}

.dashboard-product-existing-media-card.is-image {
  grid-template-areas:
    "icon copy"
    "actions actions";
}

.dashboard-product-existing-media-card.is-image .dashboard-product-existing-media-actions {
  justify-content: flex-start;
}

@media (max-width: 760px) {
  .dashboard-product-existing-media-card.is-document {
    grid-template-columns: 24px minmax(0, 1fr);
    grid-template-areas:
      "icon copy"
      "actions actions";
  }

  .dashboard-product-existing-media-card.is-document .dashboard-product-existing-media-actions {
    justify-content: flex-start;
  }
}

.dashboard-current-file-viewer-modal {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: grid;
  place-items: center;
  padding: 18px;
}

.dashboard-current-file-viewer-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.42);
}

.dashboard-current-file-viewer-popup {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100vw - 28px));
  height: min(780px, calc(100vh - 28px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.86)),
    var(--tile-glass);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}

.dashboard-current-file-viewer-popup > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-current-file-viewer-popup > header div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.dashboard-current-file-viewer-popup > header span,
.dashboard-current-file-viewer-popup > header small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-current-file-viewer-popup h2 {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 950;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-current-file-viewer-body {
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.dashboard-current-file-viewer-frame,
.dashboard-current-file-viewer-video {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.dashboard-current-file-viewer-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 760px) {
  .dashboard-current-file-viewer-modal {
    padding: 10px;
  }

  .dashboard-current-file-viewer-popup {
    width: calc(100vw - 20px);
    height: calc(100vh - 20px);
    height: calc(100dvh - max(20px, env(safe-area-inset-top)) - env(safe-area-inset-bottom));
    padding: 10px;
  }

  .dashboard-current-file-viewer-popup h2 {
    font-size: 15px;
  }
}

.dashboard-product-tool-asset-card.is-loaded-from-current-files {
  outline: 2px solid rgba(0, 113, 227, 0.42);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(0, 113, 227, 0.08), var(--glass-shadow);
}

.dashboard-product-accessory-current-files {
  padding: 7px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.34);
}

.dashboard-product-recent-update,
.dashboard-product-review-note-inline {
  margin: 0;
  padding: 9px 10px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 850;
}

.dashboard-product-recent-update {
  border: 1px solid rgba(22, 163, 74, 0.24);
  color: #15803d;
  background: rgba(22, 163, 74, 0.08);
}

.dashboard-product-review-note-inline {
  display: grid;
  gap: 3px;
  border: 1px solid var(--blue-border);
  color: var(--text);
  background: var(--blue-soft);
}

.dashboard-product-review-note-inline strong {
  color: var(--blue);
  font-size: 10px;
  text-transform: uppercase;
}

.dashboard-product-model-editor {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.46);
}

.dashboard-product-model-editor-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-product-model-editor-head div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.dashboard-product-model-editor-head span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-product-model-editor-head strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.dashboard-product-model-editor-head small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.dashboard-product-model-editor-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.dashboard-product-model-edit-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--tile-glass);
}

.dashboard-product-model-edit-table {
  width: 100%;
  min-width: 1780px;
  border-collapse: collapse;
  table-layout: auto;
}

.dashboard-product-model-edit-table th,
.dashboard-product-model-edit-table td {
  padding: 7px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.dashboard-product-model-edit-table th {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-product-model-edit-table td {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-product-model-edit-table tr:last-child td {
  border-bottom: 0;
}

.dashboard-product-model-edit-table tr.is-new {
  background: var(--blue-soft);
}

.dashboard-product-model-edit-table input,
.dashboard-product-model-edit-table textarea {
  min-height: 34px;
  padding: 7px 8px;
  font-size: 12px;
}

.dashboard-product-model-edit-table textarea {
  min-width: 260px;
  resize: vertical;
}

.dashboard-product-model-edit-table th:first-child,
.dashboard-product-model-edit-table td:first-child {
  min-width: 220px;
}

.dashboard-product-model-edit-table th:nth-child(3),
.dashboard-product-model-edit-table td:nth-child(3),
.dashboard-product-model-edit-table th:nth-child(4),
.dashboard-product-model-edit-table td:nth-child(4),
.dashboard-product-model-edit-table th:nth-child(5),
.dashboard-product-model-edit-table td:nth-child(5),
.dashboard-product-model-edit-table th:nth-child(6),
.dashboard-product-model-edit-table td:nth-child(6),
.dashboard-product-model-edit-table th:nth-child(8),
.dashboard-product-model-edit-table td:nth-child(8),
.dashboard-product-model-edit-table th:nth-child(9),
.dashboard-product-model-edit-table td:nth-child(9),
.dashboard-product-model-edit-table th:nth-child(10),
.dashboard-product-model-edit-table td:nth-child(10) {
  min-width: 112px;
}

.dashboard-product-model-edit-table .dashboard-product-model-labour-cell {
  min-width: 220px;
}

.dashboard-product-model-labour-cell {
  display: grid;
  gap: 4px;
}

.dashboard-product-model-labour-cell small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  line-height: 1.25;
}

.dashboard-product-model-edit-table [data-model-scope-column="productCode"],
.dashboard-product-model-edit-table [data-model-scope-cell="productCode"] {
  min-width: 190px;
}

.dashboard-product-model-edit-table [data-model-scope-column="price"],
.dashboard-product-model-edit-table [data-model-scope-cell="price"] {
  min-width: 145px;
}

.dashboard-product-model-edit-table [data-model-scope-column="details"],
.dashboard-product-model-edit-table [data-model-scope-cell="details"],
.dashboard-product-model-edit-table [data-model-scope-column="description"],
.dashboard-product-model-edit-table [data-model-scope-cell="description"],
.dashboard-product-model-edit-table [data-model-scope-column="range"],
.dashboard-product-model-edit-table [data-model-scope-cell="range"],
.dashboard-product-model-edit-table [data-model-scope-column="costing"],
.dashboard-product-model-edit-table [data-model-scope-cell="costing"],
.dashboard-product-model-edit-table [data-model-scope-column="technical"],
.dashboard-product-model-edit-table [data-model-scope-cell="technical"],
.dashboard-product-model-edit-table [data-model-custom-property-column],
.dashboard-product-model-edit-table [data-model-custom-property-cell] {
  min-width: 280px;
}

.dashboard-product-model-edit-table [data-model-action-column],
.dashboard-product-model-edit-table [data-model-action-cell] {
  min-width: 92px;
}

.dashboard-product-accessory-list {
  display: grid;
  gap: 8px;
}

.dashboard-product-accessory-row {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.58), rgba(248, 250, 252, 0.38)),
    var(--button-glass);
  box-shadow: var(--glass-edge);
}

.dashboard-product-accessory-row label,
.dashboard-product-accessory-compat {
  display: grid;
  gap: 3px;
}

.dashboard-product-accessory-top,
.dashboard-product-accessory-assets {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.dashboard-product-accessory-top {
  grid-template-columns: minmax(220px, 1.35fr) minmax(150px, 0.8fr) minmax(118px, 0.42fr) auto;
  align-items: end;
}

.dashboard-product-accessory-assets {
  grid-template-columns: repeat(2, minmax(180px, 1fr)) repeat(2, minmax(142px, 0.58fr));
  align-items: end;
}

.dashboard-product-accessory-row .full,
.dashboard-product-accessory-compat.full {
  grid-column: 1 / -1;
}

.dashboard-product-accessory-file {
  min-height: 48px;
  align-content: center;
  padding: 6px 8px;
  border: 1px dashed rgba(0, 113, 227, 0.32);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.44);
}

.dashboard-product-accessory-file input[type="file"] {
  min-height: 28px;
  padding: 2px;
  font-size: 10px;
  font-weight: 760;
}

.dashboard-product-accessory-file input[type="file"]::file-selector-button {
  min-height: 24px;
  margin-right: 6px;
  border: 1px solid var(--blue-border);
  border-radius: 6px;
  color: var(--blue);
  background: var(--blue-soft);
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.dashboard-product-money-field input {
  color: var(--blue);
  font-weight: 900;
}

.dashboard-product-accessory-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
}

.dashboard-product-accessory-actions .settings-mini-btn {
  min-height: 32px;
  padding-inline: 12px;
}

.dashboard-product-accessory-row span,
.dashboard-product-accessory-compat > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.15;
  text-transform: uppercase;
}

.dashboard-product-accessory-row input,
.dashboard-product-accessory-row textarea {
  min-height: 32px;
  padding: 6px 8px;
}

.dashboard-product-accessory-description textarea {
  min-height: 48px;
}

.dashboard-product-accessory-compat > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dashboard-product-accessory-compat label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  text-transform: none;
}

.dashboard-product-accessory-compat input[type="checkbox"] {
  width: 15px;
  height: 15px;
  min-height: 15px;
  flex: 0 0 15px;
  padding: 0;
  accent-color: var(--blue);
  box-shadow: none;
}

.dashboard-product-accessory-compat em,
.dashboard-product-accessory-compat p {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 780;
  line-height: 1.25;
}

.dashboard-product-accessory-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.dashboard-product-accessory-cards article {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--button-glass);
}

.dashboard-product-accessory-cards article > div {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 8px;
}

.dashboard-product-accessory-cards strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-product-accessory-cards b {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.dashboard-product-accessory-cards p,
.dashboard-product-accessory-cards small {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
  line-height: 1.35;
}

.dashboard-product-submission-list {
  display: grid;
  gap: 8px;
  align-content: start;
  overflow: auto;
}

.dashboard-product-submission-message {
  margin: 0;
  padding: 9px 10px;
  border: 1px solid var(--blue-border);
  border-radius: 7px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 12px;
  font-weight: 850;
}

.dashboard-product-review-tile,
.dashboard-product-review-workspace {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 12px;
}

.dashboard-product-review-tile p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
  line-height: 1.35;
}

.dashboard-product-review-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.dashboard-product-review-stats span {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--button-glass);
}

.dashboard-product-review-stats small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-product-review-stats strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.dashboard-product-review-workspace {
  overflow: auto;
  padding-right: 2px;
}

.dashboard-product-review-filter {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.34);
}

.dashboard-product-review-filter button {
  min-width: 0;
  min-height: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.dashboard-product-review-filter button.active {
  border-color: var(--blue-border);
  color: var(--blue);
  background: var(--blue-soft);
  box-shadow: var(--glass-edge);
}

.dashboard-product-review-filter span,
.dashboard-product-review-filter strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.dashboard-product-review-filter strong {
  justify-self: end;
  padding: 2px 6px;
  border: 1px solid rgba(100, 116, 139, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--text);
}

.dashboard-product-review-groups {
  gap: 12px;
}

.dashboard-product-submission-group {
  display: grid;
  gap: 8px;
}

.dashboard-product-submission-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--button-glass);
}

.dashboard-product-submission-group-head strong,
.dashboard-product-submission-group-head span {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.product-submission-head em {
  color: var(--blue);
  font-style: normal;
  font-weight: 900;
}

.product-submission-list {
  display: grid;
  gap: 8px;
}

.product-submission-card {
  display: grid;
  gap: 8px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
}

.product-submission-card.active {
  border-color: var(--blue-border);
  background: var(--blue-soft);
}

.dashboard-product-submission-main {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.product-submission-card span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.product-submission-card strong,
.product-submission-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-submission-card small,
.product-submission-card em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.product-submission-card em {
  justify-self: end;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--button-glass);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.product-submission-card > div {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.dashboard-product-submission-actions {
  justify-content: flex-end;
}

.dashboard-product-review-notes {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.38);
}

.dashboard-product-review-notes label {
  display: grid;
  gap: 5px;
}

.dashboard-product-review-notes span,
.dashboard-product-review-notes p,
.dashboard-product-review-notes textarea {
  font-size: 11px;
  font-weight: 800;
}

.dashboard-product-review-notes span {
  color: var(--muted);
  text-transform: uppercase;
}

.dashboard-product-review-notes p {
  display: grid;
  gap: 3px;
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.dashboard-product-review-notes p strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
}

.dashboard-product-review-notes textarea {
  width: 100%;
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: var(--input-bg);
  padding: 8px 9px;
  resize: vertical;
}

.dashboard-product-recent-text {
  color: #15803d !important;
  font-weight: 950 !important;
}

.product-submission-card.status-approved em {
  color: #16a34a;
  border-color: rgba(22, 163, 74, 0.24);
  background: rgba(22, 163, 74, 0.08);
}

.product-submission-card.status-rejected em {
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.22);
  background: rgba(239, 68, 68, 0.08);
}

@media (max-width: 1320px) {
  .dashboard-product-range-popup {
    width: min(1180px, 100%);
  }

  .dashboard-product-range-hero-card,
  .dashboard-product-mail-reader-hero {
    grid-template-columns: minmax(230px, 0.34fr) minmax(0, 1fr);
  }

  .dashboard-product-model-detail-body {
    grid-template-columns: minmax(220px, 0.55fr) minmax(0, 1.45fr);
  }

  .dashboard-product-model-insights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-product-highlight-card {
    grid-column: 1 / -1;
  }

  .dashboard-product-highlight-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

@media (max-width: 980px) {
  .dashboard-dhw-workspace {
    padding: 10px 12px 14px;
    overflow: auto;
  }

  .dashboard-dhw-layout,
  .dashboard-dhw-controls-grid,
  .dashboard-dhw-controls-grid.compact,
  .dashboard-dhw-controls-grid.storage,
  .dashboard-dhw-metric-grid,
  .dashboard-dhw-service-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-dhw-layout,
  .dashboard-dhw-inputs,
  .dashboard-dhw-results {
    overflow: visible;
  }

  .dashboard-dhw-recommendations {
    max-height: 520px;
  }

  .dashboard-dhw-outlet-table {
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .dashboard-dhw-outlet-head,
  .dashboard-dhw-outlet-row {
    min-width: 640px;
  }

  .dashboard-unit-workspace {
    padding: 10px 12px 14px;
    overflow: auto;
  }

  .dashboard-unit-slider {
    grid-auto-flow: column;
    grid-auto-columns: minmax(118px, 1fr);
    grid-template-columns: none;
    overflow-x: auto;
  }

  .dashboard-unit-section-grid,
  .dashboard-unit-converter-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-unit-card-list {
    grid-template-columns: 1fr;
  }

  .dashboard-unit-section-grid {
    overflow: visible;
  }

  .dashboard-unit-swap {
    width: 100%;
  }

  .dashboard-quick-tender-workspace {
    padding: 10px 12px 14px;
    overflow: auto;
  }

  .dashboard-analytics-workspace {
    padding: 0 12px 14px;
    overflow: auto;
  }

  .dashboard-analytics-layout,
  .dashboard-analytics-drilldown,
  .dashboard-analytics-chart-grid,
  .dashboard-analytics-table-grid {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .dashboard-analytics-controls {
    grid-template-columns: 1fr;
  }

  .dashboard-analytics-scale {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .dashboard-analytics-sidebar,
  .dashboard-analytics-main,
  .dashboard-analytics-panel {
    overflow: visible;
  }

  .dashboard-analytics-main {
    grid-template-rows: auto;
  }

  .dashboard-analytics-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-analytics-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-analytics-summary h2 {
    white-space: normal;
  }

  .dashboard-advertising-control-grid,
  .dashboard-advertising-content-grid,
  .dashboard-advertising-summary {
    grid-template-columns: 1fr;
  }

  .dashboard-advertising-open-link {
    justify-self: stretch;
  }

  .dashboard-advertising-file-manager {
    min-height: 320px;
    max-height: none;
  }

  .dashboard-advertising-table {
    overflow-x: auto;
  }

  .dashboard-advertising-table-head,
  .dashboard-advertising-table-row {
    min-width: 680px;
  }

  .dashboard-news-analytics-head,
  .dashboard-news-analytics-row {
    min-width: 880px;
  }

  .dashboard-news-list {
    grid-template-columns: 1fr;
  }

  .dashboard-news-section {
    grid-template-columns: 1fr;
  }

  .dashboard-news-section-head {
    display: grid;
    align-items: start;
  }

  .dashboard-news-section-head strong {
    max-width: none;
    text-align: left;
  }

  .dashboard-news-admin-grid,
  .dashboard-news-admin-form,
  .dashboard-news-popout-hero {
    grid-template-columns: 1fr;
  }

  .dashboard-news-popout-backdrop {
    padding: 12px;
  }

  .dashboard-news-popout {
    max-height: calc(100vh - 24px);
  }

  .dashboard-news-rich-editor-head {
    display: grid;
  }

  .dashboard-news-rich-editor-head small {
    max-width: none;
    text-align: left;
  }

  .dashboard-news-popout-graph article,
  .dashboard-news-admin-row {
    grid-template-columns: 1fr;
  }

  .dashboard-news-graph-donut,
  .dashboard-news-graph-editor-head,
  .dashboard-news-graph-row {
    grid-template-columns: 1fr;
  }

  .dashboard-news-donut {
    justify-self: center;
  }

  .dashboard-news-admin-row > div {
    justify-content: flex-start;
  }

  .dashboard-analytics-project-table {
    overflow-x: auto;
  }

	  .dashboard-analytics-project-head,
	  .dashboard-analytics-project-row,
	  .dashboard-analytics-data-head,
	  .dashboard-analytics-data-row {
	    min-width: 680px;
	  }

	  .dashboard-analytics-project-modal {
	    align-items: stretch;
	    padding: 12px;
	  }

	  .dashboard-analytics-project-popup {
	    width: 100%;
	    max-height: calc(100vh - 24px);
	    max-height: calc(100dvh - max(24px, env(safe-area-inset-top)) - env(safe-area-inset-bottom));
	  }

		  .dashboard-analytics-project-value-grid,
		  .dashboard-analytics-project-identity-grid,
		  .dashboard-analytics-project-activity-grid {
		    grid-template-columns: 1fr;
		  }

		  .dashboard-analytics-company-identity-card dl,
		  .dashboard-analytics-user-identity-card dl,
		  .dashboard-analytics-project-product-row,
		  .dashboard-analytics-project-accessory-list span {
		    grid-template-columns: 1fr;
		  }

		  .dashboard-analytics-project-accessory-list small {
		    grid-column: auto;
		  }

	  .dashboard-analytics-compare-controls,
	  .dashboard-analytics-compare-board,
	  .dashboard-analytics-compare-row {
	    grid-template-columns: 1fr;
	  }

	  .dashboard-analytics-compare-row em {
	    justify-self: start;
	  }

	  .quick-tender-shell {
	    grid-template-columns: 1fr;
    overflow: visible;
  }

  .quick-tender-side,
  .quick-tender-main,
  .quick-tender-summary {
    overflow: visible;
  }

  .quick-tender-table-wrap {
    max-height: 62vh;
  }

  .quick-tender-picker-toolbar,
  .quick-tender-sponsored-editor {
    grid-template-columns: 1fr;
  }

  .quick-tender-product-picker,
  .quick-tender-sponsored-panel {
    width: 96vw;
  }

  .dashboard-product-library-workspace {
    padding: 0 12px 14px;
    overflow: auto;
  }

  .dashboard-product-library-workspace.storefront-mode {
    padding: 0 12px 24px;
  }

  .dashboard-product-storefront {
    gap: 30px;
    padding-top: 16px;
  }

  .dashboard-product-store-hero {
    min-height: 0;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 18px;
    padding-top: 18px;
  }

  .dashboard-product-store-hero h2 {
    font-size: 48px;
  }

  .dashboard-product-store-hero p,
  .dashboard-product-store-section-head h2,
  .dashboard-product-store-section-head span {
    font-size: 22px;
  }

  .dashboard-product-store-hero aside {
    justify-self: start;
    justify-items: start;
    text-align: left;
  }

  .dashboard-product-store-categories {
    grid-auto-columns: 112px;
    gap: 18px;
  }

  .dashboard-product-feature-rail {
    grid-auto-columns: minmax(280px, 330px);
  }

  .dashboard-product-feature-card {
    min-height: 380px;
    padding: 18px;
  }

  .dashboard-product-feature-copy strong {
    font-size: 22px;
  }

  .dashboard-product-feature-card .product-photo {
    min-height: 160px;
  }

  .dashboard-product-store-section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .dashboard-product-library-header,
  .dashboard-product-range-head {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-product-library-header-actions,
  .dashboard-product-library-tabs,
  .dashboard-product-range-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .dashboard-product-library-layout,
  .dashboard-product-management-hero,
  .dashboard-product-admin-layout,
  .dashboard-product-bulk-upload,
  .dashboard-product-bulk-upload-meta,
	  .dashboard-product-range-body,
	  .dashboard-product-range-hero-card,
		  .dashboard-product-range-summary,
		  .dashboard-product-range-copy-grid,
		  .dashboard-product-model-selector-list,
		  .dashboard-product-model-detail-body,
		  .dashboard-product-model-insights,
		  .dashboard-product-model-notes,
		  .dashboard-product-quick-stats,
		  .dashboard-product-editor-form,
		  .dashboard-product-editor-section-grid,
		  .dashboard-product-property-row,
		  .dashboard-product-upload-assignment-row,
		  .dashboard-product-tool-asset-grid,
	  .dashboard-product-accessory-row,
		  .dashboard-product-accessory-top,
		  .dashboard-product-accessory-assets {
	    grid-template-columns: 1fr;
	  }

  .dashboard-product-ai-assistant {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .dashboard-product-ai-actions {
    justify-content: flex-start;
  }

  .dashboard-product-rich-toolbar {
    align-items: stretch;
  }

  .dashboard-product-rich-toolbar-separator {
    display: none;
  }

  .product-rich-chart-row {
    grid-template-columns: minmax(78px, 0.8fr) minmax(90px, 1.4fr) auto;
  }

  .dashboard-product-library-layout,
  .dashboard-product-management-shell,
  .dashboard-product-admin-layout,
  .dashboard-product-range-body {
    overflow: visible;
    height: auto;
  }

  .dashboard-product-library-rail,
  .dashboard-product-library-results,
  .dashboard-product-admin-panel,
  .dashboard-product-range-overview,
  .dashboard-product-range-visual,
  .dashboard-product-range-main {
    overflow: visible;
  }

  .dashboard-product-library-title {
    align-items: start;
    flex-direction: column;
  }

  .dashboard-product-library-title small {
    max-width: none;
    text-align: left;
  }

  .dashboard-product-model-detail-head {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-product-management-hero {
    min-width: 0;
  }

  .dashboard-product-bulk-upload-actions {
    justify-content: flex-start;
  }

  .dashboard-product-range-head {
    grid-template-columns: 1fr;
  }

  .dashboard-product-range-backdrop {
    padding: 8px;
    overflow: auto;
  }

	  .dashboard-product-range-popup {
	    max-height: none;
	    min-height: 100%;
	  }

	  .dashboard-product-dimension-stage {
	    min-height: 210px;
	  }
	}

@media (max-width: 1240px) {
  .dashboard-product-mail-layout {
    grid-template-columns: minmax(210px, 250px) minmax(310px, 390px) minmax(520px, 1fr);
    overflow: auto hidden;
  }
}

@media (max-width: 980px) {
  .dashboard-product-library-workspace.mail-mode {
    overflow: auto;
    padding: 0 12px 14px;
  }

  .dashboard-product-mail {
    height: auto;
    min-height: 760px;
  }

  .dashboard-product-mail-layout,
  .dashboard-product-mail-reader-hero,
  .dashboard-product-mail-copy-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-product-mail-layout.sidebar-collapsed,
  .dashboard-product-mail-layout.sidebar-collapsed .dashboard-product-mail-reader-hero {
    grid-template-columns: 1fr;
  }

  .dashboard-product-mail-layout {
    overflow: visible;
  }

  .dashboard-product-mail-sidebar,
  .dashboard-product-mail-list-pane,
  .dashboard-product-mail-reader {
    overflow: visible;
  }

  .dashboard-product-mail-sidebar,
  .dashboard-product-mail-list-pane {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .dashboard-product-mail-reader-head {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .dashboard-product-mail-reader-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

html[data-theme="dark"] .dashboard-workspace {
  background:
    radial-gradient(circle at 12% 4%, rgba(0, 113, 227, 0.1), transparent 30%),
    linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(3, 7, 18, 0.98));
}

html[data-theme="dark"] .dashboard-dhw-workspace {
  background:
    radial-gradient(circle at 12% 0%, rgba(14, 165, 233, 0.13), transparent 28%),
    linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(3, 7, 18, 0.98));
}

html[data-theme="dark"] .hydraulic-header.dashboard-quick-tool-header {
  border-color: rgba(148, 163, 184, 0.24);
  border-bottom-color: rgba(148, 163, 184, 0.22);
  background:
    radial-gradient(circle at 12% 0%, rgba(37, 99, 235, 0.18), transparent 32%),
    linear-gradient(145deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.94));
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] .dashboard-unit-workspace {
  background:
    radial-gradient(circle at 12% 0%, rgba(99, 102, 241, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(3, 7, 18, 0.98));
}

html[data-theme="dark"] .dashboard-quick-tender-workspace {
  background:
    radial-gradient(circle at 12% 0%, rgba(14, 165, 233, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(3, 7, 18, 0.98));
}

html[data-theme="dark"] .dashboard-analytics-workspace {
  background:
    radial-gradient(circle at 12% 0%, rgba(20, 184, 166, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(3, 7, 18, 0.98));
}

html[data-theme="dark"] .dashboard-advertising-workspace {
  background:
    radial-gradient(circle at 12% 0%, rgba(124, 58, 237, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(3, 7, 18, 0.98));
}

html[data-theme="dark"] .dashboard-dhw-panel,
html[data-theme="dark"] .dashboard-dhw-hero-result,
html[data-theme="dark"] .dashboard-unit-section,
html[data-theme="dark"] .dashboard-unit-slider,
html[data-theme="dark"] .dashboard-analytics-sidebar,
html[data-theme="dark"] .dashboard-analytics-main,
html[data-theme="dark"] .dashboard-analytics-panel,
html[data-theme="dark"] .dashboard-analytics-summary,
html[data-theme="dark"] .dashboard-advertising-panel,
html[data-theme="dark"] .dashboard-analytics-chart-panel,
html[data-theme="dark"] .dashboard-analytics-project-popup,
html[data-theme="dark"] .quick-tender-side,
html[data-theme="dark"] .quick-tender-main,
html[data-theme="dark"] .quick-tender-summary,
html[data-theme="dark"] .quick-tender-product-picker,
html[data-theme="dark"] .quick-tender-sponsored-panel {
  background: rgba(17, 24, 39, 0.72);
  border-color: rgba(148, 163, 184, 0.22);
}

html[data-theme="dark"] .dashboard-dhw-outlet-row,
html[data-theme="dark"] .dashboard-dhw-metric,
html[data-theme="dark"] .dashboard-dhw-toggle,
html[data-theme="dark"] .dashboard-dhw-service-card,
html[data-theme="dark"] .dashboard-dhw-service-value,
html[data-theme="dark"] .dashboard-dhw-load-summary,
html[data-theme="dark"] .dashboard-dhw-storage-result,
html[data-theme="dark"] .dashboard-dhw-recommendation-card,
html[data-theme="dark"] .dashboard-dhw-product-match,
html[data-theme="dark"] .dashboard-dhw-controls-grid input,
html[data-theme="dark"] .dashboard-dhw-controls-grid select,
html[data-theme="dark"] .dashboard-dhw-outlet-row input,
html[data-theme="dark"] .dashboard-dhw-outlet-row select,
html[data-theme="dark"] .dashboard-unit-card,
html[data-theme="dark"] .dashboard-unit-result,
html[data-theme="dark"] .dashboard-unit-decimal-field input,
html[data-theme="dark"] .dashboard-unit-decimal-field select,
html[data-theme="dark"] .dashboard-unit-converter-grid input,
html[data-theme="dark"] .dashboard-unit-converter-grid select,
html[data-theme="dark"] .dashboard-analytics-list button,
html[data-theme="dark"] .dashboard-analytics-card,
html[data-theme="dark"] .dashboard-analytics-metric,
html[data-theme="dark"] .dashboard-analytics-scale,
html[data-theme="dark"] .dashboard-analytics-controls input,
html[data-theme="dark"] .dashboard-analytics-reset,
html[data-theme="dark"] .dashboard-analytics-compare-controls select,
html[data-theme="dark"] .dashboard-analytics-compare-title,
html[data-theme="dark"] .dashboard-analytics-compare-row,
html[data-theme="dark"] .dashboard-analytics-data-row,
html[data-theme="dark"] .dashboard-analytics-project-row,
html[data-theme="dark"] .dashboard-advertising-upload-card,
html[data-theme="dark"] .dashboard-advertising-link-field,
html[data-theme="dark"] .dashboard-advertising-link-field input,
html[data-theme="dark"] .dashboard-advertising-file-row,
html[data-theme="dark"] .dashboard-advertising-table,
html[data-theme="dark"] .dashboard-advertising-table-head,
html[data-theme="dark"] .dashboard-advertising-table-row,
html[data-theme="dark"] .dashboard-news-admin-form input,
html[data-theme="dark"] .dashboard-news-admin-form select,
html[data-theme="dark"] .dashboard-news-admin-form textarea,
html[data-theme="dark"] .dashboard-news-media-dropzone,
html[data-theme="dark"] .dashboard-news-rich-editor,
html[data-theme="dark"] .dashboard-news-body-media-chip,
html[data-theme="dark"] .dashboard-news-body-media-empty,
html[data-theme="dark"] .dashboard-news-inline-image,
html[data-theme="dark"] .dashboard-news-popout-graph article div,
html[data-theme="dark"] .dashboard-news-graph-editor,
html[data-theme="dark"] .dashboard-news-graph-line span,
html[data-theme="dark"] .dashboard-news-graph-donut span,
html[data-theme="dark"] .dashboard-news-embedded-images figure,
html[data-theme="dark"] .dashboard-analytics-project-value-grid article,
html[data-theme="dark"] .dashboard-analytics-company-identity-card,
html[data-theme="dark"] .dashboard-analytics-user-identity-card,
html[data-theme="dark"] .dashboard-analytics-profile-card,
html[data-theme="dark"] .dashboard-analytics-project-action-form,
html[data-theme="dark"] .dashboard-analytics-project-action-form textarea,
html[data-theme="dark"] .dashboard-analytics-project-products,
html[data-theme="dark"] .dashboard-analytics-project-activity,
html[data-theme="dark"] .quick-tender-upload-zone,
html[data-theme="dark"] .quick-tender-file-chip,
html[data-theme="dark"] .quick-tender-table-wrap,
html[data-theme="dark"] .quick-tender-table th,
html[data-theme="dark"] .quick-tender-table input,
html[data-theme="dark"] .quick-tender-table select,
html[data-theme="dark"] .quick-tender-product-pill,
html[data-theme="dark"] .quick-tender-summary-head,
html[data-theme="dark"] .quick-tender-summary-grid article,
html[data-theme="dark"] .quick-tender-pricing-controls input,
html[data-theme="dark"] .quick-tender-pricing-controls select,
html[data-theme="dark"] .quick-tender-picker-toolbar input,
html[data-theme="dark"] .quick-tender-picker-toolbar select,
html[data-theme="dark"] .quick-tender-sponsored-editor input,
html[data-theme="dark"] .quick-tender-sponsored-editor select,
html[data-theme="dark"] .quick-tender-sponsored-list article,
html[data-theme="dark"] .quick-tender-picker-thumb,
html[data-theme="dark"] .quick-tender-no-match {
  background: rgba(15, 23, 42, 0.74);
  border-color: rgba(148, 163, 184, 0.24);
}

html[data-theme="dark"] .dashboard-news-media-dropzone {
  background:
    linear-gradient(135deg, rgba(59, 130, 246, 0.16), rgba(129, 140, 248, 0.12)),
    rgba(15, 23, 42, 0.74);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12);
}

html[data-theme="dark"] .dashboard-news-media-dropzone.has-file {
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.14), rgba(59, 130, 246, 0.1)),
    rgba(15, 23, 42, 0.78);
}

html[data-theme="dark"] .dashboard-news-editor-toolbar button {
  border-color: rgba(96, 165, 250, 0.24);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.9));
  color: #dbeafe;
}

html[data-theme="dark"] .dashboard-news-rich-editor textarea[data-dashboard-news-body] {
  background: rgba(15, 23, 42, 0.72);
}

html[data-theme="dark"] .dashboard-news-popout-card blockquote {
  background: rgba(59, 130, 246, 0.14);
}

html[data-theme="dark"] .dashboard-news-video-embed {
  border-color: rgba(96, 165, 250, 0.28);
}

html[data-theme="dark"] .dashboard-analytics-chart-bg {
  fill: rgba(15, 23, 42, 0.7);
}

html[data-theme="dark"] .dashboard-analytics-project-product-list article,
html[data-theme="dark"] .dashboard-analytics-project-accessory-list span {
  background: rgba(30, 41, 59, 0.62);
  border-color: rgba(148, 163, 184, 0.2);
}

html[data-theme="dark"] .dashboard-copyable-result[data-copy-feedback]::after {
  border-color: rgba(74, 222, 128, 0.32);
  background: rgba(20, 83, 45, 0.92);
  color: #bbf7d0;
}

html[data-theme="dark"] .dashboard-copyable-result.copy-failed[data-copy-feedback]::after {
  border-color: rgba(248, 113, 113, 0.34);
  background: rgba(127, 29, 29, 0.92);
  color: #fecaca;
}

html[data-theme="dark"] .dashboard-product-library-workspace.storefront-mode {
  background:
    radial-gradient(circle at 14% 0%, rgba(0, 113, 227, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(3, 7, 18, 0.96));
}

html[data-theme="dark"] .dashboard-product-library-workspace.storefront-mode .dashboard-product-library-header {
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.68));
}

html[data-theme="dark"] .dashboard-product-library-workspace.mail-mode {
  background:
    radial-gradient(circle at 14% 0%, rgba(0, 113, 227, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(3, 7, 18, 0.96));
}

html[data-theme="dark"] .dashboard-product-library-workspace.management-mode {
  background:
    radial-gradient(circle at 14% 0%, rgba(0, 113, 227, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(3, 7, 18, 0.96));
}

html[data-theme="dark"] .dashboard-hero,
html[data-theme="dark"] .dashboard-tile,
html[data-theme="dark"] .account-menu-popover,
html[data-theme="dark"] .dashboard-project-row,
html[data-theme="dark"] .dashboard-chip-row span,
html[data-theme="dark"] .dashboard-summary-list div,
html[data-theme="dark"] .dashboard-library-showcase,
html[data-theme="dark"] .dashboard-product-network,
html[data-theme="dark"] .dashboard-network-node,
html[data-theme="dark"] .dashboard-news-story,
html[data-theme="dark"] .dashboard-news-see-more,
html[data-theme="dark"] .dashboard-news-timeline-item,
html[data-theme="dark"] .dashboard-news-admin-row,
html[data-theme="dark"] .dashboard-news-popout,
html[data-theme="dark"] .dashboard-news-popout-card,
html[data-theme="dark"] .account-profile-card,
html[data-theme="dark"] .account-menu-section,
html[data-theme="dark"] .dashboard-product-library-rail,
html[data-theme="dark"] .dashboard-product-library-results,
html[data-theme="dark"] .dashboard-product-admin-panel,
html[data-theme="dark"] .dashboard-product-management-hero,
html[data-theme="dark"] .dashboard-product-bulk-upload,
html[data-theme="dark"] .dashboard-product-feature-card,
html[data-theme="dark"] .dashboard-product-store-results .product-result-card,
html[data-theme="dark"] .dashboard-product-range-popup,
html[data-theme="dark"] .dashboard-product-range-overview,
html[data-theme="dark"] .dashboard-product-range-hero-card,
html[data-theme="dark"] .dashboard-product-range-main,
html[data-theme="dark"] .dashboard-product-range-section,
html[data-theme="dark"] .dashboard-product-range-copy-grid article,
html[data-theme="dark"] .dashboard-product-model-notes article,
html[data-theme="dark"] .dashboard-product-model-selector,
html[data-theme="dark"] .dashboard-product-model-select-card,
html[data-theme="dark"] .dashboard-product-insight-card,
html[data-theme="dark"] .dashboard-product-editor-section,
html[data-theme="dark"] .dashboard-product-scope-editor,
html[data-theme="dark"] .dashboard-product-property-editor,
html[data-theme="dark"] .dashboard-product-accessory-editor,
html[data-theme="dark"] .dashboard-product-review-notes,
html[data-theme="dark"] .dashboard-product-upload-assignment,
html[data-theme="dark"] .dashboard-product-existing-media,
html[data-theme="dark"] .dashboard-product-tool-assets,
html[data-theme="dark"] .dashboard-product-mail,
html[data-theme="dark"] .dashboard-product-mail-toolbar,
html[data-theme="dark"] .dashboard-product-mail-sidebar,
html[data-theme="dark"] .dashboard-product-mail-list-pane,
html[data-theme="dark"] .dashboard-product-mail-reader,
html[data-theme="dark"] .dashboard-product-mail-section,
html[data-theme="dark"] .product-submission-panel,
html[data-theme="dark"] .product-submission-card {
  background: rgba(17, 24, 39, 0.72);
  border-color: rgba(148, 163, 184, 0.22);
}

html[data-theme="dark"] .dashboard-news-section .dashboard-news-story {
  border-color: transparent;
  background: transparent;
}

html[data-theme="dark"] .dashboard-analytics-project-activity article {
  background: rgba(15, 23, 42, 0.72);
}

html[data-theme="dark"] .dashboard-product-mail-search,
html[data-theme="dark"] .dashboard-product-mail-filter-strip select,
html[data-theme="dark"] .dashboard-product-mail-icon,
html[data-theme="dark"] .dashboard-product-mail-avatar,
html[data-theme="dark"] .dashboard-product-mail-reader-summary span,
html[data-theme="dark"] .dashboard-product-range-chip-row span,
html[data-theme="dark"] .dashboard-product-model-search,
html[data-theme="dark"] .dashboard-product-clearance-note,
html[data-theme="dark"] .dashboard-product-dimension-stage,
html[data-theme="dark"] .dashboard-product-dimension-axis,
html[data-theme="dark"] .dashboard-product-quick-stats span,
html[data-theme="dark"] .dashboard-product-management-stats span,
html[data-theme="dark"] .dashboard-product-management-actions button,
html[data-theme="dark"] .dashboard-product-bulk-upload-meta span,
html[data-theme="dark"] .dashboard-product-scope-toggle,
html[data-theme="dark"] .dashboard-product-review-stats span,
html[data-theme="dark"] .dashboard-product-submission-group-head,
html[data-theme="dark"] .dashboard-product-model-editor,
html[data-theme="dark"] .dashboard-product-accessory-row,
html[data-theme="dark"] .dashboard-product-accessory-file,
html[data-theme="dark"] .dashboard-product-accessory-current-files,
html[data-theme="dark"] .dashboard-product-accessory-compat label,
html[data-theme="dark"] .dashboard-product-accessory-cards article,
html[data-theme="dark"] .dashboard-product-existing-media-card,
html[data-theme="dark"] .dashboard-product-upload-zone,
html[data-theme="dark"] .dashboard-product-tool-asset-card,
html[data-theme="dark"] .dashboard-product-tool-asset-preview,
html[data-theme="dark"] .dashboard-product-tool-preview-empty,
html[data-theme="dark"] .dashboard-product-tool-drawing-preview,
html[data-theme="dark"] .dashboard-product-tool-default-preview,
html[data-theme="dark"] .dashboard-product-upload-icon,
html[data-theme="dark"] .dashboard-product-upload-status,
html[data-theme="dark"] .dashboard-product-tool-transform-controls,
html[data-theme="dark"] .product-submission-card em {
  background: rgba(15, 23, 42, 0.74);
  border-color: rgba(148, 163, 184, 0.24);
}

html[data-theme="dark"] .dashboard-product-tool-default-schematic-symbol,
html[data-theme="dark"] .dashboard-product-tool-default-floor-plan .default-plan-grid {
  background: rgba(15, 23, 42, 0.74);
  fill: rgba(15, 23, 42, 0.74);
  border-color: rgba(96, 165, 250, 0.34);
}

html[data-theme="dark"] .dashboard-product-scope-toggle em {
  background: rgba(30, 41, 59, 0.82);
  border-color: rgba(148, 163, 184, 0.28);
}

html[data-theme="dark"] .dashboard-product-review-filter {
  background: rgba(15, 23, 42, 0.54);
  border-color: rgba(148, 163, 184, 0.24);
}

html[data-theme="dark"] .dashboard-product-review-filter strong {
  background: rgba(30, 41, 59, 0.82);
  border-color: rgba(148, 163, 184, 0.28);
}

html[data-theme="dark"] .dashboard-product-review-queue-toggle-badge {
  color: #93c5fd;
  border-color: rgba(96, 165, 250, 0.34);
  background: rgba(15, 23, 42, 0.86);
}

html[data-theme="dark"] .dashboard-product-review-queue-toggle-badge strong {
  color: #bfdbfe;
}

html[data-theme="dark"] .dashboard-product-review-queue-toggle-badge.is-empty,
html[data-theme="dark"] .dashboard-product-review-queue-toggle-badge.is-empty strong {
  color: rgba(203, 213, 225, 0.78);
}

html[data-theme="dark"] .dashboard-product-tool-image-preview figcaption,
html[data-theme="dark"] .dashboard-product-tool-3d-viewer > span,
html[data-theme="dark"] .dashboard-product-tool-current-model-preview > span,
html[data-theme="dark"] .dashboard-product-tool-front-label,
html[data-theme="dark"] .dashboard-product-tool-asset-file-list label,
html[data-theme="dark"] .dashboard-product-tool-asset-file-list select,
html[data-theme="dark"] .dashboard-product-tool-connections,
html[data-theme="dark"] .dashboard-product-tool-connection-row {
  background: rgba(15, 23, 42, 0.82);
  border-color: rgba(148, 163, 184, 0.28);
}

html[data-theme="dark"] .dashboard-product-existing-media-card.is-model {
  border-color: rgba(96, 165, 250, 0.32);
  background:
    radial-gradient(circle at 10% 10%, rgba(59, 130, 246, 0.16), transparent 48%),
    rgba(15, 23, 42, 0.82);
}

html[data-theme="dark"] .dashboard-current-file-viewer-popup {
  border-color: rgba(148, 163, 184, 0.28);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(17, 24, 39, 0.88)),
    rgba(15, 23, 42, 0.88);
}

html[data-theme="dark"] .dashboard-current-file-viewer-body {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.74);
}

html[data-theme="dark"] .dashboard-product-mail-list-pane,
html[data-theme="dark"] .dashboard-product-mail-reader {
  background: rgba(15, 23, 42, 0.46);
}

html[data-theme="dark"] .dashboard-network-node-brand,
html[data-theme="dark"] .dashboard-network-node-category,
html[data-theme="dark"] .dashboard-library-categories span {
  background: rgba(0, 113, 227, 0.18);
  border-color: rgba(96, 165, 250, 0.22);
}

html[data-theme="dark"] .dashboard-network-lines line {
  stroke: rgba(96, 165, 250, 0.38);
}

html[data-theme="dark"] .dashboard-advert-image {
  background-color: rgba(17, 24, 39, 0.72);
}

html[data-theme="dark"] .dashboard-advert-manager {
  border-color: rgba(239, 246, 255, 0.2);
  background: rgba(17, 24, 39, 0.78);
}

html[data-theme="dark"] .dashboard-advert-manager-row {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(239, 246, 255, 0.16);
}

html[data-theme="dark"] .topbar-profile-avatar,
html[data-theme="dark"] .dashboard-profile-avatar,
html[data-theme="dark"] .account-profile-avatar {
  background: rgba(0, 113, 227, 0.16);
}

html[data-theme="dark"] .dashboard-product-range-backdrop {
  background: #080b12;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html[data-theme="dark"] .dashboard-product-range-popup {
  border-color: rgba(148, 163, 184, 0.24);
  background: #0f131b;
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.44);
}

html[data-theme="dark"] .dashboard-product-range-head {
  background: #151a23;
}

html[data-theme="dark"] .dashboard-product-range-overview,
html[data-theme="dark"] .dashboard-product-range-main {
  border-color: rgba(148, 163, 184, 0.24);
  background: #0f131b;
  box-shadow: none;
}

html[data-theme="dark"] .dashboard-product-range-popup .dashboard-product-range-section,
html[data-theme="dark"] .dashboard-product-range-popup .dashboard-product-range-copy-grid article,
html[data-theme="dark"] .dashboard-product-range-popup .dashboard-product-model-selector,
html[data-theme="dark"] .dashboard-product-range-popup .dashboard-product-model-select-card,
html[data-theme="dark"] .dashboard-product-range-popup .dashboard-product-model-notes article,
html[data-theme="dark"] .dashboard-product-range-popup .dashboard-product-insight-card,
html[data-theme="dark"] .dashboard-product-range-popup .dashboard-product-accessory-cards article,
html[data-theme="dark"] .dashboard-product-range-popup .product-detail-facts div,
html[data-theme="dark"] .dashboard-product-range-popup .dashboard-product-model-chip-row span,
html[data-theme="dark"] .dashboard-product-range-popup .dashboard-product-quick-stats span,
html[data-theme="dark"] .dashboard-product-range-popup .dashboard-product-clearance-note,
html[data-theme="dark"] .dashboard-product-range-popup .dashboard-product-dimension-stage,
html[data-theme="dark"] .dashboard-product-range-popup .dashboard-product-document-link,
html[data-theme="dark"] .dashboard-product-range-popup .dashboard-product-documents > span:not(.dashboard-product-document-link),
html[data-theme="dark"] .dashboard-product-range-popup .dashboard-product-range-summary div,
html[data-theme="dark"] .dashboard-product-range-popup .dashboard-product-range-chip-row span,
html[data-theme="dark"] .dashboard-product-range-popup .dashboard-product-model-search {
  border-color: rgba(148, 163, 184, 0.24);
  background: #171c25;
  box-shadow: none;
}

html[data-theme="dark"] .dashboard-product-range-popup .dashboard-product-model-select-card:hover,
html[data-theme="dark"] .dashboard-product-range-popup .dashboard-product-model-select-card.active,
html[data-theme="dark"] .dashboard-product-range-popup .dashboard-product-document-link:hover,
html[data-theme="dark"] .dashboard-product-range-popup .dashboard-product-highlight-strip em {
  border-color: rgba(96, 165, 250, 0.44);
  background: rgba(0, 113, 227, 0.18);
}

html[data-theme="dark"] .dashboard-product-range-popup .product-photo {
  border-color: rgba(148, 163, 184, 0.24);
  background: #171c25;
  color: var(--text);
  box-shadow: none;
}

html[data-theme="dark"] .dashboard-product-range-popup .product-photo-image {
  background: #111722;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html[data-theme="dark"] .dashboard-product-range-popup .product-photo-image > img:not(.product-brand-logo) {
  filter: saturate(1.04) contrast(1.04) drop-shadow(0 10px 18px rgba(0, 0, 0, 0.34));
}

html[data-theme="dark"] .dashboard-product-range-popup .dashboard-product-dimension-stage {
  background: #171c25;
}

html[data-theme="dark"] .dashboard-product-range-popup .dashboard-product-dimension-axis {
  background: #111722;
  box-shadow: none;
}

html[data-theme="dark"] .dashboard-product-range-popup .dashboard-product-dimension-face.front {
  background: linear-gradient(135deg, #252d3a, #141a24);
  box-shadow: 0 16px 26px rgba(0, 0, 0, 0.38);
}

html[data-theme="dark"] .dashboard-product-range-popup .dashboard-product-dimension-face.top {
  background: linear-gradient(135deg, #313b4a, #202938);
}

html[data-theme="dark"] .dashboard-product-range-popup .dashboard-product-dimension-face.side {
  background: linear-gradient(145deg, #1d2531, #0f141d);
}

.hydraulic-overlay {
  position: fixed;
  inset: 0;
  z-index: 4200;
  display: grid;
  place-items: center;
  padding: 14px;
  background:
    radial-gradient(circle at 18% 12%, rgba(0, 113, 227, 0.16), transparent 28%),
    rgba(236, 242, 250, 0.76);
  backdrop-filter: blur(18px);
}

.hydraulic-shell {
  width: min(1480px, 100%);
  height: min(920px, calc(100vh - 28px));
  max-height: calc(100vh - 28px);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(238, 245, 255, 0.78)),
    var(--panel, #ffffff);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
  font-size: 13px;
}

.hydraulic-shell.gas-source-manual.gas-schedule-collapsed {
  height: auto;
}

.hydraulic-header {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
}

.hydraulic-logo-wrap {
  display: grid;
  align-items: center;
  min-width: 0;
}

.hydraulic-logo-wrap img {
  width: 124px;
  max-height: 34px;
  object-fit: contain;
  object-position: left center;
}

.hydraulic-header small,
.hydraulic-section-head small,
.hydraulic-result-card span,
.hydraulic-field span,
.hydraulic-fitting-row small {
  color: var(--muted, #64748b);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.hydraulic-header h2 {
  margin: 0;
  color: var(--text, #172033);
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1;
  letter-spacing: 0;
}

.hydraulic-header p {
  margin: 5px 0 0;
  color: var(--muted, #64748b);
  font-size: 13px;
  font-weight: 800;
}

.hydraulic-header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.hydraulic-theme-toggle {
  height: 42px;
  border-radius: 13px;
}

.hydraulic-close {
  min-width: 96px;
  height: 42px;
  border: 1px solid rgba(0, 113, 227, 0.28);
  border-radius: 13px;
  color: var(--text, #172033);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  font-weight: 900;
  cursor: pointer;
}

.hydraulic-grid {
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 16px;
  padding: 18px;
}

.hydraulic-workspace-old {
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(280px, 0.96fr) minmax(320px, 1.04fr) minmax(360px, 1.08fr);
  grid-template-rows: minmax(352px, 0.86fr) minmax(250px, 1fr);
  gap: 12px;
  padding: 14px;
}

.hydraulic-workspace-old.gas-schedule-collapsed {
  grid-template-rows: minmax(0, 1fr) auto;
}

.hydraulic-workspace-old.gas-schedule-normal {
  grid-template-rows: minmax(430px, 0.95fr) minmax(200px, 1fr);
}

.hydraulic-workspace-old.gas-schedule-expanded {
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  grid-template-rows: minmax(214px, auto) minmax(0, 1fr);
}

.hydraulic-left-column,
.hydraulic-middle-column,
.hydraulic-right-column {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.hydraulic-left-column,
.hydraulic-middle-column {
  grid-template-rows: minmax(0, 1fr);
}

.gas-schedule-collapsed .hydraulic-left-column,
.gas-schedule-normal .hydraulic-left-column {
  grid-template-rows: auto minmax(0, 1fr);
}

.hydraulic-right-column {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
}

.gas-schedule-collapsed .hydraulic-right-column,
.gas-schedule-normal .hydraulic-right-column {
  grid-template-rows: auto auto;
}

.hydraulic-workspace-old.gas-source-manual.gas-schedule-collapsed {
  grid-template-rows: auto auto;
  align-content: start;
}

.hydraulic-workspace-old.gas-source-manual.gas-schedule-normal {
  grid-template-rows: auto minmax(220px, 1fr);
}

.gas-source-manual.gas-schedule-collapsed .hydraulic-left-column,
.gas-source-manual.gas-schedule-collapsed .hydraulic-middle-column,
.gas-source-manual.gas-schedule-collapsed .hydraulic-right-column,
.gas-source-manual.gas-schedule-normal .hydraulic-left-column,
.gas-source-manual.gas-schedule-normal .hydraulic-middle-column,
.gas-source-manual.gas-schedule-normal .hydraulic-right-column {
  height: auto;
}

.gas-source-manual.gas-schedule-collapsed .hydraulic-left-column,
.gas-source-manual.gas-schedule-collapsed .hydraulic-middle-column,
.gas-source-manual.gas-schedule-normal .hydraulic-left-column,
.gas-source-manual.gas-schedule-normal .hydraulic-middle-column {
  grid-template-rows: auto;
}

.gas-schedule-expanded .hydraulic-left-column {
  display: none;
}

.gas-schedule-expanded .hydraulic-middle-column,
.gas-schedule-expanded .hydraulic-right-column {
  display: contents;
}

.gas-schedule-expanded .hydraulic-middle-column > .hydraulic-panel {
  grid-column: 1;
  grid-row: 1;
}

.gas-schedule-expanded .hydraulic-results {
  grid-column: 2;
  grid-row: 1;
}

.gas-schedule-expanded .hydraulic-project-info {
  grid-column: 3;
  grid-row: 1;
  min-height: 0;
}

.hydraulic-left-column > .hydraulic-panel,
.hydraulic-middle-column > .hydraulic-panel,
.hydraulic-right-column > .hydraulic-panel {
  min-height: 0;
  overflow: hidden;
}

.hydraulic-panel {
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 18px;
  padding: 10px;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.7), transparent 42%),
    rgba(255, 255, 255, 0.68);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 14px 30px rgba(15, 23, 42, 0.08);
}

.hydraulic-panel-customer,
.hydraulic-schedule {
  grid-column: 1 / -1;
}

.hydraulic-workspace-old > .hydraulic-schedule {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.hydraulic-workspace-old.gas-schedule-collapsed > .hydraulic-schedule {
  min-height: 0;
}

.hydraulic-workspace-old.gas-schedule-expanded > .hydraulic-schedule {
  grid-column: 1 / -1;
  grid-row: 2;
}

.hydraulic-project-info {
  display: flex;
  flex-direction: column;
}

.hydraulic-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 6px;
}

.hydraulic-section-head > div {
  min-width: 0;
}

.hydraulic-section-head span {
  color: var(--text, #172033);
  font-size: 14px;
  line-height: 1.08;
  font-weight: 950;
}

.hydraulic-fields {
  display: grid;
  gap: 6px;
}

.hydraulic-fields.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hydraulic-fields.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hydraulic-fields.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hydraulic-field {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.hydraulic-input-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 6px;
}

.hydraulic-select-wrap {
  position: relative;
  display: grid;
  min-width: 0;
}

.hydraulic-select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 10px;
  width: 7px;
  height: 7px;
  border-right: 2px solid rgba(0, 113, 227, 0.76);
  border-bottom: 2px solid rgba(0, 113, 227, 0.76);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.7));
}

.hydraulic-field input,
.hydraulic-field select,
.hydraulic-length-input {
  width: 100%;
  min-width: 0;
  min-height: 29px;
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 10px;
  padding: 0 9px;
  color: var(--text, #172033);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
  font: inherit;
  font-size: 12px;
  font-weight: 850;
}

.hydraulic-field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 32px;
  border-color: rgba(0, 113, 227, 0.28);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(239, 246, 255, 0.76)),
    rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 6px 16px rgba(0, 113, 227, 0.08);
  cursor: pointer;
}

.hydraulic-field select:hover:not(:disabled) {
  border-color: rgba(0, 113, 227, 0.46);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(226, 241, 255, 0.86)),
    rgba(255, 255, 255, 0.8);
}

.hydraulic-field select:focus-visible {
  outline: 3px solid rgba(0, 113, 227, 0.18);
  border-color: rgba(0, 113, 227, 0.64);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 0 0 1px rgba(0, 113, 227, 0.14),
    0 10px 24px rgba(0, 113, 227, 0.16);
}

.hydraulic-field select option {
  background: #f8fbff;
  color: var(--text, #172033);
  font-weight: 800;
}

.hydraulic-field input:disabled,
.hydraulic-field select:disabled {
  opacity: 0.68;
  cursor: not-allowed;
}

.hydraulic-input-wrap em {
  color: var(--muted, #64748b);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.hydraulic-toggle-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 6px;
  padding: 3px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  background: rgba(226, 232, 240, 0.42);
}

.hydraulic-toggle-row button {
  height: 27px;
  border: 0;
  border-radius: 10px;
  color: var(--muted, #64748b);
  background: transparent;
  font-weight: 950;
  cursor: pointer;
}

.hydraulic-toggle-row button.active {
  color: #ffffff;
  background: linear-gradient(145deg, #0f7cff, #0067d9);
  box-shadow: 0 10px 22px rgba(0, 113, 227, 0.22);
}

.hydraulic-toggle-row-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hydraulic-check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}

.hydraulic-check {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  color: var(--text, #172033);
  background: rgba(255, 255, 255, 0.48);
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

.hydraulic-check input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #0f7cff;
}

.hydraulic-fitting-add {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(86px, 0.5fr) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 12px;
}

.hydraulic-fitting-list {
  display: grid;
  gap: 8px;
}

.hydraulic-fitting-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px 34px;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.5);
}

.hydraulic-fitting-row span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.hydraulic-fitting-row strong {
  overflow: hidden;
  color: var(--text, #172033);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hydraulic-fitting-row input {
  min-height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 10px;
  padding: 0 8px;
  font-weight: 900;
}

.hydraulic-icon-btn {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(239, 68, 68, 0.26);
  border-radius: 10px;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
  font-weight: 950;
  cursor: pointer;
}

.hydraulic-empty {
  padding: 12px;
  border: 1px dashed rgba(148, 163, 184, 0.34);
  border-radius: 13px;
  color: var(--muted, #64748b);
  font-weight: 850;
}

.gas-product-pick-fields {
  align-items: end;
  grid-template-columns: minmax(0, 1.38fr) minmax(92px, 0.62fr);
}

.hydraulic-workspace-old.gas-source-products.gas-schedule-normal {
  grid-template-rows: minmax(500px, 0.95fr) minmax(170px, 1fr);
}

.hydraulic-workspace-old.gas-source-products.gas-schedule-collapsed {
  grid-template-rows: minmax(500px, 1fr) auto;
}

.gas-source-products.gas-schedule-normal .hydraulic-left-column,
.gas-source-products.gas-schedule-collapsed .hydraulic-left-column {
  grid-template-rows: auto auto;
  height: auto;
}

.gas-product-selection-panel {
  display: flex;
  flex-direction: column;
}

.gas-product-select-card {
  min-width: 0;
}

.gas-product-select-card button {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  align-items: center;
  width: 100%;
  min-height: 64px;
  min-width: 0;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid rgba(245, 158, 11, 0.34);
  border-radius: 12px;
  color: var(--text, #172033);
  text-align: left;
  background:
    radial-gradient(circle at 0% 0%, rgba(250, 204, 21, 0.22), transparent 42%),
    rgba(255, 255, 255, 0.64);
  cursor: pointer;
}

.gas-product-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.gas-product-copy > span,
.gas-product-copy > strong,
.gas-product-copy > small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gas-product-copy > span {
  color: var(--muted, #64748b);
  font-size: 10px;
  font-weight: 950;
}

.gas-product-copy > strong {
  color: var(--text, #172033);
  font-size: 12px;
  line-height: 1.08;
}

.gas-product-copy > small {
  color: var(--muted, #64748b);
  font-size: 10px;
  font-weight: 850;
}

.gas-product-thumb {
  width: 50px;
  min-width: 50px;
  height: 48px;
  display: block;
}

.gas-product-thumb-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.26);
  border-radius: 10px;
  background:
    radial-gradient(circle at 20% 12%, rgba(255, 255, 255, 0.86), transparent 38%),
    linear-gradient(145deg, rgba(255, 251, 235, 0.92), rgba(255, 255, 255, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 8px 16px rgba(15, 23, 42, 0.08);
}

.gas-product-thumb-image {
  width: 92%;
  height: 32px;
  object-fit: contain;
  filter: saturate(1.04) contrast(1.03) drop-shadow(0 5px 7px rgba(15, 23, 42, 0.16));
}

.gas-product-thumb-logo,
.gas-product-thumb-logo-text {
  position: absolute;
  right: 4px;
  bottom: 4px;
  max-width: 38px;
  height: 13px;
  object-fit: contain;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.12);
}

.gas-product-thumb-logo-text {
  max-width: 42px;
  padding: 2px 4px;
  color: #92400e;
  font-size: 7px;
  font-weight: 950;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.gas-product-thumb-fallback {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(145deg, #facc15, #f59e0b);
  color: white;
  font-size: 12px;
  font-weight: 950;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36), 0 6px 12px rgba(146, 64, 14, 0.16);
}

.gas-product-picker-backdrop {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(8px);
}

.gas-product-picker {
  width: min(760px, 100%);
  max-height: min(720px, calc(100vh - 96px));
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 255, 0.92)),
    var(--panel, #ffffff);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.gas-product-picker header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.gas-product-picker header div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.gas-product-picker header span {
  color: var(--muted, #64748b);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.02em;
}

.gas-product-picker header strong {
  color: var(--text, #172033);
  font-size: 18px;
  line-height: 1;
}

.gas-product-picker header button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 10px;
  color: var(--text, #172033);
  background: rgba(255, 255, 255, 0.72);
  font-weight: 950;
  cursor: pointer;
}

.gas-product-picker-controls {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.gas-product-picker-list {
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px 14px 14px;
}

.gas-product-picker-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) minmax(96px, auto);
  align-items: center;
  min-width: 0;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 13px;
  text-align: left;
  background: rgba(255, 255, 255, 0.64);
  cursor: pointer;
}

.gas-product-load-badge {
  justify-self: end;
  min-width: 96px;
  display: grid;
  gap: 3px;
  padding: 8px 9px;
  border: 1px solid rgba(245, 158, 11, 0.42);
  border-radius: 11px;
  text-align: right;
  background:
    radial-gradient(circle at 0% 0%, rgba(250, 204, 21, 0.22), transparent 44%),
    rgba(255, 251, 235, 0.84);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.66), 0 8px 16px rgba(146, 64, 14, 0.10);
}

.gas-product-load-badge strong,
.gas-product-load-badge small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gas-product-load-badge strong {
  color: #92400e;
  font-size: 15px;
  font-weight: 950;
  line-height: 1;
}

.gas-product-load-badge small {
  color: #a16207;
  font-size: 10px;
  font-weight: 900;
}

@media (max-width: 720px) {
  .gas-product-picker-card {
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: start;
  }

  .gas-product-load-badge {
    grid-column: 2;
    justify-self: start;
    min-width: 0;
    text-align: left;
  }
}

.gas-product-picker-card .gas-product-thumb {
  width: 64px;
  min-width: 64px;
  height: 60px;
}

.gas-product-picker-card .gas-product-thumb-image {
  height: 42px;
}

.gas-product-picker-card .gas-product-thumb-logo {
  max-width: 44px;
  height: 15px;
}

.gas-product-picker-card .gas-product-thumb-logo-text {
  max-width: 48px;
  height: 15px;
}

.gas-product-picker-card:hover,
.gas-product-picker-card.selected {
  border-color: rgba(245, 158, 11, 0.72);
  background:
    radial-gradient(circle at 0% 0%, rgba(250, 204, 21, 0.2), transparent 40%),
    rgba(255, 255, 255, 0.82);
}

.gas-product-load-table-wrap table {
  min-width: 0;
}

.gas-product-load-table {
  table-layout: fixed;
  font-size: 10px;
}

.gas-product-load-table .gas-product-col-mfr {
  width: 14%;
}

.gas-product-load-table .gas-product-col-product {
  width: 25%;
}

.gas-product-load-table .gas-product-col-qty {
  width: 10%;
}

.gas-product-load-table .gas-product-col-fuel {
  width: 11%;
}

.gas-product-load-table .gas-product-col-kw {
  width: 13%;
}

.gas-product-load-table .gas-product-col-flow {
  width: 15%;
}

.gas-product-load-table .gas-product-col-action {
  width: 62px;
}

.gas-product-load-table th,
.gas-product-load-table td {
  padding: 4px 5px;
  font-size: 9.5px;
  line-height: 1.15;
}

.gas-product-load-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gas-product-load-table .hydraulic-length-input {
  min-height: 26px;
  padding: 0 2px;
  border-radius: 8px;
  font-size: 10px;
  text-align: center;
}

.gas-product-row-delete {
  min-height: 26px;
  width: 100%;
  border: 1px solid rgba(220, 38, 38, 0.38);
  border-radius: 8px;
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.10);
  font-size: 10px;
  font-weight: 950;
  cursor: pointer;
}

.gas-product-row-delete:hover,
.gas-product-row-delete:focus-visible {
  border-color: rgba(220, 38, 38, 0.72);
  color: #ffffff;
  background: linear-gradient(145deg, #ef4444, #dc2626);
}

.hydraulic-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.hydraulic-right-column .hydraulic-result-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hydraulic-result-card {
  min-width: 0;
  padding: 6px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.54);
}

.hydraulic-result-card span,
.hydraulic-result-card strong,
.hydraulic-result-card small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hydraulic-result-card strong {
  margin: 2px 0;
  color: var(--text, #172033);
  font-size: 14px;
  line-height: 1;
}

.hydraulic-result-card small {
  color: var(--muted, #64748b);
  font-size: 10px;
  font-weight: 850;
}

.hydraulic-result-card.gas-result-status-pass {
  border-color: rgba(5, 150, 105, 0.44);
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.18), transparent 44%),
    rgba(236, 253, 245, 0.82);
}

.hydraulic-result-card.gas-result-status-pass strong,
.hydraulic-result-card.gas-result-status-pass small {
  color: #047857;
}

.hydraulic-result-card.gas-result-status-fail {
  border-color: rgba(220, 38, 38, 0.44);
  background:
    radial-gradient(circle at 0% 0%, rgba(239, 68, 68, 0.18), transparent 44%),
    rgba(254, 242, 242, 0.86);
}

.hydraulic-result-card.gas-result-status-fail strong,
.hydraulic-result-card.gas-result-status-fail small {
  color: #b91c1c;
}

.hydraulic-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(3, auto);
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.hydraulic-actions-old {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.hydraulic-export-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: auto;
  padding-top: 7px;
}

.hydraulic-export-actions .secondary-mini,
.hydraulic-schedule .primary-mini {
  height: 26px;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 900;
}

.gas-schedule-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.hydraulic-schedule .gas-schedule-mode-btn {
  height: 26px;
  border-radius: 9px;
  border-color: rgba(148, 163, 184, 0.34);
  font-size: 10px;
  font-weight: 900;
}

.hydraulic-export-actions .secondary-mini {
  border-color: rgba(0, 98, 204, 0.68);
  background: linear-gradient(145deg, rgba(40, 160, 255, 0.94), rgba(0, 122, 255, 0.86));
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), 0 8px 18px rgba(0, 122, 255, 0.20);
}

.hydraulic-export-actions .secondary-mini:not(:disabled):hover {
  border-color: rgba(0, 86, 179, 0.78);
  background: linear-gradient(145deg, rgba(65, 174, 255, 0.98), rgba(0, 110, 219, 0.9));
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(0, 122, 255, 0.30);
  transform: translateY(-1px);
}

.hydraulic-schedule .hydraulic-section-head {
  align-items: center;
}

.hydraulic-schedule .hydraulic-section-head small {
  display: block;
  margin-top: 2px;
}

.gas-schedule-collapsed-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.gas-schedule-collapsed-summary span {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 3px;
  min-height: 42px;
  padding: 7px 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
}

.gas-schedule-collapsed-summary small {
  color: var(--muted, #64748b);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.gas-schedule-collapsed-summary strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text, #172033);
  font-size: 13px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gas-schedule-collapsed-summary .pass strong {
  color: #047857;
}

.gas-schedule-collapsed-summary .pass {
  border-color: rgba(5, 150, 105, 0.36);
  background: rgba(236, 253, 245, 0.74);
}

.gas-schedule-collapsed-summary .review strong {
  color: #b91c1c;
}

.gas-schedule-collapsed-summary .review,
.gas-schedule-collapsed-summary .fail {
  border-color: rgba(220, 38, 38, 0.36);
  background: rgba(254, 242, 242, 0.78);
}

.gas-schedule-collapsed-summary .fail strong {
  color: #b91c1c;
}

.hydraulic-index-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 8px;
}

.hydraulic-index-summary div {
  min-height: 48px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
}

.hydraulic-index-summary span {
  color: var(--muted, #64748b);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hydraulic-index-summary strong {
  color: var(--text, #172033);
  font-size: 16px;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.hydraulic-index-summary .gas-index-summary-pass strong {
  color: #047857;
}

.hydraulic-index-summary .gas-index-summary-pass {
  border-color: rgba(5, 150, 105, 0.36);
  background: rgba(236, 253, 245, 0.72);
}

.hydraulic-index-summary .gas-index-summary-review strong,
.hydraulic-index-summary .gas-index-summary-fail strong {
  color: #b91c1c;
}

.hydraulic-index-summary .gas-index-summary-review,
.hydraulic-index-summary .gas-index-summary-fail {
  border-color: rgba(220, 38, 38, 0.36);
  background: rgba(254, 242, 242, 0.78);
}

.hydraulic-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 15px;
}

.hydraulic-table-wrap table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  font-size: 12px;
}

.hydraulic-table-wrap.gas-product-load-table-wrap .gas-product-load-table {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  table-layout: fixed;
  font-size: 10px;
}

.hydraulic-table-wrap th,
.hydraulic-table-wrap td {
  padding: 7px 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  text-align: left;
  vertical-align: top;
}

.hydraulic-table-wrap.gas-product-load-table-wrap .gas-product-load-table th,
.hydraulic-table-wrap.gas-product-load-table-wrap .gas-product-load-table td {
  padding: 4px 5px;
  font-size: 9.5px;
  line-height: 1.15;
}

.hydraulic-table-wrap th {
  color: var(--muted, #64748b);
  background: rgba(226, 232, 240, 0.42);
  font-weight: 950;
  text-transform: uppercase;
}

.hydraulic-table-wrap td {
  color: var(--text, #172033);
  font-weight: 800;
}

.hydraulic-table-wrap tfoot td {
  border-top: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(0, 113, 227, 0.06);
  font-weight: 950;
}

.hydraulic-selected-row td {
  background: rgba(0, 113, 227, 0.05);
}

.gas-schedule-status {
  display: grid;
  min-width: 118px;
  gap: 2px;
  padding: 5px 7px;
  border: 1px solid transparent;
  border-radius: 10px;
}

.gas-schedule-status strong {
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
}

.gas-schedule-status small {
  color: var(--muted, #64748b);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.15;
  white-space: nowrap;
}

.gas-schedule-status.pass strong {
  color: #047857;
}

.gas-schedule-status.pass {
  border-color: rgba(5, 150, 105, 0.34);
  background: rgba(236, 253, 245, 0.74);
}

.gas-schedule-status.review strong,
.gas-schedule-status.fail strong {
  color: #b91c1c;
}

.gas-schedule-status.review,
.gas-schedule-status.fail {
  border-color: rgba(220, 38, 38, 0.34);
  background: rgba(254, 242, 242, 0.78);
}

.hydraulic-schedule-reference,
.hydraulic-row-select,
.hydraulic-length-control input,
.hydraulic-fitting-editor select,
.hydraulic-fitting-editor input {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 10px;
  padding: 0 9px;
  color: var(--text, #172033);
  background: rgba(255, 255, 255, 0.7);
  font: inherit;
  font-size: 12px;
  font-weight: 850;
}

.hydraulic-length-control {
  display: grid;
  grid-template-columns: minmax(72px, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.hydraulic-length-control b {
  color: var(--muted, #64748b);
  font-size: 12px;
  font-weight: 950;
}

.hydraulic-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.hydraulic-row-actions button,
.hydraulic-fitting-collapsed {
  min-height: 30px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 9px;
  color: var(--text, #172033);
  background: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  font-weight: 950;
  cursor: pointer;
}

.hydraulic-row-actions button[data-hydraulic-remove-row],
.hydraulic-row-actions button[data-gas-remove-row] {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.22);
  background: rgba(239, 68, 68, 0.08);
}

.hydraulic-fitting-detail-row td {
  padding-top: 5px;
  padding-bottom: 8px;
  background: rgba(248, 250, 252, 0.58);
}

.hydraulic-fitting-detail-row.is-collapsed .hydraulic-fitting-editor {
  display: none;
}

.hydraulic-fitting-detail-row:not(.is-collapsed) .hydraulic-fitting-collapsed {
  display: none;
}

.hydraulic-fitting-collapsed {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  color: var(--muted, #64748b);
}

.hydraulic-fitting-editor {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 72px auto minmax(150px, 0.4fr);
  align-items: center;
  gap: 8px;
}

.hydraulic-fitting-editor.gas-fitting-editor {
  grid-template-columns: minmax(220px, 1fr) 64px auto minmax(134px, 0.34fr) minmax(180px, 0.56fr);
}

.hydraulic-fitting-chip-list {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.gas-fitting-chip-list {
  grid-column: auto;
  flex-wrap: nowrap;
  overflow: auto;
}

.gas-fitting-chip-list .hydraulic-fitting-chip {
  white-space: nowrap;
}

.hydraulic-fitting-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  min-height: 30px;
  padding: 0 8px 0 10px;
  border: 1px solid rgba(0, 113, 227, 0.18);
  border-radius: 999px;
  color: var(--text, #172033);
  background: rgba(0, 113, 227, 0.08);
  font-size: 11px;
  font-weight: 850;
}

.hydraulic-fitting-chip b {
  color: #0f7cff;
  font-weight: 950;
}

.hydraulic-fitting-chip button {
  width: 21px;
  height: 21px;
  border: 0;
  border-radius: 999px;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
  font-weight: 950;
  cursor: pointer;
}

.hydraulic-fitting-empty {
  color: var(--muted, #64748b);
  font-size: 12px;
  font-weight: 850;
}

.hydraulic-schedule .danger-mini {
  margin-top: 8px;
}

html[data-theme="dark"] .hydraulic-overlay {
  background:
    radial-gradient(circle at 18% 12%, rgba(0, 113, 227, 0.18), transparent 28%),
    rgba(3, 7, 18, 0.72);
}

html[data-theme="dark"] .hydraulic-shell {
  border-color: rgba(148, 163, 184, 0.25);
  background:
    linear-gradient(145deg, rgba(17, 24, 39, 0.94), rgba(8, 13, 24, 0.9)),
    #0b0f18;
}

html[data-theme="dark"] .hydraulic-panel,
html[data-theme="dark"] .hydraulic-result-card,
html[data-theme="dark"] .hydraulic-fitting-row,
html[data-theme="dark"] .hydraulic-index-summary div,
html[data-theme="dark"] .hydraulic-check,
html[data-theme="dark"] .gas-product-picker,
html[data-theme="dark"] .gas-product-picker-card,
html[data-theme="dark"] .gas-product-select-card button,
html[data-theme="dark"] .hydraulic-close,
html[data-theme="dark"] .hydraulic-field input,
html[data-theme="dark"] .hydraulic-field select,
html[data-theme="dark"] .hydraulic-length-input,
html[data-theme="dark"] .hydraulic-schedule-reference,
html[data-theme="dark"] .hydraulic-row-select,
html[data-theme="dark"] .hydraulic-length-control input,
html[data-theme="dark"] .hydraulic-fitting-editor select,
html[data-theme="dark"] .hydraulic-fitting-editor input,
html[data-theme="dark"] .hydraulic-row-actions button,
html[data-theme="dark"] .hydraulic-fitting-collapsed {
  border-color: rgba(148, 163, 184, 0.26);
  background: rgba(15, 23, 42, 0.72);
}

html[data-theme="dark"] .hydraulic-select-wrap::after {
  border-color: rgba(96, 165, 250, 0.92);
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.34));
}

html[data-theme="dark"] .hydraulic-field select {
  border-color: rgba(96, 165, 250, 0.32);
  background:
    linear-gradient(145deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.82)),
    rgba(15, 23, 42, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 20px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .hydraulic-field select:hover:not(:disabled),
html[data-theme="dark"] .hydraulic-field select:focus-visible {
  border-color: rgba(96, 165, 250, 0.58);
  background:
    linear-gradient(145deg, rgba(37, 99, 235, 0.28), rgba(15, 23, 42, 0.9)),
    rgba(15, 23, 42, 0.82);
}

html[data-theme="dark"] .hydraulic-fitting-detail-row td {
  background: rgba(15, 23, 42, 0.42);
}

html[data-theme="dark"] .gas-schedule-collapsed-summary span {
  border-color: rgba(148, 163, 184, 0.26);
  background: rgba(15, 23, 42, 0.72);
}

html[data-theme="dark"] .gas-schedule-collapsed-summary strong {
  color: var(--text);
}

html[data-theme="dark"] .hydraulic-result-card.gas-result-status-pass,
html[data-theme="dark"] .hydraulic-index-summary .gas-index-summary-pass,
html[data-theme="dark"] .gas-schedule-status.pass,
html[data-theme="dark"] .gas-schedule-collapsed-summary .pass {
  border-color: rgba(74, 222, 128, 0.34);
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.16), transparent 44%),
    rgba(6, 78, 59, 0.24);
}

html[data-theme="dark"] .hydraulic-result-card.gas-result-status-fail,
html[data-theme="dark"] .hydraulic-index-summary .gas-index-summary-review,
html[data-theme="dark"] .hydraulic-index-summary .gas-index-summary-fail,
html[data-theme="dark"] .gas-schedule-status.review,
html[data-theme="dark"] .gas-schedule-status.fail,
html[data-theme="dark"] .gas-schedule-collapsed-summary .review,
html[data-theme="dark"] .gas-schedule-collapsed-summary .fail {
  border-color: rgba(248, 113, 113, 0.34);
  background:
    radial-gradient(circle at 0% 0%, rgba(239, 68, 68, 0.15), transparent 44%),
    rgba(127, 29, 29, 0.24);
}

html[data-theme="dark"] .hydraulic-result-card.gas-result-status-pass strong,
html[data-theme="dark"] .hydraulic-result-card.gas-result-status-pass small,
html[data-theme="dark"] .hydraulic-index-summary .gas-index-summary-pass strong,
html[data-theme="dark"] .gas-schedule-status.pass strong,
html[data-theme="dark"] .gas-schedule-collapsed-summary .pass strong {
  color: #86efac;
}

html[data-theme="dark"] .hydraulic-result-card.gas-result-status-fail strong,
html[data-theme="dark"] .hydraulic-result-card.gas-result-status-fail small,
html[data-theme="dark"] .hydraulic-index-summary .gas-index-summary-review strong,
html[data-theme="dark"] .hydraulic-index-summary .gas-index-summary-fail strong,
html[data-theme="dark"] .gas-schedule-status.review strong,
html[data-theme="dark"] .gas-schedule-status.fail strong,
html[data-theme="dark"] .gas-schedule-collapsed-summary .review strong {
  color: #fca5a5;
}

html[data-theme="dark"] .gas-schedule-collapsed-summary .fail strong {
  color: #fca5a5;
}

html[data-theme="dark"] .hydraulic-fitting-chip {
  border-color: rgba(96, 165, 250, 0.25);
  background: rgba(0, 113, 227, 0.14);
}

html[data-theme="dark"] .hydraulic-toggle-row,
html[data-theme="dark"] .hydraulic-table-wrap th {
  background: rgba(15, 23, 42, 0.78);
}

html[data-theme="dark"] .gas-product-picker header,
html[data-theme="dark"] .gas-product-picker-controls {
  border-color: rgba(148, 163, 184, 0.22);
}

html[data-theme="dark"] .gas-product-picker-card:hover,
html[data-theme="dark"] .gas-product-picker-card.selected {
  background:
    radial-gradient(circle at 0% 0%, rgba(250, 204, 21, 0.16), transparent 40%),
    rgba(30, 41, 59, 0.88);
}

html[data-theme="dark"] .gas-product-load-badge {
  border-color: rgba(250, 204, 21, 0.34);
  background:
    radial-gradient(circle at 0% 0%, rgba(250, 204, 21, 0.14), transparent 44%),
    rgba(30, 41, 59, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 8px 16px rgba(0, 0, 0, 0.16);
}

html[data-theme="dark"] .gas-product-load-badge strong {
  color: #fde68a;
}

html[data-theme="dark"] .gas-product-load-badge small {
  color: #fbbf24;
}

html[data-theme="dark"] .gas-product-row-delete {
  border-color: rgba(248, 113, 113, 0.34);
  color: #fca5a5;
  background: rgba(127, 29, 29, 0.22);
}

html[data-theme="dark"] .gas-product-row-delete:hover,
html[data-theme="dark"] .gas-product-row-delete:focus-visible {
  border-color: rgba(248, 113, 113, 0.74);
  color: #ffffff;
  background: linear-gradient(145deg, #ef4444, #991b1b);
}

html[data-theme="dark"] .gas-product-thumb-stage {
  border-color: rgba(250, 204, 21, 0.28);
  background:
    radial-gradient(circle at 20% 12%, rgba(255, 255, 255, 0.16), transparent 38%),
    linear-gradient(145deg, rgba(51, 65, 85, 0.86), rgba(15, 23, 42, 0.78));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 16px rgba(0, 0, 0, 0.18);
}

html[data-theme="dark"] .gas-product-thumb-logo,
html[data-theme="dark"] .gas-product-thumb-logo-text {
  background: rgba(15, 23, 42, 0.82);
}

html[data-theme="dark"] .gas-product-thumb-logo-text {
  color: #fde68a;
}

html[data-theme="dark"] .hydraulic-table-wrap {
  border-color: rgba(148, 163, 184, 0.22);
}

@media (max-width: 1180px) {
  .hydraulic-header {
    grid-template-columns: 136px 1fr auto;
  }

  .hydraulic-grid,
  .hydraulic-workspace-old {
    grid-template-columns: 1fr;
  }

  .hydraulic-workspace-old.gas-schedule-expanded {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto minmax(260px, 1fr);
  }

  .gas-schedule-expanded .hydraulic-middle-column > .hydraulic-panel,
  .gas-schedule-expanded .hydraulic-results,
  .gas-schedule-expanded .hydraulic-project-info,
  .hydraulic-workspace-old.gas-schedule-expanded > .hydraulic-schedule {
    grid-column: 1;
    grid-row: auto;
  }

  .gas-schedule-collapsed-summary,
  .hydraulic-index-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hydraulic-fields.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .hydraulic-overlay {
    padding: 10px;
  }

  .hydraulic-shell {
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - max(20px, env(safe-area-inset-top)) - env(safe-area-inset-bottom));
    border-radius: 18px;
  }

  .hydraulic-header {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 18px;
  }

  .hydraulic-close {
    width: 100%;
  }

  .hydraulic-fields.two,
  .hydraulic-fields.three,
  .hydraulic-fields.four,
  .gas-product-picker-controls,
  .gas-schedule-collapsed-summary,
  .hydraulic-fitting-add,
  .hydraulic-fitting-editor,
  .hydraulic-actions {
    grid-template-columns: 1fr;
  }

  .hydraulic-index-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  body {
    overflow: auto;
  }

  html[data-workspace="schematic"],
  html[data-workspace="schematic"] body {
    overflow: hidden;
  }

  .studio-shell {
    min-width: 0;
    height: auto;
    min-height: 100%;
    grid-template-rows: auto auto auto auto;
  }

  .studio-shell.pricing-portal-shell {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    grid-template-rows: auto auto minmax(0, 1fr);
  }

  .studio-shell.dashboard-shell {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .studio-shell.dashboard-shell.dashboard-quick-tool-shell {
    grid-template-rows: minmax(0, 1fr);
  }

  .topbar,
  .modebar,
  .bottombar {
    flex-wrap: wrap;
    height: auto;
    min-height: 58px;
    gap: 10px;
    padding: 10px;
  }

  .workspace {
    grid-template-columns: 190px minmax(0, 1fr);
    grid-template-areas:
      "left canvas"
      "tools canvas"
      "inspector product"
      "pipe pipe"
      "results results";
  }

  .studio-shell.pricing-portal-shell .workspace.pricing-portal-workspace-shell {
    grid-template-areas: none;
    grid-template-columns: minmax(0, 1fr);
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .studio-shell.schematic-shell {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
  }

  .studio-shell.schematic-shell .workspace.schematic-workspace-shell {
    grid-template-areas: none;
    grid-template-columns: minmax(240px, 292px) 92px minmax(360px, 1fr);
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .studio-shell.schematic-shell .workspace.schematic-workspace-shell.schematic-selection-open {
    grid-template-columns: minmax(240px, 292px) 92px minmax(320px, 1fr) minmax(300px, 328px);
  }

  .studio-shell.schematic-shell .workspace.schematic-workspace-shell.schematic-zone-drawing {
    grid-template-columns: 92px minmax(420px, 1fr);
  }

  .studio-shell.schematic-shell .workspace.schematic-workspace-shell.schematic-zone-drawing.schematic-selection-open {
    grid-template-columns: 92px minmax(320px, 1fr) minmax(300px, 328px);
  }

  .studio-shell.schematic-shell .schematic-library-panel,
  .studio-shell.schematic-shell .schematic-toolbox,
  .studio-shell.schematic-shell .schematic-stage,
  .studio-shell.schematic-shell .schematic-selection-panel {
    grid-area: auto;
  }

  .workspace.schematic-workspace-shell,
  .workspace.schematic-workspace-shell.schematic-selection-open {
    grid-template-areas: none;
    grid-template-columns: minmax(240px, 292px) 92px minmax(360px, 1fr);
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .workspace.schematic-workspace-shell.schematic-selection-open {
    grid-template-columns: minmax(240px, 292px) 92px minmax(320px, 1fr) minmax(300px, 328px);
  }

  .workspace.schematic-workspace-shell.schematic-zone-drawing {
    grid-template-columns: 92px minmax(420px, 1fr);
  }

  .workspace.schematic-workspace-shell.schematic-zone-drawing.schematic-selection-open {
    grid-template-columns: 92px minmax(320px, 1fr) minmax(300px, 328px);
  }

  .workspace.schematic-workspace-shell > * {
    grid-area: auto;
  }

  .left-rail {
    grid-area: left;
  }

  .tool-palette {
    grid-area: tools;
  }

  .canvas-stage {
    grid-area: canvas;
    min-height: 650px;
  }

  .inspector {
    grid-area: inspector;
  }

	  .product-panel {
	    grid-area: product;
	  }

	  .pipe-panel {
	    grid-area: pipe;
	  }

	  .results-panel {
    grid-area: results;
  }

  .history-popover {
    top: auto;
    bottom: 66px;
    left: 18px;
    right: 18px;
    width: auto;
  }

  .brand-menu-popover,
  .export-popover,
  .product-library-popover,
  .account-menu-popover {
    inset: 64px 10px 10px;
    width: auto;
    max-height: none;
  }

  .brand-menu-body,
  .export-popover-body,
  .product-library-body,
  .product-library-body.sidebar-collapsed,
  .account-menu-body {
    grid-template-columns: 1fr;
  }

  .brand-action-grid,
  .export-report-grid,
  .product-filter-grid,
  .product-result-list,
  .dashboard-grid,
  .dashboard-project-adjacent-tiles,
  .account-menu-grid,
  .product-submission-form {
    grid-template-columns: 1fr;
  }

  .dashboard-project-controls,
  .dashboard-project-stage-track,
  .dashboard-project-row,
  .dashboard-project-inline-form,
  .dashboard-company-identity,
  .dashboard-company-fields,
  .dashboard-team-add-form,
  .dashboard-team-row,
  .company-inline-fields,
  .company-member-invite {
    grid-template-columns: 1fr;
  }

  .dashboard-company-bio {
    grid-column: auto;
  }

  .export-application-video {
    grid-template-columns: 1fr;
  }

  .export-application-data-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
  }

  .export-application-data-row strong {
    text-align: left;
  }

  .dashboard-project-actions {
    justify-content: stretch;
  }

  .dashboard-project-actions button {
    flex: 1 1 auto;
  }

  .dashboard-project-stage-track button {
    justify-content: flex-start;
  }

  .dashboard-library-tile,
  .dashboard-projects-tile {
    grid-column: auto;
    grid-row: auto;
  }

  .dashboard-library-showcase {
    grid-template-columns: 1fr;
  }

  .product-detail-panel {
    order: 3;
  }
}

@media (max-width: 760px) {
  .studio-shell.dashboard-shell .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .studio-shell.dashboard-shell .brand-lockup {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .studio-shell.dashboard-shell .dashboard-topbar-summary {
    grid-column: 1 / -1;
    grid-row: 2;
    min-width: 0;
    padding-top: 2px;
  }

  .studio-shell.dashboard-shell .dashboard-topbar-summary strong,
  .studio-shell.dashboard-shell .dashboard-topbar-summary span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .studio-shell.dashboard-shell .dashboard-topbar-summary strong {
    font-size: 13px;
  }

  .studio-shell.dashboard-shell .dashboard-topbar-summary span {
    font-size: 11px;
  }

  .studio-shell.dashboard-shell .top-actions {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .studio-shell.dashboard-shell .theme-toggle {
    width: 52px;
    padding: 0 8px;
  }

  .studio-shell.dashboard-shell .theme-toggle-label,
  .studio-shell.dashboard-shell .topbar-profile-button > span:not(.topbar-profile-chevron) {
    display: none;
  }

  .studio-shell.dashboard-shell .dashboard-role-preview-control {
    padding-left: 7px;
  }

  .studio-shell.dashboard-shell .dashboard-role-preview-control > span {
    display: none;
  }

  .studio-shell.dashboard-shell .dashboard-role-preview-control select {
    min-width: 96px;
    max-width: 112px;
  }

  .studio-shell.dashboard-shell .topbar-profile-button {
    width: 58px;
    padding: 0 8px;
  }

  .studio-shell.dashboard-shell .account-menu-popover {
    inset: 108px 10px 10px;
  }

  .workspace {
    display: block;
  }

  .left-rail,
  .tool-palette,
  .inspector,
  .product-panel,
  .results-panel {
    margin-bottom: 10px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
  }

  .tool-palette {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .canvas-stage {
    min-height: 560px;
  }

  .canvas-scroll {
    justify-content: start;
    padding: 72px 14px 20px;
  }

  .calibration-popover {
    left: 10px;
    right: 10px;
    width: auto;
  }

  .floor-plan-popover {
    left: 10px;
    right: 10px;
    width: auto;
  }

  .product-search-row,
  .product-library-title-card {
    grid-template-columns: 1fr;
  }

  .product-result-card {
    grid-template-columns: 1fr;
  }

  .product-range-list {
    grid-template-columns: 1fr;
  }

  .product-result-card .product-photo,
  .product-card-metrics {
    grid-column: 1;
  }

  .product-result-card .product-photo {
    min-height: 144px;
    padding: 14px;
  }

  .product-result-card .product-photo-image > img:not(.product-brand-logo) {
    height: 112px;
  }

  .product-range-card .product-photo-image > img:not(.product-brand-logo) {
    height: 120px;
  }

  .history-popover {
    top: auto;
    bottom: 66px;
    left: 10px;
    right: 10px;
    width: auto;
  }

  .floor-plan-grid {
    grid-template-columns: 1fr;
  }

  .material-card-head {
    grid-template-columns: 1fr;
  }

  .add-floor {
    grid-template-columns: 1fr;
  }

  .room-draft-panel {
    left: 10px;
    right: 10px;
    flex-wrap: wrap;
  }
}

.plant-room-area polygon {
  fill: rgba(14, 165, 233, 0.14);
  stroke: #0ea5e9;
  stroke-width: 2.5;
  stroke-dasharray: 10 6;
  vector-effect: non-scaling-stroke;
}

.plant-room-area {
  cursor: pointer;
}

.plant-room-area.internal polygon {
  fill: rgba(34, 197, 94, 0.12);
  stroke: #22c55e;
}

.plant-room-area.mixed polygon {
  fill: rgba(245, 158, 11, 0.14);
  stroke: #f59e0b;
}

.plant-room-area.active polygon {
  stroke-width: 4;
}

.plant-room-area.active {
  cursor: move;
}

.plant-room-area.room-linked.active {
  cursor: pointer;
}

.plant-room-area text,
.plant-room-area-label {
  fill: #075985;
  font-size: calc(12px * var(--canvas-text-scale, 1));
  font-weight: 820;
  paint-order: stroke;
  pointer-events: none;
  stroke: rgba(255, 255, 255, 0.88);
  stroke-linejoin: round;
  stroke-width: calc(4px * var(--canvas-text-scale, 1));
}

html[data-theme="dark"] .plant-room-area text,
html[data-theme="dark"] .plant-room-area-label {
  fill: #7dd3fc;
  stroke: rgba(9, 12, 18, 0.9);
}

.plant-room-area-label-layer,
.plant-room-area-label-layer * {
  pointer-events: none;
}

.plant-room-area-bounds {
  fill: none;
  stroke: rgba(14, 165, 233, 0.75);
  stroke-dasharray: 4 4;
  stroke-width: 1.8;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

.plant-room-area-handle {
  fill: #fff;
  stroke: #0ea5e9;
  stroke-width: 2.25;
  cursor: grab;
  vector-effect: non-scaling-stroke;
}

.plant-room-area-handle:hover {
  fill: #e0f2fe;
}

.plant-room-area-handle.handle-n,
.plant-room-area-handle.handle-s {
  cursor: ns-resize;
}

.plant-room-area-handle.handle-e,
.plant-room-area-handle.handle-w {
  cursor: ew-resize;
}

.plant-room-area-handle.handle-ne,
.plant-room-area-handle.handle-sw {
  cursor: nesw-resize;
}

.plant-room-area-handle.handle-nw,
.plant-room-area-handle.handle-se {
  cursor: nwse-resize;
}

.plant-room-area-selection-panel {
  border-color: rgba(14, 165, 233, 0.45);
}

.plant-room-area-selection-panel .danger-mini {
  border-color: rgba(239, 68, 68, 0.45);
  color: #b91c1c;
}

html[data-theme="dark"] .plant-room-area-handle {
  fill: #111827;
  stroke: #38bdf8;
}

html[data-theme="dark"] .plant-room-area-selection-panel .danger-mini {
  color: #fecaca;
}

.plant-room-modebar-assignment {
  display: flex;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
}

.plant-room-modebar-assignment .drawing-selector {
  min-width: min(310px, 31vw);
}

.plant-room-add-tab {
  gap: 7px;
  min-height: 46px;
  white-space: nowrap;
}

.plant-room-unassign-tab {
  min-height: 46px;
  white-space: nowrap;
}

.plant-room-add-tab svg {
  width: 16px;
  height: 16px;
}

.room-plant-room-assignment {
  display: grid;
  gap: 7px;
  margin-top: 2px;
  padding: 8px;
  border: 1px solid var(--blue-border);
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(239, 246, 255, 0.92), rgba(255, 255, 255, 0.68));
  box-shadow: var(--glass-edge);
}

.room-plant-room-assignment.is-assigned {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-color: rgba(52, 199, 89, 0.42);
  background: linear-gradient(145deg, rgba(236, 253, 245, 0.9), rgba(255, 255, 255, 0.66));
}

.room-plant-room-assignment-copy {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.room-plant-room-assignment.is-assigned .room-plant-room-assignment-copy {
  grid-column: 1 / -1;
}

.room-plant-room-assignment-copy > span:last-child {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.room-plant-room-assignment-copy strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.room-plant-room-assignment-copy small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.25;
}

.room-plant-room-assignment-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--blue-border);
  border-radius: 9px;
  background: var(--blue-soft);
  color: var(--blue);
}

.room-plant-room-assignment-icon svg {
  width: 15px;
  height: 15px;
}

.room-plant-room-assignment > .primary-btn,
.room-plant-room-assignment > .secondary-btn {
  min-height: 30px;
  height: 30px;
  margin-top: 0;
  padding-inline: 9px;
  border-radius: 9px;
  font-size: 11px;
}

.plant-room-draw-note {
  max-width: 330px;
  color: var(--muted);
  font-weight: 750;
  line-height: 1.35;
}

html[data-theme="dark"] .room-plant-room-assignment {
  background: linear-gradient(145deg, rgba(10, 132, 255, 0.15), rgba(24, 25, 29, 0.42));
}

html[data-theme="dark"] .room-plant-room-assignment.is-assigned {
  background: linear-gradient(145deg, rgba(48, 209, 88, 0.14), rgba(24, 25, 29, 0.42));
}

.plant-room-area-draft .room-guide-line,
.plant-room-area-draft polyline {
  stroke: #0ea5e9;
  stroke-dasharray: 8 5;
}

.plant-room-area-draft circle {
  fill: #fff;
  stroke: #0ea5e9;
}

.plant-room-area-snap {
  fill: rgba(14, 165, 233, 0.18);
  stroke: #0ea5e9;
}

.public-health-pressure-body .field-note,
.public-health-pressure-zone-card .field-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
  margin: 0 0 8px;
}

.public-health-pressure-zone-card {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(34, 197, 94, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.56);
  box-shadow: var(--glass-edge);
}

html[data-theme="dark"] .public-health-pressure-zone-card {
  border-color: rgba(34, 197, 94, 0.22);
  background: rgba(255, 255, 255, 0.04);
}

.secondary-return-diagnostics-helper {
  display: grid;
  gap: 9px;
  margin-top: 10px;
  padding: 11px;
  border: 1px solid color-mix(in srgb, #f59e0b 38%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, #f59e0b 7%, var(--surface-solid));
  box-shadow: var(--glass-edge);
}

.secondary-return-diagnostics-helper > header {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}

.secondary-return-diagnostics-helper > header > span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, #f59e0b 16%, var(--surface-solid));
  color: #d97706;
}

.secondary-return-diagnostics-helper > header svg {
  width: 15px;
  height: 15px;
}

.secondary-return-diagnostics-helper > header div,
.secondary-return-diagnostic-copy > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.secondary-return-diagnostics-helper > header h4,
.secondary-return-diagnostic-copy strong {
  margin: 0;
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
}

.secondary-return-diagnostics-helper > header small,
.secondary-return-diagnostic-copy small,
.secondary-return-diagnostics-more,
.secondary-return-diagnostic-no-target {
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.secondary-return-diagnostics-list {
  display: grid;
  gap: 7px;
}

.secondary-return-diagnostic-row {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid color-mix(in srgb, #f59e0b 28%, var(--line));
  border-left-width: 3px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-solid) 92%, transparent);
}

.secondary-return-diagnostic-copy {
  min-width: 0;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 7px;
  align-items: start;
}

.secondary-return-diagnostic-index {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: color-mix(in srgb, #f59e0b 14%, var(--surface-solid));
  color: #b45309;
  font-size: 9px;
  font-weight: 950;
}

.secondary-return-diagnostic-row > p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.secondary-return-diagnostic-row > p.secondary-return-diagnostic-fix {
  color: var(--text);
}

.secondary-return-diagnostic-row > .secondary-mini {
  width: 100%;
  min-height: 30px;
  justify-content: center;
}

.secondary-return-diagnostic-row > .secondary-mini svg {
  width: 14px;
  height: 14px;
}

html[data-theme="dark"] .secondary-return-diagnostics-helper {
  border-color: rgba(251, 191, 36, 0.3);
  background: rgba(120, 53, 15, 0.12);
}

html[data-theme="dark"] .secondary-return-diagnostic-row {
  border-color: rgba(251, 191, 36, 0.28);
  background: rgba(15, 23, 42, 0.35);
}

html[data-theme="dark"] .secondary-return-diagnostic-index {
  background: rgba(245, 158, 11, 0.16);
  color: #fde68a;
}

.public-health-deadleg-zone-card {
  display: grid;
  gap: 9px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 10px;
  background: rgba(255, 251, 235, 0.68);
  box-shadow: var(--glass-edge);
}

.pipe-menu-section--deadlegs {
  border-color: rgba(245, 158, 11, 0.32);
}

.public-health-deadleg-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.public-health-deadleg-overview > div {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 7px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-solid) 90%, transparent);
}

.public-health-deadleg-overview span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 850;
  line-height: 1.1;
  text-transform: uppercase;
}

.public-health-deadleg-overview strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
}

.public-health-deadleg-list {
  display: grid;
  gap: 7px;
}

.public-health-deadleg-row {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-left-width: 3px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-solid) 92%, transparent);
  box-shadow: var(--glass-edge);
}

.public-health-deadleg-row.risk-review {
  border-color: rgba(245, 158, 11, 0.4);
}

.public-health-deadleg-row.risk-high {
  border-color: rgba(239, 68, 68, 0.45);
}

.public-health-deadleg-row.selected-branch {
  outline: 2px solid rgba(10, 132, 255, 0.2);
  outline-offset: 1px;
}

.public-health-deadleg-row > header {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  align-items: start;
}

.public-health-deadleg-row > header > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.public-health-deadleg-row header strong,
.public-health-deadleg-row header small {
  overflow-wrap: anywhere;
}

.public-health-deadleg-row header strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
}

.public-health-deadleg-row header small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 720;
  line-height: 1.2;
}

.public-health-deadleg-row header em {
  padding: 4px 6px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
  font-size: 8.5px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.public-health-deadleg-row.risk-review header em {
  background: rgba(245, 158, 11, 0.15);
  color: #a16207;
}

.public-health-deadleg-row.risk-high header em {
  background: rgba(239, 68, 68, 0.13);
  color: #b91c1c;
}

.public-health-deadleg-row dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin: 0;
}

.public-health-deadleg-row dl > div {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.public-health-deadleg-row dt {
  color: var(--muted);
  font-size: 8px;
  font-weight: 820;
  line-height: 1.05;
  text-transform: uppercase;
}

.public-health-deadleg-row dd {
  margin: 0;
  color: var(--text);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.15;
}

.public-health-deadleg-row > p,
.public-health-deadleg-note,
.public-health-deadleg-empty {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.35;
}

html[data-theme="dark"] .public-health-deadleg-zone-card {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(120, 53, 15, 0.12);
}

html[data-theme="dark"] .public-health-deadleg-row,
html[data-theme="dark"] .public-health-deadleg-overview > div {
  background: rgba(15, 23, 42, 0.35);
}

html[data-theme="dark"] .public-health-deadleg-row header em {
  color: #86efac;
}

html[data-theme="dark"] .public-health-deadleg-row.risk-review header em {
  color: #fde68a;
}

html[data-theme="dark"] .public-health-deadleg-row.risk-high header em {
  color: #fca5a5;
}

.public-health-pressure-list {
  display: grid;
  gap: 8px;
}

.public-health-pressure-row {
  display: grid;
  gap: 8px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 10px;
  min-width: 0;
}

html[data-theme="dark"] .public-health-pressure-row {
  background: rgba(255, 255, 255, 0.04);
}

.public-health-pressure-row-head {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.public-health-pressure-service {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.15;
}

.public-health-pressure-route {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-align: right;
}

.public-health-pressure-metrics {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.public-health-pressure-metrics div {
  display: grid;
  gap: 3px;
  background: rgba(148, 163, 184, 0.12);
  border-radius: 7px;
  min-width: 0;
  padding: 7px 8px;
}

.public-health-pressure-metrics .is-total {
  background: rgba(15, 23, 42, 0.08);
}

html[data-theme="dark"] .public-health-pressure-metrics .is-total {
  background: rgba(255, 255, 255, 0.08);
}

.public-health-pressure-metrics dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.public-health-pressure-metrics dd {
  display: flex;
  align-items: baseline;
  gap: 3px;
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.15;
  margin: 0;
  min-width: 0;
}

.public-health-pressure-metrics dd strong {
  font-size: 15px;
  font-weight: 900;
}

.public-health-pressure-metrics dd span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.public-health-pressure-metrics .is-total dd strong,
.public-health-pressure-metrics .is-total dd span {
  color: var(--text);
}

.plant-room-planner-stage {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
}

.plant-room-planner-shell {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  padding: 14px;
}

.plant-room-planner-sidebar,
.plant-room-planner-canvas {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}

html[data-theme="dark"] .plant-room-planner-sidebar,
html[data-theme="dark"] .plant-room-planner-canvas {
  background: rgba(12, 15, 22, 0.72);
}

.plant-room-planner-sidebar {
  align-content: start;
  display: grid;
  gap: 12px;
  overflow: auto;
  padding: 14px;
}

.plant-room-planner-title span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.plant-room-planner-title strong {
  color: var(--text);
  display: block;
  font-size: 26px;
}

.plant-room-planner-title small {
  color: var(--muted);
  display: block;
  font-weight: 800;
}

.plant-room-view-toggle {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.plant-room-view-toggle button,
.plant-room-planner-list button,
.plant-room-node-row button {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--text);
  font-weight: 900;
  padding: 9px 10px;
}

html[data-theme="dark"] .plant-room-view-toggle button,
html[data-theme="dark"] .plant-room-planner-list button,
html[data-theme="dark"] .plant-room-node-row button {
  background: rgba(255, 255, 255, 0.06);
}

.plant-room-view-toggle button.active,
.plant-room-planner-list button.active {
  background: rgba(0, 120, 255, 0.14);
  border-color: var(--accent);
  color: var(--accent);
}

.plant-room-planner-list {
  display: grid;
  gap: 8px;
}

.plant-room-planner-list h3 {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
  text-transform: uppercase;
}

.plant-room-planner-list p {
  color: var(--muted);
  font-weight: 800;
  margin: 0;
}

.plant-room-planner-list button {
  display: grid;
  gap: 2px;
  text-align: left;
}

.plant-room-planner-list button span,
.plant-room-node-row span {
  font-weight: 900;
}

.plant-room-planner-list button small,
.plant-room-node-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.plant-room-node-row {
  align-items: center;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  display: grid;
  gap: 4px 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 10px;
}

.plant-room-node-row small {
  grid-column: 1;
}

.plant-room-node-row button {
  color: #ef4444;
  grid-column: 2;
  grid-row: 1 / span 2;
  padding: 7px 9px;
}

.plant-room-planner-canvas {
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.plant-room-planner-empty-state {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: grid;
  gap: 13px;
  width: min(620px, calc(100% - 48px));
  max-height: calc(100% - 48px);
  padding: 30px;
  overflow: auto;
  transform: translate(-50%, -50%);
  border: 1px solid var(--blue-border);
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 0%, rgba(10, 124, 255, 0.14), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(244, 249, 255, 0.9));
  box-shadow: var(--shadow);
}

.plant-room-planner-empty-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid var(--blue-border);
  border-radius: 17px;
  background: var(--blue-soft);
  color: var(--blue);
}

.plant-room-planner-empty-icon svg {
  width: 27px;
  height: 27px;
}

.plant-room-planner-empty-state > span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plant-room-planner-empty-state h2 {
  margin: -7px 0 0;
  color: var(--text);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.05;
}

.plant-room-planner-empty-state > p {
  max-width: 520px;
  margin: -5px 0 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.45;
}

.plant-room-planner-empty-state .field {
  gap: 7px;
  color: var(--text);
  font-weight: 850;
}

.plant-room-planner-empty-state select {
  min-height: 46px;
}

.plant-room-planner-empty-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.plant-room-planner-empty-actions button {
  min-height: 48px;
}

.plant-room-planner-empty-note {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.plant-room-planner-empty-note strong {
  color: var(--text);
}

.plant-room-planner-empty-note span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

html[data-theme="dark"] .plant-room-planner-empty-state {
  background:
    radial-gradient(circle at 100% 0%, rgba(10, 132, 255, 0.2), transparent 40%),
    linear-gradient(145deg, rgba(35, 36, 40, 0.96), rgba(12, 13, 16, 0.94));
}

@media (max-width: 980px) {
  .plant-room-modebar-assignment {
    flex-wrap: wrap;
  }

  .plant-room-modebar-assignment .drawing-selector {
    min-width: min(280px, 64vw);
  }

  .plant-room-planner-empty-state {
    width: calc(100% - 28px);
    padding: 22px;
  }

  .plant-room-planner-empty-actions {
    grid-template-columns: 1fr;
  }
}

.plant-room-planner-svg {
  --plant-room-planner-label-primary-size: 2.45px;
  --plant-room-planner-label-secondary-size: 2.2px;
  --plant-room-planner-label-tertiary-size: 2px;
  --plant-room-planner-label-stroke: 0.48px;
  display: block;
  height: 100%;
  min-height: 520px;
  contain: layout paint style;
  touch-action: none;
  user-select: none;
  width: 100%;
  will-change: transform;
}

.plant-room-planner-svg.is-zooming .plant-room-planner-equipment-ref,
.plant-room-planner-svg.is-zooming .plant-room-planner-equipment-name,
.plant-room-planner-svg.is-zooming .plant-room-planner-equipment-size,
.plant-room-planner-svg.is-zooming .plant-room-node-label,
.plant-room-planner-svg.is-panning .plant-room-planner-equipment-ref,
.plant-room-planner-svg.is-panning .plant-room-planner-equipment-name,
.plant-room-planner-svg.is-panning .plant-room-planner-equipment-size,
.plant-room-planner-svg.is-panning .plant-room-node-label,
.plant-room-planner-svg.is-touch-zooming .plant-room-planner-equipment-ref,
.plant-room-planner-svg.is-touch-zooming .plant-room-planner-equipment-name,
.plant-room-planner-svg.is-touch-zooming .plant-room-planner-equipment-size,
.plant-room-planner-svg.is-touch-zooming .plant-room-node-label {
  opacity: 0.62;
  transition: none;
}

.plant-room-planner-svg.is-zooming .plant-room-planner-label-layer,
.plant-room-planner-svg.is-panning .plant-room-planner-label-layer,
.plant-room-planner-svg.is-touch-zooming .plant-room-planner-label-layer,
.plant-room-planner-svg.is-zooming .plant-room-planner-pipe-node-layer,
.plant-room-planner-svg.is-panning .plant-room-planner-pipe-node-layer,
.plant-room-planner-svg.is-touch-zooming .plant-room-planner-pipe-node-layer,
.plant-room-planner-svg.is-zooming .pipe-flow-direction,
.plant-room-planner-svg.is-panning .pipe-flow-direction,
.plant-room-planner-svg.is-touch-zooming .pipe-flow-direction,
.plant-room-planner-svg.is-zooming .pipe-tee-fitting,
.plant-room-planner-svg.is-panning .pipe-tee-fitting,
.plant-room-planner-svg.is-touch-zooming .pipe-tee-fitting,
.plant-room-planner-svg.is-zooming .plant-room-planner-valve,
.plant-room-planner-svg.is-panning .plant-room-planner-valve,
.plant-room-planner-svg.is-touch-zooming .plant-room-planner-valve {
  opacity: 0;
  pointer-events: none;
  transition: none;
}

.plant-room-planner-svg.is-zooming .pipe-flow-direction *,
.plant-room-planner-svg.is-panning .pipe-flow-direction *,
.plant-room-planner-svg.is-touch-zooming .pipe-flow-direction * {
  animation: none !important;
  transition: none !important;
}

.plant-room-planner-grid {
  fill: url("#plantRoomGrid");
}

.plant-room-planner-svg pattern path {
  fill: none;
  stroke: rgba(100, 116, 139, 0.22);
  stroke-width: 1;
}

.plant-room-planner-room-context {
  fill: rgba(100, 116, 139, 0.08);
  stroke: rgba(31, 41, 55, 0.35);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-area-shape {
  fill: rgba(14, 165, 233, 0.14);
  stroke: #0ea5e9;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-area-shape.internal {
  fill: rgba(34, 197, 94, 0.13);
  stroke: #22c55e;
}

.plant-room-planner-area-shape.mixed {
  fill: rgba(245, 158, 11, 0.14);
  stroke: #f59e0b;
}

.plant-room-planner-area-outline {
  fill: none;
  pointer-events: none;
  stroke: #0ea5e9;
  stroke-dasharray: 12 9;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-area-outline.internal {
  stroke: #22c55e;
}

.plant-room-planner-area-outline.mixed {
  stroke: #f59e0b;
}

.plant-room-planner-zone-node {
  color: #ef4444;
  cursor: pointer;
}

.plant-room-planner-zone-node.plant-room-zone-heating {
  color: #ef4444;
}

.plant-room-planner-zone-node.plant-room-zone-cooling {
  color: #0ea5e9;
}

.plant-room-planner-zone-node.plant-room-zone-public-health {
  color: #22c55e;
}

.plant-room-planner-zone-node.plant-room-zone-electrical {
  color: #a855f7;
}

.plant-room-planner-zone-node.plant-room-zone-gas {
  color: #eab308;
}

.plant-room-planner-zone-node:not(.plant-room-node) circle {
  fill: #fff;
  stroke: currentColor;
  stroke-width: 0.7;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-zone-node:not(.plant-room-node) .plant-room-planner-zone-node-hit {
  fill: transparent;
  pointer-events: all;
  stroke: transparent;
  stroke-width: 0;
}

.plant-room-planner-zone-node:not(.plant-room-node).active circle {
  fill: color-mix(in srgb, currentColor 12%, #fff);
  stroke-width: 1;
}

.plant-room-planner-zone-node:not(.plant-room-node).active .plant-room-planner-zone-node-hit {
  fill: transparent;
  stroke: transparent;
  stroke-width: 0;
}

.plant-room-planner-zone-node:not(.plant-room-node) path {
  fill: none;
  stroke: currentColor;
  stroke-width: 0.65;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-zone-node:not(.plant-room-node) text {
  fill: var(--text);
  font-size: 1.55px;
  font-weight: 900;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 0.32px;
}

.plant-room-planner-zone-node:not(.plant-room-node) text + text {
  fill: var(--muted);
  font-size: 1.25px;
}

html[data-theme="dark"] .plant-room-planner-zone-node:not(.plant-room-node) text {
  stroke: rgba(12, 15, 22, 0.9);
}

.plant-room-planner-svg .plant-room-node {
  cursor: grab;
}

.canvas-stage .plant-room-planner-svg .plant-room-node .plant-room-label-badge {
  fill: rgba(255, 255, 255, 0.96);
  filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.14));
  pointer-events: none;
  stroke: currentColor;
  stroke-width: 0.48;
  vector-effect: non-scaling-stroke;
}

.canvas-stage .plant-room-planner-svg .plant-room-node .plant-room-node-label {
  fill: #172033;
  font-size: calc(var(--plant-room-planner-label-primary-size) * var(--plant-room-node-label-scale, var(--plant-room-node-scale, 1)));
  font-weight: 900;
  letter-spacing: 0;
  paint-order: stroke;
  pointer-events: none;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: var(--plant-room-planner-label-stroke);
  text-rendering: geometricPrecision;
  vector-effect: non-scaling-stroke;
}

.canvas-stage .plant-room-planner-svg .plant-room-node.plant-room-system-heating .plant-room-node-label,
.canvas-stage .plant-room-planner-svg .plant-room-node.plant-room-system-cooling .plant-room-node-label,
.canvas-stage .plant-room-planner-svg .plant-room-node.plant-room-system-public-health .plant-room-node-label,
.canvas-stage .plant-room-planner-svg .plant-room-node.plant-room-system-gas .plant-room-node-label,
.canvas-stage .plant-room-planner-svg .plant-room-node.plant-room-system-electrical .plant-room-node-label,
html[data-theme="dark"] .canvas-stage .plant-room-planner-svg .plant-room-node.plant-room-system-heating .plant-room-node-label,
html[data-theme="dark"] .canvas-stage .plant-room-planner-svg .plant-room-node.plant-room-system-cooling .plant-room-node-label,
html[data-theme="dark"] .canvas-stage .plant-room-planner-svg .plant-room-node.plant-room-system-public-health .plant-room-node-label,
html[data-theme="dark"] .canvas-stage .plant-room-planner-svg .plant-room-node.plant-room-system-gas .plant-room-node-label,
html[data-theme="dark"] .canvas-stage .plant-room-planner-svg .plant-room-node.plant-room-system-electrical .plant-room-node-label {
  fill: #172033;
  stroke: rgba(255, 255, 255, 0.9);
}

html[data-theme="dark"] .canvas-stage .plant-room-planner-svg .plant-room-node .plant-room-label-badge,
html[data-theme="dark"] .canvas-stage .plant-room-planner-svg .plant-room-node .plant-room-connection-port {
  fill: rgba(255, 255, 255, 0.96);
}

.canvas-stage .plant-room-planner-svg .plant-room-node-compact .plant-room-marker {
  fill: rgba(255, 255, 255, 0.98);
  stroke-width: 0.92;
}

.canvas-stage .plant-room-planner-svg .plant-room-node-compact .plant-room-node-core {
  opacity: 0.075;
}

.canvas-stage .plant-room-planner-svg .plant-room-node-compact .plant-room-node-label {
  font-size: calc(3.35px * var(--plant-room-node-label-scale, var(--plant-room-node-scale, 1)));
  stroke-width: 0.42px;
}

.canvas-stage .plant-room-planner-svg .plant-room-node-compact .plant-room-port-stem {
  stroke-width: 0.82;
}

.canvas-stage .plant-room-planner-svg .plant-room-node-compact .plant-room-connection-port {
  stroke-width: 0.92;
}

.plant-room-planner-status {
  align-items: center;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  color: var(--muted);
  display: inline-flex;
  gap: 8px;
  left: 18px;
  padding: 8px 12px;
  position: absolute;
  top: 18px;
  z-index: 4;
}

.plant-room-planner-status span {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.plant-room-planner-status strong {
  color: var(--text);
  font-size: 13px;
}

.plant-room-planner-tools {
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 10px;
}

.plant-room-tool-grid {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.plant-room-tool-button {
  align-items: center;
  display: flex !important;
  gap: 7px !important;
  justify-content: center;
  min-height: 38px;
  text-align: center !important;
}

.plant-room-tool-button svg {
  flex: 0 0 auto;
  height: 16px;
  width: 16px;
}

.plant-room-tool-controls {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.plant-room-tool-controls label {
  display: grid;
  gap: 5px;
}

.plant-room-tool-controls span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.plant-room-tool-controls select,
.plant-room-tool-controls input,
.plant-room-selected-pipe-grid select,
.plant-room-selected-pipe-grid input {
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  font-weight: 900;
  min-height: 38px;
  padding: 0 10px;
  width: 100%;
}

.plant-room-pipe-height-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.plant-room-pipe-height-field small {
  align-self: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  padding: 0 9px;
}

.plant-room-next-pipe-spec,
.plant-room-selected-pipe-spec {
  margin-top: 9px;
}

.plant-room-tool-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
  margin-top: 10px;
}

.plant-room-tool-actions button {
  justify-content: center;
  text-align: center;
}

.plant-room-tool-actions button:disabled,
.plant-room-tool-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.plant-room-selected-pipe,
.plant-room-selected-valve {
  margin-top: 10px;
}

.plant-room-planner-svg.plant-room-planner-tool-pan {
  cursor: grab;
}

.plant-room-planner-svg.plant-room-planner-tool-pan:active {
  cursor: grabbing;
}

.plant-room-planner-svg.plant-room-planner-tool-select {
  cursor: grab;
}

.plant-room-planner-svg.plant-room-planner-tool-boxSelect {
  cursor: crosshair;
  user-select: none;
}

.plant-room-planner-selection-box {
  pointer-events: none;
}

.plant-room-planner-selection-box text {
  fill: #6d28d9;
  font-size: 9px;
  font-weight: 900;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.96);
  stroke-linejoin: round;
  stroke-width: 3px;
}

.plant-room-planner-selection-box.pipe-selection-box-intersect text {
  fill: #0759b4;
}

.plant-room-planner-svg.plant-room-planner-tool-drawPipe,
.plant-room-planner-svg.plant-room-planner-tool-valve,
.plant-room-planner-svg.plant-room-planner-tool-note,
.plant-room-planner-svg.plant-room-planner-tool-equipment,
.plant-room-planner-svg.plant-room-planner-tool-noiseReceptor,
.plant-room-planner-svg.plant-room-planner-tool-noiseBarrier {
  cursor: crosshair;
}

.plant-room-planner-svg.hide-grid .plant-room-planner-grid {
  display: none;
}

.plant-room-planner-pdf-underlay {
  pointer-events: none;
}

.plant-room-planner-building-context,
.plant-room-planner-building-context * {
  pointer-events: none;
}

.plant-room-planner-building-context {
  opacity: 0.82;
}

.plant-room-context-room-fill {
  fill: rgba(148, 163, 184, 0.08);
  stroke: rgba(100, 116, 139, 0.25);
  stroke-width: 0.9;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-building-context .room-wall {
  opacity: 0.78;
}

.plant-room-planner-building-context .room-wall.cavity-wall-casing.external,
.plant-room-planner-building-context .room-wall.wall-casing.external {
  stroke: rgba(30, 41, 59, 0.82);
}

.plant-room-planner-building-context .room-wall.cavity-wall-void.external {
  stroke: rgba(248, 250, 252, 0.92);
}

.plant-room-planner-building-context .room-wall.wall-casing.internal,
.plant-room-planner-building-context .room-wall.wall-face.internal,
.plant-room-planner-building-context .room-wall.wall-centre.internal {
  stroke: rgba(100, 116, 139, 0.62);
}

.plant-room-planner-building-context .wall-window,
.plant-room-planner-building-context .wall-door,
.plant-room-planner-building-context .roof-skylight {
  opacity: 0.8;
}

.plant-room-planner-pipe-layer,
.plant-room-planner-pipe-node-layer,
.plant-room-planner-pipe-draft,
.plant-room-planner-valve {
  color: var(--plant-room-pipe-color, #ef4444);
}

.plant-room-planner-floor-overlays,
.plant-room-planner-floor-overlays * {
  pointer-events: none;
}

.plant-room-planner-floor-overlays {
  opacity: 0.96;
  pointer-events: auto;
}

.plant-room-planner-floor-overlays .plant-room-planner-pipe-layer {
  pointer-events: auto;
}

.plant-room-planner-floor-overlays .plant-room-planner-pipe-line {
  stroke-width: var(--plant-room-pipe-dia, 4);
}

.plant-room-planner-floor-overlays .plant-room-planner-pipe-hit {
  pointer-events: stroke;
}

.plant-room-planner-floor-overlays [data-floor-plant-room-equipment-id] .plant-room-planner-equipment-hitbox,
.workspace:not(.locked-floor-plan) .plant-room-planner-floor-overlays [data-floor-plant-room-equipment-id] .plant-room-planner-equipment-hitbox {
  pointer-events: all !important;
  cursor: pointer;
}

.plant-room-planner-floor-overlays [data-floor-plant-room-equipment-id]:focus-visible .plant-room-planner-equipment-hitbox {
  stroke: var(--menu-accent, #1766d2);
  stroke-width: 2;
  outline: none;
}

.plant-room-planner-floor-labels,
.plant-room-planner-floor-labels * {
  pointer-events: none;
}

.plant-room-planner-floor-overlays .plant-room-planner-equipment-footprint {
  filter: none;
}

.plant-room-context-detail-layer,
.plant-room-context-detail-layer * {
  pointer-events: none;
}

.plant-room-context-barrier-backdrop,
.plant-room-context-barrier-face,
.plant-room-context-barrier-centre,
.plant-room-context-barrier-tick,
.plant-room-context-receptor path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.plant-room-context-barrier-backdrop {
  stroke: color-mix(in srgb, var(--surface-solid) 72%, transparent);
  stroke-width: 6;
}

.plant-room-context-barrier-face {
  stroke: #64748b;
  stroke-width: 4;
}

.plant-room-context-solid-wall .plant-room-context-barrier-face {
  stroke: #64748b;
  stroke-width: 5;
}

.plant-room-context-solid-wall .plant-room-context-barrier-centre {
  stroke: rgba(255, 255, 255, 0.82);
  stroke-width: 0.8;
}

.plant-room-context-fence-panel .plant-room-context-barrier-face {
  stroke: #64748b;
  stroke-width: 4;
}

.plant-room-context-fence-panel .plant-room-context-barrier-tick {
  stroke: #cbd5e1;
  stroke-width: 0.9;
}

.plant-room-context-open-fence .plant-room-context-barrier-face {
  stroke: #64748b;
  stroke-width: 2.6;
  stroke-dasharray: 5 4;
}

.plant-room-context-open-fence .plant-room-context-barrier-tick {
  stroke: #94a3b8;
  stroke-width: 1.1;
}

.plant-room-context-vegetation .plant-room-context-barrier-backdrop {
  stroke-width: 7;
}

.plant-room-context-vegetation .plant-room-context-barrier-face {
  stroke: rgba(21, 128, 61, 0.66);
  stroke-width: 5;
}

.plant-room-context-vegetation-bush {
  fill: rgba(74, 222, 128, 0.76);
  stroke: #15803d;
  stroke-width: 1.15;
  vector-effect: non-scaling-stroke;
}

.plant-room-context-vegetation-bush.bush-1 {
  fill: rgba(34, 197, 94, 0.9);
}

.plant-room-context-vegetation-bush.bush-2 {
  fill: rgba(22, 163, 74, 0.78);
}

.plant-room-context-receptor-halo {
  fill: color-mix(in srgb, var(--blue) 14%, var(--surface-solid));
  stroke: var(--blue);
  stroke-width: 1.7;
  vector-effect: non-scaling-stroke;
}

.plant-room-context-receptor-core {
  fill: var(--blue);
  stroke: #ffffff;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.plant-room-context-receptor path {
  stroke: var(--blue);
  stroke-width: 1.5;
}

.plant-room-context-detail-floor-plan {
  opacity: 0.56;
}

.plant-room-context-detail-floor-plan .plant-room-context-screen-marker {
  transform: scale(var(--canvas-marker-scale, 1));
  transform-box: view-box;
  transform-origin: 0 0;
}

.plant-room-context-detail-floor-plan .plant-room-context-barrier-backdrop,
.plant-room-context-detail-floor-plan .plant-room-context-barrier-tick {
  display: none;
}

.plant-room-context-detail-floor-plan .plant-room-context-barrier-face {
  stroke: #64748b;
  stroke-width: calc(2.2px * var(--canvas-zoom-inverse, 1));
}

.plant-room-context-detail-floor-plan .plant-room-context-solid-wall .plant-room-context-barrier-face {
  stroke: #64748b;
  stroke-width: calc(2.8px * var(--canvas-zoom-inverse, 1));
}

.plant-room-context-detail-floor-plan .plant-room-context-solid-wall .plant-room-context-barrier-centre {
  stroke-width: calc(0.65px * var(--canvas-zoom-inverse, 1));
}

.plant-room-context-detail-floor-plan .plant-room-context-fence-panel .plant-room-context-barrier-face {
  stroke: #64748b;
  stroke-width: calc(2.8px * var(--canvas-zoom-inverse, 1));
  stroke-dasharray: 7 2;
}

.plant-room-context-detail-floor-plan .plant-room-context-open-fence .plant-room-context-barrier-face {
  stroke: #64748b;
  stroke-width: calc(1.6px * var(--canvas-zoom-inverse, 1));
  stroke-dasharray: 4 4;
}

.plant-room-context-detail-floor-plan .plant-room-context-vegetation .plant-room-context-barrier-face {
  stroke: #15803d;
  stroke-width: calc(3.2px * var(--canvas-zoom-inverse, 1));
}

.plant-room-context-detail-floor-plan .plant-room-context-vegetation-bush {
  stroke-width: calc(0.9px * var(--canvas-zoom-inverse, 1));
}

.plant-room-context-detail-floor-plan .plant-room-context-receptor-halo {
  stroke-width: calc(1.5px * var(--canvas-zoom-inverse, 1));
}

.plant-room-context-detail-floor-plan .plant-room-context-receptor-core {
  stroke-width: calc(0.8px * var(--canvas-zoom-inverse, 1));
}

.plant-room-context-detail-floor-plan .plant-room-context-receptor path {
  stroke-width: calc(1.35px * var(--canvas-zoom-inverse, 1));
}

html[data-theme="dark"] .plant-room-context-barrier-backdrop {
  stroke: rgba(9, 12, 18, 0.86);
}

html[data-theme="dark"] .plant-room-context-solid-wall .plant-room-context-barrier-centre {
  stroke: rgba(226, 232, 240, 0.72);
}

.floor-plan-plant-room-equipment-port {
  color: #a16207;
  opacity: 1;
}

.floor-plan-plant-room-equipment-port .pipe-snap-target {
  fill: rgba(254, 249, 195, 0.86);
  stroke: #eab308;
  stroke-width: 2.25;
  stroke-dasharray: 3 2;
}

.floor-plan-plant-room-equipment-port-core {
  fill: #facc15;
  stroke: #713f12;
  stroke-width: 1.1;
  vector-effect: non-scaling-stroke;
}

.floor-plan-plant-room-equipment-port text {
  fill: #713f12;
  font-size: 6px;
  font-weight: 900;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.96);
  stroke-width: 2.5px;
  vector-effect: non-scaling-stroke;
}

.floor-plan-plant-room-equipment-port-label-screen {
  transform: scale(var(--canvas-marker-scale, 1));
  transform-box: view-box;
  transform-origin: 0 0;
}

.floor-plan-plant-room-equipment-port.pipe-drainage-waste {
  color: #92400e;
}

.floor-plan-plant-room-equipment-port.pipe-drainage-waste .pipe-snap-target {
  fill: rgba(254, 243, 199, 0.92);
  stroke: #92400e;
}

.floor-plan-plant-room-equipment-port.pipe-drainage-waste .floor-plan-plant-room-equipment-port-core {
  fill: #92400e;
  stroke: #78350f;
}

.floor-plan-plant-room-equipment-port.pipe-drainage-waste text {
  fill: #78350f;
}

.floor-plan-plant-room-equipment-port.pipe-electrical-cable .pipe-snap-target,
.floor-plan-plant-room-equipment-port.pipe-electrical-cable .floor-plan-plant-room-equipment-port-core {
  fill: rgba(17, 24, 39, 0.92);
  stroke: #111827;
}

.floor-plan-plant-room-equipment-port.pipe-fire-sprinkler .pipe-snap-target,
.floor-plan-plant-room-equipment-port.pipe-fire-hydrant .pipe-snap-target,
.floor-plan-plant-room-equipment-port.pipe-fire-hose-reel .pipe-snap-target,
.floor-plan-plant-room-equipment-port.pipe-fire-sprinkler .floor-plan-plant-room-equipment-port-core,
.floor-plan-plant-room-equipment-port.pipe-fire-hydrant .floor-plan-plant-room-equipment-port-core,
.floor-plan-plant-room-equipment-port.pipe-fire-hose-reel .floor-plan-plant-room-equipment-port-core {
  fill: rgba(220, 38, 38, 0.88);
  stroke: #991b1b;
}

.floor-plan-plant-room-equipment-port.pipe-ventilation-supply .pipe-snap-target,
.floor-plan-plant-room-equipment-port.pipe-ventilation-extract .pipe-snap-target,
.floor-plan-plant-room-equipment-port.pipe-ventilation-supply .floor-plan-plant-room-equipment-port-core,
.floor-plan-plant-room-equipment-port.pipe-ventilation-extract .floor-plan-plant-room-equipment-port-core {
  fill: rgba(20, 184, 166, 0.88);
  stroke: #0f766e;
}

.floor-plan-plant-room-equipment-port.pipe-electrical-cable text {
  fill: #111827;
}

.floor-plan-plant-room-equipment-port.pipe-fire-sprinkler text,
.floor-plan-plant-room-equipment-port.pipe-fire-hydrant text,
.floor-plan-plant-room-equipment-port.pipe-fire-hose-reel text {
  fill: #991b1b;
}

.floor-plan-plant-room-equipment-port.pipe-ventilation-supply text,
.floor-plan-plant-room-equipment-port.pipe-ventilation-extract text {
  fill: #0f5f5a;
}

html[data-theme="dark"] .floor-plan-plant-room-equipment-port.pipe-drainage-waste .pipe-snap-target {
  fill: rgba(120, 53, 15, 0.82);
  stroke: #fbbf24;
}

html[data-theme="dark"] .floor-plan-plant-room-equipment-port.pipe-drainage-waste .floor-plan-plant-room-equipment-port-core {
  fill: #92400e;
  stroke: #fde68a;
}

html[data-theme="dark"] .floor-plan-plant-room-equipment-port.pipe-drainage-waste text {
  fill: #fde68a;
  stroke: rgba(15, 23, 42, 0.96);
}

.plant-room-planner-floor-pipe-context {
  opacity: 0.5;
  pointer-events: none;
}

.plant-room-planner-floor-pipe-context .drawn-pipe-line {
  stroke-width: max(2.2, var(--pipe-stroke-width, 4));
}

.plant-room-planner-floor-pipe-context .drawn-pipe-hit-line,
.plant-room-planner-floor-pipe-context .drawn-pipe-segment-hit {
  display: none;
}

.plant-room-planner-pipe-hit {
  cursor: pointer;
  fill: none;
  pointer-events: stroke;
  stroke: transparent;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 24;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-pipe-selection-layer {
  pointer-events: none;
}

.plant-room-planner-svg.plant-room-planner-tool-select .plant-room-planner-pipe-selection-layer {
  pointer-events: auto;
}

.plant-room-planner-pipe-selection-hit {
  cursor: pointer;
  fill: none;
  pointer-events: stroke;
  stroke: transparent;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 34;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-pipe-line {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: var(--plant-room-pipe-dia, 5);
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-pipe-layer.selected .plant-room-planner-pipe-line {
  filter: drop-shadow(0 0 8px color-mix(in srgb, currentColor 68%, transparent));
}

.plant-room-planner-pipe-node-handle {
  cursor: grab;
  pointer-events: all;
}

.plant-room-planner-pipe-node-hit {
  fill: transparent;
  pointer-events: all;
  stroke: transparent;
}

.plant-room-planner-pipe-node {
  fill: var(--surface);
  pointer-events: none;
  stroke: currentColor;
  stroke-width: 0.75;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-pipe-node.connected {
  fill: color-mix(in srgb, currentColor 18%, var(--surface));
  stroke-width: 0.85;
}

.plant-room-planner-pipe-layer.selected .plant-room-planner-pipe-node,
.plant-room-planner-pipe-node-layer.selected .plant-room-planner-pipe-node {
  filter: drop-shadow(0 0 6px color-mix(in srgb, currentColor 70%, transparent));
}

.plant-room-planner-pipe-draft-line {
  fill: none;
  stroke: currentColor;
  stroke-dasharray: 8 8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: var(--plant-room-pipe-dia, 3);
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-pipe-hover-line {
  stroke: currentColor;
  stroke-dasharray: 5 7;
  stroke-linecap: round;
  stroke-width: var(--plant-room-pipe-dia, 3);
  opacity: 0.52;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-pipe-draft circle {
  fill: var(--surface);
  stroke: currentColor;
  stroke-width: 0.75;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-pipe-draft circle.connected {
  fill: color-mix(in srgb, currentColor 18%, var(--surface));
  stroke-width: 0.85;
}

.plant-room-planner-snap-target {
  fill: color-mix(in srgb, currentColor 12%, transparent);
  pointer-events: none;
  stroke: currentColor;
  stroke-dasharray: 4 3;
  stroke-width: 0.85;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-connection-points {
  pointer-events: none;
}

.plant-room-planner-label-layer {
  pointer-events: none;
}

.plant-room-planner-connection-point {
  color: var(--plant-room-pipe-color, #0a84ff);
  cursor: crosshair;
  pointer-events: none;
}

.plant-room-planner-tool-drawPipe .plant-room-planner-connection-point,
.plant-room-planner-tool-drawMultiPipe .plant-room-planner-connection-point,
.plant-room-planner-tool-equipment .plant-room-planner-connection-point {
  pointer-events: auto;
}

.plant-room-planner-connection-point circle {
  fill: color-mix(in srgb, currentColor 20%, var(--surface));
  stroke: currentColor;
  stroke-width: 0.65;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-connection-point .plant-room-planner-connection-hit {
  fill: transparent;
  pointer-events: none;
  stroke: transparent;
}

.plant-room-planner-tool-drawPipe .plant-room-planner-connection-point .plant-room-planner-connection-hit,
.plant-room-planner-tool-drawMultiPipe .plant-room-planner-connection-point .plant-room-planner-connection-hit,
.plant-room-planner-tool-equipment .plant-room-planner-connection-point .plant-room-planner-connection-hit {
  pointer-events: all;
}

.plant-room-planner-connection-point path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 0.5;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-pipe-label {
  pointer-events: none;
}

.canvas-stage .plant-room-planner-svg .plant-room-planner-pipe-label.pipe-size-label-grid.compact .pipe-size-label {
  font-size: calc(var(--plant-room-planner-label-primary-size) * var(--pipe-label-scale, 1));
  stroke-width: var(--plant-room-planner-label-stroke);
}

.canvas-stage .plant-room-planner-svg .plant-room-planner-pipe-label.pipe-size-label-grid.expanded .pipe-size-label {
  font-size: calc(var(--plant-room-planner-label-primary-size) * var(--pipe-label-scale, 1));
  stroke-width: calc(var(--plant-room-planner-label-stroke) * 0.82);
}

.canvas-stage .plant-room-planner-svg .plant-room-planner-pipe-label .pipe-size-label-secondary {
  font-size: calc(var(--plant-room-planner-label-tertiary-size) * var(--pipe-label-scale, 1));
}

.plant-room-planner-dimensions {
  color: var(--accent);
  pointer-events: none;
}

.plant-room-planner-dimension-line,
.plant-room-planner-dimension-tick,
.plant-room-planner-dimension-guide {
  fill: none;
  stroke: currentColor;
  stroke-dasharray: 4 4;
  stroke-linecap: round;
  stroke-width: 1.3;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-dimension-guide {
  opacity: 0.42;
}

.plant-room-planner-dimensions text {
  fill: var(--accent);
  font-size: var(--plant-room-planner-label-primary-size);
  font-weight: 900;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: var(--plant-room-planner-label-stroke);
}

.plant-room-planner-valve {
  cursor: pointer;
  pointer-events: all;
}

.plant-room-planner-valve .pipe-valve-hit {
  pointer-events: all;
}

.plant-room-planner-valve.preview {
  opacity: 0.58;
  pointer-events: none;
}

.plant-room-planner-valve.preview .pipe-valve-hit {
  pointer-events: none;
}

.plant-room-planner-valve .pipe-valve-occluder {
  fill: var(--surface);
}

.plant-room-planner-valve .pipe-valve-symbol-backdrop {
  fill: var(--surface);
}

.plant-room-planner-valve .pipe-valve-body,
.plant-room-planner-valve .pipe-valve-stem,
.plant-room-planner-valve .pipe-valve-handle {
  stroke: currentColor;
}

.plant-room-planner-valve .pipe-valve-symbol-fill {
  fill: currentColor;
}

.plant-room-planner-valve .pipe-valve-inline-shape,
.plant-room-planner-valve .pipe-valve-inline-line {
  stroke-width: 1.4px;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-valve.selected {
  filter: drop-shadow(0 0 8px color-mix(in srgb, currentColor 72%, transparent));
}

html[data-theme="dark"] .plant-room-planner-status,
html[data-theme="dark"] .plant-room-tool-controls select,
html[data-theme="dark"] .plant-room-tool-controls input,
html[data-theme="dark"] .plant-room-selected-pipe-grid select,
html[data-theme="dark"] .plant-room-selected-pipe-grid input {
  background: rgba(18, 22, 31, 0.86);
}

html[data-theme="dark"] .plant-room-planner-dimensions text {
  stroke: rgba(12, 15, 22, 0.92);
}

html[data-theme="dark"] .plant-room-planner-pipe-node,
html[data-theme="dark"] .plant-room-planner-pipe-draft circle,
html[data-theme="dark"] .plant-room-planner-valve .pipe-valve-occluder,
html[data-theme="dark"] .plant-room-planner-valve .pipe-valve-symbol-backdrop {
  fill: #0b0f16;
}

.plant-room-product-list {
  max-height: min(42vh, 420px);
  overflow: auto;
  padding-right: 2px;
}

.plant-room-product-button {
  align-items: center;
  grid-template-columns: 44px minmax(0, 1fr);
}

.plant-room-open-library-button {
  align-items: center;
  border-color: rgba(0, 120, 255, 0.28);
}

.plant-room-open-library-button svg {
  height: 16px;
  margin-right: 5px;
  width: 16px;
}

.plant-room-product-button small {
  grid-column: 2;
}

.plant-room-product-thumb {
  align-items: center;
  align-self: stretch;
  background: rgba(0, 120, 255, 0.08);
  border: 1px solid rgba(0, 120, 255, 0.16);
  border-radius: 10px;
  display: flex;
  grid-row: 1 / span 2;
  justify-content: center;
  min-height: 44px;
  overflow: hidden;
}

.plant-room-product-thumb img {
  display: block;
  height: 38px;
  object-fit: contain;
  width: 38px;
}

.plant-room-product-thumb img[hidden],
.plant-room-product-thumb .plant-room-product-image-fallback[hidden] {
  display: none;
}

.plant-room-product-thumb svg {
  height: 22px;
  width: 22px;
}

.plant-room-placement-hint {
  background: rgba(0, 120, 255, 0.1);
  border: 1px dashed rgba(0, 120, 255, 0.45);
  border-radius: 10px;
  color: var(--accent) !important;
  padding: 9px;
}

.plant-room-model-picker {
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
  color: var(--text);
  display: grid;
  gap: 9px;
  max-height: min(390px, calc(100% - 76px));
  overflow: hidden;
  padding: 10px;
  position: absolute;
  right: 14px;
  top: 58px;
  width: min(290px, calc(100% - 28px));
  z-index: 14;
}

.plant-room-model-picker header {
  display: grid;
  gap: 1px;
}

.plant-room-model-picker header span {
  color: var(--accent);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.plant-room-model-picker header strong {
  font-size: 13px;
  line-height: 1.18;
}

.plant-room-model-picker label {
  align-items: center;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  border: 1px solid var(--glass-border);
  border-radius: 11px;
  display: flex;
  gap: 7px;
  min-height: 34px;
  padding: 0 9px;
}

.plant-room-model-picker label svg {
  color: var(--muted);
  height: 15px;
  width: 15px;
}

.plant-room-model-picker input {
  background: transparent;
  border: 0;
  color: var(--text);
  flex: 1;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  min-width: 0;
  outline: none;
}

.plant-room-model-picker-list {
  display: grid;
  gap: 6px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.plant-room-model-picker-list button {
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--text);
  display: grid;
  gap: 2px;
  padding: 8px;
  text-align: left;
}

.plant-room-model-picker-list button.active {
  background: rgba(0, 120, 255, 0.13);
  border-color: var(--accent);
}

.plant-room-model-picker-list strong {
  font-size: 12px;
}

.plant-room-model-picker-list span,
.plant-room-model-picker-list small,
.plant-room-model-picker-list p {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  margin: 0;
}

.plant-room-selected-equipment,
.plant-room-noise-card,
.plant-room-supporting-noise-card,
.plant-room-boiler-vent-card {
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  display: grid;
  gap: 6px;
  padding: 10px;
}

.plant-room-selected-equipment strong,
.plant-room-noise-card strong,
.plant-room-supporting-noise-card strong,
.plant-room-boiler-vent-card strong {
  color: var(--text);
  font-size: 14px;
}

.plant-room-selected-equipment span,
.plant-room-selected-equipment small,
.plant-room-noise-card span,
.plant-room-noise-card small,
.plant-room-supporting-noise-card span,
.plant-room-supporting-noise-card small,
.plant-room-boiler-vent-card span,
.plant-room-boiler-vent-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.plant-room-boiler-vent-grid {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.plant-room-boiler-vent-grid > span,
.plant-room-boiler-vent-row {
  border: 1px solid rgba(59, 130, 246, 0.16);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-solid) 84%, transparent);
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px;
}

.plant-room-boiler-vent-grid small {
  font-size: 9px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.plant-room-boiler-vent-grid strong {
  font-size: 15px;
}

.plant-room-boiler-vent-grid em,
.plant-room-boiler-vent-row em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
}

.plant-room-boiler-vent-list {
  display: grid;
  gap: 6px;
}

.plant-room-boiler-vent-row {
  align-items: center;
  grid-template-columns: minmax(0, 1fr);
}

.plant-room-boiler-vent-row span {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.plant-room-selected-equipment button {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 10px;
  color: #ef4444;
  font-weight: 900;
  justify-self: start;
  padding: 7px 10px;
}

.plant-room-selected-pipe-grid {
  display: grid;
  gap: 8px;
}

.plant-room-selected-pipe-grid label,
.plant-room-equipment-facing-control {
  display: grid;
  gap: 5px;
}

.plant-room-selected-pipe-grid label > span:first-child,
.plant-room-equipment-facing-control > span:first-child {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.plant-room-equipment-height-field {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.plant-room-equipment-height-field small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.plant-room-noise-card.pass {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.34);
}

.plant-room-noise-card.fail {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.42);
}

.plant-room-supporting-noise-card.pass {
  background: rgba(14, 165, 233, 0.1);
  border-color: rgba(14, 165, 233, 0.34);
}

.plant-room-supporting-noise-card.fail {
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.34);
}

.plant-room-supporting-noise-grid,
.plant-room-supporting-noise-list,
.plant-room-supporting-noise-evidence {
  display: grid;
  gap: 6px;
}

.plant-room-supporting-noise-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.plant-room-supporting-noise-grid > span,
.plant-room-supporting-noise-row {
  background: color-mix(in srgb, var(--surface-solid) 84%, transparent);
  border: 1px solid rgba(14, 165, 233, 0.16);
  border-radius: 9px;
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px;
}

.plant-room-supporting-noise-grid small {
  font-size: 9px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.plant-room-supporting-noise-grid strong {
  font-size: 12px;
}

.plant-room-supporting-noise-row span {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.plant-room-supporting-noise-row em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
}

.plant-room-supporting-noise-evidence small {
  border-left: 3px solid rgba(14, 165, 233, 0.42);
  padding-left: 7px;
}

.plant-room-noise-editor {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: var(--radius);
  background: var(--tile-glass);
  box-shadow: var(--glass-edge);
}

.plant-room-noise-placement-tools,
.plant-room-noise-objects {
  display: grid;
  gap: 7px;
}

.plant-room-noise-heatmap-toggle {
  margin: 0;
}

.plant-room-noise-placement-tools {
  border: 1px solid var(--blue-border);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(10, 132, 255, 0.12), rgba(10, 132, 255, 0.045));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.52);
  padding: 8px;
}

.plant-room-noise-editor strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
}

.plant-room-noise-editor > span,
.plant-room-noise-objects > span,
.plant-room-noise-placement-tools > small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.25;
}

.plant-room-noise-tool-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.plant-room-noise-tool-button {
  min-height: 40px;
  border-color: rgba(10, 132, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: #0057b8;
  font-size: 11px;
  font-weight: 850;
  padding: 0 8px;
}

.plant-room-noise-tool-button svg {
  width: 15px;
  height: 15px;
  color: #0a84ff;
}

.plant-room-noise-barrier-default {
  display: grid;
  gap: 4px;
}

.plant-room-noise-barrier-default > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.plant-room-noise-barrier-default select {
  min-height: 32px;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--input-glass);
  color: var(--text);
  font-size: 10px;
  font-weight: 650;
  padding: 0 7px;
}

.plant-room-noise-placement-actions {
  display: grid;
  grid-template-columns: 1fr;
}

.plant-room-noise-placement-actions button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--glass);
  color: var(--text);
  font-size: 10px;
  font-weight: 780;
  padding: 0 7px;
}

.plant-room-noise-placement-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.plant-room-noise-barrier-list {
  display: grid;
  gap: 5px;
}

.plant-room-noise-barrier-row {
  display: grid;
  grid-template-columns: minmax(58px, 0.55fr) minmax(0, 1fr) auto;
  gap: 5px;
  align-items: center;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.plant-room-noise-barrier-row.active {
  border-color: var(--blue-border);
  background: var(--blue-soft);
}

.plant-room-noise-barrier-row span {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plant-room-noise-barrier-row select {
  min-height: 26px;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--input-glass);
  color: var(--text);
  font-size: 10px;
  font-weight: 650;
  padding: 0 6px;
}

.plant-room-noise-barrier-row button {
  min-height: 26px;
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 4px;
  background: linear-gradient(180deg, #ffffff, #fff1f2);
  color: #b42318;
  font-size: 10px;
  font-weight: 820;
  padding: 0 7px;
}

.plant-room-noise-layer {
  pointer-events: auto;
}

.plant-room-noise-heatmap,
.plant-room-noise-heatmap * {
  pointer-events: none;
}

.plant-room-noise-heatmap {
  opacity: 0.92;
}

.plant-room-noise-heatmap-field {
  mix-blend-mode: multiply;
}

.plant-room-planner-svg.is-panning .plant-room-noise-heatmap,
.plant-room-planner-svg.is-zooming .plant-room-noise-heatmap {
  opacity: 0;
}

.plant-room-planner-svg.is-panning .plant-room-noise-heatmap-field,
.plant-room-planner-svg.is-zooming .plant-room-noise-heatmap-field {
  display: none;
}

html[data-theme="dark"] .plant-room-noise-heatmap-field {
  mix-blend-mode: screen;
}

.plant-room-noise-source,
.plant-room-noise-source *,
.plant-room-noise-path,
.plant-room-noise-path * {
  pointer-events: none;
}

.plant-room-noise-path polyline {
  fill: none;
  stroke: rgba(10, 132, 255, 0.68);
  stroke-dasharray: 8 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
  vector-effect: non-scaling-stroke;
}

.plant-room-noise-path.fail polyline {
  stroke: rgba(245, 158, 11, 0.78);
}

.plant-room-noise-path.reflected polyline {
  stroke-dasharray: 3 4;
}

.plant-room-noise-bounce {
  fill: #f59e0b;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.plant-room-noise-floor-wall {
  pointer-events: none;
  stroke: rgba(245, 158, 11, 0.7);
  stroke-linecap: round;
  stroke-width: 4;
  vector-effect: non-scaling-stroke;
}

.plant-room-noise-floor-wall.blocking {
  stroke: rgba(239, 68, 68, 0.74);
}

.plant-room-noise-floor-wall.reflecting {
  stroke: rgba(245, 158, 11, 0.86);
  stroke-dasharray: 3 3;
}

.plant-room-noise-path text,
.plant-room-noise-source text,
.plant-room-noise-receptor text,
.plant-room-noise-barrier text {
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-linejoin: round;
  stroke-width: 4px;
  fill: var(--text);
  font-size: 6px;
  font-weight: 850;
}

.plant-room-noise-source circle {
  fill: var(--blue);
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 1.8;
  vector-effect: non-scaling-stroke;
}

.plant-room-noise-receptor {
  color: var(--blue);
  cursor: grab;
  pointer-events: all;
}

.plant-room-noise-receptor * {
  pointer-events: all;
}

.plant-room-noise-receptor:active {
  cursor: grabbing;
}

.plant-room-noise-receptor-hit {
  fill: transparent !important;
  stroke: transparent !important;
}

.plant-room-noise-receptor circle {
  fill: color-mix(in srgb, var(--blue) 14%, var(--surface-solid));
  stroke: var(--blue);
  stroke-width: 1.7;
  vector-effect: non-scaling-stroke;
}

.plant-room-noise-receptor.active {
  filter: drop-shadow(0 0 7px color-mix(in srgb, var(--blue) 76%, transparent));
}

.plant-room-noise-receptor.active circle:not(.plant-room-noise-receptor-hit) {
  fill: color-mix(in srgb, var(--blue) 28%, var(--surface-solid));
  stroke-width: 2.4;
}

.plant-room-noise-receptor path {
  fill: none;
  stroke: var(--blue);
  stroke-linecap: round;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.plant-room-noise-barrier {
  color: #64748b;
  cursor: grab;
  pointer-events: all;
}

.plant-room-noise-barrier * {
  pointer-events: all;
}

.plant-room-noise-barrier:active {
  cursor: grabbing;
}

.plant-room-noise-barrier line:not(.plant-room-noise-barrier-hit) {
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 5;
  vector-effect: non-scaling-stroke;
}

.plant-room-noise-barrier-hit {
  stroke: transparent;
  stroke-linecap: round;
  stroke-width: 24;
  vector-effect: non-scaling-stroke;
}

.plant-room-noise-barrier-handle-hit {
  fill: transparent;
  stroke: transparent;
}

.plant-room-noise-barrier-handle-dot {
  fill: var(--surface-solid);
  stroke: currentColor;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.plant-room-noise-barrier-handle {
  cursor: grab;
}

.plant-room-noise-barrier.blocking {
  color: #ef4444;
}

.plant-room-noise-barrier.active {
  color: var(--blue);
}

.plant-room-noise-barrier.draft {
  color: var(--blue);
  pointer-events: none;
}

.plant-room-noise-barrier.draft line {
  stroke-dasharray: 8 6;
  stroke-width: 3;
}

.plant-room-planner-equipment {
  cursor: pointer;
  pointer-events: none;
}

.plant-room-planner-equipment .plant-room-equipment-rotation-control {
  pointer-events: all;
}

.plant-room-planner-equipment-preview-layer,
.plant-room-planner-equipment.preview {
  pointer-events: none;
}

.plant-room-planner-equipment.preview {
  opacity: 0.72;
}

.plant-room-planner-equipment.preview .plant-room-planner-equipment-card,
.plant-room-planner-equipment.preview .plant-room-planner-equipment-pump-occluder {
  fill: color-mix(in srgb, var(--blue) 12%, var(--surface-solid));
  stroke: var(--blue);
  stroke-dasharray: 6 4;
  stroke-width: 2.2;
}

.plant-room-planner-equipment.preview .plant-room-planner-equipment-footprint {
  filter: drop-shadow(0 10px 24px rgba(10, 132, 255, 0.18));
}

.plant-room-planner-equipment.preview.invalid {
  opacity: 0.58;
}

.plant-room-planner-equipment.preview.invalid .plant-room-planner-equipment-card,
.plant-room-planner-equipment.preview.invalid .plant-room-planner-equipment-pump-occluder,
.plant-room-planner-equipment.preview.invalid .plant-room-planner-equipment-pump-ring {
  fill: rgba(239, 68, 68, 0.1);
  stroke: #ef4444;
  stroke-dasharray: 4 3;
}

.plant-room-planner-clearance-layer,
.plant-room-planner-clearance {
  pointer-events: none;
}

.plant-room-planner-clearance polygon {
  fill: rgba(37, 99, 235, 0.045);
  stroke: rgba(100, 116, 139, 0.5);
  stroke-dasharray: 7 5;
  stroke-linejoin: round;
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-clearance.blocked polygon {
  fill: rgba(239, 68, 68, 0.09);
  stroke: #dc2626;
  stroke-dasharray: 3 3;
  stroke-width: 2.2;
}

.plant-room-planner-clearance.preview polygon {
  fill: rgba(239, 68, 68, 0.10);
  stroke: rgba(239, 68, 68, 0.54);
  stroke-dasharray: 4 4;
}

.plant-room-planner-clearance-warning-marker rect {
  fill: rgba(239, 68, 68, 0.1);
  stroke: rgba(239, 68, 68, 0.24);
  stroke-width: 1.25;
  filter: drop-shadow(0 4px 8px rgba(127, 29, 29, 0.12));
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-clearance-warning-marker path {
  fill: none;
  stroke: #dc2626;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-clearance-warning-marker .plant-room-planner-clearance-warning-stroke {
  stroke-width: 1.8;
}

html[data-theme="dark"] .plant-room-planner-clearance-warning-marker rect {
  fill: rgba(248, 113, 113, 0.12);
  stroke: rgba(248, 113, 113, 0.28);
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.28));
}

html[data-theme="dark"] .plant-room-planner-clearance-warning-marker path {
  stroke: #fca5a5;
}

.plant-room-planner-equipment-card {
  fill: rgba(255, 255, 255, 0.92);
  stroke: rgba(0, 120, 255, 0.3);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-equipment-hitbox {
  fill: transparent;
  cursor: pointer;
  pointer-events: all;
}

.plant-room-planner-equipment-card,
.plant-room-planner-equipment-symbol-backplate,
.plant-room-planner-equipment-symbol-outline,
.plant-room-planner-equipment-face,
.plant-room-planner-equipment-front-face,
.plant-room-planner-equipment-airflow,
.plant-room-planner-equipment-vessel-shell,
.plant-room-planner-equipment-vessel-band,
.plant-room-planner-equipment-vessel-connection,
.plant-room-planner-equipment-vessel-port,
.plant-room-planner-equipment-distribution-shell,
.plant-room-planner-equipment-distribution-centreline,
.plant-room-planner-equipment-distribution-port,
.plant-room-planner-equipment-pump-occluder,
.plant-room-planner-equipment-pump-ring,
.plant-room-planner-equipment-pump-arrow,
.plant-room-planner-equipment-inline-core,
.plant-room-planner-equipment-inline-text,
.plant-room-planner-equipment-bypass,
.plant-room-planner-equipment-bypass-line,
.plant-room-planner-equipment-isolation-valve,
.plant-room-planner-equipment-softener-media {
  pointer-events: none;
}

.plant-room-planner-equipment-footprint {
  filter: drop-shadow(0 8px 18px rgba(15, 23, 42, 0.12));
}

.plant-room-planner-equipment-symbol-backplate {
  fill: rgba(255, 255, 255, 0.96);
}

.plant-room-planner-equipment-evomax2-symbol {
  opacity: 0.9;
  pointer-events: none;
}

.plant-room-planner-evomax2-cascade-shell,
.plant-room-planner-evomax2-cascade-plan,
.plant-room-planner-evomax2-cascade-boiler,
.plant-room-planner-evomax2-cascade-module,
.plant-room-planner-evomax2-cascade-boiler-plan,
.plant-room-planner-evomax2-cascade-boiler-outline,
.plant-room-planner-evomax2-cascade-flue,
.plant-room-planner-evomax2-cascade-frame,
.plant-room-planner-evomax2-cascade-frame-rail,
.plant-room-planner-evomax2-cascade-header-rail,
.plant-room-planner-evomax2-cascade-service-end,
.plant-room-planner-evomax2-cascade-service-stem,
.plant-room-planner-evomax2-cascade-service-ring,
.plant-room-planner-evomax2-cascade-service-bracket,
.plant-room-planner-evomax2-cascade-header {
  pointer-events: none;
}

.plant-room-planner-evomax2-cascade-shell {
  fill: color-mix(in srgb, var(--surface-solid) 78%, transparent);
  stroke: color-mix(in srgb, var(--accent) 38%, var(--line-strong));
  stroke-width: 1.25;
}

.plant-room-planner-equipment.active .plant-room-planner-evomax2-cascade-shell {
  fill: color-mix(in srgb, var(--accent) 5%, var(--surface-solid));
  stroke: var(--accent);
  stroke-width: 2;
}

.plant-room-planner-evomax2-cascade-module {
  fill: color-mix(in srgb, var(--surface-solid) 88%, transparent);
  stroke: none;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-evomax2-cascade-module.standby {
  fill: color-mix(in srgb, var(--amber) 11%, var(--surface-solid));
}

.plant-room-planner-evomax2-cascade-boiler-plan {
  opacity: 0.62;
}

.plant-room-planner-evomax2-cascade-boiler-outline,
.plant-room-planner-evomax2-cascade-frame {
  fill: none;
  stroke: color-mix(in srgb, var(--text) 72%, var(--line-strong));
  stroke-linejoin: round;
  stroke-width: 1.15;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-evomax2-cascade-boiler.standby .plant-room-planner-evomax2-cascade-boiler-outline {
  stroke: color-mix(in srgb, var(--amber) 74%, var(--text));
}

.plant-room-planner-evomax2-cascade-flue,
.plant-room-planner-evomax2-cascade-service-ring {
  fill: var(--surface-solid);
  stroke: color-mix(in srgb, var(--text) 84%, var(--line-strong));
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-evomax2-cascade-flue.inner,
.plant-room-planner-evomax2-cascade-service-ring.inner {
  fill: color-mix(in srgb, var(--text) 7%, var(--surface-solid));
  stroke-width: 1;
}

.plant-room-planner-evomax2-cascade-frame {
  opacity: 0.76;
  stroke-width: 1.35;
}

.plant-room-planner-evomax2-cascade-frame-rail,
.plant-room-planner-evomax2-cascade-header-rail,
.plant-room-planner-evomax2-cascade-service-stem {
  fill: none;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-evomax2-cascade-frame-rail {
  opacity: 0.65;
  stroke: var(--text);
  stroke-width: 2.1;
}

.plant-room-planner-evomax2-cascade-header-rail {
  opacity: 0.88;
  stroke-width: 2.4;
}

.plant-room-planner-evomax2-cascade-header-rail.flow {
  stroke: var(--heat-loss);
}

.plant-room-planner-evomax2-cascade-header-rail.return {
  stroke: var(--heat-gain);
}

.plant-room-planner-evomax2-cascade-service-stem {
  stroke: color-mix(in srgb, var(--text) 82%, var(--line-strong));
  stroke-width: 2;
}

.plant-room-planner-evomax2-cascade-service-bracket {
  fill: color-mix(in srgb, var(--text) 6%, var(--surface-solid));
  stroke: color-mix(in srgb, var(--text) 76%, var(--line-strong));
  stroke-width: 1.1;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-evomax2-cascade-header {
  stroke: var(--text);
  stroke-linecap: round;
  stroke-width: 2.2;
  vector-effect: non-scaling-stroke;
}

html[data-theme="dark"] .plant-room-planner-evomax2-cascade-boiler-plan {
  filter: invert(1) brightness(1.15);
  opacity: 0.54;
}

.plant-room-planner-imax-xtra2-cascade-plan,
.plant-room-planner-imax-xtra2-cascade-shell,
.plant-room-planner-imax-xtra2-cascade-boiler,
.plant-room-planner-imax-xtra2-cascade-cabinet,
.plant-room-planner-imax-xtra2-cascade-front-fascia,
.plant-room-planner-imax-xtra2-cascade-continuation,
.plant-room-planner-imax-xtra2-cascade-header,
.plant-room-planner-imax-xtra2-cascade-pump,
.plant-room-planner-imax-xtra2-cascade-separator,
.plant-room-planner-imax-xtra2-cascade-service,
.plant-room-planner-imax-xtra2-cascade-branch {
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-imax-xtra2-cascade-shell {
  fill: color-mix(in srgb, var(--surface-solid) 82%, transparent);
  stroke: color-mix(in srgb, var(--text) 38%, var(--line-strong));
  stroke-width: 1.25;
}

.plant-room-planner-equipment.active .plant-room-planner-imax-xtra2-cascade-shell {
  fill: color-mix(in srgb, var(--accent) 5%, var(--surface-solid));
  stroke: var(--accent);
  stroke-width: 2;
}

.plant-room-planner-imax-xtra2-cascade-cabinet {
  fill: color-mix(in srgb, var(--surface-solid) 94%, var(--text) 6%);
  stroke: color-mix(in srgb, var(--text) 78%, var(--line-strong));
  stroke-width: 1.15;
}

.plant-room-planner-imax-xtra2-cascade-boiler.standby .plant-room-planner-imax-xtra2-cascade-cabinet {
  fill: color-mix(in srgb, var(--surface-solid) 88%, var(--amber) 12%);
  stroke: color-mix(in srgb, var(--amber) 72%, var(--text));
  stroke-dasharray: 4 2;
}

.plant-room-planner-imax-xtra2-cascade-front-fascia {
  fill: color-mix(in srgb, var(--text) 13%, var(--surface-solid));
  stroke: color-mix(in srgb, var(--text) 70%, var(--line-strong));
  stroke-width: 0.85;
}

.plant-room-planner-imax-xtra2-cascade-service {
  fill: var(--surface-solid);
  stroke-width: 1.1;
}

.plant-room-planner-imax-xtra2-cascade-service.flow {
  stroke: var(--heat-loss);
}

.plant-room-planner-imax-xtra2-cascade-service.return {
  stroke: var(--heat-gain);
}

.plant-room-planner-imax-xtra2-cascade-service.gas {
  stroke: #d6a800;
}

.plant-room-planner-imax-xtra2-cascade-branch {
  fill: none;
  stroke-width: 1.25;
}

.plant-room-planner-imax-xtra2-cascade-branch.flow {
  stroke: var(--heat-loss);
}

.plant-room-planner-imax-xtra2-cascade-branch.return {
  stroke: var(--heat-gain);
}

.plant-room-planner-imax-xtra2-cascade-branch.gas {
  stroke: #d6a800;
}

.plant-room-planner-imax-xtra2-cascade-continuation {
  fill: color-mix(in srgb, var(--surface-solid) 68%, transparent);
  stroke: var(--muted);
  stroke-dasharray: 5 3;
  stroke-width: 1;
}

.plant-room-planner-imax-xtra2-cascade-header rect,
.plant-room-planner-imax-xtra2-cascade-separator rect {
  fill: color-mix(in srgb, var(--surface-solid) 92%, var(--text) 8%);
  stroke: color-mix(in srgb, var(--text) 72%, var(--line-strong));
  stroke-width: 1.1;
}

.plant-room-planner-imax-xtra2-cascade-header line,
.plant-room-planner-imax-xtra2-cascade-separator path {
  fill: none;
  stroke: var(--text);
  stroke-width: 1.3;
}

.plant-room-planner-imax-xtra2-cascade-header line.flow {
  stroke: var(--heat-loss);
}

.plant-room-planner-imax-xtra2-cascade-header line.return {
  stroke: var(--heat-gain);
}

.plant-room-planner-imax-xtra2-cascade-header line.gas {
  stroke: #d6a800;
}

.plant-room-planner-imax-xtra2-cascade-separator.review rect {
  fill: color-mix(in srgb, var(--amber) 10%, var(--surface-solid));
  stroke: var(--amber);
  stroke-dasharray: 5 3;
  stroke-width: 1.5;
}

.plant-room-planner-imax-xtra2-cascade-separator.review text {
  fill: color-mix(in srgb, var(--amber) 82%, var(--text));
  font-size: 5px;
  font-weight: 950;
  letter-spacing: 0.04em;
  paint-order: stroke;
  stroke: var(--surface-solid);
  stroke-width: 1.4px;
}

.plant-room-planner-imax-xtra2-cascade-pump {
  fill: var(--surface-solid);
  stroke: var(--heat-loss);
  stroke-width: 1.3;
}

html[data-theme="dark"] .plant-room-planner-imax-xtra2-cascade-cabinet,
html[data-theme="dark"] .plant-room-planner-imax-xtra2-cascade-header rect,
html[data-theme="dark"] .plant-room-planner-imax-xtra2-cascade-separator rect {
  fill: color-mix(in srgb, var(--surface-solid) 90%, #fff 10%);
}

.plant-room-planner-equipment .plant-room-planner-equipment-symbol-outline {
  fill: none;
  stroke: rgba(0, 120, 255, 0.34);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-equipment-face {
  fill: none;
  opacity: 0.55;
  stroke: rgba(0, 120, 255, 0.34);
  stroke-linecap: round;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-equipment-front-face,
.plant-room-planner-equipment-airflow {
  fill: none;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-equipment-front-face {
  opacity: 0.88;
  stroke-width: 3;
}

.plant-room-planner-equipment-airflow {
  opacity: 0.74;
  stroke-width: 1.8;
}

.plant-room-planner-equipment-vessel-shell {
  fill: rgba(248, 250, 252, 0.96);
  stroke: rgba(0, 120, 255, 0.42);
  stroke-width: 1.8;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-equipment-vessel-band {
  fill: none;
  opacity: 0.58;
  stroke: rgba(0, 120, 255, 0.34);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-equipment-vessel-band.lower {
  opacity: 0.34;
}

.plant-room-planner-equipment-vessel-connection {
  stroke: rgba(15, 23, 42, 0.56);
  stroke-linecap: round;
  stroke-width: 2.2;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-equipment-vessel-port {
  fill: #ffffff;
  stroke: rgba(15, 23, 42, 0.58);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-equipment-vessel-connection.flow,
.plant-room-planner-equipment-vessel-port.flow {
  stroke: var(--heat-loss);
}

.plant-room-planner-equipment-vessel-connection.return,
.plant-room-planner-equipment-vessel-port.return {
  stroke: var(--heat-gain);
}

.plant-room-planner-equipment-distribution-shell {
  fill: rgba(255, 255, 255, 0.96);
  stroke: rgba(0, 120, 255, 0.42);
  stroke-width: 1.7;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-equipment-distribution-centreline {
  opacity: 0.55;
  stroke: rgba(0, 120, 255, 0.3);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-equipment-distribution-primary-stub,
.plant-room-planner-equipment-distribution-primary-port {
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-equipment-distribution-primary-stub {
  stroke-width: 1.8;
}

.plant-room-planner-equipment-distribution-primary-port {
  fill: #ffffff;
  stroke-width: 1.5;
}

.plant-room-planner-equipment-distribution-primary-stub.flow,
.plant-room-planner-equipment-distribution-primary-port.flow {
  stroke: var(--heat-loss);
}

.plant-room-planner-equipment-distribution-primary-stub.return,
.plant-room-planner-equipment-distribution-primary-port.return {
  stroke: var(--heat-gain);
}

.plant-room-planner-equipment-distribution-port {
  fill: color-mix(in srgb, var(--plant-room-distribution-port-color, var(--blue)) 24%, white);
  stroke: var(--plant-room-distribution-port-color, var(--blue));
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-equipment.active .plant-room-planner-equipment-card {
  fill: rgba(0, 120, 255, 0.14);
  stroke: var(--accent);
  stroke-width: 3;
}

.plant-room-planner-equipment-icon {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-equipment-ref,
.plant-room-planner-equipment-name,
.plant-room-planner-equipment-size,
.plant-room-planner-equipment .plant-room-planner-equipment-ref,
.plant-room-planner-equipment .plant-room-planner-equipment-name,
.plant-room-planner-equipment .plant-room-planner-equipment-size {
  fill: var(--text);
  font-size: calc(var(--plant-room-planner-label-primary-size) * var(--plant-equipment-label-scale, 1));
  font-weight: 900;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: calc(var(--plant-room-planner-label-stroke) * var(--plant-equipment-label-scale, 1));
}

.plant-room-planner-equipment-name,
.plant-room-planner-equipment .plant-room-planner-equipment-name {
  fill: var(--muted);
  font-size: calc(var(--plant-room-planner-label-secondary-size) * var(--plant-equipment-label-scale, 1));
}

.plant-room-planner-equipment-size,
.plant-room-planner-equipment .plant-room-planner-equipment-size {
  fill: var(--muted);
  font-size: var(--plant-room-planner-label-tertiary-size);
}

.plant-room-planner-equipment-pump {
  color: var(--text, #334155);
}

.plant-room-planner-equipment-pump.plant-room-planner-equipment-inline.pump {
  color: var(--plant-room-pipe-color, var(--text, #334155));
}

.plant-room-planner-pump-dimensioned .plant-room-planner-pump-connection {
  stroke: currentColor;
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.plant-room-planner-pump-dimensioned .plant-room-planner-equipment-pump-ring {
  fill: var(--surface-solid, #ffffff);
  stroke-width: 1.4;
}
.plant-room-planner-equipment.active .plant-room-planner-pump-dimensioned { color: var(--accent, #0078ff); }
.plant-room-planner-phe-plates { stroke: var(--muted, #94a3b8); stroke-width: .7; vector-effect: non-scaling-stroke; }
.plant-room-planner-phe-channels { stroke: var(--text, #334155); stroke-width: 1.1; vector-effect: non-scaling-stroke; }
.plant-room-planner-phe-plan { pointer-events: none; }
.plant-room-planner-phe-frame { stroke: var(--muted, #64748b); stroke-width: 1.25; }

.plant-room-planner-equipment-pump-occluder {
  fill: var(--surface);
  stroke: currentColor;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-equipment-pump-box {
  fill: color-mix(in srgb, currentColor 8%, var(--surface-solid));
  stroke: currentColor;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-equipment-pump-ring {
  fill: color-mix(in srgb, currentColor 14%, var(--surface));
  stroke: currentColor;
  stroke-width: 2.4;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-equipment-pump-arrow {
  fill: currentColor;
}

.plant-room-planner-equipment-inline-core {
  fill: color-mix(in srgb, currentColor 14%, var(--surface));
  stroke: currentColor;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-equipment-inline-text {
  fill: currentColor;
  font-size: 8px;
  font-weight: 950;
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 2px;
}

.plant-room-planner-equipment-bypass {
  color: var(--plant-room-pipe-color, #0a84ff);
  pointer-events: none;
}

.plant-room-planner-equipment-bypass-line {
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2.2;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-equipment-bypass-line.return {
  opacity: 0.76;
}

.plant-room-planner-equipment-isolation-valve path,
.plant-room-planner-equipment-isolation-valve line {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-equipment-softener-media {
  fill: none;
  opacity: 0.7;
  stroke: currentColor;
  stroke-dasharray: 3 3;
  stroke-linecap: round;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-equipment-pump.active {
  filter: drop-shadow(0 0 8px color-mix(in srgb, currentColor 72%, transparent));
}

html[data-theme="dark"] .plant-room-product-thumb {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .plant-room-planner-equipment-card {
  fill: rgba(15, 23, 42, 0.92);
}

html[data-theme="dark"] .plant-room-planner-clearance polygon {
  fill: rgba(96, 165, 250, 0.055);
  stroke: rgba(148, 163, 184, 0.5);
}

html[data-theme="dark"] .plant-room-planner-clearance.blocked polygon {
  fill: rgba(239, 68, 68, 0.11);
  stroke: #fca5a5;
}

html[data-theme="dark"] .plant-room-planner-equipment-ref,
html[data-theme="dark"] .plant-room-planner-equipment-name,
html[data-theme="dark"] .plant-room-planner-equipment-size {
  stroke: rgba(12, 15, 22, 0.92);
}

/* The floor-plan canvas stays on the light drawing palette even when the surrounding app is dark. */
html[data-theme="dark"] .canvas-stage .plant-room-area text {
  fill: #075985;
  stroke: rgba(255, 255, 255, 0.88);
}

html[data-theme="dark"] .canvas-stage .plant-room-node text,
html[data-theme="dark"] .canvas-stage .riser-node text {
  fill: #1d1d1f;
  stroke: rgba(255, 255, 255, 0.92);
}

html[data-theme="dark"] .canvas-stage .plant-room-node.plant-room-system-heating text,
html[data-theme="dark"] .canvas-stage .riser-node.pipe-flow text,
html[data-theme="dark"] .canvas-stage .riser-node.pipe-domestic-hot-water text {
  fill: #ef4444;
}

html[data-theme="dark"] .canvas-stage .plant-room-node.plant-room-system-cooling text,
html[data-theme="dark"] .canvas-stage .riser-node.pipe-return text,
html[data-theme="dark"] .canvas-stage .riser-node.pipe-domestic-cold-water text {
  fill: #0a84ff;
}

html[data-theme="dark"] .canvas-stage .plant-room-node.plant-room-system-public-health text,
html[data-theme="dark"] .canvas-stage .riser-node.pipe-boosted-cold-water text {
  fill: #16a34a;
}

html[data-theme="dark"] .canvas-stage .plant-room-node.plant-room-system-gas text {
  fill: #ca8a04;
}

html[data-theme="dark"] .canvas-stage .riser-node.pipe-secondary-return text {
  fill: #ea580c;
}

html[data-theme="dark"] .canvas-stage .plant-room-area-handle {
  fill: #fff;
  stroke: #0ea5e9;
}

html[data-theme="dark"] .canvas-stage .plant-room-planner-equipment-card {
  fill: rgba(255, 255, 255, 0.92);
  stroke: rgba(0, 120, 255, 0.3);
}

html[data-theme="dark"] .canvas-stage .plant-room-planner-equipment.active .plant-room-planner-equipment-card {
  fill: rgba(0, 120, 255, 0.14);
  stroke: #007aff;
}

html[data-theme="dark"] .canvas-stage .plant-room-planner-equipment-symbol-backplate {
  fill: rgba(255, 255, 255, 0.96);
}

html[data-theme="dark"] .canvas-stage .plant-room-planner-equipment-symbol-outline,
html[data-theme="dark"] .canvas-stage .plant-room-planner-equipment-face {
  stroke: rgba(0, 120, 255, 0.34);
}

html[data-theme="dark"] .canvas-stage .plant-room-planner-equipment-front-face,
html[data-theme="dark"] .canvas-stage .plant-room-planner-equipment-airflow {
  stroke: #007aff;
}

html[data-theme="dark"] .canvas-stage .plant-room-planner-equipment-footprint {
  filter: drop-shadow(0 8px 18px rgba(15, 23, 42, 0.12));
}

html[data-theme="dark"] .canvas-stage .plant-room-planner-equipment-ref,
html[data-theme="dark"] .canvas-stage .plant-room-planner-equipment-name,
html[data-theme="dark"] .canvas-stage .plant-room-planner-equipment-size {
  fill: #1d1d1f;
  stroke: rgba(255, 255, 255, 0.9);
}

html[data-theme="dark"] .canvas-stage .plant-room-planner-equipment-name,
html[data-theme="dark"] .canvas-stage .plant-room-planner-equipment-size {
  fill: #5f6368;
}

.plant-room-product-library-backdrop {
  align-items: center;
  background: rgba(15, 23, 42, 0.26);
  display: flex;
  inset: 14px;
  justify-content: center;
  position: absolute;
  z-index: 18;
}

.plant-room-product-library-panel {
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.24);
  color: var(--text);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: min(760px, calc(100% - 24px));
  overflow: hidden;
  width: min(1040px, calc(100% - 24px));
}

html[data-theme="dark"] .plant-room-product-library-panel {
  background: rgba(13, 17, 25, 0.94);
}

.plant-room-product-library-panel header {
  align-items: center;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  padding: 16px 18px;
}

.plant-room-product-library-panel header div {
  display: grid;
  gap: 2px;
}

.plant-room-product-library-panel header span,
.plant-room-product-library-panel header small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.plant-room-product-library-panel header > div > span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.plant-room-product-library-panel header strong {
  font-size: 24px;
}

.plant-room-product-library-panel header button {
  align-items: center;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  color: var(--text);
  display: flex;
  font-size: 22px;
  font-weight: 800;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.plant-room-product-library-body {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 0;
}

.plant-room-product-library-categories {
  border-right: 1px solid var(--glass-border);
  display: grid;
  gap: 6px;
  overflow: auto;
  padding: 12px;
}

.plant-room-product-library-categories button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--text);
  display: grid;
  gap: 2px;
  padding: 10px;
  text-align: left;
}

.plant-room-product-library-categories button.active {
  background: rgba(0, 120, 255, 0.13);
  border-color: rgba(0, 120, 255, 0.35);
}

.plant-room-product-library-categories span {
  font-size: 13px;
  font-weight: 900;
}

.plant-room-product-library-categories small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.plant-room-product-library-main {
  display: grid;
  gap: 12px;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  padding: 14px;
}

.plant-room-product-library-search {
  align-items: center;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  display: flex;
  gap: 8px;
  padding: 0 12px;
}

.plant-room-product-library-search svg {
  color: var(--muted);
  height: 18px;
  width: 18px;
}

.plant-room-product-library-search input {
  background: transparent;
  border: 0;
  color: var(--text);
  font: inherit;
  font-weight: 850;
  min-height: 42px;
  outline: none;
  width: 100%;
}

.plant-room-product-library-results {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  overflow: auto;
  padding-right: 2px;
}

.plant-room-product-library-card {
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  color: var(--text);
  display: grid;
  gap: 10px;
  grid-template-rows: 132px auto auto;
  min-height: 250px;
  padding: 10px;
  text-align: left;
}

html[data-theme="dark"] .plant-room-product-library-card {
  background: rgba(255, 255, 255, 0.055);
}

.plant-room-product-library-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 120, 255, 0.13);
}

.plant-room-product-library-card .product-photo {
  height: 132px;
  width: 100%;
}

.plant-room-product-library-card span {
  display: grid;
  gap: 3px;
}

.plant-room-product-library-card small,
.plant-room-product-library-card em,
.plant-room-product-library-card b {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.plant-room-product-library-card strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.12;
}

.plant-room-planner-3d-workspace {
  background: radial-gradient(circle at 50% 35%, rgba(0, 120, 255, 0.14), transparent 45%);
  height: 100%;
  min-height: 520px;
  overflow: hidden;
  position: relative;
}

.plant-room-google-earth-3d-layer {
  inset: 0;
  pointer-events: auto;
  position: absolute;
  z-index: 0;
}

.plant-room-google-earth-3d-layer gmp-map-3d {
  pointer-events: auto;
}

.plant-room-planner-3d-workspace.has-google-earth-3d {
  background: #dbeafe;
}

.plant-room-planner-3d-workspace.has-google-earth-3d .plant-room-planner-3d-canvas {
  background: transparent;
  display: none;
  opacity: 0;
  pointer-events: none;
}

.plant-room-planner-3d-workspace.has-google-earth-3d .plant-room-planner-3d-hud,
.plant-room-planner-3d-workspace.has-google-earth-3d .three-empty {
  z-index: 4;
}

.plant-room-google-earth-toggle {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  min-width: 118px;
}

.plant-room-google-earth-toggle .google-earth-logo-frame {
  max-width: 76px;
}

.plant-room-google-earth-toggle .google-earth-logo-frame img {
  display: block;
  height: 18px;
  max-width: 76px;
  object-fit: contain;
  width: auto;
}

.plant-room-google-earth-toggle .three-view-premium-badge {
  font-size: 8px;
  padding: 2px 4px;
}

.plant-room-planner-3d-canvas {
  cursor: grab;
  display: block;
  height: 100%;
  min-height: 520px;
  width: 100%;
}

.plant-room-planner-3d-canvas:active {
  cursor: grabbing;
}

.plant-room-planner-3d-hud {
  align-items: center;
  display: flex;
  gap: 8px;
  left: 18px;
  pointer-events: none;
  position: absolute;
  right: 18px;
  top: 62px;
  z-index: 3;
}

.plant-room-3d-model-warning:not([hidden]) {
  max-width: min(30rem, 80vw);
  max-height: min(12rem, 25vh);
  overflow: auto;
  padding: 0.6rem 0.75rem;
  border: 1px solid #d89d3c;
  border-radius: 0.6rem;
  background: #fff4df;
  color: #713c0a;
  font-size: 0.8rem;
  line-height: 1.4;
  pointer-events: auto;
}

.plant-room-planner-3d-hud > div {
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 2px;
  min-width: 104px;
  padding: 9px 11px;
}

.plant-room-planner-3d-hud span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.plant-room-planner-3d-hud strong {
  color: var(--text);
  font-size: 14px;
}

.plant-room-3d-empty {
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}

.plant-room-iso-building {
  height: 320px;
  perspective: 900px;
  position: relative;
  transform-style: preserve-3d;
  width: min(54vw, 620px);
}

.plant-room-iso-floor {
  background: linear-gradient(135deg, rgba(0, 120, 255, 0.16), rgba(255, 255, 255, 0.08));
  border: 2px solid rgba(0, 120, 255, 0.38);
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.22);
  inset: 90px 60px 70px;
  position: absolute;
  transform: rotateX(62deg) rotateZ(-35deg);
}

.plant-room-iso-wall {
  background: rgba(148, 163, 184, 0.22);
  border: 1px solid rgba(148, 163, 184, 0.46);
  position: absolute;
}

.plant-room-iso-wall.wall-a {
  height: 64px;
  left: 180px;
  top: 64px;
  transform: skewY(-22deg);
  width: 260px;
}

.plant-room-iso-wall.wall-b {
  height: 110px;
  left: 438px;
  top: 126px;
  transform: skewY(28deg);
  width: 74px;
}

.plant-room-iso-equipment {
  background: #fff;
  border: 2px solid rgba(0, 120, 255, 0.55);
  border-radius: 10px;
  height: 54px;
  left: 294px;
  position: absolute;
  top: 156px;
  transform: skewY(-18deg);
  width: 84px;
}

.plant-room-iso-equipment.eq-2 {
  left: 382px;
  top: 176px;
}

.plant-room-iso-equipment.eq-3 {
  left: 250px;
  top: 208px;
}

.plant-room-iso-equipment.eq-4 {
  left: 430px;
  top: 218px;
}

.plant-room-iso-pipe {
  background: #ef4444;
  border-radius: 99px;
  height: 8px;
  position: absolute;
}

.plant-room-iso-pipe.pipe-a {
  left: 214px;
  top: 220px;
  transform: rotate(-12deg);
  width: 260px;
}

.plant-room-iso-pipe.pipe-b {
  background: #0ea5e9;
  left: 242px;
  top: 238px;
  transform: rotate(-12deg);
  width: 220px;
}

.plant-room-3d-copy {
  color: var(--text);
  display: grid;
  font-weight: 800;
  gap: 6px;
  text-align: center;
}

.plant-room-3d-copy strong {
  font-size: 24px;
}

.plant-room-3d-copy span {
  color: var(--muted);
}

.workspace.plant-room-planner-workspace-shell {
  padding: 8px 0 8px 8px;
}

.plant-room-planner-shell {
  gap: 8px;
  grid-template-columns: 54px minmax(0, 1fr);
  padding: 8px 8px 8px 0;
}

.plant-room-planner-sidebar,
.plant-room-planner-canvas {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--glass-strong);
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.plant-room-planner-sidebar {
  align-content: start;
  gap: 10px;
  justify-items: center;
  overflow: visible;
  padding: 8px 6px;
  position: relative;
  scrollbar-width: none;
  -ms-overflow-style: none;
  z-index: 40;
}

.plant-room-planner-sidebar::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.plant-room-planner-canvas {
  display: grid;
  min-height: 0;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0)),
    #ebedf0;
}

.plant-room-planner-canvas.is-3d {
  padding: 8px;
}

.plant-room-planner-title {
  display: grid;
  gap: 2px;
  padding: 0 3px 4px;
}

.plant-room-planner-title span,
.plant-room-planner-list h3,
.plant-room-tool-controls span,
.plant-room-selected-pipe-grid label > span:first-child,
.plant-room-planner-status span,
.plant-room-product-library-panel header > div > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}

.plant-room-planner-title strong {
  color: var(--text);
  display: block;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.15;
}

.plant-room-planner-title small,
.plant-room-planner-list p,
.plant-room-planner-list button small,
.plant-room-node-row small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.25;
}

.plant-room-view-toggle {
  gap: 6px;
}

.plant-room-view-toggle button,
.plant-room-planner-list button,
.plant-room-node-row button,
.plant-room-product-library-categories button {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: #26344c;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.2;
  padding: 7px 8px;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.plant-room-view-toggle button,
.plant-room-tool-button,
.plant-room-tool-actions button,
.plant-room-selected-equipment button,
.plant-room-product-library-panel header button {
  border-color: rgba(255, 255, 255, 0.64);
  background: var(--button-glass);
  box-shadow: var(--glass-edge), 0 6px 14px rgba(0, 0, 0, 0.055);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.plant-room-view-toggle button.active,
.plant-room-planner-list button.active,
.plant-room-product-library-categories button.active {
  border-color: var(--blue-border);
  background: var(--blue-soft);
  color: #0057b8;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.56), 0 6px 16px rgba(0, 122, 255, 0.10);
}

.plant-room-view-toggle button:not(.active):hover,
.plant-room-planner-list button:not(.active):not(:disabled):hover,
.plant-room-node-row button:not(:disabled):hover,
.plant-room-tool-button:not(.active):not(:disabled):hover,
.plant-room-tool-actions button:not(:disabled):hover,
.plant-room-selected-equipment button:not(:disabled):hover,
.plant-room-product-library-categories button:not(.active):hover,
.plant-room-product-library-card:not(.active):hover,
.plant-room-product-library-panel header button:hover {
  border-color: var(--control-hover-border);
  background: var(--control-hover-bg);
  color: #374151;
  box-shadow: var(--control-hover-shadow);
  transform: translateY(-1px);
}

.plant-room-planner-list {
  gap: 6px;
  padding-top: 3px;
}

.plant-room-planner-list h3 {
  margin: 0;
  padding: 0 3px;
}

.plant-room-planner-list button {
  gap: 2px;
}

.plant-room-planner-list button span,
.plant-room-node-row span {
  min-width: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 780;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plant-room-node-row,
.plant-room-selected-equipment,
.plant-room-noise-card,
.plant-room-supporting-noise-card,
.plant-room-placement-hint {
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: var(--radius);
  background: var(--tile-glass);
  box-shadow: var(--glass-edge);
}

.plant-room-node-row {
  padding: 7px 8px;
}

.plant-room-node-row button {
  min-height: 28px;
  padding: 5px 7px;
  color: #ef4444;
  font-size: 11px;
}

.plant-room-planner-tools {
  border: 0;
  border-radius: 0;
  display: grid;
  justify-items: center;
  padding: 0;
  width: 100%;
}

.plant-room-tool-grid {
  gap: 7px;
  grid-template-columns: 1fr;
  justify-items: center;
}

.plant-room-tool-button {
  height: 42px;
  justify-content: center;
  min-height: 42px;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 12px;
  font-weight: 760;
  padding: 0;
  position: relative;
  width: 42px;
}

.plant-room-tool-button svg {
  width: 18px;
  height: 18px;
  color: #475569;
}

.plant-room-planner-sidebar .plant-room-tool-button span {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.plant-room-planner-sidebar .plant-room-tool-button::before,
.plant-room-planner-sidebar .plant-room-tool-button::after {
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transition: opacity 0.14s ease, transform 0.14s ease;
  z-index: 60;
}

.plant-room-planner-sidebar .plant-room-tool-button::before {
  background: var(--tooltip-arrow-bg);
  border-bottom: 1px solid var(--tooltip-border);
  border-left: 1px solid var(--tooltip-border);
  content: "";
  height: 7px;
  left: calc(100% + 4px);
  transform: translate(5px, -50%) rotate(45deg);
  width: 7px;
}

.plant-room-planner-sidebar .plant-room-tool-button::after {
  background: var(--tooltip-bg);
  border: 1px solid var(--tooltip-border);
  border-radius: 6px;
  box-sizing: border-box;
  box-shadow: var(--tooltip-shadow);
  color: var(--tooltip-text);
  content: attr(data-tooltip);
  font-size: 10.5px;
  font-weight: 780;
  left: calc(100% + 8px);
  line-height: 1.12;
  max-width: 160px;
  min-width: max-content;
  padding: 5px 8px;
  text-align: left;
  transform: translate(7px, -50%);
  white-space: nowrap;
}

.plant-room-planner-sidebar .plant-room-tool-button:hover::before,
.plant-room-planner-sidebar .plant-room-tool-button:hover::after,
.plant-room-planner-sidebar .plant-room-tool-button.show-tooltip::before,
.plant-room-planner-sidebar .plant-room-tool-button.show-tooltip::after,
.plant-room-planner-sidebar .plant-room-tool-button:focus-visible::before,
.plant-room-planner-sidebar .plant-room-tool-button:focus-visible::after {
  opacity: 1;
  transform: translate(0, -50%) rotate(45deg);
}

.plant-room-planner-sidebar .plant-room-tool-button:hover::after,
.plant-room-planner-sidebar .plant-room-tool-button.show-tooltip::after,
.plant-room-planner-sidebar .plant-room-tool-button:focus-visible::after {
  transform: translate(0, -50%);
}

.plant-room-tool-button.active,
.plant-room-tool-button.active:hover {
  border-color: var(--blue-border);
  background: var(--blue-soft);
  color: #0057b8;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.56), 0 6px 16px rgba(0, 122, 255, 0.10);
}

.plant-room-tool-controls {
  gap: 6px;
  margin-top: 8px;
}

.plant-room-tool-controls label,
.plant-room-selected-pipe-grid label,
.plant-room-equipment-facing-control {
  gap: 4px;
}

.plant-room-tool-controls select,
.plant-room-tool-controls input,
.plant-room-selected-pipe-grid select,
.plant-room-selected-pipe-grid input,
.plant-room-equipment-facing-control select,
.plant-room-equipment-facing-control input {
  min-height: 30px;
  border-color: var(--line-strong);
  border-radius: 4px;
  background: var(--input-glass);
  color: var(--text);
  font-size: 11px;
  font-weight: 650;
  padding: 0 7px;
}

.plant-room-pipe-height-field small {
  font-size: 10px;
  font-weight: 760;
  padding: 0 7px;
}

.plant-room-tool-actions {
  gap: 6px;
  margin-top: 8px;
}

.plant-room-tool-actions button,
.plant-room-selected-equipment button {
  min-height: 30px;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 11px;
  font-weight: 780;
  padding: 0 8px;
}

.plant-room-selected-equipment button {
  border-color: rgba(239, 68, 68, 0.35);
  color: #b42318;
  background: linear-gradient(180deg, #ffffff, #fff1f2);
}

.plant-room-next-pipe-spec,
.plant-room-selected-pipe-spec {
  margin-top: 8px;
}

.plant-room-selected-equipment,
.plant-room-noise-card,
.plant-room-supporting-noise-card {
  gap: 5px;
  padding: 8px;
}

.plant-room-selected-equipment strong,
.plant-room-noise-card strong,
.plant-room-supporting-noise-card strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.18;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plant-room-selected-equipment span,
.plant-room-selected-equipment small,
.plant-room-noise-card span,
.plant-room-noise-card small,
.plant-room-supporting-noise-card span,
.plant-room-supporting-noise-card small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.25;
}

.plant-room-selected-equipment > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plant-room-placement-hint {
  color: var(--blue) !important;
  font-size: 10px;
  font-weight: 760;
  line-height: 1.25;
  padding: 8px;
}

.plant-room-product-thumb {
  border-radius: var(--radius);
  min-height: 38px;
}

.plant-room-product-thumb img {
  width: 34px;
  height: 34px;
}

.plant-room-open-library-button {
  border-color: var(--blue-border) !important;
  background: var(--blue-soft) !important;
  color: #0057b8 !important;
}

.plant-room-planner-status {
  top: 14px;
  left: 14px;
  border-radius: var(--radius);
  background: var(--glass-strong);
  box-shadow: var(--glass-edge), 0 10px 22px rgba(15, 23, 42, 0.10);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.plant-room-planner-status strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
}

.plant-room-planner-canvas.is-2d .plant-room-planner-svg {
  min-height: 0;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72), 0 18px 46px rgba(0, 0, 0, 0.12);
}

.plant-room-planner-3d-workspace {
  min-height: 0;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 22% 18%, rgba(0, 122, 255, 0.16), transparent 28%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.08));
  box-shadow: var(--glass-edge), 0 20px 56px rgba(15, 23, 42, 0.14);
}

.plant-room-planner-3d-canvas {
  min-height: 0;
}

.plant-room-planner-3d-hud {
  left: 14px;
  right: 14px;
  top: 48px;
}

.plant-room-planner-3d-hud > div {
  border-radius: var(--radius);
  background: var(--glass-strong);
  box-shadow: var(--glass-edge), 0 10px 22px rgba(15, 23, 42, 0.10);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.plant-room-product-library-backdrop {
  inset: 10px;
  background: rgba(15, 23, 42, 0.26);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.plant-room-product-library-panel {
  border-radius: var(--radius);
  background: var(--glass-strong);
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.plant-room-product-library-panel header {
  padding: 12px 14px;
}

.plant-room-product-library-panel header strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.15;
}

.plant-room-product-library-panel header button {
  width: 30px;
  height: 30px;
  border-radius: var(--radius);
  font-size: 18px;
}

.plant-room-product-library-body {
  grid-template-columns: 220px minmax(0, 1fr);
}

.plant-room-product-library-categories {
  gap: 6px;
  padding: 10px;
}

.plant-room-product-library-main {
  gap: 10px;
  padding: 10px;
}

.plant-room-product-library-search {
  min-height: 34px;
  border-radius: var(--radius);
  background: var(--input-glass);
}

.plant-room-product-library-search input {
  min-height: 32px;
  font-size: 12px;
  font-weight: 650;
}

.plant-room-product-library-results {
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.plant-room-product-library-card {
  min-height: 224px;
  border-radius: var(--radius);
  background: var(--tile-glass);
  box-shadow: var(--glass-edge);
}

.plant-room-product-library-card .product-photo {
  height: 118px;
}

.plant-room-product-library-card small,
.plant-room-product-library-card em,
.plant-room-product-library-card b {
  font-size: 10px;
  font-weight: 650;
}

.plant-room-product-library-card strong {
  font-size: 13px;
  font-weight: 850;
}

html[data-theme="dark"] .plant-room-planner-sidebar,
html[data-theme="dark"] .plant-room-planner-canvas,
html[data-theme="dark"] .plant-room-product-library-panel {
  border-color: rgba(239, 246, 255, 0.16);
  background: var(--glass-strong);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .plant-room-planner-canvas {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0)),
    #101113;
}

html[data-theme="dark"] .plant-room-view-toggle button,
html[data-theme="dark"] .plant-room-tool-button,
html[data-theme="dark"] .plant-room-tool-actions button,
html[data-theme="dark"] .plant-room-selected-equipment button,
html[data-theme="dark"] .plant-room-product-library-panel header button {
  border-color: rgba(239, 246, 255, 0.14);
  background: var(--button-glass);
  color: var(--text);
}

html[data-theme="dark"] .plant-room-view-toggle button.active,
html[data-theme="dark"] .plant-room-planner-list button.active,
html[data-theme="dark"] .plant-room-tool-button.active,
html[data-theme="dark"] .plant-room-tool-button.active:hover,
html[data-theme="dark"] .plant-room-product-library-categories button.active {
  color: #dbeafe;
  border-color: var(--blue-border);
  background: linear-gradient(180deg, rgba(10, 132, 255, 0.28), rgba(10, 132, 255, 0.14));
  box-shadow: var(--glass-edge), 0 8px 20px rgba(10, 132, 255, 0.18);
}

html[data-theme="dark"] .plant-room-planner-list button,
html[data-theme="dark"] .plant-room-node-row button,
html[data-theme="dark"] .plant-room-product-library-categories button {
  color: var(--text);
}

html[data-theme="dark"] .plant-room-node-row,
html[data-theme="dark"] .plant-room-selected-equipment,
html[data-theme="dark"] .plant-room-menu-section,
html[data-theme="dark"] .plant-room-noise-card,
html[data-theme="dark"] .plant-room-supporting-noise-card,
html[data-theme="dark"] .plant-room-boiler-vent-card,
html[data-theme="dark"] .plant-room-boiler-operating-panel,
html[data-theme="dark"] .plant-room-supporting-noise-grid > span,
html[data-theme="dark"] .plant-room-supporting-noise-row,
html[data-theme="dark"] .plant-room-boiler-vent-grid > span,
html[data-theme="dark"] .plant-room-boiler-vent-row,
html[data-theme="dark"] .plant-room-placement-hint,
html[data-theme="dark"] .plant-room-product-spec-grid span,
html[data-theme="dark"] .plant-room-product-accessories,
html[data-theme="dark"] .plant-room-product-accessory-row,
html[data-theme="dark"] .lovato-distribution-zone-card,
html[data-theme="dark"] .plant-room-product-library-card {
  border-color: rgba(239, 246, 255, 0.14);
  background: linear-gradient(145deg, rgba(42, 48, 60, 0.34), rgba(16, 19, 25, 0.16));
}

html[data-theme="dark"] .plant-room-menu-section {
  border-color: rgba(234, 234, 236, 0.18);
  background:
    linear-gradient(145deg, rgba(40, 41, 45, 0.54), rgba(17, 18, 20, 0.32)),
    var(--glass-strong);
  box-shadow: var(--glass-edge), 0 12px 28px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] .plant-room-menu-section--top {
  border-color: rgba(234, 234, 236, 0.22);
  background:
    linear-gradient(145deg, rgba(48, 49, 54, 0.54), rgba(19, 20, 23, 0.34)),
    var(--glass-strong);
}

html[data-theme="dark"] .plant-room-menu-section .plant-room-selected-equipment-summary,
html[data-theme="dark"] .plant-room-menu-section .plant-room-equipment-height-control,
html[data-theme="dark"] .plant-room-menu-section .plant-room-inspector-facts div,
html[data-theme="dark"] .plant-room-menu-section .plant-room-heat-source-sizing-grid div,
html[data-theme="dark"] .plant-room-menu-section .plant-room-boiler-operating-panel,
html[data-theme="dark"] .plant-room-menu-section .plant-room-placement-hint {
  border-color: rgba(234, 234, 236, 0.13);
  background: rgba(25, 26, 29, 0.42);
}

html[data-theme="dark"] .plant-room-menu-section .plant-room-inspector-facts dd,
html[data-theme="dark"] .plant-room-menu-section .plant-room-equipment-height-control > span:first-child {
  color: var(--text);
}

html[data-theme="dark"] .plant-room-boiler-operating-status .plant-room-operating-status-pass {
  color: #86efac;
  background: rgba(22, 163, 74, 0.16);
}

html[data-theme="dark"] .plant-room-boiler-operating-status .plant-room-operating-status-review {
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.16);
}

html[data-theme="dark"] .plant-room-boiler-operating-status .plant-room-operating-status-fail {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.16);
}

html[data-theme="dark"] .plant-room-tool-controls select,
html[data-theme="dark"] .plant-room-tool-controls input,
html[data-theme="dark"] .plant-room-selected-pipe-grid select,
html[data-theme="dark"] .plant-room-selected-pipe-grid input,
html[data-theme="dark"] .plant-room-equipment-facing-control select,
html[data-theme="dark"] .plant-room-equipment-facing-control input,
html[data-theme="dark"] .lovato-distribution-main-controls select,
html[data-theme="dark"] .lovato-distribution-main-controls input,
html[data-theme="dark"] .lovato-distribution-zone-controls select,
html[data-theme="dark"] .lovato-distribution-zone-node-select select,
html[data-theme="dark"] .lovato-distribution-zone-load input,
html[data-theme="dark"] .lovato-distribution-zone-load-panel input,
html[data-theme="dark"] .lovato-distribution-zone-head select,
html[data-theme="dark"] .plant-room-noise-barrier-default select,
html[data-theme="dark"] .plant-room-product-library-search {
  border-color: rgba(239, 246, 255, 0.14);
  background: var(--input-glass);
}

html[data-theme="dark"] .plant-room-noise-placement-actions button {
  border-color: rgba(239, 246, 255, 0.14);
  background: var(--input-glass);
}

html[data-theme="dark"] .plant-room-noise-placement-tools {
  border-color: var(--blue-border);
  background: linear-gradient(180deg, rgba(10, 132, 255, 0.22), rgba(10, 132, 255, 0.08));
  box-shadow: var(--glass-edge), 0 8px 18px rgba(10, 132, 255, 0.12);
}

html[data-theme="dark"] .plant-room-noise-tool-button {
  border-color: rgba(147, 197, 253, 0.24);
  background: rgba(15, 23, 42, 0.72);
  color: #dbeafe;
}

html[data-theme="dark"] .plant-room-selected-equipment button {
  border-color: rgba(248, 113, 113, 0.34);
  background: rgba(127, 29, 29, 0.22);
  color: #fecaca;
}

html[data-theme="dark"] .plant-room-open-library-button {
  border-color: rgba(96, 165, 250, 0.28);
  background:
    linear-gradient(135deg, rgba(10, 132, 255, 0.20), rgba(34, 197, 94, 0.10)),
    rgba(15, 23, 42, 0.74);
  color: var(--text);
}

html[data-theme="dark"] .plant-room-open-library-icon {
  border-color: rgba(147, 197, 253, 0.28);
  background: rgba(10, 132, 255, 0.16);
  color: #93c5fd;
}

html[data-theme="dark"] .plant-room-open-library-arrow {
  color: #93c5fd;
}

html[data-theme="dark"] .plant-room-planner-canvas.is-2d .plant-room-planner-svg {
  border-color: rgba(239, 246, 255, 0.16);
  background: rgba(16, 17, 19, 0.92);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 24px 64px rgba(0, 0, 0, 0.32);
}

html[data-theme="dark"] .plant-room-planner-3d-workspace {
  border-color: rgba(239, 246, 255, 0.16);
  background:
    radial-gradient(circle at 22% 18%, rgba(10, 132, 255, 0.12), transparent 32%),
    linear-gradient(145deg, rgba(39, 40, 45, 0.32), rgba(6, 7, 9, 0.18));
  box-shadow: var(--glass-edge), 0 24px 64px rgba(0, 0, 0, 0.38);
}

.plant-room-pipe-floating-panel,
.plant-room-side-panel {
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
  box-shadow: var(--glass-edge), 0 18px 46px rgba(15, 23, 42, 0.16);
  color: var(--text);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
}

.plant-room-planner-selection-actions {
  align-items: center;
  background: color-mix(in srgb, var(--surface-solid) 92%, transparent);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  box-shadow: var(--glass-edge), 0 16px 42px rgba(15, 23, 42, 0.16);
  color: var(--text);
  display: flex;
  gap: 14px;
  left: 50%;
  max-width: min(680px, calc(100% - 32px));
  padding: 9px 10px 9px 12px;
  position: absolute;
  top: 14px;
  transform: translateX(-50%);
  z-index: 24;
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
}

.plant-room-planner-selection-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.plant-room-planner-selection-copy > span {
  color: var(--blue);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.plant-room-planner-selection-copy strong {
  font-size: 12.5px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plant-room-planner-selection-copy small {
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.25;
}

.plant-room-planner-selection-copy small b {
  color: var(--text);
  font-weight: 850;
}

.plant-room-planner-selection-buttons {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.plant-room-planner-selection-buttons button {
  align-items: center;
  background: var(--button-glass);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  color: var(--text);
  display: inline-flex;
  font-size: 10.5px;
  font-weight: 850;
  gap: 5px;
  min-height: 30px;
  padding: 0 9px;
}

.plant-room-planner-selection-buttons button svg {
  height: 14px;
  width: 14px;
}

.plant-room-planner-selection-buttons button:hover {
  background: var(--control-hover-bg);
  border-color: var(--control-hover-border);
}

.plant-room-planner-selection-buttons button.danger {
  background: color-mix(in srgb, var(--heat-loss) 10%, var(--button-glass));
  border-color: color-mix(in srgb, var(--heat-loss) 34%, var(--glass-border));
  color: var(--heat-loss);
}

html[data-theme="dark"] .plant-room-planner-selection-actions {
  background: rgba(17, 24, 39, 0.9);
  border-color: rgba(255, 255, 255, 0.14);
}

@media (max-width: 760px) {
  .plant-room-planner-selection-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 7px;
    left: 10px;
    max-width: calc(100% - 20px);
    right: 10px;
    transform: none;
  }

  .plant-room-planner-selection-buttons button {
    flex: 1;
    justify-content: center;
  }
}

.plant-room-pipe-floating-panel {
  display: grid;
  gap: 8px;
  left: 14px;
  max-height: calc(100% - 84px);
  overflow: auto;
  padding: 10px;
  position: absolute;
  top: 58px;
  width: min(330px, calc(100% - 28px));
  z-index: 16;
}

.plant-room-pipe-floating-panel section {
  display: grid;
  gap: 8px;
}

.plant-room-pipe-floating-panel header,
.plant-room-side-panel header {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.plant-room-pipe-floating-panel header div,
.plant-room-pipe-floating-panel header,
.plant-room-side-panel header div {
  min-width: 0;
}

.plant-room-pipe-floating-panel header span,
.plant-room-side-panel header span,
.plant-room-equipment-suggestions > strong {
  color: var(--muted);
  display: block;
  font-size: 9px;
  font-weight: 850;
  line-height: 1.2;
  text-transform: uppercase;
}

.plant-room-pipe-floating-panel header strong,
.plant-room-side-panel header strong {
  color: var(--text);
  display: block;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.15;
}

.plant-room-side-toggle-stack {
  display: flex;
  gap: 6px;
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 18;
}

.plant-room-side-toggle-stack button,
.plant-room-side-panel header button {
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: var(--radius);
  background: var(--button-glass);
  box-shadow: var(--glass-edge), 0 6px 14px rgba(0, 0, 0, 0.055);
  color: var(--text);
  display: inline-flex;
  height: 32px;
  justify-content: center;
  padding: 0;
  width: 32px;
}

.plant-room-side-toggle-stack button.active {
  border-color: var(--blue-border);
  background: var(--blue-soft);
  color: #0057b8;
}

.plant-room-right-panels {
  bottom: 14px;
  display: grid;
  gap: 10px;
  max-height: calc(100% - 72px);
  overflow: auto;
  pointer-events: none;
  position: absolute;
  right: 14px;
  top: 56px;
  width: min(360px, calc(100% - 28px));
  z-index: 17;
}

.plant-room-side-panel {
  align-content: start;
  display: grid;
  gap: 10px;
  grid-auto-rows: max-content;
  padding: 10px;
  pointer-events: auto;
}

.plant-room-side-panel > p {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.3;
  margin: 0;
}

.plant-room-equipment-suggestions {
  display: grid;
  gap: 7px;
}

.plant-room-equipment-suggestions .plant-room-product-button {
  grid-template-columns: 42px minmax(0, 1fr);
}

.plant-room-equipment-side-panel .plant-room-model-picker {
  background: color-mix(in srgb, var(--surface-solid) 82%, transparent);
  border-color: var(--line);
  box-shadow: none;
  max-height: 280px;
  position: static;
  width: 100%;
}

.plant-room-equipment-side-panel .plant-room-model-picker-list {
  max-height: 174px;
}

.plant-room-noise-status.pass {
  color: var(--green);
}

.plant-room-noise-status.fail {
  color: var(--red);
}

.plant-room-noise-card.fail {
  background: rgba(239, 68, 68, 0.10);
  border-color: rgba(239, 68, 68, 0.38);
}

.plant-room-product-library-drawer {
  align-items: stretch;
  background: transparent;
  bottom: 14px;
  inset: auto 14px 14px auto;
  justify-content: flex-end;
  pointer-events: none;
  position: absolute;
  top: 58px;
  width: min(660px, calc(100% - 28px));
  z-index: 28;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.plant-room-product-library-drawer .plant-room-product-library-panel {
  height: 100%;
  max-height: none;
  pointer-events: auto;
  width: 100%;
}

.plant-room-product-library-drawer .plant-room-product-library-body {
  grid-template-columns: 174px minmax(0, 1fr);
}

.plant-room-product-library-drawer .plant-room-product-library-results {
  grid-template-columns: 1fr;
}

.plant-room-product-library-drawer .plant-room-product-library-card {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 64px minmax(0, 1fr);
  grid-template-rows: none;
  min-height: 82px;
  padding: 9px;
}

.plant-room-product-library-card .plant-room-product-library-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.plant-room-product-library-card .plant-room-product-library-copy strong,
.plant-room-product-library-card .plant-room-product-library-copy small,
.plant-room-product-library-card .plant-room-product-library-copy em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plant-room-product-library-card .pipe-compact-spec {
  margin-top: 2px;
}

.plant-room-noise-path text,
.plant-room-noise-source text,
.plant-room-noise-receptor text,
.plant-room-noise-barrier text {
  font-size: 4px;
  stroke-width: 2.4px;
}

.plant-room-noise-layer.is-muted .plant-room-noise-source,
.plant-room-noise-layer.is-muted .plant-room-noise-receptor,
.plant-room-noise-layer.is-muted .plant-room-noise-barrier,
.plant-room-noise-layer.is-muted .plant-room-noise-floor-wall {
  opacity: 0.5;
}

html[data-theme="dark"] .plant-room-pipe-floating-panel,
html[data-theme="dark"] .plant-room-side-panel {
  border-color: rgba(239, 246, 255, 0.16);
  background: color-mix(in srgb, #16181d 88%, transparent);
  box-shadow: var(--glass-edge), 0 22px 54px rgba(0, 0, 0, 0.36);
}

html[data-theme="dark"] .plant-room-side-toggle-stack button,
html[data-theme="dark"] .plant-room-side-panel header button {
  border-color: rgba(239, 246, 255, 0.14);
  background: var(--button-glass);
  color: var(--text);
}

html[data-theme="dark"] .plant-room-side-toggle-stack button.active {
  color: #dbeafe;
  border-color: var(--blue-border);
  background: rgba(10, 132, 255, 0.22);
}

html[data-theme="dark"] .plant-room-equipment-side-panel .plant-room-model-picker {
  border-color: rgba(239, 246, 255, 0.14);
  background: rgba(24, 27, 34, 0.68);
}

html[data-theme="dark"] .plant-room-noise-card.fail {
  background: rgba(127, 29, 29, 0.24);
  border-color: rgba(248, 113, 113, 0.34);
}

.plant-room-pipe-floating-panel.room-draft-panel {
  bottom: 44px;
  left: 24px;
  right: auto;
  top: auto;
  width: min(560px, calc(100% - 64px));
  max-height: min(330px, calc(100% - 72px));
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
  color: #334155;
  font-size: 12px;
  z-index: 19;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: none;
}

.plant-room-pipe-floating-panel.room-draft-panel .product-selection-card {
  gap: 6px;
  padding: 8px;
  border-radius: 8px;
  background: var(--tile-glass);
  box-shadow: var(--glass-edge);
}

.plant-room-pipe-floating-panel.room-draft-panel :is(button, input, select, textarea, a, label, .plant-room-auto-pipe-list, .plant-room-tool-actions) {
  pointer-events: auto;
}

.plant-room-pipe-floating-panel .plant-room-pipe-draft-summary {
  gap: 6px;
}

.plant-room-pipe-floating-panel .plant-room-pipe-draft-summary strong {
  font-size: 13px;
  line-height: 1.1;
}

.plant-room-pipe-floating-panel .plant-room-pipe-draft-summary span {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 720;
  line-height: 1.15;
}

.plant-room-pipe-floating-panel .pipe-defaults-heading {
  align-items: center;
  border: 0;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 0;
}

.plant-room-pipe-floating-panel .pipe-defaults-heading span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
  line-height: 1.2;
  text-transform: none;
}

.plant-room-pipe-floating-panel .pipe-defaults-heading strong {
  color: #172033;
  font-size: 13px;
  font-weight: 820;
  line-height: 1.18;
}

.plant-room-pipe-floating-panel .plant-room-selected-pipe-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.plant-room-pipe-floating-panel .plant-room-selected-pipe-grid label:last-child {
  grid-column: 1 / -1;
}

.plant-room-pipe-floating-panel .plant-room-pipe-compact-controls {
  align-items: end;
  grid-template-columns: minmax(150px, 1.15fr) minmax(220px, 1.55fr) minmax(118px, 0.9fr);
}

.plant-room-pipe-floating-panel .plant-room-multi-pipe-controls {
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
}

.plant-room-auto-pipe-columns {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.plant-room-auto-pipe-columns > div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.plant-room-auto-pipe-columns > div > strong {
  color: #354259;
  font-size: 10.5px;
  font-weight: 820;
  letter-spacing: 0;
}

.plant-room-auto-pipe-list {
  display: grid;
  gap: 6px;
  max-height: 228px;
  overflow: auto;
  padding-right: 2px;
}

.plant-room-auto-pipe-option {
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  display: grid;
  gap: 8px;
  grid-template-columns: 18px minmax(0, 1fr);
  min-height: 46px;
  padding: 7px 8px;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.plant-room-auto-pipe-option:hover,
.plant-room-auto-pipe-option.active {
  border-color: rgba(59, 130, 246, 0.58);
  background: rgba(239, 246, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.18);
}

.plant-room-auto-pipe-option input {
  height: 16px;
  margin: 0;
  width: 16px;
}

.plant-room-auto-pipe-option span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.plant-room-auto-pipe-option strong,
.plant-room-auto-pipe-option small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plant-room-auto-pipe-option strong {
  color: #172033;
  font-size: 11px;
  font-weight: 820;
  line-height: 1.12;
}

.plant-room-auto-pipe-option small {
  color: var(--muted);
  font-size: 9.75px;
  font-weight: 760;
  line-height: 1.1;
}

.plant-room-auto-pipe-canvas-targets,
.plant-room-auto-pipe-canvas-target {
  pointer-events: none;
}

.plant-room-auto-pipe-canvas-target {
  --plant-room-auto-pipe-state: #2563eb;
  outline: none;
}

.plant-room-auto-pipe-canvas-hit {
  cursor: pointer;
  fill: rgba(37, 99, 235, 0.001);
  pointer-events: all;
  stroke: transparent;
}

.plant-room-auto-pipe-canvas-outline,
.plant-room-auto-pipe-canvas-ring {
  pointer-events: none;
  stroke: var(--plant-room-auto-pipe-state);
  vector-effect: non-scaling-stroke;
}

.plant-room-auto-pipe-canvas-outline {
  fill: none;
  opacity: 0.56;
  stroke-dasharray: 5 4;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.plant-room-auto-pipe-canvas-ring {
  fill: rgba(255, 255, 255, 0.86);
  filter: drop-shadow(0 2px 5px rgba(15, 23, 42, 0.2));
  stroke-width: 2;
}

.plant-room-auto-pipe-canvas-target:hover .plant-room-auto-pipe-canvas-outline,
.plant-room-auto-pipe-canvas-target:focus-visible .plant-room-auto-pipe-canvas-outline {
  opacity: 0.95;
  stroke-width: 2.25;
}

.plant-room-auto-pipe-canvas-target:hover .plant-room-auto-pipe-canvas-ring,
.plant-room-auto-pipe-canvas-target:focus-visible .plant-room-auto-pipe-canvas-ring {
  fill: color-mix(in srgb, var(--plant-room-auto-pipe-state) 18%, #ffffff);
  stroke-width: 2.6;
}

.plant-room-auto-pipe-source {
  --plant-room-auto-pipe-state: #2563eb;
}

.plant-room-auto-pipe-target {
  --plant-room-auto-pipe-state: #16a34a;
}

.plant-room-auto-pipe-canvas-target.plant-room-auto-pipe-source .plant-room-auto-pipe-canvas-outline,
.plant-room-auto-pipe-canvas-target.plant-room-auto-pipe-target .plant-room-auto-pipe-canvas-outline {
  opacity: 1;
  stroke-dasharray: none;
  stroke-width: 2.8;
}

.plant-room-auto-pipe-canvas-target.plant-room-auto-pipe-source .plant-room-auto-pipe-canvas-ring,
.plant-room-auto-pipe-canvas-target.plant-room-auto-pipe-target .plant-room-auto-pipe-canvas-ring {
  fill: color-mix(in srgb, var(--plant-room-auto-pipe-state) 22%, #ffffff);
  filter: drop-shadow(0 2px 7px color-mix(in srgb, var(--plant-room-auto-pipe-state) 42%, transparent));
  stroke-width: 3;
}

.plant-room-planner-equipment.plant-room-auto-pipe-source .plant-room-planner-equipment-card,
.plant-room-planner-equipment.plant-room-auto-pipe-source .plant-room-planner-equipment-symbol-outline,
.plant-room-planner-equipment.plant-room-auto-pipe-target .plant-room-planner-equipment-card,
.plant-room-planner-equipment.plant-room-auto-pipe-target .plant-room-planner-equipment-symbol-outline {
  stroke: var(--plant-room-auto-pipe-state);
  stroke-width: 2.8;
}

.canvas-stage .plant-room-planner-zone-node.plant-room-auto-pipe-source .plant-room-marker,
.canvas-stage .plant-room-planner-zone-node.plant-room-auto-pipe-target .plant-room-marker {
  filter: drop-shadow(0 0 4px var(--plant-room-auto-pipe-state));
  stroke: var(--plant-room-auto-pipe-state);
  stroke-width: 1.75;
}

.canvas-stage .plant-room-planner-zone-node.plant-room-auto-pipe-source .plant-room-halo,
.canvas-stage .plant-room-planner-zone-node.plant-room-auto-pipe-target .plant-room-halo {
  color: var(--plant-room-auto-pipe-state);
  opacity: 0.2;
}

.plant-room-pipe-floating-panel .plant-room-selected-pipe-grid label.field {
  align-items: stretch;
  display: grid;
  gap: 4px;
  grid-template-columns: 1fr;
}

.plant-room-pipe-floating-panel .plant-room-pipe-compact-controls label:last-child {
  grid-column: auto;
}

.plant-room-pipe-floating-panel .plant-room-selected-pipe-grid label > span:first-child {
  color: #354259;
  display: block;
  font-size: 10.5px;
  font-weight: 760;
  line-height: 1.1;
  text-transform: none;
}

.plant-room-pipe-floating-panel .plant-room-selected-pipe-grid select,
.plant-room-pipe-floating-panel .plant-room-selected-pipe-grid input {
  min-height: 36px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.12;
  padding: 0 26px 0 10px;
}

.plant-room-pipe-floating-panel .plant-room-pipe-height-field input {
  padding-right: 6px;
}

.plant-room-pipe-floating-panel .plant-room-pipe-height-field small {
  font-size: 10.5px;
  padding: 0 8px;
}

.plant-room-pipe-floating-panel .plant-room-tool-actions {
  justify-content: flex-end;
  margin-top: 0;
}

.plant-room-pipe-floating-panel .plant-room-tool-actions button,
.plant-room-pipe-floating-panel .plant-room-selected-equipment button {
  min-height: 26px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  padding: 0 8px;
}

.plant-room-pipe-floating-panel .plant-room-tool-actions .primary-mini:not(:disabled) {
  border-color: rgba(0, 98, 204, 0.68);
  background: linear-gradient(145deg, rgba(40, 160, 255, 0.94), rgba(0, 122, 255, 0.86));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), 0 8px 18px rgba(0, 122, 255, 0.20);
}

.plant-room-pipe-floating-panel .plant-room-tool-actions .primary-mini:not(:disabled):hover {
  border-color: rgba(0, 86, 179, 0.78);
  background: linear-gradient(145deg, rgba(65, 174, 255, 0.98), rgba(0, 110, 219, 0.90));
  color: #fff;
  box-shadow: 0 12px 28px rgba(0, 122, 255, 0.30);
}

.plant-room-valve-picker-grid {
  grid-template-columns: 1fr !important;
}

.plant-room-zone-node-menu-section {
  max-width: 360px;
}

.plant-room-zone-node-type-field {
  display: grid;
  gap: 4px;
}

.plant-room-zone-node-type-field > span {
  color: #354259;
  font-size: 10.5px;
  font-weight: 760;
  line-height: 1.1;
}

.plant-room-zone-node-type-field select {
  min-height: 36px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.12;
}

.plant-room-gas-meter-grid {
  grid-template-columns: minmax(150px, 0.8fr) minmax(240px, 1.4fr) !important;
}

.plant-room-gas-meter-facts {
  align-items: stretch;
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.plant-room-gas-meter-facts span {
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  display: grid;
  gap: 1px;
  min-height: 36px;
  padding: 6px 8px;
}

.plant-room-gas-meter-facts strong {
  color: var(--muted);
  font-size: 9px;
  font-weight: 820;
  line-height: 1;
  text-transform: uppercase;
}

.plant-room-floating-hint {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.3;
}

.plant-room-side-toggle-stack {
  gap: 6px;
  right: 14px;
  top: 14px;
}

.plant-room-side-toggle-stack button,
.plant-room-side-panel .panel-head button,
.plant-room-product-library-panel .panel-head button {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  color: #647184;
}

.plant-room-side-toggle-stack button svg,
.plant-room-side-panel .panel-head button svg,
.plant-room-product-library-panel .panel-head button svg {
  width: 14px;
  height: 14px;
}

.plant-room-right-panels {
  align-content: start;
  top: 52px;
  right: 14px;
  bottom: 14px;
  width: min(312px, calc(100% - 28px));
  max-height: calc(100% - 66px);
  gap: 8px;
  scrollbar-width: none;
}

.plant-room-right-panels::-webkit-scrollbar {
  display: none;
}

.plant-room-side-panel {
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--glass-strong);
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.plant-room-side-panel .panel-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 28px;
  justify-content: stretch;
  margin-bottom: 0;
  min-height: 48px;
  overflow: hidden;
  padding: 8px 10px;
}

.plant-room-side-panel .panel-head div,
.plant-room-product-library-panel .panel-head div {
  display: grid;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
}

.plant-room-side-panel .panel-head span,
.plant-room-side-panel .panel-head small,
.plant-room-product-library-panel .panel-head span,
.plant-room-product-library-panel .panel-head small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  line-height: 1.25;
  text-transform: none;
}

.plant-room-side-panel .panel-head strong,
.plant-room-product-library-panel .panel-head strong {
  color: var(--text);
  display: -webkit-box;
  font-size: 13px;
  font-weight: 820;
  line-height: 1.18;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.plant-room-side-panel .panel-head button,
.plant-room-product-library-panel .panel-head button {
  flex: 0 0 24px;
  justify-self: end;
  margin: 0;
}

.plant-room-selection-inspector {
  gap: 8px;
}

.plant-room-selection-inspector .field-note {
  font-size: 9.5px;
  line-height: 1.3;
  margin: 0;
}

.plant-room-gas-pressure-control {
  align-items: center;
  background: rgba(248, 250, 252, 0.82);
  border: 1px solid var(--line);
  border-radius: 7px;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) minmax(92px, 0.65fr);
  padding: 7px;
}

.plant-room-gas-pressure-control > span:first-child {
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
}

.plant-room-gas-pressure-input {
  align-items: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.plant-room-gas-pressure-input input {
  font-size: 12px;
  font-weight: 850;
  min-height: 30px;
  padding: 5px 8px;
}

.plant-room-gas-pressure-input small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  padding-left: 5px;
}

.plant-room-inspector-facts {
  gap: 5px;
  margin: 0;
}

.plant-room-inspector-facts div {
  min-height: 30px;
  padding: 6px 7px;
}

.plant-room-inspector-facts dt {
  font-size: 8.5px;
}

.plant-room-inspector-facts dd {
  font-size: 10px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plant-room-boiler-operating-panel {
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-solid) 86%, transparent);
  display: grid;
  gap: 7px;
  padding: 8px;
}

.plant-room-heat-source-sizing-grid {
  gap: 5px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1px;
}

.plant-room-heat-source-sizing-grid div {
  align-items: flex-start;
  display: grid;
  gap: 4px;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr);
  padding: 7px 8px;
  border-color: rgba(147, 197, 253, 0.28);
  background: color-mix(in srgb, var(--surface-solid) 88%, rgba(10, 132, 255, 0.08));
}

.plant-room-heat-source-sizing-grid dt {
  line-height: 1.08;
}

.plant-room-heat-source-sizing-grid dd {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
  line-height: 1.08;
}

.plant-room-boiler-operating-head {
  display: grid;
  gap: 2px;
}

.plant-room-boiler-operating-head strong {
  font-size: 11px;
  font-weight: 850;
}

.plant-room-boiler-operating-head small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

.plant-room-boiler-operating-grid {
  gap: 5px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.plant-room-boiler-operating-grid div {
  align-items: flex-start;
  gap: 6px;
  padding: 8px;
}

.plant-room-boiler-operating-grid dt {
  flex: 0 0 auto;
  max-width: 52%;
  line-height: 1.08;
}

.plant-room-boiler-operating-grid dd {
  min-width: 0;
  line-height: 1.08;
  overflow-wrap: anywhere;
  text-align: right;
  white-space: normal;
}

.plant-room-boiler-operating-status {
  align-items: stretch;
}

.plant-room-boiler-operating-status span {
  border-color: rgba(148, 163, 184, 0.22);
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.05;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.plant-room-boiler-operating-status strong {
  font-size: 9px;
  font-weight: 900;
}

.plant-room-boiler-operating-status small {
  color: inherit;
  font-size: 8px;
  font-weight: 800;
  opacity: 0.88;
}

.plant-room-boiler-operating-status .plant-room-boiler-operating-note {
  border-radius: 8px;
  flex: 1 1 100%;
  font-size: 9px;
  line-height: 1.2;
  padding: 6px 7px;
}

.plant-room-boiler-operating-status .plant-room-operating-status-pass {
  border-color: rgba(22, 163, 74, 0.28);
  background: rgba(22, 163, 74, 0.10);
  color: #15803d;
}

.plant-room-boiler-operating-status .plant-room-operating-status-review {
  border-color: rgba(245, 158, 11, 0.34);
  background: rgba(245, 158, 11, 0.13);
  color: #92400e;
}

.plant-room-boiler-operating-status .plant-room-operating-status-fail {
  border-color: rgba(239, 68, 68, 0.30);
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.plant-room-selected-equipment-summary {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 48px minmax(0, 1fr);
}

.plant-room-selected-equipment-summary .plant-room-product-thumb {
  align-items: center;
  background: rgba(10, 132, 255, 0.08);
  border: 1px solid rgba(10, 132, 255, 0.22);
  border-radius: 7px;
  display: flex;
  height: 46px;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  width: 48px;
}

.plant-room-selected-equipment-summary .plant-room-product-thumb img {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.plant-room-selected-equipment-summary > span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.plant-room-selected-equipment-summary strong,
.plant-room-selected-equipment-summary em,
.plant-room-selected-equipment-summary small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plant-room-selected-equipment-summary em {
  color: var(--text);
  font-size: 11px;
  font-style: normal;
  font-weight: 820;
  line-height: 1.15;
}

.plant-room-equipment-identity-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.plant-room-equipment-identity-fields .plant-room-equipment-facing-control {
  min-width: 0;
  margin: 0;
}

.plant-room-equipment-identity-fields input {
  width: 100%;
  min-width: 0;
}

.plant-room-selected-equipment-actions {
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr);
}

.plant-room-selected-equipment-actions .plant-room-equipment-facing-control {
  margin: 0;
}

.plant-room-selected-equipment-actions button {
  justify-self: stretch;
  width: 100%;
}

.plant-room-product-intelligence {
  display: grid;
  gap: 8px;
}

.plant-room-menu-stack {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  display: grid;
  gap: 9px !important;
  padding: 0 !important;
}

.plant-room-menu-section {
  border: 1px solid rgba(147, 197, 253, 0.45);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(248, 251, 255, 0.74)),
    color-mix(in srgb, var(--surface-solid) 90%, transparent);
  box-shadow: var(--glass-edge), 0 10px 24px rgba(15, 23, 42, 0.045);
  display: grid;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  padding: 10px;
}

.plant-room-menu-section--top {
  border-color: rgba(59, 130, 246, 0.42);
  background:
    linear-gradient(145deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.76)),
    color-mix(in srgb, var(--surface-solid) 92%, transparent);
}

.plant-room-menu-section-head {
  align-items: start;
  display: grid;
  gap: 2px;
  min-width: 0;
}

.plant-room-menu-section-head span {
  color: var(--blue) !important;
  font-size: 9.5px !important;
  font-weight: 900 !important;
  letter-spacing: 0.035em;
  line-height: 1.08 !important;
  text-transform: uppercase;
}

.plant-room-menu-section-head small {
  color: var(--muted) !important;
  font-size: 9px !important;
  font-weight: 760 !important;
  line-height: 1.2 !important;
}

.plant-room-menu-section .plant-room-selected-equipment-summary {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
  padding: 7px;
}

.plant-room-menu-section .plant-room-selected-equipment-actions {
  align-items: end;
  grid-template-columns: repeat(auto-fit, minmax(94px, 1fr));
}

.plant-room-menu-section .plant-room-selected-equipment-criteria-actions {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.plant-room-menu-section .plant-room-selected-equipment-criteria-actions .plant-room-equipment-facing-control {
  border: 1px solid rgba(148, 163, 184, 0.20);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
  padding: 7px;
}

.plant-room-menu-section .plant-room-selected-equipment-criteria-actions .plant-room-buffer-vessel-connection-control {
  grid-column: 1 / -1;
}

.plant-room-menu-section .plant-room-selected-equipment-criteria-actions .plant-room-fiorini-smart2-coil-control {
  grid-column: 1 / -1;
  min-width: 0;
}

.plant-room-fiorini-smart2-coil-control select {
  min-width: 0;
  width: 100%;
}

.plant-room-fiorini-smart2-coil-control > small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.plant-room-buffer-vessel-connection-control small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
  line-height: 1.35;
}

.plant-room-buffer-vessel-connection-control,
.plant-room-buffer-vessel-mode-control,
.plant-room-buffer-vessel-side-controls,
.plant-room-buffer-vessel-side-controls label {
  display: grid;
  gap: 6px;
}

.plant-room-buffer-vessel-mode-control > span,
.plant-room-buffer-vessel-side-controls label > span {
  color: #354259;
  font-size: 10.5px;
  font-weight: 800;
}

html[data-theme="dark"] .plant-room-buffer-vessel-mode-control > span,
html[data-theme="dark"] .plant-room-buffer-vessel-side-controls label > span {
  color: var(--muted);
}

.plant-room-buffer-vessel-side-controls {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.plant-room-buffer-vessel-connection-control small b {
  color: var(--text);
  font-weight: 900;
}

@media (max-width: 760px) {
  .plant-room-buffer-vessel-side-controls {
    grid-template-columns: 1fr;
  }
}

.plant-room-menu-section .plant-room-selected-equipment-criteria-actions .plant-room-equipment-height-control {
  grid-column: 1 / -1;
}

.plant-room-menu-section .plant-room-selected-equipment-actions button {
  min-height: 30px;
}

.plant-room-menu-section .plant-room-equipment-height-control {
  align-items: end;
  border: 1px solid rgba(148, 163, 184, 0.20);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
  display: grid;
  gap: 7px;
  grid-template-columns: minmax(0, 1fr) minmax(84px, 0.62fr);
  padding: 8px;
}

.plant-room-menu-section .plant-room-equipment-height-control > span:first-child {
  color: var(--text);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.12;
}

.plant-room-menu-section .plant-room-inspector-facts {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.plant-room-menu-section .plant-room-inspector-facts div {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-solid) 90%, transparent);
  box-shadow: var(--glass-edge);
  min-width: 0;
  padding: 7px;
}

.plant-room-menu-section .plant-room-inspector-facts dt {
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 850;
  letter-spacing: 0.025em;
  line-height: 1.05;
  text-transform: uppercase;
}

.plant-room-menu-section .plant-room-inspector-facts dd {
  color: var(--text);
  font-size: 10.5px;
  font-weight: 880;
  line-height: 1.12;
  margin: 2px 0 0;
  min-width: 0;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.plant-room-menu-section .plant-room-connected-system-groups {
  display: grid;
  gap: 8px;
}

.plant-room-menu-section .plant-room-connected-system-group {
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-solid) 92%, transparent);
  box-shadow: var(--glass-edge);
  display: grid;
  gap: 7px;
  padding: 8px;
}

.plant-room-menu-section .plant-room-connected-system-group h4 {
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  margin: 0;
}

.plant-room-menu-section .plant-room-product-intelligence,
.plant-room-menu-section .lovato-distribution-panel {
  gap: 7px;
}

.plant-room-menu-section .field-note,
.plant-room-menu-section .plant-room-placement-hint {
  margin: 0;
}

.plant-room-menu-section .plant-room-placement-hint {
  border: 1px solid rgba(10, 132, 255, 0.20);
  background: rgba(10, 132, 255, 0.08);
  box-shadow: none;
}

.plant-room-menu-section .plant-room-boiler-operating-panel {
  border-color: rgba(147, 197, 253, 0.40);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-solid) 90%, transparent);
}

.plant-room-menu-section .plant-room-boiler-operating-head strong {
  font-size: 12px;
  line-height: 1.15;
}

.plant-room-menu-section .plant-room-boiler-operating-grid div {
  display: grid;
  gap: 5px;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr);
}

.plant-room-menu-section .plant-room-boiler-operating-grid dt {
  max-width: none;
}

.plant-room-menu-section .plant-room-boiler-operating-grid dd {
  font-size: 11px;
  line-height: 1.1;
}

.plant-room-product-spec-grid {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.plant-room-product-spec-grid span,
.plant-room-product-accessories {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
  box-shadow: var(--glass-edge);
}

.plant-room-product-spec-grid span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 7px;
}

.plant-room-product-spec-grid small,
.plant-room-product-accessories-head span,
.plant-room-product-accessory-row small,
.plant-room-product-accessories p {
  color: var(--muted);
  font-size: 9px;
  font-weight: 780;
  line-height: 1.2;
}

.plant-room-product-spec-grid small,
.plant-room-product-accessories-head span {
  text-transform: uppercase;
}

.plant-room-product-spec-grid strong {
  color: var(--text);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.16;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plant-room-product-accessories {
  display: grid;
  gap: 6px;
  padding: 8px;
}

.plant-room-product-accessories-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.plant-room-product-accessories-head strong {
  align-items: center;
  background: rgba(10, 132, 255, 0.11);
  border-radius: 999px;
  color: var(--blue);
  display: inline-flex;
  font-size: 10px;
  font-weight: 900;
  justify-content: center;
  min-width: 24px;
  padding: 2px 7px;
}

.plant-room-product-accessory-row {
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.46);
  display: grid;
  gap: 7px;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  min-height: 38px;
  padding: 7px;
}

.plant-room-product-accessory-row.disabled {
  opacity: 0.62;
}

.plant-room-product-accessory-row input {
  height: 14px;
  margin: 0;
  width: 14px;
}

.plant-room-product-accessory-row span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.plant-room-product-accessory-row strong,
.plant-room-product-accessory-row small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plant-room-product-accessory-row strong {
  color: var(--text);
  font-size: 10px;
  font-weight: 850;
}

.plant-room-product-accessory-row em {
  color: var(--text);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.schematic-product-accessory-row {
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.46);
  display: grid;
  gap: 7px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 38px;
  padding: 7px;
}

.schematic-product-accessory-row span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.schematic-product-accessory-row strong,
.schematic-product-accessory-row small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schematic-product-accessory-row strong {
  color: var(--text);
  font-size: 10px;
  font-weight: 850;
}

.schematic-product-accessory-row small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 780;
  line-height: 1.2;
}

.schematic-product-accessory-row em {
  color: var(--text);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.plant-room-product-accessories p {
  margin: 0;
}

.lovato-distribution-panel {
  gap: 8px;
}

.ideal-evomax2-cascade-configurator {
  container: ideal-cascade / inline-size;
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-radius: 11px;
  background:
    linear-gradient(145deg, rgba(239, 246, 255, 0.82), rgba(255, 255, 255, 0.62)),
    color-mix(in srgb, var(--surface-solid) 90%, transparent);
  box-shadow: var(--glass-edge), 0 8px 20px rgba(15, 23, 42, 0.045);
  display: grid;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  padding: 9px;
}

.ideal-evomax2-cascade-configurator-head {
  align-items: center;
  border-bottom: 1px solid rgba(59, 130, 246, 0.16);
  display: grid;
  gap: 8px;
  grid-template-columns: 28px minmax(0, 1fr);
  min-width: 0;
  padding: 1px 1px 8px;
}

.ideal-evomax2-cascade-configurator-head > span:first-child {
  align-items: center;
  border-radius: 8px;
  background: rgba(10, 124, 255, 0.10);
  color: var(--blue);
  display: inline-flex;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.ideal-evomax2-cascade-configurator-head > span:first-child svg {
  height: 15px;
  width: 15px;
}

.ideal-evomax2-cascade-configurator-head > span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ideal-evomax2-cascade-configurator-head > span:last-child > strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.16;
}

.ideal-evomax2-cascade-configurator-head > span:last-child > small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 760;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.ideal-evomax2-cascade-controls {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(auto-fit, minmax(min(128px, 100%), 1fr));
  min-width: 0;
}

.ideal-evomax2-cascade-controls label {
  align-content: end;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-solid) 86%, transparent);
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 7px;
}

.ideal-evomax2-cascade-controls label > span {
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 850;
  letter-spacing: 0.018em;
  line-height: 1.12;
  text-transform: uppercase;
}

.ideal-evomax2-cascade-controls select,
.ideal-evomax2-cascade-controls input {
  border: 1px solid rgba(148, 163, 184, 0.30);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-solid) 94%, white 6%);
  color: var(--text);
  font: inherit;
  font-size: 10px;
  font-weight: 820;
  min-height: 30px;
  min-width: 0;
  padding: 6px 26px 6px 7px;
  width: 100%;
}

.ideal-evomax2-cascade-controls input {
  padding-right: 7px;
}

.ideal-evomax2-cascade-controls select:focus-visible,
.ideal-evomax2-cascade-controls input:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(10, 124, 255, 0.14);
  outline: 0;
}

.ideal-evomax2-cascade-controls select:disabled,
.ideal-evomax2-cascade-controls input:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.ideal-evomax2-cascade-summary {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(auto-fit, minmax(min(92px, 100%), 1fr));
  min-width: 0;
}

.ideal-evomax2-cascade-summary-card {
  border: 1px solid rgba(10, 124, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(219, 234, 254, 0.42)),
    var(--surface-solid);
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 7px;
}

.ideal-evomax2-cascade-summary-card > span,
.ideal-evomax2-cascade-summary-card > small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 850;
  line-height: 1.08;
  text-transform: uppercase;
}

.ideal-evomax2-cascade-summary-card > strong,
.ideal-evomax2-cascade-summary-card > b {
  color: var(--text);
  font-size: 10.5px;
  font-weight: 900;
  line-height: 1.16;
  min-width: 0;
  overflow-wrap: anywhere;
}

.ideal-evomax2-cascade-summary-card.is-pass {
  border-color: rgba(34, 197, 94, 0.30);
  background: rgba(34, 197, 94, 0.08);
}

.ideal-evomax2-cascade-summary-card.is-review {
  border-color: rgba(245, 158, 11, 0.34);
  background: rgba(245, 158, 11, 0.10);
}

.ideal-evomax2-cascade-dimension-note {
  border-left: 3px solid rgba(10, 124, 255, 0.34);
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 740;
  line-height: 1.34;
  margin: 0;
  padding: 2px 0 2px 8px;
}

.ideal-evomax2-cascade-schedule {
  border: 1px solid rgba(148, 163, 184, 0.20);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
  display: grid;
  min-width: 0;
  overflow: hidden;
}

.ideal-evomax2-cascade-schedule-head {
  align-items: center;
  background: rgba(10, 124, 255, 0.08);
  border-bottom: 1px solid rgba(10, 124, 255, 0.14);
  color: var(--text);
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-width: 0;
  padding: 7px 8px;
}

.ideal-evomax2-cascade-schedule-head strong {
  font-size: 10px;
  font-weight: 900;
  line-height: 1.12;
}

.ideal-evomax2-cascade-schedule-head span,
.ideal-evomax2-cascade-schedule-head small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 820;
  line-height: 1.15;
}

.ideal-evomax2-cascade-schedule-columns {
  align-items: center;
  color: var(--muted);
  display: grid;
  font-size: 7.5px;
  font-weight: 850;
  gap: 7px;
  grid-template-columns: minmax(62px, 0.62fr) minmax(0, 1.7fr) minmax(26px, auto);
  letter-spacing: 0.025em;
  padding: 5px 8px;
  text-transform: uppercase;
}

.ideal-evomax2-cascade-schedule-columns > :last-child {
  justify-self: end;
}

.ideal-evomax2-cascade-schedule-row {
  align-items: center;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  display: grid;
  gap: 7px;
  grid-template-columns: minmax(62px, 0.62fr) minmax(0, 1.7fr) minmax(26px, auto);
  min-width: 0;
  padding: 7px 8px;
}

.ideal-evomax2-cascade-schedule-head + .ideal-evomax2-cascade-schedule-row {
  border-top: 0;
}

.ideal-evomax2-cascade-schedule-row > * {
  min-width: 0;
}

.ideal-evomax2-cascade-schedule-row strong,
.ideal-evomax2-cascade-schedule-row b {
  color: var(--text);
  font-size: 9px;
  font-weight: 880;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.ideal-evomax2-cascade-schedule-row span,
.ideal-evomax2-cascade-schedule-row small {
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 760;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.ideal-evomax2-cascade-schedule-row > :last-child {
  color: var(--text);
  font-weight: 900;
  justify-self: end;
  white-space: nowrap;
}

.ideal-evomax2-cascade-schedule-row code {
  color: var(--text);
  font-size: 8.5px;
  font-weight: 820;
  overflow-wrap: anywhere;
}

.ideal-evomax2-cascade-schedule-warning {
  border: 1px solid rgba(245, 158, 11, 0.30);
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.10);
  color: #9a5a06;
  font-size: 9px;
  font-weight: 780;
  line-height: 1.32;
  margin: 0;
  overflow-wrap: anywhere;
  padding: 7px 8px;
}

.ideal-evomax2-cascade-schedule-warning svg {
  height: 13px;
  margin-right: 5px;
  vertical-align: -2px;
  width: 13px;
}

.ideal-evomax2-cascade-source {
  color: var(--muted);
  font-size: 8px;
  font-weight: 720;
  line-height: 1.3;
  margin: 0;
  overflow-wrap: anywhere;
}

.ideal-evomax2-cascade-source a {
  color: var(--blue);
  font-weight: 850;
  text-decoration: none;
}

.ideal-evomax2-cascade-source a:hover {
  text-decoration: underline;
}

@container ideal-cascade (max-width: 290px) {
  .ideal-evomax2-cascade-controls,
  .ideal-evomax2-cascade-summary {
    grid-template-columns: 1fr;
  }

  .ideal-evomax2-cascade-schedule-row {
    align-items: start;
    gap: 3px 8px;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .ideal-evomax2-cascade-schedule-columns {
    display: none;
  }

  .ideal-evomax2-cascade-schedule-row > :nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .ideal-evomax2-cascade-schedule-row > :last-child {
    grid-column: 2;
    grid-row: 1;
  }
}

html[data-theme="dark"] .ideal-evomax2-cascade-configurator {
  border-color: rgba(96, 165, 250, 0.30);
  background:
    linear-gradient(145deg, rgba(30, 64, 175, 0.20), rgba(15, 23, 42, 0.28)),
    var(--glass-strong);
  box-shadow: var(--glass-edge), 0 10px 24px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .ideal-evomax2-cascade-configurator-head,
html[data-theme="dark"] .ideal-evomax2-cascade-schedule-head {
  border-color: rgba(147, 197, 253, 0.16);
}

html[data-theme="dark"] .ideal-evomax2-cascade-controls label,
html[data-theme="dark"] .ideal-evomax2-cascade-summary-card,
html[data-theme="dark"] .ideal-evomax2-cascade-schedule {
  border-color: rgba(239, 246, 255, 0.14);
  background: rgba(15, 23, 42, 0.30);
}

html[data-theme="dark"] .ideal-evomax2-cascade-summary-card.is-pass {
  border-color: rgba(74, 222, 128, 0.30);
  background: rgba(34, 197, 94, 0.13);
}

html[data-theme="dark"] .ideal-evomax2-cascade-summary-card.is-review {
  border-color: rgba(251, 191, 36, 0.32);
  background: rgba(245, 158, 11, 0.14);
}

html[data-theme="dark"] .ideal-evomax2-cascade-controls select,
html[data-theme="dark"] .ideal-evomax2-cascade-controls input {
  border-color: rgba(239, 246, 255, 0.16);
  background: var(--input-glass);
}

html[data-theme="dark"] .ideal-evomax2-cascade-schedule-head {
  background: rgba(59, 130, 246, 0.14);
}

html[data-theme="dark"] .ideal-evomax2-cascade-schedule-row {
  border-color: rgba(239, 246, 255, 0.10);
}

html[data-theme="dark"] .ideal-evomax2-cascade-schedule-warning {
  border-color: rgba(251, 191, 36, 0.30);
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
}

.ideal-imax-xtra2-cascade-configurator {
  container: ideal-imax-cascade / inline-size;
  border: 1px solid rgba(30, 64, 175, 0.28);
  border-radius: 11px;
  background:
    linear-gradient(145deg, rgba(239, 246, 255, 0.88), rgba(248, 250, 252, 0.64)),
    color-mix(in srgb, var(--surface-solid) 90%, transparent);
  box-shadow: var(--glass-edge), 0 8px 20px rgba(15, 23, 42, 0.055);
  display: grid;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  padding: 9px;
}

.ideal-imax-xtra2-cascade-configurator-head {
  align-items: center;
  border-bottom: 1px solid rgba(30, 64, 175, 0.16);
  display: grid;
  gap: 8px;
  grid-template-columns: 28px minmax(0, 1fr);
  min-width: 0;
  padding: 1px 1px 8px;
}

.ideal-imax-xtra2-cascade-configurator-head > span:first-child {
  align-items: center;
  border-radius: 8px;
  background: rgba(30, 64, 175, 0.11);
  color: #1d4ed8;
  display: inline-flex;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.ideal-imax-xtra2-cascade-configurator-head > span:first-child svg {
  height: 15px;
  width: 15px;
}

.ideal-imax-xtra2-cascade-configurator-head > span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ideal-imax-xtra2-cascade-configurator-head strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.16;
}

.ideal-imax-xtra2-cascade-configurator-head small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 760;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.ideal-imax-xtra2-cascade-controls {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(auto-fit, minmax(min(128px, 100%), 1fr));
  min-width: 0;
}

.ideal-imax-xtra2-cascade-controls label {
  align-content: end;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-solid) 86%, transparent);
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 7px;
}

.ideal-imax-xtra2-cascade-controls label > span {
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 850;
  letter-spacing: 0.018em;
  line-height: 1.12;
  text-transform: uppercase;
}

.ideal-imax-xtra2-cascade-controls select,
.ideal-imax-xtra2-cascade-controls input {
  border: 1px solid rgba(148, 163, 184, 0.30);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-solid) 94%, white 6%);
  color: var(--text);
  font: inherit;
  font-size: 10px;
  font-weight: 820;
  min-height: 30px;
  min-width: 0;
  padding: 6px 26px 6px 7px;
  width: 100%;
}

.ideal-imax-xtra2-cascade-controls select:focus-visible,
.ideal-imax-xtra2-cascade-controls input:focus-visible {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
  outline: 0;
}

.ideal-imax-xtra2-cascade-controls select:disabled,
.ideal-imax-xtra2-cascade-controls input:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.ideal-imax-xtra2-cascade-summary {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(auto-fit, minmax(min(92px, 100%), 1fr));
  min-width: 0;
}

.ideal-imax-xtra2-cascade-summary-card {
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(219, 234, 254, 0.38)),
    var(--surface-solid);
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 7px;
}

.ideal-imax-xtra2-cascade-summary-card > small,
.ideal-imax-xtra2-cascade-summary-card > span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 850;
  line-height: 1.08;
  text-transform: uppercase;
}

.ideal-imax-xtra2-cascade-summary-card > strong,
.ideal-imax-xtra2-cascade-summary-card > b {
  color: var(--text);
  font-size: 10.5px;
  font-weight: 900;
  line-height: 1.16;
  overflow-wrap: anywhere;
}

.ideal-imax-xtra2-cascade-dimension-note {
  border-left: 3px solid rgba(37, 99, 235, 0.36);
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 740;
  line-height: 1.34;
  margin: 0;
  padding: 2px 0 2px 8px;
}

.ideal-imax-xtra2-cascade-schedule {
  border: 1px solid rgba(148, 163, 184, 0.20);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
  display: grid;
  min-width: 0;
  overflow: hidden;
}

.ideal-imax-xtra2-cascade-schedule-head {
  align-items: center;
  background: rgba(37, 99, 235, 0.08);
  border-bottom: 1px solid rgba(37, 99, 235, 0.14);
  color: var(--text);
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-width: 0;
  padding: 7px 8px;
}

.ideal-imax-xtra2-cascade-schedule-head strong {
  font-size: 10px;
  font-weight: 900;
}

.ideal-imax-xtra2-cascade-schedule-head span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 820;
}

.ideal-imax-xtra2-cascade-schedule-columns,
.ideal-imax-xtra2-cascade-schedule-row {
  align-items: center;
  display: grid;
  gap: 7px;
  grid-template-columns: minmax(62px, 0.62fr) minmax(0, 1.7fr) minmax(26px, auto);
  min-width: 0;
  padding: 6px 8px;
}

.ideal-imax-xtra2-cascade-schedule-columns {
  color: var(--muted);
  font-size: 7.5px;
  font-weight: 850;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.ideal-imax-xtra2-cascade-schedule-row {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.ideal-imax-xtra2-cascade-schedule-row > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ideal-imax-xtra2-cascade-schedule-row strong,
.ideal-imax-xtra2-cascade-schedule-row b {
  color: var(--text);
  font-size: 9px;
  font-weight: 880;
  line-height: 1.18;
}

.ideal-imax-xtra2-cascade-schedule-row small,
.ideal-imax-xtra2-cascade-schedule-row code {
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 760;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.ideal-imax-xtra2-cascade-schedule-columns > :last-child,
.ideal-imax-xtra2-cascade-schedule-row > :last-child {
  justify-self: end;
}

.ideal-imax-xtra2-cascade-schedule-warning {
  border: 1px solid rgba(245, 158, 11, 0.30);
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.10);
  color: #9a5a06;
  display: flex;
  gap: 5px;
  font-size: 9px;
  font-weight: 780;
  line-height: 1.32;
  margin: 0;
  overflow-wrap: anywhere;
  padding: 7px 8px;
}

.ideal-imax-xtra2-cascade-schedule-warning svg {
  flex: 0 0 auto;
  height: 13px;
  width: 13px;
}

.ideal-imax-xtra2-cascade-source {
  color: var(--muted);
  font-size: 8px;
  font-weight: 720;
  line-height: 1.3;
  margin: 0;
  overflow-wrap: anywhere;
}

.ideal-imax-xtra2-cascade-source a {
  color: var(--blue);
  font-weight: 850;
  text-decoration: none;
}

.ideal-imax-xtra2-cascade-source a:hover {
  text-decoration: underline;
}

@container ideal-imax-cascade (max-width: 290px) {
  .ideal-imax-xtra2-cascade-controls,
  .ideal-imax-xtra2-cascade-summary {
    grid-template-columns: 1fr;
  }

  .ideal-imax-xtra2-cascade-schedule-columns {
    display: none;
  }

  .ideal-imax-xtra2-cascade-schedule-row {
    align-items: start;
    gap: 3px 8px;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .ideal-imax-xtra2-cascade-schedule-row > :nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

html[data-theme="dark"] .ideal-imax-xtra2-cascade-configurator {
  border-color: rgba(96, 165, 250, 0.30);
  background:
    linear-gradient(145deg, rgba(30, 64, 175, 0.20), rgba(15, 23, 42, 0.28)),
    var(--glass-strong);
}

html[data-theme="dark"] .ideal-imax-xtra2-cascade-configurator-head,
html[data-theme="dark"] .ideal-imax-xtra2-cascade-schedule-head {
  border-color: rgba(147, 197, 253, 0.16);
}

html[data-theme="dark"] .ideal-imax-xtra2-cascade-controls label,
html[data-theme="dark"] .ideal-imax-xtra2-cascade-summary-card,
html[data-theme="dark"] .ideal-imax-xtra2-cascade-schedule {
  border-color: rgba(239, 246, 255, 0.14);
  background: rgba(15, 23, 42, 0.30);
}

html[data-theme="dark"] .ideal-imax-xtra2-cascade-controls select,
html[data-theme="dark"] .ideal-imax-xtra2-cascade-controls input {
  border-color: rgba(239, 246, 255, 0.16);
  background: var(--input-glass);
}

html[data-theme="dark"] .ideal-imax-xtra2-cascade-schedule-warning {
  border-color: rgba(251, 191, 36, 0.30);
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
}

/* Lovato T-FAST fresh-water station configurator */
.lovato-tfast-configurator {
  container: lovato-tfast / inline-size;
  border: 1px solid rgba(2, 132, 199, 0.26);
  border-radius: 11px;
  background:
    linear-gradient(145deg, rgba(236, 254, 255, 0.84), rgba(248, 250, 252, 0.64)),
    color-mix(in srgb, var(--surface-solid) 92%, transparent);
  box-shadow: var(--glass-edge), 0 8px 20px rgba(15, 23, 42, 0.05);
  display: grid;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  padding: 9px;
}

.lovato-tfast-configurator > header,
.lovato-tfast-configurator-head {
  align-items: center;
  border-bottom: 1px solid rgba(2, 132, 199, 0.15);
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-width: 0;
  padding: 1px 1px 8px;
}

.lovato-tfast-configurator > header > div,
.lovato-tfast-configurator-head > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.lovato-tfast-configurator > header strong,
.lovato-tfast-configurator-head strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.16;
}

.lovato-tfast-configurator > header small,
.lovato-tfast-configurator-head small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 760;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.lovato-tfast-configurator-grid {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(auto-fit, minmax(min(128px, 100%), 1fr));
  min-width: 0;
}

.lovato-tfast-configurator-grid label,
.lovato-tfast-configurator-field {
  align-content: end;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-solid) 86%, transparent);
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 7px;
}

.lovato-tfast-configurator-grid label > span,
.lovato-tfast-configurator-field > span,
.lovato-tfast-configurator legend {
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 850;
  letter-spacing: 0.018em;
  line-height: 1.12;
  text-transform: uppercase;
}

.lovato-tfast-configurator input,
.lovato-tfast-configurator select,
.lovato-tfast-configurator textarea {
  border: 1px solid rgba(148, 163, 184, 0.30);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-solid) 94%, white 6%);
  color: var(--text);
  font: inherit;
  font-size: 10px;
  font-weight: 820;
  min-height: 30px;
  min-width: 0;
  padding: 6px 7px;
  width: 100%;
}

.lovato-tfast-configurator select {
  padding-right: 26px;
}

.lovato-tfast-configurator input:focus-visible,
.lovato-tfast-configurator select:focus-visible,
.lovato-tfast-configurator textarea:focus-visible {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.14);
  outline: 0;
}

.lovato-tfast-configurator input:disabled,
.lovato-tfast-configurator select:disabled,
.lovato-tfast-configurator textarea:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.lovato-tfast-configurator input:disabled {
  background: color-mix(in srgb, var(--surface-solid) 90%, #e0f2fe 10%);
  color: var(--text);
  cursor: default;
  opacity: 0.86;
}

.lovato-tfast-unit-role {
  border-color: rgba(2, 132, 199, 0.26) !important;
}

.lovato-tfast-result-card {
  border: 1px solid rgba(2, 132, 199, 0.22);
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(207, 250, 254, 0.36)),
    var(--surface-solid);
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.045);
  display: grid;
  gap: 7px;
  min-width: 0;
  overflow: hidden;
  padding: 8px;
}

.lovato-tfast-result-card.is-review {
  border-color: rgba(245, 158, 11, 0.34);
  background: color-mix(in srgb, var(--surface-solid) 90%, var(--amber) 10%);
}

.lovato-tfast-result-card.is-unavailable,
.lovato-tfast-result-card.is-error {
  border-color: rgba(239, 68, 68, 0.34);
  background: color-mix(in srgb, var(--surface-solid) 91%, #ef4444 9%);
}

.lovato-tfast-result-hero {
  align-items: center;
  display: grid;
  gap: 9px;
  grid-template-columns: minmax(58px, 0.72fr) minmax(0, 1.55fr);
  min-width: 0;
}

.lovato-tfast-result-hero > div:not(.lovato-tfast-result-image) {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.lovato-tfast-result-hero strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 920;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.lovato-tfast-result-hero small,
.lovato-tfast-result-hero span {
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 760;
  line-height: 1.26;
  overflow-wrap: anywhere;
}

.lovato-tfast-result-image {
  align-items: center;
  aspect-ratio: 1 / 0.82;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  display: flex;
  justify-content: center;
  min-height: 54px;
  min-width: 0;
  overflow: hidden;
  padding: 5px;
}

.lovato-tfast-result-image img,
.lovato-tfast-result-image picture,
.lovato-tfast-result-image svg {
  display: block;
  height: 100%;
  max-height: 88px;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  width: 100%;
}

.lovato-tfast-result-facts {
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(auto-fit, minmax(min(84px, 100%), 1fr));
  min-width: 0;
}

.lovato-tfast-result-facts > div,
.lovato-tfast-result-fact {
  border: 1px solid rgba(2, 132, 199, 0.14);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 6px;
}

.lovato-tfast-result-facts span,
.lovato-tfast-result-facts small,
.lovato-tfast-result-fact span,
.lovato-tfast-result-fact small {
  color: var(--muted);
  font-size: 7.5px;
  font-weight: 850;
  line-height: 1.08;
  text-transform: uppercase;
}

.lovato-tfast-result-facts strong,
.lovato-tfast-result-facts b,
.lovato-tfast-result-fact strong,
.lovato-tfast-result-fact b {
  color: var(--text);
  font-size: 9.5px;
  font-weight: 900;
  line-height: 1.16;
  min-width: 0;
  overflow-wrap: anywhere;
}

.lovato-tfast-notice {
  border: 1px solid rgba(2, 132, 199, 0.24);
  border-left-width: 3px;
  border-radius: 8px;
  background: rgba(14, 165, 233, 0.08);
  color: color-mix(in srgb, var(--text) 76%, #0369a1);
  display: flex;
  gap: 6px;
  font-size: 8.5px;
  font-weight: 760;
  line-height: 1.34;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 7px 8px;
}

.lovato-tfast-notice svg {
  flex: 0 0 auto;
  height: 13px;
  width: 13px;
}

.lovato-tfast-notice.is-pass,
.lovato-tfast-notice.pass {
  border-color: rgba(34, 197, 94, 0.32);
  background: rgba(34, 197, 94, 0.09);
  color: #15803d;
}

.lovato-tfast-notice.is-review,
.lovato-tfast-notice.review {
  border-color: rgba(245, 158, 11, 0.34);
  background: rgba(245, 158, 11, 0.10);
  color: #9a5a06;
}

.lovato-tfast-notice.is-error,
.lovato-tfast-notice.error {
  border-color: rgba(239, 68, 68, 0.34);
  background: rgba(239, 68, 68, 0.09);
  color: #b91c1c;
}

.lovato-tfast-configurator a {
  color: #0284c7;
  font-weight: 850;
  text-decoration: none;
}

.lovato-tfast-configurator a:hover {
  text-decoration: underline;
}

@container lovato-tfast (max-width: 310px) {
  .lovato-tfast-configurator-grid,
  .lovato-tfast-result-facts {
    grid-template-columns: 1fr;
  }

  .lovato-tfast-result-hero {
    align-items: start;
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .lovato-tfast-result-image {
    aspect-ratio: 1;
    min-height: 52px;
    padding: 4px;
  }

  .lovato-tfast-result-image img,
  .lovato-tfast-result-image picture,
  .lovato-tfast-result-image svg {
    max-height: 54px;
  }
}

@container lovato-tfast (max-width: 220px) {
  .lovato-tfast-result-hero {
    grid-template-columns: 1fr;
  }

  .lovato-tfast-result-image {
    aspect-ratio: 2 / 1;
  }
}

html[data-theme="dark"] .lovato-tfast-configurator {
  border-color: rgba(56, 189, 248, 0.28);
  background:
    linear-gradient(145deg, rgba(8, 145, 178, 0.17), rgba(15, 23, 42, 0.28)),
    var(--glass-strong);
  box-shadow: var(--glass-edge), 0 10px 24px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .lovato-tfast-configurator > header,
html[data-theme="dark"] .lovato-tfast-configurator-head {
  border-color: rgba(125, 211, 252, 0.15);
}

html[data-theme="dark"] .lovato-tfast-configurator-grid label,
html[data-theme="dark"] .lovato-tfast-configurator-field,
html[data-theme="dark"] .lovato-tfast-result-card,
html[data-theme="dark"] .lovato-tfast-result-facts > div,
html[data-theme="dark"] .lovato-tfast-result-fact {
  border-color: rgba(239, 246, 255, 0.14);
  background: rgba(15, 23, 42, 0.30);
}

html[data-theme="dark"] .lovato-tfast-configurator input,
html[data-theme="dark"] .lovato-tfast-configurator select,
html[data-theme="dark"] .lovato-tfast-configurator textarea {
  border-color: rgba(239, 246, 255, 0.16);
  background: var(--input-glass);
}

html[data-theme="dark"] .lovato-tfast-result-image {
  border-color: rgba(239, 246, 255, 0.13);
  background: rgba(248, 250, 252, 0.9);
}

html[data-theme="dark"] .lovato-tfast-notice.is-pass,
html[data-theme="dark"] .lovato-tfast-notice.pass {
  color: #86efac;
}

html[data-theme="dark"] .lovato-tfast-notice.is-review,
html[data-theme="dark"] .lovato-tfast-notice.review {
  color: #fcd34d;
}

html[data-theme="dark"] .lovato-tfast-notice.is-error,
html[data-theme="dark"] .lovato-tfast-notice.error {
  color: #fca5a5;
}

/* T-FAST plan symbol: service classes intentionally mirror pipework colours. */
.plant-room-planner-lovato-tfast-plan,
.plant-room-planner-lovato-tfast-plan * {
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

.plant-room-planner-lovato-tfast-plan .shell {
  fill: color-mix(in srgb, var(--surface-solid) 94%, #e0f2fe 6%);
  stroke: color-mix(in srgb, #0284c7 58%, var(--line-strong));
  stroke-linejoin: round;
  stroke-width: 1.35;
}

.plant-room-planner-equipment.active .plant-room-planner-lovato-tfast-plan .shell,
.plant-room-planner-lovato-tfast-plan.active .shell {
  fill: color-mix(in srgb, #0ea5e9 7%, var(--surface-solid));
  stroke: #0284c7;
  stroke-width: 2;
}

.plant-room-planner-lovato-tfast-plan .plate {
  fill: color-mix(in srgb, var(--text) 5%, var(--surface-solid));
  stroke: color-mix(in srgb, var(--text) 58%, var(--line-strong));
  stroke-width: 0.95;
}

.plant-room-planner-lovato-tfast-plan .plate + .plate {
  opacity: 0.78;
}

.plant-room-planner-lovato-tfast-plan .pump {
  fill: var(--surface-solid);
  stroke: #0284c7;
  stroke-width: 1.35;
}

.plant-room-planner-lovato-tfast-plan .pump-arrow,
.plant-room-planner-lovato-tfast-plan .detail {
  fill: none;
  stroke: color-mix(in srgb, var(--text) 72%, var(--line-strong));
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.05;
}

.plant-room-planner-lovato-tfast-plan .pipe {
  fill: none;
  stroke: color-mix(in srgb, var(--text) 72%, var(--line-strong));
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}

.plant-room-planner-lovato-tfast-plan .port {
  fill: var(--surface-solid);
  stroke: color-mix(in srgb, var(--text) 72%, var(--line-strong));
  stroke-width: 1.25;
}

.plant-room-planner-lovato-tfast-plan .pipe.flow,
.plant-room-planner-lovato-tfast-plan .pipe.pipe-flow,
.plant-room-planner-lovato-tfast-plan .pipe.primary-flow,
.plant-room-planner-lovato-tfast-plan .port.flow,
.plant-room-planner-lovato-tfast-plan .port.pipe-flow,
.plant-room-planner-lovato-tfast-plan .port.primary-flow {
  stroke: var(--heat-loss);
}

.plant-room-planner-lovato-tfast-plan .pipe.return,
.plant-room-planner-lovato-tfast-plan .pipe.pipe-return,
.plant-room-planner-lovato-tfast-plan .pipe.primary-return,
.plant-room-planner-lovato-tfast-plan .port.return,
.plant-room-planner-lovato-tfast-plan .port.pipe-return,
.plant-room-planner-lovato-tfast-plan .port.primary-return {
  stroke: var(--heat-gain);
}

.plant-room-planner-lovato-tfast-plan .pipe.domestic-hot-water,
.plant-room-planner-lovato-tfast-plan .pipe.pipe-domestic-hot-water,
.plant-room-planner-lovato-tfast-plan .pipe.dhw,
.plant-room-planner-lovato-tfast-plan .port.domestic-hot-water,
.plant-room-planner-lovato-tfast-plan .port.pipe-domestic-hot-water,
.plant-room-planner-lovato-tfast-plan .port.dhw {
  stroke: #ef4444;
}

.plant-room-planner-lovato-tfast-plan .pipe.domestic-cold-water,
.plant-room-planner-lovato-tfast-plan .pipe.pipe-domestic-cold-water,
.plant-room-planner-lovato-tfast-plan .pipe.dcw,
.plant-room-planner-lovato-tfast-plan .port.domestic-cold-water,
.plant-room-planner-lovato-tfast-plan .port.pipe-domestic-cold-water,
.plant-room-planner-lovato-tfast-plan .port.dcw {
  stroke: #0a84ff;
}

.plant-room-planner-lovato-tfast-plan .pipe.secondary-return,
.plant-room-planner-lovato-tfast-plan .pipe.pipe-secondary-return,
.plant-room-planner-lovato-tfast-plan .pipe.sr,
.plant-room-planner-lovato-tfast-plan .port.secondary-return,
.plant-room-planner-lovato-tfast-plan .port.pipe-secondary-return,
.plant-room-planner-lovato-tfast-plan .port.sr {
  stroke: #f97316;
}

.plant-room-planner-lovato-tfast-plan text {
  fill: var(--text);
  font-size: 6px;
  font-weight: 900;
  paint-order: stroke fill;
  stroke: var(--surface-solid);
  stroke-width: 1.3px;
}

html[data-theme="dark"] .plant-room-planner-lovato-tfast-plan .shell,
html[data-theme="dark"] .plant-room-planner-lovato-tfast-plan .plate {
  fill: color-mix(in srgb, var(--surface-solid) 90%, #fff 10%);
}

/* T-FAST schematic symbol */
.schematic-lovato-tfast-symbol,
.schematic-lovato-tfast-symbol * {
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

.schematic-lovato-tfast-symbol {
  color: var(--text);
  filter: drop-shadow(0 3px 6px rgba(15, 23, 42, 0.10));
}

.schematic-lovato-tfast-symbol .shell {
  fill: color-mix(in srgb, var(--surface-solid) 96%, #e0f2fe 4%);
  stroke: color-mix(in srgb, #0284c7 60%, var(--line-strong));
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.schematic-placement.selected .schematic-lovato-tfast-symbol .shell,
.schematic-lovato-tfast-symbol.selected .shell {
  fill: color-mix(in srgb, #0ea5e9 7%, var(--surface-solid));
  stroke: #0284c7;
  stroke-width: 2;
}

.schematic-lovato-tfast-symbol .plate {
  fill: color-mix(in srgb, var(--text) 4%, var(--surface-solid));
  stroke: color-mix(in srgb, var(--text) 64%, var(--line-strong));
  stroke-width: 0.9;
}

.schematic-lovato-tfast-symbol .pump {
  fill: var(--surface-solid);
  stroke: #0284c7;
  stroke-width: 1.35;
}

.schematic-lovato-tfast-symbol .pump-arrow,
.schematic-lovato-tfast-symbol .detail {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1;
}

.schematic-lovato-tfast-symbol .pipe {
  fill: none;
  stroke: color-mix(in srgb, var(--text) 78%, var(--line-strong));
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.schematic-lovato-tfast-symbol .port {
  fill: var(--surface-solid);
  stroke: color-mix(in srgb, var(--text) 78%, var(--line-strong));
  stroke-width: 1.35;
}

.schematic-lovato-tfast-symbol .pipe.flow,
.schematic-lovato-tfast-symbol .pipe.pipe-flow,
.schematic-lovato-tfast-symbol .pipe.primary-flow,
.schematic-lovato-tfast-symbol .port.flow,
.schematic-lovato-tfast-symbol .port.pipe-flow,
.schematic-lovato-tfast-symbol .port.primary-flow {
  stroke: var(--heat-loss);
}

.schematic-lovato-tfast-symbol .pipe.return,
.schematic-lovato-tfast-symbol .pipe.pipe-return,
.schematic-lovato-tfast-symbol .pipe.primary-return,
.schematic-lovato-tfast-symbol .port.return,
.schematic-lovato-tfast-symbol .port.pipe-return,
.schematic-lovato-tfast-symbol .port.primary-return {
  stroke: var(--heat-gain);
}

.schematic-lovato-tfast-symbol .pipe.domestic-hot-water,
.schematic-lovato-tfast-symbol .pipe.pipe-domestic-hot-water,
.schematic-lovato-tfast-symbol .pipe.dhw,
.schematic-lovato-tfast-symbol .port.domestic-hot-water,
.schematic-lovato-tfast-symbol .port.pipe-domestic-hot-water,
.schematic-lovato-tfast-symbol .port.dhw {
  stroke: #ef4444;
}

.schematic-lovato-tfast-symbol .pipe.domestic-cold-water,
.schematic-lovato-tfast-symbol .pipe.pipe-domestic-cold-water,
.schematic-lovato-tfast-symbol .pipe.dcw,
.schematic-lovato-tfast-symbol .port.domestic-cold-water,
.schematic-lovato-tfast-symbol .port.pipe-domestic-cold-water,
.schematic-lovato-tfast-symbol .port.dcw {
  stroke: #0a84ff;
}

.schematic-lovato-tfast-symbol .pipe.secondary-return,
.schematic-lovato-tfast-symbol .pipe.pipe-secondary-return,
.schematic-lovato-tfast-symbol .pipe.sr,
.schematic-lovato-tfast-symbol .port.secondary-return,
.schematic-lovato-tfast-symbol .port.pipe-secondary-return,
.schematic-lovato-tfast-symbol .port.sr {
  stroke: #f97316;
}

.schematic-lovato-tfast-symbol text {
  fill: var(--text);
  font-weight: 900;
  paint-order: stroke fill;
  stroke: var(--surface-solid);
  stroke-width: 1.6px;
}

html[data-theme="dark"] .schematic-lovato-tfast-symbol .shell,
html[data-theme="dark"] .schematic-lovato-tfast-symbol .plate {
  fill: color-mix(in srgb, var(--surface-solid) 90%, #fff 10%);
}

.lovato-distribution-status.pass {
  background: rgba(34, 197, 94, 0.13);
  color: #15803d;
}

.lovato-distribution-status.review {
  background: rgba(245, 158, 11, 0.13);
  color: #b45309;
}

.lovato-distribution-main-controls,
.lovato-distribution-zone-controls {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lovato-distribution-main-controls label,
.lovato-distribution-zone-controls label,
.lovato-distribution-zone-node-select {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.lovato-distribution-main-controls span,
.lovato-distribution-zone-controls span,
.lovato-distribution-zone-node-select span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 820;
  text-transform: uppercase;
}

.lovato-distribution-main-controls select,
.lovato-distribution-main-controls input,
.lovato-distribution-zone-controls select,
.lovato-distribution-zone-node-select select,
.lovato-distribution-zone-load input,
.lovato-distribution-zone-load-panel input,
.lovato-distribution-zone-head select {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-solid) 92%, white 8%);
  color: var(--text);
  font-size: 10px;
  font-weight: 820;
  min-width: 0;
  padding: 6px 7px;
  width: 100%;
}

.lovato-distribution-zone-node-select {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-solid) 78%, transparent);
  margin: 2px 0;
  padding: 7px;
}

.lovato-distribution-zone-linked-node {
  border: 1px solid rgba(10, 132, 255, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(10, 132, 255, 0.11), rgba(255, 255, 255, 0.5)),
    var(--surface-solid);
  display: grid;
  gap: 2px;
  padding: 7px 9px;
}

.lovato-distribution-zone-linked-node span {
  color: var(--blue);
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.lovato-distribution-zone-linked-node strong {
  color: var(--text);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.15;
}

.lovato-distribution-zone-linked-node small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 780;
  line-height: 1.25;
}

.lovato-distribution-zone-node-select small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 760;
  line-height: 1.25;
}

.lovato-distribution-node-suggestions {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 7px;
  display: grid;
  gap: 4px;
  padding: 7px;
}

.lovato-distribution-node-suggestions > span,
.lovato-distribution-zone-load > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 820;
  text-transform: uppercase;
}

.lovato-distribution-node-suggestions div {
  display: grid;
  gap: 2px;
}

.lovato-distribution-node-suggestions small {
  color: var(--text);
  font-size: 9px;
  font-weight: 760;
}

.lovato-distribution-zone-load {
  align-items: end;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) 52px auto;
}

.lovato-distribution-zone-load small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 820;
  padding-bottom: 7px;
}

.lovato-distribution-zone-load input:disabled {
  border-color: rgba(148, 163, 184, 0.22);
  background:
    linear-gradient(135deg, rgba(226, 232, 240, 0.76), rgba(248, 250, 252, 0.66)),
    var(--surface-solid);
  color: color-mix(in srgb, var(--text) 62%, var(--muted) 38%);
  cursor: not-allowed;
}

.lovato-distribution-zone-load-panel {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 9px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(248, 250, 252, 0.48)),
    var(--surface-solid);
  display: grid;
  gap: 7px;
  padding: 8px;
}

.lovato-distribution-zone-load-panel.is-locked {
  border-color: rgba(10, 132, 255, 0.22);
  background:
    linear-gradient(145deg, rgba(10, 132, 255, 0.08), rgba(255, 255, 255, 0.56)),
    var(--surface-solid);
}

.lovato-distribution-zone-load-top {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) minmax(96px, 128px);
}

.lovato-distribution-zone-load-top > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  line-height: 1.1;
  text-transform: uppercase;
}

.lovato-distribution-zone-load-top label {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 0;
  min-width: 0;
}

.lovato-distribution-zone-load-top small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  white-space: nowrap;
}

.lovato-distribution-zone-load-panel input:disabled {
  border-color: rgba(10, 132, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(226, 232, 240, 0.76), rgba(248, 250, 252, 0.7)),
    var(--surface-solid);
  color: color-mix(in srgb, var(--text) 70%, var(--muted) 30%);
  cursor: not-allowed;
}

.lovato-distribution-zone-metrics {
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lovato-distribution-zone-metrics span {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.54);
  display: grid;
  gap: 1px;
  min-width: 0;
  padding: 6px 7px;
}

.lovato-distribution-zone-metrics strong,
.lovato-distribution-zone-metrics small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lovato-distribution-zone-metrics strong {
  color: var(--text);
  font-size: 10px;
  font-weight: 900;
}

.lovato-distribution-zone-metrics small {
  color: var(--muted);
  font-size: 7.5px;
  font-weight: 820;
  text-transform: uppercase;
}

.lovato-distribution-zone-list {
  display: grid;
  gap: 7px;
}

.lovato-distribution-zone-card {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.46);
  display: grid;
  gap: 6px;
  padding: 7px;
}

.lovato-distribution-zone-card.is-assigned {
  border-color: rgba(10, 132, 255, 0.28);
  background:
    linear-gradient(145deg, rgba(10, 132, 255, 0.06), rgba(255, 255, 255, 0.58)),
    var(--surface-solid);
  box-shadow: inset 3px 0 0 rgba(10, 132, 255, 0.58);
}

.lovato-distribution-zone-card.is-over-limit {
  border-color: rgba(239, 68, 68, 0.52);
  background:
    linear-gradient(135deg, rgba(254, 242, 242, 0.92), rgba(255, 255, 255, 0.54)),
    var(--surface-solid);
  box-shadow: inset 3px 0 0 rgba(239, 68, 68, 0.82);
}

.lovato-distribution-zone-head {
  align-items: start;
  display: grid;
  gap: 7px;
  grid-template-columns: minmax(0, 1fr) minmax(96px, 0.65fr);
}

.lovato-distribution-zone-head span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.lovato-distribution-zone-head strong,
.lovato-distribution-zone-head small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lovato-distribution-zone-head strong {
  color: var(--text);
  font-size: 10px;
  font-weight: 880;
}

.lovato-distribution-zone-head small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 780;
}

.lovato-distribution-zone-capacity {
  align-items: center;
  border: 1px solid rgba(34, 197, 94, 0.24);
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.09);
  color: #15803d;
  display: grid;
  gap: 1px 8px;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 6px 9px;
}

.lovato-distribution-zone-capacity span {
  align-self: center;
  color: inherit;
  font-size: 8px;
  font-weight: 880;
  grid-row: 1 / span 2;
  letter-spacing: 0;
  text-transform: uppercase;
}

.lovato-distribution-zone-capacity strong,
.lovato-distribution-zone-capacity small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lovato-distribution-zone-capacity strong {
  color: inherit;
  font-size: 10px;
  font-weight: 900;
}

.lovato-distribution-zone-capacity small {
  color: color-mix(in srgb, currentColor 70%, var(--muted) 30%);
  font-size: 8px;
  font-weight: 780;
}

.lovato-distribution-zone-capacity.is-over-limit {
  border-color: rgba(239, 68, 68, 0.34);
  background: rgba(239, 68, 68, 0.11);
  color: #b91c1c;
}

.lovato-distribution-zone-warning {
  border: 1px solid rgba(239, 68, 68, 0.22);
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.08);
  color: #b91c1c;
  font-size: 9px;
  font-weight: 780;
  margin: 0;
  padding: 6px 8px;
}

html[data-theme="dark"] .lovato-distribution-zone-card {
  background: color-mix(in srgb, var(--surface-solid) 80%, transparent);
  border-color: rgba(148, 163, 184, 0.22);
}

html[data-theme="dark"] .lovato-distribution-zone-card.is-assigned {
  border-color: rgba(96, 165, 250, 0.36);
  background:
    linear-gradient(145deg, rgba(37, 99, 235, 0.18), rgba(15, 23, 42, 0.52)),
    var(--surface-solid);
  box-shadow: inset 3px 0 0 rgba(96, 165, 250, 0.72);
}

html[data-theme="dark"] .lovato-distribution-zone-node-select {
  border-color: rgba(239, 246, 255, 0.10);
  background: rgba(15, 23, 42, 0.32);
}

html[data-theme="dark"] .lovato-distribution-zone-linked-node {
  border-color: rgba(96, 165, 250, 0.32);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(15, 23, 42, 0.42)),
    var(--surface-solid);
}

html[data-theme="dark"] .lovato-distribution-zone-linked-node span {
  color: #93c5fd;
}

html[data-theme="dark"] .lovato-distribution-zone-linked-node small {
  color: rgba(226, 232, 240, 0.72);
}

html[data-theme="dark"] .lovato-distribution-zone-load input:disabled {
  border-color: rgba(239, 246, 255, 0.12);
  background: rgba(15, 23, 42, 0.42);
  color: rgba(226, 232, 240, 0.58);
}

html[data-theme="dark"] .lovato-distribution-zone-load-panel {
  border-color: rgba(239, 246, 255, 0.12);
  background:
    linear-gradient(145deg, rgba(30, 41, 59, 0.38), rgba(15, 23, 42, 0.24)),
    var(--glass-strong);
}

html[data-theme="dark"] .lovato-distribution-zone-load-panel.is-locked {
  border-color: rgba(96, 165, 250, 0.28);
  background:
    linear-gradient(145deg, rgba(37, 99, 235, 0.18), rgba(15, 23, 42, 0.32)),
    var(--glass-strong);
}

html[data-theme="dark"] .lovato-distribution-zone-load-panel input:disabled {
  border-color: rgba(96, 165, 250, 0.22);
  background: rgba(15, 23, 42, 0.48);
  color: rgba(226, 232, 240, 0.72);
}

html[data-theme="dark"] .lovato-distribution-zone-metrics span {
  border-color: rgba(239, 246, 255, 0.10);
  background: rgba(15, 23, 42, 0.34);
}

html[data-theme="dark"] .lovato-distribution-zone-card.is-over-limit {
  border-color: rgba(248, 113, 113, 0.58);
  background:
    linear-gradient(135deg, rgba(127, 29, 29, 0.28), rgba(15, 23, 42, 0.66)),
    var(--surface-solid);
  box-shadow: inset 3px 0 0 rgba(248, 113, 113, 0.88);
}

html[data-theme="dark"] .lovato-distribution-zone-capacity.is-ok {
  border-color: rgba(74, 222, 128, 0.28);
  background: rgba(22, 163, 74, 0.15);
  color: #86efac;
}

html[data-theme="dark"] .lovato-distribution-zone-capacity.is-over-limit,
html[data-theme="dark"] .lovato-distribution-zone-warning {
  border-color: rgba(248, 113, 113, 0.34);
  background: rgba(127, 29, 29, 0.28);
  color: #fecaca;
}

.lovato-distribution-schedule {
  display: grid;
  gap: 5px;
}

.lovato-distribution-schedule-line {
  align-items: center;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  display: grid;
  gap: 7px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding-top: 5px;
}

.lovato-distribution-schedule-line span {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.lovato-distribution-schedule-line strong,
.lovato-distribution-schedule-line small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lovato-distribution-schedule-line strong {
  color: var(--text);
  font-size: 10px;
  font-weight: 850;
}

.lovato-distribution-schedule-line small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 760;
}

.lovato-distribution-schedule-line em {
  color: var(--text);
  font-size: 10px;
  font-style: normal;
  font-weight: 880;
}

.plant-room-open-library-button {
  align-items: center;
  border: 1px solid rgba(10, 132, 255, 0.32);
  border-radius: 8px !important;
  background:
    linear-gradient(135deg, rgba(10, 132, 255, 0.16), rgba(34, 197, 94, 0.08)),
    color-mix(in srgb, var(--surface-solid) 88%, transparent);
  box-shadow: var(--glass-edge), 0 10px 22px rgba(10, 132, 255, 0.10);
  color: var(--text);
  display: grid;
  gap: 7px;
  grid-template-columns: 28px minmax(0, 1fr) 16px;
  min-height: 42px;
  padding: 6px 7px;
  text-align: left;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.plant-room-open-library-button:not(:disabled):hover {
  border-color: var(--blue-border);
  background:
    linear-gradient(135deg, rgba(10, 132, 255, 0.22), rgba(34, 197, 94, 0.12)),
    color-mix(in srgb, var(--surface-solid) 92%, transparent);
  box-shadow: var(--glass-edge), 0 14px 28px rgba(10, 132, 255, 0.16);
  transform: translateY(-1px);
}

.plant-room-open-library-icon,
.plant-room-open-library-arrow {
  align-items: center;
  display: inline-flex;
  justify-content: center;
}

.plant-room-open-library-icon {
  align-self: stretch;
  border: 1px solid rgba(10, 132, 255, 0.28);
  border-radius: 6px;
  background: rgba(10, 132, 255, 0.12);
  color: var(--blue);
}

.plant-room-open-library-icon svg {
  height: 15px;
  margin: 0;
  width: 15px;
}

.plant-room-open-library-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.plant-room-open-library-copy strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.12;
}

.plant-room-open-library-copy small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  line-height: 1.25;
}

.plant-room-open-library-arrow {
  color: var(--blue);
}

.plant-room-open-library-arrow svg {
  height: 13px;
  width: 13px;
}

.plant-room-clearance-toggle {
  gap: 6px;
  justify-content: flex-start;
  min-height: 27px;
  padding: 4px 7px;
  width: 100%;
}

.plant-room-clearance-toggle .product-toggle-switch-track {
  height: 15px;
  width: 29px;
}

.plant-room-clearance-toggle .product-toggle-switch-track::after {
  height: 11px;
  width: 11px;
}

.plant-room-clearance-toggle input:checked + .product-toggle-switch-track::after {
  transform: translateX(14px);
}

.plant-room-clearance-toggle .product-toggle-switch-label {
  font-size: 10px;
  font-weight: 820;
}

.plant-room-clearance-warning {
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface-solid) 92%, transparent);
  box-shadow: inset 3px 0 0 rgba(239, 68, 68, 0.72), var(--glass-edge);
  color: var(--text);
  display: grid;
  gap: 3px 8px;
  grid-template-columns: 22px minmax(0, 1fr);
  padding: 8px 9px;
}

.plant-room-clearance-warning span {
  align-items: center;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.24);
  border-radius: 5px;
  color: #dc2626;
  display: inline-flex;
  grid-row: span 2;
  height: 22px;
  justify-content: center;
  line-height: 0;
  margin-top: 0;
  width: 22px;
}

.plant-room-clearance-warning svg {
  height: 14px;
  width: 14px;
}

.plant-room-clearance-warning strong {
  color: var(--text);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.15;
}

.plant-room-clearance-warning small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 680;
  line-height: 1.25;
}

.plant-room-equipment-side-panel .plant-room-model-picker {
  border-radius: 8px;
  max-height: 248px;
}

.plant-room-equipment-side-panel .plant-room-model-picker-list {
  max-height: 144px;
}

.plant-room-equipment-suggestions .plant-room-product-button {
  min-height: 58px;
  border-radius: 4px;
  grid-template-columns: 38px minmax(0, 1fr);
  padding: 7px;
}

.plant-room-noise-card,
.plant-room-supporting-noise-card {
  border-radius: 8px;
}

.plant-room-noise-card strong,
.plant-room-supporting-noise-card strong {
  font-size: 12px;
}

.plant-room-noise-card span,
.plant-room-noise-card small,
.plant-room-supporting-noise-card span,
.plant-room-supporting-noise-card small {
  font-size: 10px;
  font-weight: 650;
}

.plant-room-noise-editor {
  border-radius: 6px;
  padding: 7px;
}

.plant-room-noise-placement-tools {
  gap: 9px;
  padding: 10px;
}

.plant-room-noise-placement-tools > strong {
  font-size: 13px;
  line-height: 1.15;
}

.plant-room-noise-tool-grid {
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.plant-room-noise-tool-button {
  align-items: center;
  background: #fff;
  border-color: rgba(203, 213, 225, 0.82);
  border-radius: 6px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72), 0 8px 18px rgba(15, 23, 42, 0.06);
  color: #172033;
  display: grid !important;
  gap: 6px !important;
  grid-template-columns: 16px minmax(0, 1fr);
  height: auto;
  justify-content: stretch;
  justify-items: start;
  min-height: 38px;
  min-width: 0;
  padding: 8px;
  text-align: left !important;
  width: 100%;
}

.plant-room-noise-tool-button svg {
  color: #64748b;
  height: 16px;
  width: 16px;
}

.plant-room-noise-tool-button span {
  color: inherit;
  font-size: 10px;
  font-weight: 820;
  line-height: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plant-room-noise-tool-button.active,
.plant-room-noise-tool-button.active:hover {
  background: #ffffff;
  border-color: var(--blue-border);
  color: #0057b8;
  box-shadow: inset 0 0 0 1px rgba(0, 122, 255, 0.08), 0 8px 18px rgba(10, 132, 255, 0.12);
}

.plant-room-noise-tool-button.active svg {
  color: #0a84ff;
}

html[data-theme="dark"] .plant-room-noise-tool-button,
html[data-theme="dark"] .plant-room-noise-tool-button:hover {
  background: #ffffff;
  border-color: rgba(203, 213, 225, 0.82);
  color: #172033;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72), 0 8px 18px rgba(0, 0, 0, 0.18);
}

html[data-theme="dark"] .plant-room-noise-tool-button svg {
  color: #64748b;
}

html[data-theme="dark"] .plant-room-noise-tool-button.active,
html[data-theme="dark"] .plant-room-noise-tool-button.active:hover {
  background: #ffffff;
  border-color: var(--blue-border);
  color: #0057b8;
  box-shadow: inset 0 0 0 1px rgba(0, 122, 255, 0.08), 0 8px 18px rgba(10, 132, 255, 0.18);
}

html[data-theme="dark"] .plant-room-noise-tool-button.active svg {
  color: #0a84ff;
}

.plant-room-noise-barrier-row {
  grid-template-columns: minmax(52px, 0.6fr) minmax(0, 1fr) auto;
}

.plant-room-product-library-drawer {
  top: 52px;
  right: 14px;
  bottom: 14px;
  width: min(560px, calc(100% - 28px));
  z-index: 30;
}

.plant-room-product-library-drawer .plant-room-product-library-panel {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--glass-strong);
  box-shadow: var(--shadow);
}

.plant-room-product-library-drawer .plant-room-product-library-panel .panel-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 52px;
  padding: 9px 12px;
}

.plant-room-product-library-drawer .plant-room-product-library-body {
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(0, 1fr);
}

.plant-room-product-library-scroll-shell {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: 24px minmax(0, 1fr) 24px;
  min-width: 0;
}

.plant-room-product-library-category-shell {
  border-bottom: 1px solid var(--glass-border);
  padding: 7px 8px;
}

.plant-room-product-library-drawer .plant-room-product-library-categories {
  border-right: 0;
  display: flex;
  gap: 6px;
  overflow: auto;
  padding: 0;
  scrollbar-width: none;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
}

.plant-room-product-library-drawer .plant-room-product-library-categories::-webkit-scrollbar {
  display: none;
}

.plant-room-product-library-drawer .plant-room-product-library-categories button {
  flex: 0 0 136px;
  align-content: center;
  min-height: 42px;
  border-radius: 4px;
  padding: 7px 9px;
  scroll-snap-align: start;
  text-align: left;
  contain: layout paint style;
  content-visibility: auto;
  contain-intrinsic-size: 122px;
}

.plant-room-product-library-drawer .plant-room-product-library-categories span {
  font-size: 11px;
  font-weight: 820;
  line-height: 1.08;
}

.plant-room-product-library-drawer .plant-room-product-library-categories small {
  font-size: 9.5px;
  font-weight: 680;
  line-height: 1.1;
}

.plant-room-product-library-drawer .plant-room-product-library-main {
  gap: 8px;
  grid-template-rows: auto auto minmax(0, 1fr);
  padding: 10px;
}

.plant-room-product-library-drawer .plant-room-product-library-search {
  min-height: 32px;
  border-radius: 4px;
  padding: 0 9px;
}

.plant-room-product-library-drawer .plant-room-product-library-search svg {
  width: 14px;
  height: 14px;
}

.plant-room-product-library-drawer .plant-room-product-library-search input {
  min-height: 30px;
  font-size: 11.5px;
  font-weight: 680;
}

.plant-room-product-library-filterbar {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.plant-room-product-library-subcategory-shell {
  grid-template-columns: 22px minmax(0, 1fr) 22px;
}

.plant-room-product-library-subcategories {
  display: flex;
  gap: 5px;
  min-width: 0;
  overflow: auto;
  scrollbar-width: none;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
}

.plant-room-product-library-subcategories::-webkit-scrollbar {
  display: none;
}

.plant-room-product-library-subcategories button {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-solid) 90%, transparent);
  color: var(--muted);
  display: inline-flex;
  flex: 0 0 auto;
  gap: 6px;
  min-height: 26px;
  padding: 0 9px;
  scroll-snap-align: start;
}

.plant-room-product-library-subcategories button.active {
  border-color: var(--blue-border);
  background: var(--blue-soft);
  color: #0057b8;
}

.plant-room-product-library-subcategories span {
  color: inherit;
  font-size: 10px;
  font-weight: 820;
  line-height: 1;
  white-space: nowrap;
}

.plant-room-product-library-subcategories small {
  color: inherit;
  font-size: 9px;
  font-weight: 760;
  opacity: 0.72;
}

.plant-room-product-library-filters {
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
}

.plant-room-product-library-filters label {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.plant-room-product-library-filters label span {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 760;
  line-height: 1;
  text-transform: uppercase;
}

.plant-room-product-library-filters select,
.plant-room-product-library-filters button,
.plant-room-scroll-button {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: color-mix(in srgb, var(--surface-solid) 92%, transparent);
  box-shadow: var(--glass-edge);
  color: var(--text);
  font: inherit;
}

.plant-room-product-library-filters select {
  font-size: 10.5px;
  font-weight: 700;
  min-height: 28px;
  min-width: 0;
  overflow: hidden;
  padding: 0 7px;
  text-overflow: ellipsis;
  width: 100%;
}

.plant-room-product-library-filters button {
  align-self: end;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 760;
  min-height: 28px;
  padding: 0 8px;
}

.plant-room-scroll-button {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  height: 24px;
  justify-content: center;
  padding: 0;
  width: 24px;
}

.plant-room-scroll-button.compact {
  height: 22px;
  width: 22px;
}

.plant-room-scroll-button svg {
  height: 13px;
  width: 13px;
}

.plant-room-scroll-button.reverse svg {
  transform: rotate(180deg);
}

.plant-room-product-library-drawer .plant-room-product-library-results {
  align-content: start;
  grid-auto-rows: auto;
  grid-template-columns: 1fr;
  gap: 7px;
  padding-right: 2px;
}

.plant-room-product-library-result-summary,
.plant-room-product-library-show-more,
.plant-room-product-library-empty {
  grid-column: 1 / -1;
}

.plant-room-product-library-result-summary {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 10.5px;
  font-weight: 760;
  justify-content: space-between;
  min-height: 28px;
  padding: 2px 4px;
}

.plant-room-product-library-result-summary strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.plant-room-product-library-result-summary small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.plant-room-product-library-show-more {
  align-items: center;
  border: 1px solid rgba(10, 132, 255, 0.28);
  border-radius: 9px;
  background: color-mix(in srgb, var(--blue-soft) 72%, var(--surface-solid));
  color: var(--blue);
  display: grid;
  gap: 2px;
  justify-items: center;
  min-height: 52px;
  padding: 8px 12px;
}

.plant-room-product-library-show-more strong {
  font-size: 11.5px;
  font-weight: 880;
}

.plant-room-product-library-show-more small {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 720;
}

.plant-room-product-library-show-more:hover {
  border-color: rgba(10, 132, 255, 0.52);
  background: color-mix(in srgb, var(--blue-soft) 88%, var(--surface-solid));
}

.plant-room-product-library-drawer .plant-room-product-library-card {
  align-items: stretch;
  box-sizing: border-box;
  grid-template-columns: 74px minmax(0, 1fr);
  height: 122px;
  min-height: 0;
  max-height: 122px;
  gap: 10px;
  overflow: hidden;
  padding: 10px;
  border-radius: 8px;
  background: var(--tile-glass);
  text-align: left;
}

.plant-room-product-library-drawer .plant-room-product-thumb {
  align-self: center;
  height: 74px;
  min-height: 74px;
  min-width: 74px;
  width: 74px;
}

.plant-room-product-library-drawer .plant-room-product-thumb .product-photo {
  height: 74px;
  min-height: 74px;
  width: 74px;
}

.plant-room-product-library-drawer .plant-room-product-thumb img {
  height: 64px;
  object-fit: contain;
  width: 64px;
}

.plant-room-product-library-drawer .plant-room-product-library-card .plant-room-product-library-copy {
  align-content: start;
  align-self: stretch;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 2px;
  justify-content: center;
  max-height: none;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  padding: 1px 0;
  text-align: left;
}

.plant-room-product-library-drawer .plant-room-product-library-card .pipe-compact-spec {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  margin-top: 4px;
  max-height: 22px;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.plant-room-product-library-drawer .plant-room-product-library-card .pipe-compact-spec span {
  align-items: center;
  display: inline-flex;
  flex: 0 1 auto;
  font-size: 10px;
  font-weight: 760;
  justify-content: flex-start;
  line-height: 1;
  max-width: 34%;
  min-width: 0;
  overflow: hidden;
  padding: 4px 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plant-room-product-library-drawer .plant-room-product-library-card small,
.plant-room-product-library-drawer .plant-room-product-library-card em,
.plant-room-product-library-drawer .plant-room-product-library-card b {
  display: block;
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 680;
  line-height: 1.05;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plant-room-product-library-drawer .plant-room-product-library-card strong {
  display: -webkit-box;
  flex: 0 0 auto;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 13.5px;
  font-weight: 850;
  line-height: 1.12;
  max-height: 31px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  overflow-wrap: anywhere;
}

html[data-theme="dark"] .plant-room-pipe-floating-panel.room-draft-panel {
  border-color: rgba(239, 246, 255, 0.18);
  background:
    linear-gradient(145deg, rgba(26, 28, 34, 0.90), rgba(10, 11, 14, 0.82));
  color: var(--text);
  box-shadow: var(--glass-edge), 0 18px 42px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
}

html[data-theme="dark"] .plant-room-pipe-floating-panel .pipe-defaults-heading strong {
  color: var(--text);
}

html[data-theme="dark"] .plant-room-pipe-floating-panel .plant-room-selected-pipe-grid label > span:first-child {
  color: var(--muted);
}

html[data-theme="dark"] .plant-room-auto-pipe-columns > div > strong {
  color: var(--muted);
}

html[data-theme="dark"] .plant-room-auto-pipe-option {
  border-color: rgba(239, 246, 255, 0.14);
  background: rgba(15, 23, 42, 0.68);
}

html[data-theme="dark"] .plant-room-auto-pipe-option:hover,
html[data-theme="dark"] .plant-room-auto-pipe-option.active {
  border-color: rgba(96, 165, 250, 0.62);
  background: rgba(30, 41, 59, 0.84);
}

html[data-theme="dark"] .plant-room-auto-pipe-option strong {
  color: var(--text);
}

html[data-theme="dark"] .plant-room-gas-meter-facts span {
  background: rgba(15, 23, 42, 0.76);
  border-color: rgba(239, 246, 255, 0.14);
}

html[data-theme="dark"] .plant-room-gas-pressure-control {
  background: rgba(15, 23, 42, 0.76);
  border-color: rgba(239, 246, 255, 0.14);
}

html[data-theme="dark"] .plant-room-side-panel,
html[data-theme="dark"] .plant-room-product-library-drawer .plant-room-product-library-panel {
  border-color: rgba(239, 246, 255, 0.16);
  background: var(--glass-strong);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .plant-room-side-panel .panel-head,
html[data-theme="dark"] .plant-room-product-library-drawer .plant-room-product-library-panel .panel-head,
html[data-theme="dark"] .plant-room-product-library-drawer .plant-room-product-library-categories {
  border-color: rgba(239, 246, 255, 0.14);
}

html[data-theme="dark"] .plant-room-side-toggle-stack button,
html[data-theme="dark"] .plant-room-side-panel .panel-head button,
html[data-theme="dark"] .plant-room-product-library-panel .panel-head button {
  color: var(--text);
}

html[data-theme="dark"] .plant-room-clearance-warning {
  border-color: rgba(239, 246, 255, 0.14);
  background: var(--glass-strong);
  box-shadow: inset 3px 0 0 rgba(248, 113, 113, 0.74), var(--glass-edge);
  color: var(--text);
}

html[data-theme="dark"] .plant-room-clearance-warning span {
  border-color: rgba(248, 113, 113, 0.28);
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
}

html[data-theme="dark"] .plant-room-clearance-warning strong {
  color: var(--text);
}

html[data-theme="dark"] .plant-room-clearance-warning small {
  color: var(--muted);
}

html[data-page="marketing"] {
  color-scheme: light;
  scroll-behavior: smooth;
}

html[data-page="marketing"],
html[data-page="marketing"] body,
html[data-page="marketing"] #app {
  min-height: 100%;
  height: auto;
}

html[data-page="marketing"] body {
  overflow: auto;
  background: #f5f5f7;
  color: #1d1d1f;
}

html[data-page="marketing"] body::before {
  opacity: 1;
  background:
    linear-gradient(180deg, #fbfbfd 0%, #f5f5f7 48%, #ffffff 100%);
}

html[data-page="marketing"] body::after {
  opacity: 0;
}

.marketing-shell {
  position: relative;
  min-height: 100vh;
  overflow: clip;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(245, 245, 247, 0.94) 38%, #ffffff 100%);
  color: #1d1d1f;
}

.marketing-page {
  --marketing-blue: #0071e3;
  --marketing-blue-dark: #005bb5;
  --marketing-ink: #1d1d1f;
  --marketing-text: #1d1d1f;
  --marketing-muted: #6e6e73;
  --marketing-paper: #f5f5f7;
  --marketing-panel: rgba(255, 255, 255, 0.72);
  --marketing-line: rgba(0, 0, 0, 0.10);
  --marketing-hairline: rgba(0, 0, 0, 0.10);
  --marketing-glass: rgba(255, 255, 255, 0.58);
  --marketing-glass-strong: rgba(255, 255, 255, 0.78);
  --marketing-shadow: 0 28px 90px rgba(15, 23, 42, 0.12);
  min-height: 100vh;
  color: var(--marketing-text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

.marketing-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 22px;
  min-height: 58px;
  padding: 10px max(22px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid rgba(0, 0, 0, 0.055);
  background: rgba(251, 251, 253, 0.74);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
}

.marketing-brand {
  width: fit-content;
  color: inherit;
  text-decoration: none;
}

.marketing-brand .brand-logo-wordmark {
  width: 126px;
  height: 29px;
}

.marketing-nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.marketing-nav-links a,
.marketing-link-button {
  border: 0;
  background: transparent;
  color: rgba(29, 29, 31, 0.74);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: color 180ms ease;
}

.marketing-nav-links a:hover,
.marketing-link-button:hover {
  color: var(--marketing-text);
}

.marketing-nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.marketing-cta,
.marketing-secondary {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 0 24px;
  border: 1px solid transparent;
  font-size: 16px;
  font-weight: 760;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.marketing-cta {
  background: linear-gradient(180deg, #0a84ff, var(--marketing-blue));
  color: #ffffff;
  box-shadow: 0 14px 34px rgba(0, 113, 227, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.marketing-cta:hover,
.marketing-secondary:hover,
.marketing-link-button:hover {
  transform: translateY(-1px);
}

.marketing-cta:hover {
  background: linear-gradient(180deg, #1d91ff, #0077ed);
  box-shadow: 0 18px 42px rgba(0, 113, 227, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

.marketing-secondary {
  background: rgba(255, 255, 255, 0.68);
  border-color: rgba(0, 113, 227, 0.18);
  color: var(--marketing-blue);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 10px 30px rgba(15, 23, 42, 0.07);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
}

.marketing-cta-small {
  min-height: 34px;
  padding: 0 15px;
  font-size: 13px;
  font-weight: 720;
  box-shadow: 0 8px 22px rgba(0, 113, 227, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.30);
}

.marketing-hero {
  min-height: calc(100svh - 58px);
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 24px;
  padding: 58px 24px 30px;
}

.marketing-hero-copy {
  width: min(1120px, 100%);
  display: grid;
  justify-items: center;
  gap: 16px;
  text-align: center;
  animation: marketingFadeUp 780ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.marketing-hero h1 {
  max-width: 1120px;
  margin: 0;
  color: var(--marketing-text);
  font-size: 70px;
  line-height: 0.98;
  font-weight: 850;
  letter-spacing: 0;
}

.marketing-hero p {
  max-width: 740px;
  margin: 0;
  color: var(--marketing-muted);
  font-size: 22px;
  line-height: 1.28;
  font-weight: 540;
}

.marketing-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.marketing-product-stage {
  position: relative;
  width: min(1120px, calc(100vw - 40px));
  min-height: 470px;
  perspective: 1600px;
  transform-style: preserve-3d;
  animation: marketingFadeUp 900ms cubic-bezier(0.22, 1, 0.36, 1) 120ms both;
}

.marketing-product-glow {
  position: absolute;
  left: 50%;
  top: 54%;
  width: min(760px, 76vw);
  height: 280px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(0, 113, 227, 0.20), rgba(0, 113, 227, 0.045) 42%, transparent 70%);
  filter: blur(14px);
  transform: translate(-50%, -50%);
  animation: marketingGlow 6s ease-in-out infinite;
}

.marketing-product-window {
  position: absolute;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.48)),
    rgba(255, 255, 255, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    inset 0 -1px 0 rgba(255, 255, 255, 0.42),
    var(--marketing-shadow);
  backdrop-filter: blur(28px) saturate(170%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
}

.marketing-product-window header {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.055);
  color: var(--marketing-text);
  font-size: 13px;
  font-weight: 780;
}

.marketing-product-window header span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.12);
}

.marketing-product-window header strong {
  margin-left: 4px;
}

.marketing-product-window header em {
  margin-left: auto;
  color: var(--marketing-blue);
  font-style: normal;
  font-weight: 860;
}

.marketing-product-main {
  left: 50%;
  top: 0;
  width: min(760px, 76vw);
  height: 430px;
  transform: translateX(-50%) rotateX(9deg) rotateY(-4deg);
  animation: marketingFloat 7s ease-in-out infinite;
}

.marketing-product-heat {
  left: 2%;
  top: 150px;
  width: 278px;
  min-height: 198px;
  padding-bottom: 16px;
  transform: rotateY(11deg) translateZ(34px);
  animation: marketingFloat 7.8s ease-in-out 260ms infinite;
}

.marketing-product-library {
  right: 0;
  top: 104px;
  width: 294px;
  min-height: 230px;
  transform: rotateY(-12deg) translateZ(44px);
  animation: marketingFloat 8.2s ease-in-out 520ms infinite;
}

.marketing-product-plant {
  right: 12%;
  bottom: 0;
  width: 270px;
  min-height: 172px;
  transform: rotateX(4deg) rotateY(-8deg) translateZ(72px);
  animation: marketingFloat 7.4s ease-in-out 160ms infinite;
}

.marketing-floorplan {
  width: 100%;
  height: 100%;
  display: block;
}

.marketing-app-preview {
  display: grid;
  grid-template-rows: 38px 34px minmax(0, 1fr);
  height: calc(100% - 46px);
  background:
    radial-gradient(circle at 48% 34%, rgba(0, 113, 227, 0.08), transparent 36%),
    rgba(255, 255, 255, 0.32);
}

.marketing-app-topbar,
.marketing-app-modebar {
  display: flex;
  align-items: center;
  min-width: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.055);
}

.marketing-app-topbar {
  gap: 10px;
  padding: 0 12px;
}

.marketing-app-topbar strong {
  color: var(--marketing-text);
  font-size: 12px;
  font-weight: 850;
}

.marketing-app-topbar span {
  min-width: 0;
  overflow: hidden;
  color: var(--marketing-muted);
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketing-app-topbar button {
  margin-left: auto;
  min-height: 24px;
  padding: 0 10px;
  border: 1px solid rgba(0, 113, 227, 0.18);
  border-radius: 999px;
  background: rgba(0, 113, 227, 0.10);
  color: var(--marketing-blue);
  font-size: 10px;
  font-weight: 820;
}

.marketing-app-modebar {
  gap: 5px;
  padding: 4px 8px;
  overflow: hidden;
}

.marketing-app-modebar span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  color: rgba(29, 29, 31, 0.58);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.marketing-app-modebar span.active {
  background: rgba(0, 113, 227, 0.10);
  color: var(--marketing-blue);
}

.marketing-app-body {
  min-height: 0;
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) 172px;
  gap: 8px;
  padding: 8px;
}

.marketing-app-tools,
.marketing-app-panel {
  min-width: 0;
  border: 1px solid rgba(0, 0, 0, 0.055);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.marketing-app-tools {
  display: grid;
  gap: 5px;
  align-content: start;
  padding: 8px 6px;
}

.marketing-app-tools span {
  display: grid;
  place-items: center;
  gap: 3px;
  min-height: 46px;
  border-radius: 8px;
  color: rgba(29, 29, 31, 0.58);
}

.marketing-app-tools span.active {
  background: rgba(0, 113, 227, 0.10);
  color: var(--marketing-blue);
}

.marketing-app-tools svg {
  width: 17px;
  height: 17px;
}

.marketing-app-tools small {
  max-width: 54px;
  overflow: hidden;
  font-size: 8.5px;
  font-weight: 820;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketing-app-canvas {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(0, 113, 227, 0.12);
  border-radius: 10px;
  background:
    linear-gradient(rgba(0, 113, 227, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 113, 227, 0.055) 1px, transparent 1px),
    rgba(255, 255, 255, 0.48);
  background-size: 20px 20px;
}

.marketing-app-canvas .marketing-floorplan {
  height: 100%;
}

.marketing-app-panel {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 11px;
}

.marketing-app-panel strong,
.marketing-app-panel dd {
  color: var(--marketing-text);
  font-size: 12px;
  font-weight: 850;
}

.marketing-app-panel small,
.marketing-app-panel dt {
  color: var(--marketing-muted);
  font-size: 10px;
  font-weight: 700;
}

.marketing-app-panel dl {
  display: grid;
  gap: 7px;
  margin: 0;
}

.marketing-app-panel dl div {
  display: grid;
  gap: 2px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(0, 113, 227, 0.055);
}

.marketing-app-panel dt,
.marketing-app-panel dd {
  margin: 0;
}

.marketing-plan-line {
  stroke-dasharray: 1800;
  stroke-dashoffset: 1800;
  animation: marketingLineDraw 2.8s cubic-bezier(0.22, 1, 0.36, 1) 420ms forwards;
}

.marketing-plan-line-soft {
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation-delay: 680ms;
}

.marketing-room-label text {
  fill: rgba(29, 29, 31, 0.62);
  font-size: 18px;
  font-weight: 800;
}

.marketing-room-label .loss {
  fill: #ef4444;
  font-size: 14px;
  font-weight: 900;
}

.marketing-room-label .gain {
  fill: #0a84ff;
  font-size: 14px;
  font-weight: 900;
}

.marketing-room-label .plant-label {
  fill: #159947;
  font-size: 16px;
  font-weight: 900;
}

.marketing-canvas-bg,
.marketing-sheet,
.marketing-rooms path,
.marketing-external-plant {
  fill: rgba(248, 251, 255, 0.88);
}

.marketing-canvas-grid path {
  fill: none;
  stroke: rgba(15, 23, 42, 0.075);
  stroke-width: 1;
}

.marketing-canvas-grid.small path {
  stroke: rgba(15, 23, 42, 0.09);
}

.marketing-sheet {
  stroke: rgba(15, 23, 42, 0.16);
  stroke-width: 1.6;
}

.marketing-rooms .room-a,
.marketing-rooms .room-b,
.marketing-rooms .room-d {
  fill: rgba(255, 255, 255, 0.72);
}

.marketing-rooms .plant,
.marketing-external-plant {
  fill: rgba(34, 197, 94, 0.12);
}

.marketing-walls path,
.marketing-walls .outer {
  fill: none;
  stroke: #263243;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 6;
}

.marketing-walls path:not(.outer) {
  stroke-width: 4;
}

.marketing-walls .window {
  stroke: #0ea5e9;
  stroke-width: 8;
}

.marketing-walls .door,
.marketing-walls .door-swing {
  stroke: #8893a3;
  stroke-width: 3;
}

.marketing-plant-boundary rect,
.marketing-external-plant {
  stroke: #22c55e;
  stroke-width: 4;
  stroke-dasharray: 18 12;
}

.marketing-heatmap ellipse {
  opacity: 0.62;
}

.marketing-heatmap .cold {
  fill: rgba(10, 132, 255, 0.28);
}

.marketing-heatmap .warm {
  fill: rgba(249, 115, 22, 0.25);
}

.marketing-heatmap .hot {
  fill: rgba(239, 68, 68, 0.24);
}

.marketing-pipes path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 8;
}

.marketing-pipes .flow,
.marketing-valves .flow {
  stroke: #ef4444;
  fill: none;
}

.marketing-pipes .return {
  stroke: #0a84ff;
}

.marketing-pipes .gas {
  stroke: #f4c20d;
  stroke-width: 5;
}

.marketing-pipes.plant path {
  stroke-width: 7;
}

.marketing-pipes text,
.marketing-riser text,
.marketing-zone-node text,
.marketing-noise-receptor text,
.marketing-mini-caption {
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 4;
  stroke-linejoin: round;
}

.marketing-pipes .pipe-label {
  font-size: 12px;
  font-weight: 950;
}

.marketing-pipes .pipe-label.flow {
  fill: #ef4444;
}

.marketing-pipes .pipe-label.return {
  fill: #0a84ff;
}

.marketing-zone-node rect {
  fill: #ef4444;
  filter: drop-shadow(0 12px 16px rgba(239, 68, 68, 0.20));
}

.marketing-zone-node path {
  fill: none;
  stroke: #ffffff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.marketing-zone-node text {
  fill: #9f1239;
  font-size: 14px;
  font-weight: 950;
  text-anchor: middle;
}

.marketing-zone-node .port,
.marketing-radiator circle {
  fill: #ffffff;
  stroke-width: 4;
}

.marketing-zone-node .port.flow,
.marketing-radiator circle:first-of-type {
  stroke: #ef4444;
}

.marketing-zone-node .port.return,
.marketing-radiator circle:last-of-type {
  stroke: #0a84ff;
}

.marketing-radiator rect {
  fill: rgba(15, 23, 42, 0.90);
}

.marketing-radiator path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.42);
  stroke-linecap: round;
  stroke-width: 3;
}

.marketing-valves path {
  stroke: #ef4444;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.marketing-riser circle {
  fill: #263243;
}

.marketing-riser path {
  fill: none;
  stroke: #ffffff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.marketing-riser text {
  fill: #263243;
  font-size: 13px;
  font-weight: 950;
  text-anchor: middle;
}

.marketing-noise-map ellipse {
  opacity: 0.42;
}

.marketing-noise-map .pass {
  fill: #22c55e;
}

.marketing-noise-map .warning {
  fill: #f59e0b;
}

.marketing-noise-map .risk {
  fill: #ef4444;
}

.marketing-heat-pump rect,
.marketing-cylinder rect {
  fill: rgba(255, 255, 255, 0.88);
  stroke: #0071e3;
  stroke-width: 3;
}

.marketing-heat-pump path,
.marketing-cylinder path {
  fill: none;
  stroke: #0071e3;
  stroke-linecap: round;
  stroke-width: 3;
}

.marketing-heat-pump circle {
  fill: #0071e3;
}

.marketing-cylinder rect {
  stroke: #64748b;
}

.marketing-cylinder path {
  stroke: #64748b;
}

.marketing-noise-receptor path {
  fill: #ffffff;
  stroke: #ef4444;
  stroke-width: 4;
}

.marketing-noise-receptor circle {
  fill: #ef4444;
}

.marketing-noise-receptor text,
.marketing-mini-caption {
  fill: #0f172a;
  font-size: 13px;
  font-weight: 950;
  text-anchor: middle;
}

.marketing-mini-caption {
  text-anchor: start;
}

.marketing-barrier {
  fill: none;
  stroke: #334155;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 18 10;
}

.marketing-plan-nodes circle {
  fill: #0071e3;
  filter: drop-shadow(0 8px 12px rgba(0, 113, 227, 0.28));
}

.marketing-mini-results {
  display: grid;
  gap: 8px;
  padding: 14px 14px 10px;
}

.marketing-mini-results span {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border: 1px solid rgba(0, 113, 227, 0.10);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.marketing-mini-results small {
  color: var(--marketing-muted);
  font-size: 10px;
  font-weight: 720;
}

.marketing-mini-results b {
  color: var(--marketing-text);
  font-size: 13px;
  font-weight: 890;
}

.marketing-product-heat > small {
  display: block;
  padding: 0 14px;
  color: var(--marketing-muted);
  font-size: 11px;
  line-height: 1.4;
  font-weight: 650;
}

.marketing-product-list {
  display: grid;
  gap: 9px;
  padding: 16px;
}

.marketing-product-plant-preview {
  padding: 10px;
}

.marketing-product-plant-preview .marketing-mini-plantroom {
  height: 126px;
  border-radius: 12px;
}

.marketing-product-list span {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 9px;
  border: 1px solid rgba(0, 0, 0, 0.055);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.marketing-product-list img {
  width: 42px;
  height: 34px;
  grid-row: 1 / span 2;
  object-fit: contain;
  filter: drop-shadow(0 8px 10px rgba(15, 23, 42, 0.10));
}

.marketing-product-list b {
  grid-column: 2;
  color: var(--marketing-text);
  font-size: 12px;
}

.marketing-product-list small {
  grid-column: 2;
  color: var(--marketing-muted);
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.25;
}

.marketing-plant-grid {
  position: relative;
  min-height: 118px;
  margin: 4px 14px 14px;
  border-radius: 8px;
  background:
    linear-gradient(rgba(0, 113, 227, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 113, 227, 0.12) 1px, transparent 1px),
    rgba(255, 255, 255, 0.50);
  background-size: 22px 22px;
}

.marketing-plant-grid i {
  position: absolute;
  display: block;
  border-radius: 7px;
  background: rgba(0, 113, 227, 0.16);
  border: 1px solid rgba(0, 113, 227, 0.26);
}

.marketing-plant-grid i:nth-child(1) {
  left: 24px;
  top: 22px;
  width: 82px;
  height: 42px;
}

.marketing-plant-grid i:nth-child(2) {
  right: 30px;
  top: 18px;
  width: 48px;
  height: 76px;
}

.marketing-plant-grid i:nth-child(3) {
  left: 92px;
  bottom: 22px;
  width: 86px;
  height: 10px;
  border-radius: 999px;
}

.marketing-theme-strip {
  position: sticky;
  top: 58px;
  z-index: 30;
  width: min(860px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  margin: 0 auto;
  padding: 6px;
  border: 1px solid rgba(0, 0, 0, 0.075);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 18px 45px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(26px) saturate(170%);
  -webkit-backdrop-filter: blur(26px) saturate(170%);
}

.marketing-theme-strip a {
  min-height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: rgba(29, 29, 31, 0.70);
  font-size: 14px;
  font-weight: 720;
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.marketing-theme-strip a:hover,
.marketing-theme-strip a.active {
  background: rgba(0, 113, 227, 0.10);
  color: var(--marketing-blue);
}

.marketing-theme-strip a:hover {
  transform: translateY(-1px);
}

.marketing-section,
.marketing-theme-section,
.marketing-workflow,
.marketing-connected,
.marketing-start {
  width: min(1160px, calc(100vw - 40px));
  margin: 0 auto;
}

.marketing-intro {
  padding: 128px 0 70px;
  text-align: center;
}

.marketing-intro h2,
.marketing-workflow h2,
.marketing-connected h2,
.marketing-start h2 {
  margin: 0;
  color: var(--marketing-text);
  font-size: 58px;
  line-height: 1.02;
  font-weight: 840;
  letter-spacing: 0;
}

.marketing-intro p,
.marketing-workflow p,
.marketing-connected p,
.marketing-start p {
  max-width: 720px;
  margin: 18px auto 0;
  color: var(--marketing-muted);
  font-size: 21px;
  line-height: 1.38;
  font-weight: 540;
}

.marketing-audience-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

.marketing-audience-line span,
.marketing-audience-line a,
.marketing-persona-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid rgba(0, 113, 227, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 10px 24px rgba(15, 23, 42, 0.045);
  color: rgba(29, 29, 31, 0.72);
  font-size: 14px;
  font-weight: 720;
  text-decoration: none;
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.marketing-audience-line a:hover,
.marketing-persona-nav a:hover,
.marketing-persona-nav a.active {
  border-color: rgba(0, 113, 227, 0.32);
  color: var(--marketing-blue);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 16px 30px rgba(0, 113, 227, 0.12);
  transform: translateY(-1px);
}

.marketing-theme-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 64px;
  min-height: 680px;
  padding: 62px 0;
}

.marketing-theme-section.reverse {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

.marketing-theme-section.reverse .marketing-theme-copy {
  order: 2;
}

.marketing-theme-copy {
  display: grid;
  gap: 16px;
}

.marketing-theme-copy span {
  color: var(--marketing-blue);
  font-size: 21px;
  font-weight: 760;
}

.marketing-theme-copy h2 {
  margin: 0;
  color: var(--marketing-text);
  font-size: 62px;
  line-height: 1.02;
  font-weight: 840;
  letter-spacing: 0;
}

.marketing-theme-copy p {
  margin: 0;
  color: var(--marketing-muted);
  font-size: 22px;
  line-height: 1.38;
  font-weight: 530;
}

.marketing-theme-visual {
  min-height: 430px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.50)),
    rgba(255, 255, 255, 0.62);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    inset 0 -1px 0 rgba(255, 255, 255, 0.40),
    0 32px 86px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(28px) saturate(170%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
}

.marketing-visual-plan .marketing-floorplan {
  height: 430px;
}

.marketing-theme-workspace {
  height: 100%;
  min-height: 430px;
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 18px;
}

.marketing-theme-tools,
.marketing-theme-inspector {
  border: 1px solid rgba(0, 0, 0, 0.055);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.marketing-theme-tools {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 10px;
}

.marketing-theme-tools span {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 9px;
  border-radius: 8px;
  color: rgba(29, 29, 31, 0.64);
  font-size: 12px;
  font-weight: 820;
}

.marketing-theme-tools span.active {
  background: rgba(0, 113, 227, 0.10);
  color: var(--marketing-blue);
}

.marketing-theme-tools svg {
  width: 16px;
  height: 16px;
}

.marketing-theme-canvas {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(0, 113, 227, 0.12);
  border-radius: 10px;
  background:
    linear-gradient(rgba(0, 113, 227, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 113, 227, 0.05) 1px, transparent 1px),
    rgba(255, 255, 255, 0.52);
  background-size: 22px 22px;
}

.marketing-theme-canvas .marketing-floorplan {
  height: 100%;
}

.marketing-theme-canvas .marketing-actual-ui-capture {
  height: 100%;
  border: 0;
  border-radius: 10px;
}

.marketing-theme-inspector {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 0.55fr) minmax(0, 0.45fr);
  gap: 6px 16px;
  padding: 14px;
}

.marketing-theme-inspector strong {
  color: var(--marketing-text);
  font-size: 14px;
  font-weight: 880;
}

.marketing-theme-inspector span,
.marketing-theme-inspector small {
  color: var(--marketing-muted);
  font-size: 12px;
  font-weight: 700;
}

.marketing-visual-calc,
.marketing-visual-select,
.marketing-visual-coordinate,
.marketing-visual-export {
  display: grid;
  align-content: center;
  gap: 24px;
  padding: 34px;
}

.marketing-calc-total {
  display: grid;
  gap: 5px;
  text-align: center;
}

.marketing-calc-total span {
  color: var(--marketing-muted);
  font-size: 14px;
  font-weight: 760;
}

.marketing-calc-total strong {
  color: var(--marketing-text);
  font-size: 74px;
  line-height: 1;
}

.marketing-calc-chart {
  height: 176px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  gap: 14px;
  padding: 18px;
  border-radius: 8px;
  background: rgba(0, 113, 227, 0.06);
}

.marketing-calc-chart i {
  display: block;
  height: var(--h);
  border-radius: 999px 999px 7px 7px;
  background: linear-gradient(180deg, #0a84ff, rgba(0, 113, 227, 0.24));
  box-shadow: 0 10px 18px rgba(0, 113, 227, 0.12);
}

.marketing-calc-rows,
.marketing-select-specs {
  display: grid;
  gap: 10px;
}

.marketing-calc-rows span {
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--marketing-muted);
  font-size: 14px;
  font-weight: 720;
}

.marketing-select-product {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 190px;
  padding: 18px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 28%, rgba(0, 113, 227, 0.18), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(230, 242, 255, 0.62));
  color: var(--marketing-text);
}

.marketing-select-product img {
  width: min(260px, 76%);
  height: 104px;
  object-fit: contain;
  filter: drop-shadow(0 22px 26px rgba(15, 23, 42, 0.14));
}

.marketing-select-product strong {
  font-size: 26px;
  line-height: 1.08;
  text-align: center;
}

.marketing-select-product span {
  color: var(--marketing-blue);
  font-size: 18px;
  font-weight: 780;
}

.marketing-select-specs {
  grid-template-columns: auto minmax(0, 1fr);
  padding: 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.marketing-select-specs span {
  color: var(--marketing-muted);
  font-size: 13px;
  font-weight: 720;
}

.marketing-select-specs b {
  color: var(--marketing-text);
  font-size: 14px;
  text-align: right;
}

.marketing-coordinate-room {
  position: relative;
  min-height: 330px;
  border-radius: 8px;
  background:
    linear-gradient(rgba(0, 113, 227, 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 113, 227, 0.11) 1px, transparent 1px),
    rgba(255, 255, 255, 0.58);
  background-size: 30px 30px;
  border: 1px solid rgba(0, 113, 227, 0.12);
}

.marketing-coordinate-room .unit,
.marketing-coordinate-room .pipe {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid rgba(0, 113, 227, 0.28);
  background: rgba(0, 113, 227, 0.12);
  color: var(--marketing-blue);
  font-style: normal;
  font-weight: 880;
}

.marketing-coordinate-room .hp {
  left: 42px;
  top: 56px;
  width: 136px;
  height: 76px;
}

.marketing-coordinate-room .cyl {
  right: 68px;
  top: 54px;
  width: 82px;
  height: 152px;
}

.marketing-coordinate-room .pump {
  left: 230px;
  bottom: 66px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
}

.marketing-coordinate-room .pipe {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(0, 113, 227, 0.18), rgba(90, 200, 250, 0.30));
}

.marketing-coordinate-room .one {
  left: 150px;
  top: 95px;
  width: 250px;
}

.marketing-coordinate-room .two {
  left: 260px;
  top: 180px;
  width: 176px;
  transform: rotate(90deg);
}

.marketing-coordinate-room .three {
  left: 92px;
  bottom: 94px;
  width: 190px;
}

.marketing-export-sheet {
  display: grid;
  gap: 12px;
  padding: 26px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 22px 54px rgba(15, 23, 42, 0.10);
}

.marketing-export-sheet strong {
  color: var(--marketing-text);
  font-size: 32px;
}

.marketing-export-sheet span {
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(0, 113, 227, 0.16), transparent 42%),
    rgba(0, 0, 0, 0.045);
  color: rgba(29, 29, 31, 0.74);
  font-size: 13px;
  font-weight: 760;
}

.marketing-export-sheet small {
  color: var(--marketing-muted);
  font-size: 15px;
  font-weight: 650;
}

.marketing-visual-select > .marketing-actual-ui-capture,
.marketing-visual-coordinate > .marketing-actual-ui-capture,
.marketing-visual-export > .marketing-actual-ui-capture {
  min-height: 360px;
  border-radius: 18px;
  box-shadow: 0 24px 58px rgba(12, 18, 28, 0.11);
}

.marketing-visual-select > .marketing-actual-ui-capture img,
.marketing-visual-export > .marketing-actual-ui-capture img {
  object-position: left top;
}

.marketing-visual-coordinate > .marketing-actual-ui-capture img {
  object-position: center;
}

.marketing-workflow,
.marketing-connected,
.marketing-start {
  padding: 110px 0;
  text-align: center;
}

.marketing-flow-line {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 48px;
}

.marketing-flow-line::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 35px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 113, 227, 0.34), transparent);
}

.marketing-flow-line span {
  position: relative;
  min-height: 118px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 20px 12px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 18px 42px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
}

.marketing-flow-line strong {
  color: var(--marketing-text);
  font-size: 17px;
}

.marketing-flow-line small {
  color: var(--marketing-muted);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 650;
}

.marketing-connected-visual {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  margin-top: 48px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 50%, rgba(0, 113, 227, 0.11), transparent 58%),
    rgba(255, 255, 255, 0.58);
  box-shadow: var(--marketing-shadow);
  backdrop-filter: blur(28px) saturate(170%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
}

.marketing-connected-visual span {
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 152px;
  padding: 18px 12px;
  border: 1px solid rgba(0, 113, 227, 0.10);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--marketing-blue);
  animation: marketingFloat 7.5s ease-in-out calc(var(--i) * 150ms) infinite;
}

.marketing-connected-visual svg {
  width: 32px;
  height: 32px;
}

.marketing-connected-visual strong {
  color: var(--marketing-text);
  font-size: 14px;
}

.marketing-start {
  width: min(1040px, calc(100vw - 40px));
  margin-bottom: 90px;
  padding: 92px 30px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 34px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(244, 250, 255, 0.58)),
    rgba(255, 255, 255, 0.64);
  box-shadow: var(--marketing-shadow);
  backdrop-filter: blur(28px) saturate(170%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
}

.marketing-start .marketing-hero-actions {
  margin-top: 28px;
}

.auth-gate-close {
  position: absolute;
  top: 14px;
  right: 14px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(0, 0, 0, 0.075);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.64);
  color: #6e6e73;
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
}

.auth-gate-close:hover {
  color: #1d1d1f;
  border-color: rgba(0, 113, 227, 0.20);
}

@keyframes marketingFadeUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes marketingFloat {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -10px;
  }
}

@keyframes marketingGlow {
  0%,
  100% {
    opacity: 0.78;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.04);
  }
}

@keyframes marketingLineDraw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes marketingBarIn {
  from {
    width: 0;
  }
}

@media (max-width: 1080px) {
  .marketing-hero h1 {
    font-size: 58px;
  }

  .marketing-hero p,
  .marketing-theme-copy p {
    font-size: 20px;
  }

  .marketing-product-stage {
    min-height: 650px;
  }

  .marketing-product-main {
    width: min(760px, 92vw);
  }

  .marketing-product-heat {
    left: 4%;
    top: 430px;
  }

  .marketing-product-library {
    right: 3%;
    top: 412px;
  }

  .marketing-product-plant {
    display: none;
  }

  .marketing-theme-section,
  .marketing-theme-section.reverse {
    grid-template-columns: 1fr;
    gap: 30px;
    min-height: 0;
  }

  .marketing-theme-section.reverse .marketing-theme-copy {
    order: 0;
  }

  .marketing-theme-copy h2,
  .marketing-intro h2,
  .marketing-workflow h2,
  .marketing-connected h2,
  .marketing-start h2 {
    font-size: 48px;
  }
}

@media (max-width: 760px) {
  .marketing-nav {
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding-inline: 14px;
  }

  .marketing-nav-links {
    display: none;
  }

  .marketing-link-button {
    display: none;
  }

  .marketing-cta-small {
    min-height: 32px;
    padding-inline: 12px;
    font-size: 12px;
  }

  .marketing-hero {
    min-height: auto;
    padding-top: 54px;
  }

  .marketing-hero h1 {
    font-size: 42px;
  }

  .marketing-hero p,
  .marketing-intro p,
  .marketing-workflow p,
  .marketing-connected p,
  .marketing-start p,
  .marketing-theme-copy p {
    font-size: 18px;
  }

  .marketing-product-stage {
    width: calc(100vw - 24px);
    min-height: 600px;
  }

  .marketing-product-main {
    left: 0;
    width: 100%;
    height: 360px;
    transform: none;
  }

  .marketing-product-heat,
  .marketing-product-library {
    width: calc(50% - 10px);
    top: 386px;
    transform: none;
  }

  .marketing-product-heat {
    left: 0;
  }

  .marketing-product-library {
    right: 0;
  }

  .marketing-product-window {
    border-radius: 18px;
  }

  .marketing-app-topbar span {
    display: none;
  }

  .marketing-app-body {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .marketing-app-panel {
    display: none;
  }

  .marketing-app-tools {
    padding-inline: 5px;
  }

  .marketing-app-tools small {
    max-width: 48px;
    font-size: 8px;
  }

  .marketing-theme-strip {
    top: 56px;
    width: calc(100vw - 20px);
    overflow: auto;
    grid-template-columns: repeat(6, minmax(92px, 1fr));
    border-radius: 18px;
  }

  .marketing-intro {
    padding-top: 76px;
  }

  .marketing-theme-copy h2,
  .marketing-intro h2,
  .marketing-workflow h2,
  .marketing-connected h2,
  .marketing-start h2 {
    font-size: 38px;
  }

  .marketing-theme-section,
  .marketing-workflow,
  .marketing-connected,
  .marketing-start {
    width: calc(100vw - 28px);
    padding-block: 56px;
  }

  .marketing-theme-visual {
    min-height: 330px;
    border-radius: 18px;
  }

  .marketing-visual-plan .marketing-floorplan {
    height: 330px;
  }

  .marketing-flow-line,
  .marketing-connected-visual {
    grid-template-columns: 1fr;
  }

  .marketing-flow-line::before {
    display: none;
  }

  .marketing-start {
    margin-bottom: 36px;
    border-radius: 24px;
  }
}

@media (max-width: 520px) {
  .marketing-product-stage {
    min-height: 760px;
  }

  .marketing-product-heat,
  .marketing-product-library {
    width: 100%;
  }

  .marketing-product-library {
    top: 594px;
  }

  .marketing-hero-actions {
    width: 100%;
  }

  .marketing-hero-actions button {
    width: min(300px, 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .marketing-page *,
  .marketing-page *::before,
  .marketing-page *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

/*
 * Marketing components added after the original landing page.
 *
 * Keep these rules in a lower-priority cascade layer so their journey,
 * persona, beta and example components remain available without allowing the
 * later editorial experiment to replace the classic unlayered landing skin.
 */
@layer marketing-components {
.marketing-shell {
  background:
    radial-gradient(circle at 74% 16%, rgba(0, 113, 227, 0.08), transparent 26%),
    linear-gradient(180deg, #f4f4f2 0%, #fafafa 52%, #ffffff 100%);
}

.marketing-page {
  --marketing-blue: #0878ff;
  --marketing-ink: #050505;
  --marketing-text: #101114;
  --marketing-muted: #656972;
  --marketing-paper: #f4f4f2;
  --marketing-panel: rgba(255, 255, 255, 0.72);
  --marketing-line: rgba(16, 17, 20, 0.105);
  --marketing-shadow: 0 30px 90px rgba(12, 18, 28, 0.12);
  background:
    linear-gradient(90deg, rgba(16, 17, 20, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(16, 17, 20, 0.035) 1px, transparent 1px);
  background-size: 76px 76px;
}

.marketing-nav {
  grid-template-columns: minmax(148px, 1fr) auto minmax(250px, 1fr);
  min-height: 76px;
  padding: 12px max(28px, calc((100vw - 1280px) / 2));
  border-bottom-color: rgba(16, 17, 20, 0.075);
  background: rgba(244, 244, 242, 0.82);
}

.marketing-brand .brand-logo-wordmark {
  width: 142px;
  height: 32px;
}

.marketing-nav-links {
  gap: 38px;
}

.marketing-nav-links a,
.marketing-link-button {
  color: rgba(16, 17, 20, 0.76);
  font-size: 14px;
  font-weight: 740;
}

.marketing-nav-status {
  color: rgba(16, 17, 20, 0.64);
  font-size: 13px;
  font-weight: 820;
  white-space: nowrap;
}

.marketing-cta,
.marketing-secondary,
.marketing-beta-form button {
  border-radius: 18px;
  letter-spacing: 0;
}

.marketing-cta {
  background: linear-gradient(180deg, #1688ff 0%, #006de8 100%);
  color: #ffffff;
  box-shadow: 0 16px 36px rgba(0, 113, 227, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.marketing-cta:hover {
  background: linear-gradient(180deg, #3298ff 0%, #0579ff 100%);
  box-shadow: 0 18px 44px rgba(0, 113, 227, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.marketing-beta-form button {
  background: #070707;
  color: #ffffff;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.marketing-beta-form button:hover {
  background: #1b1b1d;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.marketing-secondary {
  background: rgba(255, 255, 255, 0.74);
  border-color: rgba(16, 17, 20, 0.12);
  color: #111114;
  box-shadow: 0 12px 32px rgba(12, 18, 28, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.marketing-hero {
  min-height: calc(100svh - 76px);
  grid-template-columns: minmax(0, 0.92fr) minmax(560px, 1.08fr);
  align-items: center;
  justify-content: center;
  gap: clamp(26px, 4vw, 74px);
  padding: 68px max(28px, calc((100vw - 1280px) / 2)) 42px;
}

.marketing-hero-copy {
  justify-items: start;
  text-align: left;
}

.marketing-hero h1 {
  max-width: 720px;
  color: var(--marketing-ink);
  font-size: clamp(64px, 6vw, 112px);
  line-height: 0.9;
  font-weight: 930;
}

.marketing-hero p {
  max-width: 620px;
  color: rgba(16, 17, 20, 0.70);
  font-size: clamp(20px, 1.8vw, 28px);
  line-height: 1.18;
  font-weight: 620;
}

.marketing-beta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 14px;
  margin-top: 4px;
}

.marketing-beta-row strong {
  color: #0a0a0c;
  font-size: 18px;
  font-weight: 900;
}

.marketing-beta-row span {
  color: var(--marketing-muted);
  font-size: 14px;
  font-weight: 740;
}

.marketing-beta-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  width: min(520px, 100%);
  margin-top: 8px;
  padding: 7px;
  border: 1px solid rgba(16, 17, 20, 0.12);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 44px rgba(12, 18, 28, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.marketing-beta-form input {
  min-width: 0;
  min-height: 48px;
  padding: 0 16px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: #101114;
  font-size: 15px;
  font-weight: 760;
  outline: none;
}

.marketing-beta-form input::placeholder {
  color: rgba(16, 17, 20, 0.46);
}

.marketing-beta-form button {
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  font-size: 15px;
  font-weight: 860;
  cursor: pointer;
}

.marketing-beta-message {
  margin: 0;
  color: #0b6f37;
  font-size: 14px;
  font-weight: 820;
}

.marketing-hero .marketing-hero-actions {
  justify-content: flex-start;
}

.marketing-product-stage {
  width: min(690px, 100%);
  min-height: 650px;
}

.marketing-product-glow {
  left: 54%;
  top: 48%;
  width: 620px;
  height: 430px;
  background:
    radial-gradient(circle, rgba(0, 113, 227, 0.12), transparent 58%),
    radial-gradient(circle at 72% 42%, rgba(52, 199, 89, 0.12), transparent 34%);
}

.marketing-product-window {
  border-color: rgba(255, 255, 255, 0.86);
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(247, 250, 255, 0.68)),
    rgba(255, 255, 255, 0.80);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    0 30px 78px rgba(12, 18, 28, 0.14);
}

.marketing-product-main {
  left: 4%;
  top: 42px;
  width: min(610px, 92vw);
  height: 382px;
  transform: rotateX(7deg) rotateY(-7deg);
}

.marketing-product-heat {
  left: 0;
  top: 396px;
  width: 246px;
  transform: rotateY(7deg) translateZ(34px);
}

.marketing-product-library {
  right: 0;
  top: 346px;
  width: 282px;
  transform: rotateY(-8deg) translateZ(44px);
}

.marketing-product-plant {
  right: 126px;
  bottom: 10px;
  width: 246px;
}

.marketing-theme-strip {
  top: 76px;
  border-color: rgba(16, 17, 20, 0.10);
  background: rgba(250, 250, 249, 0.82);
}

.marketing-section,
.marketing-theme-section,
.marketing-journey,
.marketing-why,
.marketing-workflow,
.marketing-connected,
.marketing-start,
.marketing-examples {
  width: min(1240px, calc(100vw - 48px));
}

.marketing-section-head {
  display: grid;
  justify-items: center;
  gap: 14px;
  max-width: 760px;
  margin: 0 auto 38px;
  text-align: center;
}

.marketing-section-head h2,
.marketing-intro h2,
.marketing-workflow h2,
.marketing-connected h2,
.marketing-start h2 {
  color: var(--marketing-ink);
  font-size: clamp(42px, 5vw, 78px);
  line-height: 0.96;
  font-weight: 930;
}

.marketing-section-head p,
.marketing-intro p,
.marketing-workflow p,
.marketing-connected p,
.marketing-start p {
  color: rgba(16, 17, 20, 0.68);
  font-size: clamp(18px, 1.7vw, 23px);
  font-weight: 620;
}

.marketing-intro {
  padding: 74px 0 52px;
}

.marketing-audience-line span,
.marketing-audience-line a,
.marketing-persona-nav a {
  border-color: rgba(16, 17, 20, 0.10);
  background: rgba(255, 255, 255, 0.72);
  color: rgba(16, 17, 20, 0.72);
}

.marketing-journey {
  padding: 96px 0 54px;
}

.marketing-journey-rail {
  position: relative;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
}

.marketing-journey-rail::before {
  content: "";
  position: absolute;
  left: 5%;
  right: 5%;
  top: 27px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(0, 113, 227, 0.18), rgba(52, 199, 89, 0.30), rgba(0, 113, 227, 0.18));
}

.marketing-journey-step {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  min-height: 214px;
  padding: 16px 14px;
  border: 1px solid rgba(16, 17, 20, 0.10);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 42px rgba(12, 18, 28, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.90);
}

.marketing-journey-step small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 30px;
  border: 1px solid rgba(0, 113, 227, 0.16);
  border-radius: 999px;
  background: #ffffff;
  color: var(--marketing-blue);
  font-size: 12px;
  font-weight: 920;
}

.marketing-journey-step h3 {
  margin: 0;
  color: #101114;
  font-size: 18px;
  line-height: 1.05;
  font-weight: 930;
}

.marketing-journey-step p {
  margin: 0;
  color: rgba(16, 17, 20, 0.62);
  font-size: 13px;
  line-height: 1.34;
  font-weight: 640;
}

.marketing-examples {
  padding: 70px 0 84px;
}

.marketing-persona-page {
  background:
    radial-gradient(circle at 82% 12%, rgba(0, 113, 227, 0.12), transparent 32%),
    radial-gradient(circle at 12% 46%, rgba(52, 199, 89, 0.08), transparent 28%);
}

.marketing-persona-hero,
.marketing-persona-benefits,
.marketing-persona-workflow,
.marketing-persona-outcomes {
  width: min(1240px, calc(100vw - 48px));
  margin: 0 auto;
}

.marketing-persona-hero {
  min-height: calc(100vh - 58px);
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  align-items: center;
  gap: 56px;
  padding: 76px 0 88px;
}

.marketing-persona-copy {
  display: grid;
  gap: 18px;
}

.marketing-back-link {
  width: fit-content;
  color: var(--marketing-blue);
  font-size: 13px;
  font-weight: 840;
  text-decoration: none;
}

.marketing-persona-copy > span,
.marketing-persona-workflow-copy span {
  color: var(--marketing-blue);
  font-size: 14px;
  font-weight: 880;
  letter-spacing: 0;
}

.marketing-persona-copy h1,
.marketing-persona-workflow-copy h2,
.marketing-persona-outcomes h2 {
  margin: 0;
  color: var(--marketing-ink, #101114);
  font-size: clamp(52px, 6vw, 92px);
  line-height: 0.95;
  font-weight: 950;
  letter-spacing: 0;
}

.marketing-persona-copy p,
.marketing-persona-workflow-copy p {
  max-width: 660px;
  margin: 0;
  color: rgba(16, 17, 20, 0.68);
  font-size: clamp(18px, 1.7vw, 24px);
  line-height: 1.32;
  font-weight: 620;
}

.marketing-persona-copy > strong {
  max-width: 560px;
  color: #101114;
  font-size: 18px;
  line-height: 1.28;
  font-weight: 860;
}

.marketing-persona-visual {
  min-height: 520px;
  padding: 16px;
  border: 1px solid rgba(16, 17, 20, 0.10);
  border-radius: 28px;
  background:
    linear-gradient(rgba(0, 113, 227, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 113, 227, 0.055) 1px, transparent 1px),
    rgba(255, 255, 255, 0.74);
  background-size: 26px 26px;
  box-shadow: 0 34px 90px rgba(12, 18, 28, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.marketing-persona-visual .marketing-actual-ui-capture {
  height: 100%;
  min-height: 488px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
}

.marketing-persona-nav {
  width: min(920px, calc(100vw - 48px));
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: -34px auto 42px;
}

.marketing-persona-benefits,
.marketing-persona-workflow,
.marketing-persona-outcomes {
  padding: 78px 0;
}

.marketing-persona-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.marketing-persona-card,
.marketing-persona-steps article {
  min-width: 0;
  padding: 24px;
  border: 1px solid rgba(16, 17, 20, 0.10);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 22px 54px rgba(12, 18, 28, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.90);
}

.marketing-persona-card h3,
.marketing-persona-steps h3 {
  margin: 0;
  color: #101114;
  font-size: 24px;
  line-height: 1.08;
  font-weight: 930;
}

.marketing-persona-card p,
.marketing-persona-steps p {
  margin: 12px 0 0;
  color: rgba(16, 17, 20, 0.64);
  font-size: 15px;
  line-height: 1.42;
  font-weight: 640;
}

.marketing-persona-workflow {
  display: grid;
  grid-template-columns: minmax(0, 0.74fr) minmax(0, 1.26fr);
  gap: 34px;
  align-items: start;
}

.marketing-persona-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.marketing-persona-steps small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 30px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: rgba(0, 113, 227, 0.11);
  color: var(--marketing-blue);
  font-size: 12px;
  font-weight: 900;
}

.marketing-persona-outcomes {
  display: grid;
  gap: 24px;
  text-align: center;
}

.marketing-persona-outcomes h2 {
  font-size: clamp(42px, 4.2vw, 68px);
}

.marketing-persona-outcomes div {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.marketing-persona-outcomes span {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border: 1px solid rgba(0, 113, 227, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
  color: rgba(16, 17, 20, 0.72);
  font-size: 14px;
  line-height: 1.25;
  font-weight: 760;
  box-shadow: 0 16px 36px rgba(12, 18, 28, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

@media (max-width: 980px) {
  .marketing-persona-hero,
  .marketing-persona-workflow {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .marketing-persona-hero {
    min-height: 0;
    padding: 62px 0 70px;
  }

  .marketing-persona-visual {
    min-height: 420px;
  }

  .marketing-persona-visual .marketing-actual-ui-capture {
    min-height: 388px;
  }

  .marketing-persona-card-grid {
    grid-template-columns: 1fr;
  }

  .marketing-persona-outcomes div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .marketing-persona-hero,
  .marketing-persona-benefits,
  .marketing-persona-workflow,
  .marketing-persona-outcomes {
    width: calc(100vw - 28px);
  }

  .marketing-persona-hero {
    padding: 44px 0 58px;
  }

  .marketing-persona-copy h1,
  .marketing-persona-workflow-copy h2,
  .marketing-persona-outcomes h2 {
    font-size: 40px;
  }

  .marketing-persona-copy p,
  .marketing-persona-workflow-copy p {
    font-size: 18px;
  }

  .marketing-persona-visual {
    min-height: 300px;
    padding: 10px;
    border-radius: 20px;
  }

  .marketing-persona-visual .marketing-actual-ui-capture {
    min-height: 280px;
    border-radius: 14px;
  }

  .marketing-persona-nav {
    width: calc(100vw - 28px);
    justify-content: flex-start;
    flex-wrap: nowrap;
    margin: -18px auto 20px;
    padding-bottom: 4px;
    overflow-x: auto;
  }

  .marketing-persona-nav a {
    white-space: nowrap;
  }

  .marketing-persona-steps,
  .marketing-persona-outcomes div {
    grid-template-columns: 1fr;
  }

  .marketing-persona-card,
  .marketing-persona-steps article {
    padding: 18px;
  }
}

.marketing-example-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.marketing-example-card {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 14px 14px 20px;
  border: 1px solid rgba(16, 17, 20, 0.10);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 24px 58px rgba(12, 18, 28, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.marketing-example-card h3 {
  margin: 0;
  color: #101114;
  font-size: 22px;
  line-height: 1.05;
  font-weight: 900;
}

.marketing-example-card p {
  margin: 0;
  color: rgba(16, 17, 20, 0.64);
  font-size: 14px;
  line-height: 1.35;
  font-weight: 680;
}

.marketing-example-visual {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border-radius: 16px;
  background:
    linear-gradient(rgba(8, 120, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8, 120, 255, 0.08) 1px, transparent 1px),
    #f8fbff;
  background-size: 22px 22px;
}

.marketing-example-visual .marketing-floorplan,
.marketing-mini-plantroom {
  width: 100%;
  height: 180px;
}

.marketing-actual-ui-capture {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(16, 17, 20, 0.08);
  border-radius: inherit;
  background: #f8fbff;
}

.marketing-actual-ui-capture img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.marketing-example-visual .marketing-actual-ui-capture {
  height: 180px;
  border: 0;
  z-index: 1;
}

.marketing-example-animation {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

.marketing-example-animation::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--marketing-example-glow-x, 52%) var(--marketing-example-glow-y, 48%), rgba(0, 113, 227, 0.16), transparent 27%);
  opacity: 0;
  animation: marketingExampleGlow 4.8s ease-in-out infinite;
}

.marketing-example-animation svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.marketing-example-room-line,
.marketing-example-pipe-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 260;
  stroke-dashoffset: 260;
  filter: drop-shadow(0 8px 14px rgba(0, 113, 227, 0.16));
}

.marketing-example-room-line {
  stroke: rgba(30, 41, 59, 0.82);
  stroke-width: 1.7;
  animation: marketingExampleLineDraw 6.2s ease-in-out infinite;
}

.marketing-example-pipe-line {
  stroke: rgba(0, 122, 255, 0.92);
  stroke-width: 2.6;
  animation: marketingExamplePipeDraw 6.2s ease-in-out infinite;
}

.marketing-example-cursor {
  position: absolute;
  width: 18px;
  height: 18px;
  clip-path: polygon(12% 0, 100% 48%, 60% 55%, 82% 100%, 63% 100%, 43% 60%, 12% 82%);
  background: #101114;
  border: 2px solid rgba(255, 255, 255, 0.92);
  filter: drop-shadow(0 12px 18px rgba(15, 23, 42, 0.26));
  transform-origin: 50% 50%;
}

.marketing-example-cursor::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 7px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(0, 113, 227, 0.22);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.4);
  animation: marketingExampleCursorClick 6.2s ease-in-out infinite;
}

.marketing-example-animation-floor {
  --marketing-example-glow-x: 65%;
  --marketing-example-glow-y: 47%;
}

.marketing-example-animation-floor .marketing-example-cursor {
  animation: marketingExampleCursorFloor 6.2s ease-in-out infinite;
}

.marketing-example-pulse {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 3px solid rgba(0, 122, 255, 0.95);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 10px rgba(0, 122, 255, 0.13);
  animation: marketingExamplePointPulse 6.2s ease-in-out infinite;
}

.marketing-example-pulse-a {
  left: 27%;
  top: 61%;
}

.marketing-example-pulse-b {
  left: 74%;
  top: 42%;
  animation-delay: 1.4s;
}

.marketing-example-noise-ring {
  position: absolute;
  left: 52%;
  top: 46%;
  width: 74px;
  height: 74px;
  border-radius: 999px;
  border: 4px solid rgba(255, 59, 48, 0.38);
  background: radial-gradient(circle, rgba(255, 149, 0, 0.26), rgba(255, 59, 48, 0.10) 48%, transparent 68%);
  transform: translate(-50%, -50%) scale(0.3);
  animation: marketingExampleNoiseSpread 5.8s ease-out infinite;
}

.marketing-example-noise-ring.ring-b {
  border-color: rgba(52, 199, 89, 0.34);
  background: radial-gradient(circle, rgba(52, 199, 89, 0.18), transparent 68%);
  animation-delay: 1.25s;
}

.marketing-example-barrier-line {
  position: absolute;
  left: 26%;
  top: 58%;
  width: 48%;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(16, 17, 20, 0.34), rgba(16, 17, 20, 0.74), rgba(16, 17, 20, 0.34));
  transform: rotate(-8deg) scaleX(0.35);
  transform-origin: left center;
  animation: marketingExampleBarrierIn 5.8s ease-in-out infinite;
}

.marketing-example-animation-plant .marketing-example-cursor {
  animation: marketingExampleCursorPlant 5.8s ease-in-out infinite;
}

.marketing-example-focus-box {
  position: absolute;
  border: 3px solid rgba(0, 122, 255, 0.90);
  border-radius: 14px;
  background: rgba(0, 122, 255, 0.08);
  box-shadow: 0 16px 26px rgba(0, 113, 227, 0.14);
  opacity: 0;
  animation: marketingExampleFocus 6s ease-in-out infinite;
}

.marketing-example-focus-box.focus-a {
  left: 8%;
  top: 19%;
  width: 38%;
  height: 42%;
}

.marketing-example-focus-box.focus-b {
  left: 52%;
  top: 24%;
  width: 34%;
  height: 36%;
  animation-delay: 1.8s;
}

.marketing-example-scan-line {
  position: absolute;
  left: 8%;
  top: 18%;
  width: 80%;
  height: 2px;
  border-radius: 999px;
  background: rgba(0, 122, 255, 0.90);
  box-shadow: 0 0 18px rgba(0, 122, 255, 0.50);
  opacity: 0;
  animation: marketingExampleScan 6s ease-in-out infinite;
}

.marketing-example-animation-library .marketing-example-cursor {
  animation: marketingExampleCursorLibrary 6s ease-in-out infinite;
}

.marketing-example-price-row {
  position: absolute;
  left: 12%;
  width: 58%;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(0, 122, 255, 0.88), rgba(52, 199, 89, 0.80));
  box-shadow: 0 11px 24px rgba(0, 113, 227, 0.16);
  transform: scaleX(0.12);
  transform-origin: left center;
  opacity: 0;
  animation: marketingExamplePriceRow 5.6s ease-in-out infinite;
}

.marketing-example-price-row.row-a {
  top: 31%;
}

.marketing-example-price-row.row-b {
  top: 45%;
  width: 64%;
  animation-delay: 0.55s;
}

.marketing-example-price-row.row-c {
  top: 59%;
  width: 48%;
  animation-delay: 1.1s;
}

.marketing-example-total-pill {
  position: absolute;
  right: 10%;
  bottom: 17%;
  width: 32%;
  height: 18px;
  border: 2px solid rgba(52, 199, 89, 0.58);
  border-radius: 999px;
  background: rgba(52, 199, 89, 0.15);
  box-shadow: 0 14px 28px rgba(52, 199, 89, 0.12);
  opacity: 0;
  transform: translateY(8px);
  animation: marketingExampleTotal 5.6s ease-in-out infinite;
}

.marketing-example-animation-pricing .marketing-example-cursor {
  animation: marketingExampleCursorPricing 5.6s ease-in-out infinite;
}

@keyframes marketingExampleGlow {
  18%, 78% {
    opacity: 1;
  }
}

@keyframes marketingExampleLineDraw {
  8% {
    stroke-dashoffset: 260;
  }
  38%, 88% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes marketingExamplePipeDraw {
  24% {
    stroke-dashoffset: 260;
  }
  58%, 88% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes marketingExampleCursorFloor {
  0%, 100% {
    left: 16%;
    top: 69%;
    transform: rotate(-12deg) scale(0.94);
  }
  34% {
    left: 76%;
    top: 21%;
    transform: rotate(-6deg) scale(1);
  }
  64% {
    left: 66%;
    top: 46%;
    transform: rotate(-8deg) scale(0.98);
  }
}

@keyframes marketingExampleCursorPlant {
  0%, 100% {
    left: 18%;
    top: 67%;
    transform: rotate(-13deg);
  }
  40% {
    left: 55%;
    top: 43%;
    transform: rotate(-5deg);
  }
  72% {
    left: 75%;
    top: 54%;
    transform: rotate(-10deg);
  }
}

@keyframes marketingExampleCursorLibrary {
  0%, 100% {
    left: 17%;
    top: 71%;
    transform: rotate(-13deg);
  }
  44% {
    left: 39%;
    top: 38%;
    transform: rotate(-7deg);
  }
  76% {
    left: 71%;
    top: 42%;
    transform: rotate(-9deg);
  }
}

@keyframes marketingExampleCursorPricing {
  0%, 100% {
    left: 14%;
    top: 73%;
    transform: rotate(-13deg);
  }
  42% {
    left: 58%;
    top: 45%;
    transform: rotate(-6deg);
  }
  76% {
    left: 82%;
    top: 74%;
    transform: rotate(-9deg);
  }
}

@keyframes marketingExampleCursorClick {
  34%, 42%, 70%, 78% {
    opacity: 0.82;
    transform: translate(-50%, -50%) scale(1.6);
  }
  46%, 82% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.5);
  }
}

@keyframes marketingExamplePointPulse {
  0%, 18%, 100% {
    opacity: 0;
    transform: scale(0.5);
  }
  32%, 72% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes marketingExampleNoiseSpread {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.32);
  }
  22% {
    opacity: 0.92;
  }
  72%, 100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.05);
  }
}

@keyframes marketingExampleBarrierIn {
  0%, 26%, 100% {
    opacity: 0;
    transform: rotate(-8deg) scaleX(0.35);
  }
  44%, 82% {
    opacity: 1;
    transform: rotate(-8deg) scaleX(1);
  }
}

@keyframes marketingExampleFocus {
  0%, 22%, 100% {
    opacity: 0;
    transform: scale(0.92);
  }
  36%, 72% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes marketingExampleScan {
  0%, 12%, 100% {
    opacity: 0;
    transform: translateY(0);
  }
  24% {
    opacity: 1;
  }
  70% {
    opacity: 1;
    transform: translateY(72px);
  }
  82% {
    opacity: 0;
    transform: translateY(84px);
  }
}

@keyframes marketingExamplePriceRow {
  0%, 16%, 100% {
    opacity: 0;
    transform: scaleX(0.12);
  }
  34%, 82% {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes marketingExampleTotal {
  0%, 42%, 100% {
    opacity: 0;
    transform: translateY(8px);
  }
  60%, 84% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .marketing-example-animation,
  .marketing-example-animation *,
  .marketing-example-animation::before {
    animation: none !important;
  }

  .marketing-example-animation {
    opacity: 0.78;
  }

  .marketing-example-room-line,
  .marketing-example-pipe-line {
    stroke-dashoffset: 0;
  }

  .marketing-example-focus-box.focus-a,
  .marketing-example-price-row.row-a,
  .marketing-example-total-pill {
    opacity: 1;
    transform: none;
  }
}

.marketing-example-visual .marketing-capture-productLibrary img,
.marketing-example-visual .marketing-capture-pricing img,
.marketing-product-window .hero-library img,
.marketing-product-window .hero-pricing img {
  object-position: left top;
}

.marketing-product-window .marketing-actual-ui-capture {
  height: calc(100% - 44px);
  border: 0;
  border-radius: 0 0 24px 24px;
}

.marketing-product-heat,
.marketing-product-library {
  height: 228px;
}

.marketing-product-plant {
  height: 178px;
}

.marketing-mini-product-browser,
.marketing-mini-schedule {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.marketing-mini-product-browser header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 2px 0;
}

.marketing-mini-product-browser header strong {
  color: #101114;
  font-size: 13px;
  font-weight: 950;
}

.marketing-mini-product-browser header span {
  color: var(--marketing-muted);
  font-size: 10px;
  font-weight: 850;
}

.marketing-mini-product-card,
.marketing-mini-product-list span,
.marketing-mini-schedule header,
.marketing-mini-schedule div,
.marketing-mini-product-specs span {
  border: 1px solid rgba(16, 17, 20, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
}

.marketing-mini-product-card {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 12px;
  text-align: center;
}

.marketing-mini-product-card img {
  width: 128px;
  height: 58px;
  object-fit: contain;
}

.marketing-mini-product-card strong,
.marketing-mini-product-list b {
  color: #101114;
  font-size: 13px;
  font-weight: 900;
}

.marketing-mini-product-card span,
.marketing-mini-product-list small {
  color: var(--marketing-muted);
  font-size: 10px;
  font-weight: 720;
}

.marketing-mini-product-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.marketing-mini-product-specs span {
  display: grid;
  gap: 1px;
  padding: 7px 8px;
}

.marketing-mini-product-specs b {
  color: var(--marketing-muted);
  font-size: 9px;
  font-weight: 820;
}

.marketing-mini-product-specs em {
  color: #101114;
  font-size: 11px;
  font-style: normal;
  font-weight: 920;
}

.marketing-mini-cop-graph {
  width: 100%;
  height: 72px;
  border: 1px solid rgba(16, 17, 20, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.74);
}

.marketing-mini-cop-graph path {
  fill: none;
  stroke: rgba(16, 17, 20, 0.22);
  stroke-width: 2;
}

.marketing-mini-cop-graph .grid {
  stroke: rgba(16, 17, 20, 0.07);
  stroke-width: 1;
}

.marketing-mini-cop-graph .line {
  stroke: #0071e3;
  stroke-width: 4;
  stroke-linecap: round;
}

.marketing-mini-cop-graph circle {
  fill: #0071e3;
  stroke: #ffffff;
  stroke-width: 3;
}

.marketing-mini-cop-graph text {
  fill: var(--marketing-muted);
  font-size: 10px;
  font-weight: 780;
}

.marketing-mini-product-list {
  display: grid;
  gap: 6px;
}

.marketing-mini-product-list span {
  display: grid;
  gap: 1px;
  padding: 8px 10px;
}

.marketing-mini-schedule header,
.marketing-mini-schedule div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
}

.marketing-mini-schedule strong,
.marketing-mini-schedule span {
  color: #101114;
  font-size: 12px;
  font-weight: 900;
}

.marketing-mini-schedule b,
.marketing-mini-schedule em,
.marketing-mini-schedule header span,
.marketing-mini-schedule small {
  color: var(--marketing-blue);
  font-size: 11px;
  font-style: normal;
  font-weight: 860;
}

.marketing-mini-schedule small {
  color: #0b6f37;
}

.marketing-theme-section {
  min-height: 610px;
}

.marketing-theme-copy span {
  color: #101114;
  font-size: 18px;
  font-weight: 900;
}

.marketing-theme-copy h2 {
  color: var(--marketing-ink);
  font-size: clamp(44px, 5vw, 76px);
  font-weight: 930;
}

.marketing-theme-copy p {
  color: rgba(16, 17, 20, 0.67);
  font-weight: 620;
}

.marketing-workflow,
.marketing-connected,
.marketing-why,
.marketing-start {
  padding: 96px 0;
}

.marketing-flow-line span,
.marketing-connected-visual,
.marketing-connected-visual span,
.marketing-theme-visual,
.marketing-start {
  border-color: rgba(16, 17, 20, 0.10);
}

.marketing-why {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  align-items: start;
  gap: 32px;
}

.marketing-why-copy {
  position: sticky;
  top: 132px;
}

.marketing-why-copy h2 {
  margin: 0;
  color: var(--marketing-ink);
  font-size: clamp(42px, 5vw, 78px);
  line-height: 0.96;
  font-weight: 930;
}

.marketing-why-copy p {
  max-width: 530px;
  margin: 20px 0 0;
  color: rgba(16, 17, 20, 0.68);
  font-size: clamp(18px, 1.7vw, 23px);
  line-height: 1.36;
  font-weight: 620;
}

.marketing-why-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.marketing-why-grid article {
  min-height: 208px;
  padding: 24px;
  border: 1px solid rgba(16, 17, 20, 0.10);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 22px 54px rgba(12, 18, 28, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.90);
}

.marketing-why-grid h3 {
  margin: 0;
  color: #101114;
  font-size: 25px;
  line-height: 1.05;
  font-weight: 930;
}

.marketing-why-grid p {
  margin: 14px 0 0;
  color: rgba(16, 17, 20, 0.64);
  font-size: 15px;
  line-height: 1.42;
  font-weight: 640;
}

.marketing-start {
  margin-bottom: 74px;
  background:
    radial-gradient(circle at 78% 22%, rgba(8, 120, 255, 0.10), transparent 32%),
    rgba(255, 255, 255, 0.82);
}

.marketing-start .marketing-beta-form {
  margin: 28px auto 0;
}

.marketing-start small {
  display: block;
  margin-top: 18px;
  color: rgba(16, 17, 20, 0.62);
  font-size: 14px;
  font-weight: 720;
}

.marketing-start a {
  color: #101114;
  font-weight: 900;
}

@media (max-width: 1080px) {
  .marketing-hero {
    grid-template-columns: 1fr;
  }

  .marketing-product-stage {
    width: min(760px, 100%);
    margin-inline: auto;
  }

  .marketing-example-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .marketing-journey-rail {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .marketing-journey-rail::before {
    display: none;
  }

  .marketing-why {
    grid-template-columns: 1fr;
  }

  .marketing-why-copy {
    position: static;
  }
}

@media (max-width: 760px) {
  .marketing-nav {
    top: 0;
    grid-template-columns: 1fr auto;
    min-height: 64px;
  }

  .marketing-nav-status {
    display: none;
  }

  .marketing-hero {
    padding: 42px 18px 32px;
  }

  .marketing-hero-copy {
    justify-items: center;
    text-align: center;
  }

  .marketing-hero .marketing-hero-actions {
    justify-content: center;
  }

  .marketing-beta-form {
    grid-template-columns: 1fr;
    border-radius: 20px;
  }

  .marketing-beta-form button {
    width: 100%;
  }

  .marketing-product-stage {
    min-height: 720px;
  }

  .marketing-product-main {
    left: 0;
    width: 100%;
    transform: none;
  }

  .marketing-product-heat,
  .marketing-product-library,
  .marketing-product-plant {
    transform: none;
  }

  .marketing-product-heat {
    top: 416px;
  }

  .marketing-product-library {
    top: 416px;
  }

  .marketing-product-plant {
    display: block;
    left: 50%;
    right: auto;
    bottom: 0;
    transform: translateX(-50%);
  }

  .marketing-theme-strip {
    top: 64px;
    grid-template-columns: repeat(6, minmax(112px, 1fr));
  }

  .marketing-example-grid {
    grid-template-columns: 1fr;
  }

  .marketing-journey,
  .marketing-why {
    width: calc(100vw - 28px);
    padding-block: 56px;
  }

  .marketing-journey-rail,
  .marketing-why-grid {
    grid-template-columns: 1fr;
  }

  .marketing-journey-step {
    min-height: 0;
    padding: 18px;
  }

  .marketing-why-copy h2 {
    font-size: 38px;
  }

  .marketing-why-grid article {
    min-height: 0;
    padding: 18px;
  }
}

@media (max-width: 520px) {
  .marketing-product-stage {
    min-height: 930px;
  }

  .marketing-product-heat,
  .marketing-product-library,
  .marketing-product-plant {
    left: 0;
    right: auto;
    width: 100%;
  }

  .marketing-product-library {
    top: 626px;
  }

  .marketing-product-plant {
    top: 812px;
    bottom: auto;
    transform: none;
  }
}
}

/* Classic-skin treatment for beta controls that do not exist in the original landing. */
.marketing-nav-status {
  color: var(--marketing-muted);
  font-size: 13px;
  font-weight: 720;
  white-space: nowrap;
}

.marketing-beta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 10px 14px;
  margin-top: 4px;
}

.marketing-beta-row strong {
  color: var(--marketing-text);
  font-size: 18px;
  font-weight: 840;
}

.marketing-beta-row span {
  color: var(--marketing-muted);
  font-size: 14px;
  font-weight: 650;
}

.marketing-beta-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 8px;
  width: min(520px, 100%);
  margin-top: 8px;
  padding: 6px;
  border: 1px solid rgba(0, 113, 227, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.90), 0 14px 34px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
}

.marketing-beta-form input {
  min-width: 0;
  min-height: 46px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  outline: none;
  background: transparent;
  color: var(--marketing-text);
  font-size: 15px;
  font-weight: 650;
}

.marketing-beta-form input::placeholder {
  color: rgba(29, 29, 31, 0.46);
}

.marketing-beta-form button {
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #0a84ff, var(--marketing-blue));
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(0, 113, 227, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.30);
  font-size: 15px;
  font-weight: 760;
  cursor: pointer;
}

.marketing-beta-form button:hover {
  background: linear-gradient(180deg, #1d91ff, #0077ed);
}

.marketing-beta-message {
  margin: 0;
  color: #0b6f37;
  font-size: 14px;
  font-weight: 760;
}

.marketing-start .marketing-beta-form {
  margin: 28px auto 0;
}

@media (max-width: 760px) {
  .marketing-beta-form {
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

  .marketing-beta-form button {
    width: 100%;
  }
}

.workspace.pricing-portal-workspace-shell {
  grid-template-columns: minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  padding: 6px;
  overflow: hidden;
}

.pricing-portal-workspace {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  padding: 7px;
  overflow: hidden;
  color: var(--text);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(245, 247, 251, 0.86));
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--glass-edge), 0 12px 30px rgba(15, 23, 42, 0.07);
  font-size: 11.5px;
  line-height: 1.24;
}

.pricing-portal-header,
.pricing-portal-controls,
.pricing-portal-footer {
  display: flex;
  flex: 0 0 auto;
  align-items: stretch;
  justify-content: space-between;
  gap: 7px;
  min-width: 0;
}

.pricing-portal-header {
  align-items: center;
  padding: 6px 8px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.pricing-portal-header span,
.pricing-portal-controls span,
.pricing-portal-footer span,
.pricing-portal-summary span,
.pricing-portal-basis {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 850;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.pricing-portal-header h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0;
}

.pricing-portal-header p,
.pricing-portal-footer small,
.pricing-portal-summary small,
.pricing-portal-section-head small {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
}

.pricing-portal-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.pricing-portal-header-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  max-width: 170px;
  padding: 6px 11px;
  overflow: hidden;
  color: var(--blue);
  font: inherit;
  font-size: 11.5px;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.28);
  border-radius: 10px;
  box-shadow: var(--glass-edge);
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.pricing-portal-header-action.primary {
  color: #ffffff;
  background: linear-gradient(135deg, #1d78ff, #4a8df8);
  border-color: rgba(37, 99, 235, 0.46);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.16);
}

.pricing-portal-header-action:hover {
  border-color: var(--blue-border);
  background: var(--control-hover-bg);
  box-shadow: var(--control-hover-shadow), 0 0 0 3px var(--blue-soft);
  transform: translateY(-1px);
}

.pricing-portal-header-action.primary:hover {
  color: #ffffff;
  background: linear-gradient(135deg, #1269e8, #347ff1);
}

.pricing-portal-header-actions label,
.pricing-portal-controls label {
  display: grid;
  gap: 3px;
  min-width: 118px;
}

.pricing-portal-controls label {
  min-width: 0;
}

.pricing-portal-header-actions input,
.pricing-portal-header-actions select,
.pricing-portal-controls input,
.pricing-portal-controls select,
.pricing-portal-product-select {
  width: 100%;
  min-height: 32px;
  padding: 5px 8px;
  color: var(--text);
  font: inherit;
  font-size: 11.5px;
  font-weight: 780;
  background: var(--input-glass);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  outline: none;
}

.pricing-portal-header-actions input:focus,
.pricing-portal-header-actions select:focus,
.pricing-portal-controls input:focus,
.pricing-portal-controls select:focus,
.pricing-portal-product-select:focus,
.pricing-portal-labour-toolbar input:focus,
.pricing-portal-labour-toolbar select:focus,
.pricing-portal-labour-table input:focus {
  border-color: var(--blue-border);
  box-shadow: 0 0 0 3px var(--blue-soft);
}

.pricing-portal-rate-control {
  min-width: 196px !important;
}

.pricing-portal-rate-control small {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.25;
}

.pricing-portal-rate-row {
  display: grid;
  grid-template-columns: minmax(76px, 1fr) 74px;
  gap: 4px;
  min-width: 0;
}

.pricing-portal-rate-menu-wrap {
  position: relative;
  display: flex;
  align-self: stretch;
  min-width: 0;
}

.pricing-portal-rate-menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 168px;
  min-height: 36px;
  padding: 5px 8px;
  color: var(--text);
  text-align: left;
  background: var(--surface-solid);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: var(--glass-edge);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.pricing-portal-rate-menu-toggle:hover,
.pricing-portal-rate-menu-toggle.active {
  border-color: var(--blue-border);
  background: var(--control-hover-bg);
  box-shadow: var(--control-hover-shadow), 0 0 0 3px var(--blue-soft);
}

.pricing-portal-rate-menu-toggle:hover {
  transform: translateY(-1px);
}

.pricing-portal-rate-menu-toggle svg {
  width: 16px;
  height: 16px;
  color: var(--blue);
  flex: 0 0 auto;
}

.pricing-portal-rate-menu-toggle span,
.pricing-portal-rate-menu-head span {
  display: grid;
  gap: 2px;
  min-width: 0;
  color: inherit;
  font-size: inherit;
  letter-spacing: 0;
  text-transform: none;
}

.pricing-portal-rate-menu-toggle strong,
.pricing-portal-rate-menu-head strong {
  color: var(--text);
  font-size: 10.5px;
  font-weight: 890;
  line-height: 1.1;
}

.pricing-portal-rate-menu-toggle small,
.pricing-portal-rate-menu-head small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 740;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
}

.pricing-portal-rate-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1090;
  background: transparent;
  border: 0;
}

.pricing-portal-rate-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1091;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
  padding: 10px;
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--glass-edge), 0 18px 42px rgba(15, 23, 42, 0.16);
}

.pricing-portal-rate-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.pricing-portal-rate-menu-head button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--muted);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.pricing-portal-rate-menu-head button:hover {
  color: var(--text);
  border-color: var(--control-hover-border);
  background: var(--control-hover-bg);
}

.pricing-portal-rate-menu-grid {
  display: grid;
  gap: 9px;
}

.pricing-portal-rate-menu .pricing-portal-rate-control {
  min-width: 0 !important;
  padding: 9px;
  background: rgba(148, 163, 184, 0.06);
  border: 1px solid var(--line);
  border-radius: 11px;
}

.pricing-portal-rate-menu .pricing-portal-rate-control > span {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 850;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.pricing-portal-rate-menu p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  line-height: 1.35;
}

.pricing-portal-percent-field {
  display: flex;
  align-items: stretch;
  min-height: 34px;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.78));
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 16px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 8px 20px rgba(15, 23, 42, 0.05);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.pricing-portal-percent-field input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  height: auto;
  padding: 0 10px 0 14px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.pricing-portal-percent-field strong {
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  min-height: 100%;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 860;
  line-height: 1;
  background: rgba(241, 245, 249, 0.72);
  border-left: 1px solid rgba(148, 163, 184, 0.22);
}

.pricing-portal-percent-field:focus-within {
  border-color: rgba(24, 132, 255, 0.62);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.86));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 0 0 3px rgba(24, 132, 255, 0.14),
    0 10px 22px rgba(15, 23, 42, 0.07);
}

.pricing-portal-percent-field:focus-within strong {
  color: #0a7cff;
  background: rgba(219, 234, 254, 0.72);
  border-left-color: rgba(24, 132, 255, 0.24);
}

html[data-theme="dark"] .pricing-portal-percent-field {
  color: #f8fafc;
  background:
    linear-gradient(180deg, rgba(30, 41, 59, 0.84), rgba(15, 23, 42, 0.72));
  border-color: rgba(148, 163, 184, 0.30);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 24px rgba(0, 0, 0, 0.20);
}

html[data-theme="dark"] .pricing-portal-percent-field input {
  color: #f8fafc;
}

html[data-theme="dark"] .pricing-portal-percent-field strong {
  color: rgba(226, 232, 240, 0.88);
  background: rgba(2, 6, 23, 0.26);
  border-left-color: rgba(148, 163, 184, 0.22);
}

html[data-theme="dark"] .pricing-portal-percent-field:focus-within {
  border-color: rgba(96, 165, 250, 0.66);
  background:
    linear-gradient(180deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.82));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 0 0 3px rgba(59, 130, 246, 0.18),
    0 12px 26px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] .pricing-portal-percent-field:focus-within strong {
  color: #93c5fd;
  background: rgba(37, 99, 235, 0.18);
}

.pricing-portal-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.pricing-portal-summary article,
.pricing-portal-footer > div,
.pricing-portal-selected-accessories,
.pricing-portal-section {
  min-width: 0;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--glass-edge);
}

.pricing-portal-summary article {
  padding: 12px;
}

.pricing-portal-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
  font-weight: 880;
  line-height: 1.05;
}

.pricing-portal-summary article.positive strong {
  color: var(--green);
}

.pricing-portal-summary article.neutral strong {
  color: var(--amber);
}

.pricing-portal-summary article.warning strong {
  color: var(--red);
}

.pricing-portal-controls {
  display: grid;
  grid-template-columns:
    minmax(230px, 1.45fr)
    minmax(118px, 0.62fr)
    repeat(3, minmax(78px, 98px))
    minmax(112px, 128px)
    minmax(128px, 146px);
  align-items: end;
  gap: 6px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.pricing-portal-labour-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: stretch;
  min-width: 0;
  padding: 5px 7px;
  color: var(--text);
  text-align: left;
  background: var(--surface-solid);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}

.pricing-portal-labour-toggle.active,
.pricing-portal-labour-toggle:hover {
  border-color: var(--blue-border);
  box-shadow: 0 0 0 3px var(--blue-soft);
}

.pricing-portal-labour-toggle svg {
  width: 15px;
  height: 15px;
  color: var(--blue);
  flex: 0 0 auto;
}

.pricing-portal-labour-toggle span {
  display: grid;
  gap: 1px;
  color: inherit;
  font-size: inherit;
  letter-spacing: 0;
  text-transform: none;
}

.pricing-portal-labour-toggle strong {
  font-size: 10.5px;
  font-weight: 880;
  line-height: 1.1;
}

.pricing-portal-labour-toggle small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 740;
  line-height: 1.2;
}

.pricing-portal-labour-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 24px;
}

.pricing-portal-labour-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.28);
  border: 0;
}

.pricing-portal-labour-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(1180px, calc(100vw - 48px));
  height: min(760px, calc(100vh - 48px));
  min-height: 420px;
  overflow: hidden;
  padding: 10px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--glass-edge), 0 22px 60px rgba(15, 23, 42, 0.18);
}

.pricing-portal-labour-panel-head {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 4px 4px 0;
}

.pricing-portal-labour-panel-head span {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 850;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.pricing-portal-labour-panel-head h2 {
  margin: 1px 0 0;
  font-size: 19px;
  font-weight: 900;
  line-height: 1.1;
}

.pricing-portal-labour-panel-head p {
  max-width: 720px;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.pricing-portal-labour-panel-head .pricing-portal-labour-reference {
  color: var(--blue);
  font-size: 11px;
  font-weight: 780;
}

.pricing-portal-labour-panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.pricing-portal-labour-reset-all,
.pricing-portal-labour-close,
.pricing-portal-labour-table button {
  min-height: 28px;
  padding: 5px 8px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 850;
  background: var(--blue-soft);
  border: 1px solid var(--blue-border);
  border-radius: 9px;
}

.pricing-portal-labour-close {
  color: var(--text);
  background: var(--surface-solid);
  border-color: var(--line-strong);
}

.pricing-portal-labour-reset-all:disabled,
.pricing-portal-labour-table button:disabled {
  color: var(--muted);
  background: rgba(148, 163, 184, 0.1);
  border-color: var(--line);
  opacity: 0.62;
}

.pricing-portal-labour-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(210px, 260px) auto;
  align-items: end;
  gap: 8px;
  flex: 0 0 auto;
  padding: 8px;
  margin-bottom: 10px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.pricing-portal-labour-toolbar label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.pricing-portal-labour-toolbar label > span {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 850;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.pricing-portal-labour-toolbar input,
.pricing-portal-labour-toolbar select {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
  font-weight: 780;
  background: var(--input-glass);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: none;
}

.pricing-portal-labour-toolbar > strong {
  align-self: stretch;
  display: grid;
  place-items: center;
  min-width: 150px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.pricing-portal-labour-search {
  position: relative;
}

.pricing-portal-labour-search svg {
  position: absolute;
  left: 12px;
  bottom: 10px;
  width: 17px;
  height: 17px;
  color: var(--muted);
}

.pricing-portal-labour-search input {
  padding-left: 38px;
}

.pricing-portal-labour-library {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.pricing-portal-labour-group + .pricing-portal-labour-group {
  margin-top: 8px;
}

.pricing-portal-labour-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.pricing-portal-labour-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 10px;
  color: var(--text);
  text-align: left;
  background: rgba(148, 163, 184, 0.07);
  border: 0;
}

.pricing-portal-labour-group-head strong {
  display: block;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.15;
}

.pricing-portal-labour-group-head small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.pricing-portal-labour-group-head svg {
  width: 17px;
  height: 17px;
  color: var(--muted);
  flex: 0 0 auto;
}

.pricing-portal-labour-table-wrap {
  overflow-x: auto;
  border-top: 1px solid var(--line);
}

.pricing-portal-labour-table {
  width: 100%;
  min-width: 930px;
  border-collapse: collapse;
}

.pricing-portal-labour-table th,
.pricing-portal-labour-table td {
  padding: 7px 8px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}

.pricing-portal-labour-table th {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: rgba(148, 163, 184, 0.08);
}

.pricing-portal-labour-table td {
  color: var(--text);
  font-size: 11.5px;
  font-weight: 720;
}

.pricing-portal-labour-table tr:last-child td {
  border-bottom: 0;
}

.pricing-portal-labour-table tr.edited td {
  background: rgba(0, 122, 255, 0.055);
}

.pricing-portal-labour-table td strong {
  font-size: 12px;
  font-weight: 850;
}

.pricing-portal-labour-table td span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.pricing-portal-labour-table td em {
  display: inline-block;
  margin-top: 2px;
  color: var(--blue);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.pricing-portal-labour-table input {
  width: 82px;
  min-height: 30px;
  padding: 5px 7px;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 830;
  text-align: right;
  background: var(--input-glass);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}

.pricing-portal-labour-table input.edited {
  border-color: var(--blue-border);
  box-shadow: inset 0 0 0 1px rgba(0, 122, 255, 0.12);
}

.pricing-portal-labour-empty {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 220px;
  color: var(--muted);
  text-align: center;
  background: rgba(148, 163, 184, 0.06);
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
}

.pricing-portal-labour-empty svg {
  width: 28px;
  height: 28px;
  color: var(--blue);
}

.pricing-portal-labour-empty strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 880;
}

.pricing-portal-search {
  position: relative;
}

.pricing-portal-search svg {
  position: absolute;
  left: 10px;
  bottom: 8px;
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.pricing-portal-search input {
  padding-left: 31px;
}

.pricing-portal-selected-accessories {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  overflow-x: auto;
}

.pricing-portal-selected-accessories strong {
  white-space: nowrap;
  font-size: 12px;
  font-weight: 840;
}

.pricing-portal-selected-accessories span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  padding: 6px 8px;
  color: var(--text);
  font-size: 11.5px;
  font-weight: 760;
  text-transform: none;
  background: var(--blue-soft);
  border: 1px solid var(--blue-border);
  border-radius: 999px;
}

.pricing-portal-selected-accessories em {
  color: var(--muted);
  font-style: normal;
}

.pricing-portal-selected-accessories button {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: var(--red);
  font-size: 13px;
  font-weight: 850;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(240, 68, 56, 0.28);
  border-radius: 999px;
}

.pricing-portal-excluded-lines {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 36px;
  padding: 5px 7px;
  color: var(--text);
  background: rgba(240, 68, 56, 0.055);
  border: 1px solid rgba(240, 68, 56, 0.22);
  border-radius: 9px;
}

.pricing-portal-excluded-copy {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  min-width: 250px;
}

.pricing-portal-excluded-copy > svg {
  width: 15px;
  height: 15px;
  color: var(--red);
  flex: 0 0 auto;
}

.pricing-portal-excluded-copy > span {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.pricing-portal-excluded-copy strong {
  font-size: 10.5px;
  font-weight: 850;
  line-height: 1.15;
}

.pricing-portal-excluded-copy small {
  color: var(--muted);
  font-size: 8.8px;
  font-weight: 700;
  line-height: 1.15;
}

.pricing-portal-excluded-actions {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
  padding-bottom: 1px;
  overflow-x: auto;
}

.pricing-portal-excluded-actions button {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: 0 0 auto;
  min-height: 22px;
  max-width: 190px;
  padding: 3px 7px;
  overflow: hidden;
  color: var(--blue);
  font-size: 9px;
  font-weight: 820;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--surface-solid);
  border: 1px solid var(--blue-border);
  border-radius: 7px;
}

.pricing-portal-excluded-actions button:hover,
.pricing-portal-excluded-actions button:focus-visible {
  background: var(--blue-soft);
  box-shadow: 0 0 0 2px var(--blue-soft);
}

.pricing-portal-excluded-actions button.restore-all {
  color: var(--text);
  border-color: var(--line-strong);
}

.pricing-portal-excluded-actions svg {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
}

.pricing-portal-main {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
}

.pricing-portal-main > * + * {
  margin-top: 6px;
}

.pricing-portal-section {
  min-height: 0;
  overflow: hidden;
}

.pricing-portal-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 5px 8px;
  color: var(--text);
  text-align: left;
  background: transparent;
  border: 0;
}

.pricing-portal-section-head strong {
  display: block;
  font-size: 12.5px;
  font-weight: 850;
}

.pricing-portal-section-head svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.pricing-portal-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  border-top: 1px solid var(--line);
}

.pricing-portal-table {
  width: 100%;
  min-width: 1040px;
  table-layout: fixed;
  border-collapse: collapse;
}

.pricing-portal-table th,
.pricing-portal-table td {
  padding: 5px 7px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.pricing-portal-table th {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: rgba(148, 163, 184, 0.08);
}

.pricing-portal-table td {
  color: var(--text);
  font-size: 10.8px;
  font-weight: 700;
  line-height: 1.24;
}

.pricing-portal-table .numeric {
  text-align: right;
  white-space: nowrap;
}

.pricing-portal-item-cell {
  width: 40%;
  min-width: 360px;
}

.pricing-portal-table th:first-child,
.pricing-portal-table td:first-child {
  width: 40%;
}

.pricing-portal-table th:nth-child(2),
.pricing-portal-table td:nth-child(2) {
  width: 9%;
}

.pricing-portal-table th:nth-child(3),
.pricing-portal-table td:nth-child(3) {
  width: 7%;
}

.pricing-portal-table th:nth-child(4),
.pricing-portal-table td:nth-child(4) {
  width: 9%;
}

.pricing-portal-table th:nth-child(5),
.pricing-portal-table td:nth-child(5) {
  width: 20%;
}

.pricing-portal-table th:nth-child(6),
.pricing-portal-table td:nth-child(6) {
  width: 7%;
}

.pricing-portal-table th:nth-child(7),
.pricing-portal-table td:nth-child(7) {
  width: 8%;
}

.pricing-portal-item-layout {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 7px;
  min-width: 0;
}

.pricing-portal-thumb {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  overflow: hidden;
  background: var(--blue-soft);
  border: 1px solid var(--blue-border);
  border-radius: 8px;
}

.pricing-portal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
}

.pricing-portal-thumb.empty svg {
  width: 18px;
  height: 18px;
  color: var(--blue);
}

.pricing-portal-item-copy {
  min-width: 0;
}

.pricing-portal-item-link {
  display: grid;
  gap: 1px;
  width: 100%;
  padding: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 0;
}

.pricing-portal-item-link:not(:disabled) {
  cursor: pointer;
}

.pricing-portal-item-link:not(:disabled):hover strong {
  color: var(--blue);
}

.pricing-portal-item-link span {
  color: var(--blue);
  font-size: 9px;
  font-weight: 820;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.pricing-portal-item-link strong {
  font-size: 11.5px;
  font-weight: 850;
  line-height: 1.15;
}

.pricing-portal-item-link small {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.2;
}

.pricing-portal-item-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
}

.pricing-portal-labour-source {
  display: block;
  flex: 1 1 130px;
  min-width: 0;
  margin: 0;
  color: var(--muted);
  display: -webkit-box;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.pricing-portal-item-locate,
.pricing-portal-item-delete,
.pricing-portal-accessory-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 3px;
  min-height: 20px;
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 820;
  border-radius: 7px;
}

.pricing-portal-item-locate {
  color: var(--blue);
  background: var(--blue-soft);
  border: 1px solid var(--blue-border);
}

.pricing-portal-item-locate:hover {
  background: rgba(0, 122, 255, 0.14);
}

.pricing-portal-item-locate svg {
  width: 10px;
  height: 10px;
}

.pricing-portal-item-delete {
  color: var(--red);
  background: rgba(240, 68, 56, 0.06);
  border: 1px solid rgba(240, 68, 56, 0.24);
}

.pricing-portal-item-delete:hover,
.pricing-portal-item-delete:focus-visible {
  background: rgba(240, 68, 56, 0.13);
  border-color: rgba(240, 68, 56, 0.42);
  box-shadow: 0 0 0 2px rgba(240, 68, 56, 0.08);
}

.pricing-portal-item-delete svg {
  width: 10px;
  height: 10px;
}

.pricing-portal-delete-confirm {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: 0 0 auto;
  min-height: 22px;
  padding: 2px 3px 2px 6px;
  color: var(--red);
  font-size: 8.5px;
  font-weight: 820;
  white-space: nowrap;
  background: rgba(240, 68, 56, 0.07);
  border: 1px solid rgba(240, 68, 56, 0.25);
  border-radius: 7px;
}

.pricing-portal-delete-confirm button {
  min-height: 17px;
  padding: 1px 4px;
  color: var(--text);
  font: inherit;
  background: var(--surface-solid);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
}

.pricing-portal-delete-confirm button.confirm {
  color: #ffffff;
  background: var(--red);
  border-color: var(--red);
}

.pricing-portal-delete-confirm button:focus-visible {
  outline: 2px solid rgba(240, 68, 56, 0.25);
  outline-offset: 1px;
}

.pricing-portal-product-select {
  display: block;
  margin-top: 4px;
  max-width: 100%;
  min-height: 25px;
  padding-block: 3px;
  font-size: 10px;
  font-weight: 760;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pricing-portal-accessories {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
}

.pricing-portal-accessories span {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.pricing-portal-accessories button {
  max-width: 220px;
  padding: 4px 7px;
  overflow: hidden;
  color: var(--blue);
  font-size: 11px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--blue-soft);
  border: 1px solid var(--blue-border);
  border-radius: 999px;
}

.pricing-portal-parent-row.has-accessories td {
  border-bottom-color: rgba(0, 122, 255, 0.16);
}

.pricing-portal-assembly-row td {
  padding: 9px 10px;
  background: linear-gradient(100deg, rgba(0, 122, 255, 0.11), rgba(0, 122, 255, 0.035));
  border-top: 1px solid rgba(0, 122, 255, 0.22);
  border-bottom: 1px solid rgba(0, 122, 255, 0.18);
}

html[data-theme="dark"] .pricing-portal-assembly-row td {
  background: linear-gradient(100deg, rgba(10, 132, 255, 0.18), rgba(10, 132, 255, 0.06));
}

.pricing-portal-assembly-layout {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.pricing-portal-assembly-thumb {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
  background: var(--surface-solid);
  border: 1px solid var(--blue-border);
  border-radius: 11px;
}

.pricing-portal-assembly-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pricing-portal-assembly-thumb.empty {
  color: var(--blue);
}

.pricing-portal-assembly-copy {
  min-width: 0;
}

.pricing-portal-assembly-copy > span {
  display: block;
  color: var(--blue);
  font-size: 9px;
  font-weight: 860;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pricing-portal-assembly-copy strong {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 880;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pricing-portal-assembly-copy small {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pricing-portal-assembly-summary {
  display: grid;
  justify-items: end;
  gap: 3px;
}

.pricing-portal-assembly-summary > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.pricing-portal-assembly-summary > strong {
  color: var(--text);
  font-size: 10.5px;
  font-weight: 850;
}

.pricing-portal-component-row td {
  padding-top: 6px;
  padding-bottom: 6px;
  background: rgba(0, 122, 255, 0.028);
  border-bottom-color: rgba(0, 122, 255, 0.1);
}

html[data-theme="dark"] .pricing-portal-component-row td {
  background: rgba(10, 132, 255, 0.055);
}

.pricing-portal-component-row .pricing-portal-item-cell {
  padding-left: 24px;
}

.pricing-portal-component-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.pricing-portal-component-item .pricing-portal-delete-confirm > span {
  display: none;
}

.pricing-portal-component-marker {
  min-width: 58px;
  padding: 3px 6px;
  color: var(--blue);
  font-size: 8.5px;
  font-weight: 850;
  letter-spacing: 0.035em;
  text-align: center;
  text-transform: uppercase;
  background: var(--blue-soft);
  border: 1px solid var(--blue-border);
  border-radius: 999px;
}

.pricing-portal-component-link {
  min-width: 0;
  padding: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 0;
}

.pricing-portal-component-link:not(:disabled) {
  cursor: pointer;
}

.pricing-portal-component-link strong,
.pricing-portal-component-link small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pricing-portal-component-link strong {
  color: var(--text);
  font-size: 10.5px;
  font-weight: 840;
}

.pricing-portal-component-link small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.pricing-portal-accessory-row td {
  padding-top: 5px;
  padding-bottom: 5px;
  background: rgba(0, 122, 255, 0.045);
  border-bottom-color: rgba(0, 122, 255, 0.12);
}

html[data-theme="dark"] .pricing-portal-accessory-row td {
  background: rgba(10, 132, 255, 0.08);
}

.pricing-portal-accessory-row .pricing-portal-item-cell {
  padding-left: 20px;
}

.pricing-portal-accessory-item {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 7px;
}

.pricing-portal-accessory-marker {
  flex: 0 0 auto;
  padding: 3px 6px;
  color: var(--blue);
  font-size: 8.5px;
  font-weight: 850;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: var(--blue-soft);
  border: 1px solid var(--blue-border);
  border-radius: 999px;
}

.pricing-portal-accessory-item div {
  min-width: 0;
}

.pricing-portal-accessory-item strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 10.5px;
  font-weight: 840;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pricing-portal-accessory-item small {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pricing-portal-accessory-item .pricing-portal-accessory-remove {
  margin-left: auto;
}

.pricing-portal-accessory-quantity {
  display: inline-grid;
  grid-template-columns: 18px minmax(46px, max-content) 18px;
  align-items: center;
  justify-content: end;
  gap: 3px;
}

.pricing-portal-accessory-quantity button {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 860;
  background: var(--surface-solid);
  border: 1px solid var(--blue-border);
  border-radius: 999px;
}

.pricing-portal-accessory-quantity strong {
  min-width: 0;
  color: var(--text);
  font-size: 10px;
  font-weight: 820;
  text-align: center;
  white-space: nowrap;
}

.pricing-portal-hours-editor {
  display: grid;
  grid-template-columns: repeat(3, minmax(44px, 1fr));
  gap: 4px;
  min-width: 164px;
}

.pricing-portal-hours-editor label {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.pricing-portal-hours-editor span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.pricing-portal-hours-editor input {
  width: 100%;
  min-height: 24px;
  padding: 3px 5px;
  color: var(--text);
  font: inherit;
  font-size: 10.5px;
  font-weight: 800;
  text-align: right;
  background: var(--input-glass);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
}

.pricing-portal-hours-editor label.overridden input {
  border-color: var(--blue-border);
  box-shadow: 0 0 0 2px var(--blue-soft);
}

.pricing-portal-accessory-remove {
  color: var(--red);
  background: rgba(240, 68, 56, 0.08);
  border-color: rgba(240, 68, 56, 0.28);
}

.pricing-portal-accessory-remove:hover {
  background: rgba(240, 68, 56, 0.14);
}

.pricing-portal-empty {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 260px;
  color: var(--muted);
  text-align: center;
  background: var(--surface-solid);
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
}

.pricing-portal-empty svg {
  width: 32px;
  height: 32px;
  color: var(--blue);
}

.pricing-portal-empty strong {
  color: var(--text);
  font-size: 17px;
  font-weight: 880;
}

.pricing-portal-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  align-items: stretch;
  align-self: stretch;
  flex-wrap: initial;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 5px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.pricing-portal-footer > div {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  padding: 0;
  box-sizing: border-box;
}

.pricing-portal-footer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 1px 3px 0;
  box-sizing: border-box;
}

.pricing-portal-footer > .pricing-portal-footer-head {
  padding: 1px 3px 0;
}

.pricing-portal-footer-head button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 3px 7px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 850;
  background: var(--surface-solid);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  box-shadow: var(--glass-edge);
}

.pricing-portal-footer-head button:hover {
  border-color: var(--control-hover-border);
  background: var(--control-hover-bg);
  box-shadow: var(--control-hover-shadow);
}

.pricing-portal-footer-head svg {
  width: 13px;
  height: 13px;
  color: var(--muted);
}

.pricing-portal-incomplete-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px !important;
  border: 1px solid rgba(217, 119, 6, 0.34);
  border-radius: 8px;
  color: #92400e;
  background: rgba(254, 243, 199, 0.76);
}

.pricing-portal-incomplete-warning > svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.pricing-portal-incomplete-warning > span {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.pricing-portal-incomplete-warning strong,
.pricing-portal-incomplete-warning small {
  margin: 0;
  color: inherit;
}

.pricing-portal-incomplete-warning strong {
  font-size: 10.5px;
}

.pricing-portal-incomplete-warning small {
  font-size: 9.5px;
  font-weight: 720;
}

.pricing-portal-summary-totals,
.pricing-portal-summary-detail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  width: 100%;
  min-width: 0;
}

.pricing-portal-summary-totals article,
.pricing-portal-summary-tile {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 5px 7px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: var(--glass-edge);
}

.pricing-portal-footer strong {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 880;
  line-height: 1.08;
}

.pricing-portal-footer .positive strong {
  color: var(--green);
}

.pricing-portal-footer .neutral strong {
  color: var(--amber);
}

.pricing-portal-footer .warning strong {
  color: var(--red);
}

.pricing-portal-summary-totals small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 740;
}

.pricing-portal-summary-totals small.pricing-portal-time-breakdown {
  color: color-mix(in srgb, var(--text) 72%, var(--muted) 28%);
  font-weight: 820;
  white-space: normal;
}

.pricing-portal-summary-breakdown {
  display: grid;
  gap: 3px;
  margin: 5px 0 0;
}

.pricing-portal-summary-breakdown div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  padding-top: 3px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.pricing-portal-summary-breakdown div:first-child {
  border-top: 0;
  padding-top: 0;
}

.pricing-portal-summary-breakdown div.total {
  margin-top: 1px;
  padding-top: 5px;
  border-top-color: var(--line-strong);
}

.pricing-portal-summary-breakdown dt,
.pricing-portal-summary-breakdown dd {
  margin: 0;
  min-width: 0;
}

.pricing-portal-summary-breakdown dt {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 740;
}

.pricing-portal-summary-breakdown dd {
  color: var(--text);
  font-size: 10px;
  font-weight: 850;
  text-align: right;
}

.pricing-portal-summary-breakdown div.total dt,
.pricing-portal-summary-breakdown div.total dd {
  color: var(--text);
  font-weight: 900;
}

.pricing-portal-footer-total {
  border-color: var(--blue-border) !important;
  background: linear-gradient(180deg, rgba(0, 122, 255, 0.12), rgba(255, 255, 255, 0.8)) !important;
}

.pricing-portal-footer-total strong {
  color: var(--blue);
  font-size: 15px;
  font-weight: 900;
}

.pricing-portal-footer.collapsed {
  gap: 4px;
}

.pricing-portal-footer.collapsed .pricing-portal-summary-totals article {
  padding: 5px 7px;
}

.pricing-portal-basis {
  flex: 0 0 auto;
  margin: 0;
  padding: 0 3px;
  font-size: 9px;
  line-height: 1.18;
  opacity: 0.86;
  text-transform: none;
}

.pricing-portal-header-action.optimiser {
  color: #5145cd;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.11), rgba(37, 99, 235, 0.08));
  border-color: rgba(79, 70, 229, 0.3);
}

.pricing-portal-optimiser-modal {
  position: fixed;
  z-index: 4200;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 14px;
}

.pricing-portal-optimiser-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  background: rgba(15, 23, 42, 0.48);
  border: 0;
  backdrop-filter: blur(9px) saturate(0.9);
  cursor: default;
}

.pricing-portal-optimiser-dialog {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(1320px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: hidden;
  color: var(--text);
  background: color-mix(in srgb, var(--surface-solid) 94%, #eef4ff 6%);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  box-shadow: 0 32px 90px rgba(15, 23, 42, 0.28), var(--glass-edge);
}

.pricing-portal-optimiser-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px 14px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(79, 70, 229, 0.08) 44%, rgba(255, 255, 255, 0.5));
  border-bottom: 1px solid var(--line);
}

.pricing-portal-optimiser-header > div {
  display: grid;
  gap: 3px;
}

.pricing-portal-optimiser-header span,
.pricing-portal-optimiser-section-title span,
.pricing-portal-optimiser-scope-head span,
.pricing-portal-optimiser-bulk-intro > span,
.pricing-portal-optimiser-preview-head > div > span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pricing-portal-optimiser-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 950;
  letter-spacing: -0.025em;
}

.pricing-portal-optimiser-header p,
.pricing-portal-optimiser-bulk-intro p {
  max-width: 760px;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  line-height: 1.45;
}

.pricing-portal-optimiser-header > button {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0;
  color: var(--muted);
  background: var(--input-glass);
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  cursor: pointer;
}

.pricing-portal-optimiser-header svg,
.pricing-portal-optimiser-bulk-arrow svg,
.pricing-portal-optimiser-message svg,
.pricing-portal-optimiser-restore svg {
  width: 18px;
  height: 18px;
}

.pricing-portal-optimiser-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 8px 20px;
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
  border-bottom: 1px solid var(--line);
}

.pricing-portal-optimiser-tabs button,
.pricing-portal-optimiser-objective-grid button {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 10px 12px;
  color: var(--muted);
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 11px;
  cursor: pointer;
}

.pricing-portal-optimiser-tabs button strong,
.pricing-portal-optimiser-objective-grid button strong {
  color: inherit;
  font-size: 12px;
  font-weight: 900;
}

.pricing-portal-optimiser-tabs button small,
.pricing-portal-optimiser-objective-grid button small {
  color: inherit;
  font-size: 10px;
  font-weight: 680;
  line-height: 1.3;
  opacity: 0.88;
}

.pricing-portal-optimiser-tabs button.active,
.pricing-portal-optimiser-objective-grid button.active {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: var(--blue-border);
  box-shadow: inset 0 -2px 0 var(--blue), var(--glass-edge);
}

.pricing-portal-optimiser-body {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  padding: 14px 20px 20px;
  overflow: auto;
  overscroll-behavior: contain;
}

.pricing-portal-optimiser-objectives,
.pricing-portal-optimiser-scope,
.pricing-portal-optimiser-bulk,
.pricing-portal-optimiser-preview {
  display: grid;
  gap: 10px;
  padding: 13px;
  background: color-mix(in srgb, var(--surface-solid) 90%, transparent);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--glass-edge);
}

.pricing-portal-optimiser-section-title,
.pricing-portal-optimiser-scope-head,
.pricing-portal-optimiser-preview-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.pricing-portal-optimiser-section-title > div,
.pricing-portal-optimiser-scope-head > div,
.pricing-portal-optimiser-preview-head > div {
  display: grid;
  gap: 2px;
}

.pricing-portal-optimiser-section-title strong,
.pricing-portal-optimiser-scope-head strong,
.pricing-portal-optimiser-preview-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 900;
}

.pricing-portal-optimiser-scope-head > small {
  max-width: 520px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 680;
  line-height: 1.35;
  text-align: right;
}

.pricing-portal-optimiser-objective-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.pricing-portal-optimiser-objective-grid button {
  min-height: 67px;
  background: var(--input-glass);
  border-color: var(--line);
}

.pricing-portal-optimiser-scope-list {
  display: grid;
  gap: 7px;
}

.pricing-portal-optimiser-scope-card {
  overflow: hidden;
  background: var(--input-glass);
  border: 1px solid var(--line);
  border-radius: 11px;
}

.pricing-portal-optimiser-scope-card.disabled {
  opacity: 0.62;
}

.pricing-portal-optimiser-scope-card.enabled {
  border-color: color-mix(in srgb, var(--blue-border) 58%, var(--line));
}

.pricing-portal-optimiser-scope-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
}

.pricing-portal-optimiser-scope-card-head > label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  cursor: pointer;
}

.pricing-portal-optimiser-scope-card-head input,
.pricing-portal-optimiser-chip input,
.pricing-portal-optimiser-change-select input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--blue);
}

.pricing-portal-optimiser-scope-card-head label > span {
  display: grid;
  min-width: 0;
}

.pricing-portal-optimiser-scope-card-head label strong {
  font-size: 12px;
  font-weight: 900;
}

.pricing-portal-optimiser-scope-card-head label small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 680;
}

.pricing-portal-optimiser-scope-card-head > button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  color: var(--blue);
  font: inherit;
  font-size: 10px;
  font-weight: 850;
  background: var(--blue-soft);
  border: 1px solid var(--blue-border);
  border-radius: 8px;
  cursor: pointer;
}

.pricing-portal-optimiser-scope-card-head > button svg {
  width: 13px;
  height: 13px;
  transition: transform 0.16s ease;
}

.pricing-portal-optimiser-scope-card.expanded .pricing-portal-optimiser-scope-card-head > button svg {
  transform: rotate(180deg);
}

.pricing-portal-optimiser-preferences {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(0, 2fr);
  gap: 12px;
  padding: 10px 11px 12px;
  border-top: 1px solid var(--line);
}

.pricing-portal-optimiser-preference-group,
.pricing-portal-optimiser-range-group {
  display: grid;
  align-content: start;
  gap: 6px;
}

.pricing-portal-optimiser-preference-group > span,
.pricing-portal-optimiser-range-group > strong {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.pricing-portal-optimiser-range-groups {
  display: grid;
  gap: 9px;
}

.pricing-portal-optimiser-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.pricing-portal-optimiser-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.pricing-portal-optimiser-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pricing-portal-optimiser-chip span {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  padding: 5px 9px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  background: var(--surface-solid);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

.pricing-portal-optimiser-chip input:checked + span {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: var(--blue-border);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--blue) 20%, transparent);
}

.pricing-portal-optimiser-chip.range span {
  border-radius: 8px;
}

.pricing-portal-optimiser-bulk {
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.5fr);
  align-items: center;
  gap: 18px;
  padding: 18px;
}

.pricing-portal-optimiser-bulk-intro h3 {
  margin: 2px 0 0;
  font-size: 18px;
  font-weight: 930;
  letter-spacing: -0.015em;
}

.pricing-portal-optimiser-bulk-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr);
  align-items: end;
  gap: 8px;
}

.pricing-portal-optimiser-bulk-controls label {
  display: grid;
  gap: 5px;
}

.pricing-portal-optimiser-bulk-controls label > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.pricing-portal-optimiser-bulk-controls select {
  width: 100%;
  min-height: 42px;
  padding: 7px 9px;
  color: var(--text);
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  background: var(--input-glass);
  border: 1px solid var(--line-strong);
  border-radius: 9px;
}

.pricing-portal-optimiser-bulk-arrow {
  display: grid;
  width: 28px;
  height: 42px;
  place-items: center;
  color: var(--blue);
}

.pricing-portal-optimiser-bulk-note {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: 9px;
}

.pricing-portal-optimiser-message {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  color: #1e40af;
  font-size: 11px;
  font-weight: 760;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
}

.pricing-portal-optimiser-preview {
  gap: 12px;
}

.pricing-portal-optimiser-preview-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, auto));
  gap: 6px;
}

.pricing-portal-optimiser-preview-totals article {
  display: grid;
  gap: 1px;
  padding: 7px 9px;
  background: var(--input-glass);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.pricing-portal-optimiser-preview-totals span,
.pricing-portal-optimiser-product > span,
.pricing-portal-optimiser-line-ref > span {
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pricing-portal-optimiser-preview-totals strong {
  font-size: 11px;
  font-weight: 900;
}

.pricing-portal-optimiser-preview-totals small {
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 700;
}

.pricing-portal-optimiser-comparison-list {
  display: grid;
  gap: 7px;
}

.pricing-portal-optimiser-comparison {
  display: grid;
  grid-template-columns: 54px minmax(92px, 0.5fr) minmax(175px, 1fr) minmax(175px, 1fr) minmax(245px, 1.35fr);
  align-items: stretch;
  gap: 7px;
  padding: 8px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 11px;
}

.pricing-portal-optimiser-comparison.changed {
  border-color: color-mix(in srgb, var(--blue-border) 72%, var(--line));
}

.pricing-portal-optimiser-comparison.blocked {
  background: color-mix(in srgb, #fff7ed 70%, var(--surface-solid));
  border-color: #fed7aa;
}

.pricing-portal-optimiser-change-select,
.pricing-portal-optimiser-line-ref,
.pricing-portal-optimiser-product,
.pricing-portal-optimiser-row-metrics {
  display: grid;
  align-content: center;
  gap: 3px;
  min-width: 0;
  padding: 7px;
  background: var(--input-glass);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.pricing-portal-optimiser-change-select {
  justify-items: center;
  font-size: 9px;
  font-weight: 850;
  cursor: pointer;
}

.pricing-portal-optimiser-change-select:has(input:disabled) {
  cursor: default;
}

.pricing-portal-optimiser-line-ref strong,
.pricing-portal-optimiser-product strong {
  overflow: hidden;
  font-size: 10.5px;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.pricing-portal-optimiser-line-ref small,
.pricing-portal-optimiser-product small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-weight: 680;
  line-height: 1.3;
  text-overflow: ellipsis;
}

.pricing-portal-optimiser-product.suggested {
  background: color-mix(in srgb, var(--blue-soft) 72%, var(--surface-solid));
  border-color: color-mix(in srgb, var(--blue-border) 56%, var(--line));
}

.pricing-portal-optimiser-row-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pricing-portal-optimiser-row-metrics > span {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.pricing-portal-optimiser-row-metrics small {
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 800;
}

.pricing-portal-optimiser-row-metrics strong {
  overflow: hidden;
  font-size: 9.5px;
  font-weight: 850;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.pricing-portal-optimiser-reason {
  display: flex;
  grid-column: 2 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 5px 0;
}

.pricing-portal-optimiser-reason strong {
  color: var(--blue);
  font-size: 9.5px;
  font-weight: 850;
}

.pricing-portal-optimiser-reason small {
  color: #9a3412;
  font-size: 9px;
  font-weight: 720;
  line-height: 1.35;
  text-align: right;
}

.pricing-portal-optimiser-detail {
  grid-column: 1 / -1;
  min-width: 0;
  overflow: hidden;
  background: color-mix(in srgb, var(--surface-solid) 72%, transparent);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.pricing-portal-optimiser-detail > summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 10px;
  color: var(--text);
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.pricing-portal-optimiser-detail > summary::-webkit-details-marker {
  display: none;
}

.pricing-portal-optimiser-detail > summary:hover {
  background: color-mix(in srgb, var(--blue-soft) 48%, transparent);
}

.pricing-portal-optimiser-detail > summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}

.pricing-portal-optimiser-detail > summary > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #0057b8;
  font-size: 11px;
}

.pricing-portal-optimiser-detail > summary > span svg,
.pricing-portal-optimiser-detail > summary > svg {
  width: 14px;
  height: 14px;
}

.pricing-portal-optimiser-detail > summary > small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pricing-portal-optimiser-detail > summary > svg:last-child {
  transition: transform 160ms ease;
}

.pricing-portal-optimiser-detail[open] > summary {
  background: color-mix(in srgb, var(--blue-soft) 36%, transparent);
  border-bottom: 1px solid var(--line);
}

.pricing-portal-optimiser-detail[open] > summary > svg:last-child {
  transform: rotate(180deg);
}

.pricing-portal-optimiser-detail-body {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.pricing-portal-optimiser-detail-saving {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  color: #166534;
  background: color-mix(in srgb, #dcfce7 72%, var(--surface-solid));
  border: 1px solid color-mix(in srgb, #22c55e 42%, var(--line));
  border-radius: 8px;
}

.pricing-portal-optimiser-detail-saving.is-increase {
  color: #9a3412;
  background: color-mix(in srgb, #ffedd5 72%, var(--surface-solid));
  border-color: color-mix(in srgb, #f97316 42%, var(--line));
}

.pricing-portal-optimiser-detail-saving > span {
  color: inherit;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.pricing-portal-optimiser-detail-saving > strong {
  font-size: 13px;
  font-weight: 900;
}

.pricing-portal-optimiser-detail-saving > small {
  margin-left: auto;
  color: inherit;
  font-size: 11px;
  font-weight: 900;
}

.pricing-portal-optimiser-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.pricing-portal-optimiser-detail-side {
  display: grid;
  align-content: start;
  gap: 9px;
  min-width: 0;
  padding: 12px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.pricing-portal-optimiser-detail-side.suggested {
  background: color-mix(in srgb, var(--blue-soft) 38%, var(--surface-solid));
  border-color: color-mix(in srgb, var(--blue-border) 56%, var(--line));
}

.pricing-portal-optimiser-detail-product-head {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.pricing-portal-optimiser-detail-product-head > div:last-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.pricing-portal-optimiser-detail-product-head span {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pricing-portal-optimiser-detail-product-head strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.pricing-portal-optimiser-detail-product-head small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 680;
  line-height: 1.3;
  text-overflow: ellipsis;
}

.pricing-portal-optimiser-detail-image {
  display: grid;
  place-items: center;
  width: 108px;
  height: 84px;
  overflow: hidden;
  background: color-mix(in srgb, var(--surface-solid) 88%, var(--blue-soft));
  border: 1px solid var(--line);
  border-radius: 8px;
}

.pricing-portal-optimiser-detail-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pricing-portal-optimiser-detail-image > span {
  display: grid;
  gap: 2px;
  padding: 6px;
  text-align: center;
}

.pricing-portal-optimiser-detail-image > span small,
.pricing-portal-optimiser-detail-image > span strong {
  font-size: 8px;
}

.pricing-portal-optimiser-detail-image .product-image-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--muted);
}

.pricing-portal-optimiser-detail-image .product-image-fallback[hidden] {
  display: none;
}

.pricing-portal-optimiser-detail-image .product-image-fallback svg {
  width: 26px;
  height: 26px;
}

.pricing-portal-optimiser-detail-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.pricing-portal-optimiser-detail-facts > div {
  display: grid;
  align-content: start;
  gap: 2px;
  min-width: 0;
  padding: 7px 8px;
  background: var(--input-glass);
}

.pricing-portal-optimiser-detail-facts dt {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 850;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.pricing-portal-optimiser-detail-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 9px;
  font-weight: 790;
  line-height: 1.3;
}

.pricing-portal-optimiser-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pricing-portal-optimiser-detail-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 36px;
  padding: 7px 10px;
  color: #0057b8;
  font: inherit;
  font-size: 10px;
  font-weight: 850;
  background: color-mix(in srgb, var(--blue-soft) 56%, var(--surface-solid));
  border: 1px solid color-mix(in srgb, var(--blue-border) 62%, var(--line));
  border-radius: 8px;
  cursor: pointer;
}

.pricing-portal-optimiser-detail-actions button:hover {
  border-color: var(--blue);
}

.pricing-portal-optimiser-detail-actions button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.pricing-portal-optimiser-detail-actions svg {
  width: 13px;
  height: 13px;
}

.pricing-portal-optimiser-detail-3d {
  min-height: 280px;
  overflow: hidden;
  background: var(--input-glass);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.pricing-portal-optimiser-detail-3d[hidden] {
  display: none;
}

.pricing-portal-optimiser-detail-3d > p {
  margin: 0;
  padding: 14px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.45;
}

.pricing-portal-optimiser-detail-3d .dashboard-product-dimension-visual {
  margin: 0;
  border: 0;
  border-radius: 0;
}

.pricing-portal-optimiser-library-status {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 9px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  background: var(--input-glass);
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
}

.pricing-portal-optimiser-3d-status {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px 9px;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface-solid) 82%, transparent);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.pricing-portal-optimiser-3d-status.is-available {
  color: color-mix(in srgb, var(--text) 76%, var(--blue));
  border-color: color-mix(in srgb, var(--blue-border) 48%, var(--line));
}

.pricing-portal-optimiser-3d-status strong {
  color: inherit;
  font-size: 10.5px;
  font-weight: 880;
}

.pricing-portal-optimiser-3d-status small {
  color: inherit;
  font-size: 9.75px;
  font-weight: 650;
  line-height: 1.4;
}

.dashboard-product-dimension-3d-error {
  margin: 0;
  padding: 18px;
  color: #b42318;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.45;
  text-align: center;
}

.pricing-portal-optimiser-comparison-matrix-wrap {
  min-width: 0;
  overflow: hidden;
  background: var(--surface-solid);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
}

.pricing-portal-optimiser-comparison-matrix {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  color: var(--text);
}

.pricing-portal-optimiser-comparison-matrix caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.pricing-portal-optimiser-comparison-matrix col.field {
  width: 25%;
}

.pricing-portal-optimiser-comparison-matrix col.current,
.pricing-portal-optimiser-comparison-matrix col.suggested {
  width: 37.5%;
}

.pricing-portal-optimiser-comparison-matrix th,
.pricing-portal-optimiser-comparison-matrix td {
  min-width: 0;
  padding: 9px 11px;
  overflow-wrap: anywhere;
  text-align: left;
  vertical-align: top;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.pricing-portal-optimiser-comparison-matrix tr > :last-child {
  border-right: 0;
}

.pricing-portal-optimiser-comparison-matrix tbody tr:last-child > * {
  border-bottom: 0;
}

.pricing-portal-optimiser-comparison-matrix thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--text);
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  background: color-mix(in srgb, var(--surface-solid) 86%, var(--blue-soft));
}

.pricing-portal-optimiser-comparison-matrix thead th:nth-child(3) {
  color: #0057b8;
  background: color-mix(in srgb, var(--blue-soft) 64%, var(--surface-solid));
}

.pricing-portal-optimiser-comparison-matrix tbody th[scope="row"] {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.35;
}

.pricing-portal-optimiser-comparison-matrix td {
  font-size: 11.5px;
  font-weight: 720;
  line-height: 1.42;
}

.pricing-portal-optimiser-comparison-matrix td:nth-child(3) {
  background: color-mix(in srgb, var(--blue-soft) 22%, transparent);
}

.pricing-portal-optimiser-comparison-matrix td.is-changed:nth-child(3) {
  color: color-mix(in srgb, var(--text) 76%, var(--blue));
  font-weight: 820;
}

.pricing-portal-optimiser-comparison-group th {
  padding: 7px 11px;
  color: #0057b8;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: color-mix(in srgb, var(--blue-soft) 50%, var(--surface-solid));
}

.pricing-portal-optimiser-comparison-total td {
  font-size: 12px;
  font-weight: 900;
}

.pricing-portal-optimiser-accessory-list,
.pricing-portal-optimiser-detail-documents {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pricing-portal-optimiser-accessory-list li,
.pricing-portal-optimiser-detail-documents li {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.pricing-portal-optimiser-accessory-list strong,
.pricing-portal-optimiser-detail-documents a,
.pricing-portal-optimiser-detail-documents li > span {
  color: var(--text);
  font-size: 11px;
  font-weight: 850;
}

.pricing-portal-optimiser-detail-documents a {
  color: var(--blue);
  text-underline-offset: 2px;
}

.pricing-portal-optimiser-accessory-list span,
.pricing-portal-optimiser-accessory-list small,
.pricing-portal-optimiser-detail-documents small,
.pricing-portal-optimiser-detail-empty-value,
.pricing-portal-optimiser-accessory-warning {
  color: var(--muted);
  font-size: 9.75px;
  font-weight: 680;
  line-height: 1.35;
}

.pricing-portal-optimiser-accessory-list small {
  color: var(--blue);
}

.pricing-portal-optimiser-accessory-warning,
.pricing-portal-optimiser-accessory-list li.warning {
  color: #b45309;
}

.pricing-portal-optimiser-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 20px;
  background: color-mix(in srgb, var(--surface-solid) 92%, transparent);
  border-top: 1px solid var(--line);
}

.pricing-portal-optimiser-footer > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pricing-portal-optimiser-footer > div:first-child {
  min-width: 0;
}

.pricing-portal-optimiser-footer small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pricing-portal-optimiser-footer button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 37px;
  padding: 7px 12px;
  color: var(--text);
  font: inherit;
  font-size: 10.5px;
  font-weight: 880;
  background: var(--input-glass);
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  cursor: pointer;
}

.pricing-portal-optimiser-footer button:hover:not(:disabled) {
  border-color: var(--blue-border);
  box-shadow: 0 0 0 3px var(--blue-soft);
}

.pricing-portal-optimiser-footer button.primary {
  color: #fff;
  background: linear-gradient(135deg, #1477f8, #4f46e5);
  border-color: rgba(37, 99, 235, 0.5);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.pricing-portal-optimiser-footer button:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.pricing-portal-optimiser-footer .pricing-portal-optimiser-restore {
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.08);
  border-color: rgba(124, 58, 237, 0.25);
}

.pricing-portal-optimiser-empty {
  padding: 18px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
}

html[data-theme="dark"] .pricing-portal-workspace {
  background: linear-gradient(180deg, rgba(24, 25, 29, 0.96), rgba(12, 13, 16, 0.92));
  box-shadow: var(--glass-edge), 0 18px 44px rgba(0, 0, 0, 0.26);
}

html[data-theme="dark"] .pricing-portal-controls {
  background: rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .pricing-portal-excluded-lines {
  background: rgba(240, 68, 56, 0.1);
  border-color: rgba(248, 113, 113, 0.3);
}

html[data-theme="dark"] .pricing-portal-item-delete,
html[data-theme="dark"] .pricing-portal-delete-confirm {
  background: rgba(240, 68, 56, 0.11);
  border-color: rgba(248, 113, 113, 0.32);
}

html[data-theme="dark"] .pricing-portal-footer {
  background: rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .pricing-portal-incomplete-warning {
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(120, 53, 15, 0.34);
}

html[data-theme="dark"] .pricing-portal-footer-total {
  background: linear-gradient(180deg, rgba(10, 132, 255, 0.2), rgba(24, 25, 29, 0.92)) !important;
}

html[data-theme="dark"] .pricing-portal-optimiser-dialog {
  background: rgba(20, 22, 28, 0.98);
}

html[data-theme="dark"] .pricing-portal-optimiser-header {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(79, 70, 229, 0.16), rgba(24, 25, 29, 0.8));
}

html[data-theme="dark"] .pricing-portal-optimiser-message {
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.14);
  border-color: rgba(96, 165, 250, 0.3);
}

html[data-theme="dark"] .pricing-portal-optimiser-comparison.blocked {
  background: rgba(154, 52, 18, 0.12);
  border-color: rgba(251, 146, 60, 0.35);
}

html[data-theme="dark"] .pricing-portal-optimiser-detail-saving {
  color: #bbf7d0;
  background: rgba(22, 101, 52, 0.24);
  border-color: rgba(74, 222, 128, 0.3);
}

html[data-theme="dark"] .pricing-portal-optimiser-detail-saving.is-increase {
  color: #fed7aa;
  background: rgba(154, 52, 18, 0.22);
  border-color: rgba(251, 146, 60, 0.32);
}

html[data-theme="dark"] .pricing-portal-optimiser-comparison-matrix {
  color: #f8fafc;
  background: rgba(18, 20, 25, 0.98);
}

html[data-theme="dark"] .pricing-portal-optimiser-comparison-matrix thead th,
html[data-theme="dark"] .pricing-portal-optimiser-comparison-group th {
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.15);
}

html[data-theme="dark"] .pricing-portal-optimiser-detail > summary > span,
html[data-theme="dark"] .pricing-portal-optimiser-detail-actions button {
  color: #bfdbfe;
}

html[data-theme="dark"] .pricing-portal-optimiser-comparison-matrix td:nth-child(3) {
  background: rgba(37, 99, 235, 0.08);
}

html[data-theme="dark"] .pricing-portal-optimiser-3d-status.is-available,
html[data-theme="dark"] .pricing-portal-optimiser-comparison-matrix td.is-changed:nth-child(3) {
  color: #bfdbfe;
}

html[data-theme="dark"] .pricing-portal-optimiser-accessory-warning,
html[data-theme="dark"] .pricing-portal-optimiser-accessory-list li.warning {
  color: #fcd34d;
}

html[data-theme="dark"] .dashboard-product-dimension-3d-error {
  color: #fca5a5;
}

@media (max-width: 1080px) {
  .pricing-portal-optimiser-objective-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pricing-portal-optimiser-bulk {
    grid-template-columns: minmax(0, 1fr);
  }

  .pricing-portal-optimiser-comparison {
    grid-template-columns: 50px minmax(86px, 0.5fr) repeat(2, minmax(150px, 1fr));
  }

  .pricing-portal-optimiser-row-metrics {
    grid-column: 2 / -1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .pricing-portal-optimiser-reason {
    grid-column: 2 / -1;
  }
}

@media (max-width: 760px) {
  .pricing-portal-optimiser-modal {
    padding: 0;
  }

  .pricing-portal-optimiser-dialog {
    width: 100vw;
    max-height: 100vh;
    min-height: 100vh;
    max-height: 100dvh;
    min-height: 100dvh;
    border-radius: 0;
  }

  .pricing-portal-optimiser-header,
  .pricing-portal-optimiser-body,
  .pricing-portal-optimiser-footer {
    padding-right: 12px;
    padding-left: 12px;
  }

  .pricing-portal-optimiser-header {
    padding-top: max(12px, env(safe-area-inset-top));
  }

  .pricing-portal-optimiser-footer {
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .pricing-portal-optimiser-tabs {
    padding-right: 12px;
    padding-left: 12px;
  }

  .pricing-portal-optimiser-preferences,
  .pricing-portal-optimiser-bulk-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .pricing-portal-optimiser-bulk-arrow {
    width: 100%;
    height: 18px;
    transform: rotate(90deg);
  }

  .pricing-portal-optimiser-section-title,
  .pricing-portal-optimiser-scope-head,
  .pricing-portal-optimiser-preview-head,
  .pricing-portal-optimiser-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .pricing-portal-optimiser-scope-head > small {
    text-align: left;
  }

  .pricing-portal-optimiser-preview-totals {
    grid-template-columns: minmax(0, 1fr);
  }

  .pricing-portal-optimiser-comparison {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .pricing-portal-optimiser-product,
  .pricing-portal-optimiser-row-metrics,
  .pricing-portal-optimiser-reason {
    grid-column: 1 / -1;
  }

  .pricing-portal-optimiser-detail {
    grid-column: 1 / -1;
  }

  .pricing-portal-optimiser-detail > summary > small {
    white-space: normal;
  }

  .pricing-portal-optimiser-detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .pricing-portal-optimiser-comparison-matrix-wrap {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  .pricing-portal-optimiser-comparison-matrix {
    min-width: 650px;
  }

  .pricing-portal-optimiser-detail-saving {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .pricing-portal-optimiser-detail-saving > small {
    margin-left: 0;
  }

  .pricing-portal-optimiser-row-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pricing-portal-optimiser-footer > div,
  .pricing-portal-optimiser-footer-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .pricing-portal-optimiser-detail > summary {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .pricing-portal-optimiser-detail > summary > small {
    display: none;
  }

  .pricing-portal-optimiser-detail-product-head {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .pricing-portal-optimiser-detail-image {
    width: 72px;
    height: 64px;
  }

  .pricing-portal-optimiser-detail-facts {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 980px) {
  .pricing-portal-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pricing-portal-header,
  .pricing-portal-footer {
    flex-direction: column;
  }

  .pricing-portal-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pricing-portal-excluded-lines {
    align-items: flex-start;
    flex-direction: column;
  }

  .pricing-portal-excluded-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .pricing-portal-search,
  .pricing-portal-labour-toggle {
    grid-column: 1 / -1;
  }

  .pricing-portal-summary-totals,
  .pricing-portal-summary-detail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .pricing-portal-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .pricing-portal-search,
  .pricing-portal-labour-toggle {
    grid-column: auto;
  }

  .pricing-portal-hours-editor {
    grid-template-columns: minmax(0, 1fr);
  }

  .pricing-portal-summary-totals,
  .pricing-portal-summary-detail {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (pointer: coarse), (hover: none) {
  html {
    -webkit-text-size-adjust: 100%;
  }

  body {
    overscroll-behavior: none;
  }

  button,
  [role="button"],
  .ghost-btn,
  .primary-btn,
  .secondary-btn,
  .danger-btn,
  .mode-tab,
  .micro-tools button,
  .bottom-tools button,
  .zoom-tools button,
  .view-tools button,
  .tool-btn,
  .secondary-mini,
  .collapsible-section-head:not(:hover):not(:focus-visible),
  .product-category-card,
  .product-result-card,
  .export-report-card-action,
  .dashboard-start-button,
  .dashboard-secondary-action,
  .dashboard-project-row,
  .workspace-more-menu-item,
  .plant-room-tool-button {
    min-height: 44px;
    touch-action: manipulation;
  }

  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select,
  textarea,
  .field select,
  .field > input,
  .settings-field input,
  .settings-field textarea,
  .schematic-library-controls select,
  .schematic-library-controls input,
  .schematic-reference-field input,
  .schematic-reference-field select,
  .plant-room-tool-controls select,
  .plant-room-tool-controls input,
  .plant-room-selected-pipe-grid select,
  .plant-room-selected-pipe-grid input {
    min-height: 44px;
    font-size: 16px;
  }

  .auto-pipe-service-select-shell select {
    min-height: 0;
    height: 100%;
    font-size: 16px;
  }

  input[type="checkbox"],
  input[type="radio"] {
    width: 22px;
    height: 22px;
  }

  .ghost-btn,
  .primary-btn,
  .secondary-btn,
  .mode-tab,
  .micro-tools button,
  .bottom-tools button,
  .zoom-tools button,
  .view-tools button,
  .view-tools select {
    height: 44px;
    padding-inline: 14px;
  }

  .ghost-icon,
  .export-popover-head button,
  .product-library-head button,
  .project-settings-head button,
  .history-popover-head button,
  .schematic-selection-head button {
    width: 44px;
    height: 44px;
  }

  .theme-toggle {
    height: 44px;
    padding-inline: 10px 12px;
  }

  .theme-toggle-track {
    width: 40px;
    height: 24px;
    flex-basis: 40px;
  }

  .theme-toggle-knob {
    width: 18px;
    height: 18px;
  }

  .theme-toggle.active .theme-toggle-knob {
    transform: translateX(16px);
  }

  .modebar {
    gap: 10px;
    padding-inline: 10px;
  }

  .mode-tabs,
  .modebar-controls,
  .bottom-tools,
  .zoom-tools,
  .view-tools,
  .dashboard-chip-row,
  .dashboard-action-row,
  .product-subcategory-tabs,
  .plant-room-tool-grid {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .mode-tabs::-webkit-scrollbar,
  .modebar-controls::-webkit-scrollbar,
  .bottom-tools::-webkit-scrollbar,
  .zoom-tools::-webkit-scrollbar,
  .view-tools::-webkit-scrollbar,
  .dashboard-chip-row::-webkit-scrollbar,
  .dashboard-action-row::-webkit-scrollbar,
  .product-subcategory-tabs::-webkit-scrollbar {
    display: none;
  }

  .tool-btn {
    gap: 8px;
    padding: 9px 10px;
  }

  .tool-palette.compact .tool-btn {
    width: 48px;
    height: 48px;
  }

  .tool-palette.compact .tool-btn::before {
    min-height: 32px;
    padding: 6px 9px;
  }

  .canvas-scroll,
  .schematic-cad-canvas,
  .plant-room-planner-svg {
    touch-action: none;
  }

  .canvas-scroll.is-touch-zooming,
  .schematic-cad-canvas.is-touch-zooming,
  .plant-room-planner-svg.is-touch-zooming {
    cursor: zoom-in;
  }

  .schematic-cad-canvas.is-touch-zooming .schematic-pipe-label,
  .plant-room-planner-svg.is-touch-zooming .plant-room-planner-pipe-label {
    opacity: 0;
  }

  .dashboard-workspace,
  .export-popover,
  .product-library-popover,
  .project-settings-popover,
  .history-popover,
  .methodology-popover,
  .pricing-portal-items-scroll,
  .plant-room-planner-sidebar,
  .schematic-selection-panel {
    -webkit-overflow-scrolling: touch;
  }

  .export-report-card-action,
  .export-info-card,
  .product-result-card,
  .dashboard-project-row {
    padding: 14px;
  }

  .collapsible-section-head {
    padding-block: 12px;
  }

  .plant-room-tool-button {
    min-height: 48px;
  }

  .plant-room-tool-actions button {
    min-height: 46px;
  }
}

.dashboard-analytics-workspace.dashboard-distributor-workspace {
  grid-template-rows: auto auto auto minmax(0, 1fr);
  overflow: auto;
}

.dashboard-analytics-workspace.dashboard-distributor-workspace > .dashboard-distributor-summary,
.dashboard-analytics-workspace.dashboard-distributor-workspace > .dashboard-distributor-tabs {
  min-height: 0;
}

/* Compact floor-plan zone nodes and gas meters */
.canvas-stage .plant-room-node {
  cursor: grab;
  color: #334155;
}

.canvas-stage .plant-room-halo {
  fill: currentColor;
  opacity: 0.08;
  stroke: currentColor;
  stroke-width: 0.65;
  vector-effect: non-scaling-stroke;
}

.canvas-stage .plant-room-planner-svg .plant-room-node-hit {
  fill: transparent;
  pointer-events: all;
  stroke: transparent;
  stroke-width: 12;
  vector-effect: non-scaling-stroke;
}

/* Floor nodes paint above the pipe and riser layers, so their invisible target
   must stay close to the visible marker. Keep the larger planner target above,
   but compensate this narrow floor target for the live viewport zoom. */
.canvas-stage #sheet .plant-room-node-hit {
  fill: transparent;
  pointer-events: all;
  stroke: transparent;
  stroke-width: calc(4px * var(--canvas-zoom-inverse, 1));
  vector-effect: non-scaling-stroke;
}

.canvas-stage #sheet .plant-room-node .plant-room-halo {
  pointer-events: none;
}

.canvas-stage #sheet .plant-room-node .plant-room-marker {
  pointer-events: all;
}

.canvas-stage .plant-room-marker {
  fill: rgba(255, 255, 255, 0.96);
  stroke: currentColor;
  stroke-width: 1.05;
  filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.18));
  vector-effect: non-scaling-stroke;
}

.canvas-stage .plant-room-symbol {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.35;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

.canvas-stage .plant-room-node-glyph {
  opacity: 0.94;
  pointer-events: none;
}

.canvas-stage .plant-room-label-badge {
  fill: rgba(255, 255, 255, 0.96);
  stroke: currentColor;
  stroke-width: 0.65;
  filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.14));
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

.canvas-stage .plant-room-node .plant-room-node-label {
  fill: #172033;
  font-size: calc(5.6px * var(--canvas-text-scale, 1));
  font-weight: 900;
  letter-spacing: 0;
  paint-order: stroke;
  pointer-events: none;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 1.25px;
  text-rendering: geometricPrecision;
  vector-effect: non-scaling-stroke;
}

.canvas-stage .plant-room-node-compact .plant-room-marker {
  fill: rgba(255, 255, 255, 0.98);
  stroke-width: 0.92;
}

.canvas-stage .plant-room-node-compact .plant-room-node-core {
  opacity: 0.075;
}

.canvas-stage .plant-room-node-compact .plant-room-node-label {
  font-size: max(2.85px, calc(4.15px * var(--plant-room-node-scale, 1)));
  stroke-width: 0.62px;
}

.canvas-stage .plant-room-node-compact .plant-room-port-stem {
  stroke-width: 0.82;
}

.canvas-stage .plant-room-node-compact .plant-room-connection-port {
  stroke-width: 0.92;
}

.canvas-stage .plant-room-port-stem {
  opacity: 0.9;
  pointer-events: none;
  stroke-linecap: round;
  stroke-width: 0.95;
  vector-effect: non-scaling-stroke;
}

.canvas-stage .plant-room-connection-port {
  fill: rgba(255, 255, 255, 0.96);
  filter: drop-shadow(0 1px 1px rgba(15, 23, 42, 0.16));
  pointer-events: none;
  stroke-width: 1.05;
  vector-effect: non-scaling-stroke;
}

.canvas-stage .plant-room-node.plant-room-system-heating,
html[data-theme="dark"] .canvas-stage .plant-room-node.plant-room-system-heating {
  color: #ef4444;
}

.canvas-stage .plant-room-node.plant-room-system-cooling,
html[data-theme="dark"] .canvas-stage .plant-room-node.plant-room-system-cooling {
  color: #0a84ff;
}

.canvas-stage .plant-room-node.plant-room-system-public-health,
html[data-theme="dark"] .canvas-stage .plant-room-node.plant-room-system-public-health {
  color: #16a34a;
}

.canvas-stage .plant-room-node.plant-room-system-gas,
html[data-theme="dark"] .canvas-stage .plant-room-node.plant-room-system-gas {
  color: #eab308;
}

.canvas-stage .plant-room-node.plant-room-system-electrical,
html[data-theme="dark"] .canvas-stage .plant-room-node.plant-room-system-electrical {
  color: #7c3aed;
}

.canvas-stage .plant-room-node.plant-room-system-district-heating,
html[data-theme="dark"] .canvas-stage .plant-room-node.plant-room-system-district-heating {
  color: #b91c1c;
}

.canvas-stage .plant-room-node.active .plant-room-marker {
  filter: drop-shadow(0 0 3px currentColor);
  stroke-width: 1.45;
}

.canvas-stage .plant-room-node.active .plant-room-halo {
  opacity: 0.14;
}

html[data-theme="dark"] .canvas-stage .plant-room-marker,
html[data-theme="dark"] .canvas-stage .plant-room-label-badge,
html[data-theme="dark"] .canvas-stage .plant-room-connection-port {
  fill: rgba(255, 255, 255, 0.96);
}

html[data-theme="dark"] .canvas-stage .plant-room-node .plant-room-node-label {
  fill: #172033;
  stroke: rgba(255, 255, 255, 0.9);
}

.canvas-stage .plant-room-node.plant-room-system-heating .plant-room-marker,
.canvas-stage .plant-room-node.plant-room-system-cooling .plant-room-marker,
.canvas-stage .plant-room-node.plant-room-system-public-health .plant-room-marker,
.canvas-stage .plant-room-node.plant-room-system-gas .plant-room-marker,
.canvas-stage .plant-room-node.plant-room-system-electrical .plant-room-marker,
.canvas-stage .plant-room-node.plant-room-system-district-heating .plant-room-marker,
html[data-theme="dark"] .canvas-stage .plant-room-node.plant-room-system-heating .plant-room-marker,
html[data-theme="dark"] .canvas-stage .plant-room-node.plant-room-system-cooling .plant-room-marker,
html[data-theme="dark"] .canvas-stage .plant-room-node.plant-room-system-public-health .plant-room-marker,
html[data-theme="dark"] .canvas-stage .plant-room-node.plant-room-system-gas .plant-room-marker,
html[data-theme="dark"] .canvas-stage .plant-room-node.plant-room-system-electrical .plant-room-marker,
html[data-theme="dark"] .canvas-stage .plant-room-node.plant-room-system-district-heating .plant-room-marker {
  fill: rgba(255, 255, 255, 0.96);
  stroke: currentColor;
}

.canvas-stage .plant-room-node.plant-room-system-heating .plant-room-symbol,
.canvas-stage .plant-room-node.plant-room-system-cooling .plant-room-symbol,
.canvas-stage .plant-room-node.plant-room-system-public-health .plant-room-symbol,
.canvas-stage .plant-room-node.plant-room-system-gas .plant-room-symbol,
.canvas-stage .plant-room-node.plant-room-system-electrical .plant-room-symbol,
.canvas-stage .plant-room-node.plant-room-system-district-heating .plant-room-symbol,
html[data-theme="dark"] .canvas-stage .plant-room-node.plant-room-system-heating .plant-room-symbol,
html[data-theme="dark"] .canvas-stage .plant-room-node.plant-room-system-cooling .plant-room-symbol,
html[data-theme="dark"] .canvas-stage .plant-room-node.plant-room-system-public-health .plant-room-symbol,
html[data-theme="dark"] .canvas-stage .plant-room-node.plant-room-system-gas .plant-room-symbol,
html[data-theme="dark"] .canvas-stage .plant-room-node.plant-room-system-electrical .plant-room-symbol,
html[data-theme="dark"] .canvas-stage .plant-room-node.plant-room-system-district-heating .plant-room-symbol {
  fill: none;
  stroke: currentColor;
}

.canvas-stage .plant-room-node.plant-room-system-heating .plant-room-node-label,
.canvas-stage .plant-room-node.plant-room-system-cooling .plant-room-node-label,
.canvas-stage .plant-room-node.plant-room-system-public-health .plant-room-node-label,
.canvas-stage .plant-room-node.plant-room-system-gas .plant-room-node-label,
.canvas-stage .plant-room-node.plant-room-system-electrical .plant-room-node-label,
.canvas-stage .plant-room-node.plant-room-system-district-heating .plant-room-node-label,
html[data-theme="dark"] .canvas-stage .plant-room-node.plant-room-system-heating .plant-room-node-label,
html[data-theme="dark"] .canvas-stage .plant-room-node.plant-room-system-cooling .plant-room-node-label,
html[data-theme="dark"] .canvas-stage .plant-room-node.plant-room-system-public-health .plant-room-node-label,
html[data-theme="dark"] .canvas-stage .plant-room-node.plant-room-system-gas .plant-room-node-label,
html[data-theme="dark"] .canvas-stage .plant-room-node.plant-room-system-electrical .plant-room-node-label,
html[data-theme="dark"] .canvas-stage .plant-room-node.plant-room-system-district-heating .plant-room-node-label {
  fill: #172033;
  stroke: rgba(255, 255, 255, 0.9);
}

.project-setup-tutorial-toggle {
  align-self: center;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid rgba(10, 132, 255, 0.2);
  border-radius: 14px;
  background: rgba(10, 132, 255, 0.08);
  color: #172033;
}

.project-setup-tutorial-toggle span {
  font-weight: 800;
}

.in-app-tutorial {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  pointer-events: none;
  isolation: isolate;
}

.in-app-tutorial::before {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
}

.in-app-tutorial-card {
  position: absolute;
  top: auto;
  right: auto;
  bottom: clamp(86px, 9vh, 118px);
  left: auto;
  width: min(390px, calc(100vw - 28px));
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
  color: #172033;
  pointer-events: auto;
  backdrop-filter: blur(18px);
  transform: translate3d(0, 0, 0);
  transition:
    top 220ms ease,
    right 220ms ease,
    bottom 220ms ease,
    left 220ms ease,
    transform 220ms ease,
    width 180ms ease;
}

.in-app-tutorial-card::after {
  content: none;
  display: none;
}

.in-app-tutorial[data-dynamic-placement="true"] .in-app-tutorial-card,
.in-app-tutorial[data-dynamic-placement="true"].in-app-tutorial--canvas-clear .in-app-tutorial-card,
.in-app-tutorial[data-dynamic-placement="true"].in-app-tutorial--top-center .in-app-tutorial-card,
.in-app-tutorial[data-dynamic-placement="true"].in-app-tutorial--top-left .in-app-tutorial-card,
.in-app-tutorial[data-dynamic-placement="true"].in-app-tutorial--top-right .in-app-tutorial-card,
.in-app-tutorial[data-dynamic-placement="true"].in-app-tutorial--right-rail .in-app-tutorial-card,
.in-app-tutorial[data-dynamic-placement="true"].in-app-tutorial--left-rail .in-app-tutorial-card,
.in-app-tutorial[data-dynamic-placement="true"].in-app-tutorial--left-tools .in-app-tutorial-card,
.in-app-tutorial[data-dynamic-placement="true"].in-app-tutorial--bottom-center .in-app-tutorial-card {
  top: var(--tutorial-card-top);
  right: auto;
  bottom: auto;
  left: var(--tutorial-card-left);
  transform: none;
  transition:
    box-shadow 180ms ease,
    background 180ms ease,
    width 180ms ease;
}

.in-app-tutorial[data-dynamic-placement="true"] .in-app-tutorial-card::after,
.in-app-tutorial[data-dynamic-placement="true"].in-app-tutorial--canvas-clear .in-app-tutorial-card::after,
.in-app-tutorial[data-dynamic-placement="true"].in-app-tutorial--top-center .in-app-tutorial-card::after,
.in-app-tutorial[data-dynamic-placement="true"].in-app-tutorial--top-left .in-app-tutorial-card::after,
.in-app-tutorial[data-dynamic-placement="true"].in-app-tutorial--top-right .in-app-tutorial-card::after,
.in-app-tutorial[data-dynamic-placement="true"].in-app-tutorial--right-rail .in-app-tutorial-card::after,
.in-app-tutorial[data-dynamic-placement="true"].in-app-tutorial--left-rail .in-app-tutorial-card::after,
.in-app-tutorial[data-dynamic-placement="true"].in-app-tutorial--left-tools .in-app-tutorial-card::after,
.in-app-tutorial[data-dynamic-placement="true"].in-app-tutorial--bottom-center .in-app-tutorial-card::after {
  top: var(--tutorial-arrow-top);
  right: auto;
  bottom: auto;
  left: var(--tutorial-arrow-left);
  transform: translate(-50%, -50%) rotate(45deg);
}

.in-app-tutorial-anchor-highlight {
  position: fixed;
  top: var(--tutorial-anchor-top);
  left: var(--tutorial-anchor-left);
  width: var(--tutorial-anchor-width);
  height: var(--tutorial-anchor-height);
  border: 2px solid rgba(10, 132, 255, 0.78);
  border-radius: 14px;
  box-shadow: 0 0 0 6px rgba(10, 132, 255, 0.14), 0 16px 34px rgba(10, 132, 255, 0.18);
  pointer-events: none;
  animation: in-app-tutorial-target-pulse 1650ms ease-in-out both;
}

.in-app-tutorial-demo-layer {
  position: fixed;
  inset: 0;
  clip-path: inset(
    var(--tutorial-demo-clip-top, 0px)
    var(--tutorial-demo-clip-right, 0px)
    var(--tutorial-demo-clip-bottom, 0px)
    var(--tutorial-demo-clip-left, 0px)
  );
  overflow: hidden;
  pointer-events: none;
}

.in-app-tutorial-demo-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.in-app-tutorial-demo-path {
  fill: none;
  stroke: #0a84ff;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  filter: drop-shadow(0 8px 18px rgba(10, 132, 255, 0.22));
  animation: in-app-tutorial-draw-path 1550ms cubic-bezier(0.2, 0.9, 0.28, 1) 620ms both;
}

.in-app-tutorial-demo-dot {
  fill: #ffffff;
  stroke: #0a84ff;
  stroke-width: 3;
  opacity: 0;
  filter: drop-shadow(0 8px 14px rgba(10, 132, 255, 0.25));
  animation: in-app-tutorial-click-dot 520ms ease-out calc(520ms + var(--dot-index, 0) * 150ms) both;
}

.in-app-tutorial-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2;
  width: 34px;
  height: 38px;
  pointer-events: none;
  opacity: 0;
  transform: translate(var(--tutorial-cursor-start-x), var(--tutorial-cursor-start-y));
  filter: drop-shadow(0 12px 22px rgba(15, 23, 42, 0.3));
  animation: in-app-tutorial-cursor-move 1950ms cubic-bezier(0.2, 0.9, 0.24, 1) both;
}

.in-app-tutorial-cursor::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(142deg, #ffffff 0%, #eff6ff 54%, #dbeafe 100%);
  clip-path: polygon(0 0, 0 32px, 9px 24px, 14px 36px, 22px 33px, 17px 22px, 32px 22px);
  filter:
    drop-shadow(0 0 0 rgba(255, 255, 255, 0.95))
    drop-shadow(0 8px 14px rgba(15, 23, 42, 0.24));
}

.in-app-tutorial-cursor::after {
  content: "";
  position: absolute;
  left: -12px;
  top: -12px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 2px solid rgba(10, 132, 255, 0.72);
  box-shadow:
    0 0 0 8px rgba(10, 132, 255, 0.1),
    0 0 28px rgba(124, 58, 237, 0.22);
  opacity: 0;
  transform: scale(0.35);
  animation: in-app-tutorial-cursor-click 1950ms ease-out both;
}

.in-app-tutorial-cursor span {
  position: absolute;
  left: 13px;
  top: 20px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0a84ff, #7c3aed);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.95),
    0 6px 12px rgba(10, 132, 255, 0.32);
}

.in-app-tutorial--top-center .in-app-tutorial-card {
  top: clamp(76px, 8vh, 108px);
  left: 50%;
  bottom: auto;
  transform: translate3d(-50%, 0, 0);
}

.in-app-tutorial--top-center .in-app-tutorial-card::after {
  top: -8px;
  left: 50%;
  transform: translateX(-50%) rotate(-45deg);
}

.in-app-tutorial--top-left .in-app-tutorial-card {
  top: clamp(76px, 8vh, 108px);
  left: clamp(302px, 18vw, 360px);
  bottom: auto;
}

.in-app-tutorial--top-left .in-app-tutorial-card::after,
.in-app-tutorial--left-tools .in-app-tutorial-card::after,
.in-app-tutorial--left-rail .in-app-tutorial-card::after {
  top: 28px;
  left: -8px;
  transform: rotate(-135deg);
}

.in-app-tutorial--top-right .in-app-tutorial-card {
  top: clamp(76px, 8vh, 108px);
  right: clamp(18px, 2.4vw, 34px);
  bottom: auto;
}

.in-app-tutorial--top-right .in-app-tutorial-card::after,
.in-app-tutorial--right-rail .in-app-tutorial-card::after {
  top: 28px;
  right: -8px;
  transform: rotate(45deg);
}

.in-app-tutorial--right-rail .in-app-tutorial-card {
  top: clamp(138px, 16vh, 190px);
  right: clamp(18px, 2.4vw, 34px);
  bottom: auto;
}

.in-app-tutorial--left-rail .in-app-tutorial-card {
  top: clamp(138px, 16vh, 190px);
  left: clamp(18px, 2vw, 30px);
  bottom: auto;
}

.in-app-tutorial--left-tools .in-app-tutorial-card {
  top: clamp(190px, 22vh, 270px);
  left: clamp(318px, 18.5vw, 386px);
  bottom: auto;
}

.in-app-tutorial--bottom-center .in-app-tutorial-card {
  left: 50%;
  bottom: clamp(84px, 9vh, 112px);
  transform: translate3d(-50%, 0, 0);
}

.in-app-tutorial--bottom-center .in-app-tutorial-card::after {
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%) rotate(135deg);
}

.in-app-tutorial--canvas-clear .in-app-tutorial-card {
  width: min(370px, calc(100vw - 28px));
}

.in-app-tutorial--canvas-clear.in-app-tutorial--top-left .in-app-tutorial-card,
.in-app-tutorial--canvas-clear.in-app-tutorial--top-right .in-app-tutorial-card,
.in-app-tutorial--canvas-clear.in-app-tutorial--right-rail .in-app-tutorial-card,
.in-app-tutorial--canvas-clear.in-app-tutorial--left-tools .in-app-tutorial-card {
  right: auto;
  left: clamp(18px, 2vw, 30px);
}

.in-app-tutorial--canvas-clear.in-app-tutorial--top-left .in-app-tutorial-card::after,
.in-app-tutorial--canvas-clear.in-app-tutorial--top-right .in-app-tutorial-card::after,
.in-app-tutorial--canvas-clear.in-app-tutorial--right-rail .in-app-tutorial-card::after,
.in-app-tutorial--canvas-clear.in-app-tutorial--left-tools .in-app-tutorial-card::after {
  top: 28px;
  left: -8px;
  right: auto;
  transform: rotate(-135deg);
}

.in-app-tutorial-top,
.in-app-tutorial-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.in-app-tutorial-kicker,
.in-app-tutorial-target {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.in-app-tutorial-kicker {
  color: #0a84ff;
}

.in-app-tutorial-close {
  width: 34px;
  height: 34px;
}

.in-app-tutorial-progress {
  height: 8px;
  margin: 12px 0 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
}

.in-app-tutorial-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0a84ff, #7c3aed);
  transition: width 220ms ease;
}

.in-app-tutorial-copy {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.in-app-tutorial-target {
  padding: 5px 9px;
  background: rgba(10, 132, 255, 0.1);
  color: #075bb5;
}

.in-app-tutorial-copy h2 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.1;
}

.in-app-tutorial-copy p {
  margin: 0;
  color: #4b5563;
  font-size: 0.95rem;
  line-height: 1.42;
}

.in-app-tutorial-copy small {
  color: #64748b;
  font-weight: 800;
}

.in-app-tutorial-actions {
  flex-wrap: wrap;
}

.in-app-tutorial-actions button {
  min-height: 38px;
}

html[data-theme="dark"] .project-setup-tutorial-toggle {
  border-color: rgba(96, 165, 250, 0.26);
  background: rgba(96, 165, 250, 0.12);
  color: #e5edf8;
}

html[data-theme="dark"] .in-app-tutorial-card {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(18, 24, 36, 0.94);
  color: #edf3fb;
}

html[data-theme="dark"] .in-app-tutorial-copy p {
  color: #bac6d6;
}

html[data-theme="dark"] .in-app-tutorial-copy small {
  color: #9fb0c7;
}

html[data-theme="dark"] .in-app-tutorial-target {
  background: rgba(96, 165, 250, 0.16);
  color: #93c5fd;
}

html[data-theme="dark"] .in-app-tutorial-cursor::before {
  background:
    linear-gradient(142deg, #ffffff 0%, #dbeafe 58%, #bfdbfe 100%);
}

@keyframes in-app-tutorial-target-pulse {
  0% {
    opacity: 0;
    transform: scale(0.98);
  }
  20%,
  82% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0.72;
    transform: scale(1);
  }
}

@keyframes in-app-tutorial-draw-path {
  0% {
    opacity: 0;
    stroke-dashoffset: 1;
  }
  12% {
    opacity: 1;
  }
  100% {
    opacity: 0.96;
    stroke-dashoffset: 0;
  }
}

@keyframes in-app-tutorial-click-dot {
  0% {
    opacity: 0;
    transform: scale(0.45);
  }
  45% {
    opacity: 1;
    transform: scale(1.08);
  }
  100% {
    opacity: 0.9;
    transform: scale(1);
  }
}

@keyframes in-app-tutorial-cursor-move {
  0% {
    opacity: 0;
    transform: translate(var(--tutorial-cursor-start-x), var(--tutorial-cursor-start-y)) scale(0.96);
  }
  10% {
    opacity: 1;
  }
  36% {
    opacity: 1;
    transform: translate(var(--tutorial-cursor-click-x), var(--tutorial-cursor-click-y)) scale(1);
  }
  45% {
    opacity: 1;
    transform: translate(var(--tutorial-cursor-click-x), var(--tutorial-cursor-click-y)) scale(0.88);
  }
  62% {
    opacity: 1;
    transform: translate(var(--tutorial-cursor-click-x), var(--tutorial-cursor-click-y)) scale(1);
  }
  100% {
    opacity: 1;
    transform: translate(var(--tutorial-cursor-end-x), var(--tutorial-cursor-end-y)) scale(1);
  }
}

@keyframes in-app-tutorial-cursor-click {
  0%,
  32% {
    opacity: 0;
    transform: scale(0.3);
  }
  42% {
    opacity: 0.92;
    transform: scale(1);
  }
  58%,
  100% {
    opacity: 0;
    transform: scale(1.9);
  }
}

@media (max-width: 900px) {
  .in-app-tutorial-card,
  .in-app-tutorial--top-center .in-app-tutorial-card,
  .in-app-tutorial--top-left .in-app-tutorial-card,
  .in-app-tutorial--top-right .in-app-tutorial-card,
  .in-app-tutorial--right-rail .in-app-tutorial-card,
  .in-app-tutorial--left-rail .in-app-tutorial-card,
  .in-app-tutorial--left-tools .in-app-tutorial-card,
  .in-app-tutorial--bottom-center .in-app-tutorial-card {
    top: auto;
    right: 14px;
    bottom: 86px;
    left: 14px;
    width: auto;
    transform: none;
  }

  .in-app-tutorial-card::after {
    display: none;
  }
}
.district-standards-field {
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 12px;
  padding: 10px;
}

.district-standards-field legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.district-standards-list {
  display: grid;
  gap: 6px;
}

.district-standard-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--text);
  font-weight: 800;
  line-height: 1.15;
}

.district-standard-option input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  accent-color: #2563eb;
}

.drawn-pipe-run.pipe-district-flow.active .drawn-pipe-line,
.drawn-pipe-run.pipe-district-flow .drawn-pipe-segment-line.active {
  filter: drop-shadow(0 0 6px rgba(185, 28, 28, 0.82)) drop-shadow(0 2px 5px rgba(15, 23, 42, 0.18));
}

.drawn-pipe-run.pipe-district-return.active .drawn-pipe-line,
.drawn-pipe-run.pipe-district-return .drawn-pipe-segment-line.active {
  filter: drop-shadow(0 0 6px rgba(79, 70, 229, 0.82)) drop-shadow(0 2px 5px rgba(15, 23, 42, 0.18));
}

.pipe-district-flow .drawn-pipe-line,
.pipe-district-flow .pipe-draft-line,
.pipe-draft-line.pipe-district-flow,
.schematic-pipe-run.pipe-district-flow .schematic-pipe-line,
.schematic-pipe-draft.pipe-district-flow .schematic-pipe-draft-line {
  stroke: #b91c1c;
}

.pipe-district-return .drawn-pipe-line,
.pipe-district-return .pipe-draft-line,
.pipe-draft-line.pipe-district-return,
.schematic-pipe-run.pipe-district-return .schematic-pipe-line,
.schematic-pipe-draft.pipe-district-return .schematic-pipe-draft-line {
  stroke: #4f46e5;
}

.pipe-district-flow .pipe-draft-point,
.pipe-district-flow .pipe-guide-point,
.pipe-district-flow .pipe-vertex,
.pipe-snap-target.pipe-district-flow,
.schematic-pipe-snap-target.pipe-district-flow circle {
  stroke: #b91c1c;
}

.pipe-district-return .pipe-draft-point,
.pipe-district-return .pipe-guide-point,
.pipe-district-return .pipe-vertex,
.pipe-snap-target.pipe-district-return,
.schematic-pipe-snap-target.pipe-district-return circle {
  stroke: #4f46e5;
}

.pipe-alignment-guides.pipe-district-flow .pipe-guide-axis {
  stroke: rgba(185, 28, 28, 0.38);
}

.pipe-alignment-guides.pipe-district-return .pipe-guide-axis {
  stroke: rgba(79, 70, 229, 0.38);
}

.pipe-flow-direction.pipe-district-flow {
  color: #b91c1c;
}

.pipe-flow-direction.pipe-district-return {
  color: #4f46e5;
}

.pipe-size-label-grid.pipe-district-flow .pipe-size-label-pill-bg,
.schematic-generated-label.pipe-district-flow rect {
  stroke: rgba(185, 28, 28, 0.56);
  fill: rgba(255, 255, 255, 0.88);
}

.pipe-size-label-grid.pipe-district-return .pipe-size-label-pill-bg,
.schematic-generated-label.pipe-district-return rect {
  stroke: rgba(79, 70, 229, 0.56);
  fill: rgba(255, 255, 255, 0.88);
}

.pipe-size-label-grid.pipe-district-flow .pipe-label-divider {
  stroke: rgba(185, 28, 28, 0.48);
}

.pipe-size-label-grid.pipe-district-return .pipe-label-divider {
  stroke: rgba(79, 70, 229, 0.48);
}

.pipe-size-label-grid.pipe-district-flow .pipe-size-label,
.pipe-size-label.pipe-district-flow,
.schematic-generated-label.pipe-district-flow text {
  fill: #b91c1c;
}

.pipe-size-label-grid.pipe-district-return .pipe-size-label,
.pipe-size-label.pipe-district-return,
.schematic-generated-label.pipe-district-return text {
  fill: #4f46e5;
}

.pipe-tee-fitting.pipe-district-flow circle,
.pipe-tee-fitting.pipe-district-flow path,
.pipe-junction-elbow.pipe-district-flow circle,
.pipe-reducer-fitting.pipe-district-flow circle,
.pipe-reducer-fitting.pipe-district-flow path {
  stroke: #b91c1c;
}

.pipe-tee-fitting.pipe-district-return circle,
.pipe-tee-fitting.pipe-district-return path,
.pipe-junction-elbow.pipe-district-return circle,
.pipe-reducer-fitting.pipe-district-return circle,
.pipe-reducer-fitting.pipe-district-return path {
  stroke: #4f46e5;
}

.riser-node.pipe-district-flow .riser-halo {
  fill: rgba(185, 28, 28, 0.14);
  stroke: rgba(185, 28, 28, 0.52);
}

.riser-node.pipe-district-flow .riser-marker,
.riser-node.pipe-district-flow .riser-symbol {
  stroke: #b91c1c;
}

.riser-node.pipe-district-flow text {
  fill: #b91c1c;
}

.riser-node.pipe-district-return .riser-halo {
  fill: rgba(79, 70, 229, 0.14);
  stroke: rgba(79, 70, 229, 0.54);
}

.riser-node.pipe-district-return .riser-marker,
.riser-node.pipe-district-return .riser-symbol {
  stroke: #4f46e5;
}

.riser-node.pipe-district-return text {
  fill: #4f46e5;
}

html[data-page="shared-project"] {
  height: auto;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
}

body[data-page="shared-project"],
body[data-page="shared-project"] #app {
  height: auto;
  min-height: 100vh;
  overflow: visible;
}

html[data-page="commissioning-report"],
body[data-page="commissioning-report"],
body[data-page="commissioning-report"] #app {
  height: auto;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
}

html[data-page="client-review"] {
  height: auto;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
}

body[data-page="client-review"],
body[data-page="client-review"] #app {
  height: auto;
  min-height: 100vh;
  overflow: visible;
}

@media screen and (max-width: 900px) {
  .client-review-shell,
  .client-review-toolbar,
  .client-review-document {
    min-width: 0;
    max-width: 100%;
  }

  .client-review-toolbar {
    align-items: flex-start;
    flex-direction: column;
    flex-wrap: wrap;
  }

  .client-review-brand {
    min-width: 0;
  }

  .client-review-toolbar-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .client-review-form input,
  .client-review-form select,
  .client-review-form textarea {
    width: 100%;
    max-width: 100%;
  }
}

@media print {
  html[data-page="client-review"],
  body[data-page="client-review"],
  body[data-page="client-review"] #app {
    height: auto;
    overflow: visible;
  }

  .client-review-toolbar {
    display: none !important;
  }

  .client-review-shell {
    padding: 0 !important;
    overflow: visible;
  }

  .client-review-document {
    max-width: none;
    overflow: visible;
  }
}

body[data-page="commissioning-report"] {
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 12%, rgba(37, 99, 235, 0.12), transparent 34%),
    linear-gradient(180deg, #f8fbff 0%, #eef3fa 100%);
  color: #101827;
}

.commissioning-share-shell {
  width: calc(100vw - 24px);
  max-width: none;
  margin: 0 auto;
  padding: 14px 0 42px;
}

.commissioning-share-toolbar {
  position: sticky;
  top: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px) saturate(150%);
}

.commissioning-share-brand {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  row-gap: 2px;
  min-width: 0;
}

.commissioning-share-brand .report-axio-logo {
  grid-row: span 3;
}

.commissioning-share-brand span,
.commissioning-share-brand small,
.commissioning-share-status {
  color: #64748b;
  font-size: 11px;
  font-weight: 840;
}

.commissioning-share-brand span {
  color: #2563eb;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.commissioning-share-brand strong {
  min-width: 0;
  color: #101827;
  font-size: 18px;
  font-weight: 920;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commissioning-share-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.commissioning-share-document {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.96);
  overflow: hidden;
  box-shadow: 0 20px 52px rgba(15, 23, 42, 0.08);
}

.commissioning-share-document.report-page {
  width: 100%;
  max-width: none;
  padding: clamp(18px, 2vw, 34px);
}

.commissioning-share-empty {
  padding: 44px;
  border: 1px dashed rgba(37, 99, 235, 0.32);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
}

.commissioning-share-empty h1 {
  margin: 0 0 8px;
  color: #101827;
  font-size: 30px;
}

.commissioning-share-empty p {
  margin: 0;
  color: #475569;
  font-weight: 760;
}

.commissioning-share-footer {
  display: block;
  margin-top: 18px;
}

.commissioning-customer-cover h1 {
  color: #101827;
}

.commissioning-customer-overview {
  margin: 18px 0;
}

.commissioning-customer-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.commissioning-customer-section-head span,
.commissioning-customer-overview-list dt,
.commissioning-customer-map-copy span {
  color: #2563eb;
  font-size: 10px;
  font-weight: 930;
  letter-spacing: 0.05em;
  line-height: 1.1;
  text-transform: uppercase;
}

.commissioning-customer-section-head h2 {
  margin: 0;
  color: #101827;
  font-size: clamp(22px, 2.2vw, 34px);
  font-weight: 940;
  letter-spacing: 0;
  line-height: 1.05;
}

.commissioning-customer-section-head p {
  max-width: 560px;
  margin: 0;
  color: #475569;
  font-size: 13px;
  font-weight: 760;
  line-height: 1.45;
}

.commissioning-customer-overview-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
  gap: 14px;
  align-items: stretch;
}

.commissioning-customer-overview-list,
.commissioning-customer-map-card {
  min-width: 0;
  margin: 0;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(255, 255, 255, 0.88));
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.commissioning-customer-overview-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.commissioning-customer-overview-list div {
  min-width: 0;
  padding: 12px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.78);
}

.commissioning-customer-overview-list dd {
  min-width: 0;
  margin: 6px 0 0;
  color: #101827;
  font-size: 17px;
  font-weight: 920;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.commissioning-check-conditions {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding: 9px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 12px;
  background: #f8fbff;
}

.commissioning-check-conditions > span {
  color: #2563eb;
  font-size: 9px;
  font-weight: 930;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.commissioning-check-conditions div {
  display: grid;
  grid-template-columns: minmax(80px, 0.9fr) minmax(90px, 1.1fr);
  gap: 8px;
  align-items: baseline;
  min-width: 0;
}

.commissioning-check-conditions em {
  min-width: 0;
  color: #64748b;
  font-size: 9px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.2;
}

.commissioning-check-conditions strong {
  min-width: 0;
  color: #101827;
  font-size: 10px;
  font-weight: 920;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.commissioning-customer-map-card {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(220px, 0.76fr);
  gap: 12px;
  padding: 12px;
}

.commissioning-customer-map-visual {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(37, 99, 235, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(37, 99, 235, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 55% 42%, rgba(37, 99, 235, 0.2), transparent 18%),
    linear-gradient(135deg, #f8fbff, #eaf2ff);
  background-size: 42px 42px, 42px 42px, auto, auto;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.68);
}

.commissioning-customer-map-frame {
  display: block;
  width: 100%;
  min-height: 260px;
  height: 100%;
  border: 0;
  filter: saturate(0.9) contrast(1.02);
}

.commissioning-customer-map-empty-state {
  display: grid;
  min-height: 260px;
  place-content: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
}

.commissioning-customer-map-empty-state span {
  justify-self: center;
  padding: 7px 10px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
  font-size: 10px;
  font-weight: 930;
  letter-spacing: 0.06em;
}

.commissioning-customer-map-empty-state strong {
  color: #101827;
  font-size: 18px;
  font-weight: 940;
  line-height: 1.12;
}

.commissioning-customer-map-road {
  position: absolute;
  inset: 48% -10% auto -10%;
  height: 18px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.12);
  transform: rotate(-12deg);
}

.commissioning-customer-map-road.alt {
  inset: -8% auto -8% 48%;
  width: 18px;
  height: auto;
  transform: rotate(18deg);
}

.commissioning-customer-map-pin {
  position: absolute;
  left: 50%;
  top: 48%;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 5px solid #fff;
  border-radius: 50% 50% 50% 8px;
  background: #2563eb;
  color: #fff;
  font-size: 20px;
  font-weight: 950;
  transform: translate(-50%, -50%) rotate(-45deg);
  box-shadow: 0 18px 28px rgba(37, 99, 235, 0.26);
}

.commissioning-customer-map-pin span {
  transform: rotate(45deg);
}

.commissioning-customer-map-print {
  display: none;
}

.commissioning-customer-map-print-graphic {
  position: relative;
  min-height: 168px;
  overflow: hidden;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(37, 99, 235, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(37, 99, 235, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 53% 45%, rgba(37, 99, 235, 0.18), transparent 23%),
    linear-gradient(135deg, #f8fbff, #eaf2ff);
  background-size: 36px 36px, 36px 36px, auto, auto;
}

.commissioning-customer-map-print-road {
  position: absolute;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.14);
}

.commissioning-customer-map-print-road.road-main {
  inset: 47% -12% auto -12%;
  height: 18px;
  transform: rotate(-10deg);
}

.commissioning-customer-map-print-road.road-cross {
  inset: -12% auto -12% 48%;
  width: 16px;
  transform: rotate(17deg);
}

.commissioning-customer-map-print-road.road-local {
  left: 12%;
  right: 18%;
  top: 68%;
  height: 10px;
  opacity: 0.55;
  transform: rotate(6deg);
}

.commissioning-customer-map-print-pin {
  position: absolute;
  left: 53%;
  top: 45%;
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border: 5px solid #fff;
  border-radius: 50% 50% 50% 9px;
  background: #2563eb;
  color: #fff;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transform: translate(-50%, -50%) rotate(-45deg);
  box-shadow: 0 18px 28px rgba(37, 99, 235, 0.24);
}

.commissioning-customer-map-print-pin span {
  transform: rotate(45deg);
}

.commissioning-customer-map-print-copy {
  display: grid;
  align-content: center;
  gap: 6px;
  min-width: 0;
  padding: 8px;
}

.commissioning-customer-map-print-copy span {
  color: #2563eb;
  font-size: 10px;
  font-weight: 930;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.commissioning-customer-map-print-copy strong {
  color: #101827;
  font-size: 18px;
  font-weight: 940;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.commissioning-customer-map-print-copy small {
  color: #475569;
  font-size: 10px;
  font-weight: 760;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.commissioning-customer-map-copy {
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: 0;
  padding: 8px;
}

.commissioning-customer-map-copy strong {
  color: #101827;
  font-size: 20px;
  font-weight: 940;
  line-height: 1.08;
}

.commissioning-customer-map-copy p {
  margin: 0;
  color: #475569;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.commissioning-customer-map-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  margin-top: 4px;
  min-height: 38px;
  padding: 10px 14px;
  border: 1px solid rgba(37, 99, 235, 0.28);
  border-radius: 14px;
  background: linear-gradient(135deg, #2f7df4, #3d5ee8);
  color: #fff;
  font-size: 11px;
  font-weight: 930;
  text-decoration: none;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.18);
}

.commissioning-customer-map-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.22);
}

.commissioning-customer-intro {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.commissioning-customer-intro > div {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.94), rgba(255, 255, 255, 0.86));
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.commissioning-customer-intro span,
.commissioning-customer-explainer li strong {
  color: #2563eb;
}

.commissioning-customer-intro span {
  display: block;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.commissioning-customer-intro strong {
  display: block;
  margin-top: 5px;
  color: #101827;
  font-size: 19px;
  font-weight: 930;
  line-height: 1.08;
}

.commissioning-customer-intro small {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 10px;
  font-weight: 760;
  line-height: 1.35;
}

.commissioning-customer-explainer {
  padding: 14px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 16px;
  background: #f8fbff;
}

.commissioning-customer-explainer p {
  margin: 0 0 8px;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
}

.commissioning-customer-explainer ul {
  margin: 0;
  padding-left: 18px;
  color: #334155;
}

.report-company-details span,
.report-company-details small {
  display: block;
}

.report-company-details small {
  margin-top: 5px;
  color: #2563eb;
  font-weight: 900;
}

@media (max-width: 760px) {
  .commissioning-share-shell {
    width: calc(100vw - 18px);
    padding-top: 10px;
  }

  .commissioning-share-toolbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .commissioning-share-toolbar-actions {
    justify-content: flex-start;
  }

  .commissioning-customer-intro {
    grid-template-columns: 1fr;
  }

  .commissioning-share-document.report-page {
    padding: 14px;
    border-radius: 20px;
  }

  .commissioning-customer-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .commissioning-customer-overview-layout,
  .commissioning-customer-map-card {
    grid-template-columns: 1fr;
  }

  .commissioning-customer-overview-list {
    grid-template-columns: 1fr;
  }
}

@media print {
  .commissioning-share-toolbar {
    display: none;
  }

  .commissioning-share-shell {
    width: auto;
    padding: 0;
  }

  .commissioning-share-document {
    border: 0;
    box-shadow: none;
  }

  .commissioning-share-document.report-page {
    padding: 0;
  }

  .commissioning-customer-map-card,
  .commissioning-customer-overview-list {
    break-inside: avoid;
  }

  .commissioning-customer-map-frame,
  .commissioning-customer-map-empty-state {
    display: none !important;
  }

  .commissioning-customer-map-visual {
    min-height: auto;
    padding: 10px;
    background: #f8fbff;
  }

  .commissioning-customer-map-print {
    display: grid !important;
    grid-template-columns: minmax(190px, 1fr) minmax(180px, 0.75fr);
    gap: 10px;
    min-height: 170px;
  }

  .commissioning-customer-map-button {
    display: none !important;
  }
}

.project-workspace-switcher:not(.system-controls) {
  align-items: center;
  gap: 8px;
  padding-right: 14px;
}

.project-workspace-switcher:not(.system-controls) span {
  color: #5f6b7a;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.project-workspace-switcher:not(.system-controls).active span {
  color: rgba(255, 255, 255, 0.78);
}

.project-workspace-switcher:not(.system-controls) select {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  min-width: 116px;
  outline: 0;
  padding: 0 18px 0 0;
}

.project-workspace-switcher:not(.system-controls)::after {
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
  content: "";
  margin-left: -16px;
  opacity: 0.55;
  pointer-events: none;
}

.project-workspace-switcher.system-controls {
  flex: 0 0 auto;
}

.project-workspace-switcher.system-controls select {
  width: 190px;
}

.project-workspace-context {
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 230px;
  padding: 10px 14px;
}

.project-workspace-context span {
  color: #2563eb;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.project-workspace-context strong {
  color: #111827;
  font-size: 15px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

.workspace.programme-workspace-shell,
.workspace.installation-workspace-shell {
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
}

.programme-workspace {
  background:
    linear-gradient(135deg, rgba(248, 250, 252, 0.98), rgba(255, 255, 255, 0.96) 46%, rgba(241, 245, 249, 0.92)),
    #f8fafc;
  color: #111827;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 12px;
  position: relative;
}

.programme-workspace button,
.programme-workspace input,
.programme-workspace select {
  font: inherit;
}

.programme-header,
.programme-calendar-panel,
.programme-task-list,
.installation-trade-column {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 18px;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
}

.programme-header {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 18px;
}

.programme-header span,
.programme-calendar-panel > header span,
.programme-task-list > header span,
.installation-trade-column > header span {
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.programme-header h1,
.programme-calendar-panel h2,
.programme-task-list h2 {
  font-size: 30px;
  line-height: 1;
  margin: 3px 0 0;
}

.programme-header p,
.programme-task-list p {
  color: #5f6b7a;
  font-weight: 750;
  margin: 6px 0 0;
}

.programme-header-stats,
.programme-trade-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
}

.programme-header-stats article,
.programme-trade-summary article {
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  padding: 12px;
}

.programme-header-stats span,
.programme-trade-summary span {
  color: #6b7280;
  display: block;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.programme-header-stats strong,
.programme-trade-summary strong {
  display: block;
  font-size: 24px;
  font-weight: 950;
  margin-top: 3px;
}

.programme-trade-summary article.trade-mechanical {
  border-color: rgba(239, 68, 68, 0.28);
}

.programme-trade-summary article.trade-electrical {
  border-color: rgba(126, 34, 206, 0.28);
}

.programme-trade-summary article.trade-control {
  border-color: rgba(37, 99, 235, 0.28);
}

.programme-hour-strip {
  align-items: center;
  background: rgba(248, 250, 252, 0.92);
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 8px 12px;
}

.programme-hour-strip > span {
  color: #64748b;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.programme-hour-strip > div {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  min-width: 0;
}

.programme-hour-strip article {
  align-items: center;
  background: var(--programme-trade-soft);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-left: 5px solid var(--programme-trade);
  border-radius: 12px;
  display: flex;
  gap: 8px;
  min-height: 32px;
  padding: 5px 9px;
}

.programme-hour-strip strong,
.programme-hour-strip article span {
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
}

.programme-hour-strip article span {
  color: #64748b;
}

.programme-calendar-panel {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.programme-calendar-panel > header,
.programme-task-list > header {
  align-items: flex-start;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 12px;
}

.programme-calendar-panel > header h2 {
  font-size: 26px;
  line-height: 1;
  margin: 2px 0 0;
}

.programme-calendar-panel > header p {
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
  margin: 3px 0 0;
}

.programme-calendar-controls {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
  max-width: min(1180px, 76vw);
}

.programme-start-date,
.programme-workday-control {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 12px;
  display: flex;
  min-height: 34px;
  overflow: hidden;
}

.programme-start-date {
  overflow: visible;
  position: relative;
}

.programme-start-date > span,
.programme-workday-control > span {
  background: rgba(248, 250, 252, 0.88);
  border-right: 1px solid rgba(148, 163, 184, 0.22);
  color: #64748b;
  font-size: 10px;
  font-weight: 950;
  height: 100%;
  padding: 9px 9px;
  text-transform: uppercase;
  white-space: nowrap;
}

.programme-start-date input,
.programme-workday-control input {
  background: transparent;
  border: 0;
  color-scheme: light;
  color: #111827;
  font-size: 13px;
  font-weight: 900;
  min-height: 32px;
  padding: 0 7px;
}

.programme-workday-control {
  gap: 0;
}

.programme-workday-control label {
  align-items: center;
  border-right: 1px solid rgba(148, 163, 184, 0.16);
  display: flex;
  gap: 4px;
  padding: 0 5px;
}

.programme-workday-control small {
  color: #64748b;
  font-size: 9px;
  font-weight: 950;
  text-transform: uppercase;
}

.programme-workday-control input[type="time"] {
  width: 96px;
}

.programme-workday-control input[type="number"] {
  width: 72px;
}

.programme-workday-control strong {
  color: #334155;
  font-size: 11px;
  font-weight: 950;
  padding: 0 8px;
  white-space: nowrap;
}

.programme-settings-menu {
  position: relative;
}

.programme-settings-toggle {
  min-width: 90px;
}

.programme-settings-backdrop {
  align-items: center;
  background: rgba(15, 23, 42, 0.46);
  display: grid;
  inset: 0;
  justify-items: center;
  overflow: auto;
  padding: max(18px, env(safe-area-inset-top, 0px)) max(18px, env(safe-area-inset-right, 0px)) max(18px, env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px));
  position: fixed;
  z-index: 179;
}

.programme-settings-popover {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96)),
    #fff;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  display: grid;
  gap: 10px;
  max-height: min(86dvh, 760px);
  overflow: auto;
  padding: 12px;
  position: relative;
  width: min(760px, 100%);
  z-index: 1;
}

.programme-settings-popover > header {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.programme-settings-popover > header span {
  color: #475569;
  display: block;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.programme-settings-popover > header strong {
  color: #111827;
  display: block;
  font-size: 15px;
  font-weight: 950;
  margin-top: 2px;
}

.programme-settings-popover > header p {
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
  margin: 4px 0 0;
  max-width: 560px;
}

.programme-settings-popover > header button {
  align-items: center;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 11px;
  color: #111827;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 18px;
  height: 36px;
  justify-content: center;
  padding: 0;
  width: 36px;
}

.programme-workday-control.in-settings {
  align-items: stretch;
  display: grid;
  gap: 8px;
  grid-template-columns: auto repeat(3, minmax(90px, 1fr)) auto;
  min-height: 0;
  overflow: visible;
  padding: 8px;
}

.programme-workday-control.in-settings > span,
.programme-workday-control.in-settings label {
  border: 0;
  border-radius: 10px;
}

.programme-workday-control.in-settings > span {
  align-items: center;
  display: inline-flex;
  height: auto;
}

.programme-workday-control.in-settings label {
  background: rgba(248, 250, 252, 0.9);
  display: grid;
  gap: 2px;
  padding: 6px 8px;
}

.programme-workday-control.in-settings input {
  min-height: 26px;
  padding: 0;
  width: 100%;
}

.programme-workday-control.in-settings strong {
  align-items: center;
  background: #eff6ff;
  border-radius: 10px;
  display: inline-flex;
  justify-content: center;
}

.programme-workday-control.in-settings > strong {
  display: grid;
  gap: 2px;
  min-width: 112px;
  padding-block: 7px;
  text-align: center;
}

.programme-workday-control.in-settings > strong > span {
  color: #64748b;
  font-size: 9px;
  font-weight: 850;
}

.programme-service-filter {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 12px;
  display: flex;
  min-height: 34px;
  overflow: hidden;
}

.programme-service-filter span {
  background: rgba(248, 250, 252, 0.88);
  border-right: 1px solid rgba(148, 163, 184, 0.22);
  color: #64748b;
  font-size: 11px;
  font-weight: 950;
  padding: 0 9px;
}

.programme-service-filter select {
  background: transparent;
  border: 0;
  color-scheme: light;
  color: #111827;
  font-size: 13px;
  font-weight: 900;
  min-height: 32px;
  min-width: 138px;
  padding: 0 28px 0 9px;
}

.programme-engineer-filter select {
  min-width: 148px;
}

.programme-calendar-controls button,
.programme-view-tabs button {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94)),
    #fff;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 11px;
  color: #1f2937;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  min-height: 32px;
  padding: 6px 9px;
}

.programme-calendar-controls button:hover,
.programme-view-tabs button.active {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96)),
    #fff;
  border-color: rgba(100, 116, 139, 0.38);
  color: #0f172a;
}

.programme-auto-assign-action {
  align-items: stretch;
  display: grid;
  flex: 0 0 auto;
  gap: 2px;
}

.programme-auto-assign-action > button,
.programme-calendar-controls .programme-auto-assign-action > button {
  background: linear-gradient(135deg, #2563eb, #0284c7);
  border-color: rgba(37, 99, 235, 0.56);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);
  color: #fff;
  min-height: 34px;
  padding-inline: 13px;
}

.programme-auto-assign-action > button:hover,
.programme-auto-assign-action > button:focus-visible {
  background: linear-gradient(135deg, #1d4ed8, #0369a1);
  border-color: rgba(29, 78, 216, 0.72);
  color: #fff;
  outline: 3px solid rgba(37, 99, 235, 0.22);
  outline-offset: 2px;
}

.programme-auto-assign-action > button:disabled {
  cursor: progress;
  filter: saturate(0.72);
  opacity: 0.72;
}

.programme-auto-assign-action > small {
  color: #64748b;
  font-size: 9px;
  font-weight: 850;
  line-height: 1.1;
  max-width: 190px;
  overflow-wrap: anywhere;
  text-align: center;
}

.programme-auto-assign-status {
  align-items: flex-start;
  background: rgba(239, 246, 255, 0.92);
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 12px;
  color: #1e3a8a;
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  margin: 0 10px 8px;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 8px 10px;
}

.programme-auto-assign-status strong {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 950;
}

.programme-auto-assign-status span {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  min-width: 0;
}

.programme-auto-assign-status.success {
  background: rgba(240, 253, 244, 0.94);
  border-color: rgba(22, 163, 74, 0.25);
  color: #166534;
}

.programme-auto-assign-status.warning {
  background: rgba(255, 251, 235, 0.95);
  border-color: rgba(217, 119, 6, 0.3);
  color: #92400e;
}

.programme-auto-assign-status.error {
  background: rgba(254, 242, 242, 0.96);
  border-color: rgba(220, 38, 38, 0.28);
  color: #991b1b;
}

.programme-auto-assigned-pill {
  background: #dbeafe;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  font-size: 9px;
  font-style: normal;
  font-weight: 950;
  margin: 0;
  padding: 3px 7px;
  text-transform: uppercase;
  width: max-content;
}

.programme-calendar-controls input,
.programme-task-table input,
.programme-task-table select {
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 11px;
  color-scheme: light;
  color: #111827;
  min-height: 34px;
  padding: 7px 9px;
}

.programme-themed-hidden-input {
  display: none !important;
}

.programme-themed-picker {
  position: relative;
  display: inline-grid;
  min-width: 0;
}

.programme-start-date .programme-themed-date-control {
  align-self: stretch;
  min-width: 154px;
}

.programme-task-card-fields .programme-themed-date-control,
.programme-task-table .programme-themed-date-control {
  width: 100%;
}

.programme-themed-date-button,
.programme-themed-time-button {
  align-items: center;
  display: inline-flex;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 11px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.94)),
    #fff;
  color: #111827;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  cursor: pointer;
  font-size: 13px;
  font-weight: 930;
  padding: 7px 9px;
}

.programme-start-date .programme-themed-date-button {
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding-inline: 9px 10px;
}

.programme-themed-date-button:hover,
.programme-themed-time-button:hover,
.programme-themed-picker.open .programme-themed-date-button,
.programme-themed-picker.open .programme-themed-time-button {
  border-color: rgba(37, 99, 235, 0.42);
  background:
    linear-gradient(180deg, rgba(239, 246, 255, 0.98), rgba(255, 255, 255, 0.96)),
    #fff;
  color: #1d4ed8;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.programme-start-date .programme-themed-date-button:hover,
.programme-start-date .programme-themed-picker.open .programme-themed-date-button {
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.14);
}

.programme-themed-date-button svg,
.programme-themed-time-button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.programme-themed-date-button strong,
.programme-themed-time-button strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.programme-themed-time-button span:last-child {
  display: inline-flex;
  transform: rotate(90deg);
}

.programme-themed-picker-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 240;
  max-width: calc(100vw - 32px);
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 6%, rgba(37, 99, 235, 0.12), transparent 35%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
  box-shadow: 0 22px 52px rgba(15, 23, 42, 0.18);
  color: #111827;
  padding: 12px;
}

.programme-themed-date-popover {
  width: min(318px, calc(100vw - 32px));
}

.programme-calendar-controls .programme-themed-picker-popover,
.programme-start-date .programme-themed-picker-popover {
  left: auto;
  right: 0;
}

.programme-themed-date-popover header {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.programme-themed-date-popover header strong {
  color: #111827;
  font-size: 16px;
  font-weight: 950;
}

.programme-themed-date-popover header button,
.programme-themed-date-popover footer button {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-height: 34px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 11px;
  background: rgba(239, 246, 255, 0.86);
  color: #1d4ed8;
  cursor: pointer;
  font-weight: 950;
  padding: 7px 10px;
}

.programme-themed-date-popover header button {
  width: 36px;
  padding: 0;
}

.programme-themed-date-popover header button:hover,
.programme-themed-date-popover footer button:hover {
  background: #2563eb;
  color: #fff;
}

.programme-themed-date-popover header svg {
  width: 16px;
  height: 16px;
}

.programme-themed-date-weekdays,
.programme-themed-date-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.programme-themed-date-weekdays {
  margin-bottom: 6px;
}

.programme-themed-date-weekdays span {
  color: #64748b;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.programme-themed-date-grid button {
  min-width: 0;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.86);
  color: #1f2937;
  cursor: pointer;
  font-size: 12px;
  font-weight: 930;
}

.programme-themed-date-grid button:hover {
  border-color: rgba(37, 99, 235, 0.32);
  background: #eff6ff;
  color: #1d4ed8;
}

.programme-themed-date-grid button.weekend {
  background:
    linear-gradient(135deg, rgba(219, 234, 254, 0.62), rgba(245, 243, 255, 0.78)),
    rgba(248, 250, 252, 0.86);
}

.programme-themed-date-grid button.muted {
  color: #94a3b8;
  opacity: 0.7;
}

.programme-themed-date-grid button.today {
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.34);
}

.programme-themed-date-grid button.selected {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.24);
}

.programme-themed-date-popover footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}

.programme-themed-time-control {
  min-width: 0;
}

.programme-workday-control.in-settings .programme-themed-time-control {
  background: rgba(248, 250, 252, 0.9);
  border: 0;
  border-radius: 10px;
  display: grid;
  gap: 2px;
  padding: 6px 8px;
}

.programme-themed-time-control > small {
  color: #64748b;
  font-size: 9px;
  font-weight: 950;
  text-transform: uppercase;
}

.programme-themed-time-button {
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.programme-themed-time-button:hover,
.programme-themed-time-control.open .programme-themed-time-button {
  background: transparent;
  box-shadow: none;
}

.programme-themed-time-popover {
  display: grid;
  gap: 4px;
  width: 132px;
  max-height: 278px;
  overflow: auto;
  padding: 8px;
}

.programme-themed-time-popover button {
  min-height: 30px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #1f2937;
  cursor: pointer;
  font-size: 12px;
  font-weight: 920;
  text-align: left;
  padding: 6px 9px;
}

.programme-themed-time-popover button:hover,
.programme-themed-time-popover button.selected {
  border-color: rgba(37, 99, 235, 0.28);
  background: #eff6ff;
  color: #1d4ed8;
}

.programme-themed-time-popover button.selected {
  background: #2563eb;
  color: #fff;
}

.programme-view-tabs {
  background: rgba(241, 245, 249, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 12px;
  display: flex;
  gap: 4px;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding: 3px;
}

.programme-view-nav {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  max-width: 100%;
  min-width: 0;
}

.programme-calendar-controls .programme-calendar-step {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  width: 34px;
  min-width: 34px;
  padding: 0;
}

.programme-calendar-step svg {
  width: 15px;
  height: 15px;
}

.programme-view-tabs button {
  border: 0;
  flex: 0 0 auto;
  min-height: 28px;
}

.programme-view-tabs button.active {
  background: #fff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.programme-calendar {
  display: grid;
  flex: 1 1 auto;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding: 14px;
}

.programme-calendar-month {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.programme-calendar-weekday {
  align-items: center;
  background: rgba(248, 250, 252, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  color: #475569;
  display: flex;
  font-size: 11px;
  font-weight: 950;
  justify-content: center;
  min-height: 28px;
  text-transform: uppercase;
}

.programme-calendar-week {
  grid-template-columns: repeat(7, minmax(120px, 1fr));
}

.programme-calendar-single-day {
  grid-template-columns: minmax(0, 1fr);
}

.programme-day-schedule {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow: hidden;
  padding: 14px;
}

.programme-day-schedule-header {
  align-items: end;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.programme-day-schedule-header span {
  color: #475569;
  display: block;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.programme-day-schedule-header h3 {
  color: #111827;
  font-size: 28px;
  line-height: 1;
  margin: 3px 0 0;
}

.programme-day-schedule-header p {
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  color: #334155;
  font-size: 12px;
  font-weight: 950;
  margin: 0;
  padding: 8px 11px;
}

.programme-day-grid {
  display: grid;
  flex: 1 1 auto;
  gap: 8px;
  grid-template-columns: 62px repeat(3, minmax(180px, 1fr));
  min-height: 0;
  overflow: auto;
}

.programme-day-time-column,
.programme-day-lane {
  display: grid;
  grid-template-rows: 38px minmax(560px, 1fr);
  min-height: 0;
}

.programme-day-lane-title-spacer,
.programme-day-lane-title {
  min-height: 38px;
}

.programme-day-time-track,
.programme-day-lane-track {
  min-height: 560px;
  position: relative;
}

.programme-day-time-track span {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  position: absolute;
  right: 9px;
  transform: translateY(-50%);
  white-space: nowrap;
}

.programme-day-lane-title {
  align-items: center;
  background: var(--programme-trade-soft);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  padding: 8px 10px;
}

.programme-day-lane-title strong {
  color: #111827;
  font-size: 13px;
  font-weight: 950;
}

.programme-day-lane-title small {
  color: #64748b;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.programme-day-lane-track {
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(148, 163, 184, 0.18) 0 1px,
      transparent 1px calc(100% / var(--programme-day-track-hours))
    ),
    rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0 0 14px 14px;
  overflow: hidden;
}

.programme-day-lunch-band {
  align-items: center;
  background:
    repeating-linear-gradient(-45deg, rgba(100, 116, 139, 0.14) 0 8px, transparent 8px 16px),
    rgba(226, 232, 240, 0.82);
  border-block: 1px solid rgba(100, 116, 139, 0.18);
  color: #64748b;
  display: flex;
  font-size: 10px;
  font-weight: 950;
  inset-inline: 0;
  justify-content: center;
  min-height: 18px;
  position: absolute;
  text-transform: uppercase;
  top: var(--programme-lunch-top);
  height: var(--programme-lunch-height);
  z-index: 1;
}

.programme-day-hour-line {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  inset-inline: 0;
  position: absolute;
  z-index: 0;
}

.programme-day-task {
  background: var(--programme-trade);
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 12px;
  box-sizing: border-box;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.14);
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  inset-inline: 8px;
  min-height: 34px;
  overflow: hidden;
  padding: 8px 9px;
  position: absolute;
  text-align: left;
  z-index: 2;
}

.programme-day-task.compact {
  align-items: center;
  border-radius: 999px;
  display: grid;
  gap: 7px;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  min-height: 20px;
  padding: 3px 9px;
}

.programme-day-task:hover,
.programme-day-task:focus-visible {
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.22);
  filter: saturate(1.08);
  outline: 3px solid rgba(37, 99, 235, 0.24);
}

.programme-day-task.continued {
  opacity: 0.9;
}

.programme-day-task strong,
.programme-day-task small,
.programme-day-task em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.programme-day-task strong {
  font-size: 12px;
  font-weight: 950;
}

.programme-day-task small,
.programme-day-task em {
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  opacity: 0.9;
}

.programme-day-task.compact strong,
.programme-day-task.compact small {
  font-size: 10px;
  line-height: 1;
}

.programme-day-task.compact em {
  display: none;
}

.programme-day-empty {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 900;
  inset-inline: 10px;
  margin: 0;
  position: absolute;
  text-align: center;
  top: 50%;
  transform: translateY(-50%);
}

.programme-calendar-year {
  align-content: start;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
}

.programme-calendar-day,
.programme-month-card {
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  min-height: 148px;
  overflow: hidden;
  padding: 10px;
}

.programme-year-month-card {
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  display: grid;
  gap: 8px;
  min-height: 260px;
  padding: 10px;
}

.programme-year-month-card > header {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.programme-year-month-card > header strong {
  color: #1f2937;
  font-size: 15px;
  font-weight: 950;
}

.programme-year-month-card > header small {
  color: #64748b;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.programme-year-weekdays,
.programme-year-days {
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.programme-year-weekdays span {
  color: #64748b;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.programme-year-day {
  align-items: center;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid transparent;
  border-radius: 10px;
  color: #1f2937;
  cursor: pointer;
  display: grid;
  gap: 2px;
  min-height: 28px;
  min-width: 0;
  padding: 3px;
  text-align: center;
}

.programme-year-day:hover {
  background: #eff6ff;
  border-color: rgba(37, 99, 235, 0.26);
}

.programme-year-day span {
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
}

.programme-year-day em {
  align-items: center;
  display: flex;
  gap: 2px;
  height: 7px;
  justify-content: center;
  min-width: 0;
}

.programme-year-day i {
  background: var(--programme-trade, #2563eb);
  border-radius: 999px;
  display: block;
  height: 5px;
  width: 5px;
}

.programme-year-day i.other-project {
  background: #94a3b8;
  opacity: 0.78;
}

.programme-year-day.has-current {
  background: rgba(239, 246, 255, 0.96);
  border-color: rgba(37, 99, 235, 0.2);
}

.programme-year-day.has-other:not(.has-current) {
  background: rgba(226, 232, 240, 0.72);
  color: #64748b;
}

.programme-year-day.weekend {
  background:
    linear-gradient(135deg, rgba(219, 234, 254, 0.55), rgba(245, 243, 255, 0.72)),
    rgba(248, 250, 252, 0.8);
}

.programme-year-day.today {
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.45);
}

.programme-year-day.muted {
  opacity: 0.38;
}

.programme-calendar-day.weekend,
.programme-gantt-scale button.weekend {
  background:
    linear-gradient(135deg, rgba(219, 234, 254, 0.8), rgba(245, 243, 255, 0.86)),
    rgba(241, 245, 249, 0.72);
  border-color: rgba(147, 197, 253, 0.36);
}

.programme-calendar-day.drag-over,
.programme-gantt-scale button.drag-over,
.programme-year-day.drag-over {
  border-color: rgba(37, 99, 235, 0.7);
  box-shadow: inset 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.programme-calendar-day.muted {
  opacity: 0.48;
}

.programme-calendar-day header,
.programme-month-card header {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.programme-calendar-day header strong,
.programme-month-card header strong {
  color: #1f2937;
  font-size: 13px;
  font-weight: 950;
}

.programme-calendar-day header small,
.programme-month-card header small,
.programme-calendar-day em,
.programme-month-card p {
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.programme-task-pill {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  display: grid;
  gap: 5px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  margin-top: 6px;
  min-height: 28px;
  padding: 5px 8px;
  text-align: left;
  width: 100%;
}

.programme-task-pill.dragging,
.programme-gantt-bar.dragging {
  opacity: 0.55;
}

.programme-task-pill:hover,
.programme-task-pill.selected {
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.14);
  filter: saturate(1.1);
}

.programme-task-pill strong,
.programme-task-pill small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.programme-task-pill span,
.programme-task-pill small {
  font-size: 10px;
  font-weight: 900;
  opacity: 0.9;
}

.trade-mechanical {
  --programme-trade: #ef4444;
  --programme-trade-soft: rgba(239, 68, 68, 0.12);
}

.trade-electrical {
  --programme-trade: #7e22ce;
  --programme-trade-soft: rgba(126, 34, 206, 0.12);
}

.trade-control {
  --programme-trade: #2563eb;
  --programme-trade-soft: rgba(37, 99, 235, 0.12);
}

.programme-task-pill,
.programme-trade-chip {
  background: var(--programme-trade);
}

.programme-month-bars {
  display: grid;
  gap: 6px;
  margin: 12px 0;
}

.programme-month-bars span {
  background: var(--programme-trade);
  border-radius: 999px;
  display: block;
  height: 8px;
  width: max(8px, var(--programme-width));
}

.programme-task-list {
  margin-bottom: 18px;
  overflow: hidden;
}

.programme-task-list.in-drawer {
  background: transparent;
  border: 0;
  border-right: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  margin: 0;
  min-height: 0;
}

.programme-task-drawer-toggle {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94)),
    #fff !important;
  border-color: rgba(148, 163, 184, 0.34) !important;
  color: #1f2937 !important;
  min-width: 0;
}

.programme-task-list-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.programme-task-list-actions button,
.programme-selected-task button {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94)),
    #fff;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 11px;
  color: #1f2937;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  min-height: 32px;
  padding: 6px 10px;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.programme-task-list-actions button:hover,
.programme-selected-task button:hover {
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 1), rgba(241, 245, 249, 0.96)),
    #f8fafc;
  border-color: rgba(100, 116, 139, 0.42);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.programme-task-collapsed-summary {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 16px;
}

.programme-task-collapsed-summary strong {
  font-size: 18px;
  font-weight: 950;
}

.programme-task-collapsed-summary span {
  color: #64748b;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.programme-task-drawer-layer {
  display: grid;
  grid-template-columns: 1fr minmax(720px, min(1120px, 72vw));
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 150;
}

.programme-task-drawer-backdrop {
  background: rgba(15, 23, 42, 0.2);
  border: 0;
  cursor: pointer;
  height: 100%;
  pointer-events: auto;
  width: 100%;
}

.programme-task-drawer {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96)),
    #fff;
  border-left: 1px solid rgba(148, 163, 184, 0.32);
  box-shadow: -24px 0 48px rgba(15, 23, 42, 0.16);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  pointer-events: auto;
}

.programme-task-drawer > header {
  align-items: center;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 14px;
}

.programme-task-drawer > header span {
  color: #475569;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.programme-task-drawer > header h2 {
  font-size: 21px;
  line-height: 1;
  margin: 3px 0 0;
}

.programme-task-drawer > header p {
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
  margin: 5px 0 0;
}

.programme-task-drawer > header button {
  align-items: center;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 12px;
  color: #111827;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.programme-task-drawer-layout {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: minmax(330px, 0.92fr) minmax(360px, 1fr);
  min-height: 0;
}

.programme-task-drawer-detail {
  align-content: start;
  display: grid;
  min-height: 0;
  overflow: auto;
  padding: 12px;
}

.programme-task-drawer-detail .programme-selected-task {
  bottom: auto;
  box-shadow: none;
  left: auto;
  max-height: none;
  position: static;
  right: auto;
  width: auto;
  z-index: auto;
}

.programme-task-drawer-empty-detail {
  align-content: center;
  background: rgba(248, 250, 252, 0.92);
  border: 1px dashed rgba(148, 163, 184, 0.34);
  border-radius: 16px;
  color: #475569;
  display: grid;
  gap: 8px;
  min-height: 220px;
  padding: 18px;
  text-align: center;
}

.programme-task-drawer-empty-detail span {
  color: #2563eb;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.programme-task-drawer-empty-detail strong {
  color: #0f172a;
  font-size: 20px;
  font-weight: 950;
}

.programme-task-drawer-empty-detail p {
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
  margin: 0 auto;
  max-width: 360px;
}

.programme-engineer-manager {
  background: rgba(248, 250, 252, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 15px;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
}

.programme-engineer-manager > header {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
}

.programme-engineer-manager > header span {
  color: #475569;
  display: block;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.programme-engineer-manager > header strong {
  color: #111827;
  display: block;
  font-size: 14px;
  font-weight: 950;
}

.programme-engineer-manager > header p {
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
  margin: 4px 0 0;
  max-width: 440px;
}

.programme-engineer-manager-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.programme-engineer-manager > header button,
.programme-engineer-picker button,
.programme-engineer-row button {
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 11px;
  color: #1f2937;
  cursor: pointer;
  font-size: 12px;
  font-weight: 950;
  min-height: 32px;
  padding: 7px 10px;
}

.programme-engineer-manager > header [data-programme-engineer-add],
.programme-engineer-picker [data-programme-engineer-confirm] {
  background: #2563eb;
  border-color: #1d4ed8;
  color: #fff;
}

.programme-engineer-manager > header button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.programme-engineer-picker button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.programme-engineer-roster-summary {
  align-items: center;
  background: rgba(219, 234, 254, 0.58);
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 11px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
  padding: 8px 10px;
}

.programme-engineer-roster-summary strong {
  color: #1e3a8a;
  font-size: 11px;
  font-weight: 950;
}

.programme-engineer-roster-summary span {
  color: #475569;
  font-size: 10px;
  font-weight: 750;
  text-align: right;
}

.programme-engineer-capacity {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.programme-engineer-capacity article {
  background: var(--programme-trade-soft);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-left: 4px solid var(--programme-trade);
  border-radius: 11px;
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px 9px;
}

.programme-engineer-capacity article > strong {
  color: #334155;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.programme-engineer-capacity article > span {
  color: #334155;
  font-size: 10px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.programme-engineer-capacity article em {
  color: #0f172a;
  font-style: normal;
  font-weight: 950;
}

.programme-engineer-picker {
  background: #eff6ff;
  border: 1px solid rgba(37, 99, 235, 0.28);
  border-radius: 13px;
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 10px;
}

.programme-engineer-picker[hidden] {
  display: none;
}

.programme-engineer-picker > header,
.programme-engineer-picker > footer {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
}

.programme-engineer-picker-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.programme-engineer-picker > header div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.programme-engineer-picker > header strong {
  color: #0f172a;
  font-size: 12px;
  font-weight: 950;
}

.programme-engineer-picker > header span,
.programme-engineer-picker > header small,
.programme-engineer-picker > footer > span {
  color: #475569;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.3;
}

.programme-engineer-picker-list {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
}

.programme-engineer-candidate {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-left: 4px solid var(--programme-trade);
  border-radius: 11px;
  cursor: pointer;
  display: grid;
  gap: 7px;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  min-height: 48px;
  min-width: 0;
  padding: 7px 8px;
}

.programme-engineer-candidate:has(input:checked) {
  background: #dbeafe;
  border-color: #3b82f6;
}

.programme-engineer-candidate:hover {
  background: #eff6ff;
  border-color: #60a5fa;
  border-left-color: var(--programme-trade);
}

.programme-engineer-candidate:focus-within {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.28);
}

.programme-engineer-candidate input {
  accent-color: #2563eb;
  height: 18px;
  margin: 0;
  width: 18px;
}

.programme-engineer-avatar {
  align-items: center;
  background: #dbeafe;
  border: 1px solid #93c5fd;
  border-radius: 10px;
  color: #1d4ed8;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 950;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.programme-engineer-candidate-copy,
.programme-engineer-member-summary > span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.programme-engineer-candidate-copy strong,
.programme-engineer-member-summary strong {
  color: #0f172a;
  font-size: 11px;
  font-weight: 950;
}

.programme-engineer-candidate-copy small,
.programme-engineer-member-summary small {
  color: #64748b;
  font-size: 9px;
  font-weight: 750;
  line-height: 1.3;
}

.programme-engineer-candidate > em {
  color: #475569;
  font-size: 9px;
  font-style: normal;
  font-weight: 950;
  text-transform: uppercase;
}

.programme-engineer-picker-empty,
.programme-engineer-empty {
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed rgba(100, 116, 139, 0.38);
  border-radius: 11px;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
}

.programme-engineer-picker-empty strong,
.programme-engineer-empty strong {
  color: #334155;
  font-size: 11px;
  font-weight: 950;
}

.programme-engineer-picker-empty span,
.programme-engineer-empty span {
  color: #64748b;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.programme-engineer-picker-empty button {
  justify-self: start;
  margin-top: 4px;
}

.programme-engineer-grid {
  display: grid;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  overflow: visible;
  padding-right: 2px;
}

.programme-engineer-row {
  align-items: end;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-left: 5px solid var(--programme-trade);
  border-radius: 13px;
  display: grid;
  gap: 7px;
  grid-template-columns: minmax(180px, 1.4fr) minmax(120px, 0.75fr) minmax(90px, 0.55fr) auto;
  min-width: 0;
  padding: 8px;
}

.programme-engineer-member-summary {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: auto minmax(0, 1fr);
  min-width: 0;
}

.programme-engineer-row label {
  display: grid;
  gap: 4px;
}

.programme-engineer-row span {
  color: #64748b;
  font-size: 9px;
  font-weight: 950;
  text-transform: uppercase;
}

.programme-engineer-row .programme-engineer-member-summary span,
.programme-engineer-row .programme-engineer-avatar {
  text-transform: none;
}

.programme-engineer-row input,
.programme-engineer-row select {
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 10px;
  color: #111827;
  font-size: 12px;
  font-weight: 850;
  min-height: 32px;
  min-width: 0;
  padding: 6px 8px;
  width: 100%;
}

.programme-engineer-row button {
  background: #fff7ed;
  border-color: rgba(249, 115, 22, 0.22);
  color: #c2410c;
}

.programme-engineer-daily-capacity {
  align-self: stretch;
  background: rgba(219, 234, 254, 0.52);
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 10px;
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 6px 8px;
}

.programme-engineer-daily-capacity strong {
  color: #1e3a8a;
  font-size: 11px;
  font-weight: 950;
}

.programme-task-card-list {
  display: grid;
  gap: 10px;
  overflow: auto;
  padding: 12px;
}

.programme-task-card {
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-left: 6px solid var(--programme-trade);
  border-radius: 16px;
  cursor: pointer;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.programme-task-card:hover,
.programme-task-card.selected {
  background: rgba(239, 246, 255, 0.92);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.programme-task-card > header {
  align-items: flex-start;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.programme-task-card > header strong,
.programme-task-card > header small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.programme-task-card > header strong {
  font-size: 14px;
  font-weight: 950;
  white-space: nowrap;
}

.programme-task-card > header small {
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
}

.programme-task-card > header em {
  align-self: center;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 999px;
  color: #1d4ed8;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
  padding: 5px 8px;
  white-space: nowrap;
}

.programme-task-description {
  color: #334155;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
  margin: -3px 0 0;
}

.programme-task-materials {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: -4px 0 0;
  padding: 0;
}

.programme-task-materials li {
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  color: #475569;
  font-size: 10px;
  font-weight: 900;
  padding: 5px 8px;
}

.programme-task-card-fields {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.programme-task-card-fields label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.programme-task-card-fields span {
  color: #64748b;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.programme-task-card-fields input,
.programme-task-card-fields select {
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 12px;
  color: #111827;
  font-weight: 850;
  min-height: 38px;
  min-width: 0;
  padding: 8px 10px;
  width: 100%;
}

.programme-assignee-control {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.programme-assignee-control > span {
  color: #64748b;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.programme-assignee-control > p {
  margin: 0;
  padding: 8px 10px;
  border: 1px dashed rgba(148, 163, 184, 0.36);
  border-radius: 12px;
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
}

.programme-assignee-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.programme-assignee-options label {
  display: grid;
  gap: 1px;
  min-width: 116px;
  max-width: 180px;
  padding: 7px 9px 7px 28px;
  position: relative;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  color: #111827;
  cursor: pointer;
}

.programme-assignee-options label.selected {
  border-color: rgba(37, 99, 235, 0.44);
  background: rgba(239, 246, 255, 0.9);
}

.programme-assignee-options label.warning {
  border-color: rgba(245, 158, 11, 0.38);
  background: rgba(255, 247, 237, 0.86);
}

.programme-assignee-options label.disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.programme-assignee-options input {
  position: absolute;
  left: 8px;
  top: 9px;
  width: 14px;
  min-height: 14px;
  height: 14px;
  margin: 0;
  padding: 0;
}

.programme-assignee-options strong {
  overflow: hidden;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.programme-assignee-options small {
  overflow: hidden;
  color: #64748b;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.programme-assignee-control.compact .programme-assignee-options {
  max-width: 260px;
}

.programme-assignee-control.compact .programme-assignee-options label {
  min-width: 108px;
  padding-block: 6px;
}

.programme-task-table-wrap {
  flex: 1 1 auto;
  overflow: auto;
}

.programme-task-table {
  border-collapse: collapse;
  min-width: 980px;
  width: 100%;
}

.programme-task-table th,
.programme-task-table td {
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  padding: 12px;
  text-align: left;
  vertical-align: middle;
}

.programme-task-table th {
  background: #f1f5f9;
  color: #5f6b7a;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.programme-task-table tr[data-programme-row-task] {
  cursor: pointer;
}

.programme-task-table tr[data-programme-row-task]:hover,
.programme-task-table tr.selected {
  background: rgba(37, 99, 235, 0.07);
}

.programme-task-table td strong {
  display: block;
  font-size: 14px;
  font-weight: 950;
}

.programme-task-table td small {
  color: #64748b;
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-top: 3px;
}

.programme-trade-chip {
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 950;
  padding: 7px 10px;
}

.programme-hours-input {
  align-items: center;
  display: flex;
  gap: 6px;
}

.programme-hours-input input {
  width: 86px;
}

.programme-hours-input span {
  color: #64748b;
  font-weight: 900;
}

.programme-empty {
  color: #64748b;
  font-weight: 850;
  text-align: center;
}

.programme-selected-task {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-left: 5px solid var(--programme-trade);
  border-radius: 16px;
  bottom: 18px;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.16);
  display: grid;
  gap: 12px;
  max-height: min(74vh, 690px);
  overflow: auto;
  padding: 14px;
  position: fixed;
  right: 18px;
  width: min(500px, calc(100vw - 36px));
  z-index: 920;
}

.programme-selected-task header {
  align-items: center;
  display: flex;
  gap: 12px;
}

.programme-selected-task-title {
  flex: 1 1 auto;
  min-width: 0;
}

.programme-selected-task-image {
  align-items: center;
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  display: flex;
  flex: 0 0 64px;
  height: 64px;
  justify-content: center;
  margin: 0;
  overflow: hidden;
  padding: 6px;
}

.programme-selected-task-image img {
  display: block;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.programme-selected-task span {
  color: #475569;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.programme-selected-task h3 {
  color: #0f172a;
  font-size: 17px;
  line-height: 1.08;
  margin: 3px 0 0;
}

.programme-selected-task p {
  color: #64748b;
  font-size: 12px;
  font-weight: 820;
  line-height: 1.35;
  margin: 4px 0 0;
}

.programme-selected-task-stats {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0;
}

.programme-selected-task-stats div,
.programme-task-product-info div {
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  min-width: 0;
  padding: 8px 9px;
}

.programme-selected-task dt {
  color: #64748b;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.programme-selected-task dd {
  font-size: 13px;
  font-weight: 950;
  margin: 2px 0 0;
  text-transform: capitalize;
}

.programme-selected-task-close {
  align-items: center;
  aspect-ratio: 1;
  background: rgba(248, 250, 252, 0.95) !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  border-radius: 12px !important;
  color: #0f172a !important;
  display: inline-flex;
  font-size: 19px;
  justify-content: center;
  min-height: 36px !important;
  padding: 0 !important;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
  width: 36px;
}

.programme-selected-task-close:hover,
.programme-selected-task-close:focus-visible {
  background: #fee2e2 !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  box-shadow: 0 8px 18px rgba(239, 68, 68, 0.14);
  color: #b91c1c !important;
  transform: translateY(-1px);
}

.programme-task-detail-section {
  display: grid;
  gap: 8px;
}

.programme-task-detail-section h4 {
  color: #0f172a;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
  margin: 0;
  text-transform: uppercase;
}

.programme-task-detail-section p {
  margin: 0;
}

.programme-selected-task-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.programme-selected-task-actions.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.programme-selected-task-actions button {
  min-width: 0;
  white-space: nowrap;
}

.programme-selected-task-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.programme-task-materials {
  display: grid;
  gap: 5px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.programme-task-materials li {
  align-items: center;
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 11px;
  color: #334155;
  display: grid;
  font-weight: 850;
  gap: 8px;
  grid-template-columns: minmax(0, 1.25fr) minmax(80px, 0.8fr) minmax(52px, auto);
  min-width: 0;
  padding: 7px 9px;
}

.programme-task-materials li.programme-task-materials-head {
  background: transparent;
  border: 0;
  color: #64748b;
  font-size: 9px;
  padding-block: 0;
  text-transform: uppercase;
}

.programme-task-materials li strong,
.programme-task-materials li span,
.programme-task-materials li em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.programme-task-materials li strong {
  color: #0f172a;
  font-size: 12px;
  font-weight: 950;
}

.programme-task-materials li span {
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
}

.programme-task-materials li em {
  color: #334155;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
  text-align: right;
}

.programme-task-product-summary {
  align-items: center;
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  display: grid;
  gap: 3px;
  margin-bottom: 8px;
  padding: 8px 10px;
}

.programme-task-product-summary strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 950;
}

.programme-task-product-summary span {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  text-transform: none;
}

.programme-task-product-info {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.programme-task-product-info strong {
  color: #0f172a;
  display: block;
  font-size: 13px;
  font-weight: 950;
  margin-top: 3px;
}

.programme-task-documents {
  display: grid;
  gap: 8px;
}

.programme-task-documents a,
.programme-task-documents > span {
  align-items: center;
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  color: #0f172a;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 10px;
  text-decoration: none;
}

.programme-task-documents svg {
  color: #2563eb;
  height: 18px;
  width: 18px;
}

.programme-task-documents strong,
.programme-task-documents small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.programme-task-documents strong {
  font-size: 13px;
  font-weight: 950;
}

.programme-task-documents small {
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
}

.programme-gantt {
  --programme-gantt-label: 245px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 14px;
}

.programme-gantt-header,
.programme-gantt-row {
  display: grid;
  gap: 10px;
  grid-template-columns: var(--programme-gantt-label) minmax(720px, 1fr);
  min-width: 980px;
}

.programme-gantt-header {
  align-items: stretch;
  color: #64748b;
  font-size: 11px;
  font-weight: 950;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.programme-gantt-scale,
.programme-gantt-track {
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(var(--programme-gantt-days), minmax(34px, 1fr));
}

.programme-gantt-scale button {
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 10px;
  color: #334155;
  cursor: pointer;
  min-height: 42px;
  padding: 5px 2px;
}

.programme-gantt-scale .programme-gantt-week {
  align-items: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.9)),
    #fff;
  display: grid;
  justify-items: center;
  min-height: 46px;
  padding: 7px 10px;
}

.programme-gantt-scale .programme-gantt-week:hover {
  background: #2563eb;
  border-color: rgba(37, 99, 235, 0.42);
  color: #fff;
}

.programme-gantt-scale strong,
.programme-gantt-scale small {
  display: block;
  line-height: 1.1;
}

.programme-gantt-scale .programme-gantt-week strong {
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
}

.programme-gantt-scale .programme-gantt-week small {
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  margin-top: 3px;
  text-transform: none;
}

.programme-gantt-scale .programme-gantt-week:hover small {
  color: rgba(255, 255, 255, 0.86);
}

.programme-gantt-row {
  align-items: center;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  min-height: 52px;
  padding: 8px 0;
}

.programme-gantt-row.selected {
  background: rgba(37, 99, 235, 0.06);
}

.programme-gantt-label {
  background: transparent;
  border: 0;
  color: #111827;
  cursor: pointer;
  min-width: 0;
  padding: 0;
  text-align: left;
}

.programme-gantt-label strong,
.programme-gantt-label small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.programme-gantt-label strong {
  font-size: 13px;
  font-weight: 950;
}

.programme-gantt-label small {
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
  margin-top: 3px;
}

.programme-gantt-label.selected strong {
  color: #1d4ed8;
}

.programme-gantt-track {
  align-items: center;
  background:
    repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.12) 0 1px, transparent 1px calc(100% / var(--programme-gantt-days)));
  min-height: 36px;
}

.programme-gantt-bar {
  align-items: center;
  background: var(--programme-trade);
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-height: 28px;
  min-width: 0;
  padding: 5px 10px;
}

.programme-gantt-bar:hover {
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.16);
  filter: saturate(1.12);
}

.programme-gantt-bar.selected {
  outline: 3px solid rgba(37, 99, 235, 0.26);
  outline-offset: 3px;
}

.programme-gantt-bar span,
.programme-gantt-bar small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.programme-gantt-empty {
  color: #64748b;
  font-weight: 850;
  padding: 20px;
  text-align: center;
}

.installation-trade-board {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.installation-trade-column {
  border-color: rgba(148, 163, 184, 0.28);
  overflow: hidden;
}

.installation-trade-column > header {
  background: var(--programme-trade-soft);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  padding: 14px;
}

.installation-trade-column > header strong {
  color: #111827;
  display: block;
  font-size: 20px;
  font-weight: 950;
  margin-top: 4px;
}

.installation-task-card {
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  padding: 14px;
}

.installation-task-card.complete {
  opacity: 0.6;
}

.installation-task-card strong,
.installation-task-card small,
.installation-task-card span {
  display: block;
}

.installation-task-card strong {
  font-size: 14px;
  font-weight: 950;
}

.installation-task-card small,
.installation-task-card span,
.installation-trade-column p {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  margin: 4px 0 0;
}

html[data-theme="dark"] .project-workspace-context,
html[data-theme="dark"] .programme-header,
html[data-theme="dark"] .programme-calendar-panel,
html[data-theme="dark"] .programme-task-list,
html[data-theme="dark"] .programme-selected-task,
html[data-theme="dark"] .programme-task-drawer,
html[data-theme="dark"] .programme-settings-popover,
html[data-theme="dark"] .installation-trade-column {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(148, 163, 184, 0.2);
}

html[data-theme="dark"] .project-workspace-context strong,
html[data-theme="dark"] .programme-workspace,
html[data-theme="dark"] .programme-header h1,
html[data-theme="dark"] .programme-calendar-panel h2,
html[data-theme="dark"] .programme-day-schedule-header h3,
html[data-theme="dark"] .programme-day-lane-title strong,
html[data-theme="dark"] .programme-task-list h2,
html[data-theme="dark"] .programme-calendar-day header strong,
html[data-theme="dark"] .programme-month-card header strong,
html[data-theme="dark"] .programme-task-table td strong,
html[data-theme="dark"] .programme-selected-task h3,
html[data-theme="dark"] .programme-selected-task dd,
html[data-theme="dark"] .programme-gantt-label,
html[data-theme="dark"] .programme-task-drawer > header h2,
html[data-theme="dark"] .programme-task-drawer > header button,
html[data-theme="dark"] .programme-settings-popover > header strong,
html[data-theme="dark"] .programme-settings-popover > header button,
html[data-theme="dark"] .programme-task-card > header strong,
html[data-theme="dark"] .installation-trade-column > header strong,
html[data-theme="dark"] .installation-task-card strong {
  color: #f8fafc;
}

html[data-theme="dark"] .programme-workspace {
  background: linear-gradient(135deg, #0b1220, #111827 48%, #1e1b4b);
}

html[data-theme="dark"] .programme-selected-task-stats div,
html[data-theme="dark"] .programme-task-product-info div,
html[data-theme="dark"] .programme-task-documents a,
html[data-theme="dark"] .programme-task-documents > span,
html[data-theme="dark"] .programme-selected-task-image,
html[data-theme="dark"] .programme-task-product-summary,
html[data-theme="dark"] .programme-task-drawer-empty-detail,
html[data-theme="dark"] .programme-selected-task-close {
  background: rgba(15, 23, 42, 0.82) !important;
  border-color: rgba(148, 163, 184, 0.22) !important;
}

html[data-theme="dark"] .programme-selected-task-close,
html[data-theme="dark"] .programme-task-detail-section h4,
html[data-theme="dark"] .programme-task-drawer-empty-detail strong,
html[data-theme="dark"] .programme-task-product-info strong,
html[data-theme="dark"] .programme-task-documents strong {
  color: #f8fafc !important;
}

html[data-theme="dark"] .programme-task-materials li {
  background: rgba(37, 99, 235, 0.16);
  border-color: rgba(96, 165, 250, 0.24);
  color: #dbeafe;
}

html[data-theme="dark"] .programme-task-materials li.programme-task-materials-head {
  background: transparent;
  border: 0;
  color: #cbd5e1;
}

html[data-theme="dark"] .programme-task-materials li strong,
html[data-theme="dark"] .programme-task-product-summary strong {
  color: #f8fafc;
}

html[data-theme="dark"] .programme-task-materials li span,
html[data-theme="dark"] .programme-task-product-summary span {
  color: #cbd5e1;
}

html[data-theme="dark"] .programme-task-materials li em {
  color: #e2e8f0;
}

html[data-theme="dark"] .programme-selected-task-close:hover,
html[data-theme="dark"] .programme-selected-task-close:focus-visible {
  background: rgba(127, 29, 29, 0.72) !important;
  border-color: rgba(248, 113, 113, 0.5) !important;
  box-shadow: 0 8px 18px rgba(127, 29, 29, 0.22);
  color: #fecaca !important;
}

html[data-theme="dark"] .programme-header-stats article,
html[data-theme="dark"] .programme-trade-summary article,
html[data-theme="dark"] .programme-hour-strip,
html[data-theme="dark"] .programme-start-date,
html[data-theme="dark"] .programme-workday-control,
html[data-theme="dark"] .programme-calendar-weekday,
html[data-theme="dark"] .programme-calendar-day,
html[data-theme="dark"] .programme-month-card,
html[data-theme="dark"] .programme-service-filter,
html[data-theme="dark"] .programme-gantt-scale button,
html[data-theme="dark"] .programme-task-drawer > header button,
html[data-theme="dark"] .programme-calendar-controls button,
html[data-theme="dark"] .programme-task-table input,
html[data-theme="dark"] .programme-task-table select,
html[data-theme="dark"] .programme-calendar-controls input,
html[data-theme="dark"] .programme-day-lane-title,
html[data-theme="dark"] .programme-day-lane-track,
html[data-theme="dark"] .programme-year-month-card,
html[data-theme="dark"] .programme-year-day,
html[data-theme="dark"] .programme-engineer-row,
html[data-theme="dark"] .programme-workday-control.in-settings label,
html[data-theme="dark"] .programme-engineer-row input,
html[data-theme="dark"] .programme-engineer-row select,
html[data-theme="dark"] .programme-task-materials li {
  background: rgba(15, 23, 42, 0.86);
  border-color: rgba(148, 163, 184, 0.24);
  color: #f8fafc;
}

html[data-theme="dark"] .programme-assignee-control > span,
html[data-theme="dark"] .programme-assignee-control > p {
  color: #cbd5e1;
}

html[data-theme="dark"] .programme-assignee-options label {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.86);
  color: #f8fafc;
}

html[data-theme="dark"] .programme-assignee-options label.selected {
  border-color: rgba(96, 165, 250, 0.46);
  background: rgba(37, 99, 235, 0.22);
}

html[data-theme="dark"] .programme-assignee-options label.warning {
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(120, 53, 15, 0.34);
}

html[data-theme="dark"] .programme-assignee-options small {
  color: #cbd5e1;
}

html[data-theme="dark"] .programme-auto-assign-action > small {
  color: #cbd5e1;
}

html[data-theme="dark"] .programme-auto-assign-status {
  background: rgba(30, 64, 175, 0.28);
  border-color: rgba(96, 165, 250, 0.3);
  color: #dbeafe;
}

html[data-theme="dark"] .programme-auto-assign-status.success {
  background: rgba(20, 83, 45, 0.38);
  border-color: rgba(74, 222, 128, 0.3);
  color: #bbf7d0;
}

html[data-theme="dark"] .programme-auto-assign-status.warning {
  background: rgba(120, 53, 15, 0.38);
  border-color: rgba(251, 191, 36, 0.34);
  color: #fde68a;
}

html[data-theme="dark"] .programme-auto-assign-status.error {
  background: rgba(127, 29, 29, 0.42);
  border-color: rgba(248, 113, 113, 0.34);
  color: #fecaca;
}

html[data-theme="dark"] .programme-auto-assigned-pill {
  background: rgba(37, 99, 235, 0.28);
  border-color: rgba(96, 165, 250, 0.34);
  color: #bfdbfe;
}

html[data-theme="dark"] .programme-day-schedule-header p {
  background: rgba(30, 64, 175, 0.36);
  border-color: rgba(96, 165, 250, 0.28);
  color: #bfdbfe;
}

html[data-theme="dark"] .programme-day-lunch-band {
  background:
    repeating-linear-gradient(-45deg, rgba(148, 163, 184, 0.14) 0 8px, transparent 8px 16px),
    rgba(51, 65, 85, 0.76);
  color: #cbd5e1;
}

html[data-theme="dark"] .programme-day-hour-line {
  border-color: rgba(148, 163, 184, 0.18);
}

html[data-theme="dark"] .programme-task-table th {
  background: rgba(30, 41, 59, 0.94);
  color: #cbd5e1;
}

html[data-theme="dark"] .programme-service-filter span {
  background: rgba(30, 41, 59, 0.84);
  border-color: rgba(148, 163, 184, 0.24);
}

html[data-theme="dark"] .programme-start-date input,
html[data-theme="dark"] .programme-workday-control input,
html[data-theme="dark"] .programme-service-filter select,
html[data-theme="dark"] .programme-engineer-row input,
html[data-theme="dark"] .programme-engineer-row select {
  color-scheme: dark;
}

html[data-theme="dark"] .programme-start-date > span,
html[data-theme="dark"] .programme-workday-control > span {
  background: rgba(30, 41, 59, 0.84);
  border-color: rgba(148, 163, 184, 0.24);
}

html[data-theme="dark"] .programme-start-date input,
html[data-theme="dark"] .programme-workday-control input,
html[data-theme="dark"] .programme-task-card-fields input,
html[data-theme="dark"] .programme-task-card-fields select,
html[data-theme="dark"] .programme-themed-date-button,
html[data-theme="dark"] .programme-themed-time-button,
html[data-theme="dark"] .programme-themed-picker-popover,
html[data-theme="dark"] .programme-themed-date-grid button,
html[data-theme="dark"] .programme-themed-time-popover button,
html[data-theme="dark"] .programme-workday-control.in-settings .programme-themed-time-control {
  background: rgba(15, 23, 42, 0.86);
  border-color: rgba(148, 163, 184, 0.24);
  color: #f8fafc;
}

html[data-theme="dark"] .programme-themed-date-button:hover,
html[data-theme="dark"] .programme-themed-time-button:hover,
html[data-theme="dark"] .programme-themed-picker.open .programme-themed-date-button,
html[data-theme="dark"] .programme-themed-picker.open .programme-themed-time-button,
html[data-theme="dark"] .programme-themed-date-grid button:hover,
html[data-theme="dark"] .programme-themed-time-popover button:hover {
  background: rgba(30, 64, 175, 0.34);
  border-color: rgba(96, 165, 250, 0.36);
  color: #bfdbfe;
}

html[data-theme="dark"] .programme-themed-picker-popover {
  background:
    radial-gradient(circle at 12% 6%, rgba(96, 165, 250, 0.18), transparent 35%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.96));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

html[data-theme="dark"] .programme-themed-date-popover header strong,
html[data-theme="dark"] .programme-themed-date-grid button {
  color: #f8fafc;
}

html[data-theme="dark"] .programme-themed-date-weekdays span,
html[data-theme="dark"] .programme-themed-time-control > small {
  color: #cbd5e1;
}

html[data-theme="dark"] .programme-themed-date-popover header button,
html[data-theme="dark"] .programme-themed-date-popover footer button {
  background: rgba(30, 64, 175, 0.28);
  border-color: rgba(96, 165, 250, 0.26);
  color: #bfdbfe;
}

html[data-theme="dark"] .programme-themed-date-grid button.weekend {
  background:
    linear-gradient(135deg, rgba(30, 64, 175, 0.24), rgba(88, 28, 135, 0.28)),
    rgba(15, 23, 42, 0.78);
}

html[data-theme="dark"] .programme-themed-date-grid button.muted {
  color: #94a3b8;
}

html[data-theme="dark"] .programme-themed-date-grid button.selected,
html[data-theme="dark"] .programme-themed-time-popover button.selected,
html[data-theme="dark"] .programme-themed-date-popover header button:hover,
html[data-theme="dark"] .programme-themed-date-popover footer button:hover {
  background: #2563eb;
  color: #fff;
}

html[data-theme="dark"] .programme-engineer-manager > header strong,
html[data-theme="dark"] .programme-task-description {
  color: #e2e8f0;
}

html[data-theme="dark"] .programme-settings-backdrop {
  background: rgba(2, 6, 23, 0.74);
}

html[data-theme="dark"] .programme-settings-popover > header button {
  background: rgba(30, 41, 59, 0.92);
  border-color: rgba(148, 163, 184, 0.34);
  color: #f8fafc;
}

html[data-theme="dark"] .programme-settings-popover > header button:is(:hover, :focus-visible) {
  background: rgba(30, 64, 175, 0.48);
  border-color: #60a5fa;
  color: #fff;
}

html[data-theme="dark"] .programme-settings-popover > header span,
html[data-theme="dark"] .programme-workday-control small,
html[data-theme="dark"] .programme-engineer-manager > header span,
html[data-theme="dark"] .programme-engineer-row label > span,
html[data-theme="dark"] .programme-engineer-daily-capacity > span {
  color: #cbd5e1;
}

html[data-theme="dark"] .programme-settings-popover > header p,
html[data-theme="dark"] .programme-engineer-manager > header p,
html[data-theme="dark"] .programme-engineer-roster-summary span,
html[data-theme="dark"] .programme-engineer-picker > header span,
html[data-theme="dark"] .programme-engineer-picker > header small,
html[data-theme="dark"] .programme-engineer-picker > footer > span,
html[data-theme="dark"] .programme-engineer-candidate-copy small,
html[data-theme="dark"] .programme-engineer-member-summary small,
html[data-theme="dark"] .programme-engineer-picker-empty span,
html[data-theme="dark"] .programme-engineer-empty span,
html[data-theme="dark"] .programme-task-description {
  color: #cbd5e1;
}

html[data-theme="dark"] .programme-engineer-manager {
  background: rgba(17, 24, 39, 0.72);
  border-color: rgba(148, 163, 184, 0.22);
}

html[data-theme="dark"] .programme-engineer-roster-summary {
  background: rgba(30, 64, 175, 0.25);
  border-color: rgba(96, 165, 250, 0.3);
}

html[data-theme="dark"] .programme-engineer-roster-summary strong,
html[data-theme="dark"] .programme-engineer-daily-capacity strong {
  color: #bfdbfe;
}

html[data-theme="dark"] .programme-engineer-capacity article {
  background: rgba(29, 30, 34, 0.9);
  border-color: rgba(148, 163, 184, 0.24);
  border-left-color: var(--programme-trade);
}

html[data-theme="dark"] .programme-engineer-capacity article > strong,
html[data-theme="dark"] .programme-engineer-capacity article > span,
html[data-theme="dark"] .programme-engineer-capacity article em,
html[data-theme="dark"] .programme-task-materials li {
  color: #cbd5e1;
}

html[data-theme="dark"] .programme-engineer-picker {
  background: rgba(15, 23, 42, 0.94);
  border-color: rgba(96, 165, 250, 0.34);
}

html[data-theme="dark"] .programme-engineer-candidate {
  background: rgba(29, 30, 34, 0.94);
  border-color: rgba(148, 163, 184, 0.26);
  border-left-color: var(--programme-trade);
}

html[data-theme="dark"] .programme-engineer-candidate:has(input:checked) {
  background: rgba(30, 64, 175, 0.36);
  border-color: #60a5fa;
  border-left-color: var(--programme-trade);
}

html[data-theme="dark"] .programme-engineer-candidate:hover {
  background: rgba(30, 64, 175, 0.3);
  border-color: rgba(147, 197, 253, 0.7);
  border-left-color: var(--programme-trade);
}

html[data-theme="dark"] .programme-engineer-picker > header strong,
html[data-theme="dark"] .programme-engineer-candidate-copy strong,
html[data-theme="dark"] .programme-engineer-member-summary strong,
html[data-theme="dark"] .programme-engineer-picker-empty strong,
html[data-theme="dark"] .programme-engineer-empty strong {
  color: #f8fafc;
}

html[data-theme="dark"] .programme-engineer-avatar {
  background: rgba(37, 99, 235, 0.28);
  border-color: rgba(96, 165, 250, 0.4);
  color: #bfdbfe;
}

html[data-theme="dark"] .programme-engineer-candidate > em {
  color: #a5b4fc;
}

html[data-theme="dark"] .programme-engineer-picker-empty,
html[data-theme="dark"] .programme-engineer-empty,
html[data-theme="dark"] .programme-engineer-daily-capacity {
  background: rgba(30, 41, 59, 0.64);
  border-color: rgba(148, 163, 184, 0.26);
}

html[data-theme="dark"] .programme-engineer-manager > header [data-programme-engineer-add],
html[data-theme="dark"] .programme-engineer-picker [data-programme-engineer-confirm] {
  background: #2563eb;
  border-color: #60a5fa;
  color: #fff;
}

html[data-theme="dark"] .programme-settings-popover .programme-engineer-row {
  border-left-color: var(--programme-trade);
}

html[data-theme="dark"] .programme-settings-popover .programme-engineer-row > [data-programme-engineer-remove] {
  background: rgba(127, 29, 29, 0.36);
  border-color: rgba(248, 113, 113, 0.46);
  color: #fecaca;
}

html[data-theme="dark"] .programme-settings-popover .programme-engineer-row > [data-programme-engineer-remove]:is(:hover, :focus-visible) {
  background: rgba(153, 27, 27, 0.62);
  border-color: #f87171;
  color: #fff;
}

html[data-theme="dark"] .programme-workday-control.in-settings strong {
  background: rgba(30, 64, 175, 0.34);
  color: #bfdbfe;
}

html[data-theme="dark"] .programme-calendar-day.weekend,
html[data-theme="dark"] .programme-gantt-scale button.weekend,
html[data-theme="dark"] .programme-task-card {
  background:
    repeating-linear-gradient(-45deg, rgba(148, 163, 184, 0.08) 0 8px, transparent 8px 16px),
    rgba(15, 23, 42, 0.72);
}

html[data-theme="dark"] .programme-task-drawer-backdrop {
  background: rgba(2, 6, 23, 0.45);
}

html[data-theme="dark"] .programme-gantt-row {
  border-color: rgba(148, 163, 184, 0.18);
}

html[data-theme="dark"] .programme-year-month-card > header strong,
html[data-theme="dark"] .programme-year-day {
  color: #f8fafc;
}

html[data-theme="dark"] .programme-year-day.has-current {
  background: rgba(30, 64, 175, 0.38);
  border-color: rgba(96, 165, 250, 0.32);
}

html[data-theme="dark"] .programme-year-day.has-other:not(.has-current) {
  background: rgba(71, 85, 105, 0.38);
  color: #cbd5e1;
}

html[data-theme="dark"] .programme-year-day.weekend {
  background:
    linear-gradient(135deg, rgba(30, 64, 175, 0.22), rgba(88, 28, 135, 0.24)),
    rgba(15, 23, 42, 0.78);
}

html[data-theme="dark"] .programme-gantt-track {
  background:
    repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.14) 0 1px, transparent 1px calc(100% / var(--programme-gantt-days)));
}

html[data-theme="dark"] .programme-gantt-scale .programme-gantt-week {
  background:
    linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(30, 64, 175, 0.22)),
    rgba(15, 23, 42, 0.86);
}

html[data-theme="dark"] .programme-gantt-scale .programme-gantt-week small {
  color: #cbd5e1;
}

@media (max-width: 1100px) {
  .programme-header,
  .programme-calendar-panel > header,
  .programme-task-list > header {
    align-items: stretch;
    flex-direction: column;
  }

  .programme-header-stats,
  .programme-trade-summary,
  .programme-selected-task,
  .installation-trade-board {
    grid-template-columns: 1fr;
  }

  .programme-selected-task dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .programme-selected-task {
    bottom: 12px;
    left: 12px;
    max-height: 78vh;
    right: 12px;
    width: auto;
  }

  .programme-selected-task-actions,
  .programme-task-product-info {
    grid-template-columns: 1fr;
  }

  .programme-calendar-month,
  .programme-calendar-week {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .programme-calendar-year {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .programme-day-schedule-header {
    align-items: stretch;
    flex-direction: column;
  }

  .programme-day-grid {
    grid-template-columns: 54px repeat(3, minmax(160px, 1fr));
  }

  .programme-calendar-controls {
    max-width: none;
    justify-content: flex-start;
  }

  .programme-auto-assign-action {
    flex: 1 1 210px;
  }

  .programme-auto-assign-action > small {
    max-width: none;
  }

  .programme-auto-assign-status {
    align-items: stretch;
    flex-direction: column;
  }

  .programme-calendar-controls .programme-themed-picker-popover,
  .programme-start-date .programme-themed-picker-popover {
    position: fixed;
    top: max(76px, calc(env(safe-area-inset-top, 0px) + 68px));
    left: max(12px, env(safe-area-inset-left, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    width: auto;
    max-width: none;
  }

  .programme-task-drawer-layer {
    grid-template-columns: 1fr minmax(320px, 94vw);
  }

  .programme-task-drawer-layout {
    grid-template-columns: minmax(0, 1fr);
    overflow: auto;
  }

  .programme-task-list.in-drawer {
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    border-right: 0;
    max-height: 46vh;
  }

  .programme-task-drawer-detail {
    overflow: visible;
  }

}

@media (max-width: 720px) {
  .programme-calendar-year {
    grid-template-columns: 1fr;
  }

  .programme-day-grid {
    grid-template-columns: 48px repeat(3, minmax(150px, 1fr));
  }

  .programme-day-schedule {
    padding: 10px;
  }
}

@media (max-width: 760px) {
  .programme-settings-backdrop {
    align-items: stretch;
    padding: max(10px, env(safe-area-inset-top, 0px)) max(10px, env(safe-area-inset-right, 0px)) max(10px, env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px));
  }

  .programme-settings-popover {
    max-height: calc(100dvh - max(20px, env(safe-area-inset-top, 0px) + env(safe-area-inset-bottom, 0px)));
    max-width: none;
    position: relative;
    width: 100%;
  }

  .programme-workday-control.in-settings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .programme-workday-control.in-settings > span,
  .programme-workday-control.in-settings > strong {
    grid-column: 1 / -1;
  }

  .programme-engineer-manager > header {
    align-items: stretch;
    flex-direction: column;
  }

  .programme-engineer-manager-actions {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .programme-engineer-manager-actions button,
  .programme-engineer-picker-actions,
  .programme-engineer-picker-actions button,
  .programme-engineer-picker-empty button {
    justify-self: stretch;
    min-height: 42px;
    width: 100%;
  }

  .programme-engineer-roster-summary,
  .programme-engineer-picker > header,
  .programme-engineer-picker > footer {
    align-items: stretch;
    flex-direction: column;
  }

  .programme-engineer-roster-summary span {
    text-align: left;
  }

  .programme-engineer-capacity,
  .programme-engineer-picker-list {
    grid-template-columns: 1fr;
  }

  .programme-engineer-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .programme-engineer-row > button {
    min-height: 42px;
    width: 100%;
  }
}

@media (max-width: 460px) {
  .programme-workday-control.in-settings {
    grid-template-columns: 1fr;
  }

  .programme-workday-control.in-settings > span,
  .programme-workday-control.in-settings > strong {
    grid-column: auto;
  }
}

/* Mobile web-app optimisation: desktop rules remain unchanged above this breakpoint. */
@media (max-width: 820px) {
  html,
  body,
  #app {
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    min-height: 100%;
    overflow-x: hidden;
  }

  body {
    overflow-y: auto;
  }

  .studio-shell,
  .studio-shell.dashboard-shell,
  .studio-shell.pricing-portal-shell,
  .studio-shell.programme-shell,
  .studio-shell.commissioning-shell,
  .studio-shell.schematic-shell {
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    min-height: 100dvh;
    height: auto;
    overflow: visible;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
  }

  .studio-shell.dashboard-shell {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 90;
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    box-sizing: border-box;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    padding: calc(8px + env(safe-area-inset-top, 0px)) 10px 8px;
  }

  .brand-lockup {
    flex: 0 1 auto;
    min-width: 0;
  }

  .brand-menu-button {
    min-width: 0;
    max-width: 138px;
    padding-inline: 7px;
  }

  .brand-menu-button .brand-logo-wordmark,
  .brand-menu-button .brand-logo-wordmark img {
    width: 94px;
  }

  .project-picker,
  .level-pill {
    max-width: 34vw;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .top-actions {
    min-width: 0;
    max-width: min(100%, calc(100vw - 150px));
    flex: 1 1 0;
    justify-content: flex-end;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .top-actions::-webkit-scrollbar {
    display: none;
  }

  .topbar .theme-toggle-label,
  .topbar-profile-button > span:not(.topbar-profile-chevron) {
    display: none;
  }

  .modebar {
    position: sticky;
    top: 0;
    z-index: 80;
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    box-sizing: border-box;
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
    padding: 8px 10px;
  }

  .mode-tabs,
  .modebar-controls,
  .bottom-tools,
  .zoom-tools,
  .view-tools,
  .micro-tools {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .mode-tabs::-webkit-scrollbar,
  .modebar-controls::-webkit-scrollbar,
  .bottom-tools::-webkit-scrollbar,
  .zoom-tools::-webkit-scrollbar,
  .view-tools::-webkit-scrollbar,
  .micro-tools::-webkit-scrollbar {
    display: none;
  }

  .mode-tab,
  .ghost-btn,
  .primary-btn,
  .secondary-btn,
  .bottom-tools button,
  .zoom-tools button,
  .view-tools button,
  .micro-tools button,
  .view-tools select {
    flex: 0 0 auto;
    min-height: 44px;
  }

  .mode-tab {
    min-width: max-content;
  }

  .system-controls {
    flex: 0 0 auto;
    max-width: 92vw;
  }

  .system-label {
    padding-inline: 10px;
  }

  .system-controls select,
  .view-selector select,
  .drawing-selector select,
  #plantRoomAreaSelect {
    width: min(58vw, 260px);
  }

  .workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "canvas"
      "tools"
      "left"
      "inspector"
      "product"
      "pipe"
      "results";
    gap: 8px;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    min-width: 0;
    padding: 8px;
    overflow: visible;
  }

  .workspace.floor-3d-wide,
  .workspace.plant-room-planner-workspace-shell,
  .workspace.pricing-portal-workspace-shell,
  .workspace.programme-workspace-shell,
  .workspace.commissioning-workspace-shell {
    grid-template-areas: none;
    grid-template-columns: minmax(0, 1fr);
    height: auto;
    min-height: calc(100dvh - 150px);
    overflow: visible;
    padding: 8px;
  }

  .left-rail {
    grid-area: left;
  }

  .tool-palette {
    grid-area: tools;
  }

  .canvas-stage {
    grid-area: canvas;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    min-height: min(640px, calc(100dvh - 210px));
  }

  .canvas-scroll,
  .canvas-status {
    width: 100% !important;
    inline-size: 100% !important;
    max-width: 100% !important;
    max-inline-size: 100% !important;
    min-width: 0 !important;
    min-inline-size: 0 !important;
    box-sizing: border-box;
  }

  .canvas-scroll {
    justify-self: stretch;
    align-self: stretch;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .inspector {
    grid-area: inspector;
  }

  .product-panel {
    grid-area: product;
  }

  .pipe-panel {
    grid-area: pipe;
  }

  .results-panel {
    grid-area: results;
  }

  .left-rail,
  .tool-palette,
  .inspector,
  .product-panel,
  .pipe-panel,
  .results-panel {
    width: 100%;
    max-height: min(52dvh, 460px);
    margin: 0;
    border-radius: 14px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tool-palette {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 8px;
    padding: 8px;
  }

  .tool-palette-head,
  .tool-group-title {
    grid-column: 1 / -1;
  }

  .tool-btn {
    min-width: 0;
  }

  .canvas-scroll {
    min-height: inherit;
    justify-content: flex-start;
    padding: 52px 12px 18px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .floor-plan-popover,
  .calibration-popover,
  .room-draft-panel,
  .auto-pipe-panel,
  .dimension-floating-menu,
  .drawing-note-menu,
  .plant-room-noise-controls {
    left: max(10px, env(safe-area-inset-left, 0px));
    right: max(10px, env(safe-area-inset-right, 0px));
    width: auto;
    max-width: none;
  }

  .bottombar {
    position: sticky;
    bottom: 0;
    z-index: 90;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  }

  .view-tools select {
    max-width: 148px;
  }

  .workspace.schematic-workspace-shell,
  .workspace.schematic-workspace-shell.schematic-selection-open,
  .workspace.schematic-workspace-shell.schematic-zone-drawing,
  .workspace.schematic-workspace-shell.schematic-zone-drawing.schematic-selection-open {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "stage"
      "toolbox"
      "library"
      "selection";
    height: auto;
    min-height: calc(100dvh - 150px);
    overflow: visible;
  }

  .schematic-stage {
    grid-area: stage;
    min-height: min(650px, calc(100dvh - 180px));
  }

  .schematic-toolbox {
    grid-area: toolbox;
  }

  .schematic-library-panel {
    grid-area: library;
  }

  .schematic-selection-panel {
    grid-area: selection;
  }

  .schematic-toolbox,
  .schematic-selection-panel {
    max-height: min(52dvh, 430px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .schematic-library-panel {
    max-height: none;
    overflow: hidden;
  }

  .schematic-library-panel .schematic-symbol-list {
    overflow: visible;
    contain: layout style;
  }

  .schematic-library-picker-host {
    position: fixed;
    inset: 10px;
    z-index: 120;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
  }

  .three-workspace,
  .plant-room-planner-3d-workspace,
  .workspace.floor-3d-wide .three-workspace {
    min-height: calc(100dvh - 160px);
    margin: 0;
    border-radius: 14px;
  }

  .dashboard-workspace {
    padding: 10px;
  }

  .dashboard-hero {
    min-height: auto;
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
  }

  .dashboard-hero h1 {
    font-size: clamp(30px, 9vw, 48px);
  }

  .dashboard-grid,
  .dashboard-app-grid,
  .dashboard-news-feed,
  .dashboard-news-list,
  .dashboard-distributor-summary,
  .dashboard-distributor-quotes-layout,
  .dashboard-commissioning-summary,
  .dashboard-commissioning-task-grid,
  .dashboard-commissioning-lead-card,
  .dashboard-engineering-layout,
  .dashboard-analytics-layout,
  .dashboard-product-library-layout {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .dashboard-tile,
  .dashboard-project-row,
  .dashboard-app-tool,
  .dashboard-news-section,
  .dashboard-commissioning-topbar,
  .dashboard-engineering-panel {
    border-radius: 14px;
  }

  .dashboard-project-stage-track,
  .dashboard-chip-row,
  .dashboard-action-row {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .dashboard-project-stage-track::-webkit-scrollbar,
  .dashboard-chip-row::-webkit-scrollbar,
  .dashboard-action-row::-webkit-scrollbar {
    display: none;
  }

  .dashboard-project-stage-track button,
  .dashboard-chip-row > *,
  .dashboard-action-row > * {
    flex: 0 0 auto;
  }

  .dashboard-commissioning-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-commissioning-topbar-actions,
  .dashboard-commissioning-project-select {
    width: 100%;
    min-width: 0;
  }

  .dashboard-commissioning-project-select select {
    width: 100%;
  }

  .pricing-portal-workspace,
  .programme-workspace,
  .project-commissioning-workspace {
    height: auto;
    max-height: none;
    min-height: calc(100dvh - 150px);
    overflow: visible;
    padding: 10px;
  }

  .pricing-portal-header,
  .pricing-portal-controls,
  .pricing-portal-footer,
  .programme-calendar-panel > header,
  .programme-task-list > header {
    align-items: stretch;
    flex-direction: column;
  }

  .pricing-portal-header-actions,
  .pricing-portal-controls,
  .programme-calendar-controls {
    width: 100%;
    max-width: none;
    justify-content: flex-start;
  }

  .pricing-portal-header-actions label,
  .pricing-portal-controls label,
  .programme-service-filter,
  .programme-start-date {
    min-width: min(100%, 220px);
  }

  .pricing-portal-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .programme-calendar-panel {
    min-height: calc(100dvh - 190px);
  }

  .programme-calendar-month,
  .programme-calendar-week,
  .programme-calendar-year {
    grid-template-columns: minmax(0, 1fr);
  }

  .programme-day-schedule {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .programme-task-drawer-layer {
    grid-template-columns: minmax(0, 1fr);
  }

  .programme-task-drawer {
    width: min(100%, 560px);
    justify-self: end;
  }
}

@media (max-width: 520px) {
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .top-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .project-picker,
  .level-pill {
    max-width: 42vw;
  }

  .modebar-controls {
    align-items: stretch;
  }

  .system-controls {
    min-width: 86vw;
  }

  .system-controls select,
  .view-selector select,
  .drawing-selector select,
  #plantRoomAreaSelect {
    width: 54vw;
  }

  .tool-palette {
    grid-template-columns: minmax(0, 1fr);
  }

  .canvas-stage {
    min-height: min(560px, calc(100dvh - 230px));
  }

  .left-rail,
  .tool-palette,
  .inspector,
  .product-panel,
  .pipe-panel,
  .results-panel {
    max-height: min(56dvh, 420px);
  }

  .pricing-portal-summary,
  .pricing-portal-summary-totals,
  .pricing-portal-summary-detail {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-app-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .dashboard-app-tool {
    min-height: 118px;
    padding: 12px;
  }

  .dashboard-app-tool strong {
    font-size: 13px;
  }

  .dashboard-news-popout,
  .export-popover,
  .product-library-popover,
  .project-settings-popover,
  .account-menu-popover {
    inset: 8px;
    max-height: calc(100dvh - 16px);
  }
}

.dashboard-team-activity-button {
  min-height: 32px;
  padding: 0 10px;
  gap: 6px;
  font-size: 12px;
}

.dashboard-team-activity-button .team-activity-notification {
  display: inline-grid;
  min-width: 22px;
  min-height: 22px;
  place-items: center;
  padding: 0 6px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 999px;
  background: rgba(219, 234, 254, 0.68);
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
}

.team-activity-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, var(--blue) 20%);
  background:
    radial-gradient(circle at 12% 0%, rgba(14, 132, 255, 0.16), transparent 42%),
    linear-gradient(135deg, color-mix(in srgb, var(--surface-solid) 94%, #eff6ff 6%), color-mix(in srgb, var(--surface-soft) 84%, transparent));
}

.team-activity-heading {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.team-activity-heading-icon,
.team-activity-empty-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(59, 130, 246, 0.24);
  background: linear-gradient(145deg, rgba(219, 234, 254, 0.96), rgba(224, 231, 255, 0.82));
  color: var(--blue);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.team-activity-heading-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
}

.team-activity-heading-icon svg,
.team-activity-empty-icon svg {
  width: 22px;
  height: 22px;
}

.team-activity-heading-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.team-activity-kicker {
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.085em;
  text-transform: uppercase;
}

.team-activity-title-row {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
}

.team-activity-title-row h2 {
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-activity-count {
  display: inline-grid;
  min-width: 24px;
  min-height: 24px;
  place-items: center;
  padding: 0 7px;
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 999px;
  background: rgba(219, 234, 254, 0.72);
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
}

.team-activity-heading-copy small {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 720;
}

.team-activity-popover-head > button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--line) 82%, var(--blue) 18%);
  border-radius: 13px;
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 7px 16px rgba(15, 23, 42, 0.08);
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease, transform 150ms ease;
}

.team-activity-popover-head > button:hover,
.team-activity-popover-head > button:focus-visible {
  border-color: rgba(37, 99, 235, 0.44);
  background: rgba(239, 246, 255, 0.96);
  color: var(--blue);
  outline: none;
  transform: translateY(-1px);
}

.team-activity-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  gap: 10px;
  overflow: hidden;
  padding: 14px;
}

.team-activity-content.is-empty {
  overflow-y: auto;
  overscroll-behavior: contain;
}

.team-activity-intro {
  display: grid;
  gap: 2px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--line) 86%, var(--blue) 14%);
  border-radius: 13px;
  background: color-mix(in srgb, var(--surface-soft) 72%, transparent);
}

.team-activity-intro strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
}

.team-activity-intro span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

.team-activity-list {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  list-style: none;
}

.team-activity-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.team-activity-overview > span {
  display: grid;
  gap: 1px;
  padding: 9px 11px;
  border: 1px solid color-mix(in srgb, var(--line) 84%, var(--blue) 16%);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-soft) 70%, transparent);
}

.team-activity-overview b {
  color: var(--text);
  font-size: 16px;
  font-weight: 920;
  line-height: 1.05;
}

.team-activity-overview small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.team-activity-loading {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 12px;
  background: rgba(239, 246, 255, 0.72);
  color: var(--blue);
}

.team-activity-loading > span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(219, 234, 254, 0.8);
}

.team-activity-loading svg {
  width: 17px;
  height: 17px;
}

.team-activity-loading div {
  display: grid;
  gap: 1px;
}

.team-activity-loading strong {
  color: var(--text);
  font-size: 11.5px;
  font-weight: 900;
}

.team-activity-loading small,
.team-activity-message {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 720;
}

.team-activity-message {
  margin: 0;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.team-activity-message.error {
  border-color: rgba(239, 68, 68, 0.24);
  background: rgba(254, 242, 242, 0.76);
  color: #b91c1c;
}

.team-activity-project-group {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: max-content;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 84%, var(--blue) 16%);
  border-radius: 15px;
  background: color-mix(in srgb, var(--surface-solid) 92%, transparent);
  box-shadow: var(--glass-edge);
}

.team-activity-project-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 88%, var(--blue) 12%);
  background:
    linear-gradient(110deg, rgba(239, 246, 255, 0.64), transparent 58%),
    color-mix(in srgb, var(--surface-soft) 70%, transparent);
}

.team-activity-project-identity {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.team-activity-project-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 820;
}

.team-activity-project-kicker span {
  padding: 2px 6px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 999px;
  background: rgba(219, 234, 254, 0.7);
  color: #2563eb;
  font-style: normal;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.team-activity-project-kicker em {
  overflow: hidden;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-activity-project-kicker time {
  color: color-mix(in srgb, var(--muted) 88%, transparent);
  font-weight: 720;
}

.team-activity-project-kicker time::before {
  content: "·";
  margin-right: 6px;
}

.team-activity-project-identity h3 {
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 920;
  letter-spacing: -0.018em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-activity-project-identity p {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-activity-open-project {
  height: 30px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 9px;
  border: 1px solid color-mix(in srgb, var(--line) 68%, var(--blue) 32%);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-solid) 88%, var(--blue) 12%);
  color: var(--blue);
  font-size: 10.5px;
  font-weight: 860;
  box-shadow: none;
  white-space: nowrap;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.team-activity-open-project:hover,
.team-activity-open-project:focus-visible {
  border-color: color-mix(in srgb, var(--blue) 58%, var(--line));
  background: color-mix(in srgb, var(--surface-solid) 76%, var(--blue) 24%);
  outline: none;
  transform: translateY(-1px);
}

.team-activity-open-project:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.team-activity-open-project span {
  margin-left: 3px;
}

.team-activity-project-overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 29px;
  padding: 5px 10px;
  border-bottom: 1px solid var(--line);
}

.team-activity-project-categories,
.team-activity-project-facts {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.team-activity-project-categories span {
  padding: 2px 6px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-soft) 74%, transparent);
  color: var(--muted);
  font-size: 9px;
  font-weight: 760;
}

.team-activity-project-categories b {
  color: var(--text);
  font-weight: 920;
}

.team-activity-project-facts {
  flex: 0 0 auto;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 9px;
  font-weight: 760;
}

.team-activity-project-facts span + span::before {
  content: "·";
  margin-right: 5px;
}

.team-activity-change-list {
  margin: 0;
  padding: 0 10px;
  list-style: none;
}

.team-activity-change {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 7px;
  padding: 6px 0;
}

.team-activity-change + .team-activity-change {
  border-top: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
}

.team-activity-change .team-activity-avatar {
  width: 24px;
  height: 24px;
  font-size: 8.5px;
}

.team-activity-change-body {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.team-activity-change-title,
.team-activity-change-meta {
  display: flex;
  align-items: baseline;
  min-width: 0;
  gap: 8px;
}

.team-activity-change-title {
  justify-content: space-between;
}

.team-activity-change-title b {
  overflow: hidden;
  color: var(--text);
  font-size: 10.5px;
  font-weight: 880;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-activity-change-title time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 9px;
  font-weight: 780;
}

.team-activity-change-meta {
  color: var(--muted);
  font-size: 9px;
  font-weight: 720;
}

.team-activity-change-meta strong {
  overflow: hidden;
  color: color-mix(in srgb, var(--text) 78%, var(--muted));
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-activity-change-context {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-activity-change-body > small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 680;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-activity-history-note {
  margin: 0;
  padding: 5px 10px 6px 41px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  font-weight: 740;
}

.team-activity-more-changes {
  border-top: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
}

.team-activity-more-changes > summary {
  min-height: 27px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px 0 41px;
  color: var(--blue);
  cursor: pointer;
  font-size: 9.5px;
  font-weight: 820;
  list-style: none;
}

.team-activity-more-changes > summary::-webkit-details-marker {
  display: none;
}

.team-activity-more-changes > summary::before {
  content: "+";
  width: 14px;
  height: 14px;
  display: inline-grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--line) 65%, var(--blue) 35%);
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
}

.team-activity-more-changes[open] > summary::before {
  content: "−";
}

.team-activity-more-changes > summary:hover,
.team-activity-more-changes > summary:focus-visible {
  background: color-mix(in srgb, var(--surface-soft) 76%, transparent);
  outline: none;
}

.team-activity-change-list-more {
  border-top: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
}

.team-activity-no-detail {
  margin: 0;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.35;
}

.team-activity-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.56);
  box-shadow: var(--glass-edge);
}

.team-activity-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(59, 130, 246, 0.24);
  border-radius: 999px;
  background: rgba(219, 234, 254, 0.72);
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
}

.team-activity-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-activity-body {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.team-activity-meta,
.team-activity-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.team-activity-meta strong,
.team-activity-title b {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-activity-meta time,
.team-activity-title span,
.team-activity-body small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.team-activity-title span {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 999px;
  background: rgba(239, 246, 255, 0.76);
  color: #2563eb;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.team-activity-snapshot {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.team-activity-snapshot span {
  padding: 4px 7px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.74);
  color: var(--muted);
  font-size: 10px;
  font-weight: 820;
}

.team-activity-empty {
  display: grid;
  min-height: 190px;
  align-content: center;
  justify-items: center;
  gap: 14px;
  padding: 28px 24px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, var(--blue) 22%);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 22%, rgba(59, 130, 246, 0.1), transparent 36%),
    color-mix(in srgb, var(--surface-soft) 62%, transparent);
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.team-activity-empty-icon {
  width: 50px;
  height: 50px;
  border-radius: 16px;
}

.team-activity-empty-copy {
  display: grid;
  max-width: 390px;
  gap: 5px;
}

.team-activity-empty-copy strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
}

.team-activity-empty-copy span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.team-activity-empty-examples {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.team-activity-empty-examples span {
  padding: 5px 9px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-solid) 82%, transparent);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 780;
}

html[data-theme="dark"] .team-activity-item {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(148, 163, 184, 0.18);
}

html[data-theme="dark"] .team-activity-project-group {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(22, 23, 27, 0.88);
}

html[data-theme="dark"] .team-activity-project-head {
  border-color: rgba(148, 163, 184, 0.16);
  background:
    linear-gradient(110deg, rgba(37, 99, 235, 0.12), transparent 58%),
    rgba(35, 36, 41, 0.9);
}

html[data-theme="dark"] .team-activity-project-kicker span,
html[data-theme="dark"] .team-activity-project-categories span {
  border-color: rgba(147, 197, 253, 0.16);
  background: rgba(37, 99, 235, 0.14);
  color: #93c5fd;
}

html[data-theme="dark"] .team-activity-overview > span,
html[data-theme="dark"] .team-activity-loading,
html[data-theme="dark"] .team-activity-message {
  border-color: rgba(234, 234, 236, 0.16);
  background: rgba(28, 29, 33, 0.78);
}

html[data-theme="dark"] .team-activity-loading > span {
  background: rgba(37, 99, 235, 0.2);
}

html[data-theme="dark"] .team-activity-message.error {
  border-color: rgba(248, 113, 113, 0.24);
  background: rgba(127, 29, 29, 0.18);
  color: #fca5a5;
}

html[data-theme="dark"] .team-activity-avatar {
  background: rgba(37, 99, 235, 0.24);
  color: #bfdbfe;
  border-color: rgba(147, 197, 253, 0.22);
}

html[data-theme="dark"] .team-activity-title span {
  background: rgba(37, 99, 235, 0.18);
  border-color: rgba(147, 197, 253, 0.18);
  color: #93c5fd;
}

html[data-theme="dark"] .team-activity-snapshot span {
  background: rgba(15, 23, 42, 0.52);
  border-color: rgba(148, 163, 184, 0.16);
}

html[data-theme="dark"] .team-activity-popover {
  border-color: rgba(96, 165, 250, 0.24);
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 30px 78px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .team-activity-popover-head {
  border-color: rgba(96, 165, 250, 0.2);
  background:
    radial-gradient(circle at 12% 0%, rgba(37, 99, 235, 0.24), transparent 44%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.9));
}

html[data-theme="dark"] .team-activity-heading-icon,
html[data-theme="dark"] .team-activity-empty-icon {
  border-color: rgba(147, 197, 253, 0.22);
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.28), rgba(79, 70, 229, 0.2));
  color: #bfdbfe;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .team-activity-kicker,
html[data-theme="dark"] .team-activity-count {
  color: #93c5fd;
}

html[data-theme="dark"] .team-activity-count,
html[data-theme="dark"] .team-activity-empty-examples span {
  border-color: rgba(147, 197, 253, 0.18);
  background: rgba(37, 99, 235, 0.16);
}

html[data-theme="dark"] .team-activity-popover-head > button,
html[data-theme="dark"] .team-activity-intro,
html[data-theme="dark"] .team-activity-empty {
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.7);
}

html[data-theme="dark"] .team-activity-popover-head > button:hover,
html[data-theme="dark"] .team-activity-popover-head > button:focus-visible {
  border-color: rgba(96, 165, 250, 0.48);
  background: rgba(30, 64, 175, 0.24);
  color: #bfdbfe;
}

@media (max-width: 640px) {
  .team-activity-backdrop {
    padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  }

  .team-activity-popover {
    inset: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    width: auto;
    max-height: none;
    border-radius: 18px;
  }

  .team-activity-popover-head {
    gap: 10px;
    padding: 13px 14px;
  }

  .team-activity-heading {
    gap: 9px;
  }

  .team-activity-heading-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .team-activity-title-row h2 {
    font-size: 17px;
  }

  .team-activity-content {
    padding: 11px;
  }

  .team-activity-overview {
    gap: 6px;
  }

  .team-activity-overview > span {
    padding: 8px;
  }

  .team-activity-overview b {
    font-size: 14px;
  }

  .team-activity-overview small {
    font-size: 8.5px;
  }

  .team-activity-list {
    max-height: none;
  }

  .team-activity-project-head {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
  }

  .team-activity-project-identity h3,
  .team-activity-project-identity p,
  .team-activity-project-kicker em {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .team-activity-open-project {
    width: auto;
    min-height: 34px;
  }

  .team-activity-project-overview {
    align-items: center;
    flex-direction: row;
  }

  .team-activity-project-facts {
    justify-content: flex-end;
  }

  .team-activity-change-title {
    align-items: flex-start;
    flex-direction: row;
    gap: 6px;
  }

  .team-activity-change-title b {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    white-space: normal;
  }

  .team-activity-change-body > small,
  .team-activity-change-context {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .team-activity-item {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 8px;
    padding: 9px;
  }

  .team-activity-avatar {
    width: 30px;
    height: 30px;
  }

  .team-activity-meta,
  .team-activity-title {
    align-items: flex-start;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .team-activity-title {
    flex-direction: column;
    gap: 5px;
  }

  .team-activity-meta strong,
  .team-activity-title b {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .team-activity-meta time {
    margin-left: auto;
  }

  .team-activity-empty {
    min-height: 0;
    padding: 24px 16px;
  }
}

@media (max-width: 420px) {
  .team-activity-open-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .team-activity-open-project {
    width: 34px;
    padding: 0;
    font-size: 14px;
  }

  .team-activity-project-overview {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .team-activity-project-facts {
    justify-content: flex-start;
  }
}

.dashboard-site-survey-workspace {
  --site-survey-accent: #2f7cf6;
  --site-survey-accent-strong: #1769e8;
  --site-survey-accent-soft: rgba(47, 124, 246, 0.09);
  --site-survey-border: rgba(148, 163, 184, 0.24);
  --site-survey-success: #15803d;
  box-sizing: border-box;
  height: calc(100dvh - 96px);
  min-height: 0;
  max-height: calc(100dvh - 96px);
  overflow: hidden;
  padding-bottom: max(28px, env(safe-area-inset-bottom));
}

@supports not (height: 100dvh) {
  .dashboard-site-survey-workspace {
    height: calc(100vh - 96px);
    max-height: calc(100vh - 96px);
  }
}

.site-survey-header p {
  max-width: 760px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
  line-height: 1.35;
}

.site-survey-header {
  position: relative;
  z-index: 2;
  gap: 18px;
}

.site-survey-header .dashboard-product-library-header-actions {
  align-items: stretch;
}

.site-survey-progress {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(72px, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 12px;
  min-width: 208px;
  padding: 10px 14px 10px 12px;
  overflow: hidden;
  border: 1px solid rgba(47, 124, 246, 0.26);
  border-radius: 18px;
  background:
    radial-gradient(circle at 8% 10%, rgba(96, 165, 250, 0.2), transparent 38%),
    linear-gradient(135deg, rgba(239, 246, 255, 0.94), rgba(255, 255, 255, 0.8));
  color: var(--site-survey-accent-strong);
  text-align: left;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
}

.site-survey-progress::before {
  content: "Handover";
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.site-survey-progress::after {
  content: "";
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
  width: 9px;
  height: 38px;
  border-radius: 999px;
  background: linear-gradient(180deg, #60a5fa, var(--site-survey-accent-strong));
  box-shadow: 0 0 0 5px rgba(47, 124, 246, 0.08);
}

.site-survey-progress strong {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: end;
  color: inherit;
  font-size: 24px;
  font-weight: 930;
  line-height: 1;
}

.site-survey-progress span {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
}

.site-survey-layout {
  box-sizing: border-box;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-flow: row dense;
  grid-auto-rows: max-content;
  gap: 16px;
  align-content: start;
  align-items: start;
  padding: 2px 4px 56px 2px;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  counter-reset: site-survey-step;
}

.site-survey-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 0;
  overflow: visible;
  /* Survey sections contain variable-height forms. The dashboard tile's
     global layout containment makes grid rows use the intrinsic placeholder
     height and lets the form overflow over following cards. */
  content-visibility: visible;
  contain: none;
  contain-intrinsic-size: none;
  padding: 18px;
  border-color: var(--site-survey-border);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.76));
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.045);
  counter-increment: site-survey-step;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

/* This selector deliberately outranks the later global .dashboard-tile
   performance rule. Survey form content must participate in grid sizing. */
.dashboard-site-survey-workspace .site-survey-card {
  content-visibility: visible;
  contain: none;
  contain-intrinsic-size: none;
}

.site-survey-card::before {
  content: "";
  position: absolute;
  inset: 14px auto 14px 0;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(180deg, #60a5fa, var(--site-survey-accent));
  opacity: 0.72;
}

.site-survey-card:hover,
.site-survey-card:focus-within {
  border-color: rgba(47, 124, 246, 0.34);
  box-shadow: 0 15px 34px rgba(37, 99, 235, 0.09);
}

.site-survey-card > .dashboard-tile-head {
  min-height: 38px;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.site-survey-card > .dashboard-tile-head > span {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 930;
  line-height: 1.2;
}

.site-survey-card > .dashboard-tile-head > span::before {
  content: counter(site-survey-step, decimal-leading-zero);
  display: inline-grid;
  flex: 0 0 30px;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(47, 124, 246, 0.24);
  border-radius: 10px;
  background: var(--site-survey-accent-soft);
  color: var(--site-survey-accent-strong);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.02em;
}

.site-survey-card > .dashboard-tile-head > span::after {
  content: "Required";
  flex: 0 0 auto;
  margin-left: auto;
  padding: 4px 7px;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 999px;
  background: rgba(255, 247, 237, 0.9);
  color: #b45309;
  font-size: 9px;
  font-weight: 930;
  letter-spacing: 0.05em;
  line-height: 1;
  text-transform: uppercase;
}

.site-survey-card:nth-child(4) > .dashboard-tile-head > span::after {
  content: "Site context";
  border-color: rgba(100, 116, 139, 0.2);
  background: rgba(241, 245, 249, 0.86);
  color: #64748b;
}

.site-survey-card:nth-child(5) > .dashboard-tile-head > span::after,
.site-survey-card:nth-child(6) > .dashboard-tile-head > span::after {
  content: "One required";
}

.site-survey-card:nth-child(7) > .dashboard-tile-head > span::after {
  content: "Notes required";
}

.site-survey-project-card {
  border-color: rgba(47, 124, 246, 0.34);
  background:
    radial-gradient(circle at 98% 0%, rgba(96, 165, 250, 0.17), transparent 35%),
    linear-gradient(145deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.9));
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.1);
}

.site-survey-project-card > .dashboard-tile-head > span::after {
  content: "Handover details";
  border-color: rgba(47, 124, 246, 0.24);
  background: rgba(239, 246, 255, 0.92);
  color: var(--site-survey-accent-strong);
}

.site-survey-project-card:has([data-site-survey-field="projectName"][value]:not([value=""])):has([data-site-survey-field="projectAddress"][value]:not([value=""])):has([data-site-survey-field="postcode"][value]:not([value=""])):has([data-site-survey-field="surveyDate"][value]:not([value=""])) > .dashboard-tile-head > span::after {
  content: "Setup ready";
  border-color: rgba(34, 197, 94, 0.24);
  background: rgba(240, 253, 244, 0.92);
  color: var(--site-survey-success);
}

.site-survey-card:nth-child(2):has(> .site-survey-file-grid) > .dashboard-tile-head > span::after,
.site-survey-card:nth-child(3):has([data-site-survey-field="measurements.floorHeight"][value]:not([value=""])) > .dashboard-tile-head > span::after,
.site-survey-card:nth-child(4):has(input:checked) > .dashboard-tile-head > span::after,
.site-survey-card:nth-child(5):has([data-site-survey-field="utilityMeters.gas"][value]:not([value=""]), [data-site-survey-field="utilityMeters.electric"][value]:not([value=""]), [data-site-survey-field="utilityMeters.water"][value]:not([value=""])) > .dashboard-tile-head > span::after,
.site-survey-card:nth-child(6):has([data-site-survey-field="plantLocations.internal"][value]:not([value=""]), [data-site-survey-field="plantLocations.external"][value]:not([value=""]), [data-site-survey-field="plantLocations.roof"][value]:not([value=""])) > .dashboard-tile-head > span::after,
.site-survey-card:nth-child(7):has([data-site-survey-field="accessNotes"]:not(:placeholder-shown)) > .dashboard-tile-head > span::after,
.site-survey-scan-card:has(> .site-survey-file-grid) > .dashboard-tile-head > span::after {
  content: "Ready";
  border-color: rgba(34, 197, 94, 0.24);
  background: rgba(240, 253, 244, 0.92);
  color: var(--site-survey-success);
}

.site-survey-card:nth-child(4):has(input:checked) > .dashboard-tile-head > span::after {
  content: "Recorded";
}

.site-survey-project-card .primary-mini {
  min-height: 38px;
  padding-inline: 14px;
  border-radius: 12px;
}

.site-survey-project-card,
.site-survey-scan-card {
  grid-column: 1 / -1;
}

.site-survey-project-card .site-survey-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.site-survey-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.site-survey-field {
  position: relative;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.site-survey-field.wide {
  grid-column: 1 / -1;
}

.site-survey-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 880;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.site-survey-field input,
.site-survey-field textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 780;
  outline: none;
  padding: 11px 12px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.025);
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.site-survey-field input:hover,
.site-survey-field textarea:hover {
  border-color: rgba(59, 130, 246, 0.42);
}

.site-survey-field input:focus,
.site-survey-field textarea:focus {
  border-color: var(--site-survey-accent);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(47, 124, 246, 0.12);
}

.site-survey-field textarea {
  min-height: 96px;
  resize: vertical;
}

.site-survey-field small {
  position: absolute;
  right: 10px;
  bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 860;
}

.site-survey-field small + input,
.site-survey-field input:has(+ small) {
  padding-right: 44px;
}

.site-survey-chip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.site-survey-check-chip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.site-survey-check-chip:hover {
  border-color: rgba(47, 124, 246, 0.38);
  background: rgba(239, 246, 255, 0.72);
}

.site-survey-check-chip:has(input:checked) {
  border-color: rgba(47, 124, 246, 0.52);
  background: rgba(219, 234, 254, 0.68);
  color: #0f5ec7;
  box-shadow: inset 3px 0 0 var(--site-survey-accent);
}

.site-survey-check-chip:focus-within {
  outline: 3px solid rgba(47, 124, 246, 0.15);
  outline-offset: 1px;
}

.site-survey-check-chip input {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  margin: 0;
  accent-color: #2f7cf6;
}

.site-survey-dropzone {
  position: relative;
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 142px;
  margin-bottom: 4px;
  padding: 18px;
  overflow: hidden;
  border: 1.5px dashed rgba(59, 130, 246, 0.48);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(96, 165, 250, 0.14), transparent 50%),
    linear-gradient(135deg, rgba(239, 246, 255, 0.9), rgba(255, 255, 255, 0.78));
  color: #2563eb;
  cursor: pointer;
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.site-survey-dropzone:hover,
.site-survey-dropzone:focus-within {
  border-color: var(--site-survey-accent);
  background:
    radial-gradient(circle at 50% 0%, rgba(96, 165, 250, 0.2), transparent 54%),
    linear-gradient(135deg, rgba(219, 234, 254, 0.92), rgba(255, 255, 255, 0.86));
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.1);
  transform: translateY(-1px);
}

.site-survey-dropzone.compact {
  min-height: 116px;
}

.site-survey-dropzone svg {
  width: 30px;
  height: 30px;
  padding: 7px;
  overflow: visible;
  border-radius: 12px;
  background: rgba(47, 124, 246, 0.1);
}

.site-survey-dropzone strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 930;
}

.site-survey-dropzone span {
  max-width: 420px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.35;
}

.site-survey-file-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.site-survey-file-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 6px 12px;
  align-items: center;
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.site-survey-file-card:hover,
.site-survey-file-card:focus-within {
  border-color: rgba(47, 124, 246, 0.36);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
  transform: translateY(-1px);
}

.site-survey-file-preview {
  display: grid;
  grid-row: 1 / span 2;
  place-items: center;
  width: 76px;
  height: 68px;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  color: #2563eb;
  cursor: pointer;
}

.site-survey-file-preview:focus-visible {
  outline: 3px solid rgba(47, 124, 246, 0.22);
  outline-offset: 2px;
}

.site-survey-file-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-survey-file-card > div {
  min-width: 0;
  align-self: end;
}

.site-survey-file-card > .settings-mini-btn {
  justify-self: start;
  align-self: start;
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 9px;
  font-size: 11px;
}

.site-survey-file-card strong,
.site-survey-file-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-survey-file-card strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.3;
}

.site-survey-file-card small,
.site-survey-empty,
.site-survey-scan-card p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.site-survey-empty {
  display: grid;
  place-items: center;
  min-height: 54px;
  padding: 12px;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.58);
  text-align: center;
}

.site-survey-scan-card {
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1.2fr);
  column-gap: 18px;
}

.site-survey-scan-card > .dashboard-tile-head,
.site-survey-scan-card > p,
.site-survey-scan-card > .site-survey-field {
  grid-column: 1 / -1;
}

.site-survey-scan-card > .site-survey-dropzone {
  grid-column: 1;
  min-height: 132px;
  margin: 0;
}

.site-survey-scan-card > .site-survey-file-grid,
.site-survey-scan-card > .site-survey-empty {
  grid-column: 2;
  align-self: stretch;
  margin: 0;
}

.site-survey-scan-card > .site-survey-empty {
  min-height: 132px;
}

.site-survey-scan-card > .site-survey-file-grid {
  grid-template-columns: 1fr;
}

.site-survey-scan-card p {
  max-width: 860px;
  margin: -2px 0 0;
  line-height: 1.45;
}

html[data-theme="dark"] .site-survey-progress,
html[data-theme="dark"] .site-survey-dropzone {
  background: rgba(37, 99, 235, 0.14);
  border-color: rgba(147, 197, 253, 0.24);
  color: #93c5fd;
}

html[data-theme="dark"] .site-survey-field input,
html[data-theme="dark"] .site-survey-field textarea,
html[data-theme="dark"] .site-survey-check-chip,
html[data-theme="dark"] .site-survey-file-card,
html[data-theme="dark"] .site-survey-empty {
  background: rgba(15, 23, 42, 0.62);
  border-color: rgba(148, 163, 184, 0.18);
}

html[data-theme="dark"] .site-survey-card {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.72));
  border-color: rgba(148, 163, 184, 0.2);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.16);
}

html[data-theme="dark"] .site-survey-project-card {
  background:
    radial-gradient(circle at 98% 0%, rgba(59, 130, 246, 0.2), transparent 38%),
    linear-gradient(145deg, rgba(30, 58, 138, 0.2), rgba(15, 23, 42, 0.86));
  border-color: rgba(96, 165, 250, 0.3);
}

html[data-theme="dark"] .site-survey-field input:focus,
html[data-theme="dark"] .site-survey-field textarea:focus {
  background: rgba(15, 23, 42, 0.9);
}

html[data-theme="dark"] .site-survey-check-chip:has(input:checked) {
  background: rgba(37, 99, 235, 0.22);
  color: #bfdbfe;
}

html[data-theme="dark"] .site-survey-card > .dashboard-tile-head > span::after {
  border-color: rgba(251, 191, 36, 0.2);
  background: rgba(146, 64, 14, 0.22);
  color: #fcd34d;
}

html[data-theme="dark"] .site-survey-card:nth-child(4) > .dashboard-tile-head > span::after {
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(51, 65, 85, 0.54);
  color: #cbd5e1;
}

html[data-theme="dark"] .site-survey-project-card > .dashboard-tile-head > span::after {
  border-color: rgba(96, 165, 250, 0.24);
  background: rgba(30, 64, 175, 0.28);
  color: #bfdbfe;
}

@media (max-width: 1180px) {
  .site-survey-project-card .site-survey-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-survey-file-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .dashboard-site-survey-workspace {
    height: auto;
    min-height: calc(100dvh - 82px);
    max-height: none;
    overflow: visible;
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }

  .site-survey-header {
    gap: 12px;
  }

  .site-survey-header .dashboard-product-library-header-actions {
    width: 100%;
  }

  .site-survey-progress {
    flex: 1 1 210px;
    min-width: 0;
  }

  .site-survey-layout {
    overflow: visible;
    scrollbar-gutter: auto;
  }

  .site-survey-layout,
  .site-survey-project-card .site-survey-form-grid,
  .site-survey-form-grid {
    grid-template-columns: 1fr;
  }

  .site-survey-scan-card {
    grid-template-columns: 1fr;
  }

  .site-survey-scan-card > .site-survey-dropzone,
  .site-survey-scan-card > .site-survey-file-grid,
  .site-survey-scan-card > .site-survey-empty {
    grid-column: 1;
  }
}

@media (max-width: 620px) {
  .site-survey-header .dashboard-product-library-header-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .site-survey-header .dashboard-product-library-dashboard-btn,
  .site-survey-progress {
    width: 100%;
  }

  .site-survey-layout {
    gap: 12px;
    padding: 0 0 max(36px, env(safe-area-inset-bottom));
  }

  .site-survey-card {
    gap: 12px;
    padding: 15px;
    border-radius: 18px;
  }

  .site-survey-card > .dashboard-tile-head {
    align-items: stretch;
    flex-direction: column;
  }

  .site-survey-card > .dashboard-tile-head > span {
    width: 100%;
  }

  .site-survey-card > .dashboard-tile-head > span::after {
    margin-left: auto;
  }

  .site-survey-card > .dashboard-tile-head > .primary-mini,
  .site-survey-card > .dashboard-tile-head > .settings-mini-btn {
    justify-content: center;
    width: 100%;
    min-height: 44px;
  }

  .site-survey-chip-grid {
    grid-template-columns: 1fr;
  }

  .site-survey-file-card {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 6px 10px;
  }

  .site-survey-file-preview {
    width: 64px;
    height: 60px;
  }

  .site-survey-file-card .settings-mini-btn {
    grid-column: 2;
    justify-self: stretch;
    min-height: 34px;
  }

  .site-survey-field input,
  .site-survey-field textarea,
  .site-survey-check-chip,
  .site-survey-dropzone {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-survey-card,
  .site-survey-check-chip,
  .site-survey-dropzone,
  .site-survey-file-card,
  .site-survey-field input,
  .site-survey-field textarea {
    transition: none;
  }
}

.site-survey-field select,
.site-survey-file-floor select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 38px 9px 12px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 760;
  outline: none;
}

.site-survey-field select:focus,
.site-survey-file-floor select:focus {
  border-color: var(--site-survey-accent);
  box-shadow: 0 0 0 4px rgba(47, 124, 246, 0.12);
}

.site-survey-field span b {
  color: #ef4444;
}

.site-survey-field-checkbox {
  align-self: end;
  min-height: 44px;
}

.site-survey-message {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 3px 12px;
  padding: 10px 13px;
  border: 1px solid rgba(47, 124, 246, 0.22);
  border-radius: 13px;
  background: rgba(239, 246, 255, 0.94);
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 820;
}

.site-survey-message svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}

.site-survey-message.is-busy svg {
  animation: site-survey-status-spin 1s linear infinite;
}

@keyframes site-survey-status-spin {
  to { transform: rotate(360deg); }
}

.site-survey-inline-status {
  flex: 0 0 auto !important;
  width: auto !important;
  padding: 5px 9px;
  border: 1px solid rgba(47, 124, 246, 0.2);
  border-radius: 999px;
  background: rgba(239, 246, 255, 0.9);
  color: #1d4ed8 !important;
  font-size: 10px !important;
  letter-spacing: 0.02em;
  text-transform: none !important;
}

.site-survey-card > .dashboard-tile-head > .site-survey-inline-status::before,
.site-survey-card > .dashboard-tile-head > .site-survey-inline-status::after {
  content: none;
}

.site-survey-spatial-card,
.site-survey-evidence-card,
.site-survey-register-card,
.site-survey-handover-card {
  grid-column: 1 / -1;
}

.site-survey-scan-card > .site-survey-spatial-grid {
  grid-column: 1 / -1;
}

.site-survey-card > .dashboard-tile-head > span:first-child::after {
  content: "Survey section";
}

.site-survey-project-card > .dashboard-tile-head > span:first-child::after {
  content: "Required setup";
}

.site-survey-spatial-card > .dashboard-tile-head > span:first-child::after {
  content: "Design input";
}

.site-survey-evidence-card > .dashboard-tile-head > span:first-child::after {
  content: "Evidence";
}

.site-survey-register-card > .dashboard-tile-head > span:first-child::after {
  content: "Review";
}

.site-survey-handover-card > .dashboard-tile-head > span:first-child::after {
  content: "Transfer";
  border-color: rgba(34, 197, 94, 0.24);
  background: rgba(240, 253, 244, 0.92);
  color: #15803d;
}

.site-survey-spatial-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.site-survey-spatial-grid > div {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.site-survey-file-floor {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}

.site-survey-file-floor span,
.site-survey-subheading {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.site-survey-file-floor select {
  min-height: 34px;
  padding-block: 6px;
  font-size: 11px;
}

.site-survey-register {
  display: grid;
  gap: 10px;
}

.site-survey-register-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, 0.45fr);
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.72);
}

.site-survey-register-row > .wide,
.site-survey-register-row > .settings-mini-btn {
  grid-column: 1 / -1;
}

.site-survey-register-row > .settings-mini-btn {
  justify-self: end;
}

.site-survey-handover-card {
  border-color: rgba(34, 197, 94, 0.28);
  background:
    radial-gradient(circle at 96% 4%, rgba(74, 222, 128, 0.13), transparent 32%),
    linear-gradient(145deg, rgba(240, 253, 244, 0.92), rgba(255, 255, 255, 0.94));
}

.site-survey-handover-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.7fr);
  gap: 20px;
  align-items: start;
}

.site-survey-handover-grid > div > strong {
  display: block;
  margin-bottom: 5px;
  color: var(--text);
  font-size: 18px;
  font-weight: 930;
}

.site-survey-handover-grid p,
.site-survey-handover-issues {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.site-survey-handover-issues {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  padding-left: 18px;
}

.site-survey-handover-ready {
  margin-top: 10px !important;
  color: #15803d !important;
}

.site-survey-handover-grid dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.site-survey-handover-grid dl div {
  display: grid;
  gap: 2px;
  padding: 10px;
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
}

.site-survey-handover-grid dt {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.site-survey-handover-grid dd {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 930;
}

.site-survey-create-design {
  justify-self: end;
  min-height: 44px;
  padding-inline: 20px;
  border-radius: 13px;
}

html[data-theme="dark"] .site-survey-field select,
html[data-theme="dark"] .site-survey-file-floor select,
html[data-theme="dark"] .site-survey-register-row,
html[data-theme="dark"] .site-survey-handover-grid dl div {
  background: rgba(15, 23, 42, 0.8);
  color: var(--text);
}

@media (max-width: 900px) {
  .site-survey-spatial-grid,
  .site-survey-handover-grid {
    grid-template-columns: 1fr;
  }

  .site-survey-create-design {
    justify-self: stretch;
  }
}

@media (max-width: 620px) {
  .site-survey-inline-status {
    margin-left: 40px;
  }

  .site-survey-register-row,
  .site-survey-handover-grid dl {
    grid-template-columns: 1fr;
  }

  .site-survey-field select,
  .site-survey-file-floor select {
    font-size: 16px;
  }
}

.programme-task-drawer-layout.single {
  display: block;
  min-height: 0;
  overflow: hidden;
}

.programme-task-drawer-layout.single .programme-task-list.in-drawer {
  border-right: 0;
  height: 100%;
  max-height: none;
  min-width: 0;
}

.programme-task-drawer-layout.single .programme-task-card-list {
  height: 100%;
  padding: 14px;
}

.programme-selected-task.in-card {
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-left: 0;
  border-radius: 14px;
  bottom: auto;
  box-shadow: none;
  left: auto;
  max-height: none;
  overflow: visible;
  padding: 12px;
  position: static;
  right: auto;
  width: auto;
  z-index: auto;
}

.programme-selected-task.in-card header {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding-top: 10px;
}

.programme-selected-task.in-card .programme-selected-task-image {
  flex-basis: 58px;
  height: 58px;
}

.programme-selected-task.in-card .programme-selected-task-stats,
.programme-selected-task.in-card .programme-task-product-info {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.programme-selected-task.in-card .programme-selected-task-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.programme-selected-task.in-card .programme-task-detail-section {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding-top: 10px;
}

html[data-theme="dark"] .programme-selected-task.in-card {
  background: rgba(15, 23, 42, 0.58);
  border-color: rgba(148, 163, 184, 0.22);
}

.programme-task-drawer-layer {
  grid-template-columns: 1fr minmax(560px, min(740px, 46vw));
}

.programme-task-drawer {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(248, 250, 252, 0.98)),
    #fff;
}

.programme-task-drawer > header {
  padding: 16px 18px;
}

.programme-task-drawer > header h2 {
  color: #111827;
  font-size: 24px;
  letter-spacing: 0;
  line-height: 1.08;
  max-width: 560px;
  overflow-wrap: anywhere;
}

.programme-task-drawer > header p {
  color: #697586;
  font-size: 13px;
  line-height: 1.35;
}

.programme-task-drawer-layout.single .programme-task-card-list {
  align-content: start;
  gap: 12px;
  padding: 16px 18px 22px;
}

.programme-task-list.in-drawer .programme-task-card {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(203, 213, 225, 0.78);
  border-left-width: 5px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
  cursor: default;
  gap: 14px;
}

.programme-task-list.in-drawer .programme-task-card:hover,
.programme-task-list.in-drawer .programme-task-card.selected {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.programme-task-list.in-drawer .programme-task-card > header {
  align-items: center;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.programme-task-list.in-drawer .programme-task-card > header strong {
  color: #111827;
  font-size: 18px;
  letter-spacing: 0;
  line-height: 1.12;
  white-space: normal;
}

.programme-task-list.in-drawer .programme-task-card > header small {
  color: #64748b;
  font-size: 12px;
}

.programme-task-list.in-drawer .programme-task-card > header em {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(148, 163, 184, 0.22);
  color: #475569;
  font-size: 11px;
}

.programme-task-list.in-drawer .programme-task-card-fields {
  background: rgba(248, 250, 252, 0.72);
  border: 1px solid rgba(203, 213, 225, 0.7);
  border-radius: 14px;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 12px;
}

.programme-task-list.in-drawer .programme-task-card-fields > .programme-assignee-control {
  grid-column: 1 / -1;
}

.programme-task-list.in-drawer .programme-task-card-fields span,
.programme-selected-task.in-card span,
.programme-selected-task.in-card dt,
.programme-task-detail-section h4 {
  color: #667085;
  font-size: 11px;
  letter-spacing: 0;
}

.programme-task-list.in-drawer .programme-task-card-fields input,
.programme-task-list.in-drawer .programme-task-card-fields select {
  border-color: rgba(203, 213, 225, 0.9);
  font-size: 14px;
  min-height: 42px;
}

.programme-task-list.in-drawer .programme-assignee-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.programme-task-list.in-drawer .programme-assignee-options label {
  align-content: center;
  background: #fff;
  border-color: rgba(203, 213, 225, 0.88);
  min-height: 48px;
  max-width: none;
  min-width: 0;
  padding: 8px 10px 8px 32px;
}

.programme-task-list.in-drawer .programme-assignee-options label.selected {
  background: rgba(236, 253, 245, 0.95);
  border-color: rgba(34, 197, 94, 0.42);
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.08);
}

.programme-task-list.in-drawer .programme-assignee-options input {
  top: 12px;
}

.programme-task-list.in-drawer .programme-assignee-options strong {
  font-size: 12px;
}

.programme-selected-task.in-card {
  background: rgba(248, 250, 252, 0.68);
  border-color: rgba(203, 213, 225, 0.72);
  display: grid;
  gap: 12px;
}

.programme-selected-task.in-card header {
  border-top: 0;
  padding-top: 0;
}

.programme-selected-task.in-card h3 {
  color: #111827;
  font-size: 17px;
  line-height: 1.14;
}

.programme-selected-task.in-card p {
  color: #64748b;
  font-size: 13px;
}

.programme-selected-task.in-card .programme-selected-task-stats div,
.programme-selected-task.in-card .programme-task-product-info div {
  background: #fff;
  border-color: rgba(203, 213, 225, 0.74);
}

html[data-theme="dark"] .programme-task-list.in-drawer .programme-task-card,
html[data-theme="dark"] .programme-task-list.in-drawer .programme-task-card:hover,
html[data-theme="dark"] .programme-task-list.in-drawer .programme-task-card.selected {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(148, 163, 184, 0.24);
}

html[data-theme="dark"] .programme-task-list.in-drawer .programme-task-card-fields,
html[data-theme="dark"] .programme-selected-task.in-card {
  background: rgba(30, 41, 59, 0.58);
  border-color: rgba(148, 163, 184, 0.2);
}

html[data-theme="dark"] .programme-task-list.in-drawer .programme-task-card > header em {
  background: rgba(30, 41, 59, 0.86);
  border-color: rgba(148, 163, 184, 0.24);
  color: #cbd5e1;
}

html[data-theme="dark"] .programme-task-list.in-drawer .programme-assignee-options label.selected {
  background: rgba(20, 83, 45, 0.45);
  border-color: rgba(74, 222, 128, 0.46);
}

@media (max-width: 860px) {
  .programme-task-drawer-layer {
    grid-template-columns: 1fr;
  }

  .programme-task-drawer-backdrop {
    display: none;
  }

  .programme-task-drawer {
    width: 100%;
  }

  .programme-task-list.in-drawer .programme-task-card-fields {
    grid-template-columns: 1fr;
  }
}

.pricing-portal-quote-upload-dialog {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 14px;
  width: min(620px, calc(100vw - 48px));
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.28);
}

.pricing-portal-quote-upload-dropzone {
  position: relative;
  display: grid;
  gap: 8px;
  place-items: center;
  min-height: 150px;
  padding: 22px;
  color: var(--blue);
  text-align: center;
  background: rgba(37, 99, 235, 0.06);
  border: 1px dashed rgba(37, 99, 235, 0.38);
  border-radius: 12px;
  cursor: pointer;
}

.pricing-portal-quote-upload-dropzone svg {
  width: 28px;
  height: 28px;
}

.pricing-portal-quote-upload-dropzone strong {
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}

.pricing-portal-quote-upload-dropzone span,
.pricing-portal-quote-upload-help span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.pricing-portal-quote-upload-dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.pricing-portal-quote-upload-help {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--control-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.dashboard-distributor-branch-inbox {
  min-width: 230px;
}

.dashboard-distributor-request-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: stretch;
  margin: 0 0 14px;
}

.dashboard-distributor-request-meta article,
.dashboard-distributor-doc-link {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  background: rgba(37, 99, 235, 0.055);
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 10px;
}

.dashboard-distributor-request-meta span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.dashboard-distributor-request-meta strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.dashboard-distributor-request-meta small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.dashboard-distributor-doc-link {
  min-width: 132px;
  align-content: center;
  justify-items: center;
  color: var(--blue);
  font-size: 12px;
  font-weight: 950;
  text-decoration: none;
}

.dashboard-distributor-doc-link svg {
  width: 20px;
  height: 20px;
}

.dashboard-distributor-line-head,
.dashboard-distributor-line-row {
  grid-template-columns: minmax(180px, 1.35fr) minmax(96px, 0.72fr) minmax(90px, 0.66fr) 0.35fr 0.55fr 0.68fr;
}

.dashboard-distributor-alert {
  margin: 0 0 12px;
  border: 1px solid rgba(245, 158, 11, 0.34);
  border-radius: 10px;
  background: rgba(255, 251, 235, 0.88);
  color: #92400e;
  padding: 9px 11px;
  font-size: 0.78rem;
  font-weight: 900;
}

.pricing-portal-quote-detail-dialog {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 14px;
  width: min(1080px, calc(100vw - 48px));
  max-height: min(860px, calc(100vh - 48px));
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background:
    radial-gradient(circle at 12% 0%, rgba(37, 99, 235, 0.10), transparent 34%),
    var(--surface-solid);
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.28);
}

.pricing-portal-quote-contact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.pricing-portal-quote-contact-grid article {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.70);
}

.pricing-portal-quote-contact-grid article.received {
  border-color: rgba(34, 197, 94, 0.30);
  background: rgba(240, 253, 244, 0.74);
}

.pricing-portal-quote-contact-grid span,
.pricing-portal-quote-message-panel > div > span,
.pricing-portal-quote-message-panel label > span {
  color: var(--blue);
  font-size: 0.63rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.pricing-portal-quote-contact-grid strong,
.pricing-portal-quote-message-panel > div > strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 950;
  line-height: 1.15;
  text-overflow: ellipsis;
}

.pricing-portal-quote-contact-grid small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
}

.pricing-portal-quote-contact-grid a {
  color: var(--blue);
  text-decoration: none;
}

.pricing-portal-quote-breakdown {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
}

.pricing-portal-quote-breakdown-head,
.pricing-portal-quote-breakdown-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.4fr) minmax(94px, 0.7fr) minmax(94px, 0.7fr) 54px minmax(78px, 0.62fr) minmax(78px, 0.62fr);
  gap: 9px;
  align-items: center;
  padding: 9px 11px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.17);
}

.pricing-portal-quote-breakdown-head {
  background: rgba(241, 245, 249, 0.78);
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 950;
  text-transform: uppercase;
}

.pricing-portal-quote-breakdown-row {
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 850;
}

.pricing-portal-quote-breakdown-row:last-child {
  border-bottom: 0;
}

.pricing-portal-quote-breakdown-row strong {
  display: grid;
  gap: 2px;
  min-width: 0;
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1.15;
}

.pricing-portal-quote-breakdown-row small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pricing-portal-quote-message-panel {
  display: grid;
  gap: 9px;
  padding: 11px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.62);
}

.pricing-portal-quote-message-list {
  display: grid;
  gap: 7px;
  max-height: 150px;
  overflow: auto;
}

.pricing-portal-quote-message,
.pricing-portal-quote-message-empty {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.20);
  border-radius: 10px;
  background: var(--surface);
}

.pricing-portal-quote-message.customer {
  border-color: rgba(37, 99, 235, 0.22);
  background: rgba(239, 246, 255, 0.72);
}

.pricing-portal-quote-message.distributor {
  border-color: rgba(34, 197, 94, 0.24);
  background: rgba(240, 253, 244, 0.72);
}

.pricing-portal-quote-message span,
.pricing-portal-quote-message-empty {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 850;
}

.pricing-portal-quote-message p {
  margin: 0;
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 820;
  line-height: 1.3;
}

.pricing-portal-quote-message-panel label {
  display: grid;
  gap: 5px;
}

.pricing-portal-quote-message-panel textarea {
  min-height: 72px;
  resize: vertical;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  padding: 9px 10px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
}

.pricing-portal-quote-detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 2px;
}

.pricing-portal-quote-detail-actions button {
  min-width: 156px;
}

.pricing-portal-quote-accept:not(:disabled) {
  border-color: rgba(22, 163, 74, 0.65);
  background: linear-gradient(145deg, rgba(34, 197, 94, 0.96), rgba(21, 128, 61, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 10px 22px rgba(22, 163, 74, 0.20);
}

html[data-theme="dark"] .pricing-portal-quote-upload-dialog,
html[data-theme="dark"] .pricing-portal-quote-detail-dialog,
html[data-theme="dark"] .pricing-portal-quote-contact-grid article,
html[data-theme="dark"] .pricing-portal-quote-breakdown,
html[data-theme="dark"] .pricing-portal-quote-message-panel,
html[data-theme="dark"] .pricing-portal-quote-message,
html[data-theme="dark"] .pricing-portal-quotes-panel,
html[data-theme="dark"] .dashboard-distributor-request-meta article,
html[data-theme="dark"] .dashboard-distributor-doc-link {
  background: rgba(15, 23, 42, 0.94);
  border-color: rgba(148, 163, 184, 0.24);
}

html[data-theme="dark"] .pricing-portal-quotes-panel-title strong {
  color: #f8fafc;
}

html[data-theme="dark"] .pricing-portal-quote-filter {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(2, 6, 23, 0.48);
}

html[data-theme="dark"] .pricing-portal-quote-filter button,
html[data-theme="dark"] .pricing-portal-quotes-collapse {
  color: #cbd5e1;
}

html[data-theme="dark"] .pricing-portal-quote-filter button span {
  background: rgba(148, 163, 184, 0.18);
}

html[data-theme="dark"] .pricing-portal-quotes-collapse {
  border-color: rgba(96, 165, 250, 0.28);
  background: rgba(37, 99, 235, 0.16);
  color: #93c5fd;
}

html[data-theme="dark"] .pricing-portal-quote-filter button:hover,
html[data-theme="dark"] .pricing-portal-quotes-collapse:hover {
  background: rgba(37, 99, 235, 0.24);
  color: #bfdbfe;
}

html[data-theme="dark"] .pricing-portal-quote-filter button.active {
  background: #2563eb;
  color: #fff;
}

html[data-theme="dark"] .pricing-portal-quote-status-card {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.90);
  color: #f8fafc;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .pricing-portal-quote-status-card:hover {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.94));
}

html[data-theme="dark"] .pricing-portal-quote-status-card dl div,
html[data-theme="dark"] .pricing-portal-quote-breakdown-head {
  background: rgba(30, 41, 59, 0.72);
  border-color: rgba(148, 163, 184, 0.20);
}

html[data-theme="dark"] .pricing-portal-quote-message.customer {
  background: rgba(30, 64, 175, 0.25);
}

html[data-theme="dark"] .pricing-portal-quote-message.distributor {
  background: rgba(20, 83, 45, 0.30);
}

html[data-theme="dark"] .pricing-portal-quote-message-panel textarea {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(2, 6, 23, 0.64);
  color: #f8fafc;
}

html[data-theme="dark"] .dashboard-distributor-alert {
  border-color: rgba(245, 158, 11, 0.34);
  background: rgba(120, 53, 15, 0.26);
  color: #fde68a;
}

html[data-theme="dark"] .pricing-portal-quote-upload-dropzone {
  background: rgba(37, 99, 235, 0.14);
  border-color: rgba(96, 165, 250, 0.42);
}

html[data-theme="dark"] .pricing-portal-quote-upload-help {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(148, 163, 184, 0.22);
}

@media (max-width: 980px) {
  .dashboard-distributor-request-meta {
    grid-template-columns: 1fr;
  }

  .dashboard-distributor-line-table {
    overflow-x: auto;
  }

  .dashboard-distributor-line-head,
  .dashboard-distributor-line-row {
    min-width: 760px;
    grid-template-columns: minmax(170px, 1.35fr) minmax(96px, 0.72fr) minmax(90px, 0.66fr) 52px 80px 112px;
  }

  .pricing-portal-quote-status-card,
  .pricing-portal-quote-contact-grid {
    grid-template-columns: 1fr;
  }

  .pricing-portal-quote-breakdown {
    overflow-x: auto;
  }

  .pricing-portal-quote-breakdown-head,
  .pricing-portal-quote-breakdown-row {
    min-width: 760px;
  }
}

/* Programme workspace density pass */
.programme-calendar-panel {
  gap: 8px;
}

.programme-calendar-panel > header {
  gap: 10px;
  padding: 10px 12px;
}

.programme-calendar-panel > header h2 {
  font-size: 22px;
  line-height: 1.05;
}

.programme-calendar-panel > header p {
  font-size: 12px;
}

@media (min-width: 1101px) {
  .programme-calendar-panel > header p {
    white-space: nowrap;
  }
}

.programme-calendar-controls {
  gap: 6px;
}

.programme-calendar-controls button,
.programme-calendar-controls input,
.programme-calendar-controls select,
.programme-service-filter {
  min-height: 36px;
  padding: 7px 10px;
}

.programme-calendar-grid {
  gap: 6px;
}

.programme-calendar-weekday {
  min-height: 30px;
  padding: 6px 8px;
}

.programme-calendar-day {
  min-height: 116px;
  padding: 6px;
}

.programme-calendar-day header {
  margin-bottom: 4px;
}

.programme-calendar-day header strong {
  font-size: 12px;
}

.programme-calendar-day header small,
.programme-calendar-day > em {
  font-size: 10px;
}

.programme-task-pill {
  gap: 4px;
  min-height: 24px;
  padding: 3px 6px;
}

.programme-task-pill span {
  flex: 0 0 auto;
  font-size: 9px;
  padding: 2px 5px;
}

.programme-task-pill strong {
  font-size: 11px;
}

.programme-task-pill small {
  font-size: 9px;
}

.programme-day-task {
  font-size: 11px;
  min-height: 28px;
  padding: 5px 7px;
}

.programme-day-task strong {
  font-size: 11px;
}

.programme-day-task small,
.programme-day-task em {
  font-size: 10px;
}

.programme-gantt {
  --programme-gantt-label: 210px;
  padding: 10px;
}

.programme-gantt-header,
.programme-gantt-row {
  gap: 7px;
  min-width: 860px;
}

.programme-gantt-row {
  min-height: 42px;
  padding: 6px 0;
}

.programme-gantt-scale .programme-gantt-week {
  min-height: 38px;
  padding: 5px 8px;
}

.programme-gantt-label strong {
  font-size: 12px;
}

.programme-gantt-label small {
  font-size: 10px;
}

.programme-gantt-bar {
  min-height: 24px;
  padding: 4px 8px;
}

.programme-gantt-bar span,
.programme-gantt-bar small {
  font-size: 10px;
}

.programme-task-drawer {
  width: min(720px, 92vw);
}

.programme-task-drawer > header {
  padding: 12px 14px;
}

.programme-task-drawer > header h2 {
  font-size: 20px;
}

.programme-task-drawer > header p {
  font-size: 12px;
}

.programme-task-drawer-layout.single .programme-task-card-list {
  gap: 10px;
  padding: 12px 14px 18px;
}

.programme-task-list.in-drawer .programme-task-card {
  gap: 10px;
  padding: 10px;
}

.programme-task-list.in-drawer .programme-task-card > header strong {
  font-size: 15px;
}

.programme-task-list.in-drawer .programme-task-card-fields {
  gap: 8px;
  padding: 9px;
}

.programme-task-list.in-drawer .programme-task-card-fields input,
.programme-task-list.in-drawer .programme-task-card-fields select {
  font-size: 13px;
  min-height: 36px;
}

.programme-selected-task,
.programme-selected-task.in-card {
  gap: 9px;
  padding: 10px;
}

.programme-selected-task header {
  gap: 9px;
}

.programme-selected-task-image,
.programme-selected-task.in-card .programme-selected-task-image {
  flex-basis: 48px;
  height: 48px;
  border-radius: 12px;
}

.programme-selected-task h3,
.programme-selected-task.in-card h3 {
  font-size: 15px;
}

.programme-selected-task p,
.programme-selected-task.in-card p {
  font-size: 11px;
  line-height: 1.28;
}

.programme-selected-task-stats {
  gap: 6px;
}

.programme-selected-task-stats div,
.programme-task-product-info div {
  border-radius: 10px;
  padding: 6px 7px;
}

.programme-selected-task dt {
  font-size: 9px;
}

.programme-selected-task dd {
  font-size: 12px;
}

.programme-task-detail-section {
  gap: 6px;
}

.programme-task-detail-section h4,
.programme-task-list.in-drawer .programme-task-card-fields span,
.programme-selected-task.in-card span,
.programme-selected-task.in-card dt {
  font-size: 10px;
}

.programme-task-steps {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
}

.programme-task-steps li {
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

.programme-task-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.programme-task-tools span {
  background: rgba(239, 246, 255, 0.92);
  border: 1px solid rgba(147, 197, 253, 0.42);
  border-radius: 999px;
  color: #1d4ed8;
  font-size: 10px;
  font-weight: 900;
  padding: 4px 7px;
  text-transform: none;
}

.programme-task-materials li {
  gap: 6px;
  grid-template-columns: minmax(0, 1.3fr) minmax(72px, 0.72fr) minmax(96px, 0.9fr) minmax(46px, auto);
  padding: 6px 7px;
}

.programme-task-materials li strong {
  font-size: 11px;
}

.programme-task-materials li span,
.programme-task-materials li em {
  font-size: 10px;
}

html[data-theme="dark"] .programme-task-steps li {
  color: #cbd5e1;
}

html[data-theme="dark"] .programme-task-tools span {
  background: rgba(37, 99, 235, 0.18);
  border-color: rgba(96, 165, 250, 0.34);
  color: #bfdbfe;
}

.snap-menu-anchor {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.snap-menu-anchor > #toggleSnap {
  gap: 5px;
  min-width: 86px;
}

.snap-menu-anchor > #toggleSnap svg {
  width: 13px;
  height: 13px;
  transition: transform 0.16s ease;
}

.snap-menu-anchor > #toggleSnap.menu-open svg {
  transform: rotate(180deg);
}

.snap-menu-popover {
  position: fixed;
  right: var(--snap-menu-fixed-right, 14px);
  bottom: var(--snap-menu-fixed-bottom, 66px);
  z-index: 1800;
  display: grid;
  width: min(330px, calc(100vw - 28px));
  max-height: min(var(--snap-menu-fixed-max-height, calc(100vh - 96px)), 620px);
  gap: 8px;
  overflow: auto;
  padding: 10px;
  color: #172033;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 14px;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.22);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.snap-menu-popover button {
  appearance: none;
  border: 0;
  font: inherit;
}

.snap-menu-master,
.snap-menu-option {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 9px;
  color: inherit;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
}

.snap-menu-master {
  min-height: 48px;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid rgba(0, 122, 255, 0.42) !important;
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
}

.snap-menu-master-icon svg {
  width: 22px;
  height: 22px;
  color: #0b82ff;
}

.snap-menu-options {
  display: grid;
  gap: 2px;
}

.snap-menu-option {
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  font-weight: 840;
}

.snap-menu-option:hover {
  background: rgba(0, 122, 255, 0.08);
}

.snap-menu-option-main {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.snap-menu-option-main > span:last-child {
  min-width: 0;
  overflow: visible;
  white-space: normal;
}

.snap-glyph {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  color: #64748b;
}

.snap-glyph-red {
  stroke: #ef3340;
}

.snap-glyph-muted {
  stroke: currentColor;
  opacity: 0.86;
}

.snap-menu-toggle {
  position: relative;
  width: 38px;
  height: 21px;
  flex: 0 0 38px;
  margin-left: auto;
  border: 1px solid rgba(100, 116, 139, 0.62);
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.92);
}

.snap-menu-toggle > span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  border-radius: 999px;
  background: #f8fafc;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.24);
  transition: transform 0.16s ease;
}

.snap-menu-toggle.active {
  border-color: rgba(14, 116, 255, 0.72);
  background: #3aa0ff;
}

.snap-menu-toggle.active > span {
  transform: translateX(17px);
  background: #0f172a;
}

html[data-theme="dark"] .snap-menu-popover {
  color: #e5eefb;
  background: rgba(15, 23, 42, 0.97);
  border-color: rgba(96, 165, 250, 0.34);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

html[data-theme="dark"] .snap-menu-master {
  color: #f8fafc;
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(96, 165, 250, 0.7) !important;
}

html[data-theme="dark"] .snap-menu-option:hover {
  background: rgba(96, 165, 250, 0.14);
}

html[data-theme="dark"] .snap-glyph {
  color: #cbd5e1;
}

html[data-theme="dark"] .snap-menu-toggle {
  border-color: rgba(203, 213, 225, 0.65);
  background: rgba(51, 65, 85, 0.88);
}

html[data-theme="dark"] .snap-menu-toggle.active {
  border-color: rgba(96, 165, 250, 0.82);
  background: #3aa0ff;
}

@media (max-width: 700px) {
  .snap-menu-popover {
    width: min(318px, calc(100vw - 16px));
    max-height: min(var(--snap-menu-fixed-max-height, calc(100vh - 88px)), 560px);
  }
}

.pipe-draft-inline-tools {
  display: grid;
  grid-template-columns: 1fr repeat(2, minmax(76px, auto));
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-solid) 64%, transparent);
}

.pipe-draft-inline-tools > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.pipe-draft-inline-tools .secondary-mini {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

@media (max-width: 700px) {
  .pipe-draft-inline-tools {
    grid-template-columns: 1fr;
  }

  .pipe-draft-inline-tools .secondary-mini {
    width: 100%;
  }
}

.pipe-draft-placement-tools {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pipe-draft-placement-tools > span,
.pipe-draft-placement-hint {
  grid-column: 1 / -1;
}

.pipe-draft-placement-tools .secondary-mini {
  min-width: 0;
  padding: 6px 8px;
  white-space: normal;
  line-height: 1.2;
}

.pipe-draft-placement-hint {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

/* App theme polish: softer glass surfaces, sharper pills, and calmer chrome. */
body::before {
  background: var(--theme-page-bg);
}

.topbar,
.modebar,
.bottombar {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(176, 196, 224, 0.34);
  box-shadow: 0 12px 30px rgba(31, 41, 55, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.left-rail,
.tool-palette,
.inspector,
.product-panel,
.pipe-panel,
.results-panel,
.project-settings-popover,
.brand-menu-popover,
.methodology-popover,
.history-popover,
.export-popover,
.product-library-popover,
.floor-plan-popover,
.snap-menu-popover,
.auto-pipe-panel,
.dimension-floating-menu,
.drawing-note-menu,
.room-draft-panel,
.dialog-card,
.modal-card,
.export-progress-overlay,
.selection-toolbar,
.floor-controls,
.floating-panel,
.popover-card {
  background: var(--theme-card-bg);
  border-color: var(--glass-border);
  border-radius: 18px;
  box-shadow: var(--theme-card-shadow);
}

.mode-tab,
.ghost-btn,
.ghost-icon,
.primary-btn,
.secondary-btn,
.danger-btn,
.primary-mini,
.secondary-mini,
.settings-mini-btn,
.export-action,
.micro-tools button,
.bottom-tools button,
.zoom-tools button,
.view-tools button,
.view-tools select,
.project-picker,
.brand-menu-button,
.level-pill,
.theme-toggle,
.panel-head button,
.auto-pipe-panel-toggle,
.auto-pipe-run-button,
.tool-button,
.tool-tile,
.chip,
.pill,
.tag,
.toggle-pill,
.segmented-control button,
.pipe-draft-inline-tools .secondary-mini {
  border-radius: var(--theme-pill-radius);
  border-color: rgba(176, 196, 224, 0.48);
  background: var(--button-glass);
  box-shadow: var(--theme-control-shadow);
}

.mode-tab:hover,
.ghost-btn:hover,
.ghost-icon:hover,
.secondary-btn:hover,
.secondary-mini:hover,
.settings-mini-btn:hover,
.export-action:hover,
.micro-tools button:hover,
.bottom-tools button:hover,
.zoom-tools button:hover,
.view-tools button:hover,
.brand-menu-button:hover,
.project-picker:hover,
.level-pill:hover,
.theme-toggle:hover,
.tool-button:hover,
.tool-tile:hover,
.auto-pipe-panel-toggle:hover {
  border-color: rgba(10, 124, 255, 0.32);
  background: var(--button-glass-hover);
  box-shadow: var(--control-hover-shadow);
}

.primary-btn,
.primary-mini,
.mode-tab.active,
.mode-tab[aria-pressed="true"],
.segmented-control button.active,
.segmented-control button[aria-pressed="true"],
.tool-button.active,
.tool-button[aria-pressed="true"],
.auto-pipe-run-button:not(:disabled) {
  color: #ffffff;
  border-color: rgba(10, 124, 255, 0.55);
  background: linear-gradient(135deg, #0b63ff 0%, #0a8cff 100%);
  box-shadow: 0 14px 30px rgba(10, 124, 255, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.primary-btn:hover,
.primary-mini:hover,
.mode-tab.active:hover,
.mode-tab[aria-pressed="true"]:hover,
.segmented-control button.active:hover,
.segmented-control button[aria-pressed="true"]:hover,
.tool-button.active:hover,
.tool-button[aria-pressed="true"]:hover,
.auto-pipe-run-button:not(:disabled):hover {
  background: linear-gradient(135deg, #0757e8 0%, #0677ee 100%);
  box-shadow: 0 16px 34px rgba(10, 124, 255, 0.27), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.danger-btn,
.danger-mini,
.delete-button {
  border-color: rgba(244, 63, 94, 0.24);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 241, 243, 0.76));
}

.field input,
.field select,
.field textarea,
.settings-field input,
.settings-field select,
.settings-field textarea,
.panel-field input,
.panel-field select,
.panel-field textarea,
.auto-pipe-service-select-shell,
.auto-pipe-service-select,
.product-search input,
.search-input,
.filter-input,
.inline-input,
.input,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="search"],
input[type="tel"],
select,
textarea {
  border-radius: 13px;
  border-color: rgba(176, 196, 224, 0.48);
  background: var(--input-glass);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 4px 12px rgba(31, 41, 55, 0.05);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.settings-field input:focus,
.settings-field select:focus,
.settings-field textarea:focus,
.panel-field input:focus,
.panel-field select:focus,
.panel-field textarea:focus,
.auto-pipe-service-select-shell:focus-within,
.product-search input:focus,
.search-input:focus,
.filter-input:focus,
.inline-input:focus,
.input:focus,
input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
  border-color: rgba(10, 124, 255, 0.58);
  box-shadow: 0 0 0 4px rgba(10, 124, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.92);
  outline: none;
}

.collapsible-section,
.result-card,
.product-result-card,
.product-selection-card,
.product-card,
.room-type-preset-card,
.settings-card,
.summary-card,
.metric-card,
.floor-plan-card,
.export-card,
.history-card,
.report-card,
.schedule-card,
.panel-card {
  border-color: rgba(176, 196, 224, 0.38);
  border-radius: 16px;
  background: var(--theme-card-bg);
  box-shadow: 0 10px 24px rgba(31, 41, 55, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.collapsible-section-head,
.panel-head,
.export-popover-head,
.history-popover-head,
.product-panel-title,
.section-header,
.settings-section-title,
.card-header {
  border-color: rgba(176, 196, 224, 0.38);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(239, 248, 255, 0.98), rgba(226, 240, 255, 0.78));
}

.panel-head,
.export-popover-head,
.history-popover-head {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.workspace.locked-floor-plan .product-panel:not(.closed-panel),
.workspace.locked-floor-plan .pipe-panel:not(.closed-panel) {
  border-radius: 20px;
  background: var(--theme-card-bg);
  box-shadow: 0 22px 54px rgba(31, 41, 55, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.workspace.locked-floor-plan .panel-head {
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(239, 248, 255, 0.98), rgba(226, 240, 255, 0.82));
}

.auto-pipe-panel {
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(244, 249, 255, 0.86));
}

.auto-pipe-panel.is-collapsed {
  border-radius: 18px;
}

.auto-pipe-service-select-shell {
  min-height: 44px;
  padding-inline: 12px;
}

.auto-pipe-panel-head strong,
.panel-head h2,
.panel-head h3,
.export-popover-head strong,
.history-popover-head strong,
.product-panel-title,
.section-header h2,
.section-header h3 {
  color: var(--text);
  letter-spacing: 0;
}

.muted,
.panel-head span,
.export-popover-head span,
.history-popover-head span,
.field label,
.settings-field label,
.panel-field label,
.plan-note,
.helper-text {
  color: var(--muted);
}

.export-action {
  min-height: 46px;
  justify-content: center;
}

.rail-toggle,
.rail-action,
.floor-row,
.layer-row,
.tool-btn,
.tool-palette-toggle,
.panel-reopen,
.history-action,
.topbar-profile-button,
.snap-menu-master,
.snap-menu-option {
  border-color: rgba(176, 196, 224, 0.42);
  border-radius: var(--theme-pill-radius);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(244, 249, 255, 0.82));
  box-shadow: var(--theme-control-shadow);
}

.floor-row,
.layer-row {
  border-radius: var(--theme-pill-radius);
}

.rail-toggle:hover,
.rail-action:hover,
.floor-row:hover,
.layer-row:hover,
.tool-btn:hover,
.tool-palette-toggle:hover,
.panel-reopen:hover,
.history-action:hover,
.topbar-profile-button:hover {
  border-color: rgba(10, 124, 255, 0.34);
  box-shadow: 0 10px 24px rgba(10, 124, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.92);
  transform: translateY(-1px);
}

.floor-row.active,
.tool-btn.active,
.history-action.active {
  border-color: rgba(10, 124, 255, 0.56);
  background: linear-gradient(145deg, rgba(10, 124, 255, 0.96), rgba(42, 151, 255, 0.86));
  color: #fff;
  box-shadow: 0 14px 30px rgba(10, 124, 255, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.floor-row.active *,
.tool-btn.active *,
.history-action.active * {
  color: inherit;
}

.snap-menu-popover {
  border-radius: 18px;
  overflow-x: hidden;
  overflow-y: auto;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.995), rgba(246, 250, 255, 0.975));
}

html[data-theme="dark"] .snap-menu-popover {
  background: linear-gradient(145deg, rgba(28, 29, 33, 0.995), rgba(13, 14, 16, 0.975));
}

.snap-menu-master,
.snap-menu-option {
  border-radius: 12px;
}

.pipe-draft-inline-tools {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

html[data-theme="dark"] {
  --theme-page-bg: radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.045), transparent 34%), radial-gradient(circle at 84% 14%, rgba(148, 148, 156, 0.035), transparent 32%), linear-gradient(180deg, #111214 0%, #0c0d0f 52%, #090a0c 100%);
  --theme-card-bg: linear-gradient(145deg, rgba(34, 35, 39, 0.94), rgba(15, 16, 18, 0.90));
  --theme-card-shadow: 0 20px 52px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --theme-control-shadow: 0 8px 20px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .topbar,
html[data-theme="dark"] .modebar,
html[data-theme="dark"] .bottombar,
html[data-theme="dark"] .left-rail,
html[data-theme="dark"] .tool-palette,
html[data-theme="dark"] .inspector,
html[data-theme="dark"] .product-panel,
html[data-theme="dark"] .pipe-panel,
html[data-theme="dark"] .results-panel,
html[data-theme="dark"] .project-settings-popover,
html[data-theme="dark"] .brand-menu-popover,
html[data-theme="dark"] .methodology-popover,
html[data-theme="dark"] .history-popover,
html[data-theme="dark"] .export-popover,
html[data-theme="dark"] .product-library-popover,
html[data-theme="dark"] .floor-plan-popover,
html[data-theme="dark"] .snap-menu-popover,
html[data-theme="dark"] .auto-pipe-panel,
html[data-theme="dark"] .dimension-floating-menu,
html[data-theme="dark"] .drawing-note-menu,
html[data-theme="dark"] .room-draft-panel {
  border-color: rgba(232, 234, 238, 0.18);
}

html[data-theme="dark"] .collapsible-section-head,
html[data-theme="dark"] .panel-head,
html[data-theme="dark"] .export-popover-head,
html[data-theme="dark"] .history-popover-head,
html[data-theme="dark"] .product-panel-title,
html[data-theme="dark"] .section-header,
html[data-theme="dark"] .settings-section-title,
html[data-theme="dark"] .card-header,
html[data-theme="dark"] .workspace.locked-floor-plan .panel-head {
  background: linear-gradient(180deg, rgba(43, 44, 49, 0.94), rgba(19, 20, 23, 0.88));
  border-color: rgba(232, 234, 238, 0.16);
}

/* Dark theme readability pass. Keep the softer app chrome, but avoid pale glass
   controls with white text on the drawing workspace. */
html[data-theme="dark"] {
  --glass-bg: rgba(18, 19, 22, 0.82);
  --glass-strong: rgba(12, 13, 15, 0.94);
  --glass-subtle: rgba(31, 32, 36, 0.76);
  --glass-border: rgba(232, 234, 238, 0.22);
  --line: rgba(234, 234, 236, 0.14);
  --line-strong: rgba(234, 234, 236, 0.26);
  --button-glass: linear-gradient(145deg, rgba(52, 53, 58, 0.96), rgba(22, 23, 26, 0.90));
  --button-glass-hover: linear-gradient(145deg, rgba(70, 71, 77, 0.98), rgba(31, 32, 36, 0.96));
  --input-glass: linear-gradient(145deg, rgba(45, 46, 51, 0.97), rgba(23, 24, 27, 0.92));
  --tile-glass: linear-gradient(145deg, rgba(38, 39, 43, 0.92), rgba(17, 18, 20, 0.86));
  --tile-glass-strong: linear-gradient(145deg, rgba(52, 53, 58, 0.95), rgba(20, 21, 24, 0.90));
  --theme-card-bg: linear-gradient(145deg, rgba(34, 35, 39, 0.97), rgba(15, 16, 18, 0.93));
  --theme-card-shadow: 0 20px 52px rgba(0, 0, 0, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --theme-control-shadow: 0 8px 20px rgba(0, 0, 0, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .topbar,
html[data-theme="dark"] .modebar,
html[data-theme="dark"] .bottombar {
  color: #f8fafc;
  background: linear-gradient(180deg, rgba(38, 39, 43, 0.96), rgba(15, 16, 18, 0.94));
  border-color: rgba(232, 234, 238, 0.18);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .left-rail,
html[data-theme="dark"] .tool-palette {
  color: #f8fafc;
  background: linear-gradient(180deg, rgba(25, 26, 29, 0.99), rgba(9, 10, 12, 0.98));
  border-color: rgba(232, 234, 238, 0.18);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .mode-tab,
html[data-theme="dark"] .ghost-btn,
html[data-theme="dark"] .ghost-icon,
html[data-theme="dark"] .secondary-btn,
html[data-theme="dark"] .secondary-mini,
html[data-theme="dark"] .settings-mini-btn,
html[data-theme="dark"] .micro-tools button,
html[data-theme="dark"] .bottom-tools button,
html[data-theme="dark"] .zoom-tools button,
html[data-theme="dark"] .view-tools button,
html[data-theme="dark"] .view-tools select,
html[data-theme="dark"] .project-picker,
html[data-theme="dark"] .brand-menu-button,
html[data-theme="dark"] .level-pill,
html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] .panel-head button,
html[data-theme="dark"] .auto-pipe-panel-toggle,
html[data-theme="dark"] .tool-button,
html[data-theme="dark"] .tool-tile,
html[data-theme="dark"] .chip,
html[data-theme="dark"] .pill,
html[data-theme="dark"] .tag,
html[data-theme="dark"] .toggle-pill,
html[data-theme="dark"] .segmented-control button,
html[data-theme="dark"] .pipe-draft-inline-tools .secondary-mini,
html[data-theme="dark"] .rail-toggle,
html[data-theme="dark"] .rail-action,
html[data-theme="dark"] .floor-row,
html[data-theme="dark"] .layer-row,
html[data-theme="dark"] .tool-btn,
html[data-theme="dark"] .tool-palette-toggle,
html[data-theme="dark"] .panel-reopen,
html[data-theme="dark"] .history-action,
html[data-theme="dark"] .topbar-profile-button,
html[data-theme="dark"] .snap-menu-master,
html[data-theme="dark"] .snap-menu-option {
  color: #f8fafc;
  border-color: rgba(234, 234, 236, 0.22);
  background: var(--button-glass);
  text-shadow: none;
  box-shadow: var(--theme-control-shadow);
}

html[data-theme="dark"] .mode-tab:not(.active):not([aria-pressed="true"]):hover,
html[data-theme="dark"] .ghost-btn:not(:disabled):hover,
html[data-theme="dark"] .ghost-icon:not(:disabled):hover,
html[data-theme="dark"] .secondary-btn:not(:disabled):hover,
html[data-theme="dark"] .secondary-mini:not(:disabled):hover,
html[data-theme="dark"] .settings-mini-btn:not(:disabled):hover,
html[data-theme="dark"] .micro-tools button:not(:disabled):hover,
html[data-theme="dark"] .bottom-tools button:not(.active):not(:disabled):hover,
html[data-theme="dark"] .zoom-tools button:not(:disabled):hover,
html[data-theme="dark"] .view-tools button:not(.active):not(:disabled):hover,
html[data-theme="dark"] .brand-menu-button:hover,
html[data-theme="dark"] .project-picker:hover,
html[data-theme="dark"] .level-pill:hover,
html[data-theme="dark"] .theme-toggle:hover,
html[data-theme="dark"] .tool-button:hover,
html[data-theme="dark"] .tool-tile:hover,
html[data-theme="dark"] .tool-btn:hover,
html[data-theme="dark"] .tool-palette-toggle:hover,
html[data-theme="dark"] .floor-row:hover,
html[data-theme="dark"] .layer-row:hover,
html[data-theme="dark"] .panel-reopen:hover,
html[data-theme="dark"] .topbar-profile-button:hover {
  color: #ffffff;
  border-color: rgba(232, 234, 238, 0.32);
  background: var(--button-glass-hover);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

html[data-theme="dark"] .mode-tab.active,
html[data-theme="dark"] .mode-tab[aria-pressed="true"],
html[data-theme="dark"] .ghost-btn.active,
html[data-theme="dark"] .ghost-icon.active,
html[data-theme="dark"] .floor-row.active,
html[data-theme="dark"] .tool-btn.active,
html[data-theme="dark"] .history-action.active {
  color: #ffffff;
  border-color: rgba(96, 165, 250, 0.68);
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.98), rgba(14, 165, 233, 0.90));
  box-shadow: 0 14px 30px rgba(10, 132, 255, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.20);
}

html[data-theme="dark"] .floor-row *,
html[data-theme="dark"] .layer-row *,
html[data-theme="dark"] .tool-btn *,
html[data-theme="dark"] .rail-toggle *,
html[data-theme="dark"] .rail-action *,
html[data-theme="dark"] .panel-reopen *,
html[data-theme="dark"] .topbar-profile-button *,
html[data-theme="dark"] .ghost-btn *,
html[data-theme="dark"] .ghost-icon *,
html[data-theme="dark"] .mode-tab * {
  color: inherit;
}

html[data-theme="dark"] .floor-row small,
html[data-theme="dark"] .topbar-profile-chevron,
html[data-theme="dark"] .muted,
html[data-theme="dark"] .panel-head span,
html[data-theme="dark"] .export-popover-head span,
html[data-theme="dark"] .history-popover-head span,
html[data-theme="dark"] .field label,
html[data-theme="dark"] .settings-field label,
html[data-theme="dark"] .panel-field label,
html[data-theme="dark"] .plan-note,
html[data-theme="dark"] .helper-text {
  color: #cbd5e1;
}

html[data-theme="dark"] .rail-section-title,
html[data-theme="dark"] .rail-section h3,
html[data-theme="dark"] .mini-wrap h3,
html[data-theme="dark"] .tool-group-title,
html[data-theme="dark"] .minimap-title,
html[data-theme="dark"] .panel-head h2,
html[data-theme="dark"] .panel-head h3,
html[data-theme="dark"] .export-popover-head strong,
html[data-theme="dark"] .history-popover-head strong,
html[data-theme="dark"] .product-panel-title,
html[data-theme="dark"] .section-header h2,
html[data-theme="dark"] .section-header h3 {
  color: #f8fafc;
}

html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .settings-field input,
html[data-theme="dark"] .settings-field select,
html[data-theme="dark"] .settings-field textarea,
html[data-theme="dark"] .panel-field input,
html[data-theme="dark"] .panel-field select,
html[data-theme="dark"] .panel-field textarea,
html[data-theme="dark"] .auto-pipe-service-select-shell,
html[data-theme="dark"] .auto-pipe-service-select,
html[data-theme="dark"] .product-search input,
html[data-theme="dark"] .search-input,
html[data-theme="dark"] .filter-input,
html[data-theme="dark"] .inline-input,
html[data-theme="dark"] .input,
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="search"],
html[data-theme="dark"] input[type="tel"],
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  color: #f8fafc;
  border-color: rgba(234, 234, 236, 0.24);
  background: var(--input-glass);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 4px 14px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .minimap,
html[data-theme="dark"] .collapsible-section,
html[data-theme="dark"] .result-card,
html[data-theme="dark"] .product-result-card,
html[data-theme="dark"] .product-selection-card,
html[data-theme="dark"] .product-card,
html[data-theme="dark"] .room-type-preset-card,
html[data-theme="dark"] .settings-card,
html[data-theme="dark"] .summary-card,
html[data-theme="dark"] .metric-card,
html[data-theme="dark"] .floor-plan-card,
html[data-theme="dark"] .export-card,
html[data-theme="dark"] .history-card,
html[data-theme="dark"] .report-card,
html[data-theme="dark"] .schedule-card,
html[data-theme="dark"] .panel-card {
  color: #f8fafc;
  border-color: rgba(234, 234, 236, 0.18);
  background: var(--theme-card-bg);
  box-shadow: var(--theme-card-shadow);
}

html[data-theme="dark"] .auto-pipe-panel,
html[data-theme="dark"] .pipe-draft-inline-tools {
  color: #f8fafc;
  background: var(--theme-card-bg);
}

html[data-theme="dark"] button:disabled,
html[data-theme="dark"] .mode-tab:disabled,
html[data-theme="dark"] .mode-tab.disabled,
html[data-theme="dark"] .ghost-btn:disabled,
html[data-theme="dark"] .ghost-icon:disabled,
html[data-theme="dark"] .tool-btn:disabled,
html[data-theme="dark"] .panel-reopen:disabled {
  color: #cbd5e1;
  opacity: 0.62;
}

/* Export panel header polish. The themed header background makes this read as a
   card, so it needs its own inset instead of relying on the popover padding. */
.export-popover > .export-popover-head {
  align-items: center;
  min-height: 74px;
  padding: 14px 18px;
  border: 1px solid rgba(176, 196, 224, 0.38);
  border-radius: 16px;
  box-sizing: border-box;
}

.export-popover > .export-popover-head > div {
  min-width: 0;
  padding-inline-end: 12px;
}

.export-popover > .export-popover-head strong,
.export-popover > .export-popover-head span {
  display: block;
  line-height: 1.22;
}

.export-popover > .export-popover-head span {
  margin-top: 6px;
}

.export-popover > .export-popover-head button {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 999px;
}

html[data-theme="dark"] .export-popover > .export-popover-head {
  border-color: rgba(232, 234, 238, 0.20);
  background: linear-gradient(180deg, rgba(43, 44, 49, 0.96), rgba(19, 20, 23, 0.92));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Dashboard dark-mode contrast rescue. Later global control polish can otherwise
   leave the dashboard status filters and chips using light-theme surfaces. */
html[data-theme="dark"] .dashboard-tile,
html[data-theme="dark"] .dashboard-company-entry-card,
html[data-theme="dark"] .dashboard-project-row {
  color: #f8fafc;
  border-color: rgba(232, 234, 238, 0.16);
  background: linear-gradient(145deg, rgba(31, 32, 36, 0.94), rgba(14, 15, 17, 0.78));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 14px 34px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .dashboard-project-stage-slider {
  border-color: rgba(232, 234, 238, 0.17);
  background: linear-gradient(145deg, rgba(26, 27, 30, 0.88), rgba(39, 40, 44, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 14px 28px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .dashboard-project-stage-track {
  border-color: rgba(232, 234, 238, 0.15);
  background: rgba(8, 9, 11, 0.56);
}

html[data-theme="dark"] .dashboard-project-stage-track button {
  color: rgba(226, 232, 240, 0.82);
  background: rgba(24, 25, 28, 0.48);
}

html[data-theme="dark"] .dashboard-project-stage-track button:hover {
  border-color: rgba(232, 234, 238, 0.26);
  background: rgba(48, 49, 54, 0.78);
  color: #f8fafc;
}

html[data-theme="dark"] .dashboard-project-stage-track button.active {
  border-color: rgba(125, 211, 252, 0.54);
  background: linear-gradient(135deg, #1687ff 0%, #6254f4 100%);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(14, 116, 255, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

html[data-theme="dark"] .dashboard-project-stage-track button em,
html[data-theme="dark"] .dashboard-team-activity-button .team-activity-notification,
html[data-theme="dark"] .dashboard-company-entry-meta span {
  border-color: rgba(203, 213, 225, 0.2);
  background: rgba(148, 163, 184, 0.16);
  color: #e2e8f0;
}

html[data-theme="dark"] .dashboard-project-stage-track button.active em {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

html[data-theme="dark"] .dashboard-project-stage-slider > small,
html[data-theme="dark"] .dashboard-project-row .dashboard-project-primary small,
html[data-theme="dark"] .dashboard-project-row .dashboard-project-owner > strong,
html[data-theme="dark"] .dashboard-company-entry-card small,
html[data-theme="dark"] .dashboard-tile p {
  color: rgba(203, 213, 225, 0.78);
}

html[data-theme="dark"] .dashboard-project-search,
html[data-theme="dark"] .dashboard-company-toggle {
  border-color: rgba(232, 234, 238, 0.18);
  background: rgba(22, 23, 26, 0.82);
  color: rgba(226, 232, 240, 0.84);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .dashboard-project-search input {
  color: #f8fafc;
}

html[data-theme="dark"] .dashboard-project-search input::placeholder {
  color: rgba(203, 213, 225, 0.68);
}

html[data-theme="dark"] .dashboard-company-toggle.disabled,
html[data-theme="dark"] .settings-mini-btn.disabled,
html[data-theme="dark"] button:disabled {
  color: rgba(226, 232, 240, 0.66);
  background: rgba(24, 25, 28, 0.52);
  border-color: rgba(232, 234, 238, 0.13);
  opacity: 0.74;
}

/* General UI quality pass: preserve the compact engineering workspace while
   improving hierarchy, keyboard clarity, text legibility and compositing cost. */
:where(button, a[href], input, select, textarea, [role="button"], [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: 2px solid color-mix(in srgb, var(--blue) 88%, white 12%);
  outline-offset: 2px;
}

.dashboard-workspace {
  background: var(--theme-page-bg);
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.dashboard-hero,
.dashboard-tile {
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface-solid) 90%, transparent);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.dashboard-tile {
  content-visibility: auto;
  contain: layout paint style;
  contain-intrinsic-size: auto 240px;
}

.dashboard-hero h1,
.dashboard-tile-head strong {
  line-height: 1.16;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

.dashboard-hero p,
.dashboard-tile p,
.dashboard-empty-state,
.dashboard-team-setup-note {
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
  text-wrap: pretty;
}

.dashboard-topbar-summary span,
.dashboard-project-row small,
.dashboard-account-row small,
.dashboard-company-entry-card small,
.dashboard-premium-plan small,
.dashboard-premium-addon-copy small,
.dashboard-project-stage-slider > small {
  font-size: 12px;
  font-weight: 680;
  line-height: 1.4;
}

.dashboard-hero span,
.dashboard-tile-head span,
.dashboard-summary-list dt {
  font-size: 11px;
  letter-spacing: 0.035em;
  line-height: 1.25;
}

.dashboard-project-search,
.dashboard-company-toggle,
.dashboard-project-search input,
.dashboard-project-stage-track button span,
.dashboard-project-row .dashboard-project-primary small,
.dashboard-project-row .dashboard-project-owner > strong {
  font-size: 12px;
  line-height: 1.3;
}

.dashboard-project-search,
.dashboard-company-toggle,
.dashboard-project-stage-track button,
.dashboard-project-row .dashboard-open-project-btn,
.dashboard-project-commissioning-btn {
  min-height: 38px;
}

.workspace :is(
  .tool-btn,
  .upload-card,
  .floor-setup-card,
  .minimap,
  .mini-zoom button,
  .tool-palette-toggle,
  .door-type-options,
  .heat-emitter-type-options,
  .outlet-type-options,
  .valve-type-options,
  .zone-node-type-options
) {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.tool-group-title,
.product-selection-eyebrow,
.layer-premium-badge,
.valve-type-category {
  font-size: 10.5px;
  letter-spacing: 0.035em;
  line-height: 1.25;
}

.floor-row small,
.floor-setup-card > small,
.mini-input-unit small,
.upload-card small,
.ufh-loop-card-head small,
.door-type-option small,
.outlet-type-option small,
.valve-type-option small {
  font-size: 11px;
  line-height: 1.35;
}

.product-selection-facts dt,
.ufh-loop-facts dt {
  font-size: 10px;
  line-height: 1.25;
}

.product-selection-facts dd,
.ufh-loop-facts dd,
.pipe-fitting-summary span {
  font-size: 11.5px;
  line-height: 1.3;
}

.pipe-fitting-table {
  font-size: 10px;
}

.pipe-fitting-table th {
  font-size: 9px;
  line-height: 1.2;
}

.pipe-fitting-table td strong,
.pipe-fitting-size-main {
  font-size: 10.5px !important;
  line-height: 1.2;
}

.pipe-fitting-table td span,
.pipe-fitting-size-meta,
.pipe-fitting-table td .fitting-count {
  font-size: 9.5px !important;
  line-height: 1.2;
}

/* System-aware route colours shared by Auto, Multi and riser workflows. */
.pipe-ventilation-supply .drawn-pipe-line,
.pipe-ventilation-supply .pipe-draft-line,
.pipe-draft-line.pipe-ventilation-supply,
.pipe-ventilation-supply .pipe-guide-axis,
.pipe-ventilation-supply .pipe-flow-direction,
.riser-node.pipe-ventilation-supply .riser-symbol,
.schematic-pipe-run.pipe-ventilation-supply .schematic-pipe-line,
.schematic-pipe-draft.pipe-ventilation-supply .schematic-pipe-draft-line {
  stroke: var(--ventilation-supply-line);
}

.pipe-ventilation-extract .drawn-pipe-line,
.pipe-ventilation-extract .pipe-draft-line,
.pipe-draft-line.pipe-ventilation-extract,
.pipe-ventilation-extract .pipe-guide-axis,
.pipe-ventilation-extract .pipe-flow-direction,
.riser-node.pipe-ventilation-extract .riser-symbol,
.schematic-pipe-run.pipe-ventilation-extract .schematic-pipe-line,
.schematic-pipe-draft.pipe-ventilation-extract .schematic-pipe-draft-line {
  stroke: var(--ventilation-extract-line);
}

.schematic-pipe-run.pipe-ventilation-supply {
  --schematic-pipe-active-glow: var(--ventilation-supply-glow);
}

.schematic-pipe-run.pipe-ventilation-extract {
  --schematic-pipe-active-glow: var(--ventilation-extract-glow);
}

.pipe-flow-direction.pipe-ventilation-supply {
  color: var(--ventilation-supply-flow);
}

.pipe-flow-direction.pipe-ventilation-extract {
  color: var(--ventilation-extract-flow);
}

.schematic-generated-label.pipe-ventilation-supply {
  color: var(--ventilation-supply-ink);
}

.schematic-generated-label.pipe-ventilation-extract {
  color: var(--ventilation-extract-ink);
}

.schematic-generated-label.pipe-ventilation-supply text {
  fill: var(--ventilation-supply-ink);
}

.schematic-generated-label.pipe-ventilation-extract text {
  fill: var(--ventilation-extract-ink);
}

.schematic-generated-label.pipe-ventilation-supply rect {
  fill: var(--ventilation-supply-soft);
  stroke: var(--ventilation-supply-border);
}

.schematic-generated-label.pipe-ventilation-extract rect {
  fill: var(--ventilation-extract-soft);
  stroke: var(--ventilation-extract-border);
}

.schematic-connection-point.pipe-ventilation-supply,
.schematic-pipe-snap-target.pipe-ventilation-supply circle {
  stroke: var(--ventilation-supply-line);
}

.schematic-connection-point.pipe-ventilation-extract,
.schematic-pipe-snap-target.pipe-ventilation-extract circle {
  stroke: var(--ventilation-extract-line);
}

.pipe-valve-node.pipe-ventilation-supply {
  --pipe-valve-color: var(--ventilation-supply-line);
}

.pipe-valve-node.pipe-ventilation-extract {
  --pipe-valve-color: var(--ventilation-extract-line);
}

.schematic-placement-zone.schematic-zone-system-ventilation.schematic-air-service-supply,
.schematic-placement-air-terminal.schematic-air-service-supply .schematic-device-symbol,
.schematic-placement-air-terminal.schematic-air-service-supply .schematic-symbol-inline {
  color: var(--ventilation-supply-line);
}

.schematic-placement-zone.schematic-zone-system-ventilation.schematic-air-service-extract,
.schematic-placement-air-terminal.schematic-air-service-extract .schematic-device-symbol,
.schematic-placement-air-terminal.schematic-air-service-extract .schematic-symbol-inline {
  color: var(--ventilation-extract-line);
}

.schematic-placement-air-terminal.schematic-air-service-supply > text:not(.muted) {
  fill: var(--ventilation-supply-ink);
}

.schematic-placement-air-terminal.schematic-air-service-extract > text:not(.muted) {
  fill: var(--ventilation-extract-ink);
}

.pipe-fire-sprinkler .drawn-pipe-line,
.pipe-fire-sprinkler .pipe-draft-line,
.pipe-draft-line.pipe-fire-sprinkler,
.pipe-fire-sprinkler .pipe-guide-axis,
.pipe-fire-sprinkler .pipe-flow-direction,
.riser-node.pipe-fire-sprinkler .riser-symbol,
.schematic-pipe-run.pipe-fire-sprinkler .schematic-pipe-line,
.schematic-pipe-draft.pipe-fire-sprinkler .schematic-pipe-draft-line {
  stroke: #dc2626;
}

.pipe-fire-hydrant .drawn-pipe-line,
.pipe-fire-hydrant .pipe-draft-line,
.pipe-draft-line.pipe-fire-hydrant,
.pipe-fire-hydrant .pipe-guide-axis,
.pipe-fire-hydrant .pipe-flow-direction,
.riser-node.pipe-fire-hydrant .riser-symbol,
.schematic-pipe-run.pipe-fire-hydrant .schematic-pipe-line,
.schematic-pipe-draft.pipe-fire-hydrant .schematic-pipe-draft-line {
  stroke: #7f1d1d;
}

.pipe-fire-hose-reel .drawn-pipe-line,
.pipe-fire-hose-reel .pipe-draft-line,
.pipe-draft-line.pipe-fire-hose-reel,
.pipe-fire-hose-reel .pipe-guide-axis,
.pipe-fire-hose-reel .pipe-flow-direction,
.riser-node.pipe-fire-hose-reel .riser-symbol,
.schematic-pipe-run.pipe-fire-hose-reel .schematic-pipe-line,
.schematic-pipe-draft.pipe-fire-hose-reel .schematic-pipe-draft-line {
  stroke: #f97316;
}

.schematic-pipe-run.pipe-fire-sprinkler {
  --schematic-pipe-active-glow: rgba(220, 38, 38, 0.82);
}

.schematic-pipe-run.pipe-fire-hydrant {
  --schematic-pipe-active-glow: rgba(127, 29, 29, 0.82);
}

.schematic-pipe-run.pipe-fire-hose-reel {
  --schematic-pipe-active-glow: rgba(249, 115, 22, 0.82);
}

.drawn-pipe-run.pipe-fire-sprinkler.active .drawn-pipe-line,
.drawn-pipe-run.pipe-fire-sprinkler .drawn-pipe-segment-line.active {
  filter: drop-shadow(0 0 6px rgba(220, 38, 38, 0.82)) drop-shadow(0 2px 5px rgba(15, 23, 42, 0.18));
}

.drawn-pipe-run.pipe-fire-hydrant.active .drawn-pipe-line,
.drawn-pipe-run.pipe-fire-hydrant .drawn-pipe-segment-line.active {
  filter: drop-shadow(0 0 6px rgba(127, 29, 29, 0.82)) drop-shadow(0 2px 5px rgba(15, 23, 42, 0.18));
}

.drawn-pipe-run.pipe-fire-hose-reel.active .drawn-pipe-line,
.drawn-pipe-run.pipe-fire-hose-reel .drawn-pipe-segment-line.active {
  filter: drop-shadow(0 0 6px rgba(249, 115, 22, 0.82)) drop-shadow(0 2px 5px rgba(15, 23, 42, 0.18));
}

.pipe-tee-fitting.pipe-fire-sprinkler circle,
.pipe-tee-fitting.pipe-fire-sprinkler path,
.pipe-junction-elbow.pipe-fire-sprinkler circle,
.pipe-reducer-fitting.pipe-fire-sprinkler circle,
.pipe-reducer-fitting.pipe-fire-sprinkler path {
  stroke: #dc2626;
}

.pipe-tee-fitting.pipe-fire-hydrant circle,
.pipe-tee-fitting.pipe-fire-hydrant path,
.pipe-junction-elbow.pipe-fire-hydrant circle,
.pipe-reducer-fitting.pipe-fire-hydrant circle,
.pipe-reducer-fitting.pipe-fire-hydrant path {
  stroke: #7f1d1d;
}

.pipe-tee-fitting.pipe-fire-hose-reel circle,
.pipe-tee-fitting.pipe-fire-hose-reel path,
.pipe-junction-elbow.pipe-fire-hose-reel circle,
.pipe-reducer-fitting.pipe-fire-hose-reel circle,
.pipe-reducer-fitting.pipe-fire-hose-reel path {
  stroke: #f97316;
}

.pipe-drainage-soil .drawn-pipe-line,
.pipe-drainage-soil .pipe-draft-line,
.pipe-draft-line.pipe-drainage-soil,
.pipe-drainage-soil .pipe-guide-axis,
.riser-node.pipe-drainage-soil .riser-symbol,
.schematic-pipe-run.pipe-drainage-soil .schematic-pipe-line,
.schematic-pipe-draft.pipe-drainage-soil .schematic-pipe-draft-line {
  stroke: #78350f;
}

.pipe-drainage-waste .drawn-pipe-line,
.pipe-drainage-waste .pipe-draft-line,
.pipe-draft-line.pipe-drainage-waste,
.pipe-drainage-waste .pipe-guide-axis,
.riser-node.pipe-drainage-waste .riser-symbol,
.schematic-pipe-run.pipe-drainage-waste .schematic-pipe-line,
.schematic-pipe-draft.pipe-drainage-waste .schematic-pipe-draft-line {
  stroke: #92400e;
}

.pipe-drainage-rainwater .drawn-pipe-line,
.pipe-drainage-rainwater .pipe-draft-line,
.pipe-draft-line.pipe-drainage-rainwater,
.pipe-drainage-rainwater .pipe-guide-axis,
.riser-node.pipe-drainage-rainwater .riser-symbol,
.schematic-pipe-run.pipe-drainage-rainwater .schematic-pipe-line,
.schematic-pipe-draft.pipe-drainage-rainwater .schematic-pipe-draft-line {
  stroke: #a16207;
}

.schematic-pipe-run.pipe-drainage-soil {
  --schematic-pipe-active-glow: rgba(120, 53, 15, 0.82);
}

.schematic-pipe-run.pipe-drainage-waste {
  --schematic-pipe-active-glow: rgba(146, 64, 14, 0.82);
}

.schematic-pipe-run.pipe-drainage-rainwater {
  --schematic-pipe-active-glow: rgba(161, 98, 7, 0.82);
}

.schematic-connection-point.pipe-drainage-soil,
.schematic-pipe-snap-target.pipe-drainage-soil circle {
  stroke: #78350f;
}

.schematic-connection-point.pipe-drainage-waste,
.schematic-pipe-snap-target.pipe-drainage-waste circle {
  stroke: #92400e;
}

.schematic-connection-point.pipe-drainage-rainwater,
.schematic-pipe-snap-target.pipe-drainage-rainwater circle {
  stroke: #a16207;
}

.pipe-flow-direction.pipe-drainage-soil {
  color: #78350f;
}

.pipe-flow-direction.pipe-drainage-waste {
  color: #92400e;
}

.pipe-flow-direction.pipe-drainage-rainwater {
  color: #a16207;
}

.drawn-pipe-run.pipe-drainage-soil.active .drawn-pipe-line,
.drawn-pipe-run.pipe-drainage-soil .drawn-pipe-segment-line.active {
  filter: drop-shadow(0 0 6px rgba(120, 53, 15, 0.82)) drop-shadow(0 2px 5px rgba(15, 23, 42, 0.18));
}

.drawn-pipe-run.pipe-drainage-waste.active .drawn-pipe-line,
.drawn-pipe-run.pipe-drainage-waste .drawn-pipe-segment-line.active {
  filter: drop-shadow(0 0 6px rgba(146, 64, 14, 0.82)) drop-shadow(0 2px 5px rgba(15, 23, 42, 0.18));
}

.drawn-pipe-run.pipe-drainage-rainwater.active .drawn-pipe-line,
.drawn-pipe-run.pipe-drainage-rainwater .drawn-pipe-segment-line.active {
  filter: drop-shadow(0 0 6px rgba(161, 98, 7, 0.82)) drop-shadow(0 2px 5px rgba(15, 23, 42, 0.18));
}

.pipe-tee-fitting.pipe-drainage-soil circle,
.pipe-tee-fitting.pipe-drainage-soil path,
.pipe-junction-elbow.pipe-drainage-soil circle,
.pipe-reducer-fitting.pipe-drainage-soil circle,
.pipe-reducer-fitting.pipe-drainage-soil path {
  stroke: #78350f;
}

.pipe-tee-fitting.pipe-drainage-waste circle,
.pipe-tee-fitting.pipe-drainage-waste path,
.pipe-junction-elbow.pipe-drainage-waste circle,
.pipe-reducer-fitting.pipe-drainage-waste circle,
.pipe-reducer-fitting.pipe-drainage-waste path {
  stroke: #92400e;
}

.pipe-tee-fitting.pipe-drainage-rainwater circle,
.pipe-tee-fitting.pipe-drainage-rainwater path,
.pipe-junction-elbow.pipe-drainage-rainwater circle,
.pipe-reducer-fitting.pipe-drainage-rainwater circle,
.pipe-reducer-fitting.pipe-drainage-rainwater path {
  stroke: #a16207;
}

.pipe-ventilation-supply .pipe-vertex,
.pipe-ventilation-supply .pipe-draft-point,
.pipe-ventilation-supply .pipe-guide-point,
.riser-node.pipe-ventilation-supply .riser-marker,
.pipe-service-chip.pipe-ventilation-supply {
  fill: var(--ventilation-supply-line);
  border-color: var(--ventilation-supply-border);
}

.pipe-ventilation-extract .pipe-vertex,
.pipe-ventilation-extract .pipe-draft-point,
.pipe-ventilation-extract .pipe-guide-point,
.riser-node.pipe-ventilation-extract .riser-marker,
.pipe-service-chip.pipe-ventilation-extract {
  fill: var(--ventilation-extract-line);
  border-color: var(--ventilation-extract-border);
}

.pipe-fire-sprinkler .pipe-vertex,
.pipe-fire-sprinkler .pipe-draft-point,
.pipe-fire-sprinkler .pipe-guide-point,
.riser-node.pipe-fire-sprinkler .riser-marker,
.pipe-service-chip.pipe-fire-sprinkler {
  fill: #dc2626;
  border-color: rgba(220, 38, 38, 0.48);
}

.pipe-fire-hydrant .pipe-vertex,
.pipe-fire-hydrant .pipe-draft-point,
.pipe-fire-hydrant .pipe-guide-point,
.riser-node.pipe-fire-hydrant .riser-marker,
.pipe-service-chip.pipe-fire-hydrant {
  fill: #7f1d1d;
  border-color: rgba(127, 29, 29, 0.48);
}

.pipe-fire-hose-reel .pipe-vertex,
.pipe-fire-hose-reel .pipe-draft-point,
.pipe-fire-hose-reel .pipe-guide-point,
.riser-node.pipe-fire-hose-reel .riser-marker,
.pipe-service-chip.pipe-fire-hose-reel {
  fill: #f97316;
  border-color: rgba(249, 115, 22, 0.48);
}

.pipe-drainage-soil .pipe-vertex,
.pipe-drainage-soil .pipe-draft-point,
.pipe-drainage-soil .pipe-guide-point,
.riser-node.pipe-drainage-soil .riser-marker,
.pipe-service-chip.pipe-drainage-soil {
  fill: #78350f;
  border-color: rgba(120, 53, 15, 0.52);
}

.pipe-drainage-waste .pipe-vertex,
.pipe-drainage-waste .pipe-draft-point,
.pipe-drainage-waste .pipe-guide-point,
.riser-node.pipe-drainage-waste .riser-marker,
.pipe-service-chip.pipe-drainage-waste {
  fill: #92400e;
  border-color: rgba(146, 64, 14, 0.52);
}

.pipe-drainage-rainwater .pipe-vertex,
.pipe-drainage-rainwater .pipe-draft-point,
.pipe-drainage-rainwater .pipe-guide-point,
.riser-node.pipe-drainage-rainwater .riser-marker,
.pipe-service-chip.pipe-drainage-rainwater {
  fill: #a16207;
  border-color: rgba(161, 98, 7, 0.52);
}

.pipe-service-chip.pipe-ventilation-supply,
.pipe-service-chip.pipe-ventilation-extract,
.pipe-service-chip.pipe-fire-sprinkler,
.pipe-service-chip.pipe-fire-hydrant,
.pipe-service-chip.pipe-fire-hose-reel,
.pipe-service-chip.pipe-drainage-soil,
.pipe-service-chip.pipe-drainage-waste,
.pipe-service-chip.pipe-drainage-rainwater {
  background: color-mix(in srgb, currentColor 10%, var(--surface-solid));
}

.pipe-service-chip.duct-supply {
  color: var(--ventilation-supply-ink);
  border-color: var(--ventilation-supply-border);
  background: var(--ventilation-supply-soft);
}

.pipe-service-chip.duct-extract {
  color: var(--ventilation-extract-ink);
  border-color: var(--ventilation-extract-border);
  background: var(--ventilation-extract-soft);
}

.plant-room-node.plant-room-system-ventilation {
  color: #0f766e;
}

.plant-room-node.plant-room-system-fire {
  color: #dc2626;
}

.plant-room-node.plant-room-system-drainage {
  color: #78350f;
}

.plant-room-node.plant-room-system-ventilation .plant-room-marker,
.plant-room-node.plant-room-system-fire .plant-room-marker,
.plant-room-node.plant-room-system-drainage .plant-room-marker {
  fill: color-mix(in srgb, currentColor 16%, white);
  stroke: currentColor;
}

.plant-room-node.plant-room-system-ventilation .plant-room-symbol,
.plant-room-node.plant-room-system-fire .plant-room-symbol,
.plant-room-node.plant-room-system-drainage .plant-room-symbol,
.plant-room-node.plant-room-system-ventilation text,
.plant-room-node.plant-room-system-fire text,
.plant-room-node.plant-room-system-drainage text {
  color: currentColor;
  fill: currentColor;
  stroke: currentColor;
}

@media (prefers-reduced-transparency: reduce) {
  :root {
    --glass-bg: var(--surface-solid);
    --glass-strong: var(--surface-solid);
    --glass-subtle: var(--surface-soft);
  }

  .topbar,
  .modebar,
  .bottombar,
  .left-rail,
  .tool-palette,
  .inspector,
  .product-panel,
  .pipe-panel,
  .results-panel {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: rgba(71, 85, 105, 0.34);
    --line-strong: rgba(51, 65, 85, 0.52);
    --muted: #475569;
  }

  html[data-theme="dark"] {
    --line: rgba(234, 234, 236, 0.34);
    --line-strong: rgba(246, 246, 248, 0.52);
    --muted: #d5dce6;
  }
}

/* Dashboard home: project-first hierarchy and compact, consistent tools. */
.dashboard-home {
  padding: 14px clamp(12px, 1.6vw, 24px) 28px;
}

.dashboard-home .dashboard-home-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  max-width: 1500px;
}

.dashboard-home .dashboard-tile {
  min-height: 0;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface-solid) 94%, transparent);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  contain: layout style;
  content-visibility: visible;
}

.dashboard-home .dashboard-projects-tile {
  grid-column: 1 / -1;
  grid-row: auto;
}

.dashboard-home .dashboard-project-adjacent-tiles {
  grid-column: span 7;
  gap: 14px;
}

.dashboard-home .dashboard-admin-tools-tile {
  grid-column: span 3;
  min-width: 0;
}

.dashboard-home .dashboard-project-adjacent-tiles .dashboard-company-entry-tile {
  min-height: 0;
}

.dashboard-home .dashboard-premium-tile {
  grid-column: span 5;
}

.dashboard-home .dashboard-workspace-tools-tile,
.dashboard-home .dashboard-quick-tools-tile,
.dashboard-home .dashboard-advert-tile,
.dashboard-home .dashboard-news-tile {
  grid-column: 1 / -1;
}

.dashboard-home .dashboard-tile-head {
  min-height: 34px;
}

.dashboard-home .dashboard-tile-head > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dashboard-home .dashboard-project-stage-slider {
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
}

.dashboard-home .dashboard-project-stage-track {
  gap: 6px;
  padding: 3px;
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface-soft) 78%, transparent);
}

.dashboard-home .dashboard-project-stage-track button {
  min-height: 42px;
  padding-inline: 12px;
}

.dashboard-home .dashboard-project-stage-track button span {
  overflow: visible;
  font-size: 12px;
  text-overflow: clip;
}

.dashboard-home .dashboard-project-stage-slider > small {
  display: flex;
  align-items: baseline;
  gap: 4px;
  padding-inline: 4px;
  font-size: 11px;
}

.dashboard-home .dashboard-project-stage-slider > small strong {
  color: var(--text);
  font-size: 12px;
}

.dashboard-home .dashboard-project-controls {
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 12px;
}

.dashboard-home .dashboard-project-search,
.dashboard-home .dashboard-company-toggle {
  min-height: 40px;
  background: color-mix(in srgb, var(--surface-soft) 76%, transparent);
}

.dashboard-home .dashboard-project-list {
  gap: 8px;
}

.dashboard-home .dashboard-project-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-height: 38px;
  padding: 2px 2px 0;
}

.dashboard-home .dashboard-project-pagination small {
  margin-right: auto;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 750;
}

.dashboard-home .dashboard-project-pagination button {
  min-width: 104px;
  min-height: 36px;
}

.dashboard-home .dashboard-project-row {
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 16px;
  min-height: 58px;
  padding: 10px 12px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-solid) 82%, var(--surface-soft) 18%);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.dashboard-home .dashboard-project-row:hover,
.dashboard-home .dashboard-project-row:focus-within {
  border-color: color-mix(in srgb, var(--blue) 34%, var(--line));
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.dashboard-home .dashboard-project-row .dashboard-project-primary {
  gap: 4px;
}

.dashboard-home .dashboard-project-row .dashboard-project-primary strong {
  font-size: 14px;
  font-weight: 850;
}

.dashboard-home .dashboard-project-row .dashboard-project-primary small {
  font-size: 11.5px;
}

.dashboard-home .dashboard-project-row .dashboard-project-actions {
  gap: 8px;
}

.dashboard-home .dashboard-project-row .dashboard-project-owner {
  max-width: 190px;
  padding-right: 9px;
  background: color-mix(in srgb, var(--blue) 6%, transparent);
}

.dashboard-home .dashboard-project-row .dashboard-project-owner-avatar {
  width: 28px;
  height: 28px;
}

.dashboard-home .dashboard-project-row .dashboard-open-project-btn {
  min-height: 36px;
  height: 36px;
  padding-inline: 14px;
  border-radius: 9px;
  font-size: 11.5px;
}

.dashboard-home .dashboard-project-more {
  min-width: 36px;
  min-height: 36px;
  border-radius: 9px;
}

.dashboard-home .dashboard-app-grid,
.dashboard-home .dashboard-role-app-grid,
.dashboard-home .dashboard-quick-tools-grid.collapsed,
.dashboard-home .dashboard-quick-tools-grid.expanded {
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 10px;
}

.dashboard-home .dashboard-app-tool {
  grid-template-columns: 44px minmax(0, 1fr);
  place-items: center stretch;
  gap: 10px;
  min-height: 60px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-soft) 76%, transparent);
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.dashboard-home .dashboard-app-tool-active:hover,
.dashboard-home .dashboard-app-tool-active:focus-visible {
  border-color: color-mix(in srgb, var(--blue) 38%, var(--line));
  background: color-mix(in srgb, var(--blue) 6%, var(--surface-solid));
  transform: translateY(-1px);
}

.dashboard-home .dashboard-app-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 8px 16px rgba(15, 23, 42, 0.12);
}

.dashboard-home .dashboard-app-icon svg {
  width: 22px;
  height: 22px;
}

.dashboard-home .dashboard-app-tool strong {
  min-width: 0;
  font-size: 12px;
  font-weight: 820;
  line-height: 1.25;
  text-align: left;
}

.dashboard-home .dashboard-app-tool-active:hover .dashboard-app-icon {
  transform: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58), 0 10px 20px rgba(0, 113, 227, 0.18);
}

.dashboard-home .dashboard-premium-addon-list {
  gap: 6px;
}

.dashboard-home .dashboard-premium-plan,
.dashboard-home .dashboard-premium-addon {
  padding: 9px 10px;
  border-radius: 10px;
}

.dashboard-home .dashboard-news-feed {
  gap: 12px;
}

@media (max-width: 1180px) {
  .dashboard-home .dashboard-home-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .dashboard-home .dashboard-admin-tools-tile {
    grid-column: auto;
  }

  .dashboard-home .dashboard-projects-tile,
  .dashboard-home .dashboard-project-adjacent-tiles,
  .dashboard-home .dashboard-premium-tile,
  .dashboard-home .dashboard-workspace-tools-tile,
  .dashboard-home .dashboard-quick-tools-tile,
  .dashboard-home .dashboard-advert-tile,
  .dashboard-home .dashboard-news-tile {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .dashboard-home {
    padding: 8px 8px 20px;
  }

  .dashboard-home .dashboard-home-grid,
  .dashboard-home .dashboard-project-adjacent-tiles {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .dashboard-home .dashboard-tile {
    padding: 12px;
    border-radius: 14px;
  }

  .dashboard-home .dashboard-tile-head,
  .dashboard-home .dashboard-project-controls {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .dashboard-home .dashboard-tile-head {
    flex-wrap: wrap;
  }

  .dashboard-home .dashboard-tile-actions {
    width: 100%;
    justify-content: space-between;
  }

  .dashboard-home .dashboard-project-stage-track {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .dashboard-home .dashboard-project-stage-track button {
    width: 100%;
  }

  .dashboard-home .dashboard-project-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .dashboard-home .dashboard-project-row .dashboard-project-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .dashboard-home .dashboard-project-row .dashboard-open-project-btn {
    margin-left: auto;
  }

  .dashboard-home .dashboard-project-row strong {
    display: -webkit-box;
    overflow: hidden;
    white-space: normal;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .dashboard-home .dashboard-project-row .dashboard-open-project-btn,
  .dashboard-home .dashboard-project-more,
  .dashboard-project-action-menu button {
    min-height: 44px;
  }

  .dashboard-home .dashboard-project-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-home .dashboard-project-pagination button {
    width: 100%;
  }

  .dashboard-home .dashboard-app-grid,
  .dashboard-home .dashboard-role-app-grid,
  .dashboard-home .dashboard-quick-tools-grid.collapsed,
  .dashboard-home .dashboard-quick-tools-grid.expanded {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Keep plant-room overlays and controls inside the available workspace. */
html[data-workspace="plant-room-planner"] .studio-shell,
html[data-workspace="plant-room-planner"] .workspace,
html[data-workspace="plant-room-planner"] .plant-room-planner-stage,
html[data-workspace="plant-room-planner"] .plant-room-planner-shell,
html[data-workspace="plant-room-planner"] .plant-room-planner-canvas {
  min-width: 0;
  max-width: 100%;
}

.plant-room-right-panels {
  max-width: calc(100% - 28px);
  overflow-x: hidden;
  overflow-y: auto;
}

.plant-room-side-panel,
.plant-room-side-panel > *,
.plant-room-results-side-panel,
.plant-room-noise-card,
.plant-room-supporting-noise-card,
.plant-room-noise-editor,
.plant-room-noise-placement-tools,
.plant-room-noise-objects,
.plant-room-noise-tool-grid,
.plant-room-noise-tool-grid > *,
.plant-room-noise-barrier-default {
  min-width: 0;
  max-width: 100%;
}

.plant-room-noise-barrier-default select {
  width: 100%;
  max-width: 100%;
}

.plant-room-planner-canvas.has-right-panel {
  --plant-room-right-panel-reserve: 340px;
}

.plant-room-planner-canvas.has-right-panel .plant-room-3d-display-controls {
  right: var(--plant-room-right-panel-reserve);
  width: min(350px, calc(100% - var(--plant-room-right-panel-reserve) - 14px));
  max-width: calc(100% - var(--plant-room-right-panel-reserve) - 14px);
  background: var(--surface-solid);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.plant-room-planner-canvas.has-right-panel .plant-room-planner-3d-hud {
  right: var(--plant-room-right-panel-reserve);
  flex-wrap: wrap;
}

.plant-room-planner-bottombar {
  box-sizing: border-box;
  gap: clamp(8px, 1.2vw, 20px);
  justify-content: flex-start;
  min-width: 0;
  overflow: hidden;
  padding-inline: 10px;
}

.plant-room-planner-bottombar > *,
.plant-room-planner-bottombar .bottom-tools,
.plant-room-planner-bottombar .zoom-tools,
.plant-room-planner-bottombar .view-tools {
  min-width: 0;
}

.plant-room-planner-bottombar .bottom-tools,
.plant-room-planner-bottombar .zoom-tools {
  flex: 0 0 auto;
}

.plant-room-planner-bottombar .view-tools {
  flex: 1 1 0;
  justify-content: flex-start;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}

.plant-room-planner-bottombar .view-tools::-webkit-scrollbar {
  display: none;
}

@media (max-width: 1440px) and (min-width: 821px) {
  html[data-workspace="plant-room-planner"] .studio-shell {
    grid-template-rows: minmax(58px, max-content) 62px minmax(0, 1fr) 96px;
  }

  .plant-room-planner-bottombar {
    align-content: center;
    display: grid;
    gap: 4px 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 40px 40px;
    padding-block: 6px;
  }

  .plant-room-planner-bottombar .bottom-tools {
    grid-column: 1;
    grid-row: 1;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .plant-room-planner-bottombar .bottom-tools::-webkit-scrollbar {
    display: none;
  }

  .plant-room-planner-bottombar .zoom-tools {
    grid-column: 2;
    grid-row: 1;
  }

  .plant-room-planner-bottombar .view-tools {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
  }
}

@media (max-width: 820px) {
  .plant-room-planner-canvas.has-right-panel {
    --plant-room-right-panel-reserve: 10px;
  }

  .plant-room-planner-canvas.has-right-panel .plant-room-right-panels {
    bottom: 220px;
    max-height: calc(100% - 282px);
    right: 10px;
    width: min(360px, calc(100% - 20px));
  }

  .plant-room-planner-canvas.has-right-panel .plant-room-3d-display-controls {
    bottom: 10px;
    left: 10px;
    right: 10px;
    width: auto;
    max-width: none;
  }

  .plant-room-planner-canvas.has-right-panel .plant-room-planner-3d-hud {
    display: none;
  }

  .plant-room-noise-tool-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Match the compact plant-room Earth shortcut to the premium 3D view switch. */
.plant-room-planner-bottombar .view-tools .plant-room-google-earth-toggle {
  box-sizing: border-box;
  min-width: 154px;
  height: 34px;
  gap: 6px;
  padding: 0 9px;
  border-color: rgba(10, 124, 255, 0.32);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.98), rgba(219, 234, 254, 0.88));
  color: #0759b5;
  box-shadow: 0 7px 18px rgba(10, 124, 255, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.plant-room-planner-bottombar .view-tools .plant-room-google-earth-toggle:hover,
.plant-room-planner-bottombar .view-tools .plant-room-google-earth-toggle.active,
.plant-room-planner-bottombar .view-tools .plant-room-google-earth-toggle.active:hover {
  border-color: rgba(10, 98, 204, 0.5);
  background: linear-gradient(180deg, rgba(219, 234, 254, 1), rgba(191, 219, 254, 0.92));
  color: #0057b8;
  box-shadow: 0 9px 22px rgba(10, 124, 255, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.plant-room-google-earth-toggle .google-earth-logo-frame {
  position: relative;
  display: inline-block;
  flex: 0 0 78px;
  width: 78px;
  max-width: 78px;
  height: 18px;
  margin: 0;
  overflow: hidden;
  line-height: 0;
}

.plant-room-google-earth-toggle .google-earth-logo-frame img {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 78px;
  max-width: none;
  height: 78px;
  object-fit: contain;
  transform: translate(-50%, -50%);
}

.plant-room-google-earth-toggle .three-view-premium-badge {
  display: inline-flex;
  align-items: center;
  min-height: 15px;
  margin-left: 0;
  padding: 1px 5px;
  border: 1px solid rgba(10, 124, 255, 0.2);
  border-radius: 999px;
  background: rgba(10, 124, 255, 0.12);
  color: #0759b5;
  font-size: 7.5px;
  font-weight: 900;
  letter-spacing: 0.035em;
  line-height: 1;
  text-transform: uppercase;
}

html[data-theme="dark"] .plant-room-planner-bottombar .view-tools .plant-room-google-earth-toggle {
  border-color: rgba(96, 165, 250, 0.48);
  background: linear-gradient(180deg, rgba(30, 64, 175, 0.42), rgba(30, 41, 59, 0.88));
  color: #bfdbfe;
  box-shadow: 0 9px 22px rgba(2, 6, 23, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .plant-room-google-earth-toggle .three-view-premium-badge {
  border-color: rgba(96, 165, 250, 0.3);
  background: rgba(10, 132, 255, 0.22);
  color: #bfdbfe;
}

/* Dashboard company workspace: a single reliable scroll surface and a
   sectioned profile editor that remains usable at laptop and mobile sizes. */
.dashboard-analytics-workspace.dashboard-company-workspace {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  height: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 0%, rgba(37, 99, 235, 0.09), transparent 28%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(239, 244, 249, 0.94));
}

.dashboard-company-workspace > .dashboard-product-library-header {
  z-index: 4;
  width: min(1280px, calc(100% - 32px));
  max-width: none;
  min-width: 0;
  margin: 0 auto;
  padding: 18px 2px 8px;
  box-sizing: border-box;
}

.dashboard-company-workspace > .dashboard-product-library-header > div:first-child {
  min-width: 0;
}

.dashboard-company-workspace > .dashboard-product-library-header h1 {
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.dashboard-company-workspace > .dashboard-product-library-header p {
  max-width: 700px;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.dashboard-company-header-progress,
.dashboard-company-permission-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--blue) 24%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--blue) 8%, var(--surface-solid));
  color: color-mix(in srgb, var(--blue) 80%, var(--text));
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.dashboard-company-workspace-layout {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  width: min(1280px, calc(100% - 32px));
  height: 100%;
  min-height: 0;
  max-height: 100%;
  margin: 0 auto;
  padding: 0 2px 32px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scroll-padding-block: 12px 86px;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--blue) 36%, transparent) transparent;
  box-sizing: border-box;
}

.dashboard-company-workspace-layout::-webkit-scrollbar {
  width: 9px;
}

.dashboard-company-workspace-layout::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: color-mix(in srgb, var(--blue) 34%, transparent);
  background-clip: padding-box;
}

.dashboard-company-profile-workspace-card {
  display: grid;
  gap: 16px;
  min-height: max-content;
  padding: 18px;
  overflow: visible;
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface-solid) 96%, transparent);
  content-visibility: visible;
  contain: none;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.09);
}

.dashboard-company-workspace-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 0 2px;
}

.dashboard-company-workspace-card-head > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.dashboard-company-workspace-card-head > div > span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dashboard-company-workspace-card-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 950;
  line-height: 1.1;
  letter-spacing: -0.018em;
}

.dashboard-company-workspace-card-head p {
  max-width: 680px;
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.dashboard-company-permission-pill.editable {
  border-color: rgba(34, 197, 94, 0.28);
  background: rgba(34, 197, 94, 0.09);
  color: #16803c;
}

.dashboard-company-permission-pill.read-only {
  border-color: rgba(100, 116, 139, 0.24);
  background: rgba(100, 116, 139, 0.09);
  color: var(--muted);
}

.dashboard-company-setup-form.dashboard-company-workspace-form {
  display: grid;
  grid-template-columns: minmax(224px, 260px) minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.dashboard-company-profile-rail {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface-solid) 96%, var(--surface-soft) 4%);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.dashboard-company-profile-rail .dashboard-company-identity {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
}

.dashboard-company-profile-rail .dashboard-company-header-preview {
  min-height: 148px;
  align-content: end;
  padding: 12px;
}

.dashboard-company-profile-rail .dashboard-company-logo-preview {
  width: 54px;
  height: 54px;
}

.dashboard-company-profile-rail .dashboard-company-file-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.dashboard-company-profile-rail .dashboard-company-file-actions .settings-mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 34px;
  padding: 0 7px;
  text-align: center;
}

.dashboard-company-completion {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--blue) 16%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--blue) 5%, var(--surface-soft));
}

.dashboard-company-completion > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dashboard-company-completion strong,
.dashboard-company-completion > div > span {
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
}

.dashboard-company-completion > div > span {
  color: var(--blue);
}

.dashboard-company-completion-track {
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 70%, transparent);
}

.dashboard-company-completion-track i {
  display: block;
  width: var(--company-completion, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0a84ff, #6366f1);
}

.dashboard-company-completion small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
}

.dashboard-company-section-nav {
  display: grid;
  gap: 4px;
}

.dashboard-company-section-nav button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-align: left;
}

.dashboard-company-section-nav button:hover,
.dashboard-company-section-nav button:focus-visible {
  border-color: color-mix(in srgb, var(--blue) 22%, var(--line));
  background: color-mix(in srgb, var(--blue) 7%, var(--surface-soft));
  color: var(--text);
}

.dashboard-company-section-nav button span {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--blue) 9%, var(--surface-solid));
  color: var(--blue);
  font-size: 9px;
  font-weight: 950;
}

.dashboard-company-form-content {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.dashboard-company-form-section {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface-solid) 94%, transparent);
  scroll-margin-top: 12px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.dashboard-company-form-section-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.dashboard-company-form-section-head > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--blue) 10%, var(--surface-soft));
  color: var(--blue);
  font-size: 10px;
  font-weight: 950;
}

.dashboard-company-form-section-head > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.dashboard-company-form-section-head strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
  line-height: 1.2;
}

.dashboard-company-form-section-head small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
}

.dashboard-company-workspace .dashboard-company-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-company-workspace .dashboard-company-fields label.wide,
.dashboard-company-workspace .dashboard-company-bio {
  grid-column: 1 / -1;
}

.dashboard-company-workspace :is(.dashboard-company-fields, .dashboard-company-contact-card) label {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.dashboard-company-workspace :is(.dashboard-company-fields, .dashboard-company-contact-card) label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.035em;
  line-height: 1.15;
  text-transform: uppercase;
}

.dashboard-company-workspace :is(.dashboard-company-fields, .dashboard-company-contact-card) :is(input, textarea) {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--input-glass);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 760;
  box-sizing: border-box;
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.dashboard-company-workspace :is(.dashboard-company-fields, .dashboard-company-contact-card) input {
  min-height: 38px;
  padding: 0 11px;
}

.dashboard-company-workspace :is(.dashboard-company-fields, .dashboard-company-contact-card) textarea {
  min-height: 92px;
  padding: 10px 11px;
  line-height: 1.45;
  resize: vertical;
}

.dashboard-company-workspace :is(.dashboard-company-fields, .dashboard-company-contact-card) :is(input, textarea):focus {
  border-color: color-mix(in srgb, var(--blue) 56%, var(--line));
  background: var(--surface-solid);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 12%, transparent);
  outline: 0;
}

.dashboard-company-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.dashboard-company-contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-soft) 72%, transparent);
}

.dashboard-company-contact-card legend {
  padding: 0 5px;
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
}

/* Keep contact controls readable when this editor is reused outside the full
   Company workspace shell. These direct rules intentionally do not depend on
   a parent route class, so legacy/global inline-label styles cannot squeeze
   the fields down to their placeholder width. */
.dashboard-company-contact-card > label {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  gap: 5px;
}

.dashboard-company-contact-card > label > span {
  display: block;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.035em;
  line-height: 1.15;
  text-transform: uppercase;
}

.dashboard-company-contact-card > label > input {
  display: block;
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--input-glass);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 760;
  box-sizing: border-box;
}

.dashboard-company-workspace .dashboard-company-work-controls,
.dashboard-company-workspace .dashboard-company-quote-controls {
  grid-column: auto;
  width: 100%;
  box-sizing: border-box;
}

.dashboard-company-workspace .dashboard-company-work-controls {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0;
  border: 0;
  background: transparent;
}

.dashboard-company-workspace .dashboard-company-work-group {
  padding: 10px;
}

.dashboard-company-workspace .dashboard-company-quote-controls {
  padding: 0;
  border: 0;
  background: transparent;
}

.dashboard-company-workspace .dashboard-company-quote-map {
  min-height: 240px;
}

.dashboard-company-sticky-save {
  position: sticky;
  bottom: 8px;
  z-index: 3;
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--blue) 22%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-solid) 96%, transparent);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.16);
}

.dashboard-company-sticky-save > span {
  display: grid;
  gap: 2px;
  min-width: 0;
  overflow: visible;
  white-space: normal;
}

.dashboard-company-sticky-save > span strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 950;
}

.dashboard-company-sticky-save .primary-mini {
  min-height: 38px;
  padding-inline: 16px;
}

html[data-theme="dark"] .dashboard-analytics-workspace.dashboard-company-workspace {
  background:
    radial-gradient(circle at 8% 0%, rgba(59, 130, 246, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(8, 15, 29, 0.98), rgba(15, 23, 42, 0.96));
}

html[data-theme="dark"] :is(
  .dashboard-company-profile-workspace-card,
  .dashboard-company-profile-rail,
  .dashboard-company-form-section,
  .dashboard-company-sticky-save
) {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.9);
}

html[data-theme="dark"] .dashboard-company-contact-card,
html[data-theme="dark"] .dashboard-company-completion,
html[data-theme="dark"] .dashboard-company-workspace .dashboard-company-work-group {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(30, 41, 59, 0.58);
}

html[data-theme="dark"] .dashboard-company-permission-pill.editable {
  border-color: rgba(74, 222, 128, 0.3);
  background: rgba(34, 197, 94, 0.13);
  color: #86efac;
}

@media (max-width: 1180px) {
  .dashboard-company-workspace > .dashboard-product-library-header,
  .dashboard-company-workspace-layout {
    width: min(1040px, calc(100% - 24px));
  }

  .dashboard-company-setup-form.dashboard-company-workspace-form {
    grid-template-columns: minmax(208px, 232px) minmax(0, 1fr);
  }

  .dashboard-company-workspace .dashboard-company-work-controls,
  .dashboard-company-workspace .dashboard-company-quote-controls,
  .dashboard-company-workspace .dashboard-company-bio {
    grid-column: auto;
  }

  .dashboard-company-workspace .dashboard-company-fields label.wide,
  .dashboard-company-workspace .dashboard-company-bio {
    grid-column: 1 / -1;
  }

  .dashboard-company-workspace .dashboard-company-work-trades {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .dashboard-company-setup-form.dashboard-company-workspace-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-company-profile-rail {
    position: static;
  }

  .dashboard-company-profile-rail .dashboard-company-identity {
    grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.1fr);
  }

  .dashboard-company-profile-rail .dashboard-company-header-preview {
    grid-row: span 2;
  }

  .dashboard-company-section-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .dashboard-company-section-nav button {
    grid-template-columns: 26px minmax(0, 1fr);
    padding-inline: 6px;
  }
}

@media (max-width: 700px) {
  .dashboard-company-workspace > .dashboard-product-library-header {
    align-items: flex-start;
    padding-top: 12px;
  }

  .dashboard-company-workspace > .dashboard-product-library-header p {
    display: none;
  }

  .dashboard-company-workspace > .dashboard-product-library-header-actions {
    align-items: flex-end;
    flex-direction: column-reverse;
    gap: 5px;
  }

  .dashboard-company-header-progress {
    min-height: 24px;
    padding-inline: 8px;
    font-size: 9px;
  }

  .dashboard-company-profile-workspace-card {
    padding: 12px;
  }

  .dashboard-company-workspace-card-head {
    align-items: flex-start;
  }

  .dashboard-company-profile-rail .dashboard-company-identity,
  .dashboard-company-workspace .dashboard-company-fields,
  .dashboard-company-contact-grid,
  .dashboard-company-workspace .dashboard-company-work-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-company-profile-rail .dashboard-company-header-preview {
    grid-row: auto;
  }

  .dashboard-company-section-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-company-workspace .dashboard-company-fields label,
  .dashboard-company-workspace .dashboard-company-fields label.wide,
  .dashboard-company-workspace .dashboard-company-bio {
    grid-column: auto;
  }

  .dashboard-company-workspace .dashboard-company-quote-settings {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-company-workspace .dashboard-company-quote-map {
    min-height: 220px;
    aspect-ratio: 4 / 3;
  }

  .dashboard-company-sticky-save {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-company-sticky-save .primary-mini {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .dashboard-company-workspace > .dashboard-product-library-header,
  .dashboard-company-workspace-layout {
    width: calc(100% - 16px);
  }

  .dashboard-company-workspace > .dashboard-product-library-header h1 {
    font-size: 22px;
  }

  .dashboard-company-workspace > .dashboard-product-library-header .dashboard-product-library-dashboard-btn {
    min-height: 36px;
    padding-inline: 10px;
  }

  .dashboard-company-workspace-card-head {
    display: grid;
  }

  .dashboard-company-permission-pill {
    justify-self: start;
  }

  .dashboard-company-section-nav {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-company-form-section {
    padding: 12px;
  }
}

/* Company editor interaction states. */
.dashboard-company-section-nav button[aria-current="location"] {
  border-color: color-mix(in srgb, var(--blue) 34%, var(--line));
  background: color-mix(in srgb, var(--blue) 11%, var(--surface-soft));
  color: var(--text);
}

.dashboard-company-work-trades input:disabled + span {
  color: var(--muted);
  opacity: 0.58;
}

.dashboard-company-quote-toggle > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.dashboard-company-quote-toggle b {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.dashboard-company-quote-toggle small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
  line-height: 1.25;
}

.dashboard-company-quote-disabled {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 92px;
  padding: 14px;
  border: 1px dashed color-mix(in srgb, var(--blue) 24%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--blue) 4%, var(--surface-soft));
}

.dashboard-company-quote-disabled > span {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: color-mix(in srgb, var(--blue) 10%, var(--surface-solid));
  color: var(--blue);
}

.dashboard-company-quote-disabled svg {
  width: 20px;
  height: 20px;
}

.dashboard-company-quote-disabled > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.dashboard-company-quote-disabled b {
  color: var(--text);
  font-size: 12px;
  font-weight: 920;
}

.dashboard-company-quote-disabled small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
  line-height: 1.35;
}

.dashboard-company-sticky-save .dashboard-company-save-summary {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  overflow: visible;
  color: var(--text);
  white-space: normal;
}

.dashboard-company-save-summary > i {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

.dashboard-company-sticky-save[data-save-key="dirty"] .dashboard-company-save-summary > i {
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.dashboard-company-sticky-save[data-save-key="saving"] .dashboard-company-save-summary > i {
  background: var(--blue);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 14%, transparent);
  animation: company-save-pulse 900ms ease-in-out infinite alternate;
}

.dashboard-company-sticky-save[data-save-key="error"] .dashboard-company-save-summary > i {
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.13);
}

.dashboard-company-save-summary > span {
  display: grid;
  gap: 2px;
  min-width: 0;
  overflow: visible;
  white-space: normal;
}

.dashboard-company-save-summary small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-company-save-state {
  overflow: visible;
  color: var(--text);
  font-size: 11px;
  font-weight: 950;
  line-height: 1.25;
  text-overflow: clip;
  white-space: normal;
}

.dashboard-company-save-state.dirty { color: #a16207; }
.dashboard-company-save-state.error { color: #dc2626; }

.dashboard-company-save-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.dashboard-company-save-actions [hidden] {
  display: none !important;
}

.dashboard-company-save-actions [data-company-save]:disabled,
.dashboard-company-save-actions [data-dashboard-team-save]:disabled {
  border-color: color-mix(in srgb, var(--line) 86%, transparent);
  background: color-mix(in srgb, var(--muted) 14%, var(--surface-soft));
  color: color-mix(in srgb, var(--muted) 78%, var(--text));
  opacity: 1;
  cursor: not-allowed;
  box-shadow: none;
}

@keyframes company-save-pulse {
  from { opacity: 0.45; transform: scale(0.86); }
  to { opacity: 1; transform: scale(1); }
}

.dashboard-company-discard-overlay,
.dashboard-project-team-discard-overlay {
  position: fixed;
  inset: 0;
  z-index: 420;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(5px);
}

.dashboard-company-discard-prompt {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  width: min(430px, 100%);
  padding: 18px;
  border: 1px solid color-mix(in srgb, #f59e0b 32%, var(--line));
  border-radius: 18px;
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
}

.dashboard-company-discard-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.13);
  color: #b45309;
  font-size: 18px;
  font-weight: 950;
}

.dashboard-company-discard-prompt > div:not(.dashboard-company-discard-actions) {
  display: grid;
  align-content: center;
  gap: 4px;
}

.dashboard-company-discard-prompt strong {
  font-size: 15px;
  font-weight: 950;
}

.dashboard-company-discard-prompt p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  line-height: 1.4;
}

.dashboard-company-discard-actions {
  display: flex;
  grid-column: 1 / -1;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}

html[data-theme="dark"] .dashboard-company-save-state.dirty { color: #fbbf24; }
html[data-theme="dark"] .dashboard-company-save-state.error { color: #fca5a5; }
html[data-theme="dark"] .dashboard-company-discard-prompt { background: #111827; }

@media (max-width: 700px) {
  .dashboard-company-save-actions {
    width: 100%;
  }

  .dashboard-company-save-actions > button {
    flex: 1 1 0;
  }

  .dashboard-company-save-summary small {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-company-sticky-save[data-save-key="saving"] .dashboard-company-save-summary > i {
    animation: none;
  }
}

/* Project Team uses the same editor architecture as Company Profile while
   keeping team-specific roster, qualification and programme controls. */
.dashboard-project-team-card {
  display: grid;
  gap: 16px;
  min-height: max-content;
  overflow: visible;
  content-visibility: visible;
  contain: none;
}

.dashboard-project-team-editor {
  min-width: 0;
}

.dashboard-project-team-overview {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--blue) 16%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--blue) 5%, var(--surface-soft));
}

.dashboard-project-team-overview-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--blue) 88%, #fff), #6366f1);
  color: #fff;
  box-shadow: 0 10px 22px color-mix(in srgb, var(--blue) 22%, transparent);
}

.dashboard-project-team-overview-icon svg {
  width: 21px;
  height: 21px;
}

.dashboard-project-team-overview > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.dashboard-project-team-overview strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 950;
  line-height: 1.2;
}

.dashboard-project-team-overview small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
  line-height: 1.35;
}

.dashboard-project-team-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.dashboard-project-team-metrics span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-soft) 76%, transparent);
  color: var(--muted);
  font-size: 9px;
  font-weight: 820;
  line-height: 1.2;
}

.dashboard-project-team-metrics b {
  color: var(--text);
  font-size: 15px;
  font-weight: 950;
}

.dashboard-project-team-import {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 36px;
}

.dashboard-project-team-import svg {
  width: 15px;
  height: 15px;
}

.dashboard-project-team-member-switcher {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding-top: 3px;
  border-top: 1px solid var(--line);
}

.dashboard-project-team-member-switcher > strong {
  padding: 7px 3px 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dashboard-project-team-member-switcher > button {
  --programme-trade: var(--blue);
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 42px;
  padding: 5px 7px 5px 6px;
  border: 1px solid transparent;
  border-left: 3px solid var(--programme-trade);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.dashboard-project-team-member-switcher > button.trade-mechanical { --programme-trade: #ef4444; }
.dashboard-project-team-member-switcher > button.trade-electrical { --programme-trade: #7e22ce; }
.dashboard-project-team-member-switcher > button.trade-control { --programme-trade: #2563eb; }

.dashboard-project-team-member-switcher > button:hover,
.dashboard-project-team-member-switcher > button:focus-visible,
.dashboard-project-team-member-switcher > button.active {
  border-color: color-mix(in srgb, var(--programme-trade) 34%, var(--line));
  background: color-mix(in srgb, var(--programme-trade) 8%, var(--surface-soft));
  outline: 0;
}

.dashboard-project-team-member-switcher .company-member-avatar {
  width: 30px;
  height: 30px;
}

.dashboard-project-team-member-switcher button > span:last-child {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.dashboard-project-team-member-switcher button b,
.dashboard-project-team-member-switcher button small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-project-team-member-switcher button b {
  font-size: 10px;
  font-weight: 920;
}

.dashboard-project-team-member-switcher button small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

.dashboard-project-team-content {
  min-width: 0;
}

.dashboard-project-team-section-head {
  grid-template-columns: 34px minmax(0, 1fr) auto;
}

.dashboard-project-team-workspace .dashboard-team-add-form {
  grid-template-columns: minmax(130px, 1fr) minmax(170px, 1.15fr) minmax(120px, 0.72fr) auto;
  gap: 10px;
}

.dashboard-project-team-workspace :is(
  .dashboard-team-add-form,
  .dashboard-team-row,
  .dashboard-team-cert-row,
  .dashboard-team-holiday-row
) :is(input, select) {
  min-height: 38px;
  border-color: var(--line);
  background: var(--input-glass);
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.dashboard-project-team-workspace :is(
  .dashboard-team-add-form,
  .dashboard-team-row,
  .dashboard-team-cert-row,
  .dashboard-team-holiday-row
) :is(input, select):focus {
  border-color: color-mix(in srgb, var(--blue) 56%, var(--line));
  background: var(--surface-solid);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 12%, transparent);
  outline: 0;
}

.dashboard-project-team-workspace :is(input, select, button):disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.dashboard-project-team-workspace .dashboard-team-row-expanded {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
  padding: 12px;
  border-left-width: 5px;
  background: color-mix(in srgb, var(--surface-soft) 72%, transparent);
}

.dashboard-project-team-workspace .dashboard-team-member {
  grid-template-columns: 38px minmax(0, 1fr);
}

.dashboard-project-team-workspace .dashboard-team-member .company-member-avatar {
  width: 38px;
  height: 38px;
}

.dashboard-project-team-qualification-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
  align-items: start;
}

.dashboard-project-team-workspace .dashboard-team-cert-row,
.dashboard-project-team-workspace .dashboard-team-holiday-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
  align-items: end;
}

.dashboard-project-team-workspace :is(
  .dashboard-team-cert-row,
  .dashboard-team-holiday-row
) > label {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.dashboard-project-team-workspace :is(
  .dashboard-team-cert-row,
  .dashboard-team-holiday-row
) > label > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.dashboard-project-team-workspace :is(
  .dashboard-team-cert-row,
  .dashboard-team-holiday-row
) :is(input, select) {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 10px;
  background: var(--input-glass);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 820;
}

.dashboard-project-team-workspace .dashboard-team-cert-type {
  grid-column: 1 / -1;
  grid-row: 1;
}

.dashboard-project-team-workspace .dashboard-team-cert-expiry {
  grid-column: 1;
  grid-row: 2;
}

.dashboard-project-team-workspace .dashboard-team-cert-upload {
  grid-column: 2;
  grid-row: 2;
}

.dashboard-project-team-workspace .dashboard-team-cert-upload input[type="file"] {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 5px 6px;
  overflow: hidden;
  font-size: 11px;
}

.dashboard-project-team-workspace .dashboard-team-cert-upload input[type="file"]::file-selector-button {
  min-height: 26px;
  margin-right: 7px;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--button-glass);
  color: var(--text);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.dashboard-project-team-workspace .dashboard-team-cert-row > .settings-mini-btn,
.dashboard-project-team-workspace .dashboard-team-holiday-row > .settings-mini-btn {
  grid-column: 2;
  grid-row: 3;
  width: 100%;
  min-height: 38px;
  justify-self: stretch;
  white-space: nowrap;
}

.dashboard-project-team-workspace .dashboard-team-cert-row > em {
  grid-column: 1;
  grid-row: 3;
}

.dashboard-project-team-workspace .dashboard-team-holiday-note {
  grid-column: 1 / -1;
  grid-row: 2;
}

.dashboard-project-team-workspace .dashboard-team-schedule {
  grid-column: auto;
  background: color-mix(in srgb, var(--surface-soft) 72%, transparent);
}

.dashboard-project-team-workspace .dashboard-team-certifications,
.dashboard-project-team-workspace .dashboard-team-holidays {
  align-content: start;
  background: color-mix(in srgb, var(--surface-soft) 72%, transparent);
}

.dashboard-project-team-sticky-save {
  scroll-margin-bottom: 8px;
}

.dashboard-project-team-discard-overlay {
  position: fixed;
  inset: 0;
  z-index: 420;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(5px);
}

html[data-theme="dark"] :is(
  .dashboard-project-team-overview,
  .dashboard-project-team-metrics span,
  .dashboard-project-team-workspace .dashboard-team-row-expanded,
  .dashboard-project-team-workspace .dashboard-team-certifications,
  .dashboard-project-team-workspace .dashboard-team-holidays,
  .dashboard-project-team-workspace .dashboard-team-schedule
) {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(30, 41, 59, 0.58);
}

html[data-theme="dark"] .dashboard-project-team-workspace .dashboard-team-cert-row.warning {
  border-color: rgba(251, 191, 36, 0.38);
  background: rgba(120, 53, 15, 0.28);
}

html[data-theme="dark"] .dashboard-project-team-workspace .dashboard-team-cert-row.warning > em {
  color: #fcd34d;
}

html[data-theme="dark"] .dashboard-project-team-workspace .settings-mini-btn.danger {
  border-color: rgba(248, 113, 113, 0.44);
  background: rgba(127, 29, 29, 0.24);
  color: #fecaca;
}

html[data-theme="dark"] .dashboard-project-team-workspace .settings-mini-btn.danger:not(:disabled):hover {
  border-color: rgba(251, 113, 133, 0.72);
  background: rgba(159, 18, 57, 0.38);
  color: #ffe4e6;
}

@media (max-width: 900px) {
  .dashboard-project-team-rail {
    position: static;
  }

  .dashboard-project-team-member-switcher {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-project-team-member-switcher > strong {
    grid-column: 1 / -1;
  }

  .dashboard-project-team-workspace .dashboard-team-row-expanded {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 700px) {
  .dashboard-project-team-section-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-project-team-member-switcher {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-project-team-workspace .dashboard-team-add-form,
  .dashboard-project-team-workspace .dashboard-team-row-expanded,
  .dashboard-project-team-workspace .dashboard-team-row-details,
  .dashboard-project-team-workspace .dashboard-team-cert-row,
  .dashboard-project-team-workspace .dashboard-team-holiday-row,
  .dashboard-project-team-qualification-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-project-team-section-head {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .dashboard-project-team-section-head > .settings-mini-btn {
    grid-column: 1 / -1;
    width: 100%;
  }

  .dashboard-project-team-workspace :is(
    .dashboard-team-add-form .primary-mini,
    .dashboard-team-cert-row .settings-mini-btn,
    .dashboard-team-holiday-row .settings-mini-btn
  ) {
    width: 100%;
    justify-self: stretch;
  }

  .dashboard-project-team-workspace .dashboard-team-cert-row > .settings-mini-btn,
  .dashboard-project-team-workspace .dashboard-team-holiday-row > .settings-mini-btn {
    grid-column: auto;
    grid-row: auto;
  }

  .dashboard-project-team-workspace .dashboard-team-cert-row > em {
    grid-column: auto;
    grid-row: auto;
  }

  .dashboard-project-team-workspace .dashboard-team-cert-row > *,
  .dashboard-project-team-workspace .dashboard-team-holiday-row > * {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 480px) {
  .dashboard-project-team-section-nav,
  .dashboard-project-team-member-switcher,
  .dashboard-project-team-metrics {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Final Company/Profile-editor route height guard: this must follow the
   generic tablet and mobile shell rules so the inner form remains the scroll surface. */
.studio-shell.dashboard-shell.dashboard-company-shell {
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  grid-template-rows: auto minmax(0, 1fr);
}

.studio-shell.dashboard-shell.dashboard-project-team-shell {
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  grid-template-rows: auto minmax(0, 1fr);
}

/* Distributor workspace: commercial operations, files and branch management. */
.dashboard-distributor-workspace,
.dashboard-distributor-workspace *,
.dashboard-distributor-tab-panel,
.dashboard-distributor-tab-panel > * {
  min-width: 0;
}

.dashboard-analytics-workspace.dashboard-distributor-workspace {
  grid-template-rows: none;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 14px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.dashboard-distributor-workspace .dashboard-product-library-header {
  align-items: flex-end;
  flex-wrap: wrap;
}

.dashboard-distributor-workspace .dashboard-product-library-header-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 100%;
}

.dashboard-distributor-workspace :is(input, select, textarea, button) {
  max-width: 100%;
}

.dashboard-distributor-workspace :is(input, select, textarea) {
  width: 100%;
}

.dashboard-distributor-workspace textarea {
  resize: vertical;
}

.dashboard-distributor-tab-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  max-width: 100%;
}

.dashboard-distributor-panel,
.dashboard-distributor-quote-detail {
  grid-template-rows: none;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 14px;
  overflow: visible;
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
  box-shadow: var(--glass-edge), 0 14px 34px rgba(15, 23, 42, 0.07);
}

.dashboard-distributor-quote-detail {
  display: grid;
}

.dashboard-distributor-panel .dashboard-analytics-panel-head > div,
.dashboard-distributor-section-title > div,
.dashboard-distributor-quote-detail-head > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.dashboard-distributor-panel .dashboard-analytics-panel-head strong,
.dashboard-distributor-section-title strong,
.dashboard-distributor-quote-detail-head h3 {
  overflow-wrap: anywhere;
  white-space: normal;
}

.dashboard-distributor-summary,
.dashboard-distributor-kpi-grid,
.dashboard-distributor-branch-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-distributor-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-distributor-branch-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-distributor-metric-card {
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 92px;
  padding: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-solid) 82%, var(--blue-soft));
  box-shadow: var(--glass-edge), 0 8px 20px rgba(15, 23, 42, 0.05);
}

.dashboard-distributor-metric-card > span {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.035em;
  line-height: 1.2;
  text-transform: uppercase;
}

.dashboard-distributor-metric-card > strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: clamp(1.12rem, 1.65vw, 1.48rem);
  font-weight: 950;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-distributor-metric-card > small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-distributor-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-solid) 72%, transparent);
  box-shadow: var(--glass-edge);
}

.dashboard-distributor-tab {
  min-height: 40px;
  border-color: transparent;
  border-radius: 8px;
  background: transparent;
  padding: 8px 10px;
  line-height: 1.2;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.dashboard-distributor-tab:hover {
  border-color: var(--line);
  background: var(--button-glass-hover);
  color: var(--text);
}

.dashboard-distributor-tab.active,
.dashboard-distributor-tab[aria-selected="true"] {
  border-color: var(--blue-border);
  background: var(--blue-soft);
  color: var(--blue);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48), 0 6px 16px rgba(10, 124, 255, 0.1);
}

/* Overview */
.dashboard-distributor-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.7fr);
  gap: 14px;
  align-items: start;
}

.dashboard-distributor-overview-side {
  display: grid;
  gap: 14px;
}

.dashboard-distributor-overview-table,
.dashboard-distributor-table,
.dashboard-distributor-line-table {
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: color-mix(in srgb, var(--surface-solid) 72%, transparent);
}

.dashboard-distributor-overview-table-head,
.dashboard-distributor-overview-table > button {
  display: grid;
  grid-template-columns: minmax(170px, 1.35fr) minmax(120px, 0.95fr) minmax(110px, 0.8fr) minmax(82px, 0.55fr) minmax(80px, 0.55fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.dashboard-distributor-overview-table-head {
  background: color-mix(in srgb, var(--surface-solid) 68%, var(--blue-soft));
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.dashboard-distributor-overview-table > button {
  width: 100%;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
  text-align: left;
  transition: background 0.15s ease;
}

.dashboard-distributor-overview-table > button:last-child {
  border-bottom: 0;
}

.dashboard-distributor-overview-table > button:hover {
  background: var(--blue-soft);
}

.dashboard-distributor-overview-table > button > :is(strong, span) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-distributor-overview-table > button strong {
  color: var(--text);
  font-weight: 900;
}

.dashboard-distributor-task-list,
.dashboard-distributor-mini-stats {
  display: grid;
  gap: 8px;
}

.dashboard-distributor-task-list > button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 10px;
  align-items: center;
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--tile-glass);
  color: var(--muted);
  font: inherit;
  text-align: left;
}

.dashboard-distributor-task-list > button:hover,
.dashboard-distributor-mini-stats > button:hover {
  border-color: var(--blue-border);
  background: var(--blue-soft);
}

.dashboard-distributor-task-list strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-distributor-task-list span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 750;
}

.dashboard-distributor-task-list em {
  grid-column: 2;
  grid-row: 1 / span 2;
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.13);
  color: #b45309;
  font-size: 0.65rem;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.dashboard-distributor-mini-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-distributor-mini-stats > button {
  display: grid;
  gap: 3px;
  padding: 11px 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--tile-glass);
  color: var(--muted);
  font: inherit;
  text-align: left;
}

.dashboard-distributor-mini-stats strong {
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 950;
  line-height: 1;
}

.dashboard-distributor-mini-stats span {
  font-size: 0.68rem;
  font-weight: 800;
}

/* Quotation pipeline and detail */
.dashboard-distributor-composer {
  margin-bottom: 14px;
  border-color: color-mix(in srgb, var(--blue) 32%, var(--line));
}

.dashboard-distributor-quote-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.55fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-solid) 76%, transparent);
  box-shadow: var(--glass-edge);
}

.dashboard-distributor-quote-toolbar > label,
.dashboard-distributor-upload-fields > label,
.dashboard-distributor-upload-row > label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 900;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.dashboard-distributor-quote-toolbar input,
.dashboard-distributor-upload-fields :is(input, select),
.dashboard-distributor-upload-row input,
.dashboard-distributor-status-select input {
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--input-glass);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
}

.dashboard-distributor-quote-toolbar > .primary-mini {
  min-height: 42px;
}

.dashboard-distributor-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.dashboard-distributor-filter-pills button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--button-glass);
  color: var(--muted);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 850;
}

.dashboard-distributor-filter-pills button span {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  min-height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 12%, transparent);
  font-size: 0.63rem;
}

.dashboard-distributor-filter-pills button:hover,
.dashboard-distributor-filter-pills button.active,
.dashboard-distributor-filter-pills button[aria-pressed="true"] {
  border-color: var(--blue-border);
  background: var(--blue-soft);
  color: var(--blue);
}

.dashboard-distributor-quotes-layout {
  grid-template-columns: minmax(350px, 0.92fr) minmax(500px, 1.35fr);
  max-width: 100%;
}

.dashboard-distributor-table-head,
.dashboard-distributor-row {
  grid-template-columns: minmax(145px, 1.3fr) minmax(120px, 0.95fr) minmax(100px, 0.75fr) minmax(78px, 0.55fr) minmax(76px, 0.55fr);
}

.dashboard-distributor-row > :is(strong, span, em) {
  min-width: 0;
}

.dashboard-distributor-row > :is(strong, span) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-distributor-row small {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-distributor-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  min-height: 25px;
  padding: 4px 8px;
  border: 1px solid rgba(59, 130, 246, 0.24);
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.1);
  color: #1d4ed8;
  font-size: 0.65rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.dashboard-distributor-status-pill.status-received,
.dashboard-distributor-status-pill.status-quoted {
  border-color: rgba(14, 165, 233, 0.27);
  background: rgba(14, 165, 233, 0.11);
  color: #0369a1;
}

.dashboard-distributor-status-pill.status-won {
  border-color: rgba(34, 197, 94, 0.28);
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.dashboard-distributor-status-pill.status-lost {
  border-color: rgba(239, 68, 68, 0.27);
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
}

.dashboard-distributor-quote-detail {
  padding: 16px;
}

.dashboard-distributor-quote-detail-head {
  margin: 0;
}

.dashboard-distributor-quote-detail-head > div > span,
.dashboard-distributor-section-title span {
  color: var(--blue);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.dashboard-distributor-quote-detail-head h3 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.2;
}

.dashboard-distributor-quote-detail-head small,
.dashboard-distributor-section-title small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1.35;
}

.dashboard-distributor-quote-control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.dashboard-distributor-status-select small {
  color: #b45309;
  font-size: 0.65rem;
  font-weight: 850;
  text-transform: none;
}

.dashboard-distributor-quote-metrics {
  margin: 0;
}

.dashboard-distributor-section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-distributor-quote-documents {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: color-mix(in srgb, var(--surface-solid) 58%, transparent);
}

.dashboard-distributor-upload-row {
  display: grid;
  grid-template-columns: minmax(190px, 0.85fr) minmax(220px, 1.15fr) auto;
  gap: 9px;
  align-items: end;
}

.dashboard-distributor-upload-row > .primary-mini {
  min-height: 42px;
}

.dashboard-distributor-line-table {
  overflow-x: auto;
  scrollbar-width: thin;
}

.dashboard-distributor-line-head,
.dashboard-distributor-line-row {
  min-width: 780px;
  grid-template-columns: minmax(190px, 1.35fr) minmax(96px, 0.72fr) minmax(90px, 0.66fr) 52px minmax(82px, 0.58fr) minmax(108px, 0.7fr);
}

.dashboard-distributor-panel-actions {
  gap: 8px;
  margin-top: 0;
}

.dashboard-distributor-panel-actions .primary-mini {
  min-height: 40px;
  min-width: 132px;
}

.dashboard-distributor-message-panel {
  max-width: 100%;
}

/* Pricing files and manual prices */
.dashboard-distributor-pricing-layout,
.dashboard-distributor-discount-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.dashboard-distributor-price-file-form {
  display: grid;
  grid-template-columns: minmax(210px, 0.68fr) minmax(0, 1.32fr);
  gap: 12px;
  align-items: stretch;
}

.dashboard-distributor-upload-dropzone {
  position: relative;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 6px;
  min-height: 190px;
  padding: 18px;
  overflow: hidden;
  border: 1px dashed color-mix(in srgb, var(--blue) 48%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--blue-soft) 68%, var(--surface-solid));
  color: var(--muted);
  text-align: center;
  cursor: pointer;
}

.dashboard-distributor-upload-dropzone:hover {
  border-color: var(--blue);
  background: color-mix(in srgb, var(--blue-soft) 88%, var(--surface-solid));
}

.dashboard-distributor-upload-dropzone > strong {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 900;
}

.dashboard-distributor-upload-dropzone > small {
  max-width: 220px;
  font-size: 0.7rem;
  font-weight: 750;
  line-height: 1.35;
}

.dashboard-distributor-upload-dropzone input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.dashboard-distributor-file-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid var(--blue-border);
  border-radius: 9px;
  background: var(--blue-soft);
  color: var(--blue);
}

.dashboard-distributor-upload-dropzone .dashboard-distributor-file-icon {
  width: 48px;
  height: 48px;
}

.dashboard-distributor-file-icon svg {
  width: 20px;
  height: 20px;
}

.dashboard-distributor-upload-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  align-content: start;
}

.dashboard-distributor-upload-fields .wide {
  grid-column: 1 / -1;
}

.dashboard-distributor-check {
  display: flex !important;
  align-items: center;
  gap: 9px !important;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-solid) 66%, transparent);
  color: var(--text) !important;
  font-size: 0.75rem !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.dashboard-distributor-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 0;
  flex: 0 0 18px;
  margin: 0;
  padding: 0;
  accent-color: var(--blue);
  box-shadow: none;
}

.dashboard-distributor-upload-fields > .dashboard-distributor-check {
  grid-column: 1 / -1;
}

.dashboard-distributor-upload-fields > .primary-mini {
  grid-column: 1 / -1;
  justify-self: end;
  min-height: 42px;
}

.dashboard-distributor-file-list {
  display: grid;
  gap: 8px;
}

.dashboard-distributor-file-empty {
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 750;
  line-height: 1.35;
  text-align: center;
}

.dashboard-distributor-file-list article {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto auto;
  gap: 9px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-solid) 68%, transparent);
}

.dashboard-distributor-file-list article > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.dashboard-distributor-file-list article strong,
.dashboard-distributor-file-list article small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-distributor-file-list article strong {
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 900;
}

.dashboard-distributor-file-list article small {
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 750;
}

.dashboard-distributor-file-list article > :is(a, button),
.dashboard-distributor-row-action,
.dashboard-distributor-inline-actions button,
.dashboard-distributor-team-list article > button,
.dashboard-distributor-danger-zone > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--button-glass);
  color: var(--blue);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.dashboard-distributor-file-list article > :is(a, button):hover,
.dashboard-distributor-row-action:hover,
.dashboard-distributor-inline-actions button:hover,
.dashboard-distributor-team-list article > button:hover {
  border-color: var(--blue-border);
  background: var(--blue-soft);
}

.dashboard-distributor-pricing-table .dashboard-distributor-table-head,
.dashboard-distributor-pricing-table .dashboard-distributor-row {
  grid-template-columns: minmax(86px, 0.7fr) minmax(150px, 1.45fr) minmax(78px, 0.6fr) minmax(78px, 0.6fr) minmax(72px, 0.65fr);
}

/* Discount rules */
.dashboard-distributor-discount-form {
  margin-bottom: 0;
}

.dashboard-distributor-rule-help {
  margin: 0;
  padding: 10px 11px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 9px;
  background: rgba(59, 130, 246, 0.07);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1.45;
}

.dashboard-distributor-rule-help strong {
  color: var(--text);
}

.dashboard-distributor-discount-list {
  display: grid;
  gap: 8px;
}

.dashboard-distributor-discount-list > article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-solid) 68%, transparent);
}

.dashboard-distributor-discount-list > article.paused {
  opacity: 0.68;
}

.dashboard-distributor-discount-list > article > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.dashboard-distributor-discount-list :is(span, strong, small) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-distributor-discount-list span {
  color: var(--blue);
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-distributor-discount-list strong {
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 900;
}

.dashboard-distributor-discount-list small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
}

.dashboard-distributor-discount-list > article > em {
  color: #15803d;
  font-size: 1.05rem;
  font-style: normal;
  font-weight: 950;
}

.dashboard-distributor-inline-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.dashboard-distributor-terms-requests {
  margin-top: 14px;
}

.dashboard-distributor-terms-requests .dashboard-distributor-request-list article {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(120px, 0.7fr) minmax(92px, auto) auto auto;
  gap: 9px;
  align-items: end;
  margin: 0;
}

.dashboard-distributor-terms-requests .dashboard-distributor-request-list label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 850;
}

/* Branch network and team */
.dashboard-distributor-network-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: 14px;
  align-items: start;
}

.dashboard-distributor-network-cards,
.dashboard-distributor-team-list {
  display: grid;
  gap: 8px;
}

.dashboard-distributor-network-cards > button {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-solid) 68%, transparent);
  color: var(--muted);
  font: inherit;
  text-align: left;
}

.dashboard-distributor-network-cards > button:hover,
.dashboard-distributor-network-cards > button.active {
  border-color: var(--blue-border);
  background: var(--blue-soft);
  box-shadow: inset 3px 0 0 var(--blue);
}

.dashboard-distributor-branch-mark,
.dashboard-distributor-person-avatar {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--blue-border);
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 950;
}

.dashboard-distributor-network-cards > button > div,
.dashboard-distributor-team-list article > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.dashboard-distributor-network-cards > button :is(strong, span, small),
.dashboard-distributor-team-list article > div :is(strong, span, small) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-distributor-network-cards strong,
.dashboard-distributor-team-list strong {
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 900;
}

.dashboard-distributor-network-cards span,
.dashboard-distributor-network-cards small,
.dashboard-distributor-team-list span,
.dashboard-distributor-team-list small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
}

.dashboard-distributor-network-cards em,
.dashboard-distributor-team-list em {
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
  font-size: 0.64rem;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.dashboard-distributor-branch-form,
.dashboard-distributor-staff-form {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.dashboard-distributor-section-title {
  padding-top: 2px;
}

.dashboard-distributor-team-list article {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto auto;
  gap: 9px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-solid) 68%, transparent);
}

.dashboard-distributor-danger-zone {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px;
  border: 1px solid rgba(239, 68, 68, 0.22);
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.055);
}

.dashboard-distributor-danger-zone > div {
  display: grid;
  gap: 3px;
}

.dashboard-distributor-danger-zone strong {
  color: #b91c1c;
  font-size: 0.78rem;
  font-weight: 900;
}

.dashboard-distributor-danger-zone span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
  line-height: 1.35;
}

.dashboard-distributor-danger-zone > button {
  border-color: rgba(239, 68, 68, 0.28);
  color: #b91c1c;
}

.dashboard-distributor-danger-zone > button:not(:disabled):hover {
  border-color: rgba(239, 68, 68, 0.48);
  background: rgba(239, 68, 68, 0.1);
}

/* Profile and shared form refinements */
.dashboard-distributor-form > input[type="hidden"] {
  display: none;
}

.dashboard-distributor-form > label,
.dashboard-distributor-form > fieldset,
.dashboard-distributor-form > button {
  min-width: 0;
}

.dashboard-distributor-form :is(input, select, textarea),
.dashboard-distributor-status-select :is(input, select) {
  box-sizing: border-box;
}

.dashboard-distributor-form textarea {
  min-height: 84px;
  line-height: 1.4;
}

.dashboard-distributor-profile-preview {
  max-width: 100%;
  overflow: hidden;
}

.dashboard-distributor-branch-list article :is(span, small) {
  overflow-wrap: anywhere;
  line-height: 1.35;
}

/* Dark theme uses the same hierarchy without light card bleed-through. */
html[data-theme="dark"] :is(
  .dashboard-distributor-panel,
  .dashboard-distributor-quote-detail,
  .dashboard-distributor-tabs,
  .dashboard-distributor-quote-toolbar,
  .dashboard-distributor-metric-card,
  .dashboard-distributor-overview-table,
  .dashboard-distributor-table,
  .dashboard-distributor-line-table,
  .dashboard-distributor-quote-documents,
  .dashboard-distributor-task-list > button,
  .dashboard-distributor-mini-stats > button,
  .dashboard-distributor-file-list article,
  .dashboard-distributor-discount-list > article,
  .dashboard-distributor-network-cards > button,
  .dashboard-distributor-team-list article,
  .dashboard-distributor-check,
  .dashboard-distributor-terms-requests .dashboard-distributor-request-list article,
  .dashboard-distributor-profile-preview,
  .dashboard-distributor-installation-options,
  .dashboard-distributor-installation-options label,
  .dashboard-distributor-branch-list article
) {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.78);
}

html[data-theme="dark"] :is(
  .dashboard-distributor-overview-table-head,
  .dashboard-distributor-table-head,
  .dashboard-distributor-line-head
) {
  background: rgba(30, 41, 59, 0.72);
}

html[data-theme="dark"] .dashboard-distributor-upload-dropzone {
  border-color: rgba(96, 165, 250, 0.45);
  background: rgba(30, 64, 175, 0.16);
}

html[data-theme="dark"] .dashboard-distributor-upload-dropzone:hover,
html[data-theme="dark"] :is(
  .dashboard-distributor-network-cards > button:hover,
  .dashboard-distributor-network-cards > button.active,
  .dashboard-distributor-overview-table > button:hover,
  .dashboard-distributor-task-list > button:hover,
  .dashboard-distributor-mini-stats > button:hover
) {
  background: rgba(37, 99, 235, 0.2);
}

html[data-theme="dark"] .dashboard-distributor-rule-help {
  border-color: rgba(96, 165, 250, 0.24);
  background: rgba(30, 64, 175, 0.16);
}

html[data-theme="dark"] .dashboard-distributor-status-pill {
  color: #93c5fd;
}

html[data-theme="dark"] .dashboard-distributor-status-pill.status-received,
html[data-theme="dark"] .dashboard-distributor-status-pill.status-quoted {
  color: #7dd3fc;
}

html[data-theme="dark"] .dashboard-distributor-status-pill.status-won,
html[data-theme="dark"] .dashboard-distributor-network-cards em,
html[data-theme="dark"] .dashboard-distributor-team-list em,
html[data-theme="dark"] .dashboard-distributor-discount-list > article > em {
  color: #86efac;
}

html[data-theme="dark"] .dashboard-distributor-status-pill.status-lost,
html[data-theme="dark"] .dashboard-distributor-danger-zone strong,
html[data-theme="dark"] .dashboard-distributor-danger-zone > button {
  color: #fca5a5;
}

html[data-theme="dark"] .dashboard-distributor-task-list em,
html[data-theme="dark"] .dashboard-distributor-status-select small {
  color: #fcd34d;
}

html[data-theme="dark"] .dashboard-distributor-danger-zone {
  border-color: rgba(248, 113, 113, 0.24);
  background: rgba(127, 29, 29, 0.18);
}

@media (max-width: 1180px) {
  .dashboard-distributor-workspace .dashboard-product-library-header {
    align-items: flex-start;
  }

  .dashboard-distributor-workspace .dashboard-product-library-header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .dashboard-distributor-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-distributor-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-distributor-overview-grid,
  .dashboard-distributor-quotes-layout,
  .dashboard-distributor-pricing-layout,
  .dashboard-distributor-discount-layout,
  .dashboard-distributor-network-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-distributor-overview-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-distributor-quote-toolbar {
    grid-template-columns: minmax(240px, 1fr) auto;
  }

  .dashboard-distributor-filter-pills {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .dashboard-distributor-price-file-form {
    grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
  }

  .dashboard-distributor-line-head,
  .dashboard-distributor-line-row {
    min-width: 760px;
  }

  .dashboard-distributor-network-list .dashboard-distributor-network-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .dashboard-analytics-workspace.dashboard-distributor-workspace {
    gap: 10px;
    padding: 0 10px 18px;
    scrollbar-gutter: auto;
  }

  .dashboard-distributor-workspace .dashboard-product-library-header {
    gap: 10px;
    padding-top: 12px;
  }

  .dashboard-distributor-workspace .dashboard-product-library-header h1 {
    font-size: 1.35rem;
  }

  .dashboard-distributor-workspace .dashboard-product-library-header-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .dashboard-distributor-workspace .dashboard-product-library-header-actions > .dashboard-distributor-select,
  .dashboard-distributor-workspace .dashboard-product-library-header-actions > .dashboard-product-library-dashboard-btn {
    grid-column: 1 / -1;
    width: 100%;
  }

  .dashboard-distributor-workspace .dashboard-product-library-header-actions > button {
    width: 100%;
    min-height: 40px;
  }

  .dashboard-distributor-select,
  .dashboard-distributor-branch-inbox {
    width: 100%;
    min-width: 0;
  }

  .dashboard-distributor-summary {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
  }

  .dashboard-distributor-metric-card {
    min-height: 78px;
  }

  .dashboard-distributor-summary .dashboard-distributor-metric-card {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 2px 10px;
  }

  .dashboard-distributor-summary .dashboard-distributor-metric-card > strong {
    grid-column: 2;
    grid-row: 1 / span 2;
    text-align: right;
  }

  .dashboard-distributor-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-distributor-tab {
    padding-inline: 7px;
    font-size: 0.75rem;
  }

  .dashboard-distributor-panel,
  .dashboard-distributor-quote-detail {
    padding: 11px;
    border-radius: 11px;
  }

  .dashboard-distributor-panel .dashboard-analytics-panel-head,
  .dashboard-distributor-section-title,
  .dashboard-distributor-quote-detail-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .dashboard-distributor-panel .dashboard-analytics-panel-head > :is(button, .dashboard-distributor-status-pill) {
    flex: 0 0 auto;
  }

  .dashboard-distributor-kpi-grid,
  .dashboard-distributor-branch-summary,
  .dashboard-distributor-quote-metrics,
  .dashboard-distributor-overview-side,
  .dashboard-distributor-mini-stats,
  .dashboard-distributor-quote-control-grid,
  .dashboard-distributor-network-list .dashboard-distributor-network-cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-distributor-overview-table-head,
  .dashboard-distributor-table-head {
    display: none;
  }

  .dashboard-distributor-overview-table > button,
  .dashboard-distributor-table .dashboard-distributor-row:not(.static) {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 10px;
    padding: 11px;
  }

  .dashboard-distributor-overview-table > button > strong,
  .dashboard-distributor-table .dashboard-distributor-row:not(.static) > strong {
    grid-column: 1;
    grid-row: 1;
  }

  .dashboard-distributor-overview-table > button > :nth-child(2),
  .dashboard-distributor-table .dashboard-distributor-row:not(.static) > :nth-child(2) {
    grid-column: 1;
    grid-row: 2;
  }

  .dashboard-distributor-overview-table > button > :nth-child(3),
  .dashboard-distributor-table .dashboard-distributor-row:not(.static) > :nth-child(3) {
    grid-column: 1;
    grid-row: 3;
  }

  .dashboard-distributor-overview-table > button > .dashboard-distributor-status-pill,
  .dashboard-distributor-table .dashboard-distributor-row:not(.static) > .dashboard-distributor-status-pill {
    grid-column: 2;
    grid-row: 1;
  }

  .dashboard-distributor-overview-table > button > :last-child,
  .dashboard-distributor-table .dashboard-distributor-row:not(.static) > :last-child {
    grid-column: 2;
    grid-row: 2;
    color: var(--text);
    font-weight: 900;
    text-align: right;
  }

  .dashboard-distributor-quote-toolbar {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .dashboard-distributor-filter-pills {
    grid-column: auto;
    grid-row: auto;
  }

  .dashboard-distributor-filter-pills button {
    flex: 1 1 calc(33.333% - 5px);
  }

  .dashboard-distributor-quote-toolbar > .primary-mini {
    width: 100%;
  }

  .dashboard-distributor-upload-row,
  .dashboard-distributor-price-file-form,
  .dashboard-distributor-upload-fields,
  .dashboard-distributor-terms-requests .dashboard-distributor-request-list article {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-distributor-upload-fields .wide,
  .dashboard-distributor-upload-fields > .dashboard-distributor-check,
  .dashboard-distributor-upload-fields > .primary-mini {
    grid-column: auto;
  }

  .dashboard-distributor-upload-fields > .primary-mini,
  .dashboard-distributor-upload-row > .primary-mini {
    width: 100%;
    justify-self: stretch;
  }

  .dashboard-distributor-upload-dropzone {
    min-height: 148px;
  }

  .dashboard-distributor-file-list article {
    grid-template-columns: 38px minmax(0, 1fr) auto;
  }

  .dashboard-distributor-file-list article > :is(a, button) {
    grid-row: 2;
  }

  .dashboard-distributor-file-list article > :is(a, button):first-of-type {
    grid-column: 2;
    justify-self: start;
  }

  .dashboard-distributor-file-list article > :is(a, button):last-child {
    grid-column: 3;
  }

  .dashboard-distributor-pricing-table .dashboard-distributor-row.static {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 10px;
  }

  .dashboard-distributor-pricing-table .dashboard-distributor-row.static > strong,
  .dashboard-distributor-pricing-table .dashboard-distributor-row.static > :nth-child(2) {
    grid-column: 1;
  }

  .dashboard-distributor-pricing-table .dashboard-distributor-row.static > :nth-child(3),
  .dashboard-distributor-pricing-table .dashboard-distributor-row.static > :nth-child(4),
  .dashboard-distributor-pricing-table .dashboard-distributor-row.static > :last-child {
    grid-column: 2;
    text-align: right;
  }

  .dashboard-distributor-discount-list > article {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .dashboard-distributor-discount-list .dashboard-distributor-inline-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .dashboard-distributor-terms-requests .dashboard-distributor-request-list article > button {
    width: 100%;
  }

  .dashboard-distributor-network-cards > button {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .dashboard-distributor-network-cards > button > em {
    grid-column: 2;
    justify-self: start;
  }

  .dashboard-distributor-team-list article {
    grid-template-columns: 40px minmax(0, 1fr) auto;
  }

  .dashboard-distributor-team-list article > :is(em, button) {
    grid-row: 2;
  }

  .dashboard-distributor-team-list article > :is(em, button):nth-last-child(2) {
    grid-column: 2;
    justify-self: start;
  }

  .dashboard-distributor-team-list article > button:last-child {
    grid-column: 3;
  }

  .dashboard-distributor-danger-zone {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-distributor-danger-zone > button {
    width: 100%;
  }

  .dashboard-distributor-form,
  .dashboard-distributor-installation-options {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-distributor-form .wide,
  .dashboard-distributor-installation-options {
    grid-column: auto;
  }

  .dashboard-distributor-form .primary-mini {
    width: 100%;
    justify-self: stretch;
  }

  .dashboard-distributor-profile-preview {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-distributor-profile-cover {
    min-height: 150px;
  }
}

/* Accessibility and narrow-workspace safeguards. */

.project-settings-popover,
.export-popover,
.product-library-rail,
.product-library-main,
.product-detail-panel {
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 116, 139, 0.48) transparent;
}

.project-settings-popover::-webkit-scrollbar,
.export-popover::-webkit-scrollbar,
.product-library-rail::-webkit-scrollbar,
.product-library-main::-webkit-scrollbar,
.product-detail-panel::-webkit-scrollbar {
  width: 8px;
  height: 8px;
  display: block;
}

.project-settings-popover::-webkit-scrollbar-thumb,
.export-popover::-webkit-scrollbar-thumb,
.product-library-rail::-webkit-scrollbar-thumb,
.product-library-main::-webkit-scrollbar-thumb,
.product-detail-panel::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.48);
  background-clip: padding-box;
}

@media (max-width: 1180px) {
  .product-library-body,
  .product-library-body.sidebar-collapsed {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: max-content;
    align-content: start;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 3px;
  }

  .product-library-rail,
  .product-library-main,
  .product-detail-panel {
    height: auto;
    overflow: visible;
  }

  .product-library-body.sidebar-collapsed .product-library-rail {
    padding: 12px;
  }

  .product-library-body.sidebar-collapsed .product-library-rail-head {
    display: flex;
  }

  .product-library-body.sidebar-collapsed .product-category-card span,
  .product-library-body.sidebar-collapsed .product-category-card em,
  .product-library-body.sidebar-collapsed .product-library-sidebar-subcategories {
    display: grid;
  }

  .product-library-body.sidebar-collapsed .product-category-card {
    grid-template-columns: 28px minmax(0, 1fr) auto;
    justify-items: stretch;
    min-height: 42px;
    padding: 10px;
  }
}

@media (max-width: 720px) {
  .project-settings-tabs {
    overflow-x: auto;
    overflow-y: hidden;
    justify-content: flex-start;
    scrollbar-width: thin;
  }

  .project-settings-tabs button {
    flex: 0 0 auto;
    min-width: 132px;
  }

  .share-popover,
  .workspace-more-popover,
  .methodology-popover {
    inset: 64px 8px auto;
    width: auto;
    max-height: calc(100dvh - 72px);
    overflow: auto;
  }

  .share-popover-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .share-backdrop {
    place-items: stretch;
    padding: 8px;
  }

  .share-popover {
    inset: auto;
    width: 100%;
    max-height: calc(100dvh - 16px);
    border-radius: 20px;
  }

  .share-popover-head {
    min-height: 0;
    padding: 17px;
  }

  .share-hero-brand {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .share-hero-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .share-hero-brand strong {
    font-size: 18px;
  }

  .share-hero-brand small,
  .share-live-status {
    display: none;
  }

  .share-hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .share-hero-stats > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 1px;
  }

  .share-hero-stats strong {
    grid-row: auto;
    font-size: 13px;
  }

  .share-tabs {
    min-height: 52px;
    padding: 6px;
  }

  .share-tabs button {
    grid-template-columns: 18px minmax(0, 1fr);
    padding: 8px;
  }

  .share-tabs button em {
    display: none;
  }

  .share-popover-body {
    padding: 16px;
  }

  .share-choice-columns,
  .share-scope-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .share-add-person-card,
  .share-add-person-card.external {
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: end;
  }

  .share-add-person-card > label,
  .share-add-person-card > button {
    grid-column: 2;
  }

  .share-person-row {
    grid-template-columns: 38px minmax(0, 1fr) auto;
  }

  .share-person-row select {
    grid-column: 2;
  }

  .share-person-remove {
    grid-column: 3;
    grid-row: 2;
  }

  .share-popover-footer {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .share-footer-status {
    grid-column: 1 / -1;
  }

  .share-footer-link {
    min-width: 0;
  }

  .share-footer-actions .secondary-btn {
    display: none;
  }
}

/* Project-aware workspace assistant */
#workspaceAssistantRoot {
  --workspace-assistant-bottom-offset: calc(66px + env(safe-area-inset-bottom, 0px));
  --workspace-assistant-panel-bottom-offset: var(--workspace-assistant-bottom-offset);
  --workspace-assistant-edge-offset: max(12px, env(safe-area-inset-right, 0px));
  --workspace-assistant-top-clearance: calc(132px + env(safe-area-inset-top, 0px));
}

html[data-workspace="pricing-portal"] #workspaceAssistantRoot,
html[data-workspace="programme"] #workspaceAssistantRoot,
html[data-workspace="commissioning"] #workspaceAssistantRoot {
  --workspace-assistant-bottom-offset: max(12px, env(safe-area-inset-bottom, 0px));
  --workspace-assistant-top-clearance: calc(76px + env(safe-area-inset-top, 0px));
}

.workspace-assistant-launcher {
  position: fixed;
  right: var(--workspace-assistant-edge-offset);
  bottom: var(--workspace-assistant-bottom-offset);
  z-index: 4080;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  max-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(7, 89, 181, 0.82);
  border-radius: 13px;
  background: linear-gradient(145deg, #1688f7, #0969da);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(9, 105, 218, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.workspace-assistant-launcher-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.workspace-assistant-launcher:hover,
.workspace-assistant-launcher:focus-visible {
  transform: translateY(-1px);
  border-color: #064b99;
  background: linear-gradient(145deg, #3399ff, #075dbc);
  box-shadow: 0 15px 34px rgba(9, 105, 218, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  outline: none;
}

.workspace-assistant-launcher:focus-visible {
  outline: 3px solid rgba(9, 105, 218, 0.3);
  outline-offset: 2px;
}

.workspace-assistant-launcher.active {
  display: none;
}

.workspace-assistant-launcher-icon,
.workspace-assistant-brandmark,
.workspace-assistant-message-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  background: linear-gradient(145deg, #0a7cff 0%, #4758f5 55%, #7734e9 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 7px 16px rgba(67, 56, 202, 0.2);
}

.workspace-assistant-mascot {
  width: 88%;
  height: 88%;
  overflow: visible;
  pointer-events: none;
}

.workspace-assistant-mascot-face {
  fill: rgba(255, 255, 255, 0.96);
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: 1.2;
}

.workspace-assistant-mascot-eye {
  fill: #3d4ed7;
}

.workspace-assistant-mascot-smile,
.workspace-assistant-mascot-antenna,
.workspace-assistant-mascot-ear {
  fill: none;
  stroke: #fff;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.workspace-assistant-mascot-smile {
  stroke: #3d4ed7;
  stroke-width: 2;
}

.workspace-assistant-mascot-antenna,
.workspace-assistant-mascot-ear {
  stroke-width: 2.2;
}

.workspace-assistant-mascot-spark {
  fill: #ffe58f;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 1;
  filter: drop-shadow(0 0 2px rgba(255, 229, 143, 0.8));
}

.workspace-assistant-mascot-cheek {
  fill: #f7a7c4;
  opacity: 0.82;
}

.workspace-assistant-panel.opening .workspace-assistant-brandmark {
  transform-origin: 50% 72%;
  animation: workspace-assistant-logo-hello 620ms 80ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

:is(.workspace-assistant-launcher-icon, .workspace-assistant-brandmark) .workspace-assistant-mascot-eye {
  transform-box: fill-box;
  transform-origin: center;
  animation: workspace-assistant-logo-blink 5.4s infinite ease-in-out;
}

:is(.workspace-assistant-launcher-icon, .workspace-assistant-brandmark) .workspace-assistant-mascot-spark {
  transform-box: fill-box;
  transform-origin: center;
  animation: workspace-assistant-logo-twinkle 2.8s infinite ease-in-out;
}

#workspaceAssistantRoot.busy :is(.workspace-assistant-launcher-icon, .workspace-assistant-brandmark) .workspace-assistant-mascot {
  animation: workspace-assistant-mascot-bob 900ms infinite ease-in-out;
}

#workspaceAssistantRoot.busy :is(.workspace-assistant-launcher-icon, .workspace-assistant-brandmark) .workspace-assistant-mascot-spark {
  animation-duration: 760ms;
}

@keyframes workspace-assistant-logo-hello {
  0% { opacity: 0.72; transform: translateY(2px) scale(0.88) rotate(-7deg); }
  48% { opacity: 1; transform: translateY(-1px) scale(1.06) rotate(5deg); }
  72% { transform: translateY(0) scale(0.98) rotate(-2deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

@keyframes workspace-assistant-logo-blink {
  0%, 46%, 48%, 50%, 52%, 100% { transform: scaleY(1); }
  47%, 51% { transform: scaleY(0.12); }
}

@keyframes workspace-assistant-logo-twinkle {
  0%, 100% { opacity: 0.78; transform: scale(0.92) rotate(0); }
  50% { opacity: 1; transform: scale(1.26) rotate(18deg); }
}

.workspace-assistant-message.thinking .workspace-assistant-mascot {
  animation: workspace-assistant-mascot-bob 1.25s infinite ease-in-out;
}

@keyframes workspace-assistant-mascot-bob {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-1.5px) rotate(2deg); }
}

.workspace-assistant-launcher-icon {
  width: 22px;
  height: 22px;
  border-radius: 0;
  color: #ffffff;
  background: transparent;
  box-shadow: none;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.workspace-assistant-panel {
  position: fixed;
  right: var(--workspace-assistant-edge-offset);
  bottom: var(--workspace-assistant-panel-bottom-offset);
  z-index: 4090;
  width: min(420px, calc(100vw - 24px));
  height: min(74dvh, 600px);
  min-height: 0;
  max-height: min(74dvh, 600px);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto auto;
  padding: 9px;
  border: 1px solid var(--line-strong);
  border-radius: 17px;
  color: var(--text);
  background: color-mix(in srgb, var(--surface-solid) 96%, transparent);
  box-shadow: 0 24px 68px rgba(28, 29, 33, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(22px) saturate(125%);
  -webkit-backdrop-filter: blur(22px) saturate(125%);
  contain: layout paint;
  overscroll-behavior: contain;
}

.workspace-assistant-panel.opening {
  animation: workspace-assistant-enter 180ms ease-out both;
}

@keyframes workspace-assistant-enter {
  from { opacity: 0; transform: translateX(18px) scale(0.985); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

.workspace-assistant-head {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 46px;
  padding: 1px 1px 8px;
  border-bottom: 1px solid var(--line);
}

.workspace-assistant-brandmark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  font-size: 0.75rem;
  font-weight: 800;
}

.workspace-assistant-head-copy {
  min-width: 0;
}

.workspace-assistant-head h2 {
  margin: 1px 0 2px;
  overflow: hidden;
  font-size: 0.9rem;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-assistant-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.workspace-assistant-eyebrow {
  display: block;
  color: var(--blue);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.workspace-assistant-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.workspace-assistant-close {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--text);
  background: var(--surface-solid);
  font: 800 0.72rem/1.2 var(--font-ui);
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.workspace-assistant-close > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-assistant-close > svg {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
}

.workspace-assistant-close:hover,
.workspace-assistant-close:focus-visible {
  border-color: var(--blue-border);
  background: var(--blue-soft);
  outline: none;
}

.workspace-assistant-close:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--blue) 30%, transparent);
  outline-offset: 2px;
}

.workspace-assistant-context {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}

.workspace-assistant-context::-webkit-scrollbar {
  display: none;
}

.workspace-assistant-context span {
  flex: 0 0 auto;
  max-width: 170px;
  overflow: hidden;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface-solid) 74%, var(--blue-soft));
  font-size: 0.68rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-assistant-messages {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 14px 20px;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--muted) 38%, transparent) transparent;
}

.workspace-assistant-message {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
}

.workspace-assistant-message.user.message-sending {
  transform-origin: 82% 100%;
  animation: workspace-assistant-message-send 460ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.workspace-assistant-message.user.message-sending .workspace-assistant-message-text {
  animation: workspace-assistant-message-send-surface 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.workspace-assistant-message.user.message-sending .workspace-assistant-message-avatar {
  animation: workspace-assistant-message-send-avatar 440ms 55ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes workspace-assistant-message-send {
  0% { opacity: 0; transform: translate3d(18px, 10px, 0) scale(0.965); }
  68% { opacity: 1; transform: translate3d(-2px, -1px, 0) scale(1.006); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes workspace-assistant-message-send-surface {
  0% { box-shadow: 0 0 0 rgba(10, 124, 255, 0); }
  55% { box-shadow: 0 9px 22px rgba(10, 124, 255, 0.3); }
  100% { box-shadow: 0 4px 12px rgba(10, 124, 255, 0.12); }
}

@keyframes workspace-assistant-message-send-avatar {
  0% { opacity: 0; transform: scale(0.72) rotate(7deg); }
  70% { opacity: 1; transform: scale(1.08) rotate(-2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

.workspace-assistant-message.assistant.response-enter {
  transform-origin: 20% 100%;
  animation: workspace-assistant-response-enter 480ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.workspace-assistant-message.assistant.response-enter .workspace-assistant-message-avatar {
  animation: workspace-assistant-response-avatar 560ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.workspace-assistant-message.assistant.response-enter .workspace-assistant-message-text {
  animation: workspace-assistant-response-surface 540ms 45ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes workspace-assistant-response-enter {
  0% { opacity: 0; transform: translate3d(-14px, 9px, 0) scale(0.97); }
  70% { opacity: 1; transform: translate3d(2px, -1px, 0) scale(1.006); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes workspace-assistant-response-avatar {
  0% { transform: scale(0.78) rotate(-5deg); }
  65% { transform: scale(1.06) rotate(1deg); }
  100% { transform: scale(1) rotate(0); }
}

@keyframes workspace-assistant-response-surface {
  0% { opacity: 0; filter: blur(3px); transform: translateY(6px); box-shadow: 0 0 0 rgba(10, 124, 255, 0); }
  62% { opacity: 1; filter: blur(0); transform: translateY(-1px); box-shadow: 0 8px 22px rgba(10, 124, 255, 0.14); }
  100% { opacity: 1; filter: blur(0); transform: translateY(0); box-shadow: none; }
}

.workspace-assistant-message.user {
  grid-template-columns: minmax(0, 1fr) 30px;
  padding-left: 40px;
}

.workspace-assistant-message.user .workspace-assistant-message-avatar {
  grid-column: 2;
  grid-row: 1;
  color: var(--blue);
  background: var(--blue-soft);
  box-shadow: none;
}

.workspace-assistant-message.user .workspace-assistant-message-body {
  grid-column: 1;
  grid-row: 1;
  align-items: flex-end;
}

.workspace-assistant-message-delivery {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 780;
  animation: workspace-assistant-delivery-enter 260ms 170ms ease both;
}

.workspace-assistant-message-delivery i {
  width: 6px;
  height: 6px;
  border: 2px solid color-mix(in srgb, var(--blue) 24%, transparent);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: workspace-assistant-delivery-spin 620ms linear infinite;
}

@keyframes workspace-assistant-delivery-enter {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes workspace-assistant-delivery-spin {
  to { transform: rotate(360deg); }
}

.workspace-assistant-message-avatar {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 850;
}

.workspace-assistant-message-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.workspace-assistant-message-role {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.workspace-assistant-message-text {
  max-width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 5px 14px 14px 14px;
  background: color-mix(in srgb, var(--surface-solid) 84%, var(--blue-soft));
  font-size: 0.875rem;
  line-height: 1.48;
  overflow-wrap: anywhere;
}

.workspace-assistant-message.user .workspace-assistant-message-text {
  border-color: color-mix(in srgb, var(--blue) 30%, var(--line));
  border-radius: 14px 5px 14px 14px;
  color: #fff;
  background: linear-gradient(145deg, #137ff1, #3f66e8);
}

.workspace-assistant-message-text p {
  margin: 0;
}

.workspace-assistant-message-text p + p {
  margin-top: 8px;
}

.workspace-assistant-source {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.workspace-assistant-source::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 5px 1px 1px;
  border-radius: 50%;
  background: var(--green);
}

.workspace-assistant-source.cloud::before {
  background: var(--blue);
}

.workspace-assistant-source.fallback {
  color: color-mix(in srgb, #b45309 76%, var(--muted));
}

.workspace-assistant-source.fallback::before {
  background: #f59e0b;
}

.workspace-assistant-answer-warnings {
  display: grid;
  gap: 4px;
  width: 100%;
}

.workspace-assistant-answer-warnings span {
  padding: 6px 8px;
  border: 1px solid color-mix(in srgb, #f59e0b 34%, var(--line));
  border-radius: 9px;
  color: color-mix(in srgb, #92400e 80%, var(--text));
  background: color-mix(in srgb, #fef3c7 54%, var(--surface-solid));
  font-size: 0.72rem;
  line-height: 1.35;
}

.workspace-assistant-action {
  width: 100%;
  display: grid;
  gap: 6px;
  margin-top: 7px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--blue) 34%, var(--line));
  border-radius: 14px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--blue-soft) 78%, var(--surface-solid)), color-mix(in srgb, var(--surface-solid) 94%, transparent));
  box-shadow: 0 8px 20px rgba(10, 124, 255, 0.08);
}

.workspace-assistant-action-kicker {
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.workspace-assistant-action strong {
  font-size: 0.8rem;
  line-height: 1.3;
}

.workspace-assistant-action p,
.workspace-assistant-action small {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.42;
}

.workspace-assistant-action small {
  display: block;
  padding-top: 3px;
  border-top: 1px solid var(--line);
}

.workspace-assistant-action-buttons {
  display: flex;
  gap: 7px;
  margin-top: 3px;
}

.workspace-assistant-action-buttons button {
  flex: 1 1 0;
  min-height: 32px;
}

.workspace-assistant-action.applied {
  border-color: color-mix(in srgb, var(--green) 45%, var(--line));
}

.workspace-assistant-action.dismissed {
  opacity: 0.68;
}

.workspace-assistant-action-status {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.workspace-assistant-thinking {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 5px 14px 14px 14px;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface-solid) 86%, var(--blue-soft));
  font-size: 0.75rem;
  font-weight: 650;
}

.workspace-assistant-message.thinking.entering {
  animation: workspace-assistant-thinking-enter 360ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes workspace-assistant-thinking-enter {
  from { opacity: 0; transform: translate3d(-10px, 7px, 0) scale(0.975); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

.workspace-assistant-thinking::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 22%, color-mix(in srgb, var(--blue-soft) 72%, transparent) 48%, transparent 74%);
  transform: translateX(-120%);
  animation: workspace-assistant-thinking-sheen 1.6s infinite ease-in-out;
  pointer-events: none;
}

.workspace-assistant-thinking-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 2px;
}

.workspace-assistant-thinking-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  animation: workspace-assistant-dot 1.1s infinite ease-in-out;
}

.workspace-assistant-thinking-dots i:nth-child(2) { animation-delay: 120ms; }
.workspace-assistant-thinking-dots i:nth-child(3) { animation-delay: 240ms; }

@keyframes workspace-assistant-dot {
  0%, 70%, 100% { opacity: 0.35; transform: translateY(0); }
  35% { opacity: 1; transform: translateY(-3px); }
}

@keyframes workspace-assistant-thinking-sheen {
  0%, 18% { transform: translateX(-120%); }
  72%, 100% { transform: translateX(120%); }
}

.workspace-assistant-quick-prompts {
  display: flex;
  gap: 6px;
  padding: 9px 12px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.workspace-assistant-quick-prompts::-webkit-scrollbar {
  display: none;
}

.workspace-assistant-quick-prompts button {
  flex: 0 0 auto;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--blue);
  background: color-mix(in srgb, var(--surface-solid) 86%, var(--blue-soft));
  font: 700 0.78rem/1.1 var(--font-ui);
  cursor: pointer;
}

.workspace-assistant-quick-prompts button:hover,
.workspace-assistant-quick-prompts button:focus-visible {
  border-color: var(--blue-border);
  background: var(--blue-soft);
  outline: none;
}

.workspace-assistant-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  padding: 10px 12px 8px;
}

.workspace-assistant-composer .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.workspace-assistant-composer textarea {
  min-height: 46px;
  max-height: 120px;
  resize: vertical;
  padding: 10px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  color: var(--text);
  background: var(--input-glass);
  font: 0.85rem/1.4 var(--font-ui);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.workspace-assistant-composer textarea:focus {
  border-color: var(--blue);
  outline: 3px solid var(--blue-soft);
}

.workspace-assistant-composer .primary-mini {
  min-width: 64px;
  min-height: 42px;
  border-radius: 12px;
}

.workspace-assistant-composer .primary-mini.sending {
  min-width: 88px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  opacity: 1;
  cursor: pointer;
}

.workspace-assistant-send-dots {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.workspace-assistant-send-dots i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  animation: workspace-assistant-send-dot 900ms infinite ease-in-out;
}

.workspace-assistant-send-dots i:nth-child(2) { animation-delay: 100ms; }
.workspace-assistant-send-dots i:nth-child(3) { animation-delay: 200ms; }

@keyframes workspace-assistant-send-dot {
  0%, 70%, 100% { opacity: 0.42; transform: translateY(0); }
  35% { opacity: 1; transform: translateY(-2px); }
}

.workspace-assistant-error {
  margin: 7px 12px 0;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--red) 38%, transparent);
  border-radius: 10px;
  color: var(--red);
  background: color-mix(in srgb, var(--red) 8%, var(--surface-solid));
  font-size: 0.75rem;
}

.workspace-assistant-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 0 13px 11px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.3;
}

.workspace-assistant-footer button {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font: 700 0.72rem/1 var(--font-ui);
  cursor: pointer;
}

.workspace-assistant-footer button:hover,
.workspace-assistant-footer button:focus-visible {
  color: var(--blue);
  outline: none;
}

html[data-theme="dark"] .workspace-assistant-panel {
  border-color: rgba(96, 165, 250, 0.26);
  background-color: rgba(15, 19, 27, 0.94);
}

html[data-theme="dark"] .workspace-assistant-panel {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 28px 70px rgba(0, 0, 0, 0.48);
}

html[data-theme="dark"] .workspace-assistant-launcher {
  border-color: rgba(96, 165, 250, 0.64);
  background: linear-gradient(145deg, #167be3, #075bb3);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

html[data-theme="dark"] .workspace-assistant-launcher:hover,
html[data-theme="dark"] .workspace-assistant-launcher:focus-visible {
  border-color: #93c5fd;
  background: linear-gradient(145deg, #258bf2, #0969c9);
}

@media (max-width: 1440px) and (min-width: 821px) {
  html[data-workspace="plant-room-planner"] #workspaceAssistantRoot {
    --workspace-assistant-bottom-offset: calc(106px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 720px) {
  #workspaceAssistantRoot {
    --workspace-assistant-bottom-offset: calc(62px + env(safe-area-inset-bottom, 0px));
    --workspace-assistant-edge-offset: max(8px, env(safe-area-inset-right, 0px));
    --workspace-assistant-top-clearance: calc(68px + env(safe-area-inset-top, 0px));
  }

  html[data-workspace="pricing-portal"] #workspaceAssistantRoot,
  html[data-workspace="programme"] #workspaceAssistantRoot,
  html[data-workspace="commissioning"] #workspaceAssistantRoot {
    --workspace-assistant-bottom-offset: max(8px, env(safe-area-inset-bottom, 0px));
  }

  .workspace-assistant-launcher {
    width: 44px;
    height: 44px;
    min-height: 44px;
  }

  .workspace-assistant-panel {
    left: max(6px, env(safe-area-inset-left, 0px));
    right: max(6px, env(safe-area-inset-right, 0px));
    bottom: var(--workspace-assistant-panel-bottom-offset);
    width: auto;
    height: min(70dvh, 620px);
    min-height: 0;
    max-height: min(70dvh, 620px);
    border-radius: 17px;
  }

  .workspace-assistant-head {
    padding: 1px 1px 8px;
  }

  .workspace-assistant-context {
    padding-inline: 11px;
  }

  .workspace-assistant-messages {
    padding: 13px 11px 17px;
  }

  .workspace-assistant-message.user {
    padding-left: 22px;
  }

  .workspace-assistant-composer textarea {
    min-height: 44px;
    font-size: 16px;
  }

  .workspace-assistant-quick-prompts button {
    min-height: 36px;
  }
}

@media (max-width: 820px) {
  html[data-workspace="floor"] #workspaceAssistantRoot,
  html[data-workspace="schematic"] #workspaceAssistantRoot,
  html[data-workspace="plant-room-planner"] #workspaceAssistantRoot,
  html[data-workspace="three"] #workspaceAssistantRoot {
    --workspace-assistant-panel-bottom-offset: 0px;
  }
}

@media (max-width: 640px) {
  .workspace-assistant-panel {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    height: calc(100dvh - 112px);
    min-height: 0;
    max-height: calc(100dvh - 112px);
    padding: 10px 10px max(10px, env(safe-area-inset-bottom, 0px));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 20px 20px 0 0;
  }

  .workspace-assistant-head {
    position: relative;
    z-index: 2;
    background: color-mix(in srgb, var(--surface-solid) 96%, transparent);
  }
}

@media (max-width: 360px) {
  .workspace-assistant-close {
    width: 44px;
    padding: 0;
  }

  .workspace-assistant-close > span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .workspace-assistant-panel,
  .workspace-assistant-launcher,
  .workspace-assistant-message.user.message-sending,
  .workspace-assistant-message.user.message-sending .workspace-assistant-message-avatar,
  .workspace-assistant-message.user.message-sending .workspace-assistant-message-text,
  .workspace-assistant-message-delivery,
  .workspace-assistant-message-delivery i,
  .workspace-assistant-message.assistant.response-enter,
  .workspace-assistant-message.assistant.response-enter .workspace-assistant-message-avatar,
  .workspace-assistant-message.assistant.response-enter .workspace-assistant-message-text,
  .workspace-assistant-message.thinking,
  .workspace-assistant-message.thinking .workspace-assistant-mascot,
  .workspace-assistant-panel.opening .workspace-assistant-brandmark,
  :is(.workspace-assistant-launcher-icon, .workspace-assistant-brandmark) .workspace-assistant-mascot-eye,
  :is(.workspace-assistant-launcher-icon, .workspace-assistant-brandmark) .workspace-assistant-mascot-spark,
  #workspaceAssistantRoot.busy :is(.workspace-assistant-launcher-icon, .workspace-assistant-brandmark) .workspace-assistant-mascot,
  .workspace-assistant-thinking-dots i,
  .workspace-assistant-thinking::after,
  .workspace-assistant-send-dots i {
    animation: none !important;
    transition: none !important;
  }
}

/* Product library responsive layout
   Keep each library usable inside its actual pane, not only at full viewport width. */

.product-library-rail,
.product-library-main,
.product-detail-panel,
.dashboard-product-mail-sidebar,
.dashboard-product-mail-list-pane,
.dashboard-product-mail-reader,
.plant-room-product-library-results {
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

.product-result-card,
.dashboard-product-mail-item {
  content-visibility: auto;
  contain-intrinsic-size: 148px;
}

.product-library-results-surface,
.dashboard-product-mail-results-surface {
  min-width: 0;
  min-height: 0;
}

.dashboard-product-mail-results-surface {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
}

.dashboard-product-mail-results-surface > .dashboard-product-mail-list {
  min-height: 0;
  height: 100%;
}

/* Compact three-pane catalogue for laptops and narrower desktop windows. */
@media (max-width: 1440px) {
  .product-library-body .product-subcategory-tabs-main {
    display: flex;
    flex-wrap: wrap;
  }

  .product-subcategory-tabs-main button {
    flex: 0 0 auto;
  }
}

@media (max-width: 1440px) and (min-width: 1051px) {
  .product-library-body {
    grid-template-columns: minmax(210px, 240px) minmax(330px, 1.1fr) minmax(300px, 0.9fr);
    gap: 10px;
  }

  .product-library-body.sidebar-collapsed {
    grid-template-columns: 66px minmax(360px, 1.15fr) minmax(320px, 0.85fr);
    gap: 10px;
  }

  .product-library-body .product-library-rail {
    padding: 10px;
  }

  .product-library-body.sidebar-collapsed .product-library-rail {
    padding: 10px 7px;
  }

  .product-library-body.sidebar-collapsed .product-library-rail-head > span,
  .product-library-body.sidebar-collapsed .product-category-card span,
  .product-library-body.sidebar-collapsed .product-category-card em,
  .product-library-body.sidebar-collapsed .product-library-sidebar-subcategories {
    display: none;
  }

  .product-library-body.sidebar-collapsed .product-library-rail-head {
    display: flex;
  }

  .product-library-body.sidebar-collapsed .product-category-list {
    gap: 7px;
  }

  .product-library-body.sidebar-collapsed .product-category-card {
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 44px;
    padding: 8px;
  }

  .product-library-body.sidebar-collapsed .product-category-card i svg {
    width: 22px;
    height: 22px;
  }

  .product-result-list {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  }

  .product-range-list {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  }
}

/* Tablet product library: categories become a compact horizontal rail while
   results and the selected product use the full width in a readable stack. */
@media (max-width: 1050px) and (min-width: 761px) {
  .product-library-popover {
    inset: 64px 10px 10px;
    min-height: 0;
    gap: 9px;
    padding: 10px;
  }

  .product-library-body,
  .product-library-body.sidebar-collapsed {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    align-content: start;
    gap: 9px;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 3px;
    -webkit-overflow-scrolling: touch;
  }

  .product-library-rail {
    grid-column: 1 / -1;
    grid-row: 1;
    height: auto;
    min-height: 0;
    display: block;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 7px;
    scrollbar-width: thin;
  }

  .product-library-rail-head,
  .product-library-sidebar-subcategories {
    display: none;
  }

  .product-category-list,
  .product-library-body.sidebar-collapsed .product-category-list {
    display: flex;
    gap: 7px;
    min-width: max-content;
  }

  .product-category-card,
  .product-category-card-compact,
  .product-library-body.sidebar-collapsed .product-category-card {
    flex: 0 0 164px;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    justify-items: stretch;
    min-height: 46px;
    padding: 7px 8px;
    scroll-snap-align: start;
  }

  .product-library-body.sidebar-collapsed .product-category-card span {
    display: grid;
  }

  .product-library-body.sidebar-collapsed .product-category-card em {
    display: grid;
  }

  .product-category-card small {
    display: none;
  }

  .product-library-main {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    height: auto;
    max-height: min(48dvh, 520px);
    overflow: auto;
  }

  .product-detail-panel {
    grid-column: 1;
    grid-row: 3;
    width: 100%;
    height: auto;
    overflow: visible;
  }

  .product-result-list,
  .product-range-list {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  }

  .product-range-card {
    grid-template-columns: 94px minmax(0, 1fr);
  }

  .product-range-card .product-photo-image {
    min-height: 88px;
    padding: 8px;
  }

  .product-range-card .product-photo-image > img:not(.product-brand-logo) {
    height: 62px;
  }

  .product-detail-panel .product-photo {
    min-height: 210px;
    height: min(28vh, 260px);
  }

  .product-detail-panel .product-photo-image > img:not(.product-brand-logo),
  .product-detail-panel .product-image-fallback {
    height: min(20vh, 180px);
    min-height: 150px;
  }
}

/* Phone product library: one page scroll owns the whole modal. */
@media (max-width: 760px) {
  .product-library-popover {
    inset: 58px 6px max(6px, env(safe-area-inset-bottom));
    min-height: 0;
    gap: 8px;
    padding: 8px;
  }

  .product-library-head {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 8px;
  }

  .product-library-head > div:first-child {
    min-width: 0;
    flex: 1 1 220px;
  }

  .product-library-head span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .product-library-head-actions {
    flex: 1 1 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    min-width: 0;
  }

  .product-library-head-actions button:not(#closeProductLibraryPanel) {
    min-width: 0;
    min-height: 44px;
    padding-inline: 9px;
  }

  .product-library-body,
  .product-library-body.sidebar-collapsed {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    align-content: start;
    gap: 8px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .product-library-rail,
  .product-library-main,
  .product-detail-panel {
    width: 100%;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .product-library-rail,
  .product-library-body.sidebar-collapsed .product-library-rail {
    display: block;
    padding: 7px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }

  .product-library-rail::-webkit-scrollbar {
    display: none;
  }

  .product-library-rail-head,
  .product-library-sidebar-subcategories {
    display: none;
  }

  .product-category-list,
  .product-library-body.sidebar-collapsed .product-category-list {
    display: flex;
    gap: 6px;
    min-width: max-content;
  }

  .product-category-card,
  .product-category-card-compact,
  .product-library-body.sidebar-collapsed .product-category-card {
    flex: 0 0 138px;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    justify-items: stretch;
    min-height: 44px;
    padding: 6px 7px;
  }

  .product-library-body.sidebar-collapsed .product-category-card span {
    display: grid;
  }

  .product-category-card small,
  .product-category-card em,
  .product-library-body.sidebar-collapsed .product-category-card em {
    display: none;
  }

  .product-library-main,
  .product-detail-panel {
    padding: 9px;
  }

  .product-library-title-card,
  .product-search-row,
  .product-filter-grid,
  .product-result-list,
  .product-range-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-results-head,
  .product-model-group-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-model-group-head small {
    text-align: left;
  }

  .product-result-card,
  .product-range-card {
    grid-template-columns: 82px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 8px;
    padding: 8px;
  }

  .product-result-card .product-photo {
    grid-column: 1;
    grid-row: 1 / span 2;
    min-height: 82px;
    height: 100%;
    padding: 7px;
  }

  .product-result-card .product-photo-image > img:not(.product-brand-logo),
  .product-range-card .product-photo-image > img:not(.product-brand-logo) {
    height: 58px;
  }

  .product-card-metrics,
  .product-range-card .product-card-metrics {
    grid-column: 2;
    grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  }

  .product-detail-panel .product-photo {
    min-height: 180px;
    height: min(30vh, 230px);
    padding: 12px;
  }

  .product-detail-panel .product-photo-image > img:not(.product-brand-logo),
  .product-detail-panel .product-image-fallback {
    height: min(22vh, 170px);
    min-height: 132px;
  }

  .product-detail-title strong {
    overflow-wrap: anywhere;
  }

  .product-document-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-subcategory-tabs button,
  .product-clear-filters,
  .product-range-cta,
  .product-detail-select {
    min-height: 44px;
  }

  .product-search input,
  .product-filter-grid input,
  .product-filter-grid select,
  .company-inline-field input,
  .company-inline-field textarea,
  .account-menu-popover :is(input, select, textarea),
  .auth-gate-card :is(input, select, textarea),
  .dashboard-company-workspace :is(input, select, textarea),
  .dashboard-company-contact-card > label > input {
    min-height: 44px;
    font-size: 16px !important;
  }
}

@media (max-width: 440px) {
  .product-library-head-actions {
    justify-content: space-between;
    width: 100%;
  }

  .product-library-head-actions button:not(#closeProductLibraryPanel) {
    flex: 1 1 auto;
  }

  .product-result-card,
  .product-range-card {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .product-result-card .product-photo {
    min-height: 70px;
  }

  .product-result-card .product-photo-image > img:not(.product-brand-logo),
  .product-range-card .product-photo-image > img:not(.product-brand-logo) {
    height: 48px;
  }

  .product-card-metrics,
  .product-range-card .product-card-metrics {
    grid-column: 1 / -1;
  }

  .product-detail-facts {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Dashboard catalogue: compact rather than horizontally scrolling on tablet. */
@media (max-width: 1240px) and (min-width: 981px) {
  .dashboard-product-mail-layout {
    grid-template-columns: minmax(200px, 220px) minmax(280px, 330px) minmax(0, 1fr);
    overflow: hidden;
  }

  .dashboard-product-mail-layout.sidebar-collapsed {
    grid-template-columns: 66px minmax(280px, 350px) minmax(0, 1fr);
    overflow: hidden;
  }

  .dashboard-product-mail-sidebar {
    padding: 12px 9px;
    gap: 12px;
  }

  .dashboard-product-mail-layout.sidebar-collapsed .dashboard-product-mail-sidebar {
    padding: 12px 7px;
    gap: 8px;
  }

  .dashboard-product-mail-layout.sidebar-collapsed .dashboard-product-mailbox-heading,
  .dashboard-product-mail-layout.sidebar-collapsed .dashboard-product-mailbox-row span,
  .dashboard-product-mail-layout.sidebar-collapsed .dashboard-product-mailbox-row em,
  .dashboard-product-mail-layout.sidebar-collapsed .dashboard-product-mailbox-subcategories {
    display: none;
  }

  .dashboard-product-mail-layout.sidebar-collapsed .dashboard-product-mailbox-section {
    gap: 7px;
  }

  .dashboard-product-mail-layout.sidebar-collapsed .dashboard-product-mailbox-row {
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 44px;
    padding: 8px;
  }

  .dashboard-product-mail-layout.sidebar-collapsed .dashboard-product-mailbox-row i svg {
    width: 22px;
    height: 22px;
  }

  .dashboard-product-mail-reader {
    padding: 14px;
  }

  .dashboard-product-mail-reader-hero,
  .dashboard-product-mail-layout.sidebar-collapsed .dashboard-product-mail-reader-hero {
    grid-template-columns: minmax(200px, 0.38fr) minmax(0, 1fr);
  }

  .dashboard-product-mail-reader-hero .product-photo {
    min-height: 190px;
  }

  .dashboard-product-mail-reader-hero .product-photo-image > img:not(.product-brand-logo) {
    height: 136px;
  }
}

/* Dashboard catalogue becomes a clean single-scroll document on mobile/tablet. */
@media (max-width: 980px) {
  .dashboard-product-library-workspace.mail-mode {
    overflow-y: auto;
    overflow-x: hidden;
  }

  .dashboard-product-library-header {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-product-library-header-actions {
    width: 100%;
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }

  .dashboard-product-library-tabs {
    flex: 0 0 auto;
  }

  .dashboard-product-library-dashboard-btn {
    flex: 0 0 auto;
  }

  .dashboard-product-mail {
    min-height: 0;
    height: auto;
    overflow: visible;
  }

  .dashboard-product-mail-layout,
  .dashboard-product-mail-layout.sidebar-collapsed {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    overflow: visible;
  }

  .dashboard-product-mail-sidebar,
  .dashboard-product-mail-layout.sidebar-collapsed .dashboard-product-mail-sidebar {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
  }

  .dashboard-product-mailbox-heading {
    display: none;
  }

  .dashboard-product-mailbox-section,
  .dashboard-product-mail-layout.sidebar-collapsed .dashboard-product-mailbox-section {
    display: flex;
    flex: 0 0 auto;
    gap: 6px;
  }

  .dashboard-product-mailbox-subcategories,
  .dashboard-product-mail-layout.sidebar-collapsed .dashboard-product-mailbox-subcategories {
    display: flex;
    gap: 6px;
    padding: 0;
    border: 0;
  }

  .dashboard-product-mailbox-row,
  .dashboard-product-mailbox-row.compact,
  .dashboard-product-mail-layout.sidebar-collapsed .dashboard-product-mailbox-row {
    flex: 0 0 auto;
    width: auto;
    min-width: 116px;
    max-width: 180px;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    justify-items: stretch;
    min-height: 42px;
    padding: 7px 9px;
    scroll-snap-align: start;
  }

  .dashboard-product-mail-layout.sidebar-collapsed .dashboard-product-mailbox-row span,
  .dashboard-product-mail-layout.sidebar-collapsed .dashboard-product-mailbox-row em {
    display: grid;
  }

  .dashboard-product-mailbox-row small {
    display: none;
  }

  .dashboard-product-mail-list-pane,
  .dashboard-product-mail-reader {
    overflow: visible;
  }

  .dashboard-product-mail-results-surface {
    display: block;
    overflow: visible;
  }

  .dashboard-product-mail-results-surface > .dashboard-product-mail-list {
    height: auto;
  }

  .dashboard-product-mail-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    overflow: visible;
  }

  .dashboard-product-mail-reader-head h2,
  .dashboard-product-mail-reader-head small {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .dashboard-product-mail-reader-hero,
  .dashboard-product-mail-layout.sidebar-collapsed .dashboard-product-mail-reader-hero,
  .dashboard-product-mail-copy-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-product-mail-reader-hero .product-photo {
    min-height: 180px;
    height: min(32vh, 260px);
  }

  .dashboard-product-mail-reader-hero .product-photo-image > img:not(.product-brand-logo) {
    height: min(24vh, 178px);
  }
}

@media (max-width: 600px) {
  .dashboard-product-library-workspace.mail-mode {
    padding: 0 7px 10px;
  }

  .dashboard-product-library-header h1 {
    font-size: 21px;
  }

  .dashboard-product-library-tabs button {
    min-height: 34px;
    padding-inline: 9px;
  }

  .dashboard-product-mail-filter-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-product-mail-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-product-mail-reader {
    gap: 10px;
    padding: 11px;
  }

  .dashboard-product-mail-reader-head {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 9px;
  }

  .dashboard-product-mail-reader-head h2 {
    font-size: 20px;
    line-height: 1.12;
  }

  .dashboard-product-mail-reader-actions {
    width: 100%;
  }

  .dashboard-product-mail-reader-actions button {
    flex: 1 1 auto;
  }

  .dashboard-product-mail-reader-summary p {
    font-size: 14px;
  }

  .dashboard-product-mail-reader-hero .product-photo {
    min-height: 160px;
    height: min(28vh, 220px);
  }

  .dashboard-product-mail-reader-hero .product-photo-image > img:not(.product-brand-logo) {
    height: min(20vh, 148px);
  }
}

/* Plant-room product drawer: retain the drawer on desktop, use the available
   stage on phones and let controls/cards grow rather than clip. */
@media (max-width: 720px) {
  .plant-room-product-library-drawer {
    inset: 48px 6px max(6px, env(safe-area-inset-bottom));
    width: auto;
  }

  .plant-room-product-library-drawer .plant-room-product-library-panel {
    min-width: 0;
  }

  .plant-room-product-library-drawer .plant-room-product-library-panel .panel-head {
    gap: 8px;
    min-height: 48px;
    padding: 7px 9px;
  }

  .plant-room-product-library-panel .panel-head div {
    min-width: 0;
  }

  .plant-room-product-library-panel .panel-head small {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .plant-room-product-library-category-shell {
    padding-inline: 5px;
  }

  .plant-room-product-library-drawer .plant-room-product-library-categories button {
    flex-basis: 120px;
  }

  .plant-room-product-library-drawer .plant-room-product-library-main {
    padding: 8px;
  }

  .plant-room-product-library-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .plant-room-product-library-filters button {
    grid-column: 1 / -1;
  }

  .plant-room-product-library-drawer .plant-room-product-library-card {
    grid-template-columns: 64px minmax(0, 1fr);
    height: auto;
    min-height: 104px;
    max-height: none;
    padding: 8px;
  }

  .plant-room-product-library-drawer .plant-room-product-thumb,
  .plant-room-product-library-drawer .plant-room-product-thumb .product-photo {
    width: 64px;
    min-width: 64px;
    height: 64px;
    min-height: 64px;
  }

  .plant-room-product-library-drawer .plant-room-product-thumb img {
    width: 56px;
    height: 56px;
  }

  .plant-room-product-library-drawer .plant-room-product-library-card .pipe-compact-spec {
    flex-wrap: wrap;
    max-height: 40px;
  }

  .plant-room-product-library-drawer .plant-room-product-library-card .pipe-compact-spec span {
    flex: 1 1 74px;
    max-width: 100%;
  }
}

@media (max-width: 480px), (hover: none) and (pointer: coarse) {
  .plant-room-product-library-scroll-shell,
  .plant-room-product-library-subcategory-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .plant-room-scroll-button {
    display: none;
  }
}

/* Premium feature previews and plan comparison. */
.dashboard-home .dashboard-premium-tile {
  position: relative;
  z-index: 5;
  overflow: visible;
  contain: none;
  isolation: isolate;
}

.dashboard-premium-addon-wrap {
  position: relative;
  min-width: 0;
}

.dashboard-premium-addon-wrap .dashboard-premium-addon {
  width: 100%;
  grid-template-columns: 34px minmax(0, 1fr) auto 16px;
  cursor: pointer;
  color: inherit;
  font: inherit;
  text-align: left;
  appearance: none;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.dashboard-premium-addon-wrap .dashboard-premium-addon:hover,
.dashboard-premium-addon-wrap .dashboard-premium-addon:focus-visible {
  border-color: color-mix(in srgb, var(--blue) 42%, var(--line));
  background: color-mix(in srgb, var(--blue) 6%, var(--surface-solid));
  box-shadow: 0 9px 22px rgba(15, 23, 42, 0.10);
  transform: translateY(-1px);
  outline: none;
}

.dashboard-premium-addon-wrap .dashboard-premium-addon:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 22%, transparent), 0 9px 22px rgba(15, 23, 42, 0.10);
}

.dashboard-premium-addon-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--blue) 22%, var(--line));
  border-radius: 9px;
  background: color-mix(in srgb, var(--blue) 8%, var(--surface-solid));
  color: var(--blue);
}

.dashboard-premium-addon-icon svg {
  width: 17px;
  height: 17px;
}

.dashboard-premium-addon-arrow {
  color: var(--muted);
  font-size: 15px;
  font-weight: 900;
  transition: color 160ms ease, transform 160ms ease;
}

.dashboard-premium-addon:hover .dashboard-premium-addon-arrow,
.dashboard-premium-addon:focus-visible .dashboard-premium-addon-arrow {
  color: var(--blue);
  transform: translateX(2px);
}

.dashboard-premium-see-all {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--blue) 34%, var(--line));
  border-radius: 12px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--blue) 9%, var(--surface-solid)), color-mix(in srgb, #7c3aed 6%, var(--surface-solid)));
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.dashboard-premium-see-all > span:first-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.dashboard-premium-see-all strong {
  font-size: 12px;
  font-weight: 900;
}

.dashboard-premium-see-all small {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 720;
}

.dashboard-premium-see-all > span:last-child {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}

.dashboard-premium-see-all:hover,
.dashboard-premium-see-all:focus-visible {
  border-color: color-mix(in srgb, var(--blue) 58%, var(--line));
  box-shadow: 0 10px 24px rgba(0, 113, 227, 0.13);
  transform: translateY(-1px);
  outline: none;
}

.dashboard-premium-feature-preview {
  position: absolute;
  top: 50%;
  right: calc(100% + 16px);
  z-index: 150;
  width: min(420px, calc(100vw - 48px));
  display: grid;
  grid-template-columns: 156px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--blue) 28%, var(--line));
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface-solid) 96%, transparent);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22), 0 2px 8px rgba(15, 23, 42, 0.08);
  opacity: 0;
  pointer-events: none;
  transform: translate(8px, -50%) scale(0.98);
  transform-origin: right center;
  visibility: hidden;
  transition: opacity 150ms ease, transform 180ms ease, visibility 0s linear 180ms;
  backdrop-filter: blur(22px) saturate(1.12);
  -webkit-backdrop-filter: blur(22px) saturate(1.12);
}

.dashboard-premium-feature-preview::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -7px;
  width: 12px;
  height: 12px;
  border-top: 1px solid color-mix(in srgb, var(--blue) 28%, var(--line));
  border-right: 1px solid color-mix(in srgb, var(--blue) 28%, var(--line));
  background: inherit;
  transform: translateY(-50%) rotate(45deg);
}

.dashboard-premium-addon-wrap:hover .dashboard-premium-feature-preview,
.dashboard-premium-addon-wrap:focus-within .dashboard-premium-feature-preview {
  opacity: 1;
  transform: translate(0, -50%) scale(1);
  visibility: visible;
  transition-delay: 90ms, 90ms, 0s;
}

.dashboard-premium-feature-preview-copy {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 5px;
}

.dashboard-premium-feature-preview-copy > small {
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-premium-feature-preview-copy > strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 920;
  line-height: 1.2;
}

.dashboard-premium-feature-preview-copy > span:not(.dashboard-premium-preview-points),
.dashboard-premium-feature-preview-copy > em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 680;
  line-height: 1.35;
}

.dashboard-premium-feature-preview-copy > em {
  padding-top: 3px;
  border-top: 1px solid var(--line);
  font-size: 11px;
}

.dashboard-premium-preview-points {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.dashboard-premium-preview-points i {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--blue) 8%, var(--surface-soft));
  color: var(--text);
  font-size: 10.5px;
  font-style: normal;
  font-weight: 800;
}

.dashboard-premium-preview-points svg {
  width: 9px;
  height: 9px;
  color: #16a34a;
}

.dashboard-premium-preview-visual {
  position: relative;
  align-self: center;
  width: 100%;
  min-height: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--blue) 18%, var(--line));
  border-radius: 12px;
  background: var(--surface-soft);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
}

.dashboard-premium-preview-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.dashboard-premium-preview-visual > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.dashboard-premium-plans-backdrop {
  position: fixed;
  inset: 0;
  z-index: 4300;
  display: grid;
  place-items: center;
  padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  background: rgba(9, 16, 31, 0.68);
  animation: premiumBackdropIn 180ms ease both;
  backdrop-filter: blur(14px) saturate(0.92);
  -webkit-backdrop-filter: blur(14px) saturate(0.92);
}

.dashboard-premium-plans-popout {
  position: relative;
  width: min(1120px, calc(100vw - 40px));
  max-height: min(900px, calc(100dvh - 40px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 24px;
  background: var(--surface-solid);
  box-shadow: 0 38px 100px rgba(2, 8, 23, 0.42);
  animation: premiumPlansIn 220ms cubic-bezier(.2,.8,.2,1) both;
  outline: none;
}

.dashboard-premium-plans-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 6;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--text) 16%, transparent);
  border-radius: 13px;
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
  color: var(--text);
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(15,23,42,.08);
  backdrop-filter: blur(12px);
}

.dashboard-premium-plans-close:hover,
.dashboard-premium-plans-close:focus-visible {
  border-color: var(--blue);
  color: var(--blue);
  outline: 3px solid color-mix(in srgb, var(--blue) 20%, transparent);
  outline-offset: 2px;
}

.dashboard-premium-plans-scroll {
  max-height: min(900px, calc(100dvh - 40px));
  display: grid;
  grid-template-columns: minmax(330px, .82fr) minmax(540px, 1.35fr);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.dashboard-premium-plans-hero {
  position: relative;
  min-height: 720px;
  display: flex;
  flex-direction: column;
  gap: 17px;
  overflow: hidden;
  padding: 38px 34px 32px;
  background: radial-gradient(circle at 18% 15%, rgba(8,124,255,.28), transparent 34%), radial-gradient(circle at 82% 62%, rgba(124,58,237,.25), transparent 40%), linear-gradient(155deg, #0b1730 0%, #111b37 52%, #17152d 100%);
  color: #fff;
}

.dashboard-premium-plans-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255,255,255,.08), transparent 28%, transparent 70%, rgba(255,255,255,.04));
}

.dashboard-premium-plans-brand,
.dashboard-premium-plans-eyebrow,
.dashboard-premium-plans-hero h2,
.dashboard-premium-plans-hero p,
.dashboard-premium-hero-art,
.dashboard-premium-access-card {
  position: relative;
  z-index: 1;
}

.dashboard-premium-plans-brand .brand-logo-wordmark {
  max-width: 166px;
}

.dashboard-premium-plans-brand img {
  width: 164px;
  height: auto;
  filter: brightness(0) invert(1);
}

.dashboard-premium-plans-eyebrow {
  color: #7dd3fc;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.dashboard-premium-plans-hero h2 {
  max-width: 370px;
  margin: 0;
  color: #fff;
  font-size: clamp(28px, 3.1vw, 45px);
  font-weight: 950;
  letter-spacing: -.045em;
  line-height: 1.02;
}

.dashboard-premium-plans-hero p {
  max-width: 380px;
  margin: 0;
  color: #cad6eb;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.55;
}

.dashboard-premium-hero-art {
  min-height: 235px;
  margin-block: 2px auto;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(8,124,255,.09), rgba(124,58,237,.12));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.premium-hero-grid {
  position: absolute;
  inset: -25px;
  opacity: .44;
  background-image: linear-gradient(30deg, transparent 49.4%, rgba(125,211,252,.28) 50%, transparent 50.6%), linear-gradient(150deg, transparent 49.4%, rgba(125,211,252,.28) 50%, transparent 50.6%);
  background-size: 50px 30px;
  transform: perspective(420px) rotateX(57deg) translateY(42px) scale(1.3);
}

.premium-hero-building,
.premium-hero-ai,
.premium-hero-report {
  position: absolute;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 18px 30px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.22);
}

.premium-hero-building {
  left: 50%;
  top: 46%;
  width: 90px;
  height: 90px;
  border-radius: 24px;
  background: linear-gradient(145deg, #087cff, #0858c8);
  color: #fff;
  transform: translate(-50%, -50%) rotate(-6deg);
}

.premium-hero-building svg { width: 48px; height: 48px; }
.premium-hero-ai { left: 12%; top: 25%; width: 58px; height: 58px; border-radius: 18px; background: linear-gradient(145deg, #8b5cf6, #5b21b6); color: #fff; font-size: 18px; font-weight: 950; transform: rotate(7deg); }
.premium-hero-report { right: 11%; bottom: 20%; width: 62px; height: 76px; border-radius: 13px; background: linear-gradient(145deg, #fff, #dbeafe); color: #087cff; transform: rotate(8deg); }
.premium-hero-report svg { width: 31px; height: 31px; }
.premium-hero-route { position: absolute; left: 21%; right: 20%; top: 48%; height: 3px; border-radius: 4px; background: linear-gradient(90deg, #8b5cf6, #38bdf8 48%, #fff); box-shadow: 0 0 18px rgba(56,189,248,.55); transform: rotate(9deg); }

.dashboard-premium-access-card {
  display: grid;
  gap: 5px;
  padding: 15px 16px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 15px;
  background: rgba(255,255,255,.09);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.09);
  backdrop-filter: blur(14px);
}

.dashboard-premium-access-card.included,
.dashboard-premium-access-card.active { border-color: rgba(74,222,128,.36); background: rgba(22,163,74,.14); }
.dashboard-premium-access-card small { color: #7dd3fc; font-size: 11px; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
.dashboard-premium-access-card.included small,
.dashboard-premium-access-card.active small { color: #86efac; }
.dashboard-premium-access-card strong { color: #fff; font-size: 14px; font-weight: 900; }
.dashboard-premium-access-card span { color: #cbd5e1; font-size: 12.5px; font-weight: 650; line-height: 1.45; }

.dashboard-premium-plans-detail {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 24px;
  padding: 42px 34px 34px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--blue) 3%, var(--surface-solid)), var(--surface-solid) 190px);
}

.dashboard-premium-plans-detail-head,
.dashboard-premium-payment-head,
.dashboard-premium-active-plan {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.dashboard-premium-plans-detail-head > div,
.dashboard-premium-payment-head > div {
  display: grid;
  gap: 3px;
}

.dashboard-premium-plans-detail-head span:first-child,
.dashboard-premium-payment-head > div > span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.dashboard-premium-plans-detail h3 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 930;
  letter-spacing: -.025em;
}

.dashboard-premium-security-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.dashboard-premium-security-note svg { width: 12px; height: 12px; }

.dashboard-premium-comparison-wrap {
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-solid);
  box-shadow: 0 14px 34px rgba(15,23,42,.07);
  outline: none;
}

.dashboard-premium-comparison-wrap:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 20%, transparent), 0 14px 34px rgba(15,23,42,.07);
}

.dashboard-premium-comparison {
  width: 100%;
  min-width: 520px;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--text);
}

.dashboard-premium-comparison th,
.dashboard-premium-comparison td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
}

.dashboard-premium-comparison tr:last-child th,
.dashboard-premium-comparison tr:last-child td { border-bottom: 0; }
.dashboard-premium-comparison thead th { background: color-mix(in srgb, var(--surface-soft) 78%, transparent); color: var(--muted); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.dashboard-premium-comparison thead th:first-child { width: 68%; text-align: left; }
.dashboard-premium-comparison tbody th { display: grid; gap: 2px; text-align: left; }
.dashboard-premium-comparison tbody th strong { color: var(--text); font-size: 13px; font-weight: 850; }
.dashboard-premium-comparison tbody th small { color: var(--muted); font-size: 11px; font-weight: 650; line-height: 1.35; }
.dashboard-premium-comparison .premium-column { background: color-mix(in srgb, var(--blue) 5%, var(--surface-solid)); }
.dashboard-premium-comparison thead .premium-column { color: var(--blue); }
.premium-comparison-mark { width: 24px; height: 24px; display: inline-grid; place-items: center; border-radius: 50%; color: var(--muted); font-size: 15px; font-weight: 900; }
.premium-comparison-mark.included { background: #eaf8ef; color: #15803d; }
.premium-comparison-mark svg { width: 13px; height: 13px; }

.dashboard-premium-payment {
  display: grid;
  gap: 14px;
  padding-top: 2px;
}

.dashboard-premium-payment-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-premium-payment-option {
  position: relative;
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: color-mix(in srgb, var(--surface-soft) 64%, var(--surface-solid));
}

.dashboard-premium-payment-option.recommended {
  border-color: color-mix(in srgb, var(--blue) 48%, var(--line));
  box-shadow: 0 12px 26px rgba(0,113,227,.10);
}

.dashboard-premium-recommended {
  position: absolute;
  right: 11px;
  top: 10px;
  padding: 3px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--blue) 11%, var(--surface-solid));
  color: var(--blue) !important;
  font-size: 10px !important;
  font-weight: 900 !important;
}

.dashboard-premium-payment-option > small { color: var(--blue); font-size: 11px; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
.dashboard-premium-payment-option > strong { color: var(--text); font-size: 18px; font-weight: 930; }
.dashboard-premium-payment-option > span:not(.dashboard-premium-recommended) { color: var(--muted); font-size: 12px; font-weight: 700; }
.dashboard-premium-payment-option > em { min-height: 26px; color: var(--muted); font-size: 11.5px; font-style: normal; font-weight: 650; line-height: 1.35; }
.dashboard-premium-payment-option button { width: 100%; min-height: 38px; margin-top: 5px; }

.dashboard-premium-active-plan,
.dashboard-premium-admin-included {
  padding: 16px;
  border: 1px solid color-mix(in srgb, #16a34a 28%, var(--line));
  border-radius: 15px;
  background: color-mix(in srgb, #16a34a 7%, var(--surface-solid));
}

.dashboard-premium-active-plan > span { display: grid; gap: 3px; }
.dashboard-premium-active-plan small { color: var(--muted); font-size: 11px; font-weight: 850; text-transform: uppercase; }
.dashboard-premium-active-plan strong { color: var(--text); font-size: 15px; font-weight: 900; }
.dashboard-premium-admin-included { display: flex; align-items: center; gap: 11px; }
.dashboard-premium-admin-included > svg { width: 26px; height: 26px; flex: 0 0 auto; color: #15803d; }
.dashboard-premium-admin-included > span { display: grid; gap: 3px; }
.dashboard-premium-admin-included strong { color: var(--text); font-size: 13px; font-weight: 900; }
.dashboard-premium-admin-included small { color: var(--muted); font-size: 12px; font-weight: 650; line-height: 1.4; }
.dashboard-premium-existing-billing { justify-self: start; }

@keyframes premiumBackdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes premiumPlansIn {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 1180px), (hover: none) {
  .dashboard-premium-feature-preview {
    display: none;
  }
}

@media (max-width: 900px) {
  .dashboard-premium-plans-scroll {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-premium-plans-hero {
    min-height: 510px;
  }

  .dashboard-premium-hero-art {
    min-height: 190px;
  }
}

@media (max-width: 640px) {
  .dashboard-premium-plans-backdrop {
    align-items: end;
    padding: env(safe-area-inset-top) 0 0;
  }

  .dashboard-premium-plans-popout {
    width: 100vw;
    max-height: 100dvh;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 22px 22px 0 0;
  }

  .dashboard-premium-plans-scroll {
    max-height: 100dvh;
  }

  .dashboard-premium-plans-hero,
  .dashboard-premium-plans-detail {
    padding: 28px 18px;
  }

  .dashboard-premium-plans-hero {
    min-height: 390px;
    padding-top: 48px;
  }

  .dashboard-premium-hero-art {
    min-height: 160px;
  }

  .dashboard-premium-comparison-wrap {
    overflow-x: hidden;
  }

  .dashboard-premium-comparison {
    min-width: 0;
    table-layout: fixed;
  }

  .dashboard-premium-comparison thead th:first-child {
    width: 58%;
  }

  .dashboard-premium-comparison th,
  .dashboard-premium-comparison td {
    padding: 9px 6px;
  }

  .dashboard-premium-plans-detail-head,
  .dashboard-premium-payment-head,
  .dashboard-premium-active-plan {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-premium-security-note { display: none; }
  .dashboard-premium-payment-options { grid-template-columns: minmax(0, 1fr); }
  .dashboard-premium-addon-wrap .dashboard-premium-addon { grid-template-columns: 32px minmax(0, 1fr) auto; }
  .dashboard-premium-addon-arrow { display: none; }
  .dashboard-premium-addon-copy strong { white-space: normal; }
}

html[data-theme="dark"] .dashboard-premium-feature-preview,
html[data-theme="dark"] .dashboard-premium-comparison-wrap,
html[data-theme="dark"] .dashboard-premium-plans-popout {
  box-shadow: 0 28px 70px rgba(0,0,0,.48);
}

html[data-theme="dark"] .premium-comparison-mark.included {
  background: rgba(22,163,74,.20);
  color: #86efac;
}

html[data-theme="dark"] .dashboard-premium-payment-option.recommended {
  box-shadow: 0 12px 28px rgba(0,113,227,.18);
}

/* Use an explicit dark-surface wordmark in the shared header. Keeping both
   assets in the markup avoids relying on replaced-element content swapping. */
html[data-theme="dark"] .topbar .brand-menu-button .brand-logo-wordmark .brand-logo-image-light {
  display: none;
}

html[data-theme="dark"] .topbar .brand-menu-button .brand-logo-wordmark .brand-logo-image-dark {
  display: block;
  filter: none;
  opacity: 1;
}

/* Dashboard Premium: keep nested feature cards on the same dark surface system
   as the rest of the dashboard. The base cards intentionally use translucent
   white in light mode, so these selectors must remain explicit. */

html[data-theme="dark"] .dashboard-home .dashboard-premium-plan {
  border-color: rgba(96, 165, 250, .30);
  background: linear-gradient(145deg, rgba(30, 64, 175, .18), rgba(15, 23, 42, .74));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}

html[data-theme="dark"] .dashboard-premium-addon-wrap .dashboard-premium-addon {
  border-color: rgba(148, 163, 184, .26);
  background: linear-gradient(145deg, rgba(30, 41, 59, .92), rgba(15, 23, 42, .88));
  color: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}

html[data-theme="dark"] .dashboard-premium-addon-wrap .dashboard-premium-addon:hover,
html[data-theme="dark"] .dashboard-premium-addon-wrap .dashboard-premium-addon:focus-visible {
  border-color: rgba(96, 165, 250, .48);
  background: linear-gradient(145deg, rgba(30, 64, 175, .30), rgba(30, 41, 59, .92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 12px 28px rgba(0, 0, 0, .28);
}

html[data-theme="dark"] .dashboard-premium-addon-copy strong {
  color: #f8fafc;
}

html[data-theme="dark"] .dashboard-premium-addon-copy small,
html[data-theme="dark"] .dashboard-premium-see-all small {
  color: #cbd5e1;
}

html[data-theme="dark"] .dashboard-premium-addon-icon {
  border-color: rgba(96, 165, 250, .34);
  background: rgba(2, 6, 23, .54);
  color: #60a5fa;
}

html[data-theme="dark"] .dashboard-premium-addon-arrow {
  color: #94a3b8;
}

html[data-theme="dark"] .dashboard-premium-addon-status {
  border-color: rgba(96, 165, 250, .34);
  background: rgba(37, 99, 235, .18);
  color: #93c5fd;
}

html[data-theme="dark"] .dashboard-premium-addon-status.active {
  border-color: rgba(74, 222, 128, .38);
  background: rgba(22, 163, 74, .18);
  color: #86efac;
}

html[data-theme="dark"] .dashboard-premium-see-all {
  border-color: rgba(96, 165, 250, .42);
  background: linear-gradient(135deg, rgba(30, 64, 175, .26), rgba(88, 28, 135, .20));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}

html[data-theme="dark"] .dashboard-premium-see-all:hover,
html[data-theme="dark"] .dashboard-premium-see-all:focus-visible {
  border-color: rgba(125, 211, 252, .62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 12px 28px rgba(0, 0, 0, .26);
}

html[data-theme="dark"] .dashboard-premium-actions .account-message {
  align-self: flex-start;
  margin-left: 0;
  border: 0;
  background: transparent;
  color: #cbd5e1;
  box-shadow: none;
}

html[data-theme="dark"] .dashboard-premium-admin-included > svg,
html[data-theme="dark"] .dashboard-premium-preview-points svg {
  color: #86efac;
}

html[data-theme="dark"] .dashboard-role-preview-control {
  border-color: rgba(234, 234, 236, .18);
  background: rgba(24, 25, 28, .82);
  color: #cbd5e1;
}

html[data-theme="dark"] .dashboard-role-preview-control select {
  border-color: rgba(234, 234, 236, .22);
  background: var(--input-glass);
  color: #f8fafc;
  color-scheme: dark;
}

html[data-theme="dark"] .dashboard-news-popout-close {
  border-color: rgba(234, 234, 236, .22);
  background: var(--button-glass);
  color: #f8fafc;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .24);
}

html[data-theme="dark"] .dashboard-company-entry-meta span.warning {
  border-color: rgba(251, 191, 36, .42);
  background: rgba(245, 158, 11, .16);
  color: #fcd34d;
}

@media (prefers-contrast: more) {
  html[data-theme="dark"] .dashboard-premium-addon-wrap .dashboard-premium-addon,
  html[data-theme="dark"] .dashboard-home .dashboard-premium-plan,
  html[data-theme="dark"] .dashboard-premium-see-all {
    border-width: 2px;
    border-color: rgba(191, 219, 254, .72);
  }

  html[data-theme="dark"] .dashboard-premium-addon-copy small,
  html[data-theme="dark"] .dashboard-premium-see-all small,
  html[data-theme="dark"] .dashboard-premium-actions .account-message {
    color: #e2e8f0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-premium-feature-preview,
  .dashboard-premium-plans-backdrop,
  .dashboard-premium-plans-popout,
  .dashboard-premium-addon-wrap .dashboard-premium-addon,
  .dashboard-premium-see-all {
    animation: none !important;
    transition: none !important;
  }
}

.account-bootstrap-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(24px, 6vw, 72px);
  color: var(--ink, #10213b);
  background:
    radial-gradient(circle at 18% 8%, rgba(28, 126, 255, 0.16), transparent 34%),
    radial-gradient(circle at 88% 88%, rgba(100, 70, 246, 0.12), transparent 32%),
    #f5f8fc;
}

.account-bootstrap-card {
  width: min(100%, 520px);
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: clamp(30px, 6vw, 52px);
  text-align: center;
  border: 1px solid rgba(126, 158, 202, 0.34);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 70px rgba(38, 65, 105, 0.16);
}

.account-bootstrap-brand {
  width: min(230px, 65%);
}

.account-bootstrap-static-brand {
  color: #147cff;
  font-size: clamp(1.7rem, 5vw, 2.35rem);
  font-weight: 900;
  letter-spacing: -0.045em;
}

.account-bootstrap-brand img,
.account-bootstrap-brand svg {
  display: block;
  max-width: 100%;
  max-height: 72px;
}

.account-bootstrap-card h1 {
  margin: 0;
  font-size: clamp(1.65rem, 4vw, 2.25rem);
  line-height: 1.08;
}

.account-bootstrap-card p {
  max-width: 44ch;
  margin: -4px 0 0;
  color: #60708a;
  font-size: 1rem;
  line-height: 1.55;
}

.account-bootstrap-actions {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 4px;
}

.account-bootstrap-actions a {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 800;
  text-decoration: none;
}

.account-bootstrap-primary {
  color: #fff;
  background: linear-gradient(135deg, #087cff, #4b52ec);
  box-shadow: 0 10px 24px rgba(24, 111, 246, 0.24);
}

.account-bootstrap-secondary {
  color: #135da8;
  border: 1px solid rgba(49, 127, 219, 0.34);
  background: #eef6ff;
}

@keyframes account-bootstrap-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 520px) {
  .account-bootstrap-actions { grid-template-columns: 1fr; }
}

/* UFH keep-out areas: make excluded floor space distinct from live UFH loops. */
#sheet.ufh-exclusion-drawing {
  cursor: crosshair;
}

#sheet.ufh-exclusion-drawing .drawing-content > :not(.ufh-exclusion-draft) {
  pointer-events: none !important;
}

#sheet.ufh-exclusion-drawing .ufh-exclusion-edit-handle {
  pointer-events: all !important;
}

.ufh-exclusion-layer {
  pointer-events: none;
}

.ufh-exclusion {
  cursor: pointer;
  pointer-events: all;
}

.ufh-exclusion-shape {
  fill: rgba(244, 63, 94, 0.16);
  stroke: #be123c;
  stroke-width: 1.8;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  pointer-events: all;
}

.ufh-exclusion-hatch {
  fill: none;
  stroke: rgba(190, 18, 60, 0.72);
  stroke-width: 4.5;
  stroke-dasharray: 2 5;
  stroke-linecap: butt;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.ufh-exclusion text {
  fill: #881337;
  font-size: calc(10px * var(--canvas-text-scale, 1));
  font-weight: 900;
  letter-spacing: 0.055em;
  paint-order: stroke fill;
  stroke: rgba(255, 255, 255, 0.94);
  stroke-linejoin: round;
  stroke-width: calc(3px * var(--canvas-text-scale, 1));
  vector-effect: non-scaling-stroke;
  pointer-events: none;
  user-select: none;
}

@media (hover: hover) {
  .ufh-exclusion:hover .ufh-exclusion-shape {
    fill: rgba(244, 63, 94, 0.22);
    stroke: #9f1239;
    stroke-width: 2.5;
  }

  .ufh-exclusion:hover .ufh-exclusion-hatch {
    stroke: rgba(159, 18, 57, 0.86);
  }
}

.ufh-exclusion.selected .ufh-exclusion-shape,
.ufh-exclusion:focus-visible .ufh-exclusion-shape {
  fill: rgba(244, 63, 94, 0.24);
  stroke: #be123c;
  stroke-width: 3.5;
  filter: drop-shadow(0 2px 3px rgba(136, 19, 55, 0.24));
}

.ufh-exclusion.selected .ufh-exclusion-hatch,
.ufh-exclusion:focus-visible .ufh-exclusion-hatch {
  stroke: rgba(255, 255, 255, 0.96);
  stroke-width: 1.5;
  stroke-dasharray: 6 4;
}

.ufh-exclusion.selected text,
.ufh-exclusion:focus-visible text {
  fill: #9f1239;
}

.ufh-exclusion-draft {
  pointer-events: none;
}

.ufh-exclusion-draft > polygon,
.ufh-exclusion-draft > polyline {
  fill: rgba(244, 63, 94, 0.14);
  stroke: #e11d48;
  stroke-width: 2.5;
  stroke-dasharray: 8 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.ufh-exclusion-draft > polyline {
  fill: none;
}

.ufh-exclusion-draft-guide {
  fill: none;
  stroke: #be123c;
  stroke-width: 2;
  stroke-dasharray: 4 5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.ufh-exclusion-edit-handle {
  fill: #ffffff;
  stroke: #e11d48;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  cursor: move;
  filter: drop-shadow(0 1px 2px rgba(136, 19, 55, 0.28));
}

.ufh-exclusion-draft-panel {
  width: min(720px, calc(100vw - 64px));
  border-color: rgba(225, 29, 72, 0.38);
  border-left: 4px solid #e11d48;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 241, 242, 0.94));
  box-shadow: 0 16px 38px rgba(136, 19, 55, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.ufh-exclusion-draft-panel > span:first-child {
  min-width: 128px;
  display: grid;
  gap: 1px;
}

.ufh-exclusion-draft-panel > span:first-child strong {
  color: #881337;
}

.ufh-exclusion-draft-panel > span:first-child small {
  color: #9f1239;
  font-size: 10px;
  font-weight: 720;
}

.ufh-exclusion-draft-panel > span:nth-of-type(2) {
  flex: 1 1 240px;
  color: #475569;
  line-height: 1.4;
}

.ufh-exclusion-draft-panel .room-draft-warning {
  flex: 1 1 100%;
}

.ufh-exclusion-draft-panel button {
  flex: 0 0 auto;
  min-width: 92px;
}

.manifold-exclusion-card {
  border-color: rgba(225, 29, 72, 0.24);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 241, 242, 0.68));
}

.manifold-exclusion-card > .product-selection-eyebrow,
.manifold-exclusion-card > strong {
  color: #9f1239;
}

.manifold-exclusion-controls {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  margin-top: 5px;
}

.manifold-exclusion-controls .settings-field {
  min-width: 0;
}

.manifold-exclusion-controls .primary-mini {
  min-width: 128px;
  white-space: nowrap;
}

.manifold-exclusion-actions,
.manifold-exclusion-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.manifold-exclusion-actions {
  justify-content: flex-end;
}

.manifold-exclusion-list {
  min-width: 0;
  display: grid;
  gap: 7px;
  margin-top: 4px;
}

.manifold-exclusion-list > .field-note {
  margin: 0;
  padding: 8px 9px;
  border: 1px dashed rgba(225, 29, 72, 0.24);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.48);
}

.manifold-exclusion-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border: 1px solid rgba(225, 29, 72, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.68);
}

.manifold-exclusion-row > span:first-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.manifold-exclusion-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manifold-exclusion-row small {
  overflow-wrap: anywhere;
}

.manifold-exclusion-row-actions > button {
  min-width: 34px;
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(225, 29, 72, 0.28);
  border-radius: 10px;
  background: rgba(255, 241, 242, 0.88);
  color: #be123c;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.manifold-exclusion-row-actions > button:first-child {
  width: auto;
  padding: 0 10px;
  font-size: 12px;
}

.manifold-exclusion-row-actions > button:hover {
  border-color: rgba(190, 18, 60, 0.58);
  background: #ffe4e6;
  color: #9f1239;
}

.manifold-exclusion-row-actions > button:active {
  transform: translateY(1px);
}

@media (max-width: 620px) {
  .manifold-exclusion-controls {
    grid-template-columns: 1fr;
  }

  .manifold-exclusion-actions {
    justify-content: stretch;
  }

  .manifold-exclusion-actions > button {
    flex: 1 1 0;
  }
}

html[data-theme="dark"] .ufh-exclusion-draft-panel {
  border-color: rgba(251, 113, 133, 0.42);
  border-left-color: #fb7185;
  background: linear-gradient(145deg, rgba(49, 20, 34, 0.96), rgba(15, 23, 42, 0.94));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

html[data-theme="dark"] .ufh-exclusion-draft-panel > span:first-child strong {
  color: #fecdd3;
}

html[data-theme="dark"] .ufh-exclusion-draft-panel > span:first-child small,
html[data-theme="dark"] .ufh-exclusion-draft-panel > span:nth-of-type(2) {
  color: #fda4af;
}

html[data-theme="dark"] .manifold-exclusion-card {
  border-color: rgba(251, 113, 133, 0.28);
  background: linear-gradient(145deg, rgba(55, 25, 38, 0.9), rgba(15, 23, 42, 0.86));
}

html[data-theme="dark"] .manifold-exclusion-card > .product-selection-eyebrow,
html[data-theme="dark"] .manifold-exclusion-card > strong {
  color: #fda4af;
}

html[data-theme="dark"] .manifold-exclusion-row,
html[data-theme="dark"] .manifold-exclusion-list > .field-note {
  border-color: rgba(251, 113, 133, 0.24);
  background: rgba(15, 23, 42, 0.52);
}

html[data-theme="dark"] .manifold-exclusion-row > button {
  border-color: rgba(251, 113, 133, 0.38);
  background: rgba(127, 29, 29, 0.3);
  color: #fecdd3;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .manifold-exclusion-row > button:hover {
  border-color: rgba(251, 113, 133, 0.68);
  background: rgba(159, 18, 57, 0.42);
  color: #ffffff;
}

@media (max-width: 560px) {
  .ufh-exclusion-draft-panel {
    width: auto;
    align-items: stretch;
  }

  .ufh-exclusion-draft-panel > span:first-child,
  .ufh-exclusion-draft-panel > span:nth-of-type(2) {
    flex-basis: 100%;
  }

  .ufh-exclusion-draft-panel button {
    flex: 1 1 120px;
  }

  .manifold-exclusion-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .manifold-exclusion-controls .primary-mini {
    width: 100%;
  }
}

@media (forced-colors: active) {
  .ufh-exclusion-shape,
  .ufh-exclusion-draft > polygon,
  .ufh-exclusion-draft > polyline {
    fill: transparent;
    stroke: CanvasText;
  }

  .ufh-exclusion-hatch,
  .ufh-exclusion-draft-guide {
    stroke: Highlight;
  }

  .ufh-exclusion text {
    fill: CanvasText;
    stroke: Canvas;
  }

  .ufh-exclusion.selected .ufh-exclusion-shape,
  .ufh-exclusion:focus-visible .ufh-exclusion-shape,
  .ufh-exclusion-draft circle {
    stroke: Highlight;
  }

  .manifold-exclusion-card,
  .manifold-exclusion-row,
  .manifold-exclusion-row > button,
  .ufh-exclusion-draft-panel {
    border-color: Highlight;
  }
}

/* Platform account governance and protected-account approval. */
.dashboard-app-icon-account-governance {
  background: linear-gradient(145deg, #172554, #2563eb 62%, #38bdf8);
  color: #fff;
}

.dashboard-account-governance-workspace {
  --dashboard-account-governance-gutter: clamp(1rem, 2vw, 1.8rem);
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 0%, rgba(59, 130, 246, 0.14), transparent 32%),
    linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
}

.dashboard-account-governance-header {
  min-width: 0;
  box-sizing: border-box;
  padding-inline: var(--dashboard-account-governance-gutter);
}

.dashboard-account-governance-header > div:first-child {
  min-width: 0;
}

.dashboard-account-governance-header p {
  margin: 0.35rem 0 0;
  color: #64748b;
  font-weight: 650;
}

.dashboard-account-governance-scroll {
  min-height: 0;
  overflow: auto;
  scrollbar-gutter: stable;
  padding: var(--dashboard-account-governance-gutter);
  display: grid;
  align-content: start;
  gap: 1rem;
}

.dashboard-account-governance-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.dashboard-account-governance-summary > span {
  min-width: 0;
  display: grid;
  gap: 0.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(96, 165, 250, 0.38);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.08);
}

.dashboard-account-governance-summary small,
.dashboard-account-governance-panel-head > div > span {
  color: #2563eb;
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.dashboard-account-governance-summary strong {
  color: #0f172a;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
}

.dashboard-account-governance-message {
  margin: 0;
  padding: 0.72rem 0.9rem;
  border: 1px solid rgba(96, 165, 250, 0.36);
  border-radius: 0.8rem;
  background: rgba(239, 246, 255, 0.92);
  color: #1e40af;
  font-weight: 750;
}

.dashboard-account-governance-demo {
  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: max-content;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  overflow: hidden;
  padding: clamp(1rem, 2vw, 1.35rem);
  border: 1px solid rgba(99, 102, 241, 0.38);
  border-radius: 1.25rem;
  background:
    radial-gradient(circle at 94% 12%, rgba(129, 140, 248, 0.22), transparent 28%),
    linear-gradient(145deg, rgba(238, 242, 255, 0.98), rgba(239, 246, 255, 0.96) 54%, rgba(255, 255, 255, 0.98));
  box-shadow: 0 18px 42px rgba(49, 46, 129, 0.11);
}

.dashboard-account-governance-demo::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -2.4rem;
  bottom: -4.6rem;
  width: 11rem;
  height: 11rem;
  border: 1.4rem solid rgba(99, 102, 241, 0.08);
  border-radius: 50%;
}

.dashboard-account-governance-demo-icon {
  display: grid;
  place-items: center;
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 1rem;
  background: linear-gradient(145deg, #1d4ed8, #4f46e5 58%, #7c3aed);
  box-shadow: 0 10px 24px rgba(67, 56, 202, 0.25);
  color: #fff;
}

.dashboard-account-governance-demo-icon svg {
  width: 1.45rem;
  height: 1.45rem;
}

.dashboard-account-governance-demo-content {
  min-width: 0;
  display: grid;
  gap: 0.85rem;
}

.dashboard-account-governance-demo-content > header,
.dashboard-account-governance-demo-content > footer {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.dashboard-account-governance-demo-content > header > div {
  min-width: 0;
}

.dashboard-account-governance-demo-content > header span,
.dashboard-account-governance-demo-credentials > div:first-child > span {
  color: #4f46e5;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-account-governance-demo-content h2 {
  margin: 0.18rem 0 0.28rem;
  color: #0f172a;
  font-size: clamp(1.12rem, 1.8vw, 1.4rem);
}

.dashboard-account-governance-demo-content p {
  max-width: 880px;
  margin: 0;
  color: #526078;
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.5;
}

.dashboard-account-governance-demo-content > header > em {
  flex: 0 0 auto;
  padding: 0.32rem 0.62rem;
  border: 1px solid rgba(99, 102, 241, 0.24);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.82);
  color: #4338ca;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 850;
  text-transform: uppercase;
}

.dashboard-account-governance-demo-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.dashboard-account-governance-demo-stats > span {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  padding: 0.38rem 0.6rem;
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.72);
  color: #526078;
  font-size: 0.78rem;
  font-weight: 750;
}

.dashboard-account-governance-demo-stats strong {
  color: #312e81;
  font-size: 0.92rem;
}

.dashboard-account-governance-demo-credentials {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(230px, 0.85fr) minmax(230px, auto);
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.85rem;
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.72);
}

.dashboard-account-governance-demo-password {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.dashboard-account-governance-demo-password > code {
  min-width: 0;
  overflow: hidden;
  padding: 0.58rem 0.7rem;
  border: 1px solid #c7d2fe;
  border-radius: 0.68rem;
  background: #eef2ff;
  color: #312e81;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-account-governance-demo-copy {
  position: relative;
  flex: 0 0 auto;
}

.dashboard-account-governance-demo-copy[data-copy-feedback]::after {
  content: attr(data-copy-feedback);
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.38rem);
  z-index: 3;
  padding: 0.3rem 0.48rem;
  border-radius: 0.45rem;
  background: #0f172a;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-account-governance-demo-emails {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.dashboard-account-governance-demo-emails code {
  max-width: 100%;
  overflow: hidden;
  padding: 0.26rem 0.46rem;
  border-radius: 0.5rem;
  background: rgba(224, 231, 255, 0.74);
  color: #3730a3;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-account-governance-demo-empty {
  padding: 0.72rem 0.82rem;
  border-left: 3px solid #818cf8;
  border-radius: 0.25rem 0.7rem 0.7rem 0.25rem;
  background: rgba(255, 255, 255, 0.62);
}

.dashboard-account-governance-demo-content > footer {
  align-items: center;
}

.dashboard-account-governance-demo-content > footer small {
  max-width: 760px;
  color: #64748b;
  font-weight: 650;
}

.dashboard-account-governance-demo-content > footer > div {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.dashboard-account-governance-panel {
  min-width: 0;
  display: grid;
  gap: 0.9rem;
  padding: clamp(1rem, 2vw, 1.4rem);
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.dashboard-account-governance-panel-head {
  min-width: 0;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.dashboard-account-governance-panel-head h2 {
  margin: 0.2rem 0;
  color: #0f172a;
  font-size: 1.16rem;
}

.dashboard-account-governance-panel-head p {
  max-width: 760px;
  margin: 0;
  color: #64748b;
  font-size: 0.88rem;
  font-weight: 650;
}

.dashboard-account-governance-filters {
  flex: 0 0 auto;
  display: flex;
  gap: 0.35rem;
  padding: 0.28rem;
  border: 1px solid #dbeafe;
  border-radius: 0.8rem;
  background: #eff6ff;
}

.dashboard-account-governance-filters button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  border-radius: 0.58rem;
  padding: 0.48rem 0.62rem;
  background: transparent;
  color: #475569;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.dashboard-account-governance-filters button.active {
  background: #fff;
  color: #1d4ed8;
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.12);
}

.dashboard-account-governance-filters strong {
  min-width: 1.4rem;
  padding: 0.08rem 0.3rem;
  border-radius: 99px;
  background: rgba(37, 99, 235, 0.1);
  text-align: center;
}

.dashboard-account-application-list,
.dashboard-governance-account-list {
  display: grid;
  gap: 0.72rem;
}

.dashboard-account-application {
  min-width: 0;
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  border: 1px solid #dbeafe;
  border-radius: 1rem;
  background: linear-gradient(145deg, #fff, #f8fbff);
}

.dashboard-account-application > header,
.dashboard-account-application > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.dashboard-account-application > header > div {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
}

.dashboard-account-application > header span {
  color: #2563eb;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dashboard-account-application > header strong {
  overflow: hidden;
  color: #0f172a;
  text-overflow: ellipsis;
}

.dashboard-account-application > header small,
.dashboard-account-application > footer small {
  color: #64748b;
  font-weight: 650;
}

.dashboard-account-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.28rem 0.58rem;
  border-radius: 99px;
  background: #e2e8f0;
  color: #475569;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 850;
  text-transform: capitalize;
}

.dashboard-account-status.pending {
  background: #fff7ed;
  color: #c2410c;
}

.dashboard-account-status.approved,
.dashboard-account-status.active {
  background: #ecfdf5;
  color: #047857;
}

.dashboard-account-status.rejected,
.dashboard-account-status.declined {
  background: #fef2f2;
  color: #b91c1c;
}

.dashboard-account-application-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.dashboard-account-application-fields label {
  min-width: 0;
  display: grid;
  gap: 0.3rem;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 800;
}

.dashboard-account-application-fields label.wide {
  grid-column: 1 / -1;
}

.dashboard-account-application-fields :is(input, select, textarea),
.dashboard-governance-account-row select,
.dashboard-account-governance-search input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 0.72rem;
  padding: 0.68rem 0.75rem;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-weight: 700;
}

.dashboard-account-application-fields :is(input, select, textarea):focus,
.dashboard-governance-account-row select:focus,
.dashboard-account-governance-search input:focus {
  border-color: #3b82f6;
  outline: 3px solid rgba(59, 130, 246, 0.14);
}

.dashboard-account-application > footer > div {
  flex: 0 0 auto;
  display: flex;
  gap: 0.45rem;
}

.dashboard-account-governance-search {
  min-width: min(100%, 310px);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #64748b;
}

.dashboard-account-governance-search svg {
  flex: 0 0 1rem;
  width: 1rem;
}

.dashboard-governance-account-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(230px, 1.5fr) minmax(160px, 0.65fr) auto minmax(120px, auto);
  align-items: center;
  gap: 0.72rem;
  padding: 0.72rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.86rem;
  background: #fff;
}

.dashboard-governance-account-person {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.dashboard-governance-account-person > span:last-child {
  min-width: 0;
  display: grid;
}

.dashboard-governance-account-person strong,
.dashboard-governance-account-person small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-governance-account-person strong {
  color: #0f172a;
}

.dashboard-governance-account-person small,
.dashboard-governance-protected {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 650;
}

.dashboard-governance-account-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.42rem;
}

.dashboard-account-create-panel {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(420px, 1.25fr);
  gap: 1rem;
  padding: clamp(1rem, 2vw, 1.35rem);
  border: 1px solid rgba(37, 99, 235, 0.34);
  border-radius: 1.25rem;
  background:
    radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.15), transparent 34%),
    linear-gradient(145deg, rgba(239, 246, 255, 0.98), rgba(255, 255, 255, 0.98));
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.1);
}

.dashboard-account-create-intro {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.dashboard-account-create-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.9rem;
  background: linear-gradient(145deg, #1d4ed8, #0ea5e9);
  color: #fff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
}

.dashboard-account-create-icon svg {
  width: 1.4rem;
  height: 1.4rem;
}

.dashboard-account-create-intro > div {
  min-width: 0;
}

.dashboard-account-create-intro > div > span,
.dashboard-account-intelligence > header > div > span {
  color: #2563eb;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-account-create-intro h2,
.dashboard-account-intelligence > header h2 {
  margin: 0.2rem 0 0.3rem;
  color: #0f172a;
  font-size: clamp(1.12rem, 1.7vw, 1.4rem);
}

.dashboard-account-create-intro p,
.dashboard-account-intelligence > header p {
  margin: 0;
  color: #526078;
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.5;
}

.dashboard-account-create-form {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(165px, 0.55fr) auto;
  align-items: end;
  gap: 0.65rem;
}

.dashboard-account-create-form label,
.dashboard-account-intelligence-fields label {
  min-width: 0;
  display: grid;
  gap: 0.28rem;
  color: #475569;
  font-size: 0.76rem;
  font-weight: 800;
}

.dashboard-account-create-form :is(input, select),
.dashboard-account-intelligence-fields :is(input, select) {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid #bfdbfe;
  border-radius: 0.72rem;
  padding: 0.68rem 0.75rem;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-weight: 700;
}

.dashboard-account-create-form :is(input, select):focus,
.dashboard-account-intelligence-fields :is(input, select):focus {
  border-color: #2563eb;
  outline: 3px solid rgba(37, 99, 235, 0.13);
}

.dashboard-account-create-result {
  grid-column: 1 / -1;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(270px, auto) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.82rem;
  border: 1px solid #86efac;
  border-radius: 0.9rem;
  background: rgba(240, 253, 244, 0.92);
}

.dashboard-account-create-result.warning {
  border-color: #fdba74;
  background: rgba(255, 247, 237, 0.95);
}

.dashboard-account-create-result > div:first-child {
  min-width: 0;
  display: grid;
  gap: 0.14rem;
}

.dashboard-account-create-result > div:first-child strong {
  overflow: hidden;
  color: #0f172a;
  text-overflow: ellipsis;
}

.dashboard-account-create-result > div:first-child span,
.dashboard-account-create-result > div:first-child small {
  color: #526078;
  font-size: 0.76rem;
  font-weight: 700;
}

.dashboard-account-temporary-password {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.25rem 0.45rem;
}

.dashboard-account-temporary-password > span {
  grid-column: 1 / -1;
  color: #475569;
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dashboard-account-temporary-password code {
  overflow: hidden;
  padding: 0.52rem 0.62rem;
  border: 1px solid #bbf7d0;
  border-radius: 0.58rem;
  background: #fff;
  color: #14532d;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-account-intelligence {
  min-width: 0;
  display: grid;
  gap: 1rem;
  padding: clamp(1rem, 2vw, 1.4rem);
  border: 1px solid rgba(99, 102, 241, 0.32);
  border-radius: 1.25rem;
  background:
    radial-gradient(circle at 94% 4%, rgba(129, 140, 248, 0.16), transparent 28%),
    rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 44px rgba(49, 46, 129, 0.09);
  scroll-margin-top: 1rem;
}

.dashboard-account-intelligence > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.dashboard-account-intelligence > header > div {
  min-width: 0;
}

.dashboard-account-intelligence-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.dashboard-account-intelligence-metrics > span {
  min-width: 0;
  display: grid;
  gap: 0.16rem;
  padding: 0.8rem;
  border: 1px solid #dbeafe;
  border-radius: 0.86rem;
  background: linear-gradient(145deg, #f8fbff, #fff);
}

.dashboard-account-intelligence-metrics small {
  color: #2563eb;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dashboard-account-intelligence-metrics strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 1.15rem;
  text-overflow: ellipsis;
}

.dashboard-account-intelligence-metrics em {
  color: #64748b;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 700;
}

.dashboard-account-intelligence-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(250px, 0.7fr) minmax(440px, 1.3fr);
  gap: 0.8rem;
}

.dashboard-account-intelligence-grid > article,
.dashboard-account-intelligence-profile {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 0.62rem;
  padding: 0.9rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.95rem;
  background: rgba(248, 250, 252, 0.8);
}

.dashboard-account-intelligence h3 {
  margin: 0;
  color: #172033;
  font-size: 0.9rem;
}

.dashboard-account-intelligence-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.dashboard-account-intelligence-tags > span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.34rem 0.5rem;
  border: 1px solid #c7d2fe;
  border-radius: 99px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 0.72rem;
  font-weight: 750;
}

.dashboard-account-intelligence-tags > small {
  color: #64748b;
  font-weight: 650;
}

.dashboard-account-intelligence-profile > header p {
  margin: 0.2rem 0 0;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 650;
}

.dashboard-account-intelligence-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.58rem;
}

.dashboard-account-intelligence-profile > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.dashboard-account-consent-status {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.dashboard-account-consent-status span {
  padding: 0.26rem 0.44rem;
  border-radius: 99px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.66rem;
  font-weight: 800;
}

.dashboard-account-consent-status span.active {
  background: #dcfce7;
  color: #15803d;
}

.dashboard-account-intelligence-privacy {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid #bae6fd;
  border-radius: 0.78rem;
  background: #f0f9ff;
  color: #0c4a6e;
}

.dashboard-account-intelligence-privacy svg {
  flex: 0 0 1rem;
  width: 1rem;
  margin-top: 0.12rem;
}

.dashboard-account-intelligence-privacy p {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 650;
  line-height: 1.45;
}

.dashboard-account-intelligence-opted-out {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.85rem;
  padding: clamp(1rem, 2vw, 1.35rem);
  border: 1px solid #cbd5e1;
  border-radius: 1rem;
  background: linear-gradient(145deg, #f8fafc, #f1f5f9);
  color: #334155;
}

.dashboard-account-intelligence-opted-out > span {
  display: grid;
  width: 2.7rem;
  height: 2.7rem;
  place-items: center;
  border-radius: 0.85rem;
  background: #e2e8f0;
  color: #475569;
}

.dashboard-account-intelligence-opted-out > span svg {
  width: 1.15rem;
}

.dashboard-account-intelligence-opted-out small {
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dashboard-account-intelligence-opted-out h3 {
  margin: 0.12rem 0 0.22rem;
  color: #0f172a;
  font-size: 1rem;
}

.dashboard-account-intelligence-opted-out p {
  margin: 0;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.5;
}

.dashboard-account-intelligence-hero {
  position: relative;
  padding: 0.25rem 0 0.1rem;
}

.dashboard-account-intelligence-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.dashboard-account-intelligence-avatar {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.95);
  border-radius: 0.92rem;
  background:
    radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.52), transparent 36%),
    linear-gradient(145deg, #2563eb, #7c3aed);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.02em;
  box-shadow: 0 9px 22px rgba(37, 99, 235, 0.22), 0 0 0 1px #bfdbfe;
}

.dashboard-account-intelligence-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #fff;
}

.dashboard-account-intelligence-avatar.hero {
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 1.25rem;
  font-size: 1.08rem;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.24), 0 0 0 1px #bfdbfe;
}

.dashboard-account-intelligence-avatar.distributor {
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 1.1rem;
  background: #fff;
  color: #1d4ed8;
}

.dashboard-account-intelligence-avatar.distributor img {
  box-sizing: border-box;
  padding: 0.25rem;
  object-fit: contain;
}

.dashboard-account-intelligence-avatar.large {
  width: 5rem;
  height: 5rem;
  border-radius: 1.5rem;
  font-size: 1.25rem;
}

.dashboard-account-intelligence-identity > div {
  min-width: 0;
}

.dashboard-account-intelligence-identity > div > span,
.dashboard-account-commercial-card > header > div > span,
.dashboard-account-company-facts > header span,
.dashboard-account-intelligence-mix-card > header span,
.dashboard-account-relationship-map > header > div > span,
.dashboard-account-relationship-group > header > div > span {
  color: #2563eb;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-account-intelligence-identity h2 {
  margin: 0.12rem 0;
  font-size: clamp(1.35rem, 2.4vw, 2rem) !important;
  letter-spacing: -0.03em;
}

.dashboard-account-intelligence-identity p {
  overflow: hidden;
  max-width: 72rem;
  margin: 0;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-account-intelligence-identity-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.42rem;
}

.dashboard-account-intelligence-identity-badges em {
  padding: 0.23rem 0.46rem;
  border: 1px solid #dbeafe;
  border-radius: 99px;
  background: rgba(239, 246, 255, 0.92);
  color: #475569;
  font-size: 0.61rem;
  font-style: normal;
  font-weight: 850;
}

.dashboard-account-intelligence-identity-badges em.premium {
  border-color: #c4b5fd;
  background: #f5f3ff;
  color: #6d28d9;
}

.dashboard-account-intelligence-hero-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.dashboard-account-intelligence-hero-actions > span {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  color: #64748b;
  font-size: 0.67rem;
  font-weight: 750;
}

.dashboard-account-intelligence-hero-actions > span svg {
  width: 0.86rem;
}

.dashboard-account-intelligence-metrics > span {
  position: relative;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto auto auto;
  column-gap: 0.65rem;
  overflow: hidden;
  padding: 0.9rem 0.9rem 0.76rem;
  background:
    radial-gradient(circle at 100% 0%, rgba(59, 130, 246, 0.11), transparent 45%),
    linear-gradient(145deg, #f8fbff, #fff);
}

.dashboard-account-intelligence-metrics > span > i {
  grid-row: 1 / span 3;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.65rem;
  background: #e0f2fe;
  color: #0284c7;
}

.dashboard-account-intelligence-metrics > span.projects > i {
  background: #dbeafe;
  color: #2563eb;
}

.dashboard-account-intelligence-metrics > span.pipeline > i {
  background: #ede9fe;
  color: #7c3aed;
}

.dashboard-account-intelligence-metrics > span.usage > i {
  background: #dcfce7;
  color: #16a34a;
}

.dashboard-account-intelligence-metrics > span.network > i {
  background: #ffedd5;
  color: #ea580c;
}

.dashboard-account-intelligence-metrics > span > i svg {
  width: 1.08rem;
}

.dashboard-account-intelligence-metrics > span > :is(small, strong, em) {
  grid-column: 2;
}

.dashboard-account-intelligence-metrics > span > b {
  grid-column: 1 / -1;
  position: relative;
  height: 0.22rem;
  margin-top: 0.38rem;
  overflow: hidden;
  border-radius: 99px;
  background: #e2e8f0;
}

.dashboard-account-intelligence-metrics > span > b::after {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--metric-fill);
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #38bdf8);
  content: "";
}

.dashboard-account-intelligence-metrics > span.pipeline > b::after {
  background: linear-gradient(90deg, #7c3aed, #c084fc);
}

.dashboard-account-intelligence-metrics > span.usage > b::after {
  background: linear-gradient(90deg, #16a34a, #4ade80);
}

.dashboard-account-intelligence-metrics > span.network > b::after {
  background: linear-gradient(90deg, #ea580c, #fb923c);
}

.dashboard-account-intelligence-overview-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(340px, 1.15fr) minmax(290px, 0.9fr);
  align-items: start;
  gap: 0.8rem;
}

.dashboard-account-intelligence-mix-card,
.dashboard-account-commercial-card,
.dashboard-account-company-facts {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 0.72rem;
  padding: 0.95rem;
  border: 1px solid #dbeafe;
  border-radius: 1.05rem;
  background: rgba(248, 250, 252, 0.82);
}

.dashboard-account-intelligence-mix-card > header,
.dashboard-account-commercial-card > header,
.dashboard-account-company-facts > header,
.dashboard-account-intelligence-distribution > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.dashboard-account-intelligence-mix-card > header h3,
.dashboard-account-commercial-card > header h3,
.dashboard-account-company-facts > header h3 {
  margin-top: 0.12rem;
  font-size: 1rem;
}

.dashboard-account-intelligence-mix-card > header > em,
.dashboard-account-commercial-card > header > em {
  padding: 0.24rem 0.4rem;
  border-radius: 99px;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 0.59rem;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.dashboard-account-intelligence-distribution {
  display: grid;
  gap: 0.4rem;
  padding-top: 0.55rem;
  border-top: 1px solid #e2e8f0;
}

.dashboard-account-intelligence-distribution > header h3 {
  font-size: 0.72rem;
}

.dashboard-account-intelligence-distribution > header span {
  color: #94a3b8;
  font-size: 0.58rem;
  font-weight: 750;
}

.dashboard-account-intelligence-distribution > div {
  display: grid;
  gap: 0.34rem;
}

.dashboard-account-intelligence-distribution article {
  display: grid;
  gap: 0.18rem;
}

.dashboard-account-intelligence-distribution article > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  color: #475569;
  font-size: 0.65rem;
}

.dashboard-account-intelligence-distribution article strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-account-intelligence-distribution article em {
  flex: 0 0 auto;
  color: #64748b;
  font-style: normal;
  font-weight: 850;
}

.dashboard-account-intelligence-distribution article > i {
  height: 0.32rem;
  overflow: hidden;
  border-radius: 99px;
  background: #e2e8f0;
}

.dashboard-account-intelligence-distribution article > i > b {
  display: block;
  width: var(--account-intelligence-bar);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, hsl(calc(217 + var(--account-intelligence-index) * 12) 91% 60%), hsl(calc(196 + var(--account-intelligence-index) * 14) 90% 58%));
}

.dashboard-account-intelligence-visual-empty {
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center;
  gap: 0.45rem !important;
  min-height: 2.1rem;
  color: #94a3b8;
  font-size: 0.64rem;
  font-weight: 700;
}

.dashboard-account-intelligence-visual-empty svg {
  width: 1rem;
}

.dashboard-account-commercial-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 110% -10%, rgba(99, 102, 241, 0.18), transparent 40%),
    linear-gradient(150deg, #f8fbff, #eef6ff 58%, #f5f3ff);
}

.dashboard-account-preferred-distributor {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.72rem;
  border: 1px solid rgba(37, 99, 235, 0.26);
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.86);
  color: inherit;
  text-align: left;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
  cursor: pointer;
}

.dashboard-account-preferred-distributor:hover {
  border-color: #60a5fa;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.15);
}

.dashboard-account-preferred-distributor > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
}

.dashboard-account-preferred-distributor > span:nth-child(2) small {
  color: #2563eb;
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-account-preferred-distributor > span:nth-child(2) strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-account-preferred-distributor > span:nth-child(2) em,
.dashboard-account-preferred-distributor > span:nth-child(2) i {
  overflow: hidden;
  color: #64748b;
  font-size: 0.64rem;
  font-style: normal;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-account-preferred-distributor > span:nth-child(2) i {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  color: #475569;
}

.dashboard-account-preferred-distributor > span:nth-child(2) i svg {
  width: 0.72rem;
}

.dashboard-account-preferred-distributor > b {
  position: relative;
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: conic-gradient(#2563eb calc(var(--confidence) * 1%), #dbeafe 0);
}

.dashboard-account-preferred-distributor > b::before {
  position: absolute;
  inset: 0.28rem;
  border-radius: inherit;
  background: #fff;
  content: "";
}

.dashboard-account-preferred-distributor > b > span,
.dashboard-account-preferred-distributor > b > small {
  position: relative;
  z-index: 1;
}

.dashboard-account-preferred-distributor > b > span {
  color: #1d4ed8;
  font-size: 0.72rem;
  font-weight: 950;
}

.dashboard-account-preferred-distributor > b > small {
  max-width: 2.4rem;
  color: #64748b;
  font-size: 0.38rem;
  font-weight: 850;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.dashboard-account-commercial-metrics,
.dashboard-account-profile-commercial {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem;
}

.dashboard-account-commercial-metrics > span,
.dashboard-account-profile-commercial > div {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
  padding: 0.55rem;
  border: 1px solid rgba(191, 219, 254, 0.9);
  border-radius: 0.72rem;
  background: rgba(255, 255, 255, 0.72);
}

.dashboard-account-commercial-metrics small,
.dashboard-account-profile-commercial small {
  color: #64748b;
  font-size: 0.57rem;
  font-weight: 850;
  text-transform: uppercase;
}

.dashboard-account-commercial-metrics strong,
.dashboard-account-profile-commercial strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-account-observed-terms {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.6rem;
  padding: 0.68rem;
  border: 1px solid #bbf7d0;
  border-radius: 0.85rem;
  background: rgba(240, 253, 244, 0.88);
}

.dashboard-account-observed-terms.empty {
  border-color: #dbeafe;
  background: rgba(248, 250, 252, 0.82);
}

.dashboard-account-observed-terms-icon {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.65rem;
  background: #dcfce7;
  color: #16a34a;
}

.dashboard-account-observed-terms.empty .dashboard-account-observed-terms-icon {
  background: #e2e8f0;
  color: #64748b;
}

.dashboard-account-observed-terms-icon svg {
  width: 1rem;
}

.dashboard-account-observed-terms > div {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
}

.dashboard-account-observed-terms small {
  color: #15803d;
  font-size: 0.56rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-account-observed-terms strong {
  color: #14532d;
  font-size: 0.75rem;
}

.dashboard-account-observed-terms p,
.dashboard-account-observed-terms em {
  margin: 0;
  color: #4b5563;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 650;
  line-height: 1.35;
}

.dashboard-account-commercial-provenance {
  display: flex;
  align-items: flex-start;
  gap: 0.28rem;
  margin: 0;
  color: #64748b;
  font-size: 0.58rem;
  font-weight: 650;
  line-height: 1.4;
}

.dashboard-account-commercial-provenance svg {
  flex: 0 0 0.75rem;
  width: 0.75rem;
  color: #16a34a;
}

.dashboard-account-commercial-empty {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.68rem;
  min-height: 6.2rem;
  padding: 0.8rem;
  border: 1px dashed #93c5fd;
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.56);
}

.dashboard-account-commercial-empty > span {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.8rem;
  background: #dbeafe;
  color: #2563eb;
}

.dashboard-account-commercial-empty svg {
  width: 1.2rem;
}

.dashboard-account-commercial-empty strong {
  color: #0f172a;
}

.dashboard-account-commercial-empty p {
  margin: 0.18rem 0 0;
  color: #64748b;
  font-size: 0.66rem;
  font-weight: 650;
  line-height: 1.4;
}

.dashboard-account-company-facts > header p {
  margin: 0.2rem 0 0;
  color: #64748b;
  font-size: 0.66rem;
  font-weight: 650;
  line-height: 1.4;
}

.dashboard-account-company-facts .dashboard-account-intelligence-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-account-company-facts .dashboard-account-intelligence-fields label:first-child {
  grid-column: 1 / -1;
}

.dashboard-account-company-facts > footer {
  display: grid;
  justify-items: stretch;
}

.dashboard-account-company-facts > footer > button {
  justify-self: end;
}

.dashboard-account-relationship-map {
  position: relative;
  min-width: 0;
  display: grid;
  gap: 0.9rem;
  overflow: hidden;
  padding: 1rem;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 1.1rem;
  background:
    linear-gradient(rgba(37, 99, 235, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 50% -20%, rgba(56, 189, 248, 0.16), transparent 50%),
    #f8fbff;
  background-size: 24px 24px, 24px 24px, auto, auto;
}

.dashboard-account-relationship-map > header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.dashboard-account-relationship-map > header h2 {
  margin: 0.15rem 0;
  color: #0f172a;
  font-size: 1.05rem;
}

.dashboard-account-relationship-map > header p {
  margin: 0;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 650;
}

.dashboard-account-relationship-map-key {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.dashboard-account-relationship-map-key span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: #64748b;
  font-size: 0.58rem;
  font-weight: 750;
}

.dashboard-account-relationship-map-key i {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: #2563eb;
}

.dashboard-account-relationship-map-key i.external {
  background: #7c3aed;
}

.dashboard-account-relationship-map-key i.commercial {
  background: #f97316;
}

.dashboard-account-relationship-map-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.72rem;
}

.dashboard-account-relationship-group {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 0.55rem;
  padding: 0.72rem;
  border: 1px solid rgba(191, 219, 254, 0.92);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(8px);
}

.dashboard-account-relationship-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.dashboard-account-relationship-group > header h3 {
  margin-top: 0.12rem;
  font-size: 0.78rem;
}

.dashboard-account-relationship-group > header > strong {
  display: grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.68rem;
}

.dashboard-account-relationship-rail {
  min-width: 0;
  display: grid;
  gap: 0.42rem;
  max-height: 17rem;
  overflow: auto;
  padding-right: 0.12rem;
}

.dashboard-account-relationship-card {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.78rem;
  background: rgba(255, 255, 255, 0.92);
  color: inherit;
  text-align: left;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.04);
  cursor: pointer;
}

.dashboard-account-relationship-card:hover {
  border-color: #60a5fa;
  transform: translateX(2px);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.12);
}

.dashboard-account-relationship-card:focus-visible,
.dashboard-account-preferred-distributor:focus-visible,
.dashboard-account-profile-close:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.3);
  outline-offset: 2px;
}

.dashboard-account-relationship-card-copy {
  min-width: 0;
  display: grid;
  gap: 0.1rem;
}

.dashboard-account-relationship-card-copy > strong,
.dashboard-account-relationship-card-copy > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-account-relationship-card-copy > strong {
  color: #0f172a;
  font-size: 0.72rem;
}

.dashboard-account-relationship-card-copy > small {
  color: #64748b;
  font-size: 0.58rem;
  font-weight: 650;
}

.dashboard-account-relationship-card-copy > span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.dashboard-account-relationship-card-copy em {
  padding: 0.15rem 0.3rem;
  border-radius: 99px;
  background: #dcfce7;
  color: #15803d;
  font-size: 0.49rem;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-account-relationship-card-copy i {
  color: #94a3b8;
  font-size: 0.52rem;
  font-style: normal;
  font-weight: 700;
}

.dashboard-account-relationship-card-arrow {
  color: #60a5fa;
  font-size: 1.25rem;
  font-weight: 500;
}

.dashboard-account-relationship-empty {
  min-height: 5rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.52rem;
  padding: 0.65rem;
  border: 1px dashed #cbd5e1;
  border-radius: 0.72rem;
  color: #94a3b8;
}

.dashboard-account-relationship-empty > svg {
  width: 1.2rem;
}

.dashboard-account-relationship-empty > span {
  display: grid;
  gap: 0.12rem;
}

.dashboard-account-relationship-empty strong {
  color: #64748b;
  font-size: 0.66rem;
}

.dashboard-account-relationship-empty small {
  font-size: 0.56rem;
  font-weight: 650;
  line-height: 1.4;
}

.dashboard-account-profile-backdrop {
  position: fixed;
  z-index: 280;
  inset: 0;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  padding: 0.85rem;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(5px);
}

.dashboard-account-profile-drawer {
  position: relative;
  width: min(31rem, 100%);
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 0.9rem;
  padding: 1.15rem;
  border: 1px solid rgba(147, 197, 253, 0.72);
  border-radius: 1.2rem;
  background:
    radial-gradient(circle at 100% 0%, rgba(99, 102, 241, 0.18), transparent 32%),
    #f8fbff;
  box-shadow: -22px 0 65px rgba(15, 23, 42, 0.22);
  animation: dashboard-account-profile-enter 180ms ease-out both;
}

@keyframes dashboard-account-profile-enter {
  from { opacity: 0; transform: translateX(1rem); }
  to { opacity: 1; transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-account-profile-drawer {
    animation: none;
  }
}

.dashboard-account-profile-close {
  position: absolute;
  z-index: 1;
  top: 0.8rem;
  right: 0.8rem;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid #bfdbfe;
  border-radius: 0.72rem;
  background: rgba(255, 255, 255, 0.9);
  color: #2563eb;
  cursor: pointer;
}

.dashboard-account-profile-close svg {
  width: 1rem;
}

.dashboard-account-profile-drawer > header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding-right: 2.5rem;
}

.dashboard-account-profile-drawer > header > div {
  min-width: 0;
}

.dashboard-account-profile-drawer > header span {
  color: #2563eb;
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-account-profile-drawer > header h2 {
  margin: 0.16rem 0;
  color: #0f172a;
  font-size: 1.35rem;
  line-height: 1.1;
}

.dashboard-account-profile-drawer > header p,
.dashboard-account-profile-bio {
  margin: 0;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.5;
}

.dashboard-account-profile-commercial {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-account-profile-commercial > div {
  min-height: 3.35rem;
  background: #fff;
}

.dashboard-account-profile-drawer > dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0;
}

.dashboard-account-profile-drawer > dl > div {
  min-width: 0;
  display: grid;
  gap: 0.16rem;
  padding: 0.65rem;
  border: 1px solid #dbeafe;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.82);
}

.dashboard-account-profile-drawer dt,
.dashboard-account-profile-projects > span,
.dashboard-account-profile-timeline > span {
  color: #64748b;
  font-size: 0.56rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-account-profile-drawer dd {
  overflow-wrap: anywhere;
  margin: 0;
  color: #0f172a;
  font-size: 0.7rem;
  font-weight: 800;
}

.dashboard-account-profile-timeline {
  display: grid;
  gap: 0.42rem;
  padding: 0.75rem;
  border: 1px solid #dbeafe;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.68);
}

.dashboard-account-profile-timeline article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
}

.dashboard-account-profile-timeline article > i {
  width: 0.54rem;
  height: 0.54rem;
  border-radius: 50%;
  background: #60a5fa;
  box-shadow: 0 0 0 0.22rem #dbeafe;
}

.dashboard-account-profile-timeline article > i.won {
  background: #22c55e;
  box-shadow: 0 0 0 0.22rem #dcfce7;
}

.dashboard-account-profile-timeline article > div {
  min-width: 0;
  display: grid;
}

.dashboard-account-profile-timeline article strong,
.dashboard-account-profile-timeline article small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-account-profile-timeline article strong {
  color: #0f172a;
  font-size: 0.67rem;
}

.dashboard-account-profile-timeline article small,
.dashboard-account-profile-timeline article em {
  color: #64748b;
  font-size: 0.55rem;
  font-style: normal;
  font-weight: 700;
}

.dashboard-account-profile-projects {
  display: grid;
  gap: 0.42rem;
}

.dashboard-account-profile-projects > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.dashboard-account-profile-projects strong {
  padding: 0.3rem 0.45rem;
  border: 1px solid #c7d2fe;
  border-radius: 99px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 0.58rem;
}

.dashboard-account-profile-drawer > footer {
  margin-top: auto;
  padding-top: 0.7rem;
  border-top: 1px solid #dbeafe;
}

.dashboard-account-profile-drawer > footer span {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  color: #64748b;
  font-size: 0.6rem;
  font-weight: 650;
}

.dashboard-account-profile-drawer > footer svg {
  flex: 0 0 0.78rem;
  width: 0.78rem;
}

.account-temporary-password-notice {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 0.8rem;
  padding: 0.72rem 0.8rem;
  border: 1px solid #fdba74;
  border-radius: 0.8rem;
  background: #fff7ed;
  color: #9a3412;
}

.account-temporary-password-notice > svg {
  flex: 0 0 1.15rem;
  width: 1.15rem;
}

.account-temporary-password-notice > span {
  display: grid;
  gap: 0.08rem;
}

.account-temporary-password-notice small {
  font-weight: 650;
}

.account-analytics-preferences {
  box-sizing: border-box;
  display: grid;
  gap: 0.4rem;
  max-width: 100%;
  min-width: 0;
  margin-top: 0.4rem;
  padding: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  text-align: left;
  width: 100%;
}

.account-analytics-preferences-heading {
  display: grid;
  gap: 0.12rem;
  max-width: 100%;
  min-width: 0;
}

.account-analytics-preferences-heading > strong {
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.2;
  max-width: 100%;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.account-analytics-preferences-heading > small {
  color: #475569;
  font-size: 0.6rem;
  font-weight: 650;
  line-height: 1.32;
}

.account-analytics-service-note {
  align-items: start;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 0.65rem;
  color: var(--muted);
  display: grid;
  gap: 0.42rem;
  grid-template-columns: 1rem minmax(0, 1fr);
  max-width: 100%;
  min-width: 0;
  padding: 0.44rem 0.48rem;
}

.account-analytics-service-note svg {
  color: var(--blue);
  margin-top: 0.08rem;
  width: 1rem;
}

.account-analytics-service-copy,
.account-analytics-service-heading {
  display: flex;
  max-width: 100%;
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.account-analytics-service-copy {
  flex-direction: column;
  gap: 0.18rem;
}

.account-analytics-service-heading {
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.account-analytics-service-heading strong {
  color: var(--text);
  font-size: 0.68rem;
  line-height: 1.25;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.account-analytics-service-heading em {
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 999px;
  color: var(--blue);
  font-size: 0.54rem;
  font-style: normal;
  font-weight: 850;
  line-height: 1;
  padding: 0.18rem 0.34rem;
}

.account-analytics-service-copy > small {
  color: #475569;
  font-size: 0.58rem;
  font-weight: 650;
  line-height: 1.3;
}

.account-analytics-choices {
  border: 0;
  display: grid;
  gap: 0.24rem;
  margin: 0;
  max-width: 100%;
  min-width: 0;
  padding: 0;
  width: 100%;
}

.account-analytics-choices > legend {
  color: #475569;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.28;
  max-width: 100%;
  padding: 0 0 0.2rem;
  white-space: normal;
}

.account-analytics-choice {
  align-items: start;
  background: rgba(255, 255, 255, 0.34);
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  box-sizing: border-box;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  gap: 0.42rem;
  grid-template-columns: 1.1rem minmax(0, 1fr);
  max-width: 100%;
  min-height: 2.75rem;
  min-width: 0;
  padding: 0.38rem 0.44rem;
  transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
  width: 100%;
}

.account-analytics-choice > input {
  accent-color: var(--blue);
  cursor: pointer;
  height: 1.1rem;
  margin: 0.1rem 0 0;
  min-height: 0;
  width: 1.1rem;
}

.account-analytics-choice-copy {
  display: grid;
  gap: 0.1rem;
  max-width: 100%;
  min-width: 0;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.account-analytics-choice-copy > strong {
  color: var(--text);
  font-size: 0.66rem;
  line-height: 1.28;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.account-analytics-choice-copy > small {
  color: #475569;
  font-size: 0.58rem;
  font-weight: 650;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.account-analytics-preferences .account-analytics-choice-copy,
.account-analytics-preferences .account-analytics-service-copy,
.account-analytics-preferences .account-analytics-service-heading {
  max-width: 100%;
  min-width: 0;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.account-analytics-preferences .account-analytics-choice-copy > small,
.account-analytics-preferences .account-analytics-service-copy > small {
  max-width: 100%;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.account-analytics-choice:hover,
.account-analytics-choice:has(input:checked) {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.28);
}

.account-analytics-choice:has(input:focus-visible) {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
  outline: 2px solid transparent;
}

.account-analytics-preferences > button[type="submit"] {
  max-width: 100%;
  min-height: 2.4rem;
  white-space: normal;
  width: 100%;
}

.account-analytics-privacy-footnote {
  color: #475569;
  font-size: 0.58rem;
  font-weight: 650;
  line-height: 1.3;
  max-width: 100%;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.account-analytics-preference-status {
  color: #1d4ed8;
  font-size: 0.58rem;
  font-weight: 750;
  line-height: 1.3;
  margin: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}

.account-analytics-preference-status:empty {
  display: none;
}

.account-analytics-preference-status.error {
  color: #b91c1c;
}

.account-analytics-preference-status.success {
  color: #15803d;
}

.account-privacy-warning-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  overflow: auto;
  place-items: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.48);
  overscroll-behavior: contain;
  pointer-events: auto;
  z-index: 100;
}

.account-privacy-warning {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.7rem;
  width: min(24rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  padding: 0.85rem;
  border: 1px solid rgba(245, 158, 11, 0.38);
  border-radius: 0.85rem;
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
  text-align: left;
}

.account-privacy-warning-icon {
  display: grid;
  width: 1.9rem;
  height: 1.9rem;
  place-items: center;
  border-radius: 0.55rem;
  background: #fff7ed;
  color: #c2410c;
}

.account-privacy-warning-icon svg {
  width: 1rem;
}

.account-privacy-warning-copy {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.account-privacy-warning :is(strong, p, small) {
  max-width: 100%;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.account-privacy-warning-copy > strong {
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.22;
}

.account-privacy-warning-copy > p {
  color: #334155;
  font-size: 0.67rem;
  font-weight: 650;
  line-height: 1.42;
  margin: 0;
}

.account-privacy-warning-copy > small {
  color: #64748b;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1.35;
}

.account-privacy-warning-actions {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.account-privacy-warning-actions > button {
  min-height: 2.75rem;
  max-width: 100%;
  white-space: normal;
}

html[data-theme="dark"] .account-analytics-service-note,
html[data-theme="dark"] .account-analytics-choice {
  background: rgba(29, 30, 34, 0.86);
  border-color: rgba(234, 234, 236, 0.18);
}

html[data-theme="dark"] .account-analytics-preferences-heading > small,
html[data-theme="dark"] .account-analytics-service-copy > small,
html[data-theme="dark"] .account-analytics-choices > legend,
html[data-theme="dark"] .account-analytics-choice-copy > small,
html[data-theme="dark"] .account-analytics-privacy-footnote {
  color: #cbd5e1;
}

html[data-theme="dark"] .account-analytics-choice:hover,
html[data-theme="dark"] .account-analytics-choice:has(input:checked) {
  background: rgba(37, 99, 235, 0.16);
  border-color: rgba(147, 197, 253, 0.36);
}

html[data-theme="dark"] .account-analytics-choice:has(input:focus-visible) {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.2);
}

html[data-theme="dark"] .account-analytics-service-heading em {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(147, 197, 253, 0.34);
  color: #bfdbfe;
}

html[data-theme="dark"] .account-analytics-preference-status {
  color: #bfdbfe;
}

html[data-theme="dark"] .account-analytics-preference-status.error {
  color: #fca5a5;
}

html[data-theme="dark"] .account-analytics-preference-status.success {
  color: #86efac;
}

html[data-theme="dark"] .account-privacy-warning {
  border-color: rgba(251, 191, 36, 0.38);
  background: #1b1c20;
  color: #f8fafc;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.52);
}

html[data-theme="dark"] .account-privacy-warning-copy > strong {
  color: #f8fafc;
}

html[data-theme="dark"] .account-privacy-warning-copy > p,
html[data-theme="dark"] .account-privacy-warning-copy > small {
  color: #cbd5e1;
}

html[data-theme="dark"] .account-privacy-warning-icon {
  background: rgba(194, 65, 12, 0.24);
  color: #fdba74;
}

html[data-theme="dark"] .account-privacy-warning [data-account-privacy-warning-cancel] {
  background: rgba(17, 18, 21, 0.92);
  color: #f8fafc;
}

html[data-theme="dark"] .account-privacy-warning [data-account-privacy-warning-confirm] {
  background: rgba(127, 29, 29, 0.88);
  color: #fee2e2;
}

@media (max-width: 480px) {
  .account-privacy-warning {
    width: 100%;
    max-width: 100%;
    max-height: calc(100dvh - 1rem);
    padding: 0.72rem;
  }

  .account-privacy-warning-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}

.auth-signup-pending {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.8rem;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid #bbf7d0;
  border-radius: 1rem;
  background: linear-gradient(145deg, #f0fdf4, #eff6ff);
}

.auth-signup-pending-icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.8rem;
  background: #dcfce7;
  color: #15803d;
}

.auth-signup-pending > div {
  min-width: 0;
  display: grid;
  gap: 0.3rem;
}

.auth-signup-pending strong {
  color: #0f172a;
}

.auth-signup-pending p,
.auth-signup-pending small {
  margin: 0;
  color: #475569;
  font-weight: 650;
}

.auth-signup-pending > button {
  grid-column: 1 / -1;
  justify-self: end;
}

.auth-protected-account-note {
  display: block;
  padding: 0.58rem 0.65rem;
  border: 1px solid #fed7aa;
  border-radius: 0.65rem;
  background: #fff7ed;
  color: #9a3412 !important;
}

.auth-protected-account-note[hidden] {
  display: none;
}

html[data-theme="dark"] .dashboard-account-governance-workspace {
  background: radial-gradient(circle at 12% 0%, rgba(37, 99, 235, 0.22), transparent 34%), #0f172a;
}

html[data-theme="dark"] .dashboard-account-governance-demo {
  border-color: rgba(129, 140, 248, 0.3);
  background:
    radial-gradient(circle at 94% 12%, rgba(99, 102, 241, 0.25), transparent 30%),
    linear-gradient(145deg, rgba(30, 41, 59, 0.98), rgba(30, 27, 75, 0.82));
}

html[data-theme="dark"] .dashboard-account-governance-demo-content h2 {
  color: #f8fafc;
}

html[data-theme="dark"] .dashboard-account-governance-demo-content p,
html[data-theme="dark"] .dashboard-account-governance-demo-content > footer small {
  color: #cbd5e1;
}

html[data-theme="dark"] .dashboard-account-governance-demo-content > header > em,
html[data-theme="dark"] .dashboard-account-governance-demo-stats > span,
html[data-theme="dark"] .dashboard-account-governance-demo-credentials,
html[data-theme="dark"] .dashboard-account-governance-demo-empty {
  border-color: rgba(129, 140, 248, 0.26);
  background: rgba(15, 23, 42, 0.58);
}

html[data-theme="dark"] .dashboard-account-governance-demo-stats strong {
  color: #c7d2fe;
}

html[data-theme="dark"] .dashboard-account-governance-demo-password > code,
html[data-theme="dark"] .dashboard-account-governance-demo-emails code {
  border-color: rgba(129, 140, 248, 0.28);
  background: rgba(49, 46, 129, 0.42);
  color: #e0e7ff;
}

html[data-theme="dark"] :is(.dashboard-account-governance-panel, .dashboard-account-application, .dashboard-governance-account-row, .dashboard-account-governance-summary > span) {
  border-color: rgba(96, 165, 250, 0.24);
  background: rgba(15, 23, 42, 0.9);
}

html[data-theme="dark"] :is(.dashboard-account-governance-summary strong, .dashboard-account-governance-panel-head h2, .dashboard-account-application > header strong, .dashboard-governance-account-person strong, .auth-signup-pending strong, .dashboard-account-create-intro h2, .dashboard-account-create-result > div:first-child strong, .dashboard-account-intelligence > header h2, .dashboard-account-intelligence h3, .dashboard-account-intelligence-metrics strong) {
  color: #f8fafc;
}

html[data-theme="dark"] :is(.dashboard-account-application-fields input, .dashboard-account-application-fields select, .dashboard-account-application-fields textarea, .dashboard-governance-account-row select, .dashboard-account-governance-search input, .dashboard-account-create-form input, .dashboard-account-create-form select, .dashboard-account-intelligence-fields input, .dashboard-account-intelligence-fields select) {
  border-color: #334155;
  background: #111827;
  color: #f8fafc;
}

html[data-theme="dark"] :is(.dashboard-account-create-panel, .dashboard-account-intelligence) {
  border-color: rgba(96, 165, 250, 0.28);
  background:
    radial-gradient(circle at 96% 2%, rgba(37, 99, 235, 0.22), transparent 30%),
    rgba(15, 23, 42, 0.94);
}

html[data-theme="dark"] :is(.dashboard-account-create-intro p, .dashboard-account-intelligence > header p, .dashboard-account-create-result > div:first-child span, .dashboard-account-create-result > div:first-child small, .dashboard-account-intelligence-profile > header p, .dashboard-account-intelligence-metrics em) {
  color: #cbd5e1;
}

html[data-theme="dark"] .dashboard-account-create-result {
  border-color: rgba(74, 222, 128, 0.32);
  background: rgba(20, 83, 45, 0.34);
}

html[data-theme="dark"] .dashboard-account-create-result.warning {
  border-color: rgba(251, 146, 60, 0.4);
  background: rgba(124, 45, 18, 0.36);
}

html[data-theme="dark"] .dashboard-account-temporary-password code {
  border-color: #334155;
  background: #111827;
  color: #bbf7d0;
}

html[data-theme="dark"] :is(.dashboard-account-intelligence-grid > article, .dashboard-account-intelligence-profile, .dashboard-account-intelligence-metrics > span) {
  border-color: #334155;
  background: rgba(17, 24, 39, 0.78);
}

html[data-theme="dark"] .dashboard-account-intelligence-tags > span {
  border-color: rgba(129, 140, 248, 0.32);
  background: rgba(49, 46, 129, 0.46);
  color: #e0e7ff;
}

html[data-theme="dark"] .dashboard-account-intelligence-privacy {
  border-color: rgba(56, 189, 248, 0.32);
  background: rgba(8, 47, 73, 0.55);
  color: #bae6fd;
}

html[data-theme="dark"] .dashboard-account-intelligence-opted-out {
  border-color: #334155;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.96));
  color: #cbd5e1;
}

html[data-theme="dark"] .dashboard-account-intelligence-opted-out > span {
  background: #334155;
  color: #cbd5e1;
}

html[data-theme="dark"] .dashboard-account-intelligence-opted-out :is(h3, p) {
  color: #e2e8f0;
}

html[data-theme="dark"] :is(
  .dashboard-account-intelligence-mix-card,
  .dashboard-account-company-facts,
  .dashboard-account-relationship-group
) {
  border-color: #334155;
  background: rgba(15, 23, 42, 0.76);
}

html[data-theme="dark"] .dashboard-account-commercial-card {
  border-color: rgba(99, 102, 241, 0.36);
  background:
    radial-gradient(circle at 110% -10%, rgba(99, 102, 241, 0.3), transparent 40%),
    linear-gradient(150deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96) 58%, rgba(46, 16, 101, 0.42));
}

html[data-theme="dark"] .dashboard-account-relationship-map {
  border-color: rgba(96, 165, 250, 0.32);
  background:
    linear-gradient(rgba(96, 165, 250, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 165, 250, 0.06) 1px, transparent 1px),
    radial-gradient(circle at 50% -20%, rgba(14, 165, 233, 0.2), transparent 50%),
    #0b1220;
  background-size: 24px 24px, 24px 24px, auto, auto;
}

html[data-theme="dark"] :is(
  .dashboard-account-intelligence-identity h2,
  .dashboard-account-preferred-distributor > span:nth-child(2) strong,
  .dashboard-account-commercial-metrics strong,
  .dashboard-account-profile-commercial strong,
  .dashboard-account-commercial-empty strong,
  .dashboard-account-relationship-map > header h2,
  .dashboard-account-relationship-card-copy > strong,
  .dashboard-account-profile-drawer > header h2,
  .dashboard-account-profile-drawer dd,
  .dashboard-account-profile-timeline article strong
) {
  color: #f8fafc;
}

html[data-theme="dark"] :is(
  .dashboard-account-intelligence-identity p,
  .dashboard-account-intelligence-distribution article > span,
  .dashboard-account-commercial-provenance,
  .dashboard-account-company-facts > header p,
  .dashboard-account-intelligence-fields label,
  .dashboard-account-relationship-map > header p,
  .dashboard-account-relationship-map-key span,
  .dashboard-account-relationship-card-copy > small,
  .dashboard-account-relationship-card-copy i,
  .dashboard-account-profile-drawer > header p,
  .dashboard-account-profile-bio,
  .dashboard-account-profile-drawer dt,
  .dashboard-account-profile-projects > span,
  .dashboard-account-profile-timeline > span,
  .dashboard-account-profile-timeline article small,
  .dashboard-account-profile-timeline article em,
  .dashboard-account-profile-drawer > footer span
) {
  color: #cbd5e1;
}

html[data-theme="dark"] .dashboard-account-preferred-distributor > span:nth-child(2) small {
  color: #93c5fd;
}

html[data-theme="dark"] :is(
  .dashboard-account-preferred-distributor > span:nth-child(2) em,
  .dashboard-account-preferred-distributor > span:nth-child(2) i
) {
  color: #cbd5e1;
}

html[data-theme="dark"] .dashboard-account-intelligence-identity-badges em {
  border-color: #334155;
  background: rgba(30, 41, 59, 0.86);
  color: #cbd5e1;
}

html[data-theme="dark"] .dashboard-account-intelligence-identity-badges em.premium {
  border-color: rgba(167, 139, 250, 0.44);
  background: rgba(76, 29, 149, 0.42);
  color: #ddd6fe;
}

html[data-theme="dark"] .dashboard-account-intelligence-metrics > span {
  border-color: #334155;
  background:
    radial-gradient(circle at 100% 0%, rgba(59, 130, 246, 0.16), transparent 45%),
    linear-gradient(145deg, rgba(17, 24, 39, 0.94), rgba(15, 23, 42, 0.94));
}

html[data-theme="dark"] :is(
  .dashboard-account-intelligence-metrics > span > b,
  .dashboard-account-intelligence-distribution article > i
) {
  background: #334155;
}

html[data-theme="dark"] .dashboard-account-intelligence-distribution {
  border-top-color: #334155;
}

html[data-theme="dark"] :is(
  .dashboard-account-preferred-distributor,
  .dashboard-account-commercial-metrics > span,
  .dashboard-account-profile-commercial > div,
  .dashboard-account-relationship-card,
  .dashboard-account-profile-drawer > dl > div,
  .dashboard-account-profile-timeline,
  .dashboard-account-profile-drawer > footer
) {
  border-color: #334155;
  background: rgba(15, 23, 42, 0.86);
}

html[data-theme="dark"] .dashboard-account-preferred-distributor > b {
  background: conic-gradient(#60a5fa calc(var(--confidence) * 1%), #334155 0);
}

html[data-theme="dark"] .dashboard-account-preferred-distributor > b::before {
  background: #111827;
}

html[data-theme="dark"] .dashboard-account-observed-terms {
  border-color: rgba(74, 222, 128, 0.34);
  background: rgba(20, 83, 45, 0.34);
}

html[data-theme="dark"] .dashboard-account-observed-terms.empty {
  border-color: #334155;
  background: rgba(15, 23, 42, 0.72);
}

html[data-theme="dark"] .dashboard-account-observed-terms strong {
  color: #bbf7d0;
}

html[data-theme="dark"] .dashboard-account-observed-terms :is(p, em) {
  color: #cbd5e1;
}

html[data-theme="dark"] .dashboard-account-commercial-empty {
  border-color: rgba(96, 165, 250, 0.4);
  background: rgba(15, 23, 42, 0.58);
}

html[data-theme="dark"] .dashboard-account-relationship-empty {
  border-color: #475569;
}

html[data-theme="dark"] .dashboard-account-profile-drawer {
  border-color: rgba(96, 165, 250, 0.38);
  background:
    radial-gradient(circle at 100% 0%, rgba(99, 102, 241, 0.3), transparent 32%),
    #0f172a;
}

html[data-theme="dark"] .dashboard-account-profile-close {
  border-color: #475569;
  background: rgba(15, 23, 42, 0.92);
  color: #93c5fd;
}

html[data-theme="dark"] .dashboard-account-profile-projects strong {
  border-color: rgba(129, 140, 248, 0.4);
  background: rgba(49, 46, 129, 0.48);
  color: #e0e7ff;
}

html[data-theme="dark"] .account-temporary-password-notice {
  border-color: rgba(251, 146, 60, 0.36);
  background: rgba(124, 45, 18, 0.46);
  color: #fed7aa;
}

html[data-theme="dark"] .auth-signup-pending {
  border-color: rgba(74, 222, 128, 0.3);
  background: linear-gradient(145deg, rgba(20, 83, 45, 0.34), rgba(30, 64, 175, 0.24));
}

html[data-theme="dark"] .auth-signup-pending :is(p, small) {
  color: #cbd5e1;
}

@media (max-width: 1200px) {
  .dashboard-account-intelligence-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-account-company-facts {
    grid-column: 1 / -1;
  }

  .dashboard-account-relationship-map-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .dashboard-account-governance-panel-head,
  .dashboard-account-application > footer,
  .dashboard-account-governance-demo-content > header,
  .dashboard-account-governance-demo-content > footer,
  .dashboard-account-intelligence > header {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-account-create-panel,
  .dashboard-account-intelligence-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-account-create-form {
    grid-template-columns: minmax(0, 1fr) minmax(160px, 0.55fr) auto;
  }

  .dashboard-account-create-result {
    grid-template-columns: minmax(0, 1fr) minmax(230px, auto);
  }

  .dashboard-account-create-result > button {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .dashboard-account-intelligence-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-account-intelligence-overview-grid,
  .dashboard-account-relationship-map-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-account-company-facts {
    grid-column: auto;
  }

  .dashboard-account-relationship-map > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-account-relationship-map-key {
    justify-content: flex-start;
  }

  .dashboard-account-governance-demo-credentials {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-account-governance-demo-password {
    justify-content: flex-start;
  }

  .dashboard-account-governance-demo-emails {
    grid-column: auto;
  }

  .dashboard-account-governance-demo-content > footer > div {
    justify-content: flex-start;
  }

  .dashboard-account-governance-filters,
  .dashboard-account-governance-search {
    width: 100%;
  }

  .dashboard-governance-account-row {
    grid-template-columns: minmax(0, 1fr) minmax(150px, 0.7fr);
  }
}

@media (max-width: 620px) {
  .dashboard-account-governance-demo {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-account-governance-demo-icon {
    width: 2.75rem;
    height: 2.75rem;
  }

  .dashboard-account-governance-demo-password {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-account-governance-demo-password > code {
    width: 100%;
    box-sizing: border-box;
  }

  .dashboard-account-governance-demo-content > footer > div,
  .dashboard-account-governance-demo-content > footer > div > button {
    width: 100%;
  }

  .dashboard-account-governance-summary,
  .dashboard-account-application-fields,
  .dashboard-governance-account-row,
  .dashboard-account-create-form,
  .dashboard-account-create-result,
  .dashboard-account-intelligence-metrics,
  .dashboard-account-intelligence-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-account-create-result > button {
    grid-column: auto;
    justify-self: stretch;
  }

  .dashboard-account-intelligence-profile > footer,
  .dashboard-governance-account-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-account-intelligence-identity {
    align-items: flex-start;
  }

  .dashboard-account-intelligence-identity p {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .dashboard-account-intelligence-hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-account-preferred-distributor {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .dashboard-account-preferred-distributor > b {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .dashboard-account-company-facts .dashboard-account-intelligence-fields,
  .dashboard-account-profile-drawer > dl,
  .dashboard-account-profile-commercial {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-account-profile-backdrop {
    padding: 0;
  }

  .dashboard-account-profile-drawer {
    width: 100%;
    border-radius: 0;
  }

  .dashboard-account-application-fields label.wide {
    grid-column: auto;
  }

  .dashboard-account-governance-filters {
    overflow-x: auto;
  }

  .dashboard-account-application > header,
  .dashboard-account-application > footer > div {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-account-application > footer > div > button,
  .dashboard-governance-account-row > button {
    width: 100%;
  }
}

/* Public-health toolbar entry for the floor-plan outlet finder. */
.public-health-outlet-finder-tool {
  border-color: rgba(13, 148, 136, 0.38);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.26)),
    linear-gradient(120deg, rgba(45, 212, 191, 0.30), rgba(56, 189, 248, 0.22));
  color: #0f766e;
  box-shadow: var(--glass-edge), 0 8px 18px rgba(13, 148, 136, 0.10);
}

.public-health-outlet-finder-tool:not(.active):not(:disabled):hover {
  border-color: rgba(13, 148, 136, 0.58);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.30)),
    linear-gradient(120deg, rgba(45, 212, 191, 0.40), rgba(56, 189, 248, 0.28));
  color: #0f615f;
  box-shadow: var(--glass-edge), 0 10px 22px rgba(13, 148, 136, 0.16);
}

.public-health-outlet-finder-tool.active {
  border-color: rgba(13, 148, 136, 0.68);
  background: linear-gradient(145deg, #0f9f97, #0284c7);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 10px 22px rgba(8, 145, 178, 0.22);
}

.outlet-finder-mode-badge {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 2px 5px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: #0f766e;
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  opacity: 0.82;
}

.public-health-outlet-finder-tool.active .outlet-finder-mode-badge {
  color: #fff;
}

.tool-palette.compact .outlet-finder-mode-badge {
  display: none;
}

html[data-theme="dark"] .public-health-outlet-finder-tool:not(.active) {
  border-color: rgba(45, 212, 191, 0.42);
  background: linear-gradient(145deg, rgba(15, 118, 110, 0.30), rgba(2, 132, 199, 0.20));
  color: #99f6e4;
}

html[data-theme="dark"] .public-health-outlet-finder-tool:not(.active) .outlet-finder-mode-badge {
  color: #99f6e4;
}

.floor-plan-popover.floor-outlet-finder-toolbar-popover {
  width: min(430px, calc(100% - 48px));
  height: auto;
  max-height: calc(100% - 24px);
  grid-template-rows: auto auto;
  overflow: auto;
}

.floor-outlet-finder-toolbar-popover .floor-plan-head {
  margin-bottom: 7px;
}

.floor-outlet-finder-toolbar-popover .floor-outlet-detection-actions {
  min-width: 0;
}

.floor-outlet-finder-toolbar-popover .trace-status {
  margin-top: 8px;
}

/* Floor-plan outlet finder and review. */
.floor-plan-popover .floor-outlet-detection-actions {
  position: relative;
  isolation: isolate;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 7px;
  padding: 9px;
  overflow: hidden;
  border: 1px solid rgba(14, 116, 144, 0.22);
  border-radius: 12px;
  background:
    radial-gradient(circle at 100% 0, rgba(45, 212, 191, 0.12), transparent 42%),
    linear-gradient(145deg, rgba(240, 253, 250, 0.82), rgba(239, 246, 255, 0.7));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 8px 20px rgba(15, 39, 71, 0.05);
}

.floor-outlet-detection-head {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.floor-outlet-detection-head > span:last-child {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.floor-outlet-detection-head strong {
  color: #12324b;
  font-size: 11px;
  font-weight: 880;
  line-height: 1.25;
}

.floor-outlet-detection-head small {
  color: #607087;
  font-size: 9.5px;
  font-weight: 650;
  line-height: 1.3;
}

.floor-outlet-detection-head-icon {
  position: relative;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(8, 145, 178, 0.32);
  border-radius: 9px;
  background: linear-gradient(145deg, #0e7490, #0d9488);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 5px 12px rgba(13, 148, 136, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.floor-outlet-detection-head-icon::after {
  position: absolute;
  inset: 5px;
  border: 1px dashed rgba(255, 255, 255, 0.58);
  border-radius: 50%;
  content: "";
}

.floor-outlet-detection-actions .floor-trace-mode {
  padding: 5px;
  gap: 5px;
  background: rgba(255, 255, 255, 0.55);
}

.floor-outlet-detection-actions .floor-trace-mode > :is(label, button) {
  min-height: 38px;
  padding: 6px 8px;
}

.floor-outlet-detection-actions .floor-trace-action-row {
  justify-content: flex-start;
}

.floor-outlet-detection-actions .floor-trace-action-row > button {
  min-height: 32px;
}

.floor-outlet-detection-actions > :is(.plan-note, .floor-trace-privacy) {
  margin: 0;
}

.floor-outlet-detection-status {
  border-color: rgba(13, 148, 136, 0.25);
  background: linear-gradient(145deg, rgba(204, 251, 241, 0.58), rgba(239, 246, 255, 0.68));
}

.floor-outlet-detection-status strong {
  color: #0f615f;
}

.floor-outlet-detection-review-popover {
  width: min(500px, calc(100% - 28px));
}

.floor-outlet-detection-review {
  --outlet-detection-high: #0f9f97;
  --outlet-detection-medium: #d97706;
  --outlet-detection-low: #dc2626;
  gap: 8px;
}

.floor-outlet-detection-review-list {
  max-height: min(34vh, 350px);
  gap: 5px;
}

.floor-outlet-detection-review-overlay {
  background:
    linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    rgba(248, 250, 252, 0.88);
  background-size: 18px 18px;
}

.floor-trace-overlay-legend i.outlet {
  width: 10px;
  height: 10px;
  border: 2px solid #0e7490;
  border-radius: 3px;
  background: rgba(204, 251, 241, 0.92);
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.13);
}

.floor-outlet-detection-overlay {
  pointer-events: none;
}

.floor-outlet-detection-overlay.review .floor-outlet-detection-candidate {
  pointer-events: all;
  cursor: pointer;
}

.floor-outlet-detection-candidate {
  --outlet-detection-color: #0e7490;
  --outlet-detection-halo: rgba(14, 116, 144, 0.16);
  color: var(--outlet-detection-color);
  opacity: 0.94;
  transition: opacity 0.14s ease, filter 0.14s ease;
}

.floor-outlet-detection-candidate.high {
  --outlet-detection-color: var(--outlet-detection-high, #0f9f97);
  --outlet-detection-halo: rgba(15, 159, 151, 0.17);
}

.floor-outlet-detection-candidate.medium {
  --outlet-detection-color: var(--outlet-detection-medium, #d97706);
  --outlet-detection-halo: rgba(217, 119, 6, 0.16);
}

.floor-outlet-detection-candidate.low {
  --outlet-detection-color: var(--outlet-detection-low, #dc2626);
  --outlet-detection-halo: rgba(220, 38, 38, 0.14);
}

.floor-outlet-detection-halo {
  fill: var(--outlet-detection-halo);
  stroke: var(--outlet-detection-color);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.floor-outlet-detection-symbol > rect {
  fill: rgba(255, 255, 255, 0.9);
  stroke: var(--outlet-detection-color);
  stroke-width: 1.35;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 2px 3px rgba(15, 23, 42, 0.18));
}

.floor-outlet-detection-symbol-asset,
.floor-outlet-detection-symbol-glyph {
  color: var(--outlet-detection-color);
  opacity: 0.96;
  pointer-events: none;
}

.floor-outlet-detection-label {
  fill: #102a43;
  stroke: rgba(255, 255, 255, 0.96);
  stroke-width: 3.5px;
  stroke-linejoin: round;
  paint-order: stroke fill;
  font-size: 9px;
  font-weight: 880;
  letter-spacing: -0.1px;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

.floor-outlet-detection-candidate:is(:hover, :focus-visible, .focused) {
  opacity: 1;
  filter: drop-shadow(0 4px 6px rgba(15, 23, 42, 0.22));
}

.floor-outlet-detection-candidate:is(:hover, :focus-visible, .focused) .floor-outlet-detection-halo {
  fill: color-mix(in srgb, var(--outlet-detection-color) 22%, transparent);
  stroke-width: 2.75;
}

.floor-outlet-detection-candidate:focus-visible {
  outline: none;
}

.floor-outlet-detection-candidate:focus-visible .floor-outlet-detection-halo {
  stroke: #2563eb;
  stroke-dasharray: 4 2;
}

.floor-outlet-detection-candidate.deemphasised {
  opacity: 0.16;
  filter: grayscale(0.75);
}

.floor-outlet-detection-candidate.excluded {
  opacity: 0.38;
  filter: grayscale(0.72);
}

.floor-outlet-detection-candidate.excluded .floor-outlet-detection-halo {
  fill: rgba(100, 116, 139, 0.08);
  stroke: #64748b;
  stroke-dasharray: 4 3;
}

.floor-outlet-detection-candidate.excluded .floor-outlet-detection-symbol > rect {
  fill: rgba(248, 250, 252, 0.74);
  stroke: #64748b;
  stroke-dasharray: 3 2;
}

.floor-outlet-detection-candidate:is(.invalid, .out-of-room) {
  --outlet-detection-color: #dc2626;
  --outlet-detection-halo: rgba(220, 38, 38, 0.1);
  opacity: 0.58;
}

.floor-outlet-detection-candidate:is(.invalid, .out-of-room) .floor-outlet-detection-halo {
  stroke-dasharray: 3 2;
}

.floor-outlet-detection-row,
.floor-plan-card .floor-outlet-detection-row {
  align-items: start;
  gap: 7px;
  padding: 7px;
  border-left: 3px solid rgba(14, 116, 144, 0.68);
  background: rgba(248, 251, 255, 0.82);
}

.floor-outlet-detection-row.high { border-left-color: var(--outlet-detection-high); }
.floor-outlet-detection-row.medium { border-left-color: var(--outlet-detection-medium); }
.floor-outlet-detection-row.low { border-left-color: var(--outlet-detection-low); }

.floor-outlet-detection-row > input[type="checkbox"] {
  margin-top: 6px;
}

.floor-outlet-detection-row .floor-trace-room-copy {
  gap: 5px;
}

.floor-outlet-detection-row .floor-trace-room-copy > select {
  width: 100%;
  height: 29px;
  min-height: 29px;
  border-radius: 7px;
  padding-block: 3px;
  font-size: 10px;
}

.floor-outlet-detection-edit-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px 8px;
  flex-wrap: wrap;
}

.floor-outlet-detection-edit-row > label {
  min-width: 112px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  color: #52647d;
  font-size: 9px;
  font-weight: 780;
  white-space: nowrap;
}

.floor-outlet-detection-edit-row > label > select {
  width: 76px;
  height: 27px;
  min-height: 27px;
  padding: 3px 22px 3px 7px;
  border-radius: 7px;
  font-size: 9.5px;
  font-weight: 720;
}

.floor-outlet-detection-nudge {
  display: grid;
  grid-template-columns: repeat(4, 26px);
  gap: 3px;
}

.floor-outlet-detection-nudge > .secondary-mini {
  width: 26px;
  min-width: 26px;
  height: 26px;
  min-height: 26px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 840;
  line-height: 1;
}

.floor-outlet-detection-row .floor-trace-review-row-actions {
  gap: 5px;
}

.floor-outlet-detection-row .floor-trace-review-row-actions > button {
  min-width: 58px;
  min-height: 28px;
  padding: 4px 8px;
  font-size: 9px;
}

.floor-outlet-detection-row .floor-trace-review-row-actions > button[aria-pressed="true"] {
  border-color: rgba(37, 99, 235, 0.46);
  background: rgba(219, 234, 254, 0.86);
  color: #1d4ed8;
}

.floor-outlet-detection-row:has(> input[type="checkbox"]:not(:checked)),
.floor-outlet-detection-row.excluded {
  border-left-color: #94a3b8;
  background: rgba(248, 250, 252, 0.62);
  opacity: 0.72;
}

.floor-outlet-detection-row:has(> input[type="checkbox"]:not(:checked)):hover,
.floor-outlet-detection-row:has(> input[type="checkbox"]:not(:checked)):focus-within {
  opacity: 0.94;
}

.floor-outlet-detection-row:has(> input[type="checkbox"]:disabled),
.floor-outlet-detection-row:is(.invalid, .out-of-room) {
  border-color: rgba(220, 38, 38, 0.24);
  border-left-color: #dc2626;
  background: rgba(254, 242, 242, 0.68);
  opacity: 0.86;
}

.floor-outlet-detection-row:has(> input[type="checkbox"]:disabled) .floor-trace-room-copy > small,
.floor-outlet-detection-row:is(.invalid, .out-of-room) .floor-trace-room-copy > small {
  color: #b42318;
}

.floor-outlet-detection-row.focused {
  border-color: rgba(37, 99, 235, 0.55);
  border-left-color: #2563eb;
  background: rgba(219, 234, 254, 0.78);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12), 0 8px 18px rgba(15, 39, 71, 0.08);
  opacity: 1;
}

html[data-theme="dark"] .floor-plan-popover .floor-outlet-detection-actions {
  border-color: rgba(45, 212, 191, 0.24);
  background:
    radial-gradient(circle at 100% 0, rgba(20, 184, 166, 0.15), transparent 42%),
    linear-gradient(145deg, rgba(15, 52, 64, 0.82), rgba(15, 23, 42, 0.82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 24px rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .floor-outlet-detection-head strong {
  color: #ecfeff;
}

html[data-theme="dark"] .floor-outlet-detection-head small,
html[data-theme="dark"] .floor-outlet-detection-edit-row > label {
  color: #b9c8d9;
}

html[data-theme="dark"] .floor-outlet-detection-actions .floor-trace-mode {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(2, 6, 23, 0.34);
}

html[data-theme="dark"] .floor-outlet-detection-status {
  border-color: rgba(45, 212, 191, 0.28);
  background: rgba(13, 76, 74, 0.38);
}

html[data-theme="dark"] .floor-outlet-detection-status strong {
  color: #99f6e4;
}

html[data-theme="dark"] .floor-outlet-detection-review-overlay {
  border-color: rgba(94, 234, 212, 0.22);
  background:
    linear-gradient(rgba(148, 163, 184, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.07) 1px, transparent 1px),
    rgba(8, 14, 23, 0.84);
  background-size: 18px 18px;
}

html[data-theme="dark"] .floor-trace-overlay-legend i.outlet {
  border-color: #5eead4;
  background: rgba(15, 118, 110, 0.74);
  box-shadow: 0 0 0 2px rgba(45, 212, 191, 0.13);
}

html[data-theme="dark"] .floor-outlet-detection-label {
  fill: #f8fafc;
  stroke: rgba(2, 6, 23, 0.94);
}

html[data-theme="dark"] .floor-outlet-detection-symbol > rect {
  fill: rgba(15, 23, 42, 0.9);
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.42));
}

html[data-theme="dark"] .floor-outlet-detection-row,
html[data-theme="dark"] .floor-plan-card .floor-outlet-detection-row {
  border-color: rgba(148, 163, 184, 0.2);
  border-left-color: #2dd4bf;
  background: rgba(15, 23, 42, 0.76);
}

html[data-theme="dark"] .floor-outlet-detection-row.high { border-left-color: #2dd4bf; }
html[data-theme="dark"] .floor-outlet-detection-row.medium { border-left-color: #fbbf24; }
html[data-theme="dark"] .floor-outlet-detection-row.low { border-left-color: #fb7185; }

html[data-theme="dark"] .floor-outlet-detection-row:has(> input[type="checkbox"]:not(:checked)),
html[data-theme="dark"] .floor-outlet-detection-row.excluded {
  border-left-color: #64748b;
  background: rgba(15, 23, 42, 0.54);
}

html[data-theme="dark"] .floor-outlet-detection-row:has(> input[type="checkbox"]:disabled),
html[data-theme="dark"] .floor-outlet-detection-row:is(.invalid, .out-of-room) {
  border-color: rgba(251, 113, 133, 0.28);
  border-left-color: #fb7185;
  background: rgba(76, 5, 25, 0.36);
}

html[data-theme="dark"] .floor-outlet-detection-row:has(> input[type="checkbox"]:disabled) .floor-trace-room-copy > small,
html[data-theme="dark"] .floor-outlet-detection-row:is(.invalid, .out-of-room) .floor-trace-room-copy > small {
  color: #fda4af;
}

html[data-theme="dark"] .floor-outlet-detection-row.focused {
  border-color: rgba(96, 165, 250, 0.54);
  border-left-color: #60a5fa;
  background: rgba(8, 48, 83, 0.68);
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.12), 0 8px 18px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .floor-outlet-detection-row .floor-trace-review-row-actions > button[aria-pressed="true"] {
  border-color: rgba(96, 165, 250, 0.52);
  background: rgba(30, 64, 175, 0.46);
  color: #dbeafe;
}

@media (max-width: 760px) {
  .floor-outlet-detection-review-popover {
    right: 8px;
    width: calc(100% - 16px);
  }

  .floor-outlet-detection-review-overlay .floor-trace-review-overlay-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .floor-plan-popover .floor-outlet-detection-actions {
    padding: 8px;
  }

  .floor-outlet-detection-row,
  .floor-plan-card .floor-outlet-detection-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .floor-outlet-detection-row .floor-trace-review-row-actions {
    grid-column: 2;
    display: flex;
    align-items: center;
    justify-content: flex-start;
  }

  .floor-outlet-detection-edit-row {
    align-items: stretch;
    flex-direction: column;
  }

  .floor-outlet-detection-edit-row > label {
    justify-content: space-between;
  }

  .floor-outlet-detection-nudge {
    grid-template-columns: repeat(4, minmax(30px, 1fr));
    width: 100%;
  }

  .floor-outlet-detection-nudge > .secondary-mini {
    width: 100%;
    min-width: 30px;
    height: 30px;
    min-height: 30px;
  }

  .floor-outlet-detection-label {
    font-size: 8px;
  }
}

@media (pointer: coarse) {
  .floor-outlet-detection-nudge {
    grid-template-columns: repeat(4, minmax(32px, 1fr));
  }

  .floor-outlet-detection-nudge > .secondary-mini {
    width: 100%;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .floor-outlet-detection-candidate,
  .floor-outlet-detection-row {
    transition: none;
  }
}

/* Neutral dark-theme surface standard. Semantic service, status, focus and
   selected-state colours remain defined by their component rules. */
html[data-theme="dark"] :is(
  .dashboard-workspace,
  .dashboard-dhw-workspace,
  .dashboard-unit-workspace,
  .dashboard-quick-tender-workspace,
  .dashboard-analytics-workspace,
  .dashboard-advertising-workspace,
  .dashboard-product-library-workspace.storefront-mode,
  .dashboard-product-library-workspace.mail-mode,
  .dashboard-product-library-workspace.management-mode
) {
  background: var(--theme-page-bg);
}

html[data-theme="dark"] :is(
  .account-menu-popover,
  .project-settings-popover,
  .brand-menu-popover,
  .methodology-popover,
  .history-popover,
  .export-popover,
  .product-library-popover,
  .floor-plan-popover,
  .team-activity-popover,
  .programme-settings-popover,
  .schematic-selection-menu,
  .floor-drawing-editor-dialog,
  .project-export-pack-selection-dialog,
  .drawing-export-selection-dialog,
  .disclaimer-agreement-popover,
  .hydraulic-panel,
  .plant-room-side-panel,
  .plant-room-planner-sidebar,
  .plant-room-product-library-panel
) {
  border-color: rgba(234, 234, 236, 0.18);
  background: var(--theme-card-bg);
  box-shadow: var(--theme-card-shadow);
}

html[data-theme="dark"] :is(
  .product-library-rail,
  .product-library-main,
  .product-detail-panel,
  .dashboard-dhw-panel,
  .dashboard-dhw-hero-result,
  .dashboard-unit-section,
  .dashboard-unit-slider,
  .dashboard-analytics-sidebar,
  .dashboard-analytics-main,
  .dashboard-analytics-panel,
  .dashboard-analytics-summary,
  .dashboard-advertising-panel,
  .dashboard-analytics-chart-panel,
  .dashboard-analytics-project-popup,
  .quick-tender-side,
  .quick-tender-main,
  .quick-tender-summary,
  .quick-tender-product-picker,
  .quick-tender-sponsored-panel
) {
  border-color: rgba(234, 234, 236, 0.16);
  background: rgba(24, 25, 28, 0.84);
}

html[data-theme="dark"] :is(
  .collapsible-section-head,
  .panel-head,
  .export-popover-head,
  .history-popover-head,
  .product-panel-title,
  .section-header,
  .settings-section-title,
  .card-header,
  .team-activity-popover-head,
  .floor-drawing-editor-head,
  .floor-drawing-editor-footer,
  .project-export-pack-selection-header,
  .drawing-export-selection-head
) {
  border-color: rgba(234, 234, 236, 0.16);
  background: linear-gradient(180deg, rgba(43, 44, 49, 0.96), rgba(19, 20, 23, 0.90));
}

html[data-theme="dark"] :is(
  .project-settings-popover,
  .product-library-popover,
  .history-popover,
  .export-popover,
  .floor-plan-popover,
  .programme-settings-popover,
  .plant-room-side-panel
) :is(input, select, textarea):not(:hover):not(:focus):not(:focus-visible) {
  border-color: rgba(234, 234, 236, 0.22);
  background: var(--input-glass);
}

/* Extend the neutral surface standard to specialist workspaces. Interaction,
   service and status selectors keep their existing accent colours. */
html[data-theme="dark"] :is(
  .three-workspace .three-visibility-controls,
  .three-workspace .three-hud,
  .three-workspace[data-google-earth-3d-mode="photorealistic"] .three-visibility-controls
) {
  border-color: rgba(234, 234, 236, 0.20);
  background: rgba(20, 21, 24, 0.94);
}

html[data-theme="dark"] :is(
  .three-workspace .three-view-switch,
  .three-workspace .three-visibility-collapse:not(:hover):not(:focus-visible),
  .three-workspace .three-visibility-control,
  .three-workspace .three-visibility-map-control,
  .three-workspace .three-hud > div,
  .three-workspace .three-earth-control-hint,
  .three-workspace .three-visibility-border-input input:not(:hover):not(:focus),
  .three-workspace .three-visibility-controls .three-visibility-control > button:not(.active):not(:hover):not(:focus-visible),
  .three-workspace[data-google-earth-3d-mode="photorealistic"] .three-view-switch,
  .three-workspace[data-google-earth-3d-mode="photorealistic"] .three-visibility-collapse:not(:hover):not(:focus-visible),
  .three-workspace[data-google-earth-3d-mode="photorealistic"] .three-visibility-control,
  .three-workspace[data-google-earth-3d-mode="photorealistic"] .three-visibility-map-control,
  .three-workspace[data-google-earth-3d-mode="photorealistic"] .three-earth-control-hint,
  .three-workspace[data-google-earth-3d-mode="photorealistic"] .three-visibility-controls .three-visibility-control > button:not(.active):not(:hover):not(:focus-visible)
) {
  border-color: rgba(234, 234, 236, 0.20);
  background: rgba(35, 36, 40, 0.88);
}

html[data-theme="dark"] .hydraulic-overlay {
  background: rgba(5, 6, 8, 0.78);
}

html[data-theme="dark"] .hydraulic-shell {
  border-color: rgba(234, 234, 236, 0.18);
  background: linear-gradient(145deg, rgba(24, 25, 28, 0.97), rgba(8, 9, 11, 0.96));
}

html[data-theme="dark"] :is(
  .hydraulic-panel,
  .hydraulic-result-card:not(.gas-result-status-pass):not(.gas-result-status-fail),
  .hydraulic-fitting-row,
  .hydraulic-index-summary div:not(.gas-index-summary-pass):not(.gas-index-summary-review):not(.gas-index-summary-fail),
  .hydraulic-check:not(:has(input:checked)):not(:focus-within),
  .gas-product-picker,
  .gas-product-picker-card:not(.selected):not(:hover):not(:focus-visible),
  .hydraulic-schedule-reference:not(:hover):not(:focus):not(:focus-visible),
  .hydraulic-fitting-collapsed:not(:hover):not(:focus-visible),
  .hydraulic-fitting-detail-row td,
  .gas-schedule-collapsed-summary span:not(.pass):not(.review):not(.fail)
) {
  border-color: rgba(234, 234, 236, 0.18);
  background: rgba(29, 30, 34, 0.82);
}

html[data-theme="dark"] :is(
  .gas-product-select-card button:not(:hover):not(:focus-visible),
  .hydraulic-close:not(:hover):not(:focus-visible),
  .hydraulic-field input:not(:hover):not(:focus),
  .hydraulic-field select:not(:hover):not(:focus-visible),
  .hydraulic-length-input:not(:hover):not(:focus),
  .hydraulic-row-select:not(:hover):not(:focus-visible),
  .hydraulic-length-control input:not(:hover):not(:focus),
  .hydraulic-fitting-editor select:not(:hover):not(:focus-visible),
  .hydraulic-fitting-editor input:not(:hover):not(:focus),
  .hydraulic-row-actions button:not(:hover):not(:focus-visible)
) {
  border-color: rgba(234, 234, 236, 0.18);
  background: var(--input-glass);
}

html[data-theme="dark"] .hydraulic-field select:not(:hover):not(:focus-visible) {
  background: var(--input-glass);
}

html[data-theme="dark"] .programme-workspace,
html[data-theme="dark"] .dashboard-account-governance-workspace {
  background: var(--theme-page-bg);
}

html[data-theme="dark"] :is(
  .project-workspace-context,
  .programme-header,
  .programme-calendar-panel,
  .programme-task-list,
  .programme-selected-task,
  .programme-task-drawer,
  .installation-trade-column,
  .dashboard-account-governance-panel,
  .dashboard-account-application,
  .dashboard-account-create-panel,
  .dashboard-account-intelligence,
  .dashboard-account-profile-drawer,
  .dashboard-account-governance-demo
) {
  border-color: rgba(234, 234, 236, 0.18);
  background: var(--theme-card-bg);
}

html[data-theme="dark"] :is(
  .programme-header-stats article,
  .programme-trade-summary article,
  .programme-hour-strip,
  .programme-start-date,
  .programme-workday-control,
  .programme-calendar-weekday,
  .programme-calendar-day:not(.has-current):not(.selected):not(.drag-over):not(:hover):not(:focus-visible),
  .programme-month-card,
  .programme-service-filter,
  .programme-gantt-scale button:not(.drag-over):not(:hover):not(:focus-visible),
  .programme-task-drawer > header button:not(:hover):not(:focus-visible),
  .programme-calendar-controls button:not(.active):not([aria-pressed="true"]):not(:hover):not(:focus-visible),
  .programme-task-table input:not(:hover):not(:focus),
  .programme-task-table select:not(:hover):not(:focus),
  .programme-calendar-controls input:not(:hover):not(:focus),
  .programme-day-lane-title,
  .programme-day-lane-track,
  .programme-year-month-card,
  .programme-year-day:not(.has-current):not(.has-other):not(.drag-over):not(:hover):not(:focus-visible),
  .programme-engineer-row,
  .programme-workday-control.in-settings label:not(:has(input:checked)):not(:focus-within),
  .programme-engineer-row input:not(:hover):not(:focus),
  .programme-engineer-row select:not(:hover):not(:focus),
  .programme-task-card:not(.selected):not(.active):not(:hover):not(:focus-within),
  .programme-assignee-options label:not(.selected):not(.warning):not(:hover):not(:focus-within),
  .programme-themed-picker:not(.open) .programme-themed-date-button:not(:hover):not(:focus-visible),
  .programme-themed-picker:not(.open) .programme-themed-time-button:not(:hover):not(:focus-visible),
  .programme-themed-picker-popover,
  .programme-themed-date-grid button:not(.selected):not(.today):not(:hover):not(:focus-visible),
  .programme-themed-time-popover button:not(.selected):not(:hover):not(:focus-visible),
  .programme-workday-control.in-settings .programme-themed-time-control:not(.open):not(:focus-within)
) {
  border-color: rgba(234, 234, 236, 0.18);
  background: rgba(29, 30, 34, 0.84);
}

html[data-theme="dark"] :is(
  .programme-selected-task-stats div,
  .programme-task-product-info div,
  .programme-task-documents a,
  .programme-task-documents > span,
  .programme-selected-task-image,
  .programme-task-product-summary,
  .programme-task-drawer-empty-detail
) {
  border-color: rgba(234, 234, 236, 0.18) !important;
  background: rgba(29, 30, 34, 0.84) !important;
}

html[data-theme="dark"] .programme-selected-task-close:not(:hover):not(:focus-visible) {
  border-color: rgba(234, 234, 236, 0.18) !important;
  background: rgba(29, 30, 34, 0.84) !important;
}

html[data-theme="dark"] :is(
  .programme-calendar-day.weekend:not(.has-current):not(.selected):not(.drag-over):not(:hover):not(:focus-visible),
  .programme-gantt-scale button.weekend:not(.drag-over):not(:hover):not(:focus-visible),
  .programme-year-day.weekend:not(.has-current):not(.has-other):not(.drag-over):not(:hover):not(:focus-visible)
) {
  background:
    repeating-linear-gradient(-45deg, rgba(234, 234, 236, 0.06) 0 8px, transparent 8px 16px),
    rgba(29, 30, 34, 0.84) !important;
}

html[data-theme="dark"] :is(
  .dashboard-governance-account-row,
  .dashboard-account-governance-summary > span,
  .dashboard-account-intelligence-grid > article,
  .dashboard-account-intelligence-profile,
  .dashboard-account-intelligence-metrics > span,
  .dashboard-account-intelligence-mix-card,
  .dashboard-account-company-facts,
  .dashboard-account-relationship-group,
  .dashboard-account-commercial-card,
  .dashboard-account-relationship-map,
  .dashboard-account-preferred-distributor:not(:hover):not(:focus-visible),
  .dashboard-account-commercial-metrics > span,
  .dashboard-account-profile-commercial > div,
  .dashboard-account-relationship-card:not(:hover):not(:focus-visible),
  .dashboard-account-profile-drawer > dl > div,
  .dashboard-account-profile-timeline,
  .dashboard-account-profile-drawer > footer,
  .dashboard-account-commercial-empty
) {
  border-color: rgba(234, 234, 236, 0.18);
  background: rgba(27, 28, 32, 0.86);
}

html[data-theme="dark"] .dashboard-account-relationship-map {
  background:
    linear-gradient(rgba(234, 234, 236, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(234, 234, 236, 0.045) 1px, transparent 1px),
    rgba(17, 18, 20, 0.94);
  background-size: 24px 24px;
}

html[data-theme="dark"] :is(
  .dashboard-account-application-fields input:not(:hover):not(:focus):not(:focus-visible),
  .dashboard-account-application-fields select:not(:hover):not(:focus):not(:focus-visible),
  .dashboard-account-application-fields textarea:not(:hover):not(:focus):not(:focus-visible),
  .dashboard-governance-account-row select:not(:hover):not(:focus):not(:focus-visible),
  .dashboard-account-governance-search input:not(:hover):not(:focus):not(:focus-visible),
  .dashboard-account-create-form input:not(:hover):not(:focus):not(:focus-visible),
  .dashboard-account-create-form select:not(:hover):not(:focus):not(:focus-visible),
  .dashboard-account-intelligence-fields input:not(:hover):not(:focus):not(:focus-visible),
  .dashboard-account-intelligence-fields select:not(:hover):not(:focus):not(:focus-visible),
  .dashboard-account-profile-close:not(:hover):not(:focus-visible)
) {
  border-color: rgba(234, 234, 236, 0.22);
  background: var(--input-glass);
}

html[data-theme="dark"] .floor-plan-popover .floor-outlet-detection-actions {
  border-color: rgba(234, 234, 236, 0.18);
  background: rgba(20, 21, 24, 0.90);
}

html[data-theme="dark"] :is(
  .floor-outlet-detection-actions .floor-trace-mode,
  .floor-outlet-detection-row:not(.focused):not(.invalid):not(.out-of-room):not(.excluded):not(:has(> input[type="checkbox"]:disabled)):not(:has(> input[type="checkbox"]:not(:checked))),
  .floor-plan-card .floor-outlet-detection-row:not(.focused):not(.invalid):not(.out-of-room):not(.excluded):not(:has(> input[type="checkbox"]:disabled)):not(:has(> input[type="checkbox"]:not(:checked)))
) {
  border-top-color: rgba(234, 234, 236, 0.16);
  border-right-color: rgba(234, 234, 236, 0.16);
  border-bottom-color: rgba(234, 234, 236, 0.16);
  background: rgba(28, 29, 33, 0.80);
}

html[data-theme="dark"] :is(
  .floor-outlet-detection-row:has(> input[type="checkbox"]:not(:checked)):not(:has(> input[type="checkbox"]:disabled)):not(.focused):not(.invalid):not(.out-of-room),
  .floor-outlet-detection-row.excluded:not(:has(> input[type="checkbox"]:disabled)):not(.focused):not(.invalid):not(.out-of-room)
) {
  border-color: rgba(234, 234, 236, 0.13);
  border-left-color: #64748b;
  background: rgba(24, 25, 28, 0.68);
}

html[data-theme="dark"] :is(
  .project-export-pack-selection-layer,
  .drawing-export-selection-layer
) {
  background: rgba(5, 6, 8, 0.78);
}

html[data-theme="dark"] :is(
  .project-export-pack-selection-footer,
  .project-export-pack-selection-toolbar,
  .project-export-pack-group-header,
  .project-export-pack-group,
  .drawing-export-selection-footer,
  .drawing-export-selection-toolbar,
  .drawing-export-selection-group > header,
  .drawing-export-selection-group,
  .drawing-export-revision-panel
) {
  border-color: rgba(234, 234, 236, 0.16);
  background: rgba(27, 28, 32, 0.86);
}

html[data-theme="dark"] :is(
  .project-export-pack-selection-toolbar button:not(:hover):not(:focus-visible),
  .project-export-pack-group-toggle:not(:hover):not(:focus-visible),
  .project-export-pack-selection-footer button:not(:hover):not(:focus-visible),
  .project-export-pack-selection-close:not(:hover):not(:focus-visible),
  .drawing-export-selection-head > button:not(:hover):not(:focus-visible),
  .drawing-export-selection-toolbar button:not(:hover):not(:focus-visible),
  .project-export-pack-item-revision input:not(:focus):not(:hover),
  .drawing-export-revision-field input:not(:focus):not(:hover),
  .drawing-export-revision-field select:not(:focus):not(:hover),
  .drawing-export-row-revision input:not(:focus):not(:hover)
) {
  border-color: rgba(234, 234, 236, 0.20);
  background: var(--input-glass);
}

html[data-theme="dark"] :is(
  .team-activity-item,
  .team-activity-project-group,
  .team-activity-overview > span,
  .team-activity-loading,
  .team-activity-message,
  .team-activity-snapshot span,
  .team-activity-popover-head > button:not(:hover):not(:focus-visible),
  .team-activity-intro,
  .team-activity-empty
) {
  border-color: rgba(234, 234, 236, 0.16);
  background: rgba(28, 29, 33, 0.78);
}

html[data-theme="dark"] :is(
  .pricing-portal-distributor-profile-dialog,
  .pricing-portal-distributor-profile-popout summary:not(:hover):not(:focus-visible),
  .pricing-portal-distributor-profile-metrics article,
  .pricing-portal-distributor-profile-branches article,
  .pricing-portal-distributor-picker,
  .pricing-portal-distributor-option:not(.active):not(.selected):not(:hover):not(:focus-visible),
  .pricing-portal-distributor-map-list span,
  .pricing-portal-map-location-key,
  .pricing-portal-distributor-branch-picker,
  .pricing-portal-distributor-branch-suggestion:not(:hover):not(:focus-visible),
  .pricing-portal-quote-upload-dialog,
  .pricing-portal-quote-detail-dialog,
  .pricing-portal-quote-contact-grid article,
  .pricing-portal-quote-breakdown,
  .pricing-portal-quote-message-panel,
  .pricing-portal-quotes-panel,
  .dashboard-distributor-request-meta article,
  .dashboard-distributor-doc-link,
  .pricing-portal-quote-filter,
  .pricing-portal-quote-upload-help
) {
  border-color: rgba(234, 234, 236, 0.18);
  background: rgba(27, 28, 32, 0.88);
}

html[data-theme="dark"] :is(
  .pricing-portal-distributor-search input:not(:hover):not(:focus):not(:focus-visible),
  .pricing-portal-distributor-branch-picker select:not(:hover):not(:focus):not(:focus-visible),
  .pricing-portal-quote-message-panel textarea:not(:hover):not(:focus):not(:focus-visible)
) {
  border-color: rgba(234, 234, 236, 0.20);
  background: var(--input-glass);
}

html[data-theme="dark"] .pricing-portal-quote-status-card:not(:hover) {
  background: rgba(27, 28, 32, 0.88);
}

html[data-theme="dark"] .pricing-portal-quote-status-card:hover {
  background: linear-gradient(145deg, rgba(42, 43, 48, 0.96), rgba(24, 25, 28, 0.94));
}

html[data-theme="dark"] :is(
  .plant-room-auto-pipe-option:not(.active):not(:hover):not(:focus-visible),
  .plant-room-gas-meter-facts span,
  .plant-room-gas-pressure-control,
  .plant-room-noise-tool-button:not(.active):not(:hover):not(:focus-visible)
) {
  border-color: rgba(234, 234, 236, 0.16);
  background: rgba(28, 29, 33, 0.78);
}

html[data-theme="dark"] .plant-room-noise-tool-button:not(.active):not(:hover):not(:focus-visible) {
  color: var(--text);
}

html[data-theme="dark"] .plant-room-noise-tool-button:not(.active):not(:hover):not(:focus-visible) svg {
  color: var(--muted);
}

html[data-theme="dark"] .dashboard-analytics-workspace.dashboard-company-workspace,
html[data-theme="dark"] .dashboard-analytics-workspace.dashboard-project-team-workspace {
  background: var(--theme-page-bg);
}

html[data-theme="dark"] :is(
  .dashboard-company-profile-workspace-card,
  .dashboard-company-profile-rail,
  .dashboard-company-form-section,
  .dashboard-company-sticky-save,
  .dashboard-project-team-card,
  .dashboard-project-team-rail,
  .dashboard-project-team-editor,
  .dashboard-project-team-overview
) {
  border-color: rgba(234, 234, 236, 0.18);
  background: var(--theme-card-bg);
}

html[data-theme="dark"] :is(
  .dashboard-company-contact-card,
  .dashboard-company-completion,
  .dashboard-company-workspace .dashboard-company-work-group,
  .dashboard-project-team-metrics span,
  .dashboard-project-team-member-switcher,
  .dashboard-project-team-member-switcher > button:not(.active):not(:hover):not(:focus-visible),
  .dashboard-project-team-workspace .dashboard-team-row-expanded,
  .dashboard-project-team-workspace .dashboard-team-certifications,
  .dashboard-project-team-workspace .dashboard-team-holidays,
  .dashboard-project-team-workspace .dashboard-team-schedule
) {
  border-color: rgba(234, 234, 236, 0.16);
  background: rgba(28, 29, 33, 0.80);
}

html[data-theme="dark"] .pipe-system-selection-note {
  border-color: rgba(234, 234, 236, 0.14);
  background: rgba(28, 29, 33, 0.72);
}

html[data-theme="dark"] :is(
  .contractor-workspace,
  .dashboard-commissioning-workspace
) {
  background: var(--theme-page-bg);
}

html[data-theme="dark"] :is(
  .contractor-design-modal-dialog,
  .contractor-workspace-header,
  .contractor-workspace-tabs,
  .contractor-metric,
  .contractor-overview-panel,
  .contractor-master-detail > aside,
  .contractor-network-layout > aside,
  .contractor-tender-detail,
  .contractor-network-detail,
  .contractor-company-profile,
  .contractor-messages-workspace,
  .contractor-profile-gate,
  .contractor-composer,
  .dashboard-commissioning-topbar,
  .dashboard-commissioning-summary article,
  .dashboard-commissioning-area,
  .dashboard-commissioning-load-card,
  .dashboard-engineering-nav,
  .dashboard-engineering-panel
) {
  border-color: rgba(234, 234, 236, 0.18);
  background: var(--theme-card-bg);
}

html[data-theme="dark"] :is(
  .contractor-design-scenes > article,
  .contractor-design-layer-schedule,
  .contractor-design-comments,
  .contractor-design-layer-schedule article,
  .contractor-design-scenes > article > header,
  .contractor-pipeline article,
  .contractor-next-actions > article,
  .contractor-recent-list,
  .contractor-tender-card:not(.selected):not(:hover):not(:focus-visible),
  .contractor-network-card:not(.selected):not(:hover):not(:focus-visible),
  .contractor-tender-detail > section,
  .contractor-company-profile > section,
  .contractor-network-detail > section,
  .contractor-quote-builder,
  .contractor-message-thread,
  .contractor-shared-project > div,
  .contractor-rate-row,
  .contractor-quote-comparison > article,
  .contractor-profile-facts > div,
  .contractor-network-rates article,
  .contractor-messages-workspace > article,
  .contractor-direct-thread,
  .contractor-recipient-threads > details,
  .contractor-composer > header,
  .contractor-composer > footer,
  .contractor-composer-section,
  .dashboard-commissioning-task-list,
  .dashboard-commissioning-service-panel-list,
  .dashboard-commissioning-task:not(.complete):not(.expanded):not(:hover):not(:focus-within),
  .dashboard-commissioning-service-panel,
  .dashboard-commissioning-action-item:not(:hover):not(:focus-within),
  .dashboard-commissioning-check-info,
  .dashboard-commissioning-check-grid div,
  .dashboard-commissioning-document-list a,
  .dashboard-commissioning-document-list > span,
  .dashboard-commissioning-inline-checks,
  .dashboard-commissioning-inline-checks div,
  .dashboard-commissioning-photo-chip,
  .dashboard-commissioning-action-photo-chip
) {
  border-color: rgba(234, 234, 236, 0.15);
  background: rgba(27, 28, 32, 0.82);
}

html[data-theme="dark"] :is(
  .contractor-workspace input:not(:hover):not(:focus),
  .contractor-workspace select:not(:hover):not(:focus),
  .contractor-workspace textarea:not(:hover):not(:focus),
  .contractor-composer input:not(:hover):not(:focus),
  .contractor-composer select:not(:hover):not(:focus),
  .contractor-composer textarea:not(:hover):not(:focus),
  .contractor-design-comment-form input:not(:hover):not(:focus),
  .contractor-design-comment-form select:not(:hover):not(:focus),
  .contractor-design-comment-form textarea:not(:hover):not(:focus),
  .dashboard-commissioning-action-value-wrap:not(.tolerance-pass):not(.tolerance-fail):not(:focus-within),
  .dashboard-commissioning-task-grid input:not(:hover):not(:focus),
  .dashboard-commissioning-task-grid textarea:not(:hover):not(:focus),
  .dashboard-commissioning-project-select select:not(:hover):not(:focus),
  .dashboard-commissioning-lead-select select:not(:hover):not(:focus)
) {
  border-color: rgba(234, 234, 236, 0.20);
  background: var(--input-glass);
}

html[data-theme="dark"] :is(
  .site-survey-card:not(:hover):not(:focus-within),
  .site-survey-project-card:not(:hover):not(:focus-within)
) {
  border-color: rgba(234, 234, 236, 0.18);
  background: var(--theme-card-bg);
}

html[data-theme="dark"] :is(
  .site-survey-field input:not(:hover):not(:focus):not(:focus-visible),
  .site-survey-field textarea:not(:hover):not(:focus):not(:focus-visible),
  .site-survey-field select:not(:hover):not(:focus):not(:focus-visible),
  .site-survey-file-floor select:not(:hover):not(:focus):not(:focus-visible),
  .site-survey-check-chip:not(:has(input:checked)):not(:hover):not(:focus-within),
  .site-survey-file-card:not(:hover):not(:focus-within),
  .site-survey-empty,
  .site-survey-register-row,
  .site-survey-handover-grid dl div
) {
  border-color: rgba(234, 234, 236, 0.17);
  background: rgba(28, 29, 33, 0.78);
}

html[data-theme="dark"] :is(
  .disclaimer-agreement-head,
  .disclaimer-agreement-footer,
  .disclaimer-agreement-scroll,
  .disclaimer-agreement-notice li
) {
  border-color: rgba(234, 234, 236, 0.16);
  background-color: rgba(25, 26, 29, 0.88);
}

/* Preserve semantic edge markers after the neutral surface layer. */
html[data-theme="dark"] .programme-engineer-row,
html[data-theme="dark"] .programme-engineer-capacity article,
html[data-theme="dark"] .programme-engineer-candidate,
html[data-theme="dark"] .programme-task-card,
html[data-theme="dark"] .programme-selected-task,
html[data-theme="dark"] .dashboard-project-team-member-switcher > button {
  border-left-color: var(--programme-trade) !important;
}

html[data-theme="dark"] .programme-settings-popover :is(
  .programme-settings-popover > header span,
  .programme-workday-control small,
  .programme-engineer-manager > header span,
  .programme-engineer-row label > span,
  .programme-engineer-daily-capacity > span
) {
  color: #cbd5e1;
}

html[data-theme="dark"] .programme-settings-popover .programme-engineer-row > [data-programme-engineer-remove] {
  background: rgba(127, 29, 29, 0.36) !important;
  border-color: rgba(248, 113, 113, 0.46) !important;
  color: #fecaca !important;
}

html[data-theme="dark"] .programme-settings-popover .programme-engineer-row > [data-programme-engineer-remove]:is(:hover, :focus-visible) {
  background: rgba(153, 27, 27, 0.62) !important;
  border-color: #f87171 !important;
  color: #fff !important;
}

html[data-theme="dark"] .programme-engineer-candidate {
  background: rgba(29, 30, 34, 0.94);
  border-color: rgba(148, 163, 184, 0.26);
  border-left-color: var(--programme-trade);
}

html[data-theme="dark"] .programme-engineer-row [data-programme-engineer-remove] {
  background: rgba(127, 29, 29, 0.36) !important;
  border-color: rgba(248, 113, 113, 0.46) !important;
  color: #fecaca !important;
}

html[data-theme="dark"] .programme-engineer-row > label > span {
  color: #cbd5e1;
}

html[data-theme="dark"] .programme-trade-summary article.trade-mechanical {
  border-color: rgba(239, 68, 68, 0.28) !important;
}

html[data-theme="dark"] .programme-trade-summary article.trade-electrical {
  border-color: rgba(126, 34, 206, 0.28) !important;
}

html[data-theme="dark"] .programme-trade-summary article.trade-control {
  border-color: rgba(37, 99, 235, 0.28) !important;
}

/* Interactive states retain their semantic border/shadow while staying charcoal. */
html[data-theme="dark"] .dashboard-account-preferred-distributor:is(:hover, :focus-visible),
html[data-theme="dark"] .dashboard-account-relationship-card:is(:hover, :focus-visible),
html[data-theme="dark"] :is(
  .contractor-tender-card,
  .contractor-network-card
):not(.selected):is(:hover, :focus-visible),
html[data-theme="dark"] :is(
  .site-survey-card,
  .site-survey-project-card,
  .site-survey-file-card
):is(:hover, :focus-within) {
  background: rgba(35, 36, 40, 0.90);
}

html[data-theme="dark"] :is(
  .site-survey-field input,
  .site-survey-field textarea,
  .site-survey-field select,
  .site-survey-file-floor select
):is(:focus, :focus-visible) {
  background: var(--input-glass);
}


/* Dark dashboard hierarchy inspired by a near-black authoring workspace:
   repetitive navigation/actions are charcoal; the single primary creation
   action and semantic selected/status states retain their accent colours. */
html[data-theme="dark"] .dashboard-home :is(
  .dashboard-open-project-btn,
  [data-dashboard-open-company],
  [data-dashboard-open-project-team]
):not(:hover):not(:focus-visible) {
  border-color: rgba(234, 234, 236, 0.20);
  background: linear-gradient(180deg, rgba(49, 50, 55, 0.96), rgba(27, 28, 31, 0.96));
  color: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 8px 18px rgba(0, 0, 0, 0.20);
}

html[data-theme="dark"] .dashboard-home :is(
  .dashboard-open-project-btn,
  [data-dashboard-open-company],
  [data-dashboard-open-project-team]
):is(:hover, :focus-visible) {
  border-color: rgba(234, 234, 236, 0.32);
  background: linear-gradient(180deg, rgba(64, 65, 71, 0.98), rgba(36, 37, 41, 0.98));
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 10px 22px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] .dashboard-home .dashboard-premium-plan,
html[data-theme="dark"] .dashboard-premium-addon-wrap .dashboard-premium-addon,
html[data-theme="dark"] .dashboard-premium-see-all,
html[data-theme="dark"] .dashboard-premium-feature-preview {
  border-color: rgba(234, 234, 236, 0.18);
  background: linear-gradient(145deg, rgba(37, 38, 42, 0.96), rgba(18, 19, 22, 0.94));
  color: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

html[data-theme="dark"] .dashboard-premium-addon-wrap .dashboard-premium-addon:is(:hover, :focus-visible),
html[data-theme="dark"] .dashboard-premium-see-all:is(:hover, :focus-visible) {
  border-color: rgba(234, 234, 236, 0.30);
  background: linear-gradient(145deg, rgba(50, 51, 56, 0.98), rgba(25, 26, 29, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 12px 28px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .dashboard-premium-addon-wrap .dashboard-premium-addon:focus-visible,
html[data-theme="dark"] .dashboard-premium-see-all:focus-visible {
  border-color: rgba(96, 165, 250, 0.55);
  box-shadow:
    0 0 0 3px rgba(10, 132, 255, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 12px 28px rgba(0, 0, 0, 0.28);
  outline: none;
}

html[data-theme="dark"] .dashboard-premium-addon-icon,
html[data-theme="dark"] .dashboard-premium-preview-visual {
  border-color: rgba(234, 234, 236, 0.18);
  background: rgba(31, 32, 36, 0.88);
}

html[data-theme="dark"] .dashboard-premium-plans-backdrop {
  background: rgba(3, 4, 5, 0.78);
}

html[data-theme="dark"] .dashboard-premium-plans-popout,
html[data-theme="dark"] .dashboard-premium-plans-detail,
html[data-theme="dark"] .dashboard-premium-comparison-wrap,
html[data-theme="dark"] .dashboard-premium-payment-option:not(.recommended) {
  border-color: rgba(234, 234, 236, 0.18);
  background: rgba(18, 19, 22, 0.98);
}

html[data-theme="dark"] .dashboard-premium-plans-hero {
  background:
    radial-gradient(circle at 16% 12%, rgba(255, 255, 255, 0.07), transparent 36%),
    linear-gradient(155deg, #242529 0%, #151619 54%, #0d0e10 100%);
}

html[data-theme="dark"] .dashboard-premium-comparison thead th,
html[data-theme="dark"] .dashboard-premium-comparison .premium-column:not(.included) {
  background: rgba(35, 36, 40, 0.86);
}

/* Finish remaining passive specialist sections on the same charcoal scale. */
html[data-theme="dark"] :is(
  .dashboard-distributor-panel,
  .dashboard-distributor-quote-detail,
  .dashboard-distributor-tabs,
  .dashboard-distributor-quote-toolbar,
  .dashboard-distributor-metric-card,
  .dashboard-distributor-overview-table,
  .dashboard-distributor-table,
  .dashboard-distributor-line-table,
  .dashboard-distributor-quote-documents,
  .dashboard-distributor-file-list article,
  .dashboard-distributor-discount-list > article,
  .dashboard-distributor-team-list article,
  .dashboard-distributor-check:not(:has(input:checked)):not(:focus-within),
  .dashboard-distributor-terms-requests .dashboard-distributor-request-list article,
  .dashboard-distributor-profile-preview,
  .dashboard-distributor-installation-options,
  .dashboard-distributor-installation-options label:not(:has(input:checked)):not(:hover):not(:focus-within),
  .dashboard-distributor-branch-list article
) {
  border-color: rgba(234, 234, 236, 0.17);
  background: rgba(27, 28, 32, 0.88);
}

html[data-theme="dark"] :is(
  .dashboard-distributor-task-list > button,
  .dashboard-distributor-mini-stats > button,
  .dashboard-distributor-network-cards > button,
  .dashboard-distributor-overview-table > button
):not(.active):not(:hover):not(:focus-visible) {
  border-color: rgba(234, 234, 236, 0.15);
  background: rgba(31, 32, 36, 0.82);
}

html[data-theme="dark"] :is(
  .dashboard-distributor-overview-table-head,
  .dashboard-distributor-table-head,
  .dashboard-distributor-line-head,
  .programme-task-table th,
  .pricing-portal-quote-status-card dl div,
  .pricing-portal-quote-breakdown-head
) {
  border-color: rgba(234, 234, 236, 0.15);
  background: rgba(39, 40, 44, 0.90);
}

html[data-theme="dark"] :is(
  .programme-service-filter span,
  .programme-start-date > span,
  .programme-workday-control > span,
  .programme-task-list.in-drawer .programme-task-card-fields,
  .programme-selected-task.in-card
) {
  border-color: rgba(234, 234, 236, 0.17);
  background: rgba(29, 30, 34, 0.88);
}

html[data-theme="dark"] .programme-day-lunch-band {
  background:
    repeating-linear-gradient(-45deg, rgba(234, 234, 236, 0.07) 0 8px, transparent 8px 16px),
    rgba(35, 36, 40, 0.86);
}

html[data-theme="dark"] :is(
  .programme-start-date input,
  .programme-workday-control input,
  .programme-task-card-fields input,
  .programme-task-card-fields select
):not(:hover):not(:focus):not(:focus-visible) {
  border-color: rgba(234, 234, 236, 0.20);
  background: var(--input-glass);
}

html[data-theme="dark"] .pricing-portal-quote-contact-grid article.received {
  border-color: rgba(34, 197, 94, 0.36) !important;
  background: rgba(20, 83, 45, 0.30) !important;
}

html[data-theme="dark"] .export-hero-revision input:hover:not(:focus) {
  border-color: rgba(10, 132, 255, 0.44);
  background: rgba(38, 39, 43, 0.94);
}

/* Preserve semantic Programme colour and accessibility contrast after neutral surfaces. */
html[data-theme="dark"] .programme-day-lane-title {
  background: var(--programme-trade-soft) !important;
}

/* Room-type reference data must not inherit the translucent white surfaces
   used by the light theme. Keep its nested hierarchy on the neutral charcoal
   scale so both labels and published values retain readable contrast. */
html[data-theme="dark"] .room-type-reference-card {
  border-color: rgba(234, 234, 236, 0.16);
  background: var(--glass-subtle);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .room-type-reference-grid div {
  border-color: rgba(234, 234, 236, 0.16);
  background: var(--tile-glass);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .room-type-reference-title strong,
html[data-theme="dark"] .room-type-reference-grid dd {
  color: var(--text);
}

html[data-theme="dark"] .room-type-reference-title span,
html[data-theme="dark"] .room-type-reference-grid dt {
  color: var(--muted);
}

@media (prefers-contrast: more) {
  html[data-theme="dark"] .dashboard-premium-addon-wrap .dashboard-premium-addon,
  html[data-theme="dark"] .dashboard-home .dashboard-premium-plan,
  html[data-theme="dark"] .dashboard-premium-see-all {
    border-width: 2px;
    border-color: rgba(191, 219, 254, 0.72);
  }
}

html[data-theme="dark"] :is(
  .dashboard-account-intelligence-insight-card > header span,
  .dashboard-account-intelligence-organisation-card > header span,
  .dashboard-account-product-copy > span
) {
  color: #93c5fd;
  font-size: 0.72rem;
}

/* Final Account Intelligence layout override. This intentionally follows the
   legacy dashboard layer so wide screens retain the new twelve-column cards
   and all five evidence-based KPI tiles. The restricted Company & Team Setup
   state uses the shared empty panel, so its direct grid child must receive the
   same track span as the full organisation card. */
.dashboard-account-intelligence .dashboard-account-intelligence-metrics,
.dashboard-account-intelligence .dashboard-account-intelligence-kpis {
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

.dashboard-account-intelligence .dashboard-account-intelligence-overview-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.dashboard-account-intelligence .dashboard-account-intelligence-insight-card,
.dashboard-account-intelligence .dashboard-account-intelligence-organisation-card,
.dashboard-account-intelligence .dashboard-account-commercial-card {
  grid-column: span 4;
}

.dashboard-account-intelligence .dashboard-account-intelligence-overview-grid > .dashboard-account-intelligence-panel-empty {
  min-width: 0;
  grid-column: span 4;
}

.dashboard-account-intelligence .dashboard-account-intelligence-declared-card {
  grid-column: span 5;
}

.dashboard-account-intelligence .dashboard-account-intelligence-project-card {
  grid-column: span 7;
}

@media (max-width: 1200px) {
  .dashboard-account-intelligence .dashboard-account-intelligence-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-account-intelligence :is(
    .dashboard-account-intelligence-insight-card,
    .dashboard-account-intelligence-organisation-card,
    .dashboard-account-commercial-card,
    .dashboard-account-intelligence-declared-card,
    .dashboard-account-intelligence-overview-grid > .dashboard-account-intelligence-panel-empty
  ) {
    grid-column: auto;
  }

  .dashboard-account-intelligence .dashboard-account-intelligence-project-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .dashboard-account-intelligence .dashboard-account-intelligence-overview-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-account-intelligence .dashboard-account-intelligence-project-card {
    grid-column: auto;
  }
}

html[data-theme="dark"] .programme-view-tabs {
  border-color: rgba(234, 234, 236, 0.2);
  background: rgba(29, 30, 34, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

html[data-theme="dark"] .programme-view-tabs button {
  background: transparent;
  color: #cbd5e1;
  box-shadow: none;
}

html[data-theme="dark"] .programme-view-tabs button.active,
html[data-theme="dark"] .programme-view-tabs button[aria-pressed="true"] {
  border-color: rgba(147, 197, 253, 0.58);
  background: linear-gradient(145deg, rgba(30, 64, 175, 0.94), rgba(8, 145, 178, 0.78));
  color: #ffffff;
  box-shadow: 0 7px 16px rgba(30, 64, 175, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

html[data-theme="dark"] .programme-view-tabs button:hover {
  border-color: rgba(147, 197, 253, 0.42);
  background: rgba(59, 130, 246, 0.18);
  color: #f8fafc;
}

html[data-theme="dark"] .programme-view-tabs button:focus-visible {
  border-color: rgba(147, 197, 253, 0.58);
  background: rgba(59, 130, 246, 0.22);
  color: #ffffff;
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

html[data-theme="dark"] .programme-task-drawer-toggle {
  border-color: rgba(234, 234, 236, 0.22) !important;
  background: rgba(29, 30, 34, 0.96) !important;
  color: #f8fafc !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

html[data-theme="dark"] .programme-task-drawer-toggle:hover {
  border-color: rgba(147, 197, 253, 0.48) !important;
  background: rgba(59, 130, 246, 0.2) !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .programme-task-drawer-toggle:focus-visible {
  border-color: rgba(147, 197, 253, 0.62) !important;
  background: rgba(59, 130, 246, 0.24) !important;
  color: #ffffff !important;
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

/* My Day ------------------------------------------------------------------
   Field delivery workspace. This layer intentionally sits at the end of the
   cascade so the compact, touch-friendly field UI is not reshaped by legacy
   editor and dashboard rules above. */
.studio-shell.my-day-shell,
.studio-shell.my-day-review-shell {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  grid-template-rows: minmax(58px, max-content) 62px minmax(0, 1fr);
}

.workspace.my-day-workspace-shell {
  display: block;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 0;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  background:
    radial-gradient(circle at 8% 0%, rgba(14, 116, 255, 0.13), transparent 31rem),
    radial-gradient(circle at 94% 16%, rgba(45, 212, 191, 0.09), transparent 28rem),
    linear-gradient(180deg, #f7faff 0%, #eff5fb 100%);
}

.my-day-workspace,
.my-day-review-overlay {
  --my-day-bg: #eff5fb;
  --my-day-card: rgba(255, 255, 255, 0.92);
  --my-day-card-solid: #ffffff;
  --my-day-card-subtle: #f5f8fc;
  --my-day-control: #ffffff;
  --my-day-line: #d9e4f0;
  --my-day-line-strong: #bdcde0;
  --my-day-ink: #172033;
  --my-day-muted: #607087;
  --my-day-blue: #0969da;
  --my-day-blue-strong: #0759b5;
  --my-day-blue-soft: #eaf4ff;
  --my-day-blue-border: rgba(9, 105, 218, 0.38);
  --my-day-success: #147d3f;
  --my-day-success-soft: #eaf8ef;
  --my-day-warning: #9a5b06;
  --my-day-warning-soft: #fff7df;
  --my-day-danger: #b42318;
  --my-day-shadow: 0 18px 42px rgba(28, 55, 90, 0.10);
  --my-day-shadow-soft: 0 8px 22px rgba(28, 55, 90, 0.07);
  color: var(--my-day-ink);
}

.my-day-workspace {
  width: 100%;
  max-width: 1480px;
  min-width: 0;
  min-height: 100%;
  margin: 0 auto;
  padding: clamp(14px, 1.5vw, 24px);
}

.my-day-workspace *,
.my-day-review-overlay * {
  min-width: 0;
}

.my-day-workspace :is(h1, h2, h3, h4, p, ol, dl),
.my-day-review-overlay :is(h1, h2, h3, h4, p, ol, dl) {
  margin-top: 0;
}

.my-day-workspace :is(h1, h2, h3, h4, p, strong, small, span, em, dd),
.my-day-review-overlay :is(h1, h2, h3, h4, p, strong, small, span, em) {
  overflow-wrap: anywhere;
}

.my-day-workspace :is(button, select, input, textarea),
.my-day-review-overlay :is(button, select, input, textarea) {
  min-height: 44px;
  border: 1px solid var(--my-day-line-strong);
  border-radius: 11px;
  color: var(--my-day-ink);
  background: var(--my-day-control);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 820;
  line-height: 1.25;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, var(--my-day-shadow-soft);
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.my-day-workspace :is(button, select, input):not(:disabled):hover,
.my-day-review-overlay :is(button, select, input):not(:disabled):hover {
  border-color: var(--my-day-blue-border);
  background: var(--my-day-blue-soft);
}

.my-day-workspace button:not(:disabled):active,
.my-day-review-overlay button:not(:disabled):active {
  transform: translateY(1px);
}

.my-day-workspace :is(button, select, input, textarea):focus-visible,
.my-day-workspace a:focus-visible,
.my-day-review-overlay :is(button, select, input, textarea):focus-visible {
  outline: 3px solid rgba(9, 105, 218, 0.28);
  outline-offset: 2px;
  border-color: var(--my-day-blue);
}

.my-day-workspace button:disabled,
.my-day-review-overlay button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  box-shadow: none;
}

.my-day-workspace mark,
.my-day-review-overlay mark {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid rgba(9, 105, 218, 0.2);
  border-radius: 999px;
  color: var(--my-day-blue-strong);
  background: var(--my-day-blue-soft);
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1.15;
  text-transform: capitalize;
}

.my-day-topbar {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 104px;
  padding: clamp(14px, 1.4vw, 20px);
  border: 1px solid rgba(9, 105, 218, 0.34);
  border-radius: 22px;
  color: #ffffff;
  background:
    radial-gradient(circle at 84% -40%, rgba(255, 255, 255, 0.28), transparent 46%),
    linear-gradient(125deg, #0759b5 0%, #0a78e8 58%, #19a7c7 100%);
  box-shadow: 0 24px 58px rgba(9, 80, 170, 0.20);
}

.my-day-topbar::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -70px;
  top: -120px;
  width: 330px;
  height: 330px;
  border: 52px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.my-day-topbar > div:first-child,
.my-day-topbar-copy {
  flex: 1 1 38rem;
}

.my-day-topbar > div:first-child > span,
.my-day-topbar-copy > span,
.my-day-site-card > header > div > span,
.my-day-task-rail > header span,
.my-day-task-detail-head > div:first-child > span,
.my-day-detail-section > header span,
.my-day-design > header span,
.my-day-comments > header span {
  display: block;
  margin-bottom: 4px;
  color: var(--my-day-blue);
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.my-day-topbar > div:first-child > span {
  color: rgba(255, 255, 255, 0.76);
}

.my-day-topbar-copy > span {
  color: rgba(255, 255, 255, 0.76);
}

.my-day-topbar h1 {
  margin-bottom: 6px;
  color: #ffffff;
  font-size: clamp(1.65rem, 2.4vw, 2.15rem);
  font-weight: 920;
  letter-spacing: -0.035em;
  line-height: 1;
}

.my-day-topbar p {
  max-width: 46rem;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.45;
}

.my-day-topbar-controls {
  flex: 0 1 570px;
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
}

.my-day-topbar-controls > label,
.my-day-date-control label {
  display: grid;
  gap: 5px;
}

.my-day-topbar-controls label > span,
.my-day-date-control label > span,
.my-day-drawing-toolbar label > span,
.my-day-comment-form label > span {
  color: inherit;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.my-day-topbar-controls select,
.my-day-date-control input {
  height: 46px;
  border-color: rgba(255, 255, 255, 0.34);
  color: #ffffff;
  background: rgba(7, 43, 94, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.13);
  color-scheme: dark;
}

.my-day-topbar-controls select {
  width: clamp(190px, 19vw, 260px);
  padding: 0 36px 0 12px;
}

.my-day-date-control {
  display: flex;
  align-items: end;
  gap: 6px;
}

.my-day-date-control > button {
  min-width: 44px;
  padding: 0 12px;
  border-color: rgba(255, 255, 255, 0.34);
  color: #ffffff;
  background: rgba(7, 43, 94, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.13);
}

.my-day-date-control > button svg {
  width: 17px;
  height: 17px;
}

.my-day-date-control input {
  width: 152px;
  padding: 0 10px;
}

.my-day-topbar-controls :is(select, input, button):not(:disabled):hover {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(7, 43, 94, 0.56);
}

.my-day-topbar-controls :is(select, input, button):focus-visible {
  outline-color: rgba(255, 255, 255, 0.62);
  border-color: #ffffff;
}

.my-day-engineer-chip {
  min-height: 54px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  max-width: 250px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 13px;
  background: rgba(7, 43, 94, 0.34);
}

.my-day-engineer-chip > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.75rem;
  font-weight: 950;
}

.my-day-engineer-chip > div {
  display: grid;
  gap: 2px;
}

.my-day-engineer-chip strong,
.my-day-engineer-chip small {
  overflow: hidden;
  color: #ffffff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-day-engineer-chip strong {
  font-size: 0.75rem;
}

.my-day-engineer-chip small {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.62rem;
}

.my-day-content {
  display: grid;
  gap: 14px;
  padding-top: 14px;
}

.my-day-content.is-unlinked {
  grid-template-columns: minmax(350px, 0.78fr) minmax(0, 1.55fr);
  align-items: start;
}

.my-day-site-card,
.my-day-summary,
.my-day-task-rail,
.my-day-task-detail,
.my-day-detail-section,
.my-day-design,
.my-day-onboarding,
.my-day-no-work {
  border: 1px solid var(--my-day-line);
  background: var(--my-day-card);
  box-shadow: var(--my-day-shadow);
}

.my-day-site-card {
  display: grid;
  gap: 12px;
  padding: clamp(12px, 1.2vw, 18px);
  border-radius: 18px;
}

.my-day-site-card > header,
.my-day-detail-section > header,
.my-day-design > header,
.my-day-comments > header,
.my-day-task-rail > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.my-day-site-card h2,
.my-day-task-rail h2,
.my-day-detail-section h3,
.my-day-design h3,
.my-day-comments h4 {
  margin-bottom: 0;
  color: var(--my-day-ink);
  letter-spacing: -0.015em;
  line-height: 1.12;
}

.my-day-site-card h2 {
  font-size: 1.25rem;
}

.my-day-site-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.my-day-site-grid > div {
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 76px;
  padding: 10px;
  border: 1px solid var(--my-day-line);
  border-radius: 13px;
  background: var(--my-day-card-subtle);
}

.my-day-site-grid > div > span,
.my-day-site-grid dt,
.my-day-summary span,
.my-day-task-facts dt {
  color: var(--my-day-muted);
  font-size: 0.63rem;
  font-weight: 900;
  letter-spacing: 0.045em;
  line-height: 1.2;
  text-transform: uppercase;
}

.my-day-site-grid > div > strong,
.my-day-site-grid dd > strong {
  color: var(--my-day-ink);
  font-size: 0.75rem;
  line-height: 1.4;
}

.my-day-site-grid dd {
  display: grid;
  gap: 4px;
  margin: 0;
}

.my-day-site-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.my-day-site-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid var(--my-day-blue-border);
  border-radius: 999px;
  color: var(--my-day-blue-strong);
  background: var(--my-day-blue-soft);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.15;
}

.my-day-site-grid a {
  width: fit-content;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 9px;
  color: var(--my-day-blue-strong);
  background: var(--my-day-blue-soft);
  font-size: 0.68rem;
  font-weight: 900;
  text-decoration: none;
}

.my-day-site-grid a:hover {
  color: #ffffff;
  background: var(--my-day-blue);
}

.my-day-site-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.my-day-site-flags > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid rgba(217, 119, 6, 0.26);
  border-radius: 999px;
  color: var(--my-day-warning);
  background: var(--my-day-warning-soft);
  font-size: 0.66rem;
  font-weight: 850;
}

.my-day-site-flags svg {
  width: 15px;
  height: 15px;
}

.my-day-site-risks {
  overflow: hidden;
  display: grid;
  border: 1px solid rgba(217, 119, 6, 0.3);
  border-radius: 13px;
  background: var(--my-day-warning-soft);
}

.my-day-site-risks > header {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 11px;
  border-bottom: 1px solid rgba(217, 119, 6, 0.22);
}

.my-day-site-risks > header > strong {
  color: var(--my-day-warning);
  font-size: 0.72rem;
  font-weight: 920;
}

.my-day-site-risks > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 7px;
  padding: 8px;
}

.my-day-site-risks article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  min-height: 58px;
  padding: 9px;
  border: 1px solid rgba(217, 119, 6, 0.2);
  border-radius: 10px;
  background: color-mix(in srgb, var(--my-day-warning-soft) 48%, var(--my-day-card-solid));
}

.my-day-site-risks article > span {
  min-width: 50px;
  padding: 5px 7px;
  border-radius: 999px;
  color: var(--my-day-warning);
  background: color-mix(in srgb, var(--my-day-warning) 12%, transparent);
  font-size: 0.58rem;
  font-weight: 950;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
}

.my-day-site-risks article.severity-high > span,
.my-day-site-risks article.severity-critical > span {
  color: var(--my-day-danger);
  background: color-mix(in srgb, var(--my-day-danger) 12%, transparent);
}

.my-day-site-risks article.severity-low > span {
  color: var(--my-day-success);
  background: var(--my-day-success-soft);
}

.my-day-site-risks article > div {
  display: grid;
  gap: 3px;
}

.my-day-site-risks article strong {
  color: var(--my-day-ink);
  font-size: 0.7rem;
  line-height: 1.35;
}

.my-day-site-risks article small {
  color: var(--my-day-muted);
  font-size: 0.62rem;
  font-weight: 720;
  line-height: 1.42;
}

.my-day-safety-note {
  margin-bottom: 0;
  padding: 10px 12px;
  border-left: 3px solid #f59e0b;
  border-radius: 0 9px 9px 0;
  color: #764907;
  background: var(--my-day-warning-soft);
  font-size: 0.69rem;
  font-weight: 740;
  line-height: 1.48;
}

.my-day-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--my-day-line);
}

.my-day-summary > div {
  min-height: 78px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 13px 16px;
  background: var(--my-day-card-solid);
}

.my-day-summary strong {
  color: var(--my-day-ink);
  font-size: 1.16rem;
  font-weight: 920;
  line-height: 1;
}

.my-day-layout {
  display: grid;
  grid-template-columns: clamp(320px, 24vw, 360px) minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}

.my-day-task-rail {
  position: sticky;
  top: 0;
  overflow: hidden;
  display: grid;
  align-content: start;
  max-height: calc(100dvh - 150px);
  border-radius: 18px;
}

.my-day-task-rail > header {
  padding: 15px;
  border-bottom: 1px solid var(--my-day-line);
  background: linear-gradient(145deg, var(--my-day-card-solid), var(--my-day-card-subtle));
}

.my-day-task-rail h2 {
  font-size: 1rem;
}

.my-day-task-rail > header > strong {
  min-width: 32px;
  min-height: 32px;
  display: grid;
  place-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--my-day-blue-strong);
  background: var(--my-day-blue-soft);
  font-size: 0.76rem;
}

.my-day-task-rail ol {
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 7px;
  min-height: 0;
  margin: 0;
  padding: 9px;
  list-style: none;
  overscroll-behavior: contain;
}

.my-day-task-rail li {
  min-width: 0;
}

.my-day-task-button,
.my-day-task-button:hover {
  --my-day-trade: #64748b;
  position: relative;
  width: 100%;
  min-height: 128px !important;
  overflow: hidden;
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 13px 13px 13px 17px;
  border-color: var(--my-day-line);
  color: var(--my-day-ink);
  background: var(--my-day-card-solid);
  text-align: left;
  box-shadow: none;
}

.my-day-task-button::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--my-day-trade);
}

.my-day-task-button.trade-mechanical,
.my-day-task-detail.trade-mechanical {
  --my-day-trade: #ef4444;
}

.my-day-task-button.trade-electrical,
.my-day-task-detail.trade-electrical {
  --my-day-trade: #8b5cf6;
}

.my-day-task-button:is(.trade-control, .trade-controls),
.my-day-task-detail:is(.trade-control, .trade-controls) {
  --my-day-trade: #2563eb;
}

.my-day-task-button.trade-public-health,
.my-day-task-detail.trade-public-health {
  --my-day-trade: #0ea5e9;
}

.my-day-task-button.trade-ventilation,
.my-day-task-detail.trade-ventilation {
  --my-day-trade: #14b8a6;
}

.my-day-task-button > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.my-day-task-button time {
  color: var(--my-day-blue-strong);
  font-size: 0.72rem;
  font-weight: 920;
}

.my-day-task-button > strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--my-day-ink);
  font-size: 0.82rem;
  line-height: 1.28;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.my-day-task-button :is(small, em) {
  color: var(--my-day-muted);
  font-size: 0.65rem;
  font-style: normal;
  font-weight: 720;
  line-height: 1.3;
}

.my-day-task-button > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-day-task-button.is-selected,
.my-day-task-button.is-selected:hover {
  border-color: color-mix(in srgb, var(--my-day-trade) 58%, var(--my-day-line));
  background: color-mix(in srgb, var(--my-day-trade) 6%, var(--my-day-card-solid));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--my-day-trade) 15%, transparent), var(--my-day-shadow-soft);
}

.my-day-workspace .my-day-task-button:not(:disabled):hover {
  border-color: color-mix(in srgb, var(--my-day-trade) 38%, var(--my-day-line));
  color: var(--my-day-ink);
  background: color-mix(in srgb, var(--my-day-trade) 4%, var(--my-day-card-solid));
}

.my-day-workspace .my-day-task-button.is-selected:not(:disabled):hover {
  border-color: color-mix(in srgb, var(--my-day-trade) 68%, var(--my-day-line));
  background: color-mix(in srgb, var(--my-day-trade) 9%, var(--my-day-card-solid));
}

.my-day-task-detail {
  --my-day-trade: #64748b;
  overflow: hidden;
  display: grid;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
}

.my-day-task-detail.is-empty {
  min-height: 320px;
  place-items: center;
}

.my-day-task-detail-head {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: clamp(16px, 2vw, 24px);
  border: 1px solid color-mix(in srgb, var(--my-day-trade) 25%, var(--my-day-line));
  border-radius: 15px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--my-day-trade) 10%, transparent), transparent 46%),
    var(--my-day-card-subtle);
}

.my-day-task-detail-head::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--my-day-trade);
}

.my-day-task-detail-head h2 {
  margin-bottom: 6px;
  color: var(--my-day-ink);
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  letter-spacing: -0.025em;
  line-height: 1.08;
}

.my-day-task-detail-head p {
  margin-bottom: 0;
  color: var(--my-day-muted);
  font-size: 0.72rem;
  font-weight: 720;
}

.my-day-task-detail-head > div:last-child {
  flex: 0 0 auto;
  display: grid;
  justify-items: end;
  gap: 8px;
}

.my-day-task-detail-head > div:last-child > strong {
  color: var(--my-day-ink);
  font-size: 1.1rem;
  font-weight: 920;
}

.my-day-task-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
}

.my-day-task-facts > div {
  min-height: 70px;
  padding: 11px 12px;
  border: 1px solid var(--my-day-line);
  border-radius: 12px;
  background: var(--my-day-card-subtle);
}

.my-day-task-facts dd {
  margin: 5px 0 0;
  color: var(--my-day-ink);
  font-size: 0.76rem;
  font-weight: 860;
  line-height: 1.3;
}

.my-day-detail-section,
.my-day-design {
  display: grid;
  gap: 12px;
  padding: clamp(14px, 1.6vw, 20px);
  border-radius: 15px;
  box-shadow: none;
}

.my-day-detail-section h3,
.my-day-design h3 {
  font-size: 1rem;
}

.my-day-detail-section > p,
.my-day-commissioning > p,
.my-day-crew > p {
  margin-bottom: 0;
  color: var(--my-day-muted);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.52;
}

.my-day-work-steps {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: my-day-step;
}

.my-day-work-steps li {
  counter-increment: my-day-step;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid var(--my-day-line);
  border-radius: 11px;
  color: var(--my-day-ink);
  background: var(--my-day-card-subtle);
  font-size: 0.73rem;
  font-weight: 760;
  line-height: 1.4;
}

.my-day-work-steps li::before {
  content: counter(my-day-step);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  color: var(--my-day-blue-strong);
  background: var(--my-day-blue-soft);
  font-size: 0.68rem;
  font-weight: 950;
}

.my-day-tools {
  display: grid;
  gap: 8px;
  padding-top: 2px;
}

.my-day-tools > strong {
  color: var(--my-day-ink);
  font-size: 0.7rem;
}

.my-day-tools > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.my-day-tools span {
  padding: 6px 8px;
  border: 1px solid var(--my-day-line);
  border-radius: 999px;
  color: var(--my-day-muted);
  background: var(--my-day-card-subtle);
  font-size: 0.64rem;
  font-weight: 800;
}

.my-day-crew > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.my-day-crew article {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 9px;
  border: 1px solid var(--my-day-line);
  border-radius: 12px;
  background: var(--my-day-card-subtle);
}

.my-day-crew article > span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  color: #ffffff;
  background: linear-gradient(145deg, #0a78e8, #18a5c2);
  font-size: 0.7rem;
  font-weight: 950;
}

.my-day-crew article > div {
  display: grid;
  gap: 3px;
}

.my-day-crew article strong {
  color: var(--my-day-ink);
  font-size: 0.74rem;
}

.my-day-crew article small {
  color: var(--my-day-muted);
  font-size: 0.64rem;
  font-weight: 720;
}

.my-day-design > header mark,
.my-day-materials > header mark {
  white-space: nowrap;
}

.my-day-design-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--my-day-line);
  border-radius: 13px;
  background: var(--my-day-card-subtle);
}

.my-day-design-tabs button {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.my-day-design-tabs button[aria-selected="true"] {
  border-color: var(--my-day-blue-border);
  color: var(--my-day-blue-strong);
  background: var(--my-day-card-solid);
  box-shadow: var(--my-day-shadow-soft);
}

.my-day-workspace .my-day-design-tabs button[aria-selected="true"]:not(:disabled):hover {
  border-color: var(--my-day-blue-border);
  color: var(--my-day-blue-strong);
  background: var(--my-day-card-solid);
}

.my-day-design-preview {
  overflow: hidden;
  border: 1px solid var(--my-day-line);
  border-radius: 14px;
  background: var(--my-day-card-subtle);
}

.my-day-drawing-toolbar {
  min-height: 64px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--my-day-line);
  background: var(--my-day-card-solid);
}

.my-day-drawing-toolbar label {
  flex: 1 1 260px;
  display: grid;
  gap: 4px;
}

.my-day-drawing-toolbar label > span {
  color: var(--my-day-muted);
}

.my-day-drawing-toolbar select {
  width: min(100%, 390px);
  padding: 0 34px 0 10px;
}

.my-day-drawing-toolbar > button,
.my-day-product-action,
.my-day-commissioning > header button,
.my-day-onboarding button:not(.my-day-action-secondary),
.my-day-comment-form button {
  border-color: #0759b5;
  color: #ffffff;
  background: linear-gradient(145deg, #1688f7, #0969da);
  box-shadow: 0 8px 18px rgba(9, 105, 218, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.my-day-drawing-toolbar > button:not(:disabled):hover,
.my-day-product-action:not(:disabled):hover,
.my-day-commissioning > header button:not(:disabled):hover,
.my-day-onboarding button:not(.my-day-action-secondary):not(:disabled):hover,
.my-day-comment-form button:not(:disabled):hover {
  border-color: #064b99;
  color: #ffffff;
  background: linear-gradient(145deg, #3399ff, #075dbc);
}

.my-day-floor-preview,
.my-day-schematic-preview {
  position: relative;
  min-height: 300px;
  padding: 10px;
  background: #e8eef6;
}

.my-day-floor-preview .shared-project-floor-scene {
  display: grid;
  gap: 9px;
}

.my-day-floor-preview .shared-project-floor-canvas {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  border: 1px solid #c5d3e3;
  border-radius: 11px;
  background: #ffffff;
  box-shadow: 0 9px 22px rgba(28, 29, 33, 0.1);
}

.my-day-floor-preview .shared-project-floor-canvas > svg {
  display: block;
  width: 100%;
  height: clamp(300px, 42vw, 540px);
  background: linear-gradient(145deg, #ffffff, #f8fbff);
}

.my-day-floor-preview .shared-project-floor-grid {
  opacity: 0.42;
}

.my-day-floor-preview .shared-project-floor-canvas pattern path {
  fill: none;
  stroke: #dbe7f5;
  stroke-width: 0.55;
}

.my-day-floor-preview .shared-project-floor-underlay {
  opacity: 0.68;
}

.my-day-floor-preview .shared-project-floor-room polygon {
  fill: rgba(219, 234, 254, 0.32);
  stroke: #172033;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.my-day-floor-preview .shared-project-floor-room text {
  fill: #172033;
  stroke: #ffffff;
  stroke-width: 4px;
  paint-order: stroke;
  font-size: 12px;
  font-weight: 900;
  vector-effect: non-scaling-stroke;
}

.my-day-floor-preview .shared-project-floor-opening-cut {
  fill: none;
  stroke: #ffffff;
  stroke-width: 7;
  vector-effect: non-scaling-stroke;
}

.my-day-floor-preview .shared-project-floor-window {
  fill: none;
  stroke: #0ea5e9;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.my-day-floor-preview .shared-project-floor-door {
  fill: none;
  stroke: #64748b;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.my-day-floor-preview .shared-project-floor-route {
  fill: none;
  stroke: var(--shared-route-colour, #1677ff);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 1px rgba(28, 29, 33, 0.2));
  vector-effect: non-scaling-stroke;
}

.my-day-floor-preview .shared-project-floor-route.duct {
  stroke-width: 7;
  opacity: 0.84;
}

.my-day-floor-preview .shared-project-floor-item {
  fill: currentColor;
  stroke: #ffffff;
  stroke-width: 1.6;
  color: var(--shared-route-colour, #1677ff);
  filter: drop-shadow(0 2px 2px rgba(28, 29, 33, 0.24));
  vector-effect: non-scaling-stroke;
}

.my-day-floor-preview .shared-project-floor-item.kind-diffuser {
  fill: #ffffff;
  stroke: var(--shared-route-colour, #00a68a);
  stroke-width: 2.5;
}

.my-day-floor-preview .shared-project-floor-readonly {
  position: absolute;
  top: 9px;
  right: 9px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(19, 20, 23, 0.82);
  font-size: 0.61rem;
  font-weight: 900;
  box-shadow: 0 5px 16px rgba(28, 29, 33, 0.2);
}

.my-day-floor-preview .shared-project-floor-readonly svg {
  width: 13px;
  height: 13px;
}

.my-day-floor-preview .shared-project-floor-empty,
.my-day-preview-empty {
  min-height: 300px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 24px;
  color: #64748b;
  background: #ffffff;
  text-align: center;
  font-size: 0.74rem;
  font-weight: 760;
}

.my-day-floor-preview .shared-project-floor-empty strong {
  color: #172033;
}

.my-day-floor-preview .shared-project-floor-scene-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  color: #52627a;
  font-size: 0.62rem;
  font-weight: 760;
}

.my-day-floor-preview .shared-project-floor-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.my-day-floor-preview .shared-project-floor-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.my-day-floor-preview .shared-project-floor-legend-item i {
  width: 16px;
  height: 4px;
  border-radius: 999px;
  background: var(--shared-route-colour, #1677ff);
}

.my-day-schematic-preview {
  display: grid;
  place-items: center;
}

.my-day-schematic-preview .drawing-export-svg {
  display: block;
  width: 100%;
  max-height: 540px;
  min-height: 300px;
  border: 1px solid #c5d3e3;
  border-radius: 11px;
  background: #ffffff;
  box-shadow: 0 9px 22px rgba(28, 29, 33, 0.1);
}

.my-day-model-preview {
  min-height: 220px;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: clamp(18px, 3vw, 34px);
  background:
    radial-gradient(circle at 12% 50%, rgba(9, 105, 218, 0.2), transparent 26%),
    linear-gradient(145deg, #f7fbff, #eaf3ff);
}

.my-day-model-preview > svg {
  width: 62px;
  height: 62px;
  padding: 15px;
  border-radius: 18px;
  color: var(--my-day-blue);
  background: var(--my-day-card-solid);
  box-shadow: var(--my-day-shadow);
}

.my-day-model-preview > div {
  display: grid;
  gap: 5px;
}

.my-day-model-preview strong {
  color: var(--my-day-ink);
  font-size: 1rem;
}

.my-day-model-preview span {
  color: var(--my-day-muted);
  font-size: 0.71rem;
  font-weight: 720;
  line-height: 1.4;
}

.my-day-comments {
  display: grid;
  gap: 10px;
  padding-top: 3px;
}

.my-day-comments > header {
  padding-top: 4px;
}

.my-day-comments h4 {
  font-size: 0.9rem;
}

.my-day-comments > header > strong {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--my-day-blue-strong);
  background: var(--my-day-blue-soft);
  font-size: 0.65rem;
}

.my-day-comment-list {
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 7px;
  max-height: 350px;
  padding-right: 2px;
  overscroll-behavior: contain;
}

.my-day-comment {
  display: grid;
  gap: 7px;
  padding: 11px;
  border: 1px solid var(--my-day-line);
  border-radius: 12px;
  background: var(--my-day-card-subtle);
}

.my-day-comment-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.my-day-comment-meta strong {
  color: var(--my-day-ink);
  font-size: 0.71rem;
}

.my-day-comment-meta time,
.my-day-comment small,
.my-day-comment em {
  color: var(--my-day-muted);
  font-size: 0.61rem;
  font-style: normal;
  font-weight: 720;
}

.my-day-comment.is-change-proposal {
  border-left: 3px solid var(--my-day-warning);
}

.my-day-comment-proposal-status {
  flex: 0 1 210px;
  min-width: 0;
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  margin-left: auto;
  padding: 3px 6px;
  border: 1px solid color-mix(in srgb, var(--my-day-warning) 34%, var(--my-day-line));
  border-radius: 8px;
  color: var(--my-day-warning);
  background: var(--my-day-warning-soft);
}

.my-day-comment-proposal-status strong,
.my-day-comment-proposal-status span {
  overflow: hidden;
  color: inherit;
  font-size: 0.58rem;
  font-weight: 860;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-day-comment-proposal-status span {
  text-align: right;
}

.my-day-comment-proposal-status[data-proposal-status="accepted"],
.my-day-comment-proposal-status[data-proposal-status="completed"] {
  border-color: color-mix(in srgb, var(--my-day-success) 36%, var(--my-day-line));
  color: var(--my-day-success);
  background: var(--my-day-success-soft);
}

.my-day-comment-proposal-status[data-proposal-status="declined"] {
  border-color: color-mix(in srgb, var(--my-day-danger) 32%, var(--my-day-line));
  color: var(--my-day-danger);
  background: color-mix(in srgb, var(--my-day-danger) 8%, var(--my-day-card-solid));
}

.my-day-comment-navigate {
  flex: 0 0 auto;
  width: auto;
  min-width: 78px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
  border: 1px solid var(--my-day-blue-border);
  border-radius: 8px;
  color: var(--my-day-blue-strong);
  background: var(--my-day-blue-soft);
  box-shadow: none;
  font-size: 0.62rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.my-day-comment-navigate:hover {
  border-color: var(--my-day-blue);
  color: var(--my-day-blue-strong);
  background: color-mix(in srgb, var(--my-day-blue-soft) 72%, var(--my-day-card-solid));
}

.my-day-comment-navigate:focus-visible {
  outline: 3px solid var(--my-day-blue-border);
  outline-offset: 2px;
}

.my-day-comment-navigate svg {
  flex: 0 0 15px;
  width: 15px;
  height: 15px;
}

.my-day-comment p {
  margin-bottom: 0;
  color: var(--my-day-ink);
  font-size: 0.73rem;
  font-weight: 690;
  line-height: 1.48;
  white-space: pre-wrap;
}

.my-day-comment-target {
  min-height: 44px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 5px 6px 5px 8px;
  border: 1px solid var(--my-day-line);
  border-radius: 9px;
  color: var(--my-day-ink);
  background: var(--my-day-card-solid);
}

.my-day-comment-target > svg {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  color: var(--my-day-blue);
}

.my-day-comment-target > span {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.my-day-comment-target strong,
.my-day-comment-target small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-day-comment-target strong {
  color: var(--my-day-ink);
  font-size: 0.64rem;
}

.my-day-comment-target small {
  color: var(--my-day-muted);
  font-size: 0.56rem;
}

.my-day-comment.is-resolved {
  opacity: 0.72;
  border-style: dashed;
}

.my-day-comment.is-resolved em {
  color: var(--my-day-success);
  font-weight: 820;
}

.my-day-comment.proposal-declined em {
  color: var(--my-day-danger);
}

.my-day-comment-change-record {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--my-day-blue-border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--my-day-blue-soft) 60%, var(--my-day-card-solid));
}

.my-day-comment-change-record > header {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.my-day-comment-change-record > header > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--my-day-blue-strong);
  background: var(--my-day-card-solid);
}

.my-day-comment-change-record > header svg {
  width: 15px;
  height: 15px;
}

.my-day-comment-change-record > header > div,
.my-day-comment-change-record li > div {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.my-day-comment-change-record :is(ol, li) {
  margin: 0;
  padding: 0;
  list-style: none;
}

.my-day-comment-change-record ol {
  display: grid;
  gap: 4px;
}

.my-day-comment-change-record li {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 5px 7px;
  border: 1px solid var(--my-day-line);
  border-radius: 8px;
  background: var(--my-day-card-solid);
}

.my-day-comment-change-record li > span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--my-day-blue);
}

.my-day-comment-change-record :is(strong, small, time) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-day-comment-change-record strong {
  color: var(--my-day-ink);
  font-size: 0.62rem;
}

.my-day-comment-change-record small,
.my-day-comment-change-record time {
  color: var(--my-day-muted);
  font-size: 0.54rem;
  font-style: normal;
  font-weight: 720;
}

.my-day-comment-change-record-more {
  padding-left: 7px;
}

.my-day-comment-thread {
  display: grid;
  gap: 6px;
  padding-top: 3px;
  border-top: 1px solid var(--my-day-line);
}

.my-day-comment-thread > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.my-day-comment-thread > header strong {
  color: var(--my-day-ink);
  font-size: 0.61rem;
}

.my-day-comment-thread > header span {
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 999px;
  color: var(--my-day-blue-strong);
  background: var(--my-day-blue-soft);
  font-size: 0.54rem;
  font-weight: 900;
  text-align: center;
}

.my-day-comment-thread > ol {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.my-day-comment-thread > ol > li {
  display: grid;
  gap: 3px;
  padding: 6px 7px;
  border-left: 2px solid var(--my-day-blue-border);
  border-radius: 0 7px 7px 0;
  background: var(--my-day-card-solid);
}

.my-day-comment-thread > ol > li > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.my-day-comment-thread > ol :is(strong, time) {
  color: var(--my-day-muted);
  font-size: 0.54rem;
  font-style: normal;
  font-weight: 800;
}

.my-day-comment-thread > ol p,
.my-day-comment-thread-empty {
  color: var(--my-day-ink);
  font-size: 0.61rem;
  line-height: 1.4;
}

.my-day-comment-thread-empty {
  margin: 0;
  color: var(--my-day-muted);
}

.my-day-comment-response-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 6px;
}

.my-day-comment-response-form label {
  display: block;
}

.my-day-comment-response-form textarea {
  width: 100%;
  min-height: 40px;
  max-height: 80px;
  resize: vertical;
  padding: 9px;
  border: 1px solid var(--my-day-line-strong);
  border-radius: 8px;
  color: var(--my-day-ink);
  background: var(--my-day-control);
  font: inherit;
  font-size: 0.62rem;
  font-weight: 650;
  line-height: 1.35;
}

.my-day-comment-response-form button {
  min-width: 82px;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--my-day-blue-border);
  border-radius: 8px;
  color: var(--my-day-blue-strong);
  background: var(--my-day-blue-soft);
  box-shadow: none;
  font: inherit;
  font-size: 0.62rem;
  font-weight: 850;
}

.my-day-comment-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding-top: 2px;
}

.my-day-comment-actions button {
  min-width: 76px;
  padding: 0 10px;
  box-shadow: none;
}

.my-day-comment-actions .is-archive {
  border-color: rgba(180, 35, 24, 0.32);
  color: var(--my-day-danger);
  background: color-mix(in srgb, var(--my-day-danger) 7%, var(--my-day-card-solid));
}

.my-day-comment-actions .is-accept {
  border-color: color-mix(in srgb, var(--my-day-success) 38%, var(--my-day-line));
  color: var(--my-day-success);
  background: var(--my-day-success-soft);
}

.my-day-comment-actions .is-decline {
  border-color: color-mix(in srgb, var(--my-day-danger) 32%, var(--my-day-line));
  color: var(--my-day-danger);
  background: color-mix(in srgb, var(--my-day-danger) 7%, var(--my-day-card-solid));
}

.my-day-workspace .my-day-comment-actions :is(.is-archive, .is-decline):not(:disabled):hover,
.my-day-review-overlay .my-day-comment-actions :is(.is-archive, .is-decline):not(:disabled):hover,
.my-day-designer-comments-panel .my-day-comment-actions :is(.is-archive, .is-decline):not(:disabled):hover {
  border-color: color-mix(in srgb, var(--my-day-danger) 58%, var(--my-day-line));
  color: var(--my-day-danger);
  background: color-mix(in srgb, var(--my-day-danger) 12%, var(--my-day-card-solid));
}

.my-day-comments-empty {
  min-height: 74px;
  display: grid;
  place-items: center;
  padding: 16px;
  border: 1px dashed var(--my-day-line-strong);
  border-radius: 11px;
  color: var(--my-day-muted);
  background: var(--my-day-card-subtle);
  font-size: 0.71rem;
  font-weight: 750;
  text-align: center;
}

.my-day-comments-signin,
.my-day-field-data-note {
  margin: 0;
  padding: 10px 11px;
  border: 1px dashed var(--my-day-line-strong);
  border-radius: 10px;
  color: var(--my-day-muted);
  background: var(--my-day-card-subtle);
  font-size: 0.66rem;
  font-weight: 750;
  line-height: 1.45;
}

.my-day-comment-form {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--my-day-line);
  border-radius: 13px;
  background: var(--my-day-card-subtle);
}

.my-day-comment-form label {
  display: grid;
  gap: 6px;
}

.my-day-comment-form label > span {
  color: var(--my-day-muted);
}

.my-day-comment-anchor-control {
  min-height: 44px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--my-day-line-strong);
  border-radius: 10px;
  color: var(--my-day-ink);
  background: var(--my-day-control);
  cursor: pointer;
}

.my-day-comment-anchor-control.is-empty {
  color: var(--my-day-muted);
  border-style: dashed;
  background: var(--my-day-card-subtle);
  cursor: default;
}

.my-day-comment-anchor-control > input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--my-day-blue);
}

.my-day-comment-anchor-control > svg,
.my-day-comment-anchor-control > span > svg {
  width: 18px;
  height: 18px;
  color: var(--my-day-blue);
}

.my-day-comment-anchor-control > span {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.my-day-comment-anchor-control > span > span,
.my-day-comment-anchor-control.is-empty > span {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.my-day-comment-anchor-control.is-empty > span {
  grid-template-columns: minmax(0, 1fr);
}

.my-day-comment-anchor-control strong,
.my-day-comment-anchor-control small {
  overflow: hidden;
  color: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-day-comment-anchor-control strong {
  font-size: 0.63rem;
}

.my-day-comment-anchor-control small {
  color: var(--my-day-muted);
  font-size: 0.56rem;
}

.my-day-comment-form textarea {
  width: 100%;
  min-height: 88px;
  resize: vertical;
  padding: 10px 11px;
  font-weight: 650;
  line-height: 1.45;
  box-shadow: none;
}

.my-day-comment-form > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.my-day-comment-form > .my-day-comment-form-footer {
  flex-wrap: wrap;
}

.my-day-comment-form > .my-day-change-recorder {
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--my-day-line-strong);
  border-radius: 10px;
  background: var(--my-day-card-solid);
}

.my-day-change-recorder > div {
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.my-day-change-recorder > div > span:first-child {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--my-day-blue-strong);
  background: var(--my-day-blue-soft);
}

.my-day-change-recorder > div > span:first-child svg {
  width: 15px;
  height: 15px;
}

.my-day-change-recorder > div > span:last-child {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.my-day-change-recorder :is(strong, small) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-day-change-recorder strong {
  color: var(--my-day-ink);
  font-size: 0.62rem;
}

.my-day-change-recorder small {
  color: var(--my-day-muted);
  font-size: 0.54rem;
}

.my-day-change-recorder > button {
  min-width: 102px;
  min-height: 40px;
  padding: 0 10px;
  border-color: var(--my-day-blue-border);
  color: var(--my-day-blue-strong);
  background: var(--my-day-blue-soft);
  box-shadow: none;
  font-size: 0.61rem;
}

.my-day-change-recorder.is-recording {
  border-color: color-mix(in srgb, var(--my-day-danger) 48%, var(--my-day-line));
  background: color-mix(in srgb, var(--my-day-danger) 6%, var(--my-day-card-solid));
}

.my-day-change-recorder.is-recording > div > span:first-child {
  color: var(--my-day-danger);
  background: color-mix(in srgb, var(--my-day-danger) 10%, var(--my-day-card-solid));
}

.my-day-change-recorder.is-recorded {
  border-color: color-mix(in srgb, var(--my-day-success) 36%, var(--my-day-line));
  background: var(--my-day-success-soft);
}

.my-day-comment-form-footer > small {
  flex: 1 1 120px;
  min-width: 0;
}

.my-day-comment-submit-actions {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-left: auto;
}

.my-day-comment-form small {
  color: var(--my-day-muted);
  font-size: 0.62rem;
  font-weight: 720;
}

.my-day-comment-form button {
  flex: 0 0 auto;
  min-width: 116px;
  padding: 0 14px;
}

.my-day-comment-form .my-day-comment-submit-actions button {
  min-width: 102px;
}

.my-day-comment-form .my-day-comment-submit-actions .is-proposal {
  border-color: var(--my-day-blue);
  color: #ffffff;
  background: var(--my-day-blue);
}

.my-day-comment-form .my-day-comment-submit-actions .is-proposal:hover {
  border-color: var(--my-day-blue-strong);
  color: #ffffff;
  background: var(--my-day-blue-strong);
}

.my-day-materials > header > strong {
  color: var(--my-day-ink);
  font-size: 0.78rem;
  font-weight: 920;
  white-space: nowrap;
}

.my-day-material-list,
.my-day-commissioning-list {
  display: grid;
  gap: 7px;
}

.my-day-material-list > article {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--my-day-line);
  border-radius: 11px;
  background: var(--my-day-card-subtle);
}

.my-day-material-list article > div {
  display: grid;
  gap: 3px;
}

.my-day-material-list strong,
.my-day-commissioning-list strong {
  color: var(--my-day-ink);
  font-size: 0.73rem;
}

.my-day-material-list span,
.my-day-commissioning-list small {
  color: var(--my-day-muted);
  font-size: 0.63rem;
  font-weight: 720;
}

.my-day-material-list em {
  max-width: 140px;
  padding: 6px 8px;
  border-radius: 9px;
  color: var(--my-day-blue-strong);
  background: var(--my-day-blue-soft);
  font-size: 0.67rem;
  font-style: normal;
  font-weight: 900;
  text-align: right;
}

.my-day-product-record {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--my-day-blue-border);
  border-radius: 13px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--my-day-blue-soft) 72%, transparent), transparent 58%),
    var(--my-day-card-subtle);
}

.my-day-product-record > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.my-day-product-record > header > div {
  display: grid;
  gap: 3px;
}

.my-day-product-record > header span {
  color: var(--my-day-blue);
  font-size: 0.61rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.my-day-product-record > header strong {
  color: var(--my-day-ink);
  font-size: 0.82rem;
  line-height: 1.3;
}

.my-day-product-record > header small,
.my-day-product-record > p {
  margin: 0;
  color: var(--my-day-muted);
  font-size: 0.64rem;
  font-weight: 720;
  line-height: 1.42;
}

.my-day-product-record dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 6px;
  margin: 0;
}

.my-day-product-record dl > div {
  min-height: 56px;
  padding: 8px 9px;
  border: 1px solid var(--my-day-line);
  border-radius: 9px;
  background: var(--my-day-card-solid);
}

.my-day-product-record dt {
  color: var(--my-day-muted);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.my-day-product-record dd {
  margin: 4px 0 0;
  color: var(--my-day-ink);
  font-size: 0.68rem;
  font-weight: 840;
  line-height: 1.35;
}

.my-day-product-documents {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 6px;
}

.my-day-product-documents > :is(a, span) {
  min-height: 54px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid var(--my-day-line);
  border-radius: 10px;
  color: var(--my-day-ink);
  background: var(--my-day-card-solid);
  text-decoration: none;
}

.my-day-product-documents > a:hover {
  border-color: var(--my-day-blue-border);
  background: var(--my-day-blue-soft);
}

.my-day-product-documents > :is(a, span) > svg {
  width: 18px;
  height: 18px;
  color: var(--my-day-blue);
}

.my-day-product-documents > :is(a, span) > span {
  display: grid;
  gap: 2px;
}

.my-day-product-documents strong {
  color: var(--my-day-ink);
  font-size: 0.67rem;
  line-height: 1.3;
}

.my-day-product-documents small {
  color: var(--my-day-muted);
  font-size: 0.59rem;
  font-weight: 710;
}

.my-day-product-action {
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  text-align: left;
}

.my-day-product-action svg {
  width: 16px;
  height: 16px;
}

.my-day-commissioning > header button {
  flex: 0 0 auto;
  padding: 0 14px;
}

.my-day-commissioning-list article {
  min-height: 58px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid var(--my-day-line);
  border-radius: 11px;
  background: var(--my-day-card-subtle);
}

.my-day-commissioning-list article > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  color: var(--my-day-blue-strong);
  background: var(--my-day-blue-soft);
}

.my-day-commissioning-list article > span svg {
  width: 16px;
  height: 16px;
}

.my-day-commissioning-list article > div {
  display: grid;
  gap: 3px;
}

.my-day-commissioning-list article.is-complete > span,
.my-day-commissioning-list article.is-complete mark {
  border-color: rgba(20, 125, 63, 0.2);
  color: var(--my-day-success);
  background: var(--my-day-success-soft);
}

.my-day-empty {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 7px;
  min-height: 150px;
  padding: 22px;
  color: var(--my-day-muted);
  text-align: center;
}

.my-day-empty svg {
  width: 30px;
  height: 30px;
  color: var(--my-day-blue);
}

.my-day-empty strong {
  color: var(--my-day-ink);
  font-size: 0.82rem;
}

.my-day-empty span {
  max-width: 26rem;
  font-size: 0.7rem;
  font-weight: 720;
  line-height: 1.45;
}

.my-day-onboarding {
  min-height: 220px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-content: start;
  align-items: start;
  gap: 12px 14px;
  padding: clamp(16px, 1.5vw, 22px);
  border-radius: 18px;
  text-align: left;
}

.my-day-onboarding > svg {
  width: 48px;
  height: 48px;
  padding: 11px;
  border-radius: 14px;
  color: var(--my-day-blue);
  background: var(--my-day-blue-soft);
}

.my-day-onboarding-copy {
  display: grid;
  gap: 5px;
}

.my-day-onboarding-copy > span,
.my-day-no-work > div > span {
  color: var(--my-day-blue);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.07em;
  line-height: 1.2;
  text-transform: uppercase;
}

.my-day-onboarding h2,
.my-day-no-work h2 {
  margin-bottom: 0;
  color: var(--my-day-ink);
  font-size: 1.08rem;
  line-height: 1.2;
}

.my-day-onboarding p,
.my-day-onboarding-help,
.my-day-no-work p {
  margin: 0;
  color: var(--my-day-muted);
  font-size: 0.76rem;
  font-weight: 720;
  line-height: 1.45;
}

.my-day-onboarding-steps {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.my-day-onboarding-steps li {
  min-height: 44px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 6px 9px;
  border: 1px solid var(--my-day-line);
  border-radius: 10px;
  background: var(--my-day-card-subtle);
}

.my-day-onboarding-steps li > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  color: var(--my-day-blue-strong);
  background: var(--my-day-blue-soft);
  font-size: 0.68rem;
  font-weight: 950;
}

.my-day-onboarding-steps li > div {
  display: grid;
  gap: 1px;
}

.my-day-onboarding-steps strong {
  color: var(--my-day-ink);
  font-size: 0.74rem;
}

.my-day-onboarding-steps small {
  color: var(--my-day-muted);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.3;
}

.my-day-onboarding-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.my-day-onboarding-actions button {
  flex: 1 1 170px;
  min-width: 0;
  padding: 0 14px;
}

.my-day-onboarding-actions .my-day-action-secondary {
  border-color: var(--my-day-line-strong);
  color: var(--my-day-ink);
  background: var(--my-day-control);
  box-shadow: var(--my-day-shadow-soft);
}

.my-day-onboarding-actions .my-day-action-secondary:not(:disabled):hover {
  border-color: var(--my-day-blue-border);
  color: var(--my-day-blue-strong);
  background: var(--my-day-blue-soft);
}

.my-day-onboarding-help {
  grid-column: 1 / -1;
  padding: 10px 12px;
  border-left: 3px solid var(--my-day-blue);
  border-radius: 0 9px 9px 0;
  background: var(--my-day-blue-soft);
}

.my-day-no-work {
  min-height: 170px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: clamp(18px, 2vw, 26px);
  border-radius: 18px;
}

.my-day-no-work > svg {
  width: 48px;
  height: 48px;
  padding: 11px;
  border-radius: 14px;
  color: var(--my-day-blue);
  background: var(--my-day-blue-soft);
}

.my-day-no-work > div {
  display: grid;
  gap: 6px;
}

/* Large read-only review. The published drawing is rendered in a modal layer;
   the My Day workspace remains underneath as context and is never swapped for
   a live editor surface. */
.workspace.my-day-design-review-shell {
  min-width: 0;
  min-height: 0;
  display: block;
  overflow: auto;
  padding: 0;
  pointer-events: none;
  user-select: none;
}

.workspace.my-day-design-review-shell > * {
  min-width: 0;
  min-height: 0;
}

.my-day-review-backdrop {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(8, 15, 28, 0.68);
  backdrop-filter: blur(10px) saturate(78%);
  -webkit-backdrop-filter: blur(10px) saturate(78%);
  overscroll-behavior: contain;
}

.my-day-review-overlay {
  position: relative;
  width: min(1480px, calc(100vw - 36px));
  height: min(900px, calc(100dvh - 36px));
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(320px, 27vw, 390px);
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px 12px;
  padding: 14px;
  border: 1px solid var(--my-day-line-strong);
  border-radius: 20px;
  background: var(--my-day-card);
  box-shadow: 0 34px 100px rgba(2, 8, 23, 0.44);
}

.my-day-review-overlay > header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 58px;
  padding: 3px 3px 12px;
  border-bottom: 1px solid var(--my-day-line);
}

.my-day-review-overlay > header > div {
  display: grid;
  gap: 2px;
}

.my-day-review-overlay > header span {
  color: var(--my-day-blue);
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.my-day-review-overlay > header strong {
  overflow: hidden;
  color: var(--my-day-ink);
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-day-review-overlay > header small {
  color: var(--my-day-muted);
  font-size: 0.62rem;
  font-weight: 780;
}

.my-day-review-overlay > header button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
}

.my-day-review-overlay > header button svg {
  width: 15px;
  height: 15px;
}

.my-day-review-notice {
  grid-column: 1 / -1;
  margin-bottom: 0;
  padding: 9px 11px;
  border-left: 3px solid var(--my-day-blue);
  border-radius: 0 8px 8px 0;
  color: var(--my-day-muted);
  background: var(--my-day-blue-soft);
  font-size: 0.65rem;
  font-weight: 760;
  line-height: 1.4;
}

.my-day-review-canvas {
  position: relative;
  grid-column: 1;
  grid-row: 3;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: stretch;
  padding: 10px;
  border: 1px solid var(--my-day-line);
  border-radius: 15px;
  background: #e8eef6;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y pinch-zoom;
}

.my-day-review-canvas.is-schematic {
  place-items: center;
}

.my-day-review-canvas.is-schematic .drawing-export-svg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 1px solid #c5d3e3;
  border-radius: 11px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(28, 29, 33, 0.12);
}

.my-day-review-canvas :is(.shared-project-floor-scene, .my-day-model-isometric .shared-project-floor-scene) {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 9px;
}

.my-day-review-canvas .shared-project-floor-canvas {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  border: 1px solid #c5d3e3;
  border-radius: 11px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(28, 29, 33, 0.12);
}

.my-day-review-canvas .shared-project-floor-canvas > svg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 420px;
  background: linear-gradient(145deg, #ffffff, #f8fbff);
}

.my-day-review-canvas .shared-project-floor-grid {
  opacity: 0.42;
}

.my-day-review-canvas .shared-project-floor-canvas pattern path {
  fill: none;
  stroke: #dbe7f5;
  stroke-width: 0.55;
}

.my-day-review-canvas .shared-project-floor-underlay {
  opacity: 0.68;
}

.my-day-review-canvas .shared-project-floor-room polygon {
  fill: rgba(219, 234, 254, 0.32);
  stroke: #172033;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.my-day-review-canvas .shared-project-floor-room text {
  fill: #172033;
  stroke: #ffffff;
  stroke-width: 4px;
  paint-order: stroke;
  font-size: 12px;
  font-weight: 900;
  vector-effect: non-scaling-stroke;
}

.my-day-review-canvas .shared-project-floor-opening-cut {
  fill: none;
  stroke: #ffffff;
  stroke-width: 7;
  vector-effect: non-scaling-stroke;
}

.my-day-review-canvas .shared-project-floor-window {
  fill: none;
  stroke: #0ea5e9;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.my-day-review-canvas .shared-project-floor-door {
  fill: none;
  stroke: #64748b;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.my-day-review-canvas .shared-project-floor-route {
  fill: none;
  stroke: var(--shared-route-colour, #1677ff);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 1px rgba(28, 29, 33, 0.2));
  vector-effect: non-scaling-stroke;
}

.my-day-review-canvas .shared-project-floor-route.duct {
  stroke-width: 7;
  opacity: 0.84;
}

.my-day-review-canvas .shared-project-floor-item {
  fill: currentColor;
  stroke: #ffffff;
  stroke-width: 1.6;
  color: var(--shared-route-colour, #1677ff);
  vector-effect: non-scaling-stroke;
}

.my-day-review-canvas .shared-project-floor-item.kind-diffuser {
  fill: #ffffff;
  stroke: var(--shared-route-colour, #00a68a);
  stroke-width: 2.5;
}

.my-day-review-canvas .shared-project-floor-readonly {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(19, 20, 23, 0.82);
  font-size: 0.61rem;
  font-weight: 900;
}

.my-day-review-canvas .shared-project-floor-readonly svg {
  width: 13px;
  height: 13px;
}

.my-day-review-canvas .shared-project-floor-empty {
  min-height: 420px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 24px;
  color: #64748b;
  text-align: center;
}

.my-day-review-canvas .shared-project-floor-empty strong {
  color: #172033;
}

.my-day-review-canvas .shared-project-floor-scene-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  color: #52627a;
  font-size: 0.62rem;
  font-weight: 760;
}

.my-day-review-canvas .shared-project-floor-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.my-day-review-canvas .shared-project-floor-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.my-day-review-canvas .shared-project-floor-legend-item i {
  width: 16px;
  height: 4px;
  border-radius: 999px;
  background: var(--shared-route-colour, #1677ff);
}

.my-day-review-canvas.is-model-overview {
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
}

.my-day-model-isometric {
  position: relative;
  min-height: 0;
  overflow: hidden;
  display: grid;
  padding: clamp(8px, 1.8vw, 18px);
  border: 1px solid #c5d3e3;
  border-radius: 12px;
  background:
    radial-gradient(ellipse at 50% 62%, rgba(68, 112, 166, 0.18), transparent 48%),
    linear-gradient(180deg, #eef4fb 0%, #dce7f3 100%);
  isolation: isolate;
}

/* The field 3D tab is a simplified coordination overview rather than the live
   editor. Keep the actual scene bounded while projecting its drawing canvas;
   the source legend and provenance remain level and readable. */
.my-day-model-isometric .shared-project-floor-scene {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  grid-template-rows: minmax(0, 1fr) auto;
  perspective: 1200px;
  perspective-origin: 50% 38%;
  transform-style: preserve-3d;
}

.my-day-review-canvas .my-day-model-isometric .shared-project-floor-canvas {
  width: min(84%, 940px);
  height: 100%;
  min-height: 0;
  align-self: center;
  justify-self: center;
  transform: rotateX(55deg) rotateZ(-33deg) scale(0.82) translateZ(0);
  transform-origin: 50% 50%;
  backface-visibility: hidden;
  box-shadow: 18px 28px 34px rgba(28, 29, 33, 0.25);
}

.my-day-review-canvas .my-day-model-isometric .shared-project-floor-canvas > svg,
.my-day-review-canvas .my-day-model-isometric .shared-project-floor-empty {
  height: 100%;
  min-height: 0;
}

.my-day-model-isometric .shared-project-floor-scene-footer {
  position: relative;
  z-index: 2;
  margin-top: 5px;
  padding: 7px 9px;
  border: 1px solid rgba(197, 211, 227, 0.84);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.my-day-model-provenance {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 4px 12px;
  padding: 10px 12px;
  border: 1px solid #c5d3e3;
  border-radius: 11px;
  color: #172033;
  background: #ffffff;
}

.my-day-model-provenance strong {
  grid-row: 1 / 3;
  color: #0759b5;
  font-size: 0.72rem;
}

.my-day-model-provenance span {
  font-size: 0.67rem;
  font-weight: 820;
}

.my-day-model-provenance small {
  color: #64748b;
  font-size: 0.59rem;
  font-weight: 700;
  line-height: 1.35;
}

.my-day-review-overlay .my-day-comments.is-overlay {
  grid-column: 2;
  grid-row: 3;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(74px, 1fr) auto;
  min-height: 0;
  padding: 11px;
  border: 1px solid var(--my-day-line);
  border-radius: 15px;
  background: var(--my-day-card-subtle);
}

.my-day-review-overlay .my-day-comment-list {
  max-height: none;
}

/* Dark theme retains the same hierarchy without leaving white cards or dark
   text on translucent panels. Technical drawings intentionally stay white. */
html[data-theme="dark"] .workspace.my-day-workspace-shell {
  background:
    radial-gradient(circle at 8% 0%, rgba(10, 132, 255, 0.17), transparent 31rem),
    radial-gradient(circle at 94% 16%, rgba(45, 212, 191, 0.08), transparent 28rem),
    linear-gradient(180deg, #0d1118 0%, #080b10 100%);
}

html[data-theme="dark"] .my-day-workspace,
html[data-theme="dark"] .my-day-review-overlay {
  --my-day-bg: #0b0e13;
  --my-day-card: rgba(22, 27, 36, 0.96);
  --my-day-card-solid: #171c25;
  --my-day-card-subtle: #11161e;
  --my-day-control: #171c25;
  --my-day-line: rgba(203, 213, 225, 0.16);
  --my-day-line-strong: rgba(203, 213, 225, 0.28);
  --my-day-ink: #f1f5f9;
  --my-day-muted: #9facbd;
  --my-day-blue: #60a5fa;
  --my-day-blue-strong: #93c5fd;
  --my-day-blue-soft: rgba(37, 99, 235, 0.18);
  --my-day-blue-border: rgba(96, 165, 250, 0.48);
  --my-day-success: #6ee7a0;
  --my-day-success-soft: rgba(20, 125, 63, 0.2);
  --my-day-warning: #facc75;
  --my-day-warning-soft: rgba(180, 83, 9, 0.18);
  --my-day-danger: #fda4af;
  --my-day-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
  --my-day-shadow-soft: 0 8px 22px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .my-day-workspace :is(button, select, input, textarea),
html[data-theme="dark"] .my-day-review-overlay :is(button, select, input, textarea) {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), var(--my-day-shadow-soft);
  color-scheme: dark;
}

html[data-theme="dark"] .my-day-topbar {
  border-color: rgba(96, 165, 250, 0.35);
  background:
    radial-gradient(circle at 84% -40%, rgba(255, 255, 255, 0.16), transparent 46%),
    linear-gradient(125deg, #123b72 0%, #075bb3 58%, #0b7086 100%);
  box-shadow: 0 26px 62px rgba(0, 0, 0, 0.34);
}

html[data-theme="dark"] .my-day-safety-note {
  color: #f8d99d;
}

html[data-theme="dark"] .my-day-site-grid a:hover {
  color: #07111f;
  background: #93c5fd;
}

html[data-theme="dark"] .my-day-drawing-toolbar > button,
html[data-theme="dark"] .my-day-product-action,
html[data-theme="dark"] .my-day-commissioning > header button,
html[data-theme="dark"] .my-day-onboarding button:not(.my-day-action-secondary),
html[data-theme="dark"] .my-day-comment-form button {
  border-color: rgba(96, 165, 250, 0.64);
  color: #ffffff;
  background: linear-gradient(145deg, #167be3, #075bb3);
}

html[data-theme="dark"] .my-day-drawing-toolbar > button:not(:disabled):hover,
html[data-theme="dark"] .my-day-product-action:not(:disabled):hover,
html[data-theme="dark"] .my-day-commissioning > header button:not(:disabled):hover,
html[data-theme="dark"] .my-day-onboarding button:not(.my-day-action-secondary):not(:disabled):hover,
html[data-theme="dark"] .my-day-comment-form button:not(:disabled):hover {
  border-color: #93c5fd;
  color: #ffffff;
  background: linear-gradient(145deg, #258bf2, #0969c9);
}

html[data-theme="dark"] .my-day-floor-preview,
html[data-theme="dark"] .my-day-schematic-preview,
html[data-theme="dark"] .my-day-review-canvas {
  background: #0b1018;
}

html[data-theme="dark"] .my-day-model-preview {
  background:
    radial-gradient(circle at 12% 50%, rgba(59, 130, 246, 0.24), transparent 27%),
    linear-gradient(145deg, #111926, #0d141e);
}

html[data-theme="dark"] .my-day-review-overlay {
  border-color: rgba(203, 213, 225, 0.24);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.48);
}

html[data-theme="dark"] .my-day-review-backdrop {
  background: rgba(0, 0, 0, 0.76);
}

@media (prefers-contrast: more) {
  .my-day-workspace,
  .my-day-review-overlay {
    --my-day-line: color-mix(in srgb, var(--my-day-ink) 32%, transparent);
    --my-day-line-strong: color-mix(in srgb, var(--my-day-ink) 54%, transparent);
  }

  .my-day-workspace :is(button, select, input, textarea):focus-visible,
  .my-day-workspace a:focus-visible,
  .my-day-review-overlay :is(button, select, input, textarea):focus-visible {
    outline-width: 4px;
  }
}

@media (max-width: 1180px) {
  .my-day-content.is-unlinked {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1100px) {
  .my-day-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .my-day-topbar > div:first-child,
  .my-day-topbar-controls {
    flex: 0 1 auto;
    width: 100%;
  }

  .my-day-topbar-controls {
    justify-content: flex-start;
  }

  .my-day-site-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .my-day-task-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .studio-shell.my-day-shell,
  .studio-shell.my-day-review-shell {
    min-width: 0;
  }

  .my-day-workspace {
    padding: 12px;
  }

  .my-day-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .my-day-task-rail {
    position: static;
    max-height: none;
  }

  .my-day-task-rail ol {
    grid-auto-flow: column;
    grid-auto-columns: minmax(270px, 42vw);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
  }

  .my-day-task-rail li {
    scroll-snap-align: start;
  }

  .my-day-task-button,
  .my-day-task-button:hover {
    height: 100%;
  }

  .workspace.my-day-design-review-shell {
    padding: 0;
  }

  .my-day-review-backdrop {
    padding: 10px;
  }

  .my-day-review-overlay {
    inset: auto;
    width: 100%;
    height: auto;
    max-height: 100%;
    overflow: auto;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(300px, 56dvh) auto;
  }

  .my-day-review-canvas {
    grid-column: 1;
    grid-row: 3;
  }

  .my-day-review-overlay .my-day-comments.is-overlay {
    grid-column: 1;
    grid-row: 4;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
    grid-template-rows: auto minmax(110px, 1fr);
    gap: 8px 12px;
    min-height: 280px;
  }

  .my-day-review-overlay .my-day-comments.is-overlay > header {
    grid-column: 1 / -1;
  }

  .my-day-review-overlay .my-day-comments.is-overlay .my-day-comment-form {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
  }

  .my-day-review-overlay .my-day-comments.is-overlay .my-day-comment-list {
    grid-column: 1;
    grid-row: 2;
  }
}

@media (max-width: 640px) {
  .studio-shell.my-day-shell,
  .studio-shell.my-day-review-shell {
    grid-template-rows: minmax(52px, max-content) 58px minmax(0, 1fr);
  }

  .my-day-shell .topbar,
  .my-day-review-shell .topbar {
    gap: 6px;
    padding: 0 8px;
  }

  .my-day-shell .topbar .brand-menu-button,
  .my-day-review-shell .topbar .brand-menu-button {
    min-width: 44px;
    width: 44px;
    overflow: hidden;
    justify-content: flex-start;
    padding: 0 8px;
  }

  .my-day-shell .topbar .brand-logo-wordmark,
  .my-day-review-shell .topbar .brand-logo-wordmark {
    flex: 0 0 106px;
  }

  .my-day-shell .topbar :is(.divider, .level-pill, .top-actions > .ghost-btn, .top-actions > .primary-btn),
  .my-day-review-shell .topbar :is(.divider, .level-pill, .top-actions > .ghost-btn, .top-actions > .primary-btn) {
    display: none;
  }

  .my-day-shell .top-actions,
  .my-day-review-shell .top-actions {
    gap: 5px;
  }

  .my-day-shell .theme-toggle,
  .my-day-review-shell .theme-toggle {
    width: 44px;
    min-width: 44px;
    height: 44px;
    justify-content: center;
    padding: 0;
  }

  .my-day-shell .theme-toggle-label,
  .my-day-review-shell .theme-toggle-label,
  .my-day-shell .topbar-profile-button > span:not(.topbar-profile-avatar):not(.topbar-profile-chevron),
  .my-day-review-shell .topbar-profile-button > span:not(.topbar-profile-avatar):not(.topbar-profile-chevron) {
    display: none;
  }

  .my-day-shell .topbar-profile-button,
  .my-day-review-shell .topbar-profile-button {
    min-width: 48px;
    padding: 0 6px;
  }

  .my-day-shell .modebar,
  .my-day-review-shell .modebar {
    min-width: 0;
    gap: 6px;
    padding: 6px 8px;
  }

  .my-day-shell .mode-tabs,
  .my-day-review-shell .mode-tabs {
    width: 100%;
    min-width: 0;
    gap: 6px;
  }

  .my-day-shell .product-library-tab,
  .my-day-review-shell .product-library-tab {
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    height: 44px;
    overflow: hidden;
    padding: 0;
    font-size: 0;
  }

  .my-day-shell .product-library-tab svg,
  .my-day-review-shell .product-library-tab svg {
    width: 19px;
    height: 19px;
  }

  .my-day-shell .project-workspace-switcher,
  .my-day-review-shell .project-workspace-switcher {
    flex: 1 1 auto;
    min-width: 0;
  }

  .my-day-shell .project-workspace-switcher .system-label,
  .my-day-review-shell .project-workspace-switcher .system-label {
    display: none;
  }

  .my-day-shell .project-workspace-switcher select,
  .my-day-review-shell .project-workspace-switcher select {
    width: 100%;
    min-width: 0;
    height: 44px;
    border-left: 0;
  }

  .my-day-workspace {
    padding: 8px;
  }

  .my-day-topbar {
    gap: 16px;
    min-height: 0;
    padding: 17px;
    border-radius: 17px;
  }

  .my-day-topbar h1 {
    font-size: 2rem;
  }

  .my-day-topbar-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .my-day-topbar-controls > label,
  .my-day-topbar-controls select,
  .my-day-engineer-chip {
    width: 100%;
    max-width: none;
  }

  .my-day-date-control {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: end;
  }

  .my-day-date-control label {
    grid-column: 2;
    grid-row: 1;
  }

  .my-day-date-control label input {
    width: 100%;
  }

  .my-day-date-control > button:first-child {
    grid-column: 1;
    grid-row: 1;
  }

  .my-day-date-control > button:nth-of-type(2) {
    grid-column: 3;
    grid-row: 1;
  }

  .my-day-date-control > button:last-child:not(:nth-of-type(2)) {
    grid-column: 1 / -1;
  }

  .my-day-content {
    gap: 10px;
    padding-top: 10px;
  }

  .my-day-site-card,
  .my-day-task-detail {
    padding: 9px;
    border-radius: 15px;
  }

  .my-day-site-card > header,
  .my-day-detail-section > header,
  .my-day-design > header,
  .my-day-comments > header {
    align-items: flex-start;
  }

  .my-day-site-card > header {
    flex-wrap: wrap;
  }

  .my-day-site-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .my-day-site-grid > div {
    min-height: 44px;
  }

  .my-day-onboarding-actions {
    flex-direction: column;
  }

  .my-day-onboarding-actions button {
    flex-basis: auto;
    width: 100%;
  }

  .my-day-no-work {
    min-height: 150px;
    padding: 16px;
  }

  .my-day-site-risks > div,
  .my-day-product-documents {
    grid-template-columns: minmax(0, 1fr);
  }

  .my-day-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .my-day-summary > div {
    min-height: 72px;
    padding: 11px;
  }

  .my-day-task-rail ol {
    grid-auto-columns: minmax(250px, 84vw);
  }

  .my-day-task-detail-head {
    align-items: stretch;
    flex-direction: column;
  }

  .my-day-task-detail-head > div:last-child {
    grid-template-columns: auto auto;
    align-items: center;
    justify-content: space-between;
    justify-items: start;
  }

  .my-day-task-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .my-day-detail-section,
  .my-day-design {
    padding: 12px;
  }

  .my-day-drawing-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .my-day-drawing-toolbar label {
    flex-basis: auto;
  }

  .my-day-drawing-toolbar select,
  .my-day-drawing-toolbar > button,
  .my-day-product-action,
  .my-day-commissioning > header button {
    width: 100%;
  }

  .my-day-floor-preview,
  .my-day-schematic-preview {
    min-height: 240px;
    padding: 6px;
  }

  .my-day-floor-preview .shared-project-floor-canvas,
  .my-day-floor-preview .shared-project-floor-empty,
  .my-day-schematic-preview .drawing-export-svg,
  .my-day-preview-empty {
    min-height: 240px;
  }

  .my-day-floor-preview .shared-project-floor-canvas > svg {
    height: clamp(240px, 92vw, 440px);
  }

  .my-day-floor-preview .shared-project-floor-scene-footer {
    flex-direction: column;
  }

  .my-day-model-preview {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 11px;
    padding: 16px;
  }

  .my-day-model-preview > svg {
    width: 48px;
    height: 48px;
    padding: 11px;
    border-radius: 14px;
  }

  .my-day-model-preview > button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .my-day-comment > header {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .my-day-comment-form > div {
    align-items: stretch;
    flex-direction: column;
  }

  .my-day-comment-form button {
    width: 100%;
  }

  .my-day-material-list > article {
    grid-template-columns: minmax(0, 1fr);
  }

  .my-day-material-list em {
    max-width: 100%;
    justify-self: start;
    text-align: left;
  }

  .my-day-product-record > header {
    flex-direction: column;
  }

  .my-day-product-record > header mark {
    align-self: flex-start;
  }

  .my-day-commissioning > header {
    align-items: stretch;
    flex-direction: column;
  }

  .my-day-commissioning-list article {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .my-day-commissioning-list article mark {
    grid-column: 2;
    justify-self: start;
  }

  .workspace.my-day-design-review-shell {
    padding: 0;
  }

  .my-day-review-backdrop {
    padding: 0;
  }

  .my-day-review-overlay {
    inset: auto;
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    display: block;
    overflow: auto;
    padding: 10px;
    border-radius: 0;
  }

  .my-day-review-overlay > header {
    position: sticky;
    z-index: 2;
    top: -10px;
    align-items: stretch;
    flex-direction: column;
    margin-bottom: 9px;
    padding: 10px 2px;
    background: var(--my-day-card);
  }

  .my-day-review-overlay > header button {
    width: 100%;
  }

  .my-day-review-notice {
    margin-bottom: 9px;
  }

  .my-day-review-canvas {
    min-height: 280px;
    margin-bottom: 9px;
    padding: 6px;
  }

  .my-day-review-canvas .shared-project-floor-canvas,
  .my-day-review-canvas .shared-project-floor-canvas > svg,
  .my-day-review-canvas .shared-project-floor-empty,
  .my-day-review-canvas.is-schematic .drawing-export-svg {
    min-height: 270px;
  }

  .my-day-review-canvas .shared-project-floor-scene-footer {
    flex-direction: column;
  }

  .my-day-model-provenance {
    grid-template-columns: minmax(0, 1fr);
  }

  .my-day-model-isometric {
    min-height: 270px;
    padding: 6px;
  }

  .my-day-review-canvas .my-day-model-isometric .shared-project-floor-canvas {
    width: 88%;
    transform: rotateX(54deg) rotateZ(-31deg) scale(0.74) translateZ(0);
  }

  .my-day-model-provenance strong {
    grid-row: auto;
  }

  .my-day-review-overlay .my-day-comments.is-overlay {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(74px, auto) auto;
    min-height: 0;
  }

  .my-day-review-overlay .my-day-comments.is-overlay > header {
    grid-column: auto;
  }

  .my-day-review-overlay .my-day-comments.is-overlay .my-day-comment-list,
  .my-day-review-overlay .my-day-comments.is-overlay .my-day-comment-form {
    grid-column: auto;
    grid-row: auto;
  }

  .my-day-review-overlay .my-day-comment-list {
    max-height: 260px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .my-day-workspace *,
  .my-day-review-overlay * {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .my-day-model-isometric .shared-project-floor-canvas {
    animation: none !important;
    transition: none !important;
  }
}

/* Shared field comments in the normal Design workspaces -------------------
   This dock is intentionally independent from the My Day page and sits above
   Floor, Schematic and 3D without changing their grid or canvas dimensions. */
html[data-workspace="floor"],
html[data-workspace="schematic"],
html[data-workspace="plant-room-planner"],
html[data-workspace="three"] {
  --design-floating-toolbar-clearance: 68px;
  --design-floating-tool-size: 44px;
  --design-field-comments-launcher-height: 44px;
  --design-floating-surface-gap: 16px;
}

html[data-workspace="floor"] #workspaceAssistantRoot,
html[data-workspace="schematic"] #workspaceAssistantRoot,
html[data-workspace="plant-room-planner"] #workspaceAssistantRoot,
html[data-workspace="three"] #workspaceAssistantRoot {
  --workspace-assistant-bottom-offset: calc(
    var(--design-floating-toolbar-clearance)
    + var(--design-field-comments-launcher-height)
    + var(--design-floating-surface-gap)
    + env(safe-area-inset-bottom, 0px)
  );
  --workspace-assistant-panel-bottom-offset: calc(
    var(--design-floating-toolbar-clearance)
    + env(safe-area-inset-bottom, 0px)
  );
}

html[data-workspace="floor"] .workspace-assistant-launcher,
html[data-workspace="schematic"] .workspace-assistant-launcher,
html[data-workspace="plant-room-planner"] .workspace-assistant-launcher,
html[data-workspace="three"] .workspace-assistant-launcher {
  width: var(--design-floating-tool-size);
  height: var(--design-floating-tool-size);
  min-height: var(--design-floating-tool-size);
}

html.workspace-assistant-docked[data-workspace="floor"] .workspace-assistant-panel,
html.workspace-assistant-docked[data-workspace="schematic"] .workspace-assistant-panel,
html.workspace-assistant-docked[data-workspace="plant-room-planner"] .workspace-assistant-panel,
html.workspace-assistant-docked[data-workspace="three"] .workspace-assistant-panel {
  bottom: calc(var(--design-floating-toolbar-clearance) + env(safe-area-inset-bottom, 0px));
}

.my-day-designer-comments {
  --my-day-card: rgba(255, 255, 255, 0.96);
  --my-day-card-solid: #ffffff;
  --my-day-card-subtle: #f5f8fc;
  --my-day-control: #ffffff;
  --my-day-line: #d9e4f0;
  --my-day-line-strong: #bdcde0;
  --my-day-ink: #172033;
  --my-day-muted: #607087;
  --my-day-blue: #0969da;
  --my-day-blue-strong: #0759b5;
  --my-day-blue-soft: #eaf4ff;
  --my-day-blue-border: rgba(9, 105, 218, 0.38);
  --my-day-success: #147d3f;
  --my-day-success-soft: #eaf8ef;
  --my-day-warning: #9a5b06;
  --my-day-warning-soft: #fff7df;
  --my-day-danger: #b42318;
  --my-day-shadow-soft: 0 12px 30px rgba(28, 55, 90, 0.13);
  position: fixed;
  z-index: 44;
  right: max(12px, env(safe-area-inset-right));
  bottom: calc(var(--design-floating-toolbar-clearance) + env(safe-area-inset-bottom, 0px));
  width: var(--design-floating-tool-size);
  max-width: var(--design-floating-tool-size);
  display: grid;
  justify-items: end;
  gap: 8px;
  color: var(--my-day-ink);
  isolation: isolate;
  pointer-events: none;
}

.my-day-designer-comments.is-open {
  width: min(420px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
}

html.workspace-assistant-docked:not(:has(.my-day-designer-comments.is-open)) .my-day-designer-comments {
  visibility: hidden;
  pointer-events: none;
}

html:has(.my-day-designer-comments.is-open) #workspaceAssistantRoot {
  visibility: hidden;
  pointer-events: none;
}

.my-day-designer-comments *,
.my-day-designer-comments *::before,
.my-day-designer-comments *::after {
  box-sizing: border-box;
  min-width: 0;
}

.my-day-designer-comments-toggle {
  position: relative;
  pointer-events: auto;
  width: var(--design-floating-tool-size);
  min-width: var(--design-floating-tool-size);
  height: var(--design-floating-tool-size);
  min-height: var(--design-floating-tool-size);
  max-width: var(--design-floating-tool-size);
  display: inline-grid;
  place-items: center;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(7, 89, 181, 0.82);
  border-radius: 13px;
  color: #ffffff;
  background: linear-gradient(145deg, #1688f7, #0969da);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 880;
  line-height: 1.2;
  box-shadow: 0 12px 28px rgba(9, 105, 218, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.24);
  cursor: pointer;
  overflow: visible;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.my-day-designer-comments-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: #ffffff;
}

.my-day-designer-comments-icon svg {
  width: 21px;
  height: 21px;
  stroke-width: 2;
}

.my-day-designer-comments-notification {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  top: -6px;
  right: -6px;
  min-width: 19px;
  height: 19px;
  display: inline-grid;
  place-items: center;
  padding: 0 4px;
  border: 2px solid var(--my-day-card-solid);
  border-radius: 999px;
  color: #ffffff;
  background: #d92d20;
  box-shadow: 0 3px 8px rgba(58, 15, 10, 0.34);
  font-size: 0.55rem;
  font-weight: 950;
  line-height: 1;
}

.my-day-designer-comments-recording {
  position: absolute;
  pointer-events: none;
  right: -7px;
  bottom: -7px;
  min-width: 28px;
  height: 17px;
  display: inline-grid;
  place-items: center;
  padding: 0 4px;
  border: 2px solid var(--my-day-card-solid);
  border-radius: 999px;
  color: #ffffff;
  background: #d92d20;
  box-shadow: 0 3px 8px rgba(58, 15, 10, 0.34);
  font-size: 0.46rem;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0.04em;
}

.my-day-designer-comments[data-recording="true"] .my-day-designer-comments-toggle {
  box-shadow: 0 0 0 4px rgba(217, 45, 32, 0.16), 0 12px 28px rgba(9, 105, 218, 0.28);
}

.my-day-designer-comments.is-open .my-day-designer-comments-toggle {
  display: none;
}

.my-day-designer-comments-toggle:hover {
  border-color: #064b99;
  background: linear-gradient(145deg, #3399ff, #075dbc);
  box-shadow: 0 15px 34px rgba(9, 105, 218, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.my-day-designer-comments-toggle:active {
  transform: translateY(1px);
}

.my-day-designer-comments-toggle:focus-visible,
.my-day-designer-comments-panel :is(button, textarea, input, select, a):focus-visible {
  border-color: var(--my-day-blue);
  outline: 3px solid rgba(9, 105, 218, 0.3);
  outline-offset: 2px;
}

.my-day-designer-comments-panel {
  pointer-events: auto;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: min(74dvh, 600px);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, auto);
  padding: 9px;
  border: 1px solid var(--my-day-line-strong);
  border-radius: 17px;
  color: var(--my-day-ink);
  background: var(--my-day-card);
  box-shadow: 0 24px 68px rgba(28, 29, 33, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(22px) saturate(125%);
  -webkit-backdrop-filter: blur(22px) saturate(125%);
  contain: layout paint;
  overscroll-behavior: contain;
}

.my-day-designer-comments-panel[hidden],
.my-day-designer-comments-panel[aria-hidden="true"],
.my-day-designer-comments-toggle[aria-expanded="false"] + .my-day-designer-comments-panel {
  display: none !important;
}

.my-day-designer-comments-panel:focus-within {
  border-color: var(--my-day-blue-border);
  box-shadow: 0 24px 68px rgba(28, 29, 33, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.my-day-designer-comments-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  padding: 1px 1px 8px;
  border-bottom: 1px solid var(--my-day-line);
}

.my-day-designer-comments-panel > header > div {
  flex: 1 1 auto;
  display: grid;
  gap: 2px;
  min-width: 0;
}

.my-day-designer-comments-panel > header :is(span, small) {
  color: var(--my-day-muted);
  font-size: 0.61rem;
  font-weight: 780;
  line-height: 1.25;
}

.my-day-designer-comments-panel > header strong {
  overflow: hidden;
  color: var(--my-day-ink);
  font-size: 0.8rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-day-designer-comments-panel > header button,
.my-day-designer-comments-panel :is(button, textarea, input, select) {
  min-height: 44px;
  border: 1px solid var(--my-day-line-strong);
  border-radius: 10px;
  color: var(--my-day-ink);
  background: var(--my-day-control);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 820;
}

.my-day-designer-comments-panel > header button {
  flex: 0 0 44px;
  width: 44px;
  display: grid;
  place-items: center;
  padding: 0;
}

.my-day-designer-comments-panel > header .my-day-designer-comments-close {
  flex: 0 1 auto;
  width: auto;
  min-width: 44px;
  max-width: min(50%, 12rem);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.my-day-designer-comments-panel > header .my-day-designer-comments-close > span {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font: inherit;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-day-designer-comments-close > svg {
  flex: 0 0 16px;
}

.my-day-designer-comments-panel > header button svg {
  width: 16px;
  height: 16px;
}

.my-day-designer-comments-panel > header button:hover,
.my-day-designer-comments-panel :is(button, input, select):not(:disabled):hover {
  border-color: var(--my-day-blue-border);
  background: var(--my-day-blue-soft);
}

.my-day-designer-comments-panel > .my-day-comments,
.my-day-designer-comments-panel .my-day-comments {
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: minmax(72px, auto) auto;
  gap: 9px;
  padding: 1px;
}

.my-day-designer-comments-panel > header + .my-day-comments {
  padding-top: 7px;
}

.my-day-designer-comments-panel .my-day-comments > header {
  flex: 0 0 auto;
}

.my-day-designer-comments-panel .my-day-comment-list {
  min-height: 0;
  max-height: min(36dvh, 300px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 3px 3px 0;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

.my-day-designer-comments-panel .my-day-comment-form {
  flex: 0 0 auto;
  gap: 6px;
  padding: 8px;
}

.my-day-designer-comments-panel .my-day-comment-form textarea {
  min-height: 60px;
  max-height: 80px;
  resize: none;
}

.my-day-designer-comments-panel .my-day-comment {
  gap: 7px;
  padding: 8px;
  border-color: var(--my-day-line);
  background: var(--my-day-card-subtle);
}

.my-day-designer-comments-panel .my-day-comment-meta {
  min-height: 20px;
}

.my-day-designer-comments-panel .my-day-comment-target {
  background: var(--my-day-card-solid);
}

.my-day-designer-comments-panel .my-day-comment-locate {
  min-width: 82px;
  min-height: 40px;
  border-color: var(--my-day-blue-border);
  color: var(--my-day-blue-strong);
  background: var(--my-day-blue-soft);
  font-size: 0.64rem;
}

.my-day-designer-comments-panel .my-day-comment-locate:hover {
  border-color: var(--my-day-blue);
  color: var(--my-day-blue-strong);
  background: color-mix(in srgb, var(--my-day-blue-soft) 72%, var(--my-day-card-solid));
}

.my-day-designer-comments-panel .my-day-comment-form .my-day-comment-anchor-control {
  min-height: 40px;
  padding: 5px 7px;
}

.my-day-designer-comments-panel .my-day-comment-anchor-control > input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
}

.my-day-designer-comments-panel .my-day-comment-form .my-day-comment-anchor-control > span {
  color: var(--my-day-ink);
}

.my-day-designer-comments-panel .my-day-comment-actions button {
  min-width: 76px;
  min-height: 44px;
}

.my-day-designer-comments-panel :is(p, strong, small, span, em, time) {
  overflow-wrap: anywhere;
}

html[data-theme="dark"] .my-day-designer-comments {
  --my-day-card: rgba(22, 27, 36, 0.97);
  --my-day-card-solid: #171c25;
  --my-day-card-subtle: #11161e;
  --my-day-control: #171c25;
  --my-day-line: rgba(203, 213, 225, 0.16);
  --my-day-line-strong: rgba(203, 213, 225, 0.28);
  --my-day-ink: #f1f5f9;
  --my-day-muted: #9facbd;
  --my-day-blue: #60a5fa;
  --my-day-blue-strong: #93c5fd;
  --my-day-blue-soft: rgba(37, 99, 235, 0.18);
  --my-day-blue-border: rgba(96, 165, 250, 0.48);
  --my-day-success: #6ee7a0;
  --my-day-success-soft: rgba(20, 125, 63, 0.2);
  --my-day-warning: #facc75;
  --my-day-warning-soft: rgba(180, 83, 9, 0.18);
  --my-day-danger: #fda4af;
  --my-day-shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .my-day-designer-comments-toggle {
  border-color: rgba(96, 165, 250, 0.64);
  background: linear-gradient(145deg, #167be3, #075bb3);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

html[data-theme="dark"] .my-day-designer-comments-toggle:hover {
  border-color: #93c5fd;
  background: linear-gradient(145deg, #258bf2, #0969c9);
}

html[data-theme="dark"] .my-day-designer-comments-panel {
  border-color: rgba(203, 213, 225, 0.24);
  box-shadow: 0 28px 78px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  color-scheme: dark;
}

html[data-theme="dark"] .my-day-designer-comments-panel:focus-within {
  box-shadow: 0 28px 78px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

@media (max-width: 900px) {
  .my-day-designer-comments {
    right: max(10px, env(safe-area-inset-right));
  }

  .my-day-designer-comments.is-open {
    width: min(420px, calc(100vw - 20px));
    max-width: calc(100vw - 20px);
  }

  .my-day-designer-comments-panel {
    height: auto;
    max-height: min(70dvh, 620px);
  }
}

@media (max-width: 820px) {
  html[data-workspace="floor"],
  html[data-workspace="schematic"],
  html[data-workspace="plant-room-planner"],
  html[data-workspace="three"] {
    --design-floating-toolbar-clearance: 172px;
  }

  .my-day-designer-comments {
    bottom: calc(var(--design-floating-toolbar-clearance) + env(safe-area-inset-bottom, 0px));
  }

  .my-day-designer-comments.is-open {
    z-index: 94;
    bottom: 0;
  }
}

@media (max-width: 640px) {
  .my-day-designer-comments {
    right: max(10px, env(safe-area-inset-right));
    left: auto;
    width: var(--design-floating-tool-size);
    max-width: var(--design-floating-tool-size);
    gap: 6px;
  }

  .my-day-designer-comments.is-open {
    right: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
  }

  .my-day-designer-comments-panel {
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: calc(100dvh - 112px);
    padding: 10px 10px max(10px, env(safe-area-inset-bottom));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 20px 20px 0 0;
    overflow-y: auto;
    contain: layout paint;
  }

  .my-day-designer-comments-panel > header {
    position: sticky;
    z-index: 2;
    top: 0;
    background: var(--my-day-card);
  }

  .my-day-designer-comments-panel .my-day-comments {
    grid-template-rows: minmax(70px, auto) auto;
  }

  .my-day-designer-comments-panel .my-day-comment-form > div {
    align-items: stretch;
    flex-direction: column;
  }

  .my-day-designer-comments-panel .my-day-comment-form button {
    width: 100%;
  }

  .my-day-designer-comments-panel .my-day-comment-submit-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-left: 0;
  }

  .my-day-comment-response-form,
  .my-day-comment-form > .my-day-change-recorder {
    grid-template-columns: minmax(0, 1fr);
  }

  .my-day-comment-response-form button,
  .my-day-change-recorder > button {
    width: 100%;
  }
}

@media (max-width: 820px) and (max-height: 480px) {
  .my-day-designer-comments-panel .my-day-comments {
    overflow-y: auto;
    grid-template-rows: auto auto;
  }

  .my-day-designer-comments-panel .my-day-comment-list {
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 360px) {
  .my-day-designer-comments-panel > header .my-day-designer-comments-close {
    flex-basis: 44px;
    width: 44px;
    padding: 0;
  }

  .my-day-designer-comments-close > span {
    display: none;
  }
}

@media (prefers-contrast: more) {
  .my-day-designer-comments-panel {
    border-width: 2px;
    border-color: var(--my-day-line-strong);
  }

  .my-day-designer-comments-toggle:focus-visible,
  .my-day-designer-comments-panel :is(button, textarea, input, select, a):focus-visible {
    outline-width: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .my-day-designer-comments,
  .my-day-designer-comments * {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Recorded proposed changes are rendered inside the active 2D SVG. The
   renderer applies the inverse workspace zoom so this compact callout remains
   legible without growing over the drawing. */
.my-day-field-change-overlay {
  pointer-events: none;
  font-family: inherit;
}

.my-day-field-change-callout {
  pointer-events: auto;
  cursor: pointer;
  outline: none;
}

.my-day-field-change-halo {
  fill: rgba(9, 105, 218, 0.14);
  stroke: rgba(9, 105, 218, 0.38);
  stroke-width: 2;
}

.my-day-field-change-pin {
  fill: #0969da;
  stroke: #ffffff;
  stroke-width: 2;
}

.my-day-field-change-pin-text {
  fill: #ffffff;
  font-size: 8px;
  font-weight: 950;
  dominant-baseline: central;
  text-anchor: middle;
}

.my-day-field-change-leader {
  fill: none;
  stroke: #0969da;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.my-day-field-change-card rect {
  fill: rgba(255, 255, 255, 0.97);
  stroke: #0969da;
  stroke-width: 1.5;
  filter: drop-shadow(0 6px 10px rgba(24, 47, 79, 0.2));
}

.my-day-field-change-kicker {
  fill: #0969da;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.06em;
}

.my-day-field-change-action {
  fill: #172033;
  font-size: 11px;
  font-weight: 900;
}

.my-day-field-change-message {
  fill: #607087;
  font-size: 9px;
  font-weight: 720;
}

.my-day-field-change-callout.is-accepted :is(.my-day-field-change-halo, .my-day-field-change-card rect) {
  stroke: #147d3f;
}

.my-day-field-change-callout.is-accepted .my-day-field-change-pin {
  fill: #147d3f;
}

.my-day-field-change-callout.is-accepted .my-day-field-change-leader {
  stroke: #147d3f;
}

.my-day-field-change-callout.is-accepted .my-day-field-change-kicker {
  fill: #147d3f;
}

.my-day-field-change-callout:hover .my-day-field-change-card rect,
.my-day-field-change-callout:focus-visible .my-day-field-change-card rect {
  stroke-width: 3;
}

html[data-theme="dark"] .my-day-field-change-halo {
  fill: rgba(96, 165, 250, 0.16);
  stroke: rgba(96, 165, 250, 0.62);
}

html[data-theme="dark"] .my-day-field-change-pin {
  fill: #3b82f6;
  stroke: #10151d;
}

html[data-theme="dark"] .my-day-field-change-leader,
html[data-theme="dark"] .my-day-field-change-card rect {
  stroke: #60a5fa;
}

html[data-theme="dark"] .my-day-field-change-card rect {
  fill: rgba(23, 28, 37, 0.97);
  filter: drop-shadow(0 7px 12px rgba(0, 0, 0, 0.42));
}

html[data-theme="dark"] .my-day-field-change-kicker {
  fill: #93c5fd;
}

html[data-theme="dark"] .my-day-field-change-action {
  fill: #f1f5f9;
}

html[data-theme="dark"] .my-day-field-change-message {
  fill: #a9b5c5;
}

/* Unified dark theme: Quick Tools and Workspace Tools --------------------
   The dashboard destinations used to mix the newer charcoal shell with
   legacy blue-slate cards and light editor chrome. Keep every passive level
   on one neutral scale while leaving selected, status and primary-action
   colours to their component rules. */
html[data-theme="dark"] :is(
  .dashboard-analytics-workspace,
  .dashboard-advertising-workspace,
  .dashboard-distributor-workspace,
  .dashboard-product-library-workspace,
  .contractor-workspace,
  .dashboard-site-survey-workspace,
  .dashboard-quick-tender-workspace,
  .dashboard-engineering-workspace,
  .dashboard-dhw-workspace,
  .dashboard-unit-workspace,
  .hydraulic-overlay
) {
  --tool-dark-page: #0a0b0d;
  --tool-dark-card: rgba(24, 25, 28, 0.96);
  --tool-dark-inset: rgba(31, 32, 36, 0.90);
  --tool-dark-control: rgba(18, 19, 22, 0.94);
  --tool-dark-toolbar: rgba(42, 43, 48, 0.94);
  --tool-dark-line: rgba(234, 234, 236, 0.18);
  --tool-dark-line-strong: rgba(234, 234, 236, 0.28);
  --tool-dark-text: #f3f4f6;
  --tool-dark-muted: #b8c1ce;
  color: var(--tool-dark-text);
}

html[data-theme="dark"] :is(
  .dashboard-analytics-workspace,
  .dashboard-advertising-workspace,
  .dashboard-distributor-workspace,
  .dashboard-product-library-workspace,
  .contractor-workspace,
  .dashboard-site-survey-workspace,
  .dashboard-quick-tender-workspace,
  .dashboard-engineering-workspace,
  .dashboard-dhw-workspace,
  .dashboard-unit-workspace
) {
  min-width: 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(92, 106, 128, 0.10), transparent 30rem),
    var(--tool-dark-page);
}

html[data-theme="dark"] .hydraulic-overlay {
  background: rgba(3, 4, 5, 0.84);
}

html[data-theme="dark"] :is(
  .hydraulic-header.dashboard-quick-tool-header,
  .dashboard-product-library-header,
  .dashboard-analytics-header,
  .dashboard-engineering-nav,
  .dashboard-engineering-panel,
  .dashboard-dhw-panel,
  .dashboard-dhw-hero-result,
  .dashboard-unit-section,
  .dashboard-unit-slider,
  .quick-tender-side,
  .quick-tender-main,
  .quick-tender-summary,
  .quick-tender-product-picker,
  .quick-tender-sponsored-panel,
  .dashboard-analytics-sidebar,
  .dashboard-analytics-main,
  .dashboard-analytics-panel,
  .dashboard-analytics-summary,
  .dashboard-analytics-chart-panel,
  .dashboard-advertising-panel,
  .dashboard-distributor-panel,
  .dashboard-distributor-quote-detail,
  .dashboard-distributor-tabs,
  .dashboard-distributor-quote-toolbar,
  .contractor-workspace-header,
  .contractor-workspace-tabs,
  .contractor-overview-panel,
  .contractor-master-detail > aside,
  .contractor-network-layout > aside,
  .contractor-tender-detail,
  .contractor-network-detail,
  .contractor-company-profile,
  .contractor-messages-workspace,
  .contractor-composer,
  .site-survey-card,
  .site-survey-project-card,
  .dashboard-product-management-hero,
  .dashboard-product-admin-panel,
  .dashboard-product-editor-section,
  .dashboard-product-tool-assets,
  .dashboard-product-existing-media,
  .dashboard-product-range-section,
  .dashboard-product-mail,
  .dashboard-product-mail-section,
  .dashboard-product-model-selector,
  .dashboard-product-insight-card
) {
  border-color: var(--tool-dark-line);
  background: var(--tool-dark-card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

html[data-theme="dark"] :is(
  .dashboard-empty-state,
  .dashboard-analytics-project-row,
  .dashboard-analytics-list button:not(.active):not(.selected),
  .dashboard-analytics-reset,
  .dashboard-analytics-card:not(.active):not(.selected),
  .dashboard-analytics-metric,
  .dashboard-analytics-scale,
  .dashboard-analytics-compare-title,
  .dashboard-analytics-compare-row,
  .dashboard-analytics-data-row,
  .dashboard-analytics-project-value-grid article,
  .dashboard-analytics-company-identity-card,
  .dashboard-analytics-user-identity-card,
  .dashboard-analytics-profile-card,
  .dashboard-analytics-project-action-form,
  .dashboard-analytics-project-products,
  .dashboard-analytics-project-activity,
  .dashboard-analytics-project-activity article,
  .dashboard-analytics-project-product-list article,
  .dashboard-analytics-project-accessory-list span,
  .dashboard-advertising-table,
  .dashboard-advertising-table-row,
  .dashboard-advertising-upload-card,
  .dashboard-advertising-link-field,
  .dashboard-advertising-file-row,
  .dashboard-news-rich-editor,
  .dashboard-news-graph-editor,
  .dashboard-news-admin-row,
  .dashboard-news-media-dropzone:not(.has-file),
  .dashboard-news-body-media-chip,
  .dashboard-news-body-media-empty,
  .dashboard-news-inline-image,
  .dashboard-news-popout-graph article div,
  .dashboard-news-graph-line span,
  .dashboard-news-graph-donut span,
  .dashboard-news-embedded-images figure,
  .dashboard-distributor-metric-card,
  .dashboard-distributor-overview-table,
  .dashboard-distributor-table,
  .dashboard-distributor-line-table,
  .dashboard-distributor-quote-documents,
  .dashboard-distributor-file-list article,
  .dashboard-distributor-discount-list > article,
  .dashboard-distributor-team-list article,
  .dashboard-distributor-check:not(:has(input:checked)),
  .dashboard-distributor-profile-preview,
  .dashboard-distributor-installation-options,
  .dashboard-distributor-installation-options label:not(:has(input:checked)),
  .dashboard-distributor-branch-list article,
  .quick-tender-table-wrap,
  .quick-tender-upload-zone,
  .quick-tender-file-chip,
  .quick-tender-product-pill,
  .quick-tender-summary-head,
  .quick-tender-summary-grid article,
  .quick-tender-sponsored-list article,
  .quick-tender-no-match,
  .dashboard-engineering-metric,
  .dashboard-engineering-table-wrap,
  .dashboard-engineering-notes,
  .dashboard-engineering-assumption-strip span,
  .dashboard-dhw-outlet-row,
  .dashboard-dhw-metric,
  .dashboard-dhw-toggle:not(.active),
  .dashboard-dhw-service-card,
  .dashboard-dhw-service-panel,
  .dashboard-dhw-service-value,
  .dashboard-dhw-load-summary,
  .dashboard-dhw-storage-result,
  .dashboard-dhw-recommendation-card,
  .dashboard-dhw-product-match,
  .dashboard-unit-card,
  .dashboard-unit-result,
  .site-survey-progress,
  .site-survey-dropzone,
  .site-survey-file-card,
  .site-survey-empty,
  .site-survey-register-row,
  .site-survey-handover-grid dl div,
  .contractor-message-list > article,
  .contractor-choice-card:not(:has(input:checked)),
  .contractor-switch:not(:has(input:checked)),
  .contractor-scope-options > label:not(:has(input:checked)),
  .contractor-privacy-grid > label:not(:has(input:checked)),
  .contractor-line-picker,
  .contractor-engagement-options > label:not(:has(input:checked)),
  .contractor-engagement-inherited,
  .contractor-engagement-notice,
  .contractor-design-review-callout,
  .contractor-design-area-picker,
  .contractor-credential-group,
  .contractor-contractor-search-controls,
  .contractor-choice-meta > :is(span, small, strong),
  .contractor-quote-workflow,
  .hydraulic-fitting-row,
  .hydraulic-index-summary div,
  .hydraulic-check:not(:has(input:checked)),
  .gas-product-picker,
  .gas-product-picker-card:not(.selected),
  .hydraulic-schedule-reference,
  .hydraulic-fitting-collapsed,
  .hydraulic-fitting-detail-row td,
  .dashboard-product-model-editor,
  .dashboard-product-accessory-row,
  .dashboard-product-tool-asset-card,
  .dashboard-product-existing-media-card,
  .dashboard-product-tool-default-preview,
  .dashboard-product-upload-zone,
  .dashboard-product-tool-transform-controls,
  .dashboard-product-upload-status,
  .dashboard-pipework-evidence,
  .dashboard-pipework-envelope,
  .dashboard-pipework-location-options,
  .dashboard-pipework-application-group,
  .dashboard-product-mail-reader,
  .dashboard-product-mail-list-pane,
  .dashboard-product-mail-sidebar,
  .dashboard-product-mail-icon,
  .dashboard-product-mail-search,
  .dashboard-product-mail-avatar,
  .dashboard-product-mail-sales-description,
  .dashboard-product-model-search,
  .dashboard-product-model-notes > article,
  .dashboard-product-quick-stats > span,
  .dashboard-product-mail-copy-grid > article,
  .dashboard-product-range-copy-grid > article,
  .dashboard-product-mail-reader-summary span,
  .dashboard-product-model-selector-head span,
  .dashboard-product-mail-reader-head span:not([class]),
  .dashboard-product-model-detail > header span:not([class]),
  .dashboard-product-dimension-stage,
  .dashboard-product-model-select-card:not(.active):not(.selected)
) {
  border-color: var(--tool-dark-line);
  background: var(--tool-dark-inset);
  color: var(--tool-dark-text);
}

html[data-theme="dark"] :is(
  .dashboard-product-rich-toolbar,
  .dashboard-product-rich-composer,
  .dashboard-product-rich-surface,
  .dashboard-product-rich-meta
) {
  border-color: var(--tool-dark-line);
  background: var(--tool-dark-inset);
  color: var(--tool-dark-text);
}

html[data-theme="dark"] :is(
  .dashboard-advertising-table-head,
  .dashboard-distributor-overview-table-head,
  .dashboard-distributor-table-head,
  .dashboard-distributor-line-head,
  .quick-tender-table thead,
  .quick-tender-table th,
  .dashboard-engineering-table-wrap th,
  .hydraulic-table-wrap th,
  .dashboard-product-rich-toolbar
) {
  border-color: var(--tool-dark-line);
  background: var(--tool-dark-toolbar);
  color: var(--tool-dark-text);
}

html[data-theme="dark"] :is(
  .dashboard-analytics-workspace,
  .dashboard-advertising-workspace,
  .dashboard-distributor-workspace,
  .dashboard-product-library-workspace,
  .contractor-workspace,
  .dashboard-site-survey-workspace,
  .dashboard-quick-tender-workspace,
  .dashboard-engineering-workspace,
  .dashboard-dhw-workspace,
  .dashboard-unit-workspace,
  .hydraulic-overlay
) :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not([type="color"]) {
  border-color: var(--tool-dark-line-strong);
  background: var(--tool-dark-control);
  color: var(--tool-dark-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

html[data-theme="dark"] :is(
  .dashboard-analytics-workspace,
  .dashboard-advertising-workspace,
  .dashboard-distributor-workspace,
  .dashboard-product-library-workspace,
  .contractor-workspace,
  .dashboard-site-survey-workspace,
  .dashboard-quick-tender-workspace,
  .dashboard-engineering-workspace,
  .dashboard-dhw-workspace,
  .dashboard-unit-workspace,
  .hydraulic-overlay
) :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):is(:hover, :focus, :focus-visible) {
  border-color: rgba(147, 197, 253, 0.58);
  background: rgba(27, 28, 32, 0.98);
}

html[data-theme="dark"] :is(
  .dashboard-engineering-nav button:not(.active):not(:hover):not(:focus-visible),
  .dashboard-news-editor-toolbar button:not(.active):not(:hover):not(:focus-visible),
  .dashboard-product-rich-toolbar button:not(.active):not([aria-pressed="true"]):not(:hover):not(:focus-visible),
  .quick-tender-side-actions button:not(.active):not([aria-pressed="true"]):not(:hover):not(:focus-visible),
  .quick-tender-main-head button:not(.active):not([aria-pressed="true"]):not(:hover):not(:focus-visible),
  .quick-tender-summary button:not(.active):not([aria-pressed="true"]):not(:hover):not(:focus-visible),
  .pricing-portal-rate-menu-toggle:not(.active):not(:hover):not(:focus-visible),
  .dashboard-product-library-dashboard-btn:not(:hover):not(:focus-visible),
  .hydraulic-close:not(:hover):not(:focus-visible),
  .hydraulic-row-actions button:not(.active):not(:hover):not(:focus-visible)
) {
  border-color: var(--tool-dark-line);
  background: var(--tool-dark-inset);
  color: var(--tool-dark-text);
}

html[data-theme="dark"] .dashboard-engineering-nav button:not(.active):is(:hover, :focus-visible),
html[data-theme="dark"] .dashboard-product-rich-toolbar button:not(.active):is(:hover, :focus-visible),
html[data-theme="dark"] .dashboard-quick-tender-workspace button:not(.active):not([aria-pressed="true"]):is(:hover, :focus-visible),
html[data-theme="dark"] .dashboard-product-library-dashboard-btn:is(:hover, :focus-visible) {
  border-color: rgba(147, 197, 253, 0.52);
  background: rgba(46, 48, 54, 0.98);
  color: #ffffff;
}

html[data-theme="dark"] .contractor-workspace-notice {
  border-color: rgba(45, 212, 191, 0.38);
  background: rgba(17, 94, 89, 0.28);
  color: #99f6e4;
}

html[data-theme="dark"] .contractor-permission-note {
  border-color: rgba(251, 191, 36, 0.40);
  background: rgba(120, 53, 15, 0.28);
  color: #fde68a;
}

html[data-theme="dark"] .contractor-message-list > article.mine {
  border-color: rgba(96, 165, 250, 0.38);
  background: rgba(30, 64, 175, 0.22);
}

html[data-theme="dark"] .contractor-message-list article :is(strong, p) {
  color: var(--tool-dark-text);
}

html[data-theme="dark"] .contractor-message-list article small {
  color: var(--tool-dark-muted);
}

html[data-theme="dark"] :is(.site-survey-message, .site-survey-inline-status) {
  border-color: rgba(96, 165, 250, 0.40);
  background: rgba(30, 64, 175, 0.24);
  color: #bfdbfe !important;
}

html[data-theme="dark"] .site-survey-dropzone:is(:hover, :focus-within),
html[data-theme="dark"] .site-survey-card:is(:hover, :focus-within),
html[data-theme="dark"] .site-survey-project-card:is(:hover, :focus-within) {
  border-color: rgba(147, 197, 253, 0.46);
  background: rgba(39, 40, 44, 0.96);
}

html[data-theme="dark"] .dashboard-engineering-status.pass,
html[data-theme="dark"] .quick-tender-match-pass {
  color: #86efac;
}

html[data-theme="dark"] .dashboard-engineering-status.review,
html[data-theme="dark"] .quick-tender-match-review {
  color: #fcd34d;
}

html[data-theme="dark"] .dashboard-engineering-status.fail,
html[data-theme="dark"] .quick-tender-match-fail {
  color: #fca5a5;
}

html[data-theme="dark"] .dashboard-engineering-status.info {
  color: #bfdbfe;
}

html[data-theme="dark"] .dashboard-analytics-workspace :is(
  .dashboard-analytics-list button.active,
  .dashboard-analytics-scale button.active,
  .dashboard-analytics-card.active
) {
  border-color: rgba(96, 165, 250, 0.54);
  background: linear-gradient(145deg, rgba(30, 64, 175, 0.28), rgba(27, 28, 32, 0.96));
  color: var(--tool-dark-text);
}

html[data-theme="dark"] .dashboard-product-library-workspace :is(
  .danger,
  .danger-mini,
  [class*="danger"]
):not(:disabled) {
  border-color: rgba(248, 113, 113, 0.46);
  background: rgba(127, 29, 29, 0.34);
  color: #fecaca;
}

html[data-theme="dark"] .dashboard-product-library-workspace :is(
  .danger,
  .danger-mini,
  [class*="danger"]
):not(:disabled):is(:hover, :focus-visible) {
  border-color: #f87171;
  background: rgba(153, 27, 27, 0.62);
  color: #ffffff;
}

html[data-theme="dark"] :is(
  .contractor-tender-card.selected,
  .contractor-network-card.selected,
  .dashboard-product-model-select-card.active,
  .dashboard-product-model-select-card.selected
) {
  border-color: rgba(96, 165, 250, 0.54);
  background: linear-gradient(145deg, rgba(30, 64, 175, 0.28), rgba(27, 28, 32, 0.96));
}

html[data-theme="dark"] :is(
  .dashboard-analytics-workspace,
  .dashboard-advertising-workspace,
  .dashboard-distributor-workspace,
  .dashboard-product-library-workspace,
  .contractor-workspace,
  .dashboard-site-survey-workspace,
  .dashboard-quick-tender-workspace,
  .dashboard-engineering-workspace,
  .dashboard-dhw-workspace,
  .dashboard-unit-workspace,
  .hydraulic-overlay
) :is(p, small, label, dt) {
  text-shadow: none;
}

@media (max-width: 720px) {
  html[data-theme="dark"] :is(
    .dashboard-analytics-workspace,
    .dashboard-advertising-workspace,
    .dashboard-distributor-workspace,
    .dashboard-product-library-workspace,
    .contractor-workspace,
    .dashboard-site-survey-workspace,
    .dashboard-quick-tender-workspace,
    .dashboard-engineering-workspace,
    .dashboard-dhw-workspace,
    .dashboard-unit-workspace,
    .hydraulic-overlay
  ) :is(section, article, aside, form, fieldset, label, div) {
    min-width: 0;
    max-width: 100%;
  }

  html[data-theme="dark"] :is(
    .quick-tender-table-wrap,
    .dashboard-engineering-table-wrap,
    .dashboard-advertising-table,
    .dashboard-distributor-overview-table,
    .dashboard-distributor-table,
    .dashboard-distributor-line-table,
    .hydraulic-table-wrap
  ) {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  html[data-theme="dark"] :is(
    .dashboard-product-rich-toolbar,
    .dashboard-product-library-header-actions,
    .dashboard-analytics-header,
    .dashboard-engineering-panel-head,
    .quick-tender-main-head
  ) {
    min-width: 0;
    flex-wrap: wrap;
  }
}

/* End unified dark Quick and Workspace Tools theme. */

/* Advertising Campaign Studio — paid placements stay visually distinct from organic content. */
.dashboard-advertising-campaign-workspace {
  --advertising-surface: #ffffff;
  --advertising-surface-raised: #f8fafc;
  --advertising-surface-inset: #eef4fb;
  --advertising-border: #cbd9ea;
  --advertising-text: #15171c;
  --advertising-muted: #52647d;
  --advertising-blue: #0b63ce;
  --advertising-focus: #1d4ed8;
  color: var(--advertising-text);
}

.dashboard-advertising-campaign-workspace .dashboard-analytics-header p {
  margin: .35rem 0 0;
  max-width: 58rem;
  color: var(--advertising-muted);
  font-size: .82rem;
  line-height: 1.45;
}

.advertising-workspace-shell {
  display: grid;
  align-content: start;
  grid-auto-rows: max-content;
  gap: 1rem;
  padding: 1rem;
  min-width: 0;
}

.advertising-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: .4rem;
  padding: .35rem;
  border: 1px solid var(--advertising-border);
  border-radius: 16px;
  background: var(--advertising-surface-inset);
}

.advertising-tabs button,
.advertising-preview-toolbar button,
.advertising-live-reel-controls button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--advertising-muted);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.advertising-tabs button[aria-selected="true"],
.advertising-preview-toolbar button[aria-pressed="true"] {
  border-color: #71a7ed;
  background: var(--advertising-surface);
  color: var(--advertising-blue);
  box-shadow: 0 5px 18px rgba(37, 99, 235, .12);
}

.advertising-tabs button:focus-visible,
.advertising-preview-toolbar button:focus-visible,
.advertising-live-reel :is(a, button):focus-visible,
.advertising-builder :is(input, select, textarea):focus-visible {
  outline: 3px solid var(--advertising-focus);
  outline-offset: 2px;
}

.advertising-workspace-message,
.advertising-permission-note {
  padding: .8rem 1rem;
  border: 1px solid var(--advertising-border);
  border-radius: 12px;
  background: var(--advertising-surface-inset);
  color: var(--advertising-muted);
  line-height: 1.45;
}

.advertising-builder-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(20rem, .72fr);
  align-items: start;
  gap: 1rem;
  min-width: 0;
}

.advertising-builder,
.advertising-builder-preview {
  display: grid;
  gap: .9rem;
  min-width: 0;
}

.advertising-builder-fields {
  display: grid;
  gap: .9rem;
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.advertising-builder[aria-busy="true"] .advertising-builder-fields {
  cursor: wait;
}

.advertising-builder[aria-busy="true"] .advertising-builder-section {
  border-color: #8db9ef;
  box-shadow: 0 8px 24px rgba(37, 99, 235, .1);
}

.advertising-builder[aria-busy="true"] :is(input, select, textarea) {
  cursor: wait;
  opacity: .72;
}

.advertising-builder-preview {
  position: sticky;
  top: .8rem;
}

.advertising-builder-section,
.advertising-quote-panel,
.advertising-rate-card-grid > article,
.advertising-standards-panel,
.advertising-campaign-row,
.advertising-empty-state {
  min-width: 0;
  border: 1px solid var(--advertising-border);
  border-radius: 16px;
  background: var(--advertising-surface);
  box-shadow: 0 10px 28px rgba(18, 18, 21, .06);
}

.advertising-builder-section {
  padding: 1rem;
}

.advertising-builder-section > header {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: .9rem;
}

.advertising-builder-section > header > span {
  display: grid;
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 999px;
  background: #dbeafe;
  color: #0753a5;
  font-weight: 900;
}

.advertising-builder-section > header div,
.advertising-placement-card > span:last-child {
  display: grid;
  min-width: 0;
  gap: .2rem;
}

.advertising-builder-section > header strong,
.advertising-placement-card strong {
  color: var(--advertising-text);
}

.advertising-builder-section > header small,
.advertising-placement-card small,
.advertising-placement-card em {
  color: var(--advertising-muted);
  line-height: 1.42;
  white-space: normal;
  overflow-wrap: anywhere;
}

.advertising-placement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.advertising-placement-card {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: start;
  gap: .65rem;
  min-width: 0;
  min-height: 8.25rem;
  padding: .8rem;
  border: 1px solid var(--advertising-border);
  border-left: 4px solid var(--advertising-accent, var(--advertising-blue));
  border-radius: 13px;
  background: var(--advertising-surface-raised);
  cursor: pointer;
}

.advertising-placement-card.selected,
.advertising-placement-card:has(input:focus-visible) {
  border-color: var(--advertising-accent, var(--advertising-blue));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--advertising-accent, #2563eb) 24%, transparent);
}

.advertising-placement-card > input {
  width: 1.2rem;
  height: 1.2rem;
  min-height: 0;
  margin: .1rem 0 0;
  accent-color: var(--advertising-accent, var(--advertising-blue));
}

.advertising-placement-icon {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--advertising-accent, #2563eb) 14%, var(--advertising-surface));
  color: var(--advertising-accent, var(--advertising-blue));
}

.advertising-placement-card em {
  margin-top: .2rem;
  font-size: .7rem;
  font-style: normal;
  font-weight: 800;
}

.advertising-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}

.advertising-form-grid > label:not(.advertising-repeat-choice) {
  display: grid;
  min-width: 0;
  gap: .35rem;
  color: var(--advertising-text);
  font-weight: 800;
}

.advertising-form-grid > label.wide,
.advertising-form-grid > .wide,
.advertising-repeat-choice {
  grid-column: 1 / -1;
}

.advertising-catalogue-creative-note,
.advertising-order-terms {
  min-width: 0;
  padding: .75rem;
  border: 1px solid var(--advertising-border);
  border-radius: 11px;
  background: var(--advertising-surface-raised);
}

.advertising-catalogue-creative-note {
  display: grid;
  gap: .25rem;
}

.advertising-catalogue-creative-note p {
  margin: 0;
  color: var(--advertising-muted);
  line-height: 1.45;
}

.advertising-order-terms {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  cursor: pointer;
}

.advertising-order-terms > input {
  flex: 0 0 1.2rem;
  width: 1.2rem;
  height: 1.2rem;
  min-height: 0;
  margin-top: .12rem;
  accent-color: var(--advertising-blue);
}

.advertising-order-terms > span {
  display: grid;
  min-width: 0;
  gap: .2rem;
}

.advertising-order-terms small {
  color: var(--advertising-muted);
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
}

.advertising-order-terms:focus-within {
  outline: 3px solid var(--advertising-focus);
  outline-offset: 2px;
}

.advertising-form-grid :is(input[type="text"], input[type="search"], input[type="url"], input[type="date"], select, textarea) {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: .68rem .75rem;
  border: 1px solid var(--advertising-border);
  border-radius: 10px;
  background: var(--advertising-surface-raised);
  color: var(--advertising-text);
  font: inherit;
}

.advertising-form-grid textarea {
  resize: vertical;
  line-height: 1.45;
}

.advertising-form-grid > label > small {
  color: var(--advertising-muted);
  font-size: .68rem;
  font-weight: 700;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
}

.advertising-repeat-choice {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  min-height: 56px;
  padding: .75rem;
  border: 1px solid var(--advertising-border);
  border-radius: 11px;
  background: var(--advertising-surface-raised);
  cursor: pointer;
}

.advertising-repeat-choice > input {
  flex: 0 0 1.2rem;
  width: 1.2rem;
  height: 1.2rem;
  min-height: 0;
  margin-top: .1rem;
  accent-color: var(--advertising-blue);
}

.advertising-repeat-choice > span {
  display: grid;
  min-width: 0;
  gap: .2rem;
}

.advertising-repeat-choice small {
  color: var(--advertising-muted);
  line-height: 1.4;
  white-space: normal;
}

.advertising-preview-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  padding: .55rem;
  border: 1px solid var(--advertising-border);
  border-radius: 13px;
  background: var(--advertising-surface-inset);
}

.advertising-preview-toolbar > span {
  margin-right: auto;
  font-weight: 900;
}

.advertising-preview-toolbar > div {
  display: flex;
  gap: .25rem;
}

.advertising-preview-toolbar button {
  min-height: 36px;
  padding: .3rem .55rem;
  font-size: .72rem;
}

.advertising-preview-frame {
  --preview-bg: #eef2f7;
  --preview-card: #ffffff;
  --preview-inset: #f5f7fa;
  --preview-border: #cbd5e1;
  --preview-text: #15171c;
  --preview-muted: #52647d;
  display: grid;
  gap: .7rem;
  min-width: 0;
  min-height: 20rem;
  padding: .85rem;
  border: 1px solid var(--advertising-border);
  border-radius: 16px;
  background: var(--preview-bg);
  color: var(--preview-text);
  overflow: hidden;
}

.advertising-preview-frame.theme-dark {
  --preview-bg: #0d0e11;
  --preview-card: #1b1c20;
  --preview-inset: #24262b;
  --preview-border: #4b4e56;
  --preview-text: #f5f5f6;
  --preview-muted: #b7c2d0;
}

.advertising-preview-frame.viewport-mobile {
  width: min(100%, 23rem);
  margin-inline: auto;
}

.advertising-preview-notice {
  padding: .45rem .6rem;
  border: 1px dashed var(--preview-border);
  border-radius: 9px;
  color: var(--preview-muted);
  font-size: .7rem;
  font-weight: 800;
  text-align: center;
}

.advertising-preview-product,
.advertising-preview-story,
.advertising-preview-dashboard,
.advertising-preview-search,
.advertising-preview-design article {
  min-width: 0;
  border: 1px solid var(--preview-border);
  border-radius: 13px;
  background: var(--preview-card);
  color: var(--preview-text);
}

.advertising-preview-product,
.advertising-preview-story,
.advertising-preview-dashboard,
.advertising-preview-design article {
  display: grid;
  grid-template-columns: 5.25rem minmax(0, 1fr);
  gap: .75rem;
  padding: .75rem;
}

.advertising-preview-product > :is(img, .advertising-preview-placeholder),
.advertising-preview-story > :is(img, .advertising-preview-placeholder),
.advertising-preview-dashboard > :is(img, .advertising-preview-placeholder),
.advertising-preview-design article > :is(img, .advertising-preview-placeholder) {
  display: grid;
  width: 5.25rem;
  height: 5.25rem;
  place-items: center;
  border-radius: 10px;
  background: var(--preview-inset);
  color: #60a5fa;
  object-fit: contain;
  font-weight: 900;
}

.advertising-preview-frame :is(.advertising-preview-product, .advertising-preview-story, .advertising-preview-dashboard, .advertising-preview-design article) > div {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: .28rem;
}

.advertising-preview-frame :is(strong, p, small, span, em) {
  min-width: 0;
  max-width: 100%;
  margin: 0;
  color: inherit;
  white-space: normal;
  overflow-wrap: anywhere;
}

.advertising-preview-frame :is(.advertising-preview-product, .advertising-preview-story, .advertising-preview-dashboard) span:first-child,
.advertising-preview-design article span:first-child {
  color: #2563eb;
  font-size: .68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.advertising-preview-frame p,
.advertising-preview-frame small {
  color: var(--preview-muted);
  line-height: 1.4;
}

.advertising-preview-search {
  display: grid;
  gap: .45rem;
  padding: .7rem;
}

.advertising-preview-search > span {
  color: var(--preview-muted);
  font-size: .7rem;
  font-weight: 800;
}

.advertising-preview-search article {
  display: grid;
  gap: .16rem;
  padding: .55rem .65rem;
  border: 1px solid var(--preview-border);
  border-radius: 9px;
  background: var(--preview-inset);
}

.advertising-preview-search article.sponsored {
  border-left: 4px solid #7c3aed;
}

.advertising-preview-search i {
  color: #a855f7;
  font-size: .63rem;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.advertising-preview-design {
  display: grid;
  gap: .55rem;
  padding: .65rem;
  border: 1px solid var(--preview-border);
  border-radius: 13px;
  background: var(--preview-card);
}

.advertising-preview-minimap {
  display: grid;
  min-height: 8rem;
  place-items: center;
  border: 1px dashed var(--preview-border);
  border-radius: 9px;
  background: repeating-linear-gradient(45deg, var(--preview-inset), var(--preview-inset) 10px, var(--preview-card) 10px, var(--preview-card) 20px);
  color: var(--preview-muted);
  font-weight: 800;
}

.advertising-quote-panel {
  display: grid;
  gap: .75rem;
  padding: .9rem;
}

.advertising-quote-panel.verified {
  border-color: #34a76f;
}

.advertising-quote-panel > header,
.advertising-quote-panel > header > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .7rem;
}

.advertising-quote-panel > header > div {
  display: grid;
}

.advertising-quote-panel > header > div > span {
  color: var(--advertising-blue);
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.advertising-quote-panel > header strong {
  font-size: 1.45rem;
}

.advertising-quote-panel > header small,
.advertising-quote-panel > p {
  color: var(--advertising-muted);
  line-height: 1.4;
}

.advertising-quote-panel dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .45rem;
  margin: 0;
}

.advertising-quote-panel dl > div {
  display: grid;
  gap: .16rem;
  padding: .55rem;
  border-radius: 9px;
  background: var(--advertising-surface-raised);
}

.advertising-quote-panel dt {
  color: var(--advertising-muted);
  font-size: .65rem;
  font-weight: 800;
  text-transform: uppercase;
}

.advertising-quote-panel dd {
  margin: 0;
  color: var(--advertising-text);
  font-weight: 800;
}

.advertising-quote-panel ul {
  display: grid;
  gap: .3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.advertising-quote-panel li {
  display: flex;
  justify-content: space-between;
  gap: .6rem;
}

.advertising-quote-actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: .5rem;
}

.advertising-quote-actions button {
  min-height: 44px;
  white-space: normal;
  line-height: 1.2;
}

.advertising-payment-note {
  padding: .55rem;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412 !important;
  font-weight: 800;
}

.advertising-empty-state {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
}

.advertising-empty-state > span {
  display: grid;
  width: 3rem;
  height: 3rem;
  flex: 0 0 3rem;
  place-items: center;
  border-radius: 12px;
  background: #dbeafe;
  color: #0753a5;
}

.advertising-empty-state > div {
  min-width: 0;
  flex: 1;
}

.advertising-empty-state p {
  margin: .25rem 0 0;
  color: var(--advertising-muted);
  line-height: 1.45;
}

.advertising-campaign-list {
  display: grid;
  gap: .65rem;
}

.advertising-campaign-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(12rem, .8fr) minmax(0, 1.5fr) auto;
  align-items: center;
  gap: .8rem;
  padding: .85rem;
}

.advertising-campaign-row > div {
  display: grid;
  min-width: 0;
  gap: .16rem;
}

.advertising-campaign-row > div span {
  color: var(--advertising-blue);
  font-size: .65rem;
  font-weight: 900;
  text-transform: uppercase;
}

.advertising-campaign-row > div :is(strong, small) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.advertising-campaign-row > div small {
  color: var(--advertising-muted);
}

.advertising-campaign-row dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .35rem;
  margin: 0;
}

.advertising-campaign-row dl > div {
  min-width: 0;
  padding: .45rem;
  border-radius: 8px;
  background: var(--advertising-surface-raised);
}

.advertising-campaign-row dt {
  color: var(--advertising-muted);
  font-size: .6rem;
  font-weight: 800;
  text-transform: uppercase;
}

.advertising-campaign-row dd {
  margin: .12rem 0 0;
  overflow: hidden;
  color: var(--advertising-text);
  font-size: .74rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.advertising-status-pill {
  padding: .35rem .55rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #3f4148;
  font-size: .68rem;
  font-weight: 900;
  white-space: nowrap;
}

.advertising-status-pill:is(.status-active, .status-scheduled) {
  background: #dcfce7;
  color: #166534;
}

.advertising-campaign-actions {
  display: grid;
  justify-items: end;
  gap: .4rem;
  min-width: 0;
}

.advertising-campaign-actions > small {
  max-width: 10rem;
  color: var(--advertising-muted);
  line-height: 1.3;
  text-align: right;
}

.advertising-campaign-actions button {
  min-height: 44px;
  white-space: normal;
}

.advertising-rate-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
}

.advertising-rate-card-grid > article {
  display: grid;
  gap: .35rem;
  padding: .9rem;
  border-top: 4px solid var(--advertising-accent);
}

.advertising-rate-card-grid span {
  color: var(--advertising-accent);
  font-size: .7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.advertising-rate-card-grid p,
.advertising-rate-card-grid small {
  margin: 0;
  color: var(--advertising-muted);
  line-height: 1.4;
}

.advertising-rate-card-grid ul,
.advertising-published-factors ul {
  display: grid;
  gap: .3rem;
  margin: .2rem 0 0;
  padding: 0;
  list-style: none;
}

.advertising-rate-card-grid li,
.advertising-published-factors li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .65rem;
  min-width: 0;
  padding: .38rem .45rem;
  border-radius: 8px;
  background: var(--advertising-surface-raised);
}

.advertising-rate-card-grid li span {
  color: var(--advertising-muted);
  font-size: .64rem;
  text-transform: none;
}

.advertising-rate-card-grid li b,
.advertising-published-factors li b {
  flex: 0 0 auto;
  color: var(--advertising-text);
  font-size: .7rem;
}

.advertising-published-rate-summary,
.advertising-published-factors,
.advertising-rate-admin-header,
.advertising-rate-admin-section,
.advertising-rate-admin-history {
  min-width: 0;
  border: 1px solid var(--advertising-border);
  border-radius: 16px;
  background: var(--advertising-surface);
  box-shadow: 0 10px 28px rgba(18, 18, 21, .06);
}

.advertising-published-rate-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(19rem, .55fr);
  gap: 1rem;
  margin-bottom: .75rem;
  padding: 1rem;
}

.advertising-published-rate-summary > div,
.advertising-published-factors header > div,
.advertising-rate-admin-header > div {
  display: grid;
  gap: .25rem;
  min-width: 0;
}

.advertising-published-rate-summary :is(h2, p, dl, dd),
.advertising-published-factors :is(h2, h3, p),
.advertising-rate-admin :is(h2, h3, p, dl, dd) {
  margin: 0;
}

.advertising-published-rate-summary > div > span,
.advertising-published-factors header > div > span,
.advertising-rate-admin-header > div > span,
.advertising-rate-admin-history header span {
  color: var(--advertising-blue);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.advertising-published-rate-summary p,
.advertising-published-factors p,
.advertising-rate-admin p {
  color: var(--advertising-muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.advertising-published-rate-summary dl,
.advertising-rate-admin-header dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .45rem;
}

.advertising-published-rate-summary dl > div,
.advertising-rate-admin-header dl > div {
  display: grid;
  gap: .15rem;
  min-width: 0;
  padding: .55rem;
  border-radius: 9px;
  background: var(--advertising-surface-raised);
}

.advertising-published-rate-summary dt,
.advertising-rate-admin-header dt {
  color: var(--advertising-muted);
  font-size: .6rem;
  font-weight: 850;
  text-transform: uppercase;
}

.advertising-published-rate-summary dd,
.advertising-rate-admin-header dd {
  color: var(--advertising-text);
  font-size: .7rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.advertising-published-factors {
  display: grid;
  gap: .75rem;
  margin-top: .75rem;
  padding: 1rem;
}

.advertising-published-factors > header,
.advertising-rate-admin-history > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
}

.advertising-published-factors > header > small {
  color: var(--advertising-muted);
  font-weight: 800;
}

.advertising-published-factors > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .65rem;
}

.advertising-published-factors article {
  min-width: 0;
  padding: .7rem;
  border: 1px solid var(--advertising-border);
  border-radius: 12px;
  background: var(--advertising-surface-raised);
}

.advertising-published-factors article h3 {
  margin-bottom: .45rem;
  color: var(--advertising-text);
  font-size: .78rem;
}

.advertising-published-factors li {
  background: var(--advertising-surface);
}

.advertising-published-factors li > span {
  display: grid;
  min-width: 0;
  color: var(--advertising-text);
  font-size: .68rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.advertising-published-factors li small {
  color: var(--advertising-muted);
  font-size: .58rem;
  font-weight: 700;
}

.advertising-rate-admin {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .8rem;
  min-width: 0;
  color: var(--advertising-text);
}

.advertising-rate-admin-header {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(16rem, .55fr);
  gap: 1rem;
  padding: 1rem;
}

.advertising-rate-admin-status {
  min-height: 44px;
  padding: .72rem .85rem;
  border: 1px solid var(--advertising-border);
  border-radius: 11px;
  background: var(--advertising-surface-inset);
  color: var(--advertising-muted);
  font-weight: 750;
  line-height: 1.4;
}

.advertising-rate-admin-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .75rem;
  min-width: 0;
}

.advertising-rate-admin-section {
  display: grid;
  gap: .65rem;
  min-inline-size: 0;
  margin: 0;
  padding: .9rem;
}

.advertising-rate-admin-section legend {
  padding: 0 .3rem;
  color: var(--advertising-text);
  font-size: .9rem;
  font-weight: 900;
}

.advertising-rate-admin-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .6rem;
  min-width: 0;
}

.advertising-rate-admin :is(label, .advertising-rate-admin-unit) {
  min-width: 0;
}

.advertising-rate-admin label {
  display: grid;
  align-content: start;
  gap: .3rem;
  color: var(--advertising-muted);
  font-size: .66rem;
  font-weight: 850;
}

.advertising-rate-admin :is(input, select) {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: .56rem .62rem;
  border: 1px solid var(--advertising-border);
  border-radius: 9px;
  background: var(--advertising-surface-raised);
  color: var(--advertising-text);
  font: inherit;
  font-size: .72rem;
}

.advertising-rate-admin select[multiple] {
  min-height: 8.5rem;
  padding: .3rem;
}

.advertising-rate-admin select[multiple] option {
  padding: .38rem .42rem;
  border-radius: 6px;
}

.advertising-rate-admin :is(input, select, button):focus-visible {
  outline: 3px solid var(--advertising-focus);
  outline-offset: 2px;
}

.advertising-rate-admin-unit {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .35rem;
}

.advertising-rate-admin-unit > input:first-child {
  grid-column: 1 / 3;
}

.advertising-rate-admin-unit small {
  color: var(--advertising-muted);
  font-weight: 850;
}

.advertising-rate-admin-placement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
  min-width: 0;
}

.advertising-rate-admin-placement-grid > article,
.advertising-rate-admin-demand-grid > article,
.advertising-rate-admin-adjustments > article {
  display: grid;
  gap: .6rem;
  min-width: 0;
  padding: .7rem;
  border: 1px solid var(--advertising-border);
  border-radius: 12px;
  background: var(--advertising-surface-raised);
}

.advertising-rate-admin-placement-grid > article > header,
.advertising-rate-admin-adjustment-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(9rem, .6fr);
  align-items: end;
  gap: .6rem;
  min-width: 0;
}

.advertising-rate-admin-placement-grid > article > header > div {
  display: grid;
  gap: .15rem;
  min-width: 0;
}

.advertising-rate-admin-placement-grid > article > header > div > span {
  color: var(--advertising-blue);
  font-size: .58rem;
  font-weight: 900;
  text-transform: uppercase;
}

.advertising-rate-admin-tier-list {
  display: grid;
  gap: .35rem;
}

.advertising-rate-admin-tier-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(9rem, .55fr);
  align-items: end;
  gap: .5rem;
  min-width: 0;
  padding: .5rem;
  border-radius: 9px;
  background: var(--advertising-surface);
}

.advertising-rate-admin-tier-list > div > span {
  display: grid;
  min-width: 0;
  gap: .12rem;
}

.advertising-rate-admin-tier-list small {
  color: var(--advertising-muted);
  font-size: .6rem;
}

.advertising-rate-admin-factor-grid,
.advertising-rate-admin-demand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: .55rem;
  min-width: 0;
}

.advertising-rate-admin-factor-grid > label {
  padding: .55rem;
  border-radius: 9px;
  background: var(--advertising-surface-raised);
}

.advertising-rate-admin-demand-grid > article {
  align-content: start;
}

.advertising-rate-admin-table-scroll {
  width: 100%;
  max-width: 100%;
  max-height: min(32rem, 55dvh);
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid var(--advertising-border);
  border-radius: 10px;
}

.advertising-rate-admin-table-scroll table {
  width: 100%;
  min-width: 32rem;
  border-collapse: collapse;
  color: var(--advertising-text);
}

.advertising-rate-admin-table-scroll :is(th, td) {
  padding: .48rem .58rem;
  border-top: 1px solid var(--advertising-border);
  text-align: left;
}

.advertising-rate-admin-table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--advertising-surface-inset);
  color: var(--advertising-muted);
  font-size: .62rem;
  text-transform: uppercase;
}

.advertising-rate-admin-table-scroll tbody th {
  color: var(--advertising-text);
  font-size: .7rem;
}

.advertising-rate-admin-table-scroll td:last-child {
  width: 1%;
  white-space: nowrap;
}

.advertising-rate-admin-table-scroll button {
  min-height: 44px;
}

.advertising-rate-admin-category-add {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) auto;
  align-items: end;
  gap: .55rem;
}

.advertising-rate-admin-category-add button {
  min-height: 44px;
}

.advertising-rate-admin-adjustments {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .55rem;
}

.advertising-rate-admin-adjustment-head {
  grid-template-columns: minmax(0, 1fr) minmax(9rem, .45fr) auto;
}

.advertising-rate-admin-adjustment-head button,
.advertising-rate-admin-actions button,
.advertising-rate-admin-history button,
.advertising-rate-admin-section > button {
  min-height: 44px;
}

.advertising-rate-admin-empty {
  padding: .8rem;
  border: 1px dashed var(--advertising-border);
  border-radius: 10px;
  color: var(--advertising-muted);
}

.advertising-rate-admin-actions {
  display: flex;
  justify-content: flex-end;
  gap: .55rem;
}

.advertising-rate-admin-history {
  display: grid;
  gap: .65rem;
  padding: .9rem;
}

.advertising-rate-admin-history ol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: .45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.advertising-rate-admin-history li {
  display: grid;
  gap: .15rem;
  padding: .6rem;
  border-radius: 9px;
  background: var(--advertising-surface-raised);
}

.advertising-rate-admin-history li :is(span, small) {
  color: var(--advertising-muted);
  font-size: .62rem;
}

html[data-theme="dark"] .advertising-rate-admin :is(.advertising-rate-admin-header, .advertising-rate-admin-section, .advertising-rate-admin-history, .advertising-rate-admin-placement-grid > article, .advertising-rate-admin-demand-grid > article, .advertising-rate-admin-adjustments > article) {
  border-color: var(--advertising-border);
  background: var(--advertising-surface);
  color: var(--advertising-text);
}

html[data-theme="dark"] .advertising-rate-admin :is(input, select) {
  border-color: var(--advertising-border);
  background: var(--advertising-surface-inset);
  color: var(--advertising-text);
  color-scheme: dark;
}

.advertising-standards-panel {
  margin-top: .75rem;
  padding: 1rem;
}

.advertising-standards-panel ul {
  display: grid;
  gap: .45rem;
  color: var(--advertising-muted);
  line-height: 1.45;
}

.advertising-live-reel {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 100%;
  overflow: hidden;
  border-radius: inherit;
}

.advertising-live-reel-slide {
  display: none;
  grid-template-columns: minmax(7rem, .8fr) minmax(0, 1.2fr);
  min-width: 0;
  min-height: 12rem;
  color: inherit;
  text-decoration: none;
}

.advertising-live-reel-slide.active {
  display: grid;
}

.advertising-live-reel-media {
  display: grid;
  min-width: 0;
  place-items: center;
  overflow: hidden;
  background: #e8eef7;
}

.advertising-live-reel-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.advertising-live-reel-media i {
  display: grid;
  width: 4rem;
  height: 4rem;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  font-style: normal;
  font-weight: 900;
}

.advertising-live-reel-copy {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: .35rem;
  padding: 1rem;
  background: var(--surface-solid, #fff);
}

.advertising-live-reel-copy em,
.advertising-disclosure {
  color: #2563eb;
  font-size: .66rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.advertising-live-reel-copy :is(strong, small, b) {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}

.advertising-live-reel-copy > span {
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.advertising-live-reel-copy b {
  color: #0b63ce;
  font-size: .75rem;
}

.advertising-live-reel-controls {
  position: absolute;
  right: .5rem;
  bottom: .45rem;
  left: .5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  pointer-events: none;
}

.advertising-live-reel-controls > * {
  pointer-events: auto;
}

.advertising-live-reel-controls > span {
  display: flex;
  gap: .25rem;
}

.advertising-live-reel-controls [data-advertising-reel-position] {
  display: grid;
  min-height: 44px;
  padding-inline: .45rem;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, .92);
  color: #15171c;
  font-size: .68rem;
  font-weight: 900;
  white-space: nowrap;
}

.advertising-live-reel-controls button {
  min-width: 44px;
  min-height: 44px;
  padding: .2rem;
  border-color: rgba(18, 18, 21, .28);
  background: rgba(255, 255, 255, .92);
  color: #15171c;
}

.advertising-live-reel-controls [data-advertising-reel-index] {
  position: relative;
  min-width: 44px;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 999px;
  border-color: transparent;
  background: transparent;
}

.advertising-live-reel-controls [data-advertising-reel-index]::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #94a3b8;
  content: "";
  transform: translate(-50%, -50%);
}

.advertising-live-reel-controls [data-advertising-reel-index][aria-pressed="true"]::after {
  background: #2563eb;
}

.dashboard-news-sponsored-story {
  border-left: 4px solid #ea580c;
}

a.dashboard-news-sponsored-story {
  color: inherit;
  text-decoration: none;
}

.advertising-story-placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ea580c, #7c3aed);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 900;
}

.design-advertising-companion {
  display: grid;
  gap: .45rem;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: .55rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-solid);
}

.left-rail > .design-advertising-companion {
  align-self: stretch;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.design-advertising-companion-label {
  display: flex;
  justify-content: space-between;
  gap: .4rem;
  color: var(--muted);
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.design-advertising-companion .advertising-live-reel-slide {
  grid-template-columns: 3.5rem minmax(0, 1fr);
  min-height: 6.7rem;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.design-advertising-companion .advertising-live-reel-copy {
  gap: .15rem;
  padding: .45rem;
}

.design-advertising-companion .advertising-live-reel-copy strong {
  font-size: .72rem;
  line-height: 1.25;
}

.design-advertising-companion .advertising-live-reel-copy small,
.design-advertising-companion .advertising-live-reel-copy b {
  font-size: .58rem;
}

.design-advertising-companion .advertising-live-reel-controls {
  position: static;
  justify-content: flex-end;
  max-width: 100%;
  margin-top: .2rem;
  overflow-x: auto;
}

.design-advertising-companion .advertising-live-reel-copy > span {
  -webkit-line-clamp: 1;
}

.workspace.floor-3d-wide.design-advertising-persistent {
  grid-template-columns: 220px minmax(0, 1fr);
  padding: 10px 0 10px 10px;
}

.design-advertising-required-rail {
  display: grid;
  align-content: start;
  gap: .65rem;
  min-width: 0;
}

html[data-theme="dark"] .dashboard-advertising-campaign-workspace {
  --advertising-surface: #1b1c20;
  --advertising-surface-raised: #23252a;
  --advertising-surface-inset: #15161a;
  --advertising-border: #464a53;
  --advertising-text: #f5f5f6;
  --advertising-muted: #b8c2cf;
  --advertising-blue: #93c5fd;
  --advertising-focus: #93c5fd;
}

html[data-theme="dark"] .dashboard-advertising-campaign-workspace :is(input, select, textarea) {
  color-scheme: dark;
}

html[data-theme="dark"] .advertising-builder[aria-busy="true"] .advertising-builder-section {
  border-color: #4f83bd;
}

html[data-theme="dark"] .advertising-tabs button[aria-selected="true"],
html[data-theme="dark"] .advertising-preview-toolbar button[aria-pressed="true"] {
  border-color: #60a5fa;
  background: #292b31;
  color: #dbeafe;
}

html[data-theme="dark"] .advertising-builder-section > header > span,
html[data-theme="dark"] .advertising-empty-state > span {
  background: #1e3a5f;
  color: #bfdbfe;
}

html[data-theme="dark"] .advertising-payment-note {
  background: #431407;
  color: #fed7aa !important;
}

html[data-theme="dark"] .advertising-status-pill {
  background: #34363c;
  color: #e5e7eb;
}

html[data-theme="dark"] .advertising-status-pill:is(.status-active, .status-scheduled) {
  background: #123522;
  color: #86efac;
}

html[data-theme="dark"] .advertising-live-reel-copy,
html[data-theme="dark"] .design-advertising-companion {
  background: #1b1c20;
  color: #f5f5f6;
}

html[data-theme="dark"] .advertising-live-reel-media {
  background: #25272c;
}

html[data-theme="dark"] .advertising-live-reel-copy :is(small, b) {
  color: #cbd5e1;
}

html[data-theme="dark"] .advertising-live-reel-copy em,
html[data-theme="dark"] .advertising-disclosure {
  color: #93c5fd;
}

.advertising-preview-frame.theme-dark :is(
  .advertising-preview-product,
  .advertising-preview-story,
  .advertising-preview-dashboard
) span:first-child,
.advertising-preview-frame.theme-dark .advertising-preview-design article span:first-child {
  color: #93c5fd;
}

.advertising-preview-frame.theme-dark .advertising-preview-search i {
  color: #d8b4fe;
}

html[data-theme="dark"] .advertising-rate-card-grid span {
  color: #e5e7eb;
}

.advertising-performance {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  min-width: 0;
}

.advertising-performance-header,
.advertising-performance-panel > header,
.advertising-performance-campaign-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
}

.advertising-performance-header > div:first-child,
.advertising-performance-panel > header > div,
.advertising-performance-campaign-card > header > div {
  display: grid;
  gap: .22rem;
  min-width: 0;
}

.advertising-performance :is(h2, h3, h4, p, figure, dl, dd) {
  margin: 0;
}

.advertising-performance-header > div:first-child > span,
.advertising-performance-panel > header span,
.advertising-performance-campaign-card > header > div > span {
  color: var(--advertising-blue);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.advertising-performance-header h2 {
  color: var(--advertising-text);
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  line-height: 1.12;
}

.advertising-performance :is(h3, h4) {
  color: var(--advertising-text);
  line-height: 1.2;
}

.advertising-performance-header p,
.advertising-performance-panel > header small,
.advertising-performance-campaign-card > header p,
.advertising-performance-notes p {
  color: var(--advertising-muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.advertising-performance-presets {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .4rem;
}

.advertising-performance-presets button,
.advertising-performance-filters > button {
  min-height: 44px;
  padding: .55rem .8rem;
  border: 1px solid var(--advertising-border);
  border-radius: 10px;
  background: var(--advertising-surface);
  color: var(--advertising-muted);
  font: inherit;
  font-size: .72rem;
  font-weight: 850;
  cursor: pointer;
}

.advertising-performance-presets button[aria-pressed="true"] {
  border-color: #60a5fa;
  background: #dbeafe;
  color: #0b4d95;
}

.advertising-performance :is(button, input, select, summary):focus-visible {
  outline: 3px solid var(--advertising-focus);
  outline-offset: 2px;
}

.advertising-performance-filters {
  display: grid;
  grid-template-columns: minmax(9rem, .7fr) minmax(9rem, .7fr) minmax(12rem, 1.3fr) minmax(11rem, 1fr) auto;
  align-items: end;
  gap: .6rem;
  min-width: 0;
  padding: .8rem;
  border: 1px solid var(--advertising-border);
  border-radius: 14px;
  background: var(--advertising-surface-inset);
}

.advertising-performance-filters label {
  display: grid;
  gap: .32rem;
  min-width: 0;
  color: var(--advertising-muted);
  font-size: .68rem;
  font-weight: 850;
}

.advertising-performance-filters :is(input, select) {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: .55rem .65rem;
  border: 1px solid var(--advertising-border);
  border-radius: 10px;
  background: var(--advertising-surface);
  color: var(--advertising-text);
  font: inherit;
}

.advertising-performance-status {
  min-height: 1.4rem;
  color: var(--advertising-muted);
  font-size: .7rem;
  font-weight: 750;
}

.advertising-performance-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .65rem;
  min-width: 0;
}

.advertising-performance-metrics > div,
.advertising-performance-panel,
.advertising-performance-notes {
  min-width: 0;
  border: 1px solid var(--advertising-border);
  border-radius: 15px;
  background: var(--advertising-surface);
  box-shadow: 0 10px 28px rgba(18, 18, 21, .06);
}

.advertising-performance-metrics > div {
  display: grid;
  gap: .22rem;
  padding: .85rem;
}

.advertising-performance-metrics dt {
  color: var(--advertising-muted);
  font-size: .66rem;
  font-weight: 850;
  text-transform: uppercase;
}

.advertising-performance-metrics dd {
  color: var(--advertising-text);
  font-size: clamp(1.15rem, 2.3vw, 1.65rem);
  font-weight: 900;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.advertising-performance-metrics small,
.advertising-performance-cycle-empty {
  color: var(--advertising-muted);
  font-size: .64rem;
  line-height: 1.35;
}

.advertising-performance-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .85rem;
  padding: 1rem;
}

.advertising-performance-trend figure {
  display: grid;
  gap: .55rem;
}

.advertising-performance-trend figcaption {
  color: var(--advertising-muted);
  font-size: .68rem;
}

.advertising-performance-chart {
  max-width: 100%;
  overflow-x: auto;
  padding: .6rem .35rem .2rem;
  border: 1px solid var(--advertising-border);
  border-radius: 12px;
  background: var(--advertising-surface-raised);
}

.advertising-performance-chart-bars {
  display: grid;
  grid-template-columns: repeat(var(--advertising-performance-points), minmax(1.65rem, 1fr));
  align-items: end;
  gap: .22rem;
  min-width: max(100%, calc(var(--advertising-performance-points) * 1.9rem));
  height: 13rem;
}

.advertising-performance-chart-day {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 2px;
  height: 100%;
  min-width: 0;
}

.advertising-performance-chart-day i {
  display: block;
  height: var(--performance-height);
  min-height: 0;
  border-radius: 4px 4px 1px 1px;
}

.advertising-performance-chart-day i.impressions {
  background: #2563eb;
}

.advertising-performance-chart-day i.clicks {
  background: #9333ea;
  background-image: repeating-linear-gradient(135deg, transparent 0 3px, rgba(255, 255, 255, .28) 3px 5px);
}

.advertising-performance-chart-day time {
  grid-column: 1 / -1;
  overflow: hidden;
  color: var(--advertising-muted);
  font-size: .54rem;
  text-align: center;
  text-overflow: clip;
  white-space: nowrap;
}

.advertising-performance-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  color: var(--advertising-muted);
  font-size: .66rem;
  font-weight: 800;
}

.advertising-performance-legend span {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.advertising-performance-legend span::before {
  width: .75rem;
  height: .75rem;
  border-radius: 3px;
  background: #2563eb;
  content: "";
}

.advertising-performance-legend span.clicks::before {
  background: #9333ea;
  background-image: repeating-linear-gradient(135deg, transparent 0 2px, rgba(255, 255, 255, .35) 2px 4px);
}

.advertising-performance-data summary,
.advertising-performance-campaign-card details summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  color: var(--advertising-blue);
  font-size: .7rem;
  font-weight: 850;
  cursor: pointer;
}

.advertising-performance-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--advertising-border);
  border-radius: 10px;
}

.advertising-performance-table-scroll table {
  width: 100%;
  min-width: 42rem;
  border-collapse: collapse;
  color: var(--advertising-text);
  font-size: .68rem;
}

.advertising-performance-table-scroll caption {
  padding: .7rem;
  color: var(--advertising-muted);
  font-weight: 800;
  text-align: left;
}

.advertising-performance-table-scroll :is(th, td) {
  padding: .62rem .7rem;
  border-top: 1px solid var(--advertising-border);
  text-align: left;
  white-space: nowrap;
}

.advertising-performance-table-scroll thead th {
  background: var(--advertising-surface-inset);
  color: var(--advertising-muted);
  font-size: .62rem;
  text-transform: uppercase;
}

.advertising-performance-campaigns {
  gap: .7rem;
}

.advertising-performance-campaign-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .7rem;
  min-width: 0;
  padding: .85rem;
  border: 1px solid var(--advertising-border);
  border-radius: 13px;
  background: var(--advertising-surface-raised);
}

.advertising-performance-campaign-card > :is(header, dl, details) {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.advertising-performance-campaign-card > header p {
  font-size: .68rem;
}

.advertising-performance-campaign-card > dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .5rem;
}

.advertising-performance-campaign-card > dl > div {
  min-width: 0;
  padding: .55rem;
  border-radius: 9px;
  background: var(--advertising-surface);
}

.advertising-performance-campaign-card dt {
  color: var(--advertising-muted);
  font-size: .59rem;
  font-weight: 850;
  text-transform: uppercase;
}

.advertising-performance-campaign-card dd {
  margin-top: .18rem;
  color: var(--advertising-text);
  font-size: .72rem;
  font-weight: 850;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.advertising-performance-empty,
.advertising-performance-notes {
  padding: 1rem;
}

.advertising-performance-empty {
  display: grid;
  gap: .3rem;
  border: 1px dashed var(--advertising-border);
  border-radius: 12px;
  color: var(--advertising-muted);
}

.advertising-performance-empty strong,
.advertising-performance-notes strong {
  color: var(--advertising-text);
}

.advertising-performance-notes {
  display: grid;
  gap: .45rem;
}

html[data-theme="dark"] .advertising-performance-metrics > div,
html[data-theme="dark"] .advertising-performance-panel,
html[data-theme="dark"] .advertising-performance-campaign-card,
html[data-theme="dark"] .advertising-performance-notes,
html[data-theme="dark"] .advertising-performance-filters {
  border-color: var(--advertising-border);
  background: var(--advertising-surface);
  color: var(--advertising-text);
}

html[data-theme="dark"] .advertising-performance-filters,
html[data-theme="dark"] .advertising-performance-campaign-card {
  background: var(--advertising-surface-inset);
}

html[data-theme="dark"] .advertising-performance-presets button[aria-pressed="true"] {
  border-color: #60a5fa;
  background: #1e3a5f;
  color: #dbeafe;
}

html[data-theme="dark"] .advertising-performance-chart-day i.impressions,
html[data-theme="dark"] .advertising-performance-legend span.impressions::before {
  background: #60a5fa;
}

html[data-theme="dark"] .advertising-performance-chart-day i.clicks,
html[data-theme="dark"] .advertising-performance-legend span.clicks::before {
  background-color: #c084fc;
}

html[data-theme="dark"] .advertising-live-reel-controls button {
  border-color: rgba(234, 234, 236, .22);
  background: #292b31;
  color: #f5f5f6;
}

html[data-theme="dark"] .advertising-live-reel-controls [data-advertising-reel-position] {
  background: #292b31;
  color: #f5f5f6;
}

html[data-theme="dark"] .advertising-live-reel-controls [data-advertising-reel-index] {
  border-color: transparent;
  background: transparent;
}

html[data-theme="dark"] .advertising-live-reel-controls [data-advertising-reel-index]::after {
  background: #737780;
}

html[data-theme="dark"] .advertising-live-reel-controls [data-advertising-reel-index][aria-pressed="true"]::after {
  background: #60a5fa;
}

@media (max-width: 1180px) {
  .advertising-builder-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .advertising-builder-preview {
    position: static;
    grid-template-columns: minmax(0, 1fr) minmax(18rem, .72fr);
    align-items: start;
  }

  .advertising-preview-toolbar {
    grid-column: 1 / -1;
  }

  .advertising-rate-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .advertising-performance-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .advertising-performance-filters > button {
    width: 100%;
  }
}

@media (max-width: 820px) {
  .workspace.floor-3d-wide.design-advertising-persistent {
    grid-template-columns: minmax(0, 1fr);
    padding: 8px;
  }

  .advertising-placement-grid,
  .advertising-form-grid,
  .advertising-builder-preview,
  .advertising-rate-card-grid,
  .advertising-campaign-row,
  .advertising-campaign-row dl {
    grid-template-columns: minmax(0, 1fr);
  }

  .advertising-published-rate-summary,
  .advertising-published-factors > div,
  .advertising-rate-admin-header,
  .advertising-rate-admin-form-grid,
  .advertising-rate-admin-placement-grid,
  .advertising-rate-admin-placement-grid > article > header,
  .advertising-rate-admin-tier-list > div,
  .advertising-rate-admin-adjustment-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .advertising-rate-admin-category-add {
    grid-template-columns: minmax(0, 1fr);
  }

  .advertising-rate-admin,
  .advertising-rate-admin-form,
  .advertising-rate-admin-section,
  .advertising-rate-admin-table-scroll {
    min-width: 0;
    max-width: 100%;
  }

  .advertising-rate-admin-table-scroll {
    overflow-x: auto;
  }

  .advertising-rate-admin-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .advertising-tabs {
    display: flex;
    max-width: 100%;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  .advertising-tabs button {
    flex: 0 0 auto;
    min-width: 10rem;
    scroll-snap-align: start;
  }

  .advertising-campaign-row > div :is(strong, small),
  .advertising-campaign-row dd {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .advertising-campaign-actions {
    justify-items: stretch;
  }

  .advertising-campaign-actions > small {
    max-width: none;
    text-align: left;
  }

  .advertising-performance-metrics,
  .advertising-performance-campaign-card > dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .advertising-performance-header,
  .advertising-performance-panel > header,
  .advertising-performance-campaign-card > header {
    align-items: stretch;
    flex-direction: column;
  }

  .advertising-performance-presets {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: stretch;
  }

  .advertising-performance-filters,
  .advertising-performance-metrics,
  .advertising-performance-campaign-card > dl {
    grid-template-columns: minmax(0, 1fr);
  }

  .advertising-performance-presets button,
  .advertising-performance-filters > button {
    width: 100%;
  }

  .advertising-performance-panel,
  .advertising-performance-campaign-card {
    padding: .72rem;
  }

  .advertising-performance-chart-bars {
    height: 10rem;
  }
}

@media (max-width: 560px) {
  .advertising-workspace-shell,
  .advertising-builder-section {
    padding: .7rem;
  }

  .advertising-placement-card {
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 0;
  }

  .advertising-placement-icon {
    display: none;
  }

  .advertising-preview-product,
  .advertising-preview-story,
  .advertising-preview-dashboard,
  .advertising-preview-design article,
  .advertising-live-reel-slide {
    grid-template-columns: minmax(0, 1fr);
  }

  .advertising-preview-product > :is(img, .advertising-preview-placeholder),
  .advertising-preview-story > :is(img, .advertising-preview-placeholder),
  .advertising-preview-dashboard > :is(img, .advertising-preview-placeholder),
  .advertising-preview-design article > :is(img, .advertising-preview-placeholder) {
    width: 100%;
    height: 8rem;
  }

  .advertising-quote-panel dl,
  .advertising-quote-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .advertising-empty-state {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .advertising-live-reel-slide,
  .advertising-placement-card {
    transition: none !important;
    animation: none !important;
  }
}

@media (forced-colors: active) {
  .advertising-placement-card.selected,
  .advertising-quote-panel.verified,
  .dashboard-news-sponsored-story,
  .design-advertising-companion {
    border: 2px solid Highlight;
  }

  .advertising-live-reel-controls button,
  .advertising-tabs button[aria-selected="true"] {
    forced-color-adjust: auto;
  }
}

/* Campaign Studio owns one bounded content scroller. The dashboard and
   analytics shells clip their grid rows, so the campaign content must shrink
   into the available viewport instead of overflowing behind the page lock. */
.studio-shell.dashboard-shell.dashboard-advertising-shell {
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  grid-template-rows: auto minmax(0, 1fr);
}

.dashboard-analytics-workspace.dashboard-advertising-campaign-workspace {
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  overflow-x: hidden;
  grid-template-rows: auto minmax(0, 1fr);
}

.advertising-workspace-shell {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  scroll-padding-block: 1rem;
}

.advertising-tab-panel {
  max-width: 100%;
  min-width: 0;
}

@media (max-width: 820px) {
  .advertising-tabs {
    min-height: 57px;
    flex: 0 0 auto;
    overflow-y: hidden;
  }
}

@media (max-height: 480px) {
  .studio-shell.dashboard-advertising-shell > .topbar {
    min-height: 58px;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 8px 10px;
  }

  .studio-shell.dashboard-advertising-shell > .topbar .dashboard-topbar-summary {
    display: none;
  }

  .studio-shell.dashboard-advertising-shell > .topbar :is(.brand-lockup, .top-actions) {
    min-width: 0;
  }

  .studio-shell.dashboard-advertising-shell > .topbar .top-actions {
    flex: 0 1 auto;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .dashboard-analytics-workspace.dashboard-advertising-campaign-workspace {
    gap: 6px;
    padding-bottom: 6px;
  }

  .dashboard-advertising-campaign-workspace > .dashboard-analytics-header {
    min-height: 52px;
    align-items: center;
    flex-direction: row;
    gap: 8px;
    padding: 4px 0;
  }

  .dashboard-advertising-campaign-workspace > .dashboard-analytics-header > div:first-child {
    min-width: 0;
    flex: 1 1 auto;
  }

  .dashboard-advertising-campaign-workspace > .dashboard-analytics-header > div:first-child > :is(span, p) {
    display: none;
  }

  .dashboard-advertising-campaign-workspace > .dashboard-analytics-header h1 {
    margin: 0;
    overflow: hidden;
    font-size: 1.15rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dashboard-advertising-campaign-workspace > .dashboard-analytics-header .dashboard-product-library-header-actions {
    width: auto;
    flex: 0 0 auto;
    overflow: visible;
    padding: 0;
  }

  .dashboard-advertising-campaign-workspace > .dashboard-analytics-header .dashboard-product-library-header-actions button {
    min-height: 44px;
  }

  .dashboard-advertising-campaign-workspace > .advertising-workspace-shell {
    padding-block: .5rem;
  }
}

/* End Advertising Campaign Studio. */

/* Account Governance areas and dense evidence layout. This late, uniquely
   scoped layer intentionally wins the older governance and intelligence
   declarations without changing their permission or consent behaviour. */
.studio-shell.dashboard-shell.dashboard-account-governance-shell {
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  grid-template-rows: auto minmax(0, 1fr);
}

.dashboard-account-governance-scroll {
  gap: .75rem;
  scroll-padding-top: .75rem;
}

.dashboard-account-governance-workspace .sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.dashboard-account-governance-area-nav {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
  padding: .38rem;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 1rem;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 10px 26px rgba(10, 10, 12, .06);
}

.dashboard-account-governance-area-nav > button {
  min-width: 0;
  min-height: 3.6rem;
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: .05rem .65rem;
  padding: .62rem .75rem;
  border: 1px solid transparent;
  border-radius: .78rem;
  background: transparent;
  color: #475569;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.dashboard-account-governance-area-nav > button > span {
  grid-row: 1 / -1;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: .62rem;
  background: rgba(37, 99, 235, .09);
  color: #2563eb;
}

.dashboard-account-governance-area-nav > button svg {
  width: 1rem;
  height: 1rem;
}

.dashboard-account-governance-area-nav > button strong,
.dashboard-account-governance-area-nav > button small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-account-governance-area-nav > button strong {
  color: #172033;
  font-size: .9rem;
}

.dashboard-account-governance-area-nav > button small {
  color: #64748b;
  font-size: .72rem;
  font-weight: 650;
}

.dashboard-account-governance-area-nav > button[aria-selected="true"] {
  border-color: rgba(59, 130, 246, .38);
  background: linear-gradient(145deg, rgba(239, 246, 255, .98), rgba(255, 255, 255, .98));
  color: #1d4ed8;
  box-shadow: 0 7px 18px rgba(37, 99, 235, .1);
}

.dashboard-account-governance-area-nav > button:is(:hover, :focus-visible) {
  border-color: rgba(59, 130, 246, .42);
}

.dashboard-account-governance-area-nav > button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .22);
  outline-offset: 2px;
}

.dashboard-account-governance-area-panel {
  min-width: 0;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  display: grid;
  align-content: start;
  gap: .72rem;
  padding: .72rem;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 1.1rem;
  background: rgba(248, 250, 252, .62);
}

.dashboard-account-governance-area-panel[hidden] {
  display: none !important;
}

.dashboard-account-governance-area-panel :is(strong, small, p) {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.dashboard-account-governance-summary {
  gap: .55rem;
}

.dashboard-account-governance-summary > span {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .4rem;
  padding: .62rem .78rem;
  border-radius: .78rem;
  box-shadow: 0 7px 18px rgba(37, 99, 235, .06);
}

.dashboard-account-governance-summary strong {
  font-size: clamp(1.08rem, 1.6vw, 1.45rem);
}

.dashboard-account-governance-setup-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(.65rem, 1vw, .85rem);
  align-items: start;
}

.dashboard-account-governance-setup-grid > * {
  min-width: 0;
}

.dashboard-account-governance-setup-grid > .dashboard-account-create-panel {
  grid-column: span 5;
  align-self: stretch;
  align-content: center;
}

.dashboard-account-governance-setup-grid > .dashboard-account-governance-demo {
  grid-column: span 7;
  min-height: 0;
  height: auto;
  align-self: start;
}

.dashboard-account-governance-setup-grid.without-demo > .dashboard-account-create-panel,
.dashboard-account-governance-setup-grid > :is(.dashboard-account-governance-applications-panel, .dashboard-account-governance-roles-panel) {
  grid-column: 1 / -1;
}

.dashboard-account-governance-setup-grid .dashboard-account-create-panel,
.dashboard-account-governance-setup-grid .dashboard-account-governance-demo,
.dashboard-account-governance-setup-grid .dashboard-account-governance-panel {
  gap: .72rem;
  padding: clamp(.78rem, 1.2vw, 1rem);
  border-radius: 1rem;
}

.dashboard-account-governance-setup-grid .dashboard-account-create-panel {
  grid-template-columns: minmax(0, 1fr);
}

.dashboard-account-governance-applications-panel .dashboard-account-application-list {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 34rem), 1fr));
  align-items: start;
}

.dashboard-account-governance-roles-panel .dashboard-governance-account-list {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 46rem), 1fr));
  align-items: start;
}

.dashboard-account-governance-setup-grid .dashboard-account-application,
.dashboard-account-governance-setup-grid .dashboard-governance-account-row {
  padding: .72rem;
}

.dashboard-account-governance-setup-grid .dashboard-governance-account-row > * {
  min-width: 0;
}

.dashboard-governance-account-company {
  color: #64748b;
  opacity: .86;
}

.dashboard-account-governance-analytics-area {
  gap: .75rem;
}

.dashboard-account-governance-analytics-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .2rem .25rem;
}

.dashboard-account-governance-analytics-head > div {
  min-width: 0;
}

.dashboard-account-governance-analytics-head span,
.dashboard-account-governance-analytics-directory > header span {
  color: #2563eb;
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.dashboard-account-governance-analytics-head h2 {
  margin: .12rem 0 .2rem;
  color: #172033;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
}

.dashboard-account-governance-analytics-head p {
  max-width: 78rem;
  margin: 0;
  color: #64748b;
  font-size: .8rem;
  font-weight: 650;
  line-height: 1.42;
}

.dashboard-account-governance-analytics-count {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: baseline;
  gap: .3rem;
  padding: .42rem .62rem;
  border: 1px solid rgba(59, 130, 246, .2);
  border-radius: 99px;
  background: rgba(239, 246, 255, .86);
  color: #475569 !important;
  font-size: .72rem !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.dashboard-account-governance-analytics-count strong {
  color: #1d4ed8;
  font-size: .84rem;
}

.dashboard-account-governance-analytics-layout {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(16rem, 20rem) minmax(0, 1fr);
  gap: .8rem;
  align-items: start;
}

.dashboard-account-governance-analytics-layout > * {
  min-width: 0;
}

.dashboard-account-governance-analytics-directory {
  overflow-y: auto;
  min-width: 0;
  max-height: calc(100dvh - 16rem);
  position: sticky;
  top: 0;
  display: grid;
  align-content: start;
  gap: .58rem;
  padding: .68rem;
  border: 1px solid rgba(148, 163, 184, .3);
  border-radius: .92rem;
  background: rgba(255, 255, 255, .9);
  scrollbar-gutter: stable;
}

.dashboard-account-governance-analytics-directory > header {
  min-width: 0;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: .5rem;
}

.dashboard-account-governance-analytics-directory > header > div {
  min-width: 0;
  display: grid;
  gap: .08rem;
}

.dashboard-account-governance-analytics-directory > header strong {
  color: #172033;
  font-size: .9rem;
}

.dashboard-account-governance-analytics-directory > header small {
  flex: 0 0 auto;
  color: #64748b;
  font-size: .68rem;
  font-weight: 750;
}

.dashboard-account-governance-analytics-search {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: .45rem;
  padding: 0 .55rem;
  border: 1px solid #cbd5e1;
  border-radius: .68rem;
  background: #fff;
  color: #64748b;
}

.dashboard-account-governance-analytics-search svg {
  width: .95rem;
  height: .95rem;
}

.dashboard-account-governance-analytics-search input {
  width: 100%;
  min-width: 0;
  min-height: 2.65rem;
  padding: .55rem 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #172033;
  font: inherit;
  font-size: .78rem;
  font-weight: 700;
}

.dashboard-account-governance-analytics-search:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .14);
}

.dashboard-account-governance-analytics-accounts {
  min-width: 0;
  display: grid;
  gap: .38rem;
}

.dashboard-account-governance-analytics-account {
  min-width: 0;
  min-height: 3.55rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .55rem;
  padding: .48rem .52rem;
  border: 1px solid #e2e8f0;
  border-radius: .72rem;
  background: #fff;
  color: #172033;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.dashboard-account-governance-analytics-account > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: .02rem;
}

.dashboard-account-governance-analytics-account :is(strong, small, em) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-account-governance-analytics-account strong {
  font-size: .8rem;
}

.dashboard-account-governance-analytics-account :is(small, em) {
  color: #64748b;
  font-size: .68rem;
  font-style: normal;
  font-weight: 650;
}

.dashboard-account-governance-analytics-account > i {
  padding: .22rem .4rem;
  border-radius: 99px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: .65rem;
  font-style: normal;
  font-weight: 850;
}

.dashboard-account-governance-analytics-account[aria-selected="true"] {
  border-color: rgba(37, 99, 235, .5);
  background: linear-gradient(145deg, #eff6ff, #fff);
  box-shadow: inset 3px 0 #2563eb;
}

.dashboard-account-governance-analytics-account:is(:hover, :focus-visible) {
  border-color: #60a5fa;
}

.dashboard-account-governance-analytics-account:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .18);
  outline-offset: 1px;
}

.dashboard-account-governance-analytics-no-results {
  margin: 0;
  padding: .85rem .55rem;
  color: #64748b;
  font-size: .76rem;
  font-weight: 700;
  text-align: center;
}

.dashboard-account-governance-analytics-detail {
  min-width: 0;
}

.dashboard-account-governance-analytics-empty {
  min-width: 0;
  min-height: min(28rem, 52vh);
  display: grid;
  grid-template-columns: auto minmax(0, 34rem);
  place-content: center;
  align-items: start;
  gap: .85rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px dashed rgba(96, 165, 250, .42);
  border-radius: 1rem;
  background: rgba(255, 255, 255, .72);
}

.dashboard-account-governance-analytics-empty > span {
  display: grid;
  place-items: center;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: .82rem;
  background: #dbeafe;
  color: #2563eb;
}

.dashboard-account-governance-analytics-empty h3 {
  margin: .1rem 0 .28rem;
  color: #172033;
  font-size: 1.05rem;
}

.dashboard-account-governance-analytics-empty small {
  color: #2563eb;
  font-weight: 850;
  text-transform: uppercase;
}

.dashboard-account-governance-analytics-empty p {
  margin: 0;
  color: #64748b;
  font-size: .82rem;
  font-weight: 650;
  line-height: 1.5;
}

.dashboard-account-governance-analytics-area .dashboard-account-intelligence .dashboard-account-intelligence-metrics,
.dashboard-account-governance-analytics-area .dashboard-account-intelligence .dashboard-account-intelligence-kpis {
  grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
}

.dashboard-account-intelligence-overview-grid > * {
  min-width: 0;
}

.dashboard-account-governance-analytics-area .dashboard-account-intelligence-identity p {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

html[data-theme="dark"] .dashboard-account-governance-area-nav {
  background: rgba(29, 30, 34, .96);
  border-color: rgba(234, 234, 236, .18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}

html[data-theme="dark"] .dashboard-account-governance-message {
  border-color: rgba(96, 165, 250, .3);
  background: rgba(30, 64, 175, .2);
  color: #bfdbfe;
}

html[data-theme="dark"] .dashboard-account-governance-filters {
  border-color: rgba(234, 234, 236, .18);
  background: rgba(17, 18, 21, .9);
}

html[data-theme="dark"] .dashboard-account-governance-filters button {
  color: #cbd5e1;
}

html[data-theme="dark"] .dashboard-account-governance-filters button.active {
  background: rgba(30, 64, 175, .34);
  color: #fff;
}

html[data-theme="dark"] .dashboard-account-governance-area-nav > button {
  color: #cbd5e1;
}

html[data-theme="dark"] .dashboard-account-governance-area-nav > button :is(strong, small) {
  color: inherit;
}

html[data-theme="dark"] .dashboard-account-governance-area-nav > button[aria-selected="true"] {
  color: #fff;
  background: linear-gradient(145deg, rgba(30, 64, 175, .94), rgba(8, 145, 178, .72));
  border-color: rgba(147, 197, 253, .54);
  box-shadow: 0 7px 18px rgba(30, 64, 175, .24);
}

html[data-theme="dark"] :is(.dashboard-account-governance-area-panel, .dashboard-account-governance-analytics-directory) {
  border-color: rgba(234, 234, 236, .17);
  background: rgba(27, 28, 32, .94);
}

html[data-theme="dark"] :is(
  .dashboard-account-governance-analytics-head h2,
  .dashboard-account-governance-analytics-directory > header strong,
  .dashboard-account-governance-analytics-account strong,
  .dashboard-account-governance-analytics-empty h3
) {
  color: #f8fafc;
}

html[data-theme="dark"] :is(
  .dashboard-account-governance-analytics-head > div > span,
  .dashboard-account-governance-analytics-directory > header span,
  .dashboard-account-governance-panel-head > div > span,
  .dashboard-account-governance-summary small
) {
  color: #93c5fd;
}

html[data-theme="dark"] :is(
  .dashboard-account-governance-analytics-head p,
  .dashboard-account-governance-analytics-directory > header small,
  .dashboard-account-governance-analytics-account :is(small, em),
  .dashboard-account-governance-analytics-empty p,
  .dashboard-governance-account-company
) {
  color: #cbd5e1;
}

html[data-theme="dark"] .dashboard-account-governance-analytics-directory input,
html[data-theme="dark"] .dashboard-account-governance-analytics-search {
  border-color: rgba(234, 234, 236, .18);
  background: rgba(17, 18, 21, .92);
  color: #f8fafc;
}

html[data-theme="dark"] .dashboard-account-governance-analytics-account {
  border-color: rgba(234, 234, 236, .14);
  background: rgba(17, 18, 21, .82);
  color: #f8fafc;
}

html[data-theme="dark"] .dashboard-account-governance-analytics-account[aria-selected="true"] {
  border-color: rgba(147, 197, 253, .5);
  background: rgba(30, 64, 175, .3);
  box-shadow: inset 3px 0 #60a5fa;
}

html[data-theme="dark"] :is(.dashboard-account-governance-analytics-empty, .dashboard-account-governance-analytics-count) {
  border-color: rgba(96, 165, 250, .26);
  background: rgba(17, 18, 21, .76);
  color: #cbd5e1 !important;
}

@media (max-width: 1200px) {
  .dashboard-account-governance-setup-grid > :is(.dashboard-account-create-panel, .dashboard-account-governance-demo) {
    grid-column: 1 / -1;
  }

  .dashboard-account-governance-analytics-layout {
    grid-template-columns: minmax(14rem, 17rem) minmax(0, 1fr);
  }

  .dashboard-account-governance-roles-panel .dashboard-governance-account-list,
  .dashboard-account-governance-applications-panel .dashboard-account-application-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .dashboard-account-governance-analytics-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-account-governance-analytics-directory {
    position: static;
    max-height: 16rem;
  }

  .dashboard-account-governance-analytics-accounts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .dashboard-account-governance-setup-grid,
  .dashboard-account-governance-analytics-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-account-governance-area-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-account-governance-area-nav > button {
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 3.15rem;
    padding: .5rem;
  }

  .dashboard-account-governance-area-nav > button strong {
    overflow: visible;
    font-size: .78rem;
    line-height: 1.15;
    text-overflow: clip;
    white-space: normal;
  }

  .dashboard-account-governance-area-nav > button small {
    display: none;
  }

  .dashboard-account-governance-analytics-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-account-governance-analytics-count {
    align-self: flex-start;
  }

  .dashboard-account-governance-analytics-accounts {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 480px) {
  .dashboard-account-governance-area-nav > button {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
  }

  .dashboard-account-governance-area-nav > button > span {
    display: none;
  }
}

@media (max-width: 620px) {
  .dashboard-account-governance-scroll {
    padding: .62rem;
  }

  .dashboard-account-governance-area-panel {
    padding: .55rem;
  }

  .dashboard-account-governance-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .35rem;
  }

  .dashboard-account-governance-summary > span {
    grid-template-columns: minmax(0, 1fr);
    gap: .12rem;
    padding: .5rem;
  }

  .dashboard-account-governance-summary small {
    font-size: .6rem;
  }

  .dashboard-account-governance-analytics-directory {
    max-height: none;
    overflow: visible;
  }

  .dashboard-account-governance-analytics-empty {
    min-height: 15rem;
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-account-governance-setup-grid .dashboard-account-governance-panel,
  .dashboard-account-governance-setup-grid .dashboard-account-create-panel,
  .dashboard-account-governance-setup-grid .dashboard-account-governance-demo {
    padding: .68rem;
  }
}

@media (forced-colors: active) {
  .dashboard-account-governance-area-nav > button[aria-selected="true"],
  .dashboard-account-governance-analytics-account[aria-selected="true"] {
    border: 2px solid Highlight;
  }
}

/* Customer commissioning report: coherent dark screen, canonical light print. */
@media screen {
  body[data-page="commissioning-report"] .commissioning-share-shell {
    max-width: 1560px;
  }

  body[data-page="commissioning-report"] .commissioning-customer-section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  body[data-page="commissioning-report"] .commissioning-share-brand > :is(span, strong, small) {
    grid-column: 2;
  }

  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] {
    --report-colour-paper: #14171c;
    --report-colour-panel: #1c2027;
    --report-colour-heading: #f4f7fb;
    --report-colour-text: #d7dee8;
    --report-colour-muted: #b8c1ce;
    --report-colour-accent: #60a5fa;
    --report-colour-accent-soft: rgba(10, 132, 255, .15);
    --report-colour-border: rgba(232, 238, 247, .16);
    min-height: 100vh;
    background:
      radial-gradient(circle at 9% 10%, rgba(37, 99, 235, .16), transparent 34%),
      linear-gradient(180deg, #08090b 0%, #0c0f14 100%);
    color: var(--report-colour-text);
    color-scheme: dark;
    font-size: 12px;
  }

  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"]::before,
  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"]::after {
    background: none;
  }

  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-share-toolbar {
    border-color: var(--report-colour-border);
    background: rgba(20, 22, 27, .94);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .34);
  }

  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-share-brand strong,
  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-share-document h1,
  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-share-document h2,
  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-share-document h3,
  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-customer-overview-list dd,
  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-customer-map-empty-state strong,
  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-customer-map-copy strong,
  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-customer-intro strong,
  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-check-conditions strong,
  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-uploaded-files-card-head strong {
    color: var(--report-colour-heading);
  }

  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-share-brand :is(small, span),
  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-share-status,
  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-customer-section-head p,
  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-customer-map-copy p,
  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-customer-intro small,
  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-check-conditions em,
  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-action-muted,
  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-witness-line,
  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-empty {
    color: var(--report-colour-muted);
  }

  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-share-brand span,
  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-customer-section-head span,
  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-customer-overview-list dt,
  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-customer-map-copy span,
  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-check-conditions > span {
    color: var(--report-colour-accent);
  }

  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-share-document,
  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-share-empty {
    border-color: var(--report-colour-border);
    background: rgba(20, 23, 28, .98);
    box-shadow: 0 22px 58px rgba(0, 0, 0, .34);
  }

  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-customer-overview-list,
  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-customer-map-card {
    border-color: var(--report-colour-border);
    background: linear-gradient(180deg, rgba(28, 32, 39, .98), rgba(20, 23, 28, .96));
    box-shadow: 0 14px 36px rgba(0, 0, 0, .22);
  }

  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-customer-overview-list > div {
    display: block;
    border-color: var(--report-colour-border);
    background: rgba(255, 255, 255, .045);
    color: var(--report-colour-text);
  }

  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-customer-overview-list dd {
    text-align: left;
  }

  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-customer-map-visual {
    border-color: rgba(96, 165, 250, .28);
    background:
      linear-gradient(90deg, rgba(96, 165, 250, .1) 1px, transparent 1px),
      linear-gradient(0deg, rgba(96, 165, 250, .1) 1px, transparent 1px),
      radial-gradient(circle at 55% 42%, rgba(37, 99, 235, .25), transparent 21%),
      linear-gradient(135deg, #111820, #182231);
    background-size: 42px 42px, 42px 42px, auto, auto;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .045);
  }

  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-customer-intro > div,
  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-customer-explainer,
  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-summary-card,
  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-check-conditions,
  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-uploaded-files-card,
  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-evidence-file,
  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-client-acceptance,
  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-empty {
    border-color: var(--report-colour-border);
    background: var(--report-colour-panel);
  }

  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-area {
    border-color: var(--report-colour-border);
    background: var(--report-colour-paper);
  }

  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-area-head {
    border-color: var(--report-colour-border);
    background: var(--report-colour-accent-soft);
  }

  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-zone {
    border-color: var(--report-colour-border);
    background: var(--report-colour-paper);
  }

  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-action-report-table {
    border-color: var(--report-colour-border);
    background: var(--report-colour-paper);
  }

  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-share-document th {
    border-color: var(--report-colour-border);
    background: var(--report-colour-accent-soft);
    color: var(--report-colour-heading);
  }

  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-share-document td {
    border-color: var(--report-colour-border);
    background: var(--report-colour-paper);
    color: var(--report-colour-text);
  }

  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-task-checklist-row td {
    border-color: var(--report-colour-border);
    background: #171b21;
  }

  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-uploaded-files-row td {
    border-color: var(--report-colour-border);
    background: var(--report-colour-paper);
  }

  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-evidence-file,
  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-evidence-file span {
    color: var(--report-colour-text);
  }

  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-evidence-file.is-document,
  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-evidence-file.is-document span {
    border-color: rgba(252, 165, 165, .34);
    background: rgba(127, 29, 29, .2);
    color: #fecaca;
  }

  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-client-sign-grid input {
    border-color: var(--report-colour-border);
    background: #10141a;
    color: var(--report-colour-heading);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
  }

  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-client-sign-confirm input[type="checkbox"] {
    border-color: rgba(147, 197, 253, .65);
    background: #10141a;
  }

  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-status {
    border-color: rgba(251, 191, 36, .3);
    background: rgba(245, 158, 11, .16);
    color: #fcd34d;
  }

  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-status.complete {
    border-color: rgba(134, 239, 172, .28);
    background: rgba(34, 197, 94, .14);
    color: #86efac;
  }

  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-badge {
    border-color: rgba(96, 165, 250, .28);
    background: rgba(37, 99, 235, .2);
    color: #bfdbfe;
  }

  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-badge.gas {
    background: rgba(245, 158, 11, .16);
    color: #fcd34d;
  }

  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-badge.ventilation {
    background: rgba(16, 185, 129, .16);
    color: #a7f3d0;
  }

  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-badge.public-health {
    background: rgba(14, 165, 233, .17);
    color: #bae6fd;
  }

  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-badge.electrical {
    background: rgba(139, 92, 246, .18);
    color: #ddd6fe;
  }

  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-badge.controls {
    background: rgba(236, 72, 153, .16);
    color: #fbcfe8;
  }

  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-share-toolbar .settings-mini-btn {
    border-color: var(--report-colour-border);
    background: #1c232d;
    color: var(--report-colour-heading);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .22);
  }

  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-share-toolbar .settings-mini-btn:hover,
  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-share-toolbar .settings-mini-btn:focus-visible {
    border-color: rgba(96, 165, 250, .56);
    background: #243143;
    color: #fff;
  }

  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .report-company-logo,
  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .report-company-logo-placeholder {
    border-color: rgba(232, 238, 247, .22);
    border-radius: 8px;
    background: #fff;
    color: #475569;
  }
}

@media screen and (max-width: 760px) {
  body[data-page="commissioning-report"] .commissioning-share-brand {
    width: 100%;
  }

  body[data-page="commissioning-report"] .commissioning-share-brand strong {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  body[data-page="commissioning-report"] .commissioning-share-document .report-header {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-page="commissioning-report"] .commissioning-share-document .report-company-box {
    justify-items: start;
    text-align: left;
  }

  body[data-page="commissioning-report"] .commissioning-share-document table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }

  body[data-page="commissioning-report"] .commissioning-area {
    overflow: visible;
  }

  body[data-page="commissioning-report"] .commissioning-client-sign-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-page="commissioning-report"] .commissioning-client-sign-actions,
  body[data-page="commissioning-report"] .commissioning-client-sign-actions button,
  body[data-page="commissioning-report"] .commissioning-share-toolbar-actions {
    width: 100%;
  }
}

@media print {
  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] {
    --report-colour-paper: #fff;
    --report-colour-panel: #f8fafc;
    --report-colour-heading: #0f172a;
    --report-colour-text: #334155;
    --report-colour-muted: #64748b;
    --report-colour-accent: #075fc6;
    --report-colour-accent-soft: #eef7ff;
    --report-colour-border: #dbe6f3;
    background: #fff;
    color: #334155;
    color-scheme: light;
  }

  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"]::before,
  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"]::after {
    display: none !important;
  }

  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-share-document.report-page {
    background: #fff;
    color: #334155;
  }

  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-customer-overview-list > div {
    display: block;
    background: #fff;
    color: #334155;
  }

  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-customer-overview-list dd {
    color: #0f172a;
    text-align: left;
  }

  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] .commissioning-client-sign-grid input {
    border-color: #dbe6f3;
    background: #fff;
    color: #0f172a;
    box-shadow: none;
  }
}

@media screen {
  html[data-theme="dark"][data-page="commissioning-report"] body[data-page="commissioning-report"] {
    background:
      radial-gradient(circle at 9% 10%, rgba(37, 99, 235, .16), transparent 34%),
      #08090b;
    color: #d7dee8;
  }
}

/* Installer dashboard: a dense, project-grouped view of every personal assignment. */
.dashboard-app-icon-my-day {
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.54), transparent 30%),
    linear-gradient(145deg, rgba(0, 113, 227, 0.98), rgba(20, 184, 166, 0.76));
}

.dashboard-my-day-workspace {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
  min-height: 0;
  padding: 0 clamp(14px, 2vw, 28px) 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 10% 0%, rgba(0, 113, 227, 0.11), transparent 32%),
    radial-gradient(circle at 90% 6%, rgba(20, 184, 166, 0.09), transparent 28%),
    var(--theme-page-bg);
}

.dashboard-my-day-header {
  width: min(1480px, 100%);
  margin: 0 auto;
}

.dashboard-my-day-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
}

.dashboard-my-day-layout {
  display: grid;
  align-content: start;
  gap: 12px;
  width: min(1480px, 100%);
  min-width: 0;
  min-height: 0;
  margin: 0 auto;
  padding: 2px 2px 24px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.dashboard-my-day-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-my-day-summary > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-solid) 94%, transparent);
  box-shadow: 0 8px 22px rgba(20, 20, 22, 0.06);
}

.dashboard-my-day-summary span,
.dashboard-my-day-project-card > header > div:first-child > span,
.dashboard-my-day-task-copy > span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.dashboard-my-day-summary strong {
  color: var(--text);
  font-size: 24px;
  font-weight: 930;
  line-height: 1;
}

.dashboard-my-day-message {
  margin: 0;
  padding: 9px 12px;
  border: 1px solid color-mix(in srgb, var(--blue) 25%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--blue) 7%, var(--surface-solid));
  color: var(--muted);
  font-size: 12px;
  font-weight: 740;
}

.dashboard-my-day-message.is-warning {
  border-color: rgba(245, 158, 11, 0.4);
  background: color-mix(in srgb, #f59e0b 9%, var(--surface-solid));
  color: color-mix(in srgb, #b45309 82%, var(--text));
}

.dashboard-my-day-project-list {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.dashboard-my-day-project-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface-solid) 96%, transparent);
  box-shadow: 0 12px 30px rgba(20, 20, 22, 0.07);
}

.dashboard-my-day-project-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--blue) 5%, var(--surface-solid));
}

.dashboard-my-day-project-card h2 {
  margin: 3px 0 2px;
  color: var(--text);
  font-size: 18px;
  font-weight: 920;
  line-height: 1.15;
}

.dashboard-my-day-project-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 680;
  line-height: 1.4;
}

.dashboard-my-day-project-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.dashboard-my-day-project-actions small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
}

.dashboard-my-day-project-actions button,
.dashboard-my-day-task-action button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--blue-border);
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11.5px;
  font-weight: 900;
}

.dashboard-my-day-task-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dashboard-my-day-task {
  display: grid;
  grid-template-columns: minmax(155px, 0.48fr) minmax(240px, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 12px 16px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
}

.dashboard-my-day-task:last-child {
  border-bottom: 0;
}

.dashboard-my-day-task-time,
.dashboard-my-day-task-copy,
.dashboard-my-day-task-action {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.dashboard-my-day-task-time strong,
.dashboard-my-day-task-copy > strong {
  color: var(--text);
  font-size: 12.5px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.dashboard-my-day-task-time small,
.dashboard-my-day-task-copy small,
.dashboard-my-day-task-action small {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 690;
  line-height: 1.35;
}

.dashboard-my-day-task-action {
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: end;
  gap: 10px;
}

.dashboard-my-day-task.is-complete,
.dashboard-my-day-task.is-completed,
.dashboard-my-day-task.is-closed {
  opacity: 0.7;
}

.dashboard-my-day-no-tasks,
.dashboard-my-day-empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-height: 120px;
  padding: 22px;
  color: var(--muted);
  text-align: center;
}

.dashboard-my-day-no-tasks strong,
.dashboard-my-day-empty strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 880;
}

.dashboard-my-day-no-tasks span,
.dashboard-my-day-empty p {
  max-width: 620px;
  margin: 0;
  font-size: 12px;
  font-weight: 680;
  line-height: 1.45;
}

.dashboard-my-day-empty > svg {
  width: 36px;
  height: 36px;
  color: var(--blue);
}

.dashboard-my-day-loading {
  width: 28px;
  height: 28px;
  border: 3px solid color-mix(in srgb, var(--blue) 18%, transparent);
  border-top-color: var(--blue);
  border-radius: 999px;
  animation: dashboard-my-day-spin 720ms linear infinite;
}

@keyframes dashboard-my-day-spin {
  to { transform: rotate(360deg); }
}

html[data-theme="dark"] .dashboard-my-day-workspace {
  background:
    radial-gradient(circle at 10% 0%, rgba(37, 99, 235, 0.16), transparent 32%),
    radial-gradient(circle at 90% 6%, rgba(20, 184, 166, 0.1), transparent 28%),
    linear-gradient(180deg, rgba(24, 25, 28, 0.98), rgba(8, 9, 11, 0.99));
}

html[data-theme="dark"] :is(
  .dashboard-my-day-summary > div,
  .dashboard-my-day-project-card
) {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(24, 25, 28, 0.78);
}

html[data-theme="dark"] .dashboard-my-day-project-card > header {
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(35, 36, 40, 0.72);
}

@media (max-width: 840px) {
  .dashboard-my-day-workspace {
    padding: 0 12px 16px;
    overflow: auto;
  }

  .dashboard-my-day-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-my-day-header .dashboard-product-library-header-actions {
    width: 100%;
  }

  .dashboard-my-day-layout {
    overflow: visible;
  }

  .dashboard-my-day-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-my-day-task {
    grid-template-columns: minmax(130px, 0.42fr) minmax(0, 1fr);
  }

  .dashboard-my-day-task-action {
    grid-column: 1 / -1;
    justify-content: end;
  }
}

@media (max-width: 560px) {
  .dashboard-my-day-workspace {
    padding-inline: 8px;
  }

  .dashboard-my-day-header .dashboard-product-library-header-actions,
  .dashboard-my-day-project-card > header,
  .dashboard-my-day-project-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-my-day-header .dashboard-product-library-header-actions button,
  .dashboard-my-day-project-actions button,
  .dashboard-my-day-task-action button {
    width: 100%;
    min-height: 44px;
  }

  .dashboard-my-day-summary,
  .dashboard-my-day-task {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-my-day-task-action {
    grid-column: auto;
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-my-day-loading {
    animation-duration: 1.6s;
  }
}

.my-day-proposal-message {
  margin: 0 0 10px;
  padding: 9px 12px;
  border: 1px solid var(--border-color, #b6cee9);
  border-radius: 9px;
  background: var(--panel-bg, #eef6ff);
  color: var(--text-primary, #17263a);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.my-day-proposal-delta { display: grid; gap: 7px; margin: 10px 0; font-size: 12px; }
.my-day-proposal-delta ul { margin: 6px 0; padding-left: 18px; max-height: 170px; overflow: auto; }
.my-day-proposal-delta li { padding: 3px 0; overflow-wrap: anywhere; }
.my-day-proposal-delta button { justify-self: start; min-height: 32px; padding: 5px 10px; }
.my-day-proposal-property-diff { margin: 6px 0 10px; display: grid; gap: 4px; }
.my-day-proposal-property-diff > div { display: grid; grid-template-columns: minmax(75px, 1fr) minmax(0, 2fr); gap: 8px; border-top: 1px solid var(--line); padding-top: 4px; }
.my-day-proposal-property-diff dt { font-weight: 650; overflow-wrap: anywhere; }
.my-day-proposal-property-diff dd { margin: 0; display: flex; flex-wrap: wrap; gap: 5px; overflow-wrap: anywhere; }
.my-day-proposal-property-diff .is-before { opacity: .75; }
.my-day-proposal-property-diff .is-after { font-weight: 650; }
.my-day-proposal-recording-banner { position: fixed; z-index: 1250; right: 88px; bottom: 90px; display: grid; gap: 7px; width: min(365px, calc(100vw - 112px)); max-height: min(220px, 40vh); overflow: auto; padding: 11px 13px; border: 1px solid #e6a23d; border-left: 4px solid #d97706; border-radius: 12px; background: var(--surface-solid, #fff); color: var(--text, #172033); box-shadow: 0 5px 24px rgba(15,23,42,.16); font: 12px/1.4 inherit; }
.my-day-proposal-recording-banner strong, .my-day-proposal-recording-banner small { display: block; overflow-wrap: anywhere; }
.my-day-proposal-recording-banner strong { font-size: 13px; }
.my-day-proposal-recording-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.my-day-proposal-recording-actions button { min-height: 32px; padding: 5px 10px; font-size: 12px; }
@media (max-width: 600px) { .my-day-proposal-recording-banner { left: 12px; right: 72px; bottom: 82px; width: auto; } }
.my-day-proposal-saving {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgb(15 23 42 / 76%);
  color: white;
  font: 600 16px/1.5 system-ui, sans-serif;
  cursor: progress;
}

/* High-traffic menus: keep the themed gradient and borders, but do not sample
   the canvas through a full-screen blur and then blur that texture again in
   every scrolling pane/input. Only the short open/close transition needs a
   compositing hint; retaining it for an entire catalogue wastes large layers. */
html :is(.project-settings-popover, .export-popover, .product-library-popover) {
  --glass-blur: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background-color: var(--surface-solid);
  filter: none;
  will-change: auto;
}

html[data-theme="dark"] :is(.project-settings-popover, .export-popover, .product-library-popover) {
  background-color: var(--surface-solid);
}

/* The catalogue filter labels otherwise retain a hard-coded light-theme slate. */
html[data-theme="dark"] .product-library-popover :is(.product-search, .product-filter-grid label) {
  color: var(--muted);
}

html :is(.project-settings-popover, .export-popover, .product-library-popover).tile-opening {
  animation-name: menuSurfaceIn;
  will-change: transform, opacity;
}

html :is(.project-settings-popover, .export-popover, .product-library-popover).tile-closing {
  animation-name: menuSurfaceOut;
  will-change: transform, opacity;
}

@keyframes menuSurfaceIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes menuSurfaceOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-6px); }
}

/* These image/brand surfaces use fixed blur values instead of --glass-blur. */
html .product-library-popover :is(.product-photo-image, .product-photo-brand) {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* The previous dark treatment filtered and faded each entire drawing, then
   dimmed it again with an overlay. Reuse that non-interactive overlay alone:
   roughly the same contrast without resampling large canvas/WebGL layers.
   Direct-child backdrops keep unrelated menus and nested dialogs unchanged. */
html .studio-shell.workspace-popup-active:has(> :is(.settings-backdrop, .export-backdrop, .product-library-backdrop)) :is(.schematic-stage, .canvas-scroll, .three-workspace, .minimap) {
  filter: none;
  opacity: 1;
  transition: none;
}

html[data-theme="dark"] .studio-shell.workspace-popup-active:has(> :is(.settings-backdrop, .export-backdrop, .product-library-backdrop)) :is(.schematic-stage, .canvas-scroll, .three-workspace, .minimap)::after {
  background: rgba(0, 0, 0, 0.8);
}

/* Column interpolation repeatedly lays out the full product catalogue. Keep
   the existing responsive/collapsed layouts, switching between them once. */
html .product-library-popover .product-library-body {
  transition: none;
  overscroll-behavior: contain;
}

/* Product-first catalogue: keep discovery prominent and reveal technical detail on demand. */
.studio-shell.product-library-open .floor-multi-edit-panel { display: none !important; }
.product-library-backdrop { z-index: 220; }
html .product-library-popover {
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  background: var(--surface-solid, #fff);
}
html .product-library-popover .product-library-body,
html .product-library-popover .product-library-body.sidebar-collapsed {
  position: relative;
  grid-template-columns: 188px minmax(0, 1fr);
  gap: 10px;
}
.product-library-popover .product-library-rail,
.product-library-popover .product-library-main {
  background: var(--surface-solid, #fff);
  border-color: var(--line);
  box-shadow: none;
  backdrop-filter: none;
}
.product-library-popover .product-library-rail { padding: 9px; }
.product-library-popover .product-library-rail-head { padding: 2px 5px 5px; }
.product-library-popover .product-category-list { gap: 3px; }
.product-library-popover .product-category-card {
  grid-template-columns: 22px minmax(0, 1fr) auto;
  min-height: 34px;
  padding: 6px 7px;
  border-color: transparent;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
}
.product-library-popover .product-category-card i svg { width: 17px; height: 17px; }
.product-library-popover .product-category-card strong { font-size: 11px; }
.product-library-popover .product-category-card small { display: none; }
.product-library-popover .product-category-card em {
  min-width: 0;
  height: auto;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
}
.product-library-popover .product-category-card.active,
.product-library-popover .product-category-card:hover {
  background: var(--blue-soft);
  border-color: var(--blue-border);
  box-shadow: none;
  transform: none;
}
.product-library-popover .product-library-sidebar-subcategories { gap: 2px; margin-left: 9px; padding-left: 6px; }
.product-library-popover .product-library-main { padding: 11px 14px 18px; }
.product-library-popover .product-subcategory-tabs-main { display: flex; flex-wrap: wrap; }
.product-library-popover .product-finder-search-row {
  position: static;
  z-index: 3;
  top: -11px;
  align-items: end;
  gap: 9px;
  margin: 0 0 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--blue-soft);
}
.product-library-popover .product-finder-search-row .product-search {
  min-width: 0;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.product-library-popover .product-finder-search-control {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  height: 39px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-solid, #fff);
  color: var(--blue);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.product-library-popover .product-finder-search-control:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 14%, transparent);
}
.product-library-popover .product-finder-search-control svg {
  flex: none;
  width: 16px;
  height: 16px;
}
.product-library-popover .product-finder-search-row .product-finder-search-control input {
  flex: 1;
  width: 100%;
  min-width: 0;
  height: 37px;
  /* The later menu control stylesheet otherwise creates a second box here. */
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}
.product-library-popover .product-finder-search-row .product-finder-search-control input:focus {
  border: 0;
  outline: 0;
  box-shadow: none;
}
.product-library-popover .product-finder-search-control input::placeholder {
  color: var(--muted);
  opacity: 1;
  font-weight: 500;
}
.product-library-popover .product-finder-search-row .product-finder-filter-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 39px;
  height: 39px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-solid, #fff);
  box-shadow: none;
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
}
.product-library-popover .product-finder-search-row .product-finder-filter-toggle svg {
  width: 15px;
  height: 15px;
  color: var(--blue);
}
.product-library-popover .product-finder-search-row .product-finder-filter-toggle[aria-expanded="true"] {
  border-color: var(--blue-border);
  background: var(--surface-solid, #fff);
  color: var(--blue);
}
.product-finder-quick-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.product-finder-view-tabs { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--blue-soft); }
.product-finder-view-tabs button { min-height: 30px; padding: 4px 10px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font: inherit; font-size: 11px; font-weight: 750; cursor: pointer; }
.product-finder-view-tabs button[aria-pressed="true"] { background: var(--surface-solid, #fff); color: var(--blue); box-shadow: 0 2px 6px #14284619; }
.product-finder-sort { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 700; }
.product-finder-sort select { min-height: 32px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-solid, #fff); color: var(--text, #172033); font: inherit; }
.product-finder-active-filters { display: flex; flex-wrap: wrap; gap: 5px; }
.product-finder-active-filters button { padding: 5px 8px; border: 1px solid var(--blue-border); border-radius: 999px; background: var(--blue-soft); color: var(--blue); font: inherit; font-size: 10px; font-weight: 700; cursor: pointer; }
.product-finder-active-filters .product-finder-clear-all { border-color: transparent; background: transparent; color: var(--muted); }
.product-library-search-suggestion { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px; margin-top: 10px; color: var(--text); font-size: 12px; font-weight: 700; }
.product-library-search-suggestion button { padding: 3px 6px; border: 0; border-radius: 6px; background: var(--blue-soft); color: var(--blue); font: inherit; font-weight: 850; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.product-library-search-suggestion button:hover, .product-library-search-suggestion button:focus-visible { background: var(--blue-border); outline: 2px solid var(--blue); outline-offset: 2px; }
.dashboard-product-mail-empty .product-library-search-suggestion { justify-content: flex-start; }
.product-finder-advanced-filters { padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--blue-soft); }
.product-library-popover .product-result-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); align-items: stretch; }
.product-finder-result { min-width: 0; display: grid; grid-template-rows: 1fr auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-solid, #fff); overflow: hidden; }
.product-finder-result > .product-result-card { width: 100%; min-height: 160px; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.product-finder-result > .product-result-card:hover { transform: none; box-shadow: none; }
.product-finder-result:has(> .product-result-card:hover), .product-finder-result:has(> .product-result-card.active) { border-color: var(--blue-border); box-shadow: 0 5px 16px #15305e19; }
.product-finder-result-actions { display: flex; align-items: center; gap: 3px; padding: 6px 8px; border-top: 1px solid var(--line); }
.product-finder-result-actions button { padding: 5px 7px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font: inherit; font-size: 10px; font-weight: 750; cursor: pointer; }
.product-finder-result-actions button:hover, .product-finder-result-actions button[aria-pressed="true"] { background: var(--blue-soft); color: var(--blue); }
.product-finder-result-actions span { margin-left: auto; color: var(--muted); font-size: 10px; white-space: nowrap; }
html .product-library-popover .product-detail-panel { display: none; }
html .product-library-popover .product-library-body.detail-open > .product-detail-panel {
  display: grid;
  position: absolute;
  z-index: 5;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(480px, 48%);
  height: auto;
  border-color: var(--line);
  border-radius: 12px;
  background: var(--surface-solid, #fff);
  box-shadow: -12px 0 32px #1728442a;
  backdrop-filter: none;
}
.product-finder-detail-head { position: sticky; z-index: 2; top: -12px; display: flex; align-items: center; justify-content: space-between; padding: 4px 0 9px; border-bottom: 1px solid var(--line); background: var(--surface-solid, #fff); color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.product-finder-detail-head button { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-solid, #fff); color: var(--text, #172033); font: inherit; font-size: 21px; cursor: pointer; }
.product-library-popover .product-detail-panel .product-photo { min-height: 150px; height: 180px; }
.product-library-popover .product-detail-panel .product-photo-image > img:not(.product-brand-logo) { height: 140px; }
.product-finder-model-finder:empty { display: none; }
.product-finder-compare-bar { display: flex; align-items: center; gap: 9px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-solid, #fff); }
.product-finder-compare-bar > span { display: grid; gap: 2px; min-width: 0; flex: 1; }
.product-finder-compare-bar strong { font-size: 11px; }
.product-finder-compare-bar small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.product-finder-compare-bar button { padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-solid, #fff); color: var(--blue); font: inherit; font-size: 11px; font-weight: 750; cursor: pointer; }
.product-finder-compare-bar button:disabled { opacity: .45; cursor: default; }
.product-finder-compare-overlay { position: absolute; z-index: 10; inset: 0; display: grid; place-items: center; padding: 15px; background: #14253a88; }
.product-finder-compare-sheet { display: grid; grid-template-rows: auto minmax(0,1fr); width: min(1050px, 100%); max-height: 92%; padding: 16px; border-radius: 14px; background: var(--surface-solid, #fff); color: var(--text, #172033); box-shadow: 0 20px 60px #101e3040; }
.product-finder-compare-sheet header { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.product-finder-compare-sheet header span { color: var(--blue); font-size: 11px; font-weight: 800; }
.product-finder-compare-sheet h2 { margin: 3px 0 12px; font-size: 20px; }
.product-finder-compare-sheet header button { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-solid, #fff); font-size: 22px; cursor: pointer; }
.product-finder-compare-scroll { min-height: 0; overflow: auto; }
.product-finder-compare-sheet table { width: 100%; border-collapse: collapse; font-size: 12px; }
.product-finder-compare-sheet :is(th, td) { min-width: 140px; padding: 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.product-finder-compare-sheet thead th { position: sticky; top: 0; background: var(--blue-soft); }
.product-finder-compare-sheet thead small { display: block; margin-top: 3px; color: var(--muted); }
.dashboard-product-mail-list-pane { display: flex; flex-direction: column; }
.dashboard-product-mail-list-pane > .dashboard-product-mail-list { flex: 1 1 auto; min-height: 0; }
.dashboard-product-finder-quick-row { padding: 0 14px 10px; }
.dashboard-product-mail-list-pane > .product-finder-active-filters { padding: 0 14px 9px; }
.dashboard-product-mail-list-pane > .dashboard-product-mail-filter-strip { padding-top: 4px; }
.dashboard-product-finder-item { min-width: 0; border-bottom: 1px solid var(--line); }
.dashboard-product-finder-item .dashboard-product-mail-item { width: 100%; }
.dashboard-product-finder-actions { display: flex; justify-content: flex-end; gap: 4px; padding: 2px 10px 7px; }
.dashboard-product-finder-actions button { padding: 5px 7px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--muted); font: inherit; font-size: 10px; font-weight: 750; cursor: pointer; }
.dashboard-product-finder-actions button:hover, .dashboard-product-finder-actions button[aria-pressed="true"] { border-color: var(--blue-border); background: var(--blue-soft); color: var(--blue); }
.dashboard-product-mail-list-pane > .product-finder-compare-bar { margin: 5px 9px 9px; }
.dashboard-product-mail-list-pane .product-finder-compare-overlay { position: fixed; z-index: 350; }
.dashboard-product-mail-layout,
.dashboard-product-mail-layout.sidebar-collapsed {
  position: relative;
  grid-template-columns: 188px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
}
.dashboard-product-mail-layout.sidebar-collapsed { grid-template-columns: 60px minmax(0, 1fr); }
.dashboard-product-mail-sidebar,
.dashboard-product-mail-list-pane { border: 1px solid var(--line); border-radius: 12px; background: var(--surface-solid, #fff); }
.dashboard-product-mail-sidebar { padding: 9px; }
.dashboard-product-mail-list-pane > .dashboard-product-mail-results-surface { flex: 1 1 auto; min-height: 0; }
.dashboard-product-mail-results-surface > .dashboard-product-mail-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
  align-content: start;
  gap: 10px;
  padding: 10px;
}
.dashboard-product-finder-item { display: grid; grid-template-rows: 1fr auto; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.dashboard-product-finder-item .dashboard-product-mail-item { min-height: 142px; border: 0; border-radius: 0; }
.dashboard-product-finder-item .dashboard-product-finder-actions { border-top: 1px solid var(--line); }
.dashboard-product-finder-item:has(.dashboard-product-mail-item:hover),
.dashboard-product-finder-item:has(.dashboard-product-mail-item.active) { border-color: var(--blue-border); box-shadow: 0 5px 16px #15305e19; }
.dashboard-product-mail-layout > .dashboard-product-mail-reader { display: none; }
.dashboard-product-mail-layout.detail-open > .dashboard-product-mail-reader {
  display: block;
  position: absolute;
  z-index: 6;
  top: 10px;
  right: 10px;
  bottom: 10px;
  width: min(620px, calc(100% - 218px));
  max-height: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-solid, #fff);
  box-shadow: -12px 0 32px #1728442a;
}
.dashboard-product-detail-close { width: 32px; min-width: 32px; height: 32px; padding: 0; font-size: 20px; line-height: 1; }
.product-library-popover .product-rich-description,
.dashboard-product-mail-reader .product-rich-description,
.dashboard-product-range-overlay .product-rich-description {
  display: block;
  margin: 12px 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-solid, #fff);
  box-shadow: none;
}
.product-rich-description-head { display: block; padding: 0 0 11px; border-bottom: 1px solid var(--line); }
.product-rich-description-head span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .02em; text-transform: none; }
.product-rich-description-head h3 { color: var(--text); font-size: 17px; font-weight: 800; line-height: 1.3; }
.product-rich-description-body { padding-top: 12px; font-size: 12px; font-weight: 500; line-height: 1.55; }
.product-rich-description-body > p:first-child { color: var(--text); font-size: 13px; font-weight: 650; }
.product-rich-description-body ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; padding: 0; margin: 10px 0 0; list-style: none; }
.product-rich-description-body li { display: grid; align-content: start; gap: 4px; min-width: 0; padding: 10px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--blue-soft); }
.product-rich-description-body li strong { color: var(--blue); font-size: 11px; font-weight: 800; }
.product-rich-description-body li span { color: var(--text); font-size: 11px; font-weight: 500; }
.product-finder-model-picker { grid-template-rows: auto auto minmax(0, 1fr); max-width: 680px; }
.product-finder-model-picker > input { width: 100%; min-height: 40px; margin: 0 0 10px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: var(--input-bg); font: inherit; }
.product-finder-model-list { min-height: 0; display: grid; align-content: start; gap: 6px; overflow: auto; }
.product-finder-model-list button { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 9px; width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-solid, #fff); color: var(--text); text-align: left; cursor: pointer; }
.product-finder-model-list button:hover, .product-finder-model-list button[aria-pressed="true"] { border-color: var(--blue-border); background: var(--blue-soft); }
.product-finder-model-list button strong { font-size: 12px; }
.product-finder-model-list button small { grid-column: 1; color: var(--muted); font-size: 10px; }
.product-finder-model-list button span { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--blue); font-size: 10px; font-weight: 800; }
.product-finder-detail-head > div { display: flex; align-items: center; gap: 6px; }
.product-finder-detail-head button[data-product-finder-detail-expand] { width: auto; min-width: 100px; padding: 0 9px; font-size: 11px; font-weight: 750; }
.product-finder-selected-model { display: grid; gap: 3px; margin: 8px 0; padding: 10px 12px; border: 1px solid var(--blue-border); border-radius: 10px; background: var(--blue-soft); }
.product-finder-selected-model span { color: var(--blue); font-size: 10px; font-weight: 800; }
.product-finder-selected-model strong { color: var(--text); font-size: 15px; line-height: 1.3; }
.product-finder-selected-model small { color: var(--muted); font-size: 11px; }
.product-finder-key-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 8px 0; }
.product-finder-key-facts div { min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-solid, #fff); }
.product-finder-key-facts dt { color: var(--muted); font-size: 10px; font-weight: 750; }
.product-finder-key-facts dd { margin: 4px 0 0; color: var(--text); font-size: 13px; font-weight: 800; overflow-wrap: anywhere; }
.product-finder-sizing-panel { display: grid; gap: 10px; margin: 10px 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-solid, #fff); }
.product-finder-section-heading span { color: var(--blue); font-size: 10px; font-weight: 800; }
.product-finder-section-heading h3 { margin: 2px 0 0; color: var(--text); font-size: 16px; }
.product-finder-project-context { display: grid; gap: 3px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--blue-soft); font-size: 11px; }
.product-finder-project-context strong { color: var(--text); }
.product-finder-project-context span, .product-finder-project-context small { color: var(--muted); }
.product-finder-context-warning { display: block; padding: 7px 9px; border-radius: 7px; background: #fff5e4; color: #814711; font-size: 11px; font-style: normal; font-weight: 750; }
.product-finder-sizing-result { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 150px); align-items: end; gap: 8px; }
.product-finder-sizing-result > div { display: grid; gap: 2px; }
.product-finder-sizing-result > div span, .product-finder-sizing-result > div small { color: var(--muted); font-size: 10px; }
.product-finder-sizing-result > div strong { color: var(--blue); font-size: 21px; }
.product-finder-sizing-result label { display: grid; gap: 4px; color: var(--muted); font-size: 10px; font-weight: 750; }
.product-finder-sizing-result input { width: 100%; min-height: 34px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--input-bg); color: var(--text); font: inherit; font-size: 12px; }
.product-finder-sizing-result em { grid-column: 1 / -1; color: var(--blue); font-size: 11px; font-style: normal; font-weight: 750; }
.product-finder-sizing-note { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
.product-finder-technical-details { margin: 10px 0; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-solid, #fff); }
.product-finder-technical-details > summary { padding: 12px 0; color: var(--text); font-size: 12px; font-weight: 800; cursor: pointer; }
.product-finder-technical-details[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.dashboard-product-mail-reader .dashboard-product-mail-reader-hero { align-items: start; }
.dashboard-product-mail-reader .dashboard-product-mail-reader-hero .product-photo { min-height: 178px; height: 178px; }
.dashboard-product-mail-reader .dashboard-product-mail-reader-hero .product-photo-image > img:not(.product-brand-logo) { height: 148px; }
.dashboard-product-mail-reader .dashboard-product-mail-reader-summary { gap: 8px; }
.dashboard-product-mail-reader .dashboard-product-mail-reader-summary p { font-size: 13px; font-weight: 650; }
.dashboard-product-mail-reader .product-finder-model-selector { padding-bottom: 10px; }
.dashboard-product-mail-reader .product-finder-model-selector > summary { color: var(--blue); }
html .product-library-popover .product-library-body.detail-fullscreen > .product-detail-panel,
html .dashboard-product-mail-layout.detail-fullscreen > .dashboard-product-mail-reader {
  display: block;
  position: fixed;
  z-index: 520;
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  border: 0;
  border-radius: 0;
  padding: 18px max(20px, calc((100vw - 1180px) / 2));
  background: var(--surface-solid, #fff);
  box-shadow: none;
  overflow: auto;
}
@media (max-width: 1050px) {
  html .product-library-popover .product-library-body,
  html .product-library-popover .product-library-body.sidebar-collapsed { display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: auto minmax(0,1fr); overflow: hidden; }
  .product-library-popover .product-library-rail { height: auto; max-height: 70px; overflow-x: auto; overflow-y: hidden; }
  .product-library-popover .product-library-rail-head, .product-library-popover .product-library-sidebar-subcategories { display: none; }
  .product-library-popover .product-category-list { display: flex; width: max-content; }
  .product-library-popover .product-category-card { width: auto; min-width: max-content; }
  .product-library-popover .product-library-main { min-height: 0; overflow-y: auto; }
  html .product-library-popover .product-library-body.detail-open > .product-detail-panel { width: min(540px, 94%); }
  .dashboard-product-mail-layout,
  .dashboard-product-mail-layout.sidebar-collapsed { grid-template-columns: 60px minmax(0,1fr); }
  .dashboard-product-mail-layout.detail-open > .dashboard-product-mail-reader { width: min(620px, calc(100% - 80px)); }
}

html :is(.project-settings-popover, .export-popover) {
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

@media (prefers-reduced-motion: reduce) {
  html :is(.project-settings-popover, .export-popover, .product-library-popover).tile-opening,
  html :is(.project-settings-popover, .export-popover, .product-library-popover).tile-closing {
    animation: none;
    transform: none;
    opacity: 1;
    will-change: auto;
  }
}

/* Guided Auto Pipe setup and a service-coloured, clearly provisional preview. */
.auto-pipe-guided-panel {
  gap: 9px;
  padding-bottom: 0;
  width: min(390px, calc(100vw - 64px));
  max-height: min(640px, calc(100% - 80px), calc(100dvh - 112px));
}

.auto-pipe-guided-panel .auto-pipe-system-field {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 12px;
  font-weight: 750;
}

.auto-pipe-guided-panel .auto-pipe-system-field select {
  min-width: 0;
  min-height: 38px;
}

.auto-pipe-mode-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 750;
}

.auto-pipe-mode-row .auto-pipe-routing-mode button { min-height: 34px; }

.auto-pipe-guidance {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid #cfe0f5;
  border-radius: 11px;
  background: #f2f8ff;
}

.auto-pipe-guidance-step {
  flex: 0 0 24px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: #dbeafe;
  color: #075ec8;
  font-size: 12px;
  font-weight: 850;
}

.auto-pipe-guidance > span:last-child { display: grid; gap: 2px; min-width: 0; }
.auto-pipe-guidance strong { font-size: 12px; line-height: 1.2; }
.auto-pipe-guidance small { color: var(--muted); font-size: 11px; line-height: 1.35; }
.auto-pipe-guided-panel .auto-pipe-section { border-radius: 11px; padding: 10px; }
.auto-pipe-guided-panel .auto-pipe-section-head strong { font-size: 12px; }
.auto-pipe-guided-panel .auto-pipe-section-head > span { font-size: 10px; }
.auto-pipe-guided-panel .auto-pipe-source-section > .auto-pipe-choice { margin-top: 1px; }

.auto-pipe-source-risers,
.auto-pipe-optional-section { min-width: 0; }

.auto-pipe-source-risers { border-top: 1px solid var(--line); padding-top: 7px; }
.auto-pipe-source-risers summary,
.auto-pipe-optional-section summary {
  cursor: pointer;
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.4;
}
.auto-pipe-source-risers[open] summary,
.auto-pipe-optional-section[open] summary { margin-bottom: 8px; }
.auto-pipe-optional-section summary small { float: right; color: var(--muted); font-size: 10px; font-weight: 600; }

.auto-pipe-target-section .auto-pipe-section-head { grid-template-columns: minmax(0, 1fr); gap: 5px; }
.auto-pipe-target-section .auto-pipe-section-head-actions { justify-content: space-between; }
.auto-pipe-section-hint { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.35; }
.auto-pipe-target-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 7px; }
.auto-pipe-target-tools input[type="search"] { width: 100%; min-width: 0; min-height: 34px; padding: 6px 9px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface-solid,#fff); color: var(--text); font: inherit; font-size: 11px; }
.auto-pipe-target-tools label { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; color: var(--muted); font-size: 10px; font-weight: 700; }
.auto-pipe-target-tools input[type="checkbox"] { width: 14px; height: 14px; margin: 0; }
.auto-pipe-target-list { display: grid; gap: 5px; max-height: min(225px, 32dvh); overflow-y: auto; overscroll-behavior: contain; padding-right: 3px; }
.auto-pipe-target-list .auto-room-zone-group { display: grid; gap: 5px; }
.auto-pipe-target-list .auto-pipe-choice { padding: 6px 7px; }
.auto-pipe-guided-panel .auto-pipe-choice:has(input:checked) { border-color: #8bbcff; background: #edf5ff; }
.auto-pipe-target-list .auto-pipe-choice[hidden],
.auto-pipe-target-list .auto-room-zone-group[hidden],
.auto-pipe-guided-panel [data-auto-pipe-filter-empty][hidden] { display: none !important; }
.auto-pipe-settings-section .auto-pipe-choice { margin-bottom: 8px; }
.auto-pipe-settings-section .pipe-drawing-defaults { margin: 0 0 8px; }
.auto-pipe-guided-panel .auto-pipe-run-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 1px -12px -12px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: var(--surface-solid,#fff);
  border-radius: 0 0 16px 16px;
}
.auto-pipe-run-footer > span { color: var(--muted); font-size: 10px; font-weight: 700; }
.auto-pipe-run-footer .auto-pipe-run-button { min-height: 38px; white-space: nowrap; }

#routeWorkbenchOverlay .rw-preview-halo,
#routeWorkbenchOverlay .rw-preview-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
/* SVG's non-scaling-stroke cancels drawing transforms, but not the sheet's
   outer CSS zoom. Match ordinary pipes so previews stay thin while zooming. */
#routeWorkbenchOverlay .rw-preview-halo {
  stroke: rgba(255,255,255,.8);
  stroke-width: calc(3px * var(--canvas-zoom-inverse, 1));
}
#routeWorkbenchOverlay .rw-preview-line {
  stroke: var(--rw-route-colour,#1677ff);
  stroke-width: calc(1.5px * var(--canvas-zoom-inverse, 1));
  stroke-dasharray: calc(6px * var(--canvas-zoom-inverse, 1)) calc(4px * var(--canvas-zoom-inverse, 1));
}
#routeWorkbenchOverlay .rw-preview-bypass .rw-preview-line {
  stroke-width: calc(1.7px * var(--canvas-zoom-inverse, 1));
  stroke-dasharray: calc(4px * var(--canvas-zoom-inverse, 1)) calc(3px * var(--canvas-zoom-inverse, 1));
}

html[data-theme="dark"] .auto-pipe-guidance { background: #172b46; border-color: #365c88; }
html[data-theme="dark"] .auto-pipe-guidance-step { background: #1c4778; color: #d7eaff; }
html[data-theme="dark"] .auto-pipe-guided-panel .auto-pipe-choice:has(input:checked) { background: #1b3558; border-color: #4778b3; }
html[data-theme="dark"] .auto-pipe-guided-panel .auto-pipe-run-footer { background: #171b22; }

@media (max-width: 520px) {
  .auto-pipe-target-tools { grid-template-columns: 1fr; }
  .auto-pipe-guided-panel .auto-pipe-run-footer { flex-wrap: wrap; }
  .auto-pipe-run-footer .auto-pipe-run-button { width: 100%; }
}

/* Product detail v321: model choice is a first-class control, not a buried accordion. */
html .product-library-popover .product-library-body.detail-open > .product-detail-panel { width: min(850px, calc(100% - 230px)); padding: 22px 26px; }
html .dashboard-product-mail-layout.detail-open > .dashboard-product-mail-reader { width: min(880px, calc(100% - 218px)); padding: 24px 28px; gap: 18px; }
.product-detail-panel .product-finder-detail-head { top: -22px; min-height: 48px; gap: 12px; padding: 8px 0 12px; margin: 0; }
.product-finder-detail-head > div { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.product-detail-panel .product-finder-detail-head button[data-product-finder-detail-expand] { min-width: 102px; }
.product-detail-intro { display: grid; grid-template-columns: minmax(180px, 250px) minmax(0, 1fr); align-items: center; gap: 22px; }
.product-library-popover .product-detail-panel .product-detail-intro .product-photo { min-height: 185px; height: 185px; }
.product-detail-intro .product-detail-title { min-width: 0; }
.product-detail-model-control { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 1.7fr); align-items: center; gap: 5px 20px; margin: 16px 0; padding: 18px 20px; border: 1px solid var(--blue-border); border-radius: 14px; background: var(--blue-soft); }
.product-detail-model-control > div { display: grid; gap: 3px; grid-row: 1 / 3; }
.product-detail-model-control > div span { color: var(--blue); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.product-detail-model-control > div strong { color: var(--text); font-size: 18px; line-height: 1.25; }
.product-detail-model-control label { color: var(--muted); font-size: 12px; font-weight: 700; }
.product-detail-model-control select { width: 100%; min-width: 0; min-height: 46px; padding: 9px 36px 9px 12px; border: 1px solid var(--blue-border); border-radius: 10px; background: var(--surface-solid, #fff); color: var(--text); font: inherit; font-size: 13px; font-weight: 700; }
.product-detail-model-control p { margin: 0; font-size: 13px; font-weight: 700; }
.product-detail-primary-grid { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); align-items: start; gap: 24px; margin: 0 0 8px; }
.product-detail-primary-grid > div { min-width: 0; }
.product-detail-primary-grid .product-finder-selected-model { margin-top: 0; padding: 14px 16px; }
.product-detail-primary-grid .product-finder-key-facts { gap: 9px; }
.product-detail-primary-grid .product-finder-key-facts div { padding: 11px 12px; }
.product-detail-primary-grid .product-finder-key-facts dd { font-size: 14px; }
.product-detail-primary-grid .product-rich-description,
.product-detail-primary-grid .product-finder-sizing-panel { margin: 0 0 15px; }
.product-detail-primary-grid .product-rich-description-body { font-size: 13px; line-height: 1.55; }
.product-detail-primary-grid .product-rich-description-body > p:first-child { font-size: 14px; line-height: 1.5; }
.product-detail-primary-grid .product-rich-description-body ul { grid-template-columns: 1fr; gap: 0; margin-top: 12px; }
.product-detail-primary-grid .product-rich-description-body li { display: list-item; padding: 6px 0 6px 17px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; list-style: disc inside; font-size: 12px; }
.product-detail-primary-grid .product-rich-description-body li strong { color: var(--text); font-size: inherit; }
.product-detail-primary-grid .product-rich-description-body p a { color: var(--blue); font-size: 11px; font-weight: 750; }
.dashboard-product-mail-reader-head h2 { white-space: normal; line-height: 1.2; }
.dashboard-product-mail-reader-head { grid-template-columns: 60px minmax(0, 1fr) auto; }
.dashboard-product-mail-reader-head .dashboard-product-mail-reader-actions { display: flex; grid-column: auto; width: auto; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.dashboard-product-mail-reader-head .dashboard-product-mail-reader-actions button { flex: 0 0 auto; }
html .dashboard-product-mail-reader-head .dashboard-product-mail-reader-actions button:not(.dashboard-product-detail-close) { min-height: 34px !important; padding: 7px 10px !important; }
.dashboard-product-mail-reader-head .dashboard-product-detail-close { display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-solid, #fff); color: var(--text); }
html .dashboard-product-mail-reader-head .dashboard-product-mail-reader-actions button.dashboard-product-detail-close { order: 10; flex: 0 0 34px; width: 34px; min-width: 34px; height: 34px; padding: 0; border: 1px solid #cbd9ed !important; border-radius: 9px; background: #fff !important; box-shadow: 0 2px 6px #17284412; color: var(--text); font-size: 21px; line-height: 1; }
html .dashboard-product-mail-reader-head .dashboard-product-mail-reader-actions button.dashboard-product-detail-close:hover { background: var(--blue-soft); border-color: var(--blue); }
html[data-theme="dark"] .dashboard-product-mail-reader-head .dashboard-product-mail-reader-actions button.dashboard-product-detail-close { border-color: #49617f !important; background: #202b3b !important; color: #e8f0fb; }
.product-detail-tabs { display: grid; gap: 0; min-width: 0; margin-top: 14px; container-type: inline-size; container-name: product-detail; }
.product-detail-tab-list { display: flex; flex-wrap: wrap; gap: 4px; align-items: stretch; padding: 5px; border: 1px solid var(--line); border-radius: 10px; background: var(--input-bg); }
html .product-detail-tabs[data-product-detail-tabs] .product-detail-tab-list button[role="tab"],
html [data-menu-ui] .product-detail-tabs[data-product-detail-tabs] .product-detail-tab-list button[role="tab"] { flex: 1 0 auto; min-width: max-content; min-height: 38px !important; padding: 8px 12px !important; margin: 0 !important; border: 1px solid transparent !important; border-radius: 7px !important; background: transparent !important; box-shadow: none !important; color: var(--muted) !important; font: inherit; font-size: 12px !important; font-weight: 750 !important; line-height: 1.25 !important; white-space: nowrap; text-align: center; cursor: pointer; }
html .product-detail-tabs[data-product-detail-tabs] .product-detail-tab-list button[role="tab"]:hover,
html [data-menu-ui] .product-detail-tabs[data-product-detail-tabs] .product-detail-tab-list button[role="tab"]:hover { color: var(--blue) !important; background: var(--blue-soft) !important; }
html .product-detail-tabs[data-product-detail-tabs] .product-detail-tab-list button[role="tab"][aria-selected="true"],
html [data-menu-ui] .product-detail-tabs[data-product-detail-tabs] .product-detail-tab-list button[role="tab"][aria-selected="true"] { border-color: var(--blue-border) !important; color: var(--blue) !important; background: var(--blue-soft) !important; box-shadow: none !important; font-weight: 850 !important; }
html .product-detail-tabs[data-product-detail-tabs] .product-detail-tab-list button[role="tab"]:focus-visible { outline: 2px solid var(--blue); outline-offset: -3px; }
.product-detail-tab-panel { min-width: 0; padding: 16px 0 4px; }
.product-detail-panel .product-detail-tab-panel { padding: 16px 0 4px; border: 0; }
.product-detail-tab-panel[hidden] { display: none; }
.product-detail-tab-panel > :first-child { margin-top: 0; }
.product-detail-tab-panel .heat-pump-performance-panel { max-width: none; padding: 16px; border-color: var(--line); background: var(--surface-solid, #fff); box-shadow: none; }
.product-detail-tab-panel .heat-pump-performance-head { grid-template-columns: 1fr; }
.product-detail-tab-panel .heat-pump-performance-head > span { justify-self: start; }
.product-detail-tab-panel .heat-pump-performance-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.product-detail-tab-panel .heat-pump-performance-controls label,
.product-detail-tab-panel .heat-pump-performance-setpoint { padding: 11px 12px; background: var(--blue-soft); box-shadow: none; }
.product-detail-tab-panel .heat-pump-compare-select { grid-column: 1 / -1; }
html [data-menu-ui] .product-detail-tabs[data-product-detail-tabs] .heat-pump-flow-setpoint-input input[data-heat-pump-flow-setpoint-input],
html .product-detail-tabs[data-product-detail-tabs] .heat-pump-flow-setpoint-input input[data-heat-pump-flow-setpoint-input] { width: 52px !important; padding: 0 2px !important; border: 0 !important; background: transparent !important; text-align: right !important; appearance: textfield; }
.product-detail-tabs .heat-pump-flow-setpoint-input input::-webkit-inner-spin-button,
.product-detail-tabs .heat-pump-flow-setpoint-input input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.product-detail-tab-panel .heat-pump-performance-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.product-detail-tab-panel .heat-pump-performance-metrics span { padding: 11px 12px; background: var(--surface-solid, #fff); box-shadow: none; }
.product-detail-tab-panel .product-finder-model-finder { min-width: 0; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); align-items: start; gap: 12px; }
.product-detail-tab-panel .product-finder-model-finder > * { min-width: 0; margin: 0; }
.product-detail-tab-panel .product-finder-model-finder > :nth-child(n+3) { grid-column: 1 / -1; }
.product-detail-tab-panel .radiator-model-finder,
.product-detail-tab-panel .radiator-model-info { padding: 14px; border-color: var(--line); background: var(--surface-solid, #fff); box-shadow: none; }
.product-detail-tab-panel .radiator-model-results { max-height: 370px; }
.product-detail-tab-panel .radiator-model-results button { grid-template-columns: 1fr; gap: 3px; padding: 9px 11px; box-shadow: none; }
.product-detail-tab-panel .radiator-model-results span { text-align: left; line-height: 1.35; }
.product-detail-tab-panel .radiator-model-info .product-detail-facts { grid-template-columns: 1fr; }
.product-detail-tab-panel .radiator-model-info .product-detail-facts > div { grid-template-columns: minmax(95px, .85fr) minmax(0, 1.15fr); align-items: baseline; gap: 8px; }
.product-detail-tab-panel .radiator-model-info .product-detail-facts dd { text-align: right; }
.product-detail-tab-panel .dashboard-product-model-selector { padding: 0; border: 0; background: transparent; box-shadow: none; }
.product-detail-tab-panel .dashboard-product-model-selector-list { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; max-height: 390px; }
.product-detail-tab-panel .dashboard-product-model-select-card { min-height: 112px; height: auto; grid-template-columns: minmax(0, 1fr) auto; padding: 11px 12px; box-shadow: none; }
.product-detail-tab-panel .dashboard-product-model-select-facts { flex-wrap: wrap; }
.product-detail-tab-panel .dashboard-product-model-select-facts i { white-space: normal; }
.product-detail-tab-panel .dashboard-product-model-detail.is-compact { padding: 0; border: 0; background: transparent; }
.product-detail-tab-panel .dashboard-product-model-detail.is-compact .dashboard-product-model-detail-body { grid-template-columns: 1fr; }
.product-detail-tab-panel .dashboard-product-model-detail.is-compact .dashboard-product-model-copy .product-detail-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.product-detail-tab-panel .dashboard-product-model-detail.is-compact .product-detail-facts > div,
.product-detail-tab-panel[data-product-detail-panel="technical"] > .product-detail-facts > div { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: baseline; gap: 10px; padding: 9px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
.product-detail-tab-panel .dashboard-product-model-detail.is-compact .product-detail-facts dd,
.product-detail-tab-panel[data-product-detail-panel="technical"] > .product-detail-facts dd { margin: 0; text-align: right; }
.product-detail-tab-panel[data-product-detail-panel="sizing"] .product-finder-sizing-panel { margin: 0; padding: 0; border: 0; background: transparent; }
.product-detail-tab-panel[data-product-detail-panel="sizing"] .product-finder-section-heading { display: none; }
.product-detail-tab-panel[data-product-detail-panel="sizing"] .product-finder-project-context { padding: 15px; }
.product-detail-tab-panel[data-product-detail-panel="technical"] > .product-detail-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html .dashboard-product-mail-reader-head .dashboard-product-mail-reader-actions button.dashboard-product-detail-close[data-menu-close],
html [data-menu-ui] .dashboard-product-mail-reader-head .dashboard-product-mail-reader-actions button.dashboard-product-detail-close[data-menu-close] { border-color: var(--line-strong) !important; background: var(--surface-solid, #fff) !important; box-shadow: 0 2px 6px #17284412 !important; }
@container product-detail (max-width: 620px) {
  .product-detail-tab-panel .product-finder-model-finder,
  .product-detail-tab-panel .heat-pump-performance-controls,
  .product-detail-tab-panel .heat-pump-performance-metrics,
  .product-detail-tab-panel .dashboard-product-model-selector-list,
  .product-detail-tab-panel .dashboard-product-model-detail.is-compact .dashboard-product-model-copy .product-detail-facts,
  .product-detail-tab-panel[data-product-detail-panel="technical"] > .product-detail-facts { grid-template-columns: 1fr !important; }
  .product-detail-tab-panel .product-finder-model-finder > :nth-child(n+3) { grid-column: auto; }
  .product-detail-tab-panel .heat-pump-compare-select { grid-column: auto; }
}

/* Keep the dashboard and in-design product readers on one spacing and type scale. */
.product-detail-panel,
.dashboard-product-mail-reader { --product-detail-card-gap: 16px; --product-detail-card-radius: 12px; grid-auto-rows: max-content; container-type: inline-size; container-name: product-reader; }
html .product-library-popover .product-library-body.detail-open > .product-detail-panel { gap: var(--product-detail-card-gap); }
html .dashboard-product-mail-layout.detail-open > .dashboard-product-mail-reader { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: var(--product-detail-card-gap); }
.product-detail-panel .product-detail-intro { gap: 20px; }
.product-detail-panel .product-detail-model-control,
.dashboard-product-mail-reader .product-detail-model-control { gap: 6px 18px; margin: 0; padding: 16px 18px; border-radius: var(--product-detail-card-radius); }
.product-detail-panel .product-detail-model-control > div strong,
.dashboard-product-mail-reader .product-detail-model-control > div strong { font-weight: 800; }
.product-detail-panel .product-detail-model-control { padding-top: 16px; border-top: 1px solid var(--blue-border); }
.product-detail-panel .product-detail-primary-grid,
.dashboard-product-mail-reader .product-detail-primary-grid { gap: 20px; margin: 0; }
.product-detail-panel .product-detail-tabs,
.dashboard-product-mail-reader .product-detail-tabs { margin-top: 0; }
.product-detail-primary-grid > div:first-child { display: grid; grid-auto-rows: max-content; align-content: start; gap: 10px; }
.product-detail-primary-grid > div:first-child > :is(.product-finder-key-facts, .product-finder-selected-model) { margin: 0; }
.product-detail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 2px; }
html :is(.product-detail-panel, .dashboard-product-mail-reader) .product-detail-actions > button { flex: 1 1 130px; width: auto; max-width: 100%; height: auto !important; min-height: 38px !important; margin: 0; padding: 8px 12px !important; border-radius: 9px; font-size: 12px !important; line-height: 1.3; }
html :is(.product-detail-panel, .dashboard-product-mail-reader) .product-detail-actions > .commissioning-help-entry:only-child { flex: 0 1 auto; }
@container product-reader (max-width: 620px) {
  .product-detail-intro, .product-detail-primary-grid, .product-detail-model-control { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .product-detail-model-control > div { grid-row: auto; }
  .dashboard-product-mail-reader-head { grid-template-columns: 44px minmax(0, 1fr); }
  .dashboard-product-mail-reader-head .dashboard-product-mail-reader-actions { grid-column: 1 / -1; width: 100%; justify-content: flex-start; flex-wrap: wrap; gap: 8px; }
}
.product-detail-primary-grid .product-finder-selected-model { margin: 0 0 8px; padding: 14px 16px; border-radius: var(--product-detail-card-radius); }
.product-detail-primary-grid .product-finder-key-facts { gap: 8px; margin: 0 0 8px; }
.product-detail-primary-grid .product-finder-key-facts > div { padding: 10px 12px; border-radius: 9px; }
.product-detail-primary-grid .product-rich-description { margin: 0; padding: 16px; border-radius: var(--product-detail-card-radius); }
.product-detail-primary-grid .product-rich-description-head { padding-bottom: 12px; }
.product-detail-primary-grid .product-rich-description-body { padding-top: 12px; }
.product-detail-primary-grid .product-rich-description-body p { font-weight: 550; }
.product-detail-primary-grid .product-rich-description-body > p:first-child { font-weight: 600; }
.product-detail-primary-grid .product-rich-description-body li { line-height: 1.45; }
.product-detail-panel .product-detail-title strong { font-size: 20px; font-weight: 800; }
.dashboard-product-mail-reader-head h2 { font-weight: 800; }
.dashboard-product-mail-reader-summary p { font-weight: 600; line-height: 1.5; }
.product-detail-primary-grid .product-rich-description-head h3,
.product-detail-tab-panel h3 { font-size: 16px; font-weight: 800; line-height: 1.3; }
.product-detail-primary-grid .product-finder-key-facts dt,
.product-detail-tab-panel .product-detail-facts dt { font-size: 10px; font-weight: 700; line-height: 1.3; }
.product-detail-primary-grid .product-finder-key-facts dd,
.product-detail-tab-panel .product-detail-facts dd { font-weight: 750; line-height: 1.35; }
html .product-detail-panel .product-detail-title > span,
html .product-detail-panel .product-detail-model-control > div > span,
html .product-detail-panel .product-finder-selected-model > span,
html .dashboard-product-mail-reader .product-finder-selected-model > span,
html .product-detail-panel .product-rich-description-head > span,
html .dashboard-product-mail-reader .product-rich-description-head > span,
html .product-detail-tab-panel .product-finder-section-heading > span,
html .product-detail-tab-panel .radiator-model-finder-head > span,
html .product-detail-tab-panel .dashboard-product-model-detail-head span { background: transparent !important; color: var(--blue) !important; font-size: 10px !important; font-weight: 800 !important; letter-spacing: .045em; line-height: 1.3; text-transform: uppercase; }
html [data-menu-ui] .product-detail-panel .product-rich-description-head > span,
html [data-menu-ui] .dashboard-product-mail-reader .product-rich-description-head > span { background: transparent !important; }
.product-detail-tab-panel .radiator-model-finder,
.product-detail-tab-panel .radiator-model-info,
.product-detail-tab-panel .dashboard-product-model-detail,
.product-detail-tab-panel .dashboard-product-mail-section { border-radius: var(--product-detail-card-radius); }
@container product-detail (max-width: 620px) {
  .product-detail-tab-panel .radiator-model-finder,
  .product-detail-tab-panel .radiator-model-info { padding: 14px; }
  .product-detail-tab-panel .dashboard-product-model-notes { grid-template-columns: 1fr; }
}
.product-detail-primary-grid .product-finder-key-facts { grid-template-columns: 1fr; }
.product-detail-primary-grid .product-finder-key-facts > div { display: grid; grid-template-columns: minmax(95px, .8fr) minmax(0, 1.2fr); align-items: center; gap: 8px; }
.product-detail-primary-grid .product-finder-key-facts dd { margin: 0; text-align: right; line-height: 1.35; overflow-wrap: normal; }
html .product-library-popover .product-library-body.detail-fullscreen > .product-detail-panel,
html .dashboard-product-mail-layout.detail-fullscreen > .dashboard-product-mail-reader { width: 100vw; padding: 28px max(26px, calc((100vw - 1160px) / 2)); }
@media (max-width: 1050px) {
  html .product-library-popover .product-library-body.detail-open > .product-detail-panel { width: min(720px, 96%); }
  html .dashboard-product-mail-layout.detail-open > .dashboard-product-mail-reader { width: min(750px, calc(100% - 80px)); }
}
@media (max-width: 700px) {
  html .product-library-popover .product-library-body.detail-open > .product-detail-panel,
  html .dashboard-product-mail-layout.detail-open > .dashboard-product-mail-reader { width: 100%; right: 0; padding: 16px; }
  .product-detail-intro, .product-detail-primary-grid, .product-detail-model-control { grid-template-columns: 1fr; gap: 12px; }
  .product-detail-model-control > div { grid-row: auto; }
  .product-detail-model-control { padding: 14px; }
  .dashboard-product-mail-reader-head { grid-template-columns: 44px minmax(0, 1fr); }
  .dashboard-product-mail-reader-head .dashboard-product-mail-reader-actions { grid-column: 1 / -1; justify-content: flex-start; flex-wrap: wrap; }
}

/* The range page uses the same spacing and heading scale as the product reader.
   Max-content rows keep the highlights card from collapsing in the scrollable grid. */
.dashboard-product-range-popup { border-radius: 14px; }
.dashboard-product-range-head { gap: 16px; padding: 16px 20px; }
.dashboard-product-range-head h2 { font-weight: 800; line-height: 1.18; }
.dashboard-product-range-head p { font-weight: 600; line-height: 1.5; }
.dashboard-product-range-overview,
.dashboard-product-range-main { gap: 16px; padding: 16px; }
.dashboard-product-range-main { grid-auto-rows: max-content; }
.dashboard-product-range-main > .product-rich-description {
  display: block;
  min-height: max-content;
  margin: 0;
  padding: 16px;
  border-radius: 12px;
  background: var(--surface-solid, #fff);
}
.dashboard-product-range-main .product-rich-description-head { padding-bottom: 12px; }
.dashboard-product-range-main .product-rich-description-head > span {
  display: block;
  margin-bottom: 5px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .045em;
  line-height: 1.3;
  text-transform: uppercase;
  background: transparent;
}
html [data-menu-ui] .dashboard-product-range-main .product-rich-description-head > span {
  color: var(--blue) !important;
  background: transparent !important;
  font-size: 10px !important;
  font-weight: 800 !important;
}
.dashboard-product-range-main .product-rich-description-head h3,
.dashboard-product-range-main .dashboard-product-range-section > h3,
.dashboard-product-range-main .dashboard-product-range-copy-grid h3 {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
}
.dashboard-product-range-main .product-rich-description-body { padding-top: 12px; font-size: 13px; font-weight: 550; }
.dashboard-product-range-main .product-rich-description-body > p:first-child { font-size: 14px; font-weight: 600; }
.dashboard-product-range-main .dashboard-product-range-section,
.dashboard-product-range-main .dashboard-product-range-copy-grid article {
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
}
.dashboard-product-range-main .dashboard-product-range-copy-grid { gap: 16px; }
.dashboard-product-range-overview .dashboard-product-range-summary div { padding: 10px 12px; border-radius: 9px; }
.dashboard-product-range-overview .dashboard-product-range-summary dt { font-weight: 750; }
.dashboard-product-range-overview .dashboard-product-range-summary dd { font-weight: 750; }

/* Full-screen product details retain the catalogue's surface, spacing and type hierarchy. */
html .product-library-popover .product-library-body.detail-fullscreen > .product-detail-panel,
html .dashboard-product-mail-layout.detail-fullscreen > .dashboard-product-mail-reader {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 18px;
  padding: 0 max(24px, calc((100vw - 1180px) / 2)) 40px;
  background: var(--bg);
  color: var(--text);
}
.product-library-body.detail-fullscreen > .product-detail-panel > .product-finder-detail-head,
.dashboard-product-mail-layout.detail-fullscreen > .dashboard-product-mail-reader > .dashboard-product-mail-reader-head {
  position: sticky;
  top: 0;
  z-index: 5;
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 0 0 12px 12px;
  background: var(--surface-solid, #fff);
  box-shadow: 0 8px 22px rgba(23, 40, 68, .07);
}
.product-library-body.detail-fullscreen > .product-detail-panel > .product-detail-intro,
.dashboard-product-mail-layout.detail-fullscreen > .dashboard-product-mail-reader > .dashboard-product-mail-reader-hero,
.product-library-body.detail-fullscreen > .product-detail-panel > .product-detail-tabs,
.dashboard-product-mail-layout.detail-fullscreen > .dashboard-product-mail-reader > .product-detail-tabs {
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-solid, #fff);
}
.dashboard-product-mail-layout.detail-fullscreen > .dashboard-product-mail-reader .product-detail-primary-grid > div {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
}
.dashboard-product-mail-layout.detail-fullscreen > .dashboard-product-mail-reader .product-detail-primary-grid :is(.product-finder-key-facts, .product-finder-selected-model, .product-finder-sizing-panel, .product-rich-description) {
  margin: 0;
}
.dashboard-product-mail-layout.detail-fullscreen > .dashboard-product-mail-reader .product-detail-primary-grid .product-finder-sizing-panel {
  padding: 16px;
  border-radius: 12px;
}
html .product-library-body.detail-fullscreen .product-finder-detail-head button[data-product-finder-detail-close][data-menu-close] {
  display: inline-grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line-strong) !important;
  border-radius: 9px;
  background: var(--surface-solid, #fff) !important;
  box-shadow: 0 2px 6px rgba(23, 40, 68, .07);
  color: var(--text) !important;
  font-size: 0 !important;
  line-height: 1;
}
html .product-library-body.detail-fullscreen .product-finder-detail-head button[data-product-finder-detail-close][data-menu-close]:hover {
  border-color: var(--blue) !important;
  background: var(--blue-soft) !important;
}
.product-detail-3d-panel { display: grid; gap: 14px; min-width: 0; }
.product-detail-3d-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.product-detail-3d-heading h3 { margin: 0 0 4px; color: var(--text); font-size: 16px; font-weight: 800; line-height: 1.3; }
.product-detail-3d-heading p { max-width: 68ch; margin: 0; color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.5; }
.product-detail-3d-heading > span { flex: 0 0 auto; padding: 5px 9px; border: 1px solid var(--blue-border); border-radius: 999px; background: var(--blue-soft); color: var(--blue); font-size: 10px; font-weight: 800; }
.product-detail-3d-panel .dashboard-product-dimension-stage { min-height: 330px; border-radius: 12px; }
.product-detail-drawing-panel { display: grid; gap: 14px; min-width: 0; }
.product-detail-drawing-stage { display: grid; place-items: center; min-width: 0; min-height: 300px; padding: 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--blue-soft); }
.product-detail-drawing-stage > img { display: block; width: 100%; max-height: 380px; object-fit: contain; }
.product-detail-drawing-stage > object { display: block; width: 100%; min-height: 380px; border: 0; }
.product-detail-drawing-stage .dashboard-product-tool-default-preview { width: 100%; min-height: 270px; background: transparent; }
.product-detail-drawing-stage .dashboard-product-tool-default-schematic-symbol { width: 140px; height: 140px; }
.product-detail-drawing-stage .dashboard-product-tool-default-floor-plan { width: min(100%, 280px); height: 180px; }
.product-detail-drawing-links { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; font-size: 11px; }
.product-detail-drawing-links strong { margin-right: 3px; color: var(--muted); }
.product-detail-drawing-links a { max-width: 100%; padding: 5px 8px; overflow-wrap: anywhere; border: 1px solid var(--blue-border); border-radius: 7px; color: var(--blue); background: var(--surface-solid, #fff); text-decoration: none; }
.product-detail-drawing-links a:hover, .product-detail-drawing-links a:focus-visible { text-decoration: underline; }
/* Guided manufacturer product authoring */
.dashboard-product-editor-form [hidden] { display: none !important; }
.product-authoring-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-solid, #fff); }
.product-authoring-head span:first-child, .product-authoring-intake-heading span, .product-authoring-owner span, .product-authoring-drawing-studio header span, .product-authoring-model-studio header span, .product-authoring-review > span { color: var(--blue); font-size: 11px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.product-authoring-head h3 { margin: 4px 0 5px; color: var(--text); font-size: 22px; line-height: 1.15; }
.product-authoring-head p, .product-authoring-intake p, .product-authoring-owner p, .product-authoring-design-grid header p, .product-authoring-review p, .product-authoring-links p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.product-authoring-review-chip { flex: 0 0 auto; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--input-bg); color: var(--muted) !important; font-size: 11px !important; white-space: nowrap; }
.product-authoring-tabs { display: flex; gap: 4px; padding: 4px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--input-bg); scrollbar-width: thin; }
.product-authoring-tabs button { display: flex; align-items: center; justify-content: center; gap: 8px; flex: 1 0 auto; min-width: 126px; padding: 10px 12px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; font: inherit; font-size: 12px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.product-authoring-tabs button em { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-solid, #fff); color: var(--muted); font-size: 10px; font-style: normal; }
.product-authoring-tabs button.active { color: var(--blue); background: var(--surface-solid, #fff); box-shadow: 0 2px 8px rgba(20, 50, 92, .09); }
.product-authoring-tabs button.active em { color: #fff; background: var(--blue); }
.product-authoring-step { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-content: start; }
.product-authoring-step > * { min-width: 0; }
.product-authoring-intake, .product-authoring-owner, .product-authoring-review, .product-authoring-design-grid > section, .product-authoring-links, .product-authoring-media-current { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-solid, #fff); }
.product-authoring-intake-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.product-authoring-intake-heading h3, .product-authoring-design-grid h3 { margin: 4px 0 6px; color: var(--text); font-size: 17px; line-height: 1.2; }
.product-authoring-upload { display: inline-flex !important; flex: 0 0 auto; align-items: center; justify-content: center; min-height: 39px; padding: 0 13px; border: 1px solid var(--blue); border-radius: 9px; color: var(--blue) !important; background: var(--input-bg); font-size: 12px !important; text-transform: none !important; cursor: pointer; }
.product-authoring-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.product-authoring-ai-actions { display: flex; align-items: center; gap: 12px; margin: 12px 0 6px; }
.product-authoring-ai-actions > span { min-width: 0; flex: 1; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.product-authoring-ai-disclosure { font-size: 11px !important; }
.product-authoring-owner { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.product-authoring-owner > div:first-child { max-width: 630px; }
.product-authoring-owner strong { display: block; margin: 3px 0 5px; color: var(--text); font-size: 15px; }
.product-authoring-owner > div:last-child { min-width: 150px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--input-bg); }
.product-authoring-owner small { color: var(--muted); }
.product-authoring-ai-review { display: grid; gap: 8px; margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--input-bg); }
.product-authoring-ai-review h4 { margin: 0 0 4px; color: var(--text); }
.product-authoring-ai-review label, .product-authoring-media-current label { display: flex; align-items: flex-start; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-solid, #fff); text-transform: none; }
.product-authoring-ai-review label input, .product-authoring-media-current label input, .product-authoring-review label input { flex: 0 0 auto; width: 16px; min-height: 16px; height: 16px; margin: 2px 0 0; }
.product-authoring-ai-review label span { display: grid; gap: 3px; overflow-wrap: anywhere; font-size: 12px; font-weight: 500; }
.product-authoring-ai-review label strong { color: var(--text); text-transform: capitalize; }
.product-authoring-ai-result:not(:empty) { margin-top: 12px; color: var(--muted); font-size: 12px; }
.product-authoring-media-current { display: grid; gap: 8px; }
.product-authoring-media-current > strong, .product-authoring-links strong { color: var(--text); font-size: 14px; }
.product-authoring-media-current label { align-items: center; }
.product-authoring-media-current label span { flex: 1; color: var(--text); font-size: 12px; }
.product-authoring-media-current label small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.product-authoring-links { display: grid; gap: 12px; }
.product-authoring-link-row { display: grid; grid-template-columns: 130px minmax(120px, .7fr) minmax(160px, 1.3fr) 32px; gap: 7px; margin: 6px 0; }
.product-authoring-link-row button { padding: 0; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: var(--input-bg); cursor: pointer; }
.product-authoring-design-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.product-authoring-design-grid > section { display: grid; gap: 12px; align-content: start; }
.product-authoring-dimensions, .product-authoring-3d-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.product-authoring-dimensions label, .product-authoring-3d-add label { flex: 1 1 90px; text-transform: none; }
.product-authoring-dimensions input, .product-authoring-3d-add input { max-width: 140px; }
.product-authoring-draw-tools { display: flex; flex-wrap: wrap; gap: 4px; }
.product-authoring-draw-tools button, .product-authoring-studio-footer button, .product-authoring-3d-add button, .product-authoring-ai-actions button, .product-authoring-ai-review button, .product-authoring-links > button, .product-authoring-footer button, .product-authoring-3d-parts button { padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--input-bg); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.product-authoring-draw-tools button.active, .product-authoring-studio-footer button, .product-authoring-ai-actions button:not(:disabled), .product-authoring-ai-review button, .product-authoring-footer button[data-product-authoring-next], .product-authoring-footer button[type="submit"] { border-color: var(--blue); color: #fff; background: var(--blue); }
.product-authoring-ai-actions button:disabled { opacity: .5; cursor: not-allowed; }
.product-authoring-drawing-studio svg { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; border: 1px solid var(--line); border-radius: 10px; background-color: var(--input-bg); background-image: linear-gradient(to right, rgba(93, 126, 163, .1) 1px, transparent 1px), linear-gradient(to bottom, rgba(93, 126, 163, .1) 1px, transparent 1px); background-size: 5.55% 8.33%; touch-action: none; cursor: crosshair; }
.product-authoring-3d-viewport { height: 270px; border: 1px solid var(--line); border-radius: 10px; background: radial-gradient(circle at 50% 40%, rgba(80, 149, 223, .15), var(--input-bg) 70%); overflow: hidden; }
.product-authoring-3d-viewport canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.product-authoring-studio-footer { display: flex; align-items: end; justify-content: space-between; gap: 10px; }
.product-authoring-studio-footer label { min-width: 0; max-width: 270px; }
.product-authoring-design-grid section > p:last-child { color: var(--muted); font-size: 11px; }
.product-authoring-3d-parts { display: grid; gap: 5px; }
.product-authoring-3d-parts > div { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); font-size: 11px; }
.product-authoring-3d-parts > div { flex-wrap: wrap; }
.product-authoring-part-placement { display: flex; gap: 6px; width: 100%; }
.product-authoring-part-placement label { flex: 1 1 0; min-width: 0; color: var(--muted); font-size: 10px; text-transform: none; }
.product-authoring-part-placement input { min-width: 0; min-height: 30px; }

.product-design-suite { display: grid; gap: 14px; min-width: 0; }
.product-design-suite-header { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 13px; background: var(--tile-glass); }
.product-design-suite-header span { color: var(--blue); font-size: 11px; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; }
.product-design-suite-header h3 { margin: 3px 0 4px; color: var(--text); font-size: 21px; }
.product-design-suite-header p { margin: 0; max-width: 850px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.product-design-suite-tabs { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--input-bg); }
.product-design-suite button { min-height: 34px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--input-bg); font: inherit; font-size: 12px; font-weight: 760; cursor: pointer; }
.product-design-suite-tabs button { border-color: transparent; background: transparent; }
.product-design-suite-tabs button[aria-selected="true"], .product-design-toolbar button.active, .product-design-suite button.active { color: var(--blue); border-color: var(--blue-border); background: var(--blue-soft); }
.product-design-suite kbd { display: inline-block; margin-left: 3px; padding: 1px 4px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); background: var(--surface-solid,#fff); font: inherit; font-size: 10px; font-weight: 700; white-space: nowrap; }
.product-design-shortcuts { color: var(--muted); font-size: 11px; }
.product-design-shortcuts summary { width: max-content; cursor: pointer; font-weight: 760; }
.product-design-shortcuts[open] { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.product-design-shortcuts[open] summary { width: 100%; }
.product-design-shortcuts span { white-space: nowrap; }
.product-design-panel { display: grid; gap: 12px; min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--tile-glass); }
.product-design-panel[hidden] { display: none !important; }
.product-design-topbar, .product-design-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.product-design-move-options { display: inline-flex; align-items: center; gap: 5px; padding: 3px 5px; border: 1px solid var(--blue-border); border-radius: 9px; background: var(--blue-soft); }
.product-design-move-options[hidden] { display: none !important; }
.product-design-move-options span { padding: 0 4px; color: var(--muted); font-size: 11px; font-weight: 750; }
.product-design-topbar label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: none; }
.product-design-topbar input[type="number"] { width: 90px; min-height: 34px; }
.product-design-topbar input[type="checkbox"] { width: 16px; height: 16px; min-height: 16px; }
.product-design-topbar > span { margin-left: auto; color: var(--muted); font-size: 11px; }
.product-design-workarea { display: grid; grid-template-columns: minmax(0, 1fr) 250px; align-items: start; gap: 14px; min-width: 0; }
.product-design-canvas-wrap { min-width: 0; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--input-bg); }
.product-design-canvas-wrap svg { display: block; width: 100%; height: auto; min-height: 280px; border: 0; background-image: linear-gradient(to right, rgba(93,126,163,.09) 1px, transparent 1px), linear-gradient(to bottom, rgba(93,126,163,.09) 1px, transparent 1px); background-size: 40px 40px; touch-action: none; cursor: crosshair; }
.product-design-canvas-wrap svg [data-design-id] { cursor: pointer; }
.product-design-canvas-wrap svg .is-selected > * { filter: drop-shadow(0 0 5px #1766d8); }
.product-design-canvas-hint { padding: 7px 11px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.product-design-inspector { display: grid; align-content: start; gap: 8px; max-height: 680px; overflow: auto; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--input-bg); }
.product-design-inspector h4 { margin: 0 0 2px; color: var(--text); font-size: 14px; }
.product-design-inspector label, .product-design-selection label { display: grid; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 740; text-transform: none; }
.product-design-inspector input, .product-design-inspector select { width: 100%; min-width: 0; min-height: 34px; padding: 5px 8px; color: var(--text); background: var(--surface-solid,#fff); }
.product-design-inspector input[type="color"] { padding: 3px; }
.product-design-selection { display: grid; gap: 7px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.product-design-selection strong { color: var(--text); font-size: 13px; }
.product-design-inspector-actions { display: flex; gap: 6px; }
.product-design-inventory { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 9px; }
.product-design-inventory > div { display: grid; align-content: start; gap: 6px; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 9px; }
.product-design-inventory strong { color: var(--text); font-size: 12px; }
.product-design-inventory small { color: var(--muted); font-size: 11px; }
.product-design-inventory button { width: 100%; text-align: left; white-space: normal; }
.product-design-panel footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.product-design-panel footer span { flex: 1; min-width: 200px; color: var(--muted); font-size: 11px; }
.product-design-panel footer label { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; text-transform: none; }
.product-design-panel footer select { min-height: 34px; }
.product-design-3d-viewport { position: relative; height: min(62vh, 620px); min-height: 380px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #f8fbff; }
.product-design-3d-viewport canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.product-design-3d-viewport.is-drawing canvas { cursor: crosshair; }
.product-design-3d-viewport.is-moving canvas { cursor: grab; }
.product-design-3d-viewport.is-moving.is-dragging canvas { cursor: grabbing; }
.product-design-3d-hint { position: absolute; left: 12px; right: 12px; bottom: 12px; max-width: max-content; padding: 7px 10px; border: 1px solid #cad8e9; border-radius: 8px; color: #294465; background: rgba(255,255,255,.93); box-shadow: 0 2px 9px rgba(22,50,87,.08); font-size: 11px; font-weight: 700; line-height: 1.35; pointer-events: none; }
@media (max-width: 850px) { .product-design-workarea { grid-template-columns: 1fr; } .product-design-inspector { max-height: none; grid-template-columns: repeat(2,minmax(0,1fr)); } .product-design-inspector h4, .product-design-selection, .product-design-inspector-actions { grid-column: 1 / -1; } }
.product-authoring-review { display: grid; gap: 14px; }
.product-authoring-review [data-product-authoring-summary] { display: grid; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--input-bg); }
.product-authoring-review [data-product-authoring-summary] strong { color: var(--text); font-size: 19px; }
.product-authoring-review [data-product-authoring-summary] span, .product-authoring-review [data-product-authoring-summary] small { color: var(--muted); font-size: 12px; }
.product-authoring-review label { display: flex; align-items: flex-start; gap: 9px; color: var(--text); font-size: 12px; line-height: 1.4; text-transform: none; }
.product-authoring-footer { position: sticky; bottom: 0; z-index: 4; display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-solid, #fff); box-shadow: 0 -4px 18px rgba(20, 50, 92, .07); }
.product-authoring-footer span { flex: 1; color: var(--muted); font-size: 11px; }
.product-authoring-published-links { margin-top: 12px; }
.product-authoring-published-links h3 { margin: 0 0 8px; color: var(--text); font-size: 15px; }
.product-authoring-published-links > div { display: flex; flex-wrap: wrap; gap: 8px; }
.product-authoring-published-links a { display: grid; gap: 3px; min-width: 140px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: var(--input-bg); text-decoration: none; }
.product-authoring-published-links a span { color: var(--blue); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.product-authoring-gateway { display: grid; gap: 14px; }
.product-authoring-gateway-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.product-authoring-gateway-actions button { padding: 9px 13px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: var(--surface-solid, #fff); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.product-authoring-gateway-actions .primary-mini { color: #fff; background: var(--blue); border-color: var(--blue); }
@media (max-width: 1100px) { .product-authoring-design-grid { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .product-authoring-intake-heading, .product-authoring-owner, .product-authoring-head { flex-direction: column; align-items: stretch; } .product-authoring-link-row { grid-template-columns: 1fr 1fr 32px; } .product-authoring-link-row input[name="mediaLinkUrl[]"] { grid-column: 1 / 3; } .product-authoring-link-row button { grid-column: 3; grid-row: 1 / 3; } .product-authoring-footer { flex-wrap: wrap; } }
.product-detail-3d-panel .dashboard-product-dimension-values,
.product-detail-3d-panel .dashboard-product-clearance-callouts { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.product-detail-3d-panel .dashboard-product-dimension-values span,
.product-detail-3d-panel .dashboard-product-clearance-callouts span { padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-solid, #fff); }
.product-library-body.detail-fullscreen .product-detail-3d-panel .dashboard-product-dimension-stage,
.dashboard-product-mail-layout.detail-fullscreen .product-detail-3d-panel .dashboard-product-dimension-stage { min-height: 430px; }
@media (max-width: 700px) {
  html .product-library-popover .product-library-body.detail-fullscreen > .product-detail-panel,
  html .dashboard-product-mail-layout.detail-fullscreen > .dashboard-product-mail-reader { gap: 12px; padding: 0 12px 24px; }
  .product-library-body.detail-fullscreen > .product-detail-panel > .product-finder-detail-head,
  .dashboard-product-mail-layout.detail-fullscreen > .dashboard-product-mail-reader > .dashboard-product-mail-reader-head { padding: 12px; }
  .product-library-body.detail-fullscreen > .product-detail-panel > .product-detail-intro,
  .dashboard-product-mail-layout.detail-fullscreen > .dashboard-product-mail-reader > .dashboard-product-mail-reader-hero,
  .product-library-body.detail-fullscreen > .product-detail-panel > .product-detail-tabs,
  .dashboard-product-mail-layout.detail-fullscreen > .dashboard-product-mail-reader > .product-detail-tabs { padding: 12px; }
  .product-detail-3d-heading { flex-wrap: wrap; }
  .product-library-body.detail-fullscreen .product-detail-3d-panel .dashboard-product-dimension-stage,
  .dashboard-product-mail-layout.detail-fullscreen .product-detail-3d-panel .dashboard-product-dimension-stage { min-height: 330px; }
}

/* Shared brand and motion: keep the same wordmark and response across surfaces. */
:root {
  --axio-motion-fast: 150ms;
  --axio-motion-normal: 220ms;
  --axio-motion-ease: cubic-bezier(.2, .8, .2, 1);
}

.brand-logo-wordmark { width: auto; min-width: 0; height: auto; }
.brand-logo-wordmark .brand-logo-image-blue { height: auto; max-height: 100%; }
.brand-logo-text,
.axio-text-wordmark {
  display: inline-block;
  color: #1263c7;
  font-family: var(--font-ui, Inter, ui-sans-serif, system-ui, sans-serif);
  font-size: 23px;
  font-weight: 780;
  letter-spacing: -.065em;
  line-height: 1;
  white-space: nowrap;
}
html[data-theme="dark"] .brand-logo-image-blue,
html[data-theme="dark"] .account-bootstrap-static-brand img { filter: brightness(1.6) saturate(1.15); }

:where(button, [role="button"]:not(svg):not(svg *), summary) {
  transition: color var(--axio-motion-fast) ease,
    background-color var(--axio-motion-fast) ease,
    border-color var(--axio-motion-fast) ease,
    box-shadow var(--axio-motion-normal) var(--axio-motion-ease),
    opacity var(--axio-motion-fast) ease,
    filter var(--axio-motion-fast) ease,
    transform var(--axio-motion-fast) var(--axio-motion-ease);
}
:where(select, input, textarea, [role="combobox"]) {
  transition: color var(--axio-motion-fast) ease,
    background-color var(--axio-motion-fast) ease,
    border-color var(--axio-motion-fast) ease,
    box-shadow var(--axio-motion-normal) var(--axio-motion-ease);
}
@media (hover: hover) {
  :where(button:not(:disabled), [role="button"]:not([aria-disabled="true"]):not(svg):not(svg *)):hover {
    filter: brightness(1.045);
  }
}
:where(button:not(:disabled), [role="button"]:not([aria-disabled="true"]):not(svg):not(svg *)):active {
  transform: translateY(1px) scale(.985);
}
:where(select, [role="combobox"], input:not([type="range"]), textarea):focus-visible {
  outline: 2px solid var(--blue, #1263c7);
  outline-offset: 2px;
}
:where([role="menu"]:not([hidden]), [role="listbox"]:not([hidden]), [popover]:popover-open, details[open] > :not(summary)) {
  animation: axioMenuReveal var(--axio-motion-normal) var(--axio-motion-ease) both;
}
@keyframes axioMenuReveal {
  from { opacity: 0; transform: translateY(-5px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* The first account-load screen and route changes share one calm visual language. */
.account-bootstrap-shell {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 20%, rgba(18, 99, 199, .16), transparent 36%),
    radial-gradient(circle at 86% 80%, rgba(86, 136, 231, .12), transparent 37%),
    #f4f8ff;
}
.account-bootstrap-shell::before {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(18, 99, 199, .09), transparent 43%);
  animation: axioAmbientDrift 8s ease-in-out infinite alternate;
}
.account-bootstrap-card {
  position: relative;
  overflow: hidden;
  gap: 14px;
  border: 1px solid rgba(145, 174, 213, .36);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 30px 80px rgba(30, 71, 126, .14), inset 0 1px 0 rgba(255, 255, 255, .9);
  animation: axioLoaderCardIn 260ms var(--axio-motion-ease) both;
}
.account-bootstrap-brand { display: flex; justify-content: center; width: min(220px, 70%); margin-bottom: 5px; }
.account-bootstrap-brand .brand-logo-wordmark { width: auto; min-width: 0; height: 48px; justify-content: center; }
.account-bootstrap-brand .brand-logo-image-blue { width: min(180px, 55vw); }
.account-bootstrap-eyebrow {
  color: #1263c7;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.account-bootstrap-card h1 { font-size: clamp(1.55rem, 4vw, 1.95rem); letter-spacing: -.035em; }
.account-bootstrap-card p { margin: 0; }
.account-bootstrap-progress,
.dashboard-route-transition-progress {
  width: min(200px, 64%);
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(18, 99, 199, .12);
}
.account-bootstrap-progress { margin-top: 4px; }
.account-bootstrap-progress span,
.dashboard-route-transition-progress span {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1263c7, #62a6ff);
  animation: axioProgressGlide 1.35s ease-in-out infinite;
}
html[data-theme="dark"] .account-bootstrap-shell {
  color: #f8fbff;
  background:
    radial-gradient(circle at 18% 20%, rgba(45, 122, 230, .23), transparent 37%),
    radial-gradient(circle at 86% 80%, rgba(54, 95, 170, .18), transparent 36%),
    #070f20;
}
html[data-theme="dark"] .account-bootstrap-card {
  border-color: rgba(124, 165, 223, .23);
  background: rgba(14, 27, 49, .96);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 255, 255, .06);
}
html[data-theme="dark"] .account-bootstrap-card h1 { color: #f8fbff; }
html[data-theme="dark"] .account-bootstrap-card p { color: #b8c9e3; }
html[data-theme="dark"] .account-bootstrap-eyebrow { color: #83b9ff; }

.dashboard-route-transition-surface {
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 46%, rgba(24, 111, 222, .14), transparent 42%),
    #f5f9ff;
  opacity: 1;
}
.dashboard-route-transition-surface::before,
.dashboard-route-transition-surface::after {
  content: "";
  position: absolute;
  width: min(48vw, 620px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(65, 139, 245, .13), transparent 67%);
  pointer-events: none;
  animation: axioAmbientDrift 7s ease-in-out infinite alternate;
}
.dashboard-route-transition-surface::before { top: -27%; left: -13%; }
.dashboard-route-transition-surface::after { right: -16%; bottom: -35%; animation-delay: -3s; }
.dashboard-route-transition-panel {
  position: relative;
  z-index: 1;
  gap: 14px;
  width: min(370px, calc(100vw - 48px));
  padding: 29px 34px 32px;
  border: 1px solid rgba(131, 166, 210, .35);
  border-radius: 24px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 28px 72px rgba(28, 65, 119, .16), inset 0 1px 0 rgba(255, 255, 255, .9);
}
.dashboard-route-transition-logo .brand-logo-wordmark { width: auto; height: 42px; }
.dashboard-route-transition-logo .brand-logo-text { font-size: clamp(27px, 7vw, 34px); }
.dashboard-build-logo .brand-logo-text { font-size: clamp(31px, 8vw, 38px); }
.dashboard-route-transition-label { color: #536985; font-size: 13px; font-weight: 750; letter-spacing: .01em; }
.dashboard-route-transition-emblem { position: relative; width: 56px; height: 56px; margin-bottom: 3px; }
.dashboard-route-transition-emblem span {
  position: absolute;
  inset: 8px;
  border: 2px solid rgba(18, 99, 199, .22);
  border-radius: 15px;
  transform: rotate(45deg);
}
.dashboard-route-transition-emblem span:nth-child(2) {
  inset: 14px;
  border-color: rgba(18, 99, 199, .48);
  border-radius: 11px;
  animation: axioEmblemBreathe 1.8s ease-in-out infinite alternate;
}
.dashboard-route-transition-emblem span:nth-child(3) {
  inset: 22px;
  border: 0;
  border-radius: 5px;
  background: #1263c7;
  box-shadow: 0 0 16px rgba(18, 99, 199, .35);
}
.dashboard-route-transition-progress { width: 65%; margin-top: 2px; }
.dashboard-route-transition-surface.active { animation: none; }
.dashboard-route-transition-surface.active .dashboard-route-transition-panel { animation: axioLoaderCardIn 170ms var(--axio-motion-ease) both; }
html[data-theme="dark"] .dashboard-route-transition-surface {
  background:
    radial-gradient(circle at 50% 46%, rgba(31, 106, 213, .22), transparent 42%),
    #050d1c;
}
html[data-theme="dark"] .dashboard-route-transition-panel {
  border-color: rgba(125, 165, 223, .25);
  background: rgba(14, 27, 49, .94);
  box-shadow: 0 28px 72px rgba(0, 0, 0, .36), inset 0 1px 0 rgba(255, 255, 255, .06);
}
html[data-theme="dark"] .dashboard-route-transition-label { color: #c3d2e8; }
html[data-theme="dark"] .account-bootstrap-progress,
html[data-theme="dark"] .dashboard-route-transition-progress { background: rgba(130, 181, 255, .18); }
@keyframes axioLoaderCardIn {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes axioAmbientDrift {
  from { transform: translate3d(-2%, 1%, 0); }
  to { transform: translate3d(2%, -1%, 0); }
}
@keyframes axioProgressGlide {
  from { transform: translateX(-115%); }
  to { transform: translateX(260%); }
}
@keyframes axioEmblemBreathe {
  from { opacity: .5; transform: rotate(35deg) scale(.88); }
  to { opacity: 1; transform: rotate(55deg) scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
  :where(button, [role="button"], summary, select, input, textarea, [role="combobox"]) { transition: none !important; }
  :where([role="menu"], [role="listbox"], [popover], details[open] > :not(summary)),
  .account-bootstrap-shell::before,
  .account-bootstrap-card,
  .account-bootstrap-progress span,
  .dashboard-route-transition-surface::before,
  .dashboard-route-transition-surface::after,
  .dashboard-route-transition-panel,
  .dashboard-route-transition-emblem span,
  .dashboard-route-transition-progress span { animation: none !important; }
}

.canvas-stage .floor-plant-room-equipment-panel {
  top: 12px;
  right: 12px;
  bottom: 40px;
  width: min(340px, calc(100% - 24px));
  max-height: calc(100% - 52px);
  z-index: 24;
  gap: 8px;
  overscroll-behavior: contain;
}

.floor-plant-room-equipment-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--menu-border, #d5dce6);
  border-radius: 10px;
  background: var(--menu-surface, #fff);
  box-shadow: var(--menu-shadow, 0 10px 28px rgba(15, 23, 42, .12));
  pointer-events: auto;
}

.floor-plant-room-equipment-actions span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--menu-ink, #172033);
  font-weight: 700;
}

.floor-plant-room-equipment-actions button {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--menu-border-strong, #aebed2);
  border-radius: 7px;
  background: var(--menu-surface, #fff);
  color: var(--menu-ink, #172033);
  cursor: pointer;
}

.floor-plant-room-equipment-panel .plant-room-open-library-button {
  display: none;
}

.plant-room-pending-equipment-panel {
  position: absolute;
  z-index: 23;
  top: 70px;
  left: 14px;
  display: grid;
  gap: 10px;
  width: min(325px, calc(100% - 28px));
  max-height: min(52vh, 440px);
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.plant-room-pending-equipment-heading,
.plant-room-pending-equipment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.plant-room-pending-equipment-heading strong { font-size: 14px; }
.plant-room-pending-equipment-heading span {
  display: grid;
  place-items: center;
  min-width: 25px;
  height: 25px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.plant-room-pending-equipment-panel p,
.plant-room-pending-equipment-inspector-note span {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.plant-room-pending-equipment-item {
  padding-top: 9px;
  border-top: 1px solid var(--glass-border);
}
.plant-room-pending-equipment-item > span,
.plant-room-pending-equipment-inspector-note {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.plant-room-pending-equipment-item strong { font-size: 12px; }
.plant-room-pending-equipment-item small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.plant-room-pending-equipment-item button,
.plant-room-pending-equipment-inspector-note button {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--blue-border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 9%, var(--surface-solid));
  color: var(--accent);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}
.plant-room-pending-equipment-item button:hover,
.plant-room-pending-equipment-inspector-note button:hover {
  background: color-mix(in srgb, var(--accent) 16%, var(--surface-solid));
}
.plant-room-pending-equipment-inspector-note {
  padding: 11px;
  border: 1px solid var(--blue-border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 6%, var(--surface-solid));
}
.plant-room-pending-equipment-inspector-note strong { font-size: 12px; }
.plant-room-pending-equipment-inspector-note button { justify-self: start; margin-top: 5px; }

.schematic-legacy-plant-linker {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--blue-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 5%, var(--surface-solid));
}
.schematic-legacy-plant-linker > strong { color: var(--text); font-size: 13px; }
.schematic-legacy-plant-linker p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.schematic-legacy-plant-linker label { display: grid; gap: 5px; color: var(--text); font-size: 12px; font-weight: 700; }
.schematic-legacy-plant-linker select {
  min-width: 0;
  min-height: 36px;
  padding: 6px 9px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: var(--surface-solid);
  color: var(--text);
}
.schematic-legacy-plant-linker button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--blue-border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface-solid));
  color: var(--accent);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}
.schematic-legacy-plant-linker button:hover { background: color-mix(in srgb, var(--accent) 16%, var(--surface-solid)); }

/* Account keeps everyday actions visible and optional setup out of the way. */
.account-menu-popover.account-compact-v582 {
  inset: 64px 16px auto auto;
  width: min(860px, calc(100vw - 32px));
  max-height: calc(100dvh - 80px);
  padding: 14px;
  border-radius: 16px;
  background: var(--surface-solid);
  backdrop-filter: none;
  overscroll-behavior: contain;
}
.account-compact-v582 .account-menu-head {
  position: sticky;
  top: -14px;
  z-index: 4;
  margin-top: -1px;
  padding: 8px 0 12px;
  background: var(--surface-solid);
}
.account-compact-v582 .account-menu-head strong { font-size: 17px; }
.account-compact-v582 .account-menu-head span { font-size: 12px; line-height: 1.4; }
.account-compact-v582 .account-menu-body {
  grid-template-columns: minmax(0, 250px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding-top: 12px;
}
.account-compact-v582 :is(.account-profile-card, .account-menu-section) {
  min-width: 0;
  padding: 12px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--blue) 3%, var(--surface-solid));
  box-shadow: none;
}
.account-compact-v582 .account-profile-card {
  display: grid;
  gap: 12px;
  text-align: left;
  align-items: start;
}
.account-compact-v582 .account-profile-identity {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  position: relative;
}
.account-compact-v582 .account-profile-avatar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  font-size: 13px;
  box-shadow: none;
}
.account-compact-v582 .account-profile-copy { display: grid; gap: 3px; min-width: 0; }
.account-compact-v582 .account-profile-copy .account-profile-name {
  padding: 0;
  text-align: left;
  font-size: 14px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.account-compact-v582 .account-profile-copy :is(span, em) { font-size: 11px; }
.account-compact-v582 .account-profile-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  align-items: stretch;
  gap: 6px;
  margin: 0;
}
html [data-menu-ui].account-menu-popover.account-compact-v582 .account-profile-actions > button {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  height: auto;
  text-align: center;
}
.account-compact-v582 :is(.settings-mini-btn, .primary-mini) {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 11px;
  line-height: 1.3;
  border-radius: 8px;
  white-space: normal;
}
.account-compact-v582 :is(.account-name-popout, .account-password-popout) {
  position: static;
  width: 100%;
  margin: 0;
  box-shadow: none;
  padding: 10px;
  background: var(--surface-solid);
}
.account-compact-v582 .account-user-image-popout { top: 52px; left: 0; right: 0; }
.account-compact-v582 .settings-field { min-width: 0; }
.account-compact-v582 .settings-field input { min-width: 0; width: 100%; }
.account-compact-v582 .account-menu-main { min-width: 0; gap: 12px; align-content: start; }
.account-compact-v582 .account-section-title { align-items: start; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.account-compact-v582 .account-section-title h3 { margin: 0; font-size: 14px; }
.account-compact-v582 .account-section-title > span { font-size: 11px; line-height: 1.4; }
.account-compact-v582 .company-overview-card { border-radius: 10px; overflow: hidden; }
.account-compact-v582 .company-overview-header {
  min-height: 0;
  height: 68px;
  padding: 10px;
  border-radius: 10px 10px 0 0;
}
.account-compact-v582 .company-overview-logo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  box-shadow: none;
  font-size: 12px;
}
.account-compact-v582 .company-overview-copy { gap: 8px; padding: 10px; }
.account-compact-v582 .company-overview-copy > strong { font-size: 15px; overflow-wrap: anywhere; }
.account-compact-v582 .account-company-bio {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12px;
}
.account-compact-v582 .company-overview-meta { gap: 6px; }
.account-compact-v582 .company-overview-meta span {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.account-compact-v582 .company-overview-meta span + span::before { content: "· "; }
.account-compact-v582 .account-company-setup {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.account-compact-v582 .account-company-setup small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.account-compact-v582 .account-company-setup button { flex: 0 0 auto; color: var(--blue); }
.account-compact-v582 .account-company-unlinked { font-size: 12px; }
.account-compact-v582 :is(.account-privacy-disclosure, .account-invite-disclosure) {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-solid);
}
.account-compact-v582 :is(.account-privacy-disclosure, .account-invite-disclosure) > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 40px;
  padding: 8px 10px;
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  list-style: none;
}
.account-compact-v582 :is(.account-privacy-disclosure, .account-invite-disclosure) > summary::-webkit-details-marker { display: none; }
.account-compact-v582 :is(.account-privacy-disclosure, .account-invite-disclosure) > summary::after { content: "⌄"; color: var(--blue); }
.account-compact-v582 :is(.account-privacy-disclosure, .account-invite-disclosure)[open] > summary::after { content: "⌃"; }
.account-compact-v582 :is(.account-privacy-disclosure, .account-invite-disclosure) > summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 10px; }
.account-compact-v582 .account-privacy-disclosure > summary > span { display: flex; align-items: center; gap: 7px; min-width: 0; overflow: visible; white-space: normal; }
.account-compact-v582 .account-privacy-disclosure > summary svg { width: 14px; height: 14px; color: var(--blue); flex-shrink: 0; }
.account-compact-v582 .account-privacy-disclosure > summary strong { font-size: 12px; white-space: normal; }
.account-compact-v582 .account-privacy-disclosure > summary small { margin-left: auto; font-size: 10px; color: var(--muted); white-space: nowrap; }
.account-compact-v582 .account-analytics-preferences { margin: 0; border: 0; border-radius: 0 0 10px 10px; background: transparent; }
.account-compact-v582 .account-analytics-preferences-heading > strong { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.account-compact-v582 .account-analytics-preferences-heading > small { font-size: 11px; }
.account-compact-v582 .account-analytics-preferences :is(.account-analytics-choice-copy > small, .account-analytics-service-copy > small, .account-analytics-privacy-footnote, legend) { font-size: 10px; }
.account-compact-v582 .account-analytics-choice-copy > strong { font-size: 11px; }
.account-compact-v582 .account-company-members { gap: 8px; }
.account-compact-v582 .company-member-row { grid-template-columns: minmax(0, 1.8fr) minmax(70px, .7fr) minmax(68px, .7fr) minmax(68px, .7fr); gap: 6px; padding: 7px; }
.account-compact-v582 .company-member-copy strong { font-size: 12px; }
.account-compact-v582 .company-member-copy small { font-size: 11px; }
.account-compact-v582 .company-member-empty { min-width: 0; font-size: 12px; }
.account-compact-v582 .company-member-invite { grid-template-columns: minmax(0, 1fr) 110px; gap: 8px; padding: 10px; }
.account-compact-v582 .account-invite-button { grid-column: 1 / -1; justify-self: start; }
.account-compact-v582 .account-invite-help { display: block; padding: 0 10px 10px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.account-compact-v582 .account-inline-feedback { margin: 0; color: var(--blue); font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.account-compact-v582 .account-inline-feedback.error { color: var(--red); }
.account-compact-v582 .account-invite-disclosure .account-inline-feedback { padding: 0 10px 10px; }
.account-compact-v582 .account-menu-actions:not(:has(.account-message)) { display: none; }
@media (max-width: 740px) {
  .account-menu-popover.account-compact-v582 { inset: 60px 8px auto; width: auto; max-height: calc(100dvh - 70px); padding: 12px; }
  .account-compact-v582 .account-menu-body { grid-template-columns: minmax(0, 1fr); }
  .account-compact-v582 .account-menu-head { top: -12px; }
  .account-compact-v582 .account-company-setup { flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .account-compact-v582 .company-member-row:not(.company-member-head) { grid-template-columns: minmax(0, 1fr) auto; }
  .account-compact-v582 .company-member-head { display: none; }
  .account-compact-v582 .company-member-login::before { content: "Last login: "; }
  .account-compact-v582 .company-member-login { font-size: 11px; }
  .account-compact-v582 .company-member-invite { grid-template-columns: minmax(0, 1fr); }
}
@media (pointer: coarse) {
  .account-compact-v582 :is(.settings-mini-btn, .primary-mini, .company-member-status-select, .account-menu-head button) { min-height: 44px; }
  .account-compact-v582 :is(.account-privacy-disclosure, .account-invite-disclosure) > summary { min-height: 44px; }
}

/* Floor-plan technical pipe tags share the neutral printed drawing design.
   The plan stays light in dark UI mode; only the service dots carry colour.
   Scope excludes duct labels, schematic symbols and the export panel. */
#sheet .pipe-size-label-grid.pipe-technical-tag .pipe-size-label-pill-bg {
  fill: #ffffff;
  fill-opacity: .86;
  stroke: #cbd5e1;
  stroke-width: calc(.65px * var(--pipe-label-scale, 1));
}
#sheet .pipe-size-label-grid.pipe-technical-tag .pipe-size-label {
  fill: #111827;
  stroke: none;
  font-family: var(--font-ui);
  font-weight: 700;
  letter-spacing: 0;
}
#sheet .pipe-size-label-grid.pipe-technical-tag .pipe-size-label-secondary {
  fill: #667085;
  font-weight: 500;
  font-size: calc(8px * var(--pipe-label-scale, 1));
}
#sheet .pipe-size-label-grid.pipe-technical-tag { filter: none; }

/* Drawing-only annotation review. The existing Export panel is unchanged. */
.axm-drawing-preview { position: fixed; inset: 0; z-index: 18000; display: grid; place-items: center; padding: 20px; background: rgba(15, 23, 42, .42); backdrop-filter: blur(5px); font: 13px/1.4 var(--font-ui, Inter, system-ui, sans-serif); color: var(--text, #172033); }
.axm-drawing-preview, .axm-drawing-preview * { box-sizing: border-box; }
.axm-drawing-preview-dialog { width: min(1500px, 100%); height: min(940px, calc(100dvh - 40px)); display: flex; flex-direction: column; min-height: 0; overflow: hidden; background: var(--surface-solid, #fff); border: 1px solid var(--line-strong, #d6e1ee); border-radius: 18px; box-shadow: 0 26px 90px #15243f40; outline: none; }
.axm-drawing-preview :is(button, input, textarea, select) { font: inherit; color: inherit; border: 1px solid var(--line-strong, #cbd6e5); border-radius: 8px; background: var(--surface-solid, #fff); box-shadow: none; min-height: 34px; padding: 6px 10px; }
.axm-drawing-preview button { cursor: pointer; font-weight: 600; white-space: nowrap; }
.axm-drawing-preview button:disabled { opacity: .45; cursor: default; }
.axm-drawing-preview button:not(:disabled):hover { border-color: var(--blue, #0a7cff); background: var(--blue-soft, #edf5ff); }
.axm-drawing-preview :is(button, input, textarea, select, [tabindex]):focus-visible { outline: 2px solid var(--blue, #0a7cff); outline-offset: 2px; }
.axm-drawing-preview-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 20px 12px; border-bottom: 1px solid var(--line, #e2e8f0); }
.axm-drawing-preview-header h2 { margin: 0; font-size: 19px; font-weight: 750; letter-spacing: -.3px; }
.axm-drawing-preview-header p { margin: 4px 0 0; color: var(--muted, #667085); font-size: 12px; }
.axm-drawing-preview-header button { font-size: 23px; line-height: 1; width: 34px; padding: 0; }
.axm-drawing-preview-toolbar { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding: 10px 20px; border-bottom: 1px solid var(--line, #e2e8f0); }
.axm-drawing-preview-toolbar label { display: flex; align-items: center; gap: 8px; margin-right: auto; font-weight: 650; }
.axm-drawing-preview-toolbar select { max-width: min(390px, 38vw); }
.axm-drawing-preview-toolbar [data-output="zoom"] { color: var(--muted, #667085); min-width: 38px; text-align: right; font-variant-numeric: tabular-nums; }
.axm-drawing-preview-body { display: grid; grid-template-columns: minmax(0, 1fr) 244px; flex: 1; min-height: 0; }
.axm-drawing-preview-canvas { min-width: 0; min-height: 0; overflow: hidden; position: relative; background: #e8edf4; cursor: grab; touch-action: none; display: flex; align-items: center; justify-content: center; }
.axm-drawing-preview-canvas:active, .axm-drawing-preview-panning { cursor: grabbing; }
.axm-drawing-preview-sheet { display: block; width: 100%; height: 100%; max-width: none; max-height: none; user-select: none; background: #fff; }
.axm-drawing-preview-sheet .axm-drawing-preview-editable { cursor: move; pointer-events: bounding-box; }
.axm-drawing-preview-sheet .axm-drawing-preview-selected { filter: drop-shadow(0 0 1px #147bffaa) drop-shadow(0 0 2px #147bff88); }
.axm-drawing-preview-sheet .axm-drawing-preview-selected:focus { outline: none; }
.axm-drawing-preview-place-note, .axm-drawing-preview-place-note * { cursor: crosshair !important; }
.axm-drawing-preview-sidebar { overflow-y: auto; padding: 16px 14px; border-left: 1px solid var(--line, #e2e8f0); display: flex; flex-direction: column; align-items: stretch; gap: 12px; background: var(--surface-solid, #fff); }
.axm-drawing-preview-sidebar label { display: grid; gap: 6px; font-weight: 600; font-size: 12px; }
.axm-drawing-preview-sidebar select, .axm-drawing-preview-sidebar textarea { width: 100%; min-width: 0; max-width: 100%; font-weight: 400; }
.axm-drawing-preview-sidebar textarea { resize: vertical; min-height: 70px; }
.axm-drawing-preview-hint { color: var(--muted, #667085); font-size: 11px; margin: 0; line-height: 1.55; }
.axm-drawing-preview-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.axm-drawing-preview-actions button { font-size: 11px; padding-inline: 5px; }
.axm-drawing-preview-pipe-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.axm-drawing-preview-pipe-controls[hidden] { display: none; }
.axm-drawing-preview-pipe-controls p { grid-column: 1 / -1; }
.axm-drawing-preview-transform-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: end; }
.axm-drawing-preview-transform-controls[hidden] { display: none; }
.axm-drawing-preview-transform-controls input { width: 100%; min-width: 0; font-variant-numeric: tabular-nums; }
.axm-drawing-preview-transform-controls button { white-space: normal; min-height: 34px; }
.axm-drawing-preview-content-controls { margin: 0; padding: 10px 0; border: 0; border-block: 1px solid var(--line, #e2e8f0); min-width: 0; }
.axm-drawing-preview-content-controls[hidden] { display: none; }
.axm-drawing-preview-content-controls legend { padding: 0 4px 0 0; font-size: 12px; font-weight: 700; }
.axm-drawing-preview-content-presets { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0 0 10px; }
.axm-drawing-preview-content-presets button { padding-inline: 4px; font-size: 11px; white-space: normal; }
.axm-drawing-preview-content-controls [data-content-fields] { display: grid; gap: 9px; }
.axm-drawing-preview-content-controls label { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.axm-drawing-preview-content-controls input[type="checkbox"] { width: 16px; height: 16px; min-height: 0; padding: 0; margin: 0; flex: 0 0 16px; accent-color: var(--blue, #0a7cff); }
.axm-drawing-preview [data-action="save"] { border-color: var(--blue, #0a7cff); color: var(--blue, #0a7cff); }
.axm-drawing-preview-sheet [data-drawing-preview-tip] { cursor: crosshair; pointer-events: all; }
.axm-drawing-preview-note { display: grid; gap: 8px; margin: 2px 0 0; padding-top: 13px; border-top: 1px solid var(--line, #e2e8f0); }
.axm-drawing-preview-options { margin: 0; padding: 10px 0 0; border: 0; border-top: 1px solid var(--line, #e2e8f0); min-width: 0; }
.axm-drawing-preview-options[hidden] { display: none; }
.axm-drawing-preview-options legend { font-size: 12px; font-weight: 700; padding: 0 4px 0 0; }
.axm-drawing-preview-options [data-options] { display: grid; gap: 9px; }
.axm-drawing-preview-options label { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.axm-drawing-preview-options input[type="checkbox"] { width: 16px; height: 16px; min-height: 0; margin: 0; accent-color: var(--blue, #0a7cff); }
.axm-drawing-preview-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line, #e2e8f0); padding: 12px 20px; }
.axm-drawing-preview-footer p { color: var(--muted, #667085); font-size: 12px; margin: 0; }
.axm-drawing-preview-footer > div { display: flex; gap: 8px; flex-shrink: 0; }
.axm-drawing-preview button.axm-drawing-preview-export { color: #fff; background: var(--blue, #0a7cff); border-color: var(--blue, #0a7cff); padding-inline: 18px; }
.axm-drawing-preview button.axm-drawing-preview-export:not(:disabled):hover { color: #fff; background: var(--blue-hover, #006adc); }
.axm-drawing-preview-busy .axm-drawing-preview-canvas { cursor: progress; }
@media (max-width: 820px) {
  .axm-drawing-preview { padding: 8px; }
  .axm-drawing-preview-dialog { height: calc(100dvh - 16px); border-radius: 12px; }
  .axm-drawing-preview-body { grid-template-columns: minmax(0, 1fr) 204px; }
  .axm-drawing-preview-header, .axm-drawing-preview-toolbar, .axm-drawing-preview-footer { padding-left: 12px; padding-right: 12px; }
  .axm-drawing-preview-sidebar { padding: 12px 10px; }
}
@media (max-width: 580px) {
  .axm-drawing-preview-body { display: flex; flex-direction: column; }
  .axm-drawing-preview-canvas { flex: 1; min-height: 210px; }
  .axm-drawing-preview-sidebar { max-height: 170px; border-left: 0; border-top: 1px solid var(--line, #e2e8f0); display: grid; grid-template-columns: 1fr 1fr; gap: 8px; flex-shrink: 0; }
  .axm-drawing-preview-note { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  .axm-drawing-preview-note textarea { min-height: 42px; }
  .axm-drawing-preview-options { grid-column: 1 / -1; }
  .axm-drawing-preview-content-controls { grid-column: 1 / -1; }
  .axm-drawing-preview-toolbar { gap: 5px; }
  .axm-drawing-preview-toolbar label { flex: 1 1 100%; }
  .axm-drawing-preview-toolbar select { max-width: 80%; flex: 1; }
  .axm-drawing-preview-footer { gap: 8px; }
  .axm-drawing-preview-footer p { font-size: 10px; }
}

/* Product library available-height layout. Restore one bounded catalogue pane
   through every breakpoint; old tablet max-height rules left half a tall modal
   empty. Search and view/sort controls share normal flow, not separate sticky
   layers. Existing result windowing is untouched; full-screen readers retain
   viewport ownership rather than inheriting a tablet drawer width. */
html .product-library-popover[data-menu-ui] {
  min-height: 0; height: auto !important; max-height: none !important;
  align-content: stretch; grid-template-rows: auto minmax(0, 1fr) auto;
  box-sizing: border-box;
}
html .product-library-popover[data-menu-ui] > .product-library-body {
  display: grid; min-width: 0; min-height: 0; height: 100%; max-height: none;
  grid-template-columns: 188px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr);
  grid-auto-rows: auto; align-content: stretch; align-items: stretch;
  overflow: hidden; padding-right: 0; box-sizing: border-box;
}
html .product-library-popover[data-menu-ui] > .product-library-body.sidebar-collapsed {
  grid-template-columns: 66px minmax(0, 1fr);
}
html .product-library-popover[data-menu-ui] .product-library-main {
  grid-column: 2; grid-row: 1; min-width: 0; min-height: 0;
  height: 100% !important; max-height: none !important; box-sizing: border-box;
  align-self: stretch; align-content: start; grid-template-rows: none;
  grid-auto-rows: max-content; overflow-x: hidden; overflow-y: auto;
}
html .product-library-popover[data-menu-ui] .product-library-rail {
  grid-column: 1; grid-row: 1; min-width: 0; min-height: 0;
  height: 100%; max-height: none; box-sizing: border-box;
}
html .product-library-popover[data-menu-ui] .product-library-main > * {
  min-width: 0; max-width: 100%;
}
html .product-library-popover[data-menu-ui] .product-finder-search-row {
  position: static; top: auto; z-index: auto; min-width: 0; height: auto;
  grid-template-columns: minmax(0, 1fr) auto; align-items: end; margin-block: 0;
}
html .product-library-popover[data-menu-ui] .product-search {
  min-width: 0; height: auto; grid-template-rows: auto auto;
  font-size: 11px; font-weight: 600; line-height: 1.4;
}
html .product-library-popover[data-menu-ui] .product-finder-search-control {
  min-width: 0; height: auto; min-height: 38px; box-sizing: border-box;
}
html .product-library-popover[data-menu-ui] .product-finder-search-control input {
  flex: 1 1 0; min-width: 0; width: 100%; max-width: 100%; height: auto !important;
  min-height: 36px !important; line-height: 1.4; box-sizing: border-box;
  padding: 0 !important; border: 0 !important; background: transparent !important;
}
html .product-library-popover[data-menu-ui] .product-finder-filter-toggle {
  height: auto; min-height: 38px; white-space: normal; line-height: 1.4;
}
html .product-library-popover[data-menu-ui] .product-finder-quick-row {
  position: static; display: flex; flex-wrap: wrap; align-items: center;
  gap: 8px; min-width: 0; height: auto;
}
html .product-library-popover[data-menu-ui] .product-finder-view-tabs {
  display: flex; flex-wrap: wrap; min-width: 0; max-width: 100%; height: auto;
}
html .product-library-popover[data-menu-ui] .product-finder-view-tabs button {
  min-width: 0; height: auto; min-height: 34px; white-space: normal;
}
html .product-library-popover[data-menu-ui] .product-finder-sort {
  display: flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%;
}
html .product-library-popover[data-menu-ui] .product-finder-sort select {
  min-width: 0; max-width: 100%; height: auto; min-height: 34px;
}
html .product-library-popover[data-menu-ui] > .product-library-body.detail-open:not(.detail-fullscreen) > .product-detail-panel {
  grid-column: auto; grid-row: auto;
}
html .product-library-popover[data-menu-ui] > .product-library-body.detail-fullscreen > .product-detail-panel {
  width: 100dvw !important; max-width: none !important;
}
@media (max-width: 1050px) {
  html .product-library-popover[data-menu-ui] > .product-library-body,
  html .product-library-popover[data-menu-ui] > .product-library-body.sidebar-collapsed {
    grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr);
  }
  html .product-library-popover[data-menu-ui] .product-library-rail {
    grid-column: 1; grid-row: 1; height: auto; max-height: 70px;
    overflow-x: auto; overflow-y: hidden;
  }
  html .product-library-popover[data-menu-ui] .product-library-main {
    grid-column: 1; grid-row: 2;
  }
}
@media (max-width: 760px), (pointer: coarse) {
  html .product-library-popover[data-menu-ui] .product-finder-search-control { min-height: 46px; }
  html .product-library-popover[data-menu-ui] .product-finder-search-control input {
    min-height: 44px !important; font-size: 16px !important;
  }
  html .product-library-popover[data-menu-ui] :is(.product-finder-filter-toggle, .product-finder-view-tabs button, .product-finder-sort select) {
    min-height: 44px !important;
  }
  html .product-library-popover[data-menu-ui] .product-finder-sort select {
    font-size: 16px !important;
  }
}

/* Figure inspection: click details expand inline, while hover/focus hints use
   one pointer-transparent visual overlay and never reflow the measurements. */
html .results-panel .result-metric-trigger {
  display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px;
  width: auto !important; max-width: 100%; min-width: 0; min-height: 32px;
  padding: 2px 0 !important; border: 0 !important; border-radius: 5px;
  color: inherit !important; background: transparent !important;
  box-shadow: none !important; font: inherit !important; line-height: 1.35;
  text-align: inherit; white-space: normal; cursor: pointer;
  scroll-margin-top: calc(var(--workspace-panel-head-height,48px) + 102px); scroll-margin-bottom: 16px;
}
html .results-panel .breakdown-list > .total.result-metric-row {
  display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px; min-width: 0;
}
html .results-panel .result-metric-trigger > span:first-child { font: inherit !important; overflow-wrap: anywhere; }
html .results-panel .result-metric-info {
  display: inline-grid; place-items: center; flex: 0 0 15px; width: 15px; height: 15px;
  border: 1px solid var(--menu-border,var(--line)); border-radius: 50%;
  color: var(--menu-muted,var(--muted)); font: 600 10px/1 system-ui !important;
}
html .results-panel .result-metric-trigger:is(:hover,:focus-visible) { color: var(--blue) !important; }
html .results-panel .result-metric-trigger:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
html .results-panel .result-metric-hint {
  display: none !important; grid-column: 1 / -1; min-width: 0; margin: 0;
  padding: 7px 9px; border-radius: 6px; background: var(--menu-hover,var(--surface-solid));
  color: var(--menu-muted,var(--muted)); font: 500 11px/1.45 var(--font-ui,system-ui) !important;
  text-align: left !important; overflow-wrap: anywhere;
}
html .results-panel .result-metric-hint > span { display: block; font: inherit !important; color: inherit !important; }
html .results-panel .result-load-head-interactive { cursor: default; }
html .results-panel .result-load-head-interactive .result-load-summary :is(strong,em) { width: fit-content; max-width: 100%; }
html .results-panel .result-load-head-interactive .result-load-summary .result-metric-trigger { justify-content: flex-start; }
html .results-panel .result-load-collapse { width: 30px; min-width: 30px; height: 30px; padding: 0 !important; border: 0; background: transparent; color: inherit; }
html .results-panel :is(.result-metric-shell,.result-metric-summary-total,.result-metric-summary-intensity) { display: contents; }
html .results-panel .result-metric-detail[hidden] { display: none !important; }
html .results-panel .result-metric-detail:not([hidden]) {
  display: grid; grid-column: 1 / -1; min-width: 0; width: 100%; gap: 8px;
  margin: 0; padding: 10px; border: 1px solid var(--menu-border,var(--line)); border-radius: 8px;
  background: var(--menu-surface,var(--surface-solid)); color: var(--menu-text,var(--text));
  font: 500 12px/1.5 var(--font-ui,system-ui) !important; text-align: left !important; box-sizing: border-box;
}
html .results-panel .result-metric-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; min-width: 0; }
html .results-panel .result-metric-detail h4 { margin: 0; color: inherit; font: 650 13px/1.4 var(--font-ui,system-ui); overflow-wrap: anywhere; }
html .results-panel .result-metric-detail p { margin: 0; font: inherit; text-align: left; overflow-wrap: anywhere; }
html .results-panel .result-metric-scope { color: var(--menu-muted,var(--muted)); font-size: 11px !important; }
html .results-panel .result-metric-method { padding: 7px 8px; border-radius: 5px; background: var(--menu-hover,var(--surface-solid)); }
html .results-panel .result-metric-detail-head button { flex: 0 0 28px; width: 28px; min-width: 28px; min-height: 28px; padding: 0 !important; scroll-margin-top: calc(var(--workspace-panel-head-height,48px) + 102px); }
html .results-panel .result-metric-facts { display: grid; gap: 5px; margin: 0; min-width: 0; }
html .results-panel .result-metric-facts > div { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: start; gap: 8px; padding-block: 4px; border-bottom: 1px solid var(--menu-border,var(--line)); }
html .results-panel .result-metric-facts dt { display: block; min-width: 0; font: 500 11px/1.4 var(--font-ui,system-ui) !important; color: var(--menu-muted,var(--muted)); overflow-wrap: anywhere; }
html .results-panel .result-metric-facts dd { display: block; min-width: 0; margin: 0; font: 600 12px/1.4 var(--font-ui,system-ui) !important; text-align: right; overflow-wrap: anywhere; }
html .results-panel .result-metric-notes { margin: 0; padding-left: 16px; color: var(--menu-muted,var(--muted)); font: 500 11px/1.5 var(--font-ui,system-ui); }
html .results-panel .result-metric-notes li { margin: 0 0 4px; overflow-wrap: anywhere; }
.result-metric-tooltip[hidden] { display: none !important; }
.result-metric-tooltip {
  position: fixed; z-index: 9000; width: min(310px,calc(100vw - 24px)); max-height: min(180px,calc(100dvh - 24px));
  padding: 10px 12px; box-sizing: border-box; border: 1px solid var(--menu-border,var(--line)); border-radius: 8px;
  background: var(--menu-surface,var(--surface-solid)); color: var(--menu-text,var(--text));
  box-shadow: 0 4px 18px #172f4824; font: 500 12px/1.45 var(--font-ui,system-ui);
  text-align: left; overflow-wrap: anywhere; overflow: hidden; pointer-events: none;
}
@media (max-width:760px), (pointer:coarse) {
  html .results-panel .result-metric-trigger { min-height: 44px; }
  html .results-panel .result-metric-detail-head button { min-width: 44px; min-height: 44px; }
  html .results-panel .result-load-collapse { min-width: 44px; min-height: 44px; }
}

/* Canvas-only zone visibility follows the Project panel's existing layers. */
.canvas-zone-visibility .rail-title { gap: 8px; flex-wrap: wrap; }
.canvas-zone-visibility .rail-title > span { min-width: 0; }
.canvas-zone-visibility-hint { margin: 6px 0 9px; color: var(--muted); font-size: 11px; line-height: 1.45; text-align: left; overflow-wrap: anywhere; }
.canvas-zone-visibility-row > span:first-child { flex: 1; }
.canvas-zone-visibility-row > span:first-child > span { display: grid; gap: 3px; text-align: left; overflow-wrap: anywhere; }
.canvas-zone-visibility-row small { font-size: 10px; font-weight: 500; color: var(--muted); }
.canvas-zone-visibility-row .eye { flex: 0 0 auto; }
.canvas-zone-visibility button:focus-visible { outline: 2px solid var(--primary, #1677ff); outline-offset: 2px; }

.heat-emitter-placement-rotation { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; min-width: 0; }
.heat-emitter-placement-rotation .pipe-draft-inline-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.heat-emitter-placement-rotation .field-note { grid-column: 1 / -1; margin: 0; line-height: 1.4; text-align: left; overflow-wrap: anywhere; }
.heat-emitter-placement-rotation-note { grid-column: 1 / -1; margin: 0; }
@media (max-width: 500px) { .heat-emitter-placement-rotation { grid-template-columns: minmax(0, 1fr); } }
