/* =====================================================================
   Odin – Design-System
   Hell (Standard) und Dunkel (data-theme="dark"); alle Farben als Variablen.
   ===================================================================== */
:root {
  --bg: #f5f6fa; --bg-grad: radial-gradient(1200px 600px at 100% -10%, #eef0ff 0%, transparent 60%), radial-gradient(900px 500px at -10% 110%, #f1ecff 0%, transparent 55%), #f5f6fa;
  --panel: #ffffff; --panel-2: #fafbfd; --field: #ffffff; --hover: #f4f6fb;
  --line: rgba(15, 23, 42, .09); --line2: rgba(15, 23, 42, .055); --line-strong: rgba(15, 23, 42, .16);
  --text: #0f172a; --muted: #64748b; --ink: #0f172a;
  --accent: #4f46e5; --accent-2: #7c3aed; --accent-weak: rgba(79, 70, 229, .09); --accent-ring: rgba(79, 70, 229, .22);
  --grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --ok: #059669; --ok-weak: rgba(5, 150, 105, .1); --warn: #c2680c; --warn-weak: rgba(217, 119, 6, .12);
  --bad: #e11d48; --bad-weak: rgba(225, 29, 72, .09); --violet: #7c3aed; --violet-weak: rgba(124, 58, 237, .1);
  --side: 248px; --top: 60px; --radius: 14px; --r-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 1px rgba(15, 23, 42, .02);
  --shadow-card: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 24px -8px rgba(15, 23, 42, .08);
  --shadow: 0 24px 60px -12px rgba(15, 23, 42, .28), 0 8px 20px -8px rgba(15, 23, 42, .12);
  --ease: cubic-bezier(.2, .8, .2, 1);
  font-size: 14px; color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b0e17; --bg-grad: radial-gradient(1200px 600px at 100% -10%, rgba(79, 70, 229, .16) 0%, transparent 60%), radial-gradient(900px 500px at -10% 110%, rgba(124, 58, 237, .12) 0%, transparent 55%), #0b0e17;
  --panel: #121725; --panel-2: #161c2c; --field: #0f1421; --hover: #1a2133;
  --line: rgba(226, 232, 240, .09); --line2: rgba(226, 232, 240, .055); --line-strong: rgba(226, 232, 240, .18);
  --text: #e5e9f2; --muted: #8b95a9; --ink: #e5e9f2;
  --accent: #818cf8; --accent-2: #a78bfa; --accent-weak: rgba(129, 140, 248, .14); --accent-ring: rgba(129, 140, 248, .3);
  --grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --ok: #34d399; --ok-weak: rgba(52, 211, 153, .13); --warn: #fbbf24; --warn-weak: rgba(251, 191, 36, .13);
  --bad: #fb7185; --bad-weak: rgba(251, 113, 133, .13); --violet: #a78bfa; --violet-weak: rgba(167, 139, 250, .14);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px -10px rgba(0, 0, 0, .5);
  --shadow: 0 24px 60px -12px rgba(0, 0, 0, .7);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg-grad); background-attachment: fixed; color: var(--text);
  font-family: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  font-feature-settings: "cv11", "ss01", "tnum" 0; -webkit-font-smoothing: antialiased; letter-spacing: -.003em; }
a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent-2); }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent-ring); }
h1 { font-size: 23px; font-weight: 700; margin: 0; letter-spacing: -.022em; line-height: 1.25; }
h2 { font-size: 16px; font-weight: 650; margin: 0 0 12px; letter-spacing: -.012em; }
h3 { font-size: 13.5px; font-weight: 650; margin: 18px 0 8px; letter-spacing: -.005em; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.neg { color: var(--bad); }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }

/* ---------- Layout: Seitenleiste ---------- */
#side { position: fixed; inset: 0 auto 0 0; width: var(--side); z-index: 20; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #0d1222 0%, #111733 100%); color: #e2e8f0;
  --text: #e2e8f0; --muted: #8e99b3; --line: rgba(255, 255, 255, .08); --line2: rgba(255, 255, 255, .07); --bg: rgba(255, 255, 255, .06);
  --panel: rgba(255, 255, 255, .04); --field: rgba(255, 255, 255, .06); --accent-weak: rgba(129, 140, 248, .16); --accent: #a5b4fc;
  box-shadow: 1px 0 0 rgba(255, 255, 255, .04); }
#brand { height: 92px; display: flex; align-items: center; justify-content: center; padding: 0 20px; position: relative; }  /* Logo mittig */
#brand img { height: 66px; width: auto; display: block; }  /* omnia-Logo (weiß, freigestellt) */
#brand span { position: absolute; top: 12px; right: 12px; font-size: 10.5px; color: var(--muted); border: 1px solid var(--line); padding: 1px 7px; border-radius: 20px; }
#nav { overflow-y: auto; padding: 6px 12px 20px; flex: 1; }
#nav .grp { font-size: 10.5px; font-weight: 650; color: #6b7694; letter-spacing: .09em; margin: 18px 10px 6px; text-transform: uppercase; }
/* Menü: Trennlinien statt Überschriften, Objektauswahl mit den Funktionen des gewählten Objekts */
#nav .nav-trenner { height: 1px; background: rgba(255, 255, 255, .09); margin: 12px 8px; }
#nav .nav-objekt { margin: 0 2px 6px; }
#nav .nav-objekt select { width: 100%; padding: 9px 11px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .07);
  color: #fff; font: inherit; font-weight: 700; font-size: 13.5px; cursor: pointer; outline: none; }
#nav .nav-objekt select:focus { border-color: #a5b4fc; }
#nav .nav-objekt select option { color: #111827; font-weight: 500; }
#nav .nav-objekt-info { font-size: 11.5px; color: #8f9ab5; margin: 5px 4px 0; }
#nav .nav-objfkt { border-left: 2px solid rgba(165, 180, 252, .35); margin-left: 8px; padding-left: 4px; animation: navEin .35s var(--ease) both; }
#nav .nav-hinweis { font-size: 12px; color: #8f9ab5; padding: 6px 10px; }
@keyframes navEin { from { opacity: 0; transform: translateY(-6px); } }
#nav a { position: relative; display: flex; align-items: center; gap: 11px; padding: 8px 11px; border-radius: 10px; color: #fff; font-weight: 650;
  transition: background .18s var(--ease), color .18s; margin: 1px 0; }
#nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
#nav a.active { background: linear-gradient(90deg, rgba(99, 102, 241, .32), rgba(139, 92, 246, .14)); color: #fff; font-weight: 750;
  box-shadow: inset 0 0 0 1px rgba(165, 180, 252, .18); }
#nav a.active::before { content: ''; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: linear-gradient(#a5b4fc, #c4b5fd); }
#nav a .badge { margin-left: auto; }
#nav svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; opacity: .9; }
#sidefoot { margin: 10px; padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .07);
  font-size: 12px; color: var(--muted); }
#sidefoot a { color: #a5b4fc; }
#sidefoot .badge { background: rgba(255, 255, 255, .08); color: #c3cbe0; }

/* ---------- Kopfzeile ---------- */
#top { position: fixed; left: var(--side); right: 0; top: 0; height: var(--top); z-index: 15; display: flex; align-items: center; gap: 12px; padding: 0 26px;
  background: color-mix(in srgb, var(--panel) 72%, transparent); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line); }
#crumb { font-size: 13px; color: var(--muted); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#crumb b { color: var(--text); font-weight: 600; }
.ctx { display: flex; align-items: center; gap: 6px; background: var(--field); border: 1px solid var(--line); border-radius: 11px; padding: 3px 4px 3px 11px;
  box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; }
.ctx:hover { border-color: var(--line-strong); }
.ctx:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.ctx label { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }
.ctx select { border: 0; background: transparent; padding: 5px 6px; font-weight: 600; max-width: 300px; outline: none; cursor: pointer; }
#main { margin-left: var(--side); padding: calc(var(--top) + 26px) 30px 70px; min-height: 100vh; max-width: calc(1680px + var(--side)); }
#main > * { animation: auftauchen .38s var(--ease) both; }
#main > *:nth-child(2) { animation-delay: .03s; } #main > *:nth-child(3) { animation-delay: .06s; } #main > *:nth-child(4) { animation-delay: .09s; }
@keyframes auftauchen { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Knöpfe ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); background: var(--panel); color: var(--text);
  border-radius: var(--r-sm); padding: 8px 14px; cursor: pointer; font-weight: 550; white-space: nowrap; line-height: 1.2;
  box-shadow: var(--shadow-sm); transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .15s, border-color .15s, color .15s; }
