/* =============================================================
   ReloCrate — App (v2 · minimal / full-width / airy)
   ============================================================= */

/* ---- Reset --------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
input { font: inherit; color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }
::selection { background: var(--accent-soft); color: var(--accent); }

* { scrollbar-width: thin; scrollbar-color: var(--n-200) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--n-200); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--n-300); background-clip: content-box; }

/* ---- Typo-Helfer --------------------------------------------- */
.h-cond {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  color: var(--text-strong);
  line-height: var(--lh-tight);
}
.eyebrow {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  font-size: var(--fs-xs);
  color: var(--text-faint);
}
.mono { font-family: var(--font-mono); font-feature-settings: "tnum"; letter-spacing: -0.01em; }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }

/* =============================================================
   App-Shell + Hintergrund-Glow
   ============================================================= */
.app { min-height: 100vh; }

/* zwei sehr dezente, weiche Glows im Hintergrund */
.bg-glow {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.bg-glow::before,
.bg-glow::after {
  content: ""; position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: 0.5;
}
.bg-glow::before {
  width: 620px; height: 620px; top: -260px; right: -120px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  opacity: 0.28;
}
.bg-glow::after {
  width: 520px; height: 520px; bottom: -240px; left: 180px;
  background: radial-gradient(circle, rgba(31,168,144,0.22), transparent 70%);
  opacity: 0.22;
}

/* ---- Schwebende Sidebar (ruhig) ------------------------------ */
.sidebar {
  position: fixed;
  top: var(--sidebar-gap);
  left: var(--sidebar-gap);
  bottom: var(--sidebar-gap);
  width: var(--sidebar-w);
  z-index: 40;
  display: flex;
  flex-direction: column;
  padding: var(--space-6) var(--space-4) var(--space-4);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform var(--dur) var(--ease);
}
.brand {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-2) var(--space-3) var(--space-7);
}
.brand__mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(150deg, var(--accent), var(--accent-press));
  color: #fff; display: grid; place-items: center; font-size: 15px;
  box-shadow: 0 6px 16px var(--accent-glow);
  flex-shrink: 0;
}
.brand__name {
  font-family: var(--font-head); text-transform: uppercase;
  letter-spacing: 0.06em; font-weight: 700; font-size: var(--fs-md);
  color: var(--text-strong); line-height: 1;
}
.brand__name b { color: var(--accent); font-weight: 700; }

.nav { display: flex; flex-direction: column; gap: 1px; }
.nav__label {
  font-family: var(--font-head); text-transform: uppercase;
  letter-spacing: 0.16em; font-size: 10px; font-weight: 600;
  color: var(--text-faint); padding: var(--space-5) var(--space-3) var(--space-2);
}
.nav__item {
  display: flex; align-items: center; gap: var(--space-3);
  padding: 9px var(--space-3); border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: 12px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.045em;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.nav__item i { font-size: 15px; width: 20px; text-align: center; color: var(--text-faint); transition: color var(--dur-fast) var(--ease); }
.nav__item:hover { background: var(--surface-hover); color: var(--text-strong); }
.nav__item:hover i { color: var(--text); }
.nav__item.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav__item.is-active i { color: var(--accent); }

/* Verwaltung + User nach unten schieben */
.sidebar__bottom { margin-top: auto; }
.sidebar__foot { padding-top: var(--space-3); margin-top: var(--space-3); border-top: 1px solid var(--hairline); }
.user {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  transition: background var(--dur-fast) var(--ease);
}
.user:hover { background: var(--surface-hover); }
.user__avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--n-800); color: #fff;
  display: grid; place-items: center; font-size: 12px; font-weight: 500; flex-shrink: 0;
}
.user__meta { min-width: 0; line-height: 1.3; }
.user__name { font-size: var(--fs-sm); font-weight: 500; color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user__mail { font-size: 11px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user i { margin-left: auto; color: var(--text-faint); font-size: 12px; }

/* ---- Content: volle Breite ----------------------------------- */
.content {
  position: relative; z-index: 1;
  margin-left: calc(var(--sidebar-w) + var(--sidebar-gap) * 2);
  padding: var(--pad-top) var(--pad-x) var(--space-20);
  min-height: 100vh;
}

/* =============================================================
   Page-Header (grosszügig, ruhig)
   ============================================================= */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--space-6); flex-wrap: wrap;
  margin-bottom: var(--space-10);
}
.page-head__titles { display: flex; flex-direction: column; gap: var(--space-3); }
.page-title {
  font-family: var(--font-head); text-transform: uppercase;
  letter-spacing: 0.02em; font-weight: 700; font-size: var(--fs-2xl);
  color: var(--text-strong); line-height: 1;
}
.page-meta { display: flex; align-items: center; gap: var(--space-4); font-size: var(--fs-sm); color: var(--text-muted); }
.page-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--n-300); }
.page-meta b { color: var(--text-strong); font-weight: 500; }
.page-head__actions { display: flex; align-items: center; gap: var(--space-3); }

