/* Nervensystem (#/nerven): Befinden, Vorfälle, Signalstrom, Organe. Farben nur aus den Zustands-Tokens. */

.nv-befinden { display: flex; align-items: center; gap: 22px; padding: 20px 22px; flex-wrap: wrap; }
.nv-befinden.warn { border-color: rgba(232, 194, 122, 0.3); }
.nv-befinden.fehler { border-color: rgba(229, 134, 126, 0.45); box-shadow: 0 0 40px -18px rgba(229, 134, 126, 0.8); }
.nv-skala { position: relative; display: grid; place-items: center; width: 84px; height: 84px; flex: none; }
.nv-skala svg.ring { position: absolute; inset: 0; width: 84px; height: 84px; }
.nv-skala b { font: 26px var(--display); color: var(--ink); line-height: 1; margin-top: -6px; }
.nv-skala span { position: absolute; bottom: 20px; font-size: 10.5px; color: var(--faint); }
.nv-befinden.warn .ring .wert { stroke: var(--warn); filter: none; }
.nv-befinden.fehler .ring .wert { stroke: var(--err); filter: drop-shadow(0 0 4px rgba(229, 134, 126, 0.6)); }
.nv-text { flex: 1 1 320px; display: grid; gap: 4px; min-width: 0; }
.nv-text h2 { font: 15px var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); }
.nv-text p { margin: 0; color: var(--ink-2); }
.nv-text .meta { color: var(--muted); font-size: 12.5px; }
.nv-aktionen { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.nv-test { display: flex; gap: 6px; flex-wrap: wrap; }
.nv-test select { width: auto; height: 32px; padding: 0 12px; border-radius: 999px; }

.nv-stufe {
  display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%;
  font: 600 13px var(--sans); font-variant-numeric: tabular-nums; border: 1px solid var(--line-2); color: var(--ink-2);
}
.nv-stufe.warn { color: var(--warn); border-color: rgba(232, 194, 122, 0.45); background: var(--warn-weich); }
.nv-stufe.fehler { color: var(--err); border-color: rgba(229, 134, 126, 0.55); background: var(--err-weich); box-shadow: 0 0 14px -4px rgba(229, 134, 126, 0.7); }
.nv-schwelle { color: var(--err); font-weight: 600; }

.nv-strom { display: grid; gap: 0; max-height: 360px; overflow-y: auto; padding-bottom: 12px; }
.nv-signal { display: flex; align-items: center; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; min-width: 0; }
.nv-signal time { color: var(--faint); font-variant-numeric: tabular-nums; flex: none; }
.nv-signal b { color: var(--ink-2); font-weight: 500; flex: none; }
.nv-signal > span:not(.punkt) { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.nv-signal em { font-style: normal; color: var(--faint); flex: none; }
.nv-organ .messung { margin: 4px 0 2px; }

@media (max-width: 640px) {
  .nv-befinden { padding: 16px; gap: 14px; }
  .nv-skala, .nv-skala svg.ring { width: 68px; height: 68px; }
  .nv-signal time { display: none; }
}

/* Stufe 2 und 3: Modus, Marken an Vorfällen, Diagnose, gelernte Reflexe, Einstellungen */
.nv-befinden.alarm { border-color: rgba(229, 134, 126, 0.7); box-shadow: 0 0 60px -16px rgba(229, 134, 126, 0.9); }
.nv-modus { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.nv-marken { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.nv-marke {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; text-decoration: none;
  border: 1px solid var(--line-2); color: var(--ink-2); background: rgba(13, 20, 32, 0.6);
}
.nv-marke.reflex { border-color: rgba(121, 191, 255, 0.4); color: var(--akzent-hell); }
.nv-marke.gehirn { border-color: rgba(201, 182, 255, 0.45); color: #d9ccff; }
.nv-marke.meldung { border-color: rgba(232, 194, 122, 0.45); color: var(--warn); }
.nv-marke.gedaechtnis { border-color: rgba(116, 211, 174, 0.45); color: var(--ok); }
a.nv-marke:hover { background: rgba(121, 191, 255, 0.1); }
.nv-diagnose { margin-top: 6px; font-size: 12.5px; }
.nv-diagnose summary { cursor: pointer; color: #d9ccff; }
.nv-diagnose p { margin: 6px 0 0; padding: 10px 12px; border-radius: 12px; background: rgba(13, 20, 32, 0.6); color: var(--ink-2); white-space: pre-wrap; line-height: 1.5; }
.nv-seite { align-content: start; }
.nv-einstellungen { display: grid; gap: 2px; padding-bottom: 14px; }
.nv-schalter { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.nv-schalter > span:first-child { display: grid; gap: 2px; min-width: 0; }
.nv-schalter b { font-weight: 500; color: var(--ink); font-size: 13px; }
.nv-schalter em { font-style: normal; color: var(--muted); font-size: 11.5px; line-height: 1.4; }
.nv-schalter select { width: auto; height: 30px; padding: 0 10px; border-radius: 999px; }
.nv-knoepfe { margin-top: 6px; gap: 6px; }
.nv-signal > .marke-status { flex: none; color: inherit; }
.nv-signal > .marke-status.akzent { color: var(--akzent-hell); } .nv-signal > .marke-status.fehler { color: var(--err); } .nv-signal > .marke-status.warn { color: var(--warn); } .nv-signal > .marke-status.ok { color: var(--ok); }

/* Reparatur-Menü */
.nv-gruppen { display: grid; gap: 18px; padding-bottom: 16px; }
.nv-gruppe h3 { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.nv-rep-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.nv-reparatur {
  display: grid; gap: 6px; align-content: start; padding: 12px 14px; border-radius: 16px;
  border: 1px solid var(--line-2); background: rgba(13, 20, 32, 0.55);
}
.nv-reparatur.ok { border-color: rgba(116, 211, 174, 0.28); }
.nv-reparatur.fehler { border-color: rgba(229, 134, 126, 0.4); }
.nv-rep-kopf { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nv-rep-kopf b { color: var(--ink); font-weight: 500; font-size: 13.5px; }
.nv-reparatur p { margin: 0; color: var(--ink-2); font-size: 12.5px; line-height: 1.45; }
.nv-reparatur p.meta { color: var(--muted); font-size: 11.5px; }
.nv-rep-fuss { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
.nv-auto { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); cursor: pointer; }
.nv-menue { position: relative; }
.nv-menue > summary { list-style: none; cursor: pointer; }
.nv-menue > summary::-webkit-details-marker { display: none; }
.nv-menue[open] > summary { border-color: var(--akzent-linie); color: var(--akzent-hell); }
.nv-menue-liste {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: min(340px, 86vw); max-height: 60vh; overflow-y: auto;
  display: grid; gap: 2px; padding: 6px; border-radius: 16px; border: 1px solid var(--line-2);
  background: rgba(8, 13, 22, 0.97); box-shadow: 0 20px 50px -18px rgba(0, 0, 0, 0.9);
}
.nv-menue-liste button {
  display: grid; gap: 2px; text-align: left; padding: 9px 11px; border-radius: 12px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer;
}
.nv-menue-liste button:hover:not(:disabled) { background: rgba(121, 191, 255, 0.1); }
.nv-menue-liste button b { color: var(--ink); font-weight: 500; font-size: 13px; }
.nv-menue-liste button span { color: var(--muted); font-size: 11.5px; line-height: 1.4; }
.nv-vorfall .aktionen { align-items: flex-start; }
.nv-rep-fuss .meta { font-size: 11.5px; color: var(--faint); }

/* Bestätigung direkt an der Stelle (public/bestaetigen.js, auch im Nexus genutzt) */
.bestaetigung {
  display: grid; gap: 8px; margin: 6px 0; padding: 10px 12px; border-radius: 14px;
  border: 1px solid var(--akzent-linie); background: rgba(10, 18, 32, 0.98); animation: erscheinen 0.15s var(--ease);
}
.bestaetigung p { margin: 0; color: var(--ink); font-size: 12.5px; line-height: 1.45; }
.bestaetigung input { height: 32px; border-radius: 999px !important; padding: 0 14px !important; }
.bestaetigung-knoepfe { display: flex; gap: 6px; flex-wrap: wrap; }
/* Ein offenes Menü „Reparieren“ liegt immer über den Abschnitten darunter */
.flaeche:has(.nv-menue[open]) { position: relative; z-index: 40; }
.nv-menue-liste .bestaetigung { margin: 2px 4px 6px; }

/* Gesamt-Option „Automatische Reparaturen“ */
.nv-automatik { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 4px; }
.nv-automatik > div:first-child { flex: 1 1 320px; display: grid; gap: 3px; }
.nv-automatik b { color: var(--ink); font-weight: 500; }
.nv-automatik p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.nv-automatik .bestaetigung { flex-basis: 100%; }

/* Sicherheit: Punktestand und Checkliste */
.nv-sich-kopf { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.nv-sich-kopf > div { display: grid; gap: 2px; }
.nv-sich-kopf b { font: 22px var(--display); color: var(--ink); }
.nv-sich-kopf span { color: var(--muted); font-size: 12px; }
.nv-sicherheit .eintrag { padding: 7px 0; }
.nv-sicherheit .meta { overflow-wrap: anywhere; }
