/*
  Glass — das einzige Erscheinungsbild (FA-20). Werte aus der Verfassung; Hell auf :root,
  Dunkel über data-theme="dark" bzw. data-theme="system" mit dunklem Gerät (FA-21, research E9).
  Keine Schriften, Bilder oder Bibliotheken aus dem Netz (FA-41).
*/

:root {
  --bg: #f2f2f7;
  --surface: #ffffff;
  --text: #1c1c1e;
  --divider: rgba(60, 60, 67, 0.18);
  --accent: #1d6b45;
  --accent-600: #17583a;
  --accent-700: #175c3b;
  --late: #d70015;
  --seg-on: #c7c7cc;
  --grey-btn: #e5e5ea;
  --grey-btn-h: #d8d8de;
  --neutral-200: #e2e2e7;
  --on-accent: #ffffff;

  --muted: color-mix(in srgb, var(--text) 60%, transparent);
  --r-btn: 999px;
  --r-card: 14px;
  --r-sm: 6px;
  --r-in: 10px;
  --r-seg: 10px;
  --r-seg-in: 8px;
  --r-sheet: 22px;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --font-heading: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  --glass-bg: color-mix(in srgb, var(--surface) 66%, transparent);
  --glass-blur: blur(22px) saturate(180%);
  --side-bg: color-mix(in srgb, var(--surface) 55%, transparent);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #000000;
  --surface: #1c1c1e;
  --text: #f5f5f7;
  --divider: rgba(120, 120, 128, 0.38);
  --accent: #2f8a5c;
  --accent-600: #38a06b;
  --accent-700: #7cd3a1;
  --late: #ff6961;
  --seg-on: #636366;
  --grey-btn: #2c2c2e;
  --grey-btn-h: #3a3a3c;
  --neutral-200: #101012;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    --bg: #000000;
    --surface: #1c1c1e;
    --text: #f5f5f7;
    --divider: rgba(120, 120, 128, 0.38);
    --accent: #2f8a5c;
    --accent-600: #38a06b;
    --accent-700: #7cd3a1;
    --late: #ff6961;
    --seg-on: #636366;
    --grey-btn: #2c2c2e;
    --grey-btn-h: #3a3a3c;
    --neutral-200: #101012;
    color-scheme: dark;
  }
}

/* Grundlagen */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.4;
}
h1, h2, h3 { font-family: var(--font-heading); font-weight: 700; margin: 0; }
/* FocusOnNavigate setzt den Fokus nach jedem Seitenwechsel auf die h1 — für Screenreader, ohne Rahmen (#42). */
h1:focus { outline: none; }
a { color: var(--accent); text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
input::placeholder, textarea::placeholder { color: var(--muted); }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.note { color: var(--muted); font-size: 13px; margin-top: 24px; }
.empty { color: var(--muted); padding: 14px 16px; background: var(--surface); border-radius: var(--r-card); }
.stack { display: flex; flex-direction: column; gap: 10px; }
.large-title { font-size: 34px; margin: 4px 0 12px; }
.form-error { color: var(--late); margin: 0; font-size: 14px; }
.kicker { display: block; color: var(--accent-700); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 6px; }

/* Eingaben und Knöpfe */
.field {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--r-in);
}
.field:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border: 0;
  border-radius: var(--r-btn);
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-600); }
.btn-grey { background: var(--grey-btn); color: var(--text); }
.btn-grey:hover { background: var(--grey-btn-h); }
.icon-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid var(--divider);
  border-radius: var(--r-btn);
  background: var(--glass-bg);
  color: var(--text);
}
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); margin: 16px 0; font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--divider); }

/* Segmentschalter */
.segments {
  display: flex;
  gap: 2px;
  padding: 2px;
  background: color-mix(in srgb, var(--text) 7%, transparent);
  border-radius: var(--r-seg);
}
.segments button {
  flex: 1;
  min-height: 36px;
  border: 0;
  background: transparent;
  border-radius: var(--r-seg-in);
  font-weight: 500;
  cursor: pointer;
}
.segments button[aria-pressed="true"] { background: var(--seg-on); font-weight: 700; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }

/* Gruppierte Liste */
.group {
  background: var(--surface);
  border-radius: var(--r-card);
  padding: 4px 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.section-title { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 24px 0 8px; font-weight: 600; }

/* Person */
.avatar {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; flex: none;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 13px; font-weight: 700;
}
.avatar-large { width: 52px; height: 52px; font-size: 18px; }
.person-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.person-main { flex: 1; min-width: 0; }
.person-name { font-weight: 700; overflow-wrap: anywhere; }
.inline-edit { display: flex; gap: 8px; }
.inline-edit .field { flex: 1; min-width: 0; }
.link-list { margin-top: 16px; padding: 0 16px; }
.link-row { display: flex; align-items: center; justify-content: space-between; min-height: 48px; color: var(--text); }
.link-row + .link-row { border-top: 1px solid var(--divider); }
.link-row svg { color: var(--muted); width: 18px; height: 18px; }
.logout { margin-top: 32px; }

/* Anmeldeseiten (FR-002): Bildfläche am Telefon oben, breit links 46 % */
.account { min-height: 100vh; display: flex; flex-direction: column; }
.account-poster {
  flex: 0 0 210px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 6px;
  padding: 24px;
  margin: 12px 12px 0;
  border-radius: 28px;
  background: linear-gradient(160deg, var(--accent), var(--accent-600));
  color: var(--on-accent);
}
.account-kicker { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.85; }
.account-title { font-family: var(--font-heading); font-size: 44px; font-weight: 700; line-height: 1.05; hyphens: manual; }
.account-panel { flex: 1; padding: 24px; max-width: 460px; width: 100%; }
.account-panel h1 { font-size: 28px; margin-bottom: 6px; }
.account-panel .muted { margin: 0 0 16px; }
.account-panel .btn { width: 100%; }

/* Gerüst (FA-22): eine Grenze bei 768 px */
.shell { min-height: 100vh; }
.content { padding: 12px 20px 160px; max-width: 820px; }
.sidebar { display: none; }
.phone-only { display: inline-flex; }
.page-top { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.page-top-actions { gap: 8px; align-items: center; }
.date-line { color: var(--muted); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.avatar-link { color: var(--on-accent); }
.back-link { align-items: center; gap: 2px; min-height: 44px; font-weight: 500; }
.back-link svg { width: 20px; height: 20px; }

.tabbar {
  position: fixed;
  left: 14px; right: 14px; bottom: 20px;
  height: 64px;
  padding: 5px;
  display: flex;
  gap: 2px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-radius: 32px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16), inset 0 0 0 0.5px rgba(255, 255, 255, 0.4);
  z-index: 20;
}
.tab {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  margin: 0 2px;
  border-radius: 27px;
  color: var(--text);
  font-size: 11px; font-weight: 600;
}
.tab.active { color: var(--accent); background: color-mix(in srgb, var(--text) 9%, transparent); }

/* Meldung (FR-020): am Telefon über der Tab-Leiste */
.toast {
  position: fixed;
  left: 14px; right: 14px; bottom: 98px;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--text);
  color: var(--bg);
  border-radius: var(--r-card);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  z-index: 50;
}
.toast-text { flex: 1; }
.toast-undo { border: 0; background: transparent; color: var(--bg); font-weight: 700; cursor: pointer; padding: 6px; }

/* Blatt (FR-019): am Telefon von unten */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.32); z-index: 30; }
.sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0; top: 40px;
  display: flex; flex-direction: column;
  background: var(--bg);
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  z-index: 40;
  overflow: hidden;
}
.sheet-head {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--divider);
}
.sheet-cancel { justify-self: start; border: 0; background: transparent; color: var(--accent); font-weight: 500; cursor: pointer; min-height: 44px; }
.sheet-title { font-weight: 700; text-align: center; }
.sheet-primary { justify-self: end; min-height: 36px; padding: 6px 16px; }
.sheet-primary:disabled { opacity: 0.45; cursor: default; }
.sheet-body { flex: 1; overflow: auto; padding: 16px; }

