.live-panel {
  background: var(--live-panel-bg);
  border-color: var(--border-muted);
}
.live-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.live-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}
.live-sub {
  color: var(--live-success);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.live-sub .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live-success);
  box-shadow: var(--glow-success);
}
.live-pill {
  background: var(--surface-input);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 12px;
}
.live-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.live-grid.hidden { display: none; }
.live-card {
  background: var(--live-card);
  border-radius: 16px;
  border: 1px solid var(--border-muted);
  padding: 16px;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}
.live-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--live-accent);
  opacity: 0.8;
}
.live-card.off::before { background: var(--live-line); }
.live-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.live-name {
  font-size: 16px;
  font-weight: 700;
}
.live-meta {
  color: var(--muted);
  font-size: 12px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.live-stat {
  background: var(--surface-muted);
  border: 1px solid var(--border-muted);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  font-size: 13px;
}
.live-stat .value {
  font-weight: 700;
  color: var(--live-success);
}
.live-stat .value.warn { color: var(--live-warning); }
.live-foot {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.live-link {
  color: var(--text);
  text-decoration: none;
}
.live-card { cursor: pointer; }
.live-card.hidden { display: none; }
.live-charts {
  margin-top: 18px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 18px 18px 22px;
  box-shadow: var(--shadow-strong);
}
.live-charts.hidden { display: none; }
.history-controls input {
  width: 240px;
  min-width: 200px;
}
.history-controls #report-email {
  width: 220px;
}
.history-report-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.history-report-controls.hidden {
  display: none;
}
#send-report.is-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.85;
}
#send-report.is-loading::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border-radius: 50%;
  border: 2px solid var(--text-on-accent);
  border-top-color: transparent;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.sensor-strip {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.sensor-info {
  display: grid;
  gap: 4px;
}
.positioning-block .sensor-info {
  display: none;
}
.sensor-strip.hidden { display: none; }
.sensor-title {
  font-size: 13px;
  color: var(--muted);
}
.sensor-title strong {
  color: var(--text);
  font-weight: 700;
}
.positioning-block {
  display: grid;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: var(--surface-overlay);
}
.positioning-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.positioning-side {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.positioning-chart {
  min-width: 200px;
}
.history-positioning-side {
  flex-wrap: nowrap;
  align-items: flex-start;
}
.positioning-chart-title {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.positioning-chart .chart-canvas {
  height: 90px;
  animation: chartFade 0.6s ease;
}
@keyframes chartFade {
  from {
    opacity: 0;
    transform: translateY(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.sensor-armband {
  position: relative;
  width: min(240px, 100%);
  margin: 0;
}
.sensor-armband img {
  width: 100%;
  display: block;
  opacity: 0.95;
}
.sensor-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.sensor-node {
  position: absolute;
  width: 7.5px;
  height: 7.5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 6px;
  font-weight: 700;
  color: color-mix(in srgb, var(--text-primary) 80%, transparent);
  background: var(--surface-muted);
  border: 1px solid currentColor;
  box-shadow: 0 0 3px currentColor, 0 0 6px currentColor, inset 0 0 2px currentColor;
  transform: translate(-50%, -50%);
}
.sensor-node::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.18;
  filter: blur(6px);
  z-index: -1;
}
.sensor-node.max {
  box-shadow: 0 0 4px currentColor, 0 0 9px currentColor, 0 0 14px currentColor;
  transform: translate(-50%, -50%) scale(1.1);
}
.physio-gauge {
  display: grid;
  gap: 6px;
  justify-items: center;
  min-width: 150px;
  --gauge-accent: var(--status-cyan);
}
.physio-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.physio-trend-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
  flex-wrap: wrap;
  flex: 1;
}
.physio-trend {
  display: grid;
  gap: 8px;
  min-width: 220px;
  flex: 1;
}
.physio-trend-title {
  font-size: 12px;
  color: var(--muted);
}
.physio-trend .chart-canvas {
  height: 170px;
}
.physio-summary {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 10px 12px 10px 16px;
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  background: var(--surface-overlay);
  min-width: 220px;
  max-width: 320px;
  --summary-accent: var(--text-muted);
}
.physio-summary::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--summary-accent) 35%, transparent),
    transparent
  );
}
.physio-summary[data-band="OK"] { --summary-accent: var(--status-green); }
.physio-summary[data-band="MODERATE"] { --summary-accent: var(--status-yellow); }
.physio-summary[data-band="POOR"] { --summary-accent: var(--status-orange); }
.physio-summary[data-band="CRITICAL"] { --summary-accent: var(--status-red); }
.physio-summary[data-band="INSUFFICIENT_DATA"] { --summary-accent: var(--text-muted); }
.physio-summary[data-band="NONE"] { --summary-accent: var(--text-muted); }
.physio-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.physio-summary-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}
.physio-summary-toggle {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid var(--border-muted);
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.physio-summary-status {
  font-size: 12px;
  font-weight: 700;
  color: var(--summary-accent);
}
.physio-summary-message {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
}
.physio-summary-meta {
  font-size: 11px;
  color: var(--text-muted);
}
.stability-mini {
  display: grid;
  gap: 6px;
  align-items: start;
  min-width: 170px;
}
.stability-mini.hidden { display: none; }
.stability-mini[data-band="OK"] { --stability-accent: var(--stability-ok); }
.stability-mini[data-band="WARNING"] { --stability-accent: var(--stability-warning); }
.stability-mini[data-band="CRITICAL"] { --stability-accent: var(--stability-critical); }
.stability-mini[data-band="NONE"] { --stability-accent: var(--text-muted); }
.stability-main {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-muted);
  background: var(--surface-muted);
}
.stability-sub {
  font-size: 11px;
  color: var(--text-muted);
}
.stability-score {
  font-size: 12px;
  color: var(--text-muted);
}
.stability-score span {
  color: var(--stability-accent);
  font-weight: 600;
}
.rotation-summary {
  display: grid;
  gap: 4px;
  min-width: 160px;
  color: var(--text-muted);
  --stability-accent: var(--text-muted);
}
.rotation-summary[data-band="OK"] { --stability-accent: var(--stability-ok); }
.rotation-summary[data-band="WARNING"] { --stability-accent: var(--stability-warning); }
.rotation-summary[data-band="CRITICAL"] { --stability-accent: var(--stability-critical); }
.rotation-summary[data-band="NONE"] { --stability-accent: var(--text-muted); }
.rotation-summary-main {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.rotation-summary-meta {
  font-size: 11px;
  color: var(--text-muted);
}
.global-placement {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  --placement-accent: var(--text-muted);
}
.global-placement-label {
  color: var(--text);
  font-weight: 600;
}
.global-placement-score {
  color: var(--placement-accent);
  font-weight: 600;
}
.global-placement[data-band="OK"] { --placement-accent: var(--stability-ok); }
.global-placement[data-band="WARNING"] { --placement-accent: var(--stability-warning); }
.global-placement[data-band="CRITICAL"] { --placement-accent: var(--stability-critical); }
.global-placement[data-band="INSUFFICIENT_DATA"] { --placement-accent: var(--text-muted); }
.global-placement[data-band="NONE"] { --placement-accent: var(--text-muted); }
.rotation-helper-compact {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 10px 12px 10px 14px;
  border-radius: 16px;
  border: 1px solid var(--rotation-bubble-border);
  background: var(--rotation-bubble-bg);
  box-shadow: var(--rotation-bubble-shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  max-width: 360px;
  min-width: 260px;
}
.rotation-helper-compact::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--rotation-accent, var(--text-muted)) 35%, transparent),
    transparent
  );
}
.rotation-helper-compact[data-state="OK"] { --rotation-accent: var(--stability-ok); }
.rotation-helper-compact[data-state="WARNING"] { --rotation-accent: var(--stability-warning); }
.rotation-helper-compact[data-state="CRITICAL"] { --rotation-accent: var(--stability-critical); }
.rotation-helper-compact[data-state="NONE"] { --rotation-accent: var(--text-muted); }
.rotation-helper-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-left: 8px;
}
.rotation-helper-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--rotation-bubble-title);
}
.rotation-helper-toggle {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid var(--border-muted);
  background: var(--surface-muted);
  color: var(--rotation-bubble-meta);
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.rotation-helper-state {
  font-size: 12px;
  font-weight: 700;
  color: var(--rotation-bubble-title);
  padding-left: 8px;
}
.rotation-helper-body {
  display: grid;
  gap: 6px;
  padding-left: 8px;
  color: var(--rotation-bubble-body);
  font-size: 11.5px;
  line-height: 1.35;
}
.rotation-helper-action {
  font-weight: 700;
  color: var(--rotation-bubble-title);
  font-size: 12px;
}
.rotation-helper-hint {
  color: var(--rotation-bubble-meta);
  font-weight: 600;
  font-size: 11px;
}
.rotation-helper-meta {
  display: grid;
  gap: 4px;
  border-top: 1px solid color-mix(in srgb, var(--border-muted) 70%, transparent);
  padding-top: 6px;
  margin-top: 2px;
  font-size: 11px;
  color: var(--rotation-bubble-meta);
}
.rotation-helper-meta span {
  font-variant-numeric: tabular-nums;
}
.rotation-helper-details {
  padding-left: 8px;
  font-size: 11px;
  color: var(--rotation-bubble-body);
}
.rotation-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 40;
}
.rotation-modal.open { display: flex; }
.rotation-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
}
[data-theme="light"] .rotation-modal-backdrop {
  background: rgba(10,18,28,0.3);
}
.rotation-modal-panel {
  position: relative;
  width: min(520px, 92vw);
  max-height: 80vh;
  overflow: auto;
  background: var(--rotation-bubble-bg);
  border: 1px solid var(--rotation-bubble-border);
  border-radius: 18px;
  box-shadow: var(--rotation-bubble-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 18px;
}
.rotation-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.rotation-modal-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--rotation-bubble-title);
}
.rotation-modal-subtitle {
  font-size: 12px;
  color: var(--rotation-bubble-body);
  margin-top: 4px;
}
.rotation-modal-close {
  border: 1px solid var(--border-muted);
  background: var(--surface-muted);
  color: var(--rotation-bubble-meta);
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.rotation-modal-section {
  display: grid;
  gap: 6px;
  padding: 10px 0;
  border-top: 1px solid color-mix(in srgb, var(--border-muted) 70%, transparent);
}
.rotation-modal-section:first-of-type { border-top: none; }
.rotation-modal-section h4 {
  margin: 0;
  font-size: 12.5px;
  color: var(--rotation-bubble-title);
}
.rotation-modal-section p {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--rotation-bubble-body);
}
.rotation-modal-footer {
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--rotation-bubble-meta);
  border-top: 1px solid color-mix(in srgb, var(--border-muted) 70%, transparent);
  padding-top: 8px;
}
@media (max-width: 640px) {
  .rotation-modal-panel {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
  }
}
.physio-explain {
  max-width: 180px;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.physio-explain.fade {
  opacity: 0.6;
  transform: translateY(2px);
}
.physio-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text);
  font-size: 13px;
}
.physio-accent {
  width: 3px;
  height: 24px;
  border-radius: 2px;
  background: var(--gauge-accent);
  opacity: 0.9;
}
.gauge-card {
  position: relative;
  width: 220px;
  height: 160px;
  border-radius: 18px;
  padding: 12px 12px 10px;
  background: linear-gradient(
    160deg,
    color-mix(in srgb, var(--surface-elevated) 92%, transparent),
    color-mix(in srgb, var(--surface-elevated-2) 90%, transparent)
  );
  border: 1px solid color-mix(in srgb, var(--status-cyan) 25%, transparent);
  box-shadow: var(--shadow-soft), inset 0 1px 0 var(--surface-muted);
  display: grid;
  gap: 8px;
  justify-items: center;
}
.gauge-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 16px;
  background: radial-gradient(circle at 50% 65%, color-mix(in srgb, var(--gauge-accent) 20%, transparent), transparent 65%);
  filter: blur(10px);
  opacity: 0.5;
  z-index: 0;
}
.gauge-arc-wrap {
  --gauge-size: 180px;
  --gauge-thickness: 10px;
  --hub-size: 12px;
  position: relative;
  width: var(--gauge-size);
  height: calc(var(--gauge-size) / 2);
  z-index: 1;
}
.gauge-arc {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.arc-layer {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--gauge-size);
  height: var(--gauge-size);
  border-radius: 50%;
  mask: radial-gradient(
    farthest-side,
    transparent calc(100% - var(--gauge-thickness)),
    #000 calc(100% - (var(--gauge-thickness) - 1px))
  );
}
.gauge-track {
  background: conic-gradient(from 270deg, color-mix(in srgb, var(--chart-grid) 70%, transparent) 0deg 180deg, transparent 180deg 360deg);
}
.gauge-gradient {
  background: conic-gradient(
    from 270deg,
    var(--status-red) 0deg,
    var(--status-orange) 36deg,
    var(--status-yellow) 72deg,
    var(--status-green) 108deg,
    var(--status-cyan) 144deg,
    var(--status-blue) 180deg,
    transparent 180deg 360deg
  );
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--text-primary) 30%, transparent));
}
.gauge-ticks {
  background: repeating-conic-gradient(
    from 270deg,
    color-mix(in srgb, var(--chart-label) 60%, transparent) 0deg 1deg,
    transparent 1deg 18deg
  );
  opacity: 0.7;
}
.gauge-ticks.major {
  background: repeating-conic-gradient(
    from 270deg,
    color-mix(in srgb, var(--chart-label) 90%, transparent) 0deg 1.6deg,
    transparent 1.6deg 36deg
  );
  opacity: 0.9;
}
.gauge-needle {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 2px;
  height: calc(var(--gauge-size) / 2 * 0.85);
  background: var(--text-primary);
  transform-origin: bottom center;
  transition: transform 0.45s ease;
  box-shadow: 0 0 8px color-mix(in srgb, var(--text-primary) 70%, transparent), 0 0 10px var(--gauge-accent);
}
.gauge-hub {
  position: absolute;
  left: 50%;
  bottom: calc(var(--hub-size) * -0.5);
  width: var(--hub-size);
  height: var(--hub-size);
  border-radius: 50%;
  background: var(--surface-hub);
  border: 1px solid color-mix(in srgb, var(--gauge-accent) 70%, transparent);
  transform: translateX(-50%);
  box-shadow: 0 0 10px var(--gauge-accent);
}
.gauge-readout {
  text-align: center;
  z-index: 1;
}
.gauge-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}
.gauge-label {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.gauge-badge {
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--gauge-accent) 70%, transparent);
  color: var(--gauge-accent);
  background: var(--surface-badge);
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 90px;
}
.gauge-badge.hidden { display: none; }
.antipyretic-panel {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(260px, 1.1fr) minmax(220px, 0.9fr);
  background: var(--surface-elevated-2);
  border: 1px solid var(--border-muted);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 12px 0 16px;
}
.antipyretic-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.antipyretic-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.antipyretic-sub {
  font-size: 12px;
  color: var(--muted);
}
.antipyretic-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
}
.antipyretic-inputs button {
  padding: 10px 14px;
}
.antipyretic-events {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.antipyretic-event {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-muted);
  background: var(--surface-chip);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}
