/**
 * IOTA Life Forms — Kontrollzentrum (Dashboard 3.0)
 * Ruhiges, professionelles Instrument-UI — Farben über CSS-Variablen.
 */

@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Inter:wght@400;500;600;700&display=swap");

:root {
  --bg-primary: #0b0f14;
  --bg-secondary: #111820;
  --bg-elevated: #161d27;
  --bg-card: #151b24;
  --bg-card-hover: #1a2230;
  --bg-subtle: rgba(255, 255, 255, 0.03);
  --border: rgba(148, 163, 184, 0.12);
  --border-strong: rgba(148, 163, 184, 0.22);
  --border-glow: rgba(56, 189, 248, 0.35);

  --accent: #38bdf8;
  --accent-muted: rgba(56, 189, 248, 0.12);
  --cyan: #38bdf8;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --purple: #a78bfa;
  --pink: #f472b6;

  --text: #f1f5f9;
  --text-secondary: #cbd5e1;
  --muted: #94a3b8;

  --font-display: "Inter", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "DM Mono", ui-monospace, monospace;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --sidebar-width: 15.5rem;
  --header-height: 3.25rem;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --transition: 160ms ease;

  --chart-bg: #0b0f14;
  --chart-grid: rgba(148, 163, 184, 0.14);

  /* Lebensraum-Canvas (Lesbarkeit > Chart-Minimalismus) */
  --habitat-bg: #0c1218;
  --habitat-floor: #101a14;
  --habitat-grid: rgba(148, 163, 184, 0.22);
  --habitat-vignette: rgba(0, 0, 0, 0.32);
}

@keyframes biochem-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

@keyframes value-update {
  0% { background: var(--accent-muted); }
  100% { background: transparent; }
}

@keyframes locked-border-flow {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg-primary);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .font-display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.meta {
  color: var(--muted);
  font-size: 0.8125rem;
}

.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;
}

