@import url('/fonts/inter/wght.css');
@import url('/fonts/mono/wght.css');
@import url('/fonts/serif/latin.css');
@import url('/fonts/serif/latin-italic.css');
@import url('/fonts/serif/latin-ext.css');
@import url('/fonts/jakarta/wght.css');

/* =========================================================
   EDITORIAL INSTRUMENT
   Tiefschwarz · haarfeine Linien · Filmkorn · eine Signalfarbe
   Serif für Aussagen, Sans für Bedienung, Mono für Daten
   ========================================================= */
:root {
  --bg: #090909;
  --bg-2: #0d0d0d;
  --tile: #101010;
  --tile-2: #151515;
  --tile-3: #1c1c1c;
  --hover: rgba(255, 255, 255, .045);
  --line: rgba(255, 255, 255, .075);
  --line-2: rgba(255, 255, 255, .13);
  --line-3: rgba(255, 255, 255, .22);
  --text: #f1f0ec;
  --text-2: #c4c3be;
  --muted: #8a8984;
  --dim: #5c5b57;
  --signal: #d2f66b;          /* Elektro-Limette – Flächen */
  --signal-text: #d2f66b;     /* Limette – Text */
  --signal-ink: #0b0b0b;
  --signal-soft: rgba(210, 246, 107, .1);
  --signal-glow: rgba(210, 246, 107, .16);
  --danger: #ff7a6b;
  --danger-soft: rgba(255, 122, 107, .1);
  --warn: #ffc65c;
  --ok: #d2f66b;
  --glass: rgba(16, 16, 16, .72);
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 20px 40px -24px rgba(0, 0, 0, .9);
  --shadow-lg: 0 40px 100px -30px rgba(0, 0, 0, .95), 0 0 0 1px var(--line-2);
  --r: 20px;
  --r-m: 14px;
  --r-s: 10px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-in: cubic-bezier(.5, 0, .75, 0);
  --t-fast: 140ms;
  --t: 240ms;
  --t-slow: 420ms;
  --sans: 'Inter Variable', Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --mono: 'JetBrains Mono Variable', ui-monospace, SFMono-Regular, Menlo, monospace;
  --maxw: 1360px;
  color-scheme: dark;
}
:root[data-theme^="light"] {
  --bg: #f2f1ec;
  --bg-2: #ebeae4;
  --tile: #fbfaf7;
  --tile-2: #f5f4ef;
  --tile-3: #ecebe5;
  --hover: rgba(20, 20, 10, .04);
  --line: rgba(20, 20, 10, .09);
  --line-2: rgba(20, 20, 10, .15);
  --line-3: rgba(20, 20, 10, .28);
  --text: #121210;
  --text-2: #3a3a35;
  --muted: #6f6e68;
  --dim: #a3a29b;
  --signal: #c6f04f;
  --signal-text: #4a6b00;
  --signal-ink: #0b0b0b;
  --signal-soft: rgba(120, 170, 0, .1);
  --signal-glow: rgba(160, 220, 40, .25);
  --danger: #c8372a;
  --danger-soft: rgba(200, 55, 42, .08);
  --warn: #a86b00;
  --ok: #4a6b00;
  --glass: rgba(251, 250, 247, .75);
  --shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 18px 40px -26px rgba(40, 40, 20, .25);
  --shadow-lg: 0 40px 100px -30px rgba(40, 40, 20, .35), 0 0 0 1px var(--line-2);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--sans); background: var(--bg); color: var(--text);
  font-size: 14px; line-height: 1.5; letter-spacing: -.003em; -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01', 'ss03'; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
::selection { background: var(--signal); color: var(--signal-ink); }
:focus-visible { outline: 1.5px solid var(--signal-text); outline-offset: 2px; border-radius: 8px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Atmosphäre: Rasterlinien, Lichtschein, Filmkorn ---------- */
.aurora { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--bg); overflow: hidden; }
.aurora i { display: none; }
.aurora::before {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 88px 88px; background-position: center -1px;
  mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 0%, transparent 75%); opacity: .55;
}
.aurora::after {
  content: ''; position: absolute; left: 50%; top: -420px; width: 1100px; height: 640px; transform: translateX(-50%);
  background: radial-gradient(closest-side, var(--signal-glow), transparent); filter: blur(30px); opacity: .55;
}
body::after {
  content: ''; position: fixed; inset: 0; z-index: 999; pointer-events: none; opacity: .045; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme^="light"] body::after { opacity: .06; mix-blend-mode: multiply; }

/* =========================================================
   Gerüst: schwebende Leiste oben
   ========================================================= */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.dock-top {
  position: sticky; top: 12px; z-index: 60; width: min(var(--maxw), calc(100% - 32px)); margin: 12px auto 0;
  display: flex; align-items: center; gap: 14px; height: 58px; padding: 0 10px 0 16px;
  background: var(--glass); border: 1px solid var(--line-2); border-radius: 18px;
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 20px 50px -30px rgba(0, 0, 0, .8);
}
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand .logo { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--signal); color: var(--signal-ink); }
.brand b { font-family: var(--serif); font-weight: 400; font-size: 22px; letter-spacing: -.01em; line-height: 1; }
.brand b i { color: var(--muted); }
.brand small { display: none; }

.nav { position: relative; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 13px; background: var(--hover); border: 1px solid var(--line); margin: 0 auto; }
.nav a {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 13px; border-radius: 9px;
  color: var(--muted); font-weight: 500; font-size: 13.5px; white-space: nowrap; transition: color var(--t-fast);
}
.nav a svg { transition: color var(--t-fast); }
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--text); }
.nav a.active svg { color: var(--signal-text); }
.nav-ind {
  position: absolute; left: 0; top: 4px; height: 34px; width: 0; border-radius: 9px; background: var(--tile-3);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 4px 14px -6px rgba(0, 0, 0, .6); border: 1px solid var(--line-2);
  transition: transform var(--t-slow) var(--ease), width var(--t-slow) var(--ease), opacity var(--t); opacity: 0; pointer-events: none; z-index: 0;
}
:root[data-theme^="light"] .nav-ind { background: var(--tile); }
.top-right { display: flex; align-items: center; gap: 8px; flex: none; }
.searchbtn {
  display: inline-flex; align-items: center; gap: 10px; height: 38px; padding: 0 8px 0 12px; border-radius: 11px; min-width: 210px;
  border: 1px solid var(--line-2); background: var(--bg-2); color: var(--muted); cursor: pointer; transition: border-color var(--t-fast), color var(--t-fast);
}
.searchbtn:hover { border-color: var(--line-3); color: var(--text-2); }
.searchbtn > span:not(.kbd) { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.kbd { font-family: var(--mono); font-size: 10.5px; line-height: 1; padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--muted); background: var(--tile-2); flex: none; }
.avatar-btn { width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--tile-2); display: grid; place-items: center; cursor: pointer;
  font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--text-2); transition: border-color var(--t-fast); }
.avatar-btn:hover { border-color: var(--line-3); }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; padding: 6px; border-radius: 14px; background: var(--tile); border: 1px solid var(--line-2);
  box-shadow: var(--shadow-lg); transform-origin: top right; animation: menu-in var(--t) var(--ease) both; z-index: 70; }
@keyframes menu-in { from { opacity: 0; transform: scale(.96) translateY(-4px); } }
.menu .who { padding: 10px 10px 8px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu .who b { display: block; font-weight: 600; }
.menu .who small { color: var(--muted); font-size: 12px; }
.menu button, .menu a { display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px; border: 0; background: none; border-radius: 9px; cursor: pointer; color: var(--text-2); font-size: 13.5px; text-align: left; }
.menu button:hover, .menu a:hover { background: var(--hover); color: var(--text); }
.menu .sep { height: 1px; background: var(--line); margin: 6px 4px; }

.main { width: min(var(--maxw), calc(100% - 32px)); margin: 0 auto; padding: 40px 0 80px; min-width: 0; flex: 1; }
.sidebar, .topbar, .tb-space, .user-chip { display: none; }

/* =========================================================
   Bewegung
   ========================================================= */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(-6px) scale(.985); } }
#view { animation: rise var(--t-slow) var(--ease) both; }
.stagger > * { animation: rise var(--t-slow) var(--ease) both; animation-delay: calc(min(var(--i, 0), 10) * 35ms); }

/* View Transitions: Seitenwechsel blendet über, Titel/Badges fliegen an ihren neuen Platz */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 160ms var(--ease-in) both vt-out; }
::view-transition-new(root) { animation: 360ms var(--ease) both vt-in; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-4px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }
::view-transition-group(*) { animation-duration: 420ms; animation-timing-function: var(--ease); }
::view-transition-group(dock) { animation: none; }
.vt-active #view { animation: none; }

/* =========================================================
   Typografie
   ========================================================= */
h1, h2, h3 { margin: 0; line-height: 1.15; }
h1 { font-family: var(--serif); font-weight: var(--display-w, 400); letter-spacing: var(--display-ls, -.02em); }
h1 em, .serif em { font-style: var(--em-style, italic); color: var(--signal-text); }
.serif { font-family: var(--serif); font-weight: 400; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.eyebrow::before { content: ''; width: 6px; height: 6px; background: var(--signal); border-radius: 1px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 32px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(40px, 5vw, 60px); margin-top: 12px; }
.page-head p { margin: 10px 0 0; color: var(--muted); max-width: 620px; font-size: 14.5px; }
.grad { color: var(--signal-text); }
.muted { color: var(--muted); } .dim { color: var(--dim); } .small { font-size: 12.5px; } .mono { font-family: var(--mono); }
code { font-family: var(--mono); font-size: .9em; }

/* =========================================================
   Bausteine
   ========================================================= */
.panel { display: block; position: relative; background: linear-gradient(180deg, var(--tile-2), var(--tile)); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.panel.pad { padding: 22px; }
.panel h2 { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; letter-spacing: 0; }
.panel h2 svg { color: var(--muted); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; min-height: 28px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-2); background: transparent; font-weight: 550; font-size: 13.5px; white-space: nowrap; color: var(--text);
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast) var(--ease);
}
.btn:hover { border-color: var(--line-3); background: var(--hover); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--signal); color: var(--signal-ink); border-color: transparent; font-weight: 600; }
.btn.primary:hover { background: var(--signal); box-shadow: 0 0 0 4px var(--signal-soft), 0 8px 30px -8px var(--signal-glow); }
.btn.ghost { border-color: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.danger:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12.5px; gap: 6px; }
.btn.icon { padding: 0; width: 38px; }
.btn.icon.sm { width: 32px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.spin { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.input, select.input, textarea.input {
  width: 100%; height: 40px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2);
  outline: none; transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
textarea.input { height: auto; padding: 12px 14px; resize: vertical; min-height: 110px; line-height: 1.6; }
.input::placeholder { color: var(--dim); }
.input:hover { border-color: var(--line-3); }
.input:focus { border-color: var(--signal-text); box-shadow: 0 0 0 4px var(--signal-soft); }
select.input { appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8984' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; }
input[type="color"].input { padding: 4px; cursor: pointer; }
input[type="checkbox"] { accent-color: var(--signal); width: 15px; height: 15px; }
label.field { display: grid; gap: 7px; font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 500; }
label.field .input, label.field textarea, label.field select { font-family: var(--sans); text-transform: none; letter-spacing: -.003em; font-size: 14px; color: var(--text); }
.row-flex { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.chip { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px; border-radius: 999px; font-size: 12px; font-weight: 500;
  border: 1px solid var(--line-2); color: var(--text-2); white-space: nowrap; transition: border-color var(--t-fast), background var(--t-fast); }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--c, currentColor); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, currentColor) 20%, transparent); }
