/* =========================================================
   caspar company Admin
   Dunkle Leiste links, ruhige weisse Arbeitsflaeche rechts.
   Farben und Schriften wie auf der Webseite.
   ========================================================= */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/assets/fonts/plus-jakarta-sans.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #001b31;
  --ink-soft: #52606d;
  --blue: #004379;
  --red: #d0043c;
  --red-dark: #a8032f;
  --line: #e3e7ec;
  --line-strong: #cfd6de;
  --soft: #f4f6f8;
  --paper: #ffffff;
  --green: #1f7a4d;
  --amber: #b06a00;
  --purple: #5855a1;
  --grey: #8c97a3;

  --font-head: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;

  --rail-width: 248px;
  --gutter: 56px;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
}

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.2;
  margin: 0;
  letter-spacing: -.015em;
}
h1 { font-size: clamp(26px, 3vw, 32px); font-weight: 700; }
h2 { font-size: 19px; font-weight: 700; margin-bottom: 16px; }

p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }

a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--red); }

code { font-size: .9em; background: var(--soft); padding: 1px 6px; border-radius: 5px; }

.muted { color: var(--ink-soft); }
.small { font-size: 14px; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 3px solid rgba(0, 67, 121, .4); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------- Grundgeruest: Leiste links, Inhalt rechts ---------- */
.shell {
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, 1fr);
  min-height: 100vh;
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 24px 16px 20px;
  background: var(--ink);
  color: #fff;
}