/* =============================================================
   Buttons (reduziert)
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  height: 42px; padding: 0 var(--space-5);
  border-radius: var(--radius-sm); font-size: var(--fs-sm); font-weight: 500;
  white-space: nowrap; border: 1px solid transparent;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.btn i { font-size: 14px; }
.btn:active { transform: translateY(0.5px); }
.btn--primary { background: var(--accent); color: var(--text-on-accent); box-shadow: 0 6px 18px var(--accent-glow); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--ghost { background: var(--surface); color: var(--text-strong); border-color: var(--hairline-strong); }
.btn--ghost:hover { border-color: var(--n-300); background: var(--surface-2); }
.btn--quiet { background: transparent; color: var(--text-muted); height: 38px; padding: 0 var(--space-3); }
.btn--quiet:hover { background: var(--surface-hover); color: var(--text-strong); }
.btn--sm { height: 36px; padding: 0 var(--space-4); }

.icon-btn {
  width: 42px; height: 42px; border-radius: var(--radius-sm);
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--hairline-strong);
  color: var(--text-muted); font-size: 15px;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.icon-btn:hover { color: var(--text-strong); border-color: var(--n-300); background: var(--surface-2); }

/* =============================================================
   Toolbar (Suche · Filter · View)
   ============================================================= */
.toolbar {
  display: flex; align-items: center; gap: var(--space-3);
  margin-bottom: var(--space-6); flex-wrap: wrap;
}
.toolbar__spacer { flex: 1; }
.result-count { font-size: var(--fs-sm); color: var(--text-faint); }
.result-count b { color: var(--text); font-weight: 500; }

.search {
  display: flex; align-items: center; gap: var(--space-3);
  height: 42px; padding: 0 var(--space-4);
  background: var(--surface); border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-sm); min-width: 300px;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.search:focus-within { border-color: var(--accent-line); box-shadow: var(--ring); }
.search i { color: var(--text-faint); font-size: 14px; }
.search input { border: none; outline: none; background: none; width: 100%; font-size: var(--fs-sm); }
.search input::placeholder { color: var(--text-faint); }
.search kbd { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); border: 1px solid var(--hairline-strong); border-radius: 5px; padding: 1px 6px; }

/* Segmented / View-Toggle */
.seg { display: inline-flex; padding: 3px; background: var(--n-100); border-radius: var(--radius-sm); }
.seg button {
  width: 36px; height: 30px; border-radius: 7px; color: var(--text-faint); font-size: 13px;
  display: grid; place-items: center; transition: all var(--dur-fast) var(--ease);
}
.seg button.is-active { background: var(--surface); color: var(--text-strong); box-shadow: var(--shadow-xs); }

/* =============================================================
   Custom Inline-Dropdown (ruhig)
   ============================================================= */
.dropdown { position: relative; }
.dropdown__toggle {
  display: inline-flex; align-items: center; gap: var(--space-3);
  height: 42px; padding: 0 var(--space-3) 0 var(--space-4);
  background: var(--surface); border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-sm); font-size: var(--fs-sm); color: var(--text-strong);
  transition: border-color var(--dur-fast) var(--ease);
}
.dropdown__toggle:hover { border-color: var(--n-300); }
.dropdown.is-open .dropdown__toggle { border-color: var(--accent-line); box-shadow: var(--ring); }
.dropdown__toggle .lead { color: var(--text-faint); font-size: 13px; }
.dropdown__toggle .chev { color: var(--text-faint); font-size: 11px; transition: transform var(--dur) var(--ease); margin-left: 2px; }
.dropdown.is-open .dropdown__toggle .chev { transform: rotate(180deg); }