.btn:hover { border-color: var(--line-strong); background: var(--hover); color: var(--text); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:focus-visible, a:focus-visible, select:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--accent-ring); }
.btn.primary { background: var(--grad); border-color: transparent; color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 6px 16px -6px rgba(79, 70, 229, .65); }
.btn.primary:hover { filter: brightness(1.07) saturate(1.05); transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 10px 22px -8px rgba(79, 70, 229, .7); color: #fff; }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-weak); border-color: transparent; color: var(--bad); }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--hover); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 9px; }
.btn:disabled { opacity: .45; cursor: default; transform: none; filter: none; }
.btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ---------- Flächen ---------- */
.head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.head .grow { flex: 1; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px; box-shadow: var(--shadow-card); }
.card.flush { padding: 0; overflow: hidden; }
.card > h2:first-child, .card > .head:first-child h2 { margin-top: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1200px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .g2, .g3 { grid-template-columns: 1fr; } }
.kpi { position: relative; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; cursor: pointer;
  box-shadow: var(--shadow-card); transition: transform .2s var(--ease), box-shadow .25s var(--ease), border-color .2s; }
.kpi::after { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad); opacity: 0; transition: opacity .2s; }
.kpi:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: 0 14px 32px -14px rgba(79, 70, 229, .35), var(--shadow-card); }
.kpi:hover::after { opacity: 1; }
.kpi .v { font-size: 28px; font-weight: 750; margin-top: 6px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kpi .l { color: var(--muted); font-size: 12.5px; font-weight: 550; }
.tabs { display: inline-flex; gap: 2px; margin-bottom: 18px; flex-wrap: wrap; padding: 4px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-sm); }
.tabs a { padding: 7px 14px; color: var(--muted); border-radius: 9px; cursor: pointer; font-weight: 550; transition: background .15s, color .15s; }
.tabs a:hover { color: var(--text); background: var(--hover); }
.tabs a.active { color: #fff; background: var(--grad); box-shadow: 0 4px 12px -4px rgba(79, 70, 229, .55); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 4px 12px; cursor: pointer; font-size: 12.5px; transition: .15s; }
.chip:hover { border-color: var(--line-strong); }
.chip.active { background: var(--ink); color: var(--panel); border-color: var(--ink); }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--line2);
  color: var(--muted); white-space: nowrap; line-height: 1.6; }
.badge.ok { background: var(--ok-weak); color: var(--ok); } .badge.warn { background: var(--warn-weak); color: var(--warn); }
.badge.bad { background: var(--bad-weak); color: var(--bad); } .badge.info { background: var(--accent-weak); color: var(--accent); }
.badge.violet { background: var(--violet-weak); color: var(--violet); }
.badge.ok::before, .badge.warn::before, .badge.bad::before, .badge.info::before, .badge.violet::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.note { border-radius: 12px; padding: 12px 16px; margin: 0 0 16px; background: var(--accent-weak); color: var(--text); font-size: 13px; line-height: 1.55;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent); }
.note.warn { background: var(--warn-weak); border-color: color-mix(in srgb, var(--warn) 22%, transparent); }
.note.bad { background: var(--bad-weak); border-color: color-mix(in srgb, var(--bad) 22%, transparent); }
.note.ok { background: var(--ok-weak); border-color: color-mix(in srgb, var(--ok) 22%, transparent); }
.empty { padding: 40px; text-align: center; color: var(--muted); }

/* ---------- Tabellen ---------- */
table.t { width: 100%; border-collapse: separate; border-spacing: 0; background: transparent; }
table.t th { text-align: left; font-size: 11px; color: var(--muted); font-weight: 650; padding: 11px 12px; border-bottom: 1px solid var(--line);
  background: var(--panel-2); white-space: nowrap; text-transform: uppercase; letter-spacing: .06em; }
table.t td { padding: 10px 12px; border-bottom: 1px solid var(--line2); vertical-align: middle; transition: background .12s; }
table.t tbody tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td, table.t tbody tr:hover td { background: var(--hover); }
table.t tr.sel td { background: var(--accent-weak) !important; }
table.t tr.dim td { color: color-mix(in srgb, var(--muted) 75%, transparent); }
table.t tr.dim td .badge { opacity: .8; }
table.t tr.sum td { font-weight: 650; background: var(--panel-2); border-top: 1px solid var(--line); }
table.t tr.grp td { background: var(--panel-2); font-weight: 650; font-size: 12px; color: var(--muted); }
table.t td.cb, table.t th.cb { width: 36px; text-align: center; }
table.t input[type=checkbox], input[type=checkbox], input[type=radio] { width: 15px; height: 15px; cursor: pointer; accent-color: var(--accent); }
table.t input.cell, table.t select.cell { width: 100%; border: 1px solid transparent; background: transparent; padding: 5px 7px; border-radius: 7px; }
table.t input.cell:hover, table.t select.cell:hover { border-color: var(--line); background: var(--field); }
table.t input.cell:focus, table.t select.cell:focus { border-color: var(--accent); background: var(--field); outline: none; box-shadow: 0 0 0 3px var(--accent-ring); }
table.t input.cell.num { text-align: right; }
.card:not(.flush) table.t th { background: transparent; }
.tablewrap { overflow-x: auto; }

/* Mehrfachauswahl-Leiste */
#bulk { position: fixed; left: calc(var(--side) + 50%); transform: translateX(calc(-50% - var(--side) / 2)); bottom: 24px; z-index: 30;
  background: rgba(15, 23, 42, .92); backdrop-filter: blur(12px); color: #fff; border-radius: 16px; padding: 8px 10px 8px 18px; display: flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow); border: 1px solid rgba(255, 255, 255, .08); animation: hochgleiten .3s var(--ease); }
#bulk .btn { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .1); color: #fff; box-shadow: none; }
#bulk .btn:hover { background: rgba(255, 255, 255, .16); }
#bulk .btn.danger { color: #fda4af; }
#bulk b { margin-right: 6px; white-space: nowrap; }
@keyframes hochgleiten { from { opacity: 0; transform: translate(calc(-50% - var(--side) / 2), 14px); } }

/* ---------- Formulare ---------- */
.form { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px 16px; }
.f { display: flex; flex-direction: column; gap: 6px; grid-column: span 6; }
.f.s1 { grid-column: span 1; } .f.s2 { grid-column: span 2; } .f.s3 { grid-column: span 3; } .f.s4 { grid-column: span 4; } .f.s6 { grid-column: span 6; }
.f.s7 { grid-column: span 7; } .f.s8 { grid-column: span 8; } .f.s12 { grid-column: span 12; }
@media (max-width: 900px) { .f, .f[class*=" s"] { grid-column: span 12; } }
.f > label { font-size: 12px; color: var(--muted); font-weight: 600; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.f input, .f select, .f textarea, .inp, #drawer select, #modal select, .dl-obj select { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 11px;
  background: var(--field); width: 100%; transition: border-color .15s, box-shadow .15s, background .15s; }
.f input:hover, .f select:hover, .f textarea:hover, .inp:hover { border-color: var(--line-strong); }
.f input:focus, .f select:focus, .f textarea:focus, .inp:focus, #drawer select:focus, #modal select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.f input[readonly] { background: var(--panel-2); }
.f input:disabled, .f select:disabled, .f textarea:disabled, .inp:disabled { opacity: .7; cursor: not-allowed; }
select { cursor: pointer; }
textarea { line-height: 1.5; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel-2); padding: 2px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 13px; cursor: pointer; border-radius: 8px; color: var(--muted); font-weight: 550; transition: .15s; }
.seg button:hover { color: var(--text); background: var(--hover); }
.seg button.active { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px rgba(15, 23, 42, .12), 0 0 0 1px var(--line); }
.sec { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); margin-bottom: 14px; box-shadow: var(--shadow-card); }
.sec > .sh { display: flex; align-items: center; gap: 10px; padding: 14px 18px; font-weight: 650; border-bottom: 1px solid var(--line2); }
.sec > .sh .n { width: 24px; height: 24px; border-radius: 8px; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 12px; }
.sec > .sb { padding: 16px 18px; }
.abgr-box { border: 1px dashed color-mix(in srgb, var(--violet) 45%, transparent); background: var(--violet-weak); border-radius: 12px; padding: 12px 14px; margin-top: 10px; }
.abgr-box .flow { font-size: 12.5px; color: var(--violet); margin-top: 8px; line-height: 1.6; }

/* ---------- Drawer / Modal / Toast ---------- */
#shade, #mshade { position: fixed; inset: 0; background: rgba(15, 23, 42, .32); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); z-index: 40;
  animation: einblenden .2s ease both; }
#mshade { z-index: 50; }
#drawer { position: fixed; top: 10px; right: 10px; bottom: 10px; width: min(760px, 92vw); background: var(--panel); z-index: 41; box-shadow: var(--shadow);
  display: flex; flex-direction: column; border-radius: 18px; border: 1px solid var(--line); animation: reinschieben .32s var(--ease) both; overflow: hidden; }
#drawer.wide { width: min(1180px, 96vw); }
#drawer .dh { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
#drawer .dh h2 { margin: 0; flex: 1; font-size: 17px; }
#drawer .db { padding: 18px 20px; overflow-y: auto; flex: 1; }
#drawer .df { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; background: var(--panel-2); }
#modal { position: fixed; left: 50%; top: 9vh; transform: translateX(-50%); width: min(580px, 94vw); background: var(--panel); border-radius: 18px;
  box-shadow: var(--shadow); z-index: 51; max-height: 82vh; display: flex; flex-direction: column; border: 1px solid var(--line); animation: aufpoppen .26s var(--ease) both; }
