:root {
  --bg: #0a0f1c;
  --bg2: rgba(14, 21, 38, .72);
  --karte: rgba(22, 31, 54, .62);
  --karte2: rgba(36, 49, 82, .7);
  --rand: rgba(255, 255, 255, .09);
  --blau-v: #3d5cd6;
  --gold-v: #e6a93a;
  --verlauf: linear-gradient(120deg, var(--blau-v), var(--gold-v));
  --text: #e6ebf3;
  --text2: #9aa8bf;
  --gold: #d4a72c;
  --gold2: #f0c75a;
  --blau: #3b82f6;
  --gruen: #2ecc71;
  --rot: #e5484d;
  --orange: #f39c12;
  --radius: 12px;
  --schatten: 0 8px 30px rgba(0, 0, 0, .35);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; }
body {
  min-height: 100vh;
  background:
    radial-gradient(1100px 700px at 12% -10%, rgba(61, 92, 214, .35), transparent 60%),
    radial-gradient(900px 700px at 105% 110%, rgba(230, 169, 58, .22), transparent 60%),
    radial-gradient(700px 500px at 60% 40%, rgba(120, 30, 40, .10), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
body::before { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: -1; opacity: .5;
  background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px); background-size: 22px 22px; }
.verlauf-text { background: linear-gradient(100deg, #cfe0ff 0%, #9fb8ff 35%, #f3c969 75%, #e6a93a 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.abzeichen { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: rgba(46, 204, 113, .12); border: 1px solid rgba(46, 204, 113, .35); color: #9ef0c0; font-weight: 700; font-size: 13px; }
.abzeichen i { width: 8px; height: 8px; border-radius: 50%; background: #2ecc71; box-shadow: 0 0 10px #2ecc71; }
a { color: var(--gold2); }
button, input, select, textarea { font: inherit; color: inherit; }
.versteckt { display: none !important; }
.laden { display: grid; place-items: center; height: 100vh; color: var(--text2); }

/* ---------- Anmeldung ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-box {
  position: relative; overflow: hidden; max-width: 560px; width: 100%; text-align: center; padding: 44px 40px;
  border-radius: 28px; border: 1px solid rgba(255,255,255,.12); box-shadow: 0 30px 80px rgba(0,0,0,.45);
  background: linear-gradient(135deg, rgba(49, 78, 190, .55), rgba(20, 28, 50, .55) 55%, rgba(200, 140, 40, .45));
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.login-box .siegel { display: block; margin: 0 auto 14px; width: 128px; height: 128px; filter: drop-shadow(0 10px 25px rgba(0,0,0,.5)); }
.login-box .abzeichen { margin-bottom: 6px; }
.login h1 { font-size: 34px; line-height: 1.1; }
.stern { font-size: 54px; line-height: 1; color: var(--gold); }
.login h1 { margin: 14px 0 10px; letter-spacing: -.5px; }
.login p { color: #c9d3e6; line-height: 1.6; }
.knopf-discord { display: inline-flex; align-items: center; gap: 10px; background: #5865f2; color: #fff; border: 0; border-radius: 14px; padding: 13px 26px; font-weight: 700; cursor: pointer; text-decoration: none; margin-top: 14px; box-shadow: 0 10px 30px rgba(88,101,242,.45); transition: transform .15s; }
.knopf-discord:hover { transform: translateY(-2px); }
.knopf-discord:hover { background: #4752c4; }
.hinweis { background: #2a2210; border: 1px solid #5e4a12; color: #f3dc9b; border-radius: 10px; padding: 12px 14px; text-align: left; font-size: 14px; margin-top: 18px; }
.hinweis code { background: #0006; padding: 1px 5px; border-radius: 4px; }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.seitenleiste { background: rgba(10, 15, 30, .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-right: 1px solid var(--rand); padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.marke { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.marke img { width: 44px; height: 44px; border-radius: 50%; filter: drop-shadow(0 4px 10px rgba(0,0,0,.5)); }
.marke .stern { font-size: 30px; }
.marke b { display: block; font-size: 16px; }
.marke small { color: var(--text2); font-size: 12px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; color: var(--text2); text-decoration: none; font-weight: 500; }
.nav a:hover { background: var(--karte); color: var(--text); }
.nav a.aktiv { background: linear-gradient(90deg, rgba(61,92,214,.35), rgba(230,169,58,.18)); color: #fff; box-shadow: inset 3px 0 0 var(--gold-v); }
.nav .zahl { margin-left: auto; background: var(--karte2); border-radius: 20px; padding: 0 8px; font-size: 12px; }
.ich { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid var(--rand); }
.ich img { width: 34px; height: 34px; border-radius: 50%; }
.ich div { flex: 1; min-width: 0; }
.ich b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ich small { color: var(--text2); font-size: 12px; }
.ich a { color: var(--text2); font-size: 18px; text-decoration: none; }

.inhalt { padding: 26px 30px 60px; max-width: 1400px; width: 100%; }
.kopf { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.kopf h1 { margin: 0; font-size: 24px; }
.kopf .unter { color: var(--text2); width: 100%; margin-top: -8px; }
.leiste { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.leiste input, .leiste select, .feld input, .feld select, .feld textarea {
  background: var(--bg2); border: 1px solid var(--rand); border-radius: 9px; padding: 9px 12px; outline: none;
}
.leiste input:focus, .feld input:focus, .feld select:focus, .feld textarea:focus { border-color: var(--gold); }
.leiste input[type=search] { min-width: 260px; flex: 1; max-width: 420px; }

/* ---------- Hero (Übersicht) ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 28px; padding: 38px 40px; margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,.12); box-shadow: 0 25px 70px rgba(0,0,0,.35);
  background: linear-gradient(120deg, rgba(49, 78, 190, .65), rgba(24, 32, 58, .55) 55%, rgba(200, 140, 40, .5));
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.hero h1 { font-size: clamp(30px, 4.2vw, 52px); line-height: 1.05; margin: 16px 0 12px; letter-spacing: -1px; }
.hero p { color: #d5deef; margin: 0 0 20px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hero .hero-siegel { position: absolute; right: -40px; top: 50%; transform: translateY(-50%); width: 320px; opacity: .18; pointer-events: none; }
@media (max-width: 900px) { .hero { padding: 26px 20px; } .hero .hero-siegel { width: 200px; right: -60px; } }

/* ---------- Karten ---------- */
.raster { display: grid; gap: 14px; }
.raster.kacheln { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.raster.zwei { grid-template-columns: 1.3fr 1fr; }
.karte { background: var(--karte); border: 1px solid var(--rand); border-radius: 18px; padding: 18px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.karte h2 { margin: 0 0 12px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.kachel .wert { font-size: 30px; font-weight: 700; margin-top: 4px; }
.kachel .titel { color: var(--text2); font-size: 13px; }
.kachel.gold .wert { color: var(--gold2); }
.kachel.rot .wert { color: var(--rot); }
.kachel.gruen .wert { color: var(--gruen); }
.kachel.orange .wert { color: var(--orange); }

.belegung { display: flex; flex-direction: column; gap: 7px; }
.belegung .zeile { display: grid; grid-template-columns: 170px 1fr 58px; gap: 10px; align-items: center; font-size: 13px; }
.balken { height: 8px; background: var(--bg2); border-radius: 8px; overflow: hidden; }
.balken span { display: block; height: 100%; border-radius: 8px; }
.belegung .gruppe { color: var(--text2); font-size: 12px; text-transform: uppercase; letter-spacing: .6px; margin-top: 8px; }

/* ---------- Tabelle ---------- */
.tabelle-box { background: var(--karte); border: 1px solid var(--rand); border-radius: 18px; overflow: auto; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rand); vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--text2); background: rgba(12, 18, 34, .95); position: sticky; top: 0; z-index: 1; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: var(--karte2); }
tr.gruppenzeile td { background: var(--bg2); font-weight: 700; font-size: 13px; cursor: default; }
.person { display: flex; align-items: center; gap: 10px; }
.person img, .person .avatar-leer { width: 30px; height: 30px; border-radius: 50%; flex: none; }
.avatar-leer { background: var(--karte2); display: grid; place-items: center; font-size: 13px; color: var(--text2); }
.person small { display: block; color: var(--text2); font-size: 12px; }
.dn { font-family: Consolas, monospace; background: var(--bg2); border: 1px solid var(--rand); border-radius: 6px; padding: 2px 7px; }
.leer { color: var(--text2); text-align: center; padding: 30px; }

.pille { display: inline-flex; align-items: center; gap: 4px; border-radius: 20px; padding: 2px 9px; font-size: 12px; font-weight: 600; background: var(--karte2); border: 1px solid transparent; white-space: nowrap; }
.pille.rot { background: #3a1417; color: #ff8a8d; }
.pille.gruen { background: #11321f; color: #6ee7a0; }
.pille.orange { background: #3a2a0e; color: #ffc15e; }
.pille.grau { background: var(--karte2); color: var(--text2); }
.pillen { display: flex; flex-wrap: wrap; gap: 4px; }

/* ---------- Knöpfe ---------- */
.knopf { background: var(--karte2); border: 1px solid var(--rand); border-radius: 12px; padding: 9px 16px; transition: transform .12s, box-shadow .12s; cursor: pointer; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.knopf:hover { border-color: var(--gold); }
.knopf.haupt { background: var(--verlauf); color: #fff; border-color: transparent; box-shadow: 0 8px 22px rgba(61,92,214,.35); text-shadow: 0 1px 2px rgba(0,0,0,.3); }
.knopf.haupt:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(230,169,58,.35); }
.knopf.glas { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.14); backdrop-filter: blur(8px); }
.knopf.gefahr { background: #3a1417; border-color: #6b2226; color: #ffb0b2; }
.knopf.klein { padding: 5px 10px; font-size: 13px; }
.knopf:disabled { opacity: .6; cursor: wait; }
.aktionen { display: flex; flex-wrap: wrap; gap: 8px; }

.befehle-gruppe { margin-bottom: 22px; }
.befehle-gruppe h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .6px; color: var(--text2); margin: 0 0 10px; }
.befehl-karte { background: var(--karte); border: 1px solid var(--rand); border-radius: 16px; backdrop-filter: blur(12px); transition: transform .12s, border-color .12s; padding: 14px 16px; cursor: pointer; text-align: left; width: 100%; }
.befehl-karte:hover { border-color: var(--gold); transform: translateY(-1px); }
.befehl-karte b { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.befehl-karte small { color: var(--text2); display: block; margin-top: 4px; line-height: 1.35; }
.befehl-karte code { color: var(--gold2); font-size: 12px; }

/* ---------- Log ---------- */
.log { display: flex; flex-direction: column; }
.log .eintrag { display: grid; grid-template-columns: 30px 150px 1fr; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--rand); align-items: start; line-height: 1.45; }
.log .eintrag:last-child { border-bottom: 0; }
.log .zeit { color: var(--text2); font-size: 13px; font-variant-numeric: tabular-nums; }
.log .emoji { font-size: 17px; }

/* ---------- Discord-Nachrichten ---------- */
.ment { background: #3c4270; color: #c9cdfb; border-radius: 4px; padding: 0 3px; font-weight: 500; }
.rolle-ment { border-radius: 4px; padding: 0 4px; font-weight: 600; }
.md code { background: #0b111b; border-radius: 4px; padding: 1px 5px; font-family: Consolas, monospace; font-size: 13px; }
.md .zitat { border-left: 3px solid #4e5d78; padding-left: 9px; margin: 2px 0; color: #cdd6e4; }
.embed { background: #151e2d; border: 1px solid var(--rand); border-left: 4px solid var(--gold); border-radius: 8px; padding: 12px 16px; margin: 10px 0; position: relative; overflow: hidden; }
.embed .e-autor { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.embed .e-autor img { width: 22px; height: 22px; border-radius: 50%; }
.embed .e-titel { font-weight: 700; font-size: 16px; margin-bottom: 6px; }
.embed .e-thumb { float: right; width: 72px; height: 72px; border-radius: 8px; margin: 0 0 8px 12px; object-fit: cover; }
.embed .e-text { line-height: 1.5; font-size: 14px; }
.embed .e-felder { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 16px; margin-top: 10px; clear: both; }
.embed .e-feld { grid-column: span 3; font-size: 14px; line-height: 1.45; }
.embed .e-feld.inline { grid-column: span 1; }
.embed .e-feld b.n { display: block; font-size: 13px; margin-bottom: 2px; }
.embed .e-fuss { color: var(--text2); font-size: 12px; margin-top: 10px; clear: both; }
.antwort { background: var(--bg2); border: 1px solid var(--rand); border-radius: 10px; padding: 12px 14px; margin-top: 12px; line-height: 1.5; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal-hintergrund { position: absolute; inset: 0; background: rgba(3, 6, 12, .7); backdrop-filter: blur(2px); }
.modal-box { position: relative; background: rgba(18, 26, 46, .92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,.12); border-radius: 22px; width: min(760px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 24px; box-shadow: var(--schatten); }
.modal-x { position: absolute; right: 14px; top: 12px; background: none; border: 0; font-size: 18px; color: var(--text2); cursor: pointer; }
.modal h2 { margin: 0 0 4px; display: flex; gap: 8px; align-items: center; }
.modal .unter { color: var(--text2); margin: 0 0 16px; }
.formular { display: grid; gap: 12px; }
.feld label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.feld label .pflicht { color: var(--gold2); }
.feld small { color: var(--text2); display: block; margin-top: 3px; font-size: 12px; }
.feld input, .feld select, .feld textarea { width: 100%; }
.feld textarea { min-height: 80px; resize: vertical; }
.feld.check label { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.feld.check input { width: auto; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--rand); margin: 12px 0; flex-wrap: wrap; }
.tabs button { background: none; border: 0; padding: 9px 12px; color: var(--text2); cursor: pointer; border-bottom: 2px solid transparent; font-weight: 600; }
.tabs button.aktiv { color: var(--gold2); border-bottom-color: var(--gold); }
.profil { display: flex; gap: 14px; align-items: center; }
.profil img, .profil .avatar-leer { width: 56px; height: 56px; border-radius: 50%; }
.profil h2 { margin: 0; }

/* ---------- Ausbildungs-Matrix ---------- */
.matrix th.dreh { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; padding: 10px 4px; text-align: left; text-transform: none; letter-spacing: 0; font-size: 12px; vertical-align: bottom; }
.matrix td.z { text-align: center; padding: 6px; }
.matrix .ja { color: var(--gruen); font-weight: 700; }
.matrix .nein { color: #3a4760; }
.matrix tbody tr { cursor: default; }

/* ---------- Tickets ---------- */
.t-layout { display: grid; grid-template-columns: 320px 1fr; gap: 14px; height: calc(100vh - 150px); min-height: 480px; }
.t-seite { background: var(--karte); border: 1px solid var(--rand); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; }
.t-filter { display: flex; gap: 4px; padding: 10px; border-bottom: 1px solid var(--rand); }
.t-filter button { flex: 1; background: var(--bg2); border: 1px solid var(--rand); border-radius: 8px; padding: 6px; cursor: pointer; color: var(--text2); font-weight: 600; }
.t-filter button.aktiv { color: var(--gold2); border-color: var(--gold); }
.t-liste { overflow-y: auto; flex: 1; }
.ticket-eintrag { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--rand); padding: 12px 14px; cursor: pointer; }
.ticket-eintrag:hover { background: var(--karte2); }
.ticket-eintrag.aktiv { background: var(--karte2); box-shadow: inset 3px 0 0 var(--gold); }
.t-kopf { display: flex; gap: 8px; align-items: center; }
.t-kopf span { color: var(--text2); font-size: 13px; }
.t-kopf .pille { margin-left: auto; }
.t-person { color: var(--text2); font-size: 12px; margin-top: 3px; }
.ticket-eintrag .t-text { font-size: 13px; margin-top: 4px; color: #cdd6e4; }
.t-chat { background: var(--karte); border: 1px solid var(--rand); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; }
.t-chat-kopf { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--rand); flex-wrap: wrap; }
.t-chat-kopf h2 { margin: 0; font-size: 17px; }
.t-chat-kopf .unter { color: var(--text2); font-size: 13px; margin-top: 2px; }
.t-verlauf { flex: 1; overflow-y: auto; padding: 12px 18px; display: flex; flex-direction: column; gap: 14px; }
.t-nachricht { display: flex; gap: 12px; align-items: flex-start; }
.t-nachricht > img, .t-nachricht > .avatar-leer { width: 36px; height: 36px; border-radius: 50%; flex: none; }
.t-inhalt { min-width: 0; flex: 1; }
.t-meta { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.t-meta > span:last-child { color: var(--text2); font-size: 12px; }
.t-nachricht .t-text { line-height: 1.5; margin-top: 2px; word-wrap: break-word; }
.t-nachricht.ich .t-meta b { color: var(--gold2); }
.t-nachricht .embed { margin: 6px 0 0; max-width: 620px; }
.t-bild { max-width: 320px; max-height: 240px; border-radius: 8px; margin-top: 6px; }
.t-eingabe { display: flex; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--rand); background: var(--bg2); }
.t-eingabe textarea { flex: 1; background: var(--karte); border: 1px solid var(--rand); border-radius: 9px; padding: 9px 12px; resize: none; outline: none; min-height: 44px; }
.t-eingabe textarea:focus { border-color: var(--gold); }
@media (max-width: 900px) {
  .t-layout { grid-template-columns: 1fr; height: auto; }
  .t-seite { max-height: 280px; }
  .t-chat { min-height: 520px; }
}

/* ---------- Ticket-Log (Archiv) ---------- */
.t-modus { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--rand); margin-left: auto; }
.t-modus button { background: none; border: 0; border-radius: 10px; padding: 8px 14px; cursor: pointer; color: var(--text2); font-weight: 700; }
.t-modus button.aktiv { background: var(--verlauf); color: #fff; }
.archiv-liste { display: flex; flex-direction: column; gap: 8px; }
.archiv-eintrag { background: var(--karte); border: 1px solid var(--rand); border-radius: 16px; overflow: hidden; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.archiv-eintrag.offen { border-color: rgba(230,169,58,.45); }
.archiv-kopf { display: grid; grid-template-columns: 90px 1fr auto 24px; gap: 14px; align-items: center; width: 100%; background: none; border: 0; padding: 14px 16px; cursor: pointer; text-align: left; }
.archiv-kopf:hover { background: rgba(255,255,255,.03); }
.archiv-nr { font-weight: 800; font-size: 16px; }
.archiv-haupt small, .archiv-meta small { display: block; color: var(--text2); font-size: 12.5px; margin-top: 3px; }
.archiv-meta { text-align: right; font-size: 13.5px; white-space: nowrap; }
.archiv-pfeil { color: var(--text2); }
.archiv-details { border-top: 1px solid var(--rand); padding: 16px 18px 18px; }
.archiv-info { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 14px; }
.archiv-info small, .archiv-anliegen small { color: var(--text2); font-size: 12px; display: block; margin-bottom: 3px; }
.archiv-anliegen { background: var(--bg2); border: 1px solid var(--rand); border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; line-height: 1.5; }
.archiv-details h3 { font-size: 15px; margin: 0 0 10px; }
.archiv-chat { display: flex; flex-direction: column; gap: 14px; max-height: 560px; overflow-y: auto; padding-right: 6px; }
@media (max-width: 900px) {
  .archiv-kopf { grid-template-columns: 1fr 24px; }
  .archiv-nr, .archiv-meta { grid-column: 1; text-align: left; }
  .archiv-pfeil { grid-row: 1; grid-column: 2; }
  .t-modus { margin-left: 0; }
}

/* ---------- Ticket-Einstellungen ---------- */
.admin-system { margin-bottom: 16px; }
.admin-kopf { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.admin-kopf input.gross, .admin-kat-kopf input.gross { flex: 1; min-width: 200px; font-size: 17px; font-weight: 700; }
.admin-kopf input, .admin-kat input, .admin-kat select, .admin-system select, .admin-system textarea { background: var(--bg2); border: 1px solid var(--rand); border-radius: 9px; padding: 8px 11px; outline: none; }
.admin-system input:focus, .admin-system textarea:focus, .admin-system select:focus { border-color: var(--gold); }
.admin-felder { grid-template-columns: 1fr 1fr; gap: 12px; }
.admin-felder .breit { grid-column: 1 / -1; }
.admin-kats { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.admin-kat { background: var(--bg2); border: 1px solid var(--rand); border-radius: 10px; padding: 12px; }
.admin-kat input, .admin-kat select { background: var(--karte); }
.admin-kat-kopf { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.admin-kat-kopf input.emoji { width: 58px; text-align: center; font-size: 18px; }
.panel-zeile { display: flex; gap: 8px; }
.panel-zeile select { flex: 1; }
.pille .x { background: none; border: 0; color: inherit; cursor: pointer; padding: 0 0 0 2px; font-size: 11px; opacity: .7; }
.pille .x:hover { opacity: 1; }
.admin-leiste { position: sticky; bottom: 0; display: flex; gap: 10px; align-items: center; justify-content: flex-end; background: var(--bg); border-top: 1px solid var(--rand); padding: 12px 0; margin-top: 8px; z-index: 5; flex-wrap: wrap; }
.admin-leiste > :first-child { margin-right: auto; }
@media (max-width: 900px) { .admin-felder { grid-template-columns: 1fr; } }

#toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { white-space: pre-line; background: var(--karte2); border: 1px solid var(--rand); border-left: 4px solid var(--gold); padding: 10px 14px; border-radius: 10px; box-shadow: var(--schatten); max-width: 380px; }
.toast.fehler { border-left-color: var(--rot); }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .seitenleiste { position: static; height: auto; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .ich { display: none; }
  .raster.zwei { grid-template-columns: 1fr; }
  .inhalt { padding: 18px 16px 50px; }
  .log .eintrag { grid-template-columns: 26px 1fr; }
  .log .zeit { grid-column: 2; }
  .embed .e-felder { grid-template-columns: 1fr; }
  .embed .e-feld.inline { grid-column: span 3; }
}
