/* =========================================================
   Aufgaben — hell, minimalistisch, professionell
   ========================================================= */

:root {
  --bg:          #f6f7f9;
  --surface:     #ffffff;
  --surface-2:   #fbfcfd;
  --text:        #14161b;
  --muted:       #6b7280;
  --faint:       #9ca3af;
  --line:        #e7e9ee;
  --line-strong: #d6d9e0;

  --accent:      #2563eb;
  --accent-dark: #1d4ed8;
  --accent-weak: #eff4ff;

  --ok:          #0f9d76;
  --warn:        #b45309;
  --warn-weak:   #fff7ea;
  --danger:      #dc2626;
  --danger-weak: #fef2f2;

  /* Zustaendigkeit */
  --christina:      #7c3aed;
  --christina-weak: #f4efff;
  --christina-ink:  #6d28d9;
  --jutta:          #0d9488;
  --jutta-weak:     #e8f8f4;
  --jutta-ink:      #0f766e;
  --beide-weak:     #eef2f7;
  --beide-ink:      #475569;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(16,24,40,.05);
  --shadow-md: 0 1px 2px rgba(16,24,40,.04), 0 6px 16px rgba(16,24,40,.06);
  --shadow-lg: 0 12px 40px rgba(16,24,40,.14);

  --wrap: 760px;
  --ease: cubic-bezier(.2,.7,.3,1);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, p, ul { margin: 0; }
ul { list-style: none; padding: 0; }
svg { width: 100%; height: 100%; display: block; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

.spacer { flex: 1; }

/* ---------------- Kopfzeile ---------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 640;
  letter-spacing: -.01em;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px rgba(37,99,235,.28);
}
.brand-mark svg { width: 15px; height: 15px; }

.brand-name { font-size: 15.5px; }

/* Schnellfilter nach Zustaendigkeit */

.who-filter { display: flex; gap: 6px; }

.who-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 550;
  color: var(--muted);
  transition: border-color .15s var(--ease), background .15s var(--ease), color .15s var(--ease);
}
.who-chip:hover { border-color: var(--line-strong); color: var(--text); }

.who-dot { width: 8px; height: 8px; border-radius: 999px; flex: 0 0 8px; }
.who-dot.who-christina { background: var(--christina); }
.who-dot.who-jutta     { background: var(--jutta); }

.who-count {
  font-size: 11px;
  font-weight: 640;
  color: var(--faint);
  background: #eef0f3;
  border-radius: 999px;
  padding: 1px 6px;
  min-width: 18px;
  text-align: center;
}

.who-chip.is-active { background: var(--text); border-color: var(--text); color: #fff; }
.who-chip.is-active .who-count { background: rgba(255,255,255,.18); color: #fff; }

/* ---------------- Hinweisleiste ---------------- */

.notice {
  background: var(--warn-weak);
  border-bottom: 1px solid #f4e3c6;
  color: var(--warn);
  font-size: 13px;
}
.notice-inner {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding-top: 11px;
  padding-bottom: 11px;
}
.notice svg { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 2px; }
.notice strong { font-weight: 620; }

.notice-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }

.notice-details {
  font-size: 12px;
  opacity: .8;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

.notice-link {
  align-self: flex-start;
  margin-top: 2px;
  font-size: 12.5px;
  font-weight: 600;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 4px 0;
}
.notice-link:hover { opacity: .75; }

/* ---------------- Eingabe neuer Aufgaben ---------------- */

.main { padding-top: 26px; padding-bottom: 8px; }

.composer {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.composer:focus-within {
  border-color: #c7d7fb;
  box-shadow: 0 0 0 4px rgba(37,99,235,.09), var(--shadow-sm);
}

.composer-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
}
.composer-icon {
  width: 18px; height: 18px; flex: 0 0 18px;
  color: var(--faint);
  transition: color .18s var(--ease);
}
.composer:focus-within .composer-icon { color: var(--accent); }

#newTitle {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 15px;
  padding: 15px 0;
  color: var(--text);
}
#newTitle::placeholder { color: var(--faint); }

.composer-more {
  border-top: 1px solid var(--line);
  padding: 12px 16px 14px;
  background: var(--surface-2);
}
.composer-more textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  font: inherit;
  font-size: 14px;
  color: var(--text);
  padding: 9px 11px;
  resize: vertical;
  outline: 0;
  min-height: 56px;
}
.composer-more textarea:focus { border-color: #c7d7fb; box-shadow: 0 0 0 3px rgba(37,99,235,.09); }
.composer-more textarea::placeholder { color: var(--faint); }

.composer-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.mini-field {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}
.mini-field svg { width: 15px; height: 15px; flex: 0 0 15px; }
.mini-field input {
  border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 13px; color: var(--text);
  padding: 0; min-width: 108px;
}

.toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  transition: all .15s var(--ease);
}
.toggle-pill.tall { padding: 9px 13px 9px 11px; }
.toggle-pill input { accent-color: var(--accent); margin: 0; width: 14px; height: 14px; }
.toggle-pill:has(input:checked) {
  background: var(--warn-weak);
  border-color: #f0dcbb;
  color: var(--warn);
  font-weight: 550;
}

/* ---------------- Werkzeugleiste ---------------- */

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 12px;
  flex-wrap: wrap;
}