.rail__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
  color: #fff;
  text-decoration: none;
}
.rail__brand:hover { color: #fff; }
.rail__brand img { display: block; width: 36px; height: 36px; border-radius: 10px; flex: none; }
.rail__brand span {
  display: flex;
  flex-direction: column;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}
.rail__brand small { font-family: var(--font-body); font-size: 13px; font-weight: 400; color: rgba(255, 255, 255, .6); }

.rail__nav { display: flex; flex-direction: column; gap: 2px; }
.rail__nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: rgba(255, 255, 255, .72);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .15s, color .15s;
}
.rail__nav a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.rail__nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, .1); }
.rail__nav a[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--red);
}
.rail__nav svg {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rail__user {
  margin-top: auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 2px 10px;
  padding: 14px 8px 0;
  border-top: 1px solid rgba(255, 255, 255, .12);
}
.rail__user .avatar { grid-row: span 2; }
.rail__name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail__user form { margin: 0; }
.rail__logout {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 13px;
  color: rgba(255, 255, 255, .65);
  cursor: pointer;
}
.rail__logout:hover { color: #fff; text-decoration: underline; }

.avatar {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  flex: none;
}
.avatar--light { background: var(--soft); color: var(--ink); }

@media (max-width: 960px) {
  .shell { display: block; }
  .rail {
    position: sticky;
    z-index: 20;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    padding: 12px 16px 8px;
  }
  .rail__brand { padding: 0; }
  .rail__brand img { width: 32px; height: 32px; }
  .rail__brand small { display: none; }
  .rail__nav { order: 3; flex-basis: 100%; flex-direction: row; overflow-x: auto; scrollbar-width: none; margin: 0 -6px; }
  .rail__nav::-webkit-scrollbar { display: none; }
  .rail__nav a { padding: 8px 10px; font-size: 15px; }
  .rail__nav a[aria-current="page"]::before { display: none; }
  .rail__nav svg { display: none; }
  .rail__user { margin: 0 0 0 auto; padding: 0; border: 0; display: flex; gap: 12px; }
  .rail__user .avatar { width: 32px; height: 32px; font-size: 12px; }
  .rail__name { display: none; }
}

/* ---------- Seite ---------- */
.page {
  max-width: calc(1120px + 2 * var(--gutter));
  padding: 44px var(--gutter) 120px;
}
@media (max-width: 1200px) { :root { --gutter: 40px; } }
@media (max-width: 600px) { :root { --gutter: 16px; } .page { padding-top: 24px; } }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.page-head > div:first-child { min-width: 0; flex: 1 1 420px; }
.page-head h1 { overflow-wrap: anywhere; }
.page-head h1 + p { margin-top: 8px; max-width: 64ch; }
.page-head form { margin: 0; }

.back { margin: 0 0 14px; font-size: 14px; }
.back a { color: var(--ink-soft); text-decoration: none; }
.back a:hover { color: var(--red); }

/* ---------- Uebersicht ---------- */
.hello { max-width: 760px; }
.hello h1 { font-size: clamp(32px, 4vw, 44px); letter-spacing: -.025em; }
.hello__summary {
  margin: 16px 0 28px;
  font-family: var(--font-head);
  font-size: clamp(20px, 2.2vw, 25px);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -.01em;
  color: var(--ink);
}
.hello__summary a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}
.hello__summary a:hover { color: var(--red); }

.block { margin-top: 56px; max-width: 1120px; }
.block__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.block__head h2 { margin: 0; }

/* ---------- Flaechen ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 20px;
}
.card.card--flush { padding: 0; border: 0; border-radius: 0; background: none; }
.card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.card__head h2 { margin: 0; }
@media (max-width: 600px) { .card { padding: 18px; } }

.empty { text-align: center; padding: 56px 24px; }
.empty h1, .empty h2 { margin-bottom: 8px; }
.empty .btn { margin-top: 12px; }
.empty-row { padding: 28px 0; margin: 0; }

.columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}
.columns__main, .columns__side { min-width: 0; }
@media (max-width: 1100px) { .columns { grid-template-columns: minmax(0, 1fr); } }

.stack > * + * { margin-top: 16px; }
.stack > h2 + * { margin-top: 0; }
.stack > .field + .field, .stack > .field + .check, .stack > .check + .field { margin-top: 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .grid-2 { grid-template-columns: 1fr; } }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- Listen ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list li + li { border-top: 1px solid var(--line); }
.list__row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 12px;
  margin: 0 -12px;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
}
.list__row:hover { background: var(--soft); color: var(--ink); }
.list__main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.list__main .muted { font-size: 14px; }
.list__meta { display: flex; align-items: center; gap: 16px; flex: none; font-size: 14px; }
@media (max-width: 600px) {
  .list__row { flex-wrap: wrap; }
  .list__meta { flex-basis: 100%; padding-left: 50px; }
}

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; margin: 0 -12px; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th {
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
.table td { padding: 15px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr[data-href] { cursor: pointer; }
.table tbody tr:hover td { background: var(--soft); }
.table td a { color: var(--ink); text-decoration: none; }
.table td a:hover { color: var(--red); }
.table .num { text-align: right; }
.table--compact td { padding-top: 10px; padding-bottom: 10px; font-size: 14px; }
.actions-col { width: 1%; }
.actions { white-space: nowrap; text-align: right; }
.actions > * { display: inline-block; vertical-align: middle; margin-left: 6px; }
.actions form { margin: 0; }

/* ---------- Status ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink-soft);
  white-space: nowrap;
  vertical-align: middle;
}
.badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dot, var(--grey));
  flex: none;
}
.badge--large { font-size: 15px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 20px; }
.badge--neu { --dot: var(--red); color: var(--red); }
.badge--inpruefung { --dot: var(--blue); color: var(--blue); }
.badge--gespraech { --dot: var(--purple); color: var(--purple); }
.badge--abgesagt { --dot: var(--grey); }
.badge--eingestellt { --dot: var(--green); color: var(--green); }
.badge--online { --dot: var(--green); color: var(--green); }
.badge--offline { --dot: var(--grey); }
.badge--expired { --dot: var(--amber); color: var(--amber); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  background: var(--red);
  border: 1.5px solid var(--red);
  border-radius: 40px;
  padding: 11px 22px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btn--ghost { background: var(--paper); color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--paper); border-color: var(--ink); color: var(--ink); }
.btn--danger { background: var(--ink); border-color: var(--ink); }
.btn--danger:hover { background: #000; border-color: #000; }
.btn--small { font-size: 14px; padding: 7px 14px; }
.btn--block { width: 100%; }
.btn--microsoft {
  width: 100%;
  background: #fff;
  color: #1b1b1b;
  border: 1px solid #8c8c8c;
  border-radius: 8px;
  font-family: "Segoe UI", var(--font-body);
  font-weight: 600;
  padding: 13px 16px;
}
.btn--microsoft:hover { background: #f3f3f3; color: #1b1b1b; border-color: #8c8c8c; }
.ms-logo { display: grid; grid-template-columns: 9px 9px; gap: 2px; }
.ms-logo i { display: block; width: 9px; height: 9px; }
.ms-logo i:nth-child(1) { background: #f25022; }
.ms-logo i:nth-child(2) { background: #7fba00; }
.ms-logo i:nth-child(3) { background: #00a4ef; }
.ms-logo i:nth-child(4) { background: #ffb900; }

.link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--blue);
  text-decoration: underline;
  cursor: pointer;
}
.link:hover { color: var(--red); }

.icon-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 15px;
  cursor: pointer;
}
.icon-btn:hover { border-color: var(--ink); color: var(--ink); }
.icon-btn--danger:hover, .icon-btn.is-armed { border-color: var(--red); color: var(--red); }

/* ---------- Formulare ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 0; padding: 0; }
fieldset.field { margin-left: 0; margin-right: 0; }
.field--grow { flex: 1 1 220px; }
.field__label { font-weight: 600; font-size: 14px; padding: 0; }
.field__hint { font-size: 13px; color: var(--ink-soft); margin-top: -4px; }
.field__error { font-size: 14px; color: var(--red); font-weight: 600; }
.field__error:empty { display: none; }

input:not([type=checkbox]):not([type=radio]), select, textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 10px 12px;
  min-height: 44px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; line-height: 1.5; min-height: 64px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 67, 121, .14); }
.input-validation-error { border-color: var(--red) !important; }
::placeholder { color: #9aa4ae; }

.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; margin: 0; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--red); flex: none; }
.check input:disabled + span { opacity: .6; }
.check--warn { background: rgba(208, 4, 60, .06); border-radius: 8px; padding: 10px; }
fieldset.field .check + .check { margin-top: 8px; }
.roles { display: grid; gap: 8px; }

.card.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  padding: 0;
  border: 0;
  border-radius: 0;
  margin-bottom: 24px;
}
.filters .field { flex: 0 1 220px; }
.filters .field--grow { flex: 1 1 240px; }

/* ---------- Hinweise ---------- */
.flash {
  background: rgba(31, 122, 77, .09);
  color: var(--green);
  font-weight: 600;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 24px;
}
.flash--error { background: rgba(208, 4, 60, .08); color: var(--red); }
.notice { background: var(--soft); border-radius: 10px; padding: 12px 14px; font-size: 15px; }
.notice--error { background: rgba(208, 4, 60, .08); color: var(--red); font-weight: 600; }

/* ---------- Bewerbung ---------- */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 28px; margin: 0; }
.facts dt { color: var(--ink-soft); }
.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 10px; }
}

