/* ═══════════════════ Nico's Assistent · HUD Theme ═══════════════════ */
:root {
  --bg: #131c2e;
  --bg2: #18233a;
  --panel: rgba(31, 43, 67, 0.66);
  --panel-solid: #1f2b45;
  --panel-hi: rgba(44, 60, 92, 0.7);
  --line: rgba(148, 205, 255, 0.18);
  --line-hi: rgba(103, 232, 249, 0.45);
  --cyan: #22d3ee;
  --cyan-hi: #67e8f9;
  --violet: #a78bfa;
  --pink: #f472b6;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #fb7185;
  --text: #f1f6ff;
  --muted: #a6b6ce;
  --dim: #74869f;
  --radius: 14px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Orbitron', 'Inter', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --glow: 0 0 0 1px rgba(148, 205, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.025);
  --s1: 22 32 52;
  --s2: 32 44 68;
  --ov: 9 13 24;
  --ink: 255 255 255;
  --blue: #60a5fa;
  --on-cyan: #ecfeff;
  --on-blue: #e0ecff;
  --on-blue-dim: #c7d7ee;
  --on-violet: #ede9fe;
  --on-red: #fecdd3;
  --on-pink: #f9a8d4;
  --modal-1: #25324e;
  --modal-2: #1c2841;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(34, 211, 238, .35); }
a { color: var(--cyan-hi); text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
svg[viewBox="0 0 24 24"] { width: 15px; height: 15px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -2px; }
kbd {
  font: 500 10.5px var(--mono); padding: 1px 6px; border-radius: 5px;
  border: 1px solid var(--line-hi); background: rgba(34, 211, 238, .06); color: var(--cyan-hi);
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(103, 232, 249, .15); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(103, 232, 249, .3); }
::-webkit-scrollbar-track { background: transparent; }

/* ── Hintergrund ── */
.bg-grid {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(103, 232, 249, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103, 232, 249, .045) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: .55;
  mask-image: radial-gradient(ellipse at 60% 20%, #000 10%, transparent 65%);
}
.bg-glow {
  position: fixed; inset: -20%; pointer-events: none; z-index: 0;
  background:
    radial-gradient(40% 35% at 70% 5%, rgba(124, 58, 237, .10), transparent 70%),
    radial-gradient(35% 30% at 20% 95%, rgba(34, 211, 238, .06), transparent 70%);
  animation: drift 28s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate3d(-3%, 2%, 0) scale(1.05); } }
.scanlines {
  position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .25;
  background: repeating-linear-gradient(to bottom, rgb(var(--ink) / .015) 0 1px, transparent 1px 3px);
}

/* ── Layout ── */
.app { position: relative; z-index: 1; display: grid; grid-template-columns: 236px 1fr; height: 100vh; }
.main { display: flex; flex-direction: column; min-width: 0; height: 100vh; }
.view { flex: 1; overflow: auto; padding: 4px 32px 48px; }

/* ── Sidebar ── */
.sidebar {
  display: flex; flex-direction: column; gap: 14px; padding: 20px 14px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgb(var(--s1) / .85), rgb(var(--s1) / .9));
  backdrop-filter: blur(12px);
}
.logo { display: flex; align-items: center; gap: 11px; padding: 4px 8px 14px; border-bottom: 1px solid var(--line); }
.logo-core { width: 40px; height: 40px; border-radius: 12px; position: relative; display: grid; place-items: center; }
.logo-core img { width: 40px; height: 40px; border-radius: 11px; animation: corepulse 3.2s ease-in-out infinite; }
.logo-core::after {
  content: ''; position: absolute; inset: -5px; border-radius: 15px; border: 1px solid rgba(34, 211, 238, .4);
  animation: ring 3.2s ease-out infinite;
}
.logo-core.thinking img { animation-duration: .8s; filter: hue-rotate(60deg) saturate(1.4); }
.logo-core.thinking::after { animation-duration: .8s; border-color: rgba(167, 139, 250, .6); }
@keyframes corepulse { 50% { filter: drop-shadow(0 0 10px rgba(34, 211, 238, .7)); transform: scale(1.04); } }
@keyframes ring { from { opacity: .9; transform: scale(.92); } to { opacity: 0; transform: scale(1.25); } }
.logo-text { display: flex; flex-direction: column; line-height: 1.05; font-family: var(--display); color: var(--text); }
.logo-text b { font-size: 15px; letter-spacing: .18em; }
.logo-text small { font-size: 9.5px; letter-spacing: .38em; color: var(--cyan); }

.nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: var(--muted); font-weight: 500; position: relative; transition: .18s;
}
.nav a svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav a:hover { color: var(--text); background: rgba(103, 232, 249, .05); }
.nav a.active {
  color: var(--cyan-hi); background: linear-gradient(90deg, rgba(34, 211, 238, .14), rgba(34, 211, 238, .02));
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, .18);
}
.nav a.active::before {
  content: ''; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px;
  background: var(--cyan); box-shadow: 0 0 12px var(--cyan);
}
.nav .badge { margin-left: auto; }

.capture-btn {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center;
  text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(34, 211, 238, .35);
  background: linear-gradient(135deg, rgba(34, 211, 238, .16), rgba(124, 58, 237, .14));
  transition: .2s;
}
.capture-btn:hover { box-shadow: 0 0 30px rgba(34, 211, 238, .28); transform: translateY(-1px); }
.capture-btn .plus { grid-row: span 2; font: 600 22px var(--display); color: var(--cyan-hi); width: 30px; text-align: center; }
.capture-btn .lbl { font-weight: 600; }
.capture-btn kbd { justify-self: start; margin-top: 3px; }