a.chip:hover, button.chip:hover { border-color: var(--line-3); background: var(--hover); }
.tag { font-family: var(--mono); font-size: 11px; color: var(--muted); padding: 2px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--hover); }
a.tag:hover { color: var(--text); border-color: var(--line-2); }
.badge-24, .badge-in { display: inline-block; color: #fff; font-family: var(--mono); font-size: 9.5px; font-weight: 700; line-height: 1; padding: 3px 5px; border-radius: 4px; vertical-align: 1px; letter-spacing: .02em; }
.badge-24 { background: #e0583f; } .badge-in { background: #3d70ad; }

/* Icon-Kacheln */
.ico, .list-row .ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none;
  color: var(--c, var(--text-2)); background: color-mix(in srgb, var(--c, var(--text)) 11%, transparent); border: 1px solid color-mix(in srgb, var(--c, var(--text)) 18%, transparent); }

/* =========================================================
   Startseite: Bento
   ========================================================= */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.b-hero { grid-column: span 8; padding: 34px 36px 32px; overflow: hidden; }
.b-clock { grid-column: span 4; padding: 26px 26px 22px; display: flex; flex-direction: column; }
.b-stat { grid-column: span 3; }
.b-quick { grid-column: span 5; grid-row: span 2; display: flex; flex-direction: column; }
.b-recent { grid-column: span 7; }
.b-cats { grid-column: span 7; }
.b-pinned { grid-column: span 12; }
.b-hero h1 { font-size: clamp(48px, 6.2vw, 88px); line-height: .98; margin: 18px 0 14px; }
.b-hero p { color: var(--muted); max-width: 520px; margin: 0 0 26px; font-size: 15px; }
.b-hero::after { content: ''; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(closest-side, var(--signal-glow), transparent); pointer-events: none; }
.hero-search { position: relative; max-width: 620px; }
.hero-search > svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.hero-search .input { height: 56px; padding-left: 50px; padding-right: 90px; font-size: 16px; border-radius: 16px; background: var(--bg-2); cursor: text; }
.hero-search .kbd { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); }
.clock { font-family: var(--serif); font-size: 64px; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin: 14px 0 4px; }
.clock .sec { color: var(--dim); font-size: 30px; margin-left: 4px; }
.clock-date { color: var(--muted); font-size: 13px; }
.ho-mini { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.ho-mini .meta { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; color: var(--muted); }
.ho-mini .meta b { font-family: var(--serif); font-weight: 400; font-size: 20px; color: var(--text); }
.stat { padding: 20px 22px 18px; display: flex; flex-direction: column; gap: 14px; min-width: 0; overflow: hidden; }
.stat .top { display: flex; justify-content: space-between; align-items: center; }
.stat .l { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.stat .ic { color: var(--dim); display: inline-flex; }
.stat .n { font-family: var(--serif); font-size: 56px; line-height: .9; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat .bar { height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.stat .bar i { display: block; height: 100%; background: var(--signal); border-radius: 3px; transform-origin: left; animation: grow-x 1s var(--ease) both; animation-delay: .15s; }
@keyframes grow-x { from { transform: scaleX(0); } }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-content: start; min-width: 0; }

/* Listen */
.list-row { display: flex; align-items: center; gap: 14px; padding: 10px 12px; margin: 0 -12px; border-radius: 12px; cursor: pointer; transition: background var(--t-fast); min-width: 0; }
.list-row + .list-row { box-shadow: 0 -1px 0 var(--line); }
.list-row:hover, .list-row:hover + .list-row { box-shadow: none; }
.list-row:hover { background: var(--hover); }
.list-row .t { flex: 1; min-width: 0; }
.list-row .t b { display: block; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .t small { color: var(--muted); font-size: 12px; }
.list-row > svg:last-child { color: var(--dim); flex: none; transition: transform var(--t) var(--ease), color var(--t-fast); }
.list-row:hover > svg:last-child { transform: translateX(3px); color: var(--text); }

/* Schnellwahl */
.numlist { flex: 1; max-height: 560px; overflow-y: auto; overflow-x: hidden; margin: 0 -12px; padding: 0 12px; overscroll-behavior: contain; }
.numrow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 0 -12px; border-radius: 12px; transition: background var(--t-fast); min-width: 0; }
.numrow + .numrow { box-shadow: 0 -1px 0 var(--line); }
.numrow.copy { cursor: pointer; }
.numrow:hover { background: var(--hover); box-shadow: none; }
.numrow:hover + .numrow { box-shadow: none; }
.numrow .t { flex: 1; min-width: 0; }
.numrow .t b { font-weight: 550; }
.numrow .t small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.numrow .num { font-family: var(--mono); font-weight: 500; font-size: 13px; color: var(--text); white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; transition: color var(--t); font-variant-numeric: tabular-nums; }
.numrow .num .ci { color: var(--dim); opacity: 0; transform: translateX(-4px); transition: opacity var(--t-fast), transform var(--t) var(--ease); display: inline-flex; }
.numrow:hover .num .ci { opacity: 1; transform: none; }
.is-copied, .is-copied .num { color: var(--signal-text) !important; }
.is-copied .ci { opacity: 1 !important; transform: none !important; color: var(--signal-text) !important; }

/* Eintrags-Karten */
.ecard { display: flex; flex-direction: column; gap: 10px; padding: 20px; cursor: pointer; min-width: 0; overflow: hidden;
  transition: border-color var(--t), transform var(--t) var(--ease), box-shadow var(--t); }
.ecard::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity var(--t);
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), var(--hover), transparent 60%); }
.ecard:hover { border-color: var(--line-2); transform: translateY(-2px); }
.ecard:hover::before { opacity: 1; }
.ecard h3 { font-family: var(--serif); font-weight: 400; font-size: 23px; line-height: 1.15; letter-spacing: -.01em; }
.ecard .sum, .snip { color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ecard .meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: auto; padding-top: 6px; }
.ecard .pin { color: var(--signal-text); display: inline-flex; }
.ecard .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ecard .top .small { font-family: var(--mono); font-size: 11px; letter-spacing: .02em; }
mark { background: var(--signal); color: var(--signal-ink); border-radius: 3px; padding: 0 2px; }

.filters { display: grid; grid-template-columns: minmax(220px, 1fr) repeat(4, minmax(140px, 190px)); gap: 8px; margin-bottom: 20px; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .big { width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 14px; display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--muted); }

/* =========================================================
   Detail & Editor
   ========================================================= */
