/* Takōri Support · Stil wie das Takōri Profit Dashboard */
:root {
  color-scheme: light;
  --bg: #f3f3f1; --surface: #ffffff; --surface-2: #f8f8f6; --surface-3: #f1f0ec;
  --border: #e4e4e0; --border-strong: #d2d2cd;
  --ink: #111214; --ink-2: #4f5157; --muted: #8a8b90; --grid: #ececea;
  --sidebar: #16181d; --sidebar-ink: #eceef1; --sidebar-muted: #8c9099; --sidebar-hover: rgba(255,255,255,.07);
  --gold: #c9a96e; --gold-soft: #f6efe1; --gold-ink: #7d6230;
  --pos: #15803d; --pos-bg: #e9f6ee; --neg: #d42a2a; --neg-bg: #fdeeee; --warn: #b26b00; --warn-bg: #fff6e3;
  --info-bg: #eef4fc; --info-ink: #1d4f8f;
  --kunde: #fff8ee; --kunde-border: #f1dfbf; --entwurf: #f4f1fa; --entwurf-border: #d9cdee; --entwurf-ink: #5b3f8f;
  --radius: 12px; --radius-sm: 8px; --shadow: 0 1px 2px rgba(17,18,20,.04);
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sidebar-w: 232px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; width: var(--sidebar-w); flex: none; background: var(--sidebar); color: var(--sidebar-ink);
  display: flex; flex-direction: column; padding: 20px 12px 14px; z-index: 20; }
