/* J.A.R.V.I.S. Cockpit – HUD-Stil */

:root {
  --bg: #04070b;
  --bg-2: #070d14;
  --panel: rgba(8, 20, 30, 0.62);
  --panel-solid: #08131c;
  --line: rgba(80, 200, 255, 0.16);
  --line-strong: rgba(80, 200, 255, 0.38);
  --cyan: #38d4ff;
  --cyan-2: #8ff0ff;
  --cyan-dim: #1d7fa3;
  --glow: 0 0 12px rgba(56, 212, 255, 0.55), 0 0 32px rgba(56, 212, 255, 0.2);
  --text: #cfeaf5;
  --muted: #6f8fa0;
  --faint: #3b5566;
  --up: #3dffb5;
  --down: #ff5470;
  --warn: #ffbe4d;
  --font-display: 'Orbitron', 'Rajdhani', sans-serif;
  --font-ui: 'Rajdhani', 'Segoe UI', sans-serif;
  --font-num: 'Share Tech Mono', ui-monospace, monospace;
  --r: 4px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::before { /* Raster + Vignette */
  content: '';
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(20, 90, 130, 0.22), transparent 60%),
    radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.85) 100%),
    linear-gradient(rgba(56, 212, 255, 0.035) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(56, 212, 255, 0.035) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--bg);
}
body::after { /* Scanlines */
  content: '';
  position: fixed; inset: 0; z-index: 100; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.12) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--cyan-2); }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(56, 212, 255, 0.35); }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--cyan-dim); border-radius: 3px; }
::-webkit-scrollbar-track { background: transparent; }

.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.up { color: var(--up); }
.down { color: var(--down); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.cap { font-family: var(--font-display); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.glow { text-shadow: var(--glow); }
.hidden { display: none !important; }

/* ------------------------------------------------------------------ Layout */
.app {
  display: grid;
  grid-template-rows: 58px 1fr 40px;
  height: 100vh;
  min-height: 640px;
}
.topbar {
  display: flex; align-items: center; gap: 24px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(5, 14, 22, 0.95), rgba(5, 14, 22, 0.6));
  position: relative;
}
.topbar::after {
  content: ''; position: absolute; left: 30%; right: 30%; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  box-shadow: var(--glow);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 220px; cursor: pointer; }
.brand svg { width: 30px; height: 30px; filter: drop-shadow(0 0 6px var(--cyan)); }
.brand b { font-family: var(--font-display); font-size: 15px; letter-spacing: 0.38em; color: var(--cyan-2); text-shadow: var(--glow); font-weight: 700; }
.brand small { display: block; font-family: var(--font-display); font-size: 8px; letter-spacing: 0.5em; color: var(--muted); margin-top: 2px; }

.nav { display: flex; gap: 4px; flex: 1; justify-content: center; }
.nav a {
  font-family: var(--font-display); font-size: 10px; letter-spacing: 0.24em;
  color: var(--muted); padding: 8px 14px; border: 1px solid transparent; border-radius: 2px;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  transition: color .2s, background .2s;
}
.nav a:hover { color: var(--cyan-2); background: rgba(56, 212, 255, 0.06); }
.nav a.active { color: #001018; background: var(--cyan); box-shadow: var(--glow); }

.tb-stats { display: flex; align-items: center; gap: 22px; }
.tb-stat { text-align: right; line-height: 1.05; }
.tb-stat .v { font-family: var(--font-num); font-size: 17px; color: var(--text); }
.tb-stat .l { font-family: var(--font-display); font-size: 8px; letter-spacing: 0.28em; color: var(--muted); }
.tb-clock .v { font-size: 22px; color: var(--cyan-2); text-shadow: var(--glow); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--up); box-shadow: 0 0 8px var(--up); display: inline-block; animation: pulse 2.4s infinite; }
.dot.off { background: var(--down); box-shadow: 0 0 8px var(--down); }

main#view { overflow: hidden; position: relative; }

.tb-btn {
  width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer;
  background: rgba(56, 212, 255, 0.05); border: 1px solid var(--line); border-radius: 50%; color: var(--cyan-2); transition: all .15s;
}
.tb-btn:hover { border-color: var(--cyan); box-shadow: var(--glow); }
.tb-btn svg { width: 16px; height: 16px; }
.tb-btn .x { display: none; }
.tb-btn.off { color: var(--faint); }
.tb-btn.off .w { display: none; }
.tb-btn.off .x { display: inline; }
body.speaking #tb-voice { color: #001018; background: var(--cyan); box-shadow: var(--glow); animation: pulse .6s infinite; }
body.speaking .reactor .core-pulse { animation: corePulse .35s ease-in-out infinite; }
body.speaking .reactor .spin-mid { animation-duration: 6s; }
body.speaking .reactor #sec-ring { stroke: #8ff0ff; }
.reactor .core-hit { cursor: pointer; }

/* ------------------------------------------------------------------ Panels */
.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 16px;
  backdrop-filter: blur(4px);
  animation: boot .6s both;
}
.panel::before, .panel::after { /* HUD-Ecken */
  content: ''; position: absolute; width: 12px; height: 12px; pointer-events: none;
  border-color: var(--cyan); border-style: solid; opacity: .8;
}
.panel::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.panel::after { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }
.panel-h {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: -2px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.panel-h h3 {
  margin: 0; font-family: var(--font-display); font-size: 11px; font-weight: 600;
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--cyan-2);
  display: flex; align-items: center; gap: 9px;
}
.panel-h h3 svg { width: 15px; height: 15px; stroke: var(--cyan); }
.panel-h .act { display: flex; gap: 6px; align-items: center; }

