/* VSEW measurement — layout per reference mockup */

.vsew-measurement {
  margin: 0;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  background: #ececec;
  color: #1a1a1a;
  font-family: var(--vsew-font, "Inter", "IBM Plex Sans", system-ui, sans-serif);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
  --vsew-chart-plot-height: 268px;
  --vsew-charts-split-height: 335px;
}

.vsew-measurement-shell {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

/* —— Sidebar —— */
.vsew-sidebar {
  position: relative;
  z-index: 20;
  background: #f7f7f7;
  border-right: 1px solid #dcdcdc;
  padding: 20px 14px 16px;
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  box-sizing: border-box;
}

.vsew-brand-block {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  min-width: 0;
}

.vsew-brand-mark {
  display: block;
  height: 57px;
  width: auto;
  max-width: 78px;
  flex-shrink: 0;
  object-fit: contain;
  object-position: left center;
}

.vsew-brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  line-height: 1.1;
  min-width: 0;
}

.vsew-brand-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #111;
}

.vsew-brand-sub {
  font-size: 13px;
  font-weight: 500;
  color: #607d8b;
  margin: 0;
}

.vsew-nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
}

.vsew-nav-group {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.vsew-nav-group--monitoring {
  flex: 1 1 0;
  overflow: hidden;
}

.vsew-nav-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #9a9a9a;
  margin: 0 0 6px 4px;
  flex: 0 0 auto;
}

.vsew-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 4px;
  border-left: 3px solid transparent;
  color: #444;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

.vsew-nav a:hover {
  background: #efefef;
  text-decoration: none;
}

.vsew-nav a.is-active {
  background: #ebebeb;
  border-left-color: #2563eb;
  color: #111;
  font-weight: 600;
}

.vsew-nav a svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
}

.vsew-nav-sensors {
  margin: 2px 0 8px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
}

.vsew-nav-sensors-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin: 0 0 4px 10px;
  padding: 5px 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #666;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: left;
}

.vsew-nav-sensors-toggle:hover {
  background: #efefef;
  color: #333;
}

.vsew-nav-sensors-toggle__label {
  flex: 1 1 auto;
}

.vsew-nav-sensors-toggle__meta {
  font-size: 10px;
  font-weight: 600;
  color: #888;
  font-variant-numeric: tabular-nums;
}

.vsew-nav-sensors-toggle::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #888;
  border-bottom: 1.5px solid #888;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  flex-shrink: 0;
  margin-right: 2px;
}

.vsew-nav-sensors-toggle[aria-expanded="false"]::after {
  transform: rotate(-45deg);
  margin-top: 3px;
}

.vsew-nav-children {
  display: none;
  flex-direction: column;
  gap: 1px;
  margin: 0 0 0 10px;
  padding-left: 8px;
  border-left: 1px solid #e0e0e0;
  min-height: 0;
  overflow-y: auto;
  flex: 1 1 0;
  max-height: min(46vh, 360px);
}

.vsew-nav-children--open {
  display: flex;
}

.vsew-nav-sensor {
  display: block;
  padding: 5px 10px 5px 8px;
  border-radius: 4px;
  border-left: 3px solid transparent;
  color: #555;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vsew-nav-sensor:hover {
  background: #efefef;
  text-decoration: none;
  color: #222;
}

.vsew-nav-sensor.is-active {
  background: #ebebeb;
  border-left-color: #2563eb;
  color: #111;
  font-weight: 600;
}

.vsew-systemzeit {
  margin-top: auto;
  border: 1px solid #dcdcdc;
  border-radius: 6px;
  background: #fff;
  padding: 10px 12px;
}

.vsew-systemzeit .vsew-nav-label {
  margin-bottom: 4px;
}

.vsew-systemzeit strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #111;
}

.vsew-systemzeit div {
  font-size: 12px;
  color: #666;
  margin-top: 2px;
}

/* —— Main column —— */
.vsew-main {
  min-width: 0;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #ececec;
}

.vsew-topbar {
  background: #f7f7f7;
  border-bottom: 1px solid #dcdcdc;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.vsew-sensor-title {
  font-size: 13px;
  font-weight: 600;
  color: #222;
  margin: 0;
  flex: 1;
  min-width: 200px;
}

.vsew-topbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.vsew-vital-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  min-height: 16px;
}

.vsew-vital-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 500;
  line-height: 12px;
  color: #444;
}

.vsew-vital-item + .vsew-vital-item {
  margin-left: 18px;
}

.vsew-vital-item.online {
  color: #1a7f4e;
  font-weight: 600;
  font-size: 12px;
  line-height: 12px;
}

.vsew-vital-item.offline,
.vsew-vital-item.warnung {
  color: #6b7280;
  font-weight: 500;
}

.vsew-vital-item .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9ca3af;
}

.vsew-vital-item.online .dot {
  background: #22c55e;
}

.vsew-vital-item.warnung .dot {
  background: #ca8a04;
}

.vsew-vital-item svg {
  width: 14px;
  height: 14px;
  stroke: #666;
  fill: none;
  stroke-width: 1.5;
}

.vsew-vital-battery,
.vsew-vital-signal {
  gap: 3px;
}

.vsew-vital-temp {
  font-size: 12px;
  font-weight: 500;
  line-height: 12px;
  font-variant-numeric: tabular-nums;
}

.vsew-vital-num {
  font-size: 12px;
  font-weight: 500;
  line-height: 12px;
  font-variant-numeric: tabular-nums;
}

.vsew-battery-icon {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
  height: 13px;
}

.vsew-battery-icon svg {
  display: block;
  height: 13px;
  width: auto;
}

.vsew-battery-icon .battery-outline {
  fill: #fff;
  stroke: #777;
  stroke-width: 1.2;
}

.vsew-battery-icon .battery-fill {
  fill: var(--battery-color, #22c55e);
  stroke: none;
}

.vsew-battery-icon .battery-tip {
  fill: #777;
  stroke: none;
}

.vsew-battery-icon.is-unknown .battery-outline {
  fill: #f3f3f3;
}

.vsew-wifi-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
  width: 20px;
  height: 12px;
  overflow: visible;
}

.vsew-wifi-icon svg {
  display: block;
  width: 20px;
  height: 20px;
  transform: scale(1.2);
  transform-origin: 50% 72%;
}

.vsew-daterange {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  font-size: 12px;
  color: #333;
  white-space: nowrap;
}

.vsew-daterange svg {
  width: 14px;
  height: 14px;
  stroke: #666;
  fill: none;
}

.vsew-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid #bbb;
  background: #fff;
  color: #222;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.vsew-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
}

.vsew-btn-dark {
  background: #1a1a1a;
  border-color: #1a1a1a;
  color: #fff;
}

.vsew-btn-icon {
  padding: 6px 8px;
}

.vsew-content {
  padding: 8px 12px 10px;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.vsew-content > .vsew-event-panel--collapsible {
  flex: 0 0 auto;
  margin-bottom: 8px;
}

/* —— Collapsible blocks (details/summary) —— */
.vsew-collapsible {
  border: 1px solid #dcdcdc;
  background: #f7f7f7;
}

.vsew-collapsible__summary {
  cursor: pointer;
  list-style: none;
  padding: 8px 10px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.vsew-collapsible__summary::-webkit-details-marker {
  display: none;
}

.vsew-collapsible__summary::after {
  content: "";
  margin-left: auto;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #888;
  border-bottom: 1.5px solid #888;
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
  flex: 0 0 auto;
}

.vsew-collapsible[open] > .vsew-collapsible__summary::after {
  transform: rotate(45deg);
  margin-top: -3px;
}

.vsew-collapsible__title {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #666;
}

.vsew-collapsible__hint {
  font-size: 12px;
  color: #777;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.vsew-collapsible__body {
  padding: 0 0 8px;
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.18s ease;
}

.vsew-collapsible[open] > .vsew-collapsible__body {
  grid-template-rows: 1fr;
}

.vsew-collapsible__body-inner {
  overflow: hidden;
}

.vsew-collapsible--filter[open] > .vsew-collapsible__body {
  transition-timing-function: cubic-bezier(0.2, 0.75, 0.2, 1);
}

.vsew-collapsible--chart-controls > .vsew-collapsible__body {
  transition-duration: 0.14s;
}

.vsew-collapsible--filter {
  margin-bottom: 8px;
}

.vsew-collapsible--filter .vsew-filter-bar {
  margin: 0;
  border: 0;
}

.vsew-collapsible--chart-controls {
  margin-left: auto;
}

.vsew-collapsible__summary--compact {
  padding: 4px 8px;
  border: 1px solid #cfcfcf;
  background: #fff;
  border-radius: 4px;
  gap: 6px;
}

.vsew-collapsible__summary--compact::after {
  width: 6px;
  height: 6px;
}

.vsew-collapsible--chart-controls .vsew-collapsible__body {
  padding: 6px 0 0;
}

/* —— Global filter strip —— */
.vsew-filter-bar {
  background: #f7f7f7;
  border: 1px solid #dcdcdc;
  border-radius: 0;
  padding: 8px 10px;
  margin-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 12px;
  flex: 0 0 auto;
}

.vsew-filter-bar .fld {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.vsew-filter-bar .fld > span {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #888;
}

.vsew-filter-bar input,
.vsew-filter-bar select {
  border: 1px solid #c8c8c8;
  border-radius: 3px;
  padding: 5px 7px;
  font-family: var(--vsew-font, "Inter", "IBM Plex Sans", system-ui, sans-serif);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  background: #fff;
  color: #222;
  height: 28px;
  box-sizing: border-box;
}

.vsew-filter-bar .fld-pair {
  display: flex;
  gap: 4px;
}

.vsew-filter-bar .fld-pair input {
  width: 52px;
}

/* datetime-local: only calendar icon until focus or value is set */
.vsew-measurement input[type="datetime-local"] {
  width: 32px;
  min-width: 32px;
  max-width: 32px;
  padding: 0 2px;
  cursor: pointer;
  box-sizing: border-box;
  font-family: var(--vsew-font, "Inter", "IBM Plex Sans", system-ui, sans-serif);
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  line-height: 1.4;
}

.vsew-measurement input[type="datetime-local"]::-webkit-datetime-edit,
.vsew-measurement input[type="datetime-local"]::-webkit-datetime-edit-fields-wrapper,
.vsew-measurement input[type="datetime-local"]::-webkit-datetime-edit-text,
.vsew-measurement input[type="datetime-local"]::-webkit-datetime-edit-month-field,
.vsew-measurement input[type="datetime-local"]::-webkit-datetime-edit-day-field,
.vsew-measurement input[type="datetime-local"]::-webkit-datetime-edit-year-field,
.vsew-measurement input[type="datetime-local"]::-webkit-datetime-edit-hour-field,
.vsew-measurement input[type="datetime-local"]::-webkit-datetime-edit-minute-field {
  font-family: inherit;
  font-variant-numeric: inherit;
  font-size: inherit;
  line-height: inherit;
}

.vsew-measurement input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  opacity: 1;
  cursor: pointer;
  margin: 0;
}

.vsew-measurement input[type="datetime-local"]:not(:focus):not(.has-value)::-webkit-datetime-edit,
.vsew-measurement input[type="datetime-local"]:not(:focus):not(.has-value)::-webkit-datetime-edit-fields-wrapper,
.vsew-measurement input[type="datetime-local"]:not(:focus):not(.has-value)::-webkit-datetime-edit-text,
.vsew-measurement input[type="datetime-local"]:not(:focus):not(.has-value)::-webkit-datetime-edit-month-field,
.vsew-measurement input[type="datetime-local"]:not(:focus):not(.has-value)::-webkit-datetime-edit-day-field,
.vsew-measurement input[type="datetime-local"]:not(:focus):not(.has-value)::-webkit-datetime-edit-year-field,
.vsew-measurement input[type="datetime-local"]:not(:focus):not(.has-value)::-webkit-datetime-edit-hour-field,
.vsew-measurement input[type="datetime-local"]:not(:focus):not(.has-value)::-webkit-datetime-edit-minute-field,
.vsew-measurement input[type="datetime-local"]:not(:focus):not(.has-value)::-webkit-datetime-edit-second-field,
.vsew-measurement input[type="datetime-local"]:not(:focus):not(.has-value)::-webkit-datetime-edit-ampm-field {
  display: none;
  width: 0;
  min-width: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.vsew-measurement input[type="datetime-local"]:focus,
.vsew-measurement input[type="datetime-local"].has-value {
  width: 128px;
  min-width: 128px;
  max-width: none;
  padding-right: 2px;
  color: #222;
}

.vsew-measurement input[type="datetime-local"].is-auto-default:not(:focus) {
  color: rgb(170, 170, 170);
}

.vsew-measurement input[type="datetime-local"].is-auto-default:not(:focus)::-webkit-datetime-edit,
.vsew-measurement input[type="datetime-local"].is-auto-default:not(:focus)::-webkit-datetime-edit-fields-wrapper,
.vsew-measurement input[type="datetime-local"].is-auto-default:not(:focus)::-webkit-datetime-edit-text,
.vsew-measurement input[type="datetime-local"].is-auto-default:not(:focus)::-webkit-datetime-edit-month-field,
.vsew-measurement input[type="datetime-local"].is-auto-default:not(:focus)::-webkit-datetime-edit-day-field,
.vsew-measurement input[type="datetime-local"].is-auto-default:not(:focus)::-webkit-datetime-edit-year-field,
.vsew-measurement input[type="datetime-local"].is-auto-default:not(:focus)::-webkit-datetime-edit-hour-field,
.vsew-measurement input[type="datetime-local"].is-auto-default:not(:focus)::-webkit-datetime-edit-minute-field {
  color: rgb(170, 170, 170);
}

.vsew-filter-bar .fld-zeit .fld-pair input[type="datetime-local"]:not(:focus):not(.has-value) {
  width: 32px;
  min-width: 32px;
  max-width: 32px;
}

.vsew-filter-bar .fld-zeit .fld-pair input[type="datetime-local"]:focus,
.vsew-filter-bar .fld-zeit .fld-pair input[type="datetime-local"].has-value {
  width: 140px;
  min-width: 140px;
  max-width: none;
  padding-right: 2px;
}

/* European datetime: DD.MM.YYYY HH:MM + hidden native picker */
.vsew-datetime-eu-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

.vsew-datetime-eu {
  font-family: var(--vsew-font, "Inter", "IBM Plex Sans", system-ui, sans-serif);
  font-variant-numeric: tabular-nums;
  box-sizing: border-box;
  cursor: text;
  padding-right: 26px;
}

.vsew-datetime-eu-native {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  opacity: 0;
  cursor: pointer;
}

.vsew-datetime-eu-native::-webkit-calendar-picker-indicator {
  width: 28px;
  height: 28px;
  margin: 0;
  cursor: pointer;
  opacity: 1;
}

.vsew-filter-bar .fld-zeit .fld-pair .vsew-datetime-eu-wrap:not(:focus-within) .vsew-datetime-eu:not(.has-value) {
  width: 32px;
  min-width: 32px;
  max-width: 32px;
  color: transparent;
  padding-right: 2px;
}

.vsew-filter-bar .fld-zeit .fld-pair .vsew-datetime-eu-wrap:focus-within .vsew-datetime-eu,
.vsew-filter-bar .fld-zeit .fld-pair .vsew-datetime-eu.has-value {
  width: 148px;
  min-width: 148px;
  max-width: none;
  color: #222;
  padding-right: 26px;
}

.vsew-filter-bar .fld-zeit .fld-pair .vsew-datetime-eu.is-auto-default:not(:focus) {
  color: rgb(170, 170, 170);
}

.axis-controls .vsew-datetime-eu {
  min-width: 148px;
}

.vsew-filter-bar .fld-achse input[type="checkbox"] {
  accent-color: rgb(140, 140, 140);
  width: 14px;
  height: 14px;
}

.vsew-filter-bar .fld-suche input {
  width: 140px;
}

.vsew-filter-bar .fld-achse .achse-row {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 28px;
}

.vsew-filter-bar .fld-achse label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 500;
  color: #444;
  text-transform: none;
  letter-spacing: 0;
}

.vsew-filter-bar .fld-achse input {
  width: auto;
  height: auto;
}

.vsew-filter-refresh {
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #c8c8c8;
  border-radius: 3px;
  background: #fff;
  cursor: pointer;
  margin-bottom: 0;
}

.vsew-filter-refresh svg {
  width: 15px;
  height: 15px;
  stroke: #555;
  fill: none;
}

.vsew-filter-report-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid #93b4f5;
  border-radius: 3px;
  background: #eef4ff;
  color: #1e40af;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  margin-bottom: 0;
  white-space: nowrap;
}

.vsew-filter-report-btn:hover {
  background: #dbeafe;
  border-color: #60a5fa;
}

.vsew-filter-report-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.vsew-filter-report-btn svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.vsew-audit-multi-hint {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  margin-left: 6px;
}

.vsew-filter-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid #c8c8c8;
  border-radius: 3px;
  background: #fff;
  color: #666;
  text-decoration: none;
  font-size: 18px;
  line-height: 1;
}

.vsew-filter-reset:hover {
  background: #f3f3f3;
  text-decoration: none;
}

/* —— Dashboard —— */
.vsew-topbar-dashboard {
  align-items: flex-end;
}

.vsew-topbar-left {
  min-width: 0;
  flex: 1;
}

.vsew-page-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #111;
}

.vsew-page-sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: #666;
}

.vsew-content-dashboard {
  overflow: auto;
  flex: 1 1 0;
  min-height: 0;
}

.vsew-dashboard-panel {
  background: #fff;
  border: 1px solid #dcdcdc;
  margin-bottom: 8px;
}

.vsew-dashboard-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #ebebeb;
}

.vsew-dashboard-panel-head h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #111;
}

.vsew-filter-bar-compact {
  margin-bottom: 0;
  border: none;
  border-bottom: 1px solid #ebebeb;
}

.vsew-dashboard-map {
  height: 360px;
  width: 100%;
  background: #e8e8e8;
}

.vsew-device-view-toggle {
  display: inline-flex;
  border: 1px solid #c8c8c8;
  border-radius: 3px;
  overflow: hidden;
}

.vsew-device-view-toggle button {
  border: 0;
  background: #fff;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  color: #555;
  cursor: pointer;
  font-family: inherit;
}

.vsew-device-view-toggle button.is-active {
  background: #ebebeb;
  color: #111;
  font-weight: 600;
}

.vsew-device-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 8px;
  padding: 8px 10px 10px;
}

.vsew-device-card {
  display: block;
  padding: 10px 12px 10px 14px;
  border: 1px solid #dcdcdc;
  border-radius: 0;
  background: #fff;
  text-decoration: none;
  color: inherit;
  border-left: 3px solid #c8c8c8;
  box-sizing: border-box;
}

.vsew-device-card:hover {
  background: #fafafa;
  text-decoration: none;
  border-color: #c0c0c0;
}

.vsew-device-card.status-CRITICAL,
.vsew-device-card.status-RED {
  border-left-color: #c95a5a;
}

.vsew-device-card.status-YELLOW {
  border-left-color: #b8860b;
}

.vsew-device-card.status-EVENT {
  border-left-color: #3d6b7a;
}

.vsew-device-card.status-GREEN {
  border-left-color: #9ca3af;
}

.vsew-device-card-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: #222;
  line-height: 1.35;
}

.vsew-device-card .vsew-vital-chips {
  margin-bottom: 8px;
}

.vsew-device-card-event {
  margin: 0;
  font-size: 11px;
  color: #666;
  line-height: 1.4;
}

.vsew-device-card-event-label {
  font-weight: 600;
  color: #888;
}

.vsew-device-table-wrap {
  padding: 0 10px 10px;
  overflow: auto;
}

.vsew-device-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: fixed;
}

/* Default column split (Geräte-Tabelle): tuned to manual layout from dashboard table view */
.vsew-device-table:not(.vsew-device-table-cols-px) col.vsew-col-sensor {
  width: 48%;
}

.vsew-device-table:not(.vsew-device-table-cols-px) col.vsew-col-vitals {
  width: 22%;
}

.vsew-device-table:not(.vsew-device-table-cols-px) col.vsew-col-last-vital {
  width: 17%;
}

.vsew-device-table:not(.vsew-device-table-cols-px) col.vsew-col-last-event {
  width: 13%;
}

.vsew-device-table th,
.vsew-device-table td {
  border-bottom: 1px solid #ebebeb;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  overflow: hidden;
}

.vsew-device-table-sensor {
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  text-align: left;
}

.vsew-device-table-last-vital {
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  text-align: center;
}

.vsew-device-table-last-event {
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  text-align: right;
}

.vsew-device-table th:nth-child(1) {
  text-align: left;
}

.vsew-device-table th:nth-child(4) {
  text-align: right;
}

.vsew-device-table th {
  position: relative;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888;
  background: #f7f7f7;
  padding-right: 14px;
}

.vsew-device-table-title {
  font-size: 13px;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
}

.vsew-device-table-title:hover {
  text-decoration: underline;
}

.vsew-device-table-sub {
  font-size: 11px;
  color: #888;
  margin-top: 2px;
}

.vsew-device-table th:nth-child(2),
.vsew-device-table th:nth-child(3),
.vsew-device-table-vitals,
.vsew-device-table-last-vital {
  text-align: center;
}

.vsew-device-table-vitals .vsew-vital-chips {
  flex-wrap: wrap;
  gap: 2px 0;
  justify-content: center;
}

.vsew-device-table-vitals .vsew-vital-item + .vsew-vital-item {
  margin-left: 8px;
}

.vsew-device-table-last-vital {
  font-size: 11px;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
  color: #444;
  text-align: center;
}

.vsew-last-vital-age {
  color: #888;
  white-space: nowrap;
}

.vsew-device-table-last-event {
  font-size: 11px;
  line-height: 1.4;
  text-align: right;
}

.vsew-device-table-sensor .vsew-device-table-title,
.vsew-device-table-sensor .vsew-device-table-sub {
  display: block;
  text-align: left;
}

.vsew-device-table td.vsew-device-table-last-event,
.vsew-device-table th:nth-child(4) {
  text-align: right;
}

table.vsew-device-table td.vsew-device-table-last-vital,
table.vsew-device-table thead th:nth-child(3) {
  text-align: center;
}

.vsew-device-table-last-event .status-badge,
.vsew-device-table-last-event .status-text,
.vsew-device-table-last-event .muted {
  text-align: right;
}

.vsew-device-row {
  cursor: pointer;
}

.vsew-device-row:hover {
  background: #fafafa;
}

/* —— Admin shell (monitoring + admin) —— */
.vsew-admin-content {
  overflow: auto;
  flex: 1 1 0;
  min-height: 0;
  padding: 8px 10px 12px;
  font-size: 11px;
  line-height: 1.35;
}

.vsew-admin-content .card,
.vsew-admin-content .hero {
  max-width: none;
}

.vsew-admin-content .hero {
  margin-bottom: 6px;
  border-radius: 0;
  padding: 10px 12px;
  box-shadow: none;
  background: #172536;
}

.vsew-admin-content .hero h1 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 2px;
  line-height: 1.25;
}

.vsew-admin-content .hero p {
  font-size: 11px;
  margin: 0;
  opacity: 0.88;
  line-height: 1.35;
}

.vsew-admin-content .hero a {
  color: #cbd5e1;
  font-size: 11px;
}

.vsew-admin-content .card {
  border-radius: 0;
  box-shadow: none;
  border: 1px solid #dcdcdc;
  margin: 0 0 6px;
  padding: 10px 12px;
  background: #fff;
}

.vsew-admin-content h2 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: #111;
}

.vsew-admin-content h3 {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  color: #222;
}

.vsew-admin-content .grid {
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 8px;
}

.vsew-admin-content label.field {
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  color: #666;
}

.vsew-admin-content input,
.vsew-admin-content select,
.vsew-admin-content textarea {
  padding: 4px 6px;
  font-size: 11px;
  border-radius: 0;
  border-color: #d1d5db;
}

.vsew-admin-content input:focus,
.vsew-admin-content select:focus,
.vsew-admin-content textarea:focus {
  outline: 1px solid rgba(11, 103, 194, 0.25);
  border-color: #0b67c2;
}

.vsew-admin-content table {
  font-size: 11px;
}

.vsew-admin-content th {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #666;
  padding: 5px 6px;
  background: #f7f7f7;
  border-bottom: 1px solid #dcdcdc;
}

.vsew-admin-content td {
  padding: 5px 6px;
  border-bottom: 1px solid #ececec;
  vertical-align: middle;
}

.vsew-admin-content td b {
  font-size: 11px;
  font-weight: 600;
}

.vsew-admin-content .small,
.vsew-admin-content td .small {
  font-size: 10px;
  line-height: 1.3;
}

.vsew-admin-content p {
  margin: 0 0 6px;
}

.vsew-admin-content p.muted {
  font-size: 10px;
  line-height: 1.35;
  margin: 0 0 8px;
}

.vsew-admin-content .button,
.vsew-admin-content a.button,
.vsew-admin-content button.button {
  display: inline-block;
  background: #0b67c2;
  color: #fff;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 0;
  line-height: 1.2;
  white-space: nowrap;
}

.vsew-admin-content a.button:hover,
.vsew-admin-content button.button:hover {
  background: #095aa8;
  color: #fff;
  text-decoration: none;
}