.dropdown__menu {
  position: absolute; top: calc(100% + 8px); left: 0;
  display: flex; flex-direction: column;      /* Items füllen volle Breite */
  min-width: 100%; width: max-content;         /* so breit wie längster Eintrag */
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--hairline); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 7px; z-index: 60;
  opacity: 0; transform: translateY(-6px) scale(0.985); transform-origin: top;
  pointer-events: none;
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease-out);
}
.dropdown__menu--right { left: auto; right: 0; }
.dropdown.is-open .dropdown__menu { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.dropdown__opt {
  display: flex; align-items: center; gap: var(--space-3);
  padding: 9px var(--space-3); border-radius: var(--radius-xs);
  font-size: var(--fs-sm); color: var(--text); white-space: nowrap;
  transition: background var(--dur-fast) var(--ease);
}
.dropdown__opt i:first-child { width: 15px; text-align: center; color: var(--text-faint); font-size: 13px; }
.dropdown__opt:hover { background: var(--surface-hover); color: var(--text-strong); }
.dropdown__opt .check { margin-left: auto; color: var(--accent); opacity: 0; font-size: 12px; }
.dropdown__opt.is-selected { color: var(--text-strong); font-weight: 500; }
.dropdown__opt.is-selected .check { opacity: 1; }
.dropdown__sep { height: 1px; background: var(--hairline); margin: 6px 4px; }

/* =============================================================
   Kisten-Liste (volle Breite, luftig)
   ============================================================= */
/* Schwebende Tabelle: kein Container-Rahmen, kein Hintergrund, kein Gitternetz */
.panel {
  background: transparent;
  border: none;
  box-shadow: none;
}

.crate-cols {
  display: grid;
  grid-template-columns: minmax(260px, 2.2fr) 1.1fr 0.8fr 1.4fr 1fr 44px;
  align-items: center;
  gap: var(--space-6);
  padding: var(--space-4) var(--space-4);
}
.crate-head { padding-top: 0; padding-bottom: var(--space-3); }
.crate-head .col {
  font-family: var(--font-head); text-transform: uppercase;
  letter-spacing: 0.12em; font-size: 10.5px; font-weight: 600; color: var(--text-faint);
}
.crate-head .col.right, .crate-row .cell.right { justify-self: end; text-align: right; }

/* Zeilen ohne Trennlinien – heben sich erst beim Hover als schwebende Kachel ab */
.crate-row {
  border-radius: var(--radius);
  transition: background var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
  position: relative;
}
.crate-row:hover {
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

/* Identität */
.crate-id { display: flex; align-items: center; gap: var(--space-4); min-width: 0; }
.crate-thumb {
  width: 44px; height: 44px; border-radius: var(--radius-xs);
  border: 1px solid var(--hairline); background: var(--surface-2);
  display: grid; place-items: center; color: var(--text-muted); font-size: 17px;
  flex-shrink: 0;
}
.crate-row:hover .crate-thumb { border-color: var(--accent-line); color: var(--accent); }
.crate-id__text { min-width: 0; }
.crate-name { font-size: var(--fs-base); font-weight: 500; color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crate-code { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); margin-top: 2px; }

.cell { font-size: var(--fs-sm); color: var(--text-muted); min-width: 0; }
.cell .num { font-family: var(--font-mono); color: var(--text); }

/* Fortschritt */
.bar { display: flex; align-items: center; gap: var(--space-3); }
.bar__track { flex: 1; height: 4px; border-radius: 99px; background: var(--n-100); overflow: hidden; min-width: 60px; }
.bar__fill { height: 100%; border-radius: 99px; background: var(--accent); transition: width var(--dur-slow) var(--ease-out); }
.bar__fill.is-done { background: var(--accent-2); }
.bar__pct { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); min-width: 34px; text-align: right; }

/* Status: dezenter Dot + Text */
.status { display: inline-flex; align-items: center; gap: var(--space-3); font-size: var(--fs-sm); color: var(--text); white-space: nowrap; }
.status .dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.status--planned .dot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--st-planned); }
.status--progress .dot { background: var(--st-progress); box-shadow: 0 0 0 3px var(--accent-soft); }
.status--packed .dot { background: var(--st-packed); box-shadow: 0 0 0 3px var(--accent-2-soft); }
.status--transit .dot { background: var(--st-transit); }
.status--done .dot { background: var(--st-done); }