#modal .mh { padding: 20px 22px 6px; } #modal .mh h2 { font-size: 17px; margin: 0; }
#modal .mb { padding: 10px 22px 14px; overflow-y: auto; line-height: 1.5; }
#modal .mf { padding: 14px 22px 18px; display: flex; gap: 8px; justify-content: flex-end; }
@keyframes einblenden { from { opacity: 0; } }
@keyframes reinschieben { from { opacity: 0; transform: translateX(36px); } }
@keyframes aufpoppen { from { opacity: 0; transform: translate(-50%, 10px) scale(.97); } }
#toast { position: fixed; right: 24px; bottom: 24px; z-index: 60; display: flex; flex-direction: column; gap: 8px; }
#toast div { background: rgba(15, 23, 42, .94); backdrop-filter: blur(10px); color: #fff; padding: 11px 16px 11px 14px; border-radius: 12px; box-shadow: var(--shadow);
  max-width: 420px; border-left: 3px solid #a5b4fc; animation: toastrein .3s var(--ease) both; font-weight: 500; }
#toast div.bad { border-left-color: #fb7185; } #toast div.warn { border-left-color: #fbbf24; }
@keyframes toastrein { from { opacity: 0; transform: translateY(10px) scale(.98); } }

/* ---------- Upload / PDF ---------- */
.drop { border: 1.5px dashed var(--line-strong); border-radius: 14px; padding: 26px; text-align: center; color: var(--muted); background: var(--panel-2);
  cursor: pointer; transition: .2s var(--ease); }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-weak); color: var(--accent); }
.drop.over { transform: scale(1.01); }
.drop b { color: var(--text); font-weight: 600; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(440px, 1fr); gap: 18px; align-items: start; }
.pdf { width: 100%; height: calc(100vh - var(--top) - 100px); border: 1px solid var(--line); border-radius: var(--radius); background: #525659;
  position: sticky; top: calc(var(--top) + 16px); box-shadow: var(--shadow-card); }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite;
  display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.kpick { position: relative; }