.vsew-admin-content a.button.secondary,
.vsew-admin-content button.button.secondary {
  background: #334155;
}

.vsew-admin-content a.button.secondary:hover,
.vsew-admin-content button.button.secondary:hover {
  background: #1e293b;
}

.vsew-admin-content a.button.gray,
.vsew-admin-content button.button.gray {
  background: #64748b;
}

.vsew-admin-content a.button.dark,
.vsew-admin-content button.button.dark {
  background: #172536;
}

.vsew-admin-content a.button.light,
.vsew-admin-content button.button.light {
  background: #edf3fb;
  color: #0b1b33;
}

.vsew-admin-content a.button.light:hover,
.vsew-admin-content button.button.light:hover {
  background: #dbeafe;
  color: #0b1b33;
}

.vsew-admin-content .buttons {
  gap: 6px;
}

.vsew-admin-content td .buttons {
  flex-direction: row;
  flex-wrap: wrap;
}

.vsew-admin-content td form {
  margin: 0;
  display: inline-flex;
}

.vsew-admin-content .checks {
  gap: 5px 8px;
}

.vsew-admin-content .checks label {
  font-size: 10px;
  font-weight: 500;
  color: #444;
  gap: 3px;
}

.vsew-admin-content .checks input {
  width: auto;
  margin: 0;
}

.vsew-admin-content .notice,
.vsew-admin-content .warning {
  padding: 8px 10px;
  margin: 0 0 8px;
  border-radius: 0;
  font-size: 11px;
}

.vsew-admin-content .layout-card {
  margin: 6px 0;
  border-radius: 0;
  border-color: #dcdcdc;
}

.vsew-admin-content .layout-card summary {
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 600;
}

.vsew-admin-content .layout-card .grid {
  padding: 8px 10px;
}

.vsew-admin-content .button.red {
  background: #dc2626;
  color: #fff;
}

.vsew-admin-content a.button.red:hover,
.vsew-admin-content button.button.red:hover {
  background: #b91c1c;
  color: #fff;
}

.vsew-admin-content code {
  font-size: 10px;
}

.vsew-admin-content .vsew-admin-disk-meter {
  padding: 6px 8px;
  border: 1px solid #d1d5db;
  background: #fff;
}

.vsew-admin-content .vsew-admin-disk-meter-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 600;
}

.vsew-admin-content .vsew-admin-disk-meter-bar {
  height: 8px;
  background: #ececec;
  overflow: hidden;
}

.vsew-admin-content .vsew-admin-disk-meter-fill {
  height: 100%;
  background: #0b67c2;
}

.vsew-admin-content .vsew-admin-disk-meter-foot {
  margin-top: 4px;
}

.vsew-admin-content .vsew-admin-actions {
  margin-top: 8px;
}

.vsew-admin-content .vsew-portal-link-input {
  width: 100%;
  min-width: 0;
  font-size: 12px;
  padding: 6px 8px;
}

.vsew-admin-content .vsew-portal-grants-table {
  width: 100%;
  margin-top: 12px;
}

.vsew-admin-content .vsew-portal-grants-table td {
  vertical-align: middle;
}

.vsew-admin-content .vsew-portal-create-form {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.vsew-admin-content .vsew-portal-lockdown-form {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.vsew-admin-content .vsew-portal-lockdown-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.vsew-portal-landing {
  max-width: 640px;
  margin: 48px auto;
  padding: 24px;
}

.vsew-geology-edit-form {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

.vsew-geology-field {
  display: block;
  margin-bottom: 10px;
}

.vsew-geology-field span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #475569;
}

.vsew-geology-field textarea {
  width: 100%;
  min-height: 72px;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font: inherit;
  resize: vertical;
}

.vsew-geology-save-btn {
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-weight: 600;
  cursor: pointer;
}

.vsew-project-notice {
  color: #15803d;
  font-weight: 600;
  margin-bottom: 8px;
}

.vsew-admin-content .admin-danger-zone {
  border-color: #fecaca;
  background: #fffafa;
}

.vsew-admin-content #admin-project-trash {
  scroll-margin-top: 72px;
}

#admin-empfaenger .rec-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

#admin-empfaenger .rec-table {
  width: 100%;
  table-layout: fixed;
}

#admin-empfaenger .rec-table th,
#admin-empfaenger .rec-table td {
  padding: 3px 5px;
  vertical-align: middle;
  white-space: nowrap;
}

#admin-empfaenger .rec-table th:nth-child(1),
#admin-empfaenger .rec-table td.rec-active {
  width: 34px;
  text-align: center;
}

#admin-empfaenger .rec-table th:nth-child(2),
#admin-empfaenger .rec-table td.rec-name {
  width: 14%;
}

#admin-empfaenger .rec-table th:nth-child(3),
#admin-empfaenger .rec-table td.rec-role {
  width: 12%;
}

#admin-empfaenger .rec-table th:nth-child(4),
#admin-empfaenger .rec-table td.rec-phone {
  width: 11%;
}

#admin-empfaenger .rec-table th:nth-child(5),
#admin-empfaenger .rec-table td.rec-email {
  width: 16%;
}

#admin-empfaenger .rec-table th:nth-child(6),
#admin-empfaenger .rec-table td.rec-checks-row {
  width: auto;
}

#admin-empfaenger .rec-table td input,
#admin-empfaenger .rec-table td select {
  width: 100%;
  min-width: 0;
  padding: 3px 5px;
  font-size: 10px;
}

#admin-empfaenger .rec-active label {
  display: inline-flex;
  margin: 0;
}

#admin-empfaenger .rec-active-toggle {
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
}

#admin-empfaenger .rec-active-label {
  font-size: 8px;
  font-weight: 700;
  color: #666;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  user-select: none;
}

tr.rec-row-inactive .rec-active-label {
  color: #999;
}

#admin-empfaenger .rec-checks-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 4px 8px;
}

#admin-empfaenger .rec-checks-group {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 3px;
}

#admin-empfaenger .rec-check-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 1px;
  margin: 0;
  min-width: 24px;
  cursor: pointer;
}

#admin-empfaenger .rec-check-cap {
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
  color: #666;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  user-select: none;
}

#admin-empfaenger .rec-check-pill input[type="checkbox"] {
  width: 13px;
  height: 13px;
  min-height: 0;
  padding: 0;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  #admin-empfaenger .rec-table-wrap {
    overflow-x: visible;
  }

  #admin-empfaenger .rec-table {
    table-layout: auto;
  }

  #admin-empfaenger .rec-table thead {
    display: none;
  }

  #admin-empfaenger .rec-table tbody {
    display: block;
  }

  #admin-empfaenger .rec-table tbody tr {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "active name role"
      "active phone email"
      "checks checks checks";
    gap: 4px 6px;
    padding: 6px 6px 8px;
    border-bottom: 1px solid #dcdcdc;
  }

  #admin-empfaenger .rec-table tbody tr.rec-row-inactive {
    opacity: 0.55;
  }

  #admin-empfaenger .rec-table td {
    display: block;
    width: auto !important;
    padding: 0;
    white-space: normal;
    border-bottom: 0;
  }

  #admin-empfaenger .rec-table td.rec-active {
    grid-area: active;
    grid-row: 1 / 3;
    align-self: start;
    padding-top: 6px;
  }

  #admin-empfaenger .rec-table td.rec-name {
    grid-area: name;
  }

  #admin-empfaenger .rec-table td.rec-role {
    grid-area: role;
  }

  #admin-empfaenger .rec-table td.rec-phone {
    grid-area: phone;
  }

  #admin-empfaenger .rec-table td.rec-email {
    grid-area: email;
  }

  #admin-empfaenger .rec-table td.rec-checks-row {
    grid-area: checks;
    padding-top: 2px;
  }

  #admin-empfaenger .rec-table td input:not([type="checkbox"]),
  #admin-empfaenger .rec-table td select {
    font-size: 14px;
    min-height: 36px;
    padding: 5px 7px;
  }

  #admin-empfaenger .rec-checks-row {
    flex-direction: column;
    align-items: flex-start;
    flex-wrap: nowrap;
    gap: 2px;
  }

  #admin-empfaenger .rec-checks-group {
    flex-wrap: nowrap;
    gap: 2px 4px;
  }

  #admin-empfaenger .rec-check-pill {
    min-width: 26px;
    gap: 0;
  }

  #admin-empfaenger .rec-check-cap {
    font-size: 7px;
    margin-bottom: 1px;
  }

  #admin-empfaenger .rec-check-pill input[type="checkbox"] {
    width: 12px;
    height: 12px;
  }
}

/* —— Charts —— */
.vsew-charts-block {
  display: flex;
  flex-direction: column;
  margin-bottom: 8px;
  flex: 0 0 auto;
}

.vsew-charts-split {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: var(--vsew-charts-split-height, 335px);
  min-height: 200px;
  max-height: none;
}

.vsew-charts-height-gutter {
  flex: 0 0 7px;
  cursor: row-resize;
  background: #ececec;
  border-top: 1px solid #d0d0d0;
  border-bottom: 1px solid #d0d0d0;
  position: relative;
  z-index: 2;
  user-select: none;
  touch-action: none;
}

.vsew-charts-height-gutter::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 36px;
  height: 3px;
  margin: -1px 0 0 -18px;
  border-radius: 2px;
  background: #b8b8b8;
}

.vsew-charts-height-gutter:hover,
.vsew-charts-height-gutter.is-dragging {
  background: #d4e4f8;
}

.vsew-charts-height-gutter:hover::after,
.vsew-charts-height-gutter.is-dragging::after {
  background: #6a9fd4;
}

body.vsew-split-drag-y {
  cursor: row-resize !important;
  user-select: none !important;
}

.vsew-chart-panel {
  background: #fff;
  border: 1px solid #dcdcdc;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.vsew-chart-panel--summary {
  flex: 0 0 75%;
  width: 75%;
  max-width: 88%;
  min-width: 35%;
}

.vsew-chart-panel--freq {
  flex: 1 1 0;
  min-width: 0;
}

.vsew-charts-gutter {
  flex: 0 0 7px;
  cursor: col-resize;
  background: #ececec;
  border-left: 1px solid #d0d0d0;
  border-right: 1px solid #d0d0d0;
  position: relative;
  z-index: 2;
  user-select: none;
  touch-action: none;
}

.vsew-charts-gutter::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px;
  height: 36px;
  margin: -18px 0 0 -1px;
  border-radius: 2px;
  background: #b8b8b8;
}

.vsew-charts-gutter:hover,
.vsew-charts-gutter.is-dragging {
  background: #d4e4f8;
}

.vsew-charts-gutter:hover::after,
.vsew-charts-gutter.is-dragging::after {
  background: #6a9fd4;
}

body.vsew-split-drag {
  cursor: col-resize !important;
  user-select: none !important;
}

.vsew-chart-slot {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 0;
  padding-top: 11px;
  box-sizing: border-box;
}

.vsew-chart-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px 10px;
  padding: 8px 10px;
  border-bottom: none;
  flex: 0 0 auto;
  min-height: 0;
  box-sizing: border-box;
}

.vsew-chart-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #111;
  grid-column: 1;
  min-width: 100px;
}

.vsew-chart-head-controls {
  grid-column: 2;
  justify-self: end;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  font-size: 11px;
  color: #666;
  padding-right: 28px;
}

.vsew-chart-head-controls label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

.vsew-chart-head-controls input {
  width: 118px;
  border: 1px solid #ccc;
  border-radius: 3px;
  padding: 3px 5px;
  font-family: var(--vsew-font, "Inter", "IBM Plex Sans", system-ui, sans-serif);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
  height: 24px;
  box-sizing: border-box;
}

.vsew-chart-head-controls input[type="datetime-local"]:focus,
.vsew-chart-head-controls input[type="datetime-local"].has-value {
  width: 128px;
  min-width: 128px;
  max-width: none;
  padding-right: 2px;
}

.vsew-chart-head-controls input.num {
  width: 37px;
  min-width: 37px;
  padding-left: 4px;
  padding-right: 4px;
}

.vsew-chart-head-controls #freq-y-min,
.vsew-chart-head-controls #freq-y-max {
  width: 30px;
  min-width: 30px;
}

.vsew-legend-row {
  display: none;
}

.vsew-plot-legend-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  padding: 2px 2px 4px;
  font-size: 10px;
  font-weight: 500;
  color: #555;
  line-height: 1.2;
}

.vsew-plot-legend-bar__item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.vsew-plot-legend-bar__line {
  display: inline-block;
  width: 16px;
  height: 0;
  border-top: 1.5px solid;
  flex-shrink: 0;
}

.vsew-plot-legend-bar__line--dash {
  border-top-style: dashed;
}

.vsew-plot-legend-bar__dot {
  display: inline-block;
  border-radius: 50%;
  flex-shrink: 0;
  background: #64748b;
  box-sizing: border-box;
}

.vsew-plot-legend-bar__dot--axis {
  width: 10px;
  height: 10px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 0.5px rgba(15, 23, 42, 0.12);
}

.vsew-plot-legend-bar__size-dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.vsew-plot-legend-bar__dot--s {
  width: 7px;
  height: 7px;
}

.vsew-plot-legend-bar__dot--m {
  width: 10px;
  height: 10px;
}

.vsew-plot-legend-bar__dot--l {
  width: 13px;
  height: 13px;
}

.vsew-plot-legend-bar--sensor {
  padding: 0 10px 4px;
  margin-top: -2px;
}

.vsew-plot-legend-bar__item--duration {
  color: #64748b;
}

.vsew-charts-block .vsew-chart-panel .vsew-chart-head + .vsew-plot-legend-bar--sensor {
  margin-bottom: 2px;
}

.vsew-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
}

.vsew-swatch {
  width: var(--vsew-marker-size, 11px);
  height: var(--vsew-marker-size, 11px);
  border-radius: 50%;
  flex-shrink: 0;
}

.vsew-swatch.axis-x { background: var(--vsew-axis-x, #f4764e); }
.vsew-swatch.axis-y { background: var(--vsew-axis-y, #9ccc60); }
.vsew-swatch.axis-z { background: var(--vsew-axis-z, #4aa3d1); }

.vsew-chart {
  width: 100%;
  height: 100%;
  min-height: 180px;
  flex: 1 1 0;
  background: #fff;
}

.vsew-chart-panel--freq .vsew-chart-head {
  grid-template-columns: auto minmax(0, 1fr);
}

.vsew-chart-panel--freq .vsew-chart-head h3 {
  min-width: 0;
  white-space: nowrap;
  font-size: 13px;
}

.vsew-chart-panel--freq .vsew-chart-head-controls {
  flex-wrap: nowrap;
  white-space: nowrap;
  padding-right: 6px;
  gap: 5px;
}

@media print {
  .vsew-chart,
  .vsew-chart-panel,
  .vsew-chart-slot {
    background: #fff !important;
    -webkit-print-color-adjust: economy;
    print-color-adjust: economy;
  }
}

/* —— Audit —— */
.vsew-audit-panel {
  background: #fff;
  border: 1px solid #dcdcdc;
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.vsew-audit-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 10px;
  padding: 8px 10px;
  border-bottom: 1px solid #ebebeb;
  flex: 0 0 auto;
}

.vsew-audit-toolbar h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #111;
  margin-right: 8px;
  align-self: center;
  white-space: nowrap;
}

.vsew-audit-toolbar .fld {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.vsew-audit-toolbar .fld > span {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  color: #888;
  letter-spacing: 0.05em;
}

.vsew-audit-toolbar input,
.vsew-audit-toolbar select {
  border: 1px solid #c8c8c8;
  border-radius: 3px;
  padding: 4px 7px;
  font-size: 12px;
  height: 26px;
  background: #fff;
  box-sizing: border-box;
}

.vsew-audit-toolbar .fld-search input {
  width: 160px;
}

.vsew-audit-toolbar .fld-pair {
  display: flex;
  gap: 4px;
}

.vsew-audit-toolbar .fld-pair input {
  width: 48px;
}

.vsew-audit-toolbar .fld-top input {
  width: 38px;
  min-width: 38px;
  max-width: 38px;
  padding: 4px 5px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.vsew-audit-toolbar-spacer {
  flex: 1;
}

.vsew-audit-dl {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: #333;
  text-decoration: none;
  white-space: nowrap;
}

.vsew-audit-dl svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
}

.vsew-table-wrap {
  flex: 1 1 0;
  min-height: 0;
  overflow: auto;
}

.vsew-measurement table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  table-layout: fixed;
}

.vsew-measurement table:not(.vsew-device-table) th,
.vsew-measurement table:not(.vsew-device-table) td {
  padding: 7px 11px;
  border-bottom: 1px solid #e8e8e8;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}

#audit-table {
  --audit-col-gap: 10px;
}

#audit-table th,
#audit-table td {
  padding-left: var(--audit-col-gap);
  padding-right: var(--audit-col-gap);
}

#audit-table td:nth-child(15),
#audit-table th:nth-child(15) {
  overflow: visible;
  text-overflow: clip;
}

#audit-table td:nth-child(15) code {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.vsew-measurement th {
  position: sticky;
  top: 0;
  background: #f5f5f5;
  color: #777;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  z-index: 1;
  white-space: normal;
  line-height: 1.25;
  hyphens: auto;
  padding-right: 12px;
}

.vsew-measurement th .col-resize-handle {
  position: absolute;
  right: 0;
  top: 0;
  width: 7px;
  height: 100%;
  cursor: col-resize;
  z-index: 2;
}

.vsew-measurement th .col-resize-handle:hover {
  background: rgba(106, 159, 212, 0.35);
}

body.vsew-col-resize-drag {
  cursor: col-resize !important;
  user-select: none !important;
}

.vsew-measurement tbody tr:hover {
  background: #fafafa;
}

.vsew-measurement tr.selected {
  background: #eef4ff;
  outline: 1px solid #93b4f5;
}

.vsew-measurement td a:not(.button) {
  color: #2563eb;
  text-decoration: underline;
  font-weight: 500;
}

.vsew-measurement .status-text.status-GREEN { color: #64748b; }
.vsew-measurement .status-text.status-EVENT { color: #3d6b7a; }
.vsew-measurement .status-text.status-YELLOW { color: #b8860b; }
.vsew-measurement .status-text.status-RED { color: #c95a5a; }
.vsew-measurement .status-text.status-CRITICAL { color: #b42020; font-weight: 600; }

.vsew-table-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 8px 10px;
  border-top: 1px solid #ebebeb;
  font-size: 12px;
  color: #666;
  flex: 0 0 auto;
}

.vsew-table-footer select {
  border: 1px solid #ccc;
  border-radius: 3px;
  padding: 3px 6px;
  font-size: 12px;
  background: #fff;
}

.vsew-pager {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.vsew-pager button {
  width: 26px;
  height: 26px;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  color: #444;
}

.vsew-pager button:disabled {
  opacity: 0.4;
  cursor: default;
}

@media (max-width: 1200px) {
  .vsew-chart-panel--summary {
    min-width: 30%;
  }

  .vsew-event-charts-block .vsew-chart-panel--summary {
    min-width: 0;
  }
}

/* Event charts: avoid squashing when the window is narrow but still above the phone breakpoint */
@media (max-width: 1100px) and (min-width: 901px) and (min-height: 521px) {
  .vsew-event-charts-block .vsew-event-chart-slot {
    flex: 0 0 auto;
    min-height: 0;
  }

  .vsew-event-charts-block .vsew-event-chart:not(.vsew-event-chart--stacked):not(.vsew-event-chart--fft.vsew-event-chart--stacked) {
    height: 340px !important;
    min-height: 340px !important;
  }

  .vsew-event-charts-block .vsew-event-chart--stacked:not(.vsew-event-chart--fft) {
    height: 480px !important;
    min-height: 480px !important;
  }

  .vsew-event-charts-block .vsew-event-chart--fft:not(.vsew-event-chart--stacked) {
    height: 340px !important;
    min-height: 340px !important;
  }

  .vsew-event-charts-block .vsew-event-chart--fft.vsew-event-chart--stacked {
    height: 460px !important;
    min-height: 460px !important;
  }
}

@media (max-width: 900px) {
  .vsew-event-charts-split {
    flex-direction: column;
    height: auto;
    min-height: 0;
  }

  .vsew-event-charts-block .vsew-chart-panel--summary,
  .vsew-event-charts-block .vsew-chart-panel--freq {
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    min-height: 320px;
  }

  .vsew-event-charts-block .vsew-charts-gutter {
    flex: 0 0 7px;
    width: 100%;
    height: 7px;
    cursor: row-resize;
    border-left: none;
    border-right: none;
    border-top: 1px solid #d0d0d0;
    border-bottom: 1px solid #d0d0d0;
  }

  .vsew-event-charts-block .vsew-charts-gutter::after {
    width: 36px;
    height: 3px;
    margin: -1px 0 0 -18px;
  }
}

/* Phone landscape: logical width often >900px — keep stacked full-width charts */
@media (max-height: 520px) and (orientation: landscape) and (max-width: 1200px) {
  .vsew-charts-split,
  .vsew-event-charts-split {
    flex-direction: column !important;
    height: auto !important;
  }

  .vsew-charts-split .vsew-chart-panel--summary,
  .vsew-charts-split .vsew-chart-panel--freq,
  .vsew-event-charts-block .vsew-chart-panel--summary,
  .vsew-event-charts-block .vsew-chart-panel--freq {
    width: 100% !important;
    max-width: none !important;
    flex: 0 0 auto !important;
    min-width: 0 !important;
  }

  .vsew-event-charts-block .vsew-charts-gutter {
    width: 100%;
    height: 7px;
  }
}

/* —— Event page (Einzelereignisprotokoll) —— */
.vsew-content-event {
  --vsew-ctx-data-size: clamp(15px, 1.15vw, 19px);
  --vsew-event-value-size: var(--vsew-ctx-data-size);
  --vsew-event-unit-size: calc(var(--vsew-ctx-data-size) * 0.72);
  overflow: hidden;
  overflow-x: hidden;
  gap: 8px;
  flex: 1 1 0;
  min-height: 0;
}

.vsew-topbar-event {
  align-items: stretch;
}

.vsew-topbar-event-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vsew-topbar-event-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.vsew-topbar-event-tools {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  flex-shrink: 0;
}

.vsew-topbar-event .vsew-breadcrumb {
  flex: 1 1 auto;
  min-width: 0;
  margin-bottom: 0;
}

.vsew-topbar-event .vsew-sensor-title {
  flex: none;
  min-width: 0;
  width: 100%;
}

.vsew-guest-sensor-cta {
  flex-shrink: 0;
  max-width: min(220px, 46vw);
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 5px 9px;
  font-size: 11px;
}

.vsew-guest-cta-short {
  display: none;
}

.vsew-topbar-event-left {
  flex: 1 1 320px;
  min-width: 0;
}

.vsew-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  font-size: 11px;
  color: #888;
  margin: 0 0 6px;
}

.vsew-breadcrumb a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}

.vsew-breadcrumb a:hover {
  text-decoration: underline;
}

.vsew-breadcrumb-sep {
  color: #bbb;
}

.vsew-breadcrumb-current {
  color: #555;
  font-weight: 500;
}

.vsew-event-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.vsew-event-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #111;
  letter-spacing: -0.02em;
}

.vsew-event-sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: #666;
}

.vsew-event-sub a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}

.vsew-event-sub a:hover {
  text-decoration: underline;
}

.vsew-event-kpi-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.vsew-event-kpi-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid #dcdcdc;
  border-radius: 4px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: #222;
  white-space: nowrap;
}

.vsew-event-kpi-chip .vsew-meta-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #888;
}

.vsew-event-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.vsew-audit-dl.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.vsew-event-banner {
  padding: 8px 10px;
  border: 1px solid #dcdcdc;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.45;
  flex: 0 0 auto;
}