/* Zeilen-Aktion (erst bei Hover) */
.row-act {
  width: 32px; height: 32px; border-radius: var(--radius-xs);
  display: grid; place-items: center; color: var(--text-faint); font-size: 14px;
  opacity: 0; transition: opacity var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.crate-row:hover .row-act { opacity: 1; }
.row-act:hover { background: var(--n-100); color: var(--text-strong); }

/* =============================================================
   Empty State
   ============================================================= */
.empty { padding: var(--space-20) var(--space-6); text-align: center; }
.empty--flush { padding: var(--space-16) var(--space-6); }
.empty__icon {
  width: 60px; height: 60px; border-radius: var(--radius); margin: 0 auto var(--space-5);
  display: grid; place-items: center; font-size: 24px; color: var(--accent);
  background: var(--accent-soft);
}
.empty__title { font-size: var(--fs-md); font-weight: 500; color: var(--text-strong); }
.empty__text { font-size: var(--fs-sm); color: var(--text-muted); margin-top: var(--space-2); }

/* =============================================================
   Einstellungen (Sub-Navigation + Content)
   ============================================================= */
.settings {
  display: grid; grid-template-columns: 250px minmax(0, 1fr);
  gap: var(--space-8); align-items: start;
}
.subnav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: var(--space-6); }
.subnav__item {
  display: flex; align-items: center; gap: var(--space-3);
  padding: 11px var(--space-4); border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: var(--fs-sm); font-weight: 500;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.subnav__item i:first-child { width: 18px; text-align: center; font-size: 14px; color: var(--text-faint); transition: color var(--dur-fast) var(--ease); }
.subnav__chev { margin-left: auto; font-size: 11px; color: var(--text-faint); opacity: 0; transition: opacity var(--dur-fast) var(--ease); }
.subnav__item:hover { background: var(--surface); color: var(--text-strong); }
.subnav__item:hover i:first-child { color: var(--text); }
.subnav__item:hover .subnav__chev { opacity: 1; }
.subnav__item.is-active { background: var(--surface); color: var(--text-strong); box-shadow: var(--shadow-sm); }
.subnav__item.is-active i:first-child { color: var(--accent); }
.subnav__item.is-active .subnav__chev { opacity: 1; color: var(--accent); }

.settings__content {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden;
}
.settings__head { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-6); border-bottom: 1px solid var(--hairline); }
.settings__head-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm); flex-shrink: 0;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 17px;
}
.settings__title { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; font-size: var(--fs-md); color: var(--text-strong); }
.settings__desc { font-size: var(--fs-sm); color: var(--text-muted); margin-top: 2px; }

@media (max-width: 820px) {
  .settings { grid-template-columns: 1fr; gap: var(--space-5); }
  .subnav { position: static; }
}

/* =============================================================
   Mobile
   ============================================================= */
.sidebar-toggle { display: none; }
.scrim { display: none; }

