/* Kund:innen-App & Landing – baut auf /shared.css (Designsystem v2) auf */

/* =============================== Landing =============================== */
.landing { background: var(--surface); min-height: 100dvh; }
.l-wrap { width: min(1160px, 100% - 40px); margin: 0 auto; }
.l-nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--border); }
.l-nav-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.l-links { display: flex; gap: 22px; }
.l-links a { color: var(--text-muted); font-size: var(--fs); font-weight: 500; }
.l-links a:hover { color: var(--text); text-decoration: none; }
.l-nav .btn .icon-slot, .l-nav .btn .icon { margin-right: -2px; }

.l-hero { position: relative; overflow: hidden; padding: 72px 0 88px; border-bottom: 1px solid var(--border); }
.l-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.55;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 70% 60% at 70% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 30%, #000 20%, transparent 75%);
}
.l-hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 56px; align-items: center; }
.l-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sm); font-weight: 550; color: var(--text-muted); padding: 5px 12px 5px 10px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-xs); margin-bottom: 20px; }
.l-hero h1 { font-size: var(--fs-3xl); line-height: 1.04; letter-spacing: -0.035em; font-weight: 700; margin: 0 0 18px; }
.l-accent { color: var(--accent); }
.l-lead { font-size: 18px; line-height: 1.55; color: var(--text-muted); max-width: 54ch; margin: 0 0 28px; }
.l-login { padding: 18px; max-width: 520px; position: relative; box-shadow: var(--shadow-lg); }
.l-anchor { position: absolute; top: -96px; }
.l-login-row { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 10px; }
.l-login .field { margin-bottom: 12px; }
.l-login .btn-lg .icon-slot { transition: transform 0.15s var(--ease); }
.l-login .btn-lg:hover .icon-slot { transform: translateX(2px); }
.l-login-note { margin: 12px 0 0; text-align: center; }

.l-hero-visual { position: relative; }
.l-mock { overflow: hidden; box-shadow: var(--shadow-lg); border-radius: var(--radius-lg); }
.l-mock-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: var(--fs-sm); }
.l-mock-head img { border-radius: 6px; }
.l-mock-body { display: flex; flex-direction: column; gap: 10px; padding: 16px 16px 44px; background: var(--bg); font-size: 13.5px; }
.l-bubble { max-width: 86%; padding: 9px 12px; border-radius: 14px; line-height: 1.45; }
.l-bubble.me { align-self: flex-end; background: var(--ink); color: var(--ink-text); border-bottom-right-radius: 5px; }
.l-bubble.ai { background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 5px; }
.l-event { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.l-event strong { font-size: 13px; }
.l-ev-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--info-soft); color: var(--info); flex: none; }
.l-event.warn .l-ev-icon { background: var(--warn-soft); color: var(--warn); }
.l-float { position: absolute; right: 28px; bottom: -24px; display: flex; gap: 10px; align-items: center; padding: 10px 14px 10px 10px; box-shadow: var(--shadow-lg); }