.ai-status { display: flex; align-items: center; gap: 9px; font: 11px var(--mono); color: var(--muted); padding: 4px 8px; letter-spacing: .04em; }
.ai-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.ai-status.on .dot { background: var(--green); box-shadow: 0 0 10px var(--green); animation: blink 2.4s infinite; }
.ai-status.off .dot { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
@keyframes blink { 50% { opacity: .35; } }

/* ── Topbar ── */
.topbar { display: flex; align-items: center; gap: 24px; padding: 22px 32px 18px; }
.crumbs { flex: 1; min-width: 0; }
.crumbs h2 { margin: 0; font: 600 21px var(--display); letter-spacing: .05em; }
.eyebrow { font: 500 10.5px var(--mono); letter-spacing: .22em; color: var(--cyan); text-transform: uppercase; }
.search { position: relative; width: min(380px, 34vw); }
.search svg { position: absolute; left: 12px; top: 50%; translate: 0 -50%; width: 16px; stroke: var(--muted); fill: none; stroke-width: 2; }
.search input {
  width: 100%; padding: 10px 14px 10px 36px; border-radius: 11px; border: 1px solid var(--line);
  background: rgb(var(--s2) / .7); outline: none; transition: .2s;
}
.search input:focus { border-color: var(--line-hi); box-shadow: 0 0 0 3px rgba(34, 211, 238, .08); }
.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 50; display: none;
  background: var(--panel-solid); border: 1px solid var(--line-hi); border-radius: 12px; padding: 6px; max-height: 60vh; overflow: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
}
.search-results.open { display: block; }
.search-results .res { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.search-results .res:hover, .search-results .res.sel { background: rgba(34, 211, 238, .08); }
.search-results .res small { color: var(--muted); margin-left: auto; font-family: var(--mono); font-size: 10.5px; }
.clock { text-align: right; font-family: var(--display); line-height: 1.1; }
.clock span { font-size: 20px; letter-spacing: .08em; color: var(--cyan-hi); text-shadow: 0 0 14px rgba(34, 211, 238, .5); }
.clock small { display: block; font: 11px var(--mono); color: var(--muted); letter-spacing: .08em; }

/* ── Panels ── */
.panel {
  position: relative; background: var(--panel); border-radius: var(--radius); padding: 18px;
  box-shadow: var(--glow); backdrop-filter: blur(14px);
}
.hud::before, .hud::after {
  content: ''; position: absolute; width: 14px; height: 14px; pointer-events: none;
  border: 1.5px solid var(--cyan); opacity: .45;
}
.hud::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; border-top-left-radius: var(--radius); }
.hud::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; border-bottom-right-radius: var(--radius); }
.panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.panel-head h3 { margin: 0; font: 600 12px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.panel-head .spacer { flex: 1; }
.panel-head .count { font: 11px var(--mono); color: var(--muted); }

/* ── Buttons & Inputs ── */
.btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 10px;
  border: 1px solid var(--line-hi); background: rgba(34, 211, 238, .07); color: var(--cyan-hi);
  font-weight: 600; font-size: 13px; transition: .18s; white-space: nowrap;
}
.btn:hover { background: rgba(34, 211, 238, .15); box-shadow: 0 0 16px rgba(34, 211, 238, .2); }
.btn.primary { background: linear-gradient(135deg, #22d3ee, #6366f1); color: #04101c; border-color: transparent; }
.btn.primary:hover { box-shadow: 0 0 24px rgba(34, 211, 238, .45); filter: brightness(1.08); }
.btn.violet { border-color: rgba(167, 139, 250, .45); background: rgba(167, 139, 250, .1); color: var(--on-violet); }
.btn.violet:hover { box-shadow: 0 0 18px rgba(167, 139, 250, .3); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: rgb(var(--ink) / .04); box-shadow: none; }
.btn.danger { border-color: rgba(251, 113, 133, .4); background: rgba(251, 113, 133, .08); color: var(--red); }
.btn.sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn svg, .icon-btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px;
  border: 1px solid var(--line); background: rgb(var(--s2) / .6); color: var(--muted); transition: .18s;
}
.icon-btn:hover { color: var(--cyan-hi); border-color: var(--line-hi); }
.icon-btn.rec { color: var(--red); border-color: var(--red); box-shadow: 0 0 14px rgba(251, 113, 133, .4); animation: blink 1s infinite; }

.input, .select, textarea.input {
  width: 100%; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: rgb(var(--s1) / .7); outline: none; transition: .18s;
}
.input:focus, .select:focus { border-color: var(--line-hi); box-shadow: 0 0 0 3px rgba(34, 211, 238, .08); }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 28px; }
.select option { background: var(--panel-solid); }
input[type="date"], input[type="time"] { color-scheme: dark; }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 500; }
.row { display: flex; gap: 10px; align-items: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.empty { color: var(--dim); text-align: center; padding: 22px 10px; font-size: 13px; }
.empty b { display: block; font: 600 12px var(--display); letter-spacing: .14em; color: var(--muted); margin-bottom: 4px; }

.seg { display: inline-flex; padding: 3px; border-radius: 10px; border: 1px solid var(--line); background: rgb(var(--s1) / .6); }
.seg button { border: 0; background: none; padding: 5px 12px; border-radius: 7px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.seg button.on { background: rgba(34, 211, 238, .15); color: var(--cyan-hi); box-shadow: inset 0 0 0 1px rgba(34, 211, 238, .25); }

.toggle { position: relative; width: 40px; height: 22px; flex: none; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle span { position: absolute; inset: 0; border-radius: 22px; background: rgb(var(--ink) / .08); border: 1px solid var(--line); transition: .2s; cursor: pointer; }
.toggle span::after { content: ''; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; border-radius: 50%; background: var(--muted); transition: .2s; }
.toggle input:checked + span { background: rgba(34, 211, 238, .25); border-color: var(--cyan); }
.toggle input:checked + span::after { left: 20px; background: var(--cyan-hi); box-shadow: 0 0 10px var(--cyan); }

/* ── Badges / Chips ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 20px; min-width: 20px; justify-content: center;
  font: 600 10.5px var(--mono); background: rgba(34, 211, 238, .14); color: var(--cyan-hi); border: 1px solid rgba(34, 211, 238, .3);
}
.badge svg { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 2.2; }
.badge.violet { background: rgba(167, 139, 250, .14); color: var(--on-violet); border-color: rgba(167, 139, 250, .35); }
.badge.pink { background: rgba(244, 114, 182, .14); color: var(--on-pink); border-color: rgba(244, 114, 182, .35); }
.badge.green { background: rgba(52, 211, 153, .12); color: var(--green); border-color: rgba(52, 211, 153, .3); }
.badge.amber { background: rgba(251, 191, 36, .12); color: var(--amber); border-color: rgba(251, 191, 36, .3); }
.badge.red { background: rgba(251, 113, 133, .12); color: var(--red); border-color: rgba(251, 113, 133, .3); }
.badge.dim { background: rgb(var(--ink) / .04); color: var(--muted); border-color: var(--line); }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.chip svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; }
.chip.red { color: var(--red); } .chip.amber { color: var(--amber); } .chip.green { color: var(--green); } .chip.cyan { color: var(--cyan-hi); }
.pdot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; box-shadow: 0 0 8px currentColor; }

/* ── Aufgaben-Zeile ── */
.task {
  display: flex; align-items: flex-start; gap: 11px; padding: 10px 12px; border-radius: 11px;
  border: 1px solid transparent; transition: .15s; cursor: pointer; position: relative;
}
.task:hover { background: rgba(103, 232, 249, .04); border-color: var(--line); }
.task .check {
  width: 19px; height: 19px; flex: none; margin-top: 1px; border-radius: 6px; border: 1.6px solid var(--dim);
  display: grid; place-items: center; transition: .18s; background: transparent; padding: 0;
}
.task .check:hover { border-color: var(--cyan); box-shadow: 0 0 10px rgba(34, 211, 238, .4); }
.task .check svg { width: 12px; height: 12px; stroke: #04101c; stroke-width: 3.2; fill: none; opacity: 0; }
.task.done .check { background: var(--cyan); border-color: var(--cyan); }
.task.done .check svg { opacity: 1; }
.task.done .t-title { color: var(--dim); text-decoration: line-through; }
.task .t-body { flex: 1; min-width: 0; }
.task .t-title { font-weight: 500; overflow-wrap: anywhere; }
.task .t-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 3px; }
.task .prio-bar { position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px; border-radius: 2px; }
.task.p-high .prio-bar { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.task.p-urgent .prio-bar { background: var(--red); box-shadow: 0 0 8px var(--red); }
.task.p-high .check { border-color: rgba(251, 191, 36, .7); }
.task.p-urgent .check { border-color: rgba(251, 113, 133, .8); }
.task.just-done { animation: donepop .5s; }
@keyframes donepop { 40% { background: rgba(34, 211, 238, .14); } }

.group-title { display: flex; align-items: center; gap: 10px; margin: 20px 4px 6px; font: 600 11px var(--font); letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.group-title::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.group-title.red { color: var(--red); }
.group-title.cyan { color: var(--cyan-hi); }

/* ── Vorschläge ── */
.sugg {
  border-radius: 12px; padding: 12px; background: linear-gradient(135deg, rgba(167, 139, 250, .07), rgba(34, 211, 238, .04));
  border: 1px solid rgba(167, 139, 250, .25); display: flex; flex-direction: column; gap: 8px; position: relative; overflow: hidden;
}
.sugg::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 2px; background: linear-gradient(var(--violet), var(--cyan)); }
.sugg-top { display: flex; align-items: center; gap: 8px; }
.sugg-top .conf { margin-left: auto; display: flex; align-items: center; gap: 6px; font: 11px var(--mono); color: var(--muted); }
.sugg-top .conf i { width: 44px; height: 4px; border-radius: 4px; background: rgb(var(--ink) / .08); position: relative; overflow: hidden; }
.sugg-top .conf i::after { content: ''; position: absolute; inset: 0; width: calc(var(--c) * 100%); background: linear-gradient(90deg, var(--violet), var(--cyan)); }
.sugg .s-title { background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 4px 6px; margin: 0 -6px; font-weight: 600; outline: none; width: calc(100% + 12px); }
.sugg .s-title:focus, .sugg .s-title:hover { border-color: var(--line); background: rgba(0, 0, 0, .2); }
.sugg-fields { display: flex; gap: 6px; flex-wrap: wrap; }
.sugg-fields .input, .sugg-fields .select { width: auto; padding: 5px 8px; font-size: 12px; border-radius: 8px; }
.sugg-fields .select { padding-right: 24px; max-width: 170px; }
.sugg .excerpt { font-size: 12px; color: var(--muted); font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sugg-actions { display: flex; gap: 6px; }
.sugg.leaving { animation: leave .3s forwards; }
@keyframes leave { to { opacity: 0; transform: translateX(30px); } }

/* ── Dashboard ── */
.dash { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1fr); gap: 20px; align-items: start; }
.dash .brain-panel { display: flex; flex-direction: column; min-height: calc(100vh - 150px); overflow: hidden; padding: 24px 26px; }
.brain-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; position: relative; z-index: 2; }
.greet { margin: 0 0 4px; font: 600 26px var(--display); letter-spacing: .04em; background: linear-gradient(90deg, var(--on-cyan), var(--cyan-hi) 50%, var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brain-head .sub { color: var(--muted); max-width: 520px; }
.bigclock { font: 500 34px var(--display); color: var(--cyan-hi); text-shadow: 0 0 22px rgba(34, 211, 238, .55); letter-spacing: .05em; line-height: 1; text-align: right; }
.bigclock small { display: block; font: 11px var(--mono); color: var(--muted); letter-spacing: .2em; margin-top: 6px; text-shadow: none; }
.brain-wrap { position: relative; flex: 1; min-height: 380px; margin: 0 -24px; }
.brain-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.readout { position: absolute; font: 10.5px var(--mono); letter-spacing: .14em; color: var(--muted); pointer-events: none; z-index: 2; }
.readout b { display: block; font: 600 20px var(--display); color: var(--text); letter-spacing: .04em; }
.readout.tl { top: 18px; left: 34px; } .readout.tr { top: 18px; right: 34px; text-align: right; }
.readout.bl { bottom: 18px; left: 34px; } .readout.br { bottom: 18px; right: 34px; text-align: right; }
.readout .bar { display: block; width: 110px; height: 3px; margin-top: 6px; background: rgb(var(--ink) / .07); border-radius: 3px; overflow: hidden; }
.readout.tr .bar, .readout.br .bar { margin-left: auto; }
.readout .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--violet)); box-shadow: 0 0 10px var(--cyan); transition: width .8s; }
.brain-state { position: absolute; left: 50%; bottom: 14px; translate: -50% 0; font: 11px var(--mono); letter-spacing: .3em; color: var(--cyan); z-index: 2; pointer-events: none; text-shadow: 0 0 10px var(--cyan); }
.brain-state.thinking { color: var(--violet); text-shadow: 0 0 10px var(--violet); animation: blink .7s infinite; }

.command { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 16px; border-radius: 14px; border: 1px solid var(--line-hi); background: rgb(var(--s1) / .75); position: relative; z-index: 2; box-shadow: 0 0 30px rgba(34, 211, 238, .08); }
.command:focus-within { box-shadow: 0 0 0 3px rgba(34, 211, 238, .1), 0 0 40px rgba(34, 211, 238, .15); }
.command .prompt { font: 700 18px var(--display); color: var(--cyan); }
.command input { flex: 1; background: none; border: 0; outline: none; padding: 9px 0; font-size: 14.5px; }
.chatlog { display: flex; flex-direction: column; gap: 10px; max-height: 220px; overflow: auto; margin-top: 12px; position: relative; z-index: 2; }
.chatlog:empty { display: none; }
.msg { padding: 10px 14px; border-radius: 12px; max-width: 88%; font-size: 13.5px; }
.msg.user { align-self: flex-end; background: rgba(34, 211, 238, .1); border: 1px solid rgba(34, 211, 238, .2); }
.msg.assistant { align-self: flex-start; background: rgba(167, 139, 250, .08); border: 1px solid rgba(167, 139, 250, .22); }
.msg.assistant::before { content: 'ASSISTENT'; display: block; font: 600 9.5px var(--mono); letter-spacing: .25em; color: var(--violet); margin-bottom: 4px; }
.msg p { margin: 0 0 6px; } .msg p:last-child { margin: 0; } .msg ul { margin: 4px 0; padding-left: 18px; }
.msg.typing::after { content: '▍'; animation: blink .6s infinite; color: var(--violet); }

.dash-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat {
  padding: 14px 16px; border-radius: 13px; background: var(--panel); box-shadow: var(--glow); position: relative; overflow: hidden; cursor: pointer; transition: .2s;
}
.stat:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--line-hi), 0 10px 30px rgba(0, 0, 0, .3); }
.stat .v { font: 700 30px var(--display); line-height: 1.1; }
.stat .l { font: 10.5px var(--mono); letter-spacing: .14em; color: var(--muted); text-transform: uppercase; }
.stat::after { content: ''; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(var(--c, var(--cyan)), transparent 70%); opacity: .18; }
.stat.cyan { --c: var(--cyan); } .stat.cyan .v { color: var(--cyan-hi); }
.stat.red { --c: var(--red); } .stat.red .v { color: var(--red); }
.stat.violet { --c: var(--violet); } .stat.violet .v { color: var(--violet); }
.stat.green { --c: var(--green); } .stat.green .v { color: var(--green); }