@media (max-width: 1080px) {
  .crate-cols { grid-template-columns: minmax(220px, 2fr) 1fr 1.2fr 44px; }
  .crate-cols .col.hide-md, .crate-row .cell.hide-md { display: none; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(calc(-100% - var(--sidebar-gap) - 8px)); }
  .sidebar.is-open { transform: translateX(0); }
  .content { margin-left: 0; }
  .sidebar-toggle {
    display: grid; place-items: center; width: 42px; height: 42px; border-radius: var(--radius-sm);
    background: var(--surface); border: 1px solid var(--hairline-strong); color: var(--text-strong);
  }
  .scrim.is-visible { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(13,13,15,0.4); backdrop-filter: blur(3px); }
  .search { min-width: 0; flex: 1; }
}
@media (max-width: 620px) {
  .crate-cols { grid-template-columns: 1fr 44px; gap: var(--space-4); padding: var(--space-4); }
  .crate-cols .col.hide-sm, .crate-row .cell.hide-sm { display: none; }
  .page-title { font-size: var(--fs-xl); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* =============================================================
   Status-Dots (Board + Dropdown)
   ============================================================= */
.board-col__dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.board-col__dot--backlog      { background: var(--n-400); }
.board-col__dot--todo         { background: var(--accent); }
.board-col__dot--verification { background: var(--amber); }
.board-col__dot--done         { background: var(--accent-2); }

/* =============================================================
   Ideas & Tasks – Board (dev-only)
   ============================================================= */
.dev-flag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-xs); font-weight: 500; color: var(--amber);
  background: var(--amber-soft); padding: 3px 10px; border-radius: var(--radius-pill);
}
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-5); align-items: start; }
.board-col { display: flex; flex-direction: column; gap: var(--space-3); }
.board-col__head { display: flex; align-items: center; gap: var(--space-3); padding: 0 var(--space-1) var(--space-1); }
.board-col__label { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; font-size: 12px; color: var(--text-strong); }
.board-col__count { margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); background: var(--n-100); padding: 1px 9px; border-radius: var(--radius-pill); }
.board-col__list { display: flex; flex-direction: column; gap: var(--space-3); min-height: 24px; }
.board-col__empty {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-2);
  padding: var(--space-8) var(--space-4); color: var(--text-faint); font-size: var(--fs-sm);
  border: 1px dashed var(--hairline-strong); border-radius: var(--radius); text-align: center;
}
.board-col__empty i { font-size: 20px; opacity: 0.7; }
.board-col__add {
  display: flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: 10px; border-radius: var(--radius-sm); color: var(--text-faint); font-size: var(--fs-sm);
  border: 1px solid transparent; transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.board-col__add:hover { background: var(--surface); color: var(--text); }

.task-card {
  display: flex; flex-direction: column; gap: var(--space-2); width: 100%; text-align: left;
  padding: var(--space-4); background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius); box-shadow: var(--shadow-xs);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.task-card:hover { border-color: var(--hairline-strong); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.task-card__title { font-size: var(--fs-sm); font-weight: 500; color: var(--text-strong); line-height: 1.4; }
.task-card__desc {
  font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.task-card__foot { display: flex; align-items: center; }
.task-card__id { font-size: 11px; color: var(--text-faint); }

.board-note {
  margin-top: var(--space-5); padding: var(--space-4) var(--space-5); border-radius: var(--radius);
  background: var(--danger-soft); color: var(--danger); font-size: var(--fs-sm);
  border: 1px solid transparent;
}

/* =============================================================
   Drawer (rechts einschiebendes Panel)
   ============================================================= */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 80; background: rgba(13, 13, 15, 0.42);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity var(--dur) var(--ease);
}
.drawer-overlay.is-open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 81;
  width: min(460px, 94vw); display: flex; flex-direction: column;
  background: var(--surface); border-left: 1px solid var(--hairline); box-shadow: var(--shadow-lg);
  transform: translateX(100%); transition: transform var(--dur-slow) var(--ease-out);
}
.drawer.is-open { transform: translateX(0); }
.drawer__head { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-5) var(--space-6); border-bottom: 1px solid var(--hairline); }
.drawer__title { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; font-size: var(--fs-md); color: var(--text-strong); }
.drawer__head .icon-btn { margin-left: auto; }
.drawer__body { flex: 1; overflow-y: auto; padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-6); }
.drawer__foot { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-5) var(--space-6); border-top: 1px solid var(--hairline); }
.drawer__foot-right { margin-left: auto; display: flex; gap: var(--space-3); }
.icon-btn--plain { background: transparent; border-color: transparent; }
.icon-btn--plain:hover { background: var(--surface-hover); }

/* =============================================================
   Formular-Controls (Drawer + Settings)
   ============================================================= */
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field__label { font-size: var(--fs-sm); font-weight: 500; color: var(--text-strong); }
.field__hint { font-size: var(--fs-xs); color: var(--text-faint); line-height: 1.55; }