.l-section { padding: 88px 0; }
.l-alt { background: var(--bg); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.l-section-head { max-width: 640px; margin-bottom: 40px; }
.l-section h2 { font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -0.03em; line-height: 1.12; margin: 8px 0 0; }
.l-sub { color: var(--text-muted); font-size: 16.5px; margin: 12px 0 0; max-width: 60ch; }
.l-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.l-step { position: relative; padding: 24px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); }
.l-step h3, .l-feature h3 { margin: 16px 0 6px; font-size: 16.5px; }
.l-step p, .l-feature p { margin: 0; color: var(--text-muted); font-size: var(--fs); }
.l-step-no { position: absolute; top: 20px; right: 22px; font-size: 13px; font-weight: 650; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.l-services { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.l-service { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.l-service strong { display: block; font-size: 14px; }
.l-service span.t { display: block; font-size: 12.5px; color: var(--text-muted); margin-top: 1px; }
.l-features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.l-split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.l-checks { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-direction: column; gap: 10px; }
.l-checks li { display: flex; gap: 10px; align-items: center; }
.l-checks li .icon-slot { width: 22px; height: 22px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); }
.l-checks li .icon { width: 14px; height: 14px; }
.l-code { overflow: hidden; }
.l-code-head, .l-code-foot { display: flex; align-items: center; gap: 8px; padding: 10px 14px; }
.l-code-head { border-bottom: 1px solid var(--border); }
.l-code-head a { display: inline-flex; align-items: center; gap: 4px; }
.l-code-head .icon { width: 14px; height: 14px; }
.l-code-foot { border-top: 1px solid var(--border); background: var(--surface-2); }
.l-code pre { margin: 0; padding: 18px; font-family: var(--mono); font-size: 13px; line-height: 1.6; overflow-x: auto; color: var(--text); }
.l-swap { display: flex; gap: 20px; align-items: center; padding: 24px; }
.l-swap-copy { flex: 1; }
.l-swap h3 { font-size: 18px; margin-bottom: 4px; }
.l-swap p { margin: 0; color: var(--text-muted); max-width: 70ch; }
.l-footer { border-top: 1px solid var(--border); padding: 28px 0 40px; }
.l-footer-inner { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.l-footer .brand { font-size: 15px; }
.l-footer .brand img { width: 24px; height: 24px; }
.l-footer a.small { color: var(--text-muted); }

@media (max-width: 1000px) {
  .l-hero-grid, .l-split { grid-template-columns: 1fr; gap: 48px; }
  .l-hero { padding: 48px 0 72px; }
  .l-hero-visual { max-width: 520px; }
  .l-features { grid-template-columns: 1fr 1fr; }
  .l-links { display: none; }
}
@media (max-width: 640px) {
  .l-wrap { width: calc(100% - 32px); }
  .l-nav-inner { gap: 10px; height: 58px; }
  .l-hide-sm { display: none; }
  .l-hero { padding: 32px 0 64px; }
  .l-lead { font-size: 16.5px; }
  .l-login-row { grid-template-columns: 1fr; gap: 0; }
  .l-steps, .l-features { grid-template-columns: 1fr; }
  .l-section { padding: 60px 0; }
  .l-float { right: 12px; bottom: -22px; }
  .l-swap { flex-direction: column; align-items: flex-start; }
}

/* ================================ App ================================= */
.c-app { display: grid; grid-template-columns: 264px minmax(0, 1fr) 372px; height: var(--app-h, 100dvh); background: var(--surface); }

/* --- Sidebar --- */
.c-side { display: flex; flex-direction: column; gap: 4px; min-height: 0; padding: 12px 10px; background: var(--bg); border-right: 1px solid var(--border); }
.c-side-top { display: flex; align-items: center; padding: 4px 6px 10px; }
.c-side-top .brand { flex: 1; }
.c-side-close { display: none; }
.c-new { justify-content: flex-start; margin-bottom: 8px; background: var(--surface); }
.c-nav { display: flex; flex-direction: column; gap: 1px; }
.c-side .nav-section { margin-top: 16px; }
.c-history { flex: 1; min-height: 60px; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; margin: 0 -2px; padding: 0 2px; }
.c-hist-item { display: flex; flex-direction: column; gap: 1px; width: 100%; padding: 7px 10px; border: none; border-radius: var(--radius-sm); background: none; text-align: left; cursor: pointer; color: var(--text-muted); }
.c-hist-item:hover { background: var(--surface-2); color: var(--text); }
.c-hist-item.current { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); outline: 1px solid var(--border); }
.c-hist-item .t { font-size: 13.5px; font-weight: 500; }
.c-hist-item .d { font-size: 11.5px; color: var(--text-faint); }
.c-hist-empty { padding: 6px 10px; font-size: var(--fs-sm); color: var(--text-faint); }
.c-side-foot { border-top: 1px solid var(--border); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.c-credits { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); cursor: default; }
.c-credits strong { color: var(--text); font-size: 13.5px; }
.c-user { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border: none; border-radius: var(--radius-sm); background: none; cursor: pointer; text-align: left; color: var(--text-muted); }
.c-user:hover, .c-user[aria-expanded="true"] { background: var(--surface-2); }
.c-user-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.c-user-text strong { color: var(--text); font-size: 13.5px; font-weight: 600; }

.menu-wrap { position: relative; }
.menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); padding: 6px; z-index: 50; box-shadow: var(--shadow-lg); animation: fade 0.12s; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; border-radius: 7px; background: none; border: none; cursor: pointer; text-decoration: none; color: var(--text); font-size: 13.5px; }
.menu-item:hover { background: var(--surface-2); text-decoration: none; }
.menu-item .icon { color: var(--text-muted); }
.menu-sep { height: 1px; background: var(--border); margin: 5px 2px; }
.menu-theme { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 4px 4px 10px; }
.menu-theme .segmented button { padding: 4px 8px; display: grid; place-items: center; }
.menu-theme .icon { width: 15px; height: 15px; }