.agenda { display: flex; flex-direction: column; gap: 2px; max-height: 360px; overflow: auto; }
.agenda .ev { display: flex; gap: 12px; padding: 8px 10px; border-radius: 10px; align-items: center; }
.agenda .ev .time { font: 500 12px var(--mono); color: var(--cyan-hi); width: 46px; flex: none; }
.agenda .ev .bar { width: 3px; align-self: stretch; border-radius: 3px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.agenda .now-line { display: flex; align-items: center; gap: 8px; font: 10px var(--mono); color: var(--red); letter-spacing: .2em; margin: 4px 0; }
.agenda .now-line::after { content: ''; flex: 1; height: 1px; background: var(--red); box-shadow: 0 0 6px var(--red); }

.briefing { font-size: 13.5px; }
.briefing p { margin: 0 0 8px; } .briefing ul { margin: 4px 0 8px; padding-left: 18px; }
.briefing strong { color: var(--cyan-hi); }

.dash-bottom { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.proj-mini { display: flex; flex-direction: column; gap: 12px; }
.proj-mini .pm { cursor: pointer; }
.proj-mini .pm .row { justify-content: space-between; font-size: 13px; }
.progress { height: 5px; border-radius: 5px; background: rgb(var(--ink) / .06); overflow: hidden; margin-top: 6px; }
.progress i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--c, var(--cyan)), var(--violet)); box-shadow: 0 0 10px var(--c, var(--cyan)); transition: width .6s; }
.note-mini { display: flex; flex-direction: column; gap: 4px; }
.note-mini .nm { padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.note-mini .nm:hover { background: rgba(103, 232, 249, .05); }
.note-mini .nm div { font-weight: 500; }
.note-mini .nm small { color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Notizen ── */
.notes-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr) 320px; gap: 18px; height: calc(100vh - 110px); }
.notes-list { display: flex; flex-direction: column; gap: 10px; min-height: 0; padding: 14px; }
.notes-list .items { overflow: auto; display: flex; flex-direction: column; gap: 3px; margin: 0 -6px; padding: 0 6px; }
.note-item { padding: 10px 12px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; transition: .15s; }
.note-item:hover { background: rgba(103, 232, 249, .04); }
.note-item.active { background: rgba(34, 211, 238, .08); border-color: rgba(34, 211, 238, .25); }
.note-item .ttl { font-weight: 600; display: flex; gap: 6px; align-items: center; overflow: hidden; }
.note-item .ttl span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-item .pre { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.note-item .meta { font: 10.5px var(--mono); color: var(--dim); margin-top: 4px; display: flex; gap: 8px; align-items: center; }
.editor { display: flex; flex-direction: column; min-height: 0; padding: 0; overflow: hidden; }
.editor-top { padding: 18px 22px 10px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.editor-title { font: 700 24px var(--font); background: none; border: 0; outline: none; width: 100%; letter-spacing: -.01em; }
.editor-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.editor-tools .select, .editor-tools .input { width: auto; padding: 5px 10px; font-size: 12.5px; }
.editor-tools .select { padding-right: 26px; }
.ai-indicator { margin-left: auto; display: flex; align-items: center; gap: 8px; font: 11px var(--mono); color: var(--muted); letter-spacing: .06em; }
.ai-indicator i { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.ai-indicator.busy { color: var(--violet); } .ai-indicator.busy i { background: var(--violet); box-shadow: 0 0 10px var(--violet); animation: blink .6s infinite; }
.ai-indicator.ok { color: var(--green); } .ai-indicator.ok i { background: var(--green); box-shadow: 0 0 8px var(--green); }
.editor-body { flex: 1; min-height: 0; overflow: auto; }
.editor-body textarea {
  width: 100%; height: 100%; min-height: 100%; resize: none; border: 0; outline: none; background: transparent;
  padding: 18px 22px 60px; font: 14.5px/1.75 var(--font); color: var(--text);
}
.md { padding: 18px 22px 60px; line-height: 1.75; font-size: 14.5px; }
.md h1, .md h2, .md h3 { font-family: var(--display); letter-spacing: .04em; margin: 1em 0 .4em; }
.md h1 { font-size: 22px; } .md h2 { font-size: 17px; color: var(--cyan-hi); } .md h3 { font-size: 14px; }
.md code { font-family: var(--mono); font-size: 12.5px; background: rgba(34, 211, 238, .08); padding: 1px 6px; border-radius: 5px; color: var(--cyan-hi); }
.md ul, .md ol { padding-left: 22px; } .md li.cb { list-style: none; margin-left: -20px; }
.md blockquote { margin: 0; padding-left: 14px; border-left: 2px solid var(--violet); color: var(--muted); }
.md hr { border: 0; height: 1px; background: var(--line); }
.notes-side { display: flex; flex-direction: column; gap: 16px; overflow: auto; min-height: 0; }
.notes-side .panel { padding: 14px; }
.stack { display: flex; flex-direction: column; gap: 8px; }

/* ── Aufgaben ── */
.tasks-layout { max-width: 980px; }
.quickadd { display: flex; flex-direction: column; gap: 8px; }
.quickadd .command { padding-left: 14px; }
.parse-preview { display: flex; gap: 6px; flex-wrap: wrap; min-height: 20px; padding-left: 6px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 14px 0 4px; }
.toolbar .select { width: auto; }

/* ── Kalender ── */
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.cal-head h3 { margin: 0 10px 0 4px; font: 600 20px var(--display); letter-spacing: .05em; min-width: 230px; }
.cal-head .spacer { flex: 1; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.month .dow { font: 600 10.5px var(--mono); letter-spacing: .2em; color: var(--muted); text-align: center; padding: 4px; }
.day {
  min-height: 118px; border-radius: 11px; padding: 6px; background: rgb(var(--s2) / .5); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 3px; transition: .15s; overflow: hidden;
}
.day.other { opacity: .38; }
.day.today { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan), 0 0 22px rgba(34, 211, 238, .2); }
.day.drop { background: rgba(34, 211, 238, .12); border-color: var(--cyan-hi); }
.day .dn { font: 600 12px var(--display); color: var(--muted); display: flex; justify-content: space-between; align-items: center; padding: 0 2px 2px; cursor: pointer; }
.day.today .dn { color: var(--cyan-hi); }
.day .dn .add { opacity: 0; font-size: 15px; color: var(--cyan); }
.day:hover .dn .add { opacity: 1; }
.citem {
  font-size: 11.5px; padding: 3px 7px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer; display: flex; gap: 5px; align-items: center; flex: none;
}
.citem.ev { background: rgba(34, 211, 238, .14); color: var(--cyan-hi); border-left: 2px solid var(--cyan); }
.citem.tk { background: rgba(167, 139, 250, .1); color: var(--on-violet); border-left: 2px solid var(--violet); }
.citem.tk.done { opacity: .45; text-decoration: line-through; }
.citem.tk.overdue { border-left-color: var(--red); background: rgba(251, 113, 133, .1); color: var(--on-red); }
.citem .tm { font-family: var(--mono); font-size: 10px; opacity: .8; }
.citem[draggable="true"] { cursor: grab; }
.more { font-size: 11px; color: var(--muted); padding-left: 6px; cursor: pointer; }

.week-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 16px; }
.week { display: grid; grid-template-columns: 54px repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: rgb(var(--s1) / .5); }
.week .wh { padding: 8px 6px; text-align: center; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); font: 600 11px var(--mono); color: var(--muted); letter-spacing: .1em; }
.week .wh b { display: block; font: 600 18px var(--display); color: var(--text); letter-spacing: 0; }
.week .wh.today b { color: var(--cyan-hi); text-shadow: 0 0 10px var(--cyan); }
.week .allday { border-left: 1px solid var(--line); border-bottom: 1px solid var(--line-hi); padding: 4px; min-height: 40px; display: flex; flex-direction: column; gap: 3px; }
.week .allday.drop { background: rgba(34, 211, 238, .1); }
.week .gutter { font: 10px var(--mono); color: var(--dim); text-align: right; padding-right: 6px; }
.week .gutter div { height: 46px; transform: translateY(-6px); }
.week .col { position: relative; border-left: 1px solid var(--line); }
.week .col .slot { height: 23px; border-bottom: 1px solid rgba(103, 232, 249, .04); }
.week .col .slot:nth-child(2n) { border-bottom-color: rgba(103, 232, 249, .09); }
.week .col .slot.drop { background: rgba(34, 211, 238, .18); }
.week .col.today { background: rgba(34, 211, 238, .03); }
.wblock {
  position: absolute; left: 3px; right: 3px; border-radius: 7px; padding: 3px 6px; font-size: 11.5px; overflow: hidden; cursor: pointer; z-index: 2;
  background: rgba(34, 211, 238, .18); border-left: 3px solid var(--cyan); color: var(--on-cyan); box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
}
.wblock.tk { background: rgba(167, 139, 250, .18); border-left-color: var(--violet); }
.wblock.tk.done { opacity: .5; text-decoration: line-through; }
.wblock .tm { font: 10px var(--mono); opacity: .8; margin-right: 6px; }
.wblock { line-height: 1.35; }
.nowline { position: absolute; left: 0; right: 0; height: 2px; background: var(--red); box-shadow: 0 0 8px var(--red); z-index: 3; pointer-events: none; }
.nowline::before { content: ''; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.unplanned { padding: 14px; display: flex; flex-direction: column; gap: 6px; max-height: calc(100vh - 200px); overflow: auto; }

/* ── Projekte ── */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.pcard { cursor: pointer; display: flex; flex-direction: column; gap: 12px; transition: .2s; overflow: hidden; }
.pcard:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--line-hi), 0 18px 40px rgba(0, 0, 0, .35); }
.pcard .stripe { position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--c); box-shadow: 0 0 16px var(--c); }
.pcard h4 { margin: 0; font: 600 16px var(--font); }
.pcard .goal { color: var(--muted); font-size: 13px; min-height: 20px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .bottom { display: flex; align-items: center; gap: 14px; }
.ring { position: relative; width: 58px; height: 58px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 5; }
.ring .track { stroke: rgb(var(--ink) / .07); }
.ring .val { stroke: var(--c, var(--cyan)); stroke-linecap: round; filter: drop-shadow(0 0 4px var(--c, var(--cyan))); transition: stroke-dashoffset .8s; }
.ring span { position: absolute; inset: 0; display: grid; place-items: center; font: 600 13px var(--display); }
.pdetail-head { display: flex; gap: 18px; align-items: center; margin-bottom: 16px; }
.pdetail-head h2 { margin: 0; font: 700 24px var(--font); }
.pdetail-head .ring { width: 74px; height: 74px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs button { background: none; border: 0; padding: 10px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--cyan-hi); border-bottom-color: var(--cyan); text-shadow: 0 0 12px rgba(34, 211, 238, .5); }
.kanban { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 14px; overflow-x: auto; }
.kcol { background: rgb(var(--s1) / .55); border: 1px solid var(--line); border-radius: 13px; padding: 12px; display: flex; flex-direction: column; gap: 8px; min-height: 300px; }
.kcol.drop { border-color: var(--cyan); background: rgba(34, 211, 238, .06); }
.kcol h5 { margin: 0 0 4px; font: 600 11px var(--display); letter-spacing: .16em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.kcard { padding: 10px 12px; border-radius: 10px; background: var(--panel-hi); border: 1px solid var(--line); cursor: grab; transition: .15s; }
.kcard:hover { border-color: var(--line-hi); }
.kcard.dragging { opacity: .4; }
.kcard .t { font-weight: 500; font-size: 13.5px; }
.kcard .m { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.kadd { background: none; border: 1px dashed var(--line); border-radius: 10px; padding: 8px; color: var(--muted); font-size: 12.5px; width: 100%; outline: none; }
.kadd:focus { border-color: var(--line-hi); border-style: solid; color: var(--text); }
.timeline { position: relative; overflow-x: auto; }
.tl-grid { position: relative; min-width: 700px; }
.tl-scale { display: flex; font: 10px var(--mono); color: var(--muted); border-bottom: 1px solid var(--line); height: 26px; position: relative; }
.tl-scale span { position: absolute; top: 6px; translate: -50% 0; white-space: nowrap; }
.tl-row { position: relative; height: 34px; border-bottom: 1px solid rgba(103, 232, 249, .04); }
.tl-row .lbl { position: absolute; left: 6px; top: 8px; font-size: 12px; color: var(--muted); white-space: nowrap; z-index: 1; pointer-events: none; }
.tl-bar { position: absolute; top: 7px; height: 20px; border-radius: 6px; background: linear-gradient(90deg, var(--c, var(--cyan)), var(--violet)); opacity: .8; box-shadow: 0 0 12px rgba(34, 211, 238, .3); cursor: pointer; min-width: 8px; }
.tl-bar.done { opacity: .3; }
.tl-ms { position: absolute; top: 8px; width: 16px; height: 16px; transform: translateX(-50%) rotate(45deg); background: var(--amber); box-shadow: 0 0 12px var(--amber); }
.tl-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--red); box-shadow: 0 0 8px var(--red); z-index: 2; }
.tl-deadline { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dashed var(--pink); z-index: 2; }

/* ── Modal ── */
.modal-back {
  position: fixed; inset: 0; z-index: 200; background: rgb(var(--ov) / 0.6); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 20px; animation: fade .15s;
}
.modal {
  width: min(620px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: linear-gradient(180deg, var(--modal-1), var(--modal-2));
  border: 1px solid var(--line-hi); border-radius: 16px; padding: 22px; box-shadow: 0 0 60px rgba(34, 211, 238, .15), 0 30px 80px rgba(0, 0, 0, .6);
  animation: pop .2s cubic-bezier(.2, .9, .3, 1.2); display: flex; flex-direction: column; gap: 14px;
}
.modal.wide { width: min(820px, 100%); }
.modal h3 { margin: 0; font: 600 16px var(--display); letter-spacing: .08em; }
.modal .foot { display: flex; gap: 8px; justify-content: flex-end; align-items: center; margin-top: 4px; }
.modal .foot .left { margin-right: auto; display: flex; gap: 8px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.95) translateY(10px); } }
.subtasks { display: flex; flex-direction: column; gap: 4px; }
.subtasks .task { padding: 6px 8px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; background: var(--c); box-shadow: 0 0 10px var(--c); }
.swatches button.on { border-color: #fff; }
.checklist { display: flex; flex-direction: column; gap: 4px; max-height: 50vh; overflow: auto; }
.checklist label { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--line); cursor: pointer; }
.checklist label:hover { background: rgba(34, 211, 238, .04); }
.checklist input { accent-color: var(--cyan); width: 16px; height: 16px; }

