/* MyFeedback – Oberfläche
   Farben aus der Marke: Koralle/Orange (Mitarbeitende), Violett (Organisationen & Team), Nacht (Struktur).
   Der Verlauf Violett → Pink → Orange gehört zur Wortmarke und wird sonst sparsam eingesetzt. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.260c81a4759b.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-latin-ext-wght-normal.1ad231aac0a8.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-cyrillic-wght-normal.de93fdc85e3d.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-cyrillic-ext-wght-normal.251d36f2b5a6.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Anek"; font-style: normal; font-weight: 100 800; font-stretch: 75% 125%; font-display: swap;
  src: url("../fonts/anek-latin-latin-standard-normal.28251d33f3f8.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Anek"; font-style: normal; font-weight: 100 800; font-stretch: 75% 125%; font-display: swap;
  src: url("../fonts/anek-latin-latin-ext-standard-normal.77ed4ceb9360.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Vazirmatn"; font-weight: 400; font-display: swap; src: url("../fonts/vazirmatn-arabic-400-normal.49c0cc018008.woff2") format("woff2"); }
@font-face { font-family: "Vazirmatn"; font-weight: 500; font-display: swap; src: url("../fonts/vazirmatn-arabic-500-normal.b58020ccff5c.woff2") format("woff2"); }
@font-face { font-family: "Vazirmatn"; font-weight: 700; font-display: swap; src: url("../fonts/vazirmatn-arabic-700-normal.51265c214faf.woff2") format("woff2"); }

:root {
  --coral: #fe7f5c;
  --coral-strong: #f2643d;
  --coral-ink: #b2421f;
  --coral-soft: #fff1ec;
  --violet: #7b3fe4;
  --violet-strong: #6a31d1;
  --violet-ink: #5a2bb8;
  --violet-soft: #f2ecfc;
  --night: #1f1a3a;
  --night-2: #2f2852;
  --ink-deep: #18162e;
  --ink: #2a2238;
  --muted: #6e6680;
  --faint: #9a93a8;
  --line: #e4deee;
  --line-strong: #cfc6de;
  --paper: #f7f5fb;
  --white: #ffffff;
  --ok: #1e7a55; --ok-soft: #e7f5ee;
  --warn: #8f5500; --warn-soft: #fff4dd;
  --bad: #b42318; --bad-soft: #fdecea;

  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Anek", "Inter", system-ui, sans-serif;
  --r-sm: 8px; --r: 12px; --r-lg: 18px;
  --gap: 16px;
  --focus: 0 0 0 3px #fff, 0 0 0 6px var(--violet);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font-ui); font-size: 15.5px; line-height: 1.55; color: var(--ink);
  background: var(--paper); font-feature-settings: "cv11", "ss01";
}
[dir="rtl"] body, body[dir="rtl"] { --font-ui: "Vazirmatn", "Inter", sans-serif; --font-head: "Vazirmatn", "Inter", sans-serif; }
img, svg { max-width: 100%; }
.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; stroke-width: 1.9; }

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; font-stretch: 92%; line-height: 1.15; margin: 0 0 .4em; color: var(--night); letter-spacing: -0.005em; }
h1 { font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem); }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.12rem; }
h4 { font-size: 1rem; }
p { margin: 0 0 .9em; }
small, .small { font-size: .86rem; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
a { color: var(--violet-ink); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
code, .mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .92em; overflow-wrap: anywhere; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--night); color: #fff; padding: 10px 14px; border-radius: var(--r-sm); z-index: 50; }
.skip:focus { top: 12px; }

/* ------------------------------------------------------------ Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 1.5px solid transparent;
  font: 600 .95rem/1.2 var(--font-ui); cursor: pointer; text-decoration: none; white-space: nowrap;
  background: var(--white); color: var(--night); border-color: var(--line-strong);
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { border-color: var(--night); text-decoration: none; }
.btn-primary { background: var(--violet); border-color: var(--violet); color: #fff; }
.btn-primary:hover { background: var(--violet-strong); border-color: var(--violet-strong); }
.btn-coral { background: var(--coral); border-color: var(--coral); color: var(--night); }
.btn-coral:hover { background: var(--coral-strong); border-color: var(--coral-strong); }
.btn-night { background: var(--night); border-color: var(--night); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--violet-ink); padding-inline: 10px; }
.btn-ghost:hover { background: var(--violet-soft); border-color: transparent; }
.btn-danger { color: var(--bad); border-color: #efc4bf; }
.btn-danger:hover { background: var(--bad-soft); border-color: var(--bad); }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: .86rem; }
.btn-lg { min-height: 54px; padding: 14px 26px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn-row.end { justify-content: flex-end; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--violet-ink); cursor: pointer; text-decoration: underline; text-underline-offset: .18em; }

/* ------------------------------------------------------------ Formulare */
form { margin: 0; }
.field { margin-bottom: 18px; }
.field > label, .label { display: block; font-weight: 600; font-size: .93rem; margin-bottom: 6px; color: var(--night); }
.field .hint { color: var(--muted); font-size: .85rem; margin-top: 6px; }
.field .errors { color: var(--bad); font-size: .87rem; margin-top: 6px; font-weight: 500; }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: var(--bad); }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=url], input[type=search],
select, textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--white); color: var(--ink); font: 400 1rem/1.4 var(--font-ui);
}
textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(122, 72, 209, .18); }
input[type=color] { width: 64px; height: 44px; padding: 4px; border-radius: var(--r-sm); border: 1.5px solid var(--line-strong); background: #fff; }
input[type=file] { font: inherit; font-size: .9rem; color: var(--muted); }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; color: var(--night); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; margin-inline-end: 10px; cursor: pointer; }
input[type=file]::file-selector-button:hover { border-color: var(--violet); }
.input-code { font-family: var(--font-head); font-stretch: 100%; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: 1.25rem !important; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--violet); flex: none; }
.check-list { display: grid; gap: 10px; }
.field > label.check { display: flex; font-weight: 400; margin-bottom: 0; }
.field > div > div > label:has(> input[type=radio]) { display: flex; gap: 10px; align-items: flex-start; padding: 5px 0; cursor: pointer; }
.field > div > div > label > input[type=radio] { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--violet); flex: none; }
.honey { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
fieldset { border: 0; padding: 0; margin: 0 0 18px; }
legend { font-weight: 600; color: var(--night); margin-bottom: 8px; padding: 0; }

/* Auswahlkarten (Empfänger) */
.choices { display: grid; gap: 10px; }
.choice { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border: 1.5px solid var(--line-strong);
  border-radius: var(--r); background: var(--white); cursor: pointer; transition: border-color .15s, background-color .15s; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; margin-top: 1px; display: grid; place-items: center; }
.choice .dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: transparent; }
.choice strong { display: block; color: var(--night); font-size: 1rem; }
.choice span.desc { color: var(--muted); font-size: .9rem; }
.choice:hover { border-color: var(--night); }
.choice:has(input:checked) { border-color: var(--night); background: var(--coral-soft); }
.choice:has(input:checked) .dot { border-color: var(--night); }
.choice:has(input:checked) .dot::after { background: var(--night); }
.choice:has(input:focus-visible) { box-shadow: var(--focus); }
.choice.neutral { border-style: dashed; }