.vsew-event-banner strong {
  display: block;
  margin-bottom: 2px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.vsew-event-banner--ok {
  background: #f3faf5;
  border-color: #b8dfc4;
  color: #1f4d2c;
}

.vsew-event-banner--warning {
  background: #fff8f0;
  border-color: #f0d4a8;
  color: #7c4a12;
}

.vsew-event-panel {
  background: #fff;
  border: 1px solid #dcdcdc;
  padding: 10px 12px;
  flex: 0 0 auto;
}

.vsew-content-event .vsew-event-banner {
  flex: 0 0 auto;
}

.vsew-event-panel-title {
  margin: 0 0 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #888;
}

.vsew-event-panel-title-short {
  display: none;
}

.vsew-event-panel--collapsible > .vsew-event-panel__summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 0;
  padding: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.vsew-event-panel--collapsible > .vsew-event-panel__summary::-webkit-details-marker {
  display: none;
}

.vsew-event-panel--collapsible > .vsew-event-panel__summary::after {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-right: 1.5px solid #888;
  border-bottom: 1.5px solid #888;
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

.vsew-event-panel--collapsible[open] > .vsew-event-panel__summary::after {
  transform: rotate(45deg);
  margin-top: -3px;
}

.vsew-event-panel--collapsible > .vsew-event-panel__summary .vsew-event-panel-title,
.vsew-event-panel--collapsible > .vsew-event-panel__summary .vsew-event-context-head__combined {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.vsew-event-panel--collapsible > .vsew-event-panel__body {
  margin-top: 8px;
}

.vsew-event-panel--collapsible > .vsew-event-panel__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.18s ease;
}

.vsew-event-panel--collapsible[open] > .vsew-event-panel__body {
  grid-template-rows: 1fr;
}

.vsew-event-panel__body-inner {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .vsew-collapsible__body,
  .vsew-event-panel--collapsible > .vsew-event-panel__body {
    transition: none;
  }
}

.vsew-event-meta-grid,
.vsew-event-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px 12px;
}

.vsew-event-kpi-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.vsew-meta-cell {
  min-width: 0;
}

.vsew-meta-label {
  display: block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 2px;
}

.vsew-meta-value {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #222;
  line-height: 1.35;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.vsew-event-charts-block {
  flex: 1 1 0;
  min-height: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.vsew-event-charts-split {
  flex: 1 1 0;
  min-height: 300px;
  height: var(--vsew-event-charts-split-height, 400px);
  max-height: none;
}

.vsew-event-charts-split.is-wave-separated {
  min-height: 420px;
}

.vsew-event-charts-block .vsew-event-chart-panel {
  height: 100%;
  flex: 0 0 auto;
  margin: 0;
  min-height: 0;
  overflow: hidden;
}

.vsew-event-charts-block .vsew-chart-panel--summary {
  flex: 0 0 75%;
  width: 75%;
  max-width: 88%;
  min-width: 0;
}

.vsew-event-charts-block .vsew-chart-panel--freq {
  flex: 1 1 0;
  min-width: 0;
}

.vsew-event-chart-panel {
  height: auto;
  flex: 0 0 auto;
  margin: 0;
}

.vsew-event-chart-head {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "title toggle"
    "hint hint";
  align-items: center;
}

.vsew-event-charts-block .vsew-chart-head {
  padding: 6px 10px 4px;
}

.vsew-event-charts-block .vsew-chart-head h3 {
  font-size: 14px;
  line-height: 1.2;
  grid-area: title;
  min-width: 0;
}

.vsew-event-chart-head .vsew-device-view-toggle {
  grid-area: toggle;
  justify-self: end;
  align-self: center;
  flex-shrink: 0;
}

.vsew-event-chart-head .vsew-mobile-chart-hint {
  grid-area: hint;
  margin: 0;
}

.vsew-event-chart-head .vsew-device-view-toggle button {
  white-space: nowrap;
}

.vsew-toggle-label-short {
  display: none;
}

.vsew-event-chart-slot {
  min-height: 280px;
  padding: 8px 10px 10px;
}

.vsew-event-charts-block .vsew-chart-slot,
.vsew-event-charts-block .vsew-event-chart-slot {
  flex: 1 1 0;
  min-height: 0;
  padding: 0 10px 6px;
}

.vsew-event-view-panel {
  display: none;
  width: 100%;
}

.vsew-event-view-panel.is-active {
  display: block;
}

.vsew-event-charts-block .vsew-event-view-panel.is-active {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.vsew-event-charts-block #event-view-combined {
  position: relative;
}

.vsew-event-charts-block #event-view-combined .vsew-plot-legend-bar {
  position: absolute;
  top: 2px;
  left: 10px;
  right: 10px;
  z-index: 3;
  padding: 2px 2px 0;
  pointer-events: auto;
}

/* Spektralanalyse: overlay legend like wave chart so plot tops align side-by-side */
.vsew-event-charts-block #event-chart-panel-spectral .vsew-event-chart-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.vsew-event-charts-block #event-fft-legend-bar {
  position: absolute;
  top: 2px;
  left: 10px;
  right: 10px;
  z-index: 3;
  padding: 2px 2px 0;
  pointer-events: auto;
  margin-bottom: 0;
}

.vsew-event-charts-block #event-fft-combined-chart,
.vsew-event-charts-block #event-fft-separated-chart {
  flex: 1 1 0;
  min-height: 0;
  height: 100%;
}

.vsew-event-charts-block #event-view-combined .vsew-event-chart,
.vsew-event-charts-block #event-view-separated .vsew-event-chart {
  flex: 1 1 0;
  min-height: 0;
  height: 100%;
}

.vsew-event-chart {
  width: 100%;
  height: 340px;
  min-height: 260px;
}

.vsew-event-charts-block .vsew-event-chart {
  height: 100%;
  min-height: 0;
}

.vsew-event-chart--stacked {
  height: 520px;
  min-height: 400px;
}

.vsew-event-charts-block .vsew-event-chart--stacked {
  height: 100%;
  min-height: 220px;
}

.vsew-event-chart--fft {
  height: 300px;
  min-height: 240px;
}

.vsew-event-charts-block .vsew-event-chart--fft {
  height: 100%;
  min-height: 0;
}

.vsew-event-chart--fft.vsew-event-chart--stacked {
  height: 480px;
}

.vsew-event-charts-block .vsew-event-chart--fft.vsew-event-chart--stacked {
  height: 100%;
  min-height: 200px;
}

.vsew-event-charts-block .vsew-event-spectral-summary-wrap {
  flex: 0 0 auto;
  margin: 0;
  padding: 0 8px 8px;
  overflow-x: auto;
}

.vsew-event-fallback-img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 1px solid #dcdcdc;
  border-radius: 4px;
  background: #fff;
}

.vsew-event-source-note,
.vsew-event-muted {
  margin: 0;
  padding: 0 10px 10px;
  font-size: 11px;
  color: #888;
  line-height: 1.45;
}

.vsew-event-fft-note {
  padding: 0 10px 6px;
}

.vsew-event-source-note code,
.vsew-event-muted code {
  font-size: 10px;
}

.vsew-event-table-wrap {
  margin: 0 10px 8px;
  overflow-x: auto;
  border: 1px solid #ebebeb;
}

.vsew-event-spectrum-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: fixed;
}

.vsew-event-spectrum-table th,
.vsew-event-spectrum-table td {
  padding: 7px 8px;
  border-bottom: 1px solid #ebebeb;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.vsew-event-spectrum-table th {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #888;
  background: #f7f7f7;
}

.vsew-swatch.axis-n {
  background: #64748b;
}

.vsew-measurement .status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
}

.vsew-measurement .status-text.status-GREEN {
  color: #64748b;
}

.vsew-measurement .status-text.status-EVENT {
  color: #3d6b7a;
}

.vsew-measurement .status-text.status-YELLOW {
  color: #b8860b;
}

.vsew-measurement .status-text.status-RED {
  color: #c95a5a;
}

.vsew-measurement .status-text.status-CRITICAL {
  color: #b42020;
}

.hidden {
  display: none !important;
}

@media (max-width: 1100px) {
  .vsew-event-meta-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .vsew-event-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.vsew-breadcrumb--content {
  margin: 0 0 6px;
  flex: 0 0 auto;
}

.vsew-event-downloads-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.vsew-event-dl-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #333;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.vsew-event-dl-link:hover {
  color: #1d4ed8;
  text-decoration: none;
}

.vsew-event-dl-link.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.vsew-event-dl-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.vsew-event-dl-icon--csv {
  stroke: #16A34A;
}

.vsew-event-dl-icon--pdf {
  stroke: #E85D5D;
}

.vsew-event-dl-icon .vsew-event-dl-glyph {
  stroke-width: 1.25;
}

.vsew-event-context-panel {
  --vsew-ctx-data-size: clamp(15px, 1.15vw, 19px);
  --vsew-ctx-row-gap: 0.38em;
  min-width: 0;
}

.vsew-event-context-head__combined {
  margin: 0 0 10px;
  line-height: 1.35;
}

.vsew-topbar-event .vsew-event-page-title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.vsew-event-context-strip {
  min-width: 0;
  padding: 0;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: linear-gradient(180deg, #fcfcfc 0%, #f6f6f6 100%);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

/* 9×3: Spalten 1–4 je 16,8 %, 5–9 je 6,56 % */
.vsew-event-ctx-table {
  container-type: inline-size;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 16.8fr)) repeat(5, minmax(0, 6.56fr));
  grid-template-rows: auto auto auto;
  row-gap: var(--vsew-ctx-row-gap);
  column-gap: clamp(4px, 0.65vw, 12px);
  align-items: start;
  justify-items: start;
  width: 100%;
  min-width: 0;
  padding: 8px 12px 9px;
  box-sizing: border-box;
}

.vsew-event-ctx-tile {
  display: contents;
}

.vsew-event-ctx-cell {
  width: 100%;
  min-width: 0;
  justify-self: stretch;
  box-sizing: border-box;
  text-align: left;
}

.vsew-event-ctx-kicker {
  margin: 0;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9a9a9a;
  line-height: 1.2;
}

.vsew-event-ctx-slot {
  min-width: 0;
}

