/* Cappa – Grundgerüst (übernommen aus dem Brandup-Agentur-Hub über Sondle). Komplett nach Horamic (design/horamic/): Typografie 600/700, Buttons 11/22 R24,
   Inputs R10, Karten R14 ohne Schatten, Tabelle nach Master. Farben ausschließlich aus tokens.css. */

*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-gutter: stable; } /* Platz für die Scrollleiste immer reservieren – Inhalt verschiebt sich beim Seitenwechsel nicht */
::selection { background: var(--n900); color: #fff; } /* Cappa hat (noch) keine Markenfarbe – Markierung in Schwarz */
body {
  margin: 0; min-height: 100vh; background: var(--n25); color: var(--n900);
  font-family: var(--font); font-size: 14px; font-weight: 600; line-height: 1.55;
  -webkit-font-smoothing: antialiased; font-feature-settings: 'tnum';
}
::placeholder { color: var(--n400); opacity: 1; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--focus-color); outline-offset: 2px; }
.main:focus { outline: none; }
.main { padding-bottom: 48px; }
/* Pflichtlinks (DSGVO) am Seitenende */
.legal { display: flex; justify-content: center; padding: 0 16px 28px; }
.legal__nav { display: flex; gap: 16px; font-size: 12px; font-weight: 600; }
.legal__nav a { color: var(--n500); transition: color var(--ease); }
.legal__nav a:hover, .legal__nav a:focus-visible { color: var(--n900); text-decoration: underline; text-underline-offset: 3px; }
@media print { .legal { display: none; } }

/* ---------- Typografie (Horamic-Skala) ---------- */
.h1 { font-size: 30px; font-weight: 700; line-height: 1.2; margin: 0; }
.h3 { font-size: 16px; font-weight: 700; line-height: 1.35; margin: 0; }
.meta { font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--n600); }
.label-quiet { font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--n500); }
.caption { font-size: 11px; font-weight: 700; line-height: 1.2; letter-spacing: 0.05em; text-transform: uppercase; color: var(--n500); }
.num { font-weight: 700; color: var(--n900); }

/* ---------- Kopfzeile ---------- */
.bar { background: var(--n0); border-bottom: 1px solid var(--n100); }
.bar__inner { max-width: 1000px; margin: 0 auto; padding: 16px 32px; display: flex; justify-content: space-between; align-items: center; }
.bar__logo { display: block; height: 24px; }
.bar__logo img { display: block; height: 24px; width: auto; }
/* Bereichs-Umschalter in der Überschrift (Projekte · Fragebögen) */
.titlebar.titlebar--switch { margin-bottom: 40px; min-height: 40px; } /* Luft zum Inhalt; gleiche Höhe mit/ohne Button → kein Springen */
.viewswitch { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 24px; row-gap: 4px; }
.viewswitch__item { color: var(--n500); text-decoration: none; transition: color var(--ease); }
a.viewswitch__item:hover { color: var(--n900); }
.viewswitch__item.is-active { color: var(--n900); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--n900); color: #fff;
  font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: opacity var(--ease);
}
.avatar:hover { opacity: 0.85; }
.usermenu { position: relative; }

/* ---------- Seite ---------- */
.page { max-width: 1000px; margin: 0 auto; padding: 36px 32px 0; }
.page--narrow .card--form { max-width: 660px; }
.titlebar { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.titlebar .grow { flex-grow: 1; }
.titlebar .h1 { min-width: 0; overflow-wrap: anywhere; } /* sehr lange Namen schieben Status und Löschen nicht aus dem Bild */
.titlebar.actions, .titlebar.titlebar--wrap { flex-wrap: wrap; row-gap: 10px; } /* Aktionsleiste unter dem Projekt: bei vielen Buttons umbrechen statt abschneiden */
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--n600); margin-bottom: 12px; transition: color var(--ease); }
.back:hover { color: var(--n900); }
.stack { display: flex; flex-direction: column; gap: 16px; }