/* ------------------------------------------------------------ Hinweise */
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--r-sm); background: var(--violet-soft); color: var(--night); margin-bottom: 16px; font-size: .95rem; }
.notice .i { margin-top: 2px; }
.notice p:last-child { margin-bottom: 0; }
.notice.success { background: var(--ok-soft); color: #134d36; }
.notice.warning { background: var(--warn-soft); color: #5c3700; }
.notice.error { background: var(--bad-soft); color: #7a1810; }
.notice.coral { background: var(--coral-soft); color: #6d2a14; }
.messages { margin-bottom: 18px; }

/* ------------------------------------------------------------ Status-Pillen */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--paper); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .85; }
.pill.plain::before { display: none; }
.pill-new, .pill-coral { background: var(--coral-soft); color: var(--coral-ink); border-color: #ffd5c7; }
.pill-progress, .pill-violet { background: var(--violet-soft); color: var(--violet-ink); border-color: #ddd0f6; }
.pill-answered, .pill-ok, .pill-active { background: var(--ok-soft); color: var(--ok); border-color: #c4e6d5; }
.pill-closed, .pill-muted { background: #f1eff4; color: var(--muted); }
.pill-warn, .pill-pending { background: var(--warn-soft); color: var(--warn); border-color: #f4dfb4; }
.pill-bad, .pill-rejected, .pill-suspended { background: var(--bad-soft); color: var(--bad); border-color: #f3c8c2; }
.unread-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--coral); display: inline-block; flex: none; }

/* ================================================================ Öffentliche Seiten (Mitarbeitende) */
.public { min-height: 100vh; display: flex; flex-direction: column; }
.public-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px clamp(16px, 4vw, 40px); }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink-deep); }
.brand-tile { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; flex: none; }
.brand-mark { width: 36px; height: 36px; display: block; }
.brand .wordmark { height: 19px; width: auto; display: block; }
.public-main { flex: 1; width: 100%; max-width: 600px; margin: 0 auto; padding: 8px 16px 48px; }
.public-main.wide { max-width: 760px; }
.public-foot { padding: 24px 16px 32px; text-align: center; color: var(--muted); font-size: .85rem; }
.public-foot a { color: var(--muted); margin: 0 8px; }

.lang { position: relative; }
.lang summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: #fff; cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--night); }
.lang summary::-webkit-details-marker { display: none; }
.lang[open] summary { border-color: var(--night); }
.lang ul { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); list-style: none; margin: 0; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 12px 32px rgba(43, 29, 74, .14); min-width: 210px; z-index: 20; }
.lang li a { display: block; padding: 9px 12px; border-radius: var(--r-sm); text-decoration: none; color: var(--ink); }
.lang li a:hover, .lang li a[aria-current="true"] { background: var(--violet-soft); color: var(--night); }

.steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 4px 0 22px; counter-reset: step; }
.steps li { flex: 1; display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--faint); font-weight: 600; counter-increment: step; }
.steps li::before { content: counter(step); width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; font-size: .8rem; flex: none; background: #fff; }
.steps li.done { color: var(--muted); }
.steps li.done::before { content: "✓"; background: var(--night); border-color: var(--night); color: #fff; }
.steps li.now { color: var(--night); }
.steps li.now::before { background: var(--coral); border-color: var(--coral); color: var(--night); }
@media (max-width: 420px) { .steps li span { display: none; } .steps li { flex: none; } }

.hero-title { font-size: clamp(2rem, 1.5rem + 2.4vw, 2.9rem); line-height: 1.05; margin-bottom: 12px; font-stretch: 88%; }
.lead { font-size: 1.08rem; color: var(--muted); margin-bottom: 26px; max-width: 34em; }

/* Der Zettel: die eigentliche Eingabe */
.slip { position: relative; background: #fff; border-radius: var(--r-lg); padding: clamp(20px, 4vw, 30px); border: 1px solid var(--line); }
.slip::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--coral); }
.slip + .slip { margin-top: 16px; }
.slip textarea { min-height: 200px; font-size: 1.04rem; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 30px, #f0ecf5 30px, #f0ecf5 31px); background-attachment: local; line-height: 31px; padding-top: 8px; }
.code-input { font-size: 1.5rem !important; min-height: 60px !important; text-align: center; }
.counter { text-align: end; font-size: .82rem; color: var(--faint); margin-top: 6px; }

.serious { margin-top: 22px; padding: 16px 18px; border-radius: var(--r); background: var(--paper); border: 1px solid var(--line); }
.serious h2 { font-size: 1.05rem; margin: 0 0 6px; }
.serious p { margin: 0 0 8px; }
.serious p:last-child { margin-bottom: 0; }
.serious a { overflow-wrap: anywhere; }
.recipient-org { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--r); background: var(--paper); margin-bottom: 22px; }
.recipient-org .org-initial { width: 44px; height: 44px; border-radius: 12px; background: var(--night); color: #fff; display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; flex: none; }
.recipient-org strong { display: block; font-size: 1.05rem; color: var(--night); }
.recipient-org .meta { color: var(--muted); font-size: .88rem; }

.promises { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.promises li { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: .93rem; }
.promises .i { color: var(--violet); margin-top: 3px; }

/* Die Marke (Vorgangsnummer) */
.ticket { position: relative; margin: 24px 0; background: var(--night); color: #fff; border-radius: var(--r-lg); overflow: hidden; }
.ticket-top { padding: 22px 24px 18px; }
.ticket-top .label { color: #cbbfe6; font-size: .85rem; font-weight: 600; margin: 0 0 10px; }
.ticket-code { display: flex; flex-wrap: wrap; gap: 8px 12px; font-family: var(--font-head); font-weight: 700; font-stretch: 100%; font-size: clamp(1.7rem, 1.2rem + 2.5vw, 2.4rem); letter-spacing: .06em; direction: ltr; }
.ticket-code span { background: rgba(255, 255, 255, .08); border-radius: 10px; padding: 2px 10px; }
.ticket-perf { position: relative; height: 0; border-top: 2px dashed rgba(255, 255, 255, .28); margin: 0 18px; }
.ticket-perf::before, .ticket-perf::after { content: ""; position: absolute; top: -12px; width: 22px; height: 22px; border-radius: 50%; background: var(--paper); }
.ticket-perf::before { left: -30px; }
.ticket-perf::after { right: -30px; }
.ticket-bottom { padding: 16px 24px 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; color: #e3dcf2; font-size: .9rem; }
.ticket .btn { background: var(--coral); border-color: var(--coral); color: var(--night); }

/* Gesprächsverlauf */
.thread { display: grid; gap: 14px; margin: 18px 0; }
.msg { max-width: 92%; padding: 14px 16px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); overflow-wrap: anywhere; }
.msg .body { white-space: pre-wrap; }
.msg .who { display: flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; white-space: normal; }
.msg.from-employee { justify-self: start; border-end-start-radius: 4px; }
.msg.from-org { justify-self: end; background: var(--violet-soft); border-color: #ddd0f6; border-end-end-radius: 4px; }
.msg.from-note { justify-self: stretch; max-width: 100%; background: var(--warn-soft); border: 1.5px dashed #e9c98b; }
.public .msg.from-employee { justify-self: end; background: var(--coral-soft); border-color: #ffd5c7; border-end-end-radius: 4px; border-end-start-radius: 16px; }
.public .msg.from-org { justify-self: start; background: #fff; border-end-start-radius: 4px; border-end-end-radius: 16px; }

/* ================================================================ Anmeldung */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 0.9fr) 1.1fr; }
.auth-art { position: relative; background: linear-gradient(140deg, var(--coral) 0%, #b85e8f 46%, var(--night) 100%); color: #fff; padding: clamp(28px, 5vw, 56px); display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.auth-art .brand { color: #fff; }
/* Auf dem Farbverlauf verschwindet der farbige Teil der Wortmarke – dort ganz in Weiß */
.auth-art .brand .wordmark path { fill: currentColor; }
.auth-art .brand-tile, .side .brand-tile, .mobile-bar .brand-tile { background: #fff; }
.auth-art blockquote { margin: 0; font-family: var(--font-head); font-weight: 600; font-stretch: 88%; font-size: clamp(1.8rem, 1.2rem + 2vw, 2.7rem); line-height: 1.08; max-width: 12em; }
.auth-art p { color: rgba(255, 255, 255, .86); max-width: 28em; }
.auth-art .bubbles { position: absolute; inset-inline-end: -40px; top: 18%; width: 260px; opacity: .16; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card.wide { max-width: 640px; }
.auth-card h1 { margin-bottom: 8px; }
.auth-card .lead { margin-bottom: 26px; }
.auth-links { margin-top: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: .92rem; }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { min-height: 0; padding: 22px 20px; }
  .auth-art blockquote, .auth-art p, .auth-art .bubbles { display: none; }
}

/* ================================================================ App (Organisationen & Team) */
.app { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--night); color: #e8e1f6; }
.side-inner { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; padding: 22px 14px; }
.side .brand { color: #fff; padding: 2px 10px 18px; }
.side-org { margin: 0 6px 18px; padding: 12px; border-radius: var(--r); background: var(--night-2); }
.side-org .label { font-size: .75rem; color: #b8abd6; margin-bottom: 2px; }
.side-org strong { display: block; color: #fff; font-size: .95rem; line-height: 1.3; overflow-wrap: anywhere; }
.side nav { display: grid; gap: 2px; }
.side nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #ddd4ef; text-decoration: none; font-weight: 500; font-size: .94rem; }
.side nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.side nav a[aria-current="page"] { background: #fff; color: var(--night); font-weight: 600; }
.side nav a[aria-current="page"] .i { color: var(--violet); }
.side nav .badge { margin-inline-start: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--coral); color: var(--night); font-size: .78rem; font-weight: 700; display: grid; place-items: center; }
.side-foot { margin-top: auto; padding-top: 18px; display: grid; gap: 2px; }
.side-foot a, .side-foot button { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: #c6bbe0; text-decoration: none; background: none; border: 0; font: 500 .9rem var(--font-ui); cursor: pointer; width: 100%; text-align: start; }
.side-foot a:hover, .side-foot button:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-size: .86rem; color: #c6bbe0; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--coral); color: var(--night); display: grid; place-items: center; font-weight: 700; font-size: .8rem; flex: none; }

.main { padding: clamp(18px, 3vw, 34px) clamp(16px, 3.5vw, 44px) 60px; max-width: 1180px; width: 100%; min-width: 0; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; margin-bottom: 24px; }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--muted); margin: 6px 0 0; max-width: 46em; }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--muted); text-decoration: none; margin-bottom: 10px; }
.back:hover { color: var(--night); }
[dir="rtl"] .back .i { transform: scaleX(-1); }

.mobile-bar { display: none; }
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .mobile-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--night); position: sticky; top: 0; z-index: 30; }
  .mobile-bar .brand { color: #fff; }
  .mobile-bar details summary { list-style: none; color: #fff; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.3); cursor: pointer; font-weight: 600; }
  .mobile-bar details summary::-webkit-details-marker { display: none; }
  .mobile-bar details[open] + .mobile-nav, .mobile-nav.open { display: block; }
  .mobile-menu { position: fixed; inset: 60px 0 0 0; background: var(--night); padding: 12px 14px 30px; overflow-y: auto; }
  .mobile-menu nav { display: grid; gap: 2px; }
  .mobile-menu a, .mobile-menu button { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; color: #ece6f8; text-decoration: none; font-weight: 500; background: none; border: 0; font: inherit; width: 100%; text-align: start; }
  .mobile-menu a[aria-current="page"] { background: #fff; color: var(--night); }
  .mobile-menu .badge { margin-inline-start: auto; background: var(--coral); color: var(--night); border-radius: 999px; padding: 0 8px; font-weight: 700; }
}

/* Flächen */
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 20px; }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 18px 22px 0; }
.panel-head h2, .panel-head h3 { margin: 0; }
.panel-head p { margin: 4px 0 0; color: var(--muted); font-size: .92rem; }
.panel-body { padding: 18px 22px 22px; }
.panel-body > :last-child { margin-bottom: 0; }
.panel.flat { background: transparent; border-style: dashed; }
.panel.accent { border-color: #ddd0f6; background: linear-gradient(0deg, #fff, #fff) padding-box; box-shadow: inset 4px 0 0 var(--violet); }
[dir="rtl"] .panel.accent { box-shadow: inset -4px 0 0 var(--violet); }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr); align-items: start; }
@media (max-width: 1100px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .grid-2, .grid-3, .grid-main { grid-template-columns: minmax(0, 1fr); } }
.stack > * + * { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.wrap { flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Kennzahlen – schlicht, in einer Zeile */
.figures { display: flex; flex-wrap: wrap; gap: 10px 32px; padding: 4px 0; }
.figure { display: flex; align-items: baseline; gap: 8px; }
.figure b { font-family: var(--font-head); font-weight: 700; font-size: 1.7rem; color: var(--night); font-stretch: 100%; }
.figure span { color: var(--muted); font-size: .9rem; }

/* Listen */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 14px; padding: 14px 22px; border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 600; color: var(--night); display: block; overflow-wrap: anywhere; }
.list .meta { color: var(--muted); font-size: .86rem; }
.list a.rowlink { color: inherit; text-decoration: none; }
.list a.rowlink:hover .title { text-decoration: underline; }
.list .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) { .list > li { flex-wrap: wrap; padding: 14px 16px; } .list .actions { width: 100%; justify-content: flex-start; } }

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: start; font-size: .8rem; color: var(--muted); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: end; font-variant-numeric: tabular-nums; }
.table tbody tr:hover { background: #fcfbfe; }

.empty { text-align: center; padding: 34px 20px; color: var(--muted); }
.empty .i { width: 34px; height: 34px; color: var(--line-strong); margin-bottom: 6px; }
.empty strong { display: block; color: var(--night); font-size: 1.02rem; margin-bottom: 4px; }

/* Aufgaben-Liste auf der Übersicht */
.tasks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.tasks li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 14px; border-radius: var(--r); background: var(--paper); }
.tasks li .i { color: var(--violet); }
.tasks li span { flex: 1 1 200px; min-width: 0; }

/* Zugangscode groß */
.codebox { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
.codebox .qr { width: 148px; height: 148px; padding: 10px; border-radius: var(--r); background: #fff; border: 1px solid var(--line); flex: none; }
.bigcode { font-family: var(--font-head); font-weight: 700; font-stretch: 100%; font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.3rem); letter-spacing: .03em; color: var(--night); line-height: 1.1; direction: ltr; overflow-wrap: anywhere; }
.bigcode.sm { font-size: 1.45rem; white-space: nowrap; }
.code-meta { color: var(--muted); font-size: .9rem; margin-top: 6px; }

/* Segmentierte Auswahl / Reiter */
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: #ece7f4; margin-bottom: 18px; flex-wrap: wrap; }
.tabs a { padding: 8px 16px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .9rem; }
.tabs a[aria-current="page"] { background: #fff; color: var(--night); box-shadow: 0 1px 2px rgba(43, 29, 74, .12); }
.subnav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.subnav a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; font-size: .9rem; font-weight: 500; }
.subnav a[aria-current="page"] { background: var(--night); color: #fff; border-color: var(--night); }

/* Aufklappbare Bereiche */
details.more > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--violet-ink); }
details.more > summary::-webkit-details-marker { display: none; }
details.more[open] > summary .i { transform: rotate(180deg); }
details.more > div { margin-top: 14px; }
details.confirm { display: inline-block; position: relative; }
details.confirm > summary { list-style: none; }
details.confirm > summary::-webkit-details-marker { display: none; }
details.confirm[open] > .pop { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 15; width: min(320px, 80vw); background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px; box-shadow: 0 12px 32px rgba(43, 29, 74, .14); }
details.confirm .pop p { font-size: .9rem; }

/* Ebenen-Seite */
.level { border-top: 1px solid var(--line); }
.level:first-of-type { border-top: 0; }
.member { display: flex; align-items: center; gap: 12px; padding: 10px 0; flex-wrap: wrap; }
.member .grow { flex: 1; min-width: 180px; }

/* Einrichtungs-Assistent */
.setup-level { border: 1.5px solid var(--line-strong); border-radius: var(--r); background: #fff; margin-bottom: 12px; }
.setup-level > .setup-toggle { display: flex; gap: 12px; align-items: center; padding: 14px 16px; cursor: pointer; }
.setup-level > .setup-toggle input { width: 20px; height: 20px; accent-color: var(--violet); }
.setup-level > .setup-toggle strong { flex: 1; color: var(--night); }
.setup-level .setup-body { padding: 0 16px 16px; border-top: 1px dashed var(--line); }
.setup-level:has(.setup-toggle input:checked) { border-color: var(--violet); }
.setup-level.js-collapsed .setup-body { display: none; }
.recipient-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; margin-bottom: 8px; }
@media (max-width: 640px) { .recipient-row { grid-template-columns: 1fr; } }
.recipient-row.js-hidden { display: none; }

/* Ergebnisbalken (Befragungen) */
.bars { display: grid; gap: 6px; margin: 10px 0 4px; }
.bar { display: grid; grid-template-columns: minmax(70px, 180px) 1fr 64px; gap: 10px; align-items: center; font-size: .88rem; }
.bar .track { height: 14px; background: #efebf5; border-radius: 4px; overflow: hidden; }
.bar .fill { display: block; height: 100%; background: var(--violet); border-radius: 0 4px 4px 0; }
.bar .val { text-align: end; color: var(--muted); font-variant-numeric: tabular-nums; }
.scale-strip { display: flex; gap: 2px; height: 20px; margin: 10px 0 6px; background: #fff; }
.scale-strip span { display: block; height: 100%; min-width: 2px; }
.scale-strip span:first-child { border-radius: 4px 0 0 4px; }
.scale-strip span:last-child { border-radius: 0 4px 4px 0; }
.s1 { background: #d4542f; } .s2 { background: #f5a083; } .s3 { background: #c4bdd0; } .s4 { background: #a483e0; } .s5 { background: #5f31b5; }
.bar .fill { background: #6636bd; }
[dir="rtl"] .bar .fill { border-radius: 4px 0 0 4px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .8rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-inline-end: 6px; vertical-align: -1px; }
.quote { padding: 10px 14px; border-inline-start: 3px solid var(--line-strong); background: var(--paper); border-radius: 0 var(--r-sm) var(--r-sm) 0; margin-bottom: 8px; white-space: pre-wrap; }

/* Fragebogen */
.q-card { padding: 18px 0; border-top: 1px solid var(--line); }
.q-card:first-child { border-top: 0; }
.q-card .q-text { font-weight: 600; color: var(--night); font-size: 1.04rem; margin-bottom: 4px; }
.q-card.has-error .q-text { color: var(--bad); }
.q-section { margin: 26px 0 0; padding-top: 6px; }
.scale-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.scale-row label { position: relative; flex: 1; min-width: 44px; }
.scale-row input { position: absolute; opacity: 0; }
.scale-row span { display: grid; place-items: center; min-height: 46px; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); font-weight: 600; cursor: pointer; background: #fff; }
.scale-row input:checked + span { background: var(--night); border-color: var(--night); color: #fff; }
.scale-row input:focus-visible + span { box-shadow: var(--focus); }
.scale-ends { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); margin-top: 6px; gap: 12px; }

/* Fragebogen-Baukasten */
.builder-q { display: grid; grid-template-columns: 36px 1fr; gap: 14px; padding: 16px 22px; border-top: 1px solid var(--line); }
.builder-q:first-child { border-top: 0; }
.builder-q .num { width: 32px; height: 32px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; font-weight: 700; font-size: .85rem; color: var(--muted); }
.builder-q.section .num { background: var(--night); color: #fff; }
.builder-q details > summary { cursor: pointer; list-style: none; }
.builder-q details > summary::-webkit-details-marker { display: none; }

/* Siegel-Vorschau & Code-Ausschnitte */
.snippet { position: relative; }
.snippet textarea { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .82rem; min-height: 90px; background: var(--paper); }

/* Schlüssel-Blatt */
.keytext { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.05rem; letter-spacing: .04em; background: var(--paper); border: 1.5px dashed var(--line-strong); border-radius: var(--r-sm); padding: 14px; word-break: break-all; direction: ltr; }

/* Seitennummerierung */
.pager { display: flex; justify-content: center; gap: 8px; margin-top: 18px; align-items: center; color: var(--muted); font-size: .9rem; }

/* Fehlerseiten */
.errorpage { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 40px 16px; }
.errorpage .code { font-family: var(--font-head); font-size: 5rem; font-weight: 700; color: var(--coral); line-height: 1; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { .side, .mobile-bar, .btn, .public-top, .public-foot { display: none !important; } .app { display: block; } body { background: #fff; } }

/* ------------------------------------------------------------ Website-Editor */
.sections { list-style: none; margin: 0; padding: 0; counter-reset: sec; }
.sections > li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--white); margin-bottom: 8px; counter-increment: sec; }
.sections > li:target { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); }
.sections > li.is-hidden { background: var(--paper); border-style: dashed; }
.sections > li.is-hidden .sec-title { color: var(--muted); }
.sec-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; min-width: 0; flex: 1 1 260px; }
.sec-main::before { content: counter(sec); font: 600 .8rem/1 var(--font-ui); color: var(--faint); min-width: 1.2em; }
.sec-kind { font-size: .8rem; font-weight: 600; color: var(--violet-ink); background: var(--violet-soft); border-radius: 999px; padding: 3px 10px; }
.sec-title { font-weight: 600; color: var(--night); text-decoration: none; overflow-wrap: anywhere; }
.sec-title:hover { text-decoration: underline; }
.sec-actions { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.sec-actions form { display: inline-flex; gap: 2px; }
.sec-actions details.confirm .pop { display: grid; gap: 6px; min-width: 240px; }
.sec-actions details.confirm .pop form { display: block; }
.kinds { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.kinds form { height: 100%; }
.kind { display: flex; flex-direction: column; gap: 6px; width: 100%; height: 100%; text-align: start; padding: 18px; border-radius: var(--r);
  border: 1.5px solid var(--line); background: var(--white); cursor: pointer; font: inherit; color: var(--ink); }
.kind:hover { border-color: var(--violet); }
.kind strong { font-family: var(--font-head); font-size: 1.12rem; font-stretch: 94%; color: var(--night); }
.kind span { color: var(--muted); font-size: .9rem; }
.kind em { font-style: normal; font-size: .82rem; color: var(--warn); }
.kind[disabled] { opacity: .55; cursor: not-allowed; }
.btnfields { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px 0; margin: 0 0 18px; }
.btnfields legend { font-weight: 600; color: var(--night); padding: 0 6px; }
.form-grid.three { grid-template-columns: 1fr 1.2fr 1.2fr; }
.items { display: grid; gap: 12px; margin-top: 14px; }
.item { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px 0; margin: 0; background: var(--white); }
.item legend { font-weight: 600; color: var(--night); padding: 0 6px; }
.item-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 0 16px; }
.item-fields .field.wide { grid-column: 1 / -1; }
.sticky-save { position: sticky; bottom: 0; background: linear-gradient(to top, var(--paper) 70%, transparent); padding: 16px 0; margin-top: 8px; z-index: 5; }
.imgs { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 14px; }
.imgs li { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.imgs li:last-child { border-bottom: 0; }
.imgs img { width: 160px; height: 110px; object-fit: cover; border-radius: var(--r-sm); background: var(--paper); }
.imgs .row { display: flex; gap: 8px; }
.imgs .row input { flex: 1; min-width: 0; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 20px; margin: 0 0 18px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) { .form-grid.three, .item-fields { grid-template-columns: 1fr; } .imgs li { grid-template-columns: 1fr; } }