/* ── App shell ── */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  flex: 0 0 var(--sidebar-width);
  width: var(--sidebar-width);
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  z-index: 60;
  transition: transform var(--transition), margin var(--transition);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1rem 0.85rem;
  border-bottom: 1px solid var(--border);
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--purple) 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.sidebar-version {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 0.65rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.nav-group-label {
  padding: 0.35rem 0.55rem 0.25rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.tab-btn {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.tab-btn:hover {
  color: var(--text);
  background: var(--bg-subtle);
}

.tab-btn.active {
  color: var(--accent);
  background: var(--accent-muted);
  border-color: rgba(56, 189, 248, 0.2);
}

.tab-btn.locked {
  cursor: help;
  opacity: 0.75;
}

.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  min-height: var(--header-height);
  padding: 0.55rem 1rem;
  background: rgba(11, 15, 20, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.sidebar-toggle {
  display: none;
}

.header-zone {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.header-zone--creature {
  flex: 1 1 280px;
  min-width: 0;
}

.header-zone--status {
  flex: 0 1 auto;
}

.header-label {
  margin: 0;
  white-space: nowrap;
  font-size: 0.75rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}

.status-chip strong {
  color: var(--text);
  font-weight: 600;
}

.header-admin-details {
  margin-left: auto;
}

.header-admin-summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  user-select: none;
}

.header-admin-details[open] .header-admin-summary {
  color: var(--text);
  border-color: var(--border-strong);
}

.header-admin-details .header-admin-cluster {
  position: absolute;
  right: 1rem;
  top: calc(var(--header-height) + 0.35rem);
  z-index: 55;
  padding: 0.65rem;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.header-admin-details {
  position: relative;
}

.creature-id-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.45rem 1rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.creature-id-bar-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 10px;
}

.creature-id-full {
  flex: 1 1 200px;
  min-width: 0;
  word-break: break-all;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.35;
}

.creature-id-hint {
  flex-basis: 100%;
  font-size: 11px;
  color: var(--muted);
}

button.ilf-btn-tiny {
  padding: 0.25rem 0.5rem;
  font-size: 11px;
}

/* version.json — JS schreibt in mehrere Elemente */
.dashboard-version-inline {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.header-admin-cluster {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  max-width: min(420px, 90vw);
}
.header-admin-cluster label.meta {
  margin: 0;
  white-space: nowrap;
}
input.header-admin-token-input {
  width: min(220px, 50vw);
  min-width: 120px;
  padding: 0.35rem 0.55rem;
  font-size: 12px;
  font-family: var(--font-mono);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
}

.header-select {
  flex: 1 1 180px;
  min-width: 160px;
  max-width: min(360px, 100%);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-sm);
  transition: border-color var(--transition);
}

.header-select:focus {
  outline: none;
  border-color: var(--border-glow);
}

.header-select optgroup {
  color: var(--muted);
  font-weight: 600;
  font-style: normal;
}

.header-select optgroup option {
  color: var(--text);
  font-weight: 400;
}

.live-pill {
  color: var(--green);
  border-color: rgba(52, 211, 153, 0.25);
  background: rgba(52, 211, 153, 0.08);
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: biochem-pulse 2.5s ease-in-out infinite;
}

.live-pill.recording {
  color: var(--red);
  border-color: rgba(248, 113, 113, 0.3);
  background: rgba(248, 113, 113, 0.08);
}

.live-pill.recording .live-dot {
  background: var(--red);
}

.iota-pill-on {
  color: var(--green);
  border-color: rgba(52, 211, 153, 0.25);
  background: rgba(52, 211, 153, 0.06);
}

.iota-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
}

.iota-pill-on .iota-dot {
  background: var(--green);
}

.tick-readout strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

main.shell {
  flex: 1;
  padding: 1.25rem 1.25rem 2rem;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
  animation: panel-in 0.22s ease-out 1;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}

.card-title {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-secondary);
  margin: 0 0 0.75rem;
}

.grid-2 {
  display: grid;
  gap: 1rem;
}

@media (min-width: 1100px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.live-layout {
  display: grid;
  gap: 1rem;
}

@media (min-width: 900px) {
  .live-layout {
    grid-template-columns: minmax(240px, 320px) 1fr;
  }
}

.stress-orb-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.stress-orb {
  position: relative;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  background: radial-gradient(circle at 30% 25%, var(--accent-muted), transparent 55%),
    var(--bg-primary);
}

.stress-num {
  font-family: var(--font-mono);
  font-size: 2.25rem;
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stress-orb.pulse-ring::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--amber) 70%, transparent);
  animation: biochem-pulse 2s ease-in-out infinite;
  pointer-events: none;
}

.stress-label-tag {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.chem-list {
  max-height: 420px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.chem-row {
  display: grid;
  grid-template-columns: 1fr minmax(120px, 1.4fr) 52px;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.45rem;
  font-size: 0.78rem;
}

.chem-name { color: var(--muted); }

.chem-bar {
  height: 10px;
  background: #0a0e14;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.chem-fill {
  height: 100%;
  width: 0%;
  border-radius: 5px;
  transition: width 0.35s ease-out, filter 0.2s;
  box-shadow: 0 0 10px currentColor;
}

.chem-val {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.chem-val.flash {
  animation: value-update 0.35s ease-out 1;
}

.mini-ekg-wrap {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--bg-primary);
}

canvas.chart-canvas {
  display: block;
  width: 100%;
  height: 200px;
}

canvas.analytics-canvas {
  display: block;
  width: 100%;
  height: 260px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.mia-banner {
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.22);
  color: var(--amber);
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius);
  font-size: 0.8125rem;
  margin-bottom: 0.85rem;
  line-height: 1.45;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

button.ilf-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.42rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

button.ilf-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
}

button.ilf-btn.primary,
button.ilf-btn.ilf-btn-primary-soft {
  border-color: rgba(52, 211, 153, 0.35);
  color: var(--green);
  background: rgba(52, 211, 153, 0.08);
}

button.ilf-btn.danger,
button.ilf-btn.ilf-btn-danger-soft {
  border-color: rgba(248, 113, 113, 0.35);
  color: var(--red);
  background: rgba(248, 113, 113, 0.06);
}

button.ilf-btn.ilf-btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-secondary);
}

button.ilf-btn.ilf-btn-icon {
  padding: 0.4rem;
  line-height: 0;
}

button.ilf-btn.ilf-btn--active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-muted);
}

/* Globale Formular-Elemente */
input[type="text"],
input[type="number"],
input[type="password"],
input[type="range"],
select,
textarea {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: var(--text);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.6rem;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--border-glow);
}

code, pre, .playback-state {
  font-family: var(--font-mono);
}

.warnings-live {
  border: 1px solid rgba(255, 51, 102, 0.45);
  background: rgba(255, 51, 102, 0.08);
  border-radius: var(--radius);
  padding: 0.65rem 0.85rem;
  margin-bottom: 1rem;
  display: none;
}

.warnings-live.active { display: block; }