/* ---------- Buttons (Horamic) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 24px; border: 1px solid transparent;
  font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1.1; white-space: nowrap;
  cursor: pointer; text-decoration: none;
  transition: color var(--ease), background-color var(--ease), border-color var(--ease), opacity var(--ease);
}
.btn svg { flex-shrink: 0; }
.btn--primary { background: var(--n900); color: #fff; }
.btn--primary:hover { opacity: 0.85; color: #fff; }
.btn--secondary { background: var(--n0); border-color: var(--n100); color: var(--n600); padding: 10px 21px; }
.btn--secondary:hover { border-color: var(--n900); color: var(--n900); }
/* Text-Button = Link: grau unterstrichen, Hover schwarz (wie „Alle Projekte“ auf den Boards) */
.btn--text { background: transparent; color: var(--n600); padding: 11px 4px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--n300); }
.btn--text:hover { color: var(--n900); text-decoration-color: var(--n900); }
/* Ruhige Nebenaktion (Abbrechen): graue Schrift, Hover = ganze Fläche leicht grau wie ein normaler Button */
.btn--quiet { background: transparent; color: var(--n600); }
.btn--quiet:hover { background: var(--n50); color: var(--n900); }
.btn.is-disabled, .btn.is-disabled:hover { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.btn--danger { background: var(--error-base); color: #fff; }
.btn--danger:hover { background: var(--error-text); color: #fff; }
.btn--sm { padding: 6px 12px; font-size: 13px; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] {
  background: var(--disabled-surface); border-color: var(--disabled-border); color: var(--disabled-text); cursor: default; opacity: 1;
}
.btn.is-copied, .btn.is-copied:hover { background: var(--success-surface); border-color: var(--success-surface); color: var(--success-text); }

/* Kreis-Aktion (Löschen) */
.circle {
  width: 42px; height: 42px; border-radius: 50%; border: 0; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  background: var(--n0); color: var(--n600); box-shadow: inset 0 0 0 1px var(--n200);
  transition: background-color var(--ease), color var(--ease), box-shadow var(--ease);
}
.circle--danger:hover { background: var(--error-base); color: #fff; box-shadow: none; }

/* ---------- Karten ---------- */
.card { background: var(--n0); border: 1px solid var(--n100); border-radius: 14px; padding: 20px 22px; }
.card__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.card--flush { padding: 0; overflow: hidden; }
.card--flush .card__head { padding: 20px 22px 0; margin-bottom: 0; }
.card--dashed { border: 1px dashed var(--n300); background: transparent; color: var(--n600); font-size: 14px; }
/* „+ Neues Projekt“ als klickbarer Platzhalter am Listenende – bewusst leise, alles grau; Hover wird dunkler */
.card--add { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--n600); cursor: pointer;
  transition: border-color var(--ease), background-color var(--ease), color var(--ease); }
.card--add:hover { border-color: var(--n500); background: var(--n0); color: var(--n900); }
.card--add__icon { width: 28px; height: 28px; border-radius: 50%; background: var(--n100); color: var(--n500); display: inline-flex;
  align-items: center; justify-content: center; flex-shrink: 0; transition: background-color var(--ease), color var(--ease); }
.card--add__icon svg { width: 14px; height: 14px; }
.card--add:hover .card--add__icon { background: var(--n200); color: var(--n900); }
.card--add__label { font-size: 14px; font-weight: 700; }
.card--add__hint { font-size: 13px; font-weight: 600; color: var(--n500); }

/* Projektliste */
.plist { display: flex; flex-direction: column; gap: 12px; }
.pcard {
  display: flex; align-items: center; gap: 28px; color: var(--n900);
  transition: background-color var(--ease), border-color var(--ease);
}
a.pcard:hover { border-color: var(--n200); background: var(--n50); color: var(--n900); }
.pcard__main { flex-grow: 1; min-width: 0; }
.pcard__main .meta { margin-top: 3px; }
.progress { display: flex; flex-direction: column; gap: 7px; align-items: flex-start; }
.meter { width: 160px; height: 4px; border-radius: 2px; background: var(--meter-track); position: relative; overflow: hidden; }
.meter i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: var(--chart-1); }
.pcard__go { color: var(--n400); display: flex; }
/* Projektliste nach Kunde gruppiert */
.pgroups { gap: 28px; }
.pgroup__title { font-size: 16px; font-weight: 700; line-height: 1.3; margin: 0 0 10px 2px; }
.prow { display: grid; grid-template-columns: 44px minmax(0, 1fr) 190px 130px 20px; align-items: center; gap: 20px;
  padding: 16px 22px; color: var(--n900); text-decoration: none; transition: background-color var(--ease); }
/* feste Spalten: Rücklauf und Status stehen in allen Zeilen und Gruppen exakt untereinander */
.prow > .progress { width: 190px; }
.progress__label { display: flex; flex-direction: column; gap: 1px; }
.prow .meter i { background: var(--n900); } /* Liste bewusst ruhig: Fortschritt schwarz statt Grün */
.prow > .chip { justify-self: start; }
.prow + .prow { border-top: 1px solid var(--n100); }
.prow:hover { background: var(--n50); color: var(--n900); }
.prow:hover .pcard__go { color: var(--n900); }
.prow:hover .tpltile { background: var(--n0); }
.prow__main { flex-grow: 1; min-width: 0; }
.prow__title { font-size: 15px; font-weight: 700; line-height: 1.35; }
.prow__main .meta { margin-top: 2px; }
.prow--add { display: flex; padding-top: 12px; padding-bottom: 12px; gap: 20px; font-size: 14px; font-weight: 600; color: var(--n600); }
.prow--add:hover { color: var(--n900); }
.prow__plus { width: 44px; flex-shrink: 0; display: inline-flex; justify-content: center; color: var(--n500); }
.prow--add:hover .prow__plus { color: var(--n900); }
a.pcard:hover .pcard__go { color: var(--n900); }

/* Chips (Horamic: nur Anzeige) */
.chip { display: inline-block; font-size: 11px; font-weight: 700; line-height: 1.2; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 10px; background: var(--n50); color: var(--n600); white-space: nowrap; }
.chip--success { background: var(--success-surface); color: var(--success-text); }
/* Horamic-Chips sind für weiße Karten gedacht – direkt auf dem Canvas bekommen neutrale Chips Fläche + Rand */
.titlebar .chip:not(.chip--success) { background: var(--n0); box-shadow: inset 0 0 0 1px var(--n200); }

/* ---------- Formulare ---------- */
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field__label { font-size: 14px; font-weight: 600; line-height: 1.1; }
.field__hint { font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--n600); }
.field__error { font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--error-text); }
.input, .select {
  width: 100%; min-width: 0; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--n900);
  background: var(--n0); border: 1px solid var(--n100); border-radius: 10px; padding: 11px 12px; line-height: 1.3;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235C6F7D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.input:hover, .select:hover { border-color: var(--n300); }