.files { list-style: none; margin: 0; padding: 0; }
.files__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.files__item:first-child { border-top: 0; padding-top: 0; }
.files__icon {
  flex: none;
  width: 40px;
  height: 46px;
  border-radius: 6px;
  background: rgba(208, 4, 60, .08);
  color: var(--red);
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.files__name { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; }
.files__name .muted { font-size: 14px; overflow-wrap: anywhere; }
.files__actions { display: flex; gap: 8px; flex: none; }

.message { white-space: pre-line; overflow-wrap: anywhere; }

details.danger { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
details.danger summary { cursor: pointer; color: var(--red); font-weight: 600; font-size: 15px; }
details.danger[open] summary { margin-bottom: 10px; }

/* ---------- Stellen-Editor ---------- */
.editor-bar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
  margin: 0 calc(-1 * var(--gutter)) 28px;
  padding: 14px var(--gutter);
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.editor-bar__title { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1 1 280px; }
.editor-bar__title h1 { font-size: 24px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.editor-bar__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.preview-toggle { display: none; }

.job-editor__grid {
  display: grid;
  grid-template-columns: minmax(0, 580px) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
.job-editor__form { min-width: 0; }

.esection { padding: 28px 0; border-top: 1px solid var(--line); }
.esection:first-child { border-top: 0; padding-top: 4px; }
.esection > * + * { margin-top: 14px; }
.esection h2 { margin: 0; font-size: 18px; }
.esection > .esection__hint, .esection__head + .esection__hint { margin-top: 4px; }
.esection__hint { font-size: 14px; color: var(--ink-soft); margin: 0; }
.esection__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.esection input.input-lg { font-size: 18px; font-weight: 600; min-height: 50px; }

.add-link {
  background: none;
  border: 0;
  padding: 4px 0;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--blue);
  cursor: pointer;
}
.add-link:hover { color: var(--red); }
.add-link--quiet { font-weight: 400; font-size: 14px; color: var(--ink-soft); justify-self: start; }

/* Abschnitte mit Ueberschrift und Stichpunkten */
.jsections { display: grid; gap: 14px; }
.jsection {
  margin: 0;
  min-width: 0;
  padding: 14px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  display: grid;
  gap: 10px;
}
.jsection__head { display: flex; gap: 8px; align-items: center; }
.jsection input.jsection__heading {
  flex: 1;
  min-width: 0;
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  border-color: transparent;
  background: transparent;
  padding: 8px 10px;
  margin-left: -10px;
  min-height: 40px;
}
.jsection input.jsection__heading:hover { border-color: var(--line); }
.jsection input.jsection__heading:focus { border-color: var(--blue); background: var(--paper); }
.jsection__tools { display: flex; gap: 4px; opacity: .45; transition: opacity .15s; }
.jsection:hover .jsection__tools, .jsection:focus-within .jsection__tools { opacity: 1; }
.jsection__tools .icon-btn { min-width: 30px; height: 30px; font-size: 14px; }
.icon-btn.is-armed { font-size: 13px; font-weight: 600; }

/* Listen mit einzelnen Zeilen */
.items-wrap { display: grid; gap: 6px; justify-items: start; }
.items { display: grid; gap: 6px; width: 100%; counter-reset: step; }
.items__row { display: flex; align-items: center; gap: 6px; }
.items__row::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin: 0 8px 0 4px;
  border-radius: 50%;
  background: var(--red);
}
.items[data-name="Input.Process"] .items__row { counter-increment: step; }
.items[data-name="Input.Process"] .items__row::before {
  content: counter(step);
  width: 22px;
  height: 22px;
  margin: 0 4px 0 0;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}
.items__row input { min-height: 40px; padding: 8px 12px; }
.items__remove {
  flex: none;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--grey);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s;
}
.items__row:hover .items__remove, .items__row:focus-within .items__remove { opacity: 1; }
.items__remove:hover { color: var(--red); background: var(--soft); }
@media (hover: none) {
  .items__remove, .jsection__tools { opacity: 1; }
}

.more { padding-bottom: 0; }
.more summary { cursor: pointer; font-family: var(--font-head); font-weight: 700; font-size: 18px; }
.more__body { display: grid; gap: 16px; margin-top: 18px; }
.field--narrow { max-width: 200px; }

/* Vorschau */
.preview {
  position: sticky;
  top: 92px;
  min-width: 0;
  height: calc(100vh - 112px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--soft);
}
.preview__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.preview__title { font-weight: 600; font-size: 14px; margin-right: auto; }
.preview__close {
  display: none;
  border: 0;
  background: none;
  font-size: 18px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--ink-soft);
}
.preview__close:hover { background: var(--soft); color: var(--ink); }
.preview__stage { flex: 1; overflow: auto; padding: 16px; }
.preview__canvas {
  position: relative;
  margin: 0 auto;
  overflow: hidden;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 27, 49, .12);
}
.preview__canvas iframe {
  position: absolute;
  top: 0;
  left: 0;
  border: 0;
  transform-origin: 0 0;
  pointer-events: auto;
}

