/* ACE Kiosk X Shop (Vorlage) – neutrales, mobiles Layout. Keine Markenfarben eines Mineralölunternehmens. */
:root {
  --bg: #f4f5f4;
  --surface: #ffffff;
  --surface-2: #eef1f0;
  --text: #17201e;
  --text-muted: #4f5b58;
  --border: #d3d9d7;
  --accent: #0f6b63;
  --accent-strong: #0a524c;
  --accent-contrast: #ffffff;
  --accent-soft: #dcefed;
  --warn: #8a4b00;
  --warn-soft: #fff1dc;
  --danger: #a32424;
  --danger-soft: #fde6e6;
  --ok: #1f6b2e;
  --ok-soft: #e2f3e5;
  --focus: #1b5fd1;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 1px 1px rgba(0, 0, 0, .04);
  --nav-h: 64px;
  --page-w: 640px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  color: var(--text);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111615;
    --surface: #1a2120;
    --surface-2: #232c2a;
    --text: #e8eeec;
    --text-muted: #a9b6b3;
    --border: #34403d;
    --accent: #4fb8ad;
    --accent-strong: #79cdc4;
    --accent-contrast: #06211e;
    --accent-soft: #163a36;
    --warn: #f3b766;
    --warn-soft: #3a2a12;
    --danger: #ff8f8f;
    --danger-soft: #3d1b1b;
    --ok: #8fd99c;
    --ok-soft: #173520;
    --focus: #8ab4ff;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}
.main:focus, h1:focus { outline: none; }

.skip-link {
  position: absolute; left: 8px; top: -60px;
  background: var(--surface); color: var(--text);
  padding: 10px 14px; border-radius: 8px; z-index: 100;
  border: 2px solid var(--focus);
}
.skip-link:focus { top: 8px; }

/* ------------------------------------------------------------ Kopfzeile */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top);
}
.topbar-inner, .site-bar {
  max-width: var(--page-w); margin: 0 auto;
  padding: 8px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.site-bar { padding-top: 0; flex-wrap: wrap; row-gap: 4px; }
.site-bar:empty { display: none; }
.brand { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 700; letter-spacing: .01em; white-space: nowrap; }
.brand-lines { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.brand-text { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.brand-sub { font-size: .8rem; font-weight: 500; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; }
.brand-sub:empty { display: none; }
.icon, .nav-icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-icon { width: 24px; height: 24px; }
.sound-btn .icon-sound-off, .sound-btn[aria-pressed="false"] .icon-sound-on { display: none; }
.sound-btn[aria-pressed="false"] .icon-sound-off { display: block; }
.brand-logo { height: 28px; width: auto; max-width: 110px; flex: none; object-fit: contain; }
.topbar-account { display: flex; align-items: center; gap: 8px; min-width: 0; }
.account-name {
  color: var(--text-muted); font-size: .85rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto;
}
.site-name { font-weight: 600; font-size: .95rem; }
.site-select-wrap { display: flex; align-items: center; gap: 8px; flex: 1 1 240px; min-width: 0; }
.site-select-wrap label { font-size: .85rem; color: var(--text-muted); white-space: nowrap; }
.site-select-wrap select { flex: 1; min-width: 0; }

/* ------------------------------------------------------------ Inhalt */
.main {
  max-width: var(--page-w); margin: 0 auto;
  padding: 16px 16px calc(var(--nav-h) + 32px + env(safe-area-inset-bottom));
}
h1 { font-size: 1.5rem; line-height: 1.2; margin: 4px 0 12px; }
h2 { font-size: 1.05rem; margin: 22px 0 8px; }
p { margin: 0 0 10px; }
.muted { color: var(--text-muted); }
.small { font-size: .875rem; }
.stack > * + * { margin-top: 10px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}
.notice {
  border-radius: var(--radius);
  padding: 12px 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: .9rem;
}
.notice-warn { background: var(--warn-soft); border-color: transparent; color: var(--text); }
.notice-ok { background: var(--ok-soft); border-color: transparent; }
.notice-error { background: var(--danger-soft); border-color: transparent; color: var(--text); }
.notice-accent { background: var(--accent-soft); border-color: transparent; }
.notice strong { display: block; margin-bottom: 2px; }

/* ------------------------------------------------------------ Buttons */
.btn {
  -webkit-appearance: none; appearance: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 10px 16px;
  border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--surface-2); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-small { min-height: 36px; padding: 6px 10px; font-size: .875rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row > .btn { flex: 1 1 140px; }

/* ------------------------------------------------------------ Formulare */
label, legend { font-weight: 600; }
.field { margin: 0 0 16px; border: 0; padding: 0; min-width: 0; }
.field > label, .field > legend { display: block; margin-bottom: 6px; }
.hint { font-size: .85rem; color: var(--text-muted); margin-top: 4px; font-weight: 400; }
input[type="text"], input[type="password"], input[type="datetime-local"], input[type="time"], select {
  width: 100%; min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text);
  font: inherit;
}
textarea {
  width: 100%; min-height: 88px; padding: 10px 12px; resize: vertical;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text); font: inherit; line-height: 1.4;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 0; }
.field-error { color: var(--danger); font-size: .875rem; margin-top: 6px; }
.choice-group { display: flex; flex-wrap: wrap; gap: 8px; }
.choice {
  position: relative; flex: 1 1 120px;
}
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice span {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 44px; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
  font-weight: 500;
}
.choice input:checked + span { background: var(--accent-soft); border-color: var(--accent); font-weight: 700; }
.choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.due-row { display: flex; gap: 8px; }
.due-row input { flex: 1; min-width: 0; }
.check {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
  font-weight: 500;
}
.check input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--accent); }

