/* Intranet - Gestaltung "Haushalt"
   Formensprache: Apple, wie Erinnerungen und Einstellungen auf iOS/macOS.
   Graue Grundflaeche, weisse Gruppen mit 12 px Rundung, eingerueckte
   Trennlinien, Segmentschalter. Farbe sitzt in den Symbolen: jeder Bereich
   hat eine Farbe (Rot, Orange, Gelb, Gruen, Blau), jede Liste ihre eigene.
   Der Rest ist weiss und grau. Kein Glas, kein Schatten: Tiefe kommt aus
   Flaeche auf Flaeche.

   Alle Farben liegen als Token auf :root. Die dunkle Fassung ueberschreibt
   nur Token, nie einzelne Bausteine. Keine Webfonts, keine Inline-Stile
   (CSP: style-src 'self'). */

:root {
  color-scheme: light;

  --grund:      #f2f2f7;
  --seite:      #f7f7f9;
  --karte:      #ffffff;
  --fuellung:   #e5e5ea;
  --fuellung-2: #d1d1d6;
  --trenner:    rgba(60, 60, 67, .14);
  --auswahl:    #dcdce1;
  --hover:      #ececf0;

  --text:       #1c1c1e;
  --text-2:     #6e6e73;
  --text-3:     #aeaeb2;
  --chevron:    #c7c7cc;

  --blau:   #007aff;
  --rot:    #ff3b30;
  --orange: #ff9500;
  --gelb:   #ffcc00;
  --gruen:  #34c759;
  --tuerkis:#5ac8fa;
  --lila:   #af52de;
  --pink:   #ff2d55;
  --grau:   #8e8e93;

  --blau-hauch: rgba(0, 122, 255, .12);
  --rot-hauch:  rgba(255, 59, 48, .12);
  --gruen-hauch:rgba(52, 199, 89, .14);

  --schrift: -apple-system, 'SF Pro Text', 'Segoe UI Variable Text', 'Segoe UI',
             system-ui, 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --eck:       10px;
  --eck-gross: 12px;

  --hintergrund: url(/hintergrund.svg?v=2);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --grund:      #101012;
    --seite:      #18181a;
    --karte:      #1c1c1e;
    --fuellung:   #2c2c2e;
    --fuellung-2: #3a3a3c;
    --trenner:    rgba(84, 84, 88, .55);
    --auswahl:    #3a3a3c;
    --hover:      #2c2c2e;

    --text:       #f5f5f7;
    --text-2:     #98989d;
    --text-3:     #636366;
    --chevron:    #48484a;

    --blau:   #0a84ff;
    --rot:    #ff453a;
    --orange: #ff9f0a;
    --gelb:   #ffd60a;
    --gruen:  #30d158;
    --tuerkis:#64d2ff;
    --lila:   #bf5af2;
    --pink:   #ff375f;
    --grau:   #8e8e93;

    --blau-hauch: rgba(10, 132, 255, .18);
    --rot-hauch:  rgba(255, 69, 58, .18);
    --gruen-hauch:rgba(48, 209, 88, .18);
    --hintergrund: url(/hintergrund-dunkel.svg?v=2);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --grund:      #101012;
  --seite:      #18181a;
  --karte:      #1c1c1e;
  --fuellung:   #2c2c2e;
  --fuellung-2: #3a3a3c;
  --trenner:    rgba(84, 84, 88, .55);
  --auswahl:    #3a3a3c;
  --hover:      #2c2c2e;

  --text:       #f5f5f7;
  --text-2:     #98989d;
  --text-3:     #636366;
  --chevron:    #48484a;

  --blau:   #0a84ff;
  --rot:    #ff453a;
  --orange: #ff9f0a;
  --gelb:   #ffd60a;
  --gruen:  #30d158;
  --tuerkis:#64d2ff;
  --lila:   #bf5af2;
  --pink:   #ff375f;
  --grau:   #8e8e93;

  --blau-hauch: rgba(10, 132, 255, .18);
  --rot-hauch:  rgba(255, 69, 58, .18);
  --gruen-hauch:rgba(48, 209, 88, .18);
  --hintergrund: url(/hintergrund-dunkel.svg?v=2);
}

