/* ARC Anrufanalyse – HUD-Oberfläche */

@font-face { font-family: "Orbitron"; src: url("fonts/Orbitron.ttf") format("truetype"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Rajdhani"; src: url("fonts/Rajdhani-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Rajdhani"; src: url("fonts/Rajdhani-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Rajdhani"; src: url("fonts/Rajdhani-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Exo 2"; src: url("fonts/Exo2.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Share Tech Mono"; src: url("fonts/ShareTechMono.ttf") format("truetype"); font-weight: 400; font-display: swap; }

:root {
  --bg: #03060b;
  --bg-2: #061019;
  --panel: rgba(8, 21, 33, 0.74);
  --panel-solid: #08141f;
  --panel-hi: rgba(14, 36, 54, 0.85);
  --line: rgba(95, 225, 255, 0.16);
  --line-mid: rgba(95, 225, 255, 0.3);
  --line-strong: rgba(95, 225, 255, 0.55);
  --cyan: #5fe1ff;
  --cyan-soft: #9eeeff;
  --cyan-dim: #2b8cad;
  --gold: #ffc44d;
  --gold-deep: #e79a17;
  --red: #ff3148;
  --red-deep: #b5121f;
  --hot: #ff5b3a;
  --warm: #ffc44d;
  --cold: #5fb4ff;
  --ok: #46f2a6;
  --text: #dff5ff;
  --text-2: #b4d3e2;
  --muted: #7697a8;
  --faint: #47677a;
  --radius: 3px;
  --cut: 14px;
  --font-display: "Orbitron", "Rajdhani", system-ui, sans-serif;
  --font-ui: "Rajdhani", "Exo 2", system-ui, sans-serif;
  --font-body: "Exo 2", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Share Tech Mono", ui-monospace, "SF Mono", Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: rgba(95, 225, 255, 0.35); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ---------- Hintergrund: Glühen, Hex-Raster, Scanlines ---------- */

.backdrop, .backdrop::before, .backdrop::after { position: fixed; inset: 0; pointer-events: none; }
.backdrop {
  z-index: 0;
  background:
    radial-gradient(1200px 700px at 50% -10%, rgba(40, 150, 200, 0.22), transparent 60%),
    radial-gradient(900px 600px at 105% 110%, rgba(200, 20, 40, 0.16), transparent 60%),
    radial-gradient(700px 500px at -10% 100%, rgba(255, 180, 60, 0.07), transparent 60%),
    linear-gradient(180deg, #040910 0%, #02050a 100%);
}
.backdrop::before {
  content: "";
  opacity: 0.55;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 0 L56 16 L56 48.5 L28 64.5 L0 48.5 L0 16 Z M28 64.5 L28 97' fill='none' stroke='%235fe1ff' stroke-opacity='0.07' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 56px 97px;
  mask-image: radial-gradient(ellipse at 50% 40%, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, black 20%, transparent 75%);
}
.backdrop::after {
  content: "";
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}

/* ---------- Rahmenlayout ---------- */

.app { position: relative; z-index: 1; display: grid; grid-template-rows: 64px 1fr; height: 100vh; }

.topbar {
  display: flex; align-items: center; gap: 18px;
  padding: 0 20px 0 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(6, 18, 28, 0.92), rgba(4, 11, 18, 0.75));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  position: relative;
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan) 20%, var(--gold) 50%, var(--cyan) 80%, transparent);
  opacity: 0.45;
}
.brand { display: flex; align-items: center; gap: 12px; user-select: none; }
.brand svg { width: 38px; height: 38px; filter: drop-shadow(0 0 8px rgba(95, 225, 255, 0.7)); }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: 0.32em; color: var(--text); line-height: 1; }
.brand-name b { color: var(--gold); font-weight: 800; text-shadow: 0 0 14px rgba(255, 196, 77, 0.55); }
.brand-sub { font-family: var(--font-ui); font-weight: 600; font-size: 11px; letter-spacing: 0.34em; color: var(--muted); margin-top: 4px; }