.warnings-live h3 {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  color: var(--red);
}

.log-list {
  max-height: 260px;
  overflow-y: auto;
  font-size: 0.72rem;
}

.log-item {
  border-left: 3px solid var(--border);
  padding: 0.35rem 0.5rem;
  margin-bottom: 0.35rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 0 6px 6px 0;
}

.log-item.injection { border-left-color: var(--green); }
.log-item.alarm { border-left-color: var(--red); }
.log-item.manual { border-left-color: var(--cyan); }
.log-item.spawn { border-left-color: var(--muted); }
.status-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.04em;
  border: 1px solid var(--border);
  color: var(--muted);
}
.status-badge.ok {
  border-color: rgba(0, 255, 136, 0.55);
  color: var(--green);
}
.status-badge.warn {
  border-color: rgba(255, 170, 0, 0.55);
  color: var(--amber);
}
.status-badge.bad {
  border-color: rgba(255, 51, 102, 0.55);
  color: var(--red);
}
.social-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.social-table th,
.social-table td {
  border-bottom: 1px solid var(--border);
  padding: 6px 8px;
  text-align: left;
  vertical-align: middle;
}
.social-table th {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.social-moorebot-health {
  display: grid;
  gap: 0.45rem;
}
.social-moorebot-health-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.social-moorebot-bot {
  font-family: var(--font-body);
  color: var(--text);
}
.social-moorebot-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(100px, 1fr));
  gap: 0.45rem;
}
.social-moorebot-metric {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem 0.5rem;
  background: rgba(0, 0, 0, 0.2);
}
.social-moorebot-metric-label {
  display: block;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.social-moorebot-metric-value {
  display: block;
  margin-top: 0.15rem;
  color: var(--text);
  font-size: 12px;
}
.social-moorebot-detections {
  font-size: 11px;
  color: #94a3b8;
}
.social-moorebot-trend {
  margin-top: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.2);
}
.social-moorebot-trend-kpis {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
}
.social-moorebot-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 10px;
  color: #cbd5e1;
}
.social-moorebot-chip.ok {
  border-color: rgba(0, 255, 136, 0.5);
  color: var(--green);
}
.social-moorebot-chip.warn {
  border-color: rgba(255, 170, 0, 0.5);
  color: var(--amber);
}
.social-moorebot-chip.bad {
  border-color: rgba(255, 51, 102, 0.5);
  color: var(--red);
}
.social-moorebot-spark {
  width: 100%;
  height: 52px;
  display: block;
}
.social-moorebot-smooth-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
  font-size: 11px;
  color: #94a3b8;
}
.social-moorebot-smooth-toggle input {
  accent-color: var(--cyan);
}
.social-moorebot-trend-note {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 10px;
}
.status-badge.mode-explore {
  border-color: rgba(0, 212, 255, 0.5);
  color: var(--cyan);
}
.status-badge.mode-safe {
  border-color: rgba(255, 170, 0, 0.55);
  color: var(--amber);
}
.status-badge.mode-dock {
  border-color: rgba(153, 69, 255, 0.55);
  color: var(--purple);
}
.social-moorebot-body-lead {
  margin: 0 0 0.65rem 0;
  line-height: 1.55;
  font-size: 11px;
  color: #94a3b8;
}
.social-moorebot-auth-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.45rem 0.65rem;
  padding: 0.5rem 0.65rem;
  margin-bottom: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
}
.social-moorebot-auth-strip label.meta {
  flex: 1 1 140px;
  min-width: 120px;
}
.social-moorebot-auth-strip input[type="password"] {
  flex: 2 1 200px;
  min-width: 160px;
  max-width: 100%;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #0a0d12;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 12px;
}
.social-moorebot-body-v2 {
  display: grid;
  gap: 0.5rem;
  font-size: 11px;
  line-height: 1.45;
  color: #cbd5e1;
}
.social-moorebot-body-v2-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}
.social-moorebot-body-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  background: rgba(0, 0, 0, 0.18);
}
.social-moorebot-body-panel h4 {
  margin: 0 0 0.35rem 0;
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.social-moorebot-body-kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem 0.5rem;
  align-items: baseline;
}
.social-moorebot-body-kv dt {
  color: var(--muted);
  font-size: 10px;
}
.social-moorebot-body-kv dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}
.social-moorebot-skill-block {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}
.social-moorebot-skill-json {
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.35rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0a0d12;
  color: #e2e8f0;
  font-family: var(--font-body);
  font-size: 11px;
  line-height: 1.4;
  resize: vertical;
  min-height: 3.2rem;
}
.social-moorebot-skill-out {
  margin: 0.45rem 0 0 0;
  font-size: 11px;
  color: #94a3b8;
  white-space: pre-wrap;
  word-break: break-word;
}
.social-moorebot-health-mode {
  margin-top: 0.35rem;
  font-size: 11px;
  color: #94a3b8;
}
@media (max-width: 767px) {
  .social-moorebot-body-v2-grid {
    grid-template-columns: 1fr;
  }
  .social-moorebot-metrics {
    grid-template-columns: 1fr;
  }
}

