/* Cockpit („Jarvis“-Look) der Übersicht. Farben als Variablen; Bewegung nur mit transform/opacity bzw. Strichlänge. */
:root { --hud: #4fd1ff; --hud-2: #7c8cff; --hud-dim: rgba(79, 209, 255, 0.16); --hud-line: rgba(79, 209, 255, 0.28); --ease-out: cubic-bezier(0.23, 1, 0.32, 1); }
.hud { position: relative; margin-bottom: var(--space-4); padding: 22px; border-radius: 22px; border: 1px solid var(--hud-line);
  background:
    radial-gradient(900px 260px at 12% -10%, rgba(79, 209, 255, 0.12), transparent 60%),
    radial-gradient(700px 240px at 100% 110%, rgba(124, 140, 255, 0.12), transparent 60%),
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px) 0 0 / 100% 28px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px) 0 0 / 28px 100%,
    #0a0d12;
  box-shadow: 0 0 0 1px rgba(79, 209, 255, 0.05), 0 18px 60px rgba(0, 0, 0, 0.5); overflow: hidden; }
/* Eckklammern */
.hud::before, .hud::after { content: ''; position: absolute; width: 22px; height: 22px; border: 2px solid var(--hud); opacity: 0.7; pointer-events: none; }
.hud::before { top: 10px; left: 10px; border-right: 0; border-bottom: 0; border-top-left-radius: 8px; }
.hud::after { bottom: 10px; right: 10px; border-left: 0; border-top: 0; border-bottom-right-radius: 8px; }
.hud-top { display: flex; align-items: center; gap: 10px; margin: 0 0 14px 6px; }
.hud-title { font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; font-size: 0.8rem; color: var(--hud); }
.hud-sub { color: var(--muted); font-size: 0.8rem; }
.hud-live { width: 8px; height: 8px; border-radius: 50%; background: var(--hud); box-shadow: 0 0 10px var(--hud); animation: hud-pulse 2.4s ease-in-out infinite; }
@keyframes hud-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.hud-grid-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr) 280px; grid-template-areas: 'goal trend money' 'goal trend funnel'; gap: 14px; }
.hud-goal { grid-area: goal; } .hud-trend { grid-area: trend; } .hud-money { grid-area: money; } .hud-funnel { grid-area: funnel; }
.hud-card { background: rgba(14, 18, 26, 0.72); border: 1px solid var(--hud-dim); border-radius: 16px; padding: 16px 18px; min-width: 0; animation: hud-in 0.55s var(--ease-out) both; }
.hud-card:nth-child(2) { animation-delay: 0.06s; } .hud-card:nth-child(3) { animation-delay: 0.12s; } .hud-card:nth-child(4) { animation-delay: 0.18s; }
@keyframes hud-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.hud-label { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--hud); font-weight: 650; }
.hud-note { color: var(--muted); font-size: 0.82rem; margin-top: 6px; line-height: 1.35; }
.hud-empty { margin: 18px 0 8px; }
.hud-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.hud-legend { display: flex; gap: 14px; font-size: 0.78rem; color: var(--muted); }
.hud-legend .lg::before { content: ''; display: inline-block; vertical-align: middle; margin-right: 6px; }
.hud-legend .bar::before { width: 10px; height: 10px; border-radius: 3px; background: var(--hud); opacity: 0.8; }
.hud-legend .line::before { width: 14px; height: 2px; background: var(--hud-2); box-shadow: 0 0 6px var(--hud-2); }
.hud-legend .dot::before { width: 9px; height: 9px; border-radius: 50%; background: #ffd166; box-shadow: 0 0 8px #ffd166; }

/* Ring */
.hud-goal { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hud-ring-wrap { position: relative; width: 156px; height: 156px; margin: 8px 0 4px; }
.hud-ring { width: 100%; height: 100%; display: block; }
.hud-track { fill: none; stroke: rgba(255, 255, 255, 0.08); stroke-width: 9; }
.hud-ticks { fill: none; stroke: var(--hud-line); stroke-width: 3; stroke-dasharray: 1 5.2; }
.hud-arc { fill: none; stroke: var(--hud); stroke-width: 9; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(79, 209, 255, 0.7)); transition: stroke-dashoffset 1.1s var(--ease-out); }
.hud-ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.hud-ring-v { font-size: 2.3rem; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.hud-ring-sub { color: var(--muted); font-size: 0.8rem; margin-top: 4px; }
.hud-goal .btn { margin-top: 10px; }

/* Verlauf */
.hud-chart { width: 100%; height: auto; display: block; }
.hud-grid { stroke: rgba(255, 255, 255, 0.07); stroke-width: 1; }
.hud-axis { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.hud-axis.today { fill: var(--hud); font-weight: 700; }
.hud-bar { fill: var(--hud); fill-opacity: 0.55; transform-box: fill-box; transform-origin: 50% 100%; animation: hud-grow 0.7s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 35ms); }
.hud-bar.today { fill-opacity: 0.95; filter: drop-shadow(0 0 6px rgba(79, 209, 255, 0.6)); }
@keyframes hud-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.hud-line { fill: none; stroke: var(--hud-2); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 5px rgba(124, 140, 255, 0.8)); stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: hud-draw 1.3s var(--ease-out) 0.25s forwards; }
@keyframes hud-draw { to { stroke-dashoffset: 0; } }
.hud-dot { fill: #ffd166; filter: drop-shadow(0 0 6px rgba(255, 209, 102, 0.9)); }

/* Trichter */
.hud-frows { display: grid; gap: 10px; margin-top: 12px; }
.hud-frow { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 0.85rem; }
.hud-fl { color: var(--muted); }
.hud-ft { height: 10px; border-radius: 6px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.hud-fbar { height: 100%; width: var(--w, 0%); border-radius: 6px; background: linear-gradient(90deg, var(--hud), var(--hud-2)); box-shadow: 0 0 10px rgba(79, 209, 255, 0.5); transform-origin: 0 50%; animation: hud-fgrow 0.9s var(--ease-out) 0.2s both; }
@keyframes hud-fgrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hud-fn { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hud-fp { color: var(--muted); font-weight: 400; }

/* Potenzial */
.hud-money-v { font-size: 2.1rem; font-weight: 700; letter-spacing: -0.03em; margin-top: 8px; font-variant-numeric: tabular-nums; background: linear-gradient(90deg, #fff, var(--hud)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

@media (max-width: 1180px) { .hud-grid-layout { grid-template-columns: 200px minmax(0, 1fr); grid-template-areas: 'goal trend' 'money funnel'; } }
@media (max-width: 760px) {
  .hud { padding: 16px; border-radius: 18px; }
  .hud-grid-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'goal' 'trend' 'funnel' 'money'; }
}
@media (prefers-reduced-motion: reduce) {
  .hud-live, .hud-card, .hud-bar, .hud-line, .hud-fbar { animation: none; }
  .hud-line { stroke-dashoffset: 0; }
  .hud-arc { transition: none; }
}

/* ======== Lebendig und bedienbar ======== */
.hud-body { position: relative; }
.hud-top { position: relative; z-index: 1; }
.hud-stamp { margin-left: auto; color: var(--muted); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.hud-live-btn { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--hud); background: transparent; border: 1px solid var(--hud-dim); border-radius: 999px; padding: 3px 10px 3px 8px; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.hud-live-btn:hover { background: var(--hud-dim); border-color: var(--hud-line); }
.hud-live-btn.busy .hud-live { animation: hud-spin-pulse 0.6s linear infinite; }
@keyframes hud-spin-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.7); opacity: 0.4; } }
.hud-top .hud-live { animation: hud-pulse 2.4s ease-in-out infinite; }

/* Lichtstreifen, der alle paar Sekunden über das Cockpit läuft (nur transform/opacity) */
.hud-sweep { position: absolute; top: 0; bottom: 0; left: 0; width: 38%; pointer-events: none; z-index: 0; opacity: 0; transform: translateX(-120%) skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(79, 209, 255, 0.10), transparent); animation: hud-sweep 9s ease-in-out 1.5s infinite; }
@keyframes hud-sweep { 0% { opacity: 0; transform: translateX(-120%) skewX(-18deg); } 8% { opacity: 1; } 40% { opacity: 1; } 55%, 100% { opacity: 0; transform: translateX(360%) skewX(-18deg); } }
.hud-grid-layout, .hud-ticker { position: relative; z-index: 1; }
.hud.static .hud-card, .hud.static .hud-bar, .hud.static .hud-line, .hud.static .hud-fbar { animation: none; }
.hud.static .hud-line { stroke-dashoffset: 0; }

/* Karten reagieren */
.hud-card { transition: transform 0.2s var(--ease-out), border-color 0.2s, box-shadow 0.2s; }
.hud-card:hover { border-color: var(--hud-line); box-shadow: 0 0 0 1px rgba(79, 209, 255, 0.08), 0 10px 30px rgba(0, 0, 0, 0.25); }
button.hud-card { font: inherit; color: inherit; text-align: left; cursor: pointer; display: block; width: 100%; }
button.hud-card:hover { transform: translateY(-2px); }
button.hud-card:active { transform: scale(0.99); }
.hud-hint { display: block; margin-top: 8px; font-size: 0.78rem; font-weight: 650; color: var(--hud); opacity: 0; transform: translateX(-4px); transition: opacity 0.2s, transform 0.2s; }
button.hud-card:hover .hud-hint, button.hud-card:focus-visible .hud-hint { opacity: 1; transform: none; }

/* Ring als Knopf, Ticks drehen langsam, Ziel erreicht leuchtet */
button.hud-ring-wrap { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; border-radius: 50%; transition: transform 0.2s var(--ease-out); }
button.hud-ring-wrap:hover { transform: scale(1.04); }
button.hud-ring-wrap:active { transform: scale(0.98); }
.hud-ticks { transform-box: fill-box; transform-origin: center; animation: hud-rotate 90s linear infinite; }
@keyframes hud-rotate { to { transform: rotate(360deg); } }
.hud-arc { animation: hud-breathe 3.2s ease-in-out infinite; }
@keyframes hud-breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.72; } }
.hud-ring-wrap.done .hud-arc { stroke: #3ddc97; filter: drop-shadow(0 0 8px rgba(61, 220, 151, 0.8)); }
.hud-ring-wrap.done { animation: hud-pop 0.9s var(--ease-out) 0.9s 1; }
@keyframes hud-pop { 0% { transform: scale(1); } 40% { transform: scale(1.07); } 100% { transform: scale(1); } }

/* Verlauf: Tage anklickbar, Fadenkreuz, Infobox */
.hud-chart-wrap { position: relative; }
.hud-day { cursor: pointer; outline: none; }
.hud-hit { fill: transparent; }
.hud-day:hover .hud-bar, .hud-day:focus-visible .hud-bar { fill-opacity: 0.95; filter: drop-shadow(0 0 6px rgba(79, 209, 255, 0.6)); }
.hud-day.sel .hud-bar { fill-opacity: 0.95; stroke: #fff; stroke-opacity: 0.55; stroke-width: 1.2; }
.hud-day:focus-visible .hud-hit { stroke: var(--hud); stroke-width: 1.5; stroke-dasharray: 3 3; rx: 8; }
.hud-cross { stroke: var(--hud); stroke-opacity: 0; stroke-width: 1; stroke-dasharray: 3 4; transition: stroke-opacity 0.15s; pointer-events: none; }
.hud-cross.on { stroke-opacity: 0.6; }
.hud-tip { position: absolute; top: 0; left: calc(var(--x, 50) * 1%); transform: translate(-50%, -6px); display: grid; gap: 2px; min-width: 150px; padding: 8px 12px; border-radius: 12px; font-size: 0.78rem; line-height: 1.35;
  background: rgba(10, 13, 18, 0.94); border: 1px solid var(--hud-line); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5); opacity: 0; pointer-events: none; transition: opacity 0.15s, left 0.12s var(--ease-out); z-index: 2; }
.hud-tip.on { opacity: 1; }
.hud-tip strong { color: var(--hud); letter-spacing: 0.04em; }
.hud-day-detail { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; margin-top: 10px; padding: 10px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); font-size: 0.85rem; animation: hud-in 0.3s var(--ease-out) both; }
.hud-day-detail strong { color: var(--hud); }
.hud-link { margin-left: auto; color: var(--hud); font-weight: 650; text-decoration: none; }
.hud-link:hover { text-decoration: underline; }

