/* JARVIS — Kommandozentrale */
:root {
  --bg: #04060a;
  --bg-2: #070b12;
  --panel: rgba(12, 18, 28, 0.72);
  --panel-solid: #0b111b;
  --line: rgba(120, 200, 255, 0.10);
  --line-2: rgba(120, 200, 255, 0.22);
  --text: #e6f1ff;
  --muted: #7d8da6;
  --dim: #4a5870;
  --cyan: #3ee6ff;
  --cyan-2: #0fb4ff;
  --violet: #8b7bff;
  --ok: #33f0a8;
  --warn: #ffb547;
  --crit: #ff4d6a;
  --glow: 0 0 24px rgba(62, 230, 255, 0.25);
  --radius: 18px;
  --font: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Chakra Petch", "Onest", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--cyan); text-decoration: none; }
::selection { background: rgba(62, 230, 255, .3); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(120, 200, 255, .15); border-radius: 8px; }

/* ---------- Hintergrund ---------- */
.backdrop { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.backdrop .grid {
  position: absolute; inset: -50%;
  background-image:
    linear-gradient(rgba(62, 230, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(62, 230, 255, .045) 1px, transparent 1px);
  background-size: 56px 56px;
  transform: perspective(900px) rotateX(58deg) translateY(-8%);
  mask-image: radial-gradient(ellipse at 50% 30%, #000 10%, transparent 65%);
  animation: gridmove 22s linear infinite;
}
@keyframes gridmove { to { background-position: 0 560px, 0 0; } }
.backdrop .aurora {
  position: absolute; width: 1100px; height: 1100px; border-radius: 50%;
  filter: blur(120px); opacity: .22;
  background: radial-gradient(circle, var(--cyan-2), transparent 60%);
  top: -520px; left: 50%; transform: translateX(-50%);
  animation: breathe 9s ease-in-out infinite;
}
.backdrop .aurora.b { background: radial-gradient(circle, var(--violet), transparent 60%); top: auto; bottom: -700px; left: 10%; opacity: .12; animation-delay: -4s; }
@keyframes breathe { 50% { opacity: .32; transform: translateX(-50%) scale(1.08); } }
.backdrop .noise {
  position: absolute; inset: 0; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Gerüst ---------- */
.shell { position: relative; z-index: 1; display: grid; grid-template-columns: 76px 1fr; min-height: 100vh; }
.rail {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; align-items: center;
  gap: 6px; padding: 18px 0; border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(8, 13, 22, .9), rgba(4, 6, 10, .6));
  backdrop-filter: blur(14px);
}
.rail .logo { width: 40px; height: 40px; margin-bottom: 18px; filter: drop-shadow(0 0 10px rgba(62,230,255,.6)); }
.rail button {
  position: relative; width: 48px; height: 48px; border: 0; border-radius: 14px; background: transparent;
  color: var(--muted); cursor: pointer; display: grid; place-items: center; transition: .25s;
}
.rail button svg { width: 22px; height: 22px; }
.rail button:hover { color: var(--text); background: rgba(62, 230, 255, .06); }
.rail button.active { color: var(--cyan); background: rgba(62, 230, 255, .1); box-shadow: inset 0 0 0 1px var(--line-2), var(--glow); }
.rail button.active::before { content: ""; position: absolute; left: -14px; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.rail button .badge {
  position: absolute; top: 5px; right: 4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--crit); color: #fff; font: 600 10px/17px var(--mono); text-align: center;
}
.rail button .badge.cyan { background: var(--cyan); color: #001018; }
.rail .tip {
  position: absolute; left: 60px; white-space: nowrap; background: var(--panel-solid); border: 1px solid var(--line-2);
  padding: 4px 10px; border-radius: 8px; font-size: 12px; opacity: 0; pointer-events: none; transform: translateX(-4px); transition: .2s;
}
.rail button:hover .tip { opacity: 1; transform: none; }
.rail .spacer { flex: 1; }

main { padding: 26px clamp(16px, 3vw, 40px) 120px; min-width: 0; }

/* ---------- Kopf ---------- */
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 26px; }
.hello .eyebrow { font: 500 12px var(--mono); letter-spacing: .28em; color: var(--cyan); text-transform: uppercase; }
.hello h1 { font-family: var(--display); margin: 6px 0 0; font-size: clamp(28px, 4vw, 46px); font-weight: 600; letter-spacing: -.02em; line-height: 1.05; }
.hello h1 .grad { color: var(--cyan); text-shadow: 0 0 28px rgba(62,230,255,.35); }
.hello p { margin: 8px 0 0; color: var(--muted); }
.top-right { display: flex; align-items: center; gap: 14px; }
.clock { text-align: right; font-family: var(--mono); }
.clock .t { font-size: 34px; font-weight: 500; letter-spacing: .02em; }
.clock .t .s { color: var(--dim); font-size: 20px; }
.clock .d { color: var(--muted); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.status-pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line-2); font-weight: 500; cursor: pointer; white-space: nowrap;
}
.status-pill .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(51, 240, 168, .15), 0 0 16px var(--ok); animation: pulse 2.4s infinite; }
.status-pill.warn .dot { background: var(--warn); box-shadow: 0 0 0 4px rgba(255, 181, 71, .15), 0 0 16px var(--warn); }
.status-pill.crit .dot { background: var(--crit); box-shadow: 0 0 0 4px rgba(255, 77, 106, .18), 0 0 16px var(--crit); animation-duration: 1s; }
@keyframes pulse { 50% { transform: scale(.75); opacity: .7; } }

/* ---------- Bühne: Orb + Gespräch ---------- */
.stage { display: grid; grid-template-columns: minmax(300px, 420px) 1fr; gap: 22px; margin-bottom: 22px; }
.orb-card { position: relative; overflow: hidden; padding: 22px; display: flex; flex-direction: column; align-items: center; }
.orb-wrap { position: relative; width: 100%; max-width: 330px; aspect-ratio: 1; display: grid; place-items: center; }
#orb { width: 100%; height: 100%; cursor: pointer; }
.orb-state { position: absolute; bottom: 14%; font: 500 11px var(--mono); letter-spacing: .3em; text-transform: uppercase; color: var(--cyan); text-shadow: 0 0 12px rgba(62,230,255,.6); pointer-events: none; }
.tools-run { min-height: 30px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font: 500 11px var(--mono); letter-spacing: .04em; background: rgba(62,230,255,.08); border: 1px solid var(--line-2); color: var(--cyan); animation: chipin .4s cubic-bezier(.16,1,.3,1) both; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
@keyframes chipin { from { transform: translateY(8px) scale(.8); opacity: 0; } }
.voice-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; width: 100%; justify-content: center; }
.mic {
  width: 64px; height: 64px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 30%, #6ff0ff, var(--cyan-2) 60%, #0670a8);
  color: #00121c; box-shadow: 0 0 0 6px rgba(62,230,255,.12), 0 10px 40px rgba(15,180,255,.45); transition: transform .15s;
}
.mic svg { width: 26px; height: 26px; }
.mic:hover { transform: scale(1.06); }
.mic.rec { background: radial-gradient(circle at 30% 30%, #ff8fa3, var(--crit) 60%, #9b1030); box-shadow: 0 0 0 6px rgba(255,77,106,.18), 0 10px 40px rgba(255,77,106,.5); animation: recpulse 1.2s infinite; }
@keyframes recpulse { 50% { box-shadow: 0 0 0 14px rgba(255,77,106,.06), 0 10px 40px rgba(255,77,106,.5); } }
.ghost-btn {
  border: 1px solid var(--line-2); background: rgba(12,18,28,.6); border-radius: 12px; padding: 9px 14px; cursor: pointer;
  color: var(--muted); display: inline-flex; align-items: center; gap: 8px; font-size: 13px; transition: .2s;
}
.ghost-btn:hover { color: var(--text); border-color: rgba(62,230,255,.4); }
.ghost-btn.on { color: var(--cyan); border-color: rgba(62,230,255,.55); box-shadow: var(--glow); }
.ghost-btn svg { width: 16px; height: 16px; }
.hint { margin-top: 10px; font-size: 12px; color: var(--dim); text-align: center; }
.hint kbd { font: 11px var(--mono); padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line-2); color: var(--muted); }

.convo { display: flex; flex-direction: column; min-height: 420px; max-height: 560px; }
.convo-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 0; }
.log { flex: 1; overflow-y: auto; padding: 14px 20px; display: flex; flex-direction: column; gap: 12px; scroll-behavior: smooth; }
.msg { max-width: 86%; padding: 11px 15px; border-radius: 16px; animation: msgin .4s cubic-bezier(.2,.8,.2,1) both; word-wrap: break-word; }
.msg p { margin: 0 0 6px; } .msg p:last-child { margin: 0; }
.msg ul { margin: 4px 0; padding-left: 18px; }
.msg code { font: 12px var(--mono); background: rgba(255,255,255,.06); padding: 1px 5px; border-radius: 5px; }
.msg.user { align-self: flex-end; background: linear-gradient(135deg, rgba(62,230,255,.18), rgba(139,123,255,.16)); border: 1px solid rgba(62,230,255,.25); border-bottom-right-radius: 4px; }
.msg.jarvis { align-self: flex-start; background: rgba(255,255,255,.035); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.jarvis::before { content: "JARVIS"; display: block; font: 600 10px var(--mono); letter-spacing: .25em; color: var(--cyan); margin-bottom: 4px; }
.msg.err { border-color: rgba(255,77,106,.4); color: #ffc4cf; }
.msg .speak { float: right; margin: -2px -6px 0 8px; border: 0; background: none; color: var(--dim); cursor: pointer; padding: 2px; }
.msg .speak:hover { color: var(--cyan); }
@keyframes msgin { from { opacity: 0; transform: translateY(10px); } }
.typing span { display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; background: var(--cyan); animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .2; transform: translateY(-3px); } }
.composer { display: flex; gap: 10px; padding: 14px 16px 16px; border-top: 1px solid var(--line); }
.composer input {
  flex: 1; min-width: 0; background: rgba(0,0,0,.35); border: 1px solid var(--line-2); border-radius: 14px; padding: 12px 16px; outline: none; transition: .2s;
}
.composer input:focus { border-color: rgba(62,230,255,.6); box-shadow: 0 0 0 4px rgba(62,230,255,.08); }
.send { border: 0; border-radius: 14px; padding: 0 18px; cursor: pointer; background: linear-gradient(135deg, var(--cyan), var(--violet)); color: #00121c; font-weight: 600; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 20px 4px; }
.quick button { border: 1px solid var(--line); background: rgba(255,255,255,.02); border-radius: 999px; padding: 5px 12px; font-size: 12px; color: var(--muted); cursor: pointer; transition: .2s; }
.quick button:hover { color: var(--cyan); border-color: var(--line-2); }

/* ---------- Karten ---------- */
.card {
  position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(16px) saturate(140%); box-shadow: 0 20px 60px rgba(0,0,0,.35);
  animation: rise .7s cubic-bezier(.2,.8,.2,1) both;
}
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; padding: 1px;
  background: linear-gradient(140deg, rgba(62,230,255,.35), transparent 30%, transparent 70%, rgba(139,123,255,.25));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .55;
}
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.985); } }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px 0; }
.card-title { display: flex; align-items: center; gap: 10px; font: 600 12px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.card-title svg { width: 16px; height: 16px; color: var(--cyan); }
.card-body { padding: 14px 20px 18px; }
.meta { font: 11px var(--mono); color: var(--dim); }
.link-btn { border: 0; background: none; color: var(--cyan); font-size: 12px; cursor: pointer; padding: 0; }

.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 22px; align-items: start; }
.span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }
.grid > .card:nth-child(2) { animation-delay: .05s; } .grid > .card:nth-child(3) { animation-delay: .1s; }
.grid > .card:nth-child(4) { animation-delay: .15s; } .grid > .card:nth-child(5) { animation-delay: .2s; }
.grid > .card:nth-child(6) { animation-delay: .25s; } .grid > .card:nth-child(7) { animation-delay: .3s; }
.grid > .card:nth-child(8) { animation-delay: .35s; } .grid > .card:nth-child(9) { animation-delay: .4s; }