.doc { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 14px; align-items: start; }
.doc > aside { position: sticky; top: 92px; display: grid; gap: 14px; }
.doc-title { font-size: clamp(36px, 4.4vw, 56px); line-height: 1.02; margin: 14px 0 16px; }
.prose { font-size: 15.5px; line-height: 1.75; color: var(--text-2); max-width: 760px; }
.prose > :first-child { margin-top: 0; }
.prose h1, .prose h2, .prose h3 { margin: 1.5em 0 .5em; color: var(--text); }
.prose h2 { font-family: var(--serif); font-weight: 400; font-size: 28px; }
.prose h3 { font-size: 16px; font-weight: 600; }
.prose p { margin: .75em 0; }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--signal-text); text-decoration: underline; text-underline-offset: 3px; }
.prose code { background: var(--hover); padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line); }
.prose pre { background: var(--bg-2); padding: 16px; border-radius: 12px; overflow: auto; border: 1px solid var(--line); }
.prose pre code { border: 0; padding: 0; background: none; }
.prose blockquote { margin: 1.2em 0; padding: 4px 0 4px 18px; border-left: 2px solid var(--signal); color: var(--text); font-family: var(--serif); font-size: 21px; line-height: 1.4; }
.prose table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.prose th, .prose td { border-bottom: 1px solid var(--line-2); padding: 9px 10px; text-align: left; }
.prose th { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 500; }
.prose img { max-width: 100%; border-radius: 12px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li::marker { color: var(--signal-text); }
.side-box { padding: 18px; display: grid; gap: 14px; }
.side-box h4 { margin: 0; font-family: var(--mono); font-size: 10.5px; font-weight: 500; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.extract-item { display: flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 12.5px; padding: 8px 10px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); cursor: pointer; transition: border-color var(--t-fast), color var(--t); word-break: break-all; }
.extract-item:hover { border-color: var(--line-3); }
.editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.editor-grid textarea { min-height: 480px; font-family: var(--mono); font-size: 13px; }
.preview-pane { padding: 20px 22px; min-height: 480px; overflow: auto; max-height: 72vh; }
.file-frame { display: block; width: 100%; height: 75vh; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.filetext { white-space: pre-wrap; font-family: var(--mono); font-size: 12px; max-height: 60vh; overflow: auto; color: var(--muted); padding: 16px; background: var(--bg-2); border-radius: 12px; border: 1px solid var(--line); }
.tabs { position: relative; display: inline-flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--bg-2); border: 1px solid var(--line); }
.tabs button { height: 30px; padding: 0 12px; border-radius: 8px; border: 0; background: none; cursor: pointer; color: var(--muted); font-weight: 550; font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; transition: background var(--t), color var(--t-fast); }
.tabs button:hover { color: var(--text); }
.tabs button.on { background: var(--tile-3); color: var(--text); box-shadow: 0 1px 0 rgba(255,255,255,.05) inset; }
:root[data-theme^="light"] .tabs button.on { background: var(--tile); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.ai-pill { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; font-weight: 500; padding: 4px 9px; border-radius: 999px; background: var(--signal-soft); color: var(--signal-text); }
.note-box { padding: 16px 18px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.conf { height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: 6px; }
.conf i { display: block; height: 100%; background: var(--signal); transition: width var(--t-slow) var(--ease); }

/* =========================================================
   Upload
   ========================================================= */
.upload-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 14px; align-items: start; }
.drop {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; cursor: pointer;
  min-height: 300px; padding: 40px 24px; border-radius: var(--r); background: var(--tile); border: 1px solid var(--line); overflow: hidden;
  transition: border-color var(--t), background var(--t);
}
/* Laufende Strichlinie als Rahmen – zeigt „Ablagefläche“ */
.drop::before { content: ''; position: absolute; inset: 10px; border-radius: 14px; pointer-events: none;
  background: linear-gradient(90deg, var(--line-3) 50%, transparent 0) top / 14px 1px repeat-x, linear-gradient(90deg, var(--line-3) 50%, transparent 0) bottom / 14px 1px repeat-x,
    linear-gradient(0deg, var(--line-3) 50%, transparent 0) left / 1px 14px repeat-y, linear-gradient(0deg, var(--line-3) 50%, transparent 0) right / 1px 14px repeat-y; }
.drop.over::before { animation: march .6s linear infinite;
  background: linear-gradient(90deg, var(--signal) 50%, transparent 0) top / 14px 1px repeat-x, linear-gradient(90deg, var(--signal) 50%, transparent 0) bottom / 14px 1px repeat-x,
    linear-gradient(0deg, var(--signal) 50%, transparent 0) left / 1px 14px repeat-y, linear-gradient(0deg, var(--signal) 50%, transparent 0) right / 1px 14px repeat-y; }
@keyframes march { to { background-position: 14px 0, -14px 100%, 0 -14px, 100% 14px; } }
.drop:hover { border-color: var(--line-2); }
.drop.over { background: var(--signal-soft); }
.drop .big { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; color: var(--signal-ink); background: var(--signal); margin-bottom: 10px; transition: transform var(--t-slow) var(--ease); }
.drop.over .big { transform: translateY(-6px) scale(1.04); }
.drop h2 { font-family: var(--serif); font-weight: 400; font-size: 34px; letter-spacing: -.01em; }
.drop p { margin: 0; color: var(--muted); font-size: 13.5px; }
.drop .types { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 16px; }
.drop input { display: none; }
.queue-head { display: flex; justify-content: space-between; align-items: center; margin: 28px 0 12px; }
.queue-head h2 { font-family: var(--mono); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.queue { display: grid; gap: 10px; }
.upl-item { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 16px 18px; animation: pop-in var(--t-slow) var(--ease) both; border-radius: var(--r-m); }
.upl-item .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: var(--muted); border: 1px solid var(--line-2); transition: all var(--t); }
.upl-item.done .ic { background: var(--signal); color: var(--signal-ink); border-color: transparent; }
.upl-item.err .ic { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.upl-item .body { min-width: 0; }
.upl-item .name { font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.upl-item .sub { color: var(--muted); font-size: 12px; font-family: var(--mono); }
.upl-item .sub.err { color: var(--danger); }
.progress { height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: 10px; }
.progress i { display: block; height: 100%; width: 0; background: var(--signal); transition: width 150ms linear; }
.progress.indet i { width: 30% !important; animation: indet 1.1s var(--ease) infinite; }
@keyframes indet { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
.steps { display: flex; gap: 16px; margin-top: 10px; font-family: var(--mono); font-size: 11px; color: var(--dim); flex-wrap: wrap; text-transform: uppercase; letter-spacing: .08em; }
.steps span { display: inline-flex; align-items: center; gap: 6px; transition: color var(--t); }
.steps span.on { color: var(--text-2); }
.steps span.ok { color: var(--signal-text); }
.result-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.result-row select.input { width: auto; max-width: 220px; height: 32px; font-size: 12.5px; padding-left: 12px; border-radius: 999px; }
.how { padding: 22px; display: grid; gap: 16px; }
.how ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 16px; counter-reset: s; }
.how li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; font-size: 13px; color: var(--muted); counter-increment: s; }
.how li::before { content: '0' counter(s); font-family: var(--serif); font-size: 26px; line-height: 1; color: var(--signal-text); }
.how li b { color: var(--text); font-weight: 550; display: block; margin-bottom: 2px; }

/* =========================================================
   Mandanten
   ========================================================= */
.mcard { padding: 16px 18px; display: flex; align-items: center; gap: 14px; cursor: pointer; transition: border-color var(--t), transform var(--t) var(--ease); min-width: 0; border-radius: var(--r-m); }
.mcard:hover { border-color: var(--line-2); transform: translateY(-2px); }
.mono-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-family: var(--mono); font-weight: 600; font-size: 12.5px; flex: none;
  color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); border: 1px solid color-mix(in srgb, var(--c) 25%, transparent); }
.mono-ic.lg { width: 68px; height: 68px; border-radius: 18px; font-size: 19px; }
.mcard .t { flex: 1; min-width: 0; }
.mcard .t b { display: block; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mcard .t small { color: var(--muted); font-size: 12px; font-family: var(--mono); }
.mcard > svg { color: var(--dim); flex: none; transition: transform var(--t) var(--ease); }
.mcard:hover > svg { transform: translateX(3px); color: var(--text); }
.group-title { display: flex; align-items: center; gap: 12px; margin: 34px 0 14px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.group-title::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.group-title:first-of-type { margin-top: 0; }
.m-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 30px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.m-head h1 { font-size: clamp(38px, 5vw, 60px); }

/* =========================================================
   Rufnummern-Editor
   ========================================================= */
.ho-wrap { display: grid; grid-template-columns: minmax(360px, 440px) minmax(0, 1fr); gap: 14px; align-items: start; }
.ho-editor { max-height: calc(100vh - 120px); overflow-y: auto; overflow-x: hidden; padding: 18px; position: sticky; top: 92px; }
.ho-preview { position: sticky; top: 92px; padding: 18px; min-width: 0; }
.ho-stage { position: relative; width: 100%; aspect-ratio: 297 / 210; border-radius: 8px; overflow: hidden; background: #fff;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9), 0 0 0 1px var(--line-2); }
.ho-stage iframe { position: absolute; left: 0; top: 0; width: 1123px; height: 794px; border: 0; transform-origin: top left; background: #fff; }
.ho-toolbar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.ho-toolbar .grow { flex: 1; }
.ho-toolbar b { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.save-state { font-family: var(--mono); font-size: 11px; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: .08em; }
.save-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--signal-soft); transition: background var(--t); }
.save-state.dirty i { background: var(--warn); box-shadow: 0 0 0 3px rgba(255, 198, 92, .15); animation: blink 1s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }
.colhead { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 8px; font-family: var(--mono); font-size: 10.5px; font-weight: 500; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.ho-col { display: grid; gap: 6px; min-height: 46px; padding: 3px; margin: 0 -3px; border-radius: 14px; border: 1px dashed transparent; transition: border-color var(--t-fast); }
.ho-col:empty { border-color: var(--line-2); }
.ho-col:empty::after { content: 'Karte hierher ziehen'; display: grid; place-items: center; height: 40px; font-size: 12px; color: var(--dim); }
.hcard { border: 1px solid var(--line); border-radius: 13px; background: var(--bg-2); transition: border-color var(--t); }
.hcard.open { border-color: var(--line-2); }
.hcard-head { display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 12px 0 4px; cursor: pointer; user-select: none; }
.hcard-head b { flex: 1; font-size: 13.5px; font-weight: 550; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hcard-head .cnt { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.hcard-head .chev { display: inline-flex; transition: transform var(--t) var(--ease); color: var(--dim); }
.hcard.open .chev { transform: rotate(90deg); color: var(--signal-text); }
.handle { cursor: grab; color: var(--dim); width: 26px; height: 30px; display: grid; place-items: center; border-radius: 8px; flex: none; touch-action: none; }
.handle:hover { color: var(--text); background: var(--hover); }
.handle:active { cursor: grabbing; }
.hcard-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--t-slow) var(--ease); }
.hcard.open .hcard-body { grid-template-rows: 1fr; }
.hcard-body > div { overflow: hidden; min-height: 0; }
.hcard-inner { padding: 12px; display: grid; gap: 8px; border-top: 1px solid var(--line); opacity: 0; transform: translateY(-4px); transition: opacity var(--t) var(--ease), transform var(--t) var(--ease); }
.hcard.open .hcard-inner { opacity: 1; transform: none; transition-delay: 80ms; }
.erow { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 4px; padding: 8px 8px 8px 4px; border-radius: 11px; background: var(--tile); border: 1px solid var(--line); transition: border-color var(--t-fast); }
.erow:focus-within { border-color: var(--signal-text); box-shadow: 0 0 0 3px var(--signal-soft); }
.erow.leaving { animation: row-out 200ms var(--ease-in) forwards; }
@keyframes row-out { to { opacity: 0; transform: translateX(12px) scale(.98); } }
.erow.entering, .hcard.entering { animation: pop-in var(--t-slow) var(--ease) both; }
.erow .f { display: grid; gap: 6px; min-width: 0; }
.l2 { display: grid; grid-template-columns: minmax(0, 1fr) 140px; gap: 6px; }
.erow .input, .hcard-inner .input { height: 34px; padding: 0 10px; font-size: 13px; border-radius: 9px; }
.erow textarea.input { height: auto; min-height: 58px; padding: 8px 10px; }
.erow .input.num { font-family: var(--mono); font-weight: 500; }
.erow .tools { display: flex; gap: 4px; align-items: center; }
.tg { height: 22px; font-family: var(--mono); font-size: 10px; font-weight: 600; padding: 0 7px; border-radius: 6px; border: 1px solid var(--line-2); background: none; cursor: pointer; color: var(--muted); transition: all var(--t-fast); }
.tg:hover { border-color: var(--line-3); color: var(--text); }
.tg.on.t24 { background: #e0583f; border-color: #e0583f; color: #fff; }
.tg.on.tin { background: #3d70ad; border-color: #3d70ad; color: #fff; }
.erow .kind { font-family: var(--mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); margin-left: auto; margin-right: 2px; }
.sortable-ghost { opacity: .35; }
.sortable-chosen { border-color: var(--signal-text) !important; }
.sortable-drag { box-shadow: var(--shadow-lg); }
.flash { animation: flash 1.4s var(--ease); }
@keyframes flash { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 15%, 55% { box-shadow: 0 0 0 2px var(--signal); } }
.ttable { width: 100%; border-collapse: separate; border-spacing: 0 6px; font-size: 13px; }
.ttable td { padding: 0 3px; }
.ttable .input { height: 34px; padding: 0 9px; font-size: 12.5px; border-radius: 9px; }
.scale-note { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 14px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; letter-spacing: .02em; }
.scale-note span { display: inline-flex; align-items: center; gap: 6px; }
.scale-note .warn { color: var(--warn); }

/* =========================================================
   Palette, Dialoge, Meldungen
   ========================================================= */
.palette-bg { position: fixed; inset: 0; z-index: 100; background: rgba(4, 4, 4, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; justify-content: center; align-items: flex-start; padding: 13vh 16px 16px; animation: fade-in var(--t) both; }
:root[data-theme^="light"] .palette-bg, :root[data-theme^="light"] .modal-bg { background: rgba(240, 240, 230, .55); }
.palette { width: min(680px, 100%); background: var(--tile); border: 1px solid var(--line-2); border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden; animation: pop-in var(--t) var(--ease) both; }
.palette .in { display: flex; align-items: center; gap: 14px; padding: 0 20px; height: 64px; border-bottom: 1px solid var(--line); color: var(--muted); }
.palette .in input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 18px; color: var(--text); }
.palette .res { max-height: 56vh; overflow: auto; padding: 8px; }
.palette .sec { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--dim); padding: 12px 12px 6px; }
.palette .it { position: relative; display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 12px; cursor: pointer; min-width: 0; transition: background var(--t-fast); }
.palette .it .ic { color: var(--muted); display: inline-flex; flex: none; }
.palette .it.sel { background: var(--hover); }
.palette .it.sel::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px; border-radius: 2px; background: var(--signal); }
.palette .it.sel .ic { color: var(--signal-text); }
.palette .it .t { flex: 1; min-width: 0; }
.palette .it .t b { display: block; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette .it .t small { color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.palette .it .val { font-family: var(--mono); font-weight: 500; font-size: 13px; white-space: nowrap; flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; }
.palette .foot { display: flex; gap: 16px; padding: 11px 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--dim); }

.modal-bg { position: fixed; inset: 0; z-index: 110; background: rgba(4, 4, 4, .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; animation: fade-in var(--t) both; }
.modal-bg.closing { animation: fade-in 140ms reverse both; }
.modal { width: min(520px, 100%); max-height: 90vh; overflow: auto; padding: 26px; background: var(--tile); border: 1px solid var(--line-2); border-radius: 22px; box-shadow: var(--shadow-lg); animation: pop-in var(--t) var(--ease) both; }
.modal h2 { font-family: var(--serif); font-weight: 400; font-size: 30px; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; letter-spacing: -.01em; }
.modal p { margin: 0; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; justify-items: center; }
.toast { display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 12px; border-radius: 999px; background: var(--text); color: var(--bg); box-shadow: var(--shadow-lg); max-width: min(440px, calc(100vw - 32px)); animation: toast-in var(--t-slow) var(--ease) both; font-size: 13.5px; font-weight: 500; }
.toast.out { animation: toast-out 180ms var(--ease-in) both; }
.toast .ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--signal); color: var(--signal-ink); flex: none; }
.toast .ic svg { width: 13px; height: 13px; }
.toast.err .ic { background: var(--danger); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px) scale(.98); } }

.skel { border-radius: var(--r); background: linear-gradient(90deg, var(--tile) 25%, var(--tile-2) 50%, var(--tile) 75%); background-size: 200% 100%; animation: skel 1.4s linear infinite; border: 1px solid var(--line); }
@keyframes skel { to { background-position: -200% 0; } }

/* =========================================================
   Login
   ========================================================= */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth-card { width: min(420px, 100%); padding: 38px 32px 30px; animation: rise var(--t-slow) var(--ease) both; box-shadow: var(--shadow-lg); }
.auth-card .brand { justify-content: center; }
.auth-card .brand .logo { width: 44px; height: 44px; border-radius: 13px; }
.auth-card h1 { text-align: center; font-size: 42px; margin: 22px 0 6px; }
.auth-card p.sub { text-align: center; color: var(--muted); margin: 0 0 26px; font-size: 13.5px; }
.auth-card form { display: grid; gap: 16px; }
.auth-card .btn { height: 44px; }
.auth-card .err { color: var(--danger); font-size: 13px; min-height: 18px; text-align: center; }
.auth-card .lock { display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--dim); font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; margin-top: 22px; }
.shake { animation: shake .4s var(--ease); }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.otp { letter-spacing: .45em !important; text-align: center; font-family: var(--mono) !important; font-size: 20px !important; }

/* =========================================================
   Responsiv
   ========================================================= */
.mobile-nav { display: none; }
@media (max-width: 1240px) {
  .nav a span { display: none; }
  .nav a { padding: 0 11px; }
  .ho-wrap { grid-template-columns: minmax(0, 1fr); }
  .ho-editor, .ho-preview { position: static; max-height: none; }
  .ho-preview { order: -1; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters #q { grid-column: 1 / -1; }
}
@media (max-width: 1080px) {
  .b-hero, .b-clock { grid-column: span 12; }
  .b-stat { grid-column: span 6; }
  .b-quick, .b-recent, .b-cats { grid-column: span 12; grid-row: auto; }
  .doc, .grid-2, .upload-grid { grid-template-columns: minmax(0, 1fr); }
  .doc > aside { position: static; }
}
@media (max-width: 760px) {
  .dock-top { top: 8px; margin-top: 8px; width: calc(100% - 20px); height: 54px; padding: 0 8px 0 12px; }
  .dock-top .nav, .searchbtn .kbd { display: none; }
  .searchbtn { min-width: 0; flex: 1; }
  .top-right { flex: 1; justify-content: flex-end; }
  .main { width: calc(100% - 32px); padding: 26px 0 110px; }
  .page-head { margin-bottom: 22px; padding-bottom: 18px; }
  .b-hero { padding: 26px 22px; }
  .b-hero h1 { font-size: 46px; }
  .b-stat { grid-column: span 6; }
  .stat { padding: 16px; }
  .stat .n { font-size: 40px; }
  .clock { font-size: 52px; }
  .bento { gap: 10px; }
  .hero-search .kbd { display: none; }
  .hero-search .input { padding-right: 16px; }
  .editor-grid { grid-template-columns: 1fr; }
  .editor-grid .preview-pane { display: none; }
  .mobile-nav {
    display: flex; position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom));
    gap: 2px; padding: 5px; background: var(--glass); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
    border: 1px solid var(--line-2); border-radius: 20px; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .8);
  }
  .mobile-nav a { width: 54px; display: grid; place-items: center; gap: 3px; font-size: 10px; font-weight: 500; color: var(--muted); padding: 7px 2px 6px; border-radius: 15px; transition: color var(--t-fast), background var(--t); }
  .mobile-nav a.active { color: var(--signal-ink); background: var(--signal); }
  .toasts { bottom: 96px; }
  .palette-bg { padding-top: 10px; }
  .l2 { grid-template-columns: 1fr; }
  .ho-editor, .ho-preview { padding: 14px; }
  .filters { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* =========================================================
   Textvorlagen
   ========================================================= */
.tpl-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.tpl-search { flex: 1; min-width: 220px; max-width: none; }
.tpl-search .input { height: 46px; padding-left: 44px; font-size: 14px; border-radius: 14px; cursor: auto; }
.tpl-search > svg { left: 16px; }
.seg { position: relative; display: inline-flex; gap: 2px; padding: 4px; border-radius: 15px; background: var(--bg-2); border: 1px solid var(--line-2); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px; border: 0; background: none; border-radius: 11px; cursor: pointer; color: var(--muted); font-weight: 550; font-size: 13.5px; white-space: nowrap; transition: color var(--t-fast); }
.seg button:hover { color: var(--text); }
.seg button.on { color: var(--signal-ink); }
.seg .cnt { font-family: var(--mono); font-size: 10.5px; padding: 1px 6px; border-radius: 6px; background: var(--hover); }
.seg button.on .cnt { background: rgba(0, 0, 0, .12); }
.seg-ind { position: absolute; left: 0; top: 4px; height: 36px; border-radius: 11px; background: var(--signal); transition: transform var(--t-slow) var(--ease), width var(--t-slow) var(--ease); z-index: 0; }
.tcard { display: flex; flex-direction: column; gap: 10px; padding: 20px; min-width: 0; transition: border-color var(--t), transform var(--t) var(--ease); }
.tcard:hover { border-color: var(--line-2); }
.tcard.leaving { animation: row-out 200ms var(--ease-in) forwards; }
.tc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tcard h3 { font-family: var(--serif); font-weight: 400; font-size: 24px; line-height: 1.15; letter-spacing: -.01em; }
.tpl-text { font-size: 13px; line-height: 1.6; color: var(--text-2); white-space: pre-wrap; word-break: break-word; padding: 12px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line);
  display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.tpl-text.full { display: block; -webkit-line-clamp: unset; max-height: 50vh; overflow: auto; }
.ph { display: inline-block; font-family: var(--mono); font-size: .86em; line-height: 1.35; padding: 0 6px; border-radius: 5px; background: var(--signal-soft); color: var(--signal-text); border: 1px solid color-mix(in srgb, var(--signal-text) 30%, transparent); }
.ph.auto { background: transparent; border-style: dashed; color: var(--muted); border-color: var(--line-3); }
.tc-foot { display: flex; gap: 6px; align-items: center; margin-top: auto; padding-top: 4px; }
.fill-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 18px; margin-top: 16px; }
.fill-fields { display: grid; gap: 12px; align-content: start; }
.fill-preview { display: grid; gap: 10px; align-content: start; }
@media (max-width: 760px) { .fill-grid { grid-template-columns: 1fr; } .tpl-bar .seg { width: 100%; } }

/* =========================================================
   Suche
   ========================================================= */
.search-hero { position: relative; margin-bottom: 18px; }
.search-hero > svg { position: absolute; left: 22px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-hero .input { height: 68px; padding: 0 130px 0 58px; font-size: 20px; border-radius: 20px; background: var(--tile); }
.search-hero .meta { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: 11px; color: var(--muted); }
.search-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 18px; align-items: start; }
.facets { position: sticky; top: 92px; display: grid; gap: 18px; }
.facet h4 { margin: 0 0 8px; font-family: var(--mono); font-size: 10.5px; font-weight: 500; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.facet button { display: flex; align-items: center; gap: 9px; width: 100%; height: 32px; padding: 0 10px; border: 0; border-radius: 9px; background: none; color: var(--text-2); cursor: pointer; font-size: 13px; text-align: left; transition: background var(--t-fast); }
.facet button:hover { background: var(--hover); }
.facet button.on { background: var(--signal-soft); color: var(--signal-text); }
.facet button .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--c, var(--muted)); flex: none; }
.facet button .n { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--dim); }
.facet button span.lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.results { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; }
.search-layout > div { min-width: 0; }
.res-sec { display: flex; align-items: center; gap: 12px; margin: 14px 0 2px; font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.res-sec:first-child { margin-top: 0; }
.res-sec::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.hit { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 16px 18px; border-radius: var(--r-m); cursor: pointer; transition: border-color var(--t), background var(--t); }
.hit:hover, .hit.sel { border-color: var(--line-3); }
.hit.sel { box-shadow: 0 0 0 1px var(--signal-text), var(--shadow); }
.hit h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.hit h3 mark { background: none; color: var(--signal-text); padding: 0; }
.hit .snip { -webkit-line-clamp: 3; font-size: 13px; line-height: 1.55; }
.hit .where { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.hit .side { display: grid; gap: 6px; justify-items: end; }
.page-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-family: var(--mono); font-size: 11px; background: var(--signal); color: var(--signal-ink); font-weight: 600; white-space: nowrap; }
.page-chip:hover { filter: brightness(1.05); }
.speed { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.speed b { color: var(--signal-text); font-weight: 500; }
@media (max-width: 1080px) { .search-layout { grid-template-columns: minmax(0, 1fr); } .facets { position: static; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } }
@media (max-width: 760px) { .facets { gap: 8px; } .facet { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; align-items: center; } .facet::-webkit-scrollbar { display: none; } .facet h4 { margin: 0 4px 0 0; flex: none; } .facet button { width: auto; flex: none; height: 30px; border: 1px solid var(--line-2); border-radius: 999px; } .facet button .n { margin-left: 4px; } .search-hero .input { height: 56px; font-size: 16px; padding-right: 16px; padding-left: 50px; } .search-hero .meta { display: none; } .hit { grid-template-columns: minmax(0, 1fr); } .hit > .ico { display: none; } .hit .side { justify-items: start; } .facets { grid-template-columns: 1fr; } }
.tcard { cursor: copy; }
.tcard:hover .copy-hint { color: var(--signal-text); }
.tcard.is-copied { border-color: var(--signal-text) !important; }
.tcard.is-copied h3, .tcard.is-copied .tpl-text { color: inherit !important; }
.copy-hint { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); transition: color var(--t-fast); }
.tcard.is-copied .copy-hint { color: var(--signal-text); }
.tc-top > .eyebrow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.tc-top > .eyebrow::before { display: inline-block; margin-right: 10px; vertical-align: 1px; }
.tc-top > .row-flex { flex-wrap: nowrap; flex: none; }

/* =========================================================
   DUNKLE DESIGN-VARIANTEN  (Menü oben rechts → Design)
   1 Signal (Standard) · 2 Mitternacht · 3 Glut · 4 Aurora · 5 Graphit
   ========================================================= */

/* 2 · Mitternacht – tiefes Nachtblau, Elektroblau, klare Sans-Überschriften */
:root[data-theme="dark-nacht"] {
  --bg: #060a14; --bg-2: #0a1020; --tile: #0c1324; --tile-2: #111a30; --tile-3: #18233d;
  --line: rgba(140, 170, 255, .09); --line-2: rgba(140, 170, 255, .16); --line-3: rgba(140, 170, 255, .28);
  --text: #eaf0ff; --text-2: #b9c4e0; --muted: #7d8bb0; --dim: #4f5b7c;
  --signal: #5b8cff; --signal-text: #8fb0ff; --signal-ink: #ffffff; --signal-soft: rgba(91, 140, 255, .14); --signal-glow: rgba(91, 140, 255, .28);
  --glass: rgba(10, 16, 32, .72); --r: 16px;
  --serif: 'Inter Variable', Inter, system-ui, sans-serif; --display-w: 650; --display-ls: -.04em; --em-style: normal;
}

/* 3 · Glut – warmes Anthrazit, Bernstein/Orange, Serif mit Wärme */
:root[data-theme="dark-glut"] {
  --bg: #0d0a08; --bg-2: #120e0b; --tile: #15100d; --tile-2: #1b1511; --tile-3: #251c16;
  --line: rgba(255, 200, 150, .08); --line-2: rgba(255, 200, 150, .14); --line-3: rgba(255, 200, 150, .24);
  --text: #f6ece2; --text-2: #d2c2b2; --muted: #9a8676; --dim: #66574b;
  --signal: #ff8a3d; --signal-text: #ffa766; --signal-ink: #1a0d04; --signal-soft: rgba(255, 138, 61, .12); --signal-glow: rgba(255, 120, 40, .22);
  --glass: rgba(21, 16, 13, .74);
}

/* 4 · Aurora – Violett-Schwarz, Violett→Pink, weich & gläsern */
:root[data-theme="dark-aurora"] {
  --bg: #09070f; --bg-2: #0e0b17; --tile: #110d1c; --tile-2: #171226; --tile-3: #221a36;
  --line: rgba(190, 160, 255, .09); --line-2: rgba(190, 160, 255, .16); --line-3: rgba(190, 160, 255, .28);
  --text: #f1ecff; --text-2: #c9bfe6; --muted: #8e82b0; --dim: #5d5379;
  --signal: #b18cff; --signal-text: #c9adff; --signal-ink: #14082b; --signal-soft: rgba(177, 140, 255, .14); --signal-glow: rgba(200, 120, 255, .26);
  --glass: rgba(17, 13, 28, .66); --r: 24px; --r-m: 18px;
}
:root[data-theme="dark-aurora"] .aurora::after { background: radial-gradient(closest-side, rgba(177, 140, 255, .32), rgba(255, 110, 199, .12) 55%, transparent); opacity: .7; }
:root[data-theme="dark-aurora"] .btn.primary, :root[data-theme="dark-aurora"] .seg-ind, :root[data-theme="dark-aurora"] .brand .logo,
:root[data-theme="dark-aurora"] .mobile-nav a.active { background: linear-gradient(120deg, #b18cff, #ff79c6); }

/* 5 · Graphit – neutral, monochrom, Weiß als Akzent (minimalistisch, technisch) */
:root[data-theme="dark-graphit"] {
  --bg: #0f1012; --bg-2: #141518; --tile: #17181b; --tile-2: #1c1d21; --tile-3: #26282d;
  --line: rgba(255, 255, 255, .07); --line-2: rgba(255, 255, 255, .12); --line-3: rgba(255, 255, 255, .22);
  --text: #f4f4f5; --text-2: #c7c7cc; --muted: #8b8b93; --dim: #5a5a62;
  --signal: #f4f4f5; --signal-text: #ffffff; --signal-ink: #0f1012; --signal-soft: rgba(255, 255, 255, .08); --signal-glow: rgba(255, 255, 255, .07);
  --glass: rgba(20, 21, 24, .78); --r: 12px; --r-m: 10px;
  --serif: 'Inter Variable', Inter, system-ui, sans-serif; --display-w: 600; --display-ls: -.045em; --em-style: normal;
}
:root[data-theme="dark-graphit"] h1 em { color: var(--muted); }
:root[data-theme="dark-graphit"] .aurora::before { opacity: .35; }
.menu-label { padding: 6px 10px 4px; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--dim); }
.menu button.on { color: var(--text); background: var(--hover); }
.menu .swatch { width: 18px; height: 18px; border-radius: 6px; border: 1px solid var(--line-3); display: grid; place-items: center; flex: none; }
.menu .swatch i { width: 7px; height: 7px; border-radius: 50%; }
.menu .check { margin-left: auto; color: var(--signal-text); display: inline-flex; }

/* =========================================================
   OBERFLÄCHE 2 · KOMMANDOZENTRALE  (data-ui="rail")
   Icon-Leiste links mit Tooltips, Statuszeile oben, kompakt & technisch
   ========================================================= */
.ui-rail { display: grid; grid-template-columns: 72px minmax(0, 1fr); min-height: 100vh; }
.rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 0; border-right: 1px solid var(--line); background: var(--bg-2); z-index: 61; }
.rail .nav.v { flex-direction: column; margin: 18px 0 0; padding: 0 4px; background: none; border: 0; gap: 6px; }
.rail .nav a { width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 12px; }
.rail .nav a::after, .bottom-dock a::after {
  content: attr(data-label); position: absolute; pointer-events: none; opacity: 0; white-space: nowrap; z-index: 80;
  background: var(--tile-3); border: 1px solid var(--line-2); color: var(--text); font-size: 12px; font-weight: 550; padding: 5px 10px; border-radius: 8px;
  box-shadow: var(--shadow-lg); transition: opacity var(--t-fast), transform var(--t) var(--ease);
}
.rail .nav a::after { left: calc(100% + 14px); top: 50%; transform: translate(-6px, -50%); }
.rail .nav a:hover::after { opacity: 1; transform: translate(0, -50%); }
.nav.v .nav-ind { top: 0; left: 4px; right: 4px; width: auto; }
.ui-rail .nav-ind { background: var(--signal-soft); border: 0; box-shadow: none; }
.ui-rail .nav-ind::before { content: ''; position: absolute; left: -8px; top: 11px; bottom: 11px; width: 3px; border-radius: 0 3px 3px 0; background: var(--signal); box-shadow: 0 0 12px var(--signal); }
.rail-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: var(--muted); transition: color var(--t-fast), background var(--t-fast); }
.rail-btn:hover { color: var(--text); background: var(--hover); }
.rail-main { min-width: 0; }
.statusbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 14px; height: 58px; padding: 0 28px; border-bottom: 1px solid var(--line);
  background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.statusbar .grow { flex: 1; }