.segmented { display: inline-flex; background: var(--soft); border-radius: 8px; padding: 3px; }
.segmented button {
  border: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  color: var(--ink-soft);
  cursor: pointer;
}
.segmented button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 27, 49, .14); }

@media (max-width: 1200px) {
  .job-editor__grid { grid-template-columns: minmax(0, 1fr); }
  .job-editor__form { max-width: 680px; }
  .preview-toggle { display: inline-flex; }
  .preview {
    position: fixed;
    z-index: 40;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(520px, 100vw);
    height: auto;
    border-radius: 0;
    border-width: 0 0 0 1px;
    box-shadow: -12px 0 40px rgba(0, 27, 49, .18);
    transform: translateX(105%);
    visibility: hidden;
    transition: transform .25s ease, visibility 0s linear .25s;
  }
  .is-preview-open .preview { transform: none; visibility: visible; transition: transform .25s ease; }
  .preview__close { display: inline-grid; place-items: center; }
}

@media (max-width: 960px) {
  .editor-bar { position: static; margin-bottom: 20px; }
  .editor-bar__actions {
    position: fixed;
    z-index: 30;
    left: 0;
    right: 0;
    bottom: 0;
    justify-content: flex-end;
    padding: 12px 16px;
    background: rgba(255, 255, 255, .96);
    border-top: 1px solid var(--line);
  }
  .editor-bar__actions .btn { padding: 10px 16px; font-size: 14px; }
}

.danger-zone { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); max-width: 580px; }
.danger-zone h2 { font-size: 18px; margin-bottom: 14px; }
.danger-zone details.danger { margin-top: 20px; border-top: 0; padding-top: 0; }

/* ---------- Benutzer ---------- */
.user--inactive { opacity: .7; }
.user__head { display: flex; justify-content: space-between; gap: 12px; }
.user__head .badge { margin-left: 8px; }

/* ---------- Seitenwechsel ---------- */
.pager { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 20px; }

/* ---------- Anmeldung ---------- */
.admin--bare { background: var(--ink); }
.page--bare {
  max-width: none;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}
.login {
  width: min(420px, 100%);
  margin: 0;
  padding: 40px 36px 36px;
  border: 0;
  border-radius: 18px;
  text-align: center;
}
.login > * + * { margin-top: 18px; }
.login__logo { display: block; width: 220px; height: auto; margin: 0 auto 8px; }
.login__title { font-size: 24px; }
.login form { margin-top: 24px; }
.login__dev { text-align: left; border-top: 1px dashed var(--line-strong); padding-top: 20px; display: grid; gap: 12px; }
.login__dev-title { font-size: 14px; font-weight: 600; color: var(--ink-soft); margin: 0; }
