/* Schlicht und ohne Framework. Hell und dunkel ueber Variablen, damit
   die Seite der Systemeinstellung folgt. */

:root {
  --grund: #ffffff;
  --flaeche: #f5f6f7;
  --rand: #d8dbdf;
  --text: #1b1d20;
  --leise: #5d646d;
  --betont: #1f5fa9;
  --ok-grund: #e7f4ea;
  --ok-rand: #4a9a5e;
  --fehler-grund: #fdeaea;
  --fehler-rand: #c0392b;
}

@media (prefers-color-scheme: dark) {
  :root {
    --grund: #16181b;
    --flaeche: #1e2125;
    --rand: #343941;
    --text: #e6e8ea;
    --leise: #9aa2ac;
    --betont: #6aa9e9;
    --ok-grund: #182a1e;
    --ok-rand: #4a9a5e;
    --fehler-grund: #2c1b1a;
    --fehler-rand: #d9574a;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}

main {
  max-width: 54rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
}

.mitte {
  max-width: 22rem;
  margin: 4rem auto;
}

/* --- Kopfzeile ----------------------------------------------------- */

.kopf {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--flaeche);
  border-bottom: 1px solid var(--rand);
}

.kopf nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.kopf a { color: var(--betont); text-decoration: none; }
.kopf a:hover { text-decoration: underline; }

.abmelden { display: flex; align-items: center; gap: 0.75rem; margin: 0; }
.wer { color: var(--leise); font-size: 0.875rem; }

/* --- Text ---------------------------------------------------------- */

h1 { font-size: 1.5rem; margin: 0 0 1rem; }
h2 { font-size: 1.125rem; margin: 2rem 0 0.75rem; }

code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.9em;
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: 3px;
  padding: 0.05em 0.3em;
}

.hinweis { color: var(--leise); font-size: 0.9375rem; }
.klein { color: var(--leise); font-size: 0.8125rem; font-weight: normal; }
.versteckt {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

/* --- Meldungen ----------------------------------------------------- */

.meldung {
  padding: 0.625rem 0.875rem;
  border-radius: 4px;
  border-left: 3px solid var(--rand);
  background: var(--flaeche);
}

.meldung.ok { background: var(--ok-grund); border-left-color: var(--ok-rand); }
.meldung.fehler { background: var(--fehler-grund); border-left-color: var(--fehler-rand); }

/* --- Formulare ----------------------------------------------------- */

form { margin: 0 0 1.5rem; }

label {
  display: block;
  margin: 1rem 0 0.25rem;
  font-weight: 600;
  font-size: 0.9375rem;
}

input[type="text"], input[type="email"], input[type="password"],
input[type="date"], select {
  width: 100%;
  padding: 0.5rem 0.625rem;
  font: inherit;
  color: var(--text);
  background: var(--grund);
  border: 1px solid var(--rand);
  border-radius: 4px;
}

input:focus, select:focus, button:focus-visible {
  outline: 2px solid var(--betont);
  outline-offset: 1px;
}

input.kaestchen { width: auto; }

button {
  margin-top: 1.25rem;
  padding: 0.5rem 1rem;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--betont);
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
}

button.schlicht {
  margin-top: 0;
  font-weight: normal;
  color: var(--betont);
  background: transparent;
  border-color: var(--rand);
}

button[hidden] { display: none; }

/* --- Tabellen ------------------------------------------------------ */

table {
  width: 100%;
  margin: 0.5rem 0 1rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

th, td {
  padding: 0.4375rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--rand);
  vertical-align: top;
}

thead th { color: var(--leise); font-size: 0.8125rem; }
td.zahl, th.zahl { text-align: right; }
tr.fremd td { color: var(--leise); }

table.attribute input[type="text"], table.attribute select { min-width: 7rem; }
table.attribute td { border-bottom: none; padding: 0.25rem 0.5rem 0.25rem 0; }

a { color: var(--betont); }

/* Auf dem Telefon die Attributtabelle scrollbar statt gequetscht. */
@media (max-width: 40rem) {
  table.attribute { display: block; overflow-x: auto; }
}
