/* Persönliches System – Gestaltung nach Hausstil (hell, schlicht, Calibri) */
@font-face { font-family: 'Carlito'; src: url('schrift/carlito-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Carlito'; src: url('schrift/carlito-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --text: #1c1f24; --grau: #5f6771; --rand: #e2e6ea; --menue: #f5f7f9; --pink: #d6457f;
  --knopf: #eef1f4; --knopf-rand: #d9dfe4; --haupt: #dde3e8; --haupt-rand: #c3ccd4;
  --rot: #a8443c; --rot-hell: #f3dedc; --schatten: 2px 2px 6px rgba(28,31,36,.08);
  --menue-hoehe: 64px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: #fff; color: var(--text); }
body { font-family: Calibri, Carlito, "Segoe UI", Arial, sans-serif; font-size: 11pt; line-height: 1.4;
       padding-top: env(safe-area-inset-top); -webkit-text-size-adjust: 100%; }
a { color: var(--text); text-decoration: underline; }
p { margin: 0; }
.klein { font-size: 9pt; }
.grau { color: var(--grau); }
.boxtitel { font-size: 18pt; font-weight: 700; margin: 0; }

/* Knöpfe: grau, Hauptknopf eine Schattierung dunkler */
.knopf { font: inherit; color: var(--text); background: var(--knopf); border: 1px solid var(--knopf-rand);
         border-radius: 6px; padding: 6px 14px; cursor: pointer; min-height: 32px; }
.knopf.haupt { background: var(--haupt); border-color: var(--haupt-rand); }
.knopf:disabled { cursor: default; opacity: .7; }
.textlink { font: inherit; font-size: 9pt; background: none; border: 0; padding: 0; color: var(--text);
            text-decoration: underline; cursor: pointer; align-self: flex-start; }

/* Aufbau: Bildschirm (ab 1024px) Menü links */
.layout { display: flex; min-height: 100vh; }
.menue { width: 240px; flex: none; background: var(--menue); border-right: 1px solid var(--rand);
         position: fixed; top: 0; bottom: 0; left: 0; display: flex; flex-direction: column;
         padding: calc(16px + env(safe-area-inset-top)) 16px 16px; }
.app-name { font-weight: 700; margin-bottom: 16px; }
.menue ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.menue a { display: block; padding: 8px 10px; border-radius: 6px; text-decoration: none; }
.menue a.aktiv { background: #fff; border: 1px solid var(--rand); font-weight: 700; }
.menue a.inaktiv { color: var(--grau); opacity: .6; cursor: default; pointer-events: none; }
.konto { margin-top: auto; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.inhalt { margin-left: 240px; flex: 1; padding: 24px; display: flex; flex-direction: column; gap: 12px; max-width: calc(760px + 48px + 240px); }
.inhalt > * { max-width: 760px; width: 100%; }

.kopf { display: flex; flex-direction: column; gap: 4px; }
.kopf-zeile { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.kopf-zeile:first-child { justify-content: flex-start; }

.liste { display: flex; flex-direction: column; gap: 12px; }
.karte { background: #fff; border: 1px solid var(--rand); border-radius: 10px; box-shadow: var(--schatten);
         padding: 12px 14px; display: flex; align-items: center; gap: 16px; transition: opacity .25s; }
.karte.weg { opacity: 0; }
.karte-inhalt { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.karte-titel { display: flex; align-items: center; gap: 8px; }
.punkt-pink { width: 8px; height: 8px; border-radius: 50%; background: var(--pink); flex: none; }
.karte-text { overflow-wrap: anywhere; }
.karte-text.gekuerzt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.karte .knopf.haupt { flex: none; }

.platzhalter { height: 72px; border-radius: 10px; border: 1px solid var(--rand); background: var(--menue); }
.leer { text-align: center; padding: 24px 0; }
.hinweis { padding: 24px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.meldung-fehler { border-left: 3px solid var(--rot); background: var(--rot-hell); color: var(--text);
                  padding: 10px 12px; border-radius: 6px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
#fehlerplatz:empty { display: none; }
.erledigt summary { cursor: pointer; color: var(--grau); }
.erledigt ul { margin: 6px 0 0; padding-left: 18px; color: var(--grau); }

.anmeldung { max-width: 360px; margin: 15vh auto 0; padding: 24px; border: 1px solid var(--rand);
             border-radius: 10px; box-shadow: var(--schatten); display: flex; flex-direction: column; gap: 16px; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; background: var(--text); color: #fff;
         padding: 8px 14px; border-radius: 6px; font-size: 9pt; z-index: 10; max-width: calc(100% - 32px); }

/* iPhone und schmale Fenster (unter 1024px): Menü unten */
@media (max-width: 1023.98px) {
  .menue { position: fixed; top: auto; bottom: 0; left: 0; right: 0; width: auto; height: auto; flex-direction: row;
           border-right: 0; border-top: 1px solid var(--rand); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 5; }
  .app-name { display: none; }
  .menue ul { flex-direction: row; justify-content: space-around; width: 100%; gap: 0; }
  .menue li { flex: 1; }
  .menue a { text-align: center; padding: 10px 2px; font-size: 9pt; border: 0; }
  .menue a.aktiv { background: none; border: 0; }
  .konto { position: fixed; top: calc(8px + env(safe-area-inset-top)); right: 16px; flex-direction: row; align-items: center; margin: 0; }
  .konto .klein { display: none; }
  .inhalt { margin-left: 0; padding: 56px 16px calc(var(--menue-hoehe) + 24px + env(safe-area-inset-bottom)); max-width: none; }
  .karte { flex-direction: column; align-items: stretch; }
  .karte .knopf.haupt { width: 100%; min-height: 44px; }
  .knopf { min-height: 44px; }
  .toast { bottom: calc(var(--menue-hoehe) + 16px + env(safe-area-inset-bottom)); }
}