.btn {
  background: rgba(56, 212, 255, 0.07); border: 1px solid var(--line-strong); color: var(--cyan-2);
  font-family: var(--font-display); font-size: 9.5px; letter-spacing: 0.2em; text-transform: uppercase;
  padding: 7px 12px; border-radius: 2px; cursor: pointer; transition: all .15s; white-space: nowrap;
}
.btn:hover { background: rgba(56, 212, 255, 0.18); box-shadow: var(--glow); }
.btn.primary { background: var(--cyan); color: #001018; border-color: var(--cyan); }
.btn.ghost { border-color: transparent; background: none; color: var(--muted); }
.btn.ghost:hover { color: var(--cyan-2); box-shadow: none; }
.btn.sm { padding: 4px 8px; font-size: 8.5px; }
.btn.on { background: var(--cyan); color: #001018; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 2px; }
.seg .btn { border: 0; border-radius: 0; background: none; color: var(--muted); }
.seg .btn.on { background: rgba(56, 212, 255, 0.2); color: var(--cyan-2); box-shadow: none; }

.input, input[type=text], input[type=password], input[type=date], input[type=datetime-local], input[type=number], input[type=url], select, textarea {
  background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); border-radius: 2px;
  padding: 8px 10px; color: var(--text); outline: none; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 1px rgba(56, 212, 255, 0.25), var(--glow); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type=date]::-webkit-calendar-picker-indicator, input[type=datetime-local]::-webkit-calendar-picker-indicator { filter: invert(.7) sepia(1) hue-rotate(160deg); }
input[type=range] { accent-color: var(--cyan); width: 100%; height: 34px; background: none; border: 0; padding: 0; }
input[type=checkbox] { accent-color: var(--cyan); }
label.f { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }

/* ------------------------------------------------------------------ HUD-Startseite */
.hud {
  display: grid;
  grid-template-columns: minmax(300px, 340px) 1fr minmax(330px, 380px);
  gap: 18px;
  height: 100%;
  padding: 18px 22px;
}
.col { display: flex; flex-direction: column; gap: 16px; min-height: 0; }
.col > .panel { min-height: 0; }
.col .grow { flex: 1; display: flex; flex-direction: column; }
.col .grow .scroll { flex: 1; overflow: auto; min-height: 0; margin-right: -8px; padding-right: 8px; }
.center { position: relative; display: grid; place-items: center; min-height: 0; }

.greet { position: absolute; top: 4px; left: 0; right: 0; text-align: center; }
.greet .hello { font-family: var(--font-display); font-size: 12px; letter-spacing: 0.45em; color: var(--muted); text-transform: uppercase; }
.greet .line { font-size: 14px; color: var(--cyan-2); margin-top: 6px; opacity: .85; min-height: 18px; }

.reactor-wrap { position: relative; width: min(92%, calc(100vh - 240px)); max-width: 740px; margin-top: 24px; aspect-ratio: 1; }
.reactor { width: 100%; height: 100%; overflow: visible; }
.reactor .spin-slow { animation: spin 120s linear infinite; transform-origin: 300px 300px; }
.reactor .spin-rev { animation: spin 80s linear infinite reverse; transform-origin: 300px 300px; }
.reactor .spin-mid { animation: spin 40s linear infinite; transform-origin: 300px 300px; }
.reactor .spin-fast { animation: spin 18s linear infinite reverse; transform-origin: 300px 300px; }
.reactor .core-pulse { animation: corePulse 4s ease-in-out infinite; transform-origin: 300px 300px; }
.reactor .modbtn { cursor: pointer; }
.reactor .modbtn path { fill: rgba(56, 212, 255, 0.06); stroke: rgba(80, 200, 255, 0.45); stroke-width: 1; transition: fill .2s; }
.reactor .modbtn:hover path { fill: rgba(56, 212, 255, 0.28); stroke: var(--cyan-2); filter: url(#glow); }
.reactor .modbtn text { fill: var(--cyan-2); font-family: var(--font-display); font-size: 10.5px; letter-spacing: 2.6px; pointer-events: none; }
.reactor .modbtn .sub { fill: var(--muted); font-size: 7.5px; letter-spacing: 1.6px; font-family: var(--font-num); }
.reactor .gauge-label { fill: var(--muted); font-family: var(--font-display); font-size: 8px; letter-spacing: 2px; }
.reactor .gauge-val { fill: var(--cyan-2); font-family: var(--font-num); font-size: 13px; letter-spacing: 0; }
.reactor .clock { fill: #e8fbff; font-family: var(--font-display); font-weight: 500; font-size: 64px; letter-spacing: 2px; filter: url(#glow); }
.reactor .clock-s { fill: var(--cyan); font-family: var(--font-num); font-size: 16px; }
.reactor .date { fill: var(--cyan-2); font-family: var(--font-display); font-size: 11px; letter-spacing: 4px; }
.reactor .depot { fill: var(--text); font-family: var(--font-num); font-size: 15px; }

.mini-gauge { position: absolute; width: 92px; text-align: center; cursor: pointer; }
.mini-gauge svg { width: 74px; height: 74px; }
.mini-gauge .v { font-family: var(--font-num); font-size: 13px; color: var(--cyan-2); margin-top: -2px; }
.mini-gauge .l { font-family: var(--font-display); font-size: 7.5px; letter-spacing: 0.28em; color: var(--muted); }

/* Aufgaben */
.todo-add { display: flex; gap: 6px; margin-bottom: 10px; }
.todo-add input { padding: 7px 9px; }
.todo { display: flex; align-items: flex-start; gap: 10px; padding: 7px 2px; border-bottom: 1px dashed rgba(80, 200, 255, 0.08); }
.todo:last-child { border-bottom: 0; }
.todo .chk {
  flex: none; width: 15px; height: 15px; margin-top: 2px; border: 1px solid var(--cyan-dim); border-radius: 2px; cursor: pointer;
  display: grid; place-items: center; transition: all .15s;
}
.todo .chk:hover { border-color: var(--cyan); box-shadow: var(--glow); }
.todo.done .chk { background: var(--cyan); border-color: var(--cyan); }
.todo.done .chk::after { content: ''; width: 7px; height: 4px; border: 2px solid #001018; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.todo .t { flex: 1; line-height: 1.25; }
.todo.done .t { color: var(--faint); text-decoration: line-through; }
.todo .meta { font-size: 11px; color: var(--muted); font-family: var(--font-num); }
.todo .meta.over { color: var(--down); }
.todo .prio { width: 3px; align-self: stretch; border-radius: 2px; background: transparent; }
.todo .prio.p2 { background: var(--down); box-shadow: 0 0 6px var(--down); }
.todo .prio.p0 { background: var(--faint); }
.todo .del { opacity: 0; cursor: pointer; color: var(--muted); padding: 0 4px; }
.todo:hover .del { opacity: 1; }

/* Termine */
.ev { display: grid; grid-template-columns: 54px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px dashed rgba(80, 200, 255, 0.08); }
.ev:last-child { border-bottom: 0; }
.ev .when { font-family: var(--font-num); font-size: 13px; color: var(--cyan-2); line-height: 1.15; }
.ev .when small { display: block; font-size: 10px; color: var(--muted); }
.ev .what { border-left: 2px solid var(--cal, var(--cyan)); padding-left: 9px; line-height: 1.25; }
.ev .what small { display: block; color: var(--muted); font-size: 11.5px; }
.day-h { font-family: var(--font-display); font-size: 9px; letter-spacing: 0.3em; color: var(--muted); margin: 10px 0 2px; text-transform: uppercase; }
.day-h:first-child { margin-top: 0; }
.day-h.today { color: var(--cyan); }

/* Wetter */
.wx-now { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-items: center; }
.wx-now .icon svg { width: 62px; height: 62px; stroke: var(--cyan-2); filter: drop-shadow(0 0 6px var(--cyan)); }
.wx-now .temp { font-family: var(--font-display); font-size: 44px; font-weight: 500; color: #e8fbff; text-shadow: var(--glow); line-height: 1; }
.wx-now .temp sup { font-size: 18px; color: var(--cyan); }
.wx-now .cond { font-size: 16px; color: var(--cyan-2); }
.wx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 14px; font-size: 12.5px; margin: 12px 0 10px; }
.wx-grid span:nth-child(odd) { color: var(--muted); }
.wx-grid .num { text-align: right; }
.wx-days { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; text-align: center; border-top: 1px solid var(--line); padding-top: 10px; }
.wx-days .d { font-family: var(--font-display); font-size: 8.5px; letter-spacing: 0.2em; color: var(--muted); }
.wx-days svg { width: 26px; height: 26px; stroke: var(--cyan); margin: 4px 0 2px; }
.wx-days .t { font-family: var(--font-num); font-size: 12px; }
.wx-days .t span { color: var(--muted); }
.wx-days .p { font-size: 10px; color: var(--cyan-dim); font-family: var(--font-num); }

/* Depot-Kachel */
.dp-big { font-family: var(--font-display); font-size: 27px; color: #e8fbff; text-shadow: var(--glow); letter-spacing: 1px; }
.dp-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.movers { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; margin-top: 10px; font-size: 12.5px; }
.movers a { display: flex; justify-content: space-between; color: var(--text); }
.movers a:hover { color: var(--cyan-2); }

/* News */
.news-item { display: block; padding: 8px 0; border-bottom: 1px dashed rgba(80, 200, 255, 0.08); color: var(--text); line-height: 1.3; }
.news-item:last-child { border-bottom: 0; }
.news-item:hover { color: var(--cyan-2); }
.news-item .src { font-size: 11px; color: var(--muted); margin-top: 3px; display: flex; gap: 8px; }
.news-item .tag { color: var(--cyan); font-family: var(--font-display); font-size: 8.5px; letter-spacing: 0.18em; text-transform: uppercase; }

/* Links */
.links { display: flex; flex-wrap: wrap; gap: 6px; }
.links a { font-size: 12px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 2px; color: var(--text); }
.links a:hover { border-color: var(--cyan); color: var(--cyan-2); box-shadow: var(--glow); }

/* Ticker */
.ticker { border-top: 1px solid var(--line); overflow: hidden; position: relative; background: rgba(4, 10, 16, 0.85); display: flex; align-items: center; }
.ticker::before, .ticker::after { content: ''; position: absolute; top: 0; bottom: 0; width: 80px; z-index: 2; pointer-events: none; }
.ticker::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.ticker::after { right: 0; background: linear-gradient(-90deg, var(--bg), transparent); }
.ticker-track { display: flex; gap: 38px; white-space: nowrap; animation: marquee 90s linear infinite; padding-left: 30px; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.tick { display: inline-flex; gap: 8px; align-items: baseline; font-size: 13px; cursor: pointer; }
.tick b { font-family: var(--font-display); font-size: 10px; letter-spacing: 0.16em; color: var(--cyan-2); font-weight: 600; }

/* ------------------------------------------------------------------ Modul-Seiten */
.page { height: 100%; overflow: auto; padding: 20px 26px 40px; }
.page-h { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-h h1 { margin: 0; font-family: var(--font-display); font-size: 20px; letter-spacing: 0.32em; font-weight: 600; color: var(--cyan-2); text-shadow: var(--glow); text-transform: uppercase; }
.page-h .sub { color: var(--muted); font-size: 13px; }
.page-h .spacer { flex: 1; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: 2fr 1fr; }
.g2e { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { padding: 12px 14px; }
.kpi .l { font-family: var(--font-display); font-size: 8.5px; letter-spacing: 0.26em; color: var(--muted); text-transform: uppercase; }
.kpi .v { font-family: var(--font-num); font-size: 22px; margin-top: 6px; color: #e8fbff; }
.kpi .s { font-family: var(--font-num); font-size: 12.5px; margin-top: 2px; }
.kpi.hero .v { font-family: var(--font-display); font-size: 26px; text-shadow: var(--glow); }

/* Tabellen */
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th {
  text-align: right; font-family: var(--font-display); font-size: 8.5px; font-weight: 500; letter-spacing: 0.22em;
  color: var(--muted); text-transform: uppercase; padding: 8px 10px; border-bottom: 1px solid var(--line-strong);
  cursor: pointer; user-select: none; white-space: nowrap; position: sticky; top: 0; background: var(--panel-solid);
}
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl th.sorted { color: var(--cyan-2); }
.tbl td { text-align: right; padding: 9px 10px; border-bottom: 1px solid rgba(80, 200, 255, 0.07); white-space: nowrap; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover { background: rgba(56, 212, 255, 0.07); }
.tbl .nm { font-weight: 600; color: var(--text); }
.tbl .nm small { display: block; font-weight: 500; color: var(--muted); font-size: 11px; font-family: var(--font-num); }
.tbl tfoot td { border-top: 1px solid var(--line-strong); border-bottom: 0; font-weight: 600; }
.wbar { display: inline-block; width: 60px; height: 4px; background: rgba(56, 212, 255, 0.12); vertical-align: middle; margin-left: 8px; border-radius: 2px; overflow: hidden; }
.wbar i { display: block; height: 100%; background: var(--cyan); box-shadow: var(--glow); }
.pill { font-family: var(--font-num); font-size: 12px; padding: 2px 7px; border-radius: 2px; }
.pill.up { background: rgba(61, 255, 181, 0.1); }
.pill.down { background: rgba(255, 84, 112, 0.1); }
.src-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; margin-left: 6px; vertical-align: middle; }
.src-dot.live { background: var(--up); box-shadow: 0 0 6px var(--up); }
.src-dot.export, .src-dot.cache { background: var(--warn); }

/* Charts */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .axis text { fill: var(--muted); font-family: var(--font-num); font-size: 10.5px; }
.chart .grid line { stroke: rgba(80, 200, 255, 0.07); }
.chart .tip {
  position: absolute; pointer-events: none; background: rgba(4, 12, 18, 0.95); border: 1px solid var(--line-strong);
  padding: 7px 10px; font-size: 12px; border-radius: 2px; white-space: nowrap; transform: translate(-50%, -110%);
  box-shadow: var(--glow); z-index: 5;
}
.chart .tip b { font-family: var(--font-num); color: #e8fbff; font-weight: 400; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 3px; margin-right: 6px; vertical-align: middle; }

.perf-row { display: grid; grid-template-columns: 150px 1fr 70px; gap: 10px; align-items: center; font-size: 12.5px; padding: 3px 0; cursor: pointer; }
.perf-row:hover { color: var(--cyan-2); }
.perf-row .bar { height: 8px; position: relative; }
.perf-row .bar i { position: absolute; top: 0; bottom: 0; border-radius: 1px; }
.perf-row .bar::before { content: ''; position: absolute; left: var(--zero); top: -3px; bottom: -3px; width: 1px; background: var(--line-strong); }

/* Kalender */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.cal-grid .hd { background: var(--panel-solid); text-align: center; padding: 6px; font-family: var(--font-display); font-size: 8.5px; letter-spacing: 0.24em; color: var(--muted); }
.cal-grid .c { background: rgba(6, 15, 22, 0.92); min-height: 96px; padding: 5px 6px; font-size: 11.5px; overflow: hidden; }
.cal-grid .c.other { opacity: .38; }
.cal-grid .c.today { box-shadow: inset 0 0 0 1px var(--cyan); background: rgba(56, 212, 255, 0.07); }
.cal-grid .c .n { font-family: var(--font-num); color: var(--muted); font-size: 12px; margin-bottom: 3px; }
.cal-grid .c.today .n { color: var(--cyan-2); }
.cal-grid .e { background: rgba(56, 212, 255, 0.12); border-left: 2px solid var(--cal, var(--cyan)); padding: 1px 4px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: 1px; }

/* Formulare / Einstellungen */
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; align-items: end; margin-bottom: 8px; }
.list-edit { display: grid; gap: 6px; }
.list-edit .r { display: grid; grid-template-columns: 1fr 2fr auto; gap: 6px; }
.drop {
  display: block;
  border: 1px dashed var(--line-strong); border-radius: 4px; padding: 26px; text-align: center; color: var(--muted);
  transition: all .2s; cursor: pointer;
}
.drop.over, .drop:hover { border-color: var(--cyan); color: var(--cyan-2); background: rgba(56, 212, 255, 0.05); }

.toast {
  position: fixed; bottom: 56px; left: 50%; transform: translateX(-50%); z-index: 200;
  background: var(--panel-solid); border: 1px solid var(--cyan); color: var(--cyan-2); padding: 10px 18px;
  box-shadow: var(--glow); font-size: 14px; border-radius: 2px; animation: boot .3s both;
}
.toast.err { border-color: var(--down); color: var(--down); }

.empty { color: var(--faint); font-size: 13px; padding: 8px 0; }
.loading { color: var(--muted); font-family: var(--font-display); font-size: 9px; letter-spacing: 0.3em; animation: blink 1.2s infinite; }
.note { white-space: pre-wrap; font-size: 13.5px; padding: 8px 0; border-bottom: 1px dashed rgba(80, 200, 255, 0.08); }

/* ------------------------------------------------------------------ Animationen */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes corePulse { 0%, 100% { opacity: .85; } 50% { opacity: 1; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes blink { 50% { opacity: .3; } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes boot { from { opacity: 0; transform: translateY(6px); filter: blur(2px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes draw { from { stroke-dashoffset: var(--len, 2000); } to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ------------------------------------------------------------------ Responsiv */
@media (max-width: 1280px) {
  .hud { grid-template-columns: 300px 1fr 330px; gap: 14px; padding: 14px; }
  .tb-stats .hide-md { display: none; }
}
@media (max-width: 1050px) {
  .app { height: auto; min-height: 100vh; }
  main#view { overflow: visible; }
  .hud { grid-template-columns: 1fr 1fr; height: auto; }
  .hud .center { grid-column: 1 / -1; order: -1; padding-top: 40px; }
  .reactor-wrap { width: min(100%, 560px); }
  .g2, .g3 { grid-template-columns: 1fr; }
  .nav { display: none; }
}
@media (max-width: 700px) {
  .hud { grid-template-columns: 1fr; padding: 12px 16px; }
  .topbar { padding: 0 16px; gap: 12px; }
  .brand { min-width: 0; }
  .brand small, .tb-stats .hide-sm { display: none; }
  .page { padding: 16px; }
  .g2e { grid-template-columns: 1fr; }
  .mini-gauge { display: none; }
  .tbl .hide-sm { display: none; }
  .perf-row { grid-template-columns: 100px 1fr 60px; }
}
