/* Zentrale Anmeldung — dieselbe Formensprache wie die Apps dahinter
   (Nunito/Quicksand, weiche Rundungen, Schatten statt Rahmen). Bewusst das
   Teal aus papertrail als Hausfarbe: Diese Seite gehoert keiner App, sie
   gehoert allen. */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@500;600;700&family=Quicksand:wght@600;700&display=swap');

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --text: #101828;
  --text-faint: #667085;
  --border: #e4e7ec;
  --primary: #0f7b6c;
  --primary-soft: #e0f1ec;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --shadow: rgba(16, 24, 40, 0.07);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10161a;
    --surface: #171f24;
    --text: #f2f4f7;
    --text-faint: #98a2b3;
    --border: #2a343b;
    --primary: #2fae9a;
    --primary-soft: #1b332f;
    --danger: #f0736a;
    --danger-soft: #3a1d1b;
    --shadow: rgba(0, 0, 0, 0.3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 500;
  background: var(--bg);
  color: var(--text);
}

.shell {
  max-width: 460px;
  margin: 0 auto;
  padding: 10vh 20px calc(40px + env(safe-area-inset-bottom));
}

h1 {
  font-family: 'Quicksand', 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  margin: 0 0 4px;
}

.sub { margin: 0 0 22px; color: var(--text-faint); font-size: 0.92rem; font-weight: 600; }

.card {
  background: var(--surface);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 3px 14px var(--shadow);
  margin-bottom: 16px;
}

.field { margin-bottom: 14px; }

.field label { display: block; font-size: 0.82rem; font-weight: 700; margin-bottom: 6px; }

.field input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
}

.field input:focus {
  outline: 2px solid var(--primary-soft);
  border-color: var(--primary);
}

.btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  /* .btn stand bisher nur auf <button>-Elementen, die von Haus aus keine
     Unterstreichung haben. Seit "Optionen" ein <a class="btn"> ist (Daniels
     Wunsch vom 08.09.2026), braucht es das ausdruecklich. */
  text-decoration: none;
}

.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }

.hint { color: var(--text-faint); font-size: 0.84rem; line-height: 1.5; }

.error, .notice {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  margin: 0 0 16px;
}

.error  { background: var(--danger-soft);  color: var(--danger); }
.notice { background: var(--primary-soft); color: var(--primary); }

/* ---------- Startseite mit den Anwendungen ---------- */

.apps { display: grid; gap: 10px; margin-bottom: 20px; }

.app {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 3px 14px var(--shadow);
  text-decoration: none;
  color: inherit;
}

.app-logo {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  flex-shrink: 0;
  /* Die Logos kommen aus vier Apps und sind unterschiedlich hell — eine
     zarte Kante fasst sie optisch zusammen, ohne sie zu verfaelschen. */
  box-shadow: inset 0 0 0 1px rgba(16, 24, 40, 0.08);
}

.app-text { min-width: 0; }

.app-name {
  display: block;
  font-family: 'Quicksand', 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary);
}

.app-desc { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-faint); margin-top: 2px; }

/* Apps, die noch ihre eigene Anmeldung haben — ehrlich gekennzeichnet,
   damit niemand sich wundert, warum dort erneut gefragt wird. */
.app-later { opacity: 0.72; }

.app-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-faint);
}

/* Häkchen-Reihen für die App-Auswahl (Konto hinzufügen, Zugriff verwalten). */
.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  margin: 0 0 8px;
}

.checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

details.card summary {
  font-family: 'Quicksand', 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}

details.card[open] summary { margin-bottom: 14px; }

/* Kopf des Anmelde-Formulars: Ueberschrift, Logo-Reihe und Untertext
   zentriert (Daniels Wunsch vom 08.09.2026) — der Rest (Hinweis, Fehler,
   das Formular selbst) bleibt linksbuendig, das ist bei einem Formular die
   gewohnte Form. */
.login-head { text-align: center; }

.login-logos { display: flex; justify-content: center; gap: 8px; margin: 0 0 14px; }

.login-logos img {
  width: 28px;
  height: 28px;
  /* Rund statt nur abgerundet (Daniels Wunsch) — bei einer Reihe kleiner
     Symbole liest sich das eher als "App-Icons" denn als eckige Kacheln. */
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(16, 24, 40, 0.08);
}

/* "Optionen": eigene Seite (options.php) statt eines Aufklapp-Bereichs
   (Daniels Wunsch vom 08.09.2026) — zentriert, direkt ueber "Abmelden". Kein
   Modal: Diese App hat bewusst kein JavaScript. */
.options-link { text-align: center; margin: 0 0 16px; }

.back {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--text-faint);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
}

.logout { text-align: center; }
