/* ==========================================================================
   Inhaltsverwaltung · Bruno Gröning-Freundeskreis
   Designvorlage – gemeinsames Stylesheet (Tokens, Layout, Komponenten)
   Keine externen Abhängigkeiten. Schriften liegen lokal unter assets/fonts/.
   ========================================================================== */

/* ---------- Schriften (seit 05.12.2026 wie die Website: Source Sans 3, SIL OFL) ---------- */
@font-face {font-family: 'Source Sans 3'; font-style: italic; font-weight: 200 900; font-display: swap; src: url("/verwalten/assets/fonts/source-sans-3-cyrillic-ext-italic-200-900.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: 'Source Sans 3'; font-style: italic; font-weight: 200 900; font-display: swap; src: url("/verwalten/assets/fonts/source-sans-3-cyrillic-italic-200-900.woff2") format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;}
@font-face {font-family: 'Source Sans 3'; font-style: italic; font-weight: 200 900; font-display: swap; src: url("/verwalten/assets/fonts/source-sans-3-greek-ext-italic-200-900.woff2") format('woff2'); unicode-range: U+1F00-1FFF;}
@font-face {font-family: 'Source Sans 3'; font-style: italic; font-weight: 200 900; font-display: swap; src: url("/verwalten/assets/fonts/source-sans-3-greek-italic-200-900.woff2") format('woff2'); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;}
@font-face {font-family: 'Source Sans 3'; font-style: italic; font-weight: 200 900; font-display: swap; src: url("/verwalten/assets/fonts/source-sans-3-vietnamese-italic-200-900.woff2") format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;}
@font-face {font-family: 'Source Sans 3'; font-style: italic; font-weight: 200 900; font-display: swap; src: url("/verwalten/assets/fonts/source-sans-3-latin-ext-italic-200-900.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face {font-family: 'Source Sans 3'; font-style: italic; font-weight: 200 900; font-display: swap; src: url("/verwalten/assets/fonts/source-sans-3-latin-italic-200-900.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: 'Source Sans 3'; font-style: normal; font-weight: 200 900; font-display: swap; src: url("/verwalten/assets/fonts/source-sans-3-cyrillic-ext-normal-200-900.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: 'Source Sans 3'; font-style: normal; font-weight: 200 900; font-display: swap; src: url("/verwalten/assets/fonts/source-sans-3-cyrillic-normal-200-900.woff2") format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;}
@font-face {font-family: 'Source Sans 3'; font-style: normal; font-weight: 200 900; font-display: swap; src: url("/verwalten/assets/fonts/source-sans-3-greek-ext-normal-200-900.woff2") format('woff2'); unicode-range: U+1F00-1FFF;}
@font-face {font-family: 'Source Sans 3'; font-style: normal; font-weight: 200 900; font-display: swap; src: url("/verwalten/assets/fonts/source-sans-3-greek-normal-200-900.woff2") format('woff2'); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;}
@font-face {font-family: 'Source Sans 3'; font-style: normal; font-weight: 200 900; font-display: swap; src: url("/verwalten/assets/fonts/source-sans-3-vietnamese-normal-200-900.woff2") format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;}
@font-face {font-family: 'Source Sans 3'; font-style: normal; font-weight: 200 900; font-display: swap; src: url("/verwalten/assets/fonts/source-sans-3-latin-ext-normal-200-900.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face {font-family: 'Source Sans 3'; font-style: normal; font-weight: 200 900; font-display: swap; src: url("/verwalten/assets/fonts/source-sans-3-latin-normal-200-900.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;}

/* ---------- Tokens: hell ------------------------------------------------- */
:root {
  color-scheme: light;
  --font-display: "Source Sans 3", "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-ui: "Source Sans 3", "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  --canvas: #f5f3ee;          /* warmes Papier, Seitenhintergrund */
  --surface: #ffffff;         /* Karten, Sidebar, Formulare */
  --surface-2: #faf8f4;       /* ruhige Innenflächen, Referenztext */
  --surface-3: #f0ece4;       /* Hover, Füllungen */
  --line: #e7e2d8;            /* Haarlinien */
  --line-strong: #d4ccbe;     /* Eingabefelder */
  --ink: #102a3b;             /* Text, Markenblau (aus #003150 abgeleitet) */
  --ink-2: #3f5466;           /* Sekundärtext */
  --ink-3: #5f6d7a;           /* Hinweise, Metadaten (AA auf Weiß) */
  --ink-4: #8a95a0;           /* nur dekorativ / Platzhalter */
  --navy: #0f2b3d;            /* Primärschaltflächen */
  --navy-hover: #183c53;
  --on-navy: #f7f4ee;
  --brand: #00a4b7;           /* Türkis der Website, dekorativ */
  --accent: #00788a;          /* Türkis für Text/Links (AA) */
  --accent-strong: #006373;
  --accent-soft: #e2f1f3;
  --accent-line: #a9d8df;
  --focus: 0 0 0 3px rgba(0, 164, 183, .28);

  --ok: #2c7653;      --ok-soft: #e5f2ea;     --ok-line: #b9dcc8;
  --warn: #9a5a06;    --warn-soft: #fbf0db;   --warn-line: #ecd3a3;
  --danger: #ad3229;  --danger-soft: #fae6e3; --danger-line: #efbdb6;
  --info: #2b5c8c;    --info-soft: #e6eef7;   --info-line: #bed1e6;
  --ai: #64509a;      --ai-soft: #efebf8;     --ai-line: #d2c8ea;
  --muted-soft: #eeebe5;

  --r-xs: 4px; --r-sm: 7px; --r: 10px; --r-lg: 14px; --r-xl: 20px; --r-full: 999px;
  --sh-1: 0 1px 2px rgba(16, 42, 59, .05), 0 0 0 1px rgba(16, 42, 59, .02);
  --sh-2: 0 6px 20px -8px rgba(16, 42, 59, .14), 0 2px 5px -2px rgba(16, 42, 59, .06);
  --sh-3: 0 28px 70px -18px rgba(16, 42, 59, .34), 0 8px 20px -10px rgba(16, 42, 59, .14);
  --ease: cubic-bezier(.2, .7, .2, 1);

  --sidebar-w: 268px;
  --topbar-h: 64px;
  --content-max: 1320px;
  --gutter: clamp(16px, 3vw, 40px);
}

/* ---------- Tokens: dunkel ----------------------------------------------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #0c161d; --surface: #121f28; --surface-2: #16252f; --surface-3: #1c2e3a;
  --line: #243744; --line-strong: #33495a;
  --ink: #e8edf1; --ink-2: #b7c3cc; --ink-3: #8d9daa; --ink-4: #66788a;
  --navy: #e8edf1; --navy-hover: #ffffff; --on-navy: #0c161d;
  --accent: #52c6d4; --accent-strong: #7dd6e1; --accent-soft: rgba(82, 198, 212, .12); --accent-line: rgba(82, 198, 212, .35);
  --focus: 0 0 0 3px rgba(82, 198, 212, .35);
  --ok: #6cc596; --ok-soft: rgba(108, 197, 150, .12); --ok-line: rgba(108, 197, 150, .32);
  --warn: #e6b35c; --warn-soft: rgba(230, 179, 92, .12); --warn-line: rgba(230, 179, 92, .32);
  --danger: #f08a80; --danger-soft: rgba(240, 138, 128, .12); --danger-line: rgba(240, 138, 128, .32);
  --info: #8cb6e2; --info-soft: rgba(140, 182, 226, .12); --info-line: rgba(140, 182, 226, .3);
  --ai: #b7a6e6; --ai-soft: rgba(183, 166, 230, .13); --ai-line: rgba(183, 166, 230, .32);
  --muted-soft: rgba(255, 255, 255, .06);
  --sh-1: 0 1px 2px rgba(0, 0, 0, .3);
  --sh-2: 0 10px 30px -10px rgba(0, 0, 0, .55);
  --sh-3: 0 30px 80px -20px rgba(0, 0, 0, .7);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --canvas: #0c161d; --surface: #121f28; --surface-2: #16252f; --surface-3: #1c2e3a;
    --line: #243744; --line-strong: #33495a;
    --ink: #e8edf1; --ink-2: #b7c3cc; --ink-3: #8d9daa; --ink-4: #66788a;
    --navy: #e8edf1; --navy-hover: #ffffff; --on-navy: #0c161d;
    --accent: #52c6d4; --accent-strong: #7dd6e1; --accent-soft: rgba(82, 198, 212, .12); --accent-line: rgba(82, 198, 212, .35);
    --focus: 0 0 0 3px rgba(82, 198, 212, .35);
    --ok: #6cc596; --ok-soft: rgba(108, 197, 150, .12); --ok-line: rgba(108, 197, 150, .32);
    --warn: #e6b35c; --warn-soft: rgba(230, 179, 92, .12); --warn-line: rgba(230, 179, 92, .32);
    --danger: #f08a80; --danger-soft: rgba(240, 138, 128, .12); --danger-line: rgba(240, 138, 128, .32);
    --info: #8cb6e2; --info-soft: rgba(140, 182, 226, .12); --info-line: rgba(140, 182, 226, .3);
    --ai: #b7a6e6; --ai-soft: rgba(183, 166, 230, .13); --ai-line: rgba(183, 166, 230, .32);
    --muted-soft: rgba(255, 255, 255, .06);
    --sh-1: 0 1px 2px rgba(0, 0, 0, .3);
    --sh-2: 0 10px 30px -10px rgba(0, 0, 0, .55);
    --sh-3: 0 30px 80px -20px rgba(0, 0, 0, .7);
  }
}

/* ---------- Grundlagen --------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--canvas); color: var(--ink);
  font: 400 15px/1.55 var(--font-ui); letter-spacing: .003em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; color: var(--ink); overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
h1, h2, .display { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; }
h3, h4 { font-family: var(--font-ui); }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }
::selection { background: rgba(0, 164, 183, .22); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
code, kbd, .mono { font-family: var(--font-mono); font-size: .86em; }
code { background: var(--surface-3); padding: .1em .4em; border-radius: var(--r-xs); color: var(--ink-2); word-break: break-word; }
kbd { display: inline-flex; align-items: center; gap: 2px; min-width: 22px; height: 22px; justify-content: center; padding: 0 6px;
  border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 6px; background: var(--surface); color: var(--ink-3); font-size: 11px; }

/* Icons (SVG-Sprite, von cms.js eingefügt) */
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.i-sm { width: 15px; height: 15px; }
.i-lg { width: 22px; height: 22px; }
.i-xl { width: 28px; height: 28px; stroke-width: 1.4; }

/* ---------- App-Rahmen --------------------------------------------------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column;
  background: var(--surface); border-right: 1px solid var(--line); z-index: 40;
}
.sidebar__brand { display: flex; align-items: center; gap: 12px; padding: 24px 20px 14px; color: var(--ink); }
.sidebar__brand:hover { text-decoration: none; color: var(--ink); }
.sidebar__logo { width: 208px; height: auto; }
:root[data-theme="dark"] .sidebar__logo { filter: brightness(0) invert(.92); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sidebar__logo { filter: brightness(0) invert(.92); } }
.sidebar__product { padding: 0 22px 18px; margin-bottom: 6px; border-bottom: 1px solid var(--line); display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.sidebar__product strong { font-family: var(--font-display); font-size: 17px; letter-spacing: .01em; }
.sidebar__product span { font-size: 11px; color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; }
.sidebar__nav { flex: 1; overflow-y: auto; padding: 10px 12px 20px; scrollbar-width: thin; }
.nav-group + .nav-group { margin-top: 18px; }
.nav-group__label { display: block; padding: 6px 12px 6px; font-size: 11px; font-weight: 700; color: var(--ink-3); letter-spacing: .12em; text-transform: uppercase; }
.nav-link {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 12px; margin: 1px 0;
  border-radius: var(--r-sm); color: var(--ink-2); font-weight: 400; transition: background .15s var(--ease), color .15s var(--ease);
}
.nav-link:hover { background: var(--surface-3); color: var(--ink); text-decoration: none; }
.nav-link[aria-current="page"] { background: var(--accent-soft); color: var(--ink); font-weight: 700; }
.nav-link[aria-current="page"]::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.nav-link[aria-current="page"] .i { color: var(--accent); }
.nav-link .count { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--ink-3); background: var(--surface-3); border-radius: var(--r-full); padding: 1px 8px; }
.nav-link .count--attention { background: var(--warn-soft); color: var(--warn); }
.nav-link .soon { margin-left: auto; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-4); }
.sidebar__footer { border-top: 1px solid var(--line); padding: 12px; display: grid; gap: 6px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r); color: var(--ink); }
.user-chip:hover { background: var(--surface-3); text-decoration: none; color: var(--ink); }
.user-chip__text { min-width: 0; line-height: 1.25; }
.user-chip__text strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip__text small { display: block; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar__tools { display: flex; gap: 6px; }
.sidebar__tools .btn { flex: 1; }

/* ---------- Schnellnavigation in der Seitenleiste -----------------------
   Auf Seiten mit Seitenbezug: Pfad von der Startseite bis zur aktuellen Seite
   (jede Ebene anklickbar), darunter die Unterseiten. Keine Geschwister –
   dafür eine Ebene nach oben gehen. */
.sidebar--pages { overflow-y: auto; scrollbar-width: thin; }
.sidebar--pages .sidebar__brand { padding-top: 18px; padding-bottom: 10px; }
.sidebar--pages .sidebar__product { padding-bottom: 12px; margin-bottom: 2px; }
.sidebar--pages .sidebar__nav { flex: 0 0 auto; overflow: visible; padding-top: 6px; padding-bottom: 10px; }
.sidebar--pages .nav-group + .nav-group { margin-top: 8px; }
.sidebar--pages .nav-group__label { padding: 4px 12px 2px; font-size: 10.5px; }
.sidebar--pages .nav-link { padding-top: 6px; padding-bottom: 6px; }
.quicknav { flex: 0 0 auto; display: flex; flex-direction: column; border-top: 1px solid var(--line); padding: 10px 12px 12px; background: linear-gradient(180deg, var(--surface-2), var(--surface) 140px); }
.quicknav__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 0 4px; }
.quicknav__head .nav-group__label { padding: 4px 12px; }
.quicknav__scroll { margin: 0 -4px; padding: 0 4px; }
.sidebar--pages .sidebar__footer { position: sticky; bottom: 0; z-index: 2; margin-top: auto; background: var(--surface); }
.qn-trail { list-style: none; margin: 0; padding: 0; }
.qn-trail li { position: relative; }
.qn-trail li:not(:last-child)::after { content: ""; position: absolute; left: 21px; top: 50%; height: 100%; width: 1px; background: var(--line-strong); }
.qn-link { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 6px 8px 6px 16px; border-radius: var(--r-sm); color: var(--ink-2); font-size: 13.5px; line-height: 1.3; }
a.qn-link:hover { background: var(--surface-3); color: var(--ink); text-decoration: none; }
.qn-dot { width: 11px; height: 11px; flex: none; border-radius: 50%; border: 1.5px solid var(--line-strong); background: var(--surface); }
.qn-home { width: 15px; height: 15px; margin: 0 -2px; flex: none; color: var(--ink-3); background: var(--surface); border-radius: 4px; }
.qn-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qn-up { width: 14px; height: 14px; color: var(--ink-4); opacity: 0; transition: opacity .15s; }
a.qn-link:hover .qn-up, a.qn-link:focus-visible .qn-up { opacity: 1; }
.qn-current .qn-link { background: var(--accent-soft); color: var(--ink); font-weight: 700; }
.qn-current .qn-text { white-space: normal; overflow-wrap: anywhere; }
.qn-current .qn-dot { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 3px var(--accent-soft); }
.qn-children { margin: 2px 0 4px 21px; border-left: 1px dashed var(--line-strong); }
.qn-children__label { display: flex; align-items: center; gap: 8px; padding: 8px 8px 4px 14px; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.qn-children__label .count { font-size: 11px; letter-spacing: 0; font-weight: 700; color: var(--ink-3); background: var(--surface-3); border-radius: var(--r-full); padding: 0 7px; }
.qn-list { list-style: none; margin: 0; padding: 0; }
.qn-child { position: relative; }
.qn-child::before { content: ""; position: absolute; left: 0; top: 50%; width: 9px; height: 1px; background: var(--line-strong); }
.qn-child .qn-link { padding-left: 14px; margin-left: 4px; }
.qn-child .qn-text, .qn-trail li:not(.qn-current) .qn-text { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow-wrap: anywhere; }
.qn-sub { flex: none; min-width: 22px; height: 18px; padding: 0 6px; border-radius: var(--r-full); background: var(--surface-3); color: var(--ink-3); font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.qn-de { display: block; font-size: 11.5px; font-weight: 400; color: var(--ink-3); }
.qn-filter { position: relative; margin: 4px 4px 4px 12px; }
.qn-filter .i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--ink-3); pointer-events: none; }
.qn-filter input { width: 100%; height: 32px; padding: 0 10px 0 30px; border: 1px solid var(--line-strong); border-radius: var(--r-full); background: var(--surface); font-size: 13px; color: var(--ink); }
.qn-filter input:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.qn-more { margin: 2px 0 0 16px; padding: 6px 4px; border: 0; background: none; color: var(--accent); font-size: 12.5px; font-weight: 700; }
.qn-more:hover { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }
.qn-empty { padding: 4px 12px 8px 16px; font-size: 13px; color: var(--ink-3); }
.quicknav__hint { display: flex; align-items: center; gap: 4px; padding: 8px 12px 0; font-size: 11.5px; color: var(--ink-3); }
.quicknav__hint kbd { height: 19px; min-width: 19px; font-size: 10.5px; padding: 0 4px; }
@media (hover: none) { .qn-up { opacity: .6; } .quicknav__hint { display: none; } }

.main { min-width: 0; display: flex; flex-direction: column; }
.scrim { display: none; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar-h); display: flex; align-items: center; gap: 16px;
  padding: 0 var(--gutter); background: color-mix(in srgb, var(--canvas) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.topbar.is-scrolled { border-bottom-color: var(--line); }
.topbar .topbar__menu { display: none; }
.topbar .topbar__mobile-brand { display: none; }
.topbar .topbar__pagenav { display: none; }
.omnibox {
  flex: 0 1 520px; min-width: 0; display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 8px 0 14px;
  border: 1px solid var(--line); border-radius: var(--r-full); background: var(--surface); color: var(--ink-3);
  box-shadow: var(--sh-1); text-align: left; transition: border-color .15s, box-shadow .15s;
}
.omnibox:hover { border-color: var(--line-strong); }
.omnibox span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.topbar__spacer { flex: 1; }
.publish-pill {
  display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 6px 0 14px; border-radius: var(--r-full);
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-size: 14px; white-space: nowrap; box-shadow: var(--sh-1);
}
.publish-pill:hover { text-decoration: none; color: var(--ink); border-color: var(--line-strong); }
.publish-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); }
.publish-pill b { color: var(--ink); }
.publish-pill .btn { height: 30px; padding: 0 12px; font-size: 13px; }

.content { width: 100%; max-width: var(--content-max); margin: 0 auto; padding: 28px var(--gutter) 96px; flex: 1; }
.content--wide { max-width: 1680px; }
.content--narrow { max-width: 920px; }

/* Seitenkopf */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px 32px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head__text { min-width: 0; max-width: 760px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.page-head h1 { font-size: clamp(28px, 3.2vw, 38px); line-height: 1.12; }
.page-head p { margin-top: 10px; color: var(--ink-2); font-size: 16px; max-width: 640px; }
.page-head__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); margin-bottom: 14px; }
.breadcrumbs a { color: var(--ink-3); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .i { width: 13px; height: 13px; color: var(--ink-4); }

/* ---------- Schaltflächen ------------------------------------------------ */
.btn {
  --btn-bg: var(--surface); --btn-fg: var(--ink); --btn-line: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
  border: 1px solid var(--btn-line); border-radius: var(--r-full); background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 700; font-size: 14px; white-space: nowrap; text-decoration: none; user-select: none;
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s, box-shadow .15s, transform .1s;
}
.btn:hover { text-decoration: none; color: var(--btn-fg); background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }
.btn--primary { --btn-bg: var(--navy); --btn-fg: var(--on-navy); --btn-line: var(--navy); box-shadow: 0 1px 2px rgba(16, 42, 59, .2); }
.btn--primary:hover { background: var(--navy-hover); border-color: var(--navy-hover); color: var(--on-navy); }
.btn--accent { --btn-bg: var(--accent); --btn-fg: #fff; --btn-line: var(--accent); }
.btn--accent:hover { background: var(--accent-strong); color: #fff; }
:root[data-theme="dark"] .btn--accent { --btn-fg: #06212a; }
.btn--quiet { --btn-bg: transparent; --btn-line: transparent; --btn-fg: var(--ink-2); }
.btn--quiet:hover { background: var(--surface-3); color: var(--ink); }
.btn--danger { --btn-fg: var(--danger); --btn-line: var(--danger-line); }
.btn--danger:hover { background: var(--danger-soft); color: var(--danger); }
.btn--danger-solid { --btn-bg: var(--danger); --btn-fg: #fff; --btn-line: var(--danger); }
.btn--sm { height: 32px; padding: 0 12px; font-size: 13px; gap: 6px; }
.btn--lg { height: 48px; padding: 0 22px; font-size: 15px; }
.btn--block { width: 100%; }
.btn--icon { width: 40px; padding: 0; }
.btn--icon.btn--sm { width: 32px; }
.btn-group { display: inline-flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.link-btn:hover { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }

/* Segmentsteuerung */
.segmented { display: inline-flex; padding: 3px; border-radius: var(--r-full); background: var(--surface-3); border: 1px solid var(--line); gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.segmented button, .segmented a { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border: 0; border-radius: var(--r-full); background: transparent; color: var(--ink-2); font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.segmented button:hover, .segmented a:hover { color: var(--ink); text-decoration: none; }
.segmented [aria-pressed="true"], .segmented [aria-selected="true"], .segmented .is-active { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1), 0 0 0 1px var(--line); }
.segmented .n { font-weight: 400; color: var(--ink-3); font-size: 12px; }

/* Reiter */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; margin-bottom: 22px; }
.tabs a, .tabs button { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 12px 14px; border: 0; background: none; color: var(--ink-3); font-weight: 700; font-size: 14px; white-space: nowrap; }
.tabs a:hover, .tabs button:hover { color: var(--ink); text-decoration: none; }
.tabs [aria-selected="true"], .tabs [aria-current="page"] { color: var(--ink); }
.tabs [aria-selected="true"]::after, .tabs [aria-current="page"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--brand); }
.tabs .count { font-size: 12px; font-weight: 400; color: var(--ink-3); background: var(--surface-3); padding: 0 7px; border-radius: var(--r-full); }

/* ---------- Karten & Flächen --------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.card__head h2, .card__head h3 { font-family: var(--font-ui); font-size: 16px; }
.card__head p { color: var(--ink-3); font-size: 13.5px; margin-top: 2px; }
.card__body { padding: 22px; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); flex-wrap: wrap; }
.card--flush .card__body { padding: 0; }
.card--quiet { background: var(--surface-2); box-shadow: none; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 36px 0 14px; }
.section-title h2 { font-size: 22px; }
.section-title p { color: var(--ink-3); font-size: 14px; }

.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--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--sidebar { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.stack { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.stack--sm { gap: 8px; }
.stack--lg { gap: 28px; }
.row { display: flex; align-items: center; gap: 12px; }
.row--wrap { flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mt-0 { margin-top: 0 !important; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }

/* Kennzahlen */
.stat { padding: 20px 22px; display: grid; gap: 6px; }
.stat__label { font-size: 13px; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.stat__value { font-family: var(--font-display); font-size: 34px; line-height: 1.05; font-weight: 700; color: var(--ink); }
.stat__meta { font-size: 13px; color: var(--ink-3); }
.stat__meta .up { color: var(--ok); font-weight: 700; }

/* ---------- Status, Etiketten, Avatare ----------------------------------- */
.badge {
  --b-fg: var(--ink-2); --b-bg: var(--muted-soft); --b-line: transparent;
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--r-full);
  font-size: 12px; font-weight: 700; color: var(--b-fg); background: var(--b-bg); border: 1px solid var(--b-line); white-space: nowrap; line-height: 1;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.badge--plain::before { display: none; }
.badge--ok { --b-fg: var(--ok); --b-bg: var(--ok-soft); --b-line: var(--ok-line); }
.badge--warn { --b-fg: var(--warn); --b-bg: var(--warn-soft); --b-line: var(--warn-line); }
.badge--danger { --b-fg: var(--danger); --b-bg: var(--danger-soft); --b-line: var(--danger-line); }
.badge--info { --b-fg: var(--info); --b-bg: var(--info-soft); --b-line: var(--info-line); }
.badge--ai { --b-fg: var(--ai); --b-bg: var(--ai-soft); --b-line: var(--ai-line); }
.badge--accent { --b-fg: var(--accent); --b-bg: var(--accent-soft); --b-line: var(--accent-line); }
.badge--outline { --b-bg: transparent; --b-line: var(--line-strong); }
.tag { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--r-sm); background: var(--surface-3); color: var(--ink-2); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.tag .flag { width: 16px; height: 12px; }
.tag button { border: 0; background: none; padding: 0; color: var(--ink-3); display: inline-flex; }
.role-tag { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px 0 8px; border-radius: var(--r-full); font-size: 12.5px; font-weight: 700; white-space: nowrap;
  background: var(--role-soft, var(--surface-3)); color: var(--role, var(--ink-2)); }
.role-tag .i { width: 14px; height: 14px; }
.role--admin { --role: #7a4a12; --role-soft: #f6ead8; }
.role--editor { --role: #1e5b7d; --role-soft: #e1eef6; }
.role--translator { --role: #5b4a94; --role-soft: #eeeaf8; }
.role--events { --role: #2c6e4d; --role-soft: #e3f1e8; }
.role--contacts { --role: #8a3d55; --role-soft: #f6e5eb; }
.role--journals { --role: #6a5a1c; --role-soft: #f3efd9; }
:root[data-theme="dark"] [class*="role--"] { --role-soft: rgba(255,255,255,.07); --role: var(--ink-2); }
:root[data-theme="dark"] .role--admin { --role: #e9c48d; } :root[data-theme="dark"] .role--editor { --role: #8ec3e3; }
:root[data-theme="dark"] .role--translator { --role: #bdaef0; } :root[data-theme="dark"] .role--events { --role: #8fd3ad; }
:root[data-theme="dark"] .role--contacts { --role: #eaa3b9; } :root[data-theme="dark"] .role--journals { --role: #dccb85; }

.avatar { --av: #dfe9ee; width: 36px; height: 36px; flex: none; border-radius: 50%; display: inline-grid; place-items: center; background: var(--av); color: #17384c; font-weight: 700; font-size: 13px; letter-spacing: .02em; }
.avatar--sm { width: 28px; height: 28px; font-size: 11px; }
.avatar--lg { width: 56px; height: 56px; font-size: 19px; }
.avatar--xl { width: 76px; height: 76px; font-size: 25px; }
.avatar--1 { --av: #dbe8ef; } .avatar--2 { --av: #ece1f3; } .avatar--3 { --av: #f5e6d3; } .avatar--4 { --av: #dcefe3; } .avatar--5 { --av: #f4dfe3; } .avatar--6 { --av: #efecd5; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { box-shadow: 0 0 0 2px var(--surface); }
.avatar-stack .avatar + .avatar { margin-left: -8px; }

.flag { width: 20px; height: 15px; border-radius: 2px; object-fit: cover; box-shadow: 0 0 0 1px rgba(16, 42, 59, .12); flex: none; display: inline-block; }
.flag--lg { width: 28px; height: 21px; border-radius: 3px; }
.lang { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.lang__code { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-3); text-transform: uppercase; }

/* Fortschritt */
.progress { position: relative; height: 6px; border-radius: var(--r-full); background: var(--surface-3); overflow: hidden; }
.progress > span { position: absolute; inset: 0 auto 0 0; width: var(--v, 0%); border-radius: inherit; background: var(--accent); }
.progress--stacked { display: flex; }
.progress--stacked > span { position: static; width: var(--v); border-radius: 0; }
.progress--lg { height: 10px; }
.p-ok { background: var(--ok) !important; } .p-ai { background: var(--ai) !important; } .p-warn { background: #d9a441 !important; } .p-accent { background: var(--accent) !important; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink-3); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }
.ring { --v: 60; --size: 56px; width: var(--size); height: var(--size); border-radius: 50%; flex: none;
  background: conic-gradient(var(--accent) calc(var(--v) * 1%), var(--surface-3) 0); display: grid; place-items: center; }
.ring::after { content: attr(data-label); width: calc(var(--size) - 10px); height: calc(var(--size) - 10px); border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 13px; font-weight: 700; }

/* ---------- Formulare ---------------------------------------------------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.field { display: grid; gap: 7px; min-width: 0; align-content: start; }
.field > label:not(.check):not(.radio):not(.switch), .field__label { font-size: 13.5px; font-weight: 700; color: var(--ink); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.field__label .opt { font-weight: 400; color: var(--ink-3); font-size: 12.5px; }
.field__hint { font-size: 12.5px; color: var(--ink-3); line-height: 1.45; }
.field__error { font-size: 12.5px; color: var(--danger); display: flex; gap: 6px; align-items: center; font-weight: 700; }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: var(--r);
  background: var(--surface); color: var(--ink); font-size: 15px; line-height: 1.45;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-4); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.input[readonly] { background: var(--surface-2); color: var(--ink-2); }
.input.mono { font-family: var(--font-mono); font-size: 13.5px; }
.input.is-invalid, .textarea.is-invalid, .select.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.input.is-valid { border-color: var(--ok-line); }
.textarea { resize: vertical; min-height: 96px; }
.select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%235f6d7a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center; }
.input-group { display: flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.input-group:focus-within { border-color: var(--accent); box-shadow: var(--focus); }
.input-group .input { border: 0; box-shadow: none !important; background: transparent; min-width: 0; }
.input-group__addon { display: flex; align-items: center; gap: 8px; padding: 0 12px; color: var(--ink-3); font-size: 14px; white-space: nowrap; }
.input-group__addon + .input { padding-left: 0; }
.input-group .btn { margin: 4px; height: auto; }
.input-lg { min-height: 52px; font-size: 16px; }
.counter { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.check, .radio { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14.5px; }
.check input, .radio input { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 1px 0 0; border: 1.5px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; transition: background .15s, border-color .15s; cursor: pointer; }
.check input { border-radius: 6px; }
.radio input { border-radius: 50%; }
.check input:checked { background: var(--navy); border-color: var(--navy); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3L15 7' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
:root[data-theme="dark"] .check input:checked { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3L15 7' fill='none' stroke='%230c161d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.radio input:checked { border: 6px solid var(--navy); }
.check input:focus-visible, .radio input:focus-visible { box-shadow: var(--focus); }
.check small, .radio small { display: block; color: var(--ink-3); font-size: 13px; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.switch input { appearance: none; -webkit-appearance: none; width: 38px; height: 22px; border-radius: 999px; background: var(--line-strong); position: relative; transition: background .2s; margin: 0; cursor: pointer; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .2s var(--ease); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(16px); }

/* Auswahlkarten (z. B. Rollen) */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.choice { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; padding: 16px; border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--surface); cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s; }
.choice:hover { border-color: var(--ink-4); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice__icon { grid-row: span 2; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--role-soft, var(--surface-3)); color: var(--role, var(--ink-2)); }
.choice__title { font-weight: 700; font-size: 14.5px; padding-right: 22px; }
.choice__desc { font-size: 13px; color: var(--ink-3); line-height: 1.45; }
.choice::after { content: ""; position: absolute; top: 14px; right: 14px; width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--line-strong); background: var(--surface); }
.choice:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface)); box-shadow: 0 0 0 1px var(--accent); }
.choice:has(input:checked)::after { background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3L15 7' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; border-color: var(--accent); }
.choice:has(input:focus-visible) { box-shadow: var(--focus); }

/* Suchfeld */
.search { position: relative; display: flex; align-items: center; }
.search .i { position: absolute; left: 13px; color: var(--ink-3); pointer-events: none; }
.search .input { padding-left: 40px; border-radius: var(--r-full); min-height: 40px; }
.search kbd { position: absolute; right: 10px; }

/* Filterleiste */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .search { flex: 1 1 260px; max-width: 420px; }
.toolbar .select { width: auto; min-height: 40px; border-radius: var(--r-full); padding-top: 6px; padding-bottom: 6px; font-size: 14px; }
.toolbar__end { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: var(--r-full); border: 1px dashed var(--line-strong); background: transparent; color: var(--ink-2); font-size: 13.5px; font-weight: 700; }
.filter-chip:hover { border-style: solid; color: var(--ink); }
.filter-chip.is-set { border-style: solid; border-color: var(--accent-line); background: var(--accent-soft); color: var(--ink); }

/* Offenlegung / technische Bereiche */
.disclosure { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.disclosure + .disclosure { margin-top: 12px; }
.disclosure > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 16px 20px; cursor: pointer; border-radius: var(--r-lg); }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary:hover { background: var(--surface-2); }
.disclosure > summary .chev { margin-left: auto; transition: transform .2s var(--ease); color: var(--ink-3); }
.disclosure[open] > summary .chev { transform: rotate(180deg); }
.disclosure[open] > summary { border-bottom: 1px solid var(--line); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.disclosure__title { display: grid; gap: 1px; }
.disclosure__title strong { font-size: 15px; }
.disclosure__title small { color: var(--ink-3); font-size: 13px; }
.disclosure__icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); flex: none; }
.disclosure__body { padding: 20px; }
.disclosure--tech > summary .disclosure__icon { background: transparent; border: 1px dashed var(--line-strong); }

/* Hinweise */
.notice { display: flex; gap: 14px; padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--n-line, var(--line)); background: var(--n-bg, var(--surface-2)); color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.notice > .i { color: var(--n-fg, var(--ink-3)); margin-top: 1px; }
.notice strong { color: var(--ink); }
.notice__body { flex: 1; display: grid; gap: 4px; min-width: 0; }
.notice--info { --n-bg: var(--info-soft); --n-line: var(--info-line); --n-fg: var(--info); }
.notice--ok { --n-bg: var(--ok-soft); --n-line: var(--ok-line); --n-fg: var(--ok); }
.notice--warn { --n-bg: var(--warn-soft); --n-line: var(--warn-line); --n-fg: var(--warn); }
.notice--danger { --n-bg: var(--danger-soft); --n-line: var(--danger-line); --n-fg: var(--danger); }
.notice--ai { --n-bg: var(--ai-soft); --n-line: var(--ai-line); --n-fg: var(--ai); }

/* ---------- Tabellen und Listen ------------------------------------------ */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.table th { position: sticky; top: 0; text-align: left; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .cell-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.table .cell-main strong { display: block; color: var(--ink); }
.table .cell-main small { display: block; color: var(--ink-3); font-size: 12.5px; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { text-align: right; white-space: nowrap; }
.table tr.is-selected { background: var(--accent-soft); }
.table tr.is-error td { background: color-mix(in srgb, var(--danger-soft) 60%, transparent); }
.table tr.is-warn td { background: color-mix(in srgb, var(--warn-soft) 60%, transparent); }
.table input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--navy); }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); flex-wrap: wrap; }
.pagination { display: flex; gap: 4px; }
.pagination a, .pagination span { min-width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: var(--r-sm); color: var(--ink-2); font-weight: 700; font-size: 13px; padding: 0 6px; }
.pagination a:hover { background: var(--surface-3); text-decoration: none; }
.pagination [aria-current="page"] { background: var(--navy); color: var(--on-navy); }

.list { list-style: none; margin: 0; padding: 0; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 14px 22px; border-bottom: 1px solid var(--line); color: var(--ink); }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.list-item__main { flex: 1; min-width: 0; }
.list-item__main strong { display: block; font-size: 14.5px; }
.list-item__main small { display: block; font-size: 13px; color: var(--ink-3); }
.list-item__icon { width: 36px; height: 36px; border-radius: 10px; background: var(--surface-3); display: grid; place-items: center; color: var(--ink-2); flex: none; }

/* Aktivität */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 0 0 18px; }
.timeline li::before { content: ""; position: absolute; left: 13.5px; top: 30px; bottom: 2px; width: 1px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .tl-dot { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; color: var(--ink-3); }
.timeline .tl-dot .i { width: 14px; height: 14px; }
.timeline p { font-size: 14px; color: var(--ink-2); }
.timeline p strong { color: var(--ink); }
.timeline time { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }

/* Leerzustand */
.empty { text-align: center; padding: 48px 24px; display: grid; justify-items: center; gap: 10px; }
.empty__icon { width: 56px; height: 56px; border-radius: 18px; background: var(--surface-3); display: grid; place-items: center; color: var(--ink-3); margin-bottom: 6px; }
.empty h3 { font-family: var(--font-display); font-size: 21px; }
.empty p { color: var(--ink-3); max-width: 420px; }

/* Schrittanzeige */
.stepper { display: flex; gap: 0; list-style: none; margin: 0 0 28px; padding: 0; counter-reset: step; }
.stepper li { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink-3); font-size: 14px; font-weight: 700; position: relative; padding-right: 12px; }
.stepper li::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); min-width: 12px; }
.stepper li:last-child::after { display: none; }
.stepper .n { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; flex: none; font-size: 13px; background: var(--surface); }
.stepper .is-done { color: var(--ink-2); }
.stepper .is-done .n { background: var(--accent); border-color: var(--accent); color: #fff; }
.stepper .is-current { color: var(--ink); }
.stepper .is-current .n { border-color: var(--navy); background: var(--navy); color: var(--on-navy); box-shadow: 0 0 0 4px var(--accent-soft); }
.stepper button { all: unset; display: contents; cursor: pointer; }

/* Ablagefläche */
.dropzone { border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg); background: var(--surface-2); padding: 40px 24px; display: grid; justify-items: center; text-align: center; gap: 10px; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone__icon { width: 60px; height: 60px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; color: var(--accent); box-shadow: var(--sh-1); margin-bottom: 4px; }
.dropzone strong { font-size: 16px; }
.dropzone p { color: var(--ink-3); font-size: 14px; }
.file-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.file-row__icon { width: 40px; height: 48px; border-radius: 6px; background: var(--danger-soft); color: var(--danger); display: grid; place-items: center; font-size: 10px; font-weight: 700; letter-spacing: .05em; flex: none; }
.file-row__icon--sheet { background: var(--ok-soft); color: var(--ok); }

/* Mitteilungen */
.toast-region { position: fixed; right: 24px; bottom: 24px; display: grid; gap: 10px; z-index: 120; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; min-width: 280px; max-width: 420px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--ink); color: var(--canvas); box-shadow: var(--sh-3); font-size: 14px; animation: toast-in .35s var(--ease); }
.toast .i { color: #7ad7c0; }
.toast button { margin-left: auto; background: none; border: 0; color: inherit; opacity: .7; font-weight: 700; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }

/* Dialoge */
dialog { padding: 0; border: 0; background: transparent; color: var(--ink); max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); overflow: visible; }
dialog::backdrop { background: rgba(9, 24, 34, .45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
dialog[open] { animation: dlg-in .25s var(--ease); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.dialog { width: 520px; max-width: 100%; max-height: calc(100dvh - 32px); display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-3); border: 1px solid var(--line); overflow: hidden; }
.dialog--lg { width: 760px; }
.dialog__head { display: flex; align-items: flex-start; gap: 14px; padding: 22px 24px 8px; }
.dialog__head h2 { font-size: 22px; }
.dialog__head p { color: var(--ink-3); font-size: 14px; margin-top: 4px; }
.dialog__close { margin-left: auto; }
.dialog__body { padding: 14px 24px 22px; overflow-y: auto; }
.dialog__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; }
.dialog__icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.dialog__icon--danger { background: var(--danger-soft); color: var(--danger); }

/* Seitenleiste rechts (Drawer) */
.drawer { position: fixed; inset: 0 0 0 auto; width: min(480px, 100vw); max-width: 100vw; max-height: none; height: 100dvh; margin: 0 0 0 auto; }
.drawer .dialog { width: 100%; height: 100%; max-height: none; border-radius: 0; border-width: 0 0 0 1px; }
.drawer[open] { animation: drawer-in .3s var(--ease); }
@keyframes drawer-in { from { transform: translateX(30px); opacity: 0; } }

/* Befehlspalette (URL einfügen / suchen) */
.palette { width: 680px; max-width: 100%; margin-top: 10vh; background: var(--surface); border-radius: var(--r-xl); border: 1px solid var(--line); box-shadow: var(--sh-3); overflow: hidden; }
.palette__input { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.palette__input .i { color: var(--ink-3); }
.palette__input input { flex: 1; min-width: 0; height: 62px; border: 0; background: transparent; font-size: 17px; outline: none; color: var(--ink); }
.palette__input input::placeholder { color: var(--ink-4); }
.palette__input input:focus-visible { box-shadow: none; }
.palette__body { max-height: min(60vh, 520px); overflow-y: auto; padding: 10px; }
.palette__label { padding: 10px 12px 6px; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.palette__item { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: var(--r); color: var(--ink); }
.palette__item:hover, .palette__item.is-active { background: var(--surface-3); text-decoration: none; color: var(--ink); }
.palette__item small { display: block; color: var(--ink-3); font-size: 12.5px; }
.palette__item .grow { flex: 1; min-width: 0; }
.palette__match { margin: 6px 4px 10px; padding: 18px; border-radius: var(--r-lg); border: 1px solid var(--accent-line); background: color-mix(in srgb, var(--accent-soft) 70%, var(--surface)); }
.palette__match h3 { font-family: var(--font-display); font-size: 21px; margin: 4px 0 2px; }
.palette__foot { display: flex; gap: 18px; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); background: var(--surface-2); flex-wrap: wrap; }
.palette__foot span { display: inline-flex; align-items: center; gap: 6px; }

/* Speicherleiste (fixiert unten) */
.savebar { position: sticky; bottom: 16px; z-index: 20; margin-top: 28px; display: flex; align-items: center; gap: 14px; padding: 12px 12px 12px 20px; border-radius: var(--r-full); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-2); flex-wrap: wrap; }
.savebar__state { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); flex: 1; min-width: 200px; }
.savebar__state .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); flex: none; }
.savebar__state .dot--ok { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.savebar .btn-group { margin-left: auto; }

/* ---------- Anmeldeseiten ------------------------------------------------ */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--surface); }
.auth__visual { position: relative; overflow: hidden; background: #0f2b3d; color: #f4f1ea; display: flex; flex-direction: column; justify-content: space-between; padding: 44px 52px; isolation: isolate; }
.auth__visual::before { content: ""; position: absolute; inset: 0; z-index: -2; background: url("assets/img/anmeldung.jpg") center 40% / cover no-repeat; filter: grayscale(.35) contrast(1.05); }
.auth__visual::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10, 30, 43, .55) 0%, rgba(10, 30, 43, .35) 35%, rgba(10, 30, 43, .92) 100%), linear-gradient(90deg, rgba(0, 120, 138, .25), transparent 60%); }
.auth__mark { display: flex; align-items: center; gap: 14px; font-family: var(--font-display); font-size: 17px; letter-spacing: .02em; }
.auth__mark img { width: 156px; filter: brightness(0) invert(1); opacity: .95; }
.auth__quote { max-width: 520px; }
.auth__quote blockquote { margin: 0; font-family: var(--font-display); font-size: clamp(24px, 2.4vw, 34px); line-height: 1.32; font-weight: 300; font-style: italic; }
.auth__quote figcaption { margin-top: 16px; display: flex; align-items: center; gap: 12px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: rgba(244, 241, 234, .78); }
.auth__quote figcaption::before { content: ""; width: 36px; height: 1px; background: var(--brand); }
.auth__panel { display: flex; flex-direction: column; justify-content: center; padding: 48px clamp(24px, 6vw, 96px); background: var(--surface); }
.auth__form { width: 100%; max-width: 420px; margin: 0 auto; display: grid; gap: 20px; }
.auth__form h1 { font-size: clamp(30px, 3vw, 38px); line-height: 1.15; }
.auth__form .lead { color: var(--ink-2); font-size: 16px; }
.auth__foot { max-width: 420px; width: 100%; margin: 40px auto 0; display: flex; justify-content: space-between; gap: 16px; font-size: 13px; color: var(--ink-3); flex-wrap: wrap; }
.divider-text { display: flex; align-items: center; gap: 14px; color: var(--ink-3); font-size: 12.5px; }
.divider-text::before, .divider-text::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.strength i { height: 4px; border-radius: 4px; background: var(--surface-3); }
.strength[data-level="1"] i:nth-child(-n+1) { background: var(--danger); }
.strength[data-level="2"] i:nth-child(-n+2) { background: #d9a441; }
.strength[data-level="3"] i:nth-child(-n+3) { background: var(--accent); }
.strength[data-level="4"] i { background: var(--ok); }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; color: var(--ink-3); }
.checklist li { display: flex; align-items: center; gap: 8px; }
.checklist .ok { color: var(--ok); }

/* ---------- Übersetzungsarbeitsplatz ------------------------------------- */
.tw-head { display: grid; gap: 14px; margin-bottom: 18px; }
.tw-urlbar { display: flex; gap: 10px; align-items: center; }
.tw-urlbar .input-group { flex: 1; }
.tw-meta { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; font-size: 13.5px; color: var(--ink-3); }
.tw-meta > * { min-width: 0; overflow-wrap: anywhere; }
.breadcrumbs > *, .breadcrumbs [data-ctx-crumbs] > * { overflow-wrap: anywhere; min-width: 0; }
.tw-langbar { position: sticky; top: var(--topbar-h); z-index: 15; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: 0 8px 16px -14px rgba(16, 42, 59, .3); }
.tw-langbar__col { display: flex; align-items: center; gap: 10px; padding: 12px 18px; min-width: 0; flex-wrap: wrap; }
.tw-langbar__col + .tw-langbar__col { border-left: 1px solid var(--line); }
.tw-langbar__label { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.tw-langbar .segmented button { height: 28px; padding: 0 10px; font-size: 12.5px; }
.tw-langbar .segmented .flag { width: 16px; height: 12px; }
.tw-body { background: var(--surface); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--r-lg) var(--r-lg); }
.tw-group { border-top: 1px solid var(--line); }
.tw-group:first-child { border-top: 0; }
.tw-group > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 18px; cursor: pointer; background: var(--surface-2); }
.tw-group > summary::-webkit-details-marker { display: none; }
.tw-group > summary h3 { font-size: 14px; letter-spacing: .02em; }
.tw-group > summary small { color: var(--ink-3); font-size: 13px; }
.tw-group > summary .chev { margin-left: auto; color: var(--ink-3); transition: transform .2s; }
.tw-group[open] > summary .chev { transform: rotate(180deg); }
.tw-group[open] > summary { border-bottom: 1px solid var(--line); }
.seg { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-bottom: 1px solid var(--line); position: relative; }
.seg:last-child { border-bottom: 0; }
.seg::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: transparent; }
.seg.is-focused::before { background: var(--brand); }
.seg.is-changed::before { background: #d9a441; }
.seg__src, .seg__tgt { padding: 14px 18px 16px; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-content: start; }
.seg__src { background: var(--surface-2); color: var(--ink-2); border-right: 1px solid var(--line); }
.seg__kind { display: flex; align-items: center; gap: 8px; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; min-height: 24px; }
.seg__kind .k { display: inline-grid; place-items: center; min-width: 26px; height: 20px; padding: 0 5px; border-radius: 5px; background: var(--surface-3); color: var(--ink-2); font-size: 10.5px; letter-spacing: .04em; }
.seg__text { font-size: 15.5px; line-height: 1.62; white-space: pre-wrap; overflow-wrap: anywhere; }
.seg__text--h1 { font-family: var(--font-display); font-size: 22px; line-height: 1.3; font-weight: 700; color: var(--ink); }
.seg__text--h2 { font-family: var(--font-display); font-size: 19px; line-height: 1.35; font-weight: 700; color: var(--ink); }
.seg__text--h3 { font-weight: 700; color: var(--ink); }
.seg__tgt .seg__kind { justify-content: space-between; }
.seg__kind .badge, .seg__kind .btn { text-transform: none; letter-spacing: 0; }
.seg__tgt .seg__kind { flex-wrap: wrap; row-gap: 6px; }
.seg__input { width: 100%; border: 1px solid transparent; border-radius: var(--r); padding: 8px 10px; margin: -9px -11px -6px; width: calc(100% + 22px); background: transparent; resize: none; overflow: hidden; font: 400 15.5px/1.62 var(--font-ui); color: var(--ink); min-height: 44px; transition: background .15s, border-color .15s, box-shadow .15s; }
.seg__input:hover { background: var(--surface-2); border-color: var(--line); }
.seg__input:focus { outline: none; background: var(--surface); border-color: var(--accent); box-shadow: var(--focus); }
.seg__input--h1 { font-family: var(--font-display); font-size: 22px; line-height: 1.3; font-weight: 700; }
.seg__input--h2 { font-family: var(--font-display); font-size: 19px; line-height: 1.35; font-weight: 700; }
.seg__input--h3 { font-weight: 700; }
.seg__tools { display: flex; align-items: center; gap: 4px; justify-content: flex-end; opacity: .0; transition: opacity .15s; }
@media (hover: none) { .seg__tools, .block__tools { opacity: 1; } }
.seg:hover .seg__tools, .seg.is-focused .seg__tools, .seg:focus-within .seg__tools { opacity: 1; }
.seg__foot { display: flex; align-items: center; gap: 10px; justify-content: space-between; min-height: 22px; }
.seg__hint { font-size: 12.5px; color: var(--warn); display: flex; align-items: center; gap: 6px; font-weight: 700; }
.seg-token { display: inline-flex; align-items: center; gap: 4px; padding: 0 6px; border-radius: 5px; background: var(--accent-soft); color: var(--accent-strong); border: 1px solid var(--accent-line); font-size: .88em; font-weight: 700; white-space: nowrap; user-select: none; }
.tw-footer { position: sticky; bottom: 0; z-index: 15; margin-top: 18px; display: flex; align-items: center; gap: 16px; padding: 12px 14px 12px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-2); flex-wrap: wrap; }
.tw-footer .progress { width: 180px; }
.tw-side { position: sticky; top: calc(var(--topbar-h) + 16px); display: grid; gap: 16px; }
.tw-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.mini-preview { border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: #fff; color: #003150; font-family: var(--font-ui); }
.mini-preview__bar { height: 26px; display: flex; align-items: center; gap: 5px; padding: 0 10px; background: #f1efea; border-bottom: 1px solid #e3ded4; }
.mini-preview__bar i { width: 7px; height: 7px; border-radius: 50%; background: #d4ccbe; }
.mini-preview__hero { height: 54px; background: linear-gradient(120deg, #00a4b7, #63c3d1 60%, #addbe4); }
.mini-preview__body { padding: 12px 14px 16px; font-size: 11px; line-height: 1.45; }
.mini-preview__body b { display: block; color: #00a4b7; font-size: 14px; margin-bottom: 4px; }
.mini-preview__body mark { background: #fff2b8; color: inherit; border-radius: 2px; box-shadow: 0 0 0 2px #fff2b8; }

/* ---------- Seiteneditor ------------------------------------------------- */
.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.block { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; padding: 10px 10px 10px 6px; border-radius: var(--r); border: 1px solid transparent; transition: border-color .15s, background .15s; }
.block:hover { border-color: var(--line); background: var(--surface-2); }
.block.is-focused { border-color: var(--accent-line); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft); }
.block__handle { display: grid; place-items: start center; padding-top: 8px; color: var(--ink-4); cursor: grab; }
.block__type { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; margin-bottom: 2px; }
.block__edit { width: 100%; border: 0; background: transparent; resize: none; overflow: hidden; padding: 2px 0; color: var(--ink); font: 400 16px/1.65 var(--font-ui); outline: none; }
.block__edit--h1 { font-family: var(--font-display); font-size: 30px; line-height: 1.2; font-weight: 700; }
.block__edit--h2 { font-family: var(--font-display); font-size: 23px; line-height: 1.3; font-weight: 700; }
.block__edit--h3 { font-size: 18px; font-weight: 700; }
.block__tools { display: flex; gap: 2px; opacity: 0; transition: opacity .15s; align-self: start; }
.block:hover .block__tools, .block.is-focused .block__tools { opacity: 1; }
.block__figure { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; }
.block__figure img { width: 120px; height: 90px; object-fit: cover; border-radius: var(--r-sm); }
.block-add { display: flex; justify-content: center; padding: 6px 0; }
.block-add button { display: inline-flex; align-items: center; gap: 6px; border: 1px dashed var(--line-strong); background: transparent; border-radius: var(--r-full); padding: 6px 14px; color: var(--ink-3); font-size: 13px; font-weight: 700; }
.block-add button:hover { border-color: var(--accent); color: var(--accent); }
.editor-canvas { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); padding: 28px clamp(16px, 3vw, 40px) 36px; }
.editor-hero { height: 120px; border-radius: var(--r); background: linear-gradient(120deg, #00a4b7, #63c3d1 55%, #addbe4); margin-bottom: 18px; position: relative; overflow: hidden; }
.editor-hero img { width: 100%; height: 100%; object-fit: cover; }
.editor-hero .btn { position: absolute; right: 12px; bottom: 12px; }

/* Seitenbaum */
.tree { list-style: none; margin: 0; padding: 0; font-size: 14.5px; }
.tree ul { list-style: none; margin: 0; padding: 0 0 0 22px; border-left: 1px solid var(--line); margin-left: 17px; }
.tree-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r-sm); color: var(--ink); min-width: 0; }
.tree-row:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.tree-row .i { color: var(--ink-3); }
.tree-row__title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tree-row__meta { display: flex; gap: 8px; align-items: center; color: var(--ink-3); font-size: 12.5px; flex: none; }
.tree details > summary { list-style: none; cursor: pointer; }
.tree details > summary::-webkit-details-marker { display: none; }
.tree details > summary .tw-chev { transition: transform .2s; }
.tree details[open] > summary .tw-chev { transform: rotate(90deg); }
.tree .is-current > .tree-row, .tree-row.is-current { background: var(--accent-soft); font-weight: 700; }

/* Zeitschriften-Cover */
.covers { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 18px; }
.cover { display: grid; gap: 10px; color: var(--ink); }
.cover:hover { text-decoration: none; color: var(--ink); }
.cover__img { position: relative; aspect-ratio: 255 / 360; border-radius: 6px; overflow: hidden; background: var(--surface-3); box-shadow: 0 1px 2px rgba(16,42,59,.12), 0 12px 24px -14px rgba(16,42,59,.4); transition: transform .25s var(--ease), box-shadow .25s; }
.cover:hover .cover__img { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(16,42,59,.12), 0 20px 34px -16px rgba(16,42,59,.5); }
.cover__img img { width: 100%; height: 100%; object-fit: cover; }
.cover__img .badge { position: absolute; top: 8px; left: 8px; }
.cover__meta strong { display: block; font-size: 14px; }
.cover__meta small { display: flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 12.5px; }
.cover--new .cover__img { display: grid; place-items: center; border: 1.5px dashed var(--line-strong); background: var(--surface-2); box-shadow: none; color: var(--ink-3); text-align: center; font-size: 13px; font-weight: 700; }

/* Termine */
.date-tile { width: 58px; flex: none; border-radius: 12px; overflow: hidden; text-align: center; border: 1px solid var(--line); background: var(--surface); }
.date-tile b { display: block; font-family: var(--font-display); font-size: 22px; line-height: 1; padding: 8px 0 4px; }
.date-tile span { display: block; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); padding-bottom: 7px; }
.date-tile small { display: block; background: var(--surface-3); font-size: 10.5px; color: var(--ink-2); font-weight: 700; padding: 3px 0; }

/* Master-Detail */
.split { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); min-height: 640px; overflow: hidden; }
.split__list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.split__list-head { padding: 14px; border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.split__items { overflow-y: auto; max-height: 720px; }
.split__item { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--ink); }
.split__item:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.split__item[aria-current="true"] { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--brand); }
.split__item strong { display: block; font-size: 14.5px; }
.split__item small { display: block; font-size: 12.5px; color: var(--ink-3); }
.split__detail { min-width: 0; display: flex; flex-direction: column; }
.split__detail-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 26px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.split__detail-body { padding: 26px; flex: 1; }
.split__detail-foot { display: flex; justify-content: space-between; gap: 10px; padding: 14px 26px; border-top: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; }

/* Website-ähnliche Vorschaukarte (Termin, Kontakt) */
.site-preview { border-radius: var(--r); border: 1px solid #dbe5ea; background: #fff; color: #003150; font-family: var(--font-ui); overflow: hidden; }
.site-preview__label { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: #5f6d7a; background: #f6f4ef; border-bottom: 1px solid #e7e2d8; font-weight: 700; }
.site-preview__body { padding: 16px 18px; font-size: 14px; line-height: 1.5; }
.site-preview__body h4 { color: #00a4b7; font-size: 15px; margin-bottom: 6px; font-family: var(--font-ui); }

/* Rechte-Matrix */
.matrix th, .matrix td { text-align: center; }
.matrix th:first-child, .matrix td:first-child { text-align: left; }
.matrix .yes { color: var(--ok); display: inline-flex; }
.matrix .no { color: var(--ink-4); }
.matrix .part { font-size: 12px; color: var(--ink-3); }

/* E-Mail-Vorschau */
.mail { max-width: 600px; margin: 0 auto; background: #fff; color: #102a3b; border-radius: 14px; overflow: hidden; box-shadow: var(--sh-2); border: 1px solid #e7e2d8; font-family: var(--font-ui); }
.mail__head { padding: 28px 36px 20px; border-bottom: 1px solid #efebe3; }
.mail__head img { width: 170px; }
.mail__body { padding: 32px 36px; font-size: 15.5px; line-height: 1.6; }
.mail__body h1 { font-family: var(--font-display); font-size: 26px; margin-bottom: 14px; color: #102a3b; }
.mail__btn { display: inline-block; margin: 18px 0; padding: 14px 26px; border-radius: 999px; background: #0f2b3d; color: #f7f4ee !important; font-weight: 700; text-decoration: none !important; }
.mail__foot { padding: 20px 36px 28px; font-size: 12.5px; color: #5f6d7a; background: #faf8f4; border-top: 1px solid #efebe3; }
.mail-meta { max-width: 600px; margin: 0 auto 16px; display: grid; gap: 4px; font-size: 13.5px; color: var(--ink-3); }
.mail-meta b { color: var(--ink); font-weight: 700; }

/* Erstellungsverlauf */
.build-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.build-steps li { display: grid; grid-template-columns: 32px 1fr auto; gap: 12px; align-items: center; padding: 12px 4px; border-bottom: 1px dashed var(--line); font-size: 14.5px; }
.build-steps li:last-child { border-bottom: 0; }
.build-steps .st { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-3); }
.build-steps .is-done .st { background: var(--ok-soft); color: var(--ok); }
.build-steps .is-running .st { background: var(--accent-soft); color: var(--accent); }
.build-steps .is-running .st .i { animation: spin 1.1s linear infinite; }
.build-steps small { color: var(--ink-3); font-size: 12.5px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Vorlagen-Werkzeugleiste (nur Designvorlage) ------------------ */
.demo-bar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 110; display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: var(--r-full); background: rgba(16, 32, 44, .92); color: #e9eef2; font-size: 13px; box-shadow: 0 14px 40px -12px rgba(0,0,0,.5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); max-width: calc(100vw - 24px); }
.demo-bar__label { display: flex; align-items: center; gap: 8px; white-space: nowrap; color: #9fb3c2; letter-spacing: .06em; text-transform: uppercase; font-size: 11px; font-weight: 700; }
.demo-bar__label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #e6b35c; }
.demo-bar select { appearance: none; -webkit-appearance: none; height: 32px; border-radius: 999px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.08) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23cfd9e0' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") right 12px center no-repeat; color: #fff; padding: 0 32px 0 12px; font-size: 13px; font-weight: 700; cursor: pointer; max-width: 210px; }
.demo-bar select option { color: #102a3b; }
.demo-bar a, .demo-bar button { height: 32px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border-radius: 999px; border: 0; background: rgba(255,255,255,.08); color: #e9eef2; font-size: 13px; font-weight: 700; white-space: nowrap; }
.demo-bar a:hover, .demo-bar button:hover { background: rgba(255,255,255,.16); text-decoration: none; color: #fff; }
body.has-demo .tw-footer, body.has-demo .savebar { bottom: 68px; }
.no-access { display: none; }
body.is-restricted .content > :not(.no-access) { display: none; }
body.is-restricted .no-access { display: block; }

/* ---------- Responsives Verhalten ---------------------------------------- */
@media (max-width: 1280px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tw-layout { grid-template-columns: minmax(0, 1fr); }
  .tw-side { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .editor-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  .grid--sidebar { grid-template-columns: minmax(0, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 300px minmax(0, 1fr); }
}
@media (max-width: 1024px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .3s var(--ease); box-shadow: var(--sh-3); }
  body.nav-open .sidebar { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(9, 24, 34, .4); opacity: 0; pointer-events: none; transition: opacity .3s; }
  body.nav-open .scrim { opacity: 1; pointer-events: auto; }
  .topbar .topbar__menu { display: inline-flex; }
  .topbar .topbar__mobile-brand { display: flex; align-items: center; }
  .topbar .topbar__pagenav { display: inline-flex; flex: none; }
  .topbar__mobile-brand img { width: 150px; }
  :root[data-theme="dark"] .topbar__mobile-brand img { filter: brightness(0) invert(.92); }
}
@media (max-width: 860px) {
  .grid--2, .grid--3 { grid-template-columns: minmax(0, 1fr); }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth__visual { min-height: 260px; padding: 26px 24px; }
  .auth__quote blockquote { font-size: 22px; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .split__list { border-right: 0; border-bottom: 1px solid var(--line); }
  .split__items { max-height: 320px; }
  .seg, .tw-langbar { grid-template-columns: minmax(0, 1fr); }
  .seg__src { border-right: 0; border-bottom: 1px dashed var(--line); padding-bottom: 12px; }
  .tw-langbar__col + .tw-langbar__col { border-left: 0; border-top: 1px solid var(--line); }
  .tw-langbar { position: static; }
  .seg__tools { opacity: 1; }
  .block__tools { opacity: 1; }
  .publish-pill .label-long { display: none; }
}
@media (max-width: 720px) {
  body { font-size: 15px; }
  .hide-sm { display: none !important; }
  .topbar { gap: 10px; }
  .omnibox { height: 40px; }
  .omnibox span, .omnibox kbd { display: none; }
  .omnibox { flex: 0 0 auto; width: 40px; padding: 0; justify-content: center; }
  .topbar__spacer { display: block; }
  .publish-pill { padding: 0 4px 0 12px; }
  .publish-pill .label { display: none; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat { padding: 16px; }
  .stat__value { font-size: 28px; }
  .card__head, .card__body { padding-left: 16px; padding-right: 16px; }
  .card__foot { padding-left: 16px; padding-right: 16px; }
  .list-item { padding-left: 16px; padding-right: 16px; }
  .page-head { margin-bottom: 20px; }
  .page-head__actions { width: 100%; }
  .page-head__actions .btn { flex: 1; }
  .content { padding-top: 18px; padding-bottom: 120px; }
  .stepper li .t { display: none; }
  .stepper li.is-current .t { display: inline; }
  .savebar { border-radius: var(--r-lg); padding: 12px; bottom: 76px; }
  .savebar .btn-group { width: 100%; margin-left: 0; }
  .savebar .btn-group .btn { flex: 1; }
  .tw-footer { bottom: 64px; padding: 12px; gap: 10px; }
  .tw-footer > .row { display: none; }
  .tw-footer .btn-group { width: 100%; margin-left: 0; }
  .tw-footer .btn-group .btn { flex: 1 1 auto; padding: 0 12px; }
  .tw-footer kbd, .savebar kbd { display: none; }
  .toast-region { left: 16px; right: 16px; bottom: 80px; }
  .toast { min-width: 0; max-width: none; }
  .split__detail-head, .split__detail-body, .split__detail-foot { padding-left: 16px; padding-right: 16px; }
  .block { grid-template-columns: minmax(0, 1fr) auto; }
  .block__handle { display: none; }
  .block__figure { grid-template-columns: 1fr; }
  .mail__head, .mail__body, .mail__foot { padding-left: 22px; padding-right: 22px; }
  .demo-bar { bottom: 10px; padding-left: 10px; gap: 6px; }
  .demo-bar__label span { display: none; }
  .demo-bar .hide-sm { display: none; }

  /* Tabellen werden zu Karten */
  .table--cards thead { display: none; }
  .table--cards, .table--cards tbody, .table--cards tr, .table--cards td { display: block; width: 100%; }
  .table--cards tr { padding: 14px 16px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .table--cards td { padding: 0; border: 0; }
  .table--cards td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; margin-bottom: 2px; }
  .table--cards td.cell-span { grid-column: 1 / -1; }
  .table--cards td.hide-sm { display: none; }
  .table--cards .actions { text-align: left; }
}
@media (max-width: 420px) {
  .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .topbar { gap: 6px; }
  .topbar .topbar__mobile-brand img { width: 118px; }
  .publish-pill { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