/* Server */
.servers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 22px; }
.srv .name { display: flex; align-items: baseline; gap: 10px; }
.srv .name b { font-family: var(--display); font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.srv .name span { color: var(--dim); font: 11px var(--mono); }
.srv .state { display: inline-flex; align-items: center; gap: 6px; font: 600 10px var(--mono); letter-spacing: .2em; color: var(--ok); }
.srv .state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.srv .state.off { color: var(--crit); }
.gauges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.gauge { position: relative; text-align: center; }
.gauge svg { width: 100%; max-width: 104px; transform: rotate(-90deg); }
.gauge .track { fill: none; stroke: rgba(255,255,255,.06); stroke-width: 7; }
.gauge .val { fill: none; stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset 1.2s cubic-bezier(.2,.8,.2,1), stroke .4s; filter: drop-shadow(0 0 6px currentColor); }
.gauge .num { position: absolute; inset: 0; display: grid; place-items: center; font: 600 19px var(--mono); padding-bottom: 16px; }
.gauge .num small { font-size: 11px; color: var(--muted); }
.gauge .lbl { font: 600 10px var(--mono); letter-spacing: .22em; color: var(--muted); margin-top: -12px; position: relative; }
.srv .facts { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); font: 12px var(--mono); color: var(--muted); flex-wrap: wrap; }
.srv .facts b { color: var(--text); font-weight: 500; }
.spark { width: 100%; height: 64px; margin-top: 10px; display: block; }

