/* 24-Autohof Zentrale · Gestaltung
   Ruhig, klar, Systemschrift, viel Weißraum; Hell- und Dunkelmodus; iPhone, iPad, Mac.
   Akzent aus dem Logo (Rot), sparsam eingesetzt. */

:root {
  color-scheme: light dark;
  --grund: #f5f5f7;
  --flaeche: #ffffff;
  --flaeche-glas: rgb(255 255 255 / 0.72);
  --text: #1d1d1f;
  --leise: #6e6e73;
  --linie: rgb(0 0 0 / 0.1);
  --akzent: #b5121b;
  --akzent-text: #ffffff;
  --akzent-sanft: rgb(181 18 27 / 0.08);
  --gut: #248a3d;
  --schlecht: #c9302c;
  --achtung: #c77700;
  --schatten: 0 1px 2px rgb(0 0 0 / 0.04), 0 8px 28px rgb(0 0 0 / 0.08);
  --radius: 14px;
  --abstand: clamp(16px, 4vw, 32px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --grund: #000000;
    --flaeche: #1c1c1e;
    --flaeche-glas: rgb(28 28 30 / 0.72);
    --text: #f5f5f7;
    --leise: #98989d;
    --linie: rgb(255 255 255 / 0.12);
    --akzent: #e5484d;
    --akzent-text: #ffffff;
    --akzent-sanft: rgb(229 72 77 / 0.14);
    --gut: #30d158;
    --schlecht: #ff6961;
    --achtung: #ffb340;
    --schatten: 0 1px 2px rgb(0 0 0 / 0.5), 0 8px 28px rgb(0 0 0 / 0.5);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--grund);
  color: var(--text);
  font: 17px/1.47 -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

h1 { font-size: clamp(28px, 5vw, 34px); line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; margin: 0 0 24px; }
h2 { font-size: 20px; font-weight: 600; margin: 0; }
p { margin: 0; }
code { font: 0.9em ui-monospace, "SF Mono", Menlo, monospace; background: var(--akzent-sanft); padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.leise { color: var(--leise); }

/* ---------- Knöpfe ---------- */
.knopf {
  appearance: none;
  border: 0;
  border-radius: 980px;
  min-height: 44px;
  padding: 10px 20px;
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.2s ease, opacity 0.2s ease;
}
.knopf:active { transform: scale(0.97); }
.knopf:disabled { opacity: 0.5; cursor: default; transform: none; }
.knopf:focus-visible, a:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; }
.knopf.haupt { background: var(--akzent); color: var(--akzent-text); }
.knopf.leicht { background: var(--akzent-sanft); color: var(--akzent); }
.knopf.breit { width: 100%; }

/* ---------- Anmeldung und Einrichtung ---------- */
.anmeldung {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 24px;
  padding: var(--abstand);
}
.karte {
  width: min(400px, 100%);
  background: var(--flaeche);
  border-radius: 22px;
  box-shadow: var(--schatten);
  padding: 40px 32px 32px;
  text-align: center;
  display: grid;
  gap: 16px;
}
.karte h1 { margin: 8px 0 0; font-size: 28px; }
.standort { margin-top: -10px; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--akzent); }
.karte .leise { margin-bottom: 8px; }
.logo-gross { width: 128px; height: auto; margin: 0 auto; }
.meldung { min-height: 1.47em; font-size: 15px; color: var(--leise); }
.meldung.fehler { color: var(--schlecht); }
.fuss { font-size: 13px; color: var(--leise); }

/* ---------- Kopf der Anwendung ---------- */
.kopf {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px var(--abstand);
  background: var(--flaeche-glas);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--linie);
}
.marke { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 600; min-height: 44px; }
.logo-klein { width: 34px; height: auto; }
.navigation { display: flex; gap: 4px; margin-right: auto; }
.navigation a {
  color: var(--leise);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 980px;
  font-size: 15px;
  font-weight: 500;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.navigation a[aria-current="page"] { color: var(--text); background: var(--akzent-sanft); }
.konto { display: flex; align-items: center; gap: 12px; }
.konto-name { color: var(--leise); font-size: 15px; }

@media (max-width: 640px) {
  .kopf { flex-wrap: wrap; gap: 8px 12px; }
  .marke span, .konto-name { display: none; }
  .navigation { order: 3; width: 100%; margin: 0; overflow-x: auto; scrollbar-width: none; }
  .navigation::-webkit-scrollbar { display: none; }
  .navigation a { flex: 1 0 auto; justify-content: center; padding: 10px 12px; }
  .konto { margin-left: auto; }
}

/* ---------- Inhalt ---------- */
.inhalt { max-width: 880px; margin: 0 auto; padding: 32px var(--abstand) 64px; outline: none; }
.inhalt[aria-busy="true"] { opacity: 0.6; transition: opacity 0.2s ease; }
.gruppe { background: var(--flaeche); border-radius: var(--radius); box-shadow: var(--schatten); }
.gruppe-titel { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--leise); margin: 32px 16px 8px; }
.liste { list-style: none; margin: 0; padding: 0; }
.liste li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 14px 16px; border-top: 1px solid var(--linie); min-height: 44px; }
.liste li:first-child { border-top: 0; }
.zeile-titel { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.zeile-wert { color: var(--leise); font-size: 15px; }
.punkt { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.punkt.gut { background: var(--gut); }
.punkt.schlecht { background: var(--schlecht); }
.punkt.achtung { background: var(--achtung); }
.hinweis { color: var(--leise); font-size: 15px; margin: 12px 16px 0; }
.leer { padding: 48px 24px; text-align: center; display: grid; gap: 8px; }
.leer-titel { font-size: 20px; font-weight: 600; }

/* ---------- Systemdialog: fährt in den Vordergrund, Hintergrund unscharf ---------- */
.dialog {
  border: 0;
  border-radius: 20px;
  padding: 24px;
  width: min(420px, calc(100vw - 32px));
  background: var(--flaeche);
  color: var(--text);
  box-shadow: 0 24px 64px rgb(0 0 0 / 0.25);
  opacity: 0;
  transform: translateY(24px) scale(0.96);
  transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.1),
              overlay 0.28s allow-discrete, display 0.28s allow-discrete;
}
.dialog[open] { opacity: 1; transform: none; }
@starting-style {
  .dialog[open] { opacity: 0; transform: translateY(24px) scale(0.96); }
}
.dialog::backdrop {
  background: rgb(0 0 0 / 0);
  -webkit-backdrop-filter: blur(0);
  backdrop-filter: blur(0);
  transition: background-color 0.28s ease, backdrop-filter 0.28s ease,
              overlay 0.28s allow-discrete, display 0.28s allow-discrete;
}
.dialog[open]::backdrop {
  background: rgb(0 0 0 / 0.28);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}
@starting-style {
  .dialog[open]::backdrop { background: rgb(0 0 0 / 0); backdrop-filter: blur(0); }
}
.dialog h2 { margin-bottom: 8px; }
.dialog p { color: var(--leise); }
.dialog-knoepfe { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after, .dialog, .dialog::backdrop { transition: none !important; }
}
