/* Eigenes CSS der Weboberfläche (ADR-004): lesbar auf dem Handy,
   Kontrast mindestens 4,5:1 (WCAG AA, geprüft in css_test.go), Systemschrift,
   Tippflächen mindestens 48 px. Heller und dunkler Modus (ST-08-08). */
:root {
  color-scheme: light dark;
  --text: #1b1f24;
  --muted: #4a5260;
  --bg: #f4f6f9;
  --card: #ffffff;
  --card-open: #eef4fb;
  --card-booked: #edf7f1;
  --card-gone: #fdf3ea;
  --stripe-open: #0b5394;
  --stripe-booked: #1e7a46;
  --stripe-gone: #a35200;
  --stripe-info: #5b6472;
  --accent: #0b5394;
  --accent-text: #ffffff;
  --link: #0b5394;
  --danger: #a4161a;
  --border: #6b7280;
}
@media (prefers-color-scheme: dark) {
  :root {
    --text: #f1f3f5;
    --muted: #c3c9d2;
    --bg: #121417;
    --card: #1e2228;
    --card-open: #15233a;
    --card-booked: #13291d;
    --card-gone: #2e1f10;
    --stripe-open: #8ab4f8;
    --stripe-booked: #6fcf97;
    --stripe-gone: #f0a35e;
    --stripe-info: #9aa3ad;
    --accent: #8ab4f8;
    --accent-text: #0b0f14;
    --link: #8ab4f8;
    --danger: #ff8a80;
    --border: #9aa3ad;
  }
}
html { font-size: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}
main { max-width: 32rem; margin: 0 auto; padding: 1.5rem 1rem 2.5rem; }
h1 { font-size: 1.5rem; line-height: 1.25; margin: 0 0 1rem; }
h2 { font-size: 1.15rem; margin: 0 0 0.5rem; }
p, li { font-size: 1.05rem; }
a { color: var(--link); text-decoration: underline; }

.card {
  background: var(--card);
  border-top: 6px solid var(--stripe-info);
  border-radius: 12px;
  padding: 1.25rem 1.25rem 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.card-open { background: var(--card-open); border-top-color: var(--stripe-open); }
.card-booked { background: var(--card-booked); border-top-color: var(--stripe-booked); }
.card-gone { background: var(--card-gone); border-top-color: var(--stripe-gone); }

.slot { margin: 0 0 1rem; }
.slot span { display: block; }
.slot-date { font-size: 1.3rem; font-weight: 600; }
.slot-time { font-size: 2rem; font-weight: 700; line-height: 1.2; letter-spacing: 0.01em; }
.slot-details { color: var(--muted); margin-top: 0.25rem; }
.message { font-size: 1.1rem; margin: 0 0 1.25rem; }

.button {
  box-sizing: border-box;
  display: block;
  min-height: 48px;
  width: 100%;
  padding: 0.75rem 1rem;
  font: inherit;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  color: var(--accent-text);
  background: var(--accent);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
form { margin: 0; }

.more { margin-top: 2rem; padding: 0 0.25rem; }
.more ul { padding-left: 1.25rem; }
.alt-link { display: inline-flex; align-items: center; min-height: 48px; }
.choice-link { display: inline-flex; align-items: center; min-height: 48px; }

button:focus-visible, a:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }

/* Teambereich (ST-14-01, ST-12-04, ST-12-05, ST-17-22): Anmeldung,
   Nutzerpflege, Profil. Felder und Knöpfe mindestens 48 px hoch, Fehler mit
   Symbol und Text (E31). */
main.team { max-width: 56rem; }
.team-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem;
  max-width: 56rem; margin: 0 auto; padding: 0.75rem 1rem 0;
}
.team-nav { display: flex; gap: 1rem; list-style: none; margin: 0; padding: 0; }
.team-nav a { display: inline-flex; align-items: center; min-height: 48px; font-weight: 600; }
.logout { display: flex; align-items: center; gap: 0.75rem; }
.who, .muted, .hint { color: var(--muted); }
.muted { display: block; font-weight: 400; font-size: 0.95rem; }
.hint { font-size: 0.95rem; margin: 0.25rem 0 0.5rem; }
.info { border-left: 4px solid var(--stripe-booked); padding: 0.5rem 0.75rem; background: var(--card); }
.form { display: grid; gap: 0.25rem; max-width: 36rem; }
.form label, legend { font-weight: 600; margin-top: 0.75rem; }
.form input[type=email], .form input[type=text], .form input:not([type]), .form textarea {
  box-sizing: border-box; width: 100%; min-height: 48px; padding: 0.6rem 0.75rem; font: inherit; font-size: 1.05rem;
  color: var(--text); background: var(--card); border: 1px solid var(--border); border-radius: 8px;
}
.form textarea { font-family: inherit; line-height: 1.4; resize: vertical; }
.form [aria-invalid=true] { border: 2px solid var(--danger); }
.form .button { margin-top: 1rem; }
.field-error { color: var(--danger); font-weight: 600; margin: 0.25rem 0 0; }
fieldset { border: 0; padding: 0; margin: 0.5rem 0 0; }
.check { display: grid; grid-template-columns: 48px 1fr; align-items: center; column-gap: 0.25rem; margin-top: 0.5rem; }
.check input { width: 24px; height: 24px; margin: 12px; }
.check label { margin: 0; font-weight: 600; }
.check .hint { grid-column: 2; margin: 0; }
.button-secondary, .button-danger {
  min-height: 48px; padding: 0.5rem 1rem; font: inherit; font-weight: 600; border-radius: 8px; cursor: pointer;
}
.button-secondary { color: var(--text); background: transparent; border: 1px solid var(--border); }
.button-danger { color: var(--accent-text); background: var(--danger); border: 0; }
.table-wrap { overflow-x: auto; margin: 1rem 0 2rem; }
table.users { width: 100%; border-collapse: collapse; background: var(--card); }
table.users caption { text-align: left; color: var(--muted); padding: 0 0 0.5rem; }
table.users th, table.users td { text-align: left; vertical-align: top; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); }
table.users a { display: inline-block; min-height: 32px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 1rem; }
.facts dt { font-weight: 600; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.preview { margin-top: 2rem; }
.signature {
  white-space: pre-wrap; font-family: inherit; font-size: 1.05rem; margin: 0; padding: 0.75rem 1rem;
  background: var(--card); border-left: 4px solid var(--stripe-info);
}
.danger-zone { margin-top: 2rem; border-top-color: var(--danger); }
input:focus-visible, textarea:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }

/* Admin-Bereich Teil 2 (ST-17-22 c, d): Übersicht und Integrationen. */
.form select, .form input[type=date] {
  box-sizing: border-box; width: 100%; min-height: 48px; padding: 0.6rem 0.75rem; font: inherit; font-size: 1.05rem;
  color: var(--text); background: var(--card); border: 1px solid var(--border); border-radius: 8px;
}
.counts { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 0 0 1rem; }
.counts a {
  display: inline-flex; align-items: baseline; gap: 0.4rem; min-height: 48px; padding: 0.5rem 0.75rem;
  background: var(--card); border: 1px solid var(--border); border-radius: 8px; text-decoration: none;
}
.count { font-size: 1.3rem; font-weight: 700; }
.status-list { padding-left: 1.25rem; }
.status-list li { margin: 0.25rem 0; }
.team-nav { flex-wrap: wrap; }
/* Freie Auswahl (ST-17-19): Marke, Zeitzone, Monatskalender, Zeiten. */
.brand { font-weight: 700; font-size: 1.1rem; color: var(--muted); margin: 0 0 0.75rem; letter-spacing: 0.02em; }
.zone { display: grid; gap: 0.5rem; margin-top: 1.5rem; }
.zone label { font-weight: 600; }
.zone select { min-height: 48px; font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 0 0.5rem; }
.month-nav { display: flex; justify-content: space-between; gap: 1rem; }
.month-nav a { display: inline-flex; align-items: center; min-height: 48px; font-weight: 600; }
table.month { width: 100%; border-collapse: collapse; table-layout: fixed; }
table.month caption { text-align: left; font-weight: 600; font-size: 1.1rem; padding: 0 0 0.5rem; }
table.month th { font-weight: 600; color: var(--muted); padding: 0.25rem 0; }
table.month abbr { text-decoration: none; }
table.month td { text-align: center; padding: 2px; }
table.month td a, table.month td span { display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 8px; }
table.month td.free a { font-weight: 700; background: var(--card-open); border: 1px solid var(--stripe-open); text-decoration: none; }
table.month td.free a[aria-current=date] { color: var(--accent-text); background: var(--accent); }
table.month td.busy span { color: var(--muted); }
.times fieldset { display: grid; gap: 0.25rem; }
.times legend { font-weight: 600; margin-bottom: 0.5rem; }
.time { display: grid; grid-template-columns: 48px 1fr; align-items: center; min-height: 48px; }
.time input { width: 24px; height: 24px; margin: 12px; }
.time label { font-size: 1.1rem; }
.times .button { margin-top: 1rem; }
select:focus-visible, input[type=radio]:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