/* ------------------------------------------------------------ Filter */
.filters { display: flex; gap: 6px; margin: 4px 0 14px; flex-wrap: wrap; }
.filter-btn {
  min-height: 36px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-size: .875rem; cursor: pointer;
}
.filter-btn[aria-pressed="true"] { background: var(--text); color: var(--surface); border-color: var(--text); font-weight: 600; }

/* ------------------------------------------------------------ Aufgaben */
.task-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.task {
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--border);
  border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow);
  display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: start;
}
.task.is-overdue { border-left-color: var(--danger); }
.task.is-progress { border-left-color: var(--accent); }
.task.is-done { opacity: .8; }
.task-title { font-weight: 600; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
a.task-title:hover { text-decoration: underline; }
.task-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; font-size: .8rem; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-muted);
  white-space: nowrap;
}
.chip-lead { background: var(--warn-soft); color: var(--warn); }
.chip-team { background: var(--accent-soft); color: var(--accent-strong); }
.chip-overdue { background: var(--danger-soft); color: var(--danger); font-weight: 600; }
.chip-progress { background: var(--accent-soft); color: var(--accent-strong); }
.chip-done { background: var(--ok-soft); color: var(--ok); }
.task-action { white-space: nowrap; }
.done-form { grid-column: 1 / -1; margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--border); }
.done-form .field { margin-bottom: 10px; }
.empty { text-align: center; padding: 22px 12px; color: var(--text-muted); }
details.done-list summary {
  cursor: pointer; padding: 10px 0; font-weight: 600; min-height: 44px; display: flex; align-items: center;
}