.sysbar { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.sys-chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 30px; padding: 0 12px;
  border: 1px solid var(--line); background: rgba(5, 16, 25, 0.6);
  font-family: var(--font-ui); font-weight: 600; font-size: 12px; letter-spacing: 0.18em; color: var(--text-2);
  cursor: pointer; clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.sys-chip:hover { border-color: var(--line-strong); color: var(--text); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.ok { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.dot.bad { background: var(--red); box-shadow: 0 0 8px var(--red); animation: blink 1.6s steps(2, start) infinite; }
.dot.warn { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.clock { font-family: var(--font-mono); font-size: 13px; color: var(--muted); letter-spacing: 0.1em; margin-left: 6px; min-width: 64px; text-align: right; }

.shell { display: grid; grid-template-columns: 292px 1fr; min-height: 0; }

/* ---------- Seitenleiste ---------- */

.sidebar {
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(5, 14, 22, 0.85), rgba(3, 9, 15, 0.7));
  display: flex; flex-direction: column; min-height: 0;
}
.sidebar-head { padding: 18px 16px 12px; }
.archive-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 18px 8px; font-family: var(--font-ui); font-weight: 700; font-size: 12px; letter-spacing: 0.3em; color: var(--muted);
}
.archive-head .count { font-family: var(--font-mono); letter-spacing: 0.05em; color: var(--cyan-dim); }
.archive { list-style: none; margin: 0; padding: 0 10px 16px; overflow-y: auto; flex: 1; }
.archive li + li { margin-top: 4px; }
.arch-item {
  width: 100%; text-align: left; border: 1px solid transparent; background: transparent; cursor: pointer;
  display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 12px 10px 14px; position: relative;
}
.arch-item::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; background: transparent; transition: background 0.2s; }
.arch-item:hover { background: rgba(95, 225, 255, 0.05); border-color: var(--line); }
.arch-item.active { background: rgba(95, 225, 255, 0.09); border-color: var(--line-mid); }
.arch-item.active::before { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.arch-name { font-family: var(--font-ui); font-weight: 700; font-size: 15px; letter-spacing: 0.04em; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arch-meta { grid-column: 1; font-family: var(--font-mono); font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arch-score { grid-row: 1 / span 2; grid-column: 2; align-self: center; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.arch-score .num { font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.mini-bar { width: 42px; height: 3px; background: rgba(255, 255, 255, 0.08); position: relative; overflow: hidden; }
.mini-bar i { position: absolute; left: 0; top: 0; bottom: 0; }
.arch-empty { padding: 18px; color: var(--muted); font-size: 13px; }
.sidebar-foot { padding: 12px 18px 16px; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 11px; color: var(--faint); letter-spacing: 0.08em; }

.t-heiss { color: var(--hot); } .bg-heiss { background: var(--hot); box-shadow: 0 0 8px var(--hot); }
.t-warm { color: var(--warm); } .bg-warm { background: var(--warm); box-shadow: 0 0 8px var(--warm); }
.t-kalt { color: var(--cold); } .bg-kalt { background: var(--cold); box-shadow: 0 0 8px var(--cold); }

/* ---------- Hauptbereich ---------- */

.main { position: relative; overflow-y: auto; overflow-x: hidden; min-height: 0; }
.view { padding: 26px 30px 40px; max-width: 1480px; margin: 0 auto; }

/* ---------- Knöpfe ---------- */

.btn {
  --c: var(--cyan);
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 40px; padding: 0 18px;
  border: 1px solid color-mix(in srgb, var(--c) 55%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 14%, transparent), color-mix(in srgb, var(--c) 4%, transparent));
  color: var(--text);
  font-family: var(--font-ui); font-weight: 700; font-size: 14px; letter-spacing: 0.2em; text-transform: uppercase;
  cursor: pointer; white-space: nowrap;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: background 0.18s, box-shadow 0.18s, color 0.18s, transform 0.08s;
}
.btn:hover { background: linear-gradient(180deg, color-mix(in srgb, var(--c) 28%, transparent), color-mix(in srgb, var(--c) 9%, transparent)); box-shadow: inset 0 0 18px color-mix(in srgb, var(--c) 30%, transparent); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.38; cursor: not-allowed; box-shadow: none; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.gold { --c: var(--gold); color: #fff3d6; }
.btn.red { --c: var(--red); }
.btn.big { height: 50px; padding: 0 26px; font-size: 15px; letter-spacing: 0.26em; }
.btn.small { height: 32px; padding: 0 12px; font-size: 12px; letter-spacing: 0.16em; clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px); }
.btn.block { width: 100%; }
.btn.ghost { border-color: var(--line-mid); background: transparent; color: var(--text-2); }
.btn.ghost:hover { color: var(--text); background: rgba(95, 225, 255, 0.07); }
.icon-btn {
  width: 30px; height: 30px; display: inline-grid; place-items: center; border: 1px solid var(--line); background: rgba(5, 16, 25, 0.5);
  color: var(--text-2); cursor: pointer; flex: none;
}
.icon-btn:hover { border-color: var(--line-strong); color: var(--cyan); }
.icon-btn svg { width: 15px; height: 15px; }

/* ---------- Paneele ---------- */

.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
  padding: 18px 20px 20px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  min-width: 0;
}
.panel::before, .panel::after { content: ""; position: absolute; width: 16px; height: 16px; pointer-events: none; }
.panel::before { left: -1px; top: -1px; border-left: 2px solid var(--cyan); border-top: 2px solid var(--cyan); filter: drop-shadow(0 0 4px var(--cyan)); }
.panel::after { right: -1px; bottom: -1px; border-right: 2px solid var(--cyan); border-bottom: 2px solid var(--cyan); filter: drop-shadow(0 0 4px var(--cyan)); }
.panel.gold::before, .panel.gold::after { border-color: var(--gold); filter: drop-shadow(0 0 4px var(--gold)); }
.panel.red::before, .panel.red::after { border-color: var(--red); filter: drop-shadow(0 0 4px var(--red)); }
.panel-cut { position: absolute; right: 0; top: 0; width: var(--cut); height: var(--cut); pointer-events: none; background: linear-gradient(to top right, transparent calc(50% - 0.8px), var(--line-strong) 50%, transparent calc(50% + 0.8px)); }

.p-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.p-code { font-family: var(--font-mono); font-size: 11px; color: var(--cyan-dim); letter-spacing: 0.1em; }
.p-title { font-family: var(--font-ui); font-weight: 700; font-size: 13px; letter-spacing: 0.3em; color: var(--cyan-soft); text-transform: uppercase; }
.p-head .spacer { flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-mid), transparent); }
.p-head .tools { display: flex; gap: 6px; }
.panel.gold .p-title { color: var(--gold); }

.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.s3 { grid-column: span 3; } .s4 { grid-column: span 4; } .s5 { grid-column: span 5; } .s6 { grid-column: span 6; }
.s7 { grid-column: span 7; } .s8 { grid-column: span 8; } .s12 { grid-column: span 12; }

.label { font-family: var(--font-ui); font-weight: 700; font-size: 11px; letter-spacing: 0.26em; color: var(--muted); text-transform: uppercase; }
.lead { font-size: 16px; line-height: 1.65; color: var(--text); margin: 0; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); }

.list { list-style: none; margin: 0; padding: 0; }
.list li { position: relative; padding: 7px 0 7px 22px; border-bottom: 1px dashed rgba(95, 225, 255, 0.09); color: var(--text-2); }
.list li:last-child { border-bottom: 0; }
.list li::before {
  content: ""; position: absolute; left: 2px; top: 15px; width: 8px; height: 8px;
  border-top: 2px solid var(--cyan); border-right: 2px solid var(--cyan); transform: rotate(45deg); opacity: 0.8;
}
.list.gold li::before { border-color: var(--gold); }
.list.red li::before { border-color: var(--red); }
.list.ok li::before { border-color: var(--ok); }

.tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  font-family: var(--font-ui); font-weight: 700; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  border: 1px solid currentColor; color: var(--cyan); background: rgba(0, 0, 0, 0.2); white-space: nowrap;
}
.tag.gold { color: var(--gold); } .tag.red { color: var(--red); } .tag.ok { color: var(--ok); } .tag.muted { color: var(--muted); }
.tag.hot { color: var(--hot); } .tag.cold { color: var(--cold); }

/* ---------- Upload: Reaktor ---------- */

.upload-view { min-height: calc(100vh - 64px); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 30px 60px; position: relative; }
.dropzone {
  position: relative; width: min(420px, 70vh); aspect-ratio: 1; display: grid; place-items: center; cursor: pointer;
  border-radius: 50%; outline-offset: 10px;
}
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.reactor { width: 100%; height: 100%; overflow: visible; }
.reactor .spin { transform-box: view-box; transform-origin: 200px 200px; animation: spin 40s linear infinite; }
.reactor .spin.rev { animation-direction: reverse; animation-duration: 26s; }
.reactor .spin.fast { animation-duration: 12s; }
.reactor .core { transform-box: view-box; transform-origin: 200px 200px; animation: pulse 3.2s ease-in-out infinite; }
.reactor .progress-ring { transition: stroke-dashoffset 0.8s cubic-bezier(.2, .8, .2, 1); }
.dropzone:hover .reactor, .dropzone.over .reactor { filter: drop-shadow(0 0 22px rgba(95, 225, 255, 0.45)); }
.dropzone.over .reactor .spin { animation-duration: 6s; }
.busy .reactor .spin { animation-duration: 7s; }
.busy .reactor .spin.rev { animation-duration: 4.5s; }
.busy .reactor .core { animation-duration: 1.1s; }
.reactor-center { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; text-align: center; }
.reactor-center .big { font-family: var(--font-display); font-weight: 900; font-size: 26px; letter-spacing: 0.06em; color: #04202e; text-shadow: 0 0 10px rgba(255, 255, 255, 0.7); line-height: 1.1; }
.reactor-center .small { font-family: var(--font-ui); font-weight: 700; font-size: 11px; letter-spacing: 0.26em; color: #063247; margin-top: 2px; }

.upload-title { margin-top: 26px; font-family: var(--font-display); font-weight: 700; font-size: 26px; letter-spacing: 0.26em; text-align: center; }
.upload-title b { color: var(--gold); font-weight: 700; }
.upload-sub { margin-top: 8px; color: var(--muted); font-family: var(--font-ui); font-weight: 600; font-size: 15px; letter-spacing: 0.12em; text-align: center; }
.upload-actions { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.checklist { margin-top: 30px; width: min(620px, 100%); }
.check-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-family: var(--font-ui); font-weight: 600; font-size: 15px; letter-spacing: 0.06em; }
.check-row:last-child { border-bottom: 0; }
.check-row .grow { flex: 1; color: var(--text-2); }
.hud-corner { position: absolute; width: 90px; height: 90px; border-color: var(--line-mid); border-style: solid; pointer-events: none; }
.hud-corner.tl { left: 26px; top: 22px; border-width: 1px 0 0 1px; } .hud-corner.tr { right: 26px; top: 22px; border-width: 1px 1px 0 0; }
.hud-corner.bl { left: 26px; bottom: 22px; border-width: 0 0 1px 1px; } .hud-corner.br { right: 26px; bottom: 22px; border-width: 0 1px 1px 0; }
.hud-readout { position: absolute; font-family: var(--font-mono); font-size: 11px; color: var(--faint); letter-spacing: 0.12em; line-height: 1.7; pointer-events: none; }
.hud-readout.l { left: 40px; top: 44px; } .hud-readout.r { right: 40px; bottom: 44px; text-align: right; }

/* ---------- Verarbeitung ---------- */

.progress-view { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; gap: 34px; align-items: center; min-height: calc(100vh - 64px - 66px); }
.progress-file { font-family: var(--font-mono); color: var(--muted); font-size: 13px; margin-bottom: 6px; letter-spacing: 0.05em; }
.progress-head { font-family: var(--font-display); font-weight: 700; font-size: 24px; letter-spacing: 0.18em; margin: 0 0 22px; }
.progress-head b { color: var(--gold); font-weight: 700; }
.stages { display: grid; gap: 10px; margin-bottom: 18px; }
.stage {
  display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 14px;
  padding: 12px 16px; border: 1px solid var(--line); background: rgba(6, 17, 27, 0.6); position: relative;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}
.stage .ico { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line-mid); font-family: var(--font-display); font-weight: 700; color: var(--muted); }
.stage .name { font-family: var(--font-ui); font-weight: 700; font-size: 16px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-2); }
.stage .desc { font-size: 13px; color: var(--muted); }
.stage .state { font-family: var(--font-mono); font-size: 13px; color: var(--muted); letter-spacing: 0.08em; }
.stage.laeuft { border-color: var(--line-strong); background: rgba(12, 38, 56, 0.7); }
.stage.laeuft .ico { color: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 14px rgba(95, 225, 255, 0.4), inset 0 0 10px rgba(95, 225, 255, 0.3); }
.stage.laeuft .name { color: var(--text); }
.stage.laeuft .state { color: var(--cyan); }
.stage.laeuft::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 30%; background: linear-gradient(90deg, transparent, var(--cyan), transparent); animation: sweep 1.6s ease-in-out infinite; }
.stage.fertig .ico, .stage.uebersprungen .ico { color: var(--ok); border-color: rgba(70, 242, 166, 0.5); }
.stage.fertig .state { color: var(--ok); }
.stage.fehler { border-color: rgba(255, 49, 72, 0.6); background: rgba(50, 8, 14, 0.55); }
.stage.fehler .ico { color: var(--red); border-color: var(--red); }
.stage.fehler .state { color: var(--red); }
.stage .err { grid-column: 2 / span 2; color: #ffb3bc; font-size: 14px; }

.terminal {
  font-family: var(--font-mono); font-size: 13px; line-height: 1.7; color: var(--cyan-soft);
  background: rgba(2, 8, 13, 0.75); border: 1px solid var(--line); padding: 12px 14px; height: 230px; overflow-y: auto;
}
.terminal .ln { white-space: pre-wrap; word-break: break-word; animation: fadein 0.35s ease; }
.terminal .ln .ts { color: var(--faint); margin-right: 10px; }
.terminal .ln.suche { color: var(--gold); }
.terminal .ln.abruf { color: #b7a6ff; }
.terminal .ln.treffer { color: var(--muted); }
.terminal .ln.ok { color: var(--ok); }
.terminal .ln.fehler { color: var(--red); }
.terminal .cursor { display: inline-block; width: 8px; height: 14px; background: var(--cyan); vertical-align: -2px; animation: blink 1s steps(2, start) infinite; }

/* ---------- Ergebnis: Kopf ---------- */

.dossier-head { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; margin-bottom: 18px; }
.ident-label { display: flex; align-items: center; gap: 10px; font-family: var(--font-ui); font-weight: 700; font-size: 12px; letter-spacing: 0.32em; color: var(--gold); }
.ident-label::before { content: ""; width: 26px; height: 2px; background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.ident-name { font-family: var(--font-display); font-weight: 800; font-size: clamp(28px, 3.1vw, 42px); letter-spacing: 0.06em; line-height: 1.15; margin: 8px 0 6px; text-transform: uppercase; text-shadow: 0 0 24px rgba(95, 225, 255, 0.35); overflow-wrap: anywhere; }
.ident-sub { font-family: var(--font-ui); font-weight: 600; font-size: 18px; letter-spacing: 0.06em; color: var(--text-2); }
.ident-sub .sep { color: var(--cyan-dim); margin: 0 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.gauge-wrap { display: flex; align-items: center; gap: 18px; }
.gauge { width: 168px; height: 168px; position: relative; }
.gauge svg { width: 100%; height: 100%; overflow: visible; }
.gauge .val { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gauge .num { font-family: var(--font-display); font-weight: 800; font-size: 44px; line-height: 1; }
.gauge .lbl { font-family: var(--font-ui); font-weight: 700; font-size: 12px; letter-spacing: 0.32em; margin-top: 6px; }
.gauge-side { display: grid; gap: 10px; min-width: 150px; }
.gauge-side .k { font-family: var(--font-ui); font-weight: 700; font-size: 11px; letter-spacing: 0.24em; color: var(--muted); }
.gauge-side .v { font-family: var(--font-ui); font-weight: 700; font-size: 17px; letter-spacing: 0.08em; }

/* ---------- Termin-Karte ---------- */

.ident-label.warn { color: var(--red); }
.ident-label.warn::before { background: var(--red); box-shadow: 0 0 8px var(--red); }
.termin-card {
  position: relative; min-width: 250px; padding: 16px 20px 16px 22px;
  border: 1px solid rgba(255, 196, 77, 0.55);
  background: linear-gradient(160deg, rgba(255, 196, 77, 0.12), rgba(255, 196, 77, 0.02) 60%), rgba(6, 16, 25, 0.8);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
  box-shadow: inset 0 0 30px rgba(255, 196, 77, 0.08);
}
.termin-card::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; background: var(--gold); box-shadow: 0 0 12px var(--gold); }
.tc-label { display: flex; justify-content: space-between; gap: 12px; font-family: var(--font-ui); font-weight: 700; font-size: 11px; letter-spacing: 0.3em; color: var(--gold); }
.tc-rel { font-family: var(--font-mono); letter-spacing: 0.08em; color: var(--text-2); }
.tc-day { font-family: var(--font-display); font-weight: 800; font-size: 30px; letter-spacing: 0.08em; margin-top: 8px; line-height: 1.1; text-shadow: 0 0 18px rgba(255, 196, 77, 0.35); }
.tc-date { font-family: var(--font-ui); font-weight: 700; font-size: 18px; letter-spacing: 0.06em; color: var(--text); }
.tc-time { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--gold); margin-top: 6px; letter-spacing: 0.04em; }
.tc-art { margin-top: 6px; font-family: var(--font-ui); font-weight: 700; font-size: 12px; letter-spacing: 0.2em; color: var(--muted); text-transform: uppercase; }
.termin-card.past { border-color: var(--line-mid); filter: saturate(0.4); }
.termin-card.none { border-color: rgba(255, 49, 72, 0.55); background: rgba(40, 8, 14, 0.6); }
.termin-card.none::before { background: var(--red); box-shadow: 0 0 12px var(--red); }
.termin-card.none .tc-label { color: var(--red); }
.termin-card.none .tc-time { font-family: var(--font-body); font-size: 13px; font-weight: 400; color: var(--text-2); }

/* ---------- WhatsApp-Vorschau ---------- */

.wa-wrap { border: 1px solid var(--line-mid); background: #0b141a; background-image: radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px); background-size: 14px 14px; padding: 0 0 18px; }
.wa-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #1f2c34; color: #d1d7db; font-family: var(--font-ui); font-weight: 700; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; }
.wa-dot { width: 10px; height: 10px; border-radius: 50%; background: #25d366; box-shadow: 0 0 8px #25d366; }
.wa-bubble { position: relative; margin: 16px 16px 0 auto; max-width: 92%; width: fit-content; background: #005c4b; color: #e9edef; padding: 9px 12px 22px; border-radius: 8px 0 8px 8px; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.3); }
.wa-bubble::after { content: ""; position: absolute; right: -8px; top: 0; border-width: 0 0 10px 10px; border-style: solid; border-color: transparent transparent transparent #005c4b; }
.wa-bubble pre { margin: 0; white-space: pre-wrap; word-break: break-word; font-family: -apple-system, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14.5px; line-height: 1.45; }
.wa-time { position: absolute; right: 10px; bottom: 5px; font-size: 11px; color: rgba(233, 237, 239, 0.65); font-family: -apple-system, "Segoe UI", sans-serif; }

.flabel { display: flex; align-items: center; gap: 8px; }
.flabel .tag { height: 17px; font-size: 9.5px; padding: 0 5px; }
.termin-fields { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 0 12px; }
.input[type="date"], .input[type="time"] { color-scheme: dark; }

.arch-termin { font-family: var(--font-mono); font-size: 12px; color: var(--gold); white-space: nowrap; }
.arch-posted { font-family: var(--font-ui); font-weight: 700; font-size: 10px; letter-spacing: 0.12em; color: var(--ok); text-transform: uppercase; }

/* ---------- Einschätzung, Login, Namensabfrage ---------- */

.stack { display: grid; gap: 16px; align-content: start; min-width: 0; }
.rating { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: start; }
.rating .gauge { width: 150px; height: 150px; }
.rating .gauge .num { font-size: 38px; }
.arch-temp { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.input.invalid { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.modal-head h2 b { color: var(--gold); font-weight: 700; }

.login-body { overflow: auto; }
.login-wrap { position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: min(420px, 100%); padding: 28px 28px 24px; }
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.login-brand svg { width: 52px; height: 52px; filter: drop-shadow(0 0 10px rgba(95, 225, 255, 0.7)); }
.login-brand .brand-name { font-size: 28px; }
.login-error { min-height: 20px; margin: -4px 0 12px; color: var(--red); font-family: var(--font-ui); font-weight: 600; letter-spacing: 0.04em; }
.login-hint { text-align: center; margin: 14px 0 0; }

@media (max-width: 560px) {
  .rating { grid-template-columns: 1fr; justify-items: center; }
  .termin-fields { grid-template-columns: 1fr 1fr; }
  .termin-fields .field:first-child { grid-column: 1 / -1; }
  .dossier-head .termin-card { min-width: 0; }
}

/* ---------- Reiter ---------- */

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; position: sticky; top: 0; z-index: 5; background: linear-gradient(180deg, rgba(3, 7, 12, 0.96), rgba(3, 7, 12, 0.88)); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.tab {
  position: relative; border: 0; background: transparent; cursor: pointer;
  padding: 14px 20px 12px; font-family: var(--font-ui); font-weight: 700; font-size: 14px; letter-spacing: 0.24em; color: var(--muted); text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 10px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); }
.tab.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.tab .n { font-family: var(--font-mono); font-size: 11px; color: var(--cyan-dim); letter-spacing: 0; }
.tab .badge { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px var(--gold); }

/* ---------- Ergebnis: Inhalte ---------- */

.stat-big { font-family: var(--font-display); font-weight: 800; font-size: 54px; line-height: 1; color: var(--gold); text-shadow: 0 0 26px rgba(255, 196, 77, 0.45); letter-spacing: 0.02em; }
.stat-unit { font-family: var(--font-ui); font-weight: 700; font-size: 14px; letter-spacing: 0.3em; color: var(--text-2); margin-top: 8px; text-transform: uppercase; }
.stat-text { margin-top: 14px; color: var(--text-2); font-size: 14px; }

.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 6px 0 10px; }
.meter i { height: 8px; background: rgba(255, 255, 255, 0.06); position: relative; }
.meter i.on { box-shadow: 0 0 12px currentColor; background: currentColor; }
.meter-labels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; font-family: var(--font-ui); font-weight: 700; font-size: 10px; letter-spacing: 0.16em; color: var(--faint); text-transform: uppercase; }
.meter-labels span.on { color: var(--text); }
.quote { margin: 10px 0 0; padding: 8px 12px; border-left: 2px solid var(--gold); background: rgba(255, 196, 77, 0.05); color: var(--text); font-style: italic; font-size: 14px; }

.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; font-size: 14.5px; }
.kv dt { font-family: var(--font-ui); font-weight: 700; font-size: 11px; letter-spacing: 0.22em; color: var(--muted); text-transform: uppercase; padding-top: 3px; }
.kv dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }

.objection { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.objection:last-child { border-bottom: 0; }
.objection .q { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; color: var(--text); font-weight: 500; }
.objection .a { margin-top: 4px; color: var(--muted); font-size: 14px; }
.objection .a::before { content: "↳ "; color: var(--cyan-dim); }

.contact-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.contact-row:last-child { border-bottom: 0; }
.contact-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.contact-value { font-family: var(--font-mono); font-size: 15.5px; color: var(--text); overflow-wrap: anywhere; }
.contact-note { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
.contact-note a { overflow-wrap: anywhere; }
.contact-tools { display: flex; gap: 6px; }
.quick-cta { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sent-note { font-family: var(--font-ui); font-weight: 700; letter-spacing: 0.12em; color: var(--ok); font-size: 14px; }

.notice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid; font-size: 14px; }
.notice.ok { border-color: rgba(70, 242, 166, 0.4); background: rgba(70, 242, 166, 0.06); }
.notice.warn { border-color: rgba(255, 196, 77, 0.45); background: rgba(255, 196, 77, 0.07); }
.notice.bad { border-color: rgba(255, 49, 72, 0.5); background: rgba(255, 49, 72, 0.07); }
.notice .ttl { font-family: var(--font-ui); font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; font-size: 12px; margin-bottom: 2px; }
.notice.ok .ttl { color: var(--ok); } .notice.warn .ttl { color: var(--gold); } .notice.bad .ttl { color: var(--red); }

/* ---------- Formulare ---------- */

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > label, .field > .label { font-family: var(--font-ui); font-weight: 700; font-size: 11px; letter-spacing: 0.24em; color: var(--muted); text-transform: uppercase; }
.input, .textarea, .select {
  width: 100%; border: 1px solid var(--line-mid); background: rgba(2, 9, 15, 0.7); color: var(--text);
  padding: 10px 12px; font-size: 15px; border-radius: 0; transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan), 0 0 16px rgba(95, 225, 255, 0.2); }
.textarea { resize: vertical; line-height: 1.6; font-family: var(--font-body); }
.textarea.mail { min-height: 380px; font-size: 15px; }
.select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--cyan) 50%), linear-gradient(135deg, var(--cyan) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.hint { font-size: 13px; color: var(--muted); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.cols-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0 16px; }
.choice { display: flex; gap: 8px; flex-wrap: wrap; }
.choice label {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; padding: 9px 14px; border: 1px solid var(--line-mid);
  font-family: var(--font-ui); font-weight: 700; font-size: 13px; letter-spacing: 0.14em; color: var(--text-2);
}
.choice input { accent-color: var(--cyan); }
.choice label:has(input:checked) { border-color: var(--cyan); color: var(--text); background: rgba(95, 225, 255, 0.08); }
.check { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; color: var(--text-2); font-size: 14px; }
.check input { accent-color: var(--cyan); width: 16px; height: 16px; }
.key-state { font-family: var(--font-mono); font-size: 12px; color: var(--ok); }
.key-state.none { color: var(--red); }

.recipients { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.recipient { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-mid); background: rgba(2, 9, 15, 0.6); padding: 4px 10px; cursor: pointer; font-family: var(--font-mono); font-size: 13px; color: var(--text-2); }
.recipient:hover, .recipient.on { border-color: var(--cyan); color: var(--text); }
.recipient .tag { height: 18px; font-size: 9.5px; padding: 0 5px; }

/* ---------- Transkript ---------- */

.player { display: grid; grid-template-columns: auto auto 1fr auto; gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--line-mid); background: rgba(3, 12, 20, 0.75); margin-bottom: 14px; }
.play { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--cyan); background: rgba(95, 225, 255, 0.1); display: grid; place-items: center; cursor: pointer; color: var(--cyan); box-shadow: 0 0 14px rgba(95, 225, 255, 0.3); }
.play:hover { background: rgba(95, 225, 255, 0.2); }
.play svg { width: 18px; height: 18px; }
.ptime { font-family: var(--font-mono); font-size: 13px; color: var(--text-2); min-width: 92px; }
.track { position: relative; height: 34px; cursor: pointer; }
.track canvas { width: 100%; height: 100%; display: block; }
.speed { font-family: var(--font-mono); font-size: 12px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; font-family: var(--font-ui); font-weight: 700; font-size: 12px; letter-spacing: 0.18em; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 10px; height: 10px; }
.tline { display: grid; grid-template-columns: 58px 130px 1fr; gap: 12px; padding: 9px 10px; border-left: 2px solid transparent; cursor: pointer; transition: background 0.15s; }
.tline:hover { background: rgba(95, 225, 255, 0.05); }
.tline.now { background: rgba(95, 225, 255, 0.1); border-left-color: var(--cyan); }
.tline .ts { font-family: var(--font-mono); font-size: 13px; color: var(--faint); padding-top: 2px; }
.tline .who { font-family: var(--font-ui); font-weight: 700; font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase; padding-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tline .txt { color: var(--text); }
.who.verkaeufer, .legend .verkaeufer { color: var(--gold); } .legend i.verkaeufer { background: var(--gold); }
.who.kunde, .legend .kunde { color: var(--cyan); } .legend i.kunde { background: var(--cyan); }
.who.sonstige, .legend .sonstige { color: #b7a6ff; } .legend i.sonstige { background: #b7a6ff; }

.footer-meta { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; font-family: var(--font-mono); font-size: 12px; color: var(--faint); letter-spacing: 0.06em; }
.footer-meta .grow { flex: 1; }

/* ---------- Einstellungen (Overlay) ---------- */

.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(1, 4, 8, 0.78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; place-items: center; padding: 30px; animation: fadein 0.2s ease; }
.modal { width: min(980px, 100%); max-height: calc(100vh - 60px); display: grid; grid-template-rows: auto auto 1fr auto; padding: 0; background: rgba(6, 16, 25, 0.96); }
.modal-head { display: flex; align-items: center; gap: 14px; padding: 18px 22px 10px; }
.modal-head h2 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: 0.24em; }
.modal-head h2 b { color: var(--gold); font-weight: 700; }
.modal-head .icon-btn { margin-left: auto; }
.modal .tabs { position: static; padding: 0 12px; background: transparent; margin: 0; }
.modal-body { overflow-y: auto; padding: 20px 22px 8px; }
.modal-foot { display: flex; gap: 10px; align-items: center; padding: 14px 22px 18px; border-top: 1px solid var(--line); }
.modal-foot .grow { flex: 1; }
.check-results { display: flex; gap: 14px; flex-wrap: wrap; font-family: var(--font-ui); font-weight: 700; font-size: 13px; letter-spacing: 0.1em; }
.check-results span { display: inline-flex; gap: 8px; align-items: center; }
.section-title { font-family: var(--font-ui); font-weight: 700; font-size: 13px; letter-spacing: 0.28em; color: var(--cyan-soft); margin: 6px 0 14px; text-transform: uppercase; }
.info-box { border: 1px solid var(--line); padding: 14px 16px; background: rgba(2, 9, 15, 0.5); color: var(--text-2); font-size: 14px; margin-bottom: 14px; }
.info-box h4 { margin: 0 0 6px; font-family: var(--font-ui); font-weight: 700; letter-spacing: 0.18em; font-size: 12px; text-transform: uppercase; color: var(--gold); }
.info-box p { margin: 0 0 8px; } .info-box p:last-child { margin: 0; }

/* ---------- Toasts, Boot ---------- */

.toasts { position: fixed; right: 22px; bottom: 22px; z-index: 80; display: grid; gap: 8px; }
.toast {
  min-width: 260px; max-width: 420px; padding: 12px 16px; border: 1px solid var(--line-strong); background: rgba(6, 18, 28, 0.95);
  font-family: var(--font-ui); font-weight: 600; font-size: 15px; letter-spacing: 0.06em; color: var(--text);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%); animation: toastin 0.25s ease;
  box-shadow: 0 0 24px rgba(95, 225, 255, 0.15);
}
.toast.bad { border-color: var(--red); } .toast.ok { border-color: var(--ok); }

.boot { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: grid; place-items: center; animation: bootout 0.5s ease 1.45s forwards; pointer-events: none; }
.boot-inner { text-align: center; }
.boot-line { width: 0; height: 1px; margin: 18px auto; background: linear-gradient(90deg, transparent, var(--cyan), transparent); animation: grow 0.9s ease forwards; }
.boot-text { font-family: var(--font-display); font-weight: 800; letter-spacing: 0.6em; font-size: 30px; color: var(--text); opacity: 0; animation: fadein 0.6s ease 0.25s forwards; padding-left: 0.6em; }
.boot-text b { color: var(--gold); }
.boot-sub { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.3em; color: var(--cyan); opacity: 0; animation: fadein 0.5s ease 0.6s forwards; }

.reveal { opacity: 0; transform: translateY(10px); animation: reveal 0.55s cubic-bezier(.2, .8, .2, 1) forwards; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 0.85; transform: scale(1); } 50% { opacity: 1; transform: scale(1.05); } }
@keyframes blink { to { visibility: hidden; } }
@keyframes sweep { 0% { left: -30%; } 100% { left: 100%; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes toastin { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
@keyframes reveal { to { opacity: 1; transform: none; } }
@keyframes grow { to { width: 340px; } }
@keyframes bootout { to { opacity: 0; visibility: hidden; } }

@media (max-width: 1280px) {
  .s3, .s4 { grid-column: span 6; }
  .s5, .s7, .s8 { grid-column: span 12; }
}
@media (max-width: 1100px) {
  .shell { grid-template-columns: 240px 1fr; }
  .progress-view { grid-template-columns: 1fr; }
  .dossier-head { grid-template-columns: 1fr; }
  .s3, .s4, .s6 { grid-column: span 12; }
  .sysbar .sys-chip span.lbl { display: none; }
}
@media (max-width: 760px) {
  body { overflow: auto; }
  .app { height: auto; min-height: 100vh; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); max-height: 260px; }
  .view { padding: 18px 16px 30px; }
  .cols-2, .cols-3 { grid-template-columns: 1fr; }
  .tline { grid-template-columns: 50px 1fr; }
  .tline .who { grid-column: 2; }
  .tline .txt { grid-column: 1 / -1; }
  .clock, .brand-sub { display: none; }
  .tabs { overflow-x: auto; }
  .hud-corner, .hud-readout { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .boot { display: none; }
}