.antipyretic-event.active {
  border-color: color-mix(in srgb, var(--accent-secondary) 60%, transparent);
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent-secondary) 35%, transparent);
}
.antipyretic-event button {
  background: none;
  color: var(--muted);
  border: none;
  padding: 0 2px;
  cursor: pointer;
}
.antipyretic-result {
  display: grid;
  gap: 8px;
  align-content: start;
}
.antipyretic-score-card {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.antipyretic-score-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.antipyretic-score-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.antipyretic-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-muted);
  background: var(--surface-muted);
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.antipyretic-message {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}
.antipyretic-chart {
  width: 100%;
  height: 110px;
  display: block;
}
@media (max-width: 900px) {
  .antipyretic-panel {
    grid-template-columns: 1fr;
  }
}

.report-mode header,
.report-mode .tabs,
.report-mode .home-panel,
.report-mode .overview-panel,
.report-mode .live-header,
.report-mode .charts-header,
.report-mode .charts-controls,
.report-mode .history-controls,
.report-mode #history-charts-close {
  display: none !important;
}

.report-header,
.report-meta,
.report-summary,
.report-top-row,
.report-algorithms,
.report-disclaimer {
  display: none;
}

.report-mode .report-header,
.report-mode .report-meta,
.report-mode .report-summary,
.report-mode .report-top-row,
.report-mode .report-algorithms,
.report-mode .report-disclaimer {
  display: block;
}