.input:focus, .select:focus { outline: none; border-color: var(--focus-color); box-shadow: var(--input-focus); }
.input[aria-invalid="true"] { border-color: var(--error-base); }
.input[readonly] { color: var(--n600); background: var(--n0); }
.pwfield { position: relative; }
.pwfield .input { width: 100%; padding-right: 48px; }
.pwfield__toggle { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--n500); cursor: pointer;
  transition: background-color var(--ease), color var(--ease); }
.pwfield__toggle:hover { background: var(--n50); color: var(--n900); }
.pwfield__toggle:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--focus-color); }
.pwfield__toggle[aria-pressed="true"] { color: var(--n900); }
.form { display: flex; flex-direction: column; gap: 20px; }
.form__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
/* Befragungsart beim Anlegen: zwei Auswahlkarten */
.modes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.modes__opt { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--n200); border-radius: 12px; cursor: pointer;
  background: var(--n0); transition: border-color var(--ease), background-color var(--ease); }
.modes__opt:hover { border-color: var(--n500); }
.modes__opt.is-selected { border: 2px solid var(--n900); padding: 13px 15px; background: var(--n50); }
.modes__radio { margin: 3px 0 0; accent-color: var(--n900); flex-shrink: 0; }
.modes__text { display: flex; flex-direction: column; gap: 3px; font-size: 13px; font-weight: 600; color: var(--n600); line-height: 1.45; }
.modes__text b { font-size: 14px; font-weight: 700; color: var(--n900); }

.modes__opt.is-disabled { cursor: not-allowed; background: var(--n50); border-color: var(--n100); }
.modes__opt.is-disabled:hover { border-color: var(--n100); }
.modes__opt.is-disabled .modes__text, .modes__opt.is-disabled .modes__text b { color: var(--n400); }
.form__actions { display: flex; justify-content: flex-end; gap: 10px; }

.popover__foot { font-size: 12px; font-weight: 600; color: var(--n500); border-top: 1px solid var(--n100); margin-top: 10px; padding-top: 8px; }

/* Neues Projekt: nummerierte Abschnitte – links Nummer, Titel, ein Satz Erklärung; rechts die Felder; Hairlines dazwischen */
.page--form .newform { max-width: 880px; padding: 0; }
.fsec { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; padding: 26px 28px; }
.fsec + .fsec { border-top: 1px solid var(--n100); }
.fsec__intro { display: flex; flex-direction: column; gap: 4px; }
.fsec__num { font-size: 13px; font-weight: 700; color: var(--n500); min-width: 10px; }
.fsec__title { display: flex; align-items: baseline; gap: 10px; font-size: 16px; font-weight: 700; line-height: 1.35; margin: 0; }
 /* bündig mit dem Titel neben der Nummer */