.vsew-event-ctx-row-primary {
  display: block;
  font-size: var(--vsew-ctx-data-size);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #0f0f0f;
  font-variant-numeric: tabular-nums;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.vsew-event-ctx-cell--projekt-name .vsew-event-ctx-row-primary {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.vsew-event-ctx-row-foot {
  display: block;
  font-size: 11.25px;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.4;
  color: #8a8a8a;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.vsew-event-ctx-row-foot strong {
  font-weight: 700;
  color: #5c5c5c;
}

.vsew-event-ctx-mp-combo {
  text-transform: none;
}

.vsew-event-ctx-metric__value {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  justify-content: flex-start;
  gap: 1px 2px;
  font-variant-numeric: tabular-nums;
  line-height: 1.08;
  max-width: 100%;
}

.vsew-event-ctx-metric__num {
  font-size: var(--vsew-ctx-data-size);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.vsew-event-ctx-metric__pct,
.vsew-event-ctx-metric__unit {
  font-size: var(--vsew-event-unit-size);
  font-weight: 700;
  line-height: 1.08;
}

.vsew-event-ctx-metric__unit {
  margin-left: 0.15em;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #666;
  text-transform: lowercase;
}

.vsew-event-ctx-metric--trigger .vsew-event-ctx-metric__num {
  color: #2a2a2a;
}


.vsew-event-ctx-metric--save .vsew-event-ctx-metric__num,
.vsew-event-ctx-metric--save .vsew-event-ctx-metric__pct {
  color: var(--vsew-threshold-save, #8c8c8c);
}

.vsew-event-ctx-metric--hint .vsew-event-ctx-metric__num,
.vsew-event-ctx-metric--hint .vsew-event-ctx-metric__pct {
  color: var(--vsew-threshold-hint, #dda634);
}

.vsew-event-ctx-metric--warning .vsew-event-ctx-metric__num,
.vsew-event-ctx-metric--warning .vsew-event-ctx-metric__pct {
  color: var(--vsew-threshold-warning, #ef4e4e);
}

.vsew-event-ctx-metric--critical .vsew-event-ctx-metric__num,
.vsew-event-ctx-metric--critical .vsew-event-ctx-metric__pct {
  color: var(--vsew-threshold-critical, #b42020);
}

.vsew-event-ctx-cell--thr-install .vsew-event-ctx-install-note {
  margin: 0;
  font-size: 10px;
  font-weight: 500;
  font-style: italic;
  line-height: 1.45;
  color: #7a7a7a;
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

@media (min-width: 901px) {
  /* Spalten 1–4: je 16,8 % — Spalten 5–9: je 6,56 % */
  .vsew-event-ctx-table {
    grid-template-columns: repeat(4, minmax(0, 16.8fr)) repeat(5, minmax(0, 6.56fr));
  }

  .vsew-event-ctx-cell--at-1-1,
  .vsew-event-ctx-cell--at-1-2,
  .vsew-event-ctx-cell--at-1-3 {
    grid-column: 1 / span 2;
  }

  .vsew-event-ctx-cell--at-1-1 { grid-row: 1; }
  .vsew-event-ctx-cell--at-1-2 { grid-row: 2; }
  .vsew-event-ctx-cell--at-1-3 { grid-row: 3; }

  .vsew-event-ctx-cell--at-3-1 { grid-column: 3; grid-row: 1; }
  .vsew-event-ctx-cell--at-3-2 { grid-column: 3; grid-row: 2; }
  .vsew-event-ctx-cell--at-3-3 { grid-column: 3; grid-row: 3; }
  .vsew-event-ctx-cell--at-4-1 { grid-column: 4; grid-row: 1; }
  .vsew-event-ctx-cell--at-4-2 { grid-column: 4; grid-row: 2; }
  .vsew-event-ctx-cell--at-4-3 { grid-column: 4; grid-row: 3; }

  .vsew-event-ctx-cell--at-4-1,
  .vsew-event-ctx-cell--at-4-2,
  .vsew-event-ctx-cell--at-4-3 {
    transform: translateX(0.8cqw);
    border-left: 1px solid #e8e8e8;
    padding-left: clamp(6px, 0.6vw, 12px);
  }

  .vsew-event-ctx-cell--at-5-1 { grid-column: 5; grid-row: 1; }
  .vsew-event-ctx-cell--at-6-1 { grid-column: 6; grid-row: 1; }
  .vsew-event-ctx-cell--at-7-1 { grid-column: 7; grid-row: 1; }
  .vsew-event-ctx-cell--at-8-1 { grid-column: 8; grid-row: 1; }
  .vsew-event-ctx-cell--at-9-1 { grid-column: 9; grid-row: 1; }
  .vsew-event-ctx-cell--at-5-2 { grid-column: 5; grid-row: 2; }
  .vsew-event-ctx-cell--at-6-2 { grid-column: 6; grid-row: 2; }
  .vsew-event-ctx-cell--at-7-2 { grid-column: 7; grid-row: 2; }
  .vsew-event-ctx-cell--at-8-2 { grid-column: 8; grid-row: 2; }
  .vsew-event-ctx-cell--at-9-2 { grid-column: 9; grid-row: 2; }

  .vsew-event-ctx-cell--at-6-1,
  .vsew-event-ctx-cell--at-6-2,
  .vsew-event-ctx-cell--at-7-1,
  .vsew-event-ctx-cell--at-7-2,
  .vsew-event-ctx-cell--at-8-1,
  .vsew-event-ctx-cell--at-8-2,
  .vsew-event-ctx-cell--at-9-1,
  .vsew-event-ctx-cell--at-9-2 {
    margin-left: 1cqi;
    box-sizing: border-box;
  }

  .vsew-event-ctx-cell--at-5-3 {
    grid-column: 5 / span 5;
    grid-row: 3;
  }

  .vsew-event-ctx-cell--at-3-1,
  .vsew-event-ctx-cell--at-3-2,
  .vsew-event-ctx-cell--at-3-3 {
    transform: translateX(-4cqi);
    border-left: 1px solid #e8e8e8;
    padding-left: clamp(6px, 0.6vw, 12px);
    box-sizing: border-box;
  }

  .vsew-event-ctx-cell--at-5-1,
  .vsew-event-ctx-cell--at-5-2,
  .vsew-event-ctx-cell--at-5-3 {
    border-left: 1px solid #e8e8e8;
    padding-left: clamp(6px, 0.6vw, 12px);
  }

  /* Zeile 2: einheitliche Primär-Typografie wie DIN 4150-3; Grenzwert-Farben + Einheiten unverändert */
  .vsew-event-ctx-cell--at-1-2 .vsew-event-ctx-row-primary,
  .vsew-event-ctx-cell--at-3-2 .vsew-event-ctx-row-primary,
  .vsew-event-ctx-cell--at-4-2 .vsew-event-ctx-row-primary,
  .vsew-event-ctx-cell--at-5-2 .vsew-event-ctx-metric__num,
  .vsew-event-ctx-cell--at-6-2 .vsew-event-ctx-metric__num,
  .vsew-event-ctx-cell--at-7-2 .vsew-event-ctx-metric__num,
  .vsew-event-ctx-cell--at-8-2 .vsew-event-ctx-metric__num,
  .vsew-event-ctx-cell--at-9-2 .vsew-event-ctx-metric__num {
    font-size: var(--vsew-ctx-data-size);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
  }

  /* Zeile 3: einheitliche Fußzeilen-Typografie */
  .vsew-event-ctx-cell--at-1-3 .vsew-event-ctx-row-foot,
  .vsew-event-ctx-cell--at-1-3 .vsew-event-ctx-mp-combo,
  .vsew-event-ctx-cell--at-3-3 .vsew-event-ctx-row-foot,
  .vsew-event-ctx-cell--at-4-3 .vsew-event-ctx-row-foot,
  .vsew-event-ctx-cell--at-5-3 .vsew-event-ctx-row-foot {
    font-size: 11.25px;
    font-weight: 500;
    font-style: normal;
    letter-spacing: 0.03em;
    line-height: 1.4;
    color: #8a8a8a;
  }

  .vsew-event-ctx-cell--at-5-3 .vsew-event-ctx-install-note {
    font-size: 11.25px;
    font-weight: 500;
    font-style: italic;
    letter-spacing: 0.03em;
    line-height: 1.4;
    color: #7a7a7a;
  }

  .vsew-event-ctx-cell--at-1-3 .vsew-event-ctx-row-foot strong,
  .vsew-event-ctx-cell--at-3-3 .vsew-event-ctx-row-foot strong,
  .vsew-event-ctx-cell--at-4-3 .vsew-event-ctx-row-foot strong {
    font-weight: 700;
    color: #5c5c5c;
  }
}

.vsew-event-context-card__sub .status-badge {
  font-size: 10px;
  vertical-align: baseline;
}

.vsew-event-params-panel {
  min-width: 0;
}

.vsew-event-params-head__combined {
  margin: 0 0 10px;
  line-height: 1.35;
}

.vsew-event-params-strip {
  --vsew-par-data-size: clamp(15px, 1.15vw, 19px);
  --vsew-par-row-gap: 0.38em;
  --vsew-par-unit-size: calc(var(--vsew-par-data-size) * 0.8);
  --vsew-par-unit-size-row2: calc(var(--vsew-par-unit-size) * 0.8);
  min-width: 0;
  padding: 0;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: linear-gradient(180deg, #fcfcfc 0%, #f6f6f6 100%);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

/* 9 Spalten: 1–5 ≈49,5 %, 6–9 ≈50,5 % (X leicht links, bündig mit DIN oben) */
.vsew-event-par-table {
  container-type: inline-size;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 9.9fr)) repeat(4, minmax(0, 12.625fr));
  grid-template-rows: auto auto auto;
  row-gap: var(--vsew-par-row-gap);
  column-gap: clamp(4px, 0.65vw, 12px);
  align-items: start;
  justify-items: start;
  width: 100%;
  min-width: 0;
  padding: 8px 12px 9px;
  box-sizing: border-box;
}

/* Kacheln: Desktop — Kinder im 8×3-Raster; Mobil — eigene Unterraster */
.vsew-event-par-tile {
  display: contents;
}

@media (min-width: 901px) {
  .vsew-event-par-cell--at-1-1 { grid-column: 1; grid-row: 1; }
  .vsew-event-par-cell--at-1-2 { grid-column: 1; grid-row: 2; }
  .vsew-event-par-cell--at-1-3 { grid-column: 1; grid-row: 3; }
  .vsew-event-par-cell--at-2-1 { grid-column: 2; grid-row: 1; }
  .vsew-event-par-cell--at-2-2 { grid-column: 2; grid-row: 2; }
  .vsew-event-par-cell--at-2-3 { grid-column: 2; grid-row: 3; }
  .vsew-event-par-cell--at-3-1 { grid-column: 3; grid-row: 1; }
  .vsew-event-par-cell--at-3-2 { grid-column: 3; grid-row: 2; }
  .vsew-event-par-cell--at-3-3 { grid-column: 3; grid-row: 3; }
  .vsew-event-par-cell--at-4-1 { grid-column: 4; grid-row: 1; }
  .vsew-event-par-cell--at-4-2 { grid-column: 4; grid-row: 2; }
  .vsew-event-par-cell--at-4-3 { grid-column: 4; grid-row: 3; }
  .vsew-event-par-cell--at-5-1 { grid-column: 5; grid-row: 1; }
  .vsew-event-par-cell--at-5-2 { grid-column: 5; grid-row: 2; }
  .vsew-event-par-cell--at-5-3 { grid-column: 5; grid-row: 3; }
  .vsew-event-par-cell--at-6-1 { grid-column: 6; grid-row: 1; }
  .vsew-event-par-cell--at-6-2 { grid-column: 6; grid-row: 2; }
  .vsew-event-par-cell--at-6-3 { grid-column: 6; grid-row: 3; }
  .vsew-event-par-cell--at-7-1 { grid-column: 7; grid-row: 1; }
  .vsew-event-par-cell--at-7-2 { grid-column: 7; grid-row: 2; }
  .vsew-event-par-cell--at-7-3 { grid-column: 7; grid-row: 3; }
  .vsew-event-par-cell--at-8-1 { grid-column: 8; grid-row: 1; }
  .vsew-event-par-cell--at-8-2 { grid-column: 8; grid-row: 2; }
  .vsew-event-par-cell--at-8-3 { grid-column: 8; grid-row: 3; }
  .vsew-event-par-cell--at-9-1 { grid-column: 9; grid-row: 1; }
  .vsew-event-par-cell--at-9-2 { grid-column: 9; grid-row: 2; }
  .vsew-event-par-cell--at-9-3 { grid-column: 9; grid-row: 3; }

  .vsew-event-par-cell--at-1-1,
  .vsew-event-par-cell--at-1-2,
  .vsew-event-par-cell--at-1-3,
  .vsew-event-par-cell--at-2-1,
  .vsew-event-par-cell--at-2-2,
  .vsew-event-par-cell--at-2-3 {
    margin-left: 1cqi;
    box-sizing: border-box;
  }

  .vsew-event-par-cell--at-3-1,
  .vsew-event-par-cell--at-3-2,
  .vsew-event-par-cell--at-3-3 {
    margin-left: 1cqi;
    box-sizing: border-box;
  }

  .vsew-event-par-cell--at-6-1,
  .vsew-event-par-cell--at-6-2,
  .vsew-event-par-cell--at-6-3 {
    border-left: 1px solid #e8e8e8;
    padding-left: clamp(4px, 0.5vw, 10px);
  }
}

.vsew-event-par-cell {
  width: 100%;
  min-width: 0;
  justify-self: stretch;
  box-sizing: border-box;
  text-align: left;
}

.vsew-event-par-cell--empty {
  min-height: 0;
  min-width: 0;
}

.vsew-event-par-util-pct {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  white-space: nowrap;
}

.vsew-event-par-val-num {
  font-size: var(--vsew-par-data-size);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.vsew-content-event .vsew-event-par-val-unit {
  font-size: var(--vsew-par-unit-size);
  font-weight: 600;
  line-height: 1.15;
  color: #5c5c5c;
}

/* Zeile 2: Einheiten %, s, Hz, mm/s um 20 % kleiner */
.vsew-event-params-strip .vsew-event-par-cell[class*="--at-"][class*="-2"] .vsew-event-par-val-unit {
  font-size: var(--vsew-par-unit-size-row2);
}

.vsew-event-par-peak-val {
  display: inline-flex;
  align-items: baseline;
  gap: 0.22em;
  white-space: nowrap;
}

.vsew-event-par-row-sub.vsew-status-text {
  font-weight: 700;
}

.vsew-event-par-row-sub.vsew-status-text.status-GREEN {
  color: #64748b;
}

.vsew-event-par-row-sub.vsew-status-text.status-EVENT {
  color: var(--vsew-status-event, #0b67c2);
}

.vsew-event-par-row-sub.vsew-status-text.status-YELLOW {
  color: var(--vsew-threshold-hint, #dda634);
}

.vsew-event-par-row-sub.vsew-status-text.status-RED {
  color: var(--vsew-threshold-warning, #ef4e4e);
}

.vsew-event-par-row-sub.vsew-status-text.status-CRITICAL {
  color: var(--vsew-threshold-critical, #b42020);
}

.vsew-event-par-slot {
  min-width: 0;
}

.vsew-event-par-slot--empty {
  min-height: 0;
}

.vsew-event-par-row-primary {
  display: inline-flex;
  align-items: baseline;
  gap: 0.22em;
  font-size: var(--vsew-par-data-size);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #0f0f0f;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.vsew-event-par-row-sub {
  display: block;
  font-size: calc(var(--vsew-par-data-size) * 0.8);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.15;
  color: #5c5c5c;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.vsew-event-par-peak-kanal {
  font-size: var(--vsew-par-data-size);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.15;
  white-space: nowrap;
}

.vsew-event-par-peak-kanal--x {
  color: var(--vsew-axis-x, #f4764e);
}

.vsew-event-par-peak-kanal--y {
  color: var(--vsew-axis-y, #9ccc60);
}

.vsew-event-par-peak-kanal--z {
  color: var(--vsew-axis-z, #4aa3d1);
}

.vsew-event-par-peak-kanal--n {
  color: #64748b;
}

.vsew-event-par-dom-axis {
  font-size: var(--vsew-par-data-size);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.vsew-event-par-dom-axis--x {
  color: var(--vsew-axis-x, #f4764e);
}

.vsew-event-par-dom-axis--y {
  color: var(--vsew-axis-y, #9ccc60);
}

.vsew-event-par-dom-axis--z {
  color: var(--vsew-axis-z, #4aa3d1);
}

.vsew-event-par-peak-val .vsew-event-par-val-num {
  font-size: var(--vsew-par-data-size);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #0f0f0f;
  font-variant-numeric: tabular-nums;
}

.vsew-event-par-peak-freq {
  font-size: calc(var(--vsew-par-data-size) * 0.8);
  font-weight: 600;
  line-height: 1.15;
  color: #5c5c5c;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.vsew-event-par-row-primary .vsew-event-par-val-num {
  font-size: inherit;
  font-weight: inherit;
}

.vsew-event-subtitle {
  margin: 4px 0 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #888;
}

.vsew-event-spectrum-table--compact {
  width: 100%;
  table-layout: fixed;
  font-size: 10px;
}

.vsew-event-spectrum-table--compact th,
.vsew-event-spectrum-table--compact td {
  padding: 4px 5px;
  line-height: 1.25;
}

.vsew-event-spectrum-table--compact th:first-child,
.vsew-event-spectrum-table--compact td:first-child {
  width: 12.5%;
}

.vsew-event-spectrum-table--compact th:not(:first-child),
.vsew-event-spectrum-table--compact td:not(:first-child) {
  width: 21.875%;
}

.vsew-event-spectrum-table--compact thead th {
  font-size: 8px;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
}

.vsew-event-spectrum-table--compact th[scope="row"] {
  font-size: 10px;
  font-weight: 700;
  color: #444;
  text-transform: none;
  background: #fafafa;
}

.vsew-event-spectral-summary-wrap {
  margin-top: 0;
}

.vsew-spectral-mark {
  display: inline-block;
  width: 10px;
  height: 0;
  border-top: 2px dotted #64748b;
  vertical-align: middle;
}

.vsew-spectral-mark.q25 {
  border-top-color: #94a3b8;
}

.vsew-spectral-mark.q50 {
  border-top-color: #475569;
}

.vsew-spectral-mark.q75 {
  border-top-color: #1e293b;
}

@media (max-width: 1200px) {
  .vsew-event-ctx-cell--projekt-name .vsew-event-ctx-row-primary {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
}

@media (max-width: 900px) {
  .vsew-event-context-head__combined {
    margin-bottom: 8px;
  }

  .vsew-event-ctx-table {
    display: flex;
    flex-direction: column;
    gap: 0;
    grid-template-columns: none;
    grid-template-rows: none;
    padding: 0;
  }

  .vsew-event-ctx-tile {
    display: grid;
    grid-template-rows: auto auto auto;
    row-gap: var(--vsew-ctx-row-gap);
    column-gap: clamp(6px, 2vw, 12px);
    width: 100%;
    padding: 8px 12px 9px;
    box-sizing: border-box;
    align-items: start;
    justify-items: start;
    border-bottom: 1px solid #e8e8e8;
  }

  .vsew-event-ctx-tile--projekt {
    grid-template-columns: minmax(0, 1fr);
  }

  .vsew-event-ctx-tile--sensor-din {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vsew-event-ctx-tile--thresholds {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border-bottom: none;
  }

  .vsew-event-ctx-cell[class*="--at-"]:not(.vsew-event-ctx-cell--thr-install) {
    grid-column: auto;
    grid-row: auto;
    border-left: none;
    padding-left: 0;
  }

  .vsew-event-ctx-tile--thresholds .vsew-event-ctx-cell--thr-install {
    grid-column: 1 / -1;
    grid-row: 3;
    width: 100%;
    max-width: 100%;
    justify-self: stretch;
  }

  .vsew-event-ctx-tile--thresholds .vsew-event-ctx-cell--thr-install .vsew-event-ctx-install-note {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: auto;
  }

  .vsew-event-ctx-tile--projekt .vsew-event-ctx-cell--projekt-name .vsew-event-ctx-row-primary {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: auto;
  }

  .vsew-event-ctx-tile--projekt .vsew-event-ctx-mp-combo,
  .vsew-event-ctx-tile--sensor-din .vsew-event-ctx-row-foot {
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: auto;
  }

  .vsew-event-ctx-tile--thresholds .vsew-event-ctx-kicker {
    overflow-wrap: normal;
    word-break: keep-all;
    max-width: 100%;
  }

  .vsew-topbar-event-row {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .vsew-topbar-event .vsew-event-page-title {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    line-height: 1.35;
  }

  .vsew-event-page-title__lead,
  .vsew-event-page-title__id {
    display: block;
  }

  .vsew-event-page-title__id {
    margin-top: 3px;
    font-size: 12px;
    font-weight: 600;
    color: #5c5c5c;
    letter-spacing: 0.01em;
    overflow-wrap: anywhere;
    word-break: break-all;
  }

  .vsew-event-par-table {
    display: flex;
    flex-direction: column;
    gap: 0;
    grid-template-columns: none;
    grid-template-rows: none;
    padding: 0;
  }

  .vsew-event-par-tile {
    display: grid;
    grid-template-rows: auto auto auto;
    row-gap: var(--vsew-par-row-gap);
    column-gap: clamp(6px, 2vw, 12px);
    width: 100%;
    padding: 8px 12px 9px;
    box-sizing: border-box;
    align-items: start;
    justify-items: start;
    border-bottom: 1px solid #e8e8e8;
  }

  .vsew-event-par-tile--cols-ab {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .vsew-event-par-tile--cols-cd {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vsew-event-par-tile--cols-peaks {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-bottom: none;
  }

  .vsew-event-par-cell--at-3-1,
  .vsew-event-par-cell--at-3-2,
  .vsew-event-par-cell--at-3-3 {
    margin-left: 7.8cqi;
    box-sizing: border-box;
  }

  .vsew-event-par-cell[class*="--at-"] {
    grid-column: auto;
    grid-row: auto;
  }

  .vsew-event-par-cell--at-6-1,
  .vsew-event-par-cell--at-6-2,
  .vsew-event-par-cell--at-6-3 {
    border-left: none;
    padding-left: 0;
  }
}

@media (max-width: 720px) {
  .vsew-event-context-strip {
    grid-template-columns: 1fr;
  }

  .vsew-topbar .vsew-event-downloads {
    justify-content: flex-start;
    width: 100%;
  }
}

/* —— Mobile layout (≤900px + phone landscape): drawer nav, page scroll, stacked charts —— */
@media (max-width: 900px), (max-height: 520px) and (orientation: landscape) and (max-width: 1200px) {
  .vsew-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;
  }

  .vsew-measurement {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .vsew-measurement-shell {
    display: block;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .vsew-mobile-nav-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    position: sticky;
    top: 0;
    z-index: 30;
    padding: 10px 12px;
    background: #f7f7f7;
    border-bottom: 1px solid #dcdcdc;
  }

  .vsew-nav-drawer-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    background: #fff;
    color: #222;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
  }

  .vsew-mobile-nav-title {
    font-size: 14px;
    font-weight: 600;
    color: #222;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .vsew-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(0, 0, 0, 0.35);
  }

  .vsew-sidebar-backdrop[hidden] {
    display: none;
  }

  .vsew-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(280px, 86vw);
    max-width: 86vw;
    z-index: 40;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
  }

  .vsew-measurement-shell.vsew-nav-open .vsew-sidebar {
    transform: translateX(0);
  }

  body.vsew-nav-drawer-open {
    overflow: hidden;
  }

  /* Phone layout must scroll: base layout uses 100vh + overflow:hidden */
  .vsew-measurement {
    height: auto;
    max-height: none;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .vsew-measurement-shell {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .vsew-main {
    display: block;
    min-height: 0;
    height: auto;
    max-height: none;
    overflow-x: hidden;
    overflow-y: visible;
    max-width: 100%;
  }

  .vsew-content,
  .vsew-content-event,
  .vsew-content-dashboard,
  .vsew-content-project,
  .vsew-content.vsew-report-workspace {
    flex: none;
    overflow: visible;
    overflow-x: visible;
    min-height: auto;
    max-width: 100%;
  }

  .vsew-content-event {
    display: block;
    height: auto;
  }

  .vsew-event-charts-block {
    flex: none;
    min-height: auto;
    overflow: visible;
    height: auto;
    display: block;
  }

  .vsew-event-charts-split {
    flex: none !important;
    height: auto !important;
    min-height: 0 !important;
  }

  .vsew-event-charts-split.is-wave-separated {
    min-height: 0 !important;
  }

  .vsew-event-charts-block .vsew-event-chart-panel {
    height: auto !important;
    overflow: visible !important;
  }

  /* On phones, avoid internal flex scroll traps: let the page scroll to the audit table */
  .vsew-audit-panel {
    flex: 0 0 auto;
    min-height: auto;
    overflow: visible;
  }

  .vsew-audit-panel .vsew-table-wrap {
    flex: 0 0 auto;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    touch-action: pan-x pan-y;
  }

  .vsew-audit-panel #audit-table {
    width: max-content;
    min-width: 100%;
    table-layout: auto;
  }

  .vsew-audit-panel #audit-table th,
  .vsew-audit-panel #audit-table td {
    width: auto;
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    padding: 5px 7px;
    font-size: 11px;
  }

  .vsew-audit-panel #audit-table th {
    white-space: normal;
    line-height: 1.15;
    font-size: 10px;
    vertical-align: bottom;
  }

  .vsew-audit-panel #audit-table td {
    white-space: nowrap;
  }

  .vsew-audit-panel #audit-table .col-resize-handle {
    display: none;
  }

  .vsew-table-wrap {
    flex: 0 0 auto;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  .vsew-event-panel-title-long {
    display: none;
  }

  .vsew-event-panel-title-short {
    display: inline;
  }

  .vsew-event-panel--collapsible:not([open]) {
    padding-bottom: 8px;
  }

  .vsew-event-panel--collapsible > .vsew-event-panel__summary .vsew-event-context-head__combined {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .vsew-charts-split,
  .vsew-event-charts-split {
    flex-direction: column;
    height: auto !important;
    min-height: 0;
    flex: none !important;
  }

  .vsew-charts-split .vsew-chart-panel--summary,
  .vsew-charts-split .vsew-chart-panel--freq,
  .vsew-event-charts-block .vsew-chart-panel--summary,
  .vsew-event-charts-block .vsew-chart-panel--freq {
    flex: 0 0 auto;
    width: 100% !important;
    max-width: none;
    min-height: 0;
    height: auto;
    overflow: visible;
  }

  .vsew-event-charts-block .vsew-event-chart-panel {
    height: auto;
    overflow: visible;
    display: flex;
    flex-direction: column;
  }

  .vsew-event-charts-block .vsew-chart-panel--summary {
    flex: 0 0 auto;
    width: 100% !important;
    min-height: 0;
  }

  .vsew-event-charts-block .vsew-chart-panel--freq {
    flex: 0 0 auto;
    min-height: 0;
  }

  .vsew-event-charts-block .vsew-event-chart-slot {
    flex: 0 0 auto;
    min-height: 300px;
    height: auto;
    overflow: visible;
    padding-top: 0;
  }

  .vsew-event-charts-block .vsew-plot-legend-bar {
    margin-bottom: 2px;
  }

  .vsew-event-charts-block .vsew-event-chart .plot-container.plotly,
  .vsew-event-charts-block .vsew-event-chart .js-plotly-plot {
    margin-top: 0;
  }

  .vsew-event-charts-block .vsew-event-view-panel.is-active {
    height: auto;
    min-height: 300px;
    display: block;
  }

  .vsew-event-charts-block #event-view-combined .vsew-plot-legend-bar {
    position: static;
    left: auto;
    right: auto;
    top: auto;
  }

  .vsew-event-charts-block #event-fft-legend-bar {
    position: static;
    left: auto;
    right: auto;
    top: auto;
  }

  .vsew-event-charts-block .vsew-event-chart {
    height: 360px !important;
    min-height: 360px !important;
    max-height: none;
  }

  .vsew-event-charts-block .vsew-event-chart--stacked {
    height: 528px !important;
    min-height: 528px !important;
  }

  .vsew-event-charts-block .vsew-event-chart--fft {
    height: 360px !important;
    min-height: 360px !important;
  }

  .vsew-event-charts-block .vsew-event-chart--fft.vsew-event-chart--stacked {
    height: 504px !important;
    min-height: 504px !important;
  }

  .vsew-event-charts-block .vsew-event-spectral-summary-wrap {
    flex: 0 0 auto;
    margin-top: 4px;
  }

  .vsew-guest-sensor-cta {
    width: auto;
    max-width: min(200px, 44vw);
    margin-bottom: 0;
  }

  .vsew-guest-cta-long {
    display: none;
  }

  .vsew-guest-cta-short {
    display: inline;
  }

  .vsew-event-chart-head .vsew-device-view-toggle button {
    padding: 4px 7px;
    font-size: 10px;
    line-height: 1.2;
  }

  #fft-view-toggle .vsew-toggle-label-long {
    display: none;
  }

  #fft-view-toggle .vsew-toggle-label-short {
    display: inline;
  }

  .vsew-charts-split .vsew-charts-gutter,
  .vsew-event-charts-block .vsew-charts-gutter,
  .vsew-charts-height-gutter {
    display: none;
  }

  .vsew-chart-slot {
    touch-action: pan-y;
    min-height: 260px;
  }

  .vsew-event-chart-slot {
    touch-action: pan-y;
  }

  .vsew-chart-slot .js-plotly-plot,
  .vsew-event-chart-slot .js-plotly-plot,
  .vsew-chart-slot .plot-container.plotly,
  .vsew-event-chart-slot .plot-container.plotly {
    touch-action: pan-y;
  }

  .vsew-mobile-chart-hint {
    display: block;
    font-size: 10px;
    color: #888;
    line-height: 1.3;
  }

  .vsew-filter-bar {
    flex-wrap: wrap;
    gap: 8px;
  }

  .vsew-topbar {
    flex-wrap: wrap;
    gap: 8px;
  }

  .vsew-sidebar {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .vsew-nav {
    overflow: visible;
    flex: 0 1 auto;
    min-height: auto;
  }

  .vsew-nav-group--monitoring {
    overflow: visible;
    flex: 0 1 auto;
  }

  .vsew-nav-sensors {
    flex: 0 1 auto;
    overflow: visible;
  }

  .vsew-nav-children {
    max-height: none;
    overflow: visible;
    flex: 0 1 auto;
  }

  .vsew-content-dashboard {
    overflow: visible;
  }

  .vsew-dashboard-map {
    height: min(360px, 52vh);
    max-width: 100%;
    overflow: hidden;
    position: relative;
    z-index: 0;
    isolation: isolate;
  }

  .vsew-dashboard-map .leaflet-container {
    width: 100% !important;
    max-width: 100%;
  }

  .vsew-measurement-shell.vsew-nav-open .vsew-sidebar {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .vsew-audit-table-wrap,
  .vsew-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .vsew-sidebar--guest .vsew-nav-group--guest .vsew-nav a {
    font-weight: 600;
  }

  /* Admin: avoid nested scroll trap (gray blank area when jumping to #admin-empfaenger) */
  .vsew-admin-content {
    overflow: visible;
    flex: none;
    min-height: auto;
  }

  .vsew-admin-content .card[id^="admin-"] {
    scroll-margin-top: 72px;
  }

  .vsew-sidebar-backdrop:not([hidden]) {
    pointer-events: auto;
  }
}

/* Phone landscape: compact top bar + shorter charts */
@media (max-height: 520px) and (orientation: landscape) and (max-width: 1200px) {
  .vsew-mobile-nav-bar {
    padding: 4px 8px;
    gap: 6px;
  }

  .vsew-nav-drawer-toggle {
    width: 28px;
    height: 28px;
    font-size: 15px;
    border-radius: 6px;
  }

  .vsew-mobile-nav-title {
    font-size: 12px;
    line-height: 1.15;
  }

  .vsew-event-charts-block .vsew-event-chart-slot {
    min-height: 0;
  }

  .vsew-event-charts-block .vsew-event-view-panel.is-active {
    min-height: 0;
  }

  .vsew-event-charts-block .vsew-event-chart {
    height: 210px !important;
    min-height: 210px !important;
  }

  .vsew-event-charts-block .vsew-event-chart--stacked {
    height: 300px !important;
    min-height: 300px !important;
  }

  .vsew-event-charts-block .vsew-event-chart--fft {
    height: 210px !important;
    min-height: 210px !important;
  }

  .vsew-event-charts-block .vsew-event-chart--fft.vsew-event-chart--stacked {
    height: 290px !important;
    min-height: 290px !important;
  }

  .vsew-chart-slot {
    min-height: 180px;
  }

  .vsew-event-panel--collapsible:not([open]) {
    padding-bottom: 4px;
  }

  .vsew-event-panel {
    padding: 6px 10px;
  }
}

@media (min-width: 901px) and (min-height: 521px) {
  .vsew-mobile-nav-bar,
  .vsew-sidebar-backdrop {
    display: none;
  }

  .vsew-mobile-chart-hint {
    display: none;
  }
}

/* Plotly modebar: nearly invisible until the chart or toolbar is hovered */
.vsew-chart-slot .modebar,
.vsew-event-chart-slot .modebar {
  opacity: 0.07;
  transition: opacity 0.15s ease;
}

.vsew-chart-slot .modebar:hover,
.vsew-event-chart-slot .modebar:hover,
.vsew-chart-slot .js-plotly-plot:hover .modebar,
.vsew-event-chart-slot .js-plotly-plot:hover .modebar,
.vsew-chart-slot .plot-container.plotly:hover .modebar,
.vsew-event-chart-slot .plot-container.plotly:hover .modebar {
  opacity: 1;
}

/* --- Project / Baustelle hub (Sprint 1) --- */
.vsew-content-project {
  overflow: auto;
  flex: 1 1 0;
  min-height: 0;
  padding-bottom: 10px;
}

.vsew-topbar-project .vsew-page-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.vsew-project-status {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid #d4d4d4;
  background: #f5f5f5;
  color: #333;
}

.vsew-project-status--active {
  border-color: #b7dfc3;
  background: #ecfdf3;
  color: #166534;
}

.vsew-project-map-stage {
  --vsew-project-hub-h: 462px;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  height: var(--vsew-project-hub-h);
  min-height: 320px;
  max-height: 85vh;
  margin-bottom: 8px;
}

.vsew-project-hub {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.95fr);
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  margin-bottom: 0;
  align-items: start;
}

.vsew-project-map-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.vsew-project-hub-resizer {
  flex: 0 0 10px;
  position: relative;
  cursor: ns-resize;
  touch-action: none;
  background: transparent;
  outline: none;
}

.vsew-project-hub-resizer::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 50%;
  height: 1px;
  background: #c8c8c8;
  transform: translateY(-50%);
}

.vsew-project-hub-resizer::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 36px;
  height: 4px;
  margin: -2px 0 0 -18px;
  border-radius: 999px;
  background: #a8a8a8;
  opacity: 0.45;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.vsew-project-hub-resizer:hover::after,
.vsew-project-hub-resizer:focus-visible::after,
body.vsew-project-hub-resize-active .vsew-project-hub-resizer::after {
  opacity: 1;
  background: #6b7280;
}

body.vsew-project-hub-resize-active {
  cursor: ns-resize;
  user-select: none;
}

.vsew-project-map-panel,
.vsew-project-aside-block {
  background: #fff;
  border: 1px solid #dcdcdc;
}

.vsew-project-map-toolbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #ebebeb;
}

.vsew-project-map-toolbar h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.vsew-project-map-note {
  font-size: 11px;
  color: #777;
}

.vsew-project-map {
  flex: 1 1 auto;
  min-height: 180px;
  height: 100%;
  width: 100%;
  background: #ececec;
}

.vsew-project-map .leaflet-top.leaflet-left .leaflet-control-scale {
  margin-top: 2px;
}

.vsew-map-measure-control a.vsew-map-measure-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  line-height: 1;
  background: #fff;
  color: #333;
}

.vsew-map-measure-control a.vsew-map-measure-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.vsew-map-measure-control a.vsew-map-measure-btn.is-active {
  background: #dbeafe;
  color: #1d4ed8;
}

.vsew-measure-label-wrap {
  background: transparent;
  border: none;
  pointer-events: none;
}

.vsew-measure-label {
  display: inline-block;
  padding: 2px 7px;
  border: 1px solid #1d4ed8;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.95);
  color: #1e3a8a;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  transform: translate(-50%, -50%);
}

.vsew-map-leaflet-icon {
  background: transparent !important;
  border: none !important;
}

.vsew-map-pin {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.vsew-map-pin--sensor {
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  border: 2px solid var(--pin-ring, #15803d);
  padding: 3px;
}

.vsew-map-pin--sensor img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

.vsew-map-pin--machine {
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  cursor: pointer;
  color: #334155;
  filter:
    drop-shadow(0 0 1px #fff)
    drop-shadow(0 0 2px #fff)
    drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55));
}

.vsew-map-pin--machine.is-active {
  color: #ea580c;
  filter:
    drop-shadow(0 0 1px #fff)
    drop-shadow(0 0 3px #fff)
    drop-shadow(0 1px 3px rgba(234, 88, 12, 0.65));
  cursor: grab;
}

.vsew-map-pin--machine svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.vsew-map-pin--machine .vsew-igbe-icon-mask {
  display: block;
  width: 100%;
  height: 100%;
  background-color: currentColor;
  -webkit-mask-image: url("/static/img/igbe-vibrationswalze.png");
  mask-image: url("/static/img/igbe-vibrationswalze.png");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  pointer-events: none;
}

.vsew-machine-type-icon,
.vsew-machine-card-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #334155;
}

.vsew-machine-card-icon {
  width: 26px;
  height: 26px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  padding: 3px;
}

.vsew-machine-type-icon {
  width: 28px;
  height: 28px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  padding: 4px;
}

.vsew-machine-type-icon svg,
.vsew-machine-card-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.vsew-machine-type-icon .vsew-igbe-icon-mask,
.vsew-machine-card-icon .vsew-igbe-icon-mask {
  display: block;
  width: 100%;
  height: 100%;
  background-color: currentColor;
  -webkit-mask-image: url("/static/img/igbe-vibrationswalze.png");
  mask-image: url("/static/img/igbe-vibrationswalze.png");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  pointer-events: none;
}

.vsew-machine-card.is-active .vsew-machine-card-icon {
  border-color: #fdba74;
  color: #c2410c;
  background: #fff;
}

.vsew-machine-type-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.vsew-machine-type-row select {
  flex: 1;
  min-width: 0;
}

.vsew-project-aside {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  max-height: 462px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: auto;
  align-self: start;
}

.vsew-project-aside-block {
  padding: 10px 12px 12px;
  min-width: 0;
  flex-shrink: 0;
}

.vsew-project-aside-block[data-aside-id="machines"] .vsew-project-aside-body--open {
  max-height: min(380px, 52vh);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: auto;
}

@media (min-width: 901px) {
  .vsew-project-hub {
    align-items: stretch;
  }

  .vsew-project-map-panel {
    min-height: 0;
  }

  .vsew-project-aside {
    align-self: stretch;
    max-height: none;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .vsew-project-aside-block {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex-shrink: 0;
  }

  .vsew-project-aside-block .vsew-project-aside-toggle {
    flex-shrink: 0;
  }

  .vsew-project-aside-block .vsew-project-aside-body--open {
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .vsew-project-aside-block[data-aside-id="layers"] .vsew-project-aside-body--open,
  .vsew-project-aside-block[data-aside-id="geology"] .vsew-project-aside-body--open {
    max-height: min(220px, 28vh);
  }

  .vsew-project-aside-block[data-aside-id="machines"] {
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
  }

  .vsew-project-aside-block[data-aside-id="machines"] .vsew-project-aside-body--open {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
  }

  .vsew-machine-card.is-active,
  .vsew-machine-card:has(.vsew-machine-card-body--open) {
    position: relative;
    z-index: 2;
    overflow: visible;
  }

  .vsew-machine-card-body--open {
    overflow: visible;
  }
}

.vsew-project-aside-block h3 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: #222;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.vsew-project-aside-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #222;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: left;
}

.vsew-project-aside-toggle:hover {
  color: #000;
}

.vsew-project-aside-toggle::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid #666;
  border-bottom: 2px solid #666;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  flex-shrink: 0;
  margin-top: -3px;
}

.vsew-project-aside-toggle[aria-expanded="false"]::after {
  transform: rotate(-45deg);
  margin-top: 3px;
}

.vsew-project-aside-toggle[aria-expanded="false"] {
  margin-bottom: 0;
}

.vsew-project-aside-body {
  display: none;
}

.vsew-project-aside-body--open {
  display: block;
}

.vsew-project-main-collapsible-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  background: #fff;
  color: #222;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: left;
}

.vsew-project-main-collapsible-toggle:hover {
  color: #000;
}

.vsew-project-main-collapsible .vsew-project-aside-body--open {
  border-top: 1px solid #ebebeb;
}

.vsew-project-main-collapsible-inner {
  padding: 10px 12px 12px;
  min-width: 0;
}

.vsew-project-section-meta {
  margin: 0 0 8px;
  font-size: 12px;
  color: #666;
}

.vsew-project-events-panel-body .vsew-filter-bar-compact {
  margin: 0 0 8px;
  padding: 0 0 8px;
  border-bottom: 1px solid #ebebeb;
}

.vsew-project-events-panel-body .vsew-table-wrap {
  padding: 0;
}

.vsew-project-layer-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vsew-project-layer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #333;
  cursor: pointer;
}

.vsew-project-layer input {
  margin: 0;
}

.vsew-project-layer input:disabled + span {
  color: #999;
}

.vsew-project-layer-opacity {
  margin: 2px 0 4px 22px;
  padding: 6px 0 2px;
}

.vsew-project-layer-opacity-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: #555;
  margin-bottom: 4px;
}

.vsew-project-layer-opacity-head output {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #222;
}

.vsew-project-layer-opacity input[type="range"] {
  width: 100%;
  margin: 0;
  accent-color: #172536;
}

.vsew-project-placeholder,
.vsew-project-hint,
.vsew-project-empty {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #777;
}

.vsew-project-hint--method {
  margin-top: 4px;
  font-size: 10px;
  color: #888;
}

.vsew-machine-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.vsew-machine-workspace,
.vsew-prognosis-point-block {
  min-width: 0;
}

.vsew-point-source-list {
  margin-top: 0;
}

.vsew-point-row label span:first-child {
  font-weight: 700;
  color: #991b1b;
}

.vsew-point-machine-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.vsew-point-intensity-field {
  grid-column: 1 / -1;
}

.vsew-prognosis-toolbar--point {
  margin-bottom: 8px;
}

.vsew-zone-legend-list--point {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #d1d5db;
}

.vsew-prognosis-export {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.vsew-machine-card {
  border: 1px solid #dcdcdc;
  background: #fafafa;
  padding: 8px 10px;
  min-width: 0;
  overflow: hidden;
}

.vsew-machine-card.is-hidden {
  opacity: 0.72;
}

.vsew-machine-card.is-hidden .vsew-machine-name-text {
  text-decoration: line-through;
  color: #888;
}

.vsew-machine-card.is-active {
  border-color: #ea580c;
  background: #fff7ed;
  box-shadow: inset 0 0 0 1px #fdba74;
}

.vsew-machine-card-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.vsew-machine-card-toggle {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
}

.vsew-machine-card-toggle::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 5px;
  width: 6px;
  height: 6px;
  border-right: 2px solid #666;
  border-bottom: 2px solid #666;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.vsew-machine-card-toggle[aria-expanded="false"]::after {
  transform: rotate(-45deg);
  top: 6px;
}

.vsew-machine-select {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

.vsew-machine-name-text {
  font-size: 12px;
  font-weight: 600;
  color: #111;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vsew-machine-card-meta {
  font-size: 10px;
  color: #666;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vsew-machine-head-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.vsew-machine-zones,
.vsew-machine-visibility,
.vsew-machine-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  border-radius: 3px;
}

.vsew-machine-zones.is-on {
  color: #15803d;
  background: #ecfdf3;
}

.vsew-machine-zones:hover {
  color: #166534;
  background: #dcfce7;
}

.vsew-machine-zones svg,
.vsew-machine-visibility svg,
.vsew-machine-remove svg,
.vsew-machine-action-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.vsew-machine-zones svg circle:last-child {
  fill: currentColor;
  stroke: none;
}

.vsew-machine-action-btn.is-on {
  color: #15803d;
  border-color: #bbf7d0;
  background: #ecfdf3;
}

.vsew-machine-visibility:hover {
  color: #0369a1;
  background: #f0f9ff;
}

.vsew-machine-remove {
  color: #b91c1c;
}

.vsew-machine-remove:hover {
  background: #fef2f2;
}

.vsew-machine-card-body {
  display: none;
  padding-top: 8px;
  margin-top: 6px;
  border-top: 1px solid #e5e7eb;
  min-width: 0;
  overflow: hidden;
}

.vsew-machine-card-body--open {
  display: block;
}

.vsew-machine-name-label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 6px;
  font-size: 10px;
  color: #666;
  min-width: 0;
  width: 100%;
}

.vsew-machine-type-caption {
  display: block;
  font-size: 10px;
  color: #666;
}

.vsew-machine-empty {
  margin: 0;
  padding: 8px 0;
}

.vsew-machine-active-panel {
  margin: 8px 0;
  padding: 10px 12px;
  border: 1px solid #fed7aa;
  background: #fff7ed;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.vsew-machine-active-panel[hidden] {
  display: none !important;
}

.vsew-machine-active-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: #9a3412;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.vsew-machine-active-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.vsew-machine-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #cbd5e1;
  background: #fff;
  padding: 5px 10px;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  border-radius: 3px;
}

.vsew-machine-action-btn:hover {
  background: #f8fafc;
}

.vsew-machine-action-btn--danger {
  color: #b91c1c;
  border-color: #fecaca;
}

.vsew-machine-action-btn--danger:hover {
  background: #fef2f2;
}

.vsew-machine-name {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid #d1d5db;
  padding: 4px 6px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
}

.vsew-machine-type-label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 6px;
  font-size: 10px;
  color: #666;
  min-width: 0;
}

.vsew-machine-type-label select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid #d1d5db;
  padding: 4px 6px;
  font: inherit;
  font-size: 11px;
  background: #fff;
  touch-action: manipulation;
}

.vsew-machine-type-row .vsew-machine-type {
  width: auto;
  flex: 1;
}

.vsew-machine-param--hidden {
  display: none;
}

.vsew-machine-params {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 6px;
  min-width: 0;
}

.vsew-machine-params label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 10px;
  color: #666;
}

.vsew-machine-params input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid #d1d5db;
  padding: 3px 5px;
  font: inherit;
  font-size: 11px;
}

.vsew-machine-place {
  width: 100%;
  border: 1px solid #cbd5e1;
  background: #fff;
  padding: 5px 8px;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.vsew-machine-place:hover {
  background: #f3f4f6;
}

.vsew-machine-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.vsew-machine-toolbar-btn {
  width: auto;
  flex: 1;
  min-width: 120px;
}

.vsew-machine-calc {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid #e5e7eb;
}

.vsew-machine-calc-title {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #444;
}

.vsew-machine-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
  font-size: 11px;
}

.vsew-machine-field-hint {
  font-style: normal;
  color: #888;
  font-weight: 400;
}

.vsew-machine-range-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vsew-machine-range-row input[type="range"] {
  flex: 1;
}

.vsew-machine-range-row output {
  min-width: 42px;
  font-size: 11px;
  font-weight: 600;
}

.vsew-machine-bk-fieldset {
  border: 1px solid #e5e7eb;
  padding: 6px 8px 8px;
  margin: 0;
}

.vsew-machine-bk-fieldset legend {
  font-size: 10px;
  padding: 0 4px;
  color: #555;
}

.vsew-machine-bk {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 10px;
  font-size: 11px;
}

.vsew-zone-legend {
  margin-top: 8px;
}

.vsew-zone-legend-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 10px;
  color: #444;
}

.vsew-zone-legend-list li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vsew-zone-legend-machine-title {
  margin-top: 4px;
  font-size: 11px;
  color: #9a3412;
}

.vsew-zone-legend-machine-title:first-child {
  margin-top: 0;
}

.vsew-zone-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.vsew-zone-swatch--green { background: #86efac; border: 1px solid #15803d; }
.vsew-zone-swatch--yellow { background: #fde047; border: 1px solid #ca8a04; }
.vsew-zone-swatch--orange { background: #fed7aa; border: 1px solid #ea580c; }
.vsew-zone-swatch--red { background: #fca5a5; border: 1px solid #b91c1c; }
.vsew-zone-swatch--critical {
  background: transparent;
  border: 2px dashed #991b1b;
  box-shadow: inset 0 0 0 1px #fca5a5;
}

.vsew-geology-block {
  margin-bottom: 10px;
}

.vsew-geology-block h4 {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #444;
}

.vsew-geology-text {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #333;
  white-space: pre-wrap;
}

.vsew-geology-meta {
  margin: 6px 0 0;
  font-size: 11px;
  color: #666;
}

.vsew-geology-auto .vsew-geology-block + .vsew-geology-block {
  margin-top: 8px;
}

.vsew-geology-source-hint a {
  color: #0369a1;
}

.vsew-machine-pick {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #dcdcdc;
  border-radius: 0;
  background: #fafafa;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: #222;
}

.vsew-machine-pick:hover {
  background: #f3f4f6;
  border-color: #cbd5e1;
}

.vsew-machine-pick.is-active {
  background: #fff7ed;
  border-color: #ea580c;
  box-shadow: inset 0 0 0 1px #fdba74;
}

.vsew-machine-pick-title {
  font-size: 12px;
  font-weight: 600;
}

.vsew-machine-pick-meta {
  font-size: 11px;
  color: #666;
}

.vsew-machine-catalog {
  margin-top: 8px;
  border: 1px solid #e5e7eb;
  background: #fff;
}

.vsew-machine-catalog-search {
  display: block;
  padding: 8px 10px;
  border-bottom: 1px solid #e5e7eb;
}

.vsew-machine-catalog-search span {
  display: block;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #374151;
}

.vsew-machine-catalog-search input {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  border: 1px solid #d1d5db;
  border-radius: 0;
  font: inherit;
  font-size: 12px;
}

.vsew-machine-catalog-list {
  max-height: min(280px, 38vh);
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vsew-machine-detail {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid #fed7aa;
  background: #fff7ed;
  font-size: 11px;
  line-height: 1.45;
  color: #7c2d12;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  box-sizing: border-box;
}

.vsew-project-count {
  font-size: 12px;
  color: #666;
}

.vsew-project-device-grid {
  display: block;
  padding: 4px 10px 6px;
}

.vsew-project-device-grid.vsew-device-grid {
  grid-template-columns: 1fr;
}

.vsew-project-device-card {
  padding: 5px 10px 5px 12px;
}

.vsew-project-device-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  min-width: 0;
}

.vsew-project-device-id {
  font-size: 13px;
  font-weight: 600;
  color: #222;
  white-space: nowrap;
}

.vsew-project-device-mp {
  font-size: 12px;
  color: #666;
  white-space: nowrap;
}

.vsew-project-device-card .vsew-vital-chips {
  margin: 0;
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}

.vsew-project-device-event {
  margin-left: auto;
  font-size: 11px;
  color: #666;
  line-height: 1.3;
  white-space: nowrap;
}

.vsew-project-device-card .vsew-device-card-sub {
  margin: 0;
  font-size: 12px;
  color: #666;
}

@media (max-width: 900px) {
  .vsew-project-device-event {
    margin-left: 0;
    flex-basis: 100%;
    white-space: normal;
  }

  .vsew-machine-params {
    grid-template-columns: 1fr;
  }

  .vsew-machine-type-label select {
    font-size: 16px;
    min-height: 44px;
    padding: 8px 10px;
  }

  .vsew-machine-name {
    font-size: 16px;
    min-height: 44px;
    padding: 8px 10px;
  }

  .vsew-machine-card-head {
    gap: 4px;
  }

  .vsew-machine-head-actions {
    gap: 0;
  }

  .vsew-project-aside {
    max-height: none;
    overflow-y: visible;
  }

  .vsew-project-aside-block[data-aside-id="machines"] .vsew-project-aside-body--open {
    max-height: min(420px, 58vh);
  }

  .vsew-project-events-panel-body .vsew-filter-bar-compact {
    flex-wrap: wrap;
  }
}

.vsew-project-events-panel .vsew-filter-bar-compact {
  margin: 0;
  border: none;
  padding: 0;
}

.vsew-project-events-table {
  font-size: 12px;
}

.vsew-project-event-row {
  cursor: pointer;
}

.vsew-project-event-row:hover td {
  background: #f7f7f7;
}

@media (max-width: 900px), (max-height: 520px) and (orientation: landscape) and (max-width: 1200px) {
  .vsew-project-hub {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .vsew-project-map-stage {
    height: auto;
    max-height: none;
    min-height: 0;
    margin-bottom: 8px;
    position: relative;
    z-index: 0;
    isolation: isolate;
  }

  .vsew-project-hub-resizer {
    display: none;
  }

  .vsew-project-map-panel {
    max-width: 100%;
    overflow: hidden;
    height: auto;
    min-height: 0;
    position: relative;
    z-index: 0;
    isolation: isolate;
  }

  /* Must follow base .vsew-project-map { height: 100% } in this file */
  .vsew-project-map {
    height: min(420px, 42.5vh);
    min-height: min(420px, 42.5vh);
    max-width: 100%;
    flex: none;
    position: relative;
    z-index: 0;
    isolation: isolate;
  }

  .vsew-project-map .leaflet-container {
    width: 100% !important;
    height: 100% !important;
  }

  .vsew-measurement-shell.vsew-nav-open .vsew-project-map-stage,
  .vsew-measurement-shell.vsew-nav-open .vsew-project-map-panel,
  .vsew-measurement-shell.vsew-nav-open .vsew-project-map {
    z-index: 0;
  }
}

/* Abschlussbericht workspace */
.vsew-topbar-report-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.vsew-sensor-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.vsew-sensor-tab {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--vsew-muted, #6b7280);
  background: #f3f4f6;
  text-decoration: none;
  border: 1px solid transparent;
}

.vsew-sensor-tab:hover {
  color: #111827;
  background: #e5e7eb;
}

.vsew-sensor-tab.is-active {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fecaca;
}

.vsew-topbar-report {
  align-items: flex-start;
  gap: 12px;
}

.vsew-report-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.vsew-report-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
}

.vsew-report-badge--exceedance {
  background: #fef2f2;
  color: #b91c1c;
}

.vsew-report-badge--null {
  background: #eff6ff;
  color: #1d4ed8;
}

.vsew-report-workspace {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vsew-content.vsew-report-workspace {
  overflow: hidden;
  overflow-x: hidden;
  flex: 1 1 0;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
  padding: 0;
  background: #d1d5db;
}

.vsew-report-canvas-workspace {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  min-height: 0;
}

.vsew-report-scroll-main {
  overflow: auto;
  overflow-x: hidden;
  min-height: 0;
  min-width: 0;
  padding: 12px 16px 20px;
  background: #d1d5db;
}

.vsew-report-page-nav {
  background: #e8ebf0;
  border-right: 1px solid #cfd4dc;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  padding: 10px 8px 16px;
}

.vsew-report-page-nav-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 10px;
  padding: 0 2px 8px;
  border-bottom: 1px solid #d6dbe3;
  font-size: 11px;
  line-height: 1.3;
}

.vsew-report-page-nav-head .muted {
  font-size: 10px;
}

.vsew-report-page-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vsew-report-page-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
}

.vsew-report-page-nav-thumb-stage {
  position: fixed;
  left: -20000px;
  top: 0;
  width: 210mm;
  max-width: none;
  visibility: hidden;
  pointer-events: none;
  overflow: visible;
  z-index: -1;
}

.vsew-report-page-nav-thumb {
  width: 108px;
  height: 153px;
  overflow: hidden;
  border: 1px solid #b8c0cc;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
  position: relative;
}

.vsew-report-page-nav-item.is-active .vsew-report-page-nav-thumb {
  border-color: #991b1b;
  box-shadow: 0 0 0 2px rgba(153, 27, 27, 0.28);
}

.vsew-report-page-nav-thumb-scale {
  transform-origin: top left;
  pointer-events: none;
  user-select: none;
  text-align: left;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
}

.vsew-report-page-nav-thumb-scale .vsew-rpt-page {
  box-shadow: none;
  margin: 0;
  min-height: 0;
  text-align: left;
  transform-origin: top left;
}

.vsew-report-page-nav-thumb-scale .vsew-rpt-main,
.vsew-report-page-nav-thumb-scale .vsew-rpt-prose,
.vsew-report-page-nav-thumb-scale .vsew-rpt-rich,
.vsew-report-page-nav-thumb-scale .vsew-rpt-h1,
.vsew-report-page-nav-thumb-scale .vsew-rpt-h2,
.vsew-report-page-nav-thumb-scale .vsew-rpt-h3,
.vsew-report-page-nav-thumb-scale .vsew-rpt-meta-row,
.vsew-report-page-nav-thumb-scale .vsew-rpt-kpi-strip {
  text-align: left;
}

.vsew-report-page-nav-thumb-scale .vsew-rpt-grid--blocks {
  position: relative;
  display: block;
  overflow: visible;
}

.vsew-report-page-nav-thumb-scale .vsew-rpt-grid--blocks .vsew-rpt-row[data-rpt-block],
.vsew-report-page-nav-thumb-scale .vsew-rpt-grid--blocks .vsew-rpt-field-slot--placed {
  overflow: hidden;
}

/* Thumbnails = WYSIWYG snapshot (not editor chrome) */
.vsew-report-page-nav-thumb-scale .vsew-rpt-block-frame,
.vsew-report-page-nav-thumb-scale .vsew-rpt-snap-guides,
.vsew-report-page-nav-thumb-scale .vsew-rpt-din4150-col-handle,
.vsew-report-page-nav-thumb-scale .vsew-rpt-din4150-row-handle,
.vsew-report-page-nav-thumb-scale .vsew-rpt-din4150-hint,
.vsew-report-page-nav-thumb-scale .vsew-rpt-toolbar,
.vsew-report-page-nav-thumb-scale .vsew-rpt-upload-tools,
.vsew-report-page-nav-thumb-scale .vsew-rpt-map-link,
.vsew-report-page-nav-thumb-scale .vsew-report-pick {
  display: none !important;
}

.vsew-report-page-nav-thumb-scale .vsew-rpt-row[data-rpt-block],
.vsew-report-page-nav-thumb-scale .vsew-rpt-field-slot--placed {
  outline: none !important;
}

.vsew-report-page-nav-thumb-scale .vsew-rpt-in,
.vsew-report-page-nav-thumb-scale .vsew-rpt-ta,
.vsew-report-page-nav-thumb-scale .vsew-rpt-mod select {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  padding-left: 0;
  padding-right: 0;
  color: #111827;
}

.vsew-report-page-nav-thumb-scale .vsew-rpt-mod--prog-row label,
.vsew-report-page-nav-thumb-scale .vsew-rpt-inline-field {
  color: transparent;
  font-size: 0;
  gap: 0;
}

.vsew-report-page-nav-thumb-scale .vsew-rpt-inline-field--labeled,
.vsew-report-page-nav-thumb-scale .vsew-rpt-mod--meta-list .vsew-rpt-field-label {
  color: #6b7280;
  font-size: 8pt;
  gap: var(--vsew-rpt-inner-xs);
}

.vsew-report-page-nav-thumb-scale .vsew-rpt-meta-row .vsew-rpt-in,
.vsew-report-page-nav-thumb-scale .vsew-rpt-meta-row select,
.vsew-report-page-nav-thumb-scale .vsew-rpt-meta-row .vsew-rpt-val,
.vsew-report-page-nav-thumb-scale .vsew-rpt-mod--prog-row label .vsew-rpt-in,
.vsew-report-page-nav-thumb-scale .vsew-rpt-inline-field .vsew-rpt-in,
.vsew-report-page-nav-thumb-scale .vsew-rpt-inline-field--labeled .vsew-rpt-in {
  color: #111827;
  font-size: var(--vsew-rpt-size);
}

.vsew-report-page-nav-thumb-scale .vsew-rpt-block-label,
.vsew-report-page-nav-thumb-scale .vsew-rpt-cover-party-label {
  color: #6b7280;
}

.vsew-report-page-nav-thumb-scale .vsew-rpt-slot-frame {
  border: none;
  background: transparent;
}

.vsew-report-page-nav-thumb-scale .vsew-rpt-slot-hint,
.vsew-report-page-nav-thumb-scale .vsew-rpt-slot-cap {
  display: none !important;
}

.vsew-report-page-nav-thumb-scale .vsew-rpt-val {
  display: inline;
  color: #111827;
  font-size: inherit;
  white-space: pre-wrap;
}

.vsew-report-page-nav-label {
  font-size: 9.5px;
  color: #6b7280;
  text-align: center;
  line-height: 1.25;
  max-width: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.vsew-report-page-nav-item.is-active .vsew-report-page-nav-label {
  color: #991b1b;
  font-weight: 600;
}

.vsew-rpt-ta--thumb {
  min-height: 0;
  resize: none;
  overflow: hidden;
  white-space: pre-wrap;
}

button.vsew-audit-dl {
  cursor: pointer;
  font: inherit;
}

button.vsew-audit-dl:disabled {
  opacity: 0.65;
  cursor: wait;
}

@media (max-width: 960px) {
  .vsew-report-canvas-workspace {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .vsew-report-page-nav {
    max-height: 132px;
    border-right: none;
    border-bottom: 1px solid #cfd4dc;
  }

  .vsew-report-page-nav-list {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .vsew-report-page-nav-item {
    flex: 0 0 auto;
    width: auto;
  }
}

/* Report canvas — Aptos Slab (@font-face + local Office fonts) */
@font-face {
  font-family: "VSEW Aptos Slab";
  src:
    local("Aptos Slab"),
    local("Aptos Slab Regular"),
    local("AptosSlab"),
    local("AptosSlab-Regular"),
    url("../fonts/aptos-slab/aptos-slab-regular.woff2") format("woff2"),
    url("../fonts/aptos-slab/aptos-slab-regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "VSEW Aptos Slab";
  src:
    local("Aptos Slab Bold"),
    local("AptosSlab-Bold"),
    url("../fonts/aptos-slab/aptos-slab-bold.woff2") format("woff2"),
    url("../fonts/aptos-slab/aptos-slab-bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

.vsew-report-canvas-workspace {
  --vsew-rpt-font: "VSEW Aptos Slab", "Aptos Slab", "Rockwell", "Roboto Slab", Georgia, serif;
  --vsew-rpt-font-display: "VSEW Aptos Slab", "Aptos Slab", "Rockwell", "Roboto Slab", Georgia, serif;
  /* Gorbunov rhythm: inner ≤ outer at every level */
  --vsew-rpt-size: 10.5pt;
  --vsew-rpt-lh: 1.42;
  --vsew-rpt-line: calc(var(--vsew-rpt-size) * var(--vsew-rpt-lh));
  --vsew-rpt-inner-xs: 4px;
  --vsew-rpt-inner-sm: calc(var(--vsew-rpt-line) * 0.35);
  --vsew-rpt-inner-md: calc(var(--vsew-rpt-line) * 0.5);
  --vsew-rpt-inner-lg: calc(var(--vsew-rpt-line) * 0.75);
  --vsew-rpt-outer-sm: var(--vsew-rpt-line);
  --vsew-rpt-outer-md: calc(var(--vsew-rpt-line) * 1.35);
  --vsew-rpt-outer-lg: calc(var(--vsew-rpt-line) * 1.85);
  --vsew-rpt-outer-xl: calc(var(--vsew-rpt-line) * 2.5);
  --vsew-rpt-gutter: 0;
  --vsew-rpt-margin-top: 13mm;
  --vsew-rpt-margin-bottom: 13mm;
  --vsew-rpt-margin-bind: 18mm;
  --vsew-rpt-margin-outer: 18mm;
}

.vsew-report-canvas-workspace .vsew-rpt-canvas,
.vsew-report-canvas-workspace .vsew-rpt-doc,
.vsew-report-canvas-workspace .vsew-rpt-page,
.vsew-report-canvas-workspace .vsew-rpt-toolbar,
.vsew-report-canvas-workspace .vsew-rpt-in,
.vsew-report-canvas-workspace .vsew-rpt-ta,
.vsew-report-canvas-workspace .vsew-rpt-mod select,
.vsew-report-canvas-workspace .vsew-rpt-table,
.vsew-report-canvas-workspace .vsew-btn {
  font-family: var(--vsew-rpt-font);
}

.vsew-report-form--canvas {
  max-width: none;
  margin: 0;
}

.vsew-report-canvas-workspace .vsew-rpt-canvas {
  max-width: 920px;
  margin: 0 auto;
}

.vsew-rpt-map-link {
  text-align: center;
  margin: 0 0 10px;
  font-size: 12px;
}

.vsew-rpt-map-link a {
  color: #991b1b;
  font-weight: 600;
}

.vsew-rpt-toolbar {
  position: sticky;
  bottom: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 14px auto 0;
  max-width: 210mm;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
}

.vsew-rpt-running-head {
  margin: 0 0 var(--vsew-rpt-outer-sm);
}

.vsew-rpt-running-rule {
  display: block;
  border-top: 1px solid #111827;
  margin-bottom: 4px;
}

.vsew-rpt-running-line {
  margin: 0;
  font-size: 7.5pt;
  color: #4b5563;
}

.vsew-rpt-letterhead {
  margin: 0 0 10px;
}

.vsew-rpt-org {
  margin: 0;
  font-size: 10pt;
  font-weight: 600;
}

.vsew-rpt-org-sub {
  margin: 2px 0 0;
  font-size: 8.5pt;
  color: #6b7280;
}

.vsew-rpt-mod {
  margin: 0;
}

.vsew-rpt-mod + .vsew-rpt-mod {
  margin-top: var(--vsew-rpt-outer-md);
}

.vsew-rpt-mod-label {
  display: block;
  font-size: 7pt;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
  margin-bottom: 3px;
}

.vsew-rpt-mod--meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--vsew-rpt-inner-md) var(--vsew-rpt-outer-sm);
}

.vsew-rpt-mod--meta-list {
  display: flex;
  flex-direction: column;
  gap: var(--vsew-rpt-inner-md);
}

.vsew-rpt-meta-row {
  display: grid;
  grid-template-columns: 36mm minmax(0, 1fr);
  gap: var(--vsew-rpt-inner-sm);
  align-items: baseline;
  margin: 0;
}

label.vsew-rpt-meta-row {
  cursor: text;
}

.vsew-rpt-field-label {
  font-size: 8pt;
  font-weight: 600;
  color: #6b7280;
  line-height: var(--vsew-rpt-lh);
}

.vsew-rpt-meta-row .vsew-rpt-in,
.vsew-rpt-meta-row .vsew-rpt-val,
.vsew-rpt-meta-row select {
  min-width: 0;
}

.vsew-rpt-mod--meta-grid label {
  display: flex;
  flex-direction: column;
  gap: var(--vsew-rpt-inner-xs);
  font-size: 8pt;
  color: #6b7280;
}

.vsew-rpt-mod--two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--vsew-rpt-outer-lg);
}

.vsew-rpt-stack {
  display: flex;
  flex-direction: column;
  gap: var(--vsew-rpt-inner-md);
}

.vsew-rpt-kpi-strip {
  display: flex;
  flex-wrap: wrap;
  gap: var(--vsew-rpt-outer-sm) var(--vsew-rpt-outer-lg);
  padding: var(--vsew-rpt-inner-md) 0 0;
  border-top: 1px solid #e5e7eb;
  font-size: 9pt;
  color: #6b7280;
}

.vsew-rpt-kpi-strip strong {
  color: #111827;
}

.vsew-rpt-in,
.vsew-rpt-ta,
.vsew-rpt-mod select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid transparent;
  border-radius: 4px;
  background: rgba(249, 250, 251, 0.85);
  font-family: var(--vsew-rpt-font);
  font-size: var(--vsew-rpt-size);
  line-height: var(--vsew-rpt-lh);
  color: inherit;
  padding: var(--vsew-rpt-inner-xs) var(--vsew-rpt-inner-sm);
}

.vsew-rpt-in:focus,
.vsew-rpt-ta:focus,
.vsew-rpt-mod select:focus {
  outline: none;
  border-color: #991b1b;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(153, 27, 27, 0.12);
}

.vsew-rpt-in--inline {
  width: auto;
  display: inline-block;
  min-width: 8em;
}

.vsew-rpt-ta {
  resize: vertical;
  text-align: left;
  hyphens: auto;
}

.vsew-rpt-mod--text-sm .vsew-rpt-ta { min-height: 28mm; }
.vsew-rpt-mod--text-md .vsew-rpt-ta { min-height: 45mm; }
.vsew-rpt-mod--text-lg .vsew-rpt-ta { min-height: 85mm; }

.vsew-rpt-mod--chart-full .vsew-rpt-slot-frame { min-height: 175mm; }
.vsew-rpt-mod--chart-map .vsew-rpt-slot-frame { min-height: 145mm; }
.vsew-rpt-mod--pdf .vsew-rpt-pdf-embed,
.vsew-rpt-mod--chart-full .vsew-rpt-pdf-embed { width: 100%; min-height: 175mm; border: 0; display: block; }
.vsew-rpt-mod--chart-map .vsew-rpt-pdf-embed { width: 100%; min-height: 145mm; border: 0; display: block; }
.vsew-rpt-mod--pdf .vsew-rpt-pdf-img {
  width: 100%;
  height: auto;
  display: block;
  border: 0;
  object-fit: contain;
}
.vsew-rpt-geo-legend {
  margin-top: var(--vsew-rpt-inner-sm);
  padding-top: var(--vsew-rpt-inner-xs);
  border-top: 1px solid #e5e7eb;
}
.vsew-rpt-geo-legend-title {
  margin: 0 0 var(--vsew-rpt-inner-xs);
  font-size: 8pt;
  font-weight: 600;
  color: #374151;
}
.vsew-rpt-geo-legend-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.vsew-rpt-geo-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 8pt;
  line-height: 1.3;
  color: #111827;
}
.vsew-rpt-geo-legend-item--sensor .vsew-rpt-geo-legend-label {
  font-weight: 600;
}
.vsew-rpt-geo-legend-swatch {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: 2px;
}
.vsew-rpt-geo-legend-swatch--marker {
  background: #dc2626;
  border-color: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
  border-radius: 50%;
}
.vsew-rpt-mod--bleed { margin: 0; padding: 0; }
.vsew-rpt-mod--bleed .vsew-rpt-pdf-img {
  max-height: 248mm;
}
.vsew-rpt-page .vsew-rpt-section-head .vsew-rpt-h3 {
  margin: 0 0 2mm;
  font-size: 10pt;
}

/* Seite 2 Berichtsdaten: Meta zweispaltig, KPI, Parteien, Bewertungsgrundlagen */
.vsew-rpt-page--berichtsdaten > .vsew-rpt-grid {
  margin-top: calc(-1 * var(--vsew-rpt-line));
}
.vsew-rpt-page--berichtsdaten .vsew-rpt-row {
  padding-top: var(--vsew-rpt-inner-md);
  padding-bottom: var(--vsew-rpt-inner-md);
}
.vsew-rpt-page--berichtsdaten .vsew-rpt-row:has(.vsew-rpt-section-head) {
  padding-top: 0;
  padding-bottom: 0;
}
.vsew-rpt-page--berichtsdaten .vsew-rpt-row:has(.vsew-rpt-section-head) + .vsew-rpt-row {
  padding-top: var(--vsew-rpt-inner-xs);
}
.vsew-rpt-page--berichtsdaten .vsew-rpt-section-head .vsew-rpt-h2 {
  margin: 0 0 var(--vsew-rpt-inner-sm);
}
.vsew-rpt-page--berichtsdaten .vsew-rpt-mod--bericht-meta {
  gap: var(--vsew-rpt-outer-lg);
  align-items: start;
}
.vsew-rpt-page--berichtsdaten .vsew-rpt-mod--bericht-meta > .vsew-rpt-mod--meta-list {
  gap: 0.35em;
}
.vsew-rpt-mod--meta-list > .vsew-rpt-field-slot:not(.vsew-rpt-field-slot--placed) {
  display: block;
  width: 100%;
}
.vsew-rpt-page--berichtsdaten .vsew-rpt-mod--parties > .vsew-rpt-field-slot:not(.vsew-rpt-field-slot--placed) {
  flex: 1 1 0;
  min-width: 0;
  display: block;
}
.vsew-rpt-field-slot--meta .vsew-rpt-meta-row,
.vsew-rpt-field-slot--party .vsew-rpt-stack,
.vsew-rpt-field-slot--party .vsew-rpt-block-label,
.vsew-rpt-field-slot--meta .vsew-rpt-field-label,
.vsew-rpt-field-slot--meta .vsew-rpt-in,
.vsew-rpt-field-slot--meta select,
.vsew-rpt-field-slot--meta .vsew-rpt-val,
.vsew-rpt-field-slot--party .vsew-rpt-in {
  text-align: inherit;
}
.vsew-rpt-page--berichtsdaten .vsew-rpt-meta-row {
  line-height: 1.35;
}
.vsew-rpt-page--berichtsdaten .vsew-rpt-meta-row .vsew-rpt-in,
.vsew-rpt-page--berichtsdaten .vsew-rpt-meta-row select,
.vsew-rpt-page--berichtsdaten .vsew-rpt-meta-row .vsew-rpt-val {
  padding: 1px var(--vsew-rpt-inner-xs);
  line-height: 1.35;
  background: transparent;
}
.vsew-rpt-page--berichtsdaten .vsew-rpt-kpi-strip {
  padding-top: var(--vsew-rpt-inner-sm);
  font-size: 8.5pt;
  line-height: 1.32;
}
.vsew-rpt-page--berichtsdaten .vsew-rpt-mod--two-col:not(.vsew-rpt-mod--bericht-meta) {
  gap: var(--vsew-rpt-outer-lg);
  margin-top: var(--vsew-rpt-inner-xs);
}
.vsew-rpt-page--berichtsdaten .vsew-rpt-stack {
  gap: 0.35em;
}
.vsew-rpt-page--berichtsdaten .vsew-rpt-block-label {
  margin: 0 0 4px;
}
.vsew-rpt-page--berichtsdaten .vsew-rpt-stack .vsew-rpt-in {
  padding: 1px var(--vsew-rpt-inner-xs);
  line-height: 1.35;
  background: transparent;
}
.vsew-rpt-page--berichtsdaten .vsew-rpt-row:has(.vsew-rpt-mod--grundlagen) {
  padding-top: var(--vsew-rpt-outer-sm);
  margin-top: auto;
}
.vsew-rpt-page--berichtsdaten .vsew-rpt-mod--grundlagen .vsew-rpt-h2 {
  margin: 0 0 var(--vsew-rpt-inner-sm);
  font-size: 12pt;
}
.vsew-rpt-page--berichtsdaten .vsew-rpt-prose--grundlagen {
  font-size: var(--vsew-rpt-size);
  line-height: 1.35;
  color: #111827;
}
.vsew-rpt-page--berichtsdaten .vsew-rpt-prose--grundlagen p {
  margin: 0 0 0.45em;
}
.vsew-rpt-page--berichtsdaten .vsew-rpt-din-list {
  margin: 0.2em 0 0;
  padding-left: 1.15em;
  list-style: disc;
}
.vsew-rpt-page--berichtsdaten .vsew-rpt-mod--report-table {
  width: 100%;
}
.vsew-rpt-mod--report-table .vsew-rpt-table-wrap {
  position: relative;
}
.vsew-rpt-mod--report-table .vsew-rpt-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: var(--vsew-rpt-size);
  line-height: 1.35;
  height: auto;
}
.vsew-rpt-mod--report-table .vsew-rpt-table tr {
  height: auto;
}
.vsew-rpt-mod--report-table .vsew-rpt-table-cell {
  padding: 1px var(--vsew-rpt-inner-xs);
  vertical-align: top;
  box-sizing: border-box;
  height: auto;
}
.vsew-rpt-mod--report-table .vsew-rpt-table-cell.is-selected {
  outline: 2px solid rgba(124, 58, 237, 0.75);
  outline-offset: -1px;
  z-index: 2;
}
.vsew-rpt-mod--report-table .vsew-rpt-table-cell .vsew-rpt-in,
.vsew-rpt-mod--report-table .vsew-rpt-table-cell select {
  width: 100%;
  box-sizing: border-box;
  padding: 1px var(--vsew-rpt-inner-xs);
  background: transparent;
  border-color: transparent;
  text-align: inherit;
}
.vsew-rpt-mod--report-table .vsew-rpt-table-cell .vsew-rpt-in--table-field,
.vsew-rpt-mod--report-table .vsew-rpt-table-cell textarea.vsew-rpt-in {
  min-height: 1.35em;
  height: auto;
  resize: none;
  overflow: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.35;
  field-sizing: content;
  text-align: inherit;
}
.vsew-rpt-mod--report-table .vsew-rpt-table-cell .vsew-rpt-table-cell-edit {
  text-align: inherit;
}
.vsew-rpt-mod--report-table .vsew-rpt-table-cell .vsew-rpt-in:focus,
.vsew-rpt-mod--report-table .vsew-rpt-table-cell select:focus {
  background: #fff;
  border-color: #991b1b;
}
.vsew-rpt-mod--report-table .vsew-rpt-table-cell-edit {
  min-height: 0;
  padding: 0 2px;
  border: 1px solid transparent;
  border-radius: 2px;
  line-height: 1.35;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.vsew-rpt-mod--report-table .vsew-rpt-table-cell-edit:focus {
  border-color: #991b1b;
  background: #fff;
  outline: none;
}
.vsew-rpt-mod--report-table .vsew-rpt-table-cell[data-rpt-fit="cell"] .vsew-rpt-in--table-field,
.vsew-rpt-mod--report-table .vsew-rpt-table-cell[data-rpt-fit="cell"] .vsew-rpt-table-cell-edit {
  height: 100%;
  min-height: 100%;
}
.vsew-rpt-mod--report-table .vsew-rpt-table-cell[data-rpt-fit="wrap"] .vsew-rpt-in--table-field {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.vsew-rpt-mod--report-table .vsew-rpt-bind-wrap {
  display: block;
  width: 100%;
}
.vsew-rpt-mod--report-table .vsew-rpt-field--sync {
  display: block;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.35;
}
.vsew-rpt-grid--blocks .vsew-rpt-row[data-rpt-block] .vsew-rpt-main:has(.vsew-rpt-mod--report-table) {
  height: auto;
  min-height: 0;
  max-height: 100%;
  overflow: visible;
  align-self: start;
}
.vsew-report-canvas-workspace textarea[data-rpt-autosize],
.vsew-report-canvas-workspace .vsew-rpt-in[data-rpt-autosize] {
  field-sizing: content;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.vsew-rpt-table--bordered .vsew-rpt-table-cell {
  border: 0.5pt solid #374151;
}
.vsew-rpt-table-col-handles,
.vsew-rpt-table-row-handles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}
.vsew-rpt-table-col-handle {
  position: absolute;
  width: 6px;
  margin-left: -3px;
  cursor: col-resize;
  pointer-events: auto;
  background: rgba(37, 99, 235, 0.08);
}
.vsew-rpt-table-col-handle:hover {
  background: rgba(37, 99, 235, 0.25);
}
.vsew-rpt-table-row-handle {
  position: absolute;
  height: 6px;
  margin-top: -3px;
  cursor: row-resize;
  pointer-events: auto;
  background: rgba(37, 99, 235, 0.08);
}
.vsew-rpt-table-row-handle:hover {
  background: rgba(37, 99, 235, 0.25);
}
.vsew-rpt-table-toolbar {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border: 1px solid #93c5fd;
  border-radius: 6px;
  background: #eff6ff;
}
.vsew-rpt-table-toolbar[hidden] {
  display: none !important;
}
body.vsew-rpt-table-dragging {
  cursor: col-resize;
  user-select: none;
}

/* Seite 4 · 1.1 Grundlagen: Fließtext + DIN-Tabelle 1 */
.vsew-rpt-page--befunde-grundlagen > .vsew-rpt-grid {
  display: flex;
  flex-direction: column;
  min-height: calc(var(--vsew-rpt-page-h, 297mm) - var(--vsew-rpt-head-h, 18mm) - var(--vsew-rpt-foot-h, 12mm));
}
.vsew-rpt-page--befunde-grundlagen .vsew-rpt-row {
  padding-top: var(--vsew-rpt-inner-sm);
  padding-bottom: var(--vsew-rpt-inner-sm);
}
.vsew-rpt-page--befunde-grundlagen .vsew-rpt-row:has(.vsew-rpt-section-head) {
  padding-top: 0;
  padding-bottom: 0;
}
.vsew-rpt-page--befunde-grundlagen .vsew-rpt-mod--text .vsew-rpt-prose,
.vsew-rpt-page--befunde-grundlagen .vsew-rpt-mod--text .vsew-rpt-rich {
  font-size: var(--vsew-rpt-size);
  line-height: 1.35;
}
.vsew-rpt-page--befunde-grundlagen .vsew-rpt-inline-fields {
  gap: var(--vsew-rpt-outer-md);
}
.vsew-rpt-page--befunde-grundlagen .vsew-rpt-row:has(.vsew-rpt-mod--din-table) {
  margin-top: auto;
  padding-top: var(--vsew-rpt-inner-md);
  padding-bottom: 0;
}

/* DIN 4150-3 Tabelle 1 — auf jeder Seite mit .vsew-rpt-mod--din-table */
.vsew-rpt-mod--din-table .vsew-rpt-din4150-caption {
  margin: 0 0 5px;
  font-size: 9pt;
  line-height: 1.32;
  font-weight: 600;
  color: #000;
}
.vsew-rpt-mod--din-table .vsew-rpt-din4150-caption-norm {
  font-weight: normal;
}
.vsew-rpt-mod--din-table .vsew-rpt-din4150-hint {
  margin: 0 0 6px;
  font-size: 8pt;
  line-height: 1.3;
  color: #4b5563;
}
.vsew-rpt-mod--din-table .vsew-rpt-din4150-wrap {
  position: relative;
}
.vsew-rpt-mod--din-table .vsew-rpt-din4150-t1 {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  border: 2.5px solid #000;
  font-size: 9pt;
  line-height: 1.25;
  font-weight: normal;
  color: #000;
  background: #fff;
}
.vsew-rpt-mod--din-table .vsew-rpt-din4150-t1 th,
.vsew-rpt-mod--din-table .vsew-rpt-din4150-t1 td {
  border: 1px solid #000;
  padding: 3px 4px;
  background: #fff;
  color: #000;
  font-weight: normal;
  text-transform: none;
  letter-spacing: normal;
  vertical-align: middle;
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  min-width: 0;
  max-width: 100%;
}
.vsew-rpt-mod--din-table .vsew-rpt-din4150-cell-edit {
  outline: none;
  min-height: 1.1em;
}
.vsew-rpt-mod--din-table .vsew-rpt-din4150-cell-edit:focus {
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.45);
}
.vsew-rpt-mod--din-table .vsew-rpt-din4150-t1 th {
  text-align: center;
}
.vsew-rpt-mod--din-table .vsew-rpt-din4150-t1 tbody td:first-child {
  text-align: center;
}
.vsew-rpt-mod--din-table .vsew-rpt-din4150-t1 tbody td:not(:first-child):not(.vsew-rpt-din4150-t1__gebaeude):not(.vsew-rpt-din4150-t1__note) {
  text-align: center;
}
.vsew-rpt-mod--din-table .vsew-rpt-din4150-t1__gebaeude {
  text-align: left;
}
.vsew-rpt-mod--din-table .vsew-rpt-din4150-t1__note {
  text-align: left;
  font-size: 9pt;
  line-height: 1.25;
}
.vsew-rpt-din4150-col-handles,
.vsew-rpt-din4150-row-handles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}
.vsew-rpt-din4150-col-handle {
  position: absolute;
  width: 6px;
  margin-left: 0;
  cursor: col-resize;
  pointer-events: auto;
  background: rgba(37, 99, 235, 0.18);
  border-left: 1px solid rgba(37, 99, 235, 0.55);
  border-right: 1px solid rgba(37, 99, 235, 0.55);
}
.vsew-rpt-din4150-row-handle {
  position: absolute;
  height: 6px;
  cursor: row-resize;
  pointer-events: auto;
  background: rgba(37, 99, 235, 0.18);
  border-top: 1px solid rgba(37, 99, 235, 0.55);
  border-bottom: 1px solid rgba(37, 99, 235, 0.55);
}
.vsew-rpt-preview-mode .vsew-rpt-din4150-col-handle,
.vsew-rpt-preview-mode .vsew-rpt-din4150-row-handle,
.vsew-rpt-preview-mode .vsew-rpt-din4150-hint,
.vsew-rpt-preview-mode .vsew-rpt-din4150-caption + .vsew-rpt-din4150-hint {
  display: none !important;
}
body.vsew-rpt-din4150-dragging {
  cursor: col-resize;
  user-select: none;
}
body.vsew-rpt-din4150-dragging .vsew-rpt-din4150-row-handle {
  cursor: row-resize;
}

/* Report editor: Rich-Text + Feldherkunft */
.vsew-rpt-rich-toolbar,
.vsew-rpt-block-toolbar {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
}
.vsew-rpt-block-toolbar {
  border-color: #c4b5fd;
  background: #faf5ff;
}
.vsew-rpt-block-edit-tools {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.vsew-rpt-block-edit-tools[hidden] {
  display: none !important;
}
.vsew-rpt-rich-btn--active {
  background: #ede9fe;
  border-color: #7c3aed;
  color: #5b21b6;
}
.vsew-rpt-tb-sep {
  width: 1px;
  height: 20px;
  background: #d1d5db;
  margin: 0 2px;
}
.vsew-rpt-tb-label {
  font-size: 10px;
  font-weight: 600;
  color: #6b7280;
  padding: 0 2px;
}
.vsew-rpt-tb-check {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  color: #374151;
  cursor: pointer;
  user-select: none;
}
.vsew-rpt-tb-check input {
  width: auto;
  margin: 0;
}
.vsew-rpt-snap-step {
  max-width: 52px;
}
.vsew-rpt-blocks-mode .vsew-rpt-row[data-rpt-block].is-block-active {
  outline: 2px solid rgba(124, 58, 237, 0.65);
  z-index: 6;
}
.vsew-rpt-blocks-mode .vsew-rpt-row[data-rpt-block]:not(.is-block-active) {
  outline: 1px dashed rgba(37, 99, 235, 0.22);
}
.vsew-rpt-blocks-mode .vsew-rpt-field-slot--placed:not(.is-block-active):not(.is-block-child-locked) {
  outline: 1px dashed rgba(168, 85, 247, 0.28);
}
.vsew-rpt-blocks-mode .vsew-rpt-field-slot--placed.is-block-child-locked {
  outline: none;
  pointer-events: none;
}
.vsew-rpt-blocks-mode .vsew-rpt-row.is-block-locked > .vsew-rpt-main {
  pointer-events: auto;
}
.vsew-rpt-rich-btn {
  min-width: 26px;
  height: 26px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background: #f9fafb;
  cursor: pointer;
  font-size: 12px;
}
.vsew-rpt-rich-select {
  height: 26px;
  font-size: 11px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  max-width: 88px;
}
.vsew-rpt-rich {
  min-height: calc(var(--vsew-rpt-line) * 4);
  padding: var(--vsew-rpt-inner-sm);
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  line-height: var(--vsew-rpt-lh);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.vsew-rpt-rich:focus {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  outline-offset: 1px;
}
.vsew-rpt-bind-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px auto 0;
  max-width: 920px;
  padding: 0 4px;
}
.vsew-rpt-bind-chip {
  font-size: 9pt;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.vsew-report-canvas-workspace.vsew-rpt-show-bindings .vsew-rpt-field--sync,
.vsew-report-canvas-workspace.vsew-rpt-show-bindings [data-vsew-bind="sync"] {
  background: rgba(16, 185, 129, 0.12);
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.45);
}
.vsew-report-canvas-workspace.vsew-rpt-show-bindings .vsew-rpt-field--project,
.vsew-report-canvas-workspace.vsew-rpt-show-bindings [data-vsew-bind="project"] {
  background: rgba(59, 130, 246, 0.1);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.4);
}
.vsew-report-canvas-workspace.vsew-rpt-show-bindings .vsew-rpt-field--computed,
.vsew-report-canvas-workspace.vsew-rpt-show-bindings [data-vsew-bind="computed"] {
  background: rgba(245, 158, 11, 0.12);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.45);
}
.vsew-report-canvas-workspace.vsew-rpt-show-bindings .vsew-rpt-field--manual,
.vsew-report-canvas-workspace.vsew-rpt-show-bindings [data-vsew-bind="manual"] {
  background: rgba(107, 114, 128, 0.08);
  box-shadow: inset 0 0 0 1px rgba(107, 114, 128, 0.35);
}
.vsew-report-canvas-workspace.vsew-rpt-show-bindings .vsew-rpt-field--template,
.vsew-report-canvas-workspace.vsew-rpt-show-bindings [data-vsew-bind="template"] {
  background: rgba(147, 51, 234, 0.08);
  box-shadow: inset 0 0 0 1px rgba(147, 51, 234, 0.35);
}
.vsew-rpt-bind-wrap {
  display: inline;
}
.vsew-rpt-bind-wrap .vsew-rpt-in {
  width: 100%;
}
.vsew-rpt-preview-mode.vsew-rpt-show-bindings .vsew-rpt-field--sync,
.vsew-rpt-preview-mode.vsew-rpt-show-bindings .vsew-rpt-field--project,
.vsew-rpt-preview-mode.vsew-rpt-show-bindings .vsew-rpt-field--computed,
.vsew-rpt-preview-mode.vsew-rpt-show-bindings .vsew-rpt-field--manual,
.vsew-rpt-preview-mode.vsew-rpt-show-bindings .vsew-rpt-field--template {
  box-shadow: inset 0 0 0 1px currentColor;
}

/* Anlage-Seiten (7 IGBE / 10 Prognosebereich): Titel + eingebetteter Inhalt */
.vsew-rpt-page--anlage .vsew-rpt-running-head,
.vsew-rpt-page--anlage-pb .vsew-rpt-running-head {
  margin-bottom: 0;
  flex: 0 0 auto;
}
.vsew-rpt-page--anlage .vsew-rpt-grid,
.vsew-rpt-page--anlage-pb .vsew-rpt-grid {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.vsew-rpt-page--anlage .vsew-rpt-row:first-child,
.vsew-rpt-page--anlage-pb .vsew-rpt-row:first-child {
  margin-top: 0;
  padding-top: 0;
  padding-bottom: 0;
  flex: 0 0 auto;
}
.vsew-rpt-page--anlage .vsew-rpt-row:has(.vsew-rpt-section-head),
.vsew-rpt-page--anlage-pb .vsew-rpt-row:has(.vsew-rpt-section-head) {
  padding-top: var(--vsew-rpt-inner-sm);
  padding-bottom: 0;
  flex: 0 0 auto;
  overflow: visible;
}
.vsew-rpt-page--anlage .vsew-rpt-section-head,
.vsew-rpt-page--anlage-pb .vsew-rpt-section-head {
  margin-top: 0;
}
.vsew-rpt-page--anlage .vsew-rpt-section-head,
.vsew-rpt-page--anlage .vsew-rpt-section-head .vsew-rpt-h3,
.vsew-rpt-page--anlage-pb .vsew-rpt-section-head,
.vsew-rpt-page--anlage-pb .vsew-rpt-section-head .vsew-rpt-h3 {
  text-align: center;
}
.vsew-rpt-page--anlage .vsew-rpt-section-head .vsew-rpt-h3,
.vsew-rpt-page--anlage-pb .vsew-rpt-section-head .vsew-rpt-h3 {
  margin: 0;
}
.vsew-rpt-page--anlage .vsew-rpt-row:has(.vsew-rpt-mod--bleed),
.vsew-rpt-page--anlage-pb .vsew-rpt-row:has(.vsew-rpt-mod--bleed) {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  margin-top: calc(var(--vsew-rpt-inner-sm) + 0.5 * var(--vsew-rpt-line));
  padding: 0;
  min-height: 0;
  position: relative;
  z-index: 1;
}
.vsew-rpt-page--anlage .vsew-rpt-row:has(.vsew-rpt-mod--bleed) .vsew-rpt-main,
.vsew-rpt-page--anlage-pb .vsew-rpt-row:has(.vsew-rpt-mod--bleed) .vsew-rpt-main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.vsew-rpt-page--anlage .vsew-rpt-page-foot,
.vsew-rpt-page--anlage-pb .vsew-rpt-page-foot {
  padding-top: calc(var(--vsew-rpt-inner-xs) * 0.5);
  font-size: 7pt;
  line-height: 1.15;
  flex: 0 0 auto;
}
.vsew-rpt-page--anlage .vsew-rpt-mod--bleed {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  min-height: 0;
  overflow: hidden;
}
.vsew-rpt-page--anlage .vsew-rpt-mod--bleed .vsew-rpt-pdf-img--anlage-embed {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  margin: 0;
  object-fit: contain;
  display: block;
}
/* Prognosebereich: zugeschnittenes Blatt-PNG oben ausrichten (Abstände wie PDF) */
.vsew-rpt-page--anlage-pb .vsew-rpt-mod--bleed {
  flex: 1 1 auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  margin: 0;
  padding: 0;
  min-height: 0;
  overflow: hidden;
}
.vsew-rpt-page--anlage-pb .vsew-rpt-mod--bleed .vsew-rpt-pdf-img--anlage-embed {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  margin: 0;
  object-fit: contain;
  object-position: top center;
  display: block;
}
.vsew-rpt-mod--chart-half .vsew-rpt-slot-frame { min-height: 82mm; }
.vsew-rpt-mod--photo {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.vsew-rpt-photo-stack {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.vsew-rpt-photo-viewport {
  position: relative;
  flex: 1 1 0;
  min-height: 48px;
  height: auto;
  overflow: hidden;
}
.vsew-rpt-photo-viewport .vsew-rpt-slot-frame {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
}
.vsew-rpt-mod--photo .vsew-rpt-slot-frame { min-height: 0; }
.vsew-rpt-mod--photo .vsew-rpt-slot-frame--has-img {
  display: block;
  padding: 0;
  border: 0;
  background: #f8fafc;
  overflow: hidden;
}
.vsew-rpt-blocks-mode .vsew-rpt-photo-viewport.is-photo-editing {
  outline: 2px solid rgba(37, 99, 235, 0.5);
  outline-offset: -2px;
}
.vsew-rpt-blocks-mode .vsew-rpt-photo-viewport:not(.is-photo-editing) .vsew-rpt-photo-img-wrap {
  cursor: default;
}
.vsew-rpt-blocks-mode .vsew-rpt-photo-viewport.is-photo-editing .vsew-rpt-photo-img-wrap {
  cursor: grab;
}
.vsew-rpt-blocks-mode .vsew-rpt-photo-desc-input:not(.is-editing) {
  cursor: default;
  user-select: none;
  caret-color: transparent;
}
.vsew-rpt-blocks-mode .vsew-rpt-photo-desc-input.is-editing {
  user-select: text;
  cursor: text;
  caret-color: auto;
}
.vsew-rpt-photo-img-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  z-index: 2;
}
.vsew-rpt-photo-img-wrap.is-panning { cursor: grabbing; }
.vsew-rpt-photo-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 0 transparent;
  transition: box-shadow 0.15s ease;
}
.vsew-rpt-photo-img-wrap:hover::after {
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.28);
}
.vsew-rpt-mod--photo .vsew-rpt-photo-img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  margin: 0;
  object-fit: var(--photo-fit, cover);
  object-position: calc(50% + var(--photo-x, 0%)) calc(50% + var(--photo-y, 0%));
  transform: scale(var(--photo-scale, 1));
  transform-origin: center center;
  display: block;
  user-select: none;
  pointer-events: none;
}
.vsew-rpt-photo-upload-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 12;
  width: 34px;
  height: 34px;
  padding: 5px;
  border: 1px solid rgba(55, 65, 81, 0.55);
  border-radius: 8px;
  background: rgba(107, 114, 128, 0.45);
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.22);
  cursor: pointer;
  line-height: 0;
  pointer-events: auto;
}
.vsew-rpt-photo-upload-btn:hover {
  background: rgba(75, 85, 99, 0.62);
  border-color: rgba(31, 41, 55, 0.75);
}
.vsew-rpt-photo-upload-icon {
  display: block;
  width: 24px;
  height: 24px;
  pointer-events: none;
  filter: grayscale(1) brightness(0.38) contrast(1.2);
  opacity: 0.98;
}
.vsew-rpt-photo-view-tools {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 12;
  display: flex;
  gap: 4px;
  padding: 3px 4px;
  border-radius: 8px;
  background: rgba(55, 65, 81, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.16);
  pointer-events: auto;
}
.vsew-rpt-photo-tool {
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  border: 0;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.14);
  color: #f9fafb;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
}
.vsew-rpt-photo-tool:hover,
.vsew-rpt-photo-tool:active {
  background: rgba(255, 255, 255, 0.3);
}
.vsew-rpt-photo-view-pulse {
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.55);
}
.vsew-rpt-photo-page-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
  font-size: 9pt;
  pointer-events: auto;
}
.vsew-rpt-page--anlage-photo .vsew-rpt-section-head,
.vsew-rpt-page--anlage-lageplan .vsew-rpt-section-head {
  margin-bottom: 0;
  flex: 0 0 auto;
}
/* Anlage 4 — Lageplan: volle Seite wie Anlage 2/10 */
.vsew-rpt-page--anlage-lageplan .vsew-rpt-running-head {
  margin-bottom: 0;
  flex: 0 0 auto;
}
.vsew-rpt-page--anlage-lageplan > .vsew-rpt-grid {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.vsew-rpt-page--anlage-lageplan > .vsew-rpt-grid--blocks {
  flex: 1 1 auto;
  min-height: calc(297mm - var(--vsew-rpt-margin-top) - var(--vsew-rpt-margin-bottom) - 14mm);
}
.vsew-rpt-page--anlage-lageplan .vsew-rpt-row:has(.vsew-rpt-mod--photo) {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0;
  margin: 0;
}
.vsew-rpt-page--anlage-lageplan .vsew-rpt-row:has(.vsew-rpt-mod--photo) .vsew-rpt-main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}
.vsew-rpt-page--anlage-lageplan .vsew-rpt-row[data-rpt-block="lage_head"] {
  flex: 0 0 auto;
  padding: 0;
  margin: 0;
}
.vsew-rpt-page--anlage-lageplan .vsew-rpt-row[data-rpt-block="lage_head"] .vsew-rpt-section-head,
.vsew-rpt-page--anlage-lageplan .vsew-rpt-row[data-rpt-block="lage_head"] .vsew-rpt-section-head .vsew-rpt-h3 {
  text-align: center;
}
.vsew-rpt-page--anlage-lageplan .vsew-rpt-row[data-rpt-block="lage_head"] .vsew-rpt-section-head .vsew-rpt-h3 {
  margin: 0;
}
.vsew-rpt-page--anlage-lageplan .vsew-rpt-mod--photo .vsew-rpt-photo-stack {
  flex: 1 1 auto;
  min-height: 0;
}
.vsew-rpt-page--anlage-lageplan .vsew-rpt-page-foot {
  flex: 0 0 auto;
}
.vsew-rpt-photo-page-hint {
  font-size: 8pt;
  margin-left: 2px;
}
.vsew-rpt-mod--photo .vsew-rpt-slot-frame {
  position: relative;
}
.vsew-rpt-photo-desc {
  flex: 0 0 auto;
  align-self: stretch;
  margin: 0;
  padding: 0;
}
.vsew-rpt-mod--photo .vsew-rpt-photo-desc-input,
textarea.vsew-rpt-photo-desc-input {
  display: block;
  width: 100%;
  min-height: 1.35em;
  height: auto;
  margin: 0;
  padding: 4px 7px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  font-family: var(--vsew-rpt-font, inherit);
  font-size: 8.5pt;
  line-height: 1.35;
  resize: none;
  overflow: hidden;
  box-sizing: border-box;
  field-sizing: content;
}
.vsew-rpt-photo-desc-input:focus {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  border-color: #93c5fd;
}
.vsew-rpt-photo-desc--print {
  margin-top: 3px;
}
.vsew-rpt-photo-desc-text {
  margin: 0;
  font-size: 8.5pt;
  line-height: 1.35;
  color: #374151;
  white-space: pre-wrap;
}
.vsew-rpt-page--anlage-photo .vsew-rpt-mod--photo .vsew-rpt-slot-cap,
.vsew-rpt-page--anlage-lageplan .vsew-rpt-mod--photo .vsew-rpt-slot-cap {
  flex: 0 0 auto;
  font-size: 8pt;
  margin-top: 2px;
}
.vsew-rpt-mod--map .vsew-rpt-slot-frame { min-height: 130mm; }
.vsew-rpt-mod--cover-hero .vsew-rpt-slot-frame { min-height: 72mm; }
.vsew-rpt-mod--table .vsew-rpt-slot-frame { min-height: 55mm; }

.vsew-rpt-mod--prog-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--vsew-rpt-outer-sm);
}

.vsew-rpt-mod--prog-row label {
  display: flex;
  flex-direction: column;
  gap: var(--vsew-rpt-inner-xs);
  font-size: 8pt;
  color: #6b7280;
}

.vsew-rpt-sign {
  margin-top: var(--vsew-rpt-outer-xl);
  font-size: 10pt;
  line-height: var(--vsew-rpt-lh);
}

.vsew-rpt-upload-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  font-size: 12px;
}

.vsew-rpt-uploads {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  font-size: 9pt;
}

.vsew-rpt-table--pick {
  font-size: 8pt;
}

.vsew-rpt-table--pick a {
  color: #991b1b;
}

.vsew-rpt-mod--report-table[data-rpt-table="13:audit"] {
  width: 100%;
}

.vsew-rpt-mod--report-table[data-rpt-table="13:audit"] .vsew-rpt-table-wrap {
  overflow-x: auto;
}

.vsew-rpt-mod--report-table[data-rpt-table="13:audit"] .vsew-rpt-table {
  font-size: 6.8pt;
}

.vsew-rpt-mod--report-table[data-rpt-table="13:audit"] .vsew-rpt-table-cell,
.vsew-rpt-mod--report-table[data-rpt-table="13:audit"] .vsew-rpt-table-cell-edit {
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  padding: 2px 3px;
}

.vsew-report-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px 16px;
}

.vsew-report-panel h2,
.vsew-report-panel h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.vsew-report-lead {
  margin: 0 0 10px;
  font-size: 13px;
  color: #4b5563;
}

.vsew-report-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.vsew-report-kpis div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vsew-report-kpis span {
  font-size: 11px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.vsew-report-kpis strong {
  font-size: 18px;
  color: #111827;
}

.vsew-report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.vsew-report-grid--2 {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.vsew-report-grid--3 {
  grid-template-columns: repeat(3, minmax(120px, 1fr));
}

.vsew-report-grid label,
.vsew-report-inline {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #374151;
}

.vsew-report-grid input,
.vsew-report-grid select,
.vsew-report-form textarea {
  width: 100%;
  font: inherit;
  padding: 7px 9px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
}

.vsew-report-form textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.45;
}

.vsew-report-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  position: sticky;
  bottom: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  backdrop-filter: blur(6px);
}

.vsew-btn {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #111827;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.vsew-btn--primary {
  background: #991b1b;
  border-color: #991b1b;
  color: #fff;
}

.vsew-btn:hover {
  filter: brightness(0.97);
}

.vsew-report-uploads {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
}

.vsew-report-upload-item {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #f3f4f6;
}

.vsew-report-upload-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}