.report-mode .history-panel {
  padding-top: 0;
}

.report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 12px;
  border-radius: 14px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
}

.report-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.report-logo {
  width: 64px;
  height: auto;
}

.report-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.report-subtitle,
.report-meta-line {
  font-size: 12px;
  color: var(--muted);
}

.report-meta {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 14px;
  font-size: 12px;
  color: var(--muted);
}

.report-summary {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
}

.report-summary-left {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.report-summary-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px;
  box-shadow: var(--shadow-soft);
}

.report-summary-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.report-summary-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.report-summary-score {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.report-summary-text {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.report-summary-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.report-summary-list {
  margin: 0 0 10px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.report-section-title {
  margin-top: 12px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.report-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.report-top-row {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: stretch;
}

.report-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 12px;
  box-shadow: var(--shadow-soft);
}

.report-card-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.report-placement-card .sensor-strip {
  margin: 0;
}

.report-gauge {
  transform: scale(0.85);
  transform-origin: top left;
}

.report-gauge-summary {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.report-physio-body {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 12px;
  align-items: stretch;
}

.report-physio-chart {
  min-height: 150px;
}

.report-physio-chart .chart-canvas {
  height: 150px;
}

.physio-summary-report {
  margin-top: 0;
}

.report-mode .positioning-chart-physio,
.report-mode .physio-summary-history {
  display: none;
}

.report-mode .chart-controls,
.report-mode .chart-live {
  display: none;
}

.report-mode .charts-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.chart-metrics {
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted);
}

.report-only {
  display: none;
}

.report-mode .report-only {
  display: block;
}

.report-algorithms {
  margin-top: 16px;
  padding: 12px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
}

.report-algorithms-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.report-algorithms-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.report-algorithms-card {
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: var(--surface);
}

.report-algorithms-card-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.report-algorithms-text {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

.report-disclaimer {
  margin-top: 10px;
  font-size: 10px;
  color: var(--muted);
}

.report-mode .live-panel.history-panel {
  background: transparent;
  padding: 0;
}

.report-mode .live-charts {
  margin-top: 0;
}

@media print {
  body.report-mode {
    background: #0b0f17;
  }
  .report-top-row,
  .charts-grid,
  .report-algorithms {
    page-break-inside: avoid;
  }
}
