/* CSL Planplattform – Web-Verwaltung. Tokens, Masse und Animationen aus dem Design-Handoff (v3). Nur hell, wie die Download-Seite. */

:root {
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --sunken: #F5F5F7;
  --line: #E5E5EA;
  --line2: #D1D1D6;
  --label: #1D1D1F;
  --sec: #6E6E73;
  --tert: #8E8E93;
  --ph: #AEAEB2;
  --field: #FFFFFF;
  --fieldEdge: #D1D1D6;
  --hover: #F5F5F7;
  --focus: rgba(0, 0, 0, 0.07);
  --primary: #2C2C2E;
  --primaryHover: #1D1D1F;
  --onPrimary: #FFFFFF;
  --track: #E5E5EA;
  --red: #D70015;
  --redSoft: #FDECEC;
  --segOn: #FFFFFF;
  --segShadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  --accentSolid: #F2F2F7;
  --toastBg: #1D1D1F;
  --toastText: #FFFFFF;
  --ease: cubic-bezier(.2, .7, .2, 1);
}


@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes qrIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes swapA { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes swapB { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

html { background: var(--bg); scrollbar-gutter: stable; } /* Bildlaufleiste mit Platzbedarf: Seiten springen nicht beim Wechseln */
body {
  margin: 0;
  background: var(--bg);
  color: var(--label);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: inherit; text-decoration: underline; }
input, select, button { font-family: inherit; }
input::placeholder { color: var(--ph); }
input:focus, select:focus { outline: none; }
button { font-size: inherit; }
svg { flex: none; }
[hidden] { display: none !important; }

.app { min-height: 100vh; display: flex; flex-direction: column; }
.container { max-width: 1000px; width: 100%; margin: 0 auto; padding-left: 40px; padding-right: 40px; box-sizing: border-box; }

/* Kopfzeile */
.header { padding-top: 28px; display: flex; align-items: center; gap: 32px; }
.brand { flex: none; display: flex; align-items: center; gap: 16px; }
.brand__link { display: block; }
.brand__link:hover { text-decoration: none; }
.brand__logo { height: 60px; display: block; }
.brand__logo--dark { display: none; }
.brand__slash { font-size: 28px; font-weight: 300; color: var(--line2); line-height: 1; }
.brand__name { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 28px; }
.nav__item {
  position: relative; display: inline-flex; flex-direction: column; align-items: center;
  border: 0; background: transparent; padding: 6px 0; font-size: 15px; cursor: pointer;
  color: var(--sec); font-weight: 500; transition: color .15s;
}
/* Breite der fetten Schrift des aktiven Punkts reservieren, sonst springen die Punkte beim Wechseln */
.nav__item::after { content: attr(data-label); height: 0; overflow: hidden; visibility: hidden; font-weight: 600; pointer-events: none; }
.nav__item:hover, .nav__item--active { color: var(--label); }
.nav__item--active { font-weight: 600; }
.nav__line {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 1px; background: var(--label);
  transform-origin: left center; transform: scaleX(0); transition: transform .4s var(--ease);
}
.nav__item--active .nav__line { transform: scaleX(1); }
.account { position: relative; }
.account__button {
  height: 36px; border: 0; border-radius: 8px; background: transparent; display: flex; align-items: center; gap: 8px;
  padding: 0 10px; cursor: pointer; color: var(--label); font-size: 15px; font-weight: 500; transition: background .15s;
  max-width: 320px;
}
.account__button:hover { background: var(--hover); }
.account__email { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account__button svg { color: var(--sec); }

/* Menü (Konto, Projekt) */
.menu {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-sizing: border-box; position: absolute;
  right: 0; top: 44px; width: 320px; padding: 8px; box-shadow: 0 12px 32px rgba(0, 0, 0, .10); z-index: 30;
  display: flex; flex-direction: column; text-align: left; cursor: default;
}
.menu__head { padding: 12px 12px 14px; display: flex; flex-direction: column; gap: 2px; border-bottom: 1px solid var(--line); }
.menu__email { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu__org { font-size: 13px; color: var(--sec); }
.menu__item {
  height: 40px; margin-top: 6px; border: 0; border-radius: 8px; background: transparent; padding: 0 12px; display: flex;
  align-items: center; gap: 10px; font-size: 15px; font-weight: 500; color: var(--label); cursor: pointer; text-align: left;
}
.menu__item:hover { background: var(--hover); }
.menu__item--danger { color: var(--red); }
.menu__item--danger:hover { background: var(--redSoft); }
.menu__section { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--line); }
.menu__section:last-child { border-bottom: 0; }
.menu__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 28px; font-size: 15px; }
.menu__row--wrap { flex-wrap: wrap; }
.menu__note { font-size: 13px; color: var(--sec); }
.menu__inline { display: flex; gap: 6px; align-items: center; }
.menu__inline .field { height: 36px; font-size: 14px; }
.menu--project { right: auto; left: 0; top: 40px; width: 340px; }
.menu__section--qr { align-items: center; }
.qr-small--menu { width: 180px; height: 180px; }
.menu__section--qr .addr { width: 100%; box-sizing: border-box; }

/* Schalter */
.switch { position: relative; width: 34px; height: 20px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch__track { position: absolute; inset: 0; border-radius: 10px; background: var(--line2); 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(14px); }
.switch input:focus-visible + .switch__track { box-shadow: 0 0 0 3px var(--focus); }

/* Inhalt und Fusszeile */
.main { flex: 1; padding-top: 56px; padding-bottom: 80px; }
.footer { padding-bottom: 40px; }
.footer__inner { border-top: 1px solid var(--line); padding-top: 22px; font-size: 13px; color: var(--sec); display: flex; flex-wrap: wrap; gap: 6px; }

.screen { display: flex; flex-direction: column; animation: fadeUp .45s var(--ease) backwards; }
.main--center { display: flex; flex-direction: column; align-items: center; justify-content: center; padding-top: 24px; }
.screen--login { width: 100%; max-width: 420px; gap: 28px; animation-duration: .5s; margin: 0 auto; }
.screen--new { gap: 36px; transition: opacity .3s ease, transform .3s ease; }
.screen--leaving { opacity: 0; transform: translateY(-10px); }
.screen--result { gap: 36px; animation: fadeUp .5s var(--ease) both; }
.screen--links { gap: 36px; }
.screen--still { animation: none; }

.h1 { margin: 0; font-size: 36px; line-height: 1.1; font-weight: 700; letter-spacing: -0.022em; }
.h1--balance { max-width: 820px; text-wrap: balance; }
.subtitle { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
.page-head { display: flex; flex-direction: column; gap: 10px; }
.page-head__meta { font-size: 15px; color: var(--sec); }
.title-block { display: flex; flex-direction: column; gap: 8px; }

/* Felder und Knöpfe */
.field-group { display: flex; flex-direction: column; gap: 6px; }
.fields { display: flex; flex-direction: column; gap: 16px; }
.label { font-size: 13px; font-weight: 500; color: var(--sec); }
.field {
  height: 40px; border-radius: 8px; border: 1px solid var(--fieldEdge); background: var(--field); padding: 0 12px; font-size: 15px;
  color: var(--label); box-sizing: border-box; width: 100%; transition: border-color .15s;
}
.field:focus { border-color: var(--label); }
.field--select { padding-right: 36px; cursor: pointer; -webkit-appearance: none; appearance: none; }
.field--select:disabled { cursor: default; color: var(--sec); }
.select { position: relative; display: flex; align-items: center; }
.select__chevron { position: absolute; right: 12px; pointer-events: none; color: var(--sec); }
.field--static {
  display: flex; align-items: center; background: var(--sunken); color: var(--sec); border-color: transparent; font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.field--static span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field--title { background: var(--sunken); border-color: transparent; font-size: 17px; font-weight: 600; }
.field--title:focus { background: var(--field); }
.field--title:read-only { cursor: default; }
.field--title:read-only:focus { border-color: transparent; background: var(--sunken); }
.field--small { height: 36px; font-size: 14px; }
.pw { position: relative; display: flex; align-items: center; }
.pw .field { padding-right: 42px; }
.pw__toggle { position: absolute; right: 6px; color: var(--sec); }
.error { font-size: 14px; color: var(--red); }
.textlink { border: 0; background: transparent; padding: 0; font-size: 14px; color: var(--sec); cursor: pointer; align-self: flex-start; }
.textlink:hover { color: var(--label); }
.back {
  align-self: flex-start; border: 0; background: transparent; padding: 0; margin-bottom: 22px; color: var(--sec); font-size: 15px;
  cursor: pointer; display: flex; align-items: center; gap: 6px;
}
.back:hover { color: var(--label); }

.btn {
  height: 40px; border-radius: 8px; border: 0; background: var(--primary); color: var(--onPrimary); font-size: 15px; font-weight: 600;
  padding: 0 18px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  transition: background .15s, transform .1s, opacity .15s; box-sizing: border-box;
}
.btn:hover { background: var(--primaryHover); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: default; }
.btn:disabled:hover { background: var(--primary); }
.btn:disabled:active { transform: none; }
.btn--block { width: 100%; }
.btn--secondary { border: 1px solid var(--line2); background: var(--surface); color: var(--label); font-weight: 500; padding: 0 16px; }
.btn--secondary:hover, .btn--secondary:disabled:hover { background: var(--hover); }
.btn--secondary:disabled:hover { background: var(--surface); }
.btn--small { height: 30px; border-radius: 7px; font-size: 13px; padding: 0 12px; gap: 6px; }
.btn--danger { background: var(--red); color: #fff; }
.btn--danger:hover { background: var(--red); opacity: .9; }
.btn--mt { margin-top: 6px; }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--onPrimary); border-top-color: transparent; animation: spin .8s linear infinite; }

.icon-btn {
  width: 28px; height: 28px; border: 0; border-radius: 7px; background: transparent; padding: 0; cursor: pointer; color: var(--tert);
  display: flex; align-items: center; justify-content: center; flex: none; transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--hover); color: var(--label); }
.icon-btn--danger:hover { color: var(--red); background: var(--redSoft); }
.icon-btn--sec { color: var(--sec); }

/* Raster */
.grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
.grid--links { grid-template-columns: 240px minmax(0, 1fr); gap: 64px; }
.stack { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.side { display: flex; flex-direction: column; gap: 18px; }
.side--result { gap: 12px; }
.divider { height: 1px; background: var(--line); margin: 6px 0; }

/* Ablagefläche */
.drop {
  min-height: 380px; border: 1px dashed var(--line2); background: transparent; border-radius: 10px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 20px; padding: 32px; box-sizing: border-box; transition: background .2s, border-color .2s;
}
.drop__icon { color: var(--sec); transition: transform .25s, color .2s; }
.drop__icon-inner { display: flex; }
.drop__text { font-size: 17px; font-weight: 600; text-align: center; }
.drop__actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.app--dragging .drop { border-color: var(--label); background: var(--hover); }
.app--dragging .drop__icon { color: var(--label); transform: scale(1.15); }
.app--dragging .drop__icon-inner { animation: bob 1s ease-in-out infinite; }
.drop--small { min-height: 0; padding: 20px 24px; gap: 12px; }
.drop--small .drop__text { font-size: 15px; font-weight: 500; color: var(--sec); }
.app--dragging .drop--small .drop__text { color: var(--label); }
.dashed-btn {
  height: 56px; border-radius: 10px; border: 1px dashed var(--line2); background: transparent; color: var(--sec); font-size: 15px;
  font-weight: 500; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  transition: color .15s, border-color .2s, background .2s;
}
.dashed-btn:hover { color: var(--label); }
.app--dragging .dashed-btn--drop { border-color: var(--label); background: var(--hover); }

/* Ordnerkarte */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-sizing: border-box; overflow: hidden; flex: none; }
.card--anim { animation: rise .4s var(--ease) backwards; }
.card__head { height: 56px; display: flex; align-items: center; gap: 14px; padding: 0 14px 0 18px; cursor: pointer; transition: background .15s; }
.card__head:hover, .card--target .card__head { background: var(--hover); }
.card--target { box-shadow: inset 0 0 0 1px var(--label); }
.card__chevron { color: var(--label); transition: transform .2s; }
.card--open .card__chevron { transform: rotate(90deg); }
.card__name { flex: 1; min-width: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__rename { flex: 1; min-width: 0; height: 36px; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.card__meta { font-size: 14px; color: var(--sec); white-space: nowrap; }
.card__edit { opacity: 0; }
.card__head:hover .card__edit { opacity: 1; }
.card__body { border-top: 1px solid var(--line); padding: 0 18px; display: flex; flex-direction: column; }
.file { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.file:first-child { border-top-color: transparent; }
.file--anim { animation: rise .3s var(--ease) backwards; }
.file__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.file__name { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file__meta { font-size: 12px; color: var(--sec); }
.card__add {
  height: 44px; border: 0; border-top: 1px solid var(--line); background: transparent; padding: 0; text-align: left; color: var(--sec);
  font-size: 14px; font-weight: 500; cursor: pointer; display: flex; align-items: center; gap: 8px;
}
.card__add:hover { color: var(--label); }
.card__empty { padding: 14px 0; font-size: 13px; color: var(--tert); }

/* Fortschritt */
.progress { display: flex; flex-direction: column; gap: 10px; }
.progress__row { display: flex; align-items: baseline; justify-content: space-between; }
.progress__title { font-size: 15px; font-weight: 600; }
.progress__pct { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bar { height: 4px; border-radius: 2px; background: var(--track); overflow: hidden; }
.bar__fill { height: 100%; border-radius: 2px; background: var(--primary); width: 0; transition: width .25s; }
.progress__label { font-size: 13px; color: var(--sec); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* QR-Ergebnis */
.result__head { display: flex; flex-direction: column; }
.result__sub { margin-top: 12px; }
.result__meta { font-size: 15px; color: var(--sec); margin-top: 16px; }
.result__date { font-size: 12px; color: var(--tert); margin-top: 6px; }
.qr-card { padding: 36px 28px; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.qr-big { width: 260px; height: 260px; background: #fff; padding: 14px; box-sizing: border-box; border-radius: 8px; animation: qrIn .6s .15s var(--ease) both; }
.qr-big canvas, .qr-small canvas { width: 100%; height: 100%; display: block; }
.url-row { width: 100%; max-width: 460px; display: flex; gap: 8px; }
.url-row .field--static { flex: 1; min-width: 0; color: var(--label); }
.segment { height: 36px; border-radius: 8px; background: var(--sunken); display: flex; padding: 2px; gap: 2px; box-sizing: border-box; }
.segment__item {
  flex: 1; border: 0; border-radius: 6px; font-size: 13px; cursor: pointer; background: transparent; color: var(--sec); font-weight: 500;
  font-variant-numeric: tabular-nums; transition: background .15s;
}
.segment__item--on { background: var(--segOn); color: var(--label); font-weight: 600; box-shadow: var(--segShadow); }
.btn--mt8 { margin-top: 8px; }

/* Links verwalten – Liste */
.list { display: flex; flex-direction: column; gap: 2px; }
.list__head { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 6px 10px; }
.list__title { font-size: 13px; font-weight: 600; color: var(--sec); }
.list__section { padding: 0 10px 6px; }
.list__divider { height: 1px; background: var(--line); margin: 12px 0; }
.list__empty { font-size: 13px; color: var(--tert); padding: 6px 10px 8px 33px; }
.list__empty--top { padding-left: 10px; }
.list__foot { display: flex; align-items: center; gap: 6px; padding: 16px 10px 0; margin-top: 12px; border-top: 1px solid var(--line); }
.list__count { font-size: 13px; color: var(--sec); }
.refresh { width: 26px; height: 26px; color: var(--sec); }
.refresh--busy svg { animation: spin .9s linear infinite; }
.newproject { display: flex; gap: 6px; padding: 0 0 8px; }
.newproject .field { height: 36px; font-size: 14px; }
.newproject .btn { height: 36px; }
.project { display: flex; flex-direction: column; gap: 2px; position: relative; }
.project__row { height: 40px; display: flex; align-items: center; gap: 10px; padding: 0 10px; border-radius: 8px; cursor: pointer; transition: background .15s; }
.project__row:hover { background: var(--hover); }
.project__row--target { background: var(--hover); box-shadow: inset 0 0 0 1px var(--label); }
.project__chevron { color: var(--label); transition: transform .2s; }
.project--open .project__chevron { transform: rotate(90deg); }
.project__name { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project__meta { font-size: 13px; color: var(--sec); white-space: nowrap; }
.project__gear { width: 24px; height: 24px; margin-right: -4px; color: var(--sec); }
.project__row:hover .project__gear, .project__gear--open { color: var(--label); }
.project__links { display: flex; flex-direction: column; gap: 2px; padding-bottom: 6px; }
.project__links--anim { animation: rise .3s var(--ease) backwards; }
.linkrow {
  flex: none; border-radius: 8px; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; cursor: pointer; transition: background .15s;
  color: var(--label);
}
.linkrow--nested { padding-left: 33px; }
.linkrow:hover { background: var(--hover); }
.linkrow--selected, .linkrow--selected:hover { background: var(--accentSolid); }
.linkrow__title { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.linkrow__meta { font-size: 12px; color: var(--sec); }
.linkrow--dragging { opacity: .5; }

/* Links verwalten – Detail */
.detail { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.detail--a { animation: swapA .4s var(--ease) backwards; }
.detail--b { animation: swapB .4s var(--ease) backwards; }
.h1--a { animation: swapA .4s var(--ease) backwards; }
.h1--b { animation: swapB .4s var(--ease) backwards; }
.detail__top { display: flex; gap: 20px; align-items: flex-start; }
.qr-small { width: 160px; height: 160px; flex: none; border-radius: 10px; background: #fff; padding: 10px; box-sizing: border-box; border: 1px solid var(--line); }
.detail__fields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.addr { height: 40px; border-radius: 8px; background: var(--sunken); display: flex; align-items: center; gap: 8px; padding: 0 4px 0 12px; box-sizing: border-box; min-width: 0; }
.addr__url { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: var(--sec); }
.addr .btn--small { height: 32px; }
.detail__created { font-size: 12px; color: var(--tert); padding: 2px 2px 0; }
.detail__assistant { display: flex; align-items: center; gap: 10px; width: fit-content; font-size: 14px; padding: 0 2px; cursor: pointer; }
.detail__assistant:has(input:disabled) { cursor: default; }
.detail__history { font-size: 12px; padding: 0; }

/* Verlauf eines Links (history-view.js) */
.history { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, 0.2); }
.history__card { width: min(100%, 480px); max-height: calc(100vh - 32px); display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18); }
.history__title { padding: 18px 20px 10px; }
.history__title h2 { margin: 0; font-size: 17px; font-weight: 600; }
.history__subtitle { display: block; margin-top: 2px; font-size: 13px; color: var(--sec); }
.history__body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 20px; }
.history__empty { margin: 8px 0 16px; font-size: 14px; color: var(--sec); }
.history__entry { padding: 12px 0; border-top: 1px solid var(--line); }
.history__head { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.history__date { font-weight: 600; }
.history__by { color: var(--sec); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history__changes { list-style: none; margin: 6px 0 0; padding: 0; font-size: 14px; }
.history__change { padding: 3px 0; line-height: 1.4; word-break: break-word; }
.history__change strong { font-weight: 600; }
.history__change--removed strong:first-child { text-decoration: line-through; color: var(--sec); }
.history__folder { color: var(--sec); font-size: 13px; }
.history__close { margin: 12px 20px 18px; }
.detail__row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; } /* Projekt-Auswahl und Schalter «Plan-Assistent» nebeneinander */
.detail__project { width: 240px; flex: none; }
.detail__actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.detail__actions .btn { padding: 0 12px; min-width: 0; }
.detail__bar { display: flex; align-items: center; justify-content: space-between; padding-top: 16px; }
.section-title { font-size: 13px; font-weight: 600; color: var(--sec); }
.section-meta { font-size: 13px; color: var(--sec); }
.detail__progress { display: flex; align-items: center; gap: 14px; padding: 4px 2px; }
.detail__progress .bar { flex: 1; }
.detail__progress span { font-size: 13px; color: var(--sec); white-space: nowrap; }
.detail__foot { display: flex; align-items: center; gap: 10px; padding-top: 8px; }
.danger-link { border: 0; background: transparent; padding: 0; color: var(--red); font-size: 15px; font-weight: 500; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.danger-link:hover { opacity: .8; }
.confirm__text { font-size: 14px; color: var(--label); flex: 1; }
.empty { min-height: 240px; display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--tert); border: 1px dashed var(--line2); border-radius: 10px; text-align: center; padding: 20px; box-sizing: border-box; }

/* Ersetzen im Link */
.replace { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.replace__head { display: flex; align-items: center; gap: 10px; }
.replace__title { font-size: 15px; font-weight: 600; flex: 1; }
.replace__drop { min-height: 150px; border: 1px dashed var(--line2); border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 20px; box-sizing: border-box; text-align: center; transition: background .2s, border-color .2s; }
.replace__drop--active, .app--dragging .replace__drop { border-color: var(--label); background: var(--hover); }
.replace__drop-text { font-size: 15px; font-weight: 600; }
.replace__note { font-size: 13px; color: var(--sec); line-height: 1.45; }
.replace__question { font-size: 15px; font-weight: 600; }
.replace__rows { display: flex; flex-direction: column; }
.replace__row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.replace__row:first-child { border-top: 0; }
.replace__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.replace__text span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.replace__meta { font-size: 12px; color: var(--sec); }
.replace__row--group { padding-top: 14px; font-weight: 600; }
.replace__row--group + .replace__row { border-top: 0; padding-top: 4px; }
.replace__row--error { color: var(--red); }
.replace__tag { font-size: 12px; font-weight: 600; color: var(--sec); flex: none; padding: 3px 8px; border-radius: 6px; background: var(--sunken); }
.replace__actions { display: flex; align-items: center; gap: 10px; }
.replace__summary { font-size: 13px; color: var(--sec); flex: 1; }

/* Benutzer */
.user__row { display: flex; align-items: center; gap: 12px 16px; padding: 14px 18px; flex-wrap: wrap; }
.user__text { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.user__actions { margin-left: auto; }
.user__email { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.user__tags { display: inline-flex; gap: 6px; }
.user__actions { display: flex; align-items: center; gap: 8px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.user__check { height: 40px; }
.replace__tag--replace { color: var(--onPrimary); background: var(--primary); }
.replace__tag--warn { color: var(--red); background: var(--redSoft); }
.access { border-top: 1px solid var(--line); padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 8px; }
.access__row { display: flex; align-items: center; gap: 12px; min-height: 36px; }
.access__row--head { padding-bottom: 6px; }
.access__name { flex: 1; min-width: 0; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.access__section { font-size: 13px; font-weight: 600; color: var(--sec); padding-top: 10px; }
.access__select { width: 150px; flex: none; }
.access__select--wide { width: 200px; }

/* Skeleton-Loader (wie auf der Download-Seite) */
.skeleton { position: relative; overflow: hidden; border-radius: 8px; background: color-mix(in srgb, var(--label) 7%, transparent); flex: none; }
.skeleton::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .65), transparent); animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }
.skel-rows { display: flex; flex-direction: column; gap: 2px; }
.skel-row { display: flex; flex-direction: column; gap: 8px; padding: 10px 10px 12px; }
.skel-card { height: 56px; border: 1px solid var(--line); border-radius: 10px; display: flex; align-items: center; gap: 14px; padding: 0 18px; box-sizing: border-box; }
.skel-card .skeleton:last-child { margin-left: auto; }
.skel-top { display: flex; gap: 20px; align-items: flex-start; }
.skel-fields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.skel-page { display: flex; flex-direction: column; gap: 36px; }
@media (prefers-reduced-motion: reduce) { .skeleton::after { animation: none; } }

/* Meldung */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); animation: toastIn .3s var(--ease) backwards; padding: 11px 16px;
  border-radius: 8px; background: var(--toastBg); color: var(--toastText); font-size: 14px; font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .16); z-index: 50; white-space: nowrap; max-width: calc(100vw - 40px); overflow: hidden; text-overflow: ellipsis;
}

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