/* orion-dienst Verwaltung — Stil der csl-Plattformen (Palette wie csl2/DMS), Handy zuerst, ohne Inline-Stile (CSP). */
:root {
  --bg: #f4f6f9; --flaeche: #ffffff; --rand: #d8dee6; --text: #1a2233; --gedaempft: #5f6a80;
  --primaer: #1f3b73; --primaer-hover: #2a4d99; --primaer-text: #ffffff;
  --gefahr: #b3271c; --gefahr-hell: #fbeae8; --ok: #1d7a46; --ok-hell: #e6f4ec; --warn: #8a5a00; --warn-hell: #fff3d6;
  --akzent: #f2c14e; --schatten: 0 1px 3px rgba(20, 30, 60, .08), 0 4px 12px rgba(20, 30, 60, .06);
  --zeile: #f8fafc; --markiert: #eef3fc;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11151d; --flaeche: #1a2030; --rand: #2d3750; --text: #e6eaf2; --gedaempft: #9aa6bd;
    --primaer: #6c93e6; --primaer-hover: #85a5ee; --primaer-text: #0d1424;
    --gefahr: #ff8277; --gefahr-hell: #3a1d1b; --ok: #62d08f; --ok-hell: #16301f; --warn: #f2c14e; --warn-hell: #35290d;
    --schatten: none; --zeile: #1e2538; --markiert: #232d47;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--primaer); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.35rem; margin: 0 0 .75rem; }
h2 { font-size: 1.05rem; margin: 1.4rem 0 .5rem; }
h3 { font-size: .95rem; margin: 1rem 0 .4rem; }
code, .mono { font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.laedt { padding: 2rem 16px; color: var(--gedaempft); }

/* Rahmen: Kopf, Menü, Inhalt, Fuß */
.rahmen { min-height: 100vh; display: flex; flex-direction: column; }
.kopf { background: var(--primaer); color: var(--primaer-text); display: flex; align-items: center; gap: 12px; padding: 10px 16px; flex-wrap: wrap; }
.kopf .marke { font-weight: 700; letter-spacing: .02em; display: flex; align-items: center; gap: 8px; }
.kopf .marke svg { flex: none; }
.kopf .platz { flex: 1; }
.kopf .wer { font-size: 13px; opacity: .9; overflow-wrap: anywhere; }
.pille { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid transparent; white-space: nowrap; }
.pille.betreiber { background: var(--akzent); color: #1a2233; }
.pille.lesen { background: #dbe4f7; color: #1f3b73; }
.pille.ok { background: var(--ok-hell); color: var(--ok); }
.pille.warn { background: var(--warn-hell); color: var(--warn); }
.pille.gefahr { background: var(--gefahr-hell); color: var(--gefahr); }
.pille.still { background: var(--zeile); color: var(--gedaempft); border-color: var(--rand); }
.inhaltszeile { display: flex; flex: 1; min-width: 0; }
.menue { background: var(--flaeche); border-right: 1px solid var(--rand); width: 210px; flex: none; padding: 10px 8px; }
.menue a { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border-radius: 8px; color: var(--text); }
.menue a:hover { background: var(--markiert); text-decoration: none; }
.menue a.aktiv { background: var(--primaer); color: var(--primaer-text); }
.menue .zahl { font-size: 12px; background: var(--gefahr); color: #fff; border-radius: 999px; padding: 0 7px; }
main { flex: 1; min-width: 0; padding: 18px 16px 70px; max-width: 1200px; }
.fuss { padding: 14px 16px 18px; color: var(--gedaempft); font-size: 12px; display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; border-top: 1px solid var(--rand); margin-top: 20px; }
.csl-atthis-signum { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; line-height: 1.4; color: inherit; text-decoration: none; }
.csl-atthis-signum span { opacity: .6; transition: opacity .2s; }
.csl-atthis-signum:hover span, .csl-atthis-signum:focus-visible span { opacity: .95; }
.csl-atthis-signum svg { display: block; flex: none; opacity: .9; }
.fenster-badge { position: fixed; right: 10px; bottom: 8px; background: var(--flaeche); color: var(--gedaempft); border: 1px solid var(--rand); border-radius: 6px; padding: 1px 8px; font: 11px/1.6 ui-monospace, Menlo, monospace; z-index: 5; }
@media print { .fenster-badge, .menue, .kopf, .fuss { display: none; } }

@media (max-width: 760px) {
  .inhaltszeile { flex-direction: column; }
  .menue { width: auto; border-right: 0; border-bottom: 1px solid var(--rand); display: flex; overflow-x: auto; padding: 6px 8px; gap: 4px; }
  .menue a { flex: none; padding: 8px 12px; gap: 8px; }
  .kopf .wer { display: none; }
}

/* Karten, Kacheln, Tabellen */
.karte { background: var(--flaeche); border: 1px solid var(--rand); border-radius: 12px; box-shadow: var(--schatten); padding: 14px 16px; margin: 0 0 14px; }
.karte > h2:first-child, .karte > h3:first-child { margin-top: 0; }
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kachel { background: var(--flaeche); border: 1px solid var(--rand); border-radius: 12px; padding: 12px 14px; box-shadow: var(--schatten); color: var(--text); display: block; }
a.kachel:hover { text-decoration: none; border-color: var(--primaer); }
.kachel .gross { font-size: 1.8rem; font-weight: 700; line-height: 1.1; }
.kachel .klein { color: var(--gedaempft); font-size: 12px; }
.tabelle-rahmen { overflow-x: auto; border: 1px solid var(--rand); border-radius: 10px; background: var(--flaeche); }
table { border-collapse: collapse; width: 100%; min-width: 600px; font-size: 14px; }   /* schmale Bildschirme: die Tabelle scrollt im Rahmen, statt Spalten zu zerquetschen */
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--rand); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--gedaempft); background: var(--zeile); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--markiert); }
td.zahl, th.zahl { text-align: right; font-variant-numeric: tabular-nums; }
td.lang { max-width: 380px; min-width: 160px; overflow-wrap: anywhere; }
.leer { color: var(--gedaempft); padding: 14px; }
dl.felder { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; }
dl.felder dt { color: var(--gedaempft); }
dl.felder dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { dl.felder { grid-template-columns: 1fr; } dl.felder dt { margin-top: 6px; } }
.kruemel { font-size: 13px; color: var(--gedaempft); margin-bottom: 8px; }
.zeile { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.zeile.unten { margin-top: 10px; }
.abstand { margin-top: 12px; }

/* Formulare */
label { display: block; font-size: 13px; color: var(--gedaempft); margin: 8px 0 3px; }
input, select, textarea { font: inherit; color: var(--text); background: var(--flaeche); border: 1px solid var(--rand); border-radius: 8px; padding: 7px 10px; min-width: 0; max-width: 100%; }
input[type="text"], input[type="search"], input[type="datetime-local"], select, textarea { width: 100%; }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--primaer); outline-offset: 1px; }
.filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.filter > * { flex: 1 1 150px; width: auto !important; }
.raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 14px; }
.haken { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0; color: var(--text); font-size: 14px; }
.haken input { margin-top: 4px; }
.haken small { color: var(--gedaempft); display: block; }
button, .knopf { font: inherit; font-weight: 600; cursor: pointer; border-radius: 8px; border: 1px solid var(--primaer); background: var(--primaer); color: var(--primaer-text); padding: 7px 14px; min-height: 36px; display: inline-flex; align-items: center; gap: 6px; }
button:hover:not(:disabled) { background: var(--primaer-hover); }
button.leise { background: transparent; color: var(--primaer); }
button.leise:hover:not(:disabled) { background: var(--markiert); }
button.gefahr { background: var(--gefahr); border-color: var(--gefahr); color: #fff; }
button.gefahr.leise { background: transparent; color: var(--gefahr); }
button.klein { padding: 2px 10px; min-height: 28px; font-size: 13px; }
button:disabled { opacity: .55; cursor: progress; }
.meldung { font-size: 13px; }
.meldung.ok { color: var(--ok); }
.meldung.fehler { color: var(--gefahr); }
.hinweisfeld { padding: 10px 12px; border-radius: 8px; margin: 10px 0; background: var(--warn-hell); color: var(--warn); }
.hinweisfeld.ok { background: var(--ok-hell); color: var(--ok); }
.hinweisfeld.gefahr { background: var(--gefahr-hell); color: var(--gefahr); }
.einmal { border: 2px solid var(--akzent); }
.einmal .mono { font-size: 15px; word-break: break-all; user-select: all; }
img.hinweisbild { max-width: 100%; border: 1px solid var(--rand); border-radius: 8px; }
pre.kontext { background: var(--zeile); border: 1px solid var(--rand); border-radius: 8px; padding: 10px; overflow: auto; max-height: 300px; font-size: 12px; }
.text-hinweis { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Anmeldeseite */
.anmeldung { max-width: 420px; margin: 8vh auto 0; padding: 0 16px; }
.anmeldung .karte { padding: 22px; }
.anmeldung .knopf, .anmeldung button { width: 100%; justify-content: center; margin-top: 10px; }
a.knopf { text-decoration: none; }
a.knopf:hover { text-decoration: none; background: var(--primaer-hover); }

/* Hinweiszeile: Rückmeldung nach einer Aktion, die die Seite neu zeichnet */
.toast { position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%); background: var(--ok-hell); color: var(--ok); border: 1px solid var(--ok);
  border-radius: 10px; padding: 8px 16px; max-width: calc(100vw - 32px); box-shadow: var(--schatten); z-index: 20; opacity: 0; pointer-events: none; transition: opacity .15s; font-weight: 600; }
.toast.sichtbar { opacity: 1; }
.kopf button.leise { color: var(--primaer-text); border-color: currentColor; }
.kopf button.leise:hover:not(:disabled) { background: rgba(255, 255, 255, .15); }
.kopf .meldung { display: none; }