@media (min-width: 768px) {
  .toast { left: auto; right: 24px; bottom: 24px; width: 380px; }
  .sheet { left: 50%; top: 50%; right: auto; bottom: auto; width: 560px; max-height: 90%; transform: translate(-50%, -50%); border-radius: var(--r-sheet); }
  .account { flex-direction: row; }
  /* Titel und Innenabstand wachsen mit der Breite: Bei festen 64 px machte das Wort „management“
     die Bildfläche am Tablet hochkant breiter als 46 % und ließ dem Formular rund 120 px (#75). */
  .account-poster { flex: 0 0 46%; margin: 12px; padding: 48px clamp(28px, 4vw, 56px); }
  .account-title { font-size: clamp(40px, 5.5vw, 64px); }
  .account-panel { align-self: center; padding: 48px clamp(28px, 4vw, 56px); }

  .shell { display: flex; }
  .tabbar, .phone-only { display: none; }
  .sidebar {
    display: flex; flex-direction: column;
    position: sticky; top: 0;
    width: 260px; height: 100vh; flex: none;
    padding: 20px 12px;
    background: var(--side-bg);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--divider);
  }
  .sidebar-title { font-family: var(--font-heading); font-weight: 700; font-size: 17px; padding: 4px 10px 16px; }
  .sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
  .nav-item { padding: 8px 10px; border-radius: 8px; color: var(--text); font-weight: 500; }
  .nav-item.active { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent-700); font-weight: 600; }
  .sidebar-section { display: block; margin-top: 20px; padding: 6px 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); border-radius: 8px; }
  .sidebar-section.active { color: var(--accent-700); }
  .sidebar-empty { margin: 0; padding: 4px 10px; font-size: 13px; color: var(--muted); }
  .sidebar-person { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 8px 10px; color: var(--text); border-radius: 10px; }
  .sidebar-person:hover { background: color-mix(in srgb, var(--text) 5%, transparent); }
  .sidebar-person-text { display: flex; flex-direction: column; min-width: 0; }
  .sidebar-person-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sidebar-person-sub { font-size: 12px; color: var(--muted); }
  .content { flex: 1; padding: 16px 32px 40px; }
  .large-title { font-size: 30px; }
}

/* ---- 002 Bereiche und Projekte ---- */

/* Kürzel-Marke in der Bereichsfarbe (FA-12): heller Farbton, dunkle Schrift für Kontrast */
.area-badge {
  display: inline-grid; place-items: center;
  min-width: 34px; height: 22px; padding: 0 6px; flex: none;
  border-radius: var(--r-sm);
  background: oklch(0.74 0.14 var(--hue));
  color: #111;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
}
.area-badge-large { min-width: 52px; height: 34px; font-size: 15px; border-radius: 9px; }

