:root {
  --violet: #382D5E;
  --violet-deep: #2A2145;
  --violet-700: #463a72;
  --red: #C84449;
  --red-dark: #a8383c;
  --paper: #ECEAF0;
  --paper-2: #DFDFDF;
  --grey-band: #BBBBBB;
  --card: #ffffff;
  --ink: #261F40;
  --muted: #6B6580;
  --line: #d8d4e0;
  --ok: #2e7d52;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(40,30,70,.08), 0 4px 14px rgba(40,30,70,.06);
  --font: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink);
  background: var(--paper); font-size: 14.5px; line-height: 1.45;
}
button { font-family: inherit; font-size: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: inherit; }
[hidden] { display: none !important; }

/* ───────────── Buttons ───────────── */
.btn { border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: 8px 14px; border-radius: 8px; font-weight: 600; transition: .15s; }
.btn:hover { border-color: var(--violet-700); }
.btn-primary { background: var(--violet); color: #fff; border-color: var(--violet); }
.btn-primary:hover { background: var(--violet-deep); }
.btn-accent { background: var(--red); color: #fff; border-color: var(--red); }
.btn-accent:hover { background: var(--red-dark); }
.btn-ghost { background: transparent; border-color: transparent; color: inherit; }
.btn-sm { padding: 5px 10px; font-size: 13px; border-radius: 7px; }
.btn-danger { color: var(--red); border-color: transparent; background: transparent; }
.btn-danger:hover { background: #fbe9ea; }

/* ───────────── Login ───────────── */
.login-wrap { min-height: 100%; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(1200px 600px at 50% -10%, #4a3d78 0%, var(--violet-deep) 60%); }
.login-card { background: #fff; width: 100%; max-width: 380px; border-radius: 16px;
  padding: 34px 30px; box-shadow: 0 20px 60px rgba(20,12,45,.4); }
.login-card h1 { margin: 0 0 4px; font-size: 24px; letter-spacing: -.02em; color: var(--violet); }
.login-card .sub { color: var(--muted); margin: 0 0 22px; font-size: 13.5px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; color: var(--ink); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(56,45,94,.12); }
.form-error { color: var(--red); font-size: 13px; min-height: 18px; margin: 2px 0 8px; }

/* ───────────── App shell ───────────── */
.app { display: grid; grid-template-columns: 264px 1fr; height: 100vh; }

.sidebar { background: var(--violet-deep); color: #e9e6f2; display: flex; flex-direction: column;
  border-right: 1px solid #00000022; }
.brand { padding: 18px 18px 14px; font-weight: 800; font-size: 17px; letter-spacing: -.01em;
  color: #fff; display: flex; align-items: center; gap: 9px; }
.brand .dot { width: 11px; height: 11px; border-radius: 3px; background: var(--red);
  box-shadow: 0 0 0 3px rgba(200,68,73,.25); }
.side-label { font-size: 11px; letter-spacing: .09em; text-transform: uppercase;
  color: #b6aed6; padding: 6px 18px; }
.mandant-list { flex: 1; overflow-y: auto; padding: 2px 10px 10px; }
.mandant-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px;
  border-radius: 8px; color: #ded9ee; cursor: pointer; position: relative; margin-bottom: 2px; }
.mandant-item:hover { background: #ffffff14; }
.mandant-item.active { background: #ffffff1f; color: #fff; }
.mandant-item.active::before { content: ""; position: absolute; left: -10px; top: 6px; bottom: 6px;
  width: 4px; border-radius: 0 4px 4px 0; background: var(--red); }
.mandant-item .swatch { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.mandant-item .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.mandant-item.archived .nm { opacity: .55; font-style: italic; }
.add-mandant { margin: 8px 14px; }
.add-mandant .btn { width: 100%; background: #ffffff14; color: #fff; border-color: #ffffff22; }
.add-mandant .btn:hover { background: #ffffff22; }
.sidebar-footer { border-top: 1px solid #ffffff1a; padding: 12px 14px; display: flex;
  flex-direction: column; gap: 8px; }
.sidebar-footer .who { font-size: 13px; color: #cfc8e6; display: flex; align-items: center; gap: 8px; }
.sidebar-footer .who .av { width: 26px; height: 26px; border-radius: 50%; background: var(--red);
  color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.foot-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.foot-actions .btn { background: transparent; border-color: #ffffff26; color: #d8d2ec; }
.foot-actions .btn:hover { background: #ffffff14; }

/* ───────────── Workspace ───────────── */
.workspace { display: flex; flex-direction: column; min-width: 0; background: var(--paper); }
.ws-empty { flex: 1; display: grid; place-items: center; color: var(--muted); text-align: center; padding: 40px; }
.ws-empty .big { font-size: 17px; color: var(--violet); font-weight: 700; margin-bottom: 6px; }
.ws-header { background: #fff; border-bottom: 1px solid var(--line); padding: 14px 22px 0;
  display: flex; flex-direction: column; gap: 12px; }
.ws-title { display: flex; align-items: center; gap: 11px; }
.ws-title .swatch { width: 14px; height: 14px; border-radius: 4px; }
.ws-title h2 { margin: 0; font-size: 19px; letter-spacing: -.01em; }
.ws-title .spacer { flex: 1; }
.tabs { display: flex; gap: 2px; }
.tab { padding: 9px 16px 11px; border: none; background: none; color: var(--muted);
  font-weight: 700; border-bottom: 3px solid transparent; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--violet); border-bottom-color: var(--red); }
.tab .count { font-size: 11px; background: var(--paper-2); color: var(--muted);
  padding: 1px 7px; border-radius: 20px; margin-left: 6px; font-weight: 700; }
.ws-body { flex: 1; min-height: 0; overflow: hidden; }

/* ───────────── Chat ───────────── */
.chat { height: 100%; display: flex; flex-direction: column; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 20px 22px; display: flex;
  flex-direction: column; gap: 12px; }
.msg { max-width: 72%; }
.msg .meta { font-size: 11.5px; color: var(--muted); margin: 0 0 3px 2px; }
.msg .bubble { background: #fff; border: 1px solid var(--line); padding: 9px 13px;
  border-radius: 12px; border-top-left-radius: 4px; white-space: pre-wrap; word-wrap: break-word; }
.msg.mine { align-self: flex-end; }
.msg.mine .meta { text-align: right; margin: 0 2px 3px 0; }
.msg.mine .bubble { background: var(--violet); color: #fff; border-color: var(--violet);
  border-top-left-radius: 12px; border-top-right-radius: 4px; }
.chat-day { align-self: center; font-size: 11.5px; color: var(--muted); background: var(--paper-2);
  padding: 2px 12px; border-radius: 20px; }
.chat-input { border-top: 1px solid var(--line); background: #fff; padding: 12px 16px;
  display: flex; gap: 10px; align-items: flex-end; }
.chat-input textarea { flex: 1; resize: none; max-height: 140px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; }
.chat-input textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(56,45,94,.12); }

/* Chat-Kategorien (Kanäle je Mandant) */
.chat-cats { display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  padding: 8px 14px; border-bottom: 1px solid var(--line); background: var(--paper-2); }
.chat-cat { position: relative; border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 20px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; line-height: 1.2; }
.chat-cat:hover { border-color: var(--violet-700); }
.chat-cat.active { background: var(--violet); color: #fff; border-color: var(--violet); }
.chat-cat-badge { background: var(--red); color: #fff; font-size: 10.5px; font-weight: 800;
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center; }
.chat-cat.active .chat-cat-badge { background: #fff; color: var(--red); }
.chat-cat-manage { margin-left: auto; border: 1px solid var(--line); background: #fff; color: var(--muted);
  width: 30px; height: 30px; border-radius: 8px; cursor: pointer; font-size: 15px; line-height: 1; }
.chat-cat-manage:hover { border-color: var(--violet-700); color: var(--violet); }
/* Kategorien-Verwaltung (Modal) */
.cat-manage .cat-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.cat-manage .cat-name { flex: 1; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.cat-manage .cat-add { display: flex; gap: 8px; align-items: center; margin-top: 12px;
  padding-top: 12px; border-top: 1px solid var(--line); }
.cat-manage .cat-add input { flex: 1; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.btn-sm { padding: 6px 10px; font-size: 13px; }

/* ───────────── Board ───────────── */
.board { height: 100%; display: flex; align-items: flex-start;
  gap: 14px; padding: 18px 22px; overflow-x: auto; }
.column { background: #e7e4ee; border-radius: 12px; display: flex; flex-direction: column;
  flex: 0 0 300px; max-height: 100%; }
.column.drop-hot { outline: 2px dashed var(--violet); outline-offset: -4px; }
.column-head { padding: 12px 14px 8px; display: flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--violet); }
.column-head .pill { background: #fff; color: var(--muted); font-size: 11px; padding: 1px 8px;
  border-radius: 20px; }
.column-head .dotcol { width: 9px; height: 9px; border-radius: 50%; }
.cards { flex: 1; overflow-y: auto; padding: 4px 10px 10px; display: flex; flex-direction: column; gap: 9px; }
.kcard { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px;
  box-shadow: var(--shadow); cursor: grab; }
.kcard:active { cursor: grabbing; }
.kcard.dragging { opacity: .4; }
.kcard .ktitle { font-weight: 700; }
.kcard .kdesc { color: var(--muted); font-size: 12.5px; margin-top: 3px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kcard .kmeta { display: flex; align-items: center; gap: 7px; margin-top: 9px; flex-wrap: wrap; }
.chip { font-size: 11.5px; padding: 2px 9px; border-radius: 20px; font-weight: 600; }
.chip.assignee { background: #efeaf7; color: var(--violet); }
.chip.due { background: #eef4f0; color: var(--ok); }
.chip.due.over { background: #fbe9ea; color: var(--red); }
.add-card { margin: 4px 10px 12px; }
.add-card button { width: 100%; background: #ffffff8c; border: 1px dashed #b9b2cf; color: var(--violet);
  border-radius: 9px; padding: 8px; font-weight: 700; }
.add-card button:hover { background: #fff; }

/* ───────────── Files ───────────── */
.files { height: 100%; overflow-y: auto; padding: 18px 22px; }
.dropzone { border: 2px dashed #b9b2cf; border-radius: 12px; padding: 22px; text-align: center;
  color: var(--muted); background: #fff; margin-bottom: 16px; transition: .15s; }
.dropzone.hot { border-color: var(--violet); background: #f3f0fa; color: var(--violet); }
.dropzone strong { color: var(--violet); }
.file-row { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; padding: 11px 14px; margin-bottom: 8px; }
.file-ic { width: 36px; height: 36px; border-radius: 8px; background: #efeaf7; color: var(--violet);
  display: grid; place-items: center; font-weight: 800; font-size: 12px; flex: none; }
.file-main { flex: 1; min-width: 0; }
.file-main .fn { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-main .fmeta { font-size: 12px; color: var(--muted); }

/* ───────────── Modal ───────────── */
.modal-bg { position: fixed; inset: 0; background: rgba(28,20,52,.45); display: grid;
  place-items: center; padding: 20px; z-index: 80; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 460px;
  box-shadow: 0 24px 70px rgba(20,12,45,.4); max-height: 90vh; overflow-y: auto; }
.modal.modal-wide { max-width: 720px; }
/* Platzhalter-Hilfe & Vorlagen-Editor */
.ph-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 2px; }
.ph-chip { font: inherit; font-size: 12px; background: #faf9fd; border: 1px solid var(--line);
  color: var(--violet); border-radius: 999px; padding: 3px 10px; cursor: pointer; }
.ph-chip:hover { background: #efeaf8; }
.tpl-body { width: 100%; min-height: 240px; font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px; line-height: 1.5; resize: vertical; }
/* Dokumente-Liste & Status */
.doc-status { display:inline-block; font-size:11.5px; font-weight:700; border-radius:999px; padding:2px 9px; }
.doc-status.entwurf { background:#FBEED0; color:#7a5a12; }
.doc-status.pending { background:#FDE7C9; color:#8a4b12; }
.doc-status.signed { background:#DDF0E2; color:#1f6b3a; }
/* Unterschriften-Pad */
.sign-grid { display:flex; gap:16px; flex-wrap:wrap; }
.sign-pad-box { flex:1; min-width:240px; }
.sign-pad-box label { display:block; font-size:12.5px; font-weight:700; color:var(--muted); margin-bottom:4px; }
.sign-pad { width:100%; height:150px; border:1px dashed var(--line); border-radius:10px;
  background:#fff; touch-action:none; cursor:crosshair; display:block; }
.sign-pad-foot { display:flex; justify-content:space-between; align-items:center; margin-top:4px; }
.sign-pad-foot .muted { font-size:11.5px; }
.modal h3 { margin: 0; padding: 18px 22px; border-bottom: 1px solid var(--line);
  font-size: 17px; color: var(--violet); }
.modal-body { padding: 18px 22px; }
.modal-foot { padding: 14px 22px 20px; display: flex; justify-content: flex-end; gap: 10px; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches button { width: 26px; height: 26px; border-radius: 7px; border: 2px solid transparent; }
.swatches button.sel { border-color: var(--ink); }

/* user list */
.u-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.u-row .u-name { flex: 1; }
.u-row .u-name small { color: var(--muted); }
.badge { font-size: 11px; padding: 1px 8px; border-radius: 20px; background: #efeaf7; color: var(--violet); font-weight: 700; }
.badge.off { background: #f0eeee; color: var(--muted); }


/* ═══════════════════ v2 ═══════════════════ */

/* Suche + Navigation in der Seitenleiste */
.side-search { padding: 4px 14px 8px; }
.side-search input { width: 100%; padding: 8px 11px; border-radius: 8px; border: 1px solid #ffffff22;
  background: #ffffff14; color: #fff; }
.side-search input::placeholder { color: #b6aed6; }
.side-search input:focus { outline: none; border-color: var(--red); background: #ffffff1f; }
.side-nav { padding: 2px 10px 6px; display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px;
  border: none; background: none; color: #ded9ee; font-weight: 600; text-align: left; width: 100%; }
.nav-item:hover { background: #ffffff14; }
.nav-item.active { background: #ffffff1f; color: #fff; }
.nav-item .ic { width: 18px; text-align: center; }
.mandant-item .spacer { flex: 1; }
.unread-badge { background: var(--red); color: #fff; font-size: 11px; font-weight: 800;
  min-width: 19px; height: 19px; border-radius: 19px; display: grid; place-items: center; padding: 0 5px; }

/* Views */
.view { height: 100%; overflow-y: auto; }
.view[hidden] { display: none; }

/* Dashboard */
.dash { padding: 22px 26px 40px; max-width: 1100px; }
.dash h1 { font-size: 22px; letter-spacing: -.01em; margin: 0 0 4px; color: var(--violet); }
.dash .greet { color: var(--muted); margin: 0 0 20px; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); }
.stat .n { font-size: 26px; font-weight: 800; line-height: 1; }
.stat .l { color: var(--muted); font-size: 12.5px; margin-top: 5px; font-weight: 600; }
.stat.red .n { color: var(--red); }
.stat.violet .n { color: var(--violet); }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.panel > h3 { margin: 0; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 14px;
  color: var(--violet); display: flex; align-items: center; gap: 8px; }
.panel > h3 .tag { margin-left: auto; font-size: 11px; background: var(--paper-2); color: var(--muted);
  padding: 1px 8px; border-radius: 20px; }
.panel-body { padding: 6px 8px 8px; }
.task-line { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 8px; cursor: pointer; }
.task-line:hover { background: var(--paper); }
.task-line .swatch { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.task-line .tl-main { flex: 1; min-width: 0; }
.task-line .tl-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-line .tl-where { font-size: 12px; color: var(--muted); }
.task-line .tl-due { font-size: 12px; font-weight: 700; white-space: nowrap; }
.tl-due.over { color: var(--red); }
.tl-due.soon { color: var(--ok); }
.empty-mini { color: var(--muted); padding: 16px; text-align: center; font-size: 13.5px; }
.mand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.mand-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px;
  box-shadow: var(--shadow); cursor: pointer; border-left: 4px solid var(--violet); }
.mand-card:hover { border-color: var(--violet-700); }
.mand-card .mc-name { font-weight: 800; margin-bottom: 6px; }
.mand-card .mc-meta { font-size: 12.5px; color: var(--muted); }
.section-title { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); margin: 26px 0 12px; }

/* To-Do-Listen */
.lists-wrap { padding: 22px 26px 40px; max-width: 920px; }
.lists-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.lists-head h1 { font-size: 21px; margin: 0; color: var(--violet); }
.lists-head .spacer { flex: 1; }
.list-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px;
  box-shadow: var(--shadow); overflow: hidden; }
.list-card .lc-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-left: 5px solid var(--violet); }
.list-card .lc-head .lc-name { font-weight: 800; font-size: 15px; }
.list-card .lc-head .lc-count { font-size: 12px; color: var(--muted); }
.list-card .lc-head .spacer { flex: 1; }
.todo { display: flex; align-items: center; gap: 11px; padding: 8px 16px; border-top: 1px solid var(--paper); }
.todo:hover { background: #faf9fc; }
.todo .chk { width: 19px; height: 19px; border: 2px solid #c3bcd8; border-radius: 6px; flex: none;
  display: grid; place-items: center; cursor: pointer; color: #fff; }
.todo .chk.on { background: var(--ok); border-color: var(--ok); }
.todo .td-text { flex: 1; min-width: 0; }
.todo.done .td-text { text-decoration: line-through; color: var(--muted); }
.todo .td-due { font-size: 12px; font-weight: 700; }
.todo .td-due.over { color: var(--red); }
.todo .td-ass { font-size: 11.5px; background: #efeaf7; color: var(--violet); padding: 1px 9px; border-radius: 20px; }
.todo .td-del { opacity: 0; }
.todo:hover .td-del { opacity: 1; }
.todo-add { display: flex; gap: 8px; padding: 10px 16px 14px; border-top: 1px solid var(--paper); }
.todo-add input { flex: 1; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; }
.todo-add input:focus { outline: none; border-color: var(--violet); }
.todo-add input[type=date] { flex: 0 0 150px; }

/* Aufgaben: Umschalter Board/Liste */
.board-toolbar { display: flex; align-items: center; gap: 12px; padding: 14px 22px 4px; flex-wrap: wrap; justify-content: space-between; }
.board-switch { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.board-tools { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.bchip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 9px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 700; font-size: 13.5px; cursor: pointer; }
.bchip:hover { border-color: var(--violet-700); }
.bchip.active { background: var(--violet); color: #fff; border-color: var(--violet); }
.bchip .bcount { font-size: 11px; background: rgba(0,0,0,.08); padding: 0 7px; border-radius: 20px; }
.bchip.active .bcount { background: rgba(255,255,255,.22); }
.bchip-add { border-style: dashed; color: var(--violet); }
.column-head.clickable { cursor: pointer; }
.column-head.clickable:hover { color: var(--red); }
.chkline { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--ink); margin-top: 4px; cursor: pointer; }
.chkline input { width: 17px; height: 17px; }
.seg { display: inline-flex; background: var(--paper-2); border-radius: 9px; padding: 3px; }
.seg button { border: none; background: none; padding: 6px 14px; border-radius: 7px; font-weight: 700; color: var(--muted); }
.seg button.on { background: #fff; color: var(--violet); box-shadow: var(--shadow); }
.board-wrap { height: calc(100% - 52px); overflow-y: auto; }
.tasklist { padding: 12px 22px 24px; max-width: 760px; }

/* Chat: Aktionen + bearbeitet-Hinweis */
.msg { position: relative; }
.msg .actions { position: absolute; top: -8px; right: 0; display: none; gap: 4px; }
.msg.mine:hover .actions { display: flex; }
.msg .actions button { border: 1px solid var(--line); background: #fff; border-radius: 6px;
  font-size: 11px; padding: 2px 7px; color: var(--muted); }
.msg .edited { font-size: 10.5px; opacity: .7; margin-left: 6px; }
.mention { background: #efe7c8; color: #7a5d12; border-radius: 4px; padding: 0 3px; font-weight: 700; }

/* Suche */
.search-wrap { padding: 22px 26px 40px; max-width: 820px; }
.search-wrap h1 { font-size: 20px; color: var(--violet); margin: 0 0 16px; }
.sr-group { margin-bottom: 22px; }
.sr-group h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 8px; }
.sr-item { background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 10px 13px;
  margin-bottom: 7px; cursor: pointer; }
.sr-item:hover { border-color: var(--violet-700); }
.sr-item .sr-ctx { font-size: 12px; color: var(--muted); }

/* ═══════════════════ Mobil ═══════════════════ */
.mobile-topbar { display: none; }
.sidebar-backdrop { display: none; }

@media (max-width: 768px) {
  .app { grid-template-columns: 1fr; }

  /* Kopfleiste oben */
  .mobile-topbar { display: flex; align-items: center; gap: 12px; position: fixed; top: 0; left: 0; right: 0;
    height: 52px; padding: 0 14px; background: var(--violet-deep); color: #fff; z-index: 40; }
  .menu-toggle { background: none; border: none; color: #fff; font-size: 24px; line-height: 1; padding: 4px 6px; }
  .mt-title { font-weight: 800; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  /* Seitenleiste als Schublade */
  .sidebar { position: fixed; top: 0; left: 0; height: 100%; width: 82%; max-width: 320px;
    transform: translateX(-100%); transition: transform .22s ease; z-index: 60; box-shadow: 4px 0 24px rgba(0,0,0,.35); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(20,12,45,.45); z-index: 50; }

  /* Arbeitsbereich unter die Kopfleiste schieben */
  .workspace { padding-top: 52px; }

  /* Dashboard: kompakter */
  .dash, .lists-wrap, .search-wrap { padding: 16px 14px 40px; }
  .stat-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .dash-grid { grid-template-columns: 1fr; gap: 14px; }
  .mand-grid { grid-template-columns: 1fr 1fr; }

  /* Aufgaben: Spalten untereinander */
  .board { flex-direction: column; padding: 14px; }
  .column { flex: 0 0 auto; width: 100%; max-height: none; }
  .tasklist { padding: 12px 14px 24px; }

  /* Tabs scrollbar machen, falls eng */
  .tabs { overflow-x: auto; }
  .tab { white-space: nowrap; }
  .ws-header { padding: 12px 14px 0; }

  /* Chat */
  .chat-scroll { padding: 14px; }
  .chat-cats { padding: 7px 10px; }
  .chat-cat { padding: 5px 10px; font-size: 12.5px; }
  .msg { max-width: 86%; }
  .chat-input { padding: 10px; }

  /* Dateien */
  .files { padding: 14px; }
  .file-row { flex-wrap: wrap; }
  .file-main { flex: 1 1 100%; order: -1; }

  /* To-Do-Eingabe umbrechen */
  .todo-add { flex-wrap: wrap; }
  .todo-add input[type=date] { flex: 1 1 auto; }

  /* Dialoge fast vollflächig */
  .modal-bg { padding: 10px; }
  .row { flex-direction: column; gap: 0; }
}

@media (max-width: 380px) {
  .stat-row { grid-template-columns: 1fr; }
  .mand-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════ Ordner (Dateien) ═══════════════════ */
.folder-bar { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-bottom: 14px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 20px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; font-size: 13px; cursor: pointer; }
.fchip:hover { border-color: var(--violet-700); }
.fchip.active { background: var(--violet); color: #fff; border-color: var(--violet); }
.fchip .fcount { font-size: 11px; opacity: .8; }
.fchip-add { border-style: dashed; color: var(--violet); font-weight: 700; }
.folder-actions { display: inline-flex; gap: 6px; margin-left: auto; }
.file-folder { font-size: 11.5px; background: #efeaf7; color: var(--violet); padding: 1px 9px; border-radius: 20px; font-weight: 600; }
.file-move { font-size: 12.5px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); }

/* ═══════════════════ Stammdaten ═══════════════════ */
.sd { padding: 20px 22px 40px; max-width: 760px; }
.sd-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sd-head h3 { margin: 0; color: var(--violet-deep); font-size: 19px; }
.sd-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 6px 18px 14px; }
.sd-group { font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--violet);
  margin: 16px 0 6px; padding-bottom: 5px; border-bottom: 1px solid var(--line); }
.sd-group:first-child { margin-top: 8px; }
.sd-row { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; flex-wrap: wrap; border-bottom: 1px solid #f0eef5; }
.sd-row:last-child { border-bottom: 0; }
.sd-label { color: var(--muted); font-size: 13.5px; }
.sd-val { color: var(--ink); font-weight: 600; font-size: 13.5px; text-align: right; }
.sd-col { flex-direction: column; align-items: stretch; }
.sd-col .sd-label { margin-bottom: 6px; }
.sd-hist { display: flex; flex-direction: column; gap: 4px; }
.sd-histrow { display: flex; justify-content: space-between; align-items: center; background: #f6f4fb; border-radius: 8px; padding: 7px 11px; font-size: 13px; }
.sd-badge { background: var(--violet); color: #fff; font-size: 10.5px; font-weight: 700; padding: 1px 8px; border-radius: 20px; margin-left: 6px; }
.muted { color: var(--muted); font-size: 12.5px; }
.linkbtn { background: none; border: 0; color: var(--red); font-size: 12.5px; cursor: pointer; padding: 2px 4px; }
.radioline { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; color: var(--ink); margin-top: 6px; cursor: pointer; }
.radioline input { margin-top: 2px; }

/* ═══════════════════ Buchhaltungs-Checkliste ═══════════════════ */
.buch-list { padding: 8px 14px; }
.buch-row { display: flex; align-items: center; gap: 14px; padding: 9px 6px; border-bottom: 1px solid #f0eef5; }
.buch-row:last-child { border-bottom: 0; }
.buch-month { flex: 0 0 120px; font-weight: 700; color: var(--ink); }
.buch-status { flex: 0 0 240px; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-weight: 600; }
.buch-status.st-da { color: #2f7d4f; border-color: #b6dcc4; background: #f2fbf5; }
.buch-status.st-abgerechnet { color: #2f7d4f; border-color: #b6dcc4; background: #f2fbf5; }
.lohn-kkbadge { display: inline-block; font-size: 10px; font-weight: 800; color: #9a6a16; background: #fbf3e2; border-radius: 5px; padding: 1px 5px; margin-left: 6px; vertical-align: middle; }
.buch-status.st-fehlt { color: var(--red); border-color: #e6b4b6; background: #fdf4f4; }
.buch-status.st-unvollstaendig { color: #9a6a16; border-color: #e6cf9f; background: #fdf9ef; }
.buch-status.st-offen { color: var(--muted); }
.buch-erl { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.buch-erl input { padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; }
.buch-row.done { background: #f4faf6; }
.buch-row.done .buch-month { color: #2f7d4f; }
.buch-row.done .buch-month::before { content: "✓ "; }
.buch-item { border-bottom: 1px solid #f0eef5; }
.buch-item:last-child { border-bottom: 0; }
.buch-item .buch-row { border-bottom: 0; }
.buch-item.done .buch-row { background: #f4faf6; }
.buch-item.done .buch-month { color: #2f7d4f; }
.buch-item.done .buch-month::before { content: "✓ "; }
.buch-note { padding: 0 6px 10px 134px; }
.buch-note input { width: 100%; max-width: 520px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
@media (max-width: 768px) {
  .buch-row { flex-wrap: wrap; gap: 8px; }
  .buch-month { flex: 1 1 100%; }
  .buch-status { flex: 1 1 100%; }
  .buch-erl { margin-left: 0; flex: 1 1 100%; }
  .buch-erl input { flex: 1; }
  .buch-note { padding: 0 6px 10px 6px; }
}

/* ═══════════════════ USt-VA demnächst fällig (Dashboard) ═══════════════════ */
.ustva-panel h3 .tag { background: var(--red); color: #fff; }
.ustva-line { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid #f0eef5; cursor: pointer; }
.ustva-line:last-child { border-bottom: 0; }
.ustva-line:hover { background: #faf9fd; }
.ustva-line .dotcol { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.uv-name { font-weight: 700; color: var(--ink); }
.uv-label { color: var(--muted); font-size: 13px; }
.uv-date { margin-left: auto; font-weight: 800; color: var(--red); font-size: 13.5px; }
.ustva-line { flex-wrap: wrap; }
.uv-label { flex: 0 0 auto; }

/* ═══════════════════ Buchhaltungs-Übersicht ═══════════════════ */
.uebersicht-wrap { height: 100%; overflow: auto; }
.uebersicht { padding: 22px; max-width: 920px; }
.ueber-bar { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; margin-bottom: 6px; }
.bu-group { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.bu-mhead { display: flex; align-items: center; gap: 10px; padding: 12px 16px; cursor: pointer; border-bottom: 1px solid var(--line); background: #faf9fd; }
.bu-mhead:hover { background: #f1edfa; }
.bu-mname { font-weight: 800; color: var(--violet-deep); }
.bu-period { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.bu-months { padding: 4px 16px 8px; }
.bu-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f0eef5; cursor: pointer; flex-wrap: wrap; }
.bu-row:last-child { border-bottom: 0; }
.bu-row:hover { background: #faf9fd; }
.bu-month { flex: 0 0 110px; font-weight: 700; color: var(--ink); }
.bu-date { margin-left: auto; font-size: 13px; color: var(--muted); font-weight: 600; }
.bu-date.soon { color: var(--red); }
.bu-date.done { color: #2f7d4f; }
.ust-badge { font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 20px; }
.ust-badge.st-da { color: #2f7d4f; background: #eaf7ef; }
.ust-badge.st-fehlt { color: var(--red); background: #fdeeee; }
.ust-badge.st-unvollstaendig { color: #9a6a16; background: #fbf3e2; }
.ust-badge.st-offen { color: var(--muted); background: #efedf4; }

/* Kompakte Jahres-Tabelle (eine Zeile pro Mandant, 12 Monatszellen) */
.bu-table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.bu-table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 640px; }
.bu-table th, .bu-table td { padding: 7px 5px; text-align: center; font-size: 12px; }
.bu-table thead th { background: #faf9fd; color: var(--muted); font-weight: 700; border-bottom: 1px solid var(--line); position: sticky; top: 0; }
.bu-table th.bu-c-name, .bu-table td.bu-c-name { text-align: left; padding-left: 14px; font-weight: 800; color: var(--violet-deep); white-space: nowrap; }
.bu-table th.bu-c-per, .bu-table td.bu-c-per { text-align: left; color: var(--muted); font-weight: 600; white-space: nowrap; }
.bu-table th.bu-c-cnt, .bu-table td.bu-c-cnt { color: var(--muted); font-weight: 700; white-space: nowrap; }
.bu-table tbody tr { cursor: pointer; }
.bu-table tbody tr:hover { background: #f7f5fc; }
.bu-table tbody td { border-bottom: 1px solid #f3f1f8; }
.bu-table tbody tr:last-child td { border-bottom: 0; }
.bu-name-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 8px; vertical-align: middle; }
.bu-cell { display: inline-flex; width: 24px; height: 24px; border-radius: 6px; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; line-height: 1; }
.bu-cell.s-erledigt { background: #cdebd7; color: #1f6b3d; }
.bu-cell.s-da { background: #eaf7ef; color: #2f7d4f; }
.bu-cell.s-fehlt { background: #fdeeee; color: var(--red); }
.bu-cell.s-unvollstaendig { background: #fbf3e2; color: #9a6a16; }
.bu-cell.s-offen { background: #f0eef5; color: #c3bdd2; }
.bu-cell.s-keine { background: transparent; color: #ddd9e6; border: 1px dashed #e3dfee; }
.bu-cell.due { box-shadow: 0 0 0 2px var(--violet); }
.bu-cell-edit { cursor: pointer; transition: transform .06s ease, filter .06s ease; }
.bu-cell-edit:hover { filter: brightness(0.94); transform: scale(1.08); }
.bu-cell.s-keine.bu-cell-edit:hover { border-color: var(--violet); }
.bu-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 12px 2px 0; font-size: 12px; color: var(--muted); align-items: center; }
.bu-legend span { display: inline-flex; align-items: center; gap: 6px; }
.bu-ldot { width: 15px; height: 15px; border-radius: 5px; display: inline-block; }
@media (max-width: 768px) {
  .uebersicht { padding: 16px 14px 40px; }
  .bu-period { margin-left: 0; flex: 1 1 100%; }
  .bu-month { flex: 0 0 90px; }
}

/* ═══════════════════ Jahresabschluss ═══════════════════ */
.ja-row { display: flex; align-items: center; gap: 14px; padding: 9px 0; border-bottom: 1px solid #f0eef5; flex-wrap: wrap; }
.ja-row:last-child { border-bottom: 0; }
.ja-row.done { background: #f4faf6; }
.ja-status { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-weight: 600; }
.ja-erl { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.ja-erl input { padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; }
.ja-frist { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--muted); }
.ja-frist.over { color: var(--red); }
.ja-frist.done { color: #2f7d4f; }
.ja-row.irrelevant { opacity: .55; }
/* Jahresabschluss-Reiter (je Mandant) */
.ja-meta { display: flex; gap: 18px; flex-wrap: wrap; }
.ja-meta .field { flex: 1 1 200px; margin: 0; }
.ja-checklist { padding: 6px 14px 12px; }
.ja-item { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid #f0eef5; }
.ja-item:last-of-type { border-bottom: 0; }
.ja-chk { display: flex; align-items: center; gap: 10px; cursor: pointer; flex: 1; }
.ja-chk input { width: 17px; height: 17px; flex: 0 0 auto; }
.ja-item.done .ja-itext { text-decoration: line-through; color: var(--muted); }
.ja-iact { display: flex; gap: 12px; opacity: 0; transition: opacity .12s; }
.ja-item:hover .ja-iact { opacity: 1; }
.ja-additem { display: flex; gap: 8px; padding: 14px 4px 2px; }
.ja-additem input { flex: 1; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
@media (max-width: 768px) {
  .ja-row .bu-month { flex: 1 1 100% !important; }
  .ja-status { flex: 1 1 100%; }
  .ja-erl { flex: 1 1 100%; } .ja-erl input { flex: 1; }
  .ja-frist { margin-left: 0; }
  .ja-iact { opacity: 1; }
  .ja-meta { gap: 10px; }
}

/* Meine Aufgaben */
.ma-add { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ma-add #ma-title { flex: 1 1 220px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.ma-add input[type="date"], .ma-add select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.ma-row { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid #f0eef5; }
.ma-row:last-child { border-bottom: 0; }
.ma-chk { display: flex; align-items: center; gap: 10px; cursor: pointer; flex: 1; min-width: 0; }
.ma-chk input { width: 17px; height: 17px; flex: 0 0 auto; }
.ma-title { overflow: hidden; text-overflow: ellipsis; }
.ma-rec { font-size: 12px; font-weight: 700; color: var(--violet); background: #efe9fb; border-radius: 6px; padding: 2px 8px; white-space: nowrap; }
.ma-due { font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.ma-due.over { color: var(--red); }
.ma-act { display: flex; gap: 12px; opacity: 0; transition: opacity .12s; }
.ma-row:hover .ma-act { opacity: 1; }
@media (max-width: 768px) {
  .ma-act { opacity: 1; }
  .ma-row { flex-wrap: wrap; }
  .ma-chk { flex: 1 1 100%; }
}

/* Neuaufnahme + Kontakte */
.onb-row { display: flex; gap: 12px; align-items: center; padding: 10px 4px; border-bottom: 1px solid #f0eef5; flex-wrap: wrap; }
.onb-row:last-child { border-bottom: 0; }
.onb-row.done { opacity: .9; }
.onb-main { flex: 1; min-width: 200px; }
.onb-name { font-weight: 700; color: var(--violet-deep); }
.onb-sub { font-size: 12px; color: var(--muted); margin: 1px 0 6px; }
.onb-linkinput { width: 100%; max-width: 460px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; font-size: 12px; color: var(--muted); background: #faf9fd; }
.onb-act { display: flex; gap: 8px; flex-wrap: wrap; }
.ct-row { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid #f0eef5; }
.ct-row:last-child { border-bottom: 0; }
.ct-main { flex: 1; min-width: 0; }
.ct-name { font-weight: 700; }
.ct-sub { font-size: 13px; color: var(--ink); }
.ct-sub a { color: var(--violet); }
.ct-roles { display: flex; flex-wrap: wrap; gap: 4px; margin: 3px 0; }
.ct-chip { background: #efecf7; color: var(--violet-deep); font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 20px; }
.ct-actions { display: flex; gap: 2px; flex-shrink: 0; }
.linkbtn-muted { color: var(--muted); }
.ct-rolegrid { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 4px; }
.ct-rolebox { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink); cursor: pointer; }
.ct-rolebox input { margin: 0; }
.pick-pkg { margin-top: 6px; font-size: 12.5px; color: var(--muted); width: 100%; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: #faf9fd; }
.ar-row { display: flex; align-items: center; gap: 8px; padding: 7px 2px; border-bottom: 1px solid #f0eef5; }
.ar-row:last-child { border-bottom: 0; }
.ar-zu { font-size: 12.5px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 8px; background: #fff; max-width: 170px; }
.ar-zu:disabled { background: #f3f1f8; color: var(--muted); }
.auf-month { display: flex; align-items: center; gap: 8px; }
.auf-mlabel { font-weight: 700; min-width: 130px; text-align: center; }
.auf-filters { display: flex; flex-wrap: wrap; gap: 14px; margin: 4px 0 2px; }
.auf-seg { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.auf-seglabel { font-size: 12px; color: var(--muted); margin-right: 2px; }
.auf-segbtn { font: inherit; font-size: 12.5px; padding: 4px 10px; border: 1px solid var(--line); background: #fff; border-radius: 20px; cursor: pointer; color: var(--ink); }
.auf-segbtn.active { background: var(--violet); color: #fff; border-color: var(--violet); }
.auf-row { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid #f0eef5; cursor: pointer; }
.auf-row:last-child { border-bottom: 0; }
.auf-row:hover { background: #faf9fd; }
.auf-main { flex: 1; min-width: 0; }
.auf-title { font-weight: 600; }
.auf-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.auf-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.auf-badge { font-size: 10.5px; font-weight: 700; padding: 1px 8px; border-radius: 20px; color: #fff; }
.auf-badge.auf-buchhaltung { background: var(--violet); }
.auf-badge.auf-lohn { background: #2f7d4f; }
.auf-badge.auf-ja { background: #9a6a16; }
.auf-badge.auf-sonstiges { background: #6B6580; }
.auf-done { font-size: 11px; font-weight: 700; color: #2f7d4f; background: #eaf7ef; padding: 1px 8px; border-radius: 20px; }
.auf-none { color: var(--red); }
.auf-manual-tag { font-size: 10px; font-weight: 700; color: var(--violet); background: #efeaf8; padding: 1px 7px; border-radius: 20px; vertical-align: middle; }
.auf-billed { color: #1f6b3a; font-weight: 700; }
.auf-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.auf-row.is-manual { background: #fcfbfe; }
.auf-right .tl-due { font-size: 12px; font-weight: 700; white-space: nowrap; color: var(--muted); }
.auf-right .tl-due.overdue { color: var(--red); }
@media (max-width: 768px) { .onb-act { width: 100%; } }
/* Formular-Builder */
.fe-add { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 10px; }
.fe-fields { display: flex; flex-direction: column; gap: 8px; }
.fe-row { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #fcfbfe; }
.fe-row-top { display: flex; align-items: center; gap: 8px; }
.fe-row-top .fe-label { flex: 1; }
.fe-move { display: flex; flex-direction: column; line-height: 1; }
.fe-move .linkbtn { padding: 0 2px; font-size: 11px; }
.fe-row-props { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.fe-row-props .fe-key { flex: 1; min-width: 160px; }
.fe-req { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.fe-row textarea.fe-opts { width: 100%; margin-top: 6px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
.fe-row input, .fe-row select, .fe-row textarea { padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }

/* ───────────── Zeiterfassung ───────────── */
.zeit-format { display: flex; gap: 6px; }
.zeit-timer { display: flex; align-items: center; gap: 14px; justify-content: space-between;
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 6px 0 14px; background: #fcfbfe; }
.zeit-timer.running { border-color: var(--violet); background: #f5f2fc; }
.zeit-timer-left { min-width: 0; }
.zeit-timer-state { font-size: 12.5px; font-weight: 700; color: var(--violet); }
.zeit-timer .muted { color: var(--muted); }
.zeit-live { font-size: 30px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: 1px; color: var(--ink); }
.zeit-timer-sub { font-size: 13px; color: var(--ink); margin-top: 3px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.zeit-timer-actions { display: flex; gap: 8px; flex-shrink: 0; }
.zeit-eval-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 12px; background: #fff; }
.zeit-eval-row { display: flex; align-items: flex-start; gap: 12px; padding: 6px 0; border-bottom: 1px solid #f3f1f8; }
.zeit-eval-row:last-child { border-bottom: 0; }
.zeit-eval-label { width: 130px; flex-shrink: 0; font-size: 12.5px; color: var(--muted); font-weight: 600; padding-top: 3px; }
.zeit-total { font-size: 20px; font-weight: 800; color: var(--violet); font-variant-numeric: tabular-nums; }
.zeit-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.zeit-chip { display: inline-flex; align-items: center; gap: 6px; background: #f5f4f9; border: 1px solid var(--line);
  border-radius: 20px; padding: 3px 11px; font-size: 12.5px; }
.zeit-chip .swatch { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.zeit-unit { font-size: 12px; font-weight: 500; color: var(--muted); }
.zeit-row { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid #f0eef5; }
.zeit-row:last-child { border-bottom: 0; }
.zeit-row .swatch { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.zeit-main { flex: 1; min-width: 0; }
.zeit-title { font-weight: 600; }
.zeit-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.zeit-date { white-space: nowrap; }
.zeit-who { font-weight: 700; color: var(--violet); }
.zeit-dur { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 15px; white-space: nowrap; }
.zeit-dur .zeit-unit { font-weight: 500; }
.zeit-actions { display: flex; gap: 6px; flex-shrink: 0; }
@media (max-width: 768px) {
  .zeit-timer { flex-direction: column; align-items: stretch; }
  .zeit-timer-actions { justify-content: flex-end; }
  .zeit-eval-row { flex-direction: column; gap: 4px; }
  .zeit-eval-label { width: auto; }
  .zeit-row { flex-wrap: wrap; }
  .zeit-dur { margin-left: auto; }
  .zeit-actions { width: 100%; justify-content: flex-end; }
}