.input-field {
  height: 44px; width: 100%; padding: 0 var(--space-4);
  background: var(--surface); border: 1px solid var(--hairline-strong); border-radius: var(--radius-sm);
  font-size: var(--fs-sm); transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.input-field:focus { outline: none; border-color: var(--accent-line); box-shadow: var(--ring); }
.input-field::placeholder { color: var(--text-faint); }
.input-field.has-error { border-color: var(--danger); box-shadow: 0 0 0 3.5px var(--danger-soft); }

.input-text {
  display: flex; align-items: center; gap: var(--space-3); height: 44px; padding: 0 var(--space-3) 0 var(--space-4);
  background: var(--surface); border: 1px solid var(--hairline-strong); border-radius: var(--radius-sm);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.input-text:focus-within { border-color: var(--accent-line); box-shadow: var(--ring); }
.input-text > i { color: var(--text-faint); font-size: 14px; }
.input-text input { flex: 1; min-width: 0; border: none; outline: none; background: none; font-size: var(--fs-sm); }
.input-text input::placeholder { color: var(--text-faint); }
.input-affix-btn { color: var(--text-faint); font-size: 14px; padding: 6px; border-radius: var(--radius-xs); }
.input-affix-btn:hover { color: var(--text); }
.input-text .eye-hide { display: none; }
.input-text.is-revealed .eye-show { display: none; }
.input-text.is-revealed .eye-hide { display: inline-block; }

.textarea {
  padding: var(--space-3) var(--space-4); background: var(--surface);
  border: 1px solid var(--hairline-strong); border-radius: var(--radius-sm);
  font-family: var(--font-sans); font-size: var(--fs-sm); line-height: 1.6; resize: vertical; min-height: 130px; width: 100%;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.textarea:focus { outline: none; border-color: var(--accent-line); box-shadow: var(--ring); }
.textarea::placeholder { color: var(--text-faint); }

/* Block-Dropdown (volle Breite, z.B. im Drawer) */
.dropdown--block { display: block; }
.dropdown--block .dropdown__toggle { width: 100%; }
.dropdown--block .dropdown__menu { width: 100%; }

/* Switch / Toggle */
.switch { position: relative; display: inline-flex; flex-shrink: 0; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch__track { position: relative; display: block; width: 44px; height: 26px; border-radius: 99px; background: var(--n-200); transition: background var(--dur) var(--ease); }
.switch__knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform var(--dur) var(--ease-out); }
.switch input:checked + .switch__track { background: var(--accent); }
.switch input:checked + .switch__track .switch__knob { transform: translateX(18px); }
.switch input:focus-visible + .switch__track { box-shadow: var(--ring); }

/* Danger-Ghost-Button */
.btn--danger-ghost { background: transparent; color: var(--danger); }
.btn--danger-ghost:hover { background: var(--danger-soft); }

/* =============================================================
   Settings-Formular (KI etc.)
   ============================================================= */
.settings__body { padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-7); }
.set-master {
  display: flex; align-items: center; gap: var(--space-6);
  padding: var(--space-5); border: 1px solid var(--hairline); border-radius: var(--radius); background: var(--surface-2);
}
.set-master__text { flex: 1; }
.set-master__title { font-size: var(--fs-base); font-weight: 500; color: var(--text-strong); }
.set-master__desc { font-size: var(--fs-sm); color: var(--text-muted); margin-top: var(--space-1); line-height: 1.55; max-width: 62ch; }

.set-dependent { display: flex; flex-direction: column; gap: var(--space-7); transition: opacity var(--dur) var(--ease); }
.set-dependent.is-disabled { opacity: 0.4; pointer-events: none; }

.set-section__title { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.1em; font-size: 11px; font-weight: 600; color: var(--text-faint); margin-bottom: var(--space-3); }
.set-card { border: 1px solid var(--hairline); border-radius: var(--radius); padding: var(--space-5); background: var(--surface); }
.set-list { display: flex; flex-direction: column; }
.set-row { display: flex; align-items: center; gap: var(--space-5); padding: var(--space-5) 0; }
.set-row + .set-row { border-top: 1px solid var(--hairline); }
.set-row:first-child { padding-top: 0; }
.set-row:last-child { padding-bottom: 0; }
.set-row__main { display: flex; align-items: flex-start; gap: var(--space-4); flex: 1; }
.set-row__icon { width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 16px; flex-shrink: 0; }
.set-row__label { font-size: var(--fs-sm); font-weight: 500; color: var(--text-strong); }
.set-row__desc { font-size: var(--fs-sm); color: var(--text-muted); margin-top: 3px; line-height: 1.55; max-width: 58ch; }

/* Board / Drawer responsive */
@media (max-width: 1100px) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .board { grid-template-columns: 1fr; } .drawer { width: 100vw; } .set-master { flex-wrap: wrap; } }