.tabs {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: #eceef2;
  border-radius: 999px;
}
.tab {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 13.5px;
  font-weight: 550;
  color: var(--muted);
  padding: 6px 13px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color .15s var(--ease), background .15s var(--ease);
}
.tab:hover { color: var(--text); }
.tab.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.count {
  font-size: 11px;
  font-weight: 620;
  color: var(--faint);
  background: #e4e7ec;
  border-radius: 999px;
  padding: 1px 6px;
  min-width: 18px;
  text-align: center;
}
.tab.is-active .count { background: var(--accent-weak); color: var(--accent); }

.search {
  flex: 1;
  min-width: 150px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 36px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--faint);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.search:focus-within { border-color: #c7d7fb; box-shadow: 0 0 0 3px rgba(37,99,235,.09); }
.search svg { width: 15px; height: 15px; flex: 0 0 15px; }
.search input {
  flex: 1; min-width: 0;
  border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 14px; color: var(--text);
}
.search input::-webkit-search-cancel-button { cursor: pointer; }

/* ---------------- Aufgabenliste ---------------- */

.list { display: flex; flex-direction: column; gap: 8px; }

.task {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease), opacity .2s var(--ease);
  animation: pop .22s var(--ease) both;
}
@keyframes pop {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}
.task:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.task.is-done { background: var(--surface-2); }
.task.is-done .task-title { color: var(--faint); text-decoration: line-through; text-decoration-thickness: 1px; }
.task.is-done .task-notes { color: #b3b8c0; }

.checkbox {
  position: relative;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border: 1.75px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  padding: 0;
  display: grid;
  place-items: center;
  color: transparent;
  transition: all .16s var(--ease);
}
.checkbox svg { width: 11px; height: 11px; }
.checkbox:hover { border-color: var(--accent); }
.task.is-done .checkbox {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}

.task-body { flex: 1; min-width: 0; }

.task-title {
  font-size: 14.75px;
  font-weight: 500;
  color: var(--text);
  word-break: break-word;
  letter-spacing: -.005em;
}
/* Hinweis zur Aufgabe */
.task-notes {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 5px;
  font-size: 13.25px;
  color: var(--muted);
  white-space: pre-wrap;
  word-break: break-word;
}
.task-notes > svg {
  width: 14px; height: 14px; flex: 0 0 14px;
  margin-top: 2px;
  color: var(--faint);
}

.task-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 8px;
  font-size: 12.25px;
  color: var(--faint);
}
.meta-author { display: inline-flex; align-items: center; gap: 6px; }
.meta-author b { font-weight: 570; color: var(--muted); }
.meta-dot { color: #d4d7dd; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 560;
  background: #f1f2f5;
  color: var(--muted);
  white-space: nowrap;
}
.badge svg { width: 11px; height: 11px; flex: 0 0 11px; }
.badge.prio { background: var(--warn-weak); color: var(--warn); }
.badge.due  { background: var(--accent-weak); color: var(--accent); }
.badge.due.is-over { background: var(--danger-weak); color: var(--danger); }
.badge.due.is-soon { background: var(--warn-weak); color: var(--warn); }

.task-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity .15s var(--ease);
}
.task:hover .task-actions,
.task:focus-within .task-actions { opacity: 1; }
/* Auf Touch-Geraeten gibt es kein Hover — Aktionen dauerhaft zeigen */
@media (hover: none), (pointer: coarse) { .task-actions { opacity: 1; } }