.locked-panel {
  text-align: center;
  padding: 3rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
    linear-gradient(120deg, var(--border-glow), var(--purple), var(--cyan), var(--border-glow)) border-box;
  background-size: 100% 100%, 220% 220%;
  animation: locked-border-flow 8s ease infinite;
}

.locked-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.locked-title { font-family: var(--font-display); font-size: 1rem; margin-bottom: 0.35rem; }
.locked-stage { color: var(--amber); font-size: 0.8rem; margin-bottom: 0.75rem; }
.locked-desc { color: var(--muted); max-width: 420px; margin: 0 auto 1.25rem; line-height: 1.5; }

.progress-bar {
  height: 6px;
  border-radius: 3px;
  background: #0a0e14;
  border: 1px solid var(--border);
  max-width: 320px;
  margin: 0 auto 0.35rem;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 10%;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  border-radius: 3px;
  animation: biochem-pulse 3s ease-in-out infinite;
}

.timeline-root {
  display: grid;
  gap: 0.9rem;
}

.timeline-stack {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.85rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 0.7rem;
}

.timeline-item-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.35);
  margin-top: 0.15rem;
}

.timeline-line {
  margin-top: 0.35rem;
  width: 2px;
  min-height: 40px;
  background: linear-gradient(180deg, rgba(0, 212, 255, 0.45), rgba(153, 69, 255, 0.2));
}

.timeline-item-body {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-primary);
  padding: 0.75rem 0.85rem;
}

.timeline-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.timeline-item-title {
  color: #e6f4ff;
}

.timeline-item-desc {
  margin: 0.45rem 0 0 0;
  color: #9fb2c8;
  line-height: 1.55;
  font-size: 12px;
}

.timeline-item-meta {
  margin: 0.35rem 0 0 0;
  color: #6b7a90;
  font-size: 11px;
}

.timeline-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9ca3af;
}

.timeline-badge-ok {
  color: #4ade80;
}

.timeline-badge-active {
  color: #22d3ee;
}

.timeline-expert-lead {
  margin-top: 0.2rem;
}

.timeline-expert-list {
  margin: 0.65rem 0 0 1rem;
  padding: 0;
  color: #c7d2fe;
  font-size: 12px;
  line-height: 1.6;
}

.compare-root {
  display: grid;
  gap: 0.75rem;
}

.compare-result {
  margin-top: 0.25rem;
}

.compare-select {
  width: 100%;
  min-height: 36px;
  padding: 0.4rem 0.55rem;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: var(--text);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.interpret-result-box,
#replayBufInterpretBox,
#treeAnalysisResult {
  white-space: pre-wrap;
  word-break: break-word;
}

.compare-metrics-grid {
  display: grid;
  grid-template-columns: minmax(10.5rem, 1.25fr) 1fr 1fr;
  gap: 0.45rem 0.65rem;
  align-items: baseline;
  margin-top: 0.5rem;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-primary);
}

.compare-metric-head {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.compare-metric-head.compare-metric-a {
  color: #22d3ee;
}

.compare-metric-head.compare-metric-b {
  color: #a78bfa;
}

.compare-id-code {
  font-size: 10px;
  font-weight: 500;
  color: #cbd5e1;
  text-transform: none;
  letter-spacing: 0;
}

.compare-metric-label {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.45;
}

.compare-metric-val {
  font-size: 12px;
  font-family: var(--font-mono, "DM Mono", monospace);
  color: #e8f0ff;
  line-height: 1.45;
}

.compare-compat-line {
  margin-top: 0.75rem;
}

.error-toast {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  max-width: 360px;
  padding: 0.65rem 0.85rem;
  background: rgba(255, 51, 102, 0.12);
  border: 1px solid var(--red);
  color: #ffb3c7;
  border-radius: 8px;
  font-size: 0.75rem;
  display: none;
  z-index: 100;
}

.error-toast.show { display: block; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 90;
}

.modal-overlay.show { display: flex; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  width: min(420px, 92vw);
  box-shadow: var(--shadow-md);
}

.modal h3 {
  margin-top: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
}

.interpret-result-box,
#replayBufInterpretBox,
#treeAnalysisResult {
  margin-top: 0.75rem;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  line-height: 1.55;
  color: var(--text-secondary);
  background: var(--bg-primary);
}