.vsew-report-pick {
  display: inline-flex;
  margin: 0;
}

#report-save-status.is-ok {
  color: #047857;
}

#report-save-status.is-err {
  color: #b91c1c;
}

.vsew-main:has(#report-workspace) {
  min-height: 0;
}

.vsew-report-panel--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.vsew-report-split-col h3 {
  margin-top: 0;
}

.vsew-report-link {
  font-weight: 600;
  color: #991b1b;
}

.vsew-anlagen-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.vsew-anlage-item {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 10px;
  display: grid;
  gap: 2px;
  font-size: 12px;
}

.vsew-anlage-item span {
  color: #6b7280;
  font-size: 10px;
  text-transform: uppercase;
}

.vsew-anlage-item em {
  font-style: normal;
  font-size: 11px;
  color: #047857;
}

.vsew-anlage-item--pending em {
  color: #b45309;
}

.vsew-audit-dl--primary {
  background: #991b1b;
  color: #fff !important;
  border-color: #991b1b;
}

.vsew-audit-dl--active {
  background: #111827;
  color: #fff !important;
  border-color: #111827;
}

@media (max-width: 720px) {
  .vsew-report-panel--split {
    grid-template-columns: 1fr;
  }

  .vsew-report-split-layout {
    grid-template-columns: 1fr;
  }

  .vsew-report-preview-col {
    position: static;
    max-height: none;
  }
}