.icon-btn {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  border-radius: var(--r-sm);
  color: var(--faint);
  cursor: pointer;
  padding: 0;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover { background: #f1f2f5; color: var(--text); }
.icon-btn.danger:hover { background: var(--danger-weak); color: var(--danger); }

/* ---------------- Leerzustand ---------------- */

.empty {
  text-align: center;
  padding: 56px 20px 48px;
  animation: pop .25s var(--ease) both;
}
.empty-art {
  width: 46px; height: 46px;
  margin: 0 auto 14px;
  color: #c9cdd6;
}
.empty-title { font-size: 15px; font-weight: 570; color: var(--muted); }
.empty-sub { font-size: 13.5px; color: var(--faint); margin-top: 3px; }

.list-footer {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.foot {
  padding-top: 12px;
  padding-bottom: 32px;
  text-align: center;
  font-size: 12px;
  color: #b6bac2;
  min-height: 24px;
}

/* ---------------- Buttons ---------------- */

.btn {
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font: inherit;
  font-size: 13.5px;
  font-weight: 560;
  padding: 8px 15px;
  cursor: pointer;
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease), transform .1s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(.5px); }
.btn:disabled { opacity: .55; cursor: default; }

.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(37,99,235,.3); }
.btn-primary:hover:not(:disabled) { background: var(--accent-dark); }

.btn-ghost { background: transparent; color: var(--muted); border-color: var(--line); }
.btn-ghost:hover { background: #f4f5f7; color: var(--text); }

.btn-quiet { background: transparent; color: var(--faint); font-weight: 500; }
.btn-quiet:hover { color: var(--danger); background: var(--danger-weak); }

.btn-danger-ghost { background: transparent; color: var(--danger); }
.btn-danger-ghost:hover { background: var(--danger-weak); }

.btn-block { width: 100%; padding: 11px; font-size: 14.5px; }

/* ---------------- Overlays / Dialoge ---------------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(20,22,27,.34);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fade .18s var(--ease) both;
}
.overlay[hidden] { display: none; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }

.sheet {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: 22px;
  animation: rise .22s var(--ease) both;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to   { opacity: 1; transform: none; }
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.sheet h2 { font-size: 16px; font-weight: 620; letter-spacing: -.01em; }

.sheet-sub { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.sheet-meta { font-size: 12.25px; color: var(--faint); margin-top: 14px; }

.sheet-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
}


/* ---------------- Formularfelder ---------------- */

.field { display: block; margin-bottom: 14px; }
.field-label {
  display: block;
  font-size: 12.5px;
  font-weight: 560;
  color: var(--muted);
  margin-bottom: 6px;
}
.field input[type="text"],
.field input[type="date"],
.field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  font: inherit;
  font-size: 14.5px;
  color: var(--text);
  padding: 10px 12px;
  outline: 0;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; margin-bottom: 14px; }


/* ---------------- Toast ---------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 80;
  background: #14161b;
  color: #fff;
  font-size: 13.5px;
  padding: 10px 16px;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  animation: toastIn .2s var(--ease) both;
  max-width: calc(100vw - 40px);
  display: flex;
  align-items: center;
  gap: 14px;
}

.toast-action {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 13.5px;
  font-weight: 620;
  color: #8ab4ff;
  cursor: pointer;
  padding: 2px 2px;
  white-space: nowrap;
  border-radius: 4px;
}
.toast-action:hover { color: #b6d0ff; text-decoration: underline; }
.toast-action[hidden] { display: none; }
.toast[hidden] { display: none; }
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------------- Zust&auml;ndigkeit ---------------- */

.badge.who.who-christina { background: var(--christina-weak); color: var(--christina-ink); }
.badge.who.who-jutta     { background: var(--jutta-weak);     color: var(--jutta-ink); }
.badge.who.who-beide     { background: var(--beide-weak);     color: var(--beide-ink); }
.badge.who { font-weight: 600; }

.active-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 7px 8px 7px 12px;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: 999px;
  font-size: 12.75px;
  color: var(--muted);
}
.active-filter button {
  margin-left: auto;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border: 0; background: transparent;
  border-radius: 999px;
  color: var(--faint);
  cursor: pointer;
  padding: 0;
}
.active-filter button svg { width: 13px; height: 13px; }
.active-filter button:hover { background: #eef0f3; color: var(--text); }

/* ---------------- Auswahl in Segmenten ---------------- */

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.segmented-status { grid-template-columns: repeat(4, 1fr); }

.seg {
  min-width: 0;
  position: relative;
  cursor: pointer;
  user-select: none;
}
.seg input {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
  pointer-events: none;
}
.seg span {
  display: block;
  text-align: center;
  padding: 9px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 550;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all .15s var(--ease);
}
.seg:hover span { border-color: var(--faint); color: var(--text); }
.seg input:focus-visible + span { box-shadow: 0 0 0 3px rgba(37,99,235,.18); }

.seg-christina input:checked + span { background: var(--christina-weak); border-color: var(--christina); color: var(--christina-ink); font-weight: 620; }
.seg-jutta      input:checked + span { background: var(--jutta-weak);     border-color: var(--jutta);     color: var(--jutta-ink);     font-weight: 620; }
.seg-beide      input:checked + span { background: var(--beide-weak);     border-color: #94a3b8;          color: var(--beide-ink);     font-weight: 620; }

.seg-offen      input:checked + span { background: #eef0f3;          border-color: #9aa2ad; color: #4b5563; font-weight: 620; }
.seg-inArbeit   input:checked + span { background: var(--accent-weak); border-color: var(--accent); color: var(--accent); font-weight: 620; }
.seg-fastFertig input:checked + span { background: var(--warn-weak);   border-color: #e0a955; color: var(--warn); font-weight: 620; }
.seg-erledigt   input:checked + span { background: #e7f7f1;            border-color: var(--ok); color: #0b7a5c; font-weight: 620; }

/* ---------------- Aktueller Stand in der Liste ---------------- */

.status-wrap {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
}

.status-caption {
  font-size: 11.5px;
  font-weight: 560;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.status-select {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-size: 12.75px;
  font-weight: 620;
  padding: 5px 26px 5px 11px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 9px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23667' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  transition: filter .15s var(--ease);
}
.status-select:hover { filter: brightness(.97); }
.status-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.status-select.is-offen      { background-color: #eef0f3;           color: #4b5563; }
.status-select.is-inArbeit   { background-color: var(--accent-weak); color: var(--accent); }
.status-select.is-fastFertig { background-color: var(--warn-weak);   color: var(--warn); }
.status-select.is-erledigt   { background-color: #e7f7f1;            color: #0b7a5c; }

.task.is-done .status-wrap { opacity: .85; }

/* ---------------- Formularbl&ouml;cke ---------------- */

.form-block { margin-bottom: 14px; }
.form-block:last-of-type { margin-bottom: 16px; }

.block-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 7px;
}
.block-optional {
  font-weight: 500;
  color: var(--faint);
  font-size: 11.5px;
}

/* ---------------- Papierkorb ---------------- */

.tab-trash { gap: 5px; }
.tab-trash svg { width: 14px; height: 14px; flex: 0 0 14px; }

.task.is-trashed {
  background: var(--surface-2);
  border-style: dashed;
  border-color: var(--line-strong);
  box-shadow: none;
}
.task.is-trashed:hover { box-shadow: var(--shadow-sm); }

.trash-mark {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: var(--faint);
  display: grid;
  place-items: center;
}
.trash-mark svg { width: 15px; height: 15px; }

.badge.is-trash { background: #f1f2f5; color: var(--muted); }

.list-footer { gap: 8px; }

/* ---------------- Beschriftungen ---------------- */

.mini-label {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 550;
  white-space: nowrap;
}

.composer-hint {
  margin-top: 10px;
  font-size: 12.25px;
  color: var(--faint);
  line-height: 1.45;
}

.field-hint {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: var(--faint);
  font-weight: 400;
}

/* ---------------- Mobil ---------------- */

.composer-buttons { display: flex; gap: 8px; }

/* =========================================================
   Handy
   ========================================================= */

@media (max-width: 560px) {

  .wrap { padding: 0 14px; }
  .main { padding-top: 16px; }

  /* --- Kopfzeile: Platz fuer die Statusleiste (Notch) --- */
  .topbar { padding-top: env(safe-area-inset-top); }
  .topbar-inner { height: 54px; }
  .brand-name { display: none; }
  .who-chip { padding: 6px 10px; font-size: 12.5px; }

  /* Auswahl in Segmenten: gut treffbar, Stand zweizeilig */
  .seg span { padding: 12px 8px; font-size: 13px; min-height: 44px; display: flex; align-items: center; justify-content: center; }
  .segmented-status { grid-template-columns: repeat(2, 1fr); }
  .status-select { font-size: 13px; padding: 8px 28px 8px 12px; min-height: 36px; }
  .status-caption { font-size: 11px; }
  .active-filter { font-size: 12.25px; }

  /* --- Reiter und Suche --- */
  .toolbar { gap: 8px; margin: 18px 0 10px; }
  .notice-link { padding: 9px 0; }
  .tab { padding: 9px 12px; min-height: 40px; }
  .tab-trash-text { display: none; }
  .search { width: 100%; flex-basis: 100%; height: 42px; }

  /* --- Aufgaben: mehr Luft, groessere Tippflaechen --- */
  .task { padding: 13px 12px; gap: 11px; }
  .task-title { font-size: 15.5px; }
  .task-notes { font-size: 14px; }
  .task-meta { font-size: 12.5px; margin-top: 9px; }
  .task-actions { opacity: 1; gap: 0; }

  .icon-btn { width: 44px; height: 44px; }
  .icon-btn svg { width: 18px; height: 18px; }

  .checkbox { flex-basis: 24px; width: 24px; height: 24px; }
  .checkbox svg { width: 13px; height: 13px; }
  /* unsichtbar vergroesserter Tippbereich, ohne das Layout zu verschieben */
  .checkbox::after { content: ''; position: absolute; inset: -10px; }
  .trash-mark { flex-basis: 24px; width: 24px; height: 24px; }

  /* --- Eingabe neuer Aufgaben --- */
  #newTitle { padding: 16px 0; }
  .composer-more { padding: 12px 14px 14px; }
  .composer-row { gap: 8px; }
  .composer-row .spacer { display: none; }
  .mini-field, .toggle-pill { min-height: 40px; }
  .mini-field input { min-width: 120px; }
  .composer-buttons { width: 100%; }
  .composer-buttons .btn { flex: 1; min-height: 46px; font-size: 15px; }

  /* --- Dialoge erscheinen als Blatt von unten --- */
  .overlay {
    align-items: flex-end;
    padding: 0;
    overscroll-behavior: contain;
  }
  .sheet {
    max-width: none;
    border-radius: 20px 20px 0 0;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
    max-height: 90vh;
    animation: sheetUp .26s var(--ease) both;
  }
  .sheet::before {
    content: '';
    display: block;
    width: 38px;
    height: 4px;
    border-radius: 999px;
    background: var(--line-strong);
    margin: 0 auto 16px;
  }
  @keyframes sheetUp {
    from { transform: translateY(100%); }
    to   { transform: none; }
  }

  .field-row { flex-direction: column; gap: 0; }

  /* Speichern volle Breite oben, darunter die Nebenwege */
  .sheet-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 18px;
  }
  .sheet-actions .spacer { display: none; }
  .sheet-actions .btn { min-height: 46px; font-size: 15px; }
  .sheet-actions .btn-primary { grid-column: 1 / -1; order: -1; min-height: 50px; }

  .welcome { padding-top: 24px; }

  /* --- Fuss und Einblendung ueber der Home-Leiste --- */
  .foot { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
  .toast {
    bottom: calc(14px + env(safe-area-inset-bottom));
    left: 14px;
    right: 14px;
    transform: none;
    max-width: none;
    justify-content: space-between;
    padding: 13px 18px;
    border-radius: 14px;
  }
  @keyframes toastIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
  }
  /* Tippbereich vergroessern, ohne die Einblendung aufzublaehen */
  .toast-action {
    font-size: 14px;
    padding: 12px 8px;
    margin: -12px -8px -12px 0;
  }

  /* --- iOS zoomt beim Antippen von Feldern unter 16px --- */
  #newTitle,
  .composer-more textarea,
  .search input,
  .mini-field input,
  .field input[type="text"],
  .field input[type="date"],
  .field textarea { font-size: 16px; }
}

/* Kein Hover auf Touch: stattdessen sichtbare Reaktion beim Tippen */
@media (hover: none) {
  body { -webkit-tap-highlight-color: transparent; }
  .btn, .tab, .icon-btn, .checkbox, .who-chip, .status-select, .toast-action { touch-action: manipulation; }
  .task:active { background: #f2f4f7; }
  .icon-btn:active { background: #e8eaee; color: var(--text); }
  .icon-btn.danger:active { background: var(--danger-weak); color: var(--danger); }
  .checkbox:active { border-color: var(--accent); transform: scale(.92); }
  .btn-primary:active { background: var(--accent-dark); }
  .btn-ghost:active, .btn-quiet:active { background: #eceef2; }
  .tab:active { color: var(--text); }
  .who-chip:active { background: #f2f4f7; }
}

/* Sehr schmale Geraete */
@media (max-width: 360px) {
  .tab { padding: 7px 9px; font-size: 13px; }
  .count { padding: 1px 5px; }
  .who-chip { padding: 5px 8px; font-size: 12px; }
}

@media print {
  .topbar, .composer, .toolbar, .task-actions, .list-footer, .foot, .notice { display: none !important; }
  .task { break-inside: avoid; box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
