/* ==========================================================================
   Papedrive – Oberfläche
   Ruhig, aufgeräumt, warm. Keine Web-Fonts, keine externen Ressourcen.
   ========================================================================== */

:root {
  --bg: #F7F5EF;
  --surface: #FFFFFF;
  --surface-2: #FBFAF7;
  --line: #E6E1D6;
  --line-strong: #D5CFC2;
  --ink: #1E2A32;
  --muted: #6B7780;
  --primary: #1E9E7A;
  --primary-dark: #17805F;
  --primary-ink: #146B53;
  --primary-soft: #DDF3EC;
  --accent: #F2994A;
  --accent-soft: #FDEBDB;
  --warn: #E0A100;
  --warn-ink: #7A5A00;
  --warn-soft: #FFF4CC;
  --danger: #D64545;
  --danger-ink: #A83232;
  --danger-soft: #FBE3E3;
  --info: #2F6FD6;
  --info-soft: #E1ECFB;
  --conf: #7A5AF8;
  --conf-soft: #EBE5FF;
  --radius: 12px;
  --radius-s: 8px;
  --shadow: 0 1px 2px rgba(30, 42, 50, .06), 0 8px 24px rgba(30, 42, 50, .06);
  --shadow-pop: 0 2px 6px rgba(30, 42, 50, .08), 0 16px 40px rgba(30, 42, 50, .14);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sidebar-w: 240px;
  --topbar-h: 60px;
  --gutter: 20px;
}

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

html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
#root { height: 100%; }