/* —— Modular report live preview (A4) —— */
.vsew-report-split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 12px;
  align-items: start;
  min-height: 0;
}

.vsew-report-editor-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vsew-report-preview-col {
  position: sticky;
  top: 0;
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #e5e7eb;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  overflow: hidden;
}

.vsew-report-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  font-size: 11px;
  font-weight: 600;
  color: #374151;
}

.vsew-report-preview-head span {
  font-weight: 400;
  color: #6b7280;
}

.vsew-report-preview-scroll {
  overflow: auto;
  padding: 10px;
  flex: 1 1 auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

.vsew-rpt-doc {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.vsew-rpt-page {
  width: 210mm;
  min-height: 297mm;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  padding: var(--vsew-rpt-margin-top) var(--vsew-rpt-margin-outer) var(--vsew-rpt-margin-bottom) var(--vsew-rpt-margin-bind);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0;
  font-family: var(--vsew-rpt-font);
  font-size: var(--vsew-rpt-size);
  line-height: var(--vsew-rpt-lh);
  color: #111827;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
  transform-origin: top center;
}

.vsew-rpt-grid {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

/* Freies Block-Layout (InDesign-ähnlich) */
.vsew-rpt-grid--blocks {
  position: relative;
  display: block;
  flex: 0 0 auto;
  height: var(--rpt-canvas-h, auto);
  min-height: var(--rpt-canvas-h, auto);
  overflow: visible;
}
.vsew-rpt-grid--blocks .vsew-rpt-row[data-rpt-block] {
  position: absolute;
  left: var(--rpt-bx, 0%);
  top: var(--rpt-by, 0%);
  width: var(--rpt-bw, 100%);
  height: var(--rpt-bh, auto);
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  overflow: auto;
  z-index: 1;
}
.vsew-rpt-grid--blocks .vsew-rpt-field-slot--placed:not(.vsew-rpt-field-slot--nested) {
  position: absolute;
  left: var(--rpt-bx, 0%);
  top: var(--rpt-by, 0%);
  width: var(--rpt-bw, auto);
  height: var(--rpt-bh, auto);
  box-sizing: border-box;
  padding: var(--rpt-bpad, 0);
  text-align: var(--rpt-balign, inherit);
  overflow: visible;
  z-index: 3;
}
.vsew-rpt-grid--blocks .vsew-rpt-main {
  position: relative;
}
.vsew-rpt-grid--blocks .vsew-rpt-main .vsew-rpt-field-slot--placed,
.vsew-rpt-grid--blocks .vsew-rpt-field-slot--nested.vsew-rpt-field-slot--placed {
  position: absolute;
  left: var(--rpt-bx, 0%);
  top: var(--rpt-by, 0%);
  width: var(--rpt-bw, auto);
  height: var(--rpt-bh, auto);
  box-sizing: border-box;
  padding: var(--rpt-bpad, 0);
  text-align: var(--rpt-balign, inherit);
  overflow: visible;
  z-index: 2;
}
.vsew-rpt-field-slot {
  display: inline-block;
  min-width: 0;
}
.vsew-rpt-field-slot label {
  display: flex;
  flex-direction: column;
  gap: var(--vsew-rpt-inner-xs);
  height: 100%;
  margin: 0;
}
.vsew-rpt-field-slot .vsew-rpt-in,
.vsew-rpt-field-slot .vsew-rpt-val {
  width: 100%;
  box-sizing: border-box;
  text-align: inherit;
}
.vsew-rpt-blocks-mode .vsew-rpt-field-slot--placed {
  outline-offset: 0;
  z-index: 6;
}
.vsew-rpt-blocks-mode .vsew-rpt-field-slot--placed:hover {
  z-index: 8;
}
.vsew-rpt-blocks-mode .vsew-rpt-field-slot--placed.is-block-active {
  outline: 2px solid rgba(124, 58, 237, 0.95);
  outline-offset: 0;
  z-index: 9;
}
.vsew-rpt-blocks-mode .vsew-rpt-field-slot--placed.is-block-active.is-block-child-locked {
  outline: none;
}
.vsew-rpt-blocks-mode .vsew-rpt-row.is-block-locked.is-block-active {
  outline-color: rgba(234, 88, 12, 0.85);
}
.vsew-rpt-block-frame--field .vsew-rpt-block-grip {
  background: rgba(168, 85, 247, 0.14);
  border-bottom-color: rgba(168, 85, 247, 0.45);
  height: 12px;
}
.vsew-rpt-block-frame--field .vsew-rpt-block-grip::after {
  color: #7c3aed;
  font-size: 9px;
  line-height: 12px;
}
.vsew-rpt-block-frame--field .vsew-rpt-block-handle {
  background: #7c3aed;
}
.vsew-rpt-grid--blocks .vsew-rpt-row[data-rpt-block] .vsew-rpt-main {
  height: 100%;
  overflow: auto;
  box-sizing: border-box;
  padding: var(--rpt-bpad, 0);
  text-align: var(--rpt-balign, inherit);
}
.vsew-rpt-grid--snap {
  --rpt-snap-step: 5%;
}
.vsew-rpt-grid--snap::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
  background-image:
    linear-gradient(to right, rgba(37, 99, 235, 0.1) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(37, 99, 235, 0.1) 1px, transparent 1px);
  background-size: var(--rpt-snap-step) var(--rpt-snap-step);
}
.vsew-rpt-grid--blocks.vsew-rpt-grid--snap .vsew-rpt-row[data-rpt-block] {
  z-index: 1;
}
.vsew-rpt-snap-guides {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 20;
}
.vsew-rpt-snap-guide {
  position: absolute;
  background: rgba(220, 38, 38, 0.75);
  pointer-events: none;
}
.vsew-rpt-snap-guide--v {
  top: 0;
  bottom: 0;
  width: 1px;
}
.vsew-rpt-snap-guide--h {
  left: 0;
  right: 0;
  height: 1px;
}
.vsew-rpt-grid--blocks .vsew-rpt-row:has(.vsew-rpt-mod--din-table) {
  margin-top: 0;
}
.vsew-rpt-blocks-mode .vsew-rpt-row[data-rpt-block] {
  outline-offset: 0;
  z-index: 2;
}
.vsew-rpt-blocks-mode .vsew-rpt-row[data-rpt-block]:hover:not(.is-block-child-locked) {
  z-index: 5;
}
.vsew-rpt-blocks-mode .vsew-rpt-field-slot--placed:hover:not(.is-block-child-locked):not(.is-block-active) {
  z-index: 7;
}
.vsew-rpt-block-frame--locked .vsew-rpt-block-grip {
  background: rgba(234, 88, 12, 0.14);
  border-bottom-color: rgba(234, 88, 12, 0.45);
}
.vsew-rpt-block-lock-badge {
  position: absolute;
  right: 4px;
  top: 0;
  line-height: 14px;
  font-size: 10px;
  pointer-events: none;
}
.vsew-rpt-block-frame {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
}
.vsew-rpt-block-grip {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 14px;
  background: rgba(37, 99, 235, 0.12);
  border-bottom: 1px solid rgba(37, 99, 235, 0.35);
  cursor: move;
  pointer-events: auto;
}
.vsew-rpt-block-grip::after {
  content: '⋮⋮';
  position: absolute;
  left: 6px;
  top: 0;
  font-size: 10px;
  line-height: 14px;
  color: #2563eb;
  letter-spacing: -2px;
}
.vsew-rpt-block-handle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #2563eb;
  border: 1px solid #fff;
  box-sizing: border-box;
  pointer-events: auto;
  z-index: 7;
}
.vsew-rpt-block-handle--nw { left: -4px; top: -4px; cursor: nwse-resize; }
.vsew-rpt-block-handle--n { left: 50%; top: -4px; margin-left: -4px; cursor: ns-resize; }
.vsew-rpt-block-handle--ne { right: -4px; top: -4px; cursor: nesw-resize; }
.vsew-rpt-block-handle--e { right: -4px; top: 50%; margin-top: -4px; cursor: ew-resize; }
.vsew-rpt-block-handle--se { right: -4px; bottom: -4px; cursor: nwse-resize; }
.vsew-rpt-block-handle--s { left: 50%; bottom: -4px; margin-left: -4px; cursor: ns-resize; }
.vsew-rpt-block-handle--sw { left: -4px; bottom: -4px; cursor: nesw-resize; }
.vsew-rpt-block-handle--w { left: -4px; top: 50%; margin-top: -4px; cursor: ew-resize; }
body.vsew-rpt-photo-panning {
  cursor: grabbing;
  user-select: none;
}
body.vsew-rpt-block-dragging {
  cursor: grabbing;
  user-select: none;
}
body.vsew-rpt-photo-split-dragging {
  cursor: ns-resize;
  user-select: none;
}
.vsew-rpt-preview-mode .vsew-rpt-block-frame {
  display: none !important;
}

.vsew-rpt-row {
  padding: var(--vsew-rpt-outer-md) 0;
}

.vsew-rpt-row:first-child {
  padding-top: 0;
}

.vsew-rpt-row:last-child {
  padding-bottom: 0;
}

.vsew-rpt-row:has(.vsew-rpt-section-head) {
  padding-top: var(--vsew-rpt-outer-lg);
  padding-bottom: var(--vsew-rpt-inner-sm);
}

.vsew-rpt-row:has(.vsew-rpt-section-head) + .vsew-rpt-row {
  padding-top: var(--vsew-rpt-inner-sm);
}

.vsew-rpt-main {
  min-width: 0;
  width: 100%;
}

.vsew-rpt-main > .vsew-rpt-h1:first-child,
.vsew-rpt-main > .vsew-rpt-h2:first-child,
.vsew-rpt-main > .vsew-rpt-h3:first-child {
  margin-top: 0;
}

.vsew-rpt-block-label {
  margin: 0 0 var(--vsew-rpt-inner-sm);
  font-size: 8pt;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
}

.vsew-rpt-inline-field {
  display: flex;
  flex-direction: column;
  gap: var(--vsew-rpt-inner-xs);
  font-size: 8pt;
  color: #6b7280;
}

.vsew-rpt-page-foot {
  margin-top: auto;
  padding-top: var(--vsew-rpt-outer-md);
  border-top: 1px solid #e5e7eb;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 8pt;
  line-height: 1.35;
  color: #6b7280;
}

.vsew-rpt-foot-left {
  flex: 0 1 auto;
  text-align: left;
}

.vsew-rpt-foot-right {
  flex: 0 1 auto;
  text-align: right;
}

.vsew-rpt-cover {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vsew-rpt-page--cover {
  padding-top: 18mm;
}

.vsew-rpt-cover-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: calc(297mm - 18mm - var(--vsew-rpt-margin-bottom) - 10mm);
}

.vsew-rpt-cover-center {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4mm 0 18mm;
}

.vsew-rpt-cover-tag {
  margin: 0 0 var(--vsew-rpt-inner-md);
  font-size: 8pt;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #991b1b;
}

.vsew-rpt-cover-object,
.vsew-rpt-cover-project {
  margin: var(--vsew-rpt-inner-lg) 0 0;
}

.vsew-rpt-cover-meta {
  margin-top: var(--vsew-rpt-outer-sm);
  display: block;
  line-height: var(--vsew-rpt-lh);
}

.vsew-rpt-cover-meta .vsew-rpt-cover-object,
.vsew-rpt-cover-meta .vsew-rpt-cover-project {
  margin: 0;
  padding: 0;
  line-height: inherit;
}

.vsew-rpt-cover-object {
  font-size: 11pt;
  font-weight: 600;
}

.vsew-rpt-cover-project {
  font-size: 10pt;
  color: #4b5563;
}

.vsew-rpt-in--cover {
  background: transparent;
  border-color: transparent;
  padding-left: 0;
  font-weight: inherit;
  font-size: inherit;
  color: inherit;
}

.vsew-rpt-in--cover:focus {
  background: rgba(249, 250, 251, 0.9);
  border-color: #991b1b;
  padding-left: 6px;
}

.vsew-rpt-cover-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--vsew-rpt-outer-sm) var(--vsew-rpt-outer-lg);
  padding-top: var(--vsew-rpt-outer-md);
  border-top: 1px solid #e5e7eb;
}

