:root {
  --bg: #050404;
  --panel: #0c0a0a;
  --panel2: #131010;
  --line: #2a2222;
  --line2: #3d3030;
  --text: #e9e3dd;
  --dim: #8f8580;
  --red: #d3141d;
  --red2: #ff2b36;
  --redbg: rgba(211, 20, 29, .12);
  --ok: #c9c2bb;
  --mono: "JetBrains Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: radial-gradient(ellipse at 50% 120%, #1c1212 0%, #050404 60%) fixed, #050404;
  color: var(--text);
  font: 13px/1.55 var(--mono);
  overflow: hidden;
}
[hidden] { display: none !important; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--red); color: #fff; }

/* ------------------------------------------------------------- Laptop */
.laptop {
  position: relative; z-index: 1;
  height: 100vh;
  height: 100dvh;
  padding: 18px 28px 0;
  display: flex;
  flex-direction: column;
}
.bezel {
  flex: 1;
  min-height: 0;
  position: relative;
  background: linear-gradient(#1a1717, #0e0c0c);
  border: 1px solid #2c2626;
  border-bottom: 0;
  border-radius: 18px 18px 4px 4px;
  padding: 26px 22px 22px;
  box-shadow: 0 0 0 1px #000, 0 30px 80px rgba(0, 0, 0, .8), inset 0 1px 0 #2d2727;
}
.cam {
  position: absolute; top: 9px; left: 50%;
  width: 8px; height: 8px; margin-left: -4px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #3a3a46, #050507 60%);
  box-shadow: 0 0 0 2px #0b0a0a;
}
.cam::after {
  content: ""; position: absolute; left: 14px; top: 2px;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--red2); box-shadow: 0 0 6px var(--red2);
  animation: blink 2.4s infinite steps(1);
}
@keyframes blink { 50% { opacity: .15; } }
.screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  border: 2px solid #000;
  border-radius: 4px;
  box-shadow: inset 0 0 120px rgba(0, 0, 0, .9);
}
.base {
  position: relative; z-index: 2;
  height: 22px;
  margin: 0 -28px;
  background: linear-gradient(#2a2525, #141111 60%, #0a0909);
  border-radius: 0 0 22px 22px;
  display: flex; justify-content: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .8);
}
.base span { width: 140px; height: 7px; background: #0b0a0a; border-radius: 0 0 9px 9px; }

#rain { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .42; pointer-events: none; animation: rainIn 2.5s ease both; }
@keyframes rainIn { from { opacity: 0; } }
.scan {
  position: absolute; inset: 0; pointer-events: none; z-index: 50;
  background: repeating-linear-gradient(transparent 0 2px, rgba(0, 0, 0, .22) 2px 3px);
  mix-blend-mode: multiply;
}
.scan::after {
  content: ""; position: absolute; left: 0; right: 0; height: 120px;
  background: linear-gradient(transparent, rgba(211, 20, 29, .05), transparent);
  animation: sweep 7s linear infinite;
}
@keyframes sweep { from { top: -120px; } to { top: 100%; } }

/* ------------------------------------------------------------- Intro
   Ablauf und Takt stehen in app.js (runIntro). body.seq = Sequenz laeuft,
   s-lap/s-led/s-open/s-black/s-push/s-recede = erreichte Phasen. */
.intro-bg { position: fixed; inset: 0; z-index: 0; background: #000; opacity: 0; pointer-events: none; transition: opacity 1.4s ease; }
body.seq .intro-bg { opacity: 1; }
.intro { position: fixed; inset: 0; z-index: 100; pointer-events: none; font-size: 12px; letter-spacing: .08em; }
.intro pre { margin: 0; white-space: pre; }
.intro .pre {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  color: #6d6662; line-height: 1.9;
  transition: opacity .9s ease, transform 1.4s cubic-bezier(.4, 0, .2, 1);
}
.intro .pre.out { opacity: 0; transform: translate(-50%, -62%); }
.intro .hw {
  position: absolute; left: 50%; bottom: 3.2vh; transform: translateX(-50%);
  width: min(470px, 92vw); color: #625b57; font-size: 11px; line-height: 1.65;
  transition: opacity .5s ease;
}
.intro .hw.out { opacity: 0; }
.intro .hw .h { color: #b9b1ab; letter-spacing: .24em; }
.intro b, .sys-term b, .bt-log b, .bt-stat b { color: var(--text); font-weight: 600; }
.ln { display: block; min-height: 1.6em; animation: lnIn .32s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes lnIn { from { opacity: 0; transform: translateX(-5px); } }
.cur {
  display: inline-block; width: .55em; height: 1.05em; margin-left: 3px; vertical-align: -.18em;
  background: #d6cfc9; animation: caret 1.05s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }
.intro .skip {
  position: absolute; right: 18px; bottom: 14px;
  color: #3d3735; font-size: 10px; letter-spacing: .22em;
  opacity: 0; transition: opacity 1s ease 1.8s;
}
body.seq .intro .skip { opacity: 1; }
body.seq.s-push .intro .skip { opacity: 0; transition-delay: 0s; }

/* Laptop: zuerst geschlossen und klein, dann Deckel auf, dann Kamerafahrt ins Display */
body.seq .laptop {
  perspective: 2800px; perspective-origin: 50% calc(100% - 22px);
  transform: translateY(-6vh) scale(.68);
  opacity: 0; filter: brightness(.25);
  transition: opacity 1.8s ease, filter 2.6s ease, transform 1.4s cubic-bezier(.65, 0, .15, 1);
  will-change: transform, opacity;
}
body.seq.s-lap .laptop { opacity: 1; filter: none; }
body.seq.s-push .laptop { transform: none; }
body.seq .bezel { z-index: 1; transform-origin: 50% 100%; transform: rotateX(-90deg); will-change: transform; }
body.seq.s-open .bezel { animation: lid 1.75s forwards; }
@keyframes lid {
  0% { transform: rotateX(-90deg); animation-timing-function: cubic-bezier(.55, 0, .25, 1); }
  80% { transform: rotateX(2deg); animation-timing-function: ease-in-out; }
  100% { transform: rotateX(0deg); }
}
body.seq .bezel::after, body.seq .base::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(105deg, transparent 32%, rgba(255, 255, 255, .055) 44%, rgba(255, 255, 255, .012) 52%, transparent 62%) 130% 0 / 260% 100% no-repeat;
}
body.seq .base::after { background-image: linear-gradient(100deg, transparent 36%, rgba(255, 255, 255, .16) 48%, transparent 60%); }
body.seq.s-lap .base::after { animation: sheen 3s ease-in-out .3s forwards; }
body.seq.s-open .bezel::after { animation: sheen 2.4s ease-out forwards; }
@keyframes sheen { to { background-position: -30% 0; } }
body.seq .base { overflow: hidden; }
body.seq .cam { opacity: 0; transition: opacity .8s; }
body.seq.s-push .cam { opacity: 1; }
.led {
  position: absolute; right: 9%; top: 50%; width: 9px; height: 2px; margin-top: -1px;
  border-radius: 2px; background: #1b1717;
  transition: background .6s ease, box-shadow .6s ease;
}
body:not(.seq) .led, body.s-led .led { background: var(--red2); box-shadow: 0 0 5px var(--red2), 0 0 16px rgba(255, 43, 54, .45); }
body.seq .screen { background: #000; transition: background 1.2s ease; }
body.seq.s-open .screen { background: #0a090a; }
body.seq.s-black .screen { background: #000; transition: none; }
body.seq .screen::after {
  content: ""; position: absolute; inset: 0; z-index: 60; pointer-events: none;
  background: linear-gradient(158deg, rgba(255, 255, 255, .055), transparent 36%);
  opacity: 0; transition: opacity 1.4s ease;
}
body.seq.s-open .screen::after { opacity: 1; }
body.seq.s-push .screen::after { opacity: 0; }
body.seq .scan { opacity: 0; transition: opacity 1.6s ease; }
body.seq.s-recede .scan { opacity: .7; }

/* Bildschirm: Secure Boot, Logo, Systemstatus */
.boot {
  position: absolute; inset: 0; z-index: 6; overflow: hidden;
  --lg: clamp(74px, 14vh, 124px); --ly: 34%;
  color: #77706b; font-size: clamp(11px, 1vw, 13px); letter-spacing: .06em;
  transition: opacity 1s ease;
}
.boot.out { opacity: 0; pointer-events: none; }
.bt-log .ts { color: #3b3634; }
.boot pre { margin: 0; white-space: pre; font: inherit; }
.bt-log { position: absolute; left: 5%; top: 7%; line-height: 1.7; }
.bt-log em { font-style: normal; color: var(--red2); }
.bt-log .bar { color: var(--text); letter-spacing: 0; }
.bt-log .bar i { font-style: normal; color: #1f1b1b; }
.boot .ln { animation-duration: .08s; }
.boot.blank .bt-log { display: none; }

.bt-beam { position: absolute; left: 0; right: 0; top: var(--ly); height: 1px; opacity: 0; overflow: visible; }
.bt-beam i {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5) 12%, rgba(255, 255, 255, .5) 88%, transparent);
  box-shadow: 0 0 6px rgba(255, 255, 255, .3);
  clip-path: inset(0 100% 0 0);
}
.bt-beam b { position: absolute; left: 0; right: 0; top: -16px; height: 33px; transform: translateX(-100%); }
.bt-beam b::after {
  content: ""; position: absolute; right: -70px; top: 0; width: 140px; height: 33px;
  background: radial-gradient(closest-side, #fff, rgba(255, 255, 255, .28) 35%, transparent);
}
.boot.beam .bt-beam { opacity: 1; }
.boot.beam .bt-beam i { animation: beamDraw 1s cubic-bezier(.55, 0, .35, 1) forwards; }
.boot.beam .bt-beam b { animation: beamHead 1s cubic-bezier(.55, 0, .35, 1) forwards; }
@keyframes beamDraw { to { clip-path: inset(0 0 0 0); } }
@keyframes beamHead { 90% { opacity: 1; } to { transform: none; opacity: 0; } }
.boot.frag .bt-beam { animation: beamOut .9s cubic-bezier(.6, 0, .2, 1) forwards; }
@keyframes beamOut { to { transform: scaleX(.12); opacity: 0; } }

.bt-logo {
  position: absolute; left: 0; right: 0; top: calc(var(--ly) - var(--lg) / 2);
  display: flex; flex-direction: column; align-items: center;
  transition: transform 1.6s cubic-bezier(.4, 0, .2, 1), opacity 1.4s ease;
}
.bt-logo .mark { width: var(--lg); height: var(--lg); }
.boot.recede .bt-logo { transform: scale(.88) translateY(-3%); opacity: 0; }
.bt-logo h1 {
  margin: calc(var(--lg) * .2) 0 0;
  font: 900 clamp(24px, 3vw, 42px) "Cinzel", serif;
  letter-spacing: .95em; padding-left: .95em;
  color: var(--text); opacity: 0; filter: blur(8px);
}
.boot.frag .bt-logo h1 { animation: word 1.7s cubic-bezier(.2, .8, .2, 1) .4s forwards; }
@keyframes word { to { letter-spacing: .4em; padding-left: .4em; opacity: 1; filter: blur(0); } }
.bt-logo > p { margin: 8px 0 0; font-size: .82em; letter-spacing: .6em; padding-left: .6em; color: #5f5855; opacity: 0; }
.boot.frag .bt-logo > p { animation: fadeIn 1.1s ease .9s forwards; }
@keyframes fadeIn { to { opacity: 1; } }
.boot .bt-stat { margin-top: clamp(16px, 4vh, 36px); line-height: 1.75; min-height: 10.5em; transition: opacity .9s ease; }
.bt-stat .ln { position: relative; animation-duration: .3s; }
.bt-stat .ln::before {
  content: ""; position: absolute; inset: 0 -10px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(211, 20, 29, .2), transparent);
  animation: stSweep .6s ease-out forwards;
}
@keyframes stSweep { from { transform: translateX(-35%); } to { transform: translateX(35%); opacity: 0; } }
.bt-stat b { animation: stPulse .8s ease-out both; }
@keyframes stPulse { 0% { color: #fff; text-shadow: 0 0 10px rgba(255, 255, 255, .9); } 100% { text-shadow: 0 0 0 transparent; } }
.bt-core { margin-top: 10px; text-align: center; font-size: .9em; letter-spacing: .5em; padding-left: .5em; opacity: 0; transition: opacity .7s ease; }
.bt-core b { display: block; margin-top: 2px; color: var(--text); font-size: 1.6em; letter-spacing: .55em; padding-left: .55em; }
.boot.core .bt-core { opacity: 1; }
.boot.st-out .bt-stat, .boot.st-out .bt-core { opacity: 0; transition: opacity 1s ease; }

/* Logo: sechs Fragmente in einem Sechseck; im Boot entstehen sie aus der Lichtlinie */
.mark { display: block; overflow: visible; }
.mark .hex { fill: none; stroke: #3a3232; stroke-width: 1; stroke-dasharray: 1; stroke-dashoffset: 0; }
.mark .fr { fill: #e6e0da; }
.mark .fr.d { fill: var(--red); }
.boot .mark .hex { stroke-dashoffset: 1; }
.boot .mark .fr { opacity: 0; transform-box: view-box; transform-origin: 60px 60px; transform: translateX(var(--x)) scaleY(.012); }
.boot.frag .mark .fr { animation: frIn .85s cubic-bezier(.16, 1, .3, 1) calc(var(--i) * 55ms) forwards; }
@keyframes frIn {
  0% { opacity: 0; transform: translateX(var(--x)) scaleY(.012); }
  30% { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
.boot.frag .mark .hex { animation: hexDraw 1.3s cubic-bezier(.6, 0, .2, 1) .35s forwards; }
@keyframes hexDraw { to { stroke-dashoffset: 0; } }
.boot.pulse .mark { animation: lgPulse .75s ease-out; }
@keyframes lgPulse {
  0% { filter: brightness(1); }
  15% { filter: brightness(2.4) drop-shadow(0 0 14px rgba(255, 255, 255, .8)); }
  100% { filter: brightness(1); }
}
.boot.g1 .mark { transform: translateX(4px); clip-path: inset(0 0 46% 0); filter: drop-shadow(-4px 0 0 rgba(211, 20, 29, .9)); }
.boot.g2 .mark { transform: translateX(-3px); filter: drop-shadow(3px 0 0 rgba(233, 227, 221, .5)); }

.sys-term {
  position: absolute; left: 22px; bottom: 16px; z-index: 7; margin: 0;
  color: #615a56; font-size: 11px; letter-spacing: .14em; line-height: 1.7;
  white-space: pre; pointer-events: none;
}

/* Login: waechst wie das Logo aus einer Linie, Inhalte bauen sich gestaffelt auf */
.login { position: absolute; inset: 0; display: grid; place-items: center; z-index: 5; padding: 16px 16px 60px; }
.login-box {
  width: min(400px, 100%);
  border: 1px solid var(--line2);
  background: rgba(6, 5, 5, .9);
  padding: 28px 28px 20px;
  position: relative;
  animation: lgBox .45s cubic-bezier(.7, 0, .2, 1) both;
}
.login.build .login-box { animation-duration: 1s; }
@keyframes lgBox {
  0% { transform: scale(.3, .004); opacity: 0; }
  40% { transform: scale(1, .004); opacity: 1; }
  100% { transform: none; opacity: 1; }
}
.login-box::before, .login-box::after {
  content: ""; position: absolute; width: 14px; height: 14px; border: 1px solid var(--red);
}
.login-box::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.login-box::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.login .b { animation: lgIn .5s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(.3s + var(--i) * 60ms); }
.login.build .b { animation-delay: calc(.8s + var(--i) * 110ms); }
@keyframes lgIn { from { opacity: 0; transform: translateY(5px); clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.lg-head { text-align: center; margin-bottom: 24px; }
.lg-head .mark { width: 46px; height: 46px; margin: 0 auto 12px; }
.login h1 { font: 900 28px "Cinzel", serif; letter-spacing: .4em; padding-left: .4em; margin: 0; }
.sub { color: var(--dim); letter-spacing: .32em; font-size: 10px; margin: 6px 0 0; }
.fld { display: block; margin-bottom: 14px; }
.fld .lb { display: block; font-size: 10px; letter-spacing: .28em; color: var(--dim); margin-bottom: 6px; }
.inp {
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px;
  border: 1px solid var(--line2); background: #070606; cursor: pointer;
  font-size: 12px; letter-spacing: .08em; transition: border-color .2s, box-shadow .2s;
}
.inp em { font-style: normal; color: #4a4441; }
.inp .key { color: #8f8580; letter-spacing: .15em; margin-right: 4px; }
.inp:hover { border-color: #5a4f4f; }
.inp .cur { margin: 0; opacity: 0; animation: none; }
.login.ready .inp .cur { opacity: 1; animation: caret 1.05s steps(1) infinite; }
.auth { display: block; width: 100%; margin: 22px 0 0; padding: 11px; text-align: center; letter-spacing: .32em; }
.auth.flash { animation: authFlash .5s ease-out; }
@keyframes authFlash { 0% { background: var(--red); box-shadow: 0 0 22px rgba(211, 20, 29, .7); } }
.dev { display: block; width: 100%; margin: 8px 0 0; text-align: center; font-size: 11px; }
.lg-status {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--line);
  font-size: 10px; letter-spacing: .26em; color: var(--dim);
}
.lg-status b { display: flex; align-items: center; gap: 7px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: #ddd6d0; box-shadow: 0 0 8px rgba(255, 255, 255, .55); animation: breathe 2.6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .3; box-shadow: none; } }
.fine { color: var(--dim); font-size: 11px; min-height: 1em; margin: 12px 0 4px; text-align: center; }
.back { display: block; text-align: center; color: var(--dim); font-size: 11px; text-decoration: none; }
.back:hover { color: var(--text); }

/* ------------------------------------------------------------- Buttons & Formulare */
.btn {
  display: inline-block;
  background: transparent;
  border: 1px solid var(--line2);
  padding: 8px 14px;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: .06em;
  transition: background .15s, border-color .15s, color .15s;
  margin: 4px;
}
.btn:hover { border-color: var(--text); background: rgba(255, 255, 255, .04); }
.btn-red { border-color: var(--red); color: #fff; background: var(--redbg); }
.btn-red:hover { background: var(--red); border-color: var(--red2); }
.btn-sm { padding: 3px 9px; font-size: 11px; margin: 0; }
.btn-ghost { border-color: transparent; color: var(--dim); }
.btn-ghost:hover { color: var(--red2); border-color: var(--red); background: transparent; }
.btn:disabled { opacity: .4; cursor: default; }

input, select, textarea {
  width: 100%;
  background: #080606;
  border: 1px solid var(--line2);
  padding: 7px 9px;
  outline: none;
  border-radius: 0;
}
textarea { min-height: 70px; resize: vertical; }
input[type=range] { accent-color: var(--red); padding: 7px 0; border: 0; box-shadow: none !important; }
input:focus, select:focus, textarea:focus { border-color: var(--red); box-shadow: 0 0 0 1px var(--red) inset; }
label.f { display: block; margin-bottom: 10px; }
label.f > span { display: block; color: var(--dim); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 3px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 14px; }
.grid2 .wide { grid-column: 1 / -1; }

/* ------------------------------------------------------------- App-Rahmen */
.app {
  position: absolute; inset: 0; z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 58px minmax(0, 1fr) auto;
  grid-template-areas: "top" "main" "term";
}
.app.crt { animation: crt .75s cubic-bezier(.2, .9, .2, 1) both; }
@keyframes crt {
  0% { transform: scale(.7, .004); filter: brightness(4); }
  35% { transform: scale(1, .004); filter: brightness(4); }
  60% { transform: scale(1, 1.02); filter: brightness(1.6); }
  100% { transform: none; filter: none; }
}
.glow {
  position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 40%), rgba(211, 20, 29, .10), transparent 70%);
}

/* Kopfzeile: Marke links, Dock mittig, Benutzer rechts */
.top {
  grid-area: top;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 14px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(rgba(14, 10, 10, .96), rgba(8, 6, 6, .92));
  position: relative; z-index: 30;
}
.top::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--red) 30%, var(--red2) 50%, var(--red) 70%, transparent);
  opacity: .55;
}
.brand { font: 900 17px "Cinzel", serif; letter-spacing: .14em; text-decoration: none; justify-self: start; white-space: nowrap; }
.brand span { font: 600 11px var(--mono); color: var(--red2); letter-spacing: .1em; margin-left: 4px; }
.top-right { justify-self: end; display: flex; gap: 16px; align-items: center; color: var(--dim); font-size: 12px; white-space: nowrap; }
.who b { color: var(--text); }
.who .adm { color: var(--red2); margin-left: 4px; }
.logout { text-decoration: none; font-size: 16px; color: var(--dim); }
.logout:hover { color: var(--red2); }

.dock {
  position: relative;
  display: flex; align-items: stretch;
  height: 38px;
  border: 1px solid var(--line2);
  background: rgba(4, 3, 3, .85);
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  padding: 0 12px;
}
.dock-ind {
  position: absolute; top: 4px; bottom: 4px; left: 0; width: 0;
  background: var(--red);
  transform: skewX(-18deg);
  transition: left .48s cubic-bezier(.7, -0.35, .2, 1.35), width .48s cubic-bezier(.7, -0.35, .2, 1.35);
  box-shadow: 0 0 18px rgba(211, 20, 29, .55);
  z-index: 0;
}
.dock-ind::before, .dock-ind::after { content: ""; position: absolute; inset: 0; opacity: 0; }
.dock-ind.jolt::before { animation: jolt1 .42s steps(2) both; background: #fff; mix-blend-mode: difference; }
.dock-ind.jolt::after { animation: jolt2 .42s steps(3) both; background: var(--red2); }
@keyframes jolt1 { 0% { opacity: .9; transform: translate(-7px, -2px); } 50% { opacity: .5; transform: translate(5px, 1px); } 100% { opacity: 0; } }
@keyframes jolt2 { 0% { opacity: .8; clip-path: inset(0 0 55% 0); transform: translateX(9px); } 100% { opacity: 0; } }
.dk {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 6px;
  padding: 0 11px;
  text-decoration: none;
  color: var(--dim);
  font-size: 12px; letter-spacing: .06em;
  white-space: nowrap;
  transition: color .2s;
}
.dk i { font-style: normal; font-weight: 800; color: var(--red2); transition: color .2s, transform .25s; }
.dk sup { font-size: 9px; color: var(--dim); transition: color .2s; }
.dk em { position: absolute; top: 1px; left: 3px; font-size: 8px; font-style: normal; color: var(--line2); }
.dk:hover { color: var(--text); }
.dk:hover i { transform: translateY(-2px) scale(1.25); }
.dk.on { color: #fff; }
.dk.on i, .dk.on sup { color: #fff; }
.dk.on em { color: rgba(255, 255, 255, .6); }
.dk.new { margin-left: 8px; color: var(--red2); border-left: 1px solid var(--line2); padding-left: 16px; }
.dk.new:hover { color: #fff; text-shadow: 0 0 10px var(--red2); }
.dk.new i { animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { text-shadow: 0 0 12px var(--red2); color: #fff; } }

.main {
  grid-area: main; overflow-y: auto; overflow-x: hidden; position: relative;
  padding: 22px max(22px, calc((100% - 1180px) / 2)) 34px;
  background-image:
    linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px);
  background-size: 44px 44px;
}

/* Uebergang: Lamellen schieben sich ueber den Inhalt, dann weiter hinaus */
.shutter {
  grid-area: main; position: relative; z-index: 25;
  pointer-events: none; visibility: hidden; overflow: hidden;
  display: flex; flex-direction: column;
  --d: 1;
}
.shutter.run { visibility: visible; pointer-events: auto; }
.shutter .bar {
  flex: 1;
  background: #090606;
  border-bottom: 1px solid #1b1212;
  transform: translateX(calc(-101% * var(--d)));
  color: rgba(211, 20, 29, .35);
  font-size: 11px; line-height: 1; white-space: nowrap; overflow: hidden;
  display: flex; align-items: center; padding: 0 10px;
}
.shutter .bar.r { background: var(--red); color: rgba(0, 0, 0, .45); }
.shutter.close .bar { transform: none; transition: transform .26s cubic-bezier(.8, 0, .2, 1) calc(var(--i) * 22ms); }
.shutter.open .bar { transform: translateX(calc(101% * var(--d))); transition: transform .32s cubic-bezier(.8, 0, .2, 1) calc(var(--i) * 26ms); }
.sh-txt {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  z-index: 2; text-align: center; opacity: 0; transition: opacity .1s;
  background: #050404; border: 1px solid var(--red); padding: 12px 22px; min-width: 260px;
}
.shutter.close:not(.open) .sh-txt { opacity: 1; transition-delay: .22s; }
.sh-txt b { display: block; letter-spacing: .22em; font-size: 12px; }
.sh-txt i { display: block; height: 2px; margin-top: 8px; background: var(--red); transform-origin: left; animation: load .5s ease-out infinite; }
@keyframes load { from { transform: scaleX(0); } to { transform: scaleX(1); opacity: .2; } }

/* Gestaffeltes Einblenden nach jedem Seitenwechsel */
.rv { animation: rv .55s cubic-bezier(.2, .9, .2, 1) both; animation-delay: calc(var(--i, 0) * 55ms); }
@keyframes rv {
  0% { opacity: 0; transform: translateY(16px); clip-path: inset(0 0 100% 0); }
  55% { opacity: 1; clip-path: inset(0 0 0 0); }
  70% { transform: translate(-3px, 0); filter: drop-shadow(3px 0 0 rgba(255, 43, 54, .7)); }
  100% { transform: none; filter: none; }
}
.win.rv::before {
  content: ""; position: absolute; left: 0; top: -1px; height: 1px; width: 100%;
  background: var(--red2); box-shadow: 0 0 8px var(--red2);
  transform-origin: left; animation: wline .8s cubic-bezier(.7, 0, .2, 1) both; animation-delay: inherit;
}
@keyframes wline { 0% { transform: scaleX(0); opacity: 1; } 70% { transform: scaleX(1); opacity: 1; } 100% { opacity: 0; } }

.term {
  grid-area: term;
  border-top: 1px solid var(--line);
  background: rgba(4, 3, 3, .96);
  font-size: 12px;
}
.term-out { max-height: 92px; overflow-y: auto; padding: 4px 14px 0; color: var(--dim); white-space: pre-wrap; }
.term-out .c { color: var(--text); }
.term-out .e { color: var(--red2); }
.term-in { display: flex; align-items: center; gap: 8px; padding: 5px 14px 7px; }
.term-in label { color: var(--red2); white-space: nowrap; }
.term-in input { border: 0; padding: 2px 0; background: transparent; box-shadow: none !important; }

/* ------------------------------------------------------------- Inhalte */
h2.ttl {
  margin: 0 0 16px;
  font-size: 15px; letter-spacing: .14em; font-weight: 800;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
h2.ttl .tag { color: var(--red2); }
h2.ttl .grow { flex: 1; }
.win {
  position: relative;
  border: 1px solid var(--line);
  background: rgba(12, 10, 10, .88);
  margin-bottom: 16px;
}
.win > header {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--panel2);
  font-size: 11px; letter-spacing: .14em; color: var(--dim);
}
.win > header .dots { display: flex; gap: 5px; margin-right: 6px; }
.win > header .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line2); }
.win > header .dots i:first-child { background: var(--red); }
.win > header .act { margin-left: auto; display: flex; gap: 6px; }
.win > .body { padding: 14px; }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat {
  border: 1px solid var(--line);
  padding: 12px 14px;
  text-decoration: none;
  background: rgba(12, 10, 10, .88);
  position: relative; overflow: hidden;
  transition: border-color .2s;
}
.stat { transition: border-color .2s, transform .2s; }
.stat:hover { border-color: var(--red); transform: translateY(-3px); }
.stat:hover::after { color: rgba(211, 20, 29, .3); }
.stat b { display: block; font-size: 26px; font-weight: 800; }
.stat span { color: var(--dim); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.stat::after {
  content: attr(data-p); position: absolute; right: 8px; top: -4px;
  font: 900 52px "Cinzel", serif; color: rgba(211, 20, 29, .12);
}

.search { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; border: 1px solid var(--line2); padding: 0 10px; background: #080606; }
.search span { color: var(--red2); white-space: nowrap; }
.search input { border: 0; box-shadow: none !important; background: transparent; }

.rows { display: flex; flex-direction: column; }
.row {
  display: grid;
  grid-template-columns: 44px 70px 1fr auto auto;
  gap: 12px; align-items: center;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  cursor: pointer;
}
.row { position: relative; overflow: hidden; transition: padding-left .2s; }
.row::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(211, 20, 29, .28), transparent);
  transform: translateX(-100%);
}
.row:hover { background: var(--redbg); padding-left: 16px; }
.row:hover::before { transform: translateX(100%); transition: transform .55s ease-out; }
.row:hover .code { text-shadow: 0 0 8px var(--red2); }
.row .ph { width: 44px; height: 44px; }
.row .code { color: var(--red2); font-weight: 600; }
.row .t b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .t small { color: var(--dim); }
.row .st { color: var(--dim); font-size: 11px; }
.empty { color: var(--dim); padding: 24px 10px; text-align: center; }

.ph {
  background: #0a0808 center/cover no-repeat;
  border: 1px solid var(--line2);
  display: grid; place-items: center;
  color: var(--line2); font-weight: 800;
  filter: grayscale(.35) contrast(1.1);
}
.threat { display: inline-flex; gap: 2px; }
.threat i { width: 7px; height: 12px; background: var(--line); transform: skewX(-15deg); }
.threat i.on { background: var(--red); box-shadow: 0 0 6px rgba(211, 20, 29, .6); }
.pill { display: inline-block; border: 1px solid var(--line2); padding: 0 6px; font-size: 11px; color: var(--dim); margin: 2px 4px 2px 0; }
.pill.red { border-color: var(--red); color: var(--red2); }

/* Dossier */
.dossier-head { display: grid; grid-template-columns: 170px 1fr; gap: 18px; }
.portrait { width: 170px; height: 210px; position: relative; cursor: pointer; font-size: 46px; }
.portrait::after {
  content: "FOTO ÄNDERN"; position: absolute; inset: auto 0 0 0;
  background: rgba(0, 0, 0, .8); font-size: 10px; letter-spacing: .14em; color: var(--text);
  padding: 4px; text-align: center; opacity: 0; transition: opacity .15s;
}
.portrait:hover::after { opacity: 1; }
.portrait .corner { position: absolute; width: 14px; height: 14px; border: 2px solid var(--red); }
.portrait .c1 { top: -3px; left: -3px; border-right: 0; border-bottom: 0; }
.portrait .c2 { bottom: -3px; right: -3px; border-left: 0; border-top: 0; }
.dossier-head h1 { margin: 0 0 4px; font-size: 24px; letter-spacing: .04em; word-break: break-word; }
.meta-line { color: var(--dim); font-size: 11px; margin-bottom: 10px; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 18px; }
.kv div span { display: block; color: var(--dim); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.kv div p { margin: 0; white-space: pre-wrap; word-break: break-word; }
.kv .wide { grid-column: 1 / -1; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.gallery .g { position: relative; aspect-ratio: 1; cursor: zoom-in; }
.gallery .g .x {
  position: absolute; top: 3px; right: 3px; background: rgba(0, 0, 0, .8);
  border: 1px solid var(--line2); width: 20px; height: 20px; line-height: 16px; text-align: center;
  cursor: pointer; opacity: 0; font-size: 12px;
}
.gallery .g:hover .x { opacity: 1; }
.gallery .g .x:hover { color: var(--red2); border-color: var(--red); }
.gallery .g small { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, .75); font-size: 10px; padding: 2px 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.entry { border-left: 2px solid var(--line2); padding: 4px 0 4px 14px; margin-bottom: 18px; position: relative; }
.entry::before { content: ""; position: absolute; left: -5px; top: 9px; width: 8px; height: 8px; background: var(--bg); border: 2px solid var(--red); }
.entry h3 { margin: 0; font-size: 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.entry .by { color: var(--dim); font-size: 11px; margin: 2px 0 8px; }
.entry .txt { white-space: pre-wrap; word-break: break-word; margin-bottom: 8px; }
.entry .ops { display: flex; gap: 6px; flex-wrap: wrap; }
.stamp {
  font-size: 10px; letter-spacing: .14em; padding: 1px 6px;
  border: 1px solid var(--dim); color: var(--dim); text-transform: uppercase; transform: rotate(-2deg);
}
.stamp.s-Vertraulich { border-color: #c9a227; color: #e0bb3a; }
.stamp.s-Geheim { border-color: var(--red); color: var(--red2); }
.stamp.s-Streng { border-color: var(--red2); color: #fff; background: var(--red); }

.links .l { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.links .l .ph { width: 32px; height: 32px; font-size: 11px; }
.links .l .lab { color: var(--dim); min-width: 120px; font-size: 11px; }
.links .l a { text-decoration: none; }
.links .l a:hover { color: var(--red2); }
.links .l .x { margin-left: auto; }
.picker { position: relative; }
.picker .opts { position: absolute; left: 0; right: 0; top: 100%; z-index: 10; background: #0a0808; border: 1px solid var(--red); max-height: 220px; overflow-y: auto; }
.picker .opts div { padding: 6px 9px; cursor: pointer; }
.picker .opts div:hover { background: var(--redbg); }
.inline-form { display: grid; grid-template-columns: 180px 1fr auto; gap: 8px; align-items: start; }

.log .it { display: grid; grid-template-columns: 120px 140px 1fr; gap: 10px; padding: 4px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.log .it .tm { color: var(--dim); }
.log .it .u { color: var(--red2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log .it a { text-decoration: none; }
.log .it a:hover { color: var(--red2); }

/* ------------------------------------------------------------- Modal, Lightbox, Toasts */
.modal { position: absolute; inset: 0; z-index: 60; background: rgba(0, 0, 0, .72); display: grid; place-items: center; padding: 16px; }
.modal .box { width: min(460px, 100%); border: 1px solid var(--red); background: #0b0909; padding: 20px; animation: rise .25s ease-out; }
.modal .box h3 { margin: 0 0 10px; color: var(--red2); letter-spacing: .1em; font-size: 14px; }
.modal .box .acts { display: flex; justify-content: flex-end; gap: 6px; margin-top: 16px; }
.lightbox { position: absolute; inset: 0; z-index: 70; background: rgba(0, 0, 0, .93); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: calc(100% - 40px); border: 1px solid var(--line2); }
.lightbox p { color: var(--dim); margin: 8px 0 0; }
.toasts { position: absolute; right: 14px; bottom: 120px; z-index: 80; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.toast { background: #0b0909; border: 1px solid var(--line2); border-left: 3px solid var(--text); padding: 7px 12px; animation: tin .25s ease-out; max-width: 340px; }
.toast.err { border-left-color: var(--red2); color: var(--red2); }
@keyframes tin { from { opacity: 0; transform: translateX(30px); } }

.drop { border: 1px dashed var(--line2); padding: 14px; text-align: center; color: var(--dim); cursor: pointer; margin-top: 10px; }
.drop.hot, .drop:hover { border-color: var(--red); color: var(--text); background: var(--redbg); }

/* ------------------------------------------------------------- Login: echte Felder */
.inp { cursor: text; }
.inp input { border: 0; background: transparent; padding: 0; height: 100%; letter-spacing: .08em; box-shadow: none !important; }
.inp input::placeholder { color: #4a4441; }
.inp:focus-within { border-color: var(--red); box-shadow: inset 0 0 0 1px rgba(211, 20, 29, .35); }
.or { display: flex; align-items: center; gap: 10px; margin: 16px 0 0; font-size: 10px; letter-spacing: .3em; color: #5a4f4f; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn.discord { display: block; width: 100%; margin: 12px 0 0; text-align: center; letter-spacing: .14em; font-size: 11px; border-color: #3b3f86; color: #b9bdf7; }
.btn.discord:hover { background: rgba(88, 101, 242, .16); border-color: #5865f2; color: #fff; }
.login-box.deny { animation: deny .42s; }
@keyframes deny { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

button.who { background: none; border: 0; padding: 0; cursor: pointer; color: var(--dim); }
button.who:hover b { color: var(--red2); }

/* ------------------------------------------------------------- Live-Hinweis */
.live-banner {
  position: sticky; top: -22px; z-index: 30; display: flex; align-items: center; gap: 10px;
  margin: -6px 0 16px; padding: 8px 12px; background: #140909; border: 1px solid var(--red);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .6); animation: rise .25s ease-out;
}
.live-banner i { width: 7px; height: 7px; border-radius: 50%; background: var(--red2); box-shadow: 0 0 8px var(--red2); animation: breathe 1.4s infinite; flex: none; }
.live-banner span { flex: 1; }
.main.full .live-banner { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); margin: 0; }

.modal .box.wide { width: min(640px, 100%); max-height: calc(100% - 20px); overflow-y: auto; }
.hint { color: var(--dim); font-size: 11px; margin: 10px 0 0; }
.temp-pw { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px dashed var(--red); background: var(--redbg); }
.temp-pw code { flex: 1; font-size: 17px; letter-spacing: .12em; color: #fff; user-select: all; }
.portrait.ro { cursor: default; }

/* ------------------------------------------------------------- Karte */
.main.full { padding: 0; overflow: hidden; }
.mapview { display: grid; grid-template-columns: 290px minmax(0, 1fr); height: 100%; }
.map-side { display: flex; flex-direction: column; gap: 12px; padding: 18px 14px; border-right: 1px solid var(--line); background: rgba(5, 4, 4, .92); overflow-y: auto; min-height: 0; }
.map-side h2.ttl { margin: 0; }
.map-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.map-tools .btn { flex: 1; }
.map-draw { border: 1px solid var(--red); background: var(--redbg); padding: 10px; font-size: 11px; }
.map-draw p { margin: 0 0 8px; color: var(--dim); line-height: 1.55; }
.map-draw p b { display: block; color: #fff; margin-bottom: 2px; }
.map-draw > div { display: flex; gap: 6px; }
kbd { border: 1px solid var(--line2); padding: 0 4px; font: inherit; color: var(--text); }
.map-layers { display: grid; gap: 2px; }
.map-layers label { display: flex; align-items: center; gap: 8px; padding: 4px 6px; cursor: pointer; font-size: 12px; }
.map-layers label:hover { background: rgba(255, 255, 255, .03); }
.map-layers input { width: auto; accent-color: var(--red); margin: 0; }
.map-layers i, .map-list i, .mm-list i, .fpop small i { width: 10px; height: 10px; flex: none; display: inline-block; box-shadow: 0 0 6px currentColor; }
.map-layers em { margin-left: auto; font-style: normal; color: var(--dim); font-size: 11px; }
.map-list { flex: 1; min-height: 80px; overflow-y: auto; border-top: 1px solid var(--line); padding-top: 6px; }
.map-list a { display: flex; align-items: center; gap: 8px; padding: 5px 6px; cursor: pointer; font-size: 12px; }
.map-list a:hover { background: var(--redbg); }
.map-list span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-list em { font-style: normal; color: var(--dim); font-size: 10px; }
.map-img { align-self: flex-start; }
.map-canvas { position: relative; min-height: 0; background: #030303; }
.map-canvas.leaflet-container { background: #030303; font: inherit; outline: 0; }
.drawing .map-canvas { cursor: crosshair !important; }
/* Beim Zeichnen gehen Klicks durch vorhandene Objekte hindurch auf die Karte. */
.drawing .map-canvas .leaflet-interactive { pointer-events: none !important; }
.map-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; padding: 24px; color: var(--dim); }
.map-empty b { color: var(--red2); letter-spacing: .3em; }
.map-empty p { max-width: 420px; margin: 0 0 6px; }

.leaflet-bar a, .leaflet-bar a:hover { background: #0b0909; color: var(--text); border-bottom-color: var(--line2); }
.leaflet-bar a:hover { color: var(--red2); }
.leaflet-bar { border: 1px solid var(--line2) !important; box-shadow: none !important; border-radius: 0 !important; }
.leaflet-bar a { border-radius: 0 !important; }
.nm-popup .leaflet-popup-content-wrapper { background: #0b0909; color: var(--text); border: 1px solid var(--red); border-radius: 0; box-shadow: 0 8px 26px rgba(0, 0, 0, .7); }
.nm-popup .leaflet-popup-tip { background: var(--red); }
.nm-popup .leaflet-popup-content { margin: 12px 14px; font: 12px/1.5 var(--mono); }
.nm-popup a.leaflet-popup-close-button { color: var(--dim); }
.fpop > b { display: block; font-size: 14px; color: #fff; padding-right: 14px; }
.fpop small { display: flex; align-items: center; gap: 6px; color: var(--dim); font-size: 10px; letter-spacing: .06em; }
.fpop p { margin: 8px 0; white-space: pre-wrap; word-break: break-word; }
.fpop .rec { display: block; margin: 8px 0; padding: 5px 8px; border: 1px solid var(--line2); color: var(--text); text-decoration: none; }
.fpop .rec:hover { border-color: var(--red); background: var(--redbg); }
.fpop .rec b { color: var(--red2); }
.fpop .by { margin-top: 6px; }
.fpop .acts { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 10px; }

.pin i {
  position: absolute; left: 3px; top: 0; width: 16px; height: 16px; background: var(--c);
  border: 2px solid #0b0909; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  box-shadow: 0 0 0 1px var(--c), 0 0 12px var(--c);
}
.pin i::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: #0b0909; }
.pin-ico b {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(8, 7, 7, .88); border: 2px solid var(--c); box-shadow: 0 0 8px var(--c);
  font: 14px/1 "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
}
.pin-ico:hover b { transform: scale(1.15); }
.far .pin-ico b { transform: scale(.7); }
.far .bezirk-label { display: none; }
.leaflet-tooltip.pin-label {
  background: rgba(8, 7, 7, .92); border: 1px solid var(--line2); border-radius: 0; box-shadow: none;
  color: var(--text); font: 600 11px var(--mono); letter-spacing: .06em; padding: 3px 7px;
}
.leaflet-tooltip.pin-label::before { display: none; }
.map-list i.ico { background: none; width: 14px; height: auto; box-shadow: none; font-style: normal; font-size: 12px; line-height: 1; text-align: center; }
.leaflet-tooltip.area-label {
  background: transparent; border: 0; box-shadow: none; padding: 0;
  color: #fff; font: 700 11px var(--mono); letter-spacing: .14em; text-transform: uppercase;
  text-shadow: 0 0 3px #000, 0 0 6px #000, 0 1px 2px #000;
}
.route-line { animation: routeFlow 1.1s linear infinite; }
@keyframes routeFlow { to { stroke-dashoffset: -21; } }

.minimap { height: 240px; border: 1px solid var(--line2); background: #030303; }
.minimap.leaflet-container { font: inherit; }
.mm-list { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; }
.mm-list a { display: flex; align-items: center; gap: 6px; color: var(--text); text-decoration: none; font-size: 12px; }
.mm-list a:hover { color: var(--red2); }

/* ------------------------------------------------------------- Verwaltung */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.tbl th { text-align: left; color: var(--dim); font-weight: 400; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; padding: 6px 8px; border-bottom: 1px solid var(--line2); }
.tbl td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:hover td { background: rgba(255, 255, 255, .02); }
.tbl tr.off td { opacity: .5; }
.tbl small { display: block; color: var(--dim); font-size: 10px; margin-top: 2px; }
.tbl select { width: auto; min-width: 120px; padding: 3px 6px; }
.tbl .acts { white-space: nowrap; text-align: right; }
.tbl .acts .btn { margin-left: 4px; }
.tbl .me { font-style: normal; color: var(--red2); font-size: 10px; }
.tbl .st { font-size: 10px; letter-spacing: .14em; }
.tbl .st.on { color: #5fd38a; }
.tbl .st.off { color: var(--red2); }
.tbl .perms span { display: inline-block; border: 1px solid var(--line2); padding: 0 5px; margin: 0 3px 3px 0; font-size: 10px; }
.tbl .perms em { color: var(--dim); }
.tbl td.perms { min-width: 260px; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 4px 12px; margin-top: 4px; }
.perm-grid label { display: flex; gap: 8px; align-items: flex-start; padding: 5px; cursor: pointer; }
.perm-grid label:hover { background: rgba(255, 255, 255, .03); }
.perm-grid label.na { opacity: .4; cursor: not-allowed; }
.perm-grid input { width: auto; margin: 3px 0 0; accent-color: var(--red); }
.perm-grid small { display: block; color: var(--dim); font-size: 10px; }
.dmaps { display: grid; gap: 6px; }
.dmap { display: grid; grid-template-columns: 1fr 1.2fr auto 1fr auto; gap: 6px; align-items: center; }
.dmap > span { color: var(--dim); }
.acts-row { display: flex; gap: 6px; justify-content: flex-end; margin-top: 10px; }

/* ------------------------------------------------------------- Mittel */
@media (max-width: 1500px) {
  .top-right .clock { display: none; }
}
@media (max-width: 1580px) and (min-width: 821px) {
  .dk span { display: none; }
  .dk.on span { display: inline; }
}

/* ------------------------------------------------------------- Schmal */
@media (max-width: 820px) {
  .laptop { padding: 0; }
  .bezel { border-radius: 0; padding: 0; border: 0; }
  .cam, .base { display: none; }
  body.seq:not(.s-push) .laptop { padding: 14px 14px 0; }
  body.seq:not(.s-push) .bezel { padding: 16px 8px 10px; border: 1px solid #2c2626; border-radius: 14px 14px 4px 4px; }
  body.seq:not(.s-push) .base { display: flex; margin: 0 -14px; }
  .sys-term { left: 14px; bottom: 10px; font-size: 10px; }
  .screen { border: 0; border-radius: 0; }
  .app { grid-template-rows: auto minmax(0, 1fr) auto; }
  .top { grid-template-columns: 1fr auto; padding: 8px 10px 0; row-gap: 8px; }
  .dock { grid-column: 1 / -1; grid-row: 2; overflow-x: auto; scrollbar-width: none; clip-path: none; border-width: 1px 0 0; margin: 0 -10px; padding: 0 6px; }
  .dock::-webkit-scrollbar { display: none; }
  .dk em { display: none; }
  .brand span { display: none; }
  .who .adm { display: none; }
  .meta-line { word-break: break-word; }
  .main { padding: 14px 16px 24px; }
  .row { grid-template-columns: 40px 1fr auto; }
  .row .ph { width: 40px; height: 40px; }
  .row .code, .row .st { display: none; }
  .dossier-head { grid-template-columns: minmax(0, 1fr); }
  .portrait { width: 140px; height: 170px; }
  .inline-form { grid-template-columns: 1fr; }
  .log .it { grid-template-columns: 1fr; gap: 0; }
  .top-right .clock { display: none; }
  .term-out { max-height: 60px; }
  .mapview { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .map-side { max-height: 38vh; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; gap: 8px; }
  .map-layers { grid-template-columns: 1fr 1fr; }
  .dmap { grid-template-columns: 1fr 1fr; }
  .dmap > span { display: none; }
  .live-banner { top: -14px; flex-wrap: wrap; }
}

/* Routenvergabe */
.rt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.rt-col h4, .rt-h { display: flex; align-items: baseline; gap: 8px; margin: 0 0 6px; font-size: 11px; letter-spacing: .2em; color: var(--dim); font-weight: 600; }
.rt-col h4 small { margin-left: auto; letter-spacing: .08em; color: #3ccf6e; }
.rt { display: grid; grid-template-columns: 76px 1fr auto; gap: 10px; align-items: center; padding: 5px 8px; border-left: 2px solid var(--red); background: var(--panel2); margin-bottom: 3px; font-size: 12px; }
.rt .n { font-weight: 700; }
.rt .o { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt .tm { color: var(--dim); font-size: 11px; }
.rt.free { border-left-color: #3ccf6e; }
.rt.free .o { color: #3ccf6e; font-weight: 700; letter-spacing: .15em; }
.rt-h { margin-top: 16px; }
.rt-feed .it { display: grid; grid-template-columns: 120px 28px 1fr; gap: 10px; padding: 4px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.rt-feed .tm { color: var(--dim); }
.rt-feed .sv { color: var(--dim); }
.rt-feed .k-free b:first-child { color: #3ccf6e; }
.rt-feed .k-taken b:first-child { color: var(--red2); }
.rt-none { color: var(--dim); font-size: 12px; padding: 4px 0; }
.rt-err { color: var(--red2); font-size: 11px; margin: 8px 0 0; }
.rt-stand { color: var(--dim); font-size: 11px; align-self: center; }
@media (max-width: 700px) { .rt-feed .it { grid-template-columns: 1fr; gap: 0; } .rt-stand { display: none; } }

/* Ausweis-Bild unter dem Portraet (Personen) */
.dossier-pics { display: grid; gap: 10px; align-content: start; }
.idcard { position: relative; width: 170px; aspect-ratio: 85.6 / 54; border: 1px dashed var(--line2); cursor: pointer; display: grid; place-content: center; text-align: center; gap: 2px; background-size: cover; background-position: center; }
.idcard span { font-size: 11px; letter-spacing: .25em; color: var(--dim); font-weight: 700; }
.idcard small { font-size: 10px; color: var(--dim); }
.idcard:hover { border-color: var(--red); }
.idcard.set { border-style: solid; border-color: var(--line2); }
.idcard.ro { cursor: default; }
.idcard .x { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; display: grid; place-items: center; background: rgba(0,0,0,.75); color: var(--text); font-size: 11px; letter-spacing: 0; opacity: 0; transition: opacity .15s; }
.idcard .x2 { right: 28px; }
.idcard:hover .x { opacity: 1; }
.idcard .x:hover { color: var(--red2); }
