/* Projekt-Zentrale · Holo-HUD */
:root {
  --bg: #04070C;
  --panel: rgba(6, 22, 32, 0.72);
  --panel-strong: rgba(6, 28, 40, 0.85);
  --line: rgba(56, 225, 255, 0.30);
  --line-strong: rgba(56, 225, 255, 0.50);
  --accent: #38E1FF;
  --accent-soft: #7FD9EE;
  --text: #CDEFFA;
  --text-bright: #E9FBFF;
  --muted: #8FC9D9;
  --dim: #5E9FB0;
  --ok: #3DF09A;
  --warn: #FFB547;
  --warn-text: #FFD08A;
  --fail: #FF6B5A;
  --violet: #B79CFF;
  --display: 'Orbitron', sans-serif;
  --body: 'Chakra Petch', system-ui, sans-serif;
  --mono: 'Share Tech Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse at 50% 20%, rgba(20, 90, 120, 0.28), rgba(4, 7, 12, 0) 60%),
    linear-gradient(rgba(56, 225, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 225, 255, 0.05) 1px, transparent 1px);
  background-size: 100% 100%, 40px 40px, 40px 40px;
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--body);
  font-size: 15px;
  min-height: 100vh;
}
a { color: #5BE7FF; }
a:hover { color: #B8F5FF; }
h1, h2, h3 { margin: 0; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.ok { color: var(--ok); }
.warn { color: var(--warn-text); }
.fail { color: var(--fail); }

/* Kopfzeile */
.top {
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px;
  padding: 14px 24px; border-bottom: 1px solid rgba(56, 225, 255, 0.22);
  background: rgba(4, 10, 16, 0.6); backdrop-filter: blur(4px);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: 3px; color: var(--text-bright); }
.brand-sub { font-family: var(--mono); font-size: 12px; color: var(--accent-soft); letter-spacing: 1px; }
.command {
  flex: 1 1 380px; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 6px 0 14px;
  border: 1px solid var(--line-strong); background: rgba(6, 24, 34, 0.75);
  box-shadow: 0 0 18px rgba(56, 225, 255, 0.15) inset;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
}
.command .prompt { font-family: var(--mono); color: var(--accent); }
.command input[type=text] {
  flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--text-bright);
  font: inherit; font-size: 15px; padding: 12px 0;
}
.command select {
  background: rgba(2, 10, 16, 0.9); color: var(--muted); border: 1px solid var(--line); font: inherit;
  font-size: 13px; height: 36px; max-width: 150px;
}
.icon-btn {
  width: 42px; height: 36px; border: 1px solid var(--line-strong); background: rgba(56, 225, 255, 0.12);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-bright);
}
.icon-btn.listening { background: rgba(255, 107, 90, 0.25); border-color: var(--fail); }
.controls { display: flex; gap: 8px; flex-wrap: wrap; }

/* Knöpfe */
.btn {
  min-height: 42px; padding: 0 16px; border: 1px solid var(--line-strong); background: rgba(56, 225, 255, 0.08);
  color: var(--text-bright); font: inherit; font-weight: 600; letter-spacing: 1px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none; gap: 6px;
}
.btn:hover { background: rgba(56, 225, 255, 0.18); color: var(--text-bright); }
.btn-primary { background: var(--accent); color: #02161D; border: 0; box-shadow: 0 0 20px rgba(56, 225, 255, 0.45); }
.btn-primary:hover { background: #7DEBFF; color: #02161D; }
.btn-warn { border-color: rgba(255, 181, 71, 0.6); background: rgba(255, 181, 71, 0.08); color: var(--warn-text); }
.btn-warn-solid { background: var(--warn); color: #2A1700; border: 0; }
.btn-warn-solid:hover { background: #FFC877; color: #2A1700; }
.btn-ghost { background: transparent; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
form.inline { display: inline; }

/* Layout */
.layout { display: flex; flex-wrap: wrap; }
.side {
  flex: 1 1 190px; max-width: 210px; padding: 18px 10px; border-right: 1px solid rgba(56, 225, 255, 0.15);
  display: flex; flex-direction: column; gap: 2px; font-family: var(--mono);
}
.side a {
  display: flex; justify-content: space-between; align-items: center; padding: 11px 12px; color: var(--muted);
  text-decoration: none; letter-spacing: 1px; font-size: 13px; border-left: 2px solid transparent;
}
.side a.active { color: var(--text-bright); border-left-color: var(--accent); background: rgba(56, 225, 255, 0.08); }
.side a:hover { color: var(--text-bright); }
.badge { min-width: 22px; height: 22px; padding: 0 6px; background: rgba(255, 181, 71, 0.18); color: var(--warn-text);
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.content { flex: 999 1 560px; min-width: 0; padding: 22px 26px 60px; display: flex; flex-direction: column; gap: 22px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 22px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

.label { font-family: var(--display); font-size: 13px; letter-spacing: 3px; color: var(--accent-soft); }
.label.warn { color: var(--warn-text); }
.page-title { font-family: var(--display); font-size: 22px; letter-spacing: 3px; color: var(--text-bright); }

.panel { border: 1px solid var(--line); background: var(--panel); padding: 16px 18px; }
.panel-cut { clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px); }
.panel-strong { border-color: var(--line-strong); background: var(--panel-strong); box-shadow: 0 0 16px rgba(56, 225, 255, 0.12) inset; }
.alert { padding: 14px 16px; border: 1px solid rgba(255, 181, 71, 0.5); border-left: 0; background: rgba(40, 26, 6, 0.55);
  box-shadow: inset 3px 0 0 var(--warn); display: flex; flex-direction: column; gap: 10px; }
.alert.failed { border-color: rgba(255, 107, 90, 0.5); box-shadow: inset 3px 0 0 var(--fail); background: rgba(40, 10, 8, 0.5); }
.alert .tag { font-family: var(--mono); font-size: 11px; letter-spacing: 1px; color: var(--warn); }
.alert.failed .tag { color: var(--fail); }
.alert .title { font-weight: 600; color: #FFF1DC; }
.summary { white-space: pre-wrap; font-size: 13px; color: var(--muted); max-height: 220px; overflow: auto;
  background: rgba(2, 10, 16, 0.6); padding: 8px 10px; font-family: var(--mono); }

/* Projektkarten */
.project { display: flex; gap: 16px; align-items: center; text-decoration: none; color: var(--text); }
.project:hover { border-color: var(--line-strong); color: var(--text); }
.ring { position: relative; width: 72px; height: 72px; flex: none; }
.ring svg { position: absolute; inset: 0; }
.ring-val { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--mono); color: var(--text-bright); }
.chip { font-family: var(--mono); font-size: 11px; letter-spacing: 1px; padding: 3px 8px; border: 1px solid var(--accent); color: var(--accent); white-space: nowrap; }
.chip.ok { border-color: var(--ok); color: var(--ok); }
.chip.warn { border-color: var(--warn); color: var(--warn); }
.chip.off { border-color: var(--dim); color: var(--dim); }
.counts { display: flex; gap: 14px; flex-wrap: wrap; font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* Kern */
.core { position: relative; width: 380px; height: 380px; max-width: 100%; margin: 0 auto; }
.core svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.core-inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 4px; }
.core-num { font-family: var(--display); font-size: 52px; font-weight: 700; color: var(--text-bright); text-shadow: 0 0 18px rgba(56, 225, 255, 0.6); }
.legend { display: flex; justify-content: center; gap: 24px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 14px; height: 4px; margin-right: 6px; vertical-align: middle; }

/* Live */
.live-card { display: flex; flex-direction: column; gap: 8px; }
.console { font-family: var(--mono); font-size: 13px; background: rgba(2, 10, 16, 0.9); padding: 8px 10px; display: flex; flex-direction: column; gap: 3px; }
.console .old { color: var(--dim); }
.console .cur { color: var(--text-bright); }
.phases { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.phases span { display: block; height: 4px; background: rgba(56, 225, 255, 0.15); }
.phases .done span { background: var(--ok); }
.phases .cur span { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.phases small { font-family: var(--mono); font-size: 11px; color: var(--dim); }
.phases .done small, .phases .cur small { color: var(--text); }
.logline { display: flex; gap: 12px; padding: 4px 0; font-family: var(--mono); font-size: 13px; }
.logline .t { color: var(--dim); }
.logline .a { width: 120px; flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logline .x { flex: 1; min-width: 0; color: var(--text); }
.empty { color: var(--dim); font-family: var(--mono); font-size: 13px; padding: 6px 0; }

/* Segmentbalken Umsatz */
.segs { display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); gap: 3px; margin-top: 6px; }
.segs span { height: 8px; background: rgba(56, 225, 255, 0.12); }
.segs span.on { background: var(--accent); }
.segs.low span.on { background: var(--warn); }

/* Tabellen */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-family: var(--mono); font-weight: 400; font-size: 12px; letter-spacing: 1px; color: var(--accent-soft); padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 9px 10px; border-bottom: 1px solid rgba(56, 225, 255, 0.1); vertical-align: top; }

/* Board */
.board { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; align-items: start; }
.task { border: 1px solid var(--line); background: var(--panel); padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.task .meta { font-family: var(--mono); font-size: 11px; color: var(--dim); }
details summary { cursor: pointer; color: var(--accent-soft); font-family: var(--mono); font-size: 12px; }

/* Formulare */
.form { display: flex; flex-direction: column; gap: 10px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-family: var(--mono); font-size: 12px; color: var(--accent-soft); letter-spacing: 1px; }
.form input, .form textarea, .form select {
  background: rgba(2, 10, 16, 0.8); border: 1px solid var(--line); color: var(--text-bright); font-family: var(--body); font-size: 15px; letter-spacing: 0; padding: 10px 12px;
}
.form textarea { min-height: 80px; resize: vertical; }
.form input:focus, .form textarea:focus, .form select:focus, .command:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Radar */
.radar { width: 150px; height: 150px; flex: none; }
.idea { display: flex; gap: 14px; align-items: flex-start; }
.score { font-family: var(--display); font-size: 22px; color: var(--ok); width: 52px; flex: none; text-align: center; }
.score.mid { color: var(--accent); }
.score.low { color: var(--warn); }

/* Agenten */
.agent { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(56, 225, 255, 0.1); }
.toggle { min-width: 64px; }

/* Login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login { width: 100%; max-width: 380px; }

/* Animation */
@keyframes hudspin { to { transform: rotate(360deg); } }
@keyframes hudpulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.spin-slow { animation: hudspin 40s linear infinite; transform-origin: 50% 50%; transform-box: fill-box; }
.spin-rev { animation: hudspin 70s linear infinite reverse; transform-origin: 50% 50%; transform-box: fill-box; }
.pulse { animation: hudpulse 1.6s ease-in-out infinite; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
@media (prefers-reduced-motion: reduce) { .spin-slow, .spin-rev, .pulse { animation: none; } }

/* Handy */
@media (max-width: 760px) {
  .top { padding: 12px 14px; gap: 10px; }
  .side { max-width: none; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid rgba(56, 225, 255, 0.15); padding: 6px; }
  .side a { white-space: nowrap; border-left: 0; border-bottom: 2px solid transparent; }
  .side a.active { border-bottom-color: var(--accent); }
  .content { padding: 16px 14px 40px; }
  .command { flex-basis: 100%; }
  .command select { display: none; }
  .controls { width: 100%; }
  .controls form { flex: 1; }
  .controls .btn { width: 100%; }
  .grid3 > section[aria-label="Status-Kern"] { order: -1; }
  .core { width: 260px; height: 260px; }
  .core-num { font-size: 38px; }
  .logline .a { width: 80px; }
}

/* Berichte (Markdown) */
.doc { max-width: 920px; line-height: 1.65; font-size: 16px; color: var(--text); }
.doc h1, .doc h2, .doc h3 { font-family: var(--display); letter-spacing: 1px; color: var(--text-bright); margin: 1.2em 0 0.5em; }
.doc h1 { font-size: 22px; } .doc h2 { font-size: 18px; } .doc h3 { font-size: 16px; }
.doc p, .doc ul, .doc ol { margin: 0 0 0.9em; }
.doc li { margin: 0.25em 0; }
.doc code { font-family: var(--mono); background: rgba(2, 10, 16, 0.8); padding: 1px 5px; }
.doc pre { background: rgba(2, 10, 16, 0.9); padding: 12px; overflow-x: auto; }
.doc table { margin: 0.8em 0; display: block; overflow-x: auto; }
.doc blockquote { border-left: 3px solid var(--accent); margin: 0 0 1em; padding-left: 12px; color: var(--muted); }
.doc a { word-break: break-all; }
.doc-pre { white-space: pre-wrap; font-family: var(--mono); font-size: 13px; overflow-x: auto; }