/* ── Schnellerfassung ── */
.capture { position: fixed; inset: 0; z-index: 300; display: flex; justify-content: center; align-items: flex-start; padding-top: 16vh; background: rgb(var(--ov) / 0.5); backdrop-filter: blur(8px); }
.capture.hidden { display: none; }
.capture-box {
  width: min(680px, calc(100% - 32px)); background: linear-gradient(180deg, rgb(var(--s2) / .97), rgb(var(--s1) / .97));
  border: 1px solid var(--line-hi); border-radius: 18px; padding: 16px 18px; animation: pop .18s;
  box-shadow: 0 0 0 1px rgba(34, 211, 238, .1), 0 0 80px rgba(34, 211, 238, .22), 0 30px 80px rgba(0, 0, 0, .6);
}
.cap-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.capture textarea { width: 100%; background: transparent; border: 0; outline: none; resize: none; font-size: 18px; line-height: 1.5; padding: 4px 0; }
.cap-preview { display: flex; gap: 6px; flex-wrap: wrap; min-height: 22px; }
.cap-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.cap-foot .hint { font-size: 11.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* ── Toasts ── */
#toasts { position: fixed; right: 22px; bottom: 22px; z-index: 600; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 12px; max-width: 420px;
  background: rgb(var(--s2) / .95); border: 1px solid var(--line-hi); box-shadow: 0 10px 40px rgba(0, 0, 0, .5), 0 0 20px rgba(34, 211, 238, .12);
  animation: tin .25s cubic-bezier(.2, .9, .3, 1.2); font-size: 13.5px;
}
.toast i { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); flex: none; }
.toast.ai i { background: var(--violet); box-shadow: 0 0 10px var(--violet); }
.toast.ok i { background: var(--green); box-shadow: 0 0 10px var(--green); }
.toast.err { border-color: rgba(251, 113, 133, .5); } .toast.err i { background: var(--red); box-shadow: 0 0 10px var(--red); }
.toast button { margin-left: 6px; }
.toast.out { animation: tout .25s forwards; }
@keyframes tin { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes tout { to { opacity: 0; transform: translateX(30px); } }

/* ── Einstellungen ── */
.settings { max-width: 860px; display: flex; flex-direction: column; gap: 18px; }
.settings .panel { display: flex; flex-direction: column; gap: 14px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.setting-row .txt b { display: block; font-weight: 600; } .setting-row .txt small { color: var(--muted); }
.shortcuts { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: 13px; align-items: center; }
.test-out { font: 12px var(--mono); padding: 10px 12px; border-radius: 10px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); white-space: pre-wrap; }

.fade-in { animation: fadeup .35s ease both; }
@keyframes fadeup { from { opacity: 0; transform: translateY(8px); } }

/* ── Responsive ── */
@media (max-width: 1280px) {
  .notes-layout { grid-template-columns: 260px minmax(0, 1fr); }
  .notes-side { grid-column: 1 / -1; flex-direction: row; }
  .notes-side .panel { flex: 1; }
  .notes-layout { height: auto; }
  .editor { min-height: 60vh; }
  .dash-bottom { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1050px) {
  .dash { grid-template-columns: 1fr; }
  .week-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  body { overflow: auto; }
  .app { grid-template-columns: 1fr; height: auto; }
  .sidebar { position: sticky; top: 0; z-index: 20; flex-direction: row; align-items: center; padding: 10px 12px; overflow-x: auto; }
  .logo { border: 0; padding: 0; } .logo-text, .capture-btn .lbl, .capture-btn kbd, .ai-status { display: none; }
  .nav { flex-direction: row; } .nav a span { display: none; } .nav a.active::before { display: none; }
  .capture-btn { display: flex; padding: 8px 10px; } .capture-btn .plus { width: auto; }
  .main { height: auto; } .view { padding: 8px 16px 40px; overflow: visible; }
  .topbar { padding: 14px 16px; flex-wrap: wrap; } .search { width: 100%; order: 3; }
  .notes-layout { grid-template-columns: minmax(0, 1fr); } .notes-side { flex-direction: column; }
  .dash-bottom, .stats { grid-template-columns: 1fr; } .grid2, .grid3 { grid-template-columns: 1fr; }
  .readout { display: none; } .bigclock { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001s !important; transition: none !important; } }

/* ── Aufgeräumtes Dashboard ── */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.kpis div { padding: 10px 12px; border-radius: 11px; background: rgb(var(--ink) / .025); border: 1px solid rgba(103, 232, 249, .07); }
.kpis b { display: block; font: 600 22px var(--display); color: var(--cyan-hi); line-height: 1.1; }
.kpis span { font-size: 11.5px; color: var(--muted); }
.kpis .red b { color: var(--red); } .kpis .green b { color: var(--green); }
.inbox-hint { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: 10px; font-size: 13px; color: var(--on-violet); background: rgba(167, 139, 250, .08); border: 1px solid rgba(167, 139, 250, .2); }
.inbox-hint svg:last-child { margin-left: auto; }
.inbox-hint:hover { background: rgba(167, 139, 250, .14); }
.inbox-hint[hidden] { display: none; }
.panel[hidden] { display: none; }
.command .icon-btn { border-color: transparent; background: transparent; }
.command .icon-btn.send { color: var(--cyan-hi); background: rgba(34, 211, 238, .12); }
.model-chip {
  appearance: none; border: 1px solid var(--line); background: rgb(var(--ink) / .03); color: var(--muted);
  font: 500 11.5px var(--font); padding: 5px 10px; border-radius: 20px; max-width: 170px; cursor: pointer; outline: none;
  text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
}
.model-chip:hover, .model-chip:focus { color: var(--cyan-hi); border-color: var(--line-hi); }
.model-chip option { background: var(--panel-solid); color: var(--text); }
a.model-chip.off { color: var(--amber); border-color: rgba(251, 191, 36, .3); display: inline-block; }
.estimate-row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; margin-top: -4px; }
.estimate-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.adv summary { cursor: pointer; color: var(--muted); font-size: 12.5px; }
details.adv summary:hover { color: var(--text); }

/* ── Kompakte Vorschlagskarten ── */
.sugg { gap: 6px; padding: 12px 14px; }
.sugg-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.sugg .sugg-fields { display: none; padding-top: 4px; }
.sugg.editing .sugg-fields { display: flex; }
.sugg.editing .sugg-meta { display: none; }
.sugg-actions { align-items: center; }
.sugg-actions .grow { flex: 1; }
.sugg .excerpt { font-size: 11.5px; }
body[data-view="dashboard"] .topbar .clock { display: none; }

/* ── Google Kalender ── */
ol.guide { margin: 4px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; line-height: 1.55; }
ol.guide code.uri { padding: 5px 9px; border-radius: 8px; background: rgb(var(--s1) / .7); border: 1px solid var(--line); color: var(--cyan-hi); font-size: 12px; word-break: break-all; }
.citem.ev.g, .wblock.g { background: rgba(96, 165, 250, .16); border-left-color: var(--blue); color: var(--on-blue); }
.gtag { font: 600 9px var(--mono); padding: 0 4px; border-radius: 4px; background: rgba(96, 165, 250, .25); color: var(--on-blue); margin-left: auto; }
.msg.confirm { border-color: rgba(251, 113, 133, .35); background: rgba(251, 113, 133, .07); display: flex; flex-direction: column; gap: 8px; }
.msg.confirm ul { margin: 0; }

/* ═══════════ Kalender (neu) ═══════════ */
.cal-head h3 { min-width: 0; font-size: 18px; }
.cal-filters { display: flex; gap: 12px; font-size: 12.5px; color: var(--muted); }
.cal-filters label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.cal-filters input { accent-color: var(--cyan); }
.gdot { width: 8px; height: 8px; border-radius: 2px; background: var(--blue); display: inline-block; }
a.icon-btn { text-decoration: none; }

.week-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; align-items: start; }
.grid-cal { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: rgb(var(--s1) / .55); }
.g-head { display: grid; border-bottom: 1px solid var(--line-hi); background: rgb(var(--s1) / .7); }
.g-head .wh { padding: 8px 6px 6px; text-align: center; font: 600 11px var(--font); color: var(--muted); letter-spacing: .06em; text-transform: uppercase; border-left: 1px solid var(--line); cursor: pointer; }
.g-head .wh:hover { color: var(--text); }
.g-head .wh b { display: block; font: 600 20px var(--display); color: var(--text); letter-spacing: 0; margin-top: 2px; }
.g-head .wh.today b { color: #04101c; background: var(--cyan); border-radius: 50%; width: 34px; height: 34px; line-height: 34px; margin: 2px auto 0; box-shadow: 0 0 14px rgba(34, 211, 238, .5); font-size: 16px; }
.g-head .gutter-lbl { font-size: 10px; color: var(--dim); text-align: right; padding: 8px 8px 0 0; border-top: 1px solid var(--line); }
.g-head .allday { border-left: 1px solid var(--line); border-top: 1px solid var(--line); padding: 4px; min-height: 34px; display: flex; flex-direction: column; gap: 3px; }
.g-head .allday.drop { background: rgba(34, 211, 238, .12); }
.g-scroll { max-height: calc(100vh - 290px); min-height: 360px; overflow-y: auto; }
.g-body { display: grid; position: relative; }
.g-body .gutter { position: relative; }
.g-body .gutter div { position: absolute; right: 8px; transform: translateY(-7px); font: 10.5px var(--mono); color: var(--dim); }
.g-body .gutter div:first-child { transform: none; }
.g-body .col {
  position: relative; border-left: 1px solid var(--line);
  background-image: repeating-linear-gradient(to bottom, rgba(148, 205, 255, .1) 0 1px, transparent 1px calc(var(--hour) / 2), rgba(148, 205, 255, .04) calc(var(--hour) / 2) calc(var(--hour) / 2 + 1px), transparent calc(var(--hour) / 2 + 1px) var(--hour));
  cursor: copy;
}
.g-body .col.today { background-color: rgba(34, 211, 238, .035); }
.drop-ind { position: absolute; left: 2px; right: 2px; height: 2px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); z-index: 5; pointer-events: none; font: 600 10px var(--mono); color: var(--cyan-hi); }
.drop-ind { text-indent: 4px; line-height: 16px; overflow: visible; white-space: nowrap; }

.wblock {
  position: absolute; right: auto; display: flex; flex-direction: column; gap: 1px; overflow: hidden; cursor: pointer; z-index: 2;
  padding: 4px 7px; border-radius: 7px; font-size: 12px; line-height: 1.3;
  background: rgba(34, 211, 238, .2); border: 1px solid rgba(34, 211, 238, .35); border-left: 3px solid var(--cyan); color: var(--on-cyan);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .18); transition: filter .15s, box-shadow .15s;
}
.wblock:hover { filter: brightness(1.15); box-shadow: 0 4px 16px rgba(0, 0, 0, .3); z-index: 4; }
.wblock .tt { font-weight: 600; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.wblock .tm { font: 10.5px var(--mono); opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; }
.wblock.compact { flex-direction: row; align-items: center; gap: 6px; padding-top: 1px; padding-bottom: 1px; }
.wblock.compact .tt { -webkit-line-clamp: 1; white-space: nowrap; display: block; flex: 1; min-width: 0; }
.wblock.g { background: rgba(96, 165, 250, .2); border-color: rgba(96, 165, 250, .35); border-left-color: var(--blue); color: var(--on-blue); }
.wblock.tk { background: rgba(167, 139, 250, .22); border-color: rgba(167, 139, 250, .4); border-left-color: var(--violet); color: var(--on-violet); }
.wblock.tk.done { opacity: .45; } .wblock.tk.done .tt { text-decoration: line-through; }
/* lange Blöcke (z. B. Arbeitszeit) als dezenter Hintergrund */
.wblock.long { background: repeating-linear-gradient(135deg, rgba(96, 165, 250, .07) 0 8px, rgba(96, 165, 250, .11) 8px 16px); border-color: rgba(96, 165, 250, .2); border-left-color: rgba(96, 165, 250, .6); box-shadow: none; color: var(--on-blue-dim); }
.wblock.long:not(.g) { background: repeating-linear-gradient(135deg, rgba(34, 211, 238, .06) 0 8px, rgba(34, 211, 238, .1) 8px 16px); border-left-color: rgba(34, 211, 238, .6); }
.wblock.dragging, .citem.dragging { opacity: .35; }
.g-body .nowline { left: 0; right: 0; }

.citem { border-radius: 6px; }
.citem.ev.g { background: rgba(96, 165, 250, .16); border-left-color: var(--blue); color: var(--on-blue); }
.g-head .citem { font-size: 11.5px; }

/* Monat */
.day { min-height: 112px; }
.day .dn span[data-goday] { cursor: pointer; padding: 0 4px; border-radius: 6px; }
.day .dn span[data-goday]:hover { background: rgb(var(--ink) / .06); color: var(--text); }
.day.today .dn span[data-goday] { background: var(--cyan); color: #04101c; }
.day .dn .add { cursor: pointer; }

/* Liste */
.agenda-list { padding: 6px 0; }
.agenda-day { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.agenda-day:last-child { border-bottom: 0; }
.agenda-day.today { background: rgba(34, 211, 238, .05); }
.agenda-date { display: flex; align-items: center; gap: 10px; cursor: pointer; align-self: start; padding-top: 4px; }
.agenda-date b { font: 600 24px var(--display); width: 34px; text-align: center; }
.agenda-day.today .agenda-date b { color: var(--cyan-hi); }
.agenda-date span { display: flex; flex-direction: column; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.agenda-date small { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--muted); }
.agenda-items { display: flex; flex-direction: column; gap: 2px; }
.agenda-row { display: flex; align-items: center; gap: 12px; padding: 7px 10px; border-radius: 9px; cursor: pointer; }
.agenda-row:hover { background: rgb(var(--ink) / .04); }
.agenda-row .time { width: 52px; flex: none; font: 500 12px var(--mono); color: var(--cyan-hi); display: flex; flex-direction: column; line-height: 1.25; }
.agenda-row .time small { color: var(--dim); font-size: 10.5px; }
.agenda-row .bar { width: 3px; align-self: stretch; border-radius: 3px; background: var(--cyan); flex: none; }
.agenda-row.g .bar { background: var(--blue); } .agenda-row.g .time { color: var(--on-blue); }
.agenda-row.tk .bar { background: var(--violet); } .agenda-row.tk .time { color: var(--on-violet); }
.agenda-row.done { opacity: .5; } .agenda-row.done .ttl { text-decoration: line-through; }
.agenda-row .ttl { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.agenda-row .ttl small { color: var(--muted); font-size: 12px; }
.agenda-empty { color: var(--dim); font-size: 13px; padding: 8px 10px; }
@media (max-width: 1050px) { .week-wrap { grid-template-columns: 1fr; } .agenda-day { grid-template-columns: 1fr; } }
.week-wrap.no-side { grid-template-columns: minmax(0, 1fr); }
.wblock.long { z-index: 1; }
.wblock.long .tt { -webkit-line-clamp: 1; }

/* ═══════════════════ Heller Modus ═══════════════════ */
html[data-theme="light"] {
  --bg: #eef2f8;
  --bg2: #e4eaf3;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-solid: #ffffff;
  --panel-hi: #f7f9fc;
  --line: rgba(20, 45, 85, 0.12);
  --line-hi: rgba(8, 145, 178, 0.45);
  --cyan: #06b6d4;
  --cyan-hi: #0e7490;
  --violet: #7c3aed;
  --pink: #db2777;
  --green: #059669;
  --amber: #b45309;
  --red: #e11d48;
  --text: #0f1b2d;
  --muted: #55657e;
  --dim: #8796ac;
  --glow: 0 0 0 1px rgba(20, 45, 85, 0.08), 0 6px 20px rgba(20, 45, 85, 0.06);
  --s1: 255 255 255;
  --s2: 255 255 255;
  --ov: 30 41 59;
  --ink: 15 27 45;
  --blue: #2563eb;
  --on-cyan: #0c4a57;
  --on-blue: #1e3a8a;
  --on-blue-dim: #475a7a;
  --on-violet: #4c1d95;
  --on-red: #9f1239;
  --on-pink: #9d174d;
  --modal-1: #ffffff;
  --modal-2: #f6f8fc;
  color-scheme: light;
}
html[data-theme="light"] .bg-glow { opacity: .55; }
html[data-theme="light"] .bg-grid { opacity: .35; }
html[data-theme="light"] .clock span { text-shadow: none; }
html[data-theme="light"] .nav a.active { background: linear-gradient(90deg, rgba(6, 182, 212, .14), rgba(6, 182, 212, .03)); }
html[data-theme="light"] .panel, html[data-theme="light"] .stat { backdrop-filter: none; }
html[data-theme="light"] .modal-back, html[data-theme="light"] .capture { background: rgba(30, 41, 59, .35); }
html[data-theme="light"] .logo-core img { filter: none; }
html[data-theme="light"] ::selection { background: rgba(6, 182, 212, .25); }

/* Umschalter Hell/Dunkel */
.theme-toggle { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line); background: rgb(var(--s1) / .5); color: var(--muted); font-size: 12.5px; cursor: pointer; transition: .15s; }
.theme-toggle:hover { color: var(--text); border-color: var(--line-hi); }
.theme-toggle svg { width: 15px; height: 15px; }
@media (max-width: 820px) { .theme-toggle span { display: none; } }

/* ── Freies Gehirn (kein Kasten) ── */
.dash > * { min-width: 0; }
.dash .brain-panel { background: none; box-shadow: none; backdrop-filter: none; padding: 6px 4px 4px; overflow: visible; position: relative; }
.brain-wrap { margin: 0 -36px; overflow: visible; }
.brain-wrap canvas {
  inset: -40px -10px; width: calc(100% + 20px); height: calc(100% + 80px); cursor: grab; touch-action: none;
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 62%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 62%, transparent 100%);
}
.brain-hint { position: absolute; left: 50%; bottom: 34px; translate: -50% 0; font-size: 11px; color: var(--dim); opacity: 0; transition: opacity .3s; pointer-events: none; white-space: nowrap; z-index: 2; }
.brain-wrap:hover .brain-hint { opacity: 1; }
.dash .brain-panel .command { background: rgb(var(--s1) / .75); backdrop-filter: blur(10px); }
html[data-theme="light"] .dash .brain-panel .command { box-shadow: 0 6px 24px rgba(20, 45, 85, .08); }
html[data-theme="light"] .brain-state { text-shadow: none; color: var(--cyan-hi); }
html[data-theme="light"] .bigclock { text-shadow: none; }

/* ═══════════ Onboarding ═══════════ */
.onb { position: fixed; inset: 0; z-index: 500; overflow-y: auto; background: radial-gradient(60% 50% at 50% 0%, rgba(124, 58, 237, .12), transparent 70%), var(--bg); animation: fade .4s; }
.onb.leaving { animation: fadeout .35s forwards; }
@keyframes fadeout { to { opacity: 0; } }
.onb-inner { max-width: 760px; margin: 0 auto; padding: 0 20px 40px; display: flex; flex-direction: column; align-items: center; }
.onb-brain { position: relative; width: min(560px, 100%); height: 300px; margin-bottom: -10px; }
.onb-brain canvas { position: absolute; inset: 0; width: 100%; height: 100%; -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 60%, transparent 100%); mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 60%, transparent 100%); }
.onb-title { margin: 0; font: 600 26px var(--display); letter-spacing: .03em; text-align: center; background: linear-gradient(90deg, var(--on-cyan), var(--cyan-hi) 50%, var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.onb-sub { margin: 6px 0 22px; color: var(--muted); text-align: center; }
.onb-body { width: 100%; display: flex; flex-direction: column; gap: 14px; }
.onb-card { padding: 18px; border-radius: 14px; background: var(--panel); box-shadow: var(--glow); display: flex; flex-direction: column; gap: 10px; }
.onb-chat { display: flex; flex-direction: column; gap: 10px; max-height: 42vh; overflow-y: auto; padding: 4px 2px; }
.onb-chat .msg { max-width: 90%; font-size: 14px; }
.onb-input { align-items: flex-end; }
.onb-input textarea { flex: 1; background: none; border: 0; outline: none; resize: none; padding: 10px 0; font-size: 14.5px; line-height: 1.45; max-height: 160px; }
.onb-input .prompt { align-self: center; }
.onb-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.onb-review { display: flex; flex-direction: column; gap: 12px; max-height: 52vh; overflow-y: auto; padding-right: 4px; }
.onb-group { padding: 12px 14px; border-radius: 13px; background: var(--panel); box-shadow: var(--glow); }
.onb-gt { font: 600 11.5px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; display: flex; gap: 6px; align-items: center; }
.onb-item { display: flex; gap: 10px; align-items: flex-start; padding: 7px 6px; border-radius: 9px; cursor: pointer; }
.onb-item:hover { background: rgb(var(--ink) / .04); }
.onb-item input { accent-color: var(--cyan); width: 16px; height: 16px; margin-top: 2px; flex: none; }
.onb-item > span { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.onb-item .m { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--muted); }
.onb-item.head b { font-size: 15px; display: flex; align-items: center; gap: 6px; }
.onb-sub-items { margin-left: 26px; border-left: 1px solid var(--line); padding-left: 8px; }
.onb-ms { font-size: 12.5px; color: var(--amber); padding: 3px 6px; }

/* ═══════════════════ Ergänzungen: Live, Stimme, Ordner, Suche, Papierkorb ═══════════════════ */
.sysbar { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.topbar .clock { margin-left: 0; }
.conn { width: 9px; height: 9px; border-radius: 50%; background: var(--dim); flex: none; }
.conn.live { background: var(--green); box-shadow: 0 0 10px var(--green); }
.conn.wait { background: var(--amber); animation: blink 1.4s infinite; }
.conn.off { background: var(--red); box-shadow: 0 0 10px var(--red); }
.wake-ind { font: 10.5px var(--mono); letter-spacing: .16em; color: var(--cyan-hi); border: 1px solid rgba(34, 211, 238, .35); border-radius: 999px; padding: 3px 9px; animation: blink 2.4s infinite; }
.icon-btn.on { color: var(--cyan-hi); border-color: var(--cyan); box-shadow: 0 0 12px rgba(34, 211, 238, .3); }
.brain-state.listening { color: var(--green); text-shadow: 0 0 10px var(--green); animation: blink 1.2s infinite; }

/* Notizen: Suche + Ordner */
.note-search { position: relative; display: flex; align-items: center; }
.note-search > svg { position: absolute; left: 11px; width: 15px; height: 15px; stroke: var(--muted); fill: none; stroke-width: 2; pointer-events: none; }
.note-search input { width: 100%; padding: 9px 34px 9px 34px; border-radius: 10px; border: 1px solid var(--line); background: rgb(var(--s1) / .6); color: var(--text); font: inherit; font-size: 13px; outline: none; }
.note-search input:focus { border-color: var(--line-hi); box-shadow: 0 0 0 3px rgba(34, 211, 238, .08); }
.note-search .icon-btn { position: absolute; right: 4px; width: 26px; height: 26px; border: 0; }
.note-tools { gap: 6px; align-items: center; }
.note-tools .spacer { flex: 1; }
.folders { display: flex; flex-direction: column; gap: 1px; max-height: 38%; overflow: auto; margin: 0 -6px; padding: 2px 6px 8px; border-bottom: 1px solid var(--line); flex: none; }
.folder { display: flex; align-items: center; gap: 6px; padding: 5px 8px 5px calc(6px + var(--d, 0) * 14px); border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--muted); border: 1px dashed transparent; min-height: 30px; }
.folder > svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; flex: none; }
.folder .fname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder .fcount { font: 10.5px var(--mono); color: var(--dim); }
.folder:hover { background: rgba(103, 232, 249, .05); color: var(--text); }
.folder.active { background: rgba(34, 211, 238, .1); color: var(--cyan-hi); }
.folder.active > svg { stroke: var(--cyan); }
.folder.drop { border-color: var(--cyan); background: rgba(34, 211, 238, .12); }
.folder .tw { width: 14px; height: 14px; flex: none; display: grid; place-items: center; background: none; border: 0; padding: 0; color: var(--dim); cursor: pointer; }
.folder .tw svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2.4; transition: rotate .15s; }
.folder .tw.open svg { rotate: 90deg; }
.folder .factions { display: none; gap: 2px; }
.folder:hover .factions { display: flex; }
.folder .factions button { background: none; border: 0; padding: 2px; color: var(--dim); cursor: pointer; border-radius: 5px; display: grid; }
.folder .factions button:hover { color: var(--cyan-hi); background: rgba(103, 232, 249, .08); }
.folder .factions svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; }
.list-head { display: flex; align-items: baseline; justify-content: space-between; font: 600 10.5px var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 2px 4px 0; }
.list-head small { font: 10.5px var(--mono); letter-spacing: 0; text-transform: none; color: var(--dim); }
.note-item .meta { flex-wrap: wrap; row-gap: 2px; white-space: nowrap; }
.note-item .meta svg { width: 10px; height: 10px; stroke: currentColor; fill: none; stroke-width: 2; vertical-align: -1px; margin-right: 3px; }
.note-item .meta .tag { color: var(--violet); }
.note-item .pre.snip { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.4; }
.note-item[draggable="true"] { cursor: grab; }
mark { background: rgba(34, 211, 238, .22); color: var(--cyan-hi); border-radius: 3px; padding: 0 1px; }
html[data-theme="light"] mark { background: rgba(8, 145, 178, .16); color: inherit; }