h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--primary-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
kbd {
  display: inline-block;
  min-width: 20px;
  padding: 0 5px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--surface);
  font-family: var(--font);
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  color: var(--ink);
}
code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--muted); }
.spacer { flex: 1; }
.page-title { font-size: 20px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; }
mark { background: #FFE58A; color: inherit; border-radius: 3px; padding: 0 1px; }
mark.hl { background: var(--primary-soft); color: var(--primary-ink); }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* --------------------------------------------------------------------------
   Knöpfe
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  background: var(--surface);
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: background .12s, border-color .12s, box-shadow .12s, transform .05s;
}
.btn:hover { background: var(--surface-2); border-color: #C8C1B2; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn--primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn--secondary { background: var(--primary-soft); border-color: var(--primary-soft); color: var(--primary-ink); }
.btn--secondary:hover { background: #CDEBE0; border-color: #CDEBE0; }
.btn--ghost { background: transparent; border-color: transparent; color: var(--ink); }
.btn--ghost:hover { background: rgba(30, 42, 50, .06); border-color: transparent; }
.btn--danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn--danger:hover { background: #BF3A3A; border-color: #BF3A3A; }
.btn--danger-ghost { color: var(--danger-ink); }
.btn--danger-ghost:hover { background: var(--danger-soft); border-color: var(--danger-soft); }
.btn--sm { height: 30px; padding: 0 10px; font-size: 13px; gap: 5px; }
.btn--big { height: 42px; font-size: 15px; }
.btn--icon { width: 36px; padding: 0; border-color: transparent; background: transparent; color: var(--muted); }
.btn--icon:hover { background: rgba(30, 42, 50, .07); color: var(--ink); border-color: transparent; }
.btn--icon.btn--sm { width: 30px; }
.btn .icon { flex: none; }

/* --------------------------------------------------------------------------
   Eingaben
   -------------------------------------------------------------------------- */

.input {
  width: 100%;
  height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  background: var(--surface);
  color: var(--ink);
  transition: border-color .12s, box-shadow .12s;
}
.input::placeholder { color: #9AA3AA; }
.input:hover { border-color: #C8C1B2; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.input:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.input--sm { height: 30px; padding: 0 8px; font-size: 13px; }
.input--with-icon { padding-left: 34px; }
textarea.input { height: auto; padding: 8px 11px; resize: vertical; line-height: 1.45; }
select.input { padding-right: 28px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7780' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; }
input[type="date"].input { padding-right: 6px; }
.date-field { position: relative; display: block; }
.date-field .input { padding-right: 34px; }
.date-field--invalid .input { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.date-field__button { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); padding: 0; }
.date-field__button:hover { background: rgba(30, 42, 50, .07); color: var(--ink); }
.date-field--sm .date-field__button { width: 24px; height: 24px; right: 3px; }
.date-field__picker { position: absolute; right: 4px; bottom: 0; width: 28px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
input[type="range"] { width: 100%; accent-color: var(--primary); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--primary); width: 16px; height: 16px; margin: 0; }

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field__label { font-size: 12.5px; font-weight: 600; color: var(--muted); letter-spacing: .01em; }
.field__label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; }
.field__hint { font-size: 12.5px; color: var(--muted); }
.field__error { font-size: 12.5px; color: var(--danger-ink); }
.field__badge { align-self: flex-start; font-size: 11.5px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 1px 8px; }
.field--wide { grid-column: 1 / -1; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-stack { display: flex; flex-direction: column; gap: 14px; }

.kv-list { display: flex; flex-direction: column; gap: 6px; }
.kv-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) 36px; gap: 6px; align-items: center; }

.segmented { display: inline-flex; max-width: 100%; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-s); gap: 2px; }
.segmented__item {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: 1 1 auto; min-width: 0;
  height: 28px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-weight: 500; font-size: 13px; white-space: nowrap;
}
.field > .segmented { display: flex; }
.segmented__item:hover { color: var(--ink); }
.segmented__item--active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(30, 42, 50, .12); }
.segmented__item:disabled { opacity: .6; cursor: not-allowed; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch__track { position: relative; width: 36px; height: 20px; flex: none; border-radius: 999px; background: #CFC9BC; transition: background .15s; }
.switch__track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s; }
.switch input:checked + .switch__track { background: var(--primary); }
.switch input:checked + .switch__track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--primary); outline-offset: 2px; }
.switch input:disabled + .switch__track { opacity: .5; }
.switch--sm { font-size: 13px; }
.switch--block { align-items: flex-start; padding: 10px 0; }
.switch--block .switch__track { margin-top: 1px; }
.switch__text { display: flex; flex-direction: column; }
.switch__hint { font-size: 12.5px; color: var(--muted); }

.radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.radio-card { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 12px 14px 12px 38px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); cursor: pointer; background: var(--surface); transition: border-color .12s, background .12s; }
.radio-card:hover { border-color: #C8C1B2; }
.radio-card--active { border-color: var(--primary); background: #F3FBF8; box-shadow: 0 0 0 1px var(--primary); }
.radio-card input { position: absolute; left: 13px; top: 14px; }
.radio-card__label { font-weight: 600; }
.radio-card__hint { font-size: 12.5px; color: var(--muted); }

.range-row { display: flex; align-items: center; gap: 12px; }
.range-row__value { min-width: 44px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   Pillen, Chips, Abzeichen
   -------------------------------------------------------------------------- */

.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1; }
.pill--grey { background: #EEF0F2; color: #4C5A64; }
.pill--yellow { background: var(--warn-soft); color: var(--warn-ink); }
.pill--green { background: var(--primary-soft); color: var(--primary-ink); }
.pill--blue { background: var(--info-soft); color: #1F4F9E; }
.pill--purple { background: var(--conf-soft); color: #5B3FD6; }
.pill--red { background: var(--danger-soft); color: var(--danger-ink); }
.pill__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .8; }
.pill__dot--pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; color: #4C5A64; white-space: nowrap; }
.chip--more { color: var(--muted); }
.chip--removable { padding-right: 4px; }
.chip__remove { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); padding: 0; }
.chip__remove:hover { background: rgba(30, 42, 50, .1); color: var(--ink); }
.chips--input { min-height: 36px; padding: 4px 8px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--surface); cursor: text; align-items: center; }
.chips--input:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.chips--disabled { background: var(--surface-2); cursor: not-allowed; }
.chips__input { flex: 1; min-width: 90px; height: 26px; border: 0; outline: none; background: transparent; padding: 0 4px; }
.chips__input::placeholder { color: #9AA3AA; }

.badge { display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 7px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge--tasks { background: var(--accent-soft); color: #A85C1A; }
.lock { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--conf-soft); color: #5B3FD6; font-size: 12px; font-weight: 600; }
.spark { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 1px 7px; vertical-align: middle; }

.avatar { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.avatar--soft { background: var(--primary-soft); color: var(--primary-ink); }
.avatar--big { width: 48px; height: 48px; font-size: 16px; }

/* --------------------------------------------------------------------------
   Rahmen: Seitenleiste · Kopfzeile · Inhalt
   -------------------------------------------------------------------------- */

.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); height: 100vh; height: 100dvh; }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.content { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0 var(--gutter) var(--gutter); }
.boot { height: 100vh; display: flex; align-items: center; justify-content: center; }

.sidebar { display: flex; flex-direction: column; gap: 14px; padding: 14px 12px 12px; border-right: 1px solid var(--line); background: var(--bg); min-height: 0; }
.sidebar-backdrop { display: none; }
.sidebar__brand { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px; }
.sidebar__close { display: none; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand__mark { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 9px; background: var(--primary); color: #fff; }
.brand--big { font-size: 22px; }
.brand--big .brand__mark { width: 38px; height: 38px; border-radius: 11px; }
.sidebar__upload { width: 100%; height: 40px; box-shadow: 0 4px 12px rgba(30, 158, 122, .25); }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav__item { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 8px 0 10px; border-radius: var(--radius-s); color: var(--ink); font-weight: 500; transition: background .12s; }
.nav__item .icon { color: var(--muted); flex: none; }
.nav__item:hover { background: rgba(30, 42, 50, .06); text-decoration: none; }
.nav__item--active { background: var(--surface); box-shadow: 0 1px 2px rgba(30, 42, 50, .08); color: var(--primary-ink); font-weight: 600; }
.nav__item--active .icon { color: var(--primary); }
.nav__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav__count { min-width: 22px; height: 20px; padding: 0 5px; border-radius: 999px; background: #E3DFD4; color: #4C5A64; font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.nav__count--warn { background: var(--warn-soft); color: var(--warn-ink); }
.nav__count--danger { background: var(--danger-soft); color: var(--danger-ink); }

.sidebar__notice { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius-s); background: var(--warn-soft); color: var(--warn-ink); font-size: 12.5px; }
.sidebar__user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 8px 6px 0; border-top: 1px solid var(--line); }
.sidebar__user-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.sidebar__user-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar__user-role { font-size: 12px; color: var(--muted); }

.topbar { height: var(--topbar-h); flex: none; display: flex; align-items: center; gap: 14px; padding: 0 var(--gutter); }
.topbar__menu { display: none; }
.topbar__pipeline { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.topbar__pipeline .pill__dot { color: var(--primary); }

.searchbox { position: relative; flex: 1; max-width: 720px; display: flex; align-items: center; }
.searchbox__icon { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.searchbox__input { width: 100%; height: 38px; padding: 0 42px 0 38px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 1px 2px rgba(30, 42, 50, .04); transition: border-color .12s, box-shadow .12s; appearance: none; }
.searchbox__input::-webkit-search-cancel-button { display: none; }
.searchbox__input::placeholder { color: #9AA3AA; }
.searchbox__input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.searchbox__kbd { position: absolute; right: 10px; color: var(--muted); pointer-events: none; }
.searchbox__dropdown { top: calc(100% + 6px); }

/* Aufklapplisten (Kombinationsfelder, Suche) */
.combobox { position: relative; }
.combobox__field { position: relative; display: flex; align-items: center; }
.combobox__field .input { padding-right: 34px; }
.combobox__icon { position: absolute; left: 11px; color: var(--muted); pointer-events: none; display: inline-flex; }
.combobox__caret { position: absolute; right: 10px; color: var(--muted); pointer-events: none; display: inline-flex; }
.combobox__clear { position: absolute; right: 6px; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); padding: 0; }
.combobox__clear:hover { background: rgba(30, 42, 50, .08); color: var(--ink); }
.dropdown { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 40; max-height: 320px; overflow: auto; padding: 4px; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); box-shadow: var(--shadow-pop); }
.dropdown__item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 6px; cursor: pointer; }
.dropdown__item--active { background: var(--primary-soft); }
.dropdown__item--create { color: var(--primary-ink); font-weight: 500; }
.dropdown__icon { color: var(--muted); flex: none; }
.dropdown__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown__hint { padding: 8px 10px; color: var(--muted); font-size: 13px; }
.dropdown__hint-inline { font-size: 12px; color: var(--muted); white-space: nowrap; }
.dropdown__count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dropdown__spark { color: var(--accent); flex: none; }

/* --------------------------------------------------------------------------
   Seiten und Spalten
   -------------------------------------------------------------------------- */

.page { flex: 1; min-height: 0; overflow: auto; padding: 4px 2px 20px; }
.page__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.page__tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.page--detail { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.page--detail .detail { flex: 1; min-height: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

.split { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(380px, 2fr) minmax(520px, 3fr); gap: 16px; }
.split--narrow { grid-template-columns: minmax(330px, 1fr) minmax(520px, 2.4fr); }
.split--stacked { grid-template-columns: minmax(0, 1fr); }
.split__list, .split__detail { min-height: 0; min-width: 0; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }

.pane { position: relative; display: flex; flex-direction: column; height: 100%; min-height: 0; }
.pane__scroll { flex: 1; min-height: 0; overflow: auto; }
.pane__head { padding: 16px 16px 10px; }
.pane__head--row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pane__filter { position: relative; padding: 0 12px 10px; }
.pane__filter-icon { position: absolute; left: 24px; top: 11px; color: var(--muted); pointer-events: none; }
.pane__foot { padding: 12px 16px; text-align: center; font-size: 12.5px; }

.loading-bar { position: absolute; top: 0; left: 0; right: 0; height: 2px; overflow: hidden; z-index: 5; pointer-events: none; opacity: 0; transition: opacity .2s; }
.loading-bar--active { opacity: 1; }
.loading-bar::after { content: ""; position: absolute; left: -40%; width: 40%; height: 100%; background: var(--primary); animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { 0% { left: -40%; } 100% { left: 100%; } }

.spinner { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 32px; color: var(--muted); }
.spinner__ring { width: 18px; height: 18px; border: 2px solid var(--line-strong); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton-list { padding: 8px 16px; display: flex; flex-direction: column; gap: 10px; }
.skeleton-row { height: 84px; border-radius: 10px; background: linear-gradient(90deg, var(--surface-2) 25%, #F1EEE6 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.errorbox { display: flex; align-items: center; gap: 10px; margin: 12px 16px; padding: 10px 12px; border-radius: var(--radius-s); background: var(--danger-soft); color: var(--danger-ink); }
.errorbox .btn { margin-left: auto; }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 48px 24px; }
.empty--compact { padding: 28px 16px; }
.empty__title { font-size: 16px; font-weight: 600; margin-top: 6px; }
.empty__text { color: var(--muted); max-width: 380px; }
.empty__action { margin-top: 8px; }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 22px 0 10px; }
.section-title { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 700; }
.section-title .icon { color: var(--muted); }
.section-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 11.5px; color: var(--muted); font-weight: 600; }

/* --------------------------------------------------------------------------
   Posteingang: Assistentin-Karte, Filter, Liste
   -------------------------------------------------------------------------- */

.assistant-card { display: flex; gap: 14px; align-items: flex-start; margin: 14px 14px 6px; padding: 16px; border-radius: var(--radius); background: linear-gradient(135deg, #FFF8F0 0%, #F4FBF8 100%); border: 1px solid #F0E6D6; }
.assistant-card .assistentin { flex: none; }
.assistant-card__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.assistant-card__message { font-size: 15px; font-weight: 500; line-height: 1.4; }
.kpis { display: flex; flex-wrap: wrap; gap: 8px; }
.kpi { flex: 1 1 0; min-width: 84px; display: flex; flex-direction: column; padding: 7px 11px; border-radius: 10px; background: rgba(255, 255, 255, .8); border: 1px solid var(--line); }
.kpi__label { white-space: nowrap; }
.kpi__value { font-size: 20px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi__label { font-size: 12px; color: var(--muted); }
.kpi--warn .kpi__value { color: var(--warn-ink); }
.kpi--ok .kpi__value { color: var(--primary-ink); }

.filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 14px 10px; border-bottom: 1px solid var(--line); }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-weight: 500; font-size: 13px; transition: all .12s; }
.filter-chip:hover { border-color: var(--line-strong); color: var(--ink); }
.filter-chip--active { background: var(--ink); border-color: var(--ink); color: #fff; }
.filter-chip__count { font-size: 11.5px; font-weight: 700; padding: 0 6px; border-radius: 999px; background: rgba(30, 42, 50, .08); }
.filter-chip--active .filter-chip__count { background: rgba(255, 255, 255, .22); }

.doc-list { display: flex; flex-direction: column; }
.doc-row { position: relative; display: flex; gap: 12px; padding: 12px 14px 12px 16px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .1s; }
.doc-row:hover { background: var(--surface-2); }
.doc-row--selected { background: #EEF8F4; }
.doc-row--selected::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--primary); }
.doc-row__thumb { flex: none; }
.doc-row__thumb img { width: 44px; height: 60px; object-fit: cover; object-position: top; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.doc-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.doc-row__title-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.doc-row__title { font-weight: 600; line-height: 1.35; overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.doc-row__badges { display: flex; align-items: center; gap: 6px; flex: none; }
.doc-row__meta { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-row__sep { margin: 0 5px; opacity: .7; }
.doc-row__summary { font-size: 13px; color: #43505A; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.doc-row__summary--muted { color: var(--muted); font-style: italic; }
.doc-row .chips--static { margin-top: 3px; }
.doc-list--dense .doc-row { padding: 10px 14px; }
.doc-list--dense .doc-row__summary { -webkit-line-clamp: 1; }

/* --------------------------------------------------------------------------
   Dokumentdetail
   -------------------------------------------------------------------------- */

.detail { position: relative; display: flex; flex-direction: column; height: 100%; min-height: 0; overflow: auto; container-type: inline-size; container-name: detail; }
.detail--empty, .detail--loading { justify-content: center; }
.review-banner { display: flex; align-items: flex-start; gap: 10px; padding: 12px 18px; background: var(--warn-soft); color: var(--warn-ink); border-bottom: 1px solid #F2DE9A; flex: none; }
.review-banner .icon { flex: none; margin-top: 2px; color: var(--warn); }
.keybar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 6px 18px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--muted); flex: none; }
.keybar .icon { color: var(--muted); }
.keybar kbd { margin-right: 2px; }

.detail__head { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); flex: none; }
.detail__back { align-self: flex-start; margin-left: -8px; }
.title-input { display: block; width: calc(100% + 8px); padding: 4px 8px; margin-left: -8px; border: 1px solid transparent; border-radius: var(--radius-s); background: transparent; font-size: 19px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; resize: none; overflow: hidden; transition: border-color .12s, background .12s; }
.title-input:hover { border-color: var(--line); background: var(--surface-2); }
.title-input:focus { outline: none; border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 3px var(--primary-soft); }
.title-input:disabled { color: var(--ink); }
.page-strip { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.page-strip__page { padding: 0; border: 0; background: transparent; border-radius: 4px; }
.page-strip__page img { width: 34px; height: 46px; object-fit: cover; object-position: top; border: 1px solid var(--line); border-radius: 4px; background: #fff; transition: transform .12s, box-shadow .12s; }
.page-strip__page:hover img { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.page-strip__more { font-size: 12px; color: var(--muted); }
.detail__facts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; color: var(--muted); }
.detail__fact { display: inline-flex; align-items: center; gap: 4px; }
.detail__fact + .detail__fact::before { content: "·"; margin-right: 10px; opacity: .6; }
.detail__fact--tag { color: var(--primary-ink); }
.detail__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.detail__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 18px 20px 24px; }
.detail__main { display: flex; flex-direction: column; gap: 18px; min-width: 0; container-type: inline-size; container-name: main; }
.detail__viewer { min-width: 0; }

@container main (max-width: 600px) {
  .detail__main .form-grid { grid-template-columns: minmax(0, 1fr); }
}

@container detail (min-width: 960px) {
  .detail__body { grid-template-columns: minmax(380px, 1fr) minmax(420px, 1.05fr); align-items: start; }
  .detail__viewer { position: sticky; top: 12px; }
  .detail__viewer .viewer__frame { height: calc(100vh - 220px); min-height: 480px; }
  .page-strip { display: none; }
}

.assistant-box { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); background: #FFF9F3; border: 1px solid #F5E5D2; }
.assistant-box .assistentin { flex: none; }
.assistant-box__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.assistant-box__summary { font-size: 14.5px; line-height: 1.5; }
.assistant-box__reason { display: flex; gap: 7px; align-items: flex-start; padding: 8px 10px; border-radius: var(--radius-s); background: var(--warn-soft); color: var(--warn-ink); font-size: 13px; }
.assistant-box__reason .icon { flex: none; margin-top: 2px; }
.assistant-box__reasoning { font-size: 13px; color: #43505A; }
.assistant-box__label { display: inline-block; margin-right: 6px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.assistant-box__meta { font-size: 12px; color: var(--muted); font-family: var(--mono); }
.confidence { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.confidence__bar { flex: 1; max-width: 220px; height: 8px; border-radius: 999px; background: #EFE9DC; overflow: hidden; }
.confidence__bar > span { display: block; height: 100%; border-radius: 999px; background: var(--primary); }
.confidence__bar--yellow > span { background: var(--warn); }
.confidence__bar--red > span { background: var(--danger); }
.confidence__value { font-weight: 600; font-variant-numeric: tabular-nums; }

.ingest-info { border-top: 1px dashed var(--line); padding-top: 10px; }
.ingest-info summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; color: var(--muted); list-style: none; }
.ingest-info summary::-webkit-details-marker { display: none; }
.ingest-info summary:hover { color: var(--ink); }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; margin: 10px 0 0; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }

/* Viewer */
.viewer { display: flex; flex-direction: column; gap: 10px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); }
.tab { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: transparent; color: var(--muted); font-weight: 500; text-decoration: none; }
.tab:hover { color: var(--ink); text-decoration: none; }
.tab--active { color: var(--primary-ink); border-bottom-color: var(--primary); font-weight: 600; }
.tab__count { font-size: 11px; padding: 0 5px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.tabs--pills { border: 0; gap: 4px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs--pills .tab { height: 34px; border: 1px solid transparent; border-radius: 999px; margin: 0; }
.tabs--pills .tab--active { background: var(--surface); border-color: var(--line); box-shadow: 0 1px 2px rgba(30, 42, 50, .08); }
.viewer__frame { height: 70vh; min-height: 420px; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; background: #EDEAE2; }
.viewer__frame iframe { width: 100%; height: 100%; border: 0; display: block; background: #EDEAE2; }
.viewer__pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.page-thumb { display: flex; flex-direction: column; gap: 6px; padding: 0; border: 0; background: transparent; text-align: center; }
.page-thumb img { width: 100%; aspect-ratio: 1 / 1.414; object-fit: cover; object-position: top; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s; }
.page-thumb:hover img { transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.page-thumb__label { font-size: 12px; color: var(--muted); }
.viewer__text pre { margin: 0; padding: 14px 16px; max-height: 70vh; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface-2); white-space: pre-wrap; font-family: var(--mono); font-size: 12.5px; line-height: 1.55; }
.viewer__text-meta { margin-top: 8px; font-size: 12.5px; }
.lightbox { display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px; align-items: center; gap: 8px; }
.lightbox img { width: 100%; max-height: 78vh; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; background: #fff; }

.timeline { display: flex; flex-direction: column; gap: 0; padding: 4px 0 0 4px; }
.timeline__item { position: relative; display: flex; gap: 12px; padding: 0 0 16px 0; }
.timeline__item::before { content: ""; position: absolute; left: 5px; top: 14px; bottom: 0; width: 2px; background: var(--line); }
.timeline__item:last-child::before { display: none; }
.timeline__dot { position: relative; z-index: 1; flex: none; width: 12px; height: 12px; margin-top: 5px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line-strong); background: var(--muted); }
.timeline__dot--ki { background: var(--accent); }
.timeline__dot--user { background: var(--primary); }
.timeline__body { flex: 1; min-width: 0; }
.timeline__head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 13px; }
.timeline__changes { margin: 6px 0 0; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; }
.timeline__change { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; }
.timeline__change dt { color: var(--muted); }
.timeline__change dd { margin: 0; overflow-wrap: anywhere; }
.timeline__old { color: var(--muted); text-decoration: line-through; }

/* Aufgaben */
.task-list { display: flex; flex-direction: column; gap: 6px; }
.task-row { display: grid; grid-template-columns: 20px 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.task-row--page { grid-template-columns: 20px 28px minmax(0, 1fr) auto 170px; padding: 10px 12px; }
.task-row--done { opacity: .62; }
.task-row--done .task-row__text { text-decoration: line-through; }
.task-row--overdue { border-color: #F0BFBF; background: #FFF8F8; }
.task-row__check { cursor: pointer; }
.task-row__kind { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; background: var(--surface-2); color: var(--muted); }
.task-row__kind--zahlung { background: var(--primary-soft); color: var(--primary-ink); }
.task-row__kind--widerspruch { background: var(--danger-soft); color: var(--danger-ink); }
.task-row__kind--unterschrift { background: var(--accent-soft); color: #A85C1A; }
.task-row__kind--termin, .task-row__kind--wiedervorlage { background: var(--info-soft); color: #1F4F9E; }
.task-row__kind--rueckmeldung { background: var(--conf-soft); color: #5B3FD6; }
.task-row__body { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.task-row__text { font-weight: 500; overflow-wrap: anywhere; }
.task-row__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; font-size: 12.5px; color: var(--muted); }
.task-row__meta .icon { vertical-align: -2px; }
.task-row__doc { display: inline-flex; align-items: center; gap: 4px; color: var(--primary-ink); max-width: min(100%, 440px); min-width: 0; }
.task-row__doc .icon { flex: none; }
.task-row__doc-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-row__due { position: relative; display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.task-row__due .btn { color: inherit; font-size: 12.5px; font-weight: 500; }
.task-row__due--overdue, .task-row__due--overdue .btn { color: var(--danger-ink); font-weight: 600; }
.task-row__assignee select { width: 100%; }
.task-add { display: grid; grid-template-columns: 170px minmax(0, 1fr) 150px auto auto; gap: 8px; align-items: center; margin-top: 10px; padding: 10px; border: 1px dashed var(--line-strong); border-radius: 10px; background: var(--surface-2); }
.task-group { margin-bottom: 22px; }
.task-group__title { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.task-group--ueberfaellig .task-group__title { color: var(--danger-ink); }

/* --------------------------------------------------------------------------
   Aktenplan
   -------------------------------------------------------------------------- */

.tree { padding: 4px 8px 12px; }
.tree ul { padding: 0; }
.tree__row { display: flex; align-items: center; gap: 2px; border-radius: 8px; padding-right: 8px; }
.tree__row:hover { background: var(--surface-2); }
.tree__row--selected { background: var(--primary-soft); }
.tree__row--selected .tree__name { color: var(--primary-ink); font-weight: 600; }
.tree__toggle { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 30px; flex: none; border: 0; background: transparent; color: var(--muted); padding: 0; border-radius: 6px; }
.tree__toggle:hover { color: var(--ink); }
.tree__toggle--empty { pointer-events: none; }
.tree__label { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 4px; border: 0; background: transparent; text-align: left; border-radius: 6px; }
.tree__icon { color: #C9A44C; flex: none; }
.tree__row--selected .tree__icon { color: var(--primary); }
.tree__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree__spark { color: var(--accent); flex: none; }
.tree__count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 18px; text-align: right; }

.folder-detail__head { padding: 18px 20px 6px; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.breadcrumb span { display: inline-flex; align-items: center; gap: 4px; }
.folder-detail__title { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.folder-detail__icon { color: #C9A44C; }
.folder-detail__desc { display: flex; align-items: center; gap: 6px; margin: 8px 0 4px; max-width: 720px; }
.folder-detail__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.folder-detail .section-head { padding: 0 20px; margin-top: 18px; }
.folder-detail .doc-list { border-top: 1px solid var(--line); }
.folder-detail .empty { padding-top: 20px; }

/* --------------------------------------------------------------------------
   Absender
   -------------------------------------------------------------------------- */

.corr-list { display: flex; flex-direction: column; }
.corr-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; position: relative; }
.corr-row:hover { background: var(--surface-2); }
.corr-row--selected { background: #EEF8F4; }
.corr-row--selected::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--primary); }
.corr-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.corr-row__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.corr-row__meta { font-size: 12.5px; color: var(--muted); }
.corr-row__spark { color: var(--accent); }
.corr-detail__head { padding: 18px 20px 14px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.corr-detail__title { display: flex; align-items: center; gap: 14px; }
.corr-detail .form-grid { padding: 18px 20px 0; }
.corr-detail .section-head { padding: 0 20px; }
.corr-detail .doc-list { border-top: 1px solid var(--line); }
.corr-detail > .pane__scroll > .muted { padding: 0 20px 20px; }

/* --------------------------------------------------------------------------
   Suche
   -------------------------------------------------------------------------- */

.search-pane { container-type: inline-size; container-name: search; }
.search-layout { display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--line); }
.search-results { min-width: 0; }
.facets { padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.facets__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.facets__title { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.facet-group { margin-bottom: 12px; }
.facet-group__title { font-size: 12.5px; font-weight: 600; color: var(--ink); margin-bottom: 5px; }
.facet-group__items { display: flex; flex-wrap: wrap; gap: 4px; }
.facet-group__empty { font-size: 12.5px; }
.facet { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 12.5px; color: #43505A; max-width: 100%; }
.facet:hover { border-color: var(--line-strong); }
.facet--active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-ink); font-weight: 600; }
.facet__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.facet__count { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.facet--active .facet__count { color: var(--primary-ink); }
.facets__dates { display: flex; flex-direction: column; gap: 6px; }
.facets__dates label { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.snippet { font-size: 13px; color: #43505A; line-height: 1.5; overflow-wrap: anywhere; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }

@container search (min-width: 640px) {
  .search-layout { grid-template-columns: 200px minmax(0, 1fr); }
  .facets { border-bottom: 0; border-right: 1px solid var(--line); }
  .facet-group__items { flex-direction: column; align-items: stretch; }
  .facet { justify-content: space-between; border-radius: 8px; }
}

/* --------------------------------------------------------------------------
   Einstellungen
   -------------------------------------------------------------------------- */

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.page--settings { max-width: 1040px; }
.settings-stack { display: flex; flex-direction: column; gap: 16px; }
.settings-section { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 16px; }
.settings-section__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.settings-section__head > div:first-child { flex: 1 1 320px; min-width: 0; }
.settings-section__title { font-size: 16px; font-weight: 700; }
.settings-section__actions { display: flex; gap: 8px; flex-wrap: wrap; flex: none; }
.settings-test { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 4px; }
.settings-test__result { display: inline-flex; align-items: center; gap: 6px; }
.settings-test__result--ok { color: var(--primary-ink); }
.settings-test__result--fail { color: var(--danger-ink); }
.savebar { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 4px 0 8px; }
.savebar__hint { margin-right: auto; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table__row--muted { color: var(--muted); }
.table__name { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; white-space: nowrap; }
.table__actions { text-align: right; white-space: nowrap; }
.table__actions .btn { margin-left: 6px; }
.role-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--muted); }

.channel-list { display: flex; flex-direction: column; gap: 10px; }
.channel { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.channel--off { background: var(--surface-2); }
.channel--off .channel__body { opacity: .7; }
.channel__icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none; border-radius: 10px; background: var(--primary-soft); color: var(--primary-ink); }
.channel__icon--postfach { background: var(--info-soft); color: #1F4F9E; }
.channel__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.channel__title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.channel__meta { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.channel__status { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; }
.channel__error { display: inline-flex; align-items: center; gap: 4px; color: var(--danger-ink); }
.channel__actions { display: flex; align-items: center; gap: 4px; flex: none; }

.budget-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.budget { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; }
.budget__label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.budget__value { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.budget__value .muted { font-size: 13px; font-weight: 500; }
.budget__bar { height: 8px; border-radius: 999px; background: #EFE9DC; overflow: hidden; }
.budget__bar > span { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.budget__bar--yellow > span { background: var(--warn); }
.budget__bar--red > span { background: var(--danger); }
.budget--paused { border-color: #F0BFBF; background: #FFF8F8; }
.budget--paused .budget__value { color: var(--danger-ink); }
.budget--state .budget__value { color: var(--primary-ink); }

.chart-wrap { width: 100%; overflow-x: auto; }
.chart { width: 100%; height: auto; max-height: 260px; display: block; }
.chart__grid { stroke: var(--line); stroke-width: 1; }
.chart__tick { font-size: 10px; fill: var(--muted); font-family: var(--font); }
.chart__bar { fill: var(--primary); opacity: .85; }
.chart__bar-group:hover .chart__bar { opacity: 1; fill: var(--primary-dark); }
.chart__bar--zero { fill: var(--line); }

.separator-explain { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 24px; align-items: start; }
.steps { display: flex; flex-direction: column; gap: 10px; counter-reset: step; padding-left: 0; }
.steps li { position: relative; padding-left: 36px; counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-ink); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.separator-preview { display: flex; justify-content: center; }
.separator-sheet { width: 150px; aspect-ratio: 1 / 1.414; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); }
.separator-sheet__pattern { display: flex; flex-direction: column; gap: 6px; width: 70%; }
.separator-sheet__pattern span { display: block; height: 10px; background: var(--ink); }
.separator-sheet__pattern span:nth-child(2), .separator-sheet__pattern span:nth-child(4) { width: 60%; }
.separator-sheet__label { font-size: 9px; letter-spacing: .1em; color: var(--muted); }

/* --------------------------------------------------------------------------
   Anmeldung
   -------------------------------------------------------------------------- */

.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: radial-gradient(1200px 600px at 20% -10%, #FDEBDB 0%, rgba(253, 235, 219, 0) 60%), radial-gradient(900px 500px at 100% 100%, #DDF3EC 0%, rgba(221, 243, 236, 0) 60%), var(--bg); }
.login__card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 14px; padding: 32px 32px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-pop); }
.login__figure { display: flex; justify-content: center; margin-bottom: -6px; }
.login__card .brand { align-self: center; }
.login__intro { text-align: center; color: var(--muted); margin-bottom: 4px; }
.login__error { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: var(--radius-s); background: var(--danger-soft); color: var(--danger-ink); font-size: 13px; }
.login__hint { text-align: center; font-size: 12.5px; color: var(--muted); }

/* --------------------------------------------------------------------------
   Dialoge, Toasts, Upload
   -------------------------------------------------------------------------- */

.dialog-overlay { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(30, 42, 50, .38); backdrop-filter: blur(2px); animation: fade .12s ease-out; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.dialog { width: 100%; max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-pop); animation: rise .14s ease-out; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 12px 22px; border-bottom: 1px solid var(--line); }
.dialog__title { font-size: 16px; font-weight: 700; }
.dialog__body { padding: 18px 22px; overflow: auto; display: flex; flex-direction: column; gap: 14px; }
.dialog__foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 22px 16px; border-top: 1px solid var(--line); }
.dialog__text { line-height: 1.55; }

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 40px)); }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px 11px 14px; border-radius: 10px; background: var(--ink); color: #fff; box-shadow: var(--shadow-pop); animation: rise .16s ease-out; }
.toast .icon { flex: none; margin-top: 1px; }
.toast--success { background: #176B54; }
.toast--error { background: #B03030; }
.toast__text { flex: 1; min-width: 0; line-height: 1.4; }
.toast__close { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border: 0; border-radius: 50%; background: transparent; color: rgba(255, 255, 255, .8); padding: 0; flex: none; }
.toast__close:hover { background: rgba(255, 255, 255, .15); color: #fff; }

.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 30px 20px; border: 2px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface-2); text-align: center; cursor: pointer; transition: border-color .12s, background .12s; }
.dropzone:hover, .dropzone--over { border-color: var(--primary); background: #F3FBF8; }
.dropzone__icon { color: var(--primary); margin-bottom: 6px; }
.dropzone__title { font-weight: 600; font-size: 15px; }
.dropzone__hint { color: var(--muted); font-size: 12.5px; }
.file-list { display: flex; flex-direction: column; gap: 4px; }
.file-list__item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius-s); font-size: 13px; }
.file-list__item .icon { color: var(--muted); flex: none; }
.file-list__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list__error { font-size: 12px; color: var(--danger-ink); }
.file-list__sum { padding: 4px 10px 0; font-size: 12.5px; }
.upload-result { display: flex; flex-direction: column; gap: 14px; }
.upload-result__head { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--radius); background: #FFF9F3; border: 1px solid #F5E5D2; }

/* --------------------------------------------------------------------------
   Responsiv
   -------------------------------------------------------------------------- */

@media (max-width: 1199px) {
  .split { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1099px) {
  .topbar__pipeline span:last-child { display: none; }
}

@media (max-width: 899px) {
  .form-grid, .form-grid--3 { grid-template-columns: minmax(0, 1fr); }
  .task-row--page { grid-template-columns: 20px 28px minmax(0, 1fr); grid-template-rows: auto auto; row-gap: 6px; }
  .task-row--page .task-row__due { grid-column: 3; justify-self: start; }
  .task-row--page .task-row__assignee { grid-column: 3; max-width: 240px; }
  .task-add { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .task-add input[type="text"], .task-add .input:nth-child(2) { grid-column: 1 / -1; }
  .separator-explain { grid-template-columns: minmax(0, 1fr); }
  .separator-preview { justify-content: flex-start; }
}

@media (max-width: 799px) {
  :root { --gutter: 12px; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; top: 0; bottom: 0; left: 0; z-index: 90; width: min(300px, 86vw); transform: translateX(-100%); transition: transform .18s ease-out; box-shadow: none; }
  .sidebar--open { transform: none; box-shadow: var(--shadow-pop); }
  .sidebar__close { display: inline-flex; }
  .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 80; background: rgba(30, 42, 50, .35); opacity: 0; pointer-events: none; transition: opacity .18s; }
  .sidebar-backdrop--open { opacity: 1; pointer-events: auto; }
  .topbar__menu { display: inline-flex; }
  .topbar__pipeline span:last-child { display: none; }
  .searchbox__kbd { display: none; }
  .searchbox__input { padding-right: 12px; }
  .detail__head { padding: 14px 14px 12px; }
  .detail__body { padding: 14px 14px 20px; }
  .assistant-card { margin: 10px 10px 4px; padding: 12px; }
  .assistant-card .assistentin { width: 56px; height: 56px; }
  .kpi { min-width: 80px; padding: 6px 10px; }
  .kpi__value { font-size: 18px; }
  .page-thumb img { border-radius: 4px; }
  .lightbox { grid-template-columns: 28px minmax(0, 1fr) 28px; }
  .toasts { right: 12px; bottom: 12px; left: 12px; max-width: none; }
  .dialog-overlay { padding: 10px; align-items: flex-end; }
  .dialog { max-height: calc(100vh - 20px); }
  .kv-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ============================================================
   Der Aktenraum – Halle, Schilder, Tafeln, Posteingang.
   Portiert aus dem Prototyp. Alles unter .raum, damit die helle
   Listenansicht unberührt bleibt.
   Schriften liegen lokal unter /schriften – keine externen Abrufe.
   ============================================================ */

@font-face {
  font-family: 'Exo 2';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('/schriften/exo2-latin.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: 'Exo 2';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('/schriften/exo2-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/schriften/nunito-latin.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: 'Nunito';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/schriften/nunito-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

.raum {
  --void: #01050F;
  --panel: rgba(6, 16, 38, .82);
  --panel-2: rgba(10, 24, 52, .9);
  --line: rgba(70, 150, 255, .26);
  --line-hot: rgba(56, 224, 255, .65);
  --ink: #DCE9FF;
  --muted: #7E9AC6;
  --cyan: #38E0FF;
  --blue: #3B82F6;
  --amber: #FFB547;
  --amber-hot: #FF8A1A;
  --mint: #3DE0A6;
  --glow: 0 0 24px rgba(56, 224, 255, .32);
  --glow-amber: 0 0 24px rgba(255, 181, 71, .45);
  --shadow: 0 16px 44px rgba(0, 0, 0, .7);
  --display: 'Exo 2', 'Nunito', system-ui, sans-serif;
  --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;

  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--void);
  color: var(--ink);
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.45;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
.raum * { box-sizing: border-box; }
.raum button { font: inherit; color: inherit; }
.raum button:focus-visible,
.raum input:focus-visible,
.raum .rack-tag:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

/* ---------- Die Halle ---------- */
.raum #raum { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.raum #raum.greifen { cursor: grabbing; }
.raum .vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 90% at 50% 50%, transparent 45%, rgba(0,0,0,.55) 100%); }

/* Schwebende Schilder an den Racks – echter Text, lesbar und bedienbar */
/* z-index erzeugt einen eigenen Stapelkontext: die per Projektion gesetzten
   z-index der Schilder wirken dann nur innerhalb, nicht über der Kopfzeile. */
.raum .tags { position: absolute; inset: 0; z-index: 10; pointer-events: none; overflow: hidden; }
.raum .rack-tag {
  position: absolute; left: 0; top: 0; transform-origin: 50% 50%; pointer-events: auto; cursor: pointer;
  border: 0; background: linear-gradient(180deg, rgba(8,26,56,.92), rgba(4,14,34,.92));
  box-shadow: inset 0 0 0 1px var(--line-hot), 0 0 22px rgba(56,224,255,.25), 0 10px 30px rgba(0,0,0,.6);
  border-radius: 10px; padding: 7px 12px 8px; white-space: nowrap; text-align: left;
  display: flex; flex-direction: column; gap: 2px; backdrop-filter: blur(3px);
}
.raum .rack-tag::before { content: ''; position: absolute; left: 50%; bottom: -14px; width: 1px; height: 14px; background: linear-gradient(180deg, var(--line-hot), transparent); }
.raum .rack-tag .rt-name { font-family: var(--display); font-weight: 600; font-size: 13px; letter-spacing: .04em; color: #EAF4FF; text-shadow: 0 0 12px rgba(56,224,255,.65); }
.raum .rack-tag .rt-sub { font-size: 10.5px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.raum .rack-tag .rt-n { position: absolute; right: -9px; top: -9px; min-width: 22px; height: 22px; border-radius: 11px; background: rgba(56,224,255,.14); box-shadow: inset 0 0 0 1px var(--line-hot), 0 0 14px rgba(56,224,255,.5); color: var(--cyan); font: 700 11px var(--body); display: grid; place-items: center; padding: 0 5px; }
.raum .rack-tag.aktiv { box-shadow: inset 0 0 0 1px var(--amber), 0 0 30px rgba(255,181,71,.55), 0 10px 30px rgba(0,0,0,.6); }
.raum .rack-tag.aktiv .rt-name { color: #FFE1AE; text-shadow: 0 0 14px rgba(255,181,71,.8); }
.raum .rack-tag.treffer { animation: raum-puls 1.1s ease-in-out infinite; }
@keyframes raum-puls {
  0%, 100% { box-shadow: inset 0 0 0 1px var(--amber), 0 0 18px rgba(255,181,71,.4), 0 10px 30px rgba(0,0,0,.6); }
  50% { box-shadow: inset 0 0 0 1px var(--amber), 0 0 40px rgba(255,181,71,.9), 0 10px 30px rgba(0,0,0,.6); }
}
.raum .rack-tag.gesperrt .rt-sub::after { content: ' · 🔒'; }

/* ---------- Kopfzeile ---------- */
.raum .raum-top { position: absolute; left: 0; right: 0; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 14px 20px; pointer-events: none; flex-wrap: wrap; }
.raum .raum-top > * { pointer-events: auto; }
.raum .brand { display: flex; align-items: center; gap: 9px; font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: .09em; text-transform: uppercase; color: #EAF4FF; text-shadow: 0 0 18px rgba(56,224,255,.6); }
.raum .brand .mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--blue), var(--cyan)); display: grid; place-items: center; box-shadow: var(--glow); }
.raum .such { flex: 0 1 480px; display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px 8px 16px; box-shadow: var(--shadow); backdrop-filter: blur(10px); }
.raum .such input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 14.5px; color: var(--ink); outline: none; }
.raum .such input::placeholder { color: #4E6B96; }
.raum .such kbd { font: 600 11px var(--body); color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.raum .modi { display: flex; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 4px; box-shadow: var(--shadow); backdrop-filter: blur(10px); margin-left: auto; }
.raum .modi button { border: 0; background: transparent; border-radius: 999px; padding: 7px 15px; font-family: var(--display); font-weight: 600; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); cursor: pointer; display: flex; gap: 7px; align-items: center; }
.raum .modi button.an { background: linear-gradient(135deg, var(--blue), #23BEEC); color: #fff; box-shadow: var(--glow); }
.raum .modi .zahl { background: var(--amber); color: #35200A; font-size: 11px; border-radius: 999px; padding: 1px 7px; box-shadow: var(--glow-amber); }
.raum .modi button.an .zahl { background: #fff; color: #12408A; }

.raum .treffer-leiste { position: absolute; z-index: 21; left: 50%; top: 68px; transform: translateX(-50%); display: flex; flex-wrap: wrap; gap: 8px; max-width: 780px; justify-content: center; }
.raum .treffer-leiste button { border: 1px solid var(--line-hot); background: var(--panel); border-radius: 999px; padding: 6px 12px; cursor: pointer; box-shadow: var(--glow); display: flex; gap: 8px; align-items: center; font-size: 13px; }
.raum .treffer-leiste b { color: var(--ink); }
.raum .treffer-leiste span { color: var(--muted); }

/* ---------- Pape ---------- */
.raum .pape { position: absolute; left: 22px; bottom: 22px; z-index: 22; display: flex; align-items: flex-end; gap: 12px; max-width: 460px; }
.raum .pape .fig { width: 76px; height: 88px; flex: none; cursor: pointer; transition: transform .4s; filter: drop-shadow(0 0 18px rgba(56,224,255,.6)); }
.raum .pape .fig:hover { transform: translateY(-4px) rotate(-3deg); }
.raum .blase { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 16px 16px 16px 5px; padding: 12px 14px; box-shadow: var(--shadow), inset 0 0 40px rgba(56,224,255,.05); font-size: 13.5px; line-height: 1.45; backdrop-filter: blur(10px); }
.raum .blase b { font-family: var(--display); font-weight: 600; color: #fff; }
.raum .blase .tun { display: flex; gap: 8px; margin-top: 9px; flex-wrap: wrap; }
.raum .knopf { border: 0; border-radius: 999px; padding: 7px 13px; font-family: var(--display); font-weight: 600; font-size: 12.5px; letter-spacing: .04em; cursor: pointer; background: linear-gradient(135deg, var(--blue), #23BEEC); color: #fff; box-shadow: var(--glow); }
.raum .knopf.leer { background: rgba(56,224,255,.08); color: var(--cyan); box-shadow: inset 0 0 0 1px rgba(56,224,255,.4); }
.raum .knopf.gelb { background: linear-gradient(135deg, var(--amber-hot), var(--amber)); color: #2E1900; box-shadow: var(--glow-amber); }

/* ---------- Tafeln ---------- */
.raum .tafel { position: absolute; z-index: 21; background: var(--panel); border: 1px solid var(--line-hot); border-radius: 16px; box-shadow: var(--shadow), 0 0 46px rgba(56,224,255,.2), inset 0 0 46px rgba(56,224,255,.05); backdrop-filter: blur(12px); }
.raum .tafel .kopf { display: flex; align-items: baseline; gap: 10px; padding: 13px 16px 0; }
.raum .tafel h3 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 16px; letter-spacing: .05em; text-transform: uppercase; color: var(--amber); text-shadow: 0 0 14px rgba(255,181,71,.6); }
.raum .tafel .pfad { font-size: 12px; color: var(--muted); }
.raum .tafel .zu { margin-left: auto; border: 1px solid var(--line); background: transparent; border-radius: 999px; width: 26px; height: 26px; cursor: pointer; color: var(--muted); flex: none; }

.raum .mappen { right: 22px; top: 50%; transform: translate(28px, -50%); width: min(400px, calc(100vw - 540px)); max-height: calc(100vh - 170px); overflow-y: auto; opacity: 0; pointer-events: none; transition: transform .45s cubic-bezier(.22,.75,.2,1), opacity .35s; padding-bottom: 14px; }
.raum .mappen.auf { opacity: 1; pointer-events: auto; transform: translate(0, -50%); }
.raum .faecher { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 12px 16px 0; }
.raum .fach { border: 1px solid var(--line); background: var(--panel-2); border-radius: 10px; padding: 9px 12px; cursor: pointer; text-align: left; display: flex; align-items: center; gap: 10px; transition: transform .2s, box-shadow .2s; color: var(--ink); }
.raum .fach:hover, .raum .fach.aktiv { transform: translateX(-4px); box-shadow: var(--glow); border-color: var(--line-hot); }
.raum .fach .led { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.raum .fach .led.aus { background: #234; box-shadow: none; }
.raum .fach .fn { font-weight: 700; font-size: 13px; }
.raum .fach .fz { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.raum .blaetter { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 16px 0; }
.raum .blatt { border: 1px solid var(--line); background: linear-gradient(180deg, rgba(226,238,255,.96), rgba(198,216,244,.92)); color: #0B1B36; border-radius: 8px; padding: 9px 10px; cursor: pointer; text-align: left; min-height: 84px; display: flex; flex-direction: column; gap: 3px; transition: transform .2s, box-shadow .2s; }
.raum .blatt:hover { transform: translateY(-4px); box-shadow: 0 0 26px rgba(56,224,255,.5); }
.raum .blatt .bt { font-weight: 800; font-size: 12.5px; line-height: 1.2; }
.raum .blatt .bm { font-size: 11px; color: #45608C; margin-top: auto; }
.raum .leer-hinweis { color: var(--muted); font-size: 13px; padding: 12px 16px 4px; grid-column: 1 / -1; }

/* ---------- Posteingang ---------- */
.raum .eingang { position: absolute; right: 22px; top: 78px; bottom: 22px; width: 380px; z-index: 22; display: flex; flex-direction: column; gap: 10px; transform: translateX(125%); transition: transform .55s cubic-bezier(.22,.75,.2,1); }
.raum .eingang.auf { transform: translateX(0); }
.raum .eingang .kopf { display: flex; align-items: baseline; gap: 10px; padding: 0 4px; }
.raum .eingang h2 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 18px; letter-spacing: .08em; text-transform: uppercase; color: var(--cyan); text-shadow: 0 0 14px rgba(56,224,255,.6); }
.raum .eingang .kopf span { color: var(--muted); font-size: 12.5px; }
.raum .eingang .zu { margin-left: auto; border: 1px solid var(--line); background: var(--panel); border-radius: 999px; width: 28px; height: 28px; cursor: pointer; color: var(--muted); flex: none; }
.raum .stapel { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 2px 2px 8px; }
.raum .karte { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); transition: transform .3s, opacity .3s; backdrop-filter: blur(10px); }
.raum .karte .kt { font-family: var(--display); font-weight: 600; font-size: 14.5px; color: #EAF4FF; }
.raum .karte .km { color: var(--muted); font-size: 12px; margin-top: 2px; }
.raum .karte .vor { margin-top: 8px; background: rgba(56,224,255,.06); border: 1px solid rgba(56,224,255,.18); border-radius: 10px; padding: 8px 10px; font-size: 12.5px; display: flex; gap: 8px; }
.raum .karte .vor .pkt { flex: none; width: 7px; height: 7px; border-radius: 50%; margin-top: 5px; background: var(--mint); box-shadow: 0 0 9px var(--mint); }
.raum .karte .vor.unsicher .pkt { background: var(--amber); box-shadow: 0 0 9px var(--amber); }
.raum .karte .vor .zielpfad { font-weight: 700; color: var(--cyan); }
.raum .karte .zeile { display: flex; gap: 8px; margin-top: 10px; align-items: center; }
.raum .karte .sicher { margin-left: auto; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.raum .eingang .fuss { padding: 0 4px; font-size: 11.5px; color: var(--muted); }
.raum .stapel .leer-hinweis {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 14px; box-shadow: var(--shadow); backdrop-filter: blur(10px); text-align: center;
}

/* ---------- Fußzeile und Notfall ---------- */
.raum .hinweis { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 19; font-size: 12px; color: var(--muted); background: rgba(4,12,30,.66); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; pointer-events: none; letter-spacing: .02em; text-align: center; max-width: calc(100vw - 40px); }

.raum-notfall {
  position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 24px; text-align: center; background: #01050F; color: #DCE9FF;
  font-family: 'Nunito', system-ui, sans-serif;
}
.raum-notfall .knopf { border: 0; border-radius: 999px; padding: 9px 18px; font-weight: 700; cursor: pointer; background: linear-gradient(135deg, #3B82F6, #23BEEC); color: #fff; }
.raum-notfall .knopf.leer { background: rgba(56,224,255,.08); color: #38E0FF; box-shadow: inset 0 0 0 1px rgba(56,224,255,.4); }

@media (prefers-reduced-motion: reduce) { .raum .rack-tag.treffer { animation: none; } }
@media (max-width: 1200px) {
  .raum .eingang { width: min(320px, calc(100vw - 44px)); }
  .raum .mappen { width: min(340px, calc(100vw - 44px)); }
}
@media (max-width: 760px) {
  .raum .pape { max-width: calc(100vw - 44px); }
  .raum .pape .fig { width: 54px; height: 64px; }
  .raum .brand { font-size: 16px; }
}

/* ==========================================================================
   Papedrive – Rechenzentrum
   Wird NACH app.css geladen und legt die dunkle Halle über die gesamte
   Oberfläche. Alle Farben laufen über die Marken in :root, deshalb genügt
   der Tausch hier – die Bauteile selbst bleiben unangetastet.
   ========================================================================== */

:root {
  color-scheme: dark;

  --bg: #01050F;
  --bg-tief: #000205;
  --surface: rgba(9, 20, 44, .86);
  --surface-2: rgba(6, 14, 32, .9);
  --line: rgba(70, 130, 220, .26);
  --line-strong: rgba(90, 175, 255, .5);
  --ink: #E3ECFF;
  --muted: #86A3D1;

  --primary: #2E86F0;
  --primary-dark: #1B5FC0;
  --primary-ink: #7CC4FF;
  --primary-soft: rgba(46, 134, 240, .16);

  --accent: #FFB547;
  --accent-soft: rgba(255, 181, 71, .14);
  --warn: #FFB547;
  --warn-ink: #FFCE85;
  --warn-soft: rgba(255, 181, 71, .12);
  --danger: #FF6B6B;
  --danger-ink: #FF9C9C;
  --danger-soft: rgba(255, 107, 107, .14);
  --info: #38E0FF;
  --info-soft: rgba(56, 224, 255, .12);
  --conf: #9E7BFF;
  --conf-soft: rgba(158, 123, 255, .16);

  --glut: #38E0FF;
  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 10px 30px rgba(0, 0, 0, .5);
  --shadow-pop: 0 4px 12px rgba(0, 0, 0, .6), 0 24px 60px rgba(0, 0, 0, .7);
}

body {
  background: var(--bg-tief);
  color: var(--ink);
}

/* Die Halle als Grund: Sternenstaub, kalter Kern am Fluchtpunkt, Bodengitter.
   Reines CSS – kein Bild, keine externe Datei. */
body:not(.hat-halle)::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(1100px 620px at 50% 34%, rgba(60, 150, 255, .16), transparent 68%),
    radial-gradient(420px 300px at 50% 40%, rgba(150, 215, 255, .12), transparent 70%),
    linear-gradient(180deg, #000205 0%, #020914 46%, #000104 100%);
}
body:not(.hat-halle)::after {
  content: '';
  position: fixed;
  left: 50%;
  bottom: 0;
  width: 260vw;
  height: 62vh;
  margin-left: -130vw;
  z-index: -1;
  pointer-events: none;
  opacity: .5;
  background:
    repeating-linear-gradient(90deg, rgba(70, 160, 255, .16) 0 1px, transparent 1px 92px),
    repeating-linear-gradient(0deg, rgba(70, 160, 255, .13) 0 1px, transparent 1px 74px);
  transform: perspective(560px) rotateX(74deg);
  transform-origin: 50% 100%;
  mask-image: linear-gradient(180deg, transparent 0%, #000 45%, transparent 96%);
}

/* --------------------------------------------------------------------------
   Anmeldung – die Karte schwebt im Gang
   -------------------------------------------------------------------------- */

.login {
  background: transparent;
  position: relative;
}
.login__card {
  background: linear-gradient(180deg, rgba(11, 24, 52, .92), rgba(5, 13, 32, .94));
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  box-shadow:
    0 0 0 1px rgba(56, 224, 255, .08),
    0 0 60px rgba(40, 120, 255, .22),
    0 30px 80px rgba(0, 0, 0, .75);
  backdrop-filter: blur(14px);
}
.login__card .brand__name {
  color: #F2F7FF;
  letter-spacing: .04em;
  text-shadow: 0 0 20px rgba(56, 224, 255, .5);
}
.login__card .brand__mark {
  background: linear-gradient(135deg, #1B5FC0, #38E0FF);
  color: #fff;
  box-shadow: 0 0 22px rgba(56, 224, 255, .45);
}
.login__figure { filter: drop-shadow(0 0 18px rgba(56, 224, 255, .4)); }
.login__intro { color: var(--muted); }

/* --------------------------------------------------------------------------
   Flächen, Felder, Knöpfe
   -------------------------------------------------------------------------- */

.input, .select, textarea.input {
  background: rgba(3, 9, 22, .8);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 10px;
}
.input:focus, .select:focus, textarea.input:focus {
  border-color: var(--line-strong);
  outline: none;
  box-shadow: 0 0 0 3px rgba(56, 224, 255, .16), 0 0 22px rgba(40, 120, 255, .25);
}
.input::placeholder { color: #4E6C97; }
.field__label { color: var(--muted); letter-spacing: .02em; }

.btn { border-radius: 999px; border: 1px solid var(--line); background: rgba(12, 26, 54, .8); color: var(--ink); }
.btn:hover { border-color: var(--line-strong); background: rgba(18, 38, 76, .9); }
.btn--primary {
  border: 0;
  background: linear-gradient(135deg, #1B5FC0, #2FA8F0);
  color: #fff;
  box-shadow: 0 0 26px rgba(46, 134, 240, .4), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn--primary:hover { background: linear-gradient(135deg, #2470D8, #46BDFF); }
.btn--big { padding: 12px 18px; font-weight: 600; letter-spacing: .02em; }

.card, .panel, .dialog, .toast, .sheet, .list__item, .detail {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
  backdrop-filter: blur(10px);
}
.topbar, .sidebar {
  background: rgba(4, 11, 26, .82);
  border-color: var(--line);
  backdrop-filter: blur(12px);
}
.sidebar a, .sidebar button { color: var(--muted); }
.sidebar a:hover, .sidebar .is-active { color: #EAF3FF; background: rgba(46, 134, 240, .14); }

kbd {
  background: rgba(10, 22, 46, .9);
  border-color: var(--line);
  border-bottom-color: var(--line-strong);
  color: var(--muted);
}
hr, .divider { border-color: var(--line); }
::selection { background: rgba(56, 224, 255, .3); color: #fff; }

/* Weniger Bewegung, wenn das System es verlangt */
@media (prefers-reduced-motion: reduce) {
  body:not(.hat-halle)::after { transform: none; opacity: .22; }
}

/* Das Canvas mit der Halle liegt hinter allem und nimmt keine Klicks an */
.hallengrund { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* --------------------------------------------------------------------------
   Nachzug: Stellen, die den Markentausch umgehen

   app.css setzt an diesen Stellen feste helle Farbwerte statt der Marken aus
   :root. Der Tausch oben erreicht sie deshalb nicht – sie blieben helle Flecken,
   und wo nur der Hintergrund fest steht und der Text der Marke folgt, stand
   heller Text auf hellem Grund (die Karte der Assistentin war unlesbar).
   Hier stehen die dunklen Entsprechungen, eine je Fundstelle.
   -------------------------------------------------------------------------- */

/* Suchtreffer im Text bleiben Bernstein, aber als Leuchten statt als Filzstift */
mark { background: rgba(255, 181, 71, .24); color: #FFD79A; }

/* Karten der Assistentin – der auffälligste Fall */
.assistant-card {
  background: linear-gradient(135deg, rgba(46, 134, 240, .12) 0%, rgba(56, 224, 255, .07) 100%);
  border-color: var(--line);
}
.assistant-box { background: var(--surface-2); border-color: var(--line); }
.assistant-box__reasoning { color: var(--muted); }
.upload-result__head { background: var(--surface-2); border-color: var(--line); }

/* Ausgewählte Zeilen in Listen */
.doc-row--selected, .corr-row--selected { background: var(--primary-soft); }

/* Zähler und graue Pillen */
.nav__count { background: rgba(90, 175, 255, .18); color: var(--ink); }
.pill--grey { background: rgba(134, 163, 209, .16); color: var(--muted); }

/* Balken: Rinne dunkel, damit die Füllung leuchtet */
.confidence__bar, .budget__bar { background: rgba(134, 163, 209, .18); }

/* Ladeplatzhalter */
.skeleton-row {
  background: linear-gradient(90deg, var(--surface-2) 25%, rgba(90, 175, 255, .12) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
}

/* Warnungen und Fristen */
.review-banner { border-bottom-color: rgba(255, 181, 71, .34); }
.task-row--overdue, .budget--paused { border-color: rgba(255, 107, 107, .42); background: var(--danger-soft); }

/* Auswahlflächen beim Hochladen und in Formularen */
.radio-card--active, .dropzone:hover, .dropzone--over { background: var(--primary-soft); }

/* Der Dokumentbetrachter zeigt weisse Seiten – hier bleibt ein neutraler,
   dunkler Grund stehen, damit sich das Papier klar abhebt. */
.viewer__frame, .viewer__frame iframe { background: #0B1526; }

/* Kacheln, Filterpillen und Schalter.
   Diese drei kippten beim Tausch die Semantik: die Kachel legt Weiss mit 80 %
   Deckung an, die aktive Filterpille nimmt --ink als GRUND (im Hellen dunkel,
   jetzt hell) mit weisser Schrift, und die Schalterrinne hat einen festen
   hellen Wert. Alle drei standen bei rund 1,2:1 Kontrast, also unlesbar. */
.kpi { background: rgba(90, 175, 255, .10); border-color: var(--line); }
.filter-chip--active { background: var(--primary); border-color: var(--primary); color: #fff; }
.filter-chip__count { background: rgba(134, 163, 209, .20); }
.switch__track { background: rgba(134, 163, 209, .30); }

/* ==========================================================================
   Die Frage-Ansicht: Halle als Kulisse, in der Mitte das Feld.
   Portiert aus docs/prototyp-suche.html. Farben kommen aus dunkel.css,
   die paar eigenen Werte stehen hier lokal.
   ========================================================================== */

.suche {
  --glas: rgba(10, 17, 32, .72);
  --linie: rgba(120, 170, 235, .22);
  --linie-hell: rgba(150, 200, 255, .45);
  --cyan: #7ED8FF;
  --blau: #3D8BF2;

  position: fixed;
  inset: 0;
  z-index: 40;
  overflow-y: auto;
  background: #01030A;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
.suche * { box-sizing: border-box; }
.suche canvas.hallengrund { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }

/* ---------- Kopfzeile ---------- */
.such-kopf { position: fixed; z-index: 3; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 14px; padding: 16px 22px; flex-wrap: wrap; }
.such-kopf .marke { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15px; letter-spacing: .16em; text-transform: uppercase; color: #CFE0F8; }
.such-kopf .marke i { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, #1B5FC0, var(--blau)); display: grid; place-items: center; font-style: normal; font-size: 13px; color: #fff; }
.such-kopf nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.such-kopf nav button { border: 1px solid transparent; background: transparent; color: var(--muted); font: inherit; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; padding: 7px 14px; border-radius: 999px; cursor: pointer; }
.such-kopf nav button:hover { color: #DCE9FB; border-color: var(--linie); }
.such-kopf nav button.an { color: #fff; background: rgba(61, 139, 242, .18); border-color: var(--linie-hell); }
.such-kopf nav .zahl { color: var(--accent); font-weight: 700; }

/* ---------- Die Mitte ---------- */
.such-mitte {
  position: relative; z-index: 3; min-height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 88px 24px 64px; gap: 0;
}
.frage-titel { font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: #7794BC; margin-bottom: 18px; text-shadow: 0 2px 20px #000; }

.suche .balken {
  width: min(760px, 100%); display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 22px;
  background: var(--glas); border: 1px solid var(--linie-hell); border-radius: 18px;
  box-shadow: 0 0 0 1px rgba(126, 216, 255, .06), 0 0 70px rgba(30, 90, 190, .28), 0 26px 70px rgba(0, 0, 0, .7);
  backdrop-filter: blur(18px);
}
.suche .balken:focus-within { border-color: rgba(180, 225, 255, .7); box-shadow: 0 0 0 1px rgba(126, 216, 255, .18), 0 0 90px rgba(40, 120, 235, .4), 0 26px 70px rgba(0, 0, 0, .75); }
.suche .balken input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 19px; outline: none; }
.suche .balken input::placeholder { color: #5C769E; }
.suche .balken input:disabled { opacity: .6; }
.suche .los { flex: none; height: 46px; padding: 0 22px; border-radius: 999px; border: 0; background: linear-gradient(135deg, #1B5FC0, var(--blau)); color: #fff; font: inherit; font-weight: 600; cursor: pointer; box-shadow: 0 0 24px rgba(61, 139, 242, .35); white-space: nowrap; }
.suche .los:disabled { opacity: .5; cursor: default; box-shadow: none; }

.beispiele { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; max-width: 760px; }
.beispiele button { border: 1px solid var(--linie); background: rgba(8, 15, 30, .6); color: #93AECE; font: inherit; font-size: 13.5px; padding: 7px 14px; border-radius: 999px; cursor: pointer; backdrop-filter: blur(8px); }
.beispiele button:hover:not(:disabled) { color: #DCE9FB; border-color: var(--linie-hell); }
.beispiele button:disabled { opacity: .5; cursor: default; }

/* ---------- Die Antwort ---------- */
.antwort { width: min(760px, 100%); margin-top: 22px; }
.sagt { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--glas); border: 1px solid var(--linie); border-left: 2px solid var(--cyan); border-radius: 14px; backdrop-filter: blur(14px); }
.sagt--fehler { border-left-color: var(--danger); }
.sagt .kopfchen { flex: none; width: 30px; height: 34px; }
.sagt p { margin: 0; }
.verstanden { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; font-size: 12.5px; }
.verstanden b { font-weight: 600; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; font-size: 11px; align-self: center; margin-right: 4px; }
.verstanden span { background: rgba(61, 139, 242, .14); border: 1px solid var(--linie); border-radius: 999px; padding: 3px 10px; color: #B7D2F2; }

.suche .treffer { margin-top: 12px; display: grid; gap: 8px; }
.suche .treffer article { display: flex; gap: 14px; align-items: center; padding: 12px 16px; background: rgba(8, 15, 30, .72); border: 1px solid var(--linie); border-radius: 12px; backdrop-filter: blur(12px); cursor: pointer; }
.suche .treffer article:hover, .suche .treffer article:focus-visible { border-color: var(--linie-hell); background: rgba(14, 26, 50, .8); outline: none; }
.suche .treffer article:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.suche .treffer .blatt { flex: none; width: 30px; height: 38px; border-radius: 3px; background: linear-gradient(160deg, #E9F1FF, #B9CEEA); box-shadow: 0 0 16px rgba(126, 216, 255, .3); position: relative; }
.suche .treffer .blatt::after { content: ''; position: absolute; left: 5px; right: 5px; top: 7px; height: 2px; background: #8FAACD; box-shadow: 0 6px 0 #C3D3E8, 0 12px 0 #C3D3E8, 0 18px 0 #C3D3E8; }
.suche .treffer h3 { margin: 0; font-size: 15px; font-weight: 600; color: #EAF2FF; }
.suche .treffer p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.suche .treffer .ort { margin-left: auto; font-size: 12px; color: var(--cyan); white-space: nowrap; }

.such-fuss { position: fixed; z-index: 3; left: 0; right: 0; bottom: 16px; text-align: center; font-size: 12.5px; color: #5E769B; pointer-events: none; padding: 0 20px; }
.such-fuss kbd { border: 1px solid var(--linie); border-radius: 5px; padding: 1px 6px; }

@media (max-width: 760px) {
  .such-mitte { padding-top: 110px; }
  .suche .balken { flex-wrap: wrap; padding: 12px 14px; }
  .suche .balken input { font-size: 17px; flex-basis: 100%; order: -1; }
  .suche .treffer .ort { margin-left: 0; flex-basis: 100%; }
  .suche .treffer article { flex-wrap: wrap; }
}

/* ---------- Mikrofon ---------- */
.suche .mikro {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--linie-hell); background: rgba(30, 60, 110, .5); color: var(--cyan);
  display: grid; place-items: center; cursor: pointer; transition: background .2s, color .2s;
}
.suche .mikro:hover:not(:disabled) { background: rgba(45, 95, 175, .6); }
.suche .mikro:disabled { opacity: .5; cursor: default; }
.suche .mikro.hoert {
  background: linear-gradient(135deg, #1B5FC0, var(--blau)); color: #fff; border-color: transparent;
  animation: mikro-puls 1.6s ease-in-out infinite;
}
@keyframes mikro-puls {
  0%, 100% { box-shadow: 0 0 0 0 rgba(61, 139, 242, .55); }
  50% { box-shadow: 0 0 0 14px rgba(61, 139, 242, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .suche .mikro.hoert { animation: none; box-shadow: 0 0 0 4px rgba(61, 139, 242, .45); }
}
/* Eigene Flaeche, sonst geht der Satz auf der Halle unter. */
.mikro-zeile {
  margin-top: 12px; font-size: 13px; color: var(--cyan); text-align: center;
  background: rgba(8, 15, 30, .72); border: 1px solid var(--linie);
  border-radius: 999px; padding: 5px 14px; backdrop-filter: blur(8px);
}

/* ---------- Vorlesen ---------- */
.sagt .laut {
  margin-left: auto; flex: none; align-self: flex-start;
  border: 0; background: transparent; color: var(--cyan); cursor: pointer; opacity: .8;
  padding: 2px; border-radius: 8px;
}
.sagt .laut:hover { opacity: 1; }
.sagt .laut.liest { opacity: 1; animation: laut-puls 1.4s ease-in-out infinite; }
@keyframes laut-puls { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .sagt .laut.liest { animation: none; } }