.crumb { font-size: 13.5px; white-space: nowrap; } .crumb b { font-weight: 600; }
.crumb .mono { font-size: 11px; letter-spacing: .1em; }
.status-dot { display: inline-flex; gap: 8px; align-items: center; font-family: var(--mono); font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.status-dot i { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 3px rgba(52, 211, 153, .15); }
#sbClock { font-size: 12px; }
.ui-rail .searchbtn { min-width: 280px; }
.ui-rail .menu { left: calc(100% + 12px); right: auto; top: auto; bottom: 0; transform-origin: bottom left; }
.ui-rail .main { width: auto; max-width: 1500px; margin: 0; padding: 28px 32px 80px; }
.ui-rail .panel { background: var(--tile); box-shadow: none; border-radius: 12px; }
.ui-rail .b-hero h1 { font-size: clamp(40px, 4.6vw, 66px); }
.ui-rail .page-head { padding-bottom: 16px; margin-bottom: 22px; }
.ui-rail .page-head h1 { font-size: clamp(30px, 3.4vw, 42px); }
.ui-rail .stat .n, .ui-rail .clock { font-family: var(--mono); font-weight: 500; letter-spacing: -.04em; }
.ui-rail .aurora::before { opacity: .3; background-size: 44px 44px; }

/* =========================================================
   OBERFLÄCHE 3 · SPOTLIGHT  (data-ui="spotlight")
   Die Suche ist das Zentrum, Navigation als Tabs mit Unterstrich, schmale ruhige Spalte
   ========================================================= */
.spot-head { width: min(1100px, calc(100% - 32px)); margin: 0 auto; padding-top: 22px; }
.spot-top { display: flex; align-items: center; gap: 10px; }
.spot-top .grow { flex: 1; }
.spot-bar { margin: 34px 0 18px; }
.spot-bar .searchbtn { width: 100%; height: 66px; border-radius: 18px; padding: 0 18px 0 24px; gap: 14px; background: var(--tile); border-color: var(--line-2);
  box-shadow: 0 0 0 6px var(--signal-soft), 0 30px 60px -30px rgba(0, 0, 0, .9); }
.spot-bar .searchbtn svg { width: 20px; height: 20px; }
.spot-bar .searchbtn > span:not(.kbd) { font-size: 17px; }
.spot-bar .searchbtn:hover { border-color: var(--line-3); }
.ui-spot .tabs-nav { margin: 0; padding: 0; gap: 2px; background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.ui-spot .tabs-nav a { height: 46px; padding: 0 14px; border-radius: 0; }
.ui-spot .nav-ind { top: auto; bottom: -1px; height: 2px; background: var(--signal); border: 0; box-shadow: none; border-radius: 2px; }
.ui-spot .main { width: min(1100px, calc(100% - 32px)); padding-top: 34px; }
.ui-spot .panel { background: var(--tile); border-color: transparent; box-shadow: none; border-radius: 14px; }
.ui-spot .panel:hover { border-color: var(--line); }
.ui-spot .b-hero .hero-search, .ui-spot .b-hero p { display: none; }
.ui-spot .b-hero { padding: 30px 32px; }
.ui-spot .b-hero h1 { font-size: clamp(38px, 4.4vw, 58px); margin-bottom: 0; }
.ui-spot .page-head { border-bottom: 0; padding-bottom: 0; }
.ui-spot .page-head h1 { font-size: clamp(32px, 3.6vw, 44px); }
.ui-spot .aurora::before, .ui-spot .aurora::after { display: none; }

/* =========================================================
   OBERFLÄCHE 4 · SEITENLEISTE  (data-ui="sidebar")
   Volle Leiste mit Bereichen + direkten Links zu Mandanten & Kategorien, warm
   ========================================================= */
.ui-side { display: grid; grid-template-columns: 276px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 18px 14px; border-right: 1px solid var(--line); background: var(--bg-2); z-index: 61; scrollbar-width: thin; }
.side-head { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 4px; }
.side .searchbtn { min-width: 0; width: 100%; }
.side .nav.v { flex-direction: column; align-items: stretch; margin: 0; padding: 0; background: none; border: 0; gap: 2px; }
.side .nav a { height: 38px; padding: 0 12px; font-size: 14px; }
.ui-side .nav-ind { left: 0; right: 0; background: var(--tile-3); border: 1px solid var(--line-2); box-shadow: none; }
.ui-side .nav-ind::before { content: ''; position: absolute; right: 10px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--signal); }
.side-sec { display: grid; gap: 1px; }
.side-title { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 12px 6px; font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--dim); }
.side-title a { color: var(--muted); font-family: var(--sans); text-transform: none; letter-spacing: 0; font-size: 12px; }
.side-title a:hover { color: var(--signal-text); }
.side-link { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 12px; border-radius: 9px; color: var(--text-2); font-size: 13px; transition: background var(--t-fast), color var(--t-fast); }
.side-link:hover { background: var(--hover); color: var(--text); }
.side-link .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.side-link span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-link em { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--dim); }
.side .grow { flex: 1; }
.side-new { width: 100%; flex: none; }
.ui-side .menu { left: auto; right: 0; }
.ui-side .main { width: auto; max-width: 1280px; margin: 0; padding: 36px 40px 80px; }
.ui-side .panel { border-radius: 14px; }
.ui-side .ecard, .ui-side .tcard { border-left: 2px solid var(--line-2); }
.ui-side .ecard:hover, .ui-side .tcard:hover { border-left-color: var(--signal); }
.ui-side .aurora::before { display: none; }

