/* Verwaltung Frank Seiffert: schlicht, dunkel, mobil zuerst. Keine Fremdressourcen (CSP: alles von der eigenen Adresse). */
:root {
  --bg: #0a0a0c; --surface: #141418; --surface2: #1b1b21; --ink: #f3efe8; --muted: #b3aea6;
  --line: rgb(243 239 232 / 0.18); --accent: #e3b866; --on-accent: #0a0a0c; --fehler: #ff9f93; --ok: #9fd8a8;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); font: 1rem/1.55 ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { margin: 0; min-height: 100svh; padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px)); }
h1, h2 { font-family: Georgia, 'Times New Roman', serif; font-weight: 500; line-height: 1.15; margin: 0; }
p { margin: 0; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.kopf { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); padding: max(0.75rem, env(safe-area-inset-top, 0px)) max(1rem, env(safe-area-inset-right, 0px)) 0 max(1rem, env(safe-area-inset-left, 0px)); }
.kopf-innen { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; max-width: 52rem; margin: 0 auto; }
.kopf h1 { font-size: 1.35rem; }
.kopf h1 span { color: var(--muted); font-size: 1rem; font-family: ui-sans-serif, system-ui, sans-serif; margin-left: 0.4rem; }
.konto { color: var(--muted); font-size: 0.85rem; overflow-wrap: anywhere; }
.tabs { display: flex; gap: 0.25rem; max-width: 52rem; margin: 0.5rem auto 0; }
.tabs button { flex: 1; min-height: 3rem; background: none; border: 0; border-bottom: 3px solid transparent; color: var(--muted); font-weight: 600; cursor: pointer; }
.tabs button[aria-selected='true'] { color: var(--ink); border-bottom-color: var(--accent); }
.tabs button:active { background: var(--surface); }

main { max-width: 52rem; margin: 0 auto; padding: 1.25rem max(1rem, env(safe-area-inset-right, 0px)) 1rem max(1rem, env(safe-area-inset-left, 0px)); outline: none; }
.leiste { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 1.25rem; }
.leiste h2 { font-size: 1.6rem; }
.hinweis { color: var(--muted); font-size: 0.95rem; margin-bottom: 1rem; max-width: 60ch; }

.knopf { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: 0 1.2rem; border-radius: 1.4rem; border: 1px solid var(--line); background: var(--surface2); font-weight: 600; cursor: pointer; text-decoration: none; }
.knopf:active { transform: scale(0.97); }
.knopf.haupt { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.knopf.gefahr { color: var(--fehler); border-color: color-mix(in srgb, var(--fehler) 50%, transparent); }
.knopf[disabled] { opacity: 0.5; cursor: default; }
.knopf.klein { min-height: 2.75rem; min-width: 2.75rem; padding: 0 0.9rem; font-size: 0.9rem; }
@media (hover: hover) and (pointer: fine) { .knopf:hover { border-color: var(--accent); } .knopf.haupt:hover { background: #f1cb85; } }

.liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.zeile { background: var(--surface); border: 1px solid var(--line); border-radius: 0.6rem; padding: 0.9rem 1rem; display: grid; gap: 0.7rem; }
.zeile.versteckt .zeile-titel, .zeile.vorbei .zeile-titel { color: var(--muted); }
.zeile-titel { font-weight: 700; overflow-wrap: anywhere; }
.zeile-unter { color: var(--muted); font-size: 0.9rem; overflow-wrap: anywhere; }
.marke { display: inline-block; margin-left: 0.5rem; padding: 0 0.5rem; border: 1px solid var(--line); border-radius: 0.8rem; font-size: 0.78rem; font-weight: 600; color: var(--muted); vertical-align: 0.1em; }
.aktionen { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.leer { color: var(--muted); padding: 1.5rem 0; }

.schalter { min-width: 7.2rem; }
.schalter[aria-pressed='true'] { border-color: var(--ok); color: var(--ok); }
.frage { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.frage p { font-weight: 600; flex: 1 1 100%; }

form { display: grid; gap: 1.1rem; max-width: 36rem; }
.feld { display: grid; gap: 0.35rem; }
.feld label, .feld .beschriftung { font-weight: 600; }
.feld .hilfe { color: var(--muted); font-size: 0.88rem; }
.feld .pflicht { color: var(--accent); }
input[type='text'], input[type='date'], input[type='time'], input[type='number'], input[type='url'], select, textarea { width: 100%; min-height: 3rem; padding: 0.6rem 0.8rem; font-size: max(16px, 1rem); background: var(--surface); border: 1px solid var(--line); border-radius: 0.5rem; }
textarea { min-height: 7rem; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
.haken { display: flex; align-items: center; gap: 0.75rem; min-height: 3rem; font-weight: 600; }
.haken input { width: 1.5rem; height: 1.5rem; accent-color: var(--accent); }
.erkannt { font-size: 0.92rem; min-height: 1.4em; }
.erkannt.ok { color: var(--ok); }
.erkannt.nein { color: var(--fehler); }
.formular-aktionen { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.meldungen { position: fixed; left: 0; right: 0; bottom: 0; padding: 0.75rem max(1rem, env(safe-area-inset-right, 0px)) calc(0.75rem + env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px)); pointer-events: none; display: grid; gap: 0.5rem; justify-items: center; z-index: 10; }
.meldung { pointer-events: auto; max-width: 36rem; width: 100%; padding: 0.8rem 1rem; border-radius: 0.6rem; background: var(--surface2); border: 1px solid var(--ok); }
.meldung.fehler { border-color: var(--fehler); color: var(--fehler); }

@media (prefers-reduced-motion: no-preference) { .meldung { animation: ein 200ms ease-out; } }
@keyframes ein { from { opacity: 0; transform: translateY(0.5rem); } }