.vsew-rpt-cover-party-label {
  display: block;
  margin-bottom: var(--vsew-rpt-inner-xs);
  font-size: 7.5pt;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9ca3af;
}

.vsew-rpt-in--cover-party {
  background: transparent;
  border-color: transparent;
  padding-left: 0;
  font-size: 10.5pt;
  font-weight: 600;
}

.vsew-rpt-in--cover-party:focus {
  background: rgba(249, 250, 251, 0.9);
  border-color: #991b1b;
  padding-left: 6px;
}

.vsew-rpt-page--cover .vsew-rpt-h1 {
  margin: 0 0 0.1em;
  font-size: 26.5pt;
  line-height: 1.05;
}

.vsew-rpt-page--cover .vsew-rpt-lead {
  margin: 0;
  line-height: 1.18;
}

.vsew-rpt-text-module {
  display: block;
}

.vsew-rpt-text-module .vsew-rpt-h2,
.vsew-rpt-text-module .vsew-rpt-h3 {
  margin-top: 0;
  margin-bottom: var(--vsew-rpt-inner-md);
}

.vsew-rpt-text-module .vsew-rpt-mod--text {
  margin-top: 0;
}

.vsew-rpt-section-head {
  display: block;
}

.vsew-rpt-section-head .vsew-rpt-h2 {
  margin: 0;
}