/* ------------------------------------------------------------ Verlauf */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.timeline a.card { display: block; color: inherit; text-decoration: none; }
.timeline a.card:hover { border-color: var(--accent); }
.kv { display: grid; grid-template-columns: minmax(96px, auto) 1fr; gap: 4px 12px; margin: 0; font-size: .9rem; }
.kv dt { color: var(--text-muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.hash { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; }
.status-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.change-list { list-style: none; padding: 0; margin: 0; font-size: .85rem; display: grid; gap: 6px; }
.change-list li { border-left: 3px solid var(--border); padding-left: 8px; }

/* ------------------------------------------------------------ Zwischenstand */
.task-note {
  grid-column: 1 / -1; font-size: .85rem;
  border-left: 3px solid var(--accent); padding: 2px 0 2px 8px;
}
.task-note p { margin: 0; }
.task-note-meta { color: var(--text-muted); font-size: .8rem; }
.task-note-text {
  white-space: pre-line; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.task-heading { overflow-wrap: anywhere; }
.notes h2 { margin-top: 0; }
.note-form { margin: 12px 0 16px; }
.note-list { margin-top: 4px; }
.note-list li { border-left-color: var(--accent); }
.note-text { margin: 2px 0 0; white-space: pre-line; overflow-wrap: anywhere; font-size: .95rem; }

/* ------------------------------------------------------------ Navigation */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  background: var(--surface); border-top: 1px solid var(--border);
  display: flex; justify-content: center;
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav a {
  flex: 1; max-width: 214px; min-height: var(--nav-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--text-muted); text-decoration: none; font-weight: 600; font-size: .9rem; position: relative;
}
.bottom-nav a[aria-current="page"] { color: var(--accent-strong); box-shadow: inset 0 3px 0 var(--accent); }
.nav-badge {
  position: absolute; top: 8px; left: calc(50% + 22px);
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--text); color: var(--surface); font-size: .72rem; line-height: 20px; text-align: center;
}
.nav-badge-alert { background: var(--danger); color: #fff; }

/* ------------------------------------------------------------ Login */
.login { max-width: 420px; margin: 8vh auto 0; }
.login .brand { font-size: 1.35rem; margin-bottom: 18px; }
.login .brand-logo { height: 40px; max-width: 140px; }
.demo-accounts { font-size: .85rem; }
.demo-accounts code { font-size: .8rem; }

/* ------------------------------------------------------------ Toast */
.toast-region {
  position: fixed; left: 16px; right: 16px; bottom: calc(var(--nav-h) + 12px + env(safe-area-inset-bottom));
  z-index: 20; display: flex; justify-content: center; pointer-events: none;
}
.toast {
  max-width: 560px; background: var(--text); color: var(--surface);
  padding: 10px 14px; border-radius: 10px; box-shadow: 0 4px 14px rgba(0, 0, 0, .2); font-size: .9rem;
}
.noscript { padding: 16px; }

@media (prefers-reduced-motion: no-preference) {
  .toast { animation: toast-in .18s ease-out; }
  @keyframes toast-in { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* ------------------------------------------------------------ Erinnerungen */
.sound-btn[aria-pressed="false"] { color: var(--text-muted); }
.sound-hint, .alarm-bar:not(:empty) {
  max-width: var(--page-w); margin: 0 auto; padding: 8px 16px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.sound-hint { font-size: .9rem; background: var(--warn-soft); }
.sound-hint span { flex: 1 1 180px; }
.alarm-bar:not(:empty) { display: grid; gap: 8px; }
.alarm {
  border-radius: var(--radius); padding: 10px 12px;
  background: var(--warn-soft); border: 2px solid var(--warn);
}
.alarm strong { display: block; }
.alarm .btn-row { margin-top: 8px; }
.schedule-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.schedule { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }
.schedule.is-paused { opacity: .75; }
.schedule-title { font-weight: 600; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.schedule p { margin: 4px 0 0; }
.rule-section { margin-top: 4px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-2 .field { margin-bottom: 0; }
.weekday-group { display: flex; flex-wrap: wrap; gap: 6px; }
.weekday-group .choice { flex: 0 0 auto; }
.chip-plan { background: var(--surface-2); border: 1px dashed var(--border); }
.plain-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; }
.alarm a { font-weight: 600; color: var(--text); }

/* ------------------------------------------------------------ Bereiche */
.chip-area { background: var(--surface-2); color: var(--text); white-space: normal; overflow-wrap: anywhere; }
.area-filter { margin-top: 8px; }
.subnav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.subnav a {
  display: inline-flex; align-items: center; min-height: 36px; padding: 6px 12px;
  border: 1px solid var(--border); border-radius: 999px; color: var(--text); text-decoration: none; font-size: .875rem; font-weight: 600;
}
.subnav a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }
.area-item { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.area-item p { margin: 2px 0 0; }
.area-item .chip { margin-left: 6px; }
.area-item.is-paused strong { color: var(--text-muted); }
.staff-list > li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.staff-item .field { margin-bottom: 8px; }
.staff-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.staff-item.is-paused .staff-head strong { color: var(--text-muted); }
.chip-away { background: var(--surface-2); color: var(--text-muted); border: 1px dashed var(--border); }
.add-form { margin-top: 14px; }
.add-form > label { display: block; margin-bottom: 6px; }

/* ------------------------------------------------------------ Auswertung */
.stats-form { margin: 12px 0; }
.stats-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.stats-person p { margin: 6px 0 0; }
.stats-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stats-count { margin-left: auto; font-weight: 700; }
.stats-bar { height: 8px; border-radius: 999px; background: var(--surface-2); margin-top: 8px; overflow: hidden; }
.stats-bar span { display: block; height: 100%; width: 0; background: var(--accent); }
input[type="date"] { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; }

/* ------------------------------------------------------------ Einfachere Ansicht */
.task-group { margin-top: 4px; }
.task-group h2 { margin-bottom: 2px; }
.group-hint { margin: 0 0 8px; font-size: .85rem; color: var(--text-muted); }
.task-heading + .task-meta { margin: -4px 0 12px; }
.task-actions { margin: 8px 0 12px; }
.task-actions > .btn { min-height: 52px; font-size: 1rem; }
.action-panel:empty { display: none; }
.action-panel .card { margin-bottom: 12px; }
details.more { margin-top: 12px; }
details.more > summary {
  cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600;
  border-top: 1px solid var(--border);
}
details.more > .card, details.more > .change-list { margin-top: 8px; }
/* Namens-Buttons: groß genug zum Antippen auf dem Tablet. */
.name-picker legend { margin-bottom: 8px; }
.name-group .choice { flex: 1 1 140px; }
.name-group .choice span { min-height: 48px; }
.name-other { margin-top: 8px; }
.name-other input { width: 100%; }

/* ------------------------------------------------------------ Übersicht und Tablet */
/* Kopfzeile auf dem Handy: Konto-Buttons ohne Text-Umbruch, Ton nur als Symbol. */
@media (max-width: 420px) {
  .sound-btn .sound-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 12px; }
.summary-tile {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.summary-num { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.summary-label { font-size: .8rem; color: var(--text-muted); }
.summary-tile.is-alert { border-color: var(--danger); background: var(--danger-soft); }
.summary-tile.is-alert .summary-num { color: var(--danger); }
.task-groups { display: grid; gap: 0 20px; }
/* Schritte bei der Übergabe */
.step { margin-top: 18px; }
.step > h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-contrast); font-size: .9rem;
}
.step-meta { margin: -4px 0 8px; font-size: .9rem; color: var(--text-muted); }
/* Tablet hochkant: etwas breiter */
@media (min-width: 700px) {
  :root { --page-w: 720px; }
}
/* Tablet quer und größer: Bereiche nebeneinander */
@media (min-width: 960px) {
  :root { --page-w: 1040px; }
  .main:not([data-wide]) { max-width: 760px; }
  .task-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .summary { max-width: 640px; }
}

/* Vorführmodus */
.demo-login h2 { margin: 0 0 10px; }
.demo-login .choice-group > .btn { flex: 1 1 140px; min-height: 52px; }
.login details.more { margin: 12px 0; }

/* Übersicht (Admin) */
.ov-filter { max-width: 360px; }
.step h3 { font-size: 1rem; margin: 16px 0 8px; }
.handover-status { display: block; text-decoration: none; color: var(--text); margin: 0 0 8px; }
.log-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.log-row {
  display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px;
}
.log-time { font-weight: 700; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; }
.log-day { font-weight: 500; font-size: .75rem; color: var(--text-muted); }
.log-main { min-width: 0; display: grid; gap: 4px; }
@media (min-width: 960px) {
  .main[data-wide] .step { margin-top: 24px; }
  /* Tablet quer: links „Jetzt“, rechts „Erledigt“ */
  .ov-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; align-items: start; }
  .ov-columns .summary { max-width: none; }
  .ov-columns .task-groups { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------ Station und Schichten */
.chip-accent { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }
.shift-now { margin: -4px 0 12px; font-size: .9rem; color: var(--text-muted); }
.shift-list > li { padding: 12px 0; border-bottom: 1px solid var(--border); }
.shift-list > li:last-child { border-bottom: 0; }
.shift-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 8px; }
.shift-fields { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.shift-fields .field { margin-bottom: 8px; }
.shift-fields input { width: 100%; min-width: 0; }
.shift-form.is-paused .shift-head strong { color: var(--text-muted); }
@media (max-width: 420px) {
  .shift-fields { grid-template-columns: 1fr 1fr; }
  .shift-fields .field:first-child { grid-column: 1 / -1; }
}

/* ------------------------------------------------------------ Konten */
.account-list > li { padding: 12px 0; border-bottom: 1px solid var(--border); }
.account-list > li:last-child { border-bottom: 0; }
.account-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.account-head p { margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.account-head .btn-row { flex: 0 1 auto; }
.account-head .btn-row > .btn { flex: 0 0 auto; }
.account-item.is-paused strong { color: var(--text-muted); }
.chip-role-team { background: var(--accent-soft); color: var(--accent-strong); }
.chip-role-lead { background: var(--warn-soft); color: var(--warn); }
.chip-role-sysadmin { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.review-checks { border: 0; padding: 0; margin: 0; }
.review-checks legend { font-weight: 700; margin-bottom: 6px; }
.review-checks .check + .check { margin-top: 8px; }

/* ------------------------------------------------------------ Notizen für die nächste Schicht */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.notes-box { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.notes-box > summary {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
  min-height: 44px; padding: 10px 14px; cursor: pointer; font-weight: 700; list-style: none;
}
.notes-box > summary::-webkit-details-marker { display: none; }
.notes-box > summary::before {
  content: ""; width: 8px; height: 8px; margin-right: 6px; flex: none;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s;
}
.notes-box[open] > summary::before { transform: rotate(45deg); }
.notes-box > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 10px; }
.notes-box > .field, .notes-box > .note-text { padding: 0 14px 12px; margin: 0; }
.notes-box textarea { width: 100%; }
.notes-counter { float: right; }
.notes-view { border-color: var(--accent); background: var(--accent-soft); margin: 12px 0; }
.notice .notes-view { margin: 8px 0; background: var(--surface); }

/* ------------------------------------------------------------ Bereiche (Schritt 3) */
.group-desc { margin: -2px 0 2px; font-size: .85rem; color: var(--text); }
.chip-sub { background: var(--warn-soft); color: var(--warn); font-weight: 600; }
.area-row { display: flex; align-items: flex-start; gap: 10px; width: 100%; }
.area-order { display: flex; flex-direction: column; gap: 4px; flex: none; }
.btn-icon { min-width: 36px; min-height: 36px; padding: 0; font-size: 1rem; line-height: 1; }
.btn-icon:disabled { opacity: .35; }
.area-details { flex: 1; min-width: 0; }
.area-details > summary { display: flex; flex-direction: column; gap: 2px; cursor: pointer; list-style: none; padding: 2px 0; }
.area-details > summary::-webkit-details-marker { display: none; }
.area-details > summary strong::after { content: " ▸"; color: var(--text-muted); font-weight: 400; }
.area-details[open] > summary strong::after { content: " ▾"; }
.area-details > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
.area-desc { overflow-wrap: anywhere; }
.area-edit { margin-top: 10px; }
.area-edit input, .area-edit select { width: 100%; }
@media (max-width: 520px) {
  .area-row { flex-wrap: wrap; }
  .area-details { flex-basis: calc(100% - 46px); }
  .area-row > .btn { margin-left: 46px; }
  .staff-item .area-row > .btn { margin-left: 0; }
}

/* Einrichtungs-Checkliste (Admin-Übersicht) */
.setup { margin-bottom: 16px; }
.setup h2 { margin-top: 0; }
.setup-list > li { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.setup-list > li:last-child { border-bottom: 0; }
.setup-mark { flex: 0 0 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border); display: grid; place-items: center; font-weight: 700; }
.setup-step.is-done .setup-mark { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.setup-step.is-done .setup-body a { color: var(--text-muted); }
.setup-body { flex: 1; min-width: 0; }
.setup-body p { margin: 2px 0 0; }
.setup-body a { font-weight: 600; }

/* Link zum Datenschutzhinweis am Ende jeder Seite */
.app-footer { margin: 32px 0 0; text-align: center; }
.app-footer a { color: var(--text-muted); }