.brand { display: flex; align-items: center; justify-content: center; padding: 4px 4px 22px; }
.wordmark { font-weight: 500; font-size: 28px; color: #fff; text-decoration: none; line-height: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.wordmark span { font-size: 10px; letter-spacing: .5em; text-transform: uppercase; color: var(--gold); font-weight: 400; padding-left: .5em; }
.sidebar .menu-toggle { display: none; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav-label { font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--sidebar-muted); padding: 16px 12px 6px; font-weight: 500; }
.nav-label:first-child { padding-top: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 9px; text-decoration: none; color: var(--sidebar-ink); font-size: 14.5px; white-space: nowrap; }
.nav a:hover { background: var(--sidebar-hover); }
.nav a.active { background: #fff; color: var(--ink); font-weight: 500; }
.nav a .count { margin-left: auto; background: var(--gold); color: #16181d; border-radius: 10px; font-size: 11px; font-weight: 600; padding: 1px 7px; }
.nav a.active .count { background: #16181d; color: #fff; }
.sidebar-foot { border-top: 1px solid rgba(255,255,255,.08); padding-top: 12px; margin-top: 12px; }
.me { display: flex; align-items: center; gap: 10px; padding: 0 10px 10px; }
.me .who { min-width: 0; }
.me .who b { display: block; font-weight: 500; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .who small { color: var(--sidebar-muted); font-size: 11.5px; }
.collapse-btn { display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: 0; color: var(--sidebar-ink); padding: 9px 12px; border-radius: 9px; cursor: pointer; font-size: 14px; }
.collapse-btn:hover { background: var(--sidebar-hover); }
.main { flex: 1; min-width: 0; padding: 24px 28px 48px; }

/* ---------- Kopfzeile ---------- */
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.titles h1 { margin: 2px 0 2px; font-size: 25px; font-weight: 600; letter-spacing: -.01em; }
.subtitle { margin: 0; color: var(--ink-2); font-size: 13.5px; }
.controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- Buttons & Eingaben ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink); font-weight: 500; cursor: pointer; white-space: nowrap; font-size: 13.5px; }
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .5; cursor: default; }
.btn svg { width: 16px; height: 16px; }
.btn-dark { background: #111214; border-color: #111214; color: #fff; }
.btn-dark:hover { background: #2a2c31; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #16181d; }
.btn-gold:hover { background: #bd9c5f; }
.btn-green { background: var(--pos); border-color: var(--pos); color: #fff; }
.btn-green:hover { background: #126c34; }
.btn-red { color: var(--neg); border-color: #f0c4c4; }
.btn-red:hover { background: var(--neg-bg); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn-xs { height: 26px; padding: 0 8px; font-size: 12px; gap: 5px; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: rgba(0,0,0,.05); }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; color: var(--ink-2); }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn.on { background: #111214; color: #fff; border-color: #111214; }
.icon-btn svg { width: 16px; height: 16px; }
.input, select.input, textarea.input { width: 100%; height: 36px; border: 1px solid var(--border-strong); background: var(--surface); border-radius: var(--radius-sm); padding: 0 11px; font-size: 14px; }
textarea.input { height: auto; min-height: 80px; padding: 9px 11px; line-height: 1.5; resize: vertical; }
select.input { padding-right: 30px; appearance: none; -webkit-appearance: none; cursor: pointer;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111214' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center / 14px; }
.input:focus, .btn:focus-visible, .icon-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.search { padding-left: 34px !important; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8b90' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 11px center / 15px !important; }
label.field { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
label.field .hint, .hint-text { font-weight: 400; color: var(--muted); font-size: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { appearance: none; -webkit-appearance: none; width: 38px; height: 22px; border-radius: 11px; background: var(--border-strong); position: relative; cursor: pointer; transition: background .15s; flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked { background: var(--pos); }
.switch input:checked::after { left: 19px; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 5px 11px; border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: #111214; color: #fff; }
.seg button .n { opacity: .6; margin-left: 4px; font-size: 11.5px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 18px; padding: 4px 12px; font-size: 13px; cursor: pointer; color: var(--ink-2); }
.chip:hover { color: var(--ink); }
.chip.on { background: #111214; color: #fff; border-color: #111214; }

/* ---------- Karten ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card-pad { padding: 16px 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px 0; flex-wrap: wrap; }
.card-title { font-size: 15px; font-weight: 600; margin: 0; display: flex; align-items: center; gap: 8px; }
.card-sub { color: var(--muted); font-size: 12.5px; margin: 2px 0 0; }
.stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.nowrap { white-space: nowrap; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .pos { color: var(--pos); } .neg { color: var(--neg); } .strong { font-weight: 600; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.empty { padding: 34px 20px; text-align: center; color: var(--muted); }

/* KPI-Kacheln */
.kpi-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 13px 16px; box-shadow: var(--shadow); position: relative; text-align: left; cursor: default; }
button.kpi { cursor: pointer; font: inherit; }
button.kpi:hover { border-color: var(--border-strong); }
.kpi.sel { border-color: #111214; box-shadow: 0 0 0 1px #111214; }
.kpi .l { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 7px; }
.kpi .l i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.kpi .v { font-size: 26px; font-weight: 600; margin-top: 3px; letter-spacing: -.01em; }
.kpi .m { font-size: 12.5px; color: var(--muted); }
.delta { font-weight: 500; white-space: nowrap; }
.delta.up-bad, .delta.down-bad { color: var(--neg); } .delta.up-good, .delta.down-good { color: var(--pos); } .delta.neutral { color: var(--ink-2); }

/* Tabellen */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.t th { text-align: left; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); font-weight: 600; padding: 11px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface); }
.t td { padding: 10px 10px; border-bottom: 1px solid var(--grid); vertical-align: middle; }
.t tbody tr:hover td { background: #fafaf8; }
.t tbody tr:last-child td { border-bottom: 0; }
.t .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.t .c { text-align: center; }
.t th:first-child, .t td:first-child { padding-left: 16px; }
.t th:last-child, .t td:last-child { padding-right: 16px; }
.t tr.click { cursor: pointer; }
.t tr.unread td { font-weight: 600; }
.t tr.unread td .sub { font-weight: 400; }
.t td .sub { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.t .subj { max-width: 380px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.t tr.sel td { background: var(--gold-soft) !important; }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px 14px; color: var(--muted); font-size: 12.5px; flex-wrap: wrap; }

/* Pills & Badges */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; white-space: nowrap; border: 1px solid; line-height: 1.4; }
.st-offen { color: #4f5157; border-color: #cfd0cc; background: #f6f6f4; }
.st-wartend { color: #9a6300; border-color: #f0d79b; background: #fff8e6; }
.st-geloest { color: #6b46a8; border-color: #d9cdee; background: #f5f1fb; }
.ei-kritisch { color: #c22a2a; border-color: #f2c2c2; background: #fff1f1; }
.ei-warnung { color: #b26b00; border-color: #f3d9a4; background: #fff7e8; }
.ei-unkritisch { color: #15803d; border-color: #bfe3cd; background: #effaf3; }
.ei-unbekannt { color: var(--muted); border-color: var(--border); background: var(--surface-2); }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; padding: 1px 8px; border-radius: 5px; background: var(--surface-3); border: 1px solid var(--border); color: var(--ink-2); font-weight: 500; white-space: nowrap; }
.tag.gold { background: var(--gold-soft); border-color: #ead9b8; color: var(--gold-ink); }
.tag.demo { background: #eef4fc; border-color: #cfe0f6; color: var(--info-ink); }
.tag button { border: 0; background: none; padding: 0; cursor: pointer; color: var(--muted); line-height: 1; }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11.5px; font-weight: 600; color: #fff; background: #7a756d; flex: none; }
.avatar.lg { width: 40px; height: 40px; font-size: 15px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.rate-up { color: var(--pos); } .rate-down { color: var(--neg); }

/* Banner */
.banners { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.banners:empty { display: none; margin: 0; }
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 10px; border: 1px solid; font-size: 13.5px; }
.banner a { font-weight: 600; }
.banner-warn { background: var(--warn-bg); border-color: #f3dca8; color: #6f4600; }
.banner-info { background: var(--info-bg); border-color: #cfe0f6; color: var(--info-ink); }
.banner-gold { background: var(--gold-soft); border-color: #ead9b8; color: var(--gold-ink); }
.banner-err { background: var(--neg-bg); border-color: #f5c6c6; color: #8f1d1d; }

/* Toast & Modal */
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: #16181d; color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 200; font-size: 13.5px; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: 90vw; }
.toast.err { background: #8f1d1d; }
.modal-bg { position: fixed; inset: 0; background: rgba(17,18,20,.42); z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--surface); border-radius: 14px; width: 560px; max-width: 100%; max-height: 92vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal.wide { width: 920px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 6px; }
.modal-head h3 { margin: 0; font-size: 17px; font-weight: 600; }
.modal-body { padding: 8px 20px 16px; display: flex; flex-direction: column; gap: 12px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 18px; border-top: 1px solid var(--border); }
.spinner { width: 15px; height: 15px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; display: inline-block; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.pop { position: absolute; z-index: 60; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 32px rgba(17,18,20,.16); padding: 6px; min-width: 220px; max-height: 360px; overflow: auto; }
.pop button.item { display: flex; width: 100%; align-items: center; gap: 8px; padding: 7px 10px; border: 0; background: none; border-radius: 7px; cursor: pointer; text-align: left; font-size: 13.5px; }
.pop button.item:hover { background: var(--surface-2); }
.pop button.item.on { font-weight: 600; }

/* ---------- Ticket-Liste ---------- */
.list-tabs { display: flex; align-items: center; gap: 18px; border-bottom: 1px solid var(--border); padding: 0 16px; }
.list-tabs button { border: 0; background: none; padding: 13px 2px 11px; cursor: pointer; color: var(--ink-2); font-size: 14px; border-bottom: 2px solid transparent; display: flex; gap: 7px; align-items: center; }
.list-tabs button.on { color: var(--ink); border-bottom-color: #111214; font-weight: 500; }
.list-tabs button .n { font-size: 11px; border: 1px solid var(--border-strong); border-radius: 6px; padding: 0 6px; color: var(--ink-2); }
.list-tools { display: flex; gap: 10px; align-items: center; padding: 12px 16px; flex-wrap: wrap; border-bottom: 1px solid var(--grid); }
.bulkbar { display: flex; gap: 8px; align-items: center; padding: 8px 16px; background: var(--gold-soft); border-bottom: 1px solid #ead9b8; font-size: 13px; flex-wrap: wrap; }
.ai-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--entwurf-ink); background: var(--entwurf); border: 1px solid var(--entwurf-border); padding: 1px 7px; border-radius: 5px; font-weight: 600; }

/* ---------- Ticket-Detail ---------- */
.tk-head { position: sticky; top: 0; z-index: 15; background: var(--bg); padding: 0 0 12px; margin: -24px -28px 14px; padding: 18px 28px 12px; border-bottom: 1px solid var(--border); }
.tk-head-inner { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.tk-title { display: flex; gap: 10px; align-items: flex-start; min-width: 0; flex: 1; }
.tk-title h1 { font-size: 21px; margin: 0; font-weight: 600; line-height: 1.25; word-break: break-word; }
.tk-title h1 .nr { color: var(--gold-ink); margin-right: 6px; }
.tk-title .meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.tk-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.tk-actions .sep { width: 1px; height: 26px; background: var(--border-strong); margin: 0 4px; }
.thumbs { display: inline-flex; gap: 6px; padding: 3px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border-strong); }
.thumbs button { width: 40px; height: 34px; border-radius: 18px; border: 0; background: none; cursor: pointer; font-size: 18px; display: grid; place-items: center; filter: grayscale(.4); opacity: .75; }
.thumbs button:hover { background: var(--surface-2); opacity: 1; filter: none; }
.thumbs button.up.on { background: var(--pos-bg); opacity: 1; filter: none; box-shadow: inset 0 0 0 1px #bfe3cd; }
.thumbs button.down.on { background: var(--neg-bg); opacity: 1; filter: none; box-shadow: inset 0 0 0 1px #f2c2c2; }
.thumbs-wrap { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.thumbs-wrap small { font-size: 10.5px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.tk-grid { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 16px; align-items: start; }
.thread { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ai-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; justify-content: space-between; flex-wrap: wrap; }
.ai-bar .txt b { display: block; font-weight: 600; }
.ai-bar .txt span { color: var(--muted); font-size: 12.5px; }
.msg { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.msg.ein { background: var(--kunde); border-color: var(--kunde-border); }
.msg.entwurf { background: var(--entwurf); border-color: var(--entwurf-border); box-shadow: 0 0 0 1px var(--entwurf-border); }
.msg-head { display: flex; align-items: center; gap: 10px; padding: 11px 14px 6px; flex-wrap: wrap; }
.msg-head .who { font-weight: 600; }
.msg-head .when { margin-left: auto; color: var(--muted); font-size: 12.5px; }
.msg-tools { display: flex; gap: 5px; padding: 0 14px 6px; flex-wrap: wrap; align-items: center; }
.msg-body { padding: 6px 16px 14px; white-space: pre-wrap; word-break: break-word; font-size: 14.5px; line-height: 1.6; }
.msg-body.en { background: rgba(255,255,255,.55); border-top: 1px dashed var(--border-strong); }
.msg-foot { display: flex; gap: 10px; align-items: center; padding: 8px 14px 10px; border-top: 1px solid rgba(0,0,0,.05); font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.msg.collapsed .msg-body { max-height: 66px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 40%, transparent); mask-image: linear-gradient(#000 40%, transparent); cursor: pointer; }
.lang-flag { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; padding: 1px 6px; border-radius: 4px; background: #16181d; color: #fff; }
.lang-flag.de { background: var(--gold); color: #16181d; }
.draft-note { font-size: 12.5px; color: var(--entwurf-ink); padding: 0 16px 10px; display: flex; flex-direction: column; gap: 4px; }
.draft-note .warn { color: #8f4b00; }
.send-row { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 10px 14px; border-top: 1px solid var(--entwurf-border); background: rgba(255,255,255,.5); flex-wrap: wrap; }
.event { display: flex; justify-content: center; }
.event span { font-size: 12px; color: var(--muted); background: var(--surface-3); border-radius: 12px; padding: 3px 12px; }
.daysep { display: flex; justify-content: center; }
.daysep span { font-size: 12px; font-weight: 500; color: var(--ink-2); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 2px 12px; }
.side { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 108px; max-height: calc(100vh - 120px); overflow-y: auto; padding-bottom: 20px; }
.side .card-pad { padding: 13px 15px; }
.side h4 { margin: 0 0 8px; font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.side h4 .count { font-size: 11px; background: var(--surface-3); border-radius: 8px; padding: 0 7px; color: var(--ink-2); font-weight: 600; }
.kv { display: grid; grid-template-columns: 112px 1fr; gap: 6px 10px; font-size: 13px; align-items: center; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; }
.kv select.input, .kv input.input { height: 30px; font-size: 13px; }
.clv { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #ead9b8; background: var(--gold-soft); border-radius: 10px; margin-top: 10px; }
.clv div { padding: 8px 10px; text-align: center; }
.clv div + div { border-left: 1px solid #ead9b8; }
.clv small { display: block; font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--gold-ink); }
.clv b { font-size: 15px; }
.order { border: 1px solid var(--border); border-radius: 10px; margin-top: 8px; overflow: hidden; }
.order-head { display: flex; align-items: center; gap: 8px; padding: 9px 11px; cursor: pointer; }
.order-head:hover { background: var(--surface-2); }
.order-body { border-top: 1px solid var(--border); padding: 10px 11px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.item-row { display: flex; gap: 8px; justify-content: space-between; border: 1px solid var(--grid); border-radius: 8px; padding: 8px 9px; }
.item-row .nm { font-weight: 500; }
.sumtable { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; border-collapse: collapse; }
.sumtable td { padding: 2px 0; }
.sumtable td:last-child { text-align: right; }
.sumtable tr.tot td { border-top: 1px dashed var(--border-strong); font-weight: 700; padding-top: 5px; }
.todo { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; padding: 6px 0; border-top: 1px solid var(--grid); }
.todo:first-of-type { border-top: 0; }
.todo input { margin-top: 3px; }
.todo.done span { text-decoration: line-through; color: var(--muted); }
.todo .kind { font-size: 10px; letter-spacing: .07em; text-transform: uppercase; font-weight: 700; color: #b26b00; }
.todo .kind.info { color: var(--muted); }
.note { font-size: 13px; padding: 7px 9px; background: #fffdf5; border: 1px solid #f0e6c8; border-radius: 8px; margin-top: 6px; }
.note small { display: block; color: var(--muted); font-size: 11.5px; }

/* ---------- Brain ---------- */
.brain-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.tree { padding: 8px; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; }
.tree .cat { margin-top: 6px; }
.tree .cat-head { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 13.5px; }
.tree .cat-head:hover { background: var(--surface-2); }
.tree .flow { display: flex; align-items: center; gap: 6px; padding: 5px 8px 5px 26px; border-radius: 7px; cursor: pointer; font-size: 13px; color: var(--ink-2); }
.tree .flow:hover { background: var(--surface-2); color: var(--ink); }
.tree .flow.on, .tree .cat-head.on { background: #111214; color: #fff; }
.tree .flow .q { margin-left: auto; font-size: 10.5px; color: #b26b00; font-weight: 700; }
.tree .flow.on .q { color: var(--gold); }
.stufe { border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.stufe-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.stufe-head .nr { width: 26px; height: 26px; border-radius: 50%; background: #111214; color: #fff; display: grid; place-items: center; font-size: 12.5px; font-weight: 600; flex: none; }
.stufe-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.offen-box { background: var(--warn-bg); border: 1px solid #f3dca8; color: #6f4600; border-radius: 10px; padding: 10px 12px; font-size: 13px; white-space: pre-wrap; }
.diff { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; white-space: pre-wrap; background: #fbfbfa; border: 1px solid var(--border); border-radius: 8px; padding: 10px; max-height: 380px; overflow: auto; }
.diff .add { background: #e6f6ec; color: #11643a; display: block; }
.diff .del { background: #fdecec; color: #9b1c1c; display: block; text-decoration: line-through; text-decoration-color: rgba(155,28,28,.35); }
.diff .ctx { color: var(--muted); display: block; }
.readview { white-space: pre-wrap; font-size: 13.5px; line-height: 1.55; }
.box-quote { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; white-space: pre-wrap; font-size: 13.5px; line-height: 1.55; }

/* ---------- Statistik / Berichte ---------- */
.chart-box { position: relative; height: 280px; padding: 6px 14px 12px; }
.barlist { display: flex; flex-direction: column; gap: 9px; padding: 12px 18px 16px; }
.barlist .row2 { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: baseline; }
.barlist .lab { font-size: 13.5px; color: var(--ink-2); }
.barlist .val { font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.barlist .bar { grid-column: 1 / -1; height: 6px; background: #efefec; border-radius: 3px; overflow: hidden; position: relative; }
.barlist .bar i { display: block; height: 100%; border-radius: 3px; background: #3d4250; }
.barlist .bar u { position: absolute; top: 0; height: 100%; border-right: 2px solid var(--gold); }
.heat { display: grid; grid-template-columns: 28px repeat(24, minmax(0, 1fr)); gap: 2px; font-size: 10.5px; color: var(--muted); padding: 10px 18px 16px; }
.heat div { height: 18px; border-radius: 3px; }
.heat .lbl { height: auto; display: flex; align-items: center; }
.report { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 34px 40px; max-width: 980px; margin: 0 auto; }
.report h1 { font-size: 24px; margin: 0; font-weight: 600; }
.report h2 { font-size: 16px; margin: 26px 0 8px; font-weight: 600; border-bottom: 2px solid #111214; padding-bottom: 5px; }
.report .rhead { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 1px solid var(--border); padding-bottom: 14px; }
.report .rhead .wm { font-size: 26px; font-weight: 500; }
.report .rhead .wm small { display: block; font-size: 10px; letter-spacing: .4em; color: var(--gold-ink); text-transform: uppercase; }
.report table.t td, .report table.t th { padding: 7px 8px; }
.report .kgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.report .kgrid .kpi { box-shadow: none; padding: 10px 12px; }
.report .kgrid .kpi .v { font-size: 21px; }

/* ---------- Einstellungen ---------- */
.settings-grid { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 16px; align-items: start; }
.subnav { padding: 8px; position: sticky; top: 16px; }
.subnav .lab { font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); padding: 12px 10px 4px; font-weight: 600; }
.subnav .lab:first-child { padding-top: 4px; }
.subnav a { display: block; padding: 7px 10px; border-radius: 7px; text-decoration: none; font-size: 13.5px; color: var(--ink-2); }
.subnav a:hover { background: var(--surface-2); color: var(--ink); }
.subnav a.on { background: #111214; color: #fff; }
.set-sec { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.set-sec h2 { margin: 0; font-size: 17px; font-weight: 600; }
.set-sec h3 { margin: 6px 0 0; font-size: 14.5px; font-weight: 600; }
.set-sec > p { margin: -6px 0 0; color: var(--ink-2); font-size: 13.5px; }
.preview { background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 8px; padding: 10px 12px; font-size: 13px; white-space: pre-wrap; }
.chips-input { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); }
.chips-input input { border: 0; outline: 0; min-width: 200px; flex: 1; padding: 3px; }
.big-off { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border-radius: 12px; border: 2px solid; }
.big-off.off { border-color: #f2c2c2; background: #fff5f5; }
.big-off.on { border-color: #bfe3cd; background: #f1fbf5; }
.big-off b { font-size: 15.5px; }

/* ---------- Login ---------- */
.login-screen { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(circle at 20% 10%, #23262d, #16181d 60%); padding: 20px; }
.login-card { width: 380px; max-width: 100%; background: #fff; border-radius: 16px; padding: 30px 28px 24px; box-shadow: 0 30px 80px rgba(0,0,0,.35); display: flex; flex-direction: column; gap: 14px; }
.login-card .wm { text-align: center; font-size: 30px; font-weight: 500; }
.login-card .wm small { display: block; font-size: 10px; letter-spacing: .5em; text-transform: uppercase; color: var(--gold-ink); margin-top: 4px; }
.login-card .err { color: var(--neg); font-size: 13px; min-height: 18px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) { .tk-grid { grid-template-columns: minmax(0, 1fr) 330px; } }
@media (max-width: 1100px) {
  .tk-grid, .brain-grid, .settings-grid { grid-template-columns: 1fr; }
  .side, .tree, .subnav { position: static; max-height: none; }
  .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .app { flex-direction: column; }
  .sidebar { position: sticky; height: auto; width: 100%; flex-direction: row; flex-wrap: wrap; padding: 10px 14px; align-items: center; }
  .brand { padding: 0; }
  .wordmark { flex-direction: row; font-size: 22px; }
  .sidebar .menu-toggle { display: inline-grid; margin-left: auto; background: transparent; color: #fff; border-color: rgba(255,255,255,.2); }
  .nav, .sidebar-foot { display: none; width: 100%; }
  .sidebar.open .nav, .sidebar.open .sidebar-foot { display: flex; }
  .brand { width: 100%; justify-content: space-between; }
  .main { padding: 16px 16px 40px; }
  .tk-head { margin: -16px -16px 12px; padding: 12px 16px; position: static; }
  .form-grid, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .report { padding: 20px 16px; }
  .report .kgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Druck (Bericht als PDF) ---------- */
@media print {
  body { background: #fff; }
  .sidebar, .no-print, .banners, .toast { display: none !important; }
  .main { padding: 0; }
  .report { border: 0; padding: 0; max-width: none; }
  .report h2 { break-after: avoid; }
  .report table { break-inside: auto; }
  .report tr { break-inside: avoid; }
}

/* Sprache DE/EN */
.lang-box { padding: 6px 12px 4px; }
.lang-box .lang-seg { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); width: 100%; }
.lang-box .lang-seg button { flex: 1; color: var(--sidebar-ink); font-weight: 600; letter-spacing: .04em; }
.lang-box .lang-seg button.on { background: #c9a96e; color: #16181d; }
.login-card .lang-seg button { padding: 4px 10px; font-size: 12px; font-weight: 600; }
@media (max-width: 900px) { .sidebar.open .sidebar-foot { flex-direction: column; } }

/* Aktivität & Online-Status */
.nav a .count.count-red, .nav a.active .count.count-red { background: #c0392b; color: #fff; }
.ak-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; border: 2px solid var(--surface); flex: none; }
.ak-online { background: #2f9e5b; } .ak-hintergrund { background: #d4a017; } .ak-offline { background: #b9b5ad; }
.ak-team { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; padding: 14px 18px 18px; }
.ak-person { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; background: var(--surface); }
.ak-kopf { display: flex; align-items: flex-start; gap: 11px; }
.ak-av { position: relative; flex: none; } .ak-av .ak-dot { position: absolute; right: -1px; bottom: -1px; }
.ak-wer { flex: 1; min-width: 0; } .ak-wer > div { margin-top: 2px; }
.ak-sess { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--border); display: flex; flex-direction: column; gap: 6px; }
.ak-s { display: flex; align-items: center; gap: 8px; font-size: 12.5px; flex-wrap: wrap; } .ak-s .ak-dot { width: 8px; height: 8px; border: 0; }
.ak-s .btn { margin-left: auto; }
.ak-filter { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 18px; } .ak-filter .input { width: auto; min-width: 170px; } .ak-filter #akSuche { flex: 1; min-width: 220px; }
.ak-t tr.ak-warn td { background: #fdf1ef; }
.kpi.ak-rot .v { color: #c0392b; }
@media (max-width: 860px) { .ak-team { grid-template-columns: 1fr; padding: 12px; } .ak-filter .input { min-width: 0; width: 100%; } }

/* Zwei-Faktor-Pflicht: Einrichtung vor dem Dashboard */
.tf-card { max-width: 400px; }
.tf-head { text-align: center; }
.tf-head b { font-size: 16px; }
.tf-head p { margin: 6px 0 0; }
.tf-steps { margin: 0; padding-left: 20px; line-height: 1.5; }
.tf-qr { align-self: center; background: #fff; padding: 10px; border: 1px solid var(--border); border-radius: 10px; min-height: 196px; min-width: 196px; display: grid; place-items: center; }
.tf-key { text-align: center; word-break: break-all; }

/* Daumen-Zähler im Brain + Manager-Freigaben */
.tree .flow .fl-name { flex: 1; min-width: 0; }
.tree .flow .q { margin-left: 0; }
.dm { display: inline-flex; gap: 3px; align-items: center; font-size: 11px; color: var(--ink-3, #888); white-space: nowrap; flex: none; padding: 1px 6px; border-radius: 999px; background: var(--surface-2); }
.tree .flow.on .dm { background: rgba(255,255,255,.12); color: #ddd; }
.dm.dm-schlecht { background: #fde8e6; color: #b42318; font-weight: 600; }
.tree .flow.on .dm.dm-schlecht { background: #b42318; color: #fff; }
.dm.dm-leer { opacity: .6; }
.stufe-head .dm { font-size: 12px; padding: 3px 9px; }
.dm-kopf { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.dm-kopf .dm { font-size: 12.5px; padding: 3px 10px; }
.dm-box { border: 1px solid #f3c7c2; background: #fff7f6; border-radius: 10px; padding: 8px 12px; }
.dm-box summary { cursor: pointer; font-size: 13px; font-weight: 600; color: #b42318; }
.dm-k { padding: 8px 0; border-top: 1px dashed #f3c7c2; font-size: 13px; }
.dm-k:first-of-type { margin-top: 8px; }
.vb-stufe { border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; }
.vb-stufe summary { cursor: pointer; padding: 2px 0; }
.vb-stufe[open] summary { margin-bottom: 8px; }
.vb-stufe .field { margin-bottom: 8px; }
.vs-offen { border-left: 3px solid var(--gold); }

/* Umtausch / Ersatz – Farben wie in der Exchange-Excel */
.ut-pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; color: #fff; }
.ut-a-gleiche_groesse { background: #6a3d9a; }
.ut-a-groesser, .ut-a-kleiner { background: #1f5fbf; }
.ut-a-anderes_modell { background: #1e7a46; }
.ut-a-gratis_ersatz { background: #e7e7ea; color: #333; }
.ut-a-beschaedigt { background: #c62828; }
.ut-st, .ut-sel { border-radius: 999px; font-size: 12px; font-weight: 600; padding: 3px 10px; white-space: nowrap; }
.ut-sel { height: 30px; padding: 0 26px 0 10px; border: 0; width: auto; }
.ut-s-neu { background: #fff1cc; color: #8a5a00; }
.ut-s-wartet_kunde { background: #dcecfb; color: #1b4f8a; }
.ut-s-wartet_versand { background: #fde2e2; color: #a12828; }
.ut-s-erledigt { background: #dff3d8; color: #2f6b1f; }
.ut-s-abgelehnt { background: #ececec; color: #666; }
.ut-chip { display: inline-flex; gap: 4px; align-items: baseline; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 2px 8px; margin: 2px 4px 2px 0; font-size: 12.5px; }
.ut-gr { color: var(--ink-2); font-weight: 600; }
.ut-vz { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ut-pfeil { font-weight: 700; color: var(--gold, #b8893a); }
.ut-tk { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-top: 1px dashed var(--border); }
.ut-tk:first-of-type { border-top: 0; padding-top: 4px; }
.ut-row { cursor: pointer; }
.ut-row.ut-neu td:first-child { box-shadow: inset 3px 0 0 var(--gold, #b8893a); }
.ut-mn { margin-top: 4px; padding: 4px 8px; background: #f4f6fb; border-radius: 6px; }
.ut-n { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: rgba(0,0,0,.08); font-size: 11px; text-align: center; }
.seg button.on .ut-n { background: rgba(255,255,255,.25); }
/* Dialog */
.ut-dlg { display: flex; flex-direction: column; gap: 14px; }
.ut-arten { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ut-art { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 8px; text-align: left; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 12px; background: #fff; cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.ut-art:hover { border-color: #999; }
.ut-art .ut-ic { grid-row: span 2; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; background: var(--surface-2); }
.ut-art b { font-size: 13.5px; }
.ut-art small { color: var(--ink-3, #888); font-size: 11.5px; line-height: 1.3; }
.ut-art.on { border-color: #111214; box-shadow: 0 0 0 3px rgba(17,18,20,.08); }
.ut-art.on .ut-ic { background: #111214; color: #fff; }
.ut-seiten { display: grid; grid-template-columns: 1fr 34px 1fr; gap: 8px; align-items: start; }
.ut-seite { border: 1px solid var(--border); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); }
.ut-seite.ut-zu { background: #f3faf0; border-color: #cfe6c4; }
.ut-kopf { font-weight: 700; font-size: 13px; }
.ut-mitte { align-self: center; text-align: center; font-size: 22px; font-weight: 700; color: var(--gold, #b8893a); }
.ut-zeile { display: grid; grid-template-columns: 52px 1fr 92px 26px; gap: 6px; align-items: center; }
.ut-zeile .input { height: 34px; padding: 0 8px; font-size: 13px; min-width: 0; }
@media (max-width: 760px) {
  .ut-arten { grid-template-columns: 1fr 1fr; }
  .ut-seiten { grid-template-columns: 1fr; }
  .ut-mitte { transform: rotate(90deg); }
}
.ut-t .ut-vz { flex-wrap: nowrap; }
.ut-t .ut-vz > div { display: flex; flex-direction: column; align-items: flex-start; }
.ut-t .ut-sel { min-width: 172px; }
.ut-chip { white-space: nowrap; }

/* Takōri-Menü: aufklappbare Bereiche Support / Zahlen */
.nav-group { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; margin-top: 6px; border: 0; border-radius: 9px; background: rgba(255,255,255,.06);
  color: #fff; font-size: 14.5px; font-weight: 600; cursor: pointer; text-align: left; }
.nav-group:hover { background: var(--sidebar-hover); }
.nav-group .chev { margin-left: auto; width: 16px; height: 16px; transition: transform .15s; opacity: .7; }
.nav-group .count { margin-left: auto; background: var(--gold); color: #16181d; border-radius: 10px; font-size: 11px; font-weight: 600; padding: 1px 7px; }
.nav-group .count + .chev { margin-left: 6px; }
.nav-group.open .chev { transform: rotate(90deg); }
.nav-sub { display: flex; flex-direction: column; gap: 3px; padding: 2px 0 6px 10px; margin-left: 8px; border-left: 1px solid rgba(255,255,255,.08); }
.nav-sub .nav-label:first-child { padding-top: 10px; }
/* Zahlen-Bereich: Profit-Dashboard füllt den ganzen Inhaltsbereich */
body.zahlen-modus .main { padding: 0; }
body.zahlen-modus #banners { display: none; }
.zahlen-box { height: 100vh; }
.zahlen-box iframe { width: 100%; height: 100%; border: 0; display: block; background: var(--bg, #f4f3ef); }

/* Freigaben: Reiter + Zurücksetzen */
.vs-ok { border-left: 3px solid #2f9e5b; }
.vs-wer { color: #2f6b1f; margin-top: 2px; }
.vs-zurueck { color: #a12828; margin-top: 2px; }
.btn-red-soft { background: #fff1f0; border-color: #f3c7c2; color: #b42318; }
.btn-red-soft:hover { background: #fde2df; }

/* Verbesserungsvorschläge vom Team */
.id-arten { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.id-art { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px; border: 1.5px solid var(--border); border-radius: 12px; background: #fff; cursor: pointer; font-size: 13px; text-align: center; }
.id-art span { font-size: 22px; }
.id-art:hover { border-color: #999; }
.id-art.on { border-color: #111214; box-shadow: 0 0 0 3px rgba(17,18,20,.08); }
.id-w { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: #ececec; color: #555; }
.id-w-stoert { background: #fff1cc; color: #8a5a00; }
.id-w-dringend { background: #fde2e2; color: #a12828; }
.id-st { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.id-s-offen { background: #fff1cc; color: #8a5a00; }
.id-s-angenommen { background: #dcecfb; color: #1b4f8a; }
.id-s-erledigt { background: #dff3d8; color: #2f6b1f; }
.id-s-abgelehnt { background: #ececec; color: #666; }
.id-c-offen { border-left: 3px solid var(--gold, #b8893a); }
.id-c-angenommen { border-left: 3px solid #1f5fbf; }
.id-c-erledigt { border-left: 3px solid #2f9e5b; }
.id-text { white-space: pre-wrap; font-size: 14px; line-height: 1.5; }
.id-antwort { background: #f4f6fb; border-radius: 8px; padding: 8px 12px; font-size: 13.5px; }
.id-mgr { border-top: 1px dashed var(--border); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 760px) { .id-arten { grid-template-columns: repeat(2, 1fr); } }

/* Team-Übersicht */
.tm-t th[data-s] { cursor: pointer; user-select: none; white-space: normal; min-width: 64px; line-height: 1.2; }
.tm-t th.on { color: var(--ink); }
.tm-row { cursor: pointer; }
.tm-row.on td { background: #fbf6ea; }
.tm-row.tm-inaktiv { opacity: .6; }
.tm-d { display: block; font-size: 11px; color: var(--ink-3, #888); }
.tm-d.pos { color: #2f9e5b; } .tm-d.neg { color: #b42318; }
.tm-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--surface-2); margin-bottom: 3px; }
.tm-bar i { display: block; height: 100%; }
.tm-bar .b1 { background: #2f9e5b; } .tm-bar .b2 { background: var(--gold, #b8893a); } .tm-bar .b3 { background: #1f5fbf; }
.tm-leer td { color: var(--ink-3, #999); }
.tm-akt { display: flex; gap: 8px; align-items: baseline; padding: 3px 0; border-bottom: 1px dashed var(--border); }
.tm-akt.ak-warn { background: #fff4f2; }
.card-title .av { vertical-align: middle; margin-right: 6px; }

/* Bestellungen im Ticket: Kopf wie „Kunde“, Aktionen in einer Reihe darunter */
.order-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 12px; }
.order-actions .btn { height: 32px; padding: 0 11px; gap: 6px; font-size: 13px; }
.order-actions .btn svg { width: 15px; height: 15px; }

/* Aufräumen: Linien-Symbole statt Emojis, saubere Ausrichtung */
.btn { vertical-align: middle; }
td .btn + .btn { margin-left: 6px; }
.ic-i { display: inline-flex; align-items: center; vertical-align: -2px; }
.ic-i svg { width: 14px; height: 14px; }
h4 > svg, .card-title > svg { width: 17px; height: 17px; vertical-align: -3px; margin-right: 2px; }
.dm { gap: 8px; }
.dm > span { display: inline-flex; align-items: center; gap: 3px; }
.dm .ic-i svg { width: 12px; height: 12px; }
.ut-pill .ic-i svg { width: 13px; height: 13px; }
.ut-art .ut-ic svg { width: 18px; height: 18px; }
.id-art .id-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--surface-2); }
.id-art .id-ic svg { width: 20px; height: 20px; }
.id-art.on .id-ic { background: #111214; color: #fff; }
.tag .ic-i svg { width: 12px; height: 12px; }
.tm-t th .ic-i svg { width: 15px; height: 15px; }
.nav a span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.thumbs button svg { width: 18px; height: 18px; }
.thumbs button.up.on { color: var(--pos); } .thumbs button.down.on { color: var(--neg); }
.rate-up .ic-i svg, .rate-down .ic-i svg { width: 13px; height: 13px; }

.nav-sub { padding-left: 4px; margin-left: 6px; }
.nav-sub a { padding-left: 10px; gap: 10px; }

.order-actions { flex-wrap: nowrap; }
.order-actions .btn { padding: 0 10px; font-size: 12.5px; white-space: nowrap; flex: none; }
.order-actions .btn.oa-ic { width: 32px; padding: 0; }

/* Manager-Fälle */
.mgr-leiste { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: #f4f1ff; border: 1px solid #ddd3f7; margin-bottom: 10px; }
.mgr-leiste > svg { width: 20px; height: 20px; color: #5b3fa8; flex: none; }
.mgr-leiste > div { flex: 1; min-width: 0; }
.mgr-leiste .btn { flex: none; }
.mgr-gruende { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

.mgr-pill { background: #f4f1ff; color: #5b3fa8; border: 1px solid #ddd3f7; display: inline-flex; align-items: center; gap: 4px; }