.banner-sleep {
  display: none;
  background: rgba(167, 139, 250, 0.08);
  border: 1px solid rgba(167, 139, 250, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.65rem;
  font-size: 0.8125rem;
  color: #ddd6fe;
  line-height: 1.45;
}

.banner-wellbeing {
  display: none;
  background: rgba(52, 211, 153, 0.06);
  border: 1px solid rgba(52, 211, 153, 0.22);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.65rem;
  font-size: 0.8125rem;
  color: #a7f3d0;
  line-height: 1.45;
}

.text-meta-sm {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.text-meta-sm--tight {
  margin: 0.35rem 0 0;
}

@media (max-width: 1024px) {
  .sidebar-toggle {
    display: inline-flex;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.45);
  }

  body:not(.sidebar-collapsed)::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(4, 8, 16, 0.55);
    pointer-events: none;
  }

  body.sidebar-collapsed .sidebar {
    transform: translateX(calc(-1 * var(--sidebar-width)));
    box-shadow: none;
  }

  body.sidebar-collapsed .app-main {
    width: 100%;
  }
}

@media (max-width: 767px) {
  .header-zone--status {
    width: 100%;
    order: 3;
  }

  .header-admin-details {
    margin-left: 0;
  }

  main.shell {
    padding: 1rem 0.85rem 1.5rem;
  }

  .header-select {
    max-width: 100%;
  }
}

/* Korrelationsmatrix: Paar-Mini-EKG (Modal) */
.pair-ekg-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}
.pair-ekg-content {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 0 40px rgba(0, 212, 255, 0.1);
  max-width: 660px;
  width: 90%;
}
.pair-ekg-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  font-family: var(--font-display);
}
.pair-ekg-title { font-size: 16px; font-weight: 700; flex: 1; }
.pair-ekg-corr { font-size: 13px; color: var(--green); }
.pair-ekg-close {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  border-radius: 4px;
  padding: 4px 8px;
  transition: all 0.2s;
}
.pair-ekg-close:hover { border-color: var(--red); color: var(--red); }
.pair-ekg-legend {
  display: flex;
  gap: 20px;
  margin-top: 10px;
  font-family: var(--font-body);
  font-size: 12px;
}
.pair-ekg-canvas {
  display: block;
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
}

