:root {
  --bg: #07090f;
  --fg: #e8ecf4;
  --muted: #8a93a6;
  --accent: #ffb020;
  --accent2: #ff5a36;
  --cyan: #3ee6ff;
  --karte: rgba(18, 22, 32, .78);
  --rand: rgba(255, 255, 255, .09);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(255,176,32,.12), transparent 60%),
    radial-gradient(800px 500px at 110% 110%, rgba(62,230,255,.10), transparent 60%),
    var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
code { font-family: ui-monospace, Consolas, monospace; color: var(--cyan); font-size: .9em; }

/* Absperrband */
.tape {
  position: fixed; left: -10%; width: 120%; height: 26px; z-index: 0; opacity: .85;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 22px, #111 22px 44px);
  animation: slide 3s linear infinite;
}
.tape.top { top: 22px; transform: rotate(-2deg); }
.tape.bottom { bottom: 22px; transform: rotate(2deg); animation-direction: reverse; }
@keyframes slide { to { background-position: 62px 0; } }

/* ---------- Login ---------- */
body.login { display: grid; place-items: center; min-height: 100vh; padding: 5rem 1rem; overflow: hidden; }
.karte {
  position: relative; z-index: 1; width: 100%; max-width: 400px;
  background: var(--karte); border: 1px solid var(--rand); border-radius: 20px;
  padding: 2.2rem 2rem 1.6rem; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
  animation: rein .5s cubic-bezier(.2,.8,.2,1);
}
@keyframes rein { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.schloss { color: var(--accent); display: flex; justify-content: center; margin-bottom: 1rem; }
.karte h1 { text-align: center; font-size: 1.6rem; letter-spacing: -.02em; }
.sub { color: var(--muted); text-align: center; margin: .4rem 0 1.4rem; font-size: .95rem; }
label { display: block; margin-bottom: 1rem; }
label span { display: block; font-size: .8rem; color: var(--muted); margin-bottom: .35rem; letter-spacing: .04em; }
input[type=password] {
  width: 100%; padding: .8rem 1rem; font-size: 1rem; color: var(--fg);
  background: rgba(255,255,255,.05); border: 1px solid var(--rand); border-radius: 12px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
input[type=password]:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255,176,32,.15); }
button {
  width: 100%; margin-top: .4rem; padding: .85rem 1rem; font-size: 1rem; font-weight: 700; cursor: pointer;
  color: #1a1206; border: 0; border-radius: 12px;
  background: linear-gradient(100deg, var(--accent), var(--accent2));
  box-shadow: 0 8px 24px rgba(255,120,40,.35); transition: transform .15s, box-shadow .15s;
}
button:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(255,120,40,.45); }
.zurueck { display: block; text-align: center; margin-top: 1.1rem; color: var(--muted); font-size: .85rem; text-decoration: none; }
.zurueck:hover { color: var(--fg); }
.meldung { padding: .7rem .9rem; border-radius: 10px; margin-bottom: 1rem; font-size: .9rem; background: rgba(255,255,255,.05); border: 1px solid var(--rand); }
.meldung.fehler { background: rgba(255,90,54,.12); border-color: rgba(255,90,54,.4); color: #ffc1b3; animation: wackel .4s; }
.meldung.ok { background: rgba(62,230,255,.1); border-color: rgba(62,230,255,.35); color: #bff6ff; }
.meldung pre { margin-top: .5rem; white-space: pre-wrap; word-break: break-all; font-size: .75rem; color: var(--cyan); }
@keyframes wackel { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---------- Übersicht ---------- */
body.dash { padding: 3rem 1.5rem; max-width: 1100px; margin: 0 auto; }
header { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 2.4rem; flex-wrap: wrap; }
header h1 {
  font-size: clamp(2.2rem, 6vw, 3.4rem); font-weight: 800; letter-spacing: -.03em;
  background: linear-gradient(100deg, #fff 20%, var(--accent) 60%, var(--accent2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
header .sub { text-align: left; margin: .3rem 0 0; }
.badge {
  display: inline-flex; align-items: center; gap: .5rem; font-size: .75rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--cyan); border: 1px solid rgba(62,230,255,.3); padding: .35rem .8rem; border-radius: 999px; margin-bottom: .9rem;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); animation: puls 1.6s ease-in-out infinite; }
@keyframes puls { 50% { opacity: .25; } }
.abmelden {
  color: var(--fg); text-decoration: none; font-size: .9rem; padding: .6rem 1.1rem; border-radius: 10px;
  border: 1px solid var(--rand); background: rgba(255,255,255,.04); transition: background .2s, border-color .2s;
}
.abmelden:hover { background: rgba(255,90,54,.15); border-color: rgba(255,90,54,.5); }

.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.1rem; }
.kachel {
  position: relative; display: flex; flex-direction: column; gap: .35rem; padding: 1.4rem;
  text-decoration: none; color: var(--fg); border-radius: 18px; overflow: hidden;
  background: var(--karte); border: 1px solid var(--rand);
  transition: transform .2s, border-color .2s, box-shadow .2s;
  animation: rein .5s cubic-bezier(.2,.8,.2,1) both;
}
.kachel:nth-child(2) { animation-delay: .05s; } .kachel:nth-child(3) { animation-delay: .1s; }
.kachel:nth-child(4) { animation-delay: .15s; } .kachel:nth-child(5) { animation-delay: .2s; }
.kachel:nth-child(6) { animation-delay: .25s; }
.kachel::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: linear-gradient(135deg, rgba(255,176,32,.14), transparent 55%); transition: opacity .2s;
}
.kachel:hover { transform: translateY(-4px); border-color: rgba(255,176,32,.45); box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.kachel:hover::after { opacity: 1; }
.icon { font-size: 2rem; margin-bottom: .4rem; }
.titel { font-weight: 700; font-size: 1.08rem; }
.text { color: var(--muted); font-size: .88rem; }
body.dash footer { margin-top: 3rem; text-align: center; color: #5b6476; font-size: .8rem; }

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

/* ---------- Zwei-Faktor ---------- */
.karte.breit { max-width: 480px; }
input.code {
  width: 100%; padding: .8rem 1rem; font-size: 1.6rem; letter-spacing: .5em; text-align: center;
  font-family: ui-monospace, Consolas, monospace; color: var(--fg);
  background: rgba(255,255,255,.05); border: 1px solid var(--rand); border-radius: 12px; outline: none;
}
input.code:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255,176,32,.15); }
.schritte { margin: 0 0 1rem 1.2rem; color: var(--fg); font-size: .92rem; line-height: 1.5; }
.schritte li { margin-bottom: .9rem; }
.schluessel {
  margin: .5rem 0 .3rem; padding: .7rem; border-radius: 10px; text-align: center;
  font-family: ui-monospace, Consolas, monospace; font-size: 1.05rem; letter-spacing: .08em; color: var(--cyan);
  background: rgba(62,230,255,.07); border: 1px dashed rgba(62,230,255,.35); user-select: all; word-break: break-all;
}
.hilfe { display: block; color: var(--muted); font-size: .8rem; }
.hilfe a { color: var(--accent); }
.karte h1 + .meldung, .karte h1 + .sub { margin-top: .8rem; }