.vsew-rpt-h1 {
  margin: 0 0 var(--vsew-rpt-inner-md);
  font-family: var(--vsew-rpt-font-display);
  font-size: 20pt;
  font-weight: 700;
  color: #991b1b;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.vsew-rpt-h2 {
  margin: var(--vsew-rpt-outer-lg) 0 var(--vsew-rpt-inner-md);
  font-family: var(--vsew-rpt-font-display);
  font-size: 12pt;
  font-weight: 700;
  color: #111827;
  line-height: 1.25;
}

.vsew-rpt-h3 {
  margin: var(--vsew-rpt-outer-md) 0 var(--vsew-rpt-inner-sm);
  font-family: var(--vsew-rpt-font);
  font-size: var(--vsew-rpt-size);
  font-weight: 700;
  color: #374151;
  line-height: 1.3;
}

.vsew-rpt-lead {
  margin: 0 0 var(--vsew-rpt-inner-lg);
  font-size: 11pt;
  line-height: 1.35;
  color: #4b5563;
}

.vsew-rpt-p {
  margin: 0 0 var(--vsew-rpt-inner-md);
  text-align: left;
  hyphens: auto;
}

.vsew-rpt-p--empty {
  color: #9ca3af;
  font-style: italic;
}

.vsew-rpt-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 14px;
  margin: 0 0 10px;
  padding: 10px 0;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

.vsew-rpt-meta dt {
  margin: 0;
  font-size: 8pt;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
}

.vsew-rpt-meta dd {
  margin: 0 0 4px;
  font-size: 10pt;
  font-weight: 600;
}

.vsew-rpt-kpi-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin: 0 0 10px;
}

.vsew-rpt-kpi span {
  display: block;
  font-size: 8pt;
  text-transform: uppercase;
  color: #6b7280;
}

.vsew-rpt-kpi strong {
  font-size: 14pt;
  color: #111827;
}

.vsew-rpt-anlagen {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.vsew-rpt-anlage {
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 9pt;
  display: grid;
  gap: 2px;
}

.vsew-rpt-anlage-n {
  font-size: 7pt;
  text-transform: uppercase;
  color: #6b7280;
}

.vsew-rpt-anlage em {
  font-style: normal;
  font-size: 8pt;
  color: #047857;
}

.vsew-rpt-anlage--pending em {
  color: #b45309;
}

.vsew-rpt-slot {
  margin: 0;
  break-inside: avoid;
}

.vsew-rpt-mod--slot {
  display: block;
}

/* Photo blocks must stay flex column so description sits on the block bottom */
.vsew-rpt-mod--slot.vsew-rpt-mod--photo {
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin: 0;
  overflow: hidden;
}
.vsew-rpt-grid--blocks .vsew-rpt-row[data-rpt-block]:has(.vsew-rpt-mod--photo) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.vsew-rpt-grid--blocks .vsew-rpt-row[data-rpt-block]:has(.vsew-rpt-mod--photo) > .vsew-rpt-main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
  box-sizing: border-box;
}
.vsew-rpt-grid--blocks .vsew-rpt-row[data-rpt-block] .vsew-rpt-main:has(.vsew-rpt-mod--photo) {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  height: 100%;
  box-sizing: border-box;
}
.vsew-rpt-grid--blocks .vsew-rpt-row[data-rpt-block] .vsew-rpt-main:has(.vsew-rpt-mod--photo) > .vsew-rpt-mod--photo {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  align-self: stretch;
  width: 100%;
  height: auto;
  margin: 0;
}
.vsew-rpt-mod--photo .vsew-rpt-photo-stack {
  flex: 1 1 auto;
  min-height: 0;
}

.vsew-rpt-slot-frame {
  min-height: 42mm;
  border: 1px solid #e5e7eb;
  background: #fafafa;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--vsew-rpt-inner-xs);
  padding: var(--vsew-rpt-inner-md);
}

.vsew-rpt-slot-frame--tall {
  min-height: 52mm;
}

.vsew-rpt-slot-label {
  font-size: 9pt;
  font-weight: 600;
  color: #475569;
}

.vsew-rpt-slot-status {
  font-size: 8pt;
  color: #64748b;
}

.vsew-rpt-slot-cap {
  margin: var(--vsew-rpt-inner-xs) 0 0;
  font-size: 8pt;
  line-height: 1.35;
  color: #6b7280;
  text-align: left;
}

.vsew-rpt-table-wrap {
  overflow-x: auto;
  margin: 8px 0;
}

.vsew-rpt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 8.5pt;
}

.vsew-rpt-table th,
.vsew-rpt-table td {
  border: 1px solid #e5e7eb;
  padding: 4px 6px;
  text-align: left;
}

.vsew-rpt-table th {
  background: #f9fafb;
  font-weight: 600;
}

/* Preview mode — matches final PDF (toggle via «Rahmen aus») */
.vsew-report-canvas-workspace.vsew-rpt-preview-mode .vsew-rpt-page {
  box-shadow: none;
}

.vsew-report-canvas-workspace.vsew-rpt-preview-mode .vsew-rpt-in,
.vsew-report-canvas-workspace.vsew-rpt-preview-mode .vsew-rpt-ta,
.vsew-report-canvas-workspace.vsew-rpt-preview-mode .vsew-rpt-mod select {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  padding-left: 0;
  padding-right: 0;
}

.vsew-report-canvas-workspace.vsew-rpt-preview-mode .vsew-rpt-in:focus,
.vsew-report-canvas-workspace.vsew-rpt-preview-mode .vsew-rpt-ta:focus,
.vsew-report-canvas-workspace.vsew-rpt-preview-mode .vsew-rpt-mod select:focus {
  outline: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.vsew-report-canvas-workspace.vsew-rpt-preview-mode .vsew-rpt-mod--prog-row label,
.vsew-report-canvas-workspace.vsew-rpt-preview-mode .vsew-rpt-inline-field {
  color: transparent;
  font-size: 0;
  gap: 0;
}

.vsew-report-canvas-workspace.vsew-rpt-preview-mode .vsew-rpt-inline-field--labeled {
  color: #6b7280;
  font-size: 8pt;
  gap: var(--vsew-rpt-inner-xs);
}

.vsew-report-canvas-workspace.vsew-rpt-preview-mode .vsew-rpt-mod--meta-list .vsew-rpt-field-label {
  color: #6b7280;
  font-size: 8pt;
}

.vsew-report-canvas-workspace.vsew-rpt-preview-mode .vsew-rpt-meta-row .vsew-rpt-in,
.vsew-report-canvas-workspace.vsew-rpt-preview-mode .vsew-rpt-meta-row select,
.vsew-report-canvas-workspace.vsew-rpt-preview-mode .vsew-rpt-meta-row .vsew-rpt-val {
  color: #111827;
  font-size: var(--vsew-rpt-size);
}

.vsew-report-canvas-workspace.vsew-rpt-preview-mode .vsew-rpt-mod--prog-row label .vsew-rpt-in,
.vsew-report-canvas-workspace.vsew-rpt-preview-mode .vsew-rpt-inline-field .vsew-rpt-in {
  color: #111827;
  font-size: var(--vsew-rpt-size);
}

.vsew-report-canvas-workspace.vsew-rpt-preview-mode .vsew-rpt-inline-field--labeled .vsew-rpt-in {
  color: #111827;
  font-size: var(--vsew-rpt-size);
}

.vsew-report-canvas-workspace.vsew-rpt-preview-mode .vsew-rpt-block-label,
.vsew-report-canvas-workspace.vsew-rpt-preview-mode .vsew-rpt-cover-party-label {
  color: #6b7280;
}

.vsew-report-canvas-workspace.vsew-rpt-preview-mode .vsew-rpt-slot-frame {
  border-color: transparent;
  background: transparent;
}

.vsew-report-canvas-workspace.vsew-rpt-preview-mode .vsew-rpt-slot-hint {
  display: none;
}

.vsew-report-canvas-workspace.vsew-rpt-preview-mode .vsew-rpt-slot-cap {
  color: #9ca3af;
}

.vsew-report-canvas-workspace.vsew-rpt-preview-mode .vsew-rpt-toolbar,
.vsew-report-canvas-workspace.vsew-rpt-preview-mode .vsew-rpt-upload-tools,
.vsew-report-canvas-workspace.vsew-rpt-preview-mode .vsew-rpt-map-link {
  display: none !important;
}

.vsew-report-canvas-workspace.vsew-rpt-preview-mode .vsew-report-pick {
  opacity: 0.35;
}

.vsew-report-print-view {
  background: #fff;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.vsew-report-print-view .vsew-rpt-page {
  width: 210mm !important;
  min-height: 0 !important;
  height: auto !important;
  page-break-after: always;
  break-after: page;
  box-shadow: none !important;
  overflow: visible;
}

.vsew-report-print-view .vsew-rpt-page:has(.vsew-rpt-grid--blocks) {
  height: 297mm !important;
  min-height: 297mm !important;
  max-height: 297mm !important;
  overflow: hidden !important;
}

.vsew-report-print-view .vsew-rpt-page--anlage,
.vsew-report-print-view .vsew-rpt-page--anlage-pb {
  height: 297mm !important;
  min-height: 297mm !important;
  max-height: 297mm !important;
  overflow: hidden !important;
}

.vsew-report-print-view .vsew-rpt-pdf-img,
.vsew-report-print-view .vsew-rpt-pdf-img--anlage-embed {
  display: block;
  max-width: 100%;
  height: auto;
}

.vsew-report-print-view .vsew-rpt-page:last-child {
  page-break-after: auto;
  break-after: auto;
}

.vsew-report-print-view .vsew-rpt-page {
  padding: var(--vsew-rpt-margin-top) var(--vsew-rpt-margin-outer) var(--vsew-rpt-margin-bottom) var(--vsew-rpt-margin-bind) !important;
}

/* PDF: ширина листа < 1100px — не применять мобильные правила отчёта */
.vsew-report-print-view .vsew-rpt-cover-body {
  min-height: calc(297mm - 18mm - var(--vsew-rpt-margin-bottom) - 10mm) !important;
}

.vsew-report-print-view .vsew-rpt-cover-parties {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: var(--vsew-rpt-outer-sm) var(--vsew-rpt-outer-lg) !important;
}

.vsew-report-print-view .vsew-rpt-cover-party {
  min-width: 0;
}

.vsew-report-print-view .vsew-rpt-page-foot {
  flex-direction: row !important;
  align-items: baseline !important;
  gap: 12px !important;
}

.vsew-report-print-view .vsew-rpt-cover-meta .vsew-rpt-cover-object,
.vsew-report-print-view .vsew-rpt-cover-meta .vsew-rpt-cover-project {
  margin: 0 !important;
  line-height: var(--vsew-rpt-lh) !important;
}

.vsew-report-print-view .vsew-rpt-prose {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-family: var(--vsew-rpt-font);
  font-size: var(--vsew-rpt-size);
  line-height: var(--vsew-rpt-lh);
  color: #111827;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}

.vsew-report-print-view .vsew-rpt-mod--text-sm .vsew-rpt-prose { min-height: 0; }
.vsew-report-print-view .vsew-rpt-mod--text-md .vsew-rpt-prose { min-height: 0; }
.vsew-report-print-view .vsew-rpt-mod--text-lg .vsew-rpt-prose { min-height: 0; }

.vsew-report-print-view .vsew-rpt-val {
  display: inline;
  font-family: var(--vsew-rpt-font);
  font-size: var(--vsew-rpt-size);
  line-height: var(--vsew-rpt-lh);
  color: #111827;
}

.vsew-report-print-view .vsew-rpt-val--cover,
.vsew-report-print-view .vsew-rpt-val--cover-party {
  display: block;
}

.vsew-report-print-view .vsew-rpt-mod--prog-row label,
.vsew-report-print-view .vsew-rpt-inline-field {
  color: transparent;
  font-size: 0;
  gap: 0;
}

.vsew-report-print-view .vsew-rpt-inline-field--labeled {
  color: #6b7280 !important;
  font-size: 8pt !important;
  gap: var(--vsew-rpt-inner-xs);
}

.vsew-report-print-view .vsew-rpt-mod--meta-list .vsew-rpt-field-label {
  color: #6b7280 !important;
  font-size: 8pt !important;
  font-weight: 600;
}

.vsew-report-print-view .vsew-rpt-meta-row .vsew-rpt-val {
  display: inline;
  color: #111827;
  font-size: var(--vsew-rpt-size);
}

.vsew-report-print-view .vsew-rpt-mod--prog-row label .vsew-rpt-val,
.vsew-report-print-view .vsew-rpt-inline-field .vsew-rpt-val {
  color: #111827;
  font-size: var(--vsew-rpt-size);
}

.vsew-report-print-view .vsew-rpt-slot-frame {
  border: none !important;
  background: transparent !important;
}

.vsew-report-print-view .vsew-rpt-slot-hint {
  display: none !important;
}

.vsew-report-print-view .vsew-rpt-mod--print .vsew-rpt-slot-frame {
  min-height: inherit;
}

.vsew-report-print-view .vsew-rpt-table--pick th:first-child,
.vsew-report-print-view .vsew-rpt-table--pick td:first-child,
.vsew-report-print-view .vsew-rpt-table--pick th:last-child,
.vsew-report-print-view .vsew-rpt-table--pick td:last-child {
  display: none;
}

.vsew-report-print-view .vsew-rpt-canvas {
  max-width: none;
  margin: 0 auto;
  padding: 0;
}

.vsew-report-print-view .vsew-rpt-doc {
  gap: 0;
}

.vsew-report-print-view .vsew-rpt-grid--blocks {
  position: relative !important;
  display: block !important;
  overflow: visible !important;
  flex: 0 0 auto !important;
}

.vsew-report-print-view .vsew-rpt-grid--blocks .vsew-rpt-row[data-rpt-block],
.vsew-report-print-view .vsew-rpt-grid--blocks .vsew-rpt-field-slot--placed {
  position: absolute !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

.vsew-report-print-view .vsew-rpt-grid--blocks .vsew-rpt-row[data-rpt-block] .vsew-rpt-main {
  height: 100%;
  overflow: hidden;
  box-sizing: border-box;
  padding: var(--rpt-bpad, 0);
  text-align: var(--rpt-balign, left);
}

.vsew-report-print-view .vsew-rpt-page {
  box-shadow: none;
  margin: 0 auto;
}

.vsew-rpt-muted {
  color: #9ca3af;
  font-style: italic;
}

@media (max-width: 1100px) {
  .vsew-rpt-page {
    width: 100%;
    min-height: auto;
    padding: 16px 14px;
  }

  .vsew-rpt-page-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .vsew-rpt-cover-body {
    min-height: auto;
  }

  .vsew-rpt-cover-parties {
    grid-template-columns: 1fr;
  }

  .vsew-report-print-view .vsew-rpt-page {
    width: 210mm !important;
    min-height: 0 !important;
    height: auto !important;
    padding: var(--vsew-rpt-margin-top) var(--vsew-rpt-margin-outer) var(--vsew-rpt-margin-bottom) var(--vsew-rpt-margin-bind) !important;
  }

  .vsew-report-print-view .vsew-rpt-page:has(.vsew-rpt-grid--blocks),
  .vsew-report-print-view .vsew-rpt-page--anlage,
  .vsew-report-print-view .vsew-rpt-page--anlage-pb {
    height: 297mm !important;
    min-height: 297mm !important;
    max-height: 297mm !important;
    overflow: hidden !important;
  }

  .vsew-report-print-view .vsew-rpt-page-foot {
    flex-direction: row !important;
    align-items: baseline !important;
    gap: 12px !important;
  }

  .vsew-report-print-view .vsew-rpt-cover-body {
    min-height: calc(297mm - 18mm - var(--vsew-rpt-margin-bottom) - 10mm) !important;
  }

  .vsew-report-print-view .vsew-rpt-cover-parties {
    grid-template-columns: 1fr 1fr !important;
  }
}

.vsew-prognosis-workspace {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vsew-prognosis-bk-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 2px;
  border-bottom: 1px solid #e5e7eb;
}

.vsew-prognosis-bk-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.vsew-prognosis-bk-field--inline {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.vsew-prognosis-bk-field span {
  color: #374151;
  font-weight: 600;
}

.vsew-prognosis-bk-field--inline span {
  flex: 0 1 auto;
  min-width: 0;
}

.vsew-prognosis-bk-field select {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12px;
  background: #fff;
}

.vsew-prognosis-bk-field--inline select {
  flex: 0 0 auto;
  width: auto;
  max-width: 58%;
  min-width: 128px;
  padding: 3px 6px;
  font-size: 11px;
  border-radius: 6px;
}

.vsew-prognosis-bk-hint {
  margin: 0;
  font-size: 11px;
}

.vsew-prognosis-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.vsew-prognosis-btn {
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

.vsew-prognosis-btn:hover {
  border-color: #991b1b;
}

.vsew-prognosis-btn--danger {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fecaca;
}

.vsew-prognosis-btn--danger:hover {
  border-color: #991b1b;
}

.vsew-source-vertex-handle {
  background: transparent;
  border: none;
}

.vsew-source-vertex-handle span {
  display: block;
  width: 14px;
  height: 14px;
  margin: 1px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #1d4ed8;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.85);
  cursor: grab;
}

.vsew-source-vertex-handle span:active {
  cursor: grabbing;
}

.vsew-source-mid-handle {
  background: transparent;
  border: none;
}

.vsew-source-mid-handle span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #dbeafe;
  border: 1px solid #1d4ed8;
  color: #1d4ed8;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9);
}

.vsew-source-mid-handle span:hover {
  background: #bfdbfe;
}

.vsew-prognosis-export {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vsew-prognosis-presets {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.vsew-prognosis-preset-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.vsew-prognosis-preset-label {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
  flex: 0 0 auto;
}

.vsew-prognosis-preset-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.vsew-prognosis-preset-field select,
.vsew-prognosis-preset-select {
  padding: 4px 6px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 11px;
  background: #fff;
}

.vsew-prognosis-preset-select {
  flex: 1 1 100px;
  min-width: 0;
}

.vsew-prognosis-preset-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  flex: 0 0 auto;
}

.vsew-prognosis-preset-actions .vsew-prognosis-btn {
  padding: 4px 8px;
  font-size: 11px;
  white-space: nowrap;
}

.vsew-prognosis-preset-hint {
  margin: 0;
  font-size: 11px;
}

.vsew-source-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0;
}

.vsew-source-item {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.vsew-source-item .vsew-building-row {
  padding: 2px 4px;
  gap: 6px;
}

.vsew-source-row > .vsew-building-toggle {
  flex: 0 0 auto;
  margin-right: 0;
}

.vsew-source-intensity {
  flex: 0.56 1 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  min-width: 0;
  margin-top: 4px;
  margin-left: 0;
  margin-right: 0;
  padding: 0;
  border: none;
}

.vsew-source-intensity input[type="range"] {
  width: 88%;
  margin: 0;
  height: 12px;
  padding: 0;
  border: none;
  border-radius: 0;
  outline: none;
  box-shadow: none;
  flex: none;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
  --range-fill: 50%;
}

.vsew-source-intensity input[type="range"]:focus {
  outline: none;
  box-shadow: none;
}

.vsew-source-intensity input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border: none;
  border-radius: 2px;
  background: linear-gradient(
    to right,
    #1d4ed8 0%,
    #1d4ed8 var(--range-fill, 0%),
    #cbd5e1 var(--range-fill, 0%),
    #cbd5e1 100%
  );
}

.vsew-source-intensity input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -4px;
  border: none;
  border-radius: 50%;
  background: #1d4ed8;
  box-shadow: none;
}

.vsew-source-intensity input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: #cbd5e1;
  border: none;
}

.vsew-source-intensity input[type="range"]::-moz-range-progress {
  height: 4px;
  border-radius: 2px;
  background: #1d4ed8;
  border: none;
}

.vsew-source-intensity input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #1d4ed8;
  border: none;
  box-shadow: none;
  box-sizing: border-box;
}

.vsew-source-intensity output {
  font-size: 9px;
  line-height: 1;
  color: #64748b;
  white-space: nowrap;
  text-align: center;
  width: 88%;
  border: none;
  padding: 0;
}

.vsew-source-row > label:not(.vsew-building-toggle) {
  flex: 0.56 1 50px;
  min-width: 40px;
  margin-left: 0;
}

.vsew-source-params {
  padding: 6px 10px 10px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

.vsew-building-action.is-active {
  background: #dbeafe;
  color: #1d4ed8;
}

.vsew-source-row--expanded {
  background: #f8fafc;
}

.vsew-source-row--active {
  outline: 1px solid #fca5a5;
  border-radius: 6px;
  padding: 2px;
}

.vsew-source-row--line {
  border-left: 3px solid #7f1d1d;
}

.vsew-building-label.vsew-source-label--line span {
  background: rgba(127, 29, 29, 0.92);
  color: #fff;
  border-color: #7f1d1d;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.vsew-source-row--edit,
.vsew-building-row--edit {
  background: #fef3c7;
  border-radius: 6px;
  padding: 2px;
}

.vsew-building-action {
  border: none;
  background: #e2e8f0;
  color: #1e293b;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}

.vsew-building-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vsew-building-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vsew-building-row--off label:not(.vsew-building-toggle) {
  opacity: 0.55;
}

.vsew-building-toggle {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  cursor: pointer;
}

.vsew-building-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.vsew-building-toggle-ui {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 1.5px solid #64748b;
  border-radius: 4px;
  background: #fff;
  box-sizing: border-box;
}

.vsew-building-toggle input:checked + .vsew-building-toggle-ui {
  background: #1d4ed8;
  border-color: #1d4ed8;
  box-shadow: inset 0 0 0 2px #fff;
}

.vsew-building-row label {
  flex: 1;
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
}

.vsew-building-row input {
  flex: 1;
  min-width: 0;
  padding: 4px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}

.vsew-building-remove {
  border: none;
  background: #fee2e2;
  color: #991b1b;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
}

.vsew-prognosis-table-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.vsew-prognosis-table-title {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}

.vsew-prognosis-table-section .vsew-project-hint {
  margin: 0 0 8px;
}

.vsew-prognosis-table-wrap {
  overflow-x: auto;
  margin-bottom: 4px;
}

.vsew-prognosis-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.vsew-prognosis-table th,
.vsew-prognosis-table td {
  border: 1px solid #111827;
  padding: 5px 8px;
  text-align: center;
}

.vsew-prognosis-table th {
  background: #f8fafc;
  font-weight: 700;
}

.vsew-prognosis-table-haus {
  text-align: left;
  font-weight: 600;
}

.vsew-prognosis-table tbody tr:nth-child(even) {
  background: #fafafa;
}

.vsew-building-label span,
.vsew-dist-label span {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #111827;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

.vsew-dist-label span {
  font-weight: 500;
  font-size: 10px;
  border-color: #6b7280;
}

.vsew-source-machine-panel {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  background: #f8fafc;
}

.vsew-source-machine-title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
}

.vsew-source-machine-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.vsew-source-machine-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
}

.vsew-source-machine-field input,
.vsew-source-machine-field select {
  padding: 5px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 12px;
}

.vsew-prognosis-legend {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 6px 8px;
  background: #fff;
}

.vsew-prognosis-legend[hidden] {
  display: none !important;
}

.vsew-prognosis-legend-title {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 600;
}

.vsew-prognosis-legend-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 10px;
  line-height: 1.25;
}

.vsew-prognosis-legend-list li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.vsew-prognosis-legend-swatch {
  width: 11px;
  height: 11px;
  border-radius: 2px;
  border: none;
  flex-shrink: 0;
  margin-top: 1px;
}

.vsew-prognosis-legend-text {
  flex: 1;
  min-width: 0;
}

.vsew-prognosis-legend-line {
  width: 18px;
  height: 0;
  border-top: 2px dashed #374151;
  flex-shrink: 0;
}

.vsew-prognosis-legend-note {
  margin: 5px 0 0;
  font-size: 9px;
  line-height: 1.3;
  color: #6b7280;
}
