/* ===== Admin-Bereich ===== */
:root {
  --brand: #d9472b;
  --brand-dark: #b8381f;
  --brand-soft: #fdf0ec;
  --ink: #1d2433;
  --ink-2: #3b4456;
  --muted: #6b7280;
  --bg: #f6f5f3;
  --panel: #ffffff;
  --line: #e7e3de;
  --line-strong: #d6d0c8;
  --ok: #15803d;
  --ok-soft: #e8f6ed;
  --info: #1d4ed8;
  --info-soft: #eaf0fe;
  --warn: #a15c07;
  --warn-soft: #fff6e5;
  --danger: #b91c1c;
  --danger-soft: #fdecec;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(29, 36, 51, .05), 0 6px 20px rgba(29, 36, 51, .05);
  --focus: 0 0 0 3px rgba(217, 71, 43, .28);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--brand-dark); }
a:hover { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; color: var(--ink); }
h1 { font-size: 1.75rem; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; }
p { margin: 0 0 .75em; }
code { font-size: .9em; background: #f1eee9; padding: .1em .35em; border-radius: 5px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.warn-text { color: var(--warn); }
.mt { margin-top: 1.6rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
:focus-visible { outline: none; box-shadow: var(--focus); }

/* ---------- Kopfzeile ---------- */
.topnav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 24px;
  min-height: 60px;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.topnav-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; white-space: nowrap; }
.topnav-brand img { height: 34px; }
.topnav-links { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.topnav-links a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
  white-space: nowrap;
}
.topnav-links a:hover { background: #f3f1ee; color: var(--ink); }
.topnav-links a.is-active { background: var(--brand-soft); color: var(--brand-dark); }
.topnav-user { display: flex; align-items: center; gap: 10px; margin: 0; }
.topnav-name { font-size: .9rem; color: var(--muted); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.count-badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: #fff; font-size: .75rem; line-height: 20px; text-align: center; }

/* ---------- Seite ---------- */
.page { max-width: 1240px; margin: 0 auto; padding: 28px 24px 80px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-head p { margin: 0; max-width: 760px; }
.page-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 4px !important; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand-dark); text-decoration: underline; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
  margin-bottom: 20px;
}
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.card-head p { margin: 0; }
.card-highlight { border-color: #f2c4b8; background: linear-gradient(180deg, #fff9f7, #fff); }
.card-collapsible > summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.card-collapsible > summary::-webkit-details-marker { display: none; }
.card-collapsible > summary h2 { margin: 0; }
.card-collapsible > summary h2::before { content: "▸"; display: inline-block; width: 1.1em; color: var(--muted); transition: transform .15s; }
.card-collapsible[open] > summary h2::before { transform: rotate(90deg); }
.card-collapsible[open] > summary { margin-bottom: 14px; }
.card-foot { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.count { display: inline-block; padding: 0 8px; border-radius: 999px; background: #f1eee9; color: var(--ink-2); font-size: .8rem; vertical-align: middle; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 650;
  font-size: .95rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .12s, border-color .12s, color .12s;
}
.btn:hover { background: #f7f5f2; color: var(--ink); border-color: #c9c2b8; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: #efece8; border-color: transparent; }
.btn-danger-ghost { background: #fff; border-color: #f0c9c9; color: var(--danger); }
.btn-danger-ghost:hover { background: var(--danger-soft); color: var(--danger); border-color: #e7a9a9; }
.btn-sm { padding: 6px 11px; font-size: .875rem; }
.btn-lg { padding: 12px 22px; font-size: 1rem; }
.btn-block { display: flex; width: 100%; }

/* ---------- Meldungen ---------- */
.flash, .notice { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; border: 1px solid; }
.flash-ok { background: var(--ok-soft); border-color: #bfe3cb; color: #14532d; }
.flash-error { background: var(--danger-soft); border-color: #f1c0c0; color: #7f1d1d; }
.flash-warn, .notice-warn { background: var(--warn-soft); border-color: #f3d9a6; color: #713f12; }
.notice-info { background: var(--info-soft); border-color: #c9d7fb; color: #1e3a8a; }
.notice-link { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; text-decoration: none; }
.notice-link:hover { color: #1e3a8a; filter: brightness(.98); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 100;
  max-width: min(92vw, 560px);
  padding: 12px 18px;
  border-radius: 10px;
  background: #1d2433;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
  transform: translate(-50%, 20px);
  opacity: 0;
  transition: opacity .2s, transform .2s;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast-error { background: var(--danger); }

/* ---------- Badges / Pills ---------- */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: #f1eee9; color: var(--ink-2); white-space: nowrap; }
.badge-live { background: var(--ok-soft); color: var(--ok); }
.badge-scheduled { background: var(--info-soft); color: var(--info); }
.badge-paused { background: #eeeeee; color: #555; }
.badge-expired { background: var(--warn-soft); color: var(--warn); }
.badge-role { background: var(--brand-soft); color: var(--brand-dark); }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; letter-spacing: 0; vertical-align: middle; white-space: nowrap; }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill-online { background: var(--ok-soft); color: var(--ok); }
.pill-online i { box-shadow: 0 0 0 3px rgba(21, 128, 61, .18); }
.pill-offline { background: var(--warn-soft); color: var(--warn); }
.pill-never, .pill-off { background: #f0eeeb; color: var(--muted); }

/* ---------- Formulare ---------- */
.field { display: grid; gap: 6px; margin-bottom: 18px; min-width: 0; }
.field:last-child { margin-bottom: 0; }
.field > label, .field > .label { font-weight: 700; font-size: .95rem; }
.field > label.sub { font-weight: 600; font-size: .85rem; color: var(--muted); }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 18px; margin-bottom: 18px; }
.field-row .field { margin-bottom: 0; }
.hint { margin: 0; font-size: .85rem; color: var(--muted); }
.field-error { margin: 0; font-size: .875rem; color: var(--danger); font-weight: 600; }
.field-warn { margin: 0; padding: 8px 12px; border-radius: 8px; background: var(--warn-soft); color: #713f12; font-size: .9rem; }
input[type="text"], input:not([type]), input[type="number"], input[type="date"], input[type="url"], select, textarea {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font: inherit;
}
input:focus, select:focus, textarea:focus, .rte:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
input[readonly] { background: #faf9f7; }
input[type="range"] { width: 100%; accent-color: var(--brand); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); width: 18px; height: 18px; margin: 0; }
.check-list { display: flex; flex-wrap: wrap; gap: 8px; }
.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font-weight: 600;
  font-size: .95rem;
}
.check:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.form-inline { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.form-inline .field { margin: 0; flex: 1 1 220px; }
.form-inline input:not([type="hidden"]) { min-width: 220px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; }

/* Schalter */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: relative; flex: none; width: 42px; height: 24px; border-radius: 999px; background: #cfc9c1; transition: background-color .15s; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + .switch-track { background: var(--ok); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { box-shadow: var(--focus); }
.switch-labeled { font-weight: 600; margin: 4px 0; }

/* Schnellwahl-Chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 6px; }
.chip { padding: 5px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; font: inherit; font-size: .85rem; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.chip:hover { border-color: var(--brand); color: var(--brand-dark); }

/* ---------- Übersicht ---------- */
.display-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
.display-card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.display-card-main { display: block; padding: 20px 22px 12px; color: inherit; text-decoration: none; flex: 1; }
.display-card-main:hover { background: #fdfcfb; color: inherit; }
.display-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.display-card-head h2 { margin: 0; font-size: 1.25rem; }
.display-card-stats { margin: 12px 0 2px; }
.display-card-actions { display: flex; gap: 6px; flex-wrap: wrap; padding: 12px 22px 18px; }
.mini-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; min-height: 64px; }
.mini-empty { grid-column: 1 / -1; display: grid; place-items: center; border: 1px dashed var(--line-strong); border-radius: 8px; color: var(--muted); font-size: .85rem; }

/* ---------- Vorschaubilder ---------- */
.thumb { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; border-radius: 8px; background: #f3f1ee; border: 1px solid var(--line); color: var(--muted); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-list { width: 112px; height: 72px; flex: none; }
.thumb-mini { width: 100%; aspect-ratio: 4 / 3; }
.thumb-icon { font-size: 1.5rem; line-height: 1; }
.thumb-mini .thumb-icon { font-size: 1.2rem; }
.thumb-label { font-size: .7rem; font-weight: 700; margin-top: 4px; max-width: 92%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb-mini .thumb-label { display: none; }
.thumb-type-text { align-items: stretch; justify-content: flex-start; background: #fff; }
.thumb-text { padding: 6px 7px; font-size: .62rem; line-height: 1.25; color: var(--ink-2); overflow: hidden; height: 100%; text-align: left; }
.thumb-text b { display: block; color: var(--brand-dark); font-size: .7rem; margin-bottom: 2px; }
.thumb-mini .thumb-text { font-size: .5rem; padding: 4px; }
.thumb-mini .thumb-text b { font-size: .55rem; }

/* ---------- Folienliste ---------- */
.slide-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.slide-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  transition: box-shadow .15s, background-color .3s, opacity .15s;
}
.slide-row:hover { box-shadow: 0 2px 10px rgba(29, 36, 51, .07); }
.slide-row.status-paused, .slide-row.status-expired { background: #fbfaf8; }
.slide-row.status-paused .slide-row-thumb, .slide-row.status-expired .slide-row-thumb { opacity: .55; filter: grayscale(.6); }
.slide-row.is-dragging { opacity: .45; }
.slide-row.is-moved, .slide-row.is-highlight { background: #fff7e8; }
.drag-handle { cursor: grab; color: #b3aca2; font-size: 1.2rem; padding: 4px 2px; user-select: none; }
.drag-handle:active { cursor: grabbing; }
.slide-row-main { flex: 1; min-width: 0; }
.slide-row-thumb { text-decoration: none; }
.slide-row-title { display: block; font-weight: 700; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slide-row-title:hover { color: var(--brand-dark); text-decoration: underline; }
.slide-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: .85rem; color: var(--muted); margin-top: 3px; }
.slide-row-also { font-size: .8rem; color: var(--muted); margin-top: 2px; }
.slide-row-actions { display: flex; align-items: center; gap: 8px; }

.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 10;
  min-width: 190px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(29, 36, 51, .14);
}
.menu-list form { margin: 0; }
.menu-list button { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: none; font: inherit; font-size: .92rem; text-align: left; cursor: pointer; color: var(--ink); }
.menu-list button:hover { background: #f3f1ee; }
.menu-list button.danger { color: var(--danger); }

.empty { text-align: center; padding: 30px 10px; color: var(--muted); }
.empty h2 { color: var(--ink); }

/* ---------- Folien-Editor ---------- */
.editor-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); gap: 22px; align-items: start; }
.step { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.step span { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .85rem; }

.type-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.type-tile {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "icon label" "icon desc";
  column-gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color .12s, background-color .12s;
}
.type-tile:hover { border-color: var(--line-strong); background: #fdfcfa; }
.type-tile input { position: absolute; opacity: 0; }
.type-tile.is-selected, .type-tile:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.type-tile:has(input:focus-visible) { box-shadow: var(--focus); }
.type-tile-icon { grid-area: icon; font-size: 1.6rem; }
.type-tile-label { grid-area: label; font-weight: 750; }
.type-tile-desc { grid-area: desc; font-size: .78rem; color: var(--muted); line-height: 1.3; }
.type-tile-advanced { opacity: .8; }

.dropzone {
  position: relative;
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 120px;
  padding: 20px;
  border: 2px dashed var(--line-strong);
  border-radius: 12px;
  background: #fcfbf9;
  text-align: center;
  cursor: pointer;
  transition: border-color .12s, background-color .12s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--brand); background: var(--brand-soft); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone-text strong { color: var(--brand-dark); }
.dropzone-name { font-size: .85rem; color: var(--ink-2); word-break: break-all; }
.pdf-pager { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.rte-toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; border: 1px solid var(--line-strong); border-bottom: 0; border-radius: var(--radius-sm) var(--radius-sm) 0 0; background: #faf9f7; }
.rte-toolbar button { padding: 6px 10px; border: 1px solid transparent; border-radius: 6px; background: none; font: inherit; font-size: .85rem; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.rte-toolbar button:hover { background: #fff; border-color: var(--line); }
.rte-toolbar .sep { width: 1px; background: var(--line-strong); margin: 2px 4px; }
.rte {
  min-height: 240px;
  max-height: 60vh;
  overflow: auto;
  padding: 14px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: #fff;
  font-size: 1.05rem;
  line-height: 1.45;
}
.rte h1 { font-size: 1.6rem; color: var(--brand-dark); margin: .2em 0 .4em; }
.rte h2 { font-size: 1.25rem; color: var(--brand-dark); margin: .6em 0 .3em; }
.rte p { margin: .35em 0; }
.rte ul, .rte ol { padding-left: 1.4em; }

.editor-preview { min-width: 0; }
.preview-sticky { position: sticky; top: 80px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.preview-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.preview-head h2 { margin: 0; }
.preview-head select { width: auto; padding: 6px 10px; font-size: .9rem; }
.preview-frame { position: relative; width: 100%; overflow: hidden; border-radius: 8px; background: #111; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.preview-stage { position: absolute; top: 0; left: 0; transform-origin: 0 0; overflow: hidden; background: var(--screen-bg, #fff); }
.preview-stage .slide { opacity: 1; }
.preview-placeholder { position: absolute; inset: 0; display: grid; place-items: center; padding: 40px; text-align: center; color: #9aa0a8; font-size: 42px; font-weight: 600; background: repeating-linear-gradient(45deg, #fafafa, #fafafa 24px, #f3f3f3 24px, #f3f3f3 48px); }
.editor-preview .hint { margin-top: 10px; }

.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-color: #f1d3d3; }
.danger-zone h2 { color: var(--danger); margin-bottom: 4px; }
.danger-zone p { margin: 0; }

/* ---------- Display-Einstellungen ---------- */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 20px; margin: 4px 0 16px; }
.facts div { min-width: 0; }
.facts dt { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.facts dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.layout-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-bottom: 16px; }
.layout-option { display: flex; gap: 14px; align-items: center; padding: 14px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; }
.layout-option:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.layout-option input { flex: none; }
.layout-pic { flex: none; display: flex; width: 86px; height: 50px; padding: 4px; gap: 3px; border-radius: 6px; background: #2b2f38; }
.layout-pic span { flex: 1; border-radius: 3px; background: linear-gradient(180deg, #f5a38f 0 22%, #fff 22%); }
.layout-pic i { flex: 1; border-radius: 3px; background: repeating-linear-gradient(180deg, #dfe6f3 0 5px, #fff 5px 8px); }
.swatch { display: inline-block; width: 16px; height: 16px; border-radius: 4px; }
.swatch-student { background: linear-gradient(135deg, #e64a2e, #ff7c00); }
.swatch-teacher { background: linear-gradient(135deg, #b91c1c 50%, #efefef 50%); border: 1px solid #ddd; }

/* ---------- Tabellen / Nutzer ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 0 10px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.td-actions { text-align: right; white-space: nowrap; }
.user-list { list-style: none; margin: 0; padding: 0; }
.user-list li { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--line); }
.user-list li:last-child { border-bottom: 0; }
.user-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.user-actions form { margin: 0; }
.inline-select select { width: auto; padding: 6px 10px; font-size: .9rem; }

/* ---------- Anmeldung ---------- */
.auth-page { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(1200px 600px at 20% -10%, #fde4dc, transparent), var(--bg); }
.auth-page .page { width: 100%; padding: 24px 16px; }
.auth-card { max-width: 420px; margin: 0 auto; padding: 34px 30px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 20px 50px rgba(29, 36, 51, .1); text-align: center; }
.auth-card h1 { font-size: 1.5rem; }
.auth-card .btn-block { margin: 18px 0 14px; }
.auth-logo { height: 64px; margin-bottom: 12px; }

/* ---------- Kleine Bildschirme ---------- */
@media (max-width: 980px) {
  .editor-layout { grid-template-columns: 1fr; }
  .preview-sticky { position: static; }
}
@media (max-width: 720px) {
  .topnav { flex-wrap: wrap; gap: 6px 12px; padding: 8px 16px; }
  .topnav-brand span { display: none; }
  .topnav-links { order: 3; flex-basis: 100%; }
  .topnav-name { display: none; }
  .topnav-user { margin-left: auto; }
  .page { padding: 18px 16px 60px; }
  h1 { font-size: 1.45rem; }
  .card { padding: 18px 16px; }
  .display-grid { grid-template-columns: 1fr; }
  .slide-row { flex-wrap: wrap; gap: 10px; }
  .drag-handle { display: none; }
  .thumb-list { width: 84px; height: 56px; }
  .slide-row-main { flex: 1 1 calc(100% - 110px); }
  .slide-row-actions { width: 100%; justify-content: flex-end; }
  .table thead { display: none; }
  .table tr { display: grid; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .table td { border: 0; padding: 3px 0; }
  .td-actions { text-align: left; }
  .copy-row { flex-direction: column; }
}