.c-scrim { display: none; }

/* --- Main / chat --- */
.c-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.c-top { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 16px 0 20px; border-bottom: 1px solid var(--border); flex: none; }
.c-title { font-weight: 600; font-size: 14.5px; min-width: 0; }
.c-menu-toggle { display: none; }
.c-live { display: inline-flex; align-items: center; gap: 7px; }
.tasks-toggle { display: none; }
.tasks-toggle .count { background: var(--accent); color: #fff; border-radius: 99px; padding: 0 6px; font-size: 11.5px; line-height: 17px; min-width: 18px; text-align: center; }
.tasks-toggle .count[data-n="0"] { display: none; }

.chat { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.messages { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 28px 20px 12px; scroll-behavior: smooth; }
.messages > * { max-width: 760px; margin-left: auto; margin-right: auto; }
.c-bottom { flex: none; padding: 0 20px; background: linear-gradient(to bottom, transparent, var(--surface) 30%); }
.c-bottom > * { max-width: 760px; margin-left: auto; margin-right: auto; }

/* Welcome */
.welcome { padding: 7vh 0 16px; }
.welcome-mark { width: 44px; height: 44px; border-radius: 12px; margin-bottom: 18px; box-shadow: var(--shadow); }
.welcome h1 { font-size: clamp(24px, 3.6vw, 32px); letter-spacing: -0.03em; line-height: 1.15; margin: 0 0 10px; }
.welcome p { color: var(--text-muted); margin: 0 0 24px; max-width: 60ch; font-size: 15px; }
.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.service-card {
  display: flex; gap: 12px; align-items: center; text-align: left; padding: 10px 12px; cursor: pointer;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text);
  transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
}
.service-card:hover { border-color: var(--border-strong); background: var(--surface-2); }
.service-card:hover .svc-icon { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.service-card strong { display: block; font-size: 13.5px; font-weight: 600; }
.service-card span.t { display: block; font-size: 12px; color: var(--text-muted); line-height: 1.35; margin-top: 1px; }

/* Messages */
.msg { display: flex; gap: 12px; margin-bottom: 20px; }
.msg .time { font-size: 11px; color: var(--text-faint); white-space: nowrap; }
.msg.user { justify-content: flex-end; align-items: flex-end; gap: 8px; }
.msg.user .bubble { background: var(--surface-3); color: var(--text); padding: 9px 14px; border-radius: 18px 18px 6px 18px; max-width: min(600px, 84%); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.user.pending .bubble { opacity: 0.6; }
.msg.user.error .bubble { outline: 1px solid var(--danger); }
.msg.assistant { align-items: flex-start; }
.msg.assistant .avatar { margin-top: 1px; }
.msg.assistant .m-col { flex: 1; min-width: 0; }
.msg.assistant .m-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.msg.assistant .m-head strong { font-size: 13.5px; }
.msg.assistant .bubble { line-height: 1.6; overflow-wrap: anywhere; }
.msg.error .bubble { color: var(--danger); }
.reply-ref { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-muted); margin-bottom: 3px; cursor: pointer; }
.reply-ref .icon { width: 13px; height: 13px; }

/* System events (Rückfragen, Updates, …) */
.event { display: flex; gap: 12px; margin-bottom: 20px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-xs); }
.ev-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--text-muted); }
.ev-body { flex: 1; min-width: 0; }
.ev-kind { font-size: 12px; font-weight: 650; color: var(--text-muted); margin-bottom: 2px; display: flex; align-items: center; gap: 8px; }
.ev-kind .pill { font-weight: 600; }
.ev-text { font-size: 14px; }
.ev-answer { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--ok-soft); font-size: 13.5px; }
.ev-answer .icon { color: var(--ok); margin-top: 2px; }
.ev-meta { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.event .hint { font-size: 12.5px; color: var(--text-muted); margin-top: 6px; }
.event .hint a { font-weight: 550; }
.ref-link { cursor: pointer; }
.ref-link:hover { background: var(--surface-3); color: var(--text); }
.reply-btn { display: inline-flex; align-items: center; gap: 5px; border: none; background: none; color: var(--text-muted); font-size: 12.5px; font-weight: 550; cursor: pointer; padding: 3px 8px; border-radius: 6px; }
.reply-btn:hover { background: var(--surface-2); color: var(--text); }
.reply-btn .icon { width: 14px; height: 14px; }

.event.k-question, .event.k-question_reminder { border-color: color-mix(in srgb, var(--warn) 45%, var(--border)); box-shadow: 0 0 0 3px var(--warn-soft); }
.event.k-question .ev-icon, .event.k-question_reminder .ev-icon, .event.k-confirm_reminder .ev-icon, .event.k-reassigned .ev-icon, .event.k-searching .ev-icon { background: var(--warn-soft); color: var(--warn); }
.event.answered { box-shadow: var(--shadow-xs); border-color: var(--border); }
.event.answered .ev-icon { background: var(--ok-soft); color: var(--ok); }
.event.k-assigned .ev-icon, .event.k-update .ev-icon { background: var(--info-soft); color: var(--info); }
.event.k-submitted .ev-icon, .event.k-auto_answer .ev-icon, .event.k-profile_brief .ev-icon, .event.k-profile .ev-icon { background: var(--violet-soft); color: var(--violet); }
.event.k-completed .ev-icon { background: var(--ok-soft); color: var(--ok); }
.event.k-failed .ev-icon, .event.k-delayed .ev-icon, .event.k-escalation .ev-icon { background: var(--danger-soft); color: var(--danger); }
.event.k-profile { padding: 8px 12px; background: var(--surface-2); box-shadow: none; }
.event.k-profile .ev-icon { width: 24px; height: 24px; border-radius: 7px; }
.event.k-profile .ev-kind { display: none; }
.event.k-profile .ev-text { font-size: 13px; }
.event.k-profile .ev-meta { margin-top: 2px; }

.typing { display: flex; gap: 12px; align-items: center; margin-bottom: 20px; }
.typing .bubble { padding: 8px 0; }

/* Composer */
.quick { display: flex; gap: 6px; flex-wrap: wrap; }
.quick:empty { display: none; }
.quick .chip { margin-bottom: 8px; }
.composer {
  display: flex; gap: 8px; align-items: flex-end; padding: 8px 8px 8px 14px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 16px; box-shadow: var(--shadow);
  transition: border-color 0.12s, box-shadow 0.12s;
}
.composer:focus-within { border-color: color-mix(in srgb, var(--text) 35%, var(--border-strong)); box-shadow: var(--shadow), 0 0 0 3px var(--surface-3); }
.composer-input { flex: 1; border: none; outline: none; resize: none; background: transparent; padding: 7px 0; max-height: 200px; line-height: 1.45; font-size: 15px; }
.composer-input::placeholder { color: var(--text-faint); }
.send { width: 36px; min-height: 36px; padding: 0; border-radius: 10px; }
.send:disabled { opacity: 0.35; }
.composer-hint { text-align: center; margin: 8px 0 12px; }
.composer-hint .kbd { font-size: 10.5px; }

.reply-ctx { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; padding: 8px 8px 8px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; }
.reply-ctx > .icon-slot, .reply-ctx > .icon { color: var(--violet); }
.reply-ctx span.txt { flex: 1; min-width: 0; }

/* --- Tasks panel --- */
.tasks-panel { display: flex; flex-direction: column; min-height: 0; background: var(--bg); border-left: 1px solid var(--border); }
.tasks-head { display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 12px 0 18px; border-bottom: 1px solid var(--border); flex: none; }
.tasks-head h2 { font-size: 14.5px; font-weight: 600; }
.close-panel { display: none; }
.task-list { flex: 1; overflow-y: auto; padding: 4px 12px 16px; }
.task-group { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); margin: 16px 6px 8px; }
.task-group .n { font-variant-numeric: tabular-nums; }
.task-card {
  display: block; width: 100%; text-align: left; cursor: pointer; padding: 12px; margin-bottom: 8px; color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-xs);
  transition: border-color 0.12s, box-shadow 0.12s;
}
.task-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.task-card.needs-you { border-color: color-mix(in srgb, var(--warn) 50%, var(--border)); }
.task-card .tc-top { display: flex; gap: 10px; align-items: flex-start; }
.task-card .tc-title { font-weight: 600; font-size: 13.5px; line-height: 1.35; }
.task-card .tc-sub { display: flex; align-items: center; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.task-card .tc-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--text-muted); margin-top: 10px; }
.task-card .tc-meta span { display: inline-flex; align-items: center; gap: 4px; }
.task-card .tc-meta .icon { width: 13px; height: 13px; color: var(--text-faint); }
.task-card .progress { margin-top: 10px; height: 4px; }
.task-card .tc-alert { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding: 6px 8px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--warn); background: var(--warn-soft); }
.task-card .tc-alert.violet { color: var(--violet); background: var(--violet-soft); }
.task-card .tc-alert.faint { color: var(--text-muted); background: var(--surface-2); font-weight: 500; }
.task-card .tc-alert .icon { width: 14px; height: 14px; }