/* NEAT Platzhalter (Stage 2) */
.neat-panel { padding: 16px; }
.simulated-banner.neat {
  background: linear-gradient(90deg, rgba(153, 69, 255, 0.12), transparent);
  border: 1px solid rgba(153, 69, 255, 0.45);
  color: var(--purple);
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  font-size: 0.72rem;
  margin-bottom: 0.75rem;
  letter-spacing: 0.06em;
}
.neat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.neat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
}
.neat-card-title {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.neat-card-sub {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.neat-stats-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.5rem;
}
.neat-stats-row b {
  color: var(--text);
  font-family: var(--font-mono);
  font-weight: 500;
}
.neat-mia-bar {
  margin-top: 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.8125rem;
}
.neat-mia-label { color: var(--purple); font-weight: 600; white-space: nowrap; }
.neat-mia-desc { color: var(--muted); flex: 1; min-width: 12rem; }
.neat-mia-score { color: var(--green); white-space: nowrap; font-family: var(--font-mono); }

.neat-panel-root { padding: 0; }
.neat-m5 { max-width: 100%; margin: 0; }
.neat-m5-banner {
  margin-bottom: 0.85rem;
}
.neat-m5-banner-title { font-weight: 600; color: var(--text); font-size: 0.9rem; }
.neat-s6-ops {
  margin-bottom: 0.85rem;
}
.neat-s6-ops-title {
  margin-bottom: 0.25rem;
}
.neat-s6-ops-body {
  margin: 0;
}
.neat-m5-lead { margin: 0 0 0.85rem; max-width: 52rem; }
.neat-m5-toolbar { margin-bottom: 0.85rem; }
.neat-settings-card {
  border-color: rgba(56, 189, 248, 0.22);
  background: var(--bg-card);
}
.neat-settings-section {
  grid-column: 1 / -1;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin: 0.35rem 0 0.15rem;
}
.neat-tabbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 1rem;
  padding: 0;
  border-bottom: 1px solid var(--border);
}
.neat-tab-btn {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.45rem 0.75rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: -1px;
}
.neat-tab-btn:hover {
  color: var(--text);
  background: var(--bg-subtle);
}
.neat-tab-btn.active {
  color: var(--accent);
  background: var(--accent-muted);
  border-color: var(--border);
  border-bottom-color: var(--bg-primary);
}
.neat-analysis-card {
  border-color: rgba(167, 139, 250, 0.22);
  background: var(--bg-card);
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.neat-research-table thead {
  background: var(--bg-subtle);
}
.neat-research-table code {
  color: var(--accent);
}
#neat-topology,
#neat-fitness {
  display: block;
  width: 100%;
  max-width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--chart-bg);
}
.neat-log {
  max-height: 180px;
  overflow-y: auto;
}
.neat-log-entry {
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 11px;
}
.neat-log-entry.new { animation: value-update 0.5s ease; }
.neat-log-gen { color: var(--cyan); min-width: 50px; }
.neat-log-text { color: var(--muted); }
.neat-card-wide { grid-column: 1 / -1; }
.neat-research-wrap { overflow-x: auto; }
.neat-research-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
}
.neat-research-table th,
.neat-research-table td {
  border: 1px solid var(--border);
  padding: 0.45rem 0.55rem;
  text-align: left;
}
.neat-species-m5 { min-height: 72px; padding: 4px 0; }
.neat-settings-lead {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0 0 0.85rem;
  max-width: 52rem;
}
.neat-settings-form {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.85rem 1.1rem;
  align-items: start;
}
.neat-field-block {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.neat-field-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.neat-field-help {
  font-size: 0.6875rem;
  line-height: 1.45;
  color: var(--muted);
  margin: 0;
  max-width: 400px;
}
.neat-settings-form input[type="text"],
.neat-settings-form input[type="number"],
.neat-settings-form select {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  padding: 0.4rem 0.55rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text);
  max-width: 100%;
}
.neat-settings-form input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
}
.neat-settings-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.neat-tab-panel {
  margin-bottom: 0.5rem;
}
.neat-tab-panel[hidden] {
  display: none !important;
}
.neat-analysis-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: flex-end;
  margin-bottom: 12px;
}
.neat-analysis-pre {
  font-size: 0.75rem;
  line-height: 1.45;
  margin: 0;
  padding: 0.65rem 0.75rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  max-height: 280px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-mono);
}
.neat-analysis-pass {
  color: #4ade80;
  font-weight: 600;
}
.neat-analysis-fail {
  color: #f87171;
  font-weight: 600;
}
#neat-topology,
#neat-fitness {
  display: block;
  width: 100%;
  max-width: 340px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.header-version {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.lobe-bars {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.lobe-bar-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
}
.lobe-name {
  width: 5.5rem;
  flex-shrink: 0;
  color: var(--muted);
  font-family: var(--font-body);
}
.lobe-gain-hint {
  color: var(--amber);
  font-size: 0.62rem;
  margin-left: 0.25rem;
  cursor: help;
}
.lobe-bar-inner {
  flex: 1;
  min-width: 0;
}

/* Working Memory Status Bar — Stage 4c */
.wm-status-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 0;
  margin-top: 4px;
  border-top: 1px solid #1e3a5f;
}
.wm-entry {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #94a3b8;
  background: #0f1318;
  border: 1px solid #1e3a5f;
  border-radius: 4px;
  padding: 2px 6px;
  cursor: default;
}
.wm-lobe-name {
  color: #64748b;
}
.wm-decay-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.wm-val {
  color: #00d4ff;
}
.wm-slot {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  vertical-align: top;
}
.wm-cap-track {
  height: 3px;
  width: 100%;
  min-width: 48px;
  background: #1e293b;
  border-radius: 2px;
  overflow: hidden;
}
.wm-cap-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, #334155, #00d4ff);
  max-width: 100%;
}
.wm-cap-fill.wm-cap-high {
  background: linear-gradient(90deg, #92400e, #fbbf24);
}
.wm-aggregate {
  font-size: 10px;
  color: #64748b;
  margin-bottom: 4px;
  width: 100%;
}
.wm-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Sleep & Circadian — Stage 5 */
.sleep-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.sleep-orb {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, #00d4ff33, #0a0d12);
  box-shadow: 0 0 12px #00d4ff55;
  border: 1px solid #1e3a5f;
}
.sleep-orb span {
  font-size: 20px;
}
.sleep-metrics {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 180px;
}
.sleep-metric {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.sleep-label {
  font-size: 10px;
  color: var(--muted);
  min-width: 76px;
}
.sleep-val {
  font-size: 11px;
  color: var(--cyan);
  min-width: 38px;
  text-align: right;
}
.sleep-meta {
  font-size: 11px;
  color: #94a3b8;
}
.mini-bar {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: #0a0e14;
  border: 1px solid var(--border);
  overflow: hidden;
}
.mini-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  transition: width 0.25s ease-out;
}
.circadian-mini {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 140px;
}
.circadian-bar-wrap {
  position: relative;
  height: 8px;
  border-radius: 4px;
  background: #020617;
  border: 1px solid #1e293b;
  overflow: hidden;
}
.circadian-bar-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: linear-gradient(90deg, #0ea5e9, #22c55e, #eab308, #f97316, #1d4ed8);
  transition: width 0.25s ease-out;
}
.circadian-pointer {
  position: absolute;
  top: -4px;
  width: 2px;
  height: 16px;
  background: #e5e7eb;
  box-shadow: 0 0 6px #e5e7ebaa;
  left: 0%;
  transition: left 0.25s ease-out;
}
.circadian-label {
  font-size: 11px;
  color: #94a3b8;
}

/* Environment panel — Stage 5 */
.env-state-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.env-state-card {
  flex: 1;
  min-width: 120px;
  max-width: 180px;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  border: 1px solid #1e293b;
  background: #020617;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #94a3b8;
}
.env-state-card.active {
  border-color: var(--cyan);
  background: var(--bg-elevated);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.15);
}
.env-state-card.threat-active {
  border-color: var(--red);
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.2);
}
.env-state-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}
.env-state-card.active .env-state-dot {
  background: var(--cyan);
}
.env-state-card.threat-active .env-state-dot {
  background: var(--red);
}
.env-state-card[data-state="FORAGING"].active .env-state-dot {
  background: var(--amber);
}
.env-state-card[data-state="REST"].active .env-state-dot {
  background: var(--green);
}
.env-state-name {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.12em;
}
.env-state-ticks {
  margin-left: auto;
  text-align: right;
  font-size: 10px;
  color: #cbd5f5;
}
.env-state-last {
  font-size: 9px;
  color: #94a3b8;
}

