Erste Etappe des v3-Umbaus. Bewusst ohne jede Architektur-Aenderung: nur Entruempeln, damit der Rest des Umbaus auf einem messbar leichten Stand aufsetzt. Gemessen (vorher -> nachher): dist gesamt 27 375 720 B -> 1 477 852 B (-94,6 %) Dateien in dist 135 -> 35 Start-Chunk gzip 220 278 B -> 110 571 B (-49,8 %) CSS gzip 31 577 B -> 15 121 B (-52,1 %) Schrift-Dateien 112 -> 11 (WOFF 1: 0) Vier Eingriffe: 1) avatar.vrm (24,5 MB) entfernt. Lag in public/ und dist/, wurde von KEINER Zeile des Repos referenziert — der Renderer Avatar3D.tsx war schon vorher verschwunden. War 89,5 % der Nutzlast, die auf die Box ging. Damit fallen auch die .gitignore-Sonderregel und der Direkt-Deploy-Schritt weg. DISASTER_RECOVERY.md §3·D ehrlich auf "ausgebaut" gesetzt (7 Stellen). 2) Schriften: die 11 @fontsource-Sammelimporte zogen ALLE Subsets (latin-ext, griechisch, kyrillisch) und je eine WOFF-1-Fassung mit — 112 Dateien, 1,58 MB, davon 902 kB WOFF 1, das kein Browser dieser App je abruft. Jetzt stehen die @font-face-Regeln direkt in index.css: nur latin, nur WOFF 2, nur die Schnitte, die per grep ueber die font-*-Klassen wirklich belegt sind. Nebenbei behoben: JetBrains Mono 600/700 fehlten komplett — die 19 Stellen mit `font-mono font-bold/semibold` wurden vom Browser synthetisch fettgerechnet. Jetzt echte Schnitte; bei Monospace ist die Laufweite gleich, kein Layout-Versatz. 3) Recharts aus dem Startbuendel. Das Cockpit ist die Startseite und laedt daher NICHT lazy; ueber SystemStatusCard/TokenPerformanceCard zog es Recharts samt d3 in index-*.js. LiveAreaChart ist jetzt eine Lazy-Huelle (Suspense mit hoehengleichem Platzhalter, damit nichts springt), die Recharts-Umsetzung liegt in LiveAreaChartImpl.tsx und kommt als eigener Chunk nach (105 kB gzip). 4) index.css: height 100dvh mit 100% als Rueckfall. Auf Mobilbrowsern mit einfahrender Adressleiste ist 100 % nicht die sichtbare Hoehe. Dazu ein Buendel-Budget in beiden Ampel-Dateien (.gitea/ = MC2-Fassung, deploy/ = universelle Vorlage): Start-Chunk und dist-Gesamtgroesse werden am FRISCHEN Build im Runner gemessen. Bewusst kein Vergleich mit dem committeten dist — der waere ueber Node-Versionen hinweg flatterhaft und wuerde dauerhaft rot leuchten, was das Signal zerstoert. Verifiziert gegen die Box (Frontend-Dev mit MC_API_TARGET=192.168.178.151:9001): Cockpit rendert mit Live-Daten, keine Konsolenfehler, alle 11 Schriftschnitte registriert, LiveAreaChartImpl + recharts laden nachweislich als Nachlade-Chunk. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
257 lines
9.4 KiB
CSS
257 lines
9.4 KiB
CSS
@import "tailwindcss";
|
|
|
|
/* Fonts lokal gebündelt (@fontsource) — die Box-UI braucht kein Internet für Schrift.
|
|
Bewusst KEINE Sammel-Importe (`@fontsource/inter/400.css`): die ziehen alle Subsets
|
|
(latin-ext, griechisch, kyrillisch) UND je eine WOFF-1-Fassung mit — 112 Dateien,
|
|
1,58 MB, davon 57 % WOFF 1, das kein Browser dieser App je abruft. Hier stehen
|
|
deshalb die @font-face-Regeln selbst: nur `latin`, nur WOFF 2, nur die Schnitte,
|
|
die im Code wirklich vorkommen (geprüft per grep über die font-*-Klassen).
|
|
Neuen Schnitt gebraucht? Zeile ergänzen — nicht auf den Sammel-Import zurückfallen. */
|
|
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 400;
|
|
src: url("@fontsource/inter/files/inter-latin-400-normal.woff2") format("woff2"); }
|
|
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 500;
|
|
src: url("@fontsource/inter/files/inter-latin-500-normal.woff2") format("woff2"); }
|
|
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 600;
|
|
src: url("@fontsource/inter/files/inter-latin-600-normal.woff2") format("woff2"); }
|
|
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 700;
|
|
src: url("@fontsource/inter/files/inter-latin-700-normal.woff2") format("woff2"); }
|
|
|
|
/* Space Grotesk trägt nur Überschriften (font-space): 400 als Grundschnitt, 600/700 benutzt. */
|
|
@font-face { font-family: "Space Grotesk"; font-style: normal; font-display: swap; font-weight: 400;
|
|
src: url("@fontsource/space-grotesk/files/space-grotesk-latin-400-normal.woff2") format("woff2"); }
|
|
@font-face { font-family: "Space Grotesk"; font-style: normal; font-display: swap; font-weight: 600;
|
|
src: url("@fontsource/space-grotesk/files/space-grotesk-latin-600-normal.woff2") format("woff2"); }
|
|
@font-face { font-family: "Space Grotesk"; font-style: normal; font-display: swap; font-weight: 700;
|
|
src: url("@fontsource/space-grotesk/files/space-grotesk-latin-700-normal.woff2") format("woff2"); }
|
|
|
|
/* JetBrains Mono: 600 und 700 gab es bisher NICHT — die 19 `font-mono font-bold/semibold`
|
|
Stellen wurden vom Browser synthetisch fettgerechnet (verschmiert). Bei Monospace ist die
|
|
Laufweite über alle Schnitte gleich, das Nachrüsten verschiebt also kein Layout. */
|
|
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 400;
|
|
src: url("@fontsource/jetbrains-mono/files/jetbrains-mono-latin-400-normal.woff2") format("woff2"); }
|
|
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 500;
|
|
src: url("@fontsource/jetbrains-mono/files/jetbrains-mono-latin-500-normal.woff2") format("woff2"); }
|
|
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 600;
|
|
src: url("@fontsource/jetbrains-mono/files/jetbrains-mono-latin-600-normal.woff2") format("woff2"); }
|
|
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 700;
|
|
src: url("@fontsource/jetbrains-mono/files/jetbrains-mono-latin-700-normal.woff2") format("woff2"); }
|
|
|
|
|
|
/* Design-System: EINE Akzentfarbe Teal, bewusst dark-only (Glassmorphismus-Look).
|
|
Karten-Optik lebt in .mc-card / .mc-card-sm (unten) — Komponenten sagen es explizit,
|
|
statt dass CSS Utility-Klassen-Kombinationen errät. */
|
|
|
|
:root {
|
|
--background: 224 30% 6%;
|
|
--foreground: 210 20% 92%;
|
|
--card: 224 25% 10%;
|
|
--card-foreground: 210 20% 94%;
|
|
--popover: 224 28% 9%;
|
|
--popover-foreground: 210 20% 94%;
|
|
--primary: 172 72% 50%;
|
|
--primary-foreground: 224 47% 8%;
|
|
--muted: 220 16% 14%;
|
|
--muted-foreground: 215 14% 64%;
|
|
--accent: 220 16% 16%;
|
|
--accent-foreground: 210 20% 94%;
|
|
--border: 222 18% 23%;
|
|
--input: 222 18% 23%;
|
|
--ring: 172 72% 50%;
|
|
--radius: 0.75rem;
|
|
color-scheme: dark;
|
|
}
|
|
|
|
@theme inline {
|
|
--color-background: hsl(var(--background));
|
|
--color-foreground: hsl(var(--foreground));
|
|
--color-card: hsl(var(--card));
|
|
--color-card-foreground: hsl(var(--card-foreground));
|
|
--color-popover: hsl(var(--popover));
|
|
--color-popover-foreground: hsl(var(--popover-foreground));
|
|
--color-primary: hsl(var(--primary));
|
|
--color-primary-foreground: hsl(var(--primary-foreground));
|
|
--color-muted: hsl(var(--muted));
|
|
--color-muted-foreground: hsl(var(--muted-foreground));
|
|
--color-accent: hsl(var(--accent));
|
|
--color-accent-foreground: hsl(var(--accent-foreground));
|
|
--color-border: hsl(var(--border));
|
|
--color-input: hsl(var(--input));
|
|
--color-ring: hsl(var(--ring));
|
|
--radius-lg: var(--radius);
|
|
--radius-md: calc(var(--radius) - 2px);
|
|
--radius-sm: calc(var(--radius) - 4px);
|
|
--font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
|
|
--font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
|
|
--font-space: "Space Grotesk", sans-serif;
|
|
}
|
|
|
|
/* Feste Viewport-Höhe: die App scrollt intern (main), nicht als Seite.
|
|
100dvh statt 100% — auf Mobilbrowsern mit einfahrender Adressleiste ist 100 % nicht
|
|
die sichtbare Höhe, der untere Rand (Statuszeile) verschwand darunter.
|
|
Die 100%-Zeile bleibt als Rückfall für Browser ohne dvh-Einheit stehen. */
|
|
html,
|
|
body,
|
|
#root {
|
|
height: 100%;
|
|
height: 100dvh;
|
|
overflow: hidden;
|
|
}
|
|
|
|
body {
|
|
margin: 0;
|
|
background-color: hsl(var(--background));
|
|
color: hsl(var(--foreground));
|
|
font-family: var(--font-sans);
|
|
-webkit-font-smoothing: antialiased;
|
|
}
|
|
|
|
* {
|
|
border-color: hsl(var(--border) / 0.85);
|
|
outline-color: hsl(var(--primary) / 0.5);
|
|
}
|
|
|
|
/* Sichtbarer Fokus für Tastatur-Nutzer auf allen interaktiven Elementen. */
|
|
:focus-visible {
|
|
outline: 2px solid hsl(var(--primary) / 0.7);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
/* Eingabefelder: Teal-Fokus statt Browser-Default (ungeschichtet → gewinnt ohne !important). */
|
|
input:focus, textarea:focus, select:focus {
|
|
border-color: hsl(var(--primary));
|
|
box-shadow: 0 0 0 2px hsl(var(--primary) / 0.15);
|
|
outline: none;
|
|
}
|
|
|
|
/* Schmale Teal-Scrollbars im Glas-Look (EINE Definition). */
|
|
::-webkit-scrollbar {
|
|
width: 6px;
|
|
height: 6px;
|
|
}
|
|
::-webkit-scrollbar-track {
|
|
background: transparent;
|
|
}
|
|
::-webkit-scrollbar-thumb {
|
|
background: hsl(var(--primary) / 0.25);
|
|
border-radius: 9999px;
|
|
}
|
|
::-webkit-scrollbar-thumb:hover {
|
|
background: hsl(var(--primary) / 0.5);
|
|
}
|
|
|
|
/* ==========================================================================
|
|
Karten-Optik (ehem. „HUD 3.0"-Layer, jetzt explizite Klassen ohne !important;
|
|
ungeschichtete Regeln schlagen Tailwind-Utilities von selbst)
|
|
========================================================================== */
|
|
|
|
/* Große Inhalts-Karte: Glas-Grund, Farbverlaufs-Linie oben, sanftes Anheben bei Hover. */
|
|
.mc-card {
|
|
position: relative;
|
|
overflow: hidden;
|
|
border-radius: 1rem;
|
|
border: 1px solid hsl(var(--border) / 0.95);
|
|
background-color: hsl(var(--card) / 0.85);
|
|
box-shadow: 0 10px 30px -15px rgb(0 0 0 / 0.45), inset 0 1px 0 0 rgb(255 255 255 / 0.05);
|
|
transition:
|
|
transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
|
|
background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
|
|
border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
|
|
box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
}
|
|
.mc-card::before {
|
|
content: "";
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: 3.5px;
|
|
background: linear-gradient(90deg, hsl(var(--primary)), #6366f1, #a855f7);
|
|
opacity: 0.75;
|
|
transition: opacity 0.3s ease;
|
|
}
|
|
.mc-card:hover {
|
|
transform: translateY(-3px);
|
|
background-color: hsl(var(--card) / 0.92);
|
|
border-color: hsl(var(--primary) / 0.35);
|
|
box-shadow: 0 20px 40px -20px rgb(0 0 0 / 0.65), 0 0 18px 2px hsl(var(--primary) / 0.05);
|
|
}
|
|
.mc-card:hover::before {
|
|
opacity: 1;
|
|
}
|
|
|
|
/* Kleine Karte / Listen-Container: ruhiger, ohne Verlaufs-Linie und Anheben. */
|
|
.mc-card-sm {
|
|
border-radius: 0.75rem;
|
|
border: 1px solid hsl(var(--border) / 0.9);
|
|
background-color: hsl(var(--card) / 0.88);
|
|
transition: background-color 0.2s ease, border-color 0.2s ease;
|
|
}
|
|
.mc-card-sm:hover {
|
|
background-color: hsl(var(--card) / 0.95);
|
|
border-color: hsl(var(--primary) / 0.3);
|
|
}
|
|
|
|
/* Aktiver Navigations-Eintrag in der Sidebar (ausgeklappt / eingeklappt). */
|
|
.nav-active {
|
|
background: linear-gradient(90deg, hsl(var(--primary) / 0.18), rgb(99 102 241 / 0.12));
|
|
color: hsl(var(--primary));
|
|
border-left: 3.5px solid hsl(var(--primary));
|
|
border-radius: 0 var(--radius) var(--radius) 0;
|
|
padding-left: calc(0.75rem - 3.5px);
|
|
box-shadow: inset 0 1px 0 0 rgb(255 255 255 / 0.02);
|
|
}
|
|
.nav-active-collapsed {
|
|
background: hsl(var(--primary) / 0.18);
|
|
color: hsl(var(--primary));
|
|
box-shadow: 0 0 12px 1px hsl(var(--primary) / 0.1);
|
|
border: 1px solid hsl(var(--primary) / 0.3);
|
|
}
|
|
|
|
/* SVG-Fluss-Animation (Modell-Cockpit-Verdrahtung). */
|
|
@keyframes flow-cyan {
|
|
0% {
|
|
stroke-dasharray: 6 3;
|
|
stroke-dashoffset: 18;
|
|
}
|
|
100% {
|
|
stroke-dasharray: 6 3;
|
|
stroke-dashoffset: 0;
|
|
}
|
|
}
|
|
|
|
.animate-flow-cyan {
|
|
animation: flow-cyan 1.2s linear infinite;
|
|
}
|
|
|
|
/* Bewegungs-Sensibilität respektieren: Animationen/Transitions praktisch aus. */
|
|
@media (prefers-reduced-motion: reduce) {
|
|
*, *::before, *::after {
|
|
animation-duration: 0.01ms !important;
|
|
animation-iteration-count: 1 !important;
|
|
transition-duration: 0.01ms !important;
|
|
scroll-behavior: auto !important;
|
|
}
|
|
}
|
|
|
|
/* WQHD & 4K Monitor Responsive Scaling (Fluid Typography & UI Scaling) */
|
|
@media (min-width: 1440px) {
|
|
html {
|
|
font-size: 16.5px;
|
|
}
|
|
}
|
|
@media (min-width: 1920px) {
|
|
html {
|
|
font-size: 17.5px;
|
|
}
|
|
}
|
|
@media (min-width: 2560px) {
|
|
html {
|
|
font-size: 19px;
|
|
}
|
|
}
|
|
@media (min-width: 3440px) {
|
|
html {
|
|
font-size: 20px;
|
|
}
|
|
}
|