/* --- Task drawer --- */
.drawer-head .dr-title { flex: 1; min-width: 0; }
.drawer-head .dr-title strong { display: block; font-size: 15px; line-height: 1.3; }
.drawer-body { display: flex; flex-direction: column; gap: 14px; }
.dr-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dr-phase { font-size: var(--fs-sm); color: var(--text-muted); }
.stepper { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.stepper .st { display: flex; flex-direction: column; gap: 6px; font-size: 11px; color: var(--text-faint); }
.stepper .st::before { content: ""; height: 4px; border-radius: 99px; background: var(--surface-3); }
.stepper .st.done::before { background: var(--ok); }
.stepper .st.current::before { background: var(--info); }
.stepper .st.current { color: var(--text); font-weight: 600; }
.dr-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.dr-card > .dr-card-title { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 650; color: var(--text-muted); margin-bottom: 8px; }
.dr-card > .dr-card-title .icon { width: 15px; height: 15px; }
.q-card { border-color: color-mix(in srgb, var(--warn) 45%, var(--border)); box-shadow: 0 0 0 3px var(--warn-soft); }
.q-card .dr-card-title { color: var(--warn); }
.q-card form { display: flex; gap: 6px; margin-top: 10px; }
.result-card .dr-card-title { color: var(--violet); }
.ready-card .dr-card-title { color: var(--ok); }
.fail-card { background: var(--danger-soft); border-color: transparent; color: var(--danger); font-weight: 550; }
.helper-card { display: flex; align-items: center; gap: 12px; }
.star-pick { display: flex; gap: 2px; margin: 10px 0; }
.star-pick button { background: none; border: none; cursor: pointer; color: var(--border-strong); padding: 2px; line-height: 0; }
.star-pick button.on { color: #e5a100; }
.star-pick button.on svg { fill: currentColor; }
.quote-table { width: 100%; font-size: 13.5px; border-collapse: collapse; }
.quote-table td { padding: 5px 0; color: var(--text-muted); }
.quote-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text); }
.quote-table tr.total td { border-top: 1px solid var(--border); font-weight: 650; padding-top: 9px; color: var(--text); }
.auth-note { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); margin-top: 10px; }
.auth-note .icon { margin-top: 1px; flex: none; }
.req-list { margin: 0; padding-left: 18px; font-size: 13.5px; }
.att-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; }
.dr-actions { display: flex; gap: 8px; flex-wrap: wrap; position: sticky; bottom: -18px; margin: 0 -18px -18px; padding: 12px 18px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-top: 1px solid var(--border); }
.timeline .t-body .icon { width: 14px; height: 14px; }