/* Backups & Papierkorb */
.backup-list { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; max-height: 320px; overflow: auto; }
.backup-list .bk { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; border: 1px solid var(--line); font-size: 13px; }
.backup-list .bk .spacer { flex: 1; }
.backup-list .bk .ttl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46%; }
.backup-list .bk .mono { font: 12px var(--mono); }
.backup-list .icon-btn { width: 28px; height: 28px; }

@media (max-width: 760px) {
  .wake-ind { display: none; }
  .folders { max-height: 180px; }
  .backup-list .bk { flex-wrap: wrap; }
}

[hidden] { display: none !important; }
.notes-list, .editor, .notes-side { min-width: 0; }

/* Chat-Leiste + Verlauf */
.chat-bar { display: flex; align-items: center; gap: 8px; margin-top: 10px; position: relative; z-index: 2; }
.chat-bar .spacer { flex: 1; }
.chat-title { display: inline-flex; align-items: center; gap: 7px; max-width: 70%; background: none; border: 1px solid transparent; border-radius: 9px; padding: 5px 9px; color: var(--muted); font: 500 12.5px var(--font); cursor: pointer; }
.chat-title:hover { border-color: var(--line); color: var(--text); }
.chat-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-title svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; flex: none; }
.chat-title svg:last-child { width: 12px; rotate: 90deg; opacity: .7; }
.chat-list { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow: auto; margin: 10px 0; }
.chat-item { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; transition: .15s; }
.chat-item:hover { border-color: var(--line-hi); background: rgba(34, 211, 238, .04); }
.chat-item.active { border-color: var(--cyan); background: rgba(34, 211, 238, .08); }
.chat-item .ci-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chat-item .ci-body b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-item .ci-body small { font: 10.5px var(--mono); color: var(--dim); }
.chat-item .ci-body .muted { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Agent-Status, Dateien und Quellen im Chat */
.msg.status { color: var(--muted); font-style: italic; }
.msg-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.file-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 10px; border-radius: 9px; border: 1px solid rgba(34, 211, 238, .35); background: rgba(34, 211, 238, .08); color: var(--cyan-hi); font-size: 12.5px; cursor: pointer; max-width: 100%; }
.file-chip:hover { border-color: var(--cyan); }
.file-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; flex: none; }
.file-chip a { display: grid; place-items: center; padding: 3px; border-radius: 6px; color: inherit; }
.file-chip a:hover { background: rgba(34, 211, 238, .15); }
.msg-sources { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 8px; font-size: 11.5px; }
.msg-sources svg { width: 13px; height: 13px; stroke: var(--muted); fill: none; stroke-width: 2; }
.msg-sources a { color: var(--muted); text-decoration: none; border-bottom: 1px dotted var(--dim); }
.msg-sources a:hover { color: var(--cyan-hi); }