/* =========================================================
   OBERFLÄCHE 5 · DOCK  (data-ui="dock")
   Navigation als schwebendes Dock unten (mit Vergrößerung), Glas-Kacheln
   ========================================================= */
.dock-head { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: 10px; padding: 16px 28px;
  background: linear-gradient(var(--bg) 30%, transparent); }
.dock-head .grow { flex: 1; }
.ui-dock .main { width: min(1360px, calc(100% - 48px)); padding: 18px 0 150px; }
.bottom-dock { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60; display: flex; align-items: flex-end; gap: 8px; margin: 0;
  padding: 9px 10px; border-radius: 24px; background: var(--glass); border: 1px solid var(--line-2);
  backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6); box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .85), inset 0 1px 0 rgba(255, 255, 255, .06); }
.bottom-dock a { width: 54px; height: 54px; padding: 0; justify-content: center; border-radius: 16px; background: var(--tile-2); border: 1px solid var(--line);
  color: var(--text-2); transform-origin: bottom center; transition: transform var(--t) var(--ease), color var(--t-fast), background var(--t-fast); }
.bottom-dock a:hover { transform: translateY(-10px) scale(1.2); color: var(--text); background: var(--tile-3); }
.bottom-dock a:hover + a, .bottom-dock a:has(+ a:hover) { transform: translateY(-4px) scale(1.08); }
.bottom-dock a.active { color: var(--signal-text); }
.bottom-dock a::after { bottom: calc(100% + 14px); left: 50%; transform: translate(-50%, 6px); }
.bottom-dock a:hover::after { opacity: 1; transform: translate(-50%, 0); }
.ui-dock .nav-ind { top: auto; bottom: -6px; height: 4px; background: transparent; border: 0; box-shadow: none; }
.ui-dock .nav-ind::after { content: ''; position: absolute; left: 50%; top: 0; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 10px var(--signal); }
.dock-sep { width: 1px; height: 38px; background: var(--line-2); margin: 0 3px; align-self: center; }
.bottom-dock .dock-new { background: linear-gradient(120deg, #b18cff, #ff79c6); color: #14082b; border-color: transparent; }
.ui-dock .panel { background: color-mix(in srgb, var(--tile) 62%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-radius: 26px; }
.ui-dock .toasts { bottom: 110px; }

/* Menü-Optionen für die Oberflächen */
.menu { min-width: 300px; }
.design-opt { height: auto !important; padding: 8px 10px !important; align-items: center; }
.design-opt .dtxt { display: grid; line-height: 1.3; min-width: 0; }
.design-opt .dtxt b { font-weight: 600; color: var(--text); font-size: 13px; }
.design-opt .dtxt small { color: var(--muted); font-size: 11.5px; }
.design-opt .swatch { width: 26px; height: 26px; border-radius: 8px; }
.design-opt .swatch i { width: 9px; height: 9px; }

/* ---------- Handy: jede Oberfläche bekommt eine kompakte Kopfzeile ---------- */
@media (max-width: 760px) {
  .ui-rail, .ui-side { display: block; }
  .rail { position: sticky; top: 0; height: 58px; width: 100%; flex-direction: row; padding: 0 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .rail .nav, .rail .rail-btn { display: none; }
  .ui-rail .menu { left: auto; right: 0; top: calc(100% + 8px); bottom: auto; transform-origin: top right; }
  .statusbar { position: static; height: auto; padding: 10px 16px; }
  .statusbar .crumb, .status-dot, #sbClock { display: none; }
  .ui-rail .searchbtn { min-width: 0; flex: 1; }
  .ui-rail .main, .ui-side .main { width: auto; padding: 20px 16px 110px; }
  .side { position: sticky; top: 0; height: auto; overflow: visible; flex-direction: row; align-items: center; gap: 10px; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side .nav, .side .side-sec, .side .grow, .side .side-new { display: none; }
  .side-head { order: 2; padding: 0; } .side-head .brand { display: none; }
  .side .searchbtn { flex: 1; order: 1; }
  .ui-spot .tabs-nav { display: none; }
  .spot-bar { margin: 18px 0 4px; }
  .spot-bar .searchbtn { height: 54px; }
  .ui-dock .mobile-nav { display: none; }
  .ui-dock .main { width: calc(100% - 32px); }
  .dock-head { padding: 10px 16px; }
  .dock-head .searchbtn { min-width: 0; flex: 1; }
  .dock-head .brand b { display: none; }
  .bottom-dock { bottom: 12px; gap: 4px; padding: 6px; border-radius: 20px; max-width: calc(100% - 16px); }
  .bottom-dock a { width: 44px; height: 44px; border-radius: 13px; }
  .bottom-dock a::after { display: none; }
  .bottom-dock a:hover, .bottom-dock a:hover + a, .bottom-dock a:has(+ a:hover) { transform: none; }
}
.side > * { flex-shrink: 0; }

/* =========================================================
   OBERFLÄCHE „KLAR“ – aufgeräumtes Profi-Werkzeug
   Eine Schrift, gedeckte Farben, keine Effekte, dichte Listen
   ========================================================= */
:root[data-theme="dark-klar"] {
  --bg: #0c0c0e; --bg-2: #101012; --tile: #141416; --tile-2: #18181b; --tile-3: #202024;
  --hover: rgba(255, 255, 255, .04);
  --line: rgba(255, 255, 255, .065); --line-2: rgba(255, 255, 255, .1); --line-3: rgba(255, 255, 255, .17);
  --text: #ededef; --text-2: #c4c4cb; --muted: #8b8b94; --dim: #5d5d66;
  --signal: #7170ff; --signal-text: #a3a2ff; --signal-ink: #ffffff; --signal-soft: rgba(113, 112, 255, .14); --signal-glow: rgba(113, 112, 255, .16);
  --glass: rgba(14, 14, 16, .85); --r: 10px; --r-m: 8px; --r-s: 8px;
  --shadow: none; --shadow-lg: 0 16px 48px -12px rgba(0, 0, 0, .7), 0 0 0 1px var(--line-2);
  --serif: 'Inter Variable', Inter, system-ui, sans-serif; --display-w: 600; --display-ls: -.02em; --em-style: normal;
}
:root[data-ui="klar"] body::after, :root[data-ui="klar"] .aurora::before, :root[data-ui="klar"] .aurora::after { display: none; }
:root[data-ui="klar"] body { font-size: 13.5px; }

.ui-klar { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.kside { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding: 12px 10px;
  background: var(--bg-2); border-right: 1px solid var(--line); scrollbar-width: thin; }
.kside > * { flex-shrink: 0; }
.kside .ws { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; }
.kside .ws .brand .logo { width: 24px; height: 24px; border-radius: 6px; background: var(--signal); color: #fff; }
.kside .ws .brand .logo svg { width: 14px; height: 14px; }
.kside .ws .brand b { font-family: var(--sans); font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.kside .ws .brand b i { display: none; }
.kside .ws .grow { flex: 1; }
.kside .avatar-btn { width: 28px; height: 28px; border-radius: 50%; font-family: var(--sans); font-size: 11px; background: var(--signal-soft); color: var(--signal-text); border: 0; }
.kside .searchbtn { min-width: 0; width: 100%; height: 32px; border-radius: 8px; background: var(--tile); border-color: var(--line-2); margin-bottom: 8px; }
.kside .nav.v { flex-direction: column; align-items: stretch; margin: 0; padding: 0; background: none; border: 0; gap: 1px; }
.kside .nav a { height: 32px; padding: 0 10px; gap: 10px; font-size: 13.5px; border-radius: 7px; color: var(--text-2); }
.kside .nav a svg { color: var(--muted); }
.kside .nav a.active svg { color: var(--text); }
.ui-klar .nav-ind { left: 0; right: 0; background: var(--tile-3); border: 0; box-shadow: none; border-radius: 7px; }
.kside .side-title { padding: 16px 10px 4px; font-family: var(--sans); font-size: 11.5px; font-weight: 550; text-transform: none; letter-spacing: 0; color: var(--dim); }
.kside .side-link { height: 30px; padding: 0 10px; border-radius: 7px; font-size: 13px; }
.kside .grow { flex: 1; }
.kside .kfoot { display: flex; gap: 2px; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; }
.kside .kfoot a { flex: 1; display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; border-radius: 7px; color: var(--muted); font-size: 13px; }
.kside .kfoot a:hover { background: var(--hover); color: var(--text); }
.ui-klar .menu { left: auto; right: -170px; }

.kmain { min-width: 0; display: flex; flex-direction: column; }
.ktop { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 24px; border-bottom: 1px solid var(--line);
  background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.ktop .crumb { font-size: 13px; color: var(--muted); }
.ktop .crumb b { color: var(--text); font-weight: 550; }
.ktop .grow { flex: 1; }
.ktop .btn { height: 30px; border-radius: 7px; font-size: 12.5px; padding: 0 12px; }
.ui-klar .main { width: 100%; max-width: 1240px; margin: 0; padding: 28px 32px 80px; }

/* Bausteine flach & ruhig */
.ui-klar .btn { border-radius: 8px; }
.ui-klar .btn.primary:hover { background: #8382ff; box-shadow: none; color: #fff; }
.ui-klar .input { border-radius: 8px; height: 36px; }
.ui-klar .panel { background: var(--tile); border-color: var(--line); box-shadow: none; border-radius: 10px; }
.ui-klar .panel.pad { padding: 18px; }
.ui-klar .ecard, .ui-klar .tcard, .ui-klar .mcard { transition: border-color var(--t-fast), background var(--t-fast); }
.ui-klar .ecard:hover, .ui-klar .tcard:hover, .ui-klar .mcard:hover { transform: none; border-color: var(--line-3); background: var(--tile-2); }
.ui-klar .ecard::before { display: none; }
.ui-klar .ecard h3, .ui-klar .tcard h3 { font-family: var(--sans); font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; line-height: 1.35; }
.ui-klar .page-head { border-bottom: 0; padding-bottom: 0; margin-bottom: 22px; }
.ui-klar .page-head .eyebrow { display: none; }
.ui-klar .page-head h1, .ui-klar .m-head h1 { font-size: 24px; margin-top: 0; letter-spacing: -.02em; }
.ui-klar .page-head p { font-size: 13.5px; margin-top: 4px; }
.ui-klar .doc-title { font-size: 28px; line-height: 1.2; }
.ui-klar .eyebrow::before { display: none; }
.ui-klar .eyebrow { font-family: var(--sans); text-transform: none; letter-spacing: 0; font-size: 12px; }
.ui-klar label.field { font-family: var(--sans); text-transform: none; letter-spacing: 0; font-size: 12.5px; }
.ui-klar .modal h2 { font-family: var(--sans); font-size: 17px; font-weight: 600; }
.ui-klar .drop h2 { font-family: var(--sans); font-size: 16px; font-weight: 600; }
.ui-klar .drop::before { display: none; }
.ui-klar .drop { border: 1.5px dashed var(--line-3); min-height: 220px; }
.ui-klar .drop .big { width: 44px; height: 44px; border-radius: 12px; }
.ui-klar .how li::before { content: counter(s); font-family: var(--sans); font-size: 12px; font-weight: 600; color: var(--text-2); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); }
.ui-klar .how li { grid-template-columns: 24px 1fr; }
.ui-klar .prose h2 { font-family: var(--sans); font-size: 19px; font-weight: 600; }
.ui-klar .prose blockquote { font-family: var(--sans); font-size: 14.5px; line-height: 1.6; background: var(--signal-soft); border-radius: 0 8px 8px 0; padding: 10px 14px; }
.ui-klar .side-box h4, .ui-klar .colhead, .ui-klar .group-title, .ui-klar .res-sec, .ui-klar .facet h4, .ui-klar .queue-head h2, .ui-klar .ho-toolbar b, .ui-klar .save-state, .ui-klar .copy-hint, .ui-klar .tg {
  font-family: var(--sans); text-transform: none; letter-spacing: 0; font-size: 12px; }
.ui-klar .seg { border-radius: 9px; } .ui-klar .seg button { height: 30px; border-radius: 7px; font-size: 13px; } .ui-klar .seg-ind { height: 30px; border-radius: 7px; }
.ui-klar .search-hero .input { height: 52px; border-radius: 10px; font-size: 16px; }
.ui-klar .hit { border-radius: 10px; }
.ui-klar .chip { height: 22px; font-size: 11.5px; }
.ui-klar .tag { font-family: var(--sans); font-size: 11.5px; }

/* Startseite „Arbeitsplatz“ */
.kd-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.kd-head h1 { font-size: 24px; }
.kd-head p { margin: 4px 0 0; color: var(--muted); }
.kd-stats { display: flex; gap: 6px; flex-wrap: wrap; }
.kd-stats span { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 7px; background: var(--tile); border: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
.kd-stats b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.kd-search { position: relative; margin-bottom: 18px; }
.kd-search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.kd-search .input { height: 50px; padding-left: 46px; font-size: 15px; border-radius: 10px; background: var(--tile); cursor: text; }
.kd-search .kbd { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); }
.kd-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.kd-quick a { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 10px; background: var(--tile); border: 1px solid var(--line); transition: border-color var(--t-fast), background var(--t-fast); min-width: 0; }
.kd-quick a:hover { border-color: var(--line-3); background: var(--tile-2); }
.kd-quick .qi { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: var(--signal-soft); color: var(--signal-text); flex: none; }
.kd-quick b { display: block; font-weight: 600; font-size: 13.5px; }
.kd-quick small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kd-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.kd-grid .panel-head h2 { font-size: 13px; }
.ui-klar .list-row { margin: 0 -8px; padding: 8px; border-radius: 8px; }
.ui-klar .list-row + .list-row, .ui-klar .numrow + .numrow { box-shadow: none; }
.ui-klar .numrow { margin: 0 -8px; padding: 7px 8px; border-radius: 8px; }
.ui-klar .numlist { max-height: 440px; margin: 0 -4px; padding: 0 4px; }

@media (max-width: 1000px) { .kd-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kd-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .ui-klar { display: block; }
  .kside { position: sticky; top: 0; z-index: 61; height: auto; overflow: visible; flex-direction: row; align-items: center; gap: 8px; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .kside .nav, .kside .side-sec, .kside .grow, .kside .kfoot, .kside .ws .brand b { display: none; }
  .kside .ws { padding: 0; order: 0; }
  .kside .searchbtn { flex: 1; margin: 0; order: 1; height: 36px; }
  .kside .ws .avatar-btn { order: 2; }
  .ui-klar .menu { right: 0; left: auto; }
  .ktop { display: none; }
  .ui-klar .main { padding: 18px 16px 100px; }
}
.ui-klar .ai-pill { font-family: var(--sans); text-transform: none; letter-spacing: 0; font-size: 11.5px; font-weight: 600; }
@media (max-width: 760px) { .ui-klar .kd-search { display: none; } }

/* =========================================================
   OBERFLÄCHE „FLOW“ – modern, rund, persönlich
   Schwebende Glas-Navigation, Bereichsfarben, weiche Karten, Homescreen-Widgets
   ========================================================= */
:root[data-theme="dark-flow"] {
  --bg: #0b0c14; --bg-2: #11131d; --tile: rgba(255, 255, 255, .045); --tile-2: rgba(255, 255, 255, .07); --tile-3: rgba(255, 255, 255, .1);
  --hover: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .07); --line-2: rgba(255, 255, 255, .11); --line-3: rgba(255, 255, 255, .2);
  --text: #f3f4fb; --text-2: #c9cbe0; --muted: #9093ae; --dim: #5f627c;
  --signal: #7c6cff; --signal-text: #a99fff; --signal-ink: #ffffff; --signal-soft: rgba(124, 108, 255, .16); --signal-glow: rgba(124, 108, 255, .3);
  --grad: linear-gradient(135deg, #7c6cff 0%, #4f8cff 55%, #2fd3c6 100%);
  --glass: rgba(20, 22, 34, .62);
  --r: 26px; --r-m: 20px; --r-s: 14px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 20px 50px -30px rgba(0, 0, 0, .8);
  --shadow-lg: 0 30px 80px -24px rgba(0, 0, 0, .85), 0 0 0 1px var(--line-2);
  --sans: 'Plus Jakarta Sans Variable', 'Inter Variable', system-ui, sans-serif;
  --serif: var(--sans); --display-w: 750; --display-ls: -.035em; --em-style: normal;
  --ease: cubic-bezier(.34, 1.4, .64, 1);
}
:root[data-ui="flow"] body { font-size: 14px; letter-spacing: -.005em; }
:root[data-ui="flow"] body::after { display: none; }
/* Weicher Farbverlauf im Hintergrund – langsam fließend */
:root[data-ui="flow"] .aurora { background: var(--bg); }
:root[data-ui="flow"] .aurora::before {
  display: block; opacity: 1; mask-image: none; -webkit-mask-image: none; inset: -20%;
  background:
    radial-gradient(38% 42% at 18% 12%, rgba(124, 108, 255, .28), transparent 70%),
    radial-gradient(34% 40% at 88% 18%, rgba(47, 211, 198, .16), transparent 70%),
    radial-gradient(40% 45% at 70% 92%, rgba(255, 110, 180, .14), transparent 70%),
    radial-gradient(36% 40% at 8% 88%, rgba(79, 140, 255, .16), transparent 70%);
  filter: blur(20px); animation: flow-bg 26s ease-in-out infinite alternate;
}
:root[data-ui="flow"] .aurora::after { display: none; }
@keyframes flow-bg { to { transform: translate(3%, -2%) rotate(6deg) scale(1.06); } }

.ui-flow { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.fside { position: sticky; top: 14px; height: calc(100vh - 28px); margin: 14px 0 14px 14px; display: flex; flex-direction: column; gap: 6px; padding: 16px 12px;
  background: var(--glass); border: 1px solid var(--line-2); border-radius: 30px; backdrop-filter: blur(26px) saturate(1.5); -webkit-backdrop-filter: blur(26px) saturate(1.5);
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .8); overflow-y: auto; scrollbar-width: none; z-index: 61; }
.fside > * { flex-shrink: 0; }
.fside .ws { display: flex; align-items: center; gap: 10px; padding: 2px 6px 12px; }
.fside .brand .logo { width: 36px; height: 36px; border-radius: 12px; background: var(--grad); color: #fff; box-shadow: 0 8px 20px -6px rgba(124, 108, 255, .6); }
.fside .brand b { font-family: var(--sans); font-size: 17px; font-weight: 750; letter-spacing: -.02em; }
.fside .brand b i { color: #2fd3c6; font-style: normal; }
.fside .ws .grow { flex: 1; }
.fside .avatar-btn { width: 34px; height: 34px; border-radius: 50%; border: 0; background: linear-gradient(135deg, #ff7ab6, #ffb86b); color: #2a0f1d; font-family: var(--sans); font-weight: 800; font-size: 12px; }
.fside .searchbtn { width: 100%; min-width: 0; height: 42px; border-radius: 999px; background: var(--tile); border-color: var(--line-2); margin-bottom: 10px; padding: 0 8px 0 14px; }
.fside .searchbtn .kbd { border-radius: 999px; }
.fside .nav.v { flex-direction: column; align-items: stretch; margin: 0; padding: 0; background: none; border: 0; gap: 4px; }
.fside .nav a { height: 46px; padding: 0 8px; gap: 12px; border-radius: 16px; color: var(--text-2); font-weight: 600; font-size: 14px; }
.fside .nav a .chipi { width: 32px; height: 32px; border-radius: 11px; display: grid; place-items: center; flex: none; color: #fff;
  background: var(--c); box-shadow: 0 6px 14px -6px var(--c); transition: transform var(--t) var(--ease); }
.fside .nav a:hover .chipi { transform: scale(1.08) rotate(-4deg); }
.fside .nav a.active { color: var(--text); }
.ui-flow .nav-ind { left: 0; right: 0; border-radius: 16px; background: var(--tile-3); border: 1px solid var(--line-2); box-shadow: none; }
.fside .side-title { padding: 14px 10px 6px; font-family: var(--sans); font-size: 12px; font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--muted); }
.fside .side-link { height: 34px; padding: 0 10px; border-radius: 12px; font-size: 13.5px; font-weight: 500; }
.fside .side-link .dot { width: 9px; height: 9px; border-radius: 4px; }
.fside .grow { flex: 1; }
.fside .fnew { margin-top: 10px; height: 46px; border-radius: 16px; width: 100%; }
.ui-flow .menu { left: auto; right: -200px; border-radius: 22px; }

.fmain { min-width: 0; }
.ui-flow .main { width: 100%; max-width: 1320px; margin: 0; padding: 30px 34px 90px; }

/* Bausteine: rund, weich, freundlich */
.ui-flow .btn { border-radius: 999px; font-weight: 650; }
.ui-flow .btn.primary { background: var(--grad); color: #fff; border: 0; box-shadow: 0 10px 24px -10px rgba(79, 140, 255, .7); }
.ui-flow .btn.primary:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -10px rgba(79, 140, 255, .8); }
.ui-flow .input { border-radius: 14px; background: rgba(255, 255, 255, .04); border-color: var(--line-2); }
.ui-flow .input:focus { border-color: #7c6cff; box-shadow: 0 0 0 4px rgba(124, 108, 255, .2); }
.ui-flow .panel { background: var(--tile); border-color: var(--line); border-radius: 26px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.ui-flow .panel.pad { padding: 22px; }
.ui-flow .ecard, .ui-flow .tcard, .ui-flow .mcard, .ui-flow .hit { transition: transform var(--t) var(--ease), background var(--t-fast), border-color var(--t-fast); }
.ui-flow .ecard:hover, .ui-flow .tcard:hover, .ui-flow .mcard:hover, .ui-flow .hit:hover { transform: translateY(-3px); background: var(--tile-2); border-color: var(--line-2); }
.ui-flow .ecard h3, .ui-flow .tcard h3 { font-size: 16px; font-weight: 700; letter-spacing: -.015em; line-height: 1.3; }
.ui-flow .page-head { border-bottom: 0; padding-bottom: 0; }
.ui-flow .page-head .eyebrow { display: none; }
.ui-flow .page-head h1 { font-size: clamp(30px, 3.4vw, 40px); margin-top: 0; }
.ui-flow .doc-title { font-size: clamp(28px, 3vw, 38px); line-height: 1.15; }
.ui-flow .eyebrow { font-family: var(--sans); text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 650; }
.ui-flow .eyebrow::before { border-radius: 50%; }
.ui-flow label.field, .ui-flow .side-box h4, .ui-flow .colhead, .ui-flow .group-title, .ui-flow .res-sec, .ui-flow .facet h4, .ui-flow .queue-head h2, .ui-flow .ho-toolbar b,
.ui-flow .save-state, .ui-flow .copy-hint, .ui-flow .tg, .ui-flow .ai-pill, .ui-flow .tag, .ui-flow .stat .l {
  font-family: var(--sans); text-transform: none; letter-spacing: 0; }
.ui-flow label.field { font-size: 12.5px; font-weight: 600; }
.ui-flow .chip { border-radius: 999px; height: 26px; font-weight: 600; background: rgba(255, 255, 255, .03); }
.ui-flow .tag { border-radius: 999px; padding: 2px 9px; }
.ui-flow .ico, .ui-flow .list-row .ic { border-radius: 12px; width: 36px; height: 36px; color: #fff; border: 0; background: var(--c, #7c6cff); box-shadow: 0 6px 14px -8px var(--c, #7c6cff); }
.ui-flow .modal { border-radius: 28px; } .ui-flow .modal h2 { font-family: var(--sans); font-size: 22px; font-weight: 750; }
.ui-flow .palette { border-radius: 26px; } .ui-flow .palette .it { border-radius: 14px; }
.ui-flow .drop { border-radius: 28px; } .ui-flow .drop::before { border-radius: 22px; } .ui-flow .drop h2 { font-family: var(--sans); font-size: 22px; font-weight: 750; }
.ui-flow .drop .big { background: var(--grad); color: #fff; border-radius: 18px; }
.ui-flow .how li::before { font-family: var(--sans); font-weight: 800; font-size: 22px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ui-flow .prose h2 { font-family: var(--sans); font-size: 21px; font-weight: 750; }
.ui-flow .prose blockquote { font-family: var(--sans); font-size: 15px; border-left: 0; background: rgba(124, 108, 255, .1); border-radius: 16px; padding: 12px 16px; }
.ui-flow .seg { border-radius: 999px; } .ui-flow .seg button { border-radius: 999px; } .ui-flow .seg-ind { border-radius: 999px; background: var(--grad); }
.ui-flow .seg button.on { color: #fff; }
.ui-flow .search-hero .input { border-radius: 999px; }
.ui-flow .tpl-search .input { border-radius: 999px; }
.ui-flow .toast { border-radius: 999px; }
.ui-flow .tabs { border-radius: 999px; } .ui-flow .tabs button { border-radius: 999px; }
.ui-flow .hcard, .ui-flow .erow { border-radius: 18px; }
.ui-flow .ho-stage { border-radius: 16px; }
.ui-flow .mono-ic { border-radius: 14px; color: #fff; background: var(--c); border: 0; }

/* Startseite „Homescreen“ */
.fd { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.fd-hello { grid-column: span 8; position: relative; overflow: hidden; padding: 30px 32px; border-radius: 30px; color: #fff;
  background: radial-gradient(120% 140% at 0% 0%, #7c6cff 0%, #4f8cff 45%, #1fb8b0 100%); box-shadow: 0 30px 60px -30px rgba(79, 140, 255, .7); }
.fd-hello::after { content: ''; position: absolute; right: -60px; bottom: -80px; width: 280px; height: 280px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.fd-hello::before { content: ''; position: absolute; right: 120px; top: -60px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.fd-hello h1 { position: relative; font-size: clamp(32px, 3.6vw, 46px); font-weight: 800; letter-spacing: -.035em; color: #fff; }
.fd-hello p { position: relative; margin: 6px 0 22px; color: rgba(255, 255, 255, .85); font-size: 15px; }
.fd-search { position: relative; z-index: 1; max-width: 560px; }
.fd-search svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: #4a4f6a; }
.fd-search .input { height: 54px; padding-left: 50px; border-radius: 999px; border: 0; background: #fff; color: #11131d; font-size: 15px; font-weight: 500; cursor: text;
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .5); }
.fd-search .input::placeholder { color: #7b7f99; }
.fd-search .kbd { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); background: #eef0f7; color: #6b6f88; border-color: #dde0ec; border-radius: 999px; }
.fd-stats { grid-column: span 4; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fd-stat { border-radius: 24px; padding: 18px; background: var(--tile); border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; min-height: 110px; }
.fd-stat .n { font-size: 34px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.fd-stat .l { color: var(--muted); font-weight: 600; font-size: 12.5px; display: flex; align-items: center; gap: 8px; }
.fd-stat .l i { width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; background: var(--c); color: #fff; }
.fd-apps { grid-column: span 12; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.fd-app { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 18px; border-radius: 24px; background: var(--tile); border: 1px solid var(--line);
  transition: transform var(--t) var(--ease), background var(--t-fast); min-width: 0; }
.fd-app:hover { transform: translateY(-4px) scale(1.02); background: var(--tile-2); }
.fd-app .ai { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: var(--c); box-shadow: 0 10px 22px -10px var(--c); }
.fd-app b { font-weight: 700; font-size: 14px; }
.fd-app small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.fd-recent { grid-column: span 7; }
.fd-quick { grid-column: span 5; }
.fd .panel-head h2 { font-size: 16px; font-weight: 750; letter-spacing: -.02em; }
.fd .panel-head h2 svg { display: none; }
.ui-flow .list-row { margin: 0 -10px; padding: 10px; border-radius: 16px; }
.ui-flow .list-row + .list-row, .ui-flow .numrow + .numrow { box-shadow: none; }
.ui-flow .numrow { margin: 0 -10px; padding: 9px 10px; border-radius: 14px; }
.ui-flow .numrow .num { font-family: var(--sans); font-weight: 700; font-variant-numeric: tabular-nums; }

@media (max-width: 1180px) { .fd-apps { grid-template-columns: repeat(3, minmax(0, 1fr)); } .fd-hello { grid-column: span 12; } .fd-stats { grid-column: span 12; grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 1000px) { .fd-recent, .fd-quick { grid-column: span 12; } }
@media (max-width: 760px) {
  .ui-flow { display: block; }
  .fside { position: sticky; top: 8px; height: auto; margin: 8px; flex-direction: row; align-items: center; gap: 8px; padding: 8px; border-radius: 22px; overflow: visible; }
  .fside .nav, .fside .side-sec, .fside .grow, .fside .fnew, .fside .brand b { display: none; }
  .fside .ws { padding: 0; } .fside .searchbtn { flex: 1; margin: 0; height: 38px; }
  .ui-flow .menu { right: 0; }
  .ui-flow .main { padding: 14px 14px 110px; }
  .fd { gap: 12px; } .fd-hello { padding: 22px; border-radius: 26px; } .fd-stats { grid-template-columns: 1fr 1fr; gap: 12px; } .fd-apps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .ui-flow .mobile-nav { left: 50%; right: auto; bottom: calc(12px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: auto; padding: 6px; gap: 2px; border-radius: 24px;
    background: var(--glass); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border: 1px solid var(--line-2); }
  .ui-flow .mobile-nav a { width: 56px; border-radius: 18px; }
  .ui-flow .mobile-nav a.active { background: var(--grad); color: #fff; }
}
.ui-flow .ecard .top .small, .ui-flow .hit .side .mono, .ui-flow .tc-foot .mono { font-family: var(--sans); font-size: 12px; letter-spacing: 0; }
.ui-flow .kbd { font-family: var(--sans); border-radius: 999px; }
@media (max-width: 760px) { .fd-search .kbd { display: none; } .fd-search .input { padding-right: 18px; } }

/* =========================================================
   FLOW – erwachsene Fassung: eine Akzentfarbe, getönte statt bunte Symbole,
   ruhige Bewegung. Rund & modern bleibt.
   ========================================================= */
:root[data-theme="dark-flow"] {
  --bg: #0a0b10; --signal: #8b7cff; --signal-text: #b3a9ff; --signal-soft: rgba(139, 124, 255, .13); --signal-glow: rgba(139, 124, 255, .22);
  --grad: linear-gradient(135deg, #8b7cff, #6f72f6);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --display-w: 700; --display-ls: -.03em;
}
:root[data-ui="flow"] .aurora::before {
  background:
    radial-gradient(40% 45% at 15% 8%, rgba(139, 124, 255, .16), transparent 70%),
    radial-gradient(35% 40% at 90% 20%, rgba(90, 120, 255, .08), transparent 70%),
    radial-gradient(40% 45% at 75% 95%, rgba(139, 124, 255, .07), transparent 70%);
  animation-duration: 40s;
}
/* Navigation: getönte Symbole, Akzent nur beim aktiven Bereich */
.fside .nav a .chipi { background: var(--tile-2); color: var(--muted); box-shadow: none; border: 1px solid var(--line); }
.fside .nav a:hover .chipi { transform: none; color: var(--text); }
.fside .nav a.active .chipi { background: var(--signal); color: #fff; border-color: transparent; box-shadow: 0 6px 16px -8px var(--signal); }
.fside .brand .logo { background: var(--signal); box-shadow: none; }
.fside .brand b i { color: var(--signal-text); }
.fside .avatar-btn { background: var(--signal-soft); color: var(--signal-text); }
.ui-flow .btn.primary { background: var(--signal); box-shadow: 0 8px 22px -12px var(--signal); }
.ui-flow .btn.primary:hover { transform: translateY(-1px); background: #9a8dff; box-shadow: 0 12px 26px -12px var(--signal); }
/* Symbole in Listen/Karten: farbig getönt statt voll gefüllt */
.ui-flow .ico, .ui-flow .list-row .ic { color: var(--c, var(--signal)); background: color-mix(in srgb, var(--c, var(--signal)) 14%, transparent); box-shadow: none;
  border: 1px solid color-mix(in srgb, var(--c, var(--signal)) 22%, transparent); }
.ui-flow .mono-ic { color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 22%, transparent); }
.ui-flow .drop .big { background: var(--signal); }
.ui-flow .how li::before { background: none; color: var(--signal-text); -webkit-background-clip: initial; background-clip: initial; }
.ui-flow .seg-ind { background: var(--signal); }
.ui-flow .mobile-nav a.active { background: var(--signal) !important; }

/* Startseite: ruhige Glas-Kachel statt Farbbanner */
.fd-hello { color: var(--text); background: linear-gradient(140deg, rgba(139, 124, 255, .16), rgba(139, 124, 255, .03) 55%, rgba(255, 255, 255, .02));
  border: 1px solid var(--line-2); box-shadow: 0 30px 60px -40px rgba(0, 0, 0, .9); }
.fd-hello::before { background: radial-gradient(closest-side, rgba(139, 124, 255, .25), transparent); width: 340px; height: 340px; right: -60px; top: -120px; }
.fd-hello::after { display: none; }
.fd-hello h1 { color: var(--text); font-weight: 700; }
.fd-hello p { color: var(--muted); }
.fd-search svg { color: var(--muted); }
.fd-search .input { background: rgba(0, 0, 0, .28); color: var(--text); border: 1px solid var(--line-2); box-shadow: none; }
.fd-search .input::placeholder { color: var(--dim); }
.fd-search .input:hover { border-color: var(--line-3); }
.fd-search .kbd { background: var(--tile-2); color: var(--muted); border-color: var(--line-2); }
.fd-stat .n { font-weight: 700; }
.fd-stat .l i { background: var(--tile-2); color: var(--muted); border: 1px solid var(--line); }
.fd-app .ai { background: var(--tile-2); color: var(--text-2); box-shadow: none; border: 1px solid var(--line-2); transition: background var(--t), color var(--t), border-color var(--t); }
.fd-app:hover { transform: translateY(-2px); }
.fd-app:hover .ai { background: var(--signal); color: #fff; border-color: transparent; }
.ui-flow .ecard:hover, .ui-flow .tcard:hover, .ui-flow .mcard:hover, .ui-flow .hit:hover { transform: translateY(-2px); }