/* --- Grundlage ----------------------------------------------------------- */

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

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--schrift);
  font-size: 15px;
  line-height: 1.4;
  color: var(--text);
  background: var(--grund);
  -webkit-font-smoothing: antialiased;
}

/* Hintergrundmotiv: fest im Fenster, hinter allem. Als Pseudoelement statt
   background-attachment, weil iOS "fixed" nicht kann. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--grund) var(--hintergrund) no-repeat center / cover;
  pointer-events: none;
}

h1, h2, h3, p { margin: 0; }
a { color: var(--blau); text-decoration: none; }
button { font: inherit; }
input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.nurlesbar {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.sinnbilder { position: absolute; width: 0; height: 0; overflow: hidden; }

.sym {
  width: 16px; height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--blau);
  outline-offset: 2px;
  border-radius: 6px;
}

/* --- Rahmen: Seitenleiste links, Inhalt rechts --------------------------- */

.app {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100dvh;
}

.seitenleiste {
  background: var(--seite);
  border-right: 1px solid var(--trenner);
  padding: 16px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow-y: auto;
  scrollbar-width: thin;
}

/* Marke oben in der Seitenleiste */
.marke {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 8px 12px;
  color: var(--text);
}
.marke .sym { width: 30px; height: 30px; }
.marke b { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }

/* Schnellkacheln: vier Zaehler wie in Erinnerungen */
.schnell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.schnell a {
  background: var(--karte);
  border-radius: var(--eck);
  padding: 10px 12px 8px;
  display: grid;
  grid-template-columns: 1fr auto;
  row-gap: 8px;
  align-items: center;
  color: var(--text);
}
.schnell a:hover { background: var(--hover); }
.schnell .ikon { width: 28px; height: 28px; border-radius: 50%; }
.schnell b { font-size: 22px; font-weight: 700; letter-spacing: -.02em; text-align: right; font-variant-numeric: tabular-nums; }
.schnell span { grid-column: 1 / -1; font-size: 13px; font-weight: 600; color: var(--text-2); }

.gruppe-titel { font-size: 11.5px; font-weight: 700; color: var(--text-3); padding: 10px 8px 4px; }

.nav { display: flex; flex-direction: column; gap: 1px; }
.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 32px;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 14px;
  color: var(--text);
}
.nav a .ikon { width: 20px; height: 20px; border-radius: 5px; }
.nav a .ikon .sym { width: 13px; height: 13px; stroke-width: 2.2; }
.nav a .n { margin-left: auto; color: var(--text-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.nav a.aktiv { background: var(--auswahl); }
.nav a:hover:not(.aktiv) { background: var(--hover); }

.konto {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px 0 8px;
}
.konto .avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--blau);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  display: grid;
  place-items: center;
  flex: none;
}
.konto .wer { min-width: 0; flex: 1; }
.konto .wer b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.konto .wer span { display: block; font-size: 12px; color: var(--text-2); }
.konto form { display: contents; }

