/* ---------- Tokens ---------- */
:root {
  --bg: #ECEEF1;
  --panel: #FFFFFF;
  --panel-2: #F5F6F8;
  --ink: #15171C;
  --ink-2: #5C636E;
  --ink-3: #8B919B;
  --line: #D7DBE1;
  --grid: #E8EAEE;
  --now: #D23F31;
  --focus: #15171C;
  --shadow: 0 12px 32px rgba(21, 23, 28, 0.18);
  --r: 6px;
  --hour: 56px;
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111317; --panel: #1B1E24; --panel-2: #22262D; --ink: #ECEEF1; --ink-2: #A3A9B3; --ink-3: #6F7580;
    --line: #2E333B; --grid: #262A31; --focus: #ECEEF1; --shadow: 0 12px 32px rgba(0,0,0,0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #111317; --panel: #1B1E24; --panel-2: #22262D; --ink: #ECEEF1; --ink-2: #A3A9B3; --ink-3: #6F7580;
    --line: #2E333B; --grid: #262A31; --focus: #ECEEF1; --shadow: 0 12px 32px rgba(0,0,0,0.6);
    color-scheme: dark;
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 14px; line-height: 1.4;
  font-variation-settings: "wdth" 100;
  display: flex; flex-direction: column; min-height: 100vh;
}
button, input, select { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.92em; background: var(--panel-2); padding: 0 4px; border-radius: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--panel); padding: 8px 12px; border-radius: var(--r); z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  cursor: pointer; text-decoration: none; color: var(--ink); white-space: nowrap;
}
.btn:hover { border-color: var(--ink-2); }
.btn:active { background: var(--panel-2); }
.btn.icon { width: 32px; padding: 0; justify-content: center; }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn[aria-busy="true"] svg { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link { background: none; border: 0; padding: 0; color: var(--ink-2); text-decoration: underline; cursor: pointer; }
.link:hover { color: var(--ink); }

/* ---------- Kopf ---------- */
.top {
  display: flex; align-items: center; gap: 20px; padding: 10px 20px;
  background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand h1 { font-size: 17px; letter-spacing: -0.01em; white-space: nowrap; }
.brand-strip { display: inline-flex; gap: 2px; height: 20px; padding: 3px; background: var(--ink); border-radius: 4px; }
.brand-strip i { display: block; width: 4px; border-radius: 1px; }
.brand-strip i:nth-child(1) { background: #D98E04; }
.brand-strip i:nth-child(2) { background: #D23F31; }
.brand-strip i:nth-child(3) { background: #2B5CD9; }
.brand-strip i:nth-child(4) { background: #148F7A; }
.semester select {
  height: 32px; padding: 0 32px 0 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel);
  font-weight: 600; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%238B919B' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; cursor: pointer;
}
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.stand { color: var(--ink-2); font-size: 13px; white-space: nowrap; }
.stand.alt { color: var(--now); }
.only-narrow { display: none; }
.theme { position: relative; }
.theme .sonne, .theme .mond { display: none; }
.theme[data-mode="light"] .sonne, .theme[data-mode="system"] .sonne { display: block; }
.theme[data-mode="dark"] .mond { display: block; }
@media (prefers-color-scheme: dark) { .theme[data-mode="system"] .sonne { display: none; } .theme[data-mode="system"] .mond { display: block; } }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: 264px 1fr; flex: 1; min-height: 0; }
.seite {
  border-right: 1px solid var(--line); background: var(--panel); padding: 16px;
  overflow-y: auto; position: sticky; top: 53px; height: calc(100vh - 53px); align-self: start;
}
.block + .block { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.block h2 { font-size: 13px; color: var(--ink-2); font-weight: 600; margin-bottom: 8px; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; }
.block-head .links { display: flex; gap: 10px; font-size: 12px; }
.hint { color: var(--ink-3); font-size: 12px; margin: 10px 0 0; }
.quelle p { margin: 0; font-size: 12.5px; color: var(--ink-2); word-break: break-word; }
.quelle a { color: inherit; }

.fb-liste { list-style: none; margin: 0; padding: 0; }
.fb-liste li { margin: 0; }
.fb-liste label {
  display: grid; grid-template-columns: 14px 1fr auto; align-items: center; gap: 10px;
  padding: 6px 6px; border-radius: var(--r); cursor: pointer; user-select: none;
}
.fb-liste label:hover { background: var(--panel-2); }
.fb-liste input { position: absolute; opacity: 0; width: 0; height: 0; }
.fb-swatch { width: 14px; height: 14px; border-radius: 3px; background: var(--fb); transition: opacity .15s; }
.fb-liste label.aus .fb-swatch { opacity: 0.18; }
.fb-liste label.aus .fb-name { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--line); }
.fb-count { color: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.fb-liste input:focus-visible + .fb-swatch { outline: 2px solid var(--focus); outline-offset: 2px; }

.feld { display: block; margin-bottom: 10px; }
.feld span { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 4px; }
.feld input, .feld select {
  width: 100%; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel);
}
.feld input:focus, .feld select:focus { border-color: var(--ink-2); }


.aus-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.aus-liste label { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; font-size: 12.5px; user-select: none; }
.aus-liste label:hover { border-color: var(--ink-2); }
.aus-liste label.aktiv { background: var(--ink); color: var(--bg); border-color: var(--ink); text-decoration: line-through; }
.aus-liste input { position: absolute; opacity: 0; width: 0; height: 0; }
.aus-liste input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------- Hauptbereich ---------- */
.haupt { padding: 14px 20px 24px; min-width: 0; display: flex; flex-direction: column; }
.werkzeuge { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.nav { display: flex; align-items: center; gap: 8px; }
.nav input[type="date"] { height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.zeitraum { font-size: 17px; font-weight: 600; margin-left: 8px; white-space: nowrap; }
.zeitraum small { color: var(--ink-2); font-weight: 400; font-size: 13px; margin-left: 8px; }
.ansichten { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 2px; }
.ansichten button { height: 28px; padding: 0 12px; border: 0; background: none; border-radius: 4px; cursor: pointer; color: var(--ink-2); }
.ansichten button:hover { color: var(--ink); }
.ansichten .kurz { display: none; }
.ansichten button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.meldung { margin: 0 0 12px; padding: 10px 12px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--now); }
.status { color: var(--ink-2); font-size: 13px; min-height: 18px; margin-bottom: 8px; }
.ansicht { flex: 1; min-height: 0; outline: none; }

.leer { padding: 48px 24px; text-align: center; color: var(--ink-2); background: var(--panel); border: 1px dashed var(--line); border-radius: var(--r); }
.leer strong { display: block; color: var(--ink); font-size: 16px; margin-bottom: 6px; }
.leer button { margin-top: 12px; }

/* ---------- Zeitraster (Woche & Tag) ---------- */
.raster-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: auto; max-height: calc(100vh - 170px); position: relative; }
.raster { display: grid; grid-template-columns: 52px repeat(var(--cols), minmax(var(--colmin, 120px), 1fr)); min-width: calc(52px + var(--cols) * var(--colmin, 120px)); width: 100%; }
.raster > * { min-width: 0; }
.raster-kopf { position: sticky; top: 0; z-index: 3; background: var(--panel); border-bottom: 1px solid var(--line); padding: 8px 8px 6px; font-weight: 600; min-height: 42px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.raster-kopf.ecke { left: 0; z-index: 4; }
.raster-kopf .wt { color: var(--ink-2); font-weight: 400; font-size: 12px; margin-right: 4px; }
.raster-kopf.heute .tag-nr { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 6px; background: var(--ink); color: var(--bg); border-radius: 12px; }
.raster-kopf .fb-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--fb); margin-right: 8px; vertical-align: -1px; }
.raster-kopf .anz { color: var(--ink-3); font-weight: 400; font-size: 12px; margin-left: 6px; }
.ganztags-kopf { position: sticky; left: 0; top: 42px; z-index: 4; background: var(--panel); font-size: 11px; color: var(--ink-3); text-align: right; padding: 6px 6px 0 0; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.ganztags-zelle { position: sticky; top: 42px; z-index: 3; background: var(--panel); border-bottom: 1px solid var(--line); border-right: 1px solid var(--grid); padding: 4px 3px 4px 4px; display: flex; flex-direction: column; gap: 3px; min-height: 30px; overflow: hidden; }
.ganztags-zelle:last-child { border-right: 0; }
.ganztags-zelle.heute { background-color: color-mix(in srgb, var(--panel-2) 60%, var(--panel)); }
.termin.ganztags { position: relative; width: auto; height: auto; padding: 3px 6px 3px 11px; }
.termin.ganztags .t-titel { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.zeiten { position: sticky; left: 0; z-index: 2; background: var(--panel); border-right: 1px solid var(--line); }
.zeiten div { height: var(--hour); font-size: 11px; color: var(--ink-3); text-align: right; padding: 0 6px 0 0; transform: translateY(-7px); font-variant-numeric: tabular-nums; }
.spalte { position: relative; border-right: 1px solid var(--grid); height: calc(var(--hour) * var(--hours)); background-image: linear-gradient(to bottom, var(--grid) 1px, transparent 1px); background-size: 100% var(--hour); }
.spalte:last-child { border-right: 0; }
.spalte.heute { background-color: color-mix(in srgb, var(--panel-2) 60%, var(--panel)); }
.jetzt { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid var(--now); z-index: 2; pointer-events: none; }
.jetzt::before { content: ""; position: absolute; left: -4px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--now); }

.termin {
  position: absolute; display: flex; flex-direction: column; gap: 1px; overflow: hidden;
  padding: 3px 6px 3px 11px; border-radius: 4px; cursor: pointer; text-align: left;
  background: color-mix(in srgb, var(--fb) 13%, var(--panel)); border: 0;
  color: var(--ink); font-variation-settings: "wdth" 82; font-size: 12px; line-height: 1.25;
  transition: box-shadow .12s;
}
.termin:hover, .termin:focus-visible { box-shadow: 0 0 0 2px var(--fb) inset, var(--shadow); z-index: 5; overflow: visible; background: color-mix(in srgb, var(--fb) 22%, var(--panel)); }
.termin:hover .t-titel, .termin:focus-visible .t-titel { white-space: normal; }
.termin .t-zeit { color: var(--ink-2); font-size: 11px; font-variant-numeric: tabular-nums; }
.termin .t-titel { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.termin .t-sub { color: var(--ink-2); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.termin.kurz { padding-top: 1px; padding-bottom: 1px; flex-direction: row; gap: 6px; align-items: center; }
.termin.kurz .t-sub { display: none; }
.termin::before, .mini::before, .zeile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; border-radius: 2px 0 0 2px; background: var(--strip, var(--fb)); }
.mini, .zeile { position: relative; }
.termin.pruefung::before { width: 5px; background: repeating-linear-gradient(to bottom, var(--fb) 0 6px, transparent 6px 9px); }
.lv-liste { list-style: none; margin: 4px 0 0; padding: 0; max-height: 240px; overflow: auto; }
.lv-liste li { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: baseline; padding: 5px 0; border-top: 1px solid var(--grid); font-size: 13px; }
.lv-liste li:first-child { border-top: 0; }
.lv-liste em { color: var(--ink-2); font-style: normal; }
.lv-aktionen { display: flex; gap: 8px; white-space: nowrap; font-size: 12px; }
.lv-aktionen a { color: var(--ink-2); }
.termin.pruefung .t-titel::before { content: "Prüfung · "; color: var(--now); font-weight: 600; }

/* ---------- Monat ---------- */
.monat { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.monat-kopf { background: var(--panel); padding: 8px 10px; font-size: 12px; color: var(--ink-2); font-weight: 600; }
.monat-tag { background: var(--panel); min-height: 112px; padding: 6px 6px 8px; display: flex; flex-direction: column; gap: 2px; }
.monat-tag.fremd { background: var(--panel-2); color: var(--ink-3); }
.monat-tag .nr { font-size: 12px; font-weight: 600; margin-bottom: 4px; display: flex; justify-content: space-between; align-items: center; }
.monat-tag .nr button { background: none; border: 0; padding: 0; cursor: pointer; color: inherit; font: inherit; border-radius: 12px; min-width: 22px; height: 22px; }
.monat-tag .nr button:hover { background: var(--panel-2); }
.monat-tag.heute .nr button { background: var(--ink); color: var(--bg); }
.monat-tag .nr small { color: var(--ink-3); font-weight: 400; }
.mini {
  display: grid; grid-template-columns: 34px 1fr; gap: 4px; align-items: baseline; width: 100%;
  border: 0; background: none; padding: 1px 3px 1px 3px; border-radius: 2px; cursor: pointer; text-align: left;
  font-size: 11.5px; font-variation-settings: "wdth" 82; line-height: 1.3; color: var(--ink);
}
.mini:hover { background: color-mix(in srgb, var(--fb) 14%, var(--panel)); }
.mini .t-zeit { color: var(--ink-2); font-variant-numeric: tabular-nums; padding-left: 4px; }
.mini .t-titel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mehr { background: none; border: 0; padding: 2px 0 0 7px; color: var(--ink-2); font-size: 11.5px; cursor: pointer; text-align: left; text-decoration: underline; }

/* ---------- Liste ---------- */
.liste-tools { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; color: var(--ink-2); font-size: 13px; flex-wrap: wrap; }
.liste { display: flex; flex-direction: column; gap: 14px; }
.tag-block { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.tag-block.heute { border-color: var(--ink); }
.tag-block h3 { font-size: 13px; padding: 8px 14px; background: var(--panel-2); border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: baseline; }
.tag-block h3 small { color: var(--ink-2); font-weight: 400; }
.zeile {
  display: grid; grid-template-columns: 96px 1fr 220px 180px; gap: 12px; align-items: start; width: 100%;
  padding: 8px 14px 8px 14px; border: 0; border-top: 1px solid var(--grid);
  background: none; color: var(--ink); text-align: left; cursor: pointer;
}
.zeile:first-of-type { border-top: 0; }
.zeile:hover { background: color-mix(in srgb, var(--fb) 9%, var(--panel)); }
.zeile .t-zeit { font-variant-numeric: tabular-nums; color: var(--ink-2); }
.zeile .t-titel { font-weight: 600; }
.zeile .t-meta { color: var(--ink-2); font-size: 12.5px; }
.zeile .t-sub, .zeile .t-ort { color: var(--ink-2); font-size: 13px; }
.chip { display: inline-block; padding: 0 6px; border-radius: 3px; font-size: 11px; font-weight: 600; background: color-mix(in srgb, var(--fb) 16%, var(--panel)); color: var(--ink); margin-right: 6px; vertical-align: 1px; }

/* ---------- Detail-Dialog ---------- */
.detail { border: 0; padding: 0; background: transparent; max-width: min(560px, 92vw); width: 100%; }
.detail::backdrop { background: rgba(21, 23, 28, 0.45); backdrop-filter: blur(2px); }
.detail article { background: var(--panel); color: var(--ink); border-radius: 10px; box-shadow: var(--shadow); padding: 18px 22px 20px; border-top: 6px solid var(--fb, var(--ink)); }
.detail header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.detail-fb { font-weight: 600; color: var(--fb); }
.detail h3 { font-size: 19px; line-height: 1.25; margin-bottom: 14px; letter-spacing: -0.01em; }
.detail dl { display: grid; grid-template-columns: 120px 1fr; gap: 8px 14px; margin: 0 0 18px; }
.detail dt { color: var(--ink-2); }
.detail dd { margin: 0; }
.detail footer { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Responsiv ---------- */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .only-narrow { display: inline-flex; }
  .seite { position: fixed; inset: 53px 0 0 auto; width: min(320px, 90vw); height: auto; transform: translateX(100%); transition: transform .2s; z-index: 15; box-shadow: var(--shadow); border-right: 0; border-left: 1px solid var(--line); }
  .seite.offen { transform: none; }
  .top { gap: 8px; padding: 8px 12px; flex-wrap: wrap; }
  .brand h1 { font-size: 15px; }
  .semester { flex: 1; min-width: 0; }
  .semester select { width: 100%; }
  .top-right { margin-left: 0; }
  .layout { overflow-x: hidden; }
  .top-right .btn span { display: none; }
  .top-right .btn:not(.only-narrow) { width: 32px; padding: 0; justify-content: center; }
  .stand { display: none; }
  .haupt { padding: 12px; }
  .zeitraum { font-size: 15px; }
  .nav input[type="date"] { display: none; }
  .zeile { grid-template-columns: 80px 1fr; }
  .zeile .t-sub, .zeile .t-ort { grid-column: 2; }
  .monat-tag { min-height: 72px; }
  .mini { grid-template-columns: 1fr; }
  .mini .t-zeit { display: none; }
  .detail dl { grid-template-columns: 1fr; gap: 2px 0; }
  .detail dt { margin-top: 8px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Druck ---------- */
@media print {
  .top, .seite, .werkzeuge .nav .btn, .ansichten, .status, #datum { display: none !important; }
  .layout { display: block; }
  .haupt { padding: 0; }
  .raster-wrap { max-height: none; overflow: visible; border: 0; }
  .termin { break-inside: avoid; }
  body { background: #fff; color: #000; }
}

@media (max-width: 560px) {
  .brand h1 { display: none; }
  .ansichten { width: 100%; }
  .ansichten button { flex: 1; padding: 0 6px; font-size: 13px; white-space: nowrap; }
  .ansichten .lang { display: none; }
  .ansichten .kurz { display: inline; }
}

/* ---------- Anmeldung ---------- */
.login-body { display: block; }
.login { max-width: 440px; margin: 0 auto; padding: 56px 16px 40px; display: flex; flex-direction: column; gap: 18px; }
.login .brand { justify-content: center; }
.login-karte { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 24px; }
.login-karte h2 { font-size: 20px; margin-bottom: 6px; }
.login-karte p { margin: 0 0 14px; color: var(--ink-2); }
.login-karte .btn { width: 100%; justify-content: center; height: 40px; font-weight: 600; }
.login-karte .feld input { height: 40px; font-size: 15px; }
.login-fehler { margin: -4px 0 12px; color: var(--now); font-size: 13px; }
.login-fuss { text-align: center; color: var(--ink-3); font-size: 12.5px; margin: 0; }

/* ---------- Admin ---------- */
.brand[href] { text-decoration: none; color: inherit; }
.admin-titel { color: var(--ink-2); }
.admin { max-width: 1100px; margin: 0 auto; padding: 20px 20px 48px; display: flex; flex-direction: column; gap: 20px; width: 100%; }
.admin-block { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; }
.admin-block h2 { font-size: 15px; margin-bottom: 12px; }
.admin-block .anz { color: var(--ink-3); font-weight: 400; margin-left: 6px; }
.admin-form { display: grid; grid-template-columns: 2fr 1.4fr 1.4fr; gap: 12px; align-items: end; }
.admin-form .feld { margin: 0; }
.admin-form .check { display: flex; align-items: center; gap: 8px; grid-column: 1 / 3; }
.admin-form .check span { margin: 0; color: var(--ink); font-size: 13.5px; }
.admin-form .check input { width: 16px; height: 16px; margin: 0; accent-color: var(--ink); }
.admin-form .btn { justify-content: center; height: 32px; }
.admin-meldung { margin: 10px 0 0; font-size: 13px; min-height: 18px; }
.admin-meldung.ok { color: #1A9A5A; }
.admin-meldung.fehler { color: var(--now); }
.admin-suche { height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); width: 220px; }
.tabelle { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tabelle th { text-align: left; font-size: 12px; color: var(--ink-2); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.tabelle td { padding: 6px 8px; border-bottom: 1px solid var(--grid); vertical-align: middle; }
.tabelle input, .tabelle select { width: 100%; height: 28px; padding: 0 6px; border: 1px solid transparent; border-radius: 4px; background: transparent; }
.tabelle input:hover, .tabelle select:hover, .tabelle input:focus, .tabelle select:focus { border-color: var(--line); background: var(--panel); }
.tabelle .email { font-weight: 600; }
.tabelle .dim { color: var(--ink-3); font-size: 12.5px; white-space: nowrap; }
.admin-zeile .email::before { content: "★ "; color: #D98E04; }
.chip-ich { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 10px; background: var(--ink); color: var(--bg); font-size: 11px; }
.link.gefahr { color: var(--now); }
.lehrende { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(480px, 1fr)); gap: 0 32px; }
.lehrende li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--grid); font-size: 13.5px; }
.lehrende .l-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) { .lehrende { grid-template-columns: 1fr; } .l-form input { width: 150px; } }
.lehrende li.bekannt .l-name { color: var(--ink-3); }
.lehrende small { color: var(--ink-3); margin-left: 4px; }
.l-ok { color: #1A9A5A; font-size: 12.5px; white-space: nowrap; }
.l-form { display: flex; gap: 6px; }
.l-form input { height: 28px; padding: 0 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); width: 190px; font-size: 13px; }
.l-form .btn { height: 28px; padding: 0 10px; font-size: 12.5px; }
.benutzer-menu { display: flex; align-items: center; gap: 8px; }
.benutzer-menu .wer { color: var(--ink-2); font-size: 13px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 900px) {
  .admin-form { grid-template-columns: 1fr; }
  .admin-form .check { grid-column: auto; }
  .tabelle th:nth-child(4), .tabelle td:nth-child(4), .tabelle th:nth-child(5), .tabelle td:nth-child(5) { display: none; }
  .benutzer-menu .wer { display: none; }
}
