@font-face { font-family: "Unbounded"; src: url("/static/fonts/Unbounded.ttf") format("truetype"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/static/fonts/Figtree.ttf") format("truetype"); font-weight: 300 900; font-display: swap; }
/* Farben im Stil des KREATIVNOTE-Portals: helle Fläche, weiße Leiste, Blau-Violett als Akzent, Navy für Schrift */
:root {
  --paper: #F5F6FA; --surface: #FFFFFF; --surface-2: #F9FAFD; --line: #E6E8F0; --line-2: #D5D9E5;
  --ink: #1A1F36; --ink-2: #454B63; --muted: #747A90;
  --wine: #FF585A; --wine-ink: #E2393C; --wine-soft: #FFECEC; --apricot: #FF8A68; --apricot-soft: #FFF1EC;
  --frame: #FF585A; --frame-2: rgba(255,255,255,.16); --frame-ink: #FFFFFF; --frame-muted: rgba(255,255,255,.8); --frame-line: rgba(255,255,255,.22);
  --hero-ink: #FFFFFF; --hero-muted: rgba(255,255,255,.82);
  --ok: #1F8A5B; --ok-soft: #E3F4EB; --warn: #B26A00; --warn-soft: #FDF1DC; --bad: #B3261E; --bad-soft: #FBE4E2; --info: #4F5BD5; --info-soft: #E8EAFC;
  --sunset: linear-gradient(120deg, #FF4F55 0%, #FF6A5E 55%, #FF8A68 100%);
  --display: "Unbounded", "Inter Display", "Arial Black", system-ui, sans-serif;
  --body: "Figtree", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r: 16px; --r-sm: 10px; --shadow: 0 1px 2px rgba(26, 29, 58, .04), 0 8px 24px -14px rgba(26, 29, 58, .14);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --paper: #0F1020; --surface: #171932; --surface-2: #1C1E3A; --line: #282B4A; --line-2: #34385C;
  --ink: #EEEFFB; --ink-2: #C9CBE4; --muted: #9598B6;
  --wine: #FF7375; --wine-ink: #FF9294; --wine-soft: #3A1C21; --apricot: #FF9E80; --apricot-soft: #3A2419;
  --frame: #E8484B; --frame-2: rgba(255,255,255,.14); --frame-ink: #FFFFFF; --frame-muted: rgba(255,255,255,.78); --frame-line: rgba(255,255,255,.2);
  --ok: #5BCB95; --ok-soft: #15301F; --warn: #E9B34F; --warn-soft: #362A12; --bad: #F2706B; --bad-soft: #3B1A1C; --info: #9AA3FF; --info-soft: #1E2350;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px -14px rgba(0,0,0,.7); color-scheme: dark; } }
:root[data-theme="dark"] {
  --paper: #0F1020; --surface: #171932; --surface-2: #1C1E3A; --line: #282B4A; --line-2: #34385C;
  --ink: #EEEFFB; --ink-2: #C9CBE4; --muted: #9598B6;
  --wine: #7D90FF; --wine-ink: #9DAAFF; --wine-soft: #1F2A5C; --apricot: #7FC0FF; --apricot-soft: #17304F;
  --frame: #E8484B; --frame-2: rgba(255,255,255,.14); --frame-ink: #FFFFFF; --frame-muted: rgba(255,255,255,.78); --frame-line: rgba(255,255,255,.2);
  --ok: #5BCB95; --ok-soft: #15301F; --warn: #E9B34F; --warn-soft: #362A12; --bad: #F2706B; --bad-soft: #3B1A1C; --info: #9AA3FF; --info-soft: #1E2350;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px -14px rgba(0,0,0,.7); color-scheme: dark; }

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
a { color: var(--wine); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--apricot); outline-offset: 2px; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
.num, td.r, .kpi b { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

/* ---------- Rahmen ---------- */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100%; background: linear-gradient(90deg, var(--frame) 252px, transparent 252px); }
.side { background: var(--frame); color: var(--frame-ink); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { padding: 26px 22px 18px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; }
.brand .wm { font: 800 17px/1 var(--display); letter-spacing: .18em; }
.brand .wm i { font-style: normal; color: var(--wine); }
.brand .tag { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--frame-muted); }
.brand { align-items: flex-start; }
.brand img { width: 74px; height: auto; max-height: 64px; object-fit: contain; }
.auth-art .logo-dark { display: none; }

.auth-art .wb { width: 84px; height: auto; }
.auth-art .wnb { width: min(520px, 100%); height: auto; margin-top: auto; }
.evbtn { display: block; width: calc(100% - 32px); text-align: left; border: 0; font: inherit; color: inherit; cursor: pointer; transition: background .15s; }
.evbtn:hover, .evbtn[aria-expanded="true"] { background: rgba(255,255,255,.24); }
.evbtn.static { cursor: default; }
.evbtn.static:hover { background: rgba(255,255,255,.16); }
.evbtn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.evbtn .evlabel { display: flex; align-items: center; justify-content: space-between; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--frame-muted); font-weight: 700; margin-bottom: 4px; }
.evbtn .evlabel svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.evbtn .evname { font: 700 18px/1.15 var(--display); margin-bottom: 4px; overflow-wrap: anywhere; }
.evbtn span { display: block; }
.evbtn .evarch { display: inline-block; margin-top: 6px; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; background: rgba(0,0,0,.18); color: #fff; padding: 2px 7px; border-radius: 99px; }
.evpop { margin: -8px 16px 14px; background: var(--surface); color: var(--ink); border-radius: 14px; box-shadow: 0 18px 40px -12px rgba(26,31,54,.45); padding: 6px; display: flex; flex-direction: column; gap: 2px; position: relative; z-index: 5; }
.evpop .evhead { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 8px 10px 4px; }
.evpop .evitem { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 0; background: transparent; font: inherit; color: inherit; padding: 8px 10px; border-radius: 10px; cursor: pointer; text-decoration: none; }
.evpop .evitem:hover, .evpop .evitem:focus-visible { background: var(--surface-2); outline: none; }
.evpop .evitem.on { background: rgba(255,88,90,.12); }
.evpop .evitem .evmark { width: 18px; height: 18px; flex: none; color: #D93A3D; }
.evpop .evitem .evmark svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.evpop .evitem .evtxt { display: flex; flex-direction: column; min-width: 0; }
.evpop .evitem b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.evpop .evitem small { font-size: 12px; color: var(--muted); }
.evpop .evfoot { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; display: flex; flex-direction: column; gap: 2px; }
tr.muted-row td { opacity: .62; }
.countdown { margin: 4px 16px 14px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.16); position: relative; overflow: hidden; }
.countdown::before { content: ""; position: absolute; inset: auto 0 0 0; height: 3px; background: rgba(255,255,255,.55); }
.countdown b { font: 700 22px/1.1 var(--display); display: block; }
.countdown b { color: #fff; }
.countdown span { font-size: 12px; color: var(--frame-muted); }
.nav { padding: 6px 10px 18px; display: flex; flex-direction: column; gap: 1px; }
.nav h6 { margin: 14px 12px 6px; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--frame-muted); font-weight: 700; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 12px; color: #fff; text-decoration: none; font-weight: 550; font-size: 14.5px; }
.nav a:hover { background: var(--frame-2); color: var(--frame-ink); }
.nav a.on { background: #fff; color: #D93A3D; font-weight: 700; box-shadow: 0 6px 16px -10px rgba(120, 10, 12, .55); }
.nav a.on .badge { background: #FF585A; color: #fff; }
.nav svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.nav .badge { margin-left: auto; background: #fff; color: #D93A3D; font-size: 11px; font-weight: 800; min-width: 20px; height: 20px; border-radius: 99px; display: grid; place-items: center; padding: 0 6px; }
.side .me { margin-top: auto; padding: 14px 16px 18px; border-top: 1px solid var(--frame-line); display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--sunset); color: #fff; flex: none; }
.side .me .avatar { background: #fff; color: #D93A3D; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.side .me div { min-width: 0; line-height: 1.25; }
.side .me b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .me span { font-size: 12px; color: var(--frame-muted); }
.side .me button { margin-left: auto; background: none; border: 0; color: var(--frame-muted); cursor: pointer; padding: 6px; border-radius: 8px; }
.side .me button:hover { color: var(--frame-ink); background: var(--frame-2); }

.main { min-width: 0; padding: 0 max(16px, env(safe-area-inset-right, 0px)) 60px max(16px, env(safe-area-inset-left, 0px)); }
.top { display: flex; align-items: center; gap: 14px; padding: 26px 18px 18px; max-width: 1280px; margin: 0 auto; flex-wrap: wrap; }
.top h1 { font: 700 26px/1.15 var(--display); letter-spacing: -.01em; }
.top .sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.top > div:nth-child(2) { flex: 1; min-width: 0; }
.top .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.icon-btn.menu-btn { display: none; }
.side > * { flex-shrink: 0; }
.page { max-width: 1280px; margin: 0 auto; padding: 0 18px; display: flex; flex-direction: column; gap: 18px; }

/* ---------- Bausteine ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); min-width: 0; }
.card > header { display: flex; align-items: center; gap: 10px; padding: 16px 18px 0; flex-wrap: wrap; }
.card > header h2 { font: 700 15px/1.3 var(--body); }
.card > header .hint { color: var(--muted); font-size: 13px; }
.card > header .tools { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card .body { padding: 16px 18px 18px; }
.card .flush { padding: 10px 0 4px; }
.grid { display: grid; gap: 18px; align-items: start; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.kpi span { font-size: 12.5px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.kpi b { display: block; font: 700 26px/1.15 var(--display); margin-top: 6px; letter-spacing: -.01em; }
.kpi small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.kpi.hero { background: var(--sunset); border-color: transparent; color: var(--hero-ink); box-shadow: 0 14px 30px -16px rgba(255, 88, 90, .6); }
.kpi.hero span, .kpi.hero small, .kpi.hero small * { color: var(--hero-muted); }

.up { color: var(--ok); } .down { color: var(--bad); }

.meter { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; position: relative; }
.meter i { position: absolute; inset: 0 auto 0 0; background: var(--sunset); border-radius: 99px; }
.meter.plain i { background: var(--wine); }
.meter.over i { background: var(--bad); }
.meter .mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: .55; }

.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); padding: 8px 14px; border-radius: 99px; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap; line-height: 1.3; }
.btn:hover { border-color: var(--ink-2); }
.btn.primary { background: var(--sunset); border-color: transparent; color: #fff; box-shadow: 0 8px 18px -10px rgba(255, 88, 90, .65); }
.btn.primary:hover { filter: brightness(1.06); border-color: transparent; }
.btn.dark { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 5px 11px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: default; }
.btn svg, .icon-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn { border: 0; background: transparent; color: var(--muted); width: 32px; height: 32px; border-radius: 8px; display: inline-grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.pill.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.pill.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.pill.wine { background: var(--wine-soft); color: var(--wine); border-color: transparent; }
.pill.plain::before { display: none; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line-2); background: var(--surface); padding: 5px 12px; border-radius: 99px; cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.chip b { font-weight: 700; color: var(--muted); margin-left: 4px; }
.chip.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.chip.on b { color: inherit; opacity: .7; }

.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th { text-align: left; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 8px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr:hover td { background: var(--surface-2); }
.t tr.click { cursor: pointer; }
.t .r { text-align: right; }
.t .muted, .muted { color: var(--muted); }
.t .strong { font-weight: 650; }
.t tfoot td { font-weight: 700; border-top: 2px solid var(--line-2); }
.empty { padding: 34px 18px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }

label.f { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
label.f small { font-weight: 400; color: var(--muted); }
.in, select.in, textarea.in { width: 100%; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); font-size: 14.5px; }
textarea.in { min-height: 110px; resize: vertical; line-height: 1.55; }
.in:focus { border-color: var(--wine); outline: none; box-shadow: 0 0 0 3px var(--wine-soft); }
.form { display: grid; gap: 14px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--wine); width: 16px; height: 16px; }
.search { position: relative; }
.search input { padding-left: 34px; min-width: 220px; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; stroke: var(--muted); fill: none; stroke-width: 2; }
.switch { position: relative; width: 38px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line-2); border-radius: 99px; cursor: pointer; transition: .15s; }
.switch span::after { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.switch input:checked + span { background: var(--wine); }
.switch input:checked + span::after { transform: translateX(16px); }

.note { padding: 12px 14px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); }
.note.warn { background: var(--warn-soft); border-color: transparent; }
.note.info { background: var(--info-soft); border-color: transparent; }
.note b { color: var(--ink); }
code, .code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--line); padding: 2px 6px; border-radius: 6px; word-break: break-all; }
pre.code { display: block; padding: 12px; white-space: pre-wrap; margin: 0; }
.qrbox { display: grid; place-items: center; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.qrbox svg { width: 210px; height: 210px; max-width: 100%; display: block; }
.qrmanual summary { cursor: pointer; font-size: 14px; color: var(--muted); }
.copy { display: flex; gap: 8px; align-items: center; }
.copy code { flex: 1; min-width: 0; padding: 8px 10px; }

/* Listen & Zeilen */
.list { display: flex; flex-direction: column; }
.li { display: flex; gap: 12px; align-items: center; padding: 11px 18px; border-top: 1px solid var(--line); }
.li:first-child { border-top: 0; }
.li .grow { flex: 1; min-width: 0; }
.li .t1 { font-weight: 600; }
.li .t2 { font-size: 13px; color: var(--muted); }
.due { font-size: 12.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.due.late { color: var(--bad); } .due.soon { color: var(--warn); }
.box { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--line-2); display: grid; place-items: center; cursor: pointer; flex: none; background: var(--surface); }
.box.on { background: var(--ok); border-color: var(--ok); }
.box.on::after { content: ""; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px,-1px); }

/* Diagramme */
.chart { width: 100%; display: block; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--body); }
.chart .grid-l { stroke: var(--line); stroke-width: 1; }
.chart .bar { fill: var(--wine); }
.chart .bar.alt { fill: var(--apricot); }
.chart .bar:hover { opacity: .8; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* Budget-Zeilen */
.budget { display: flex; flex-direction: column; }
.brow { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(120px, 1.6fr) 96px 96px; gap: 14px; align-items: center; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 14px; }
.brow:first-child { border-top: 0; }
.brow.head { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding-top: 4px; padding-bottom: 6px; }
.brow .r { text-align: right; font-variant-numeric: tabular-nums; }
.brow .name { font-weight: 600; }
.brow .name small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }

/* Nachrichten */
.chat { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: 560px; }
.threads { border-right: 1px solid var(--line); overflow-y: auto; max-height: 72vh; }
.thread { display: flex; gap: 10px; padding: 12px 14px; cursor: pointer; border-bottom: 1px solid var(--line); align-items: center; }
.thread:hover { background: var(--surface-2); }
.thread.on { background: var(--wine-soft); }
.thread .grow { min-width: 0; flex: 1; }
.thread b { display: block; font-size: 14px; }
.thread .grow span { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread .badge { background: var(--wine); color: #fff; font-size: 11px; font-weight: 800; border-radius: 99px; min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 6px; }
.conv { display: flex; flex-direction: column; min-width: 0; }
.conv-head { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; max-height: 60vh; background: var(--surface-2); }
.msg { max-width: 72%; display: flex; flex-direction: column; gap: 3px; }
.msg .bubble { padding: 9px 13px; border-radius: 16px 16px 16px 5px; background: var(--surface); border: 1px solid var(--line); white-space: pre-wrap; word-wrap: break-word; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg.mine .bubble { background: var(--wine); color: #fff; border-color: var(--wine); border-radius: 16px 16px 5px 16px; }
.msg.mine .bubble a { color: #fff; }
.msg small { font-size: 11.5px; color: var(--muted); padding: 0 4px; }
.composer { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); align-items: flex-end; }
.composer textarea { min-height: 44px; max-height: 160px; }
.day-sep { align-self: center; font-size: 11.5px; color: var(--muted); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin: 6px 0; }

/* Schichtplan */
.shift-area { display: flex; flex-direction: column; gap: 10px; }
.shift { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); }
.shift .time { font: 700 14px/1.2 var(--display); }
.shift .time small { display: block; font: 500 12px var(--body); color: var(--muted); margin-top: 3px; }
.people { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.person { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 3px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; }
.person .avatar { width: 22px; height: 22px; font-size: 10px; }
.person.ok { border-color: var(--ok); }
.person.no { opacity: .55; text-decoration: line-through; }
.person button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 2px; font-size: 14px; }
.slots { font-size: 12.5px; font-weight: 700; }

/* Vorlagen-Editor */
.editor { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 0; }
.tpl-list { border-right: 1px solid var(--line); max-height: 76vh; overflow-y: auto; }
.tpl-list h6 { margin: 14px 16px 6px; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.tpl { padding: 10px 16px; cursor: pointer; display: flex; gap: 10px; align-items: center; border-left: 3px solid transparent; }
.tpl:hover { background: var(--surface-2); }
.tpl.on { background: var(--wine-soft); border-left-color: var(--wine); }
.tpl .grow { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; }
.tpl .grow small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.dot.off { background: var(--line-2); }
.tpl-edit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.tpl-edit .left { padding: 18px; display: flex; flex-direction: column; gap: 12px; border-right: 1px solid var(--line); }
.tpl-edit .left textarea { min-height: 330px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; }
.preview { background: #ECEEF4; min-height: 520px; display: flex; flex-direction: column; }
.preview .bar2 { padding: 10px 14px; font-size: 12.5px; color: #4E5470; display: flex; gap: 8px; align-items: center; background: #F5F6FA; border-bottom: 1px solid #DFE2EC; }
.preview iframe { border: 0; width: 100%; flex: 1; min-height: 780px; background: #fff; }
.preview .bar2 svg, .card > header h2 svg { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; }
.help-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.help-chips button { border: 1px dashed var(--line-2); background: var(--surface); border-radius: 7px; padding: 3px 8px; font-size: 12px; cursor: pointer; font-family: ui-monospace, Menlo, monospace; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 18px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 12px 6px; margin-right: 14px; font-weight: 650; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--wine); }

/* Dialoge */
.overlay { position: fixed; inset: 0; background: rgba(20, 10, 18, .52); display: grid; place-items: center; z-index: 50; padding: 18px; animation: fade .15s; }
.dialog { background: var(--surface); border-radius: 18px; width: min(560px, 100%); max-height: calc(100vh - 36px); overflow-y: auto; box-shadow: 0 30px 80px -20px rgba(0,0,0,.45); }
.dialog.wide { width: min(860px, 100%); }
.dialog header { padding: 20px 22px 4px; display: flex; align-items: center; gap: 10px; }
.dialog header h3 { font: 700 18px/1.3 var(--display); }
.dialog header .icon-btn { margin-left: auto; }
.dialog .db { padding: 14px 22px; }
.dialog footer { padding: 14px 22px 20px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100%); background: var(--surface); z-index: 51; box-shadow: -20px 0 60px -20px rgba(0,0,0,.35); display: flex; flex-direction: column; animation: slide .18s; }
.drawer .db { padding: 18px 22px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 14px; }
.kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; word-break: break-word; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }

.toasts { position: fixed; bottom: max(18px, env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 60; width: min(440px, calc(100% - 32px)); }
.toast { background: var(--ink); color: var(--paper); padding: 11px 16px; border-radius: 12px; font-size: 14px; box-shadow: 0 12px 30px -10px rgba(0,0,0,.4); display: flex; gap: 10px; align-items: center; animation: fade .2s; }
.toast.err { background: var(--bad); color: #fff; }
.toast::before { content: "✓"; font-weight: 800; color: #FF8A8B; }
.toast.err::before { content: "!"; color: #fff; }

/* Anmeldung */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.auth-art { background: var(--sunset); color: #fff; padding: 48px max(32px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; position: relative; overflow: hidden; }
.auth-art .wm { font: 800 clamp(30px, 4.2vw, 54px)/1.02 var(--display); letter-spacing: .14em; margin-top: auto; }
.auth-art .wm i { font-style: normal; color: rgba(255,255,255,.7); }
.auth-art p { color: rgba(255,255,255,.85); max-width: 40ch; font-size: 16px; }
.auth-art .lake { position: absolute; left: -10%; right: -10%; bottom: -55%; height: 90%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,255,255,.28), rgba(255,255,255,.1) 45%, rgba(255,255,255,0) 72%); pointer-events: none; }
.auth-art .lines { position: absolute; inset: 0; background: repeating-linear-gradient(180deg, transparent 0 22px, rgba(255,255,255,.035) 22px 23px); pointer-events: none; }
.auth-art > * { position: relative; }
.auth-art .small { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.8); }
.auth-form { display: grid; place-items: center; padding: 32px max(20px, env(safe-area-inset-right, 0px)) 32px max(20px, env(safe-area-inset-left, 0px)); }
.auth-form .box2 { width: min(380px, 100%); display: flex; flex-direction: column; gap: 16px; }
.auth-form h1 { font: 700 26px/1.2 var(--display); }
.auth-form .muted { font-size: 14px; }
.linkish { background: none; border: 0; color: var(--wine); cursor: pointer; padding: 0; font-weight: 600; font-size: 14px; }

.skeleton { color: var(--muted); padding: 40px; text-align: center; }
.split { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.big { font: 700 34px/1.1 var(--display); letter-spacing: -.01em; }
.small-caps { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.hstack { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.demo-bar { background: var(--apricot-soft); border-radius: 0 0 12px 12px; color: var(--ink-2); font-size: 13px; padding: 8px 18px; text-align: center; border-bottom: 1px solid var(--line); }

/* ---------- Handy ---------- */
@media (max-width: 1080px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tpl-edit { grid-template-columns: minmax(0, 1fr); } .tpl-edit .left { border-right: 0; border-bottom: 1px solid var(--line); } }
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); background: none; }
  .side { position: fixed; z-index: 40; left: 0; top: 0; bottom: 0; width: 272px; transform: translateX(-100%); transition: transform .2s; height: auto; padding-top: env(safe-area-inset-top, 0px); }
  .side.open { transform: none; box-shadow: 30px 0 80px rgba(0,0,0,.35); }
  .icon-btn.menu-btn { display: inline-grid; }
  .top { padding: 18px 2px 14px; }
  .top h1 { font-size: 21px; }
  .top { align-items: flex-start; }
  .top .actions { margin-left: 0; width: 100%; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 13px 14px; }
  .kpi b { font-size: 20px; }
  .page { padding: 0 2px; }
  .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
  .span2 { grid-column: auto; }
  .chat, .editor { grid-template-columns: minmax(0, 1fr); }
  .threads, .tpl-list { border-right: 0; border-bottom: 1px solid var(--line); max-height: 260px; }
  .brow { grid-template-columns: minmax(0, 1fr) 84px 84px; }
  .brow .bar-col { grid-column: 1 / -1; order: 5; }
  .shift { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-art { min-height: 220px; padding: 28px 20px; }
  .msg { max-width: 88%; }
  .search input { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Verträge: Ablauf, Vertrag erstellen, Fragebogen ---------- */
.note.ok { background: var(--ok-soft); border-color: transparent; }
.note.bad { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.note.info { background: var(--info-soft); }
.callout { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 16px 18px; border-radius: var(--r); background: var(--sunset); color: #fff; box-shadow: 0 14px 30px -18px rgba(255, 88, 90, .7); }
.callout b { display: block; font-size: 16px; }
.callout span { font-size: 14px; opacity: .9; }
.callout .btn.primary { background: #fff; color: #D93A3D; box-shadow: none; }
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 14px 18px 4px; }
.flow .step { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.flow .step b { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--wine); color: #fff; font-size: 12px; }
.builder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.builder-side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pdfbox { padding: 12px; }
.pdfbox iframe { width: 100%; height: 72vh; min-height: 560px; border: 1px solid var(--line); border-radius: 10px; background: #fff; display: block; }
.kv.wide { grid-template-columns: minmax(150px, 260px) minmax(0, 1fr); }
.t.mini th, .t.mini td { padding: 6px 10px; font-size: 13px; }
.qsec > header { align-items: baseline; }
.qnum { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--wine-soft); color: var(--wine-ink); font-weight: 800; font-size: 13px; flex: none; align-self: center; }
.qgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 16px; }
.qf { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.qf.wide, .qf.qcheck { grid-column: 1 / -1; }
.qcheck .check { font-size: 14px; color: var(--ink-2); }
.qf.qcheck.has-err .check span { color: var(--bad); }
.qf label.f { flex-direction: row; gap: 3px; }
.qf small { font-size: 12px; }
.req { color: var(--wine); }
.qf .err { font-style: normal; font-size: 12.5px; color: var(--bad); font-weight: 600; }
.qf.has-err .in { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; align-self: flex-start; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 8px 18px; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.seg label + label span { border-left: 1px solid var(--line-2); }
.seg input:checked + span { background: var(--wine); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--wine); outline-offset: -2px; }
.rows { display: flex; flex-direction: column; gap: 8px; }
.qrow { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) 110px 32px; gap: 8px; align-items: end; }
.qbar { position: sticky; bottom: 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px)); background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(8px); border-top: 1px solid var(--line); margin: 0 -2px; z-index: 5; }
@media (max-width: 1080px) { .builder { grid-template-columns: minmax(0, 1fr); } .builder-side { position: static; } .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .qgrid { grid-template-columns: minmax(0, 1fr); }
  .qrow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .qrow label:first-child { grid-column: 1 / -1; }
  .flow { grid-template-columns: minmax(0, 1fr); }
  .kv.wide { grid-template-columns: minmax(0, 1fr); }
  .kv.wide dd { margin-bottom: 8px; }
  .pdfbox iframe { height: 60vh; min-height: 420px; }
}
body:has(.qbar) .toasts { bottom: calc(90px + env(safe-area-inset-bottom, 0px)); }

/* Stellen & Bewerbungen */
.jobgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; padding: 4px 18px 18px; }
.jobtile { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left; font: inherit; color: inherit; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 16px; cursor: pointer; transition: border-color .15s, transform .15s; }
.jobtile:hover { border-color: #FF585A; transform: translateY(-1px); }
.jobtile b { font-size: 16px; line-height: 1.3; }
.jobtile .jt-foot { margin-top: 6px; width: 100%; display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; }
.in.sm { padding: 6px 10px; font-size: 13.5px; width: auto; }
tr.strong-row td { font-weight: 600; }
td.clip { max-width: 240px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
td.stars, .rate { color: #F2A33A; letter-spacing: 1px; }
.rate { gap: 2px; align-items: center; }
.rate .star { border: 0; background: none; font-size: 22px; line-height: 1; padding: 2px; cursor: pointer; color: var(--line-2); }
.rate .star.on { color: #F2A33A; }
.rate .star:focus-visible { outline: 2px solid #FF585A; border-radius: 4px; }