/* Farbige Symbolkaestchen */
.ikon {
  display: grid;
  place-items: center;
  flex: none;
  color: #fff;
  background: var(--grau);
}
.ikon .sym { stroke: #fff; }
.ikon.blau { background: var(--blau); }   .ikon.rot { background: var(--rot); }
.ikon.orange { background: var(--orange); } .ikon.gelb { background: var(--gelb); }
.ikon.gruen { background: var(--gruen); } .ikon.tuerkis { background: var(--tuerkis); }
.ikon.lila { background: var(--lila); }   .ikon.pink { background: var(--pink); }
.ikon.grau { background: var(--grau); }

/* Runde Initiale (Bookmarks, Benutzer) */
.kreis {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex: none;
  background: var(--grau);
}
.kreis.blau { background: var(--blau); }   .kreis.rot { background: var(--rot); }
.kreis.orange { background: var(--orange); } .kreis.gelb { background: var(--gelb); }
.kreis.gruen { background: var(--gruen); } .kreis.tuerkis { background: var(--tuerkis); }
.kreis.lila { background: var(--lila); }   .kreis.pink { background: var(--pink); }

/* --- Inhalt --------------------------------------------------------------- */

/* Inhalt mittig, mit wachsendem Rand: auf 21:9 klebt nichts links. */
.haupt { padding: 28px clamp(24px, 3.5vw, 72px) 60px; min-width: 0; }
.inhalt { max-width: 1480px; margin: 0 auto; }

.titel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.titel h1 { font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.titel p { color: var(--text-2); margin-top: 3px; }
.titel .aktionen { display: flex; gap: 8px; flex: none; padding-top: 4px; }
.titel h1.blau { color: var(--blau); }   .titel h1.rot { color: var(--rot); }
.titel h1.orange { color: var(--orange); } .titel h1.gelb { color: var(--gelb); }
.titel h1.gruen { color: var(--gruen); } .titel h1.tuerkis { color: var(--tuerkis); }
.titel h1.lila { color: var(--lila); }   .titel h1.pink { color: var(--pink); }
.zurueck { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; margin-bottom: 8px; }
.zurueck .sym { width: 12px; height: 12px; }

.abschnitt { margin-bottom: 26px; }
.abschnitt h2 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.01em;
  margin: 0 4px 8px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.abschnitt h2 a, .abschnitt h2 .knopf { font-size: 14px; font-weight: 400; }

.zwei { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
.zwei > .abschnitt { min-width: 0; }

/* Gruppen: weisse Flaeche mit Zeilen */
.gruppe { background: var(--karte); border-radius: var(--eck-gross); overflow: hidden; }

.reihe {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px 10px 14px;
  min-height: 50px;
  position: relative;
  color: var(--text);
}
.reihe + .reihe::before,
.reihe + form > .reihe::before,
form + .reihe::before {
  content: "";
  position: absolute;
  left: 54px; right: 0; top: 0;
  border-top: 1px solid var(--trenner);
}
.reihe.ohne-ikon + .reihe.ohne-ikon::before { left: 16px; }
a.reihe:hover, .reihe.klickbar:hover { background: var(--hover); }
.reihe .ikon { width: 28px; height: 28px; border-radius: 7px; }
.reihe .haupt-text { min-width: 0; flex: 1; }
.reihe .haupt-text b { display: block; font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reihe .haupt-text b a { color: inherit; }
.reihe .haupt-text span { display: block; font-size: 13.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reihe .haupt-text .fliesstext { white-space: pre-wrap; margin-top: 4px; line-height: 1.5; }
.reihe .wert { color: var(--text-2); font-size: 14px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; flex: none; }
.reihe .wert b { display: block; color: var(--text); font-weight: 600; font-size: 15px; }
.reihe .wert.gruen b, .wert.gruen { color: var(--gruen); }
.reihe .wert.pw { color: var(--text); font-family: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", monospace; font-size: 13.5px; letter-spacing: .02em; min-width: 92px; }
.reihe .wert.pw[data-offen="1"] { user-select: all; }
.reihe .chev { width: 8px; height: 14px; fill: none; stroke: var(--chevron); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.reihe .werkzeuge { display: flex; gap: 2px; flex: none; }
.reihe .balken { margin: 0; width: 120px; flex: none; }

/* Ausrichtung fuer Zeilen mit mehreren Absaetzen (Ankuendigungen, Notizen) */
.reihe.oben { align-items: flex-start; }
.reihe.oben .ikon { margin-top: 2px; }

/* Leerer Zustand */
.leer { padding: 34px 20px; text-align: center; color: var(--text-2); }
.leer p { margin-bottom: 14px; }

/* Chips: Schnellzugriff */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px 0 6px;
  background: var(--karte);
  border-radius: 18px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  max-width: 100%;
}
.chip:hover { background: var(--hover); }
.chip .kreis { width: 26px; height: 26px; }
.chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Notizen als Karten mit farbiger Oberkante */
.notizen { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.notizkarte {
  background: var(--karte);
  border-radius: var(--eck-gross);
  padding: 14px 16px;
  border-top: 6px solid var(--gelb);
  display: flex;
  flex-direction: column;
  min-width: 0;
  color: var(--text);
}
.notizkarte.blau { border-top-color: var(--blau); } .notizkarte.tuerkis { border-top-color: var(--tuerkis); }
.notizkarte.pink { border-top-color: var(--pink); } .notizkarte.orange { border-top-color: var(--orange); }
.notizkarte.lila { border-top-color: var(--lila); } .notizkarte.gelb { border-top-color: var(--gelb); }
.notizkarte .kopf { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 4px; }
.notizkarte .kopf b { font-weight: 600; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.notizkarte .kopf .werkzeuge { display: flex; gap: 2px; flex: none; margin: -4px -8px 0 0; }
.notizkarte .pin { color: var(--orange); width: 14px; height: 14px; margin-top: 3px; }
.notizkarte p { font-size: 13.5px; color: var(--text-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; white-space: pre-wrap; }
.notizkarte small { display: block; font-size: 12px; color: var(--text-3); margin-top: auto; padding-top: 8px; }
.notiz-text { padding: 18px 20px; white-space: pre-wrap; line-height: 1.6; }

/* --- Knoepfe -------------------------------------------------------------- */

.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--eck);
  border: 0;
  background: var(--fuellung);
  color: var(--blau);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .1s ease;
}
.knopf:hover { background: var(--fuellung-2); }
.knopf.voll { background: var(--blau); color: #fff; }
.knopf.voll:hover { background: #0066d6; }
.knopf.rot { color: var(--rot); }
.knopf.rot.voll { background: var(--rot); color: #fff; }
.knopf.rot.voll:hover { background: #e0322a; }
.knopf.klein { height: 30px; padding: 0 11px; font-size: 13.5px; border-radius: 8px; }
.knopf.breit { width: 100%; }
.knopf.still { background: transparent; }
.knopf.still:hover { background: var(--hover); }
.knopf:disabled { opacity: .5; cursor: default; }

/* Nur-Symbol-Knopf in Zeilen */
.wz {
  width: 30px; height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  padding: 0;
}
.wz:hover { background: var(--fuellung); color: var(--text); }
.wz.rot:hover { color: var(--rot); background: var(--rot-hauch); }
.wz.blau { color: var(--blau); }

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

/* Gestapelt (in Dialogen): Beschriftung ueber dem Feld */
.feld { margin-bottom: 14px; }
.feld label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; }
.feld input, .feld select, .feld textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border: 0;
  border-radius: var(--eck);
  background: var(--grund);
  color: var(--text);
}
.feld textarea { resize: vertical; line-height: 1.45; }
.feld input:focus, .feld select:focus, .feld textarea:focus { outline: 2px solid var(--blau); outline-offset: 0; }
.feld input:disabled { color: var(--text-2); }
.feld .hinweis { font-size: 12.5px; color: var(--text-2); margin-top: 5px; }
.feld-reihe { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.feld-mit-knopf { display: flex; gap: 6px; }
.feld-mit-knopf input { flex: 1; min-width: 0; }
.feld.ankreuz { display: flex; align-items: center; gap: 10px; padding-top: 6px; }
.feld.ankreuz input { width: 18px; height: 18px; min-height: 0; accent-color: var(--blau); margin: 0; }
.feld.ankreuz label { margin: 0; color: var(--text); font-weight: 500; }

/* Eingerueckte Zeilen (in Gruppen): Beschriftung links, Feld rechts */
.formular .reihe { padding: 6px 16px; min-height: 46px; }
.formular .reihe label { flex: none; width: 110px; font-size: 14.5px; }
.formular .reihe input, .formular .reihe select, .formular .reihe textarea {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  text-align: right;
  padding: 6px 0;
  color: var(--text);
}
.formular .reihe textarea { text-align: left; resize: vertical; min-height: 80px; }
.formular .reihe input::placeholder { color: var(--text-3); }
.formular .reihe input:focus, .formular .reihe select:focus, .formular .reihe textarea:focus { outline: none; }
.formular .reihe input:disabled { color: var(--text-2); }
.formular .reihe select { appearance: none; -webkit-appearance: none; color: var(--text-2); padding-right: 4px; cursor: pointer; }
.formular .reihe .chev { pointer-events: none; }
.formular .fuss { padding: 10px 16px 14px; }
.formular .fuss .knopf { width: 100%; }
.fussnote { font-size: 12.5px; color: var(--text-2); margin: 8px 4px 0; line-height: 1.45; }

/* Suche */
.suche {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px;
  background: var(--fuellung);
  border-radius: var(--eck);
  color: var(--text-2);
  flex: 1;
  min-width: 0;
  max-width: 360px;
}
.suche input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); height: 100%; }
.suche input:focus { outline: none; }
.suche input::placeholder { color: var(--text-3); }
.suchzeile { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.suchzeile select {
  height: 36px;
  padding: 0 30px 0 12px;
  border: 0;
  border-radius: var(--eck);
  background: var(--fuellung);
  color: var(--text);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

/* Segmentschalter */
.segment {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  background: var(--fuellung);
  border-radius: 9px;
  padding: 2px;
  margin-bottom: 14px;
}
.segment button {
  border: 0;
  background: transparent;
  padding: 5px 24px;
  border-radius: 7px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}
.segment button[aria-pressed="true"] { background: var(--karte); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }

/* Pillen (Rolle, Status) */
.pille {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 600;
  background: var(--fuellung);
  color: var(--text-2);
  white-space: nowrap;
}
.pille.blau { background: var(--blau-hauch); color: var(--blau); }
.pille.orange { background: rgba(255, 149, 0, .16); color: #b36b00; }
.pille.gruen { background: var(--gruen-hauch); color: #1f8a3f; }
:root[data-theme="dark"] .pille.orange { color: var(--orange); }
:root[data-theme="dark"] .pille.gruen { color: var(--gruen); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pille.orange { color: var(--orange); }
  :root:not([data-theme="light"]) .pille.gruen { color: var(--gruen); }
}

/* Fortschritt: <progress>, damit die Breite ohne Inline-Stil auskommt (CSP) */
.balken {
  display: block;
  width: calc(100% - 32px);
  height: 6px;
  margin: 8px 16px 14px;
  border: 0;
  border-radius: 3px;
  overflow: hidden;
  background: var(--fuellung);
  appearance: none;
  -webkit-appearance: none;
  color: var(--gruen);
}
.balken::-webkit-progress-bar { background: var(--fuellung); border-radius: 3px; }
.balken::-webkit-progress-value { background: var(--gruen); border-radius: 3px; }
.balken::-moz-progress-bar { background: var(--gruen); border-radius: 3px; }

/* Meldungen */
.meldung {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: var(--eck-gross);
  margin-bottom: 18px;
  background: var(--gruen-hauch);
  color: var(--text);
  font-weight: 500;
}
.meldung .sym { color: var(--gruen); }
.meldung.fehler { background: var(--rot-hauch); }
.meldung.fehler .sym { color: var(--rot); }
.meldung.info { background: var(--blau-hauch); }
.meldung.info .sym { color: var(--blau); }

/* --- Einkaufsliste --------------------------------------------------------- */

.liste-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }

.produkt {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 10px 10px 16px;
  position: relative;
}
.produkt + .produkt::before { content: ""; position: absolute; left: 54px; right: 0; top: 0; border-top: 1px solid var(--trenner); }
.produkt form { display: contents; }
.produkt .kreisknopf {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--chevron);
  background: transparent;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  color: #fff;
}
.produkt .kreisknopf .sym { width: 12px; height: 12px; stroke-width: 2.6; display: none; }
.produkt.erledigt .kreisknopf { background: var(--gruen); border-color: var(--gruen); }
.produkt.erledigt .kreisknopf .sym { display: block; }
.produkt .kreisknopf.blau, .produkt.erledigt .kreisknopf.blau { background: var(--blau); border-color: var(--blau); }
.produkt .name { min-width: 0; }
.produkt .name b { display: block; font-weight: 500; font-size: 15.5px; overflow-wrap: anywhere; }
.produkt.erledigt .name b { color: var(--text-3); text-decoration: line-through; }
.produkt .name small { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--text-2); margin-top: 1px; }
.produkt .name small .flagge { display: inline-flex; align-items: center; gap: 3px; color: var(--orange); font-weight: 600; }
.produkt .name small .flagge .sym { width: 11px; height: 11px; fill: var(--orange); stroke: var(--orange); }
.produkt .preis { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; white-space: nowrap; }
.produkt .preis small { display: block; color: var(--text-3); font-size: 12px; }
.produkt .werkzeuge { display: flex; }
.produkt[hidden] { display: none; }

.zusammen .reihe .wert { color: var(--text); }

/* --- Dialoge -------------------------------------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, .35);
}
.modal-karte {
  width: 100%;
  max-width: 440px;
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  background: var(--karte);
  border-radius: 14px;
  padding: 22px 22px 18px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .25);
}
.modal-karte.breit { max-width: 560px; }
.modal-titel { font-size: 18px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 16px; }
.modal-text { color: var(--text-2); margin-bottom: 16px; line-height: 1.45; }
.modal-text b { color: var(--text); }
.modal-aktionen { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

/* Kurzmeldung unten */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 200;
  padding: 10px 18px;
  background: var(--text);
  color: var(--grund);
  border-radius: 20px;
  font-weight: 600;
  font-size: 14px;
  pointer-events: none;
}

/* --- Anmeldung ------------------------------------------------------------ */

.anmeldung {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.anmeldung-karte { width: 100%; max-width: 380px; }
.anmeldung .marke { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 26px; padding: 0; }
.anmeldung .marke .sym { width: 76px; height: 76px; filter: drop-shadow(0 8px 20px rgba(0, 122, 255, .25)); }
.anmeldung .marke h1 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.anmeldung .marke p { color: var(--text-2); }
.anmeldung .knopf { margin-top: 14px; height: 44px; font-size: 16px; }
.anmeldung .fussnote { text-align: center; margin-top: 18px; }

/* --- Breit: Seitenleiste etwas grosszuegiger ------------------------------ */

@media (min-width: 1700px) {
  .app { grid-template-columns: 300px minmax(0, 1fr); }
  .seitenleiste { padding: 20px 18px 16px; }
  .inhalt { max-width: 1600px; }
  .zwei { gap: 28px; }
}

/* --- Schmal ---------------------------------------------------------------- */

@media (max-width: 900px) {
  .haupt { padding: 22px 20px 48px; }
  .zwei { grid-template-columns: minmax(0, 1fr); }
  .liste-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .seitenleiste {
    position: static;
    height: auto;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--trenner);
    padding: 12px 16px 10px;
    gap: 8px;
  }
  .schnell { grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 4px; }
  .schnell a { padding: 8px 10px 6px; row-gap: 4px; }
  .schnell .ikon { width: 22px; height: 22px; }
  .schnell .ikon .sym { width: 12px; height: 12px; }
  .schnell b { font-size: 18px; }
  .schnell span { font-size: 12px; }
  .gruppe-titel { display: none; }
  .nav { flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 2px; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: none; height: 32px; padding: 0 10px 0 6px; background: var(--karte); border-radius: 16px; font-size: 13.5px; }
  .nav a.aktiv { background: var(--auswahl); }
  .nav a .n { margin-left: 2px; }
  .konto { margin-top: 0; padding: 4px 0 0; }
  .haupt { padding: 20px 16px 40px; }
  .titel { flex-direction: column; gap: 10px; }
  .titel h1 { font-size: 26px; }
  .feld-reihe { grid-template-columns: 1fr; }
  .reihe .balken { width: 70px; }
  .segment button { padding: 5px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .knopf { transition: none; }
}
