/* Gemeinsame Grundlage für alle Seiten (öffentlich abrufbar, siehe PUBLIC in functions/_middleware.js).
   Aus romina-work-calendar. Look: hell, warmes Off-White, Systemschrift, kein Dark Mode. */
:root {
  --bg: #F7F6F3;
  --card: #FFFFFF;
  --line: #EFEDE8;
  --text: #1C1B19;
  --muted: #6E6A62;
  --accent: #1C1B19;
  --err: #C62828;
  --ok: #2E7D32;
  --radius: 14px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  /* Systemschrift = San Francisco auf dem iPhone (wie echte Apps; vorher Inter von Google Fonts) */
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif; font-size: 16px; line-height: 1.4;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  min-height: 100vh; min-height: 100dvh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
h1, h2, h3 { margin: 0; letter-spacing: -.02em; }
button, input { font: inherit; }
input[type=email], input[type=password], input[type=text] {
  font-size: 16px; /* < 16px zoomt iOS beim Antippen */
  width: 100%; color: var(--text); background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus { border-color: var(--text); box-shadow: 0 0 0 3px rgba(28,27,25,.08); }
input.bad { border-color: var(--err); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-weight: 600; font-size: 16px; cursor: pointer; text-decoration: none;
  color: #fff; background: var(--accent); border: 1px solid var(--accent); border-radius: 12px;
  padding: 13px 18px; min-height: 48px; transition: transform .1s, opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: wait; }
.btn.ghost { color: var(--text); background: transparent; border-color: var(--line); }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 10px; }

.msg { display: none; font-size: 14px; line-height: 1.4; border-radius: 10px; padding: 10px 12px; border: 1px solid; }
.msg.show { display: block; }
.msg.err { color: var(--err); border-color: color-mix(in srgb, var(--err) 35%, transparent); background: color-mix(in srgb, var(--err) 6%, #fff); }
.msg.info { color: var(--text); border-color: var(--line); background: var(--card); }

/* Seite vor dem Login (login.html) */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 32px 16px; }
.auth main { width: 100%; max-width: 400px; }
.auth .logo { display: flex; gap: 6px; margin-bottom: 18px; }
.auth .logo span { width: 28px; height: 8px; border-radius: 4px; }
.auth h1 { font-size: 30px; margin-bottom: 6px; }
.auth .sub { color: var(--muted); font-size: 15px; margin-bottom: 24px; }
.auth form {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  display: flex; flex-direction: column; gap: 16px; box-shadow: 0 8px 30px rgba(28,27,25,.06);
}
.auth label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.auth .remember { flex-direction: row; align-items: center; gap: 10px; font-weight: 400; font-size: 15px; cursor: pointer; user-select: none; }
.auth .remember input { width: 20px; height: 20px; margin: 0; accent-color: var(--text); }
.auth .hint { font-size: 13px; color: var(--muted); }
/* Passwort anzeigen: Button rechts im Feld */
.pw { position: relative; display: flex; }
.pw input { flex: 1; min-width: 0; padding-right: 48px; }
.pw button {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%); padding: 0;
  width: 40px; height: 40px; display: grid; place-items: center; color: var(--muted);
  background: transparent; border: 0; border-radius: 8px; cursor: pointer;
}
.gone { display: none !important; }
[hidden] { display: none !important; }

/* Häkchen als iOS-Schalter (App + Login-Seiten): Text links, Schalter rechts */
.check input[type=checkbox], .remember input[type=checkbox] {
  -webkit-appearance: none; appearance: none; order: 2; margin: 0 0 0 auto !important; flex-shrink: 0;
  width: 51px !important; height: 31px !important; border-radius: 999px; background: rgba(120,120,128,.16); position: relative; cursor: pointer;
  transition: background-color .25s;
}
.check input[type=checkbox]::before, .remember input[type=checkbox]::before {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff;
  box-shadow: 0 3px 8px rgba(0,0,0,.15), 0 1px 1px rgba(0,0,0,.16); transition: transform .3s cubic-bezier(.32, .72, 0, 1);
}
.check input[type=checkbox]:checked, .remember input[type=checkbox]:checked { background: #34C759; }
.check input[type=checkbox]:checked::before, .remember input[type=checkbox]:checked::before { transform: translateX(20px); }
.check input[type=checkbox]:focus-visible, .remember input[type=checkbox]:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.check, .remember { justify-content: space-between; min-height: 44px; }

/* Login-Seiten im gleichen iOS-Look wie die App */
input[type=email], input[type=password], input[type=text] { border-radius: 14px; min-height: 50px; }
.btn { border-radius: 999px; min-height: 50px; font-size: 17px; border: 0; }
.auth form { border: 0; border-radius: 26px; box-shadow: 0 1px 2px rgba(28,27,25,.05), 0 12px 32px rgba(28,27,25,.06); }

/* Kein Doppeltipp-/Pinch-Zoom wie auf einer Website – nur Wischen/Scrollen (Felix, 24.11.2026) */
html { touch-action: pan-x pan-y; }