.fsec__body { display: flex; flex-direction: column; gap: 18px; min-width: 0; padding-top: 3px; } /* Label-Oberkante auf Höhe des Abschnittstitels */
.newform__actions { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 28px; border-top: 1px solid var(--n100); background: var(--n25); border-radius: 0 0 14px 14px; }
/* Vorschau des gewählten Fragebogens unter dem Dropdown */
.tplinfo { display: flex; gap: 12px; align-items: center; }
.tplinfo__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; font-weight: 600; line-height: 1.45; color: var(--n600); }
.tplinfo__meta { color: var(--n500); }
.linkbtn { align-self: flex-start; border: 0; background: none; padding: 0; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--n600);
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--n300); transition: color var(--ease), text-decoration-color var(--ease); }
.linkbtn:hover { color: var(--n900); text-decoration-color: var(--n600); }
.field__top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.field__top .field__label, .hint__trigger { white-space: nowrap; }
.card__meta { display: flex; align-items: baseline; gap: 12px; }
/* Erklär-Popover (Horamic 06): Auslöser gestrichelt unterstrichen, Popover weiß, Rand #D7DDE1, R12, Float-Schatten */
.hint { position: relative; display: inline-flex; }
.hint__trigger { border: 0; background: none; padding: 0; font-family: inherit; font-size: 12px; font-weight: 600; color: var(--n600); cursor: help;
  text-decoration: underline dashed var(--n200); text-underline-offset: 3px; transition: color var(--ease), text-decoration-color var(--ease); }
.hint__trigger:hover, .hint.is-open .hint__trigger { color: var(--n900); text-decoration-color: var(--n600); }
.hint__pop { display: none; position: absolute; z-index: 30; top: calc(100% + 8px); right: 0; width: 280px; padding: 14px 16px;
  background: var(--n0); border: 1px solid var(--n200); border-radius: 12px; box-shadow: var(--shadow-float); text-align: left; }
.hint:hover .hint__pop, .hint:focus-within .hint__pop, .hint.is-open .hint__pop { display: block; animation: hintIn .15s ease; }
.hint__title { font-size: 13px; font-weight: 700; color: var(--n900); }
.hint__text { font-size: 13px; font-weight: 600; line-height: 1.5; color: var(--n600); margin: 4px 0 0; }
.hint__foot { font-size: 12px; font-weight: 600; color: var(--n500); border-top: 1px solid var(--n100); margin-top: 10px; padding-top: 8px; }
@keyframes hintIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.linkrow { display: flex; gap: 10px; }
.linkrow .input { flex-grow: 1; }

.status { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--n600); line-height: 1.4; }
/* Rücklauf: abgeschickt = gefüllter Punkt, in Bearbeitung = leerer Ring (gleiche Logik wie im Bogen) */
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; border: 1.5px solid var(--n400); }
.dot--done { background: var(--done); border-color: var(--done); }