/* Trichter-Zeilen anklickbar */
a.hud-frow { color: inherit; text-decoration: none; padding: 5px 8px; margin: 0 -8px; border-radius: 10px; transition: background 0.15s, transform 0.15s var(--ease-out); }
a.hud-frow:hover, a.hud-frow:focus-visible { background: rgba(79, 209, 255, 0.08); transform: translateX(3px); }
a.hud-frow:hover .hud-fbar { filter: brightness(1.2); }

/* Ticker mit den letzten echten Ereignissen */
.hud-ticker { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 9px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--hud-dim); min-height: 40px; overflow: hidden; }
.hud-tick-label { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--hud); font-weight: 700; flex: none; }
.hud-tick { display: flex; gap: 6px; align-items: center; min-width: 0; color: inherit; text-decoration: none; font-size: 0.88rem; opacity: 0; transform: translateY(6px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-tick.in { opacity: 1; transform: none; transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out); }
.hud-tick:hover { text-decoration: underline; }
.hud-tick-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--hud); box-shadow: 0 0 8px var(--hud); flex: none; }

@media (max-width: 760px) { .hud-stamp { display: none; } .hud-tip { min-width: 130px; } .hud-link { margin-left: 0; } }
@media (prefers-reduced-motion: reduce) {
  .hud-sweep, .hud-ticks, .hud-arc, .hud-ring-wrap.done, .hud-day-detail, .hud-top .hud-live, .hud-live-btn.busy .hud-live { animation: none; }
  .hud-tick, .hud-tick.in { transition: none; opacity: 1; transform: none; }
  button.hud-card:hover, a.hud-frow:hover, button.hud-ring-wrap:hover { transform: none; }
}
.hud-card .hud-note { display: block; }
.hud-trend { display: flex; flex-direction: column; }
.hud-trend .hud-chart-wrap { flex: 1; display: flex; align-items: center; }
@media (max-width: 760px) { .hud-chart { min-height: 190px; } }