.circadian-full-bar-wrap {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.circadian-day-label,
.circadian-night-label {
  font-size: 10px;
  color: #94a3b8;
}
.circadian-bar-outer {
  position: relative;
  height: 10px;
  border-radius: 5px;
  background: #020617;
  border: 1px solid #1e293b;
  overflow: hidden;
}
.circadian-bar-fill-full {
  position: absolute;
  inset: 0;
  width: 0%;
  background: linear-gradient(90deg, #0ea5e9, #22c55e, #eab308, #f97316, #1d4ed8);
  transition: width 0.25s ease-out;
}
.circadian-pointer-full {
  position: absolute;
  top: -4px;
  width: 2px;
  height: 18px;
  background: #e5e7eb;
  box-shadow: 0 0 6px #e5e7ebaa;
  left: 0%;
  transition: left 0.25s ease-out;
}
.circadian-details {
  font-size: 11px;
  color: #94a3b8;
}

/* Stage 6 — Genom-Körper unter Lebensraum-Canvas */
.env-body-hud {
  font-size: 11px;
  color: #94a3b8;
  margin: 0 0 0.75rem 0;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(56, 189, 248, 0.2);
  font-family: var(--font-body, "DM Mono", monospace);
  line-height: 1.45;
}
.env-body-hud strong {
  color: #38bdf8;
  font-weight: 500;
}

/* Stage 6.3 — Messwerte = gleiche API wie stage6-evidence (Truthful UI) */
.env-evidence-hud {
  font-size: 11px;
  color: #94a3b8;
  margin: 0 0 0.65rem 0;
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.25);
  font-family: var(--font-body, "DM Mono", monospace);
  line-height: 1.5;
}
.env-evidence-hud strong {
  color: #a5b4fc;
  font-weight: 500;
}
.env-evidence-hud .env-evidence-disclaimer {
  display: block;
  margin-top: 0.35rem;
  font-size: 10px;
  color: #64748b;
  line-height: 1.4;
}
.env-evidence-hud .meta {
  color: #64748b;
  margin-left: 0.15rem;
}

.env-renderer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* Moorebot / MORB — Social-Panel (#socialMoorebotMorbPanel) */
.social-moorebot-morb {
  margin-top: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius, 10px);
  background: var(--bg-card, #0f1318);
  border: 1px solid var(--border, #1a2030);
  font-size: 12px;
  line-height: 1.45;
}
.social-moorebot-morb .meta {
  color: var(--muted, #6b7a90);
  margin: 0.35rem 0;
}
.morb-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.4rem;
  font-size: 12px;
}
.morb-hunger {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--muted, #6b7a90);
  margin-top: 0.35rem;
}
.morb-hunger-bar {
  height: 5px;
  margin: 0.2rem 0 0.45rem;
  border-radius: 3px;
  background: rgba(26, 32, 48, 0.95);
  overflow: hidden;
}
.morb-hunger-bar > div {
  height: 100%;
  border-radius: 3px;
  transition: width 0.2s ease;
}
.morb-hun-unk > div {
  width: 0 !important;
  background: #475569;
}
.morb-hun-low > div {
  background: linear-gradient(90deg, #22c55e, #4ade80);
}
.morb-hun-mid > div {
  background: linear-gradient(90deg, #eab308, #facc15);
}
.morb-hun-hi > div {
  background: linear-gradient(90deg, #f97316, #fb923c);
}
.morb-hun-crit > div {
  background: linear-gradient(90deg, #dc2626, #f87171);
}
.morb-badge {
  display: inline-block;
  margin: 0.35rem 0;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}
.morb-badge.morb-sat,
.morb-badge.morb-content {
  color: var(--green, #00ff88);
  border: 1px solid rgba(0, 255, 136, 0.35);
  background: rgba(0, 255, 136, 0.06);
}
.morb-badge.morb-idle {
  color: var(--muted, #6b7a90);
  border: 1px solid var(--border, #1a2030);
}
.morb-badge.morb-forage {
  color: var(--amber, #ffaa00);
  border: 1px solid rgba(255, 170, 0, 0.35);
  background: rgba(255, 170, 0, 0.08);
}
.morb-badge.morb-desperate,
.morb-badge.morb-critical {
  color: var(--red, #ff3366);
  border: 1px solid rgba(255, 51, 102, 0.4);
  background: rgba(255, 51, 102, 0.08);
}
.morb-food {
  margin: 0.35rem 0;
  font-size: 11px;
}
.morb-eye {
  opacity: 0.35;
  margin-right: 0.25rem;
}
.morb-eye.on {
  opacity: 1;
  filter: drop-shadow(0 0 4px var(--cyan, #00d4ff));
}
.morb-dock {
  margin: 0.5rem 0;
  font-size: 11px;
}
.morb-dock-track {
  height: 6px;
  margin-top: 0.35rem;
  border-radius: 4px;
  background: rgba(26, 32, 48, 0.9);
  overflow: hidden;
}
.morb-dock-fill {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--cyan, #00d4ff), var(--purple, #9945ff));
  transition: width 0.25s ease;
}
.morb-dock-fill.ok {
  background: linear-gradient(90deg, var(--green, #00ff88), var(--cyan, #00d4ff));
}
.morb-dock-fill.fail {
  background: linear-gradient(90deg, var(--red, #ff3366), #ff8844);
}
.morb-perception {
  font-size: 11px;
}
.morb-per-title {
  margin-bottom: 0.25rem;
  color: var(--text, #e6edf3);
}
.morb-per-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.12rem 0;
  color: var(--muted, #9aa7b8);
}
.morb-per-ic {
  width: 1.4rem;
  text-align: center;
}
.morb-subs {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0.5rem 0;
}
.morb-mini {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 10px;
  color: var(--muted, #6b7a90);
}
.morb-mini-lbl {
  min-width: 4.2rem;
}
.morb-mini-bar {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: rgba(26, 32, 48, 0.9);
  overflow: hidden;
}
.morb-mini-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.2s ease;
}
.morb-mini-val {
  min-width: 2rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.morb-mem em {
  color: var(--cyan, #00d4ff);
  font-style: normal;
}
.morb-tail {
  margin: 0.25rem 0 0 1rem;
  padding: 0;
  font-size: 10px;
  color: var(--muted, #6b7a90);
}
.morb-tail li {
  margin: 0.15rem 0;
}
.morb-ov.btn-row {
  display: flex;
}