/* Listen */
.rows { display: flex; flex-direction: column; gap: 2px; }
.row { display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; transition: background .2s; }
.row:hover { background: rgba(255,255,255,.03); }
.row .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .r { font: 12px var(--mono); color: var(--muted); white-space: nowrap; }
.led { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); justify-self: center; }
.led.warn { background: var(--warn); box-shadow: 0 0 10px var(--warn); }
.led.crit, .led.error { background: var(--crit); box-shadow: 0 0 10px var(--crit); }
.led.off { background: var(--dim); box-shadow: none; }
.led.info { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }

.issues .row { grid-template-columns: 18px auto 1fr; }
.issues .area { font: 600 11px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.allgood { display: flex; align-items: center; gap: 14px; padding: 8px 4px; }
.allgood .big { font-size: 34px; font-weight: 600; color: var(--ok); text-shadow: 0 0 20px rgba(51,240,168,.5); }

.bars .bar { margin: 10px 0; }
.bars .bar .top { display: flex; justify-content: space-between; font-size: 13px; margin: 0 0 6px; }
.bars .bar .top span { font: 12px var(--mono); color: var(--muted); }
.bars .bar .track { height: 7px; border-radius: 7px; background: rgba(255,255,255,.05); overflow: hidden; }
.bars .bar .fill { height: 100%; width: 100%; border-radius: 7px; background: linear-gradient(90deg, var(--cyan-2), var(--cyan)); box-shadow: 0 0 12px rgba(62,230,255,.6); transform-origin: left; transform: scaleX(0); transition: transform 1.4s cubic-bezier(.16,1,.3,1); }
.bars .bar .fill.warn { background: linear-gradient(90deg, #d68a1c, var(--warn)); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat { padding: 12px; border-radius: 14px; background: rgba(255,255,255,.025); border: 1px solid var(--line); }
.stat .n { font: 600 28px var(--mono); line-height: 1; }
.stat .n.ok { color: var(--ok); } .stat .n.warn { color: var(--warn); } .stat .n.crit { color: var(--crit); } .stat .n.cyan { color: var(--cyan); }
.stat .l { margin-top: 6px; font: 10px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }

.sites { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
.site { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; background: rgba(255,255,255,.02); font-size: 12.5px; }
.site .h { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site .ms { font: 11px var(--mono); color: var(--muted); }

.biz-grid { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr; gap: 28px; align-items: center; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.kpi .kv { font: 600 clamp(26px, 2.6vw, 38px) var(--display); letter-spacing: -.01em; line-height: 1; color: var(--text); }
.kpi .kv small { font-size: .5em; color: var(--muted); }
.kpi .kv.pos { color: var(--ok); text-shadow: 0 0 22px rgba(51,240,168,.35); }
.kpi .kv.neg { color: var(--crit); }
.kpi .kl { margin-top: 8px; font: 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.custs .row { padding: 5px 8px; }
@media (max-width: 1100px) { .biz-grid { grid-template-columns: 1fr; } }

/* Aufgaben */
.task { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 10px; }
.task:hover { background: rgba(255,255,255,.03); }
.task .chk { width: 20px; height: 20px; border-radius: 7px; border: 1.5px solid var(--line-2); background: transparent; cursor: pointer; display: grid; place-items: center; transition: .2s; padding: 0; }
.task .chk:hover { border-color: var(--cyan); }
.task.done .chk { background: var(--ok); border-color: var(--ok); box-shadow: 0 0 12px rgba(51,240,168,.5); }
.task.done .chk::after { content: ""; width: 5px; height: 10px; border: solid #00170f; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.task.done .tt { color: var(--dim); text-decoration: line-through; }
.task .sub { font: 11px var(--mono); color: var(--dim); }
.task .x { opacity: 0; border: 0; background: none; color: var(--dim); cursor: pointer; }
.task:hover .x { opacity: 1; }
.prio-1 .tt::before { content: "!"; color: var(--crit); font-weight: 700; margin-right: 6px; }
.add-task { display: flex; gap: 8px; margin-top: 10px; }
.add-task input, .field {
  flex: 1; min-width: 0; background: rgba(0,0,0,.3); border: 1px solid var(--line); border-radius: 11px; padding: 9px 12px; outline: none;
}
.add-task input:focus, .field:focus { border-color: rgba(62,230,255,.5); }
.btn { border: 1px solid rgba(62,230,255,.45); background: rgba(62,230,255,.1); color: var(--cyan); border-radius: 11px; padding: 8px 14px; cursor: pointer; font-weight: 500; transition: .2s; white-space: nowrap; }
.btn:hover { background: rgba(62,230,255,.18); box-shadow: var(--glow); }
.btn.solid { background: linear-gradient(135deg, var(--cyan), var(--violet)); color: #00121c; border: 0; }

/* Projekte */
.proj { padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.025); border: 1px solid var(--line); margin-bottom: 10px; cursor: pointer; transition: .25s; }
.proj:hover { border-color: var(--line-2); transform: translateX(3px); }
.proj .ph { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.proj .pt { font-weight: 600; }
.proj .pd { color: var(--muted); font-size: 13px; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.proj .next { margin-top: 8px; font-size: 12.5px; color: var(--cyan); }
.proj .next::before { content: "→ "; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font: 600 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; border: 1px solid; }
.tag.offen { color: var(--cyan); border-color: rgba(62,230,255,.35); }
.tag.in-arbeit { color: var(--warn); border-color: rgba(255,181,71,.4); }
.tag.pausiert { color: var(--muted); border-color: var(--line-2); }
.tag.erledigt { color: var(--ok); border-color: rgba(51,240,168,.4); }
.tag.dom { color: var(--violet); border-color: rgba(139,123,255,.35); }
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; align-items: start; }
.col h3 { display: flex; justify-content: space-between; font: 600 12px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.col h3 span { color: var(--dim); }
.col .drop { min-height: 120px; border-radius: 16px; padding: 4px; transition: .2s; }
.col .drop.over { background: rgba(62,230,255,.06); outline: 1px dashed var(--line-2); }
.pending { font: 10px var(--mono); color: var(--warn); }

/* Mail */
.mailbox { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.mailbox button { border: 1px solid var(--line); background: rgba(255,255,255,.02); border-radius: 10px; padding: 6px 12px; cursor: pointer; font-size: 12.5px; color: var(--muted); }
.mailbox button.on { color: var(--text); border-color: rgba(62,230,255,.5); background: rgba(62,230,255,.08); }
.mailbox button b { color: var(--cyan); margin-left: 6px; font-family: var(--mono); }
.mail { display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; padding: 10px; border-radius: 12px; cursor: pointer; align-items: start; }
.mail:hover { background: rgba(255,255,255,.035); }
.mail .u { width: 7px; height: 7px; border-radius: 50%; margin-top: 7px; }
.mail.unread .u { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.mail .f { font-weight: 500; } .mail.unread .f { font-weight: 700; }
.mail .s { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail .d { font: 11px var(--mono); color: var(--dim); white-space: nowrap; }
.mail .acc { font: 10px var(--mono); color: var(--violet); }
.tag.imp { color: var(--crit); border-color: rgba(255,77,106,.45); font-size: 9px; padding: 1px 6px; vertical-align: 2px; }
.mail.noise { opacity: .45; }
.mail.noise:hover { opacity: .9; }
.mail.imp.unread .u { background: var(--crit); box-shadow: 0 0 10px var(--crit); }
.reader { white-space: pre-wrap; font-size: 14px; line-height: 1.6; color: #cfdcf0; max-height: 60vh; overflow: auto; }

/* Kalender */
#cal-form > div { flex-wrap: wrap; }
#cal-form > div > .field { flex: 1 1 170px; min-width: 0; }
#cal-form input[type="datetime-local"] { min-width: 0; width: 100%; }
.day { margin-bottom: 14px; }
.day h4 { margin: 0 0 6px; font: 600 11px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.day h4.today { color: var(--cyan); }
.ev { display: grid; grid-template-columns: 10px 64px 1fr; gap: 12px; align-items: baseline; padding: 9px 12px; border-radius: 12px; background: rgba(255,255,255,.025); margin-bottom: 6px; }
.ev::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.ev.privat::before { background: var(--violet); box-shadow: 0 0 8px var(--violet); }
.ev .tm { font: 12px var(--mono); color: var(--muted); }
.ev .ti { font-weight: 500; }
.ev .lo { font-size: 12px; color: var(--dim); }
.empty { color: var(--dim); font-size: 13px; padding: 10px 4px; }

/* Tabellen */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font: 600 10px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid rgba(120,200,255,.05); vertical-align: top; }
td.mono { font: 12px var(--mono); color: var(--muted); white-space: nowrap; }
tr:hover td { background: rgba(255,255,255,.02); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 11px; overflow: hidden; }
.seg button { border: 0; background: transparent; padding: 7px 12px; cursor: pointer; color: var(--muted); font-size: 12.5px; }
.seg button.on { background: rgba(62,230,255,.12); color: var(--cyan); }

/* Ansichten */
.view { display: none; }
.view.active { display: block; animation: fade .45s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }
.view-title { display: flex; align-items: baseline; gap: 14px; margin: 0 0 18px; }
.view-title h2 { font-family: var(--display); margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -.01em; }

/* Overlay */
.modal { position: fixed; inset: 0; z-index: 50; display: none; place-items: center; background: rgba(2,4,8,.7); backdrop-filter: blur(6px); padding: 16px; }
.modal.open { display: grid; animation: fade .25s both; }
.modal .card { width: min(760px, 100%); max-height: 88vh; overflow: auto; }
.modal .close { border: 0; background: none; color: var(--muted); font-size: 22px; cursor: pointer; }

.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px); z-index: 60; padding: 11px 18px; border-radius: 12px; background: var(--panel-solid); border: 1px solid var(--line-2); box-shadow: var(--glow); opacity: 0; transition: .3s; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%); }

.feed .row { grid-template-columns: 112px 1fr; }
.feed .r { text-align: left; }

/* ---------- Responsiv ---------- */
@media (max-width: 1280px) {
  .span-3 { grid-column: span 6; } .span-4 { grid-column: span 6; } .span-5, .span-7, .span-8 { grid-column: span 12; }
  .board { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 980px) {
  .stage { grid-template-columns: 1fr; }
  .servers { grid-template-columns: 1fr; }
  .span-3, .span-4, .span-6 { grid-column: span 12; }
  .convo { max-height: 70vh; }
}
@media (max-width: 720px) {
  .shell { grid-template-columns: 1fr; }
  .rail {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; z-index: 40; flex-direction: row; justify-content: space-around;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); overflow-x: auto;
  }
  .rail .logo, .rail .spacer, .rail .tip { display: none; }
  .rail button { width: 42px; height: 42px; flex: none; }
  .rail button.active::before { display: none; }
  main { padding: 18px 16px 110px; }
  .top { align-items: flex-start; }
  .clock .t { font-size: 26px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .board { grid-template-columns: 1fr; }
  .msg { max-width: 94%; }
  .grid { gap: 16px; }
  .servers { gap: 16px; }
}
@media (hover: none) { .hint { display: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