.checkline { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.check { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; border-radius: 5px; margin: 0; flex-shrink: 0;
  border: 1px solid var(--n300); background: var(--n0); display: inline-grid; place-content: center; cursor: pointer;
  transition: background-color var(--ease), border-color var(--ease); }
.check:hover { border-color: var(--n600); }
.check:checked { background: var(--n900); border-color: var(--n900); }
.check:checked::before { content: ''; width: 10px; height: 6px; border: solid #fff; border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }

.circle--sm { width: 34px; height: 34px; }
.popover__actions { display: flex; flex-direction: column; align-items: flex-start; }
.popover__actions .btn--text { padding: 6px 0; text-decoration: none; }

.btn svg + span, .btn span + svg { margin-left: 0; }

/* ---------- Login ---------- */
.login { background: var(--n25); min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; padding: 40px 16px; }
.login__brand { text-align: center; }
.login__brand img { display: block; height: 28px; width: auto; margin: 0 auto; }
.login__brand .label-quiet { margin-top: 10px; }
.login .card { width: 400px; max-width: 100%; padding: 28px; }
.login__card .login__brand { margin-bottom: 26px; }
.login__note { text-align: center; }

/* ---------- Popover / Modal / Toast ---------- */
.popover {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 230px;
  background: var(--n0); border: 1px solid var(--n200); border-radius: 12px; box-shadow: var(--shadow-float);
  padding: 14px 16px; animation: fadeInUp 150ms ease;
}
.popover .h3 { font-size: 13px; }
.popover .meta { margin-bottom: 8px; }
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(14, 16, 19, 0.44);
  display: flex; align-items: center; justify-content: center; padding: 24px; animation: fadeIn 150ms ease; }
.modal { background: var(--n0); border-radius: 16px; box-shadow: var(--shadow-modal); padding: 26px 28px; width: 480px; max-width: 100%; }
.modal:focus { outline: none; }
.modal--wide { width: 640px; max-height: calc(100vh - 40px); overflow-y: auto; }

.modal__actions .grow { flex-grow: 1; }
@media (max-width: 600px) {
  .modal--wide { padding: 22px 18px; }
  .modal--wide .modal__actions { flex-wrap: wrap; }
  .modal--wide .modal__actions .grow { display: none; }
  .modal--wide .modal__actions .btn { flex: 1 1 100%; justify-content: center; }
  .modal--wide .modal__actions .btn--primary { order: -1; }
  .modal--wide .modal__actions .btn--quiet { order: 1; }
  
}

.modal__text { margin: 10px 0 0; color: var(--n600); }
 /* Text zum Markieren, wenn Kopieren scheitert */
.modal__actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 22px; }