/* ---------- HGA-Dokument (bleibt papierhell) ---------- */
.doc { background: #fff; color: #1d2026; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 38px; max-width: 1000px; box-shadow: var(--shadow-card); }
.doc h2 { margin-top: 22px; font-size: 15px; text-align: left; } .doc h3 { text-align: left; }

@media print {
  #side, #top, .noprint, #bulk { display: none !important; }
  #main { margin: 0; padding: 0; } #main > * { animation: none; }
  .doc { border: 0; padding: 0; max-width: none; box-shadow: none; }
  .card { border: 0; box-shadow: none; }
  body { background: #fff; }
}
.card .grid .btn { white-space: normal; justify-content: flex-start; text-align: left; padding: 11px 14px; }
table.t td:has(> div + div) { min-width: 220px; }

/* ---------- Anmeldung ---------- */
#auth { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; overflow: hidden;
  background: radial-gradient(800px 500px at 15% 20%, rgba(99, 102, 241, .35), transparent 60%), radial-gradient(700px 500px at 85% 80%, rgba(139, 92, 246, .3), transparent 60%), #0b1020; }
.authcard { width: min(400px, 100%); background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(16px); border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 22px; padding: 32px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6); animation: aufpoppen2 .4s var(--ease) both; }
@keyframes aufpoppen2 { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.authlogo { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.authlogo img { height: 72px; width: auto; display: block; }
[data-theme="dark"] .authlogo img { filter: invert(1) brightness(2); }
.authlogo b { font-size: 24px; letter-spacing: -.02em; font-weight: 750; }
.authcard .f input { width: 100%; }
.authcard .btn.primary { width: 100%; padding: 11px; margin-top: 6px; }
body.nurlesen #bulk, body.nurlesen .drop { display: none !important; }

/* ---------- Zeitleiste Abrechnungsstand ---------- */
.tl { display: flex; align-items: flex-start; gap: 0; overflow-x: auto; padding-bottom: 4px; }
.tl-p { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 64px; }
.tl-klein .tl-p { min-width: 0; }
.tl-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700;
  background: var(--panel-2); color: var(--muted); border: 1.5px solid var(--line-strong); transition: .2s; }
.tl-klein .tl-dot { width: 20px; height: 20px; font-size: 10px; }
.tl-erledigt .tl-dot { background: linear-gradient(135deg, #10b981, #059669); border-color: transparent; color: #fff; box-shadow: 0 3px 8px -3px rgba(5, 150, 105, .6); }
.tl-laeuft .tl-dot { background: var(--accent-weak); border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px var(--accent-weak); }
.tl-entfaellt .tl-dot { background: transparent; border-style: dashed; }
.tl-l { font-size: 11px; color: var(--muted); text-align: center; line-height: 1.25; max-width: 76px; overflow-wrap: anywhere; hyphens: auto; }
.tl-laeuft .tl-l { color: var(--accent); font-weight: 650; } .tl-erledigt .tl-l { color: var(--ok); }
.tl-line { flex: 1; height: 2px; background: var(--line-strong); margin-top: 14px; min-width: 6px; border-radius: 2px; }
.tl-klein .tl-line { margin-top: 10px; min-width: 4px; }
.tl-balken { height: 4px; background: var(--line2); border-radius: 4px; margin-top: 7px; overflow: hidden; }
.tl-balken span { display: block; height: 100%; background: linear-gradient(90deg, #10b981, #34d399); border-radius: 4px; }
.stand-kpi { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; margin-bottom: 18px; }
.stand-kpi .kpi { padding: 12px 14px; } .stand-kpi .kpi .v { font-size: 22px; }
.kpi-aktiv { border-color: var(--accent) !important; background: var(--accent-weak); box-shadow: 0 0 0 4px var(--accent-ring) !important; }
.sb-grid { grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); align-items: start; }
@media (max-width: 1100px) { .sb-grid { grid-template-columns: 1fr; } }
.sb-phase { display: flex; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line2); transition: background .15s; }
.sb-phase:hover { background: var(--panel-2); }
.sb-phase:last-child { border-bottom: 0; }
.sb-num { width: 30px; height: 30px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); display: grid; place-items: center; font-weight: 700; color: var(--muted); flex: none; }
.sb-erledigt .sb-num { background: linear-gradient(135deg, #10b981, #059669); border-color: transparent; color: #fff; }
.sb-laeuft .sb-num { background: var(--grad); border-color: transparent; color: #fff; }
.sb-entfaellt { opacity: .55; }
.sb-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.sb-kopf { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.sb-edit { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sb-edit .seg button { padding: 5px 10px; font-size: 12.5px; }
.sb-edit .inp[data-bem] { min-width: 140px !important; }
.sb-notiz { border-top: 1px solid var(--line2); padding: 10px 0; font-size: 13.5px; line-height: 1.5; }
.sb-schl { padding: 9px 0; border-bottom: 1px solid var(--line2); }
.sb-schl:last-of-type { border-bottom: 0; }
textarea.inp { font: inherit; resize: vertical; }
.sb-grid > div { min-width: 0; }

/* ---------- Objektbetreuung ---------- */
.top-card { margin-bottom: 12px; background: var(--panel-2) !important; box-shadow: none; }
.stimmen { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 16px; margin-top: 8px; }
.stimme { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line2); }
.stimme .seg button { padding: 4px 9px; font-size: 12.5px; }
/* ETV-Abstimmung: Eigentümer untereinander, Stimme farbig */
table.abst td { transition: background .15s; }
table.abst tr.st-ja td { background: color-mix(in srgb, var(--ok) 15%, transparent); }
table.abst tr.st-nein td { background: color-mix(in srgb, var(--bad) 14%, transparent); }
table.abst tr.st-enthaltung td { background: color-mix(in srgb, var(--muted) 16%, transparent); }
.abst-seg button { padding: 4px 12px; font-size: 12.5px; min-width: 64px; }
.abst-seg button.active[data-s="ja"] { background: var(--ok); color: #fff; }
.abst-seg button.active[data-s="nein"] { background: var(--bad); color: #fff; }
.abst-seg button.active[data-s="enthaltung"] { background: var(--muted); color: #fff; }
.abst-seg button:disabled { cursor: not-allowed; }
.abst-seg button:disabled:not(.active) { opacity: .45; }
.abst-global { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.abst-global .btn.ja { color: var(--ok); } .abst-global .btn.nein { color: var(--bad); }
.zeitfeld { display: flex; gap: 6px; } .zeitfeld input { width: 80px; flex: 0 0 auto; }
.bereichwahl { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.bereichwahl select { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; font-size: 12px; background: var(--field); color: #e2e8f0; }
.bereichwahl select option { color: #0f172a; }
.bereichwahl label { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.themawahl { margin-left: auto; background: none; border: 1px solid var(--line); color: #c3cbe0; border-radius: 8px; padding: 2px 8px; cursor: pointer; font-size: 12px; }
.themawahl:hover { background: rgba(255, 255, 255, .08); }
.dash-liste { list-style: none; margin: 0; padding: 0; }
.dash-liste li { display: flex; gap: 12px; align-items: baseline; padding: 9px 8px; margin: 0 -8px; border-bottom: 1px solid var(--line2); border-radius: 8px; transition: background .12s; }
.dash-liste li.click { cursor: pointer; } .dash-liste li.click:hover { background: var(--hover); }
.dash-liste li:last-child { border-bottom: 0; }
.dash-liste .grow { flex: 1; min-width: 0; }
.kpi.warn .v { color: var(--warn); } .kpi.bad .v { color: var(--bad); } .kpi.ok .v { color: var(--ok); }
.phasenbalken { display: flex; height: 30px; border-radius: 10px; overflow: hidden; background: var(--line2); gap: 2px; }
.phasenbalken span { display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 650; color: #fff; min-width: 0; overflow: hidden; white-space: nowrap; }
.ki-btn { margin-left: 6px; border: 0; background: linear-gradient(135deg, rgba(124, 58, 237, .12), rgba(79, 70, 229, .12)); color: var(--violet); border-radius: 999px;
  padding: 2px 10px; font-size: 11.5px; cursor: pointer; font-weight: 600; transition: .18s var(--ease); box-shadow: inset 0 0 0 1px rgba(124, 58, 237, .22); }
.ki-btn:hover { background: var(--grad); color: #fff; box-shadow: 0 4px 12px -4px rgba(124, 58, 237, .6); }
.ki-btn[disabled] { opacity: .65; cursor: wait; }
.dl-obj { display: grid; grid-template-columns: 2fr 1.3fr 1.6fr auto auto; gap: 6px; align-items: center; margin-bottom: 6px; }
.dl-obj input.inp { min-width: 0; padding: 7px 9px; }
.bilder { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 12px; }
.bild { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel-2); transition: transform .2s var(--ease), box-shadow .2s; }
.bild:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.bild.titel { border-color: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, .2); }
.bild img { width: 100%; height: 124px; object-fit: cover; display: block; }
.bild-fuss { display: flex; gap: 2px; align-items: center; padding: 5px; }
.bild-fuss .inp { flex: 1; min-width: 0; padding: 4px 7px; font-size: 12px; }
.bild-fuss .btn.aus { opacity: .35; }

/* ---------- Kalender ---------- */
.k-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .k-wrap { grid-template-columns: 1fr; } }
.k-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.k-kopf { padding: 8px 10px; font-size: 11px; color: var(--muted); font-weight: 650; border-bottom: 1px solid var(--line); text-transform: uppercase; letter-spacing: .06em; }
.k-tag { min-height: 104px; border-right: 1px solid var(--line2); border-bottom: 1px solid var(--line2); padding: 5px 6px; overflow: hidden; transition: background .12s; }
.k-tag:hover { background: var(--panel-2); }
.k-tag:nth-child(7n) { border-right: 0; }
.k-tag.fremd { background: var(--panel-2); } .k-tag.fremd .k-nr { opacity: .45; }
.k-tag.heute .k-nr { background: var(--grad); color: #fff; border-radius: 999px; padding: 1px 8px; display: inline-block; box-shadow: 0 3px 8px -3px rgba(79, 70, 229, .6); }
.k-nr { font-size: 12px; margin-bottom: 4px; font-weight: 600; }
.k-ev { font-size: 11.5px; border-left: 3px solid var(--f); background: color-mix(in srgb, var(--f) 12%, var(--panel)); border-radius: 6px; padding: 2px 6px; margin-bottom: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; transition: transform .12s, background .12s; }
.k-ev:hover { background: color-mix(in srgb, var(--f) 20%, var(--panel)); transform: translateX(1px); }
.k-leg { display: inline-flex; align-items: center; gap: 5px; margin-left: 10px; } .k-leg::before { content: ''; width: 9px; height: 9px; border-radius: 3px; background: var(--f); }
.k-punkt { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--f); margin-right: 7px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--f) 18%, transparent); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.avatar { width: 32px; height: 32px; border-radius: 10px; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none;
  box-shadow: 0 4px 12px -4px rgba(99, 102, 241, .6); }

/* ---------- KI-Assistent / Terminvorbereitung ---------- */
.ki-karte { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; background: var(--panel-2); }
.ki-antwort { margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: var(--panel); border: 1px solid color-mix(in srgb, var(--violet) 25%, transparent);
  box-shadow: 0 6px 20px -12px rgba(124, 58, 237, .35); animation: auftauchen .3s var(--ease) both; line-height: 1.55; }
.ki-laedt { display: flex; align-items: center; gap: 10px; padding: 14px; color: var(--violet); font-weight: 550; }
.ki-h { margin: 12px 0 4px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ki-ul { margin: 0; padding-left: 18px; line-height: 1.55; } .ki-ul li { margin: 2px 0; }
.ki-doks { display: flex; flex-direction: column; gap: 4px; }
.ki-dok { display: flex; gap: 8px; align-items: center; padding: 7px 10px; border-radius: 9px; border: 1px solid var(--line2); background: var(--panel); color: var(--text); transition: .15s; }
.ki-dok:hover { border-color: var(--accent); background: var(--accent-weak); color: var(--text); }
.ck { display: flex; gap: 9px; align-items: flex-start; padding: 6px 4px; border-radius: 8px; cursor: pointer; line-height: 1.4; }
.ck:hover { background: var(--hover); } .ck input { margin-top: 2px; flex: none; } .ck span { flex: 1; }
.ck.fertig span { text-decoration: line-through; color: var(--muted); } .ck a { opacity: 0; color: var(--muted); cursor: pointer; } .ck:hover a { opacity: 1; }
.plan { list-style: none; margin: 0; padding: 0; }
.plan li { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 10px; border-bottom: 1px solid var(--line2); }
.plan li.click { cursor: pointer; } .plan li.click:hover { background: var(--hover); }
.plan li > div { flex: 1; }
.plan-wann { min-width: 110px; font-weight: 650; color: var(--accent); font-size: 12.5px; padding-top: 1px; }
.lf { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line2); } .lf:last-child { border-bottom: 0; }
.lf-nr { width: 26px; height: 26px; border-radius: 8px; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.lf-zitat { margin: 4px 0; padding: 6px 10px; border-left: 3px solid var(--violet); background: var(--violet-weak); border-radius: 0 8px 8px 0; font-style: italic; }
.kat { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; margin-left: 4px; white-space: nowrap; }
@media print { .vb.grid { display: block; } .ki-dok { border: 0; padding: 2px 0; } .vb-kopf h1 { font-size: 20px; } }
.ki-leiste { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; background: linear-gradient(135deg, var(--violet-weak), var(--accent-weak)); border-color: color-mix(in srgb, var(--violet) 22%, transparent); }
.f input[type=checkbox], .f input[type=radio], .ck input { width: 15px !important; height: 15px; padding: 0; flex: none; box-shadow: none; }
.f label:has(> input[type=checkbox]) { display: flex; align-items: center; gap: 6px; }

/* ---------- Odin-Assistent (Chat) ---------- */
#toast { bottom: 88px; }
#okiKnopf { position: fixed; right: 24px; bottom: 24px; z-index: 35; display: flex; align-items: center; gap: 8px; border: 0; cursor: pointer;
  padding: 12px 18px 12px 14px; border-radius: 999px; background: var(--grad); color: #fff; font-weight: 650;
  box-shadow: 0 12px 30px -8px rgba(79, 70, 229, .6), 0 0 0 1px rgba(255, 255, 255, .15) inset; transition: transform .2s var(--ease), opacity .2s, box-shadow .2s; }
#okiKnopf span { font-size: 17px; } #okiKnopf:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 16px 36px -8px rgba(79, 70, 229, .7); }
#okiKnopf.weg { opacity: 0; pointer-events: none; transform: scale(.8); }
#okiPanel { position: fixed; right: 18px; bottom: 18px; z-index: 45; width: min(440px, calc(100vw - 36px)); height: min(700px, calc(100vh - 36px));
  display: flex; flex-direction: column; background: color-mix(in srgb, var(--panel) 94%, transparent); backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; transform-origin: bottom right;
  transition: transform .28s var(--ease), opacity .2s; }
#okiPanel.zu { opacity: 0; transform: translateY(14px) scale(.96); pointer-events: none; }
.oki-kopf { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px 16px; border-bottom: 1px solid var(--line); }
.oki-logo { width: 34px; height: 34px; border-radius: 11px; background: var(--grad); display: grid; place-items: center; color: #fff; box-shadow: 0 6px 16px -6px rgba(79, 70, 229, .7); }
.oki-sub { font-size: 11.5px; color: var(--muted); }
.oki-verlauf { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.oki-m { max-width: 92%; padding: 10px 13px; border-radius: 16px; line-height: 1.5; font-size: 13.5px; animation: auftauchen .25s var(--ease) both; overflow-wrap: anywhere; }
.oki-m.ich { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 5px; white-space: pre-wrap; }
.oki-m.ki { align-self: flex-start; background: var(--panel-2); border: 1px solid var(--line2); border-bottom-left-radius: 5px; }
.oki-m.ki p:first-child { margin-top: 0; } .oki-m.ki p:last-child { margin-bottom: 0; }
.oki-info { align-self: flex-start; font-size: 11.5px; color: var(--muted); padding: 0 6px; }
.oki-denkt { display: flex; gap: 4px; padding: 13px 15px; }
.oki-denkt span { width: 7px; height: 7px; border-radius: 50%; background: var(--violet); animation: hupf 1s infinite ease-in-out; }
.oki-denkt span:nth-child(2) { animation-delay: .15s; } .oki-denkt span:nth-child(3) { animation-delay: .3s; }
@keyframes hupf { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
.oki-bestaetigen { align-self: stretch; border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); background: var(--warn-weak); border-radius: 14px; padding: 10px 12px; }
.oki-bestaetigen.erledigt { opacity: .7; border-color: var(--line); background: var(--panel-2); }
.oki-b-kopf { font-weight: 650; font-size: 12.5px; margin-bottom: 4px; }
.oki-b-knoepfe { display: flex; gap: 6px; justify-content: flex-end; margin-top: 6px; }
.oki-eingabe { display: flex; gap: 8px; align-items: flex-end; padding: 12px; border-top: 1px solid var(--line); }
.oki-eingabe textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; background: var(--field); line-height: 1.4; max-height: 140px; }
.oki-eingabe textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.oki-eingabe .btn { border-radius: 12px; padding: 10px 14px; }
.oki-fuss { font-size: 10.5px; color: var(--muted); padding: 0 14px 10px; }
.oki-start { margin: auto 0; text-align: center; padding: 10px; }
.oki-gross { font-size: 22px; font-weight: 750; letter-spacing: -.02em; margin-bottom: 4px; }
.oki-vorschlaege { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.oki-vorschlaege .chip { text-align: left; border-radius: 12px; padding: 8px 12px; background: var(--panel); }
.oki-vorschlaege .chip:hover { border-color: var(--accent); background: var(--accent-weak); }
@media print { #okiKnopf, #okiPanel { display: none !important; } }
.ki-tab { margin: 8px 0; font-size: 12.5px; } .ki-tab th, .ki-tab td { padding: 5px 8px; } .oki-m .ki-tab th { background: transparent; }
/* ---------- Controlling ---------- */
.ct-chart { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px; height: 220px; align-items: end; padding-top: 10px; }
.ct-spalte { display: flex; flex-direction: column; align-items: center; height: 100%; gap: 6px; }
.ct-balken { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.ct-balken span { width: 30%; max-width: 18px; border-radius: 5px 5px 2px 2px; min-height: 2px; transition: height .5s var(--ease); }
.ct-soll { background: #c7d2fe; } .ct-ist { background: var(--accent); } .ct-sonder { background: var(--violet); }
.ct-m { font-size: 11.5px; color: var(--muted); }

/* ---------- Telefonie ---------- */
.tel-btn { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 6px; border-radius: 999px; color: var(--ok); background: var(--ok-weak);
  font-weight: 550; font-size: 12.5px; white-space: nowrap; transition: .15s; vertical-align: middle; }
.tel-btn:hover { background: var(--ok); color: #fff; }
.tel-btn svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; }
.tel-btn:not(:has(span)) { padding: 4px; }
#telNotiz { position: fixed; left: calc(var(--side) + 24px); bottom: 24px; z-index: 44; width: min(420px, calc(100vw - var(--side) - 48px)); background: var(--panel);
  border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); border-radius: 18px; box-shadow: var(--shadow); animation: aufpoppen2 .3s var(--ease) both; overflow: hidden; }
#telNotiz.mini .tn-body { display: none; }
.tn-kopf { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--ok-weak); }
.tn-puls { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: puls 1.6s infinite; flex: none; }
@keyframes puls { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); } 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.tn-body { padding: 12px 14px; } .tn-body .seg button { padding: 5px 9px; font-size: 12px; }
.tn-body textarea { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--field); width: 100%; }
@media print { #telNotiz { display: none !important; } }

/* ---------- E-Mail ---------- */
.mail-btn { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 6px; border-radius: 999px; color: var(--accent); background: var(--accent-weak);
  font-weight: 550; font-size: 12.5px; white-space: nowrap; transition: .15s; vertical-align: middle; }
.mail-btn:hover { background: var(--accent); color: #fff; }
.mail-btn svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; }
.mail-btn:not(:has(span)) { padding: 4px; }
table.t tr.ungelesen td { font-weight: 650; }
.ml-kopf { padding-bottom: 8px; border-bottom: 1px solid var(--line2); }
.ml-bezug { margin: 10px 0 0; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ml-text { white-space: pre-wrap; line-height: 1.55; padding: 14px 16px; border: 1px solid var(--line2); border-radius: 12px; background: var(--panel-2); max-height: 50vh; overflow: auto; font-size: 13.5px; }

/* ---------- Kalender: Woche + Tagesansicht ---------- */
.k-tag { cursor: pointer; position: relative; }
.k-nr { display: flex; align-items: center; justify-content: space-between; }
.k-plus { opacity: 0; border: 0; background: var(--accent-weak); color: var(--accent); width: 20px; height: 20px; border-radius: 6px; cursor: pointer; font-weight: 700; line-height: 1; transition: opacity .15s; }
.k-tag:hover .k-plus { opacity: 1; } .k-plus:hover { background: var(--accent); color: #fff; }
.kw-tag { padding: 6px 0; border-bottom: 1px solid var(--line2); } .kw-tag:last-child { border-bottom: 0; }
.kw-tag.vorbei { opacity: .55; } .kw-tag.heute .kw-kopf { color: var(--accent); }
.kw-kopf { display: block; font-weight: 650; font-size: 12.5px; color: var(--text); margin-bottom: 2px; } .kw-kopf:hover { color: var(--accent); }
.kw-leer { padding: 2px 0 2px 2px; }
.kt-ganz { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.kt-ganz .k-ev { margin: 0; }
.kt-raster { position: relative; cursor: copy; }
.kt-stunde { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line2); }
.kt-stunde::after { content: ''; position: absolute; left: 64px; right: 0; top: 50%; border-top: 1px dashed var(--line2); }
.kt-stunde:hover { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.kt-zeit { position: absolute; left: 10px; top: 4px; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.kt-ev { position: absolute; border-left: 4px solid var(--f); background: color-mix(in srgb, var(--f) 14%, var(--panel)); border-radius: 8px; padding: 4px 8px; font-size: 12.5px;
  overflow: hidden; cursor: pointer; box-shadow: var(--shadow-sm); transition: transform .12s, box-shadow .12s; z-index: 2; line-height: 1.35; }
.kt-ev:hover { transform: translateX(2px); box-shadow: var(--shadow-card); }
.kt-ev .muted { font-size: 11.5px; }
.kt-jetzt { position: absolute; left: 58px; right: 0; border-top: 2px solid var(--bad); z-index: 3; pointer-events: none; }
.kt-jetzt::before { content: ''; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--bad); }
.kt-karte { max-height: calc(100vh - var(--top) - 140px); overflow-y: auto; }
.kt-ganz { position: sticky; top: 0; z-index: 4; background: var(--panel); }

/* ---------- Aufgaben: Objektbetreuung (blassgrün) / Buchhaltung (blassblau) ---------- */
:root { --ab-ob: #ecf8f0; --ab-ob-rand: #b7e2c6; --ab-bh: #eaf2fd; --ab-bh-rand: #b9d3f5; }
:root[data-theme="dark"] { --ab-ob: rgba(52, 211, 153, .08); --ab-ob-rand: rgba(52, 211, 153, .3); --ab-bh: rgba(96, 165, 250, .09); --ab-bh-rand: rgba(96, 165, 250, .3); }
table.t tr.ab-objektbetreuung td { background: var(--ab-ob); }
table.t tr.ab-buchhaltung td { background: var(--ab-bh); }
table.t tr.ab-objektbetreuung td:first-child { box-shadow: inset 3px 0 0 var(--ab-ob-rand); }
table.t tr.ab-buchhaltung td:first-child { box-shadow: inset 3px 0 0 var(--ab-bh-rand); }
table.t tr.ab-objektbetreuung:hover td { background: color-mix(in srgb, var(--ab-ob) 70%, var(--ab-ob-rand)); }
table.t tr.ab-buchhaltung:hover td { background: color-mix(in srgb, var(--ab-bh) 70%, var(--ab-bh-rand)); }
#drawer.ab-ob-drawer .dh { background: var(--ab-ob); border-bottom-color: var(--ab-ob-rand); }
#drawer.ab-bh-drawer .dh { background: var(--ab-bh); border-bottom-color: var(--ab-bh-rand); }
.ab-wahl button[data-ber="objektbetreuung"].active { background: var(--ab-ob); box-shadow: 0 0 0 1px var(--ab-ob-rand); }
.ab-wahl button[data-ber="buchhaltung"].active { background: var(--ab-bh); box-shadow: 0 0 0 1px var(--ab-bh-rand); }
.ab-etv { border-color: color-mix(in srgb, var(--violet) 30%, transparent); background: var(--violet-weak); }

/* ---------- persönliches Dashboard ---------- */
.dw-raster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; align-items: start; }
.dw-raster > .dw { grid-column: span 2; min-width: 0; position: relative; }
.dw-raster > .dw.halb { grid-column: span 1; }
@media (max-width: 1000px) { .dw-raster > .dw.halb { grid-column: span 2; } }
.dw-raster > .dw.dw-aus { display: none; }
.dw-edit > .dw.dw-aus { display: block; opacity: .4; }
.dw-edit > .dw { outline: 2px dashed var(--accent-ring); outline-offset: 4px; border-radius: var(--radius); margin-bottom: 18px; }
.dw-leiste { display: flex; align-items: center; gap: 6px; padding: 6px 10px; margin-bottom: 8px; border-radius: 10px; background: var(--accent-weak); font-size: 12.5px; }
.dw-leiste button { border: 1px solid var(--line); background: var(--panel); border-radius: 7px; padding: 2px 9px; cursor: pointer; }
.dw-leiste button:hover { border-color: var(--accent); }
.dw-reset { grid-column: span 2; }
.oki-karte { border-color: color-mix(in srgb, var(--violet) 28%, transparent); background: linear-gradient(135deg, color-mix(in srgb, var(--violet) 6%, var(--panel)), var(--panel) 60%); }
.as-hinweise { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.as-hinweis { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line2); }
.as-hinweis.hoch { border-color: color-mix(in srgb, var(--bad) 35%, transparent); background: var(--bad-weak); }
.as-hinweis.mittel { border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.as-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 4px 20px; }
.as-block { min-width: 0; }
.erinnerung { position: fixed; top: calc(var(--top) + 14px); right: 24px; z-index: 60; width: min(380px, calc(100vw - 48px)); background: var(--panel); border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent);
  border-left: 4px solid var(--warn); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); animation: aufpoppen2 .3s var(--ease) both; }

/* ---------- Tabs ---------- */
#tabsBar { position: fixed; top: var(--top); left: var(--side); right: 0; z-index: 14; height: 38px; display: flex; align-items: flex-end; gap: 3px; padding: 0 18px;
  background: color-mix(in srgb, var(--panel) 80%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
#tabsBar .tab { display: flex; align-items: center; gap: 6px; max-width: 220px; min-width: 90px; height: 30px; padding: 0 6px 0 12px; border-radius: 10px 10px 0 0; cursor: pointer;
  color: var(--muted); font-size: 12.5px; font-weight: 550; border: 1px solid transparent; border-bottom: 0; transition: background .15s, color .15s; flex: none; }
#tabsBar .tab:hover { background: var(--hover); color: var(--text); }
#tabsBar .tab.aktiv { background: var(--bg); color: var(--text); border-color: var(--line); box-shadow: inset 0 2px 0 var(--accent); margin-bottom: -1px; height: 31px; }
#tabsBar .tab-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
#tabsBar .tab-x { border: 0; background: transparent; color: var(--muted); width: 20px; height: 20px; border-radius: 6px; cursor: pointer; font-size: 15px; line-height: 1; opacity: .6; }
#tabsBar .tab-x:hover { background: var(--bad-weak); color: var(--bad); opacity: 1; }
#tabsBar .tab-neu { border: 0; background: transparent; width: 28px; height: 28px; margin-bottom: 1px; border-radius: 8px; cursor: pointer; font-size: 18px; color: var(--muted); flex: none; }
#tabsBar .tab-neu:hover { background: var(--accent-weak); color: var(--accent); }
body.mit-tabs main#main { padding-top: calc(var(--top) + 38px + 22px); }
@media print { #tabsBar { display: none !important; } }

/* ---------- Tabs: geteilte Ansicht ---------- */
#tabsBar { justify-content: space-between; }
#tabsBar .tabs-liste { display: flex; align-items: flex-end; gap: 3px; min-width: 0; overflow-x: auto; scrollbar-width: none; height: 100%; }
#tabsBar .tabs-ansicht { display: flex; gap: 2px; align-self: center; margin-left: 10px; flex: none; }
#tabsBar .tabs-ansicht button { border: 1px solid transparent; background: transparent; color: var(--muted); width: 28px; height: 26px; border-radius: 7px; cursor: pointer; font-size: 15px; }
#tabsBar .tabs-ansicht button:hover { background: var(--hover); color: var(--text); }
#tabsBar .tabs-ansicht button.an { background: var(--accent-weak); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
#tabsBar .tab.sichtbar { color: var(--text); background: color-mix(in srgb, var(--bg) 60%, transparent); }
#tabsBar .tab-pos { font-size: 11px; color: var(--accent); }
#tabsTrenner { display: none; }
body.split #tabsRaum { position: fixed; top: calc(var(--top) + 38px); left: var(--side); right: 0; bottom: 0; display: flex; --anteil: .5; }
body.split-unter #tabsRaum { flex-direction: column; }
body.split #tabsRaum > main { margin: 0 !important; padding: 18px 22px 60px !important; min-height: 0 !important; min-width: 0; max-width: none; overflow: auto; position: relative; }
body.split #tabsRaum > main.slot1 { order: 1; flex: 0 0 calc(var(--anteil) * 100% - 4px); }
body.split #tabsRaum > main.slot2 { order: 3; flex: 1 1 0; }
body.split #tabsTrenner { display: block; order: 2; flex: 0 0 8px; background: var(--line2); cursor: col-resize; position: relative; transition: background .15s; }
body.split-unter #tabsTrenner { cursor: row-resize; }
body.split #tabsTrenner:hover { background: var(--accent-ring); }
body.split #tabsRaum > main#main { box-shadow: inset 0 3px 0 var(--accent); }
body.split #tabsRaum > main.zweit { background: color-mix(in srgb, var(--bg) 70%, var(--panel)); }
body.split #tabsRaum > main.zweit::after { content: 'Klicken zum Bearbeiten'; position: sticky; float: right; top: 0; font-size: 11px; color: var(--muted); background: var(--panel); border: 1px solid var(--line); padding: 2px 8px; border-radius: 999px; opacity: .8; }
body.split #tabsRaum > main .dw-raster { grid-template-columns: 1fr; }
body.split #tabsRaum > main .dw-raster > .dw.halb { grid-column: span 1; }
body.split #tabsRaum > main .grid.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- Notizbuch ---------- */
.nb-wrap { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1000px) { .nb-wrap { grid-template-columns: 1fr; } }
.nb-seite-liste { position: sticky; top: calc(var(--top) + 60px); max-height: calc(100vh - var(--top) - 90px); overflow: auto; }
.nb-register { display: flex; flex-wrap: wrap; gap: 4px; }
.nb-register .chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; }
.nb-punkt { width: 8px; height: 8px; border-radius: 50%; background: var(--rf); }
.nb-liste { display: flex; flex-direction: column; gap: 4px; }
.nb-eintrag { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 8px 12px; border-radius: 10px; color: var(--text); border-left: 3px solid var(--rf); background: var(--panel-2); }
.nb-eintrag:hover { background: var(--hover); color: var(--text); }
.nb-eintrag.aktiv { background: var(--accent-weak); }
.nb-eintrag b { font-weight: 600; } .nb-eintrag .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-kopf { position: sticky; top: calc(var(--top) + 46px); z-index: 5; padding: 12px 16px; }
.nb-titel { width: 100%; border: 0; background: transparent; font-size: 22px; font-weight: 700; letter-spacing: -.02em; outline: none; padding: 2px 0 8px; color: var(--text); }
.nb-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nb-meta select { border: 1px solid var(--line); border-radius: 9px; padding: 5px 8px; background: var(--field); max-width: 260px; }
.nb-leiste { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line2); }
.nb-leiste .seg button { padding: 5px 10px; font-size: 12.5px; }
.nb-trenn { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.nb-farben { display: inline-flex; gap: 4px; }
.nb-farben button { width: 20px; height: 20px; border-radius: 50%; background: var(--f); border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.nb-farben button.an { box-shadow: 0 0 0 2px var(--accent); }
.nb-zahl { margin-left: 6px; background: #fff; color: var(--accent); border-radius: 999px; padding: 0 7px; font-size: 11.5px; font-weight: 700; }
.nb-blatt { position: relative; width: 100%; max-width: 900px; margin: 14px 0 0; background: #fffef9; color: #1e293b; border-radius: 6px 6px 14px 14px; box-shadow: var(--shadow-card);
  background-image: repeating-linear-gradient(to bottom, transparent 0 31px, #e2e8f0 31px 32px); background-position: 0 14px; border: 1px solid var(--line); overflow: hidden; }
:root[data-theme="dark"] .nb-blatt { background-color: #f8f6ee; }
.nb-text { position: absolute; inset: 0; padding: 14px 40px 40px 56px; line-height: 32px; font-size: 15px; outline: none; min-height: 100%; caret-color: var(--accent); }
.nb-text h3 { font-size: 19px; margin: 0; line-height: 32px; }
.nb-text ul { margin: 0; padding-left: 22px; }
.nb-text img { max-width: 100%; border-radius: 8px; display: block; margin: 8px 0; }
.nb-blatt::before { content: ''; position: absolute; left: 44px; top: 0; bottom: 0; border-left: 1.5px solid #fca5a5; opacity: .6; pointer-events: none; }
.nb-tinte { position: absolute; left: 0; top: 0; pointer-events: none; touch-action: none; }
.nb-blatt[data-modus="stift"], .nb-blatt[data-modus="marker"] { cursor: crosshair; touch-action: none; }
.nb-blatt[data-modus="radierer"] { cursor: cell; touch-action: none; }
.nb-blatt[data-modus="stift"] .nb-text, .nb-blatt[data-modus="marker"] .nb-text, .nb-blatt[data-modus="radierer"] .nb-text { pointer-events: none; user-select: none; }
.nb-vorschlag { background: var(--panel-2); }
body.split .nb-wrap { grid-template-columns: 1fr; } body.split .nb-seite-liste { position: static; max-height: 260px; }
.nb-wrap h2 svg { width: 20px; height: 20px; vertical-align: -3px; stroke: currentColor; fill: none; stroke-width: 2; margin-right: 4px; }

/* ---------- Unterschriftenfeld ---------- */
.sig-pad { width: 100%; height: 180px; background: #fff; border: 1.5px dashed var(--line); border-radius: 12px; cursor: crosshair; margin-top: 10px;
  background-image: linear-gradient(to right, #cbd5e1, #cbd5e1); background-size: 86% 1px; background-repeat: no-repeat; background-position: 7% 75%; }

/* ---------- Briefe ---------- */
.br-raster { display: grid; grid-template-columns: minmax(320px, 2fr) 3fr; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .br-raster { grid-template-columns: 1fr; } }
body.split .br-raster { grid-template-columns: 1fr; }
.br-liste { max-height: 320px; overflow: auto; border: 1px solid var(--line2); border-radius: 10px; }
.br-zeile { display: flex; gap: 10px; align-items: flex-start; padding: 7px 10px; border-bottom: 1px solid var(--line2); cursor: pointer; }
.br-zeile:last-child { border-bottom: 0; } .br-zeile:hover { background: var(--hover); }
.br-zeile input { margin-top: 3px; }
.br-platz { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 8px; }
.br-platz .chip { font-family: ui-monospace, Consolas, monospace; font-size: 12px; padding: 2px 8px; }

/* Benachrichtigungen (Glocke + Popups) */
.glocke { position: relative; font-size: 16px; padding: 6px 10px; }
#glockeN { position: absolute; top: 0; right: 0; min-width: 17px; height: 17px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
.meldung-pop { position: fixed; right: 24px; z-index: 61; width: min(380px, calc(100vw - 48px)); background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--accent, #2563eb);
  border-radius: 12px; padding: 12px 14px; box-shadow: 0 18px 50px -12px rgba(15, 23, 42, .35); animation: auftauchen .3s ease both; }
.meldung-pop.warn { border-left-color: var(--warn); } .meldung-pop.ok { border-left-color: var(--ok); } .meldung-pop.freigabe { border-left-color: var(--violet, #7c3aed); }
.meldung-liste li { cursor: pointer; } .meldung-liste li.neu b::before { content: "● "; color: var(--bad); }

.pr-balken { height: 7px; border-radius: 99px; background: var(--line); margin: 10px 0 4px; overflow: hidden; }
.pr-balken span { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.rechte-matrix td.num, .rechte-matrix th.num { text-align: center; }

/* Einrichtungsassistent */
.oa-raster { display: grid; grid-template-columns: minmax(320px, 400px) 1fr; gap: 16px; align-items: start; }
.oa-quellen { position: sticky; top: calc(var(--top) + 10px); max-height: calc(100vh - var(--top) - 24px); overflow: auto; }
.oa-form { min-width: 0; }
.oa-up { padding: 8px 0; border-top: 1px solid var(--line); } .oa-up .drop { margin-top: 6px; padding: 10px; }
.oa-q { display: inline-block; font-size: 10px; font-weight: 600; padding: 0 6px; border-radius: 6px; background: color-mix(in srgb, var(--violet, #7c3aed) 14%, transparent); color: var(--violet, #7c3aed); margin-left: 4px; vertical-align: middle; }
.oa-tab .cell { min-width: 0; }
.oa-erk { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; margin-top: 8px; font-size: 13px; }
.oa-erk.wichtig { border-color: color-mix(in srgb, var(--warn) 55%, transparent); background: color-mix(in srgb, var(--warn) 7%, transparent); }
.oa-erk.erl { opacity: .55; }
@media (max-width: 1100px) { .oa-raster { grid-template-columns: 1fr; } .oa-quellen { position: static; max-height: none; } }

/* Vertrieb: Kanban */
.vt-board { display: grid; grid-template-columns: repeat(7, minmax(200px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.vt-spalte { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 8px; min-height: 260px; transition: background .15s; }
.vt-spalte.ueber { background: color-mix(in srgb, var(--accent) 10%, var(--panel-2)); border-color: var(--accent); }
.vt-kopf { display: flex; flex-direction: column; gap: 2px; padding: 4px 6px 8px; border-bottom: 3px solid var(--f); margin-bottom: 8px; }
.vt-karte { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; margin-bottom: 8px; cursor: grab; display: flex; flex-direction: column; gap: 3px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05); transition: transform .12s, box-shadow .15s; }
.vt-karte:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -10px rgba(15, 23, 42, .3); }
.vt-karte.zieht { opacity: .45; }
.vt-schritt { color: var(--accent); }

/* HR */
.hr-quot { display: flex; align-items: baseline; gap: 10px; margin: 4px 0 10px; } .hr-quot b { font-size: 34px; letter-spacing: -.02em; }
.hr-kal { border-collapse: collapse; font-size: 11px; }
.hr-kal th { font-weight: 500; color: var(--muted); padding: 2px 0; min-width: 18px; text-align: center; }
.hr-kal td { height: 20px; border: 1px solid var(--line); padding: 0 6px 0 0; }
.hr-kal td:not(:first-child) { padding: 0; }
.hr-kal .we { background: var(--panel-2); }
.hr-urlaub { background: color-mix(in srgb, #059669 55%, transparent) !important; } .hr-krank { background: color-mix(in srgb, #e11d48 50%, transparent) !important; }
.hr-abwesend { background: color-mix(in srgb, #64748b 45%, transparent) !important; }
.hr-offen { background: repeating-linear-gradient(45deg, color-mix(in srgb, #059669 40%, transparent) 0 3px, transparent 3px 6px) !important; }
.hr-leg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: middle; margin: 0 3px 0 10px; border: 1px solid var(--line); }
#hrTeam, .grid > #hrTeam { min-width: 0; overflow: hidden; }
#hrTeam .tablewrap { overflow-x: auto; max-width: 100%; }

/* Dokumentenverwaltung: Portal-Schalter */
.dms-schalter { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.dms-schalter input { display: none; }
.dms-schalter input + span { width: 30px; height: 17px; border-radius: 99px; background: var(--line); position: relative; transition: background .15s; flex: none; }
.dms-schalter input + span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.dms-schalter input:checked + span { background: var(--ok); }
.dms-schalter input:checked + span::after { left: 15px; }

/* Updatesystem */
#updBanner { position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 70; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  width: min(860px, calc(100vw - 32px)); background: var(--panel); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 14px;
  padding: 10px 14px; box-shadow: 0 18px 50px -12px rgba(15, 23, 42, .35); }
#updOverlay { position: fixed; inset: 0; z-index: 90; background: rgba(15, 23, 42, .45); display: grid; place-items: center; }
#updOverlay .card { text-align: center; min-width: 320px; padding: 28px; }

/* Mitarbeiter-Chat im Stil von WhatsApp Desktop */
.wa { --wa-gruen: #00a884; --wa-blase-ich: #d9fdd3; --wa-blase: #ffffff; --wa-grund: #efeae2; --wa-leiste: #f0f2f5; --wa-panel: #ffffff; --wa-text: #111b21;
  --wa-grau: #667781; --wa-linie: #e9edef; --wa-aktiv: #f0f2f5; --wa-hover: #f5f6f6; --wa-blau: #53bdeb; --wa-muster: rgba(0, 0, 0, .045);
  display: grid; grid-template-columns: minmax(280px, 380px) 1fr; height: calc(100vh - var(--top) - 128px); min-height: 440px;
  border-radius: 14px; overflow: hidden; border: 1px solid var(--wa-linie); box-shadow: 0 8px 30px -12px rgba(11, 20, 26, .25); color: var(--wa-text); background: var(--wa-panel); }
[data-theme="dark"] .wa { --wa-blase-ich: #005c4b; --wa-blase: #202c33; --wa-grund: #0b141a; --wa-leiste: #202c33; --wa-panel: #111b21; --wa-text: #e9edef;
  --wa-grau: #8696a0; --wa-linie: #222d34; --wa-aktiv: #2a3942; --wa-hover: #202c33; --wa-muster: rgba(255, 255, 255, .03); }
.wa svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wa-links { display: flex; flex-direction: column; border-right: 1px solid var(--wa-linie); min-width: 0; background: var(--wa-panel); }
.wa-kopf { height: 60px; flex: none; display: flex; align-items: center; gap: 12px; padding: 0 16px; background: var(--wa-leiste); }
.wa-links .wa-kopf { background: var(--wa-panel); }
.wa-titel { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.wa-ikon { width: 40px; height: 40px; border-radius: 50%; border: 0; background: none; color: var(--wa-grau); display: grid; place-items: center; cursor: pointer; flex: none; transition: background .15s; }
.wa-ikon:hover { background: var(--wa-aktiv); }
.wa-suche { margin: 2px 12px 8px; display: flex; align-items: center; gap: 10px; background: var(--wa-leiste); border-radius: 9px; padding: 0 12px; height: 36px; color: var(--wa-grau); }
.wa-suche svg { width: 17px; height: 17px; }
.wa-suche input { flex: 1; border: 0; background: none; outline: none; font: inherit; font-size: 14px; color: var(--wa-text); }
.wa-liste { overflow-y: auto; flex: 1; }
.wa-k { display: flex; align-items: center; gap: 13px; padding: 0 0 0 13px; height: 72px; cursor: pointer; transition: background .12s; }
.wa-k:hover { background: var(--wa-hover); } .wa-k.aktiv { background: var(--wa-aktiv); }
.wa-k-text { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: center; border-bottom: 1px solid var(--wa-linie); padding-right: 15px; }
.wa-kopf-r .wa-k-text { border: 0; height: auto; }
.wa-k-z1, .wa-k-z2 { display: flex; align-items: center; gap: 6px; min-width: 0; }
.wa-k-z1 b { flex: 1; font-weight: 500; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-k-zeit { font-size: 12px; color: var(--wa-grau); } .wa-k.neu .wa-k-zeit { color: var(--wa-gruen); font-weight: 600; }
.wa-k-vor { flex: 1; font-size: 14px; color: var(--wa-grau); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.wa-k.neu .wa-k-vor { color: var(--wa-text); }
.wa-n { background: var(--wa-gruen); color: #fff; font-size: 12px; font-weight: 600; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 6px; }
.chat-av { flex: none; width: 49px; height: 49px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; font-weight: 600; color: #fff; background: var(--f, #00a884); }
.wa-kopf-r .chat-av { width: 40px; height: 40px; font-size: 15px; }
.chat-av.gr svg { width: 26px; height: 26px; stroke: #fff; }
.wa-hinweis { padding: 20px; text-align: center; color: var(--wa-grau); font-size: 14px; }
.wa-rechts { display: flex; flex-direction: column; min-width: 0; background: var(--wa-grund); position: relative; }
.wa-rechts.ueber::after { content: "Dateien hier ablegen"; position: absolute; inset: 70px 20px 80px; border: 2px dashed var(--wa-gruen); border-radius: 14px;
  display: grid; place-items: center; font-weight: 600; color: var(--wa-gruen); background: color-mix(in srgb, var(--wa-panel) 80%, transparent); }
.wa-sub { font-size: 13px; color: var(--wa-grau); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.wa-leer { margin: auto; text-align: center; color: var(--wa-grau); max-width: 420px; padding: 30px; }
.wa-leer img { height: 90px; opacity: .35; } [data-theme="dark"] .wa-leer img { filter: invert(1); }
.wa-leer h2 { color: var(--wa-text); font-weight: 300; font-size: 30px; margin: 18px 0 8px; }
/* Hintergrund mit dezentem Muster wie bei WhatsApp */
.wa-verlauf { flex: 1; overflow-y: auto; padding: 14px 7% 10px;
  background-color: var(--wa-grund);
  background-image: radial-gradient(var(--wa-muster) 1.2px, transparent 1.3px), radial-gradient(var(--wa-muster) 1.2px, transparent 1.3px);
  background-size: 26px 26px; background-position: 0 0, 13px 13px; }
.wa-tag, .wa-sys { text-align: center; margin: 10px 0; }
.wa-tag span { display: inline-block; background: var(--wa-blase); color: var(--wa-grau); font-size: 12.5px; padding: 5px 12px; border-radius: 7.5px; box-shadow: 0 1px .5px rgba(11, 20, 26, .13); }
.wa-sys span { display: inline-block; background: #ffeecd; color: #54656f; font-size: 12.5px; padding: 5px 12px; border-radius: 7.5px; box-shadow: 0 1px .5px rgba(11, 20, 26, .13); }
[data-theme="dark"] .wa-sys span { background: #182229; color: #ffd279; }
.wa-msg { display: flex; margin-top: 12px; } .wa-msg.folge { margin-top: 2px; } .wa-msg.ich { justify-content: flex-end; }
.wa-blase { position: relative; max-width: min(560px, 65%); background: var(--wa-blase); border-radius: 7.5px; padding: 6px 9px 8px; font-size: 14.2px; line-height: 19px;
  box-shadow: 0 1px .5px rgba(11, 20, 26, .13); overflow-wrap: anywhere; }
.wa-msg.ich .wa-blase { background: var(--wa-blase-ich); }
/* Sprechblasen-Ecke an der ersten Nachricht einer Folge */
.wa-msg:not(.folge) .wa-blase { border-top-left-radius: 0; }
.wa-msg.ich:not(.folge) .wa-blase { border-top-left-radius: 7.5px; border-top-right-radius: 0; }
.wa-msg:not(.folge) .wa-blase::before { content: ""; position: absolute; top: 0; left: -8px; width: 8px; height: 13px; background: inherit; clip-path: polygon(0 0, 100% 0, 100% 100%); }
.wa-msg.ich:not(.folge) .wa-blase::before { left: auto; right: -8px; clip-path: polygon(0 0, 100% 0, 0 100%); }
.wa-blase.emoji { background: none !important; box-shadow: none; } .wa-blase.emoji::before { display: none; } .wa-blase.emoji .wa-text { font-size: 40px; line-height: 1.15; }
.wa-von { font-size: 12.8px; font-weight: 600; margin-bottom: 2px; }
.wa-text a { color: #027eb5; }
.wa-meta { float: right; margin: 8px 0 -5px 10px; font-size: 11px; color: var(--wa-grau); display: inline-flex; align-items: center; gap: 3px; position: relative; top: 4px; }
.wa-status { display: inline-flex; } .wa-status .chat-haken { width: 16px; height: 11px; color: var(--wa-grau); } .wa-status.gelesen .chat-haken { color: var(--wa-blau); }
.wa-k-vor .chat-haken { width: 15px; height: 10px; vertical-align: -1px; color: var(--wa-grau); }
.wa-del { display: none; cursor: pointer; margin-left: 3px; } .wa-blase:hover .wa-del { display: inline; }
.wa-geloescht { color: var(--wa-grau); }
.wa-bild { display: block; max-width: 330px; max-height: 330px; border-radius: 6px; margin: -2px -5px 4px; }
.wa-datei { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 6px; background: color-mix(in srgb, var(--wa-grau) 12%, transparent);
  margin: -2px -4px 4px; text-decoration: none !important; color: inherit; min-width: 220px; }
.wa-datei b { font-weight: 500; display: block; } .wa-datei-sym { width: 34px; height: 40px; border-radius: 4px; background: #f15c6d; color: #fff; font-size: 9.5px; font-weight: 700; display: grid; place-items: center; flex: none; }
.wa-anh { background: var(--wa-leiste); padding: 0 16px; } .wa-anh:not(:empty) { padding: 8px 16px 0; }
.wa-eingabe { flex: none; display: flex; align-items: flex-end; gap: 6px; padding: 8px 14px; background: var(--wa-leiste); min-height: 62px; }
.wa-eingabe textarea { flex: 1; resize: none; border: 0; outline: none; border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 15px; line-height: 20px;
  background: var(--wa-panel); color: var(--wa-text); min-height: 42px; max-height: 140px; margin: 0 4px; }
.wa-senden { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--wa-gruen); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none;
  transition: transform .12s, filter .12s; }
.wa-senden svg { width: 22px; height: 22px; fill: #fff; stroke: none; margin-left: 2px; } .wa-senden:hover { filter: brightness(1.08); } .wa-senden:active { transform: scale(.94); }
@media (max-width: 800px) { .wa { grid-template-columns: 1fr; height: auto; } .wa-rechts { height: 72vh; } .wa-verlauf { padding: 12px; } }
#nav a .chat-badge { margin-left: auto; background: #25d366; color: #fff; border-radius: 99px; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; display: inline-grid; place-items: center; padding: 0 5px; }
#chEmoBox { position: fixed; z-index: 80; width: 320px; max-height: 300px; overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 18px 50px -12px rgba(15, 23, 42, .35); padding: 8px; }
#chEmoBox .emo-gr { font-size: 11px; font-weight: 600; color: var(--muted); margin: 6px 4px 2px; }
#chEmoBox .emo-liste { display: grid; grid-template-columns: repeat(8, 1fr); }
#chEmoBox button { border: 0; background: none; font-size: 21px; line-height: 1; padding: 5px 0; border-radius: 8px; cursor: pointer; }
#chEmoBox button:hover { background: var(--panel-2); }