/* --- Freigabe-Regeln --- */
.policy-row { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.policy-row:last-child { border-bottom: none; }
.policy-name { display: flex; align-items: center; gap: 10px; }
.policy-row .lvl { font-size: 12px; color: var(--text-faint); }
.policy-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.seg { display: inline-flex; padding: 2px; gap: 2px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); }
.seg button { border: none; background: none; padding: 5px 10px; font-size: 12.5px; font-weight: 550; border-radius: 7px; cursor: pointer; color: var(--text-muted); }
.seg button.on { background: var(--surface); box-shadow: var(--shadow-xs); }
.seg button.on[data-mode="auto"] { color: var(--ok); }
.seg button.on[data-mode="ask"] { color: var(--info); }
.seg button.on[data-mode="never"] { color: var(--danger); }
.seg button:disabled { opacity: 0.4; cursor: not-allowed; }
.limit { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-muted); }
.limit input { width: 80px; padding: 5px 8px; }

/* --- Responsive --- */
@media (max-width: 1240px) {
  .c-app { grid-template-columns: 248px minmax(0, 1fr); }
  .tasks-toggle { display: inline-flex; }
  .tasks-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(400px, 100vw); z-index: 45; box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform 0.22s var(--ease); visibility: hidden; }
  .tasks-panel.open { transform: none; visibility: visible; }
  .close-panel { display: inline-flex; }
  #tasks-scrim.show { display: block; position: fixed; inset: 0; z-index: 44; background: rgba(10, 14, 20, 0.35); }
}
@media (max-width: 860px) {
  .c-app { grid-template-columns: minmax(0, 1fr); }
  .c-side { position: fixed; top: 0; left: 0; bottom: 0; width: min(300px, 86vw); z-index: 46; box-shadow: var(--shadow-lg); transform: translateX(-100%); transition: transform 0.22s var(--ease); visibility: hidden; }
  .c-side.open { transform: none; visibility: visible; }
  .c-side-close { display: inline-flex; }
  #side-scrim.show { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(10, 14, 20, 0.35); }
  .c-menu-toggle { display: inline-flex; margin-left: -6px; }
  .c-top { padding: 0 12px; gap: 6px; }
  #ai-mode { display: none; }
}
@media (max-width: 640px) {
  .messages { padding: 18px 14px 8px; }
  .c-bottom { padding: 0 12px; }
  .msg.user .bubble { max-width: 88%; }
  .msg.assistant .avatar { display: none; }
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-card { padding: 10px; gap: 10px; min-width: 0; }
  .service-card strong { overflow-wrap: anywhere; hyphens: auto; }
  .service-card span.t { display: none; }
  .welcome { padding-top: 3vh; }
  .composer-hint { display: none; }
  .composer { margin-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .l-hide-xs { display: none; }
  .policy-row { grid-template-columns: 1fr; }
  .policy-controls { justify-content: flex-start; }
  .event { padding: 10px 12px; gap: 10px; }
}
.l-float .svc-icon { background: var(--ok-soft); color: var(--ok); border-color: transparent; }

/* Erzeugte Dokumente im Chat */
.doc-card { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 10px 10px 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); }
.doc-card > .icon { color: var(--danger); flex: none; }
.doc-card .doc-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.doc-card .doc-meta strong { font-size: 13.5px; }
.event.k-document .ev-icon { background: var(--ok-soft); color: var(--ok); }
.event.k-company .ev-icon { background: var(--violet-soft); color: var(--violet); }

/* Freigaben (Profilwissen an externe Humans) */
.event.k-consent { border-color: color-mix(in srgb, var(--violet) 40%, var(--border)); box-shadow: 0 0 0 3px var(--violet-soft); }
.event.k-consent .ev-icon { background: var(--violet-soft); color: var(--violet); }
.consent-actions { display: flex; gap: 8px; margin-top: 10px; }
.event.k-consent.decided { box-shadow: var(--shadow-xs); border-color: var(--border); }