.toasts { position: fixed; right: 24px; bottom: 24px; z-index: 60; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.toast {
  display: flex; gap: 12px; align-items: flex-start; width: 360px; max-width: calc(100vw - 32px);
  background: var(--inverse); color: #fff; border-radius: 14px; padding: 17px 18px;
  box-shadow: 0 12px 32px rgba(16, 24, 32, 0.22); animation: toastIn 450ms cubic-bezier(.25, .8, .3, 1);
}
.toast__icon { width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(23, 201, 100, 0.16); color: var(--success-base); }
.toast__title { font-size: 15px; font-weight: 700; line-height: 1.35; }
.toast__text { font-size: 13px; font-weight: 600; color: var(--n400); line-height: 1.4; }
.toast__close { margin-left: auto; background: none; border: 0; color: var(--n400); cursor: pointer; padding: 2px; border-radius: 6px; }
.toast__close:hover { color: #fff; }
.toast--error .toast__icon { background: rgba(255, 71, 87, 0.18); color: var(--error-base); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateX(48px); } to { opacity: 1; transform: none; } }

/* ---------- schmal ---------- */
@media (max-width: 720px) {
  .bar__inner, .page { padding-left: 16px; padding-right: 16px; }
  .page { padding-top: 24px; }
  .h1 { font-size: 22px; line-height: 1.25; }
  .pcard { flex-wrap: wrap; gap: 14px; }
  .pcard__main { flex-basis: 100%; }
  .prow { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px 14px; padding: 14px 16px; }
  .prow__main { grid-column: 2 / 4; }
  .prow > .progress { grid-column: 2; width: auto; }
  .prow > .chip { grid-column: 3; justify-self: end; }
  .prow > .pcard__go { display: none; }
  .prow--add { display: flex; gap: 14px; }
  .form__row { grid-template-columns: 1fr; }
  .modes { grid-template-columns: 1fr; }
  .newform__actions { padding: 14px 18px; }
  .linkrow { flex-direction: column; }
  
  
  
  
  .actions { flex-wrap: wrap; }
  
  
}
@media (max-width: 860px) {
  .fsec { grid-template-columns: 1fr; gap: 14px; padding: 22px 20px; }
}
@media (max-width: 720px) {
  .fsec { padding: 20px 18px; }
  .hint__pop { width: min(280px, calc(100vw - 48px)); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  @page { size: A4; margin: 14mm 14mm 16mm; }
  html, body { background: #fff !important; }
  .bar, .toasts, .scrim, .back, .no-print, .res__toolbar, .person__tools .btn, .person__edit .btn { display: none !important; }
  .main { padding: 0 !important; }
  .page { max-width: none; padding: 0; }
  .titlebar { margin-bottom: 12px; }
  .card { box-shadow: none !important; border: 1px solid #d6d6d6; break-inside: avoid; }
  
  .chip, .dot, .res__bar-track i, .res__scale-track, .res__scale-dot, .res__scale-span { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Icon-Kachel vor dem Namen (wie die Favicon-Kachel in Horamic): hellgraue Fläche, schwarzes Linien-Icon */
.tpltile { flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px; background: var(--n50); border: 1px solid var(--n100);
  color: var(--n900); display: inline-flex; align-items: center; justify-content: center; }
.tpltile--lg { width: 52px; height: 52px; border-radius: 14px; }
.tpltile--lg svg { width: 26px; height: 26px; }

.input--sm, .select--sm { width: auto; padding-top: 7px; padding-bottom: 7px; font-size: 14px; }

@media (max-width: 720px) {
  .bar__logo, .bar__logo img { height: 18px; }
  .titlebar { flex-wrap: wrap; row-gap: 10px; }
  .viewswitch { column-gap: 16px; }
  .titlebar.titlebar--switch { margin-bottom: 28px; }
  .viewswitch .h1 { font-size: 24px; }
  
  
  
  
  
  
  
  
  
  
  
}

/* ---------- Schmale Handys: nie seitlich scrollen ---------- */
html { overflow-x: hidden; } /* Sicherheitsnetz am Viewport */
body { overflow-wrap: break-word; }
/* Touch-Geräte: 16 px in Eingabefeldern, sonst zoomt iOS beim Antippen hinein */
@media (pointer: coarse), (max-width: 720px) {
  .input, .select, .input--sm, .select--sm { font-size: 16px; }
}


/* ---------- Tabelle (Horamic-Master) ---------- */
.table__head, .table__row {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) 130px 150px; gap: 14px; align-items: center;
}
.table__head { padding: 14px 22px 12px; border-bottom: 1px solid var(--n100); font-size: 13px; font-weight: 700; color: var(--n500); }
.table__row { padding: 16px 22px; transition: background-color var(--ease); }
.table__row + .table__row { border-top: 1px solid var(--n100); }
.table__row:hover { background: var(--row-hover); }
.table__name { font-size: 14px; font-weight: 700; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--n600); line-height: 1.4; }
/* Rücklauf: abgeschickt = gefüllter Punkt, in Bearbeitung = leerer Ring (gleiche Logik wie im Bogen) */
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; border: 1.5px solid var(--n400); }
.dot--done { background: var(--done); border-color: var(--done); }
.table__end { justify-self: end; display: flex; align-items: center; gap: 8px; }
.table__empty { padding: 22px; color: var(--n600); }
.table__link { color: var(--n900); text-decoration: underline; text-decoration-color: var(--n300); text-underline-offset: 3px; transition: text-decoration-color var(--ease); }
.table__link:hover { text-decoration-color: var(--n900); }
.table__name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.table__name .table__link { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 720px) {
  .table__head { display: none; }
  .table__row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
  .table__row .table__when { grid-column: 1; }
  .table__row .table__end { grid-row: 1 / span 3; grid-column: 2; }
}

/* Datensicherung (wie Brandup) */
.backups__grid { display: grid; grid-template-columns: 150px minmax(0, 1.2fr) minmax(0, 1.3fr) auto; gap: 14px; align-items: center; }
.backups__reason { font-weight: 700; }
.backups__grid .table__end { display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.backups__grid .chip { margin-bottom: 4px; }
.sysinfo { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: 14px; }
.sysinfo dt { color: var(--n500); font-weight: 600; }
.sysinfo dd { margin: 0; font-weight: 600; }
.card--warn { background: var(--warning-surface, #FFF4E5); border-color: transparent; color: var(--warning-text, #8A4B00); margin-bottom: 16px; }
@media (max-width: 720px) {
  .backups__grid { grid-template-columns: minmax(0, 1fr) auto; }
  .backups__grid > [role="cell"]:nth-child(2), .backups__grid > [role="cell"]:nth-child(3) { grid-column: 1; }
  .backups__grid .table__end { grid-row: 1; grid-column: 2; }
  .sysinfo { grid-template-columns: 1fr; gap: 2px; }
  .sysinfo dd { margin-bottom: 8px; }
}

/* Personen wie in Brandup/Sondle: ich schwarz, andere weiß mit Rand – keine Personenfarben */
.pbadge { width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; letter-spacing: 0.02em; background: var(--n0); color: var(--n900); box-shadow: inset 0 0 0 1px var(--n200); }
.pbadge.is-me { background: var(--n900); color: #fff; box-shadow: none; }
.fsec__text { font-size: 13px; font-weight: 600; line-height: 1.45; color: var(--n600); margin: 2px 0 0 20px; }
.pgroup__title { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 12px; }
.pgroup__meta { font-size: 13px; font-weight: 600; color: var(--n500); }