/* Dateivorschau */
.file-view { max-height: 65vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; margin: 10px 0; background: rgb(var(--s1) / .5); }
.file-frame { width: 100%; height: 62vh; border: 0; background: #fff; display: block; }
.file-pre { margin: 0; padding: 14px; font: 12.5px/1.5 var(--mono); white-space: pre-wrap; word-break: break-word; }
.file-md { padding: 14px 18px; }
.csv-wrap { overflow: auto; }
table.csv { border-collapse: collapse; width: 100%; font-size: 12.5px; }
table.csv th, table.csv td { border-bottom: 1px solid var(--line); padding: 6px 10px; text-align: left; white-space: nowrap; }
table.csv th { position: sticky; top: 0; background: var(--panel-solid); font-weight: 600; }

/* Wissen */
.knowledge { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.knowledge .panel-head h3 { display: flex; align-items: center; gap: 8px; }
.knowledge .panel-head h3 svg { width: 16px; height: 16px; stroke: var(--cyan); fill: none; stroke-width: 2; }
.k-add { margin-top: 10px; gap: 8px; }
.k-add .input { flex: 1; }
.mem-list { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; max-height: 60vh; overflow: auto; }
.mem { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--line); }
.mem:hover { border-color: var(--line-hi); }
.mem-text { flex: 1; min-width: 0; outline: none; font-size: 13.5px; border-radius: 4px; }
.mem-text:focus { box-shadow: 0 0 0 2px rgba(34, 211, 238, .3); }
.mem small { font: 10.5px var(--mono); white-space: nowrap; }
.mem .icon-btn { width: 26px; height: 26px; }
button.link { background: none; border: 0; padding: 0; color: var(--text); font: inherit; cursor: pointer; text-align: left; }
button.link:hover { color: var(--cyan-hi); text-decoration: underline; }
@media (max-width: 900px) { .knowledge { grid-template-columns: minmax(0, 1fr); } .mem small { display: none; } }

/* Kontrolle: Protokoll, Automationen, Kosten */
.control { display: flex; flex-direction: column; gap: 16px; }
.control > .seg { align-self: flex-start; }
.control > .seg button { display: inline-flex; align-items: center; gap: 6px; }
.control > .seg svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.act-list, .auto-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.act { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.act.undone { opacity: .55; }
.act-head, .auto-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.act-head .spacer, .auto-head .spacer { flex: 1; }
.act-trigger { font-size: 12.5px; color: var(--muted); margin-top: 4px; font-style: italic; }
.act ul { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }
.auto-grid, .cost-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.cost-grid > section:last-child { grid-column: 1 / -1; }
.auto { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.auto.off { opacity: .6; }
.auto-meta .sched { gap: 6px; flex-wrap: wrap; }
.auto-meta .select, .auto-meta .input { width: auto; padding: 4px 8px; font-size: 12.5px; }
.auto-desc { font-size: 13px; }
.auto-last { font-size: 12px; color: var(--muted); }
.auto-last.err { color: var(--red); }
.auto-hit { font-size: 12.5px; color: var(--cyan-hi); }
.cost-big { font: 700 30px var(--display); color: var(--cyan-hi); margin: 6px 0; }
.cost-big small { font: 500 14px var(--font); color: var(--muted); }
.progress.warn i { background: var(--amber); }
.cost-bars { display: flex; align-items: flex-end; gap: 3px; height: 70px; margin: 14px 0 4px; }
.cost-bars i { flex: 1; background: linear-gradient(180deg, var(--cyan), rgba(34, 211, 238, .25)); border-radius: 3px 3px 0 0; min-height: 2px; }
.price-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.price { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.price > span { min-width: 200px; }
.price label { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.price .input { width: 100px; padding: 4px 8px; }
@media (max-width: 1000px) { .auto-grid, .cost-grid { grid-template-columns: minmax(0, 1fr); } }

/* Dokumente & Bedeutungssuche */
.knowledge .k-search { grid-column: 1 / -1; }
.k-search form .input { flex: 1; }
.sem-hits { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.sem-hit { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.sem-hit:hover { border-color: var(--line-hi); background: rgba(34, 211, 238, .04); }
.sem-hit .row { gap: 8px; align-items: center; }
.sem-hit .spacer { flex: 1; }
.dropzone { display: none; align-items: center; justify-content: center; gap: 8px; padding: 18px; margin-top: 10px; border: 2px dashed var(--cyan); border-radius: 12px; color: var(--cyan-hi); }
.dropzone.on { display: flex; }
.dropzone svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.file-row .fr-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.file-row .fr-body small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .fr-body .ttl { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-summary { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: rgba(167, 139, 250, .08); border: 1px solid rgba(167, 139, 250, .25); font-size: 13px; margin-top: 8px; }
.doc-summary.err { background: rgba(251, 113, 133, .08); border-color: rgba(251, 113, 133, .3); }
.doc-summary svg { width: 15px; height: 15px; stroke: var(--violet); fill: none; stroke-width: 2; flex: none; margin-top: 2px; }
.doc-img { max-width: 100%; max-height: 40vh; display: block; margin: 10px auto 0; border-radius: 8px; }
.attach-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; position: relative; z-index: 2; }
.attach-bar:empty { display: none; }
.attach-bar .file-chip button { background: none; border: 0; color: inherit; cursor: pointer; display: grid; padding: 2px; }
.file-chip.busy { opacity: .7; animation: blink 1.4s infinite; }
#cmd-attach { cursor: pointer; }
.brain-panel.drop { outline: 2px dashed var(--cyan); outline-offset: -6px; }

/* Mail-Entwürfe im Chat */
.mail-draft { margin-top: 10px; border: 1px solid rgba(34, 211, 238, .35); border-radius: 10px; padding: 10px 12px; background: rgba(34, 211, 238, .05); display: flex; flex-direction: column; gap: 6px; }
.mail-draft.sent { border-color: rgba(52, 211, 153, .4); }
.mail-draft.discarded { opacity: .6; }
.md-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.md-head svg { width: 14px; height: 14px; stroke: var(--cyan); fill: none; stroke-width: 2; }
.md-body { font-size: 12.5px; color: var(--muted); white-space: pre-wrap; }
.mail-draft .row { gap: 6px; flex-wrap: wrap; }

.steps { margin: 10px 0; padding-left: 20px; font-size: 13px; line-height: 1.6; }
.pair-box { margin-top: 10px; padding: 12px; border-radius: 10px; border: 1px dashed var(--cyan); font-size: 13px; }

.share { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.share-text { white-space: pre-wrap; padding: 12px; border-radius: 10px; background: rgb(var(--s1) / .5); border: 1px solid var(--line); font-size: 13.5px; max-height: 40vh; overflow: auto; }
.share-actions { gap: 8px; flex-wrap: wrap; }