.btn-small { min-height: 34px; padding: 6px 14px; font-size: 14px; }
.btn-danger { background: var(--late); color: #fff; }
.btn-danger-text { background: transparent; color: var(--late); padding-left: 0; padding-right: 0; justify-content: flex-start; }
.field-label { font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 6px; }
.field-label-row { display: flex; align-items: baseline; justify-content: space-between; margin-top: 6px; }
.area-code-input { text-transform: uppercase; }
.area-code-input::placeholder { text-transform: none; }

.phone-profile { width: 100%; margin: 4px 0 8px; }

/* Leerer Zustand auf Heute (US1/AC1) */
.empty-state { background: var(--surface); border-radius: var(--r-card); padding: 20px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.empty-state-title { font-size: 20px; }
.empty-state .muted { margin: 0 0 6px; }

/* Bereiche (FR-010) */
.area-list { padding: 0 16px; }
.area-row { display: flex; align-items: center; gap: 12px; min-height: 60px; color: var(--text); }
.area-row + .area-row { border-top: 1px solid var(--divider); }
.area-row svg { color: var(--muted); width: 18px; height: 18px; margin-left: auto; flex: none; }
.area-row-text { display: flex; flex-direction: column; min-width: 0; }
.area-row-name { font-weight: 600; overflow-wrap: anywhere; }
.add-area { width: 100%; margin-top: 12px; }
.trash-link { color: var(--text); }

/* Bereichsansicht (FR-012, FR-016) */
.area-head {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 20px;
  border-radius: var(--r-sheet);
  background: linear-gradient(140deg, oklch(0.80 0.12 var(--hue)), oklch(0.68 0.14 var(--hue)));
  color: #111;
  margin: 4px 0 14px;
}
.area-head-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.area-head-code { font-family: var(--font-heading); font-size: 34px; font-weight: 800; letter-spacing: 0.02em; line-height: 1.05; }
.area-head-name { font-size: 18px; overflow-wrap: anywhere; }
.area-head-line { font-size: 13px; opacity: 0.75; }
.area-head .icon-btn { background: rgba(255, 255, 255, 0.55); border-color: rgba(0, 0, 0, 0.08); color: #111; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 34px; padding: 6px 14px;
  border: 1px solid var(--divider); border-radius: var(--r-btn);
  background: var(--surface); cursor: pointer; font-weight: 500;
  max-width: 100%; overflow-wrap: anywhere;
}
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip svg { width: 16px; height: 16px; }
.chip-add { color: var(--accent); }

.project-section { margin-bottom: 18px; }
.project-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.project-title { flex: 1; min-width: 0; text-align: left; border: 0; background: transparent; padding: 4px 0; font-family: var(--font-heading); font-size: 20px; font-weight: 700; cursor: pointer; overflow-wrap: anywhere; }
.project-head .icon-btn { width: 32px; height: 32px; }
.project-head .icon-btn svg { width: 18px; height: 18px; }

/* Blätter Bereich und Projekt */
.hue-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.hue-presets { display: grid; grid-template-columns: repeat(5, 32px); gap: 10px; }
.hue-dot {
  width: 32px; height: 32px; border-radius: 50%;
  border: 0; cursor: pointer;
  background: oklch(0.74 0.14 var(--hue));
}
.hue-dot[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text); }
.hue-wheel {
  position: relative; flex: none;
  width: 128px; height: 128px; border-radius: 50%;
  background: conic-gradient(from 0deg,
    oklch(0.74 0.14 0), oklch(0.74 0.14 45), oklch(0.74 0.14 90), oklch(0.74 0.14 135), oklch(0.74 0.14 180),
    oklch(0.74 0.14 225), oklch(0.74 0.14 270), oklch(0.74 0.14 315), oklch(0.74 0.14 360));
  touch-action: none; cursor: pointer;
}
.hue-wheel::before { content: ""; position: absolute; inset: 30px; border-radius: 50%; background: var(--bg); }
.hue-wheel-handle { position: absolute; inset: 0; pointer-events: none; }
.hue-wheel-handle::after {
  content: ""; position: absolute; left: 50%; top: 3px;
  width: 22px; height: 22px; margin-left: -11px; border-radius: 50%;
  background: oklch(0.74 0.14 var(--hue));
  border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.area-preview { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.area-preview-text { min-width: 0; }
.sheet-context { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.sheet-context-name { color: var(--text); font-weight: 600; }
.confirm { background: var(--surface); border-radius: var(--r-card); padding: 16px; }
.confirm p { margin: 0 0 12px; }
.confirm-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* Papierkorb (US7) */
.trash-list { padding: 0 16px; }
.trash-row { display: flex; gap: 12px; padding: 12px 0; align-items: flex-start; }
.trash-row + .trash-row { border-top: 1px solid var(--divider); }
.trash-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.trash-title { font-weight: 600; overflow-wrap: anywhere; }
.trash-kind { font-weight: 500; }
.trash-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }

/* Administration (Feature 008, contracts/routes.md) */
.admin-intro { margin: 0 0 16px; }
.admin-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat { background: var(--surface); border-radius: var(--r-card); padding: 14px 16px; min-width: 0; }
.stat-num { font-family: var(--font-heading); font-size: 26px; font-weight: 700; line-height: 1.1; }
.stat-label { font-size: 13px; font-weight: 700; margin-top: 2px; }
.stat-sub { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.admin-users-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.admin-users-head .section-title { margin-bottom: 8px; }
.admin-create { margin-bottom: 6px; }
.admin-users { padding: 0 16px; }
.admin-row { padding: 12px 0; }
.admin-row + .admin-row { border-top: 1px solid var(--divider); }
.admin-row-top { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.admin-row .avatar { width: 36px; height: 36px; font-size: 12px; }
.admin-main { min-width: 0; }
.admin-name { font-weight: 700; overflow-wrap: anywhere; }
.admin-super { font-size: 12px; font-weight: 600; color: var(--accent-700); margin-left: 4px; }
.admin-line { overflow-wrap: anywhere; }
@media (min-width: 768px) { .admin-line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }
.admin-status { padding: 3px 9px; border-radius: 6px; font-size: 11px; font-weight: 700; white-space: nowrap; background: var(--seg-on); }
.admin-status-pendingapproval { background: color-mix(in srgb, var(--accent) 24%, transparent); }
.admin-status-blocked, .admin-status-deleted { background: color-mix(in srgb, var(--text) 14%, transparent); }
.admin-storage { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; margin: 8px 0 0 48px; }
.admin-storage-text { font-size: 12px; font-weight: 600; white-space: nowrap; }
.bar { height: 6px; border-radius: 6px; background: color-mix(in srgb, var(--text) 7%, transparent); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 6px; background: var(--text); }
.bar-fill.late { background: var(--late); }
.admin-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0 48px; }
.admin-row .confirm { margin: 10px 0 0 48px; }
.admin-tables { padding: 0 16px; }
.admin-table { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 0; }
.admin-table + .admin-table { border-top: 1px solid var(--divider); }
.admin-table code { font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.admin-table-text { font-size: 12px; color: var(--muted); white-space: nowrap; }
.admin-db-line { margin-top: 8px; }
.otp { align-items: flex-start; }
.otp-for { margin: 0; font-weight: 600; }
.otp-value { font-size: 22px; letter-spacing: 0.04em; padding: 12px 14px; background: var(--surface); border-radius: var(--r-card); user-select: all; }
.otp-hint { margin: 0; }

@media (min-width: 768px) {
  .sidebar { overflow-y: auto; }
  .sidebar-heading { margin-top: 20px; padding: 6px 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
  .sidebar-profile { margin: 0 4px; }
  .sidebar-areas { display: flex; flex-direction: column; gap: 2px; }
  .side-area { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; color: var(--text); font-weight: 500; }
  .side-area.active { background: color-mix(in srgb, var(--accent) 12%, transparent); }
  .side-area-name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .side-project { display: block; padding: 4px 10px 4px 52px; border-radius: 8px; color: var(--text); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .side-project.active { color: var(--accent-700); font-weight: 600; }
  .side-add { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border: 0; background: transparent; color: var(--accent); font-weight: 500; cursor: pointer; text-align: left; }
  .side-add svg { width: 18px; height: 18px; }
}

/* ---- 003 Aufgaben und Heute ---- */

.wide-only { display: none; }
.greeting { margin: -6px 0 16px; font-size: 15px; }
textarea.field { resize: vertical; min-height: 64px; }

/* Kennzahlen (FR-016) */
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.kpi { display: flex; flex-direction: column; padding: 12px 14px; background: var(--surface); border-radius: var(--r-card); color: var(--text); }
.kpi-value { font-size: 28px; font-weight: 700; line-height: 1.1; }
.kpi-overdue .kpi-value { color: var(--late); }
.kpi-label { font-size: 12px; color: var(--muted); }

/* Abschnitte */
.task-section { margin-top: 22px; }
.task-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding-bottom: 6px; margin-bottom: 8px; border-bottom: 1px solid var(--divider); }
.task-section-head h2 { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700; }
.task-section-head .late, .late { color: var(--late); }
.task-section-count { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.task-list { padding: 0; overflow: hidden; }

/* Aufgabenzeile (FR-012 bis FR-015) */
.task { border-bottom: 1px solid var(--divider); }
.task-swipe { position: relative; overflow: hidden; }
.task:last-child { border-bottom: 0; }
.task-swipe-under {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: space-between; padding: 0 20px;
  font-size: 13px; font-weight: 700; color: #fff; background: transparent;
}
.task-swipe-under span { opacity: 0; }
.task[data-swipe-dir="done"] .task-swipe-under { background: var(--accent); }
.task[data-swipe-dir="done"] .task-swipe-done { opacity: var(--swipe, 0); }
.task[data-swipe-dir="later"] .task-swipe-under { background: var(--text); color: var(--bg); }
.task[data-swipe-dir="later"] .task-swipe-later { opacity: var(--swipe, 0); }
.task-main {
  position: relative;
  display: grid; grid-template-columns: auto minmax(0, 1fr) 48px; align-items: start; gap: 12px;
  min-height: 68px; padding: 12px 0 12px 14px;
  background: var(--surface);
  transition: transform 0.2s ease;
  touch-action: pan-y; user-select: none; cursor: pointer;
}
.task-selected .task-main { background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
.task-badge { margin-top: 2px; }
.task-title { font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 10px; margin-top: 4px; font-size: 12px; color: var(--muted); }
.task-due { font-weight: 700; }
.task-due.late { color: var(--late); }
.task-owner { padding: 0 5px; border: 1px solid var(--divider); border-radius: var(--r-btn); font-size: 10px; font-weight: 700; color: var(--text); }
.task-prio { display: inline-flex; align-items: center; gap: 5px; }
.prio-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 10px; }
.prio-bars i { width: 4px; border-radius: 1px; background: var(--divider); }
.prio-bars i:nth-child(1) { height: 4px; }
.prio-bars i:nth-child(2) { height: 7px; }
.prio-bars i:nth-child(3) { height: 10px; }
.prio-0 .prio-bars i:nth-child(1), .prio-1 .prio-bars i:nth-child(-n+2), .prio-2 .prio-bars i { background: var(--text); }
.task-done .task-title { text-decoration: line-through; }
.task-done .task-title, .task-done .task-badge { opacity: 0.45; }
.task-check {
  justify-self: center; align-self: center;
  width: 26px; height: 26px; padding: 0;
  display: grid; place-items: center;
  border: 2px solid var(--text); border-radius: 50%;
  background: transparent; color: #fff; cursor: pointer;
}
.task-check svg { width: 14px; height: 14px; stroke-width: 3.5; }
.task-check[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); }
.task-check:disabled { opacity: 0.35; cursor: default; }
.show-done { display: block; width: 100%; padding: 10px 14px; border: 0; border-top: 1px solid var(--divider); background: var(--surface); color: var(--accent); font-weight: 600; text-align: left; cursor: pointer; }

/* Projektabschnitt in der Bereichsansicht */
.project-head .task-section-count { margin-left: auto; }
.add-task { min-height: 30px; padding: 4px 10px; font-size: 12px; }
.area-row-open { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.area-row-open + svg { margin-left: 8px; }

/* Detailansicht (US4) */
.task-detail { display: flex; flex-direction: column; gap: 6px; }
.detail-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.detail-path { font-size: 13px; color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
.detail-flag { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: var(--r-btn); background: var(--grey-btn); }
.detail-flag.late { color: var(--late); }
.detail-actions { margin-left: auto; display: flex; gap: 6px; }
.detail-title { font-size: 24px; margin-top: 6px; overflow-wrap: anywhere; }
.detail-desc { margin: 0; color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }
.detail-assignee { margin: 4px 0 6px; }
.detail-assignee b { color: var(--text); }
.detail-noaccess { color: var(--late); }
.detail-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.tile { padding: 12px 14px; background: var(--surface); border-radius: var(--r-card); }
.tile-label { font-size: 12px; color: var(--muted); }
.tile-value { font-size: 17px; font-weight: 700; margin-top: 2px; }
.tile-note { font-size: 11px; color: var(--muted); font-weight: 600; }
.detail-due.late .tile-value, .detail-due.late .tile-note { color: var(--late); }
.progress-input { margin-top: 4px; }
.progress-hint { margin: 2px 0 0; }
.activity { margin-top: 10px; padding: 4px 16px; }
.activity-row { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 8px; padding: 9px 0; font-size: 14px; overflow-wrap: anywhere; }
.activity-row + .activity-row { border-top: 1px solid var(--divider); }
.activity-date { font-weight: 700; color: var(--muted); }
.activity-toggle { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 6px 0; border: 0; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.activity-toggle svg { width: 16px; height: 16px; stroke-width: 2; transition: transform 0.2s ease; }
.activity-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.activity-log { margin-top: 4px; }
.detail-empty { color: var(--muted); padding: 32px 8px; }
.back-button { border: 0; background: transparent; color: var(--accent); font-size: 16px; cursor: pointer; padding: 0; }

/* Breit: Liste und Detailansicht (FR-021); am Telefon nur die Liste */
.split-detail { display: none; }

/* Blatt „Neue Aufgabe" */
.chip-area { padding: 4px 6px; }
.chip-area[aria-pressed="true"] { background: var(--surface); border-color: var(--text); box-shadow: 0 0 0 1px var(--text); color: var(--text); }
.sheet-due-long { font-weight: 700; font-size: 14px; }
.sheet-quick .chip { min-height: 30px; padding: 4px 12px; font-size: 13px; }

/* Monatskalender (FA-26) */
.calendar { background: var(--surface); border-radius: var(--r-card); padding: 10px 12px; }
.calendar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.calendar-head .icon-btn { width: 32px; height: 32px; }
.calendar-head .icon-btn svg { width: 16px; height: 16px; }
.calendar-month { font-weight: 700; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; text-align: center; }
.calendar-weekday { font-size: 11px; font-weight: 600; color: var(--muted); padding: 4px 0; }
.calendar-day { justify-self: center; width: 100%; max-width: 38px; aspect-ratio: 1; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; font-weight: 500; }
.calendar-day.muted-day { color: var(--muted); }
.calendar-day[aria-disabled="true"] { cursor: default; }
/* 011 Frage 14: Tage nach Max blasser als gedämpft und durchgestrichen, damit es nicht allein an der Farbe hängt. */
.calendar-day.blocked-day { color: var(--muted); opacity: 0.5; text-decoration: line-through; }
.calendar-day.today { box-shadow: inset 0 0 0 2px var(--text); }
.calendar-day[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.calendar-day.in-range { background: color-mix(in srgb, var(--accent) 16%, transparent); border-radius: var(--r-btn); }

/* Runder Knopf „+" am Telefon (FA-22) */
.fab {
  position: fixed; right: 22px; bottom: 96px; z-index: 25;
  width: 56px; height: 56px; padding: 0;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: var(--accent); color: var(--on-accent);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  cursor: pointer;
}
.fab svg { width: 26px; height: 26px; stroke-width: 2.4; }

/* Liste und Detailansicht nebeneinander erst ab 1100 px (Tablet quer, PC); schmaler wie am Telefon. */
@media (min-width: 1100px) {
  .content:has(> .split > .split-detail) { max-width: none; }
  .split:has(> .split-detail) { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 28px; align-items: start; }
  .split-detail { display: block; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; padding: 4px 4px 24px; }
}

@media (min-width: 768px) {
  .wide-only { display: inline-flex; }
  .new-task { gap: 8px; min-height: 36px; padding: 6px 14px; font-size: 14px; }
  .new-task svg { width: 16px; height: 16px; }
  .fab { display: none; }
  .side-area, .side-project { display: flex; align-items: center; gap: 8px; }
  .side-project { padding-left: 52px; }
  .side-project-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .side-count { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted); }
}
.task-owner.task-noaccess { color: var(--late); border-color: currentColor; }

/* 004 — Zwischenschritte und Zuarbeit */
.nav-waiting { display: flex; align-items: center; gap: 8px; }
.accent { color: var(--accent-700); }

/* Fortschrittszellen (US4/AC4, FR-022) */
.cells { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; margin-top: 8px; }
.cell { height: 6px; border-radius: 1px; background: color-mix(in srgb, var(--text) 12%, transparent); }
.cell-on { background: var(--text); }
.cell-soon { background: var(--accent); }
.cell-late { background: var(--late); }

/* Zwischenschritte in der Detailansicht (FR-013) */
.steps-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.steps-summary { font-size: 12px; font-weight: 600; color: var(--muted); }
.steps { padding: 4px 16px; }
.step { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; padding: 12px 0; }
.step + .step { border-top: 1px solid var(--divider); }
.step-number {
  width: 30px; height: 30px; display: grid; place-items: center;
  border: 2px solid var(--text); border-radius: 50%;
  font-size: 12px; font-weight: 700;
}
.step-number.number-done { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.step-number.number-blocked { border-style: dashed; border-color: var(--divider); }
.step-body { min-width: 0; }
.step-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.step-title { font-size: 15px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.step-done .step-title { color: var(--muted); }
.step-state { font-size: 12px; font-weight: 700; white-space: nowrap; }
.step-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 3px; font-size: 12px; color: var(--muted); }
.step-parts { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
/* 011 research E5: Haken und Datum sind zwei Knöpfe in einer Zeile; die Zeile trägt Rahmen und Hintergrund
   (Rahmen als Schatten nach innen, damit die Knöpfe ihre 44px behalten, G4.1).
   G3.1: Reicht der Platz neben dem Namen nicht, rückt das Datum rechtsbündig in die nächste Zeile.
   G4.1: Zwischen Haken und Datum liegen 8px, die nichts auslösen — nebeneinander wie nach dem Umbruch. */
.step-line {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  border-radius: var(--r-in); box-shadow: inset 0 0 0 1px var(--divider);
}
.step-self-line { margin-top: 8px; }
.step-line.line-done { background: var(--seg-on); }
.step-line.line-off, .step-tick.tick-off { opacity: 0.5; }
.step-tick {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px;
  flex: 1 0 auto; max-width: 100%;
  min-height: 44px; padding: 6px 10px;
  border: 0; border-radius: var(--r-in);
  background: transparent; text-align: left; cursor: pointer;
}
.step-tick:disabled { cursor: default; }
/* Das Datum zum Antippen: gestrichelt unterstrichen, damit es antippbar aussieht (G4.2). */
.step-date {
  flex: none; min-width: 44px; min-height: 44px; padding: 0 10px;
  border: 0; border-radius: var(--r-in); background: transparent; cursor: pointer;
  text-decoration: underline dotted; text-underline-offset: 3px;
}
.step-check {
  width: 22px; height: 22px; flex: none; display: grid; place-items: center;
  border: 2px solid var(--text); border-radius: 50%; color: var(--on-accent);
}
.step-check svg { width: 11px; height: 11px; stroke-width: 4; }
[aria-pressed="true"] > .step-check { background: var(--accent); border-color: var(--accent); }
/* Name höchstens so breit wie die Zeile neben dem Kreis (22px + 10px Abstand): bleibt neben dem Kreis
   und bricht zwischen Wörtern; ein Wort nur, wenn es allein nicht in die Zeile passt. */
.step-part-name { flex: 1 0 auto; max-width: calc(100% - 32px); font-size: 13px; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.step-part-state { font-size: 12px; margin-left: auto; white-space: nowrap; }
.step-all { margin-top: 8px; min-height: 34px; padding: 6px 14px; font-size: 13px; }
.step-day { margin-top: 3px; }
.step-edit { width: 32px; height: 32px; }
.step-edit svg { width: 16px; height: 16px; }
/* Umsortieren (004 US9, FR-023): Griff links, ↑/↓ unter dem Stift. */
.steps.sortable .step { grid-template-columns: 14px 32px minmax(0, 1fr) auto; gap: 10px; }
.step-tools { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.step-move { width: 32px; height: 28px; }
.step-move svg { width: 14px; height: 14px; }
.step-move:disabled { opacity: 0.35; cursor: default; }
.step-grip {
  display: grid; place-items: center; align-self: start; height: 32px;
  color: var(--muted); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
}
.step-grip svg { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.step.step-dragging { position: relative; z-index: 2; background: var(--glass-bg); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14); border-radius: 12px; cursor: grabbing; }
.steps.sorting .step:not(.step-dragging) { transition: transform 0.15s ease; }
.steps-empty { margin: 0; padding: 12px 0; }
.steps-add { margin-top: 10px; gap: 8px; width: 100%; justify-content: space-between; }
.steps-add svg { width: 18px; height: 18px; }

/* Blatt „Neuer Zwischenschritt" (US1, US3) */
.sheet-sub { margin: -4px 0 10px; }
.step-people { padding: 0; overflow: hidden; }
.step-person {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px;
  width: 100%; min-height: 46px; padding: 8px 14px;
  border: 0; background: transparent; text-align: left; cursor: pointer;
}
.step-person + .step-person { border-top: 1px solid var(--divider); }
.step-person[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.step-person-name { font-weight: 600; overflow-wrap: anywhere; }
.step-people-hint { margin: 0; }
.step-predecessors { margin-bottom: 0; }
.step-days { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.step-days-value { font-size: 17px; font-weight: 700; min-width: 120px; text-align: center; }
.step-days .icon-btn:disabled { opacity: 0.4; }
.step-summary { margin: 6px 0 0; padding: 10px 14px; background: color-mix(in srgb, var(--accent) 9%, var(--surface)); border-radius: var(--r-in); font-size: 14px; }

/* Aufgabenzeile: Wartet auf, aufgeklappte Schritte (FR-015) */
.task-waiting { margin-top: 4px; font-size: 12px; }
.task-waiting b { font-weight: 700; }
.task-main.task-has-steps { grid-template-columns: auto minmax(0, 1fr) 24px 48px; gap: 4px 12px; }
.task-steps-toggle { align-self: center; display: grid; place-items: center; width: 24px; height: 32px; padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.task-steps-toggle svg { width: 16px; height: 16px; transition: transform 0.2s ease; }
.task-steps-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.task-steps { padding: 0 16px 10px 60px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.row-step-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 13px; }
.row-step-number { font-weight: 700; color: var(--muted); }
.row-step-title { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.row-step-deadline { color: var(--muted); }
.row-step-state { margin-left: auto; font-size: 12px; font-weight: 700; }
.row-step-parts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.row-part {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; max-width: 100%; min-height: 30px; padding: 4px 10px;
  border: 1px solid var(--divider); border-radius: var(--r-btn); background: transparent; font-size: 12px; font-weight: 600; text-align: left; cursor: pointer;
}
.row-part[aria-pressed="true"] { background: var(--seg-on); }
.row-part:disabled { opacity: 0.45; cursor: default; }
/* 011 Frage 30: Erledigt-Datum gedämpft rechts vom Namen wie in der Detailansicht (G5.2);
   reicht der Platz nicht, bricht es im Knopf in die nächste Zeile (G3.1). Der Name bleibt neben dem Punkt:
   16px = Punkt 10px (border-box) + Abstand 6px; ein überlanges Wort bricht im Rahmen um. */
.row-part-name { flex: 1 0 auto; max-width: calc(100% - 16px); min-width: 0; overflow-wrap: anywhere; }
.row-part-date { font-weight: 400; white-space: nowrap; }
.row-part-dot { flex: none; width: 10px; height: 10px; border: 1.5px solid var(--text); border-radius: 50%; }
.row-part[aria-pressed="true"] .row-part-dot { background: var(--accent); border-color: var(--accent); }
.row-steps-empty { margin: 0; }

/* Warte auf Zuarbeit (US4) */
.waiting-sort { max-width: 360px; margin: 4px 0; }
.waiting-empty { margin-top: 16px; }
.contrib-list, .mystep-list { padding: 0; overflow: hidden; }
.section-overdue .group + .group { margin-top: 10px; }
.contrib { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; padding: 11px 16px 11px 14px; }
.contrib + .contrib, .mystep + .mystep { border-top: 1px solid var(--divider); }
.contrib-badge, .mystep-badge { margin-top: 2px; }
.contrib-main { min-width: 0; }
.contrib-text, .mystep-text { display: flex; flex-direction: column; color: var(--text); min-width: 0; }
.contrib-head, .mystep-title { font-size: 15px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.contrib-sub, .mystep-sub { margin-top: 3px; overflow-wrap: anywhere; }
.contrib-receive {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; min-height: 30px; padding: 4px 12px;
  border: 1px solid var(--divider); border-radius: var(--r-btn); background: transparent; font-size: 12px; font-weight: 600; cursor: pointer;
}
.contrib-receive:disabled { opacity: 0.45; cursor: default; }
.contrib-left { display: flex; flex-direction: column; align-items: flex-end; text-align: right; min-width: 64px; }
.contrib-number { font-size: 28px; font-weight: 700; line-height: 1; }
.contrib-unit { font-size: 10px; font-weight: 700; }
.contrib-until { font-size: 10px; margin-top: 3px; }
.contrib-left.late { color: var(--late); }
.contrib-left.soon { color: var(--accent-700); }

/* Meine Zwischenschritte (US5) */
.mystep { display: grid; grid-template-columns: auto minmax(0, 1fr) 48px; gap: 12px; align-items: start; padding: 11px 0 11px 14px; }
.mystep-deadline { margin-top: 3px; font-size: 12px; font-weight: 700; }
.mystep-check { align-self: center; }

/* Kontakte im Profil (US7) */
.contacts { padding: 0 16px; }
.contact-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; min-height: 52px; padding: 6px 0; }
.contact-row + .contact-row { border-top: 1px solid var(--divider); }
.contact-name { min-width: 0; overflow-wrap: anywhere; }
.contact-inactive .contact-name { opacity: 0.5; }
.contact-state { margin-left: 6px; }
.contact-type { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: var(--r-btn); background: var(--grey-btn); }
.contact-row .btn { min-height: 32px; padding: 4px 12px; font-size: 13px; }
.contacts-empty { margin: 0; padding: 12px 0; }
.contact-add { margin-top: 10px; }
.contacts-hint { margin: 6px 0 0; }
.contacts-hint b { color: var(--text); }

/* Zeitplan (US6) */
.timeline { padding: 14px 16px; }
.timeline-plot { position: relative; padding-top: 4px; }
.timeline-today { position: absolute; top: 4px; bottom: 22px; width: 2px; background: var(--accent); z-index: 2; }
.timeline-due { position: absolute; top: 4px; bottom: 22px; width: 0; border-left: 2px dashed var(--text); z-index: 1; }
.timeline-last { position: absolute; top: 4px; bottom: 22px; width: 9px; margin-left: -4px; color: var(--muted); z-index: 1; }
.timeline-last::before { content: ""; position: absolute; top: 0; bottom: 0; left: 4px; border-left: 1.5px dashed currentColor; }
.timeline-last.late, .timeline-last-label.late { color: var(--late); }
.timeline-row + .timeline-row { margin-top: 9px; }
.timeline-label { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; margin-bottom: 3px; }
.timeline-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.timeline-right { white-space: nowrap; }
.timeline-part .timeline-label { padding-left: 14px; }
.timeline-part .timeline-name { font-weight: 500; }
.timeline-track { position: relative; height: 12px; border-radius: 4px; background: color-mix(in srgb, var(--text) 6%, transparent); }
.timeline-part .timeline-track { height: 8px; }
.timeline-bar { position: absolute; top: 0; bottom: 0; border-radius: 4px; border: 1.5px solid var(--text); background: transparent; }
.timeline-bar.bar-total { background: color-mix(in srgb, var(--text) 18%, transparent); border-color: transparent; }
.timeline-bar.bar-done { background: var(--text); }
.timeline-bar.bar-blocked { border-style: dashed; }
.timeline-bar.bar-waiting { background: var(--accent); border-color: var(--accent); }
.timeline-bar.bar-part { background: color-mix(in srgb, var(--accent) 70%, transparent); border-color: var(--accent); }
.timeline-axis { position: relative; height: 22px; margin-top: 6px; font-size: 11px; font-weight: 600; }
.timeline-axis span { position: absolute; top: 6px; white-space: nowrap; }
.timeline-from { left: 0; }
.timeline-to { right: 0; }
.timeline-axis .hidden-label { opacity: 0; }
.timeline-today-label { color: var(--accent-700); }
.timeline-today-label.align-center { transform: translateX(-50%); }
.timeline-today-label.align-end { transform: translateX(-100%); }
.timeline-last-label { color: var(--muted); transform: translateX(-50%); }

/* 005 — Teilen, Personen, Verknüpfung, Anfragen */
.link-btn { padding: 4px 0; border: 0; background: transparent; color: var(--accent-700); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.share { padding: 0 16px; }
.share-row { padding: 10px 0; border-bottom: 1px solid var(--divider); }
.share-owner { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.share-person { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.share-name { min-width: 0; overflow-wrap: anywhere; }
.share-name b { display: block; }
.share-email { display: block; }
.share-roles { margin-top: 8px; }
.share-roles button { font-size: 13px; min-height: 32px; }
.share-deleted { display: block; margin-top: 4px; }
.share-invite { padding: 12px 0; }
.share-suggestions { display: flex; flex-direction: column; margin: -4px 0 12px; border: 1px solid var(--divider); border-radius: var(--r-in); overflow: hidden; background: var(--surface); }
.share-suggestion { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--divider); background: transparent; cursor: pointer; text-align: left; font-size: 14px; color: var(--text); }
.share-suggestion:last-child { border-bottom: 0; }
.share-suggestion span { min-width: 0; overflow-wrap: anywhere; }
.share-message, .share-failed { margin: -4px 0 10px; }
.share-hint { margin: 6px 0 0; line-height: 1.5; }
.share-hint b { color: var(--text); }
.contact-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.contact-linking { grid-column: 1 / -1; display: grid; gap: 6px; padding-bottom: 6px; }
.contact-link-hint { margin: 0; line-height: 1.45; }
@media (max-width: 559px) {
  .contact-row { grid-template-columns: minmax(0, 1fr) auto; }
  .contact-actions { grid-column: 1 / -1; }
}
.mystep-linked { cursor: default; }
.nav-notifications, .tab-notifications, .bell { position: relative; }
.nav-notifications { display: flex; align-items: center; gap: 8px; }
.notify-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.tab-notifications .notify-dot { position: absolute; top: 7px; right: calc(50% - 16px); }
.bell .notify-dot { position: absolute; top: 6px; right: 6px; }
.requests { padding: 0 16px; margin-bottom: 22px; }
.request { padding: 13px 0; }
.request + .request { border-top: 1px solid var(--divider); }
.request-text { font-size: 15px; line-height: 1.35; }
.request-sub { margin-top: 3px; line-height: 1.45; }
.request-actions { display: flex; gap: 8px; margin-top: 10px; }
.request-actions .btn { min-height: 34px; padding: 6px 16px; font-size: 13px; }

/* 006 — Mitteilungen, Zähler, Benachrichtigungen */
.title-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; column-gap: 12px; }
.title-row .link-btn { font-size: 14px; margin-left: auto; }
.notifications { padding: 0 16px; }
.notification { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; gap: 12px; align-items: start; padding: 13px 0; }
.notification + .notification { border-top: 1px solid var(--divider); }
.notification-dot { width: 10px; height: 10px; margin-top: 4px; border-radius: 50%; background: oklch(0.74 0.14 var(--hue)); }
.notification-main { min-width: 0; display: flex; flex-direction: column; color: var(--text); }
.notification-kind { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.notification-kind.late { color: var(--late); }
.notification-text { font-size: 15px; font-weight: 500; line-height: 1.35; margin-top: 3px; overflow-wrap: anywhere; }
.notification-text b { font-weight: 700; }
.notification-sub { margin-top: 2px; overflow-wrap: anywhere; }
.notification-when { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.4; white-space: nowrap; }
.notification-delete { width: 30px; height: 30px; margin: -5px 0 0 0; border: 0; border-radius: var(--r-btn); background: transparent; display: grid; place-items: center; padding: 0; cursor: pointer; color: var(--muted); }
.notification-delete svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.notification-delete:hover { color: var(--text); background: color-mix(in srgb, var(--text) 8%, transparent); }
.notifications-empty { margin: 0; padding: 12px 0; }
.notify-count { color: var(--accent-700); }
.tab-badge { position: absolute; top: 5px; right: calc(50% - 22px); min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box; border-radius: 8px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.notification-settings { padding: 0 16px; }
.notification-switch { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border: 0; background: transparent; color: var(--text); cursor: pointer; text-align: left; font-size: 15px; }
.notification-switch + .notification-switch { border-top: 1px solid var(--divider); }
.switch-track { position: relative; flex: none; width: 46px; height: 28px; border-radius: 14px; background: color-mix(in srgb, var(--text) 18%, transparent); transition: background 0.2s; }
.switch-knob { position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.2s; }
.notification-switch[aria-checked="true"] .switch-track, .scope-switch[aria-checked="true"] .switch-track { background: var(--accent); }
.notification-switch[aria-checked="true"] .switch-knob, .scope-switch[aria-checked="true"] .switch-knob { transform: translateX(18px); }

/* 007 — Auswertungen: Urlaubsübergabe und Verzug je Person */
.reports-segments { margin-bottom: 4px; }
.reports-intro { font-size: 14px; line-height: 1.45; margin: 14px 0; }
.handover-period { max-width: 420px; }
.handover-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.handover-date { text-align: left; padding: 9px 12px; border: 2px solid var(--divider); border-radius: var(--r-card); background: var(--surface); color: var(--text); cursor: pointer; min-width: 0; }
.handover-date[aria-pressed="true"] { border-color: var(--accent); }
.handover-date-label { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.handover-date-value { display: block; font-size: 16px; font-weight: 700; margin-top: 2px; }
.handover-deputy-label { margin-top: 16px; margin-bottom: 6px; }
.handover-deputies { margin-bottom: 0; }
.handover-summary { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: 20px; padding: 12px 14px; background: var(--surface); border-radius: var(--r-card); }
.handover-summary-text { font-size: 14px; line-height: 1.4; min-width: 0; }
.handover-pdf { gap: 8px; white-space: nowrap; }
.handover-pdf svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.handover-group-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.handover-group-count { font-size: 12px; font-weight: 600; color: var(--muted); }
.handover-group { padding: 0 16px; }
.handover-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) minmax(0, 220px); gap: 8px 12px; padding: 11px 0; }
.handover-row + .handover-row { border-top: 1px solid var(--divider); }
.handover-circle { width: 20px; height: 20px; margin-top: 1px; border: 2px solid var(--text); border-radius: 50%; box-sizing: border-box; }
.handover-text { min-width: 0; }
.handover-title { font-size: 15px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.handover-sub { margin-top: 3px; line-height: 1.4; overflow-wrap: anywhere; }
.handover-deadline { font-size: 12px; font-weight: 700; margin-top: 3px; }
.handover-deadline.late { color: var(--late); }
.handover-inputs { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.handover-inputs .field { min-height: 34px; padding: 4px 8px; font-size: 13px; width: 100%; box-sizing: border-box; min-width: 0; }
.handover-who { font-weight: 600; }
.handover-empty { margin-top: 16px; }
.handover-hint { line-height: 1.5; margin: 10px 0 0; }
/* 012 — Auswahl der Bereiche und Projekte: aufklappbare Zeile, gruppierte Liste mit Schaltern (research E5) */
.handover-scope-toggle { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 16px; padding: 10px 14px; border: 0; border-radius: var(--r-card); background: var(--surface); color: var(--text); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.handover-scope-label { flex: 1 1 auto; min-width: 0; font-weight: 600; }
.handover-scope-state { flex: 0 1 auto; min-width: 0; font-size: 14px; color: var(--muted); text-align: right; overflow-wrap: anywhere; }
.handover-scope-toggle svg { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s ease; }
.handover-scope-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
.handover-scope-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.handover-scope-actions { display: flex; justify-content: flex-end; margin-top: 4px; }
.handover-scope-select-all { min-height: 44px; padding: 0 4px; font-size: 14px; }
.handover-scope-select-all:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-in); }
.handover-scope { margin-top: 8px; padding: 0 16px; }
.handover-scope-actions + .handover-scope { margin-top: 0; }
.handover-scope-area { padding: 2px 0; }
.handover-scope-area + .handover-scope-area { border-top: 1px solid var(--divider); }
.scope-switch { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.scope-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-in); }
.handover-scope-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.handover-scope-area-switch .handover-scope-name { font-weight: 600; }
.handover-scope-project { padding-left: 44px; font-size: 14px; }
.handover-scope-project.dimmed .handover-scope-name { color: var(--muted); }
.handover-scope-count { padding: 0 0 8px 44px; }
@media (max-width: 559px) {
  .handover-row { grid-template-columns: 20px minmax(0, 1fr); }
  .handover-inputs { grid-column: 2; }
}
.delay { padding: 0 16px; margin-top: 4px; }
.delay-card { padding: 12px 0 10px; }
.delay-card + .delay-card { border-top: 1px solid var(--divider); }
.delay-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.delay-name { font-size: 15px; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.delay-total { font-size: 20px; font-weight: 700; }
.delay-bar { height: 8px; margin-top: 6px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--text) 7%, transparent); }
.delay-bar-fill { height: 100%; border-radius: var(--r-sm); background: var(--text); }
.delay-meta { margin-top: 6px; }
.delay-items { display: flex; flex-direction: column; margin-top: 8px; border-top: 1px solid var(--divider); }
.delay-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 8px 0; color: var(--text); text-decoration: none; }
.delay-item + .delay-item { border-top: 1px solid var(--divider); }
.delay-item-title { font-size: 14px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.delay-item-date { font-size: 13px; font-weight: 700; white-space: nowrap; text-align: right; color: var(--late); }
.delay-item-sub { overflow-wrap: anywhere; }
.delay-item-since { text-align: right; white-space: nowrap; }
.delay-empty { margin: 0; padding: 12px 0; }
/* API-Schlüssel für MCP in den Einstellungen (Feature 009, wie im Prototyp) */
.apikeys-empty { margin: 0; padding: 12px 0; }
.apikey-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 11px 0; }
.apikey-row + .apikey-row { border-top: 1px solid var(--divider); }
.apikey-main { min-width: 0; }
.apikey-label { font-size: 15px; font-weight: 700; }
.apikey-meta { font-size: 12px; line-height: 1.45; margin-top: 2px; text-wrap: pretty; }
.apikey-token { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; margin-top: 8px; padding: 8px 10px; background: var(--bg); border: 1px dashed var(--divider); border-radius: var(--r-in, 10px); }
.apikey-token code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; user-select: all; }
.apikey-onlynow { font-size: 12px; margin-top: 4px; font-weight: 600; color: var(--accent-700); }
.btn-outline { display: flex; width: 100%; gap: 8px; margin-top: 10px; border: 1px solid var(--divider); background: transparent; color: var(--text); }
.btn-outline:hover { background: color-mix(in srgb, var(--text) 7%, transparent); }
.btn-outline svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; }
.apikeys-hint { line-height: 1.5; margin: 6px 0 0; text-wrap: pretty; }
.apikeys-hint b { color: var(--text); word-break: break-all; }
.apikey-sheet .chips { margin-bottom: 0; }

/* 008 Erweiterung — Unterseite Betrieb, Schlüssel je Konto */
.admin-operations { margin-bottom: 14px; }
.admin-keys { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.ops-intro { margin: 0 0 12px; }
.ops-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.btn-outline-small { min-height: 40px; padding: 8px 16px; border: 1px solid var(--divider); background: transparent; color: var(--text); }
.btn-outline-small:hover { background: color-mix(in srgb, var(--text) 7%, transparent); }
.ops-section { padding: 14px 16px; margin-bottom: 14px; }
.ops-title { font-size: 17px; font-weight: 700; margin: 0 0 10px; }
.ops-subtitle { font-size: 15px; font-weight: 700; margin: 14px 0 2px; }
.ops-list { display: grid; grid-template-columns: minmax(0, 160px) minmax(0, 1fr); gap: 8px 16px; margin: 0; }
.ops-list dt { font-weight: 600; color: var(--muted); }
.ops-list dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.ops-address + .ops-address { margin-top: 6px; }
.ops-address .small { display: block; }
.ops-file { display: flex; justify-content: space-between; gap: 12px; max-width: 420px; }
.ops-file + .ops-file { margin-top: 4px; }
.ops-tables-hint { margin: 0 0 6px; }
.ops-filter { margin-bottom: 8px; max-width: 360px; }
.ops-message { padding: 10px 0; }
.ops-message + .ops-message { border-top: 1px solid var(--divider); }
.ops-message-text { margin-top: 2px; overflow-wrap: anywhere; }
.ops-message-error { margin-top: 2px; overflow-wrap: anywhere; }
.ops-messages-empty { margin: 4px 0 0; }
@media (max-width: 559px) {
  .ops-list { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .ops-list dd { margin-bottom: 8px; }
}
