:root {
  --red: #be1e2d; --red-dark: #8f1520; --red-soft: #fdeeee;
  --ink: #111111; --ink2: #3f3f46; --muted: #5c5c5c; --line: #e7e7ea; --line2: #f0f0f1;
  --bg: #f7f7f8; --card: #ffffff; --green: #1d6b3a; --green-soft: #e3f4e9;
  --amber: #8a5300; --amber-soft: #fff4cc; --yellow: #fde68a; --grey-soft: #f1f1f3;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif; -webkit-text-size-adjust: 100%; }
a { color: var(--red); }
button, input, select, textarea { font: inherit; color: inherit; }
.boot { padding: 40px; text-align: center; color: var(--muted); }

.top { position: sticky; top: 0; z-index: 10; background: #fff; border-bottom: 1px solid var(--line); padding: calc(10px + env(safe-area-inset-top)) 16px 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.top img { height: 30px; width: auto; display: block; }
.top .who { font-size: 12px; color: var(--muted); text-align: right; }
.main { max-width: 760px; margin: 0 auto; padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: #fff; border-top: 1px solid var(--line); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--muted); text-decoration: none; padding: 4px 0; min-height: 44px; justify-content: center; }
.nav a.on { color: var(--red); }
.nav svg { width: 22px; height: 22px; }

h1 { font-size: 22px; margin: 4px 0 0; }
h2 { font-size: 16px; margin: 0; }
.sub { font-size: 13px; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.card.tap { cursor: pointer; text-decoration: none; color: inherit; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.list > * + * { border-top: 1px solid var(--line2); }
.item { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.strong { font-weight: 700; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }

.btn { height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid #d4d4d8; background: #fff; font-weight: 600; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; color: var(--ink); }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.green { background: var(--green); border-color: var(--green); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.warn { color: #9b1515; border-color: #e7b8b8; }
.btn.sm { height: 34px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: default; }
.seg { display: flex; gap: 4px; background: var(--grey-soft); padding: 4px; border-radius: 10px; }
.seg button { flex: 1; height: 36px; border: 0; border-radius: 8px; background: transparent; font-weight: 600; font-size: 13px; color: var(--muted); cursor: pointer; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

label.f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.in, select.in, textarea.in { height: 44px; padding: 0 12px; border: 1px solid #d4d4d8; border-radius: 10px; background: #fff; font-size: 16px; color: var(--ink); font-weight: 400; width: 100%; }
textarea.in { height: auto; min-height: 80px; padding: 10px 12px; }
.in:focus, .btn:focus-visible { outline: 2px solid var(--red); outline-offset: 1px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 420px) { .grid3:not(.fixed3) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fixed3 .stat { padding: 10px 8px; text-align: center; }
.fixed3 .stat b { font-size: 19px; }

.badge { display: inline-block; padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.b-tl { background: var(--red); color: #fff; }
.b-sd { background: var(--yellow); color: #713f12; }
.b-res { background: #e4e4e7; color: var(--ink2); }
.b-draft { background: var(--grey-soft); color: var(--ink2); }
.b-ok { background: var(--green-soft); color: var(--green); }
.b-warn { background: var(--amber-soft); color: var(--amber); }
.b-bad { background: var(--red-soft); color: #9b1515; }
.dot { width: 10px; height: 10px; border-radius: 5px; flex: none; }

.notice { border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.notice.ok { background: var(--green-soft); color: var(--green); }
.notice.warn { background: var(--amber-soft); color: var(--amber); border-left: 5px solid #e0a800; }
.notice.bad { background: var(--red-soft); color: #9b1515; }
.notice.info { background: var(--grey-soft); color: var(--ink2); }

.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.stat b { font-size: 22px; }

table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 9px 6px; border-bottom: 1px solid var(--line2); vertical-align: top; }
.scroll { overflow-x: auto; }

.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-bg { position: absolute; inset: 0; background: rgba(0,0,0,.35); border: 0; }
.sheet { position: relative; width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; background: #fff; border-radius: 18px 18px 0 0; padding: 18px 16px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; }
.sheet .act { height: 50px; border-radius: 12px; border: 1px solid #e4e4e7; background: #fff; font-weight: 600; font-size: 15px; text-align: left; padding: 0 16px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.sheet .act.primary { background: var(--red); border-color: var(--red); color: #fff; }
.sheet .act.warn { color: #9b1515; }
a.act { text-decoration: none; color: var(--ink); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); top: calc(14px + env(safe-area-inset-top)); z-index: 90; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; max-width: 90%; }

.sugg { border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.1); display: flex; flex-direction: column; padding: 4px; margin-top: 4px; }
.sugg button { height: 40px; border: 0; background: transparent; text-align: left; padding: 0 10px; border-radius: 8px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.sugg button:hover { background: var(--grey-soft); }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 3px 4px 3px 6px; font-size: 13px; }
.chip button { width: 26px; height: 26px; border: 0; background: transparent; font-size: 16px; color: var(--muted); cursor: pointer; }
.latz { width: 58px; height: 36px; text-align: center; padding: 0 4px; font-size: 15px; border-radius: 8px; }
.call { width: 44px; height: 44px; border-radius: 22px; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.offline { background: var(--amber-soft); color: var(--amber); font-size: 13px; font-weight: 600; text-align: center; padding: 6px; }

@media print {
  .top, .nav, .side, .noprint { display: none !important; }
  .main { padding: 0; max-width: none; margin-left: 0 !important; }
  body { background: #fff; }
  .card { border: 0; padding: 0; }
}

/* Dashboard */
.main:has(.dash) { max-width: 1240px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
.dash-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
@media (min-width: 980px) { .dash-grid { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); } }
@media (max-width: 979px) { .dash-col { display: contents; } }
@media (max-width: 520px) { .tbl { font-size: 13px; } .tbl td:first-child { white-space: normal; } .tbl td, .tbl th { padding-left: 2px; padding-right: 2px; } }
.live { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: inherit; }
.live:hover { border-color: #d4d4d8; }
.todo { border-bottom: 1px solid #f0f0f1; font-size: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; text-decoration: none; color: inherit; }
a.todo:hover span:first-child { color: var(--red); }
.bar { height: 6px; background: var(--grey-soft); border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 3px; }
.ini { width: 36px; height: 36px; border-radius: 50%; background: var(--grey-soft); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--ink2); flex: none; }
.tablebox { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 8px 4px; border-bottom: 1px solid var(--line2); white-space: nowrap; }
.tbl tr.strong td { font-weight: 700; }
.tbl .r { text-align: right; }

.b-info { background: #eef2ff; color: #3730a3; }
.kv { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: 6px 12px; align-items: baseline; word-break: break-word; }
@media (max-width: 520px) { .formgrid { grid-template-columns: minmax(0, 1fr); } }
.seg { overflow-x: auto; }
.seg button { white-space: nowrap; padding: 0 8px; }

.ibtn { width: 22px; height: 22px; min-width: 22px; border-radius: 50%; border: 1px solid #c7c7cc; background: #fff; color: var(--ink2); font: italic 700 12px/1 Georgia, serif; cursor: pointer; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.ibtn:hover { border-color: var(--red); color: var(--red); }
.help { font-size: 13px; font-weight: 400; color: var(--ink2); background: var(--grey-soft); border-radius: 8px; padding: 8px 10px; line-height: 1.45; }
.upl { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.files { display: flex; flex-direction: column; gap: 4px; width: 100%; }
.file { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 4px 4px 10px; font-size: 13px; background: #fff; }
.file.busy { opacity: .7; }
.file.err { border-color: var(--red); color: var(--red); }
.docrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 0; border-top: 1px solid var(--line2); }
.docrow a { text-decoration: none; color: inherit; }
.savebar { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; box-shadow: 0 4px 16px rgba(0,0,0,.08); }
div.f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.jobrow { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: #fafafa; }
.fixed3jobs { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) !important; gap: 8px; }

/* Karte und Wachbuch */
.map { width: 100%; height: 220px; border: 0; border-radius: 10px; background: #eee; }
.thumbs { display: flex; flex-wrap: wrap; gap: 6px; }
.thumbs img { width: 76px; height: 76px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line, #e4e4e7); }
.thumbs.print img { width: 90px; height: 68px; }
.gentry { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--line, #eee); }
.gentry:last-child { border-bottom: 0; }
.gentry.corrected > div:not(:first-child) { text-decoration: line-through; color: #71717a; }
.gentry.corr { padding-left: 10px; border-left: 3px solid var(--amber, #b45309); }
@media print { .thumbs img { break-inside: avoid; } }

/* PC-Ansicht mit Seitenleiste */
.side { display: none; }
@media (min-width: 880px) {
  .side { display: flex; flex-direction: column; gap: 24px; position: fixed; top: 0; left: 0; bottom: 0; width: 280px; box-sizing: border-box; background: #fff; border-right: 1px solid var(--line); padding: 24px 14px; overflow-y: auto; z-index: 20; }
  .side-logo { display: flex; justify-content: center; padding: 4px 8px; }
  .side-logo img { width: 100%; max-width: 150px; height: auto; display: block; }
  .side nav { display: flex; flex-direction: column; gap: 0; }
  .side nav a { min-height: 40px !important; }
  .side nav a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px; color: #3f3f46; text-decoration: none; font-size: 14px; font-weight: 500; }
  .side nav a:hover { background: var(--grey-soft, #f4f4f5); }
  .side nav a.on { background: #fdeeee; color: #b51a1a; font-weight: 600; }
  .side-grp { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
  .side-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #8a8a93; padding: 6px 12px 4px; }
  .side-badge { display: none; margin-left: auto; font-size: 12px; font-weight: 700; background: #be1e2d; color: #fff; border-radius: 10px; padding: 1px 7px; }
  .side-me { margin-top: auto; border-top: 1px solid var(--line); padding: 14px 10px 4px; display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--ink); border-radius: 10px; }
  .side-me:hover, .side-me.on { background: #fdeeee; }
  .top, .nav { display: none; }
  .main { margin-left: 280px; max-width: none; padding: 32px 40px 48px; gap: 16px; }
  .main:has(.dash) { max-width: none; }
  .main h1 { font-size: 28px; }
  .offline { margin-left: 280px; }
  .sheet-wrap { align-items: center; }
  .sheet { border-radius: 16px; max-height: 84vh; padding: 22px 22px 24px; }
  .toast { top: auto; bottom: 32px; left: calc(50% + 124px); }
}

/* Dashboard nach Entwurf */
.tip { position: relative; display: inline-flex; width: 15px; height: 15px; margin-left: 6px; border-radius: 50%; border: 1px solid #a1a1aa; color: #71717a; font-size: 9px; font-weight: 700; align-items: center; justify-content: center; vertical-align: 1px; cursor: help; outline: none; text-transform: none; letter-spacing: 0; }
.tip:hover, .tip:focus { border-color: #be1e2d; color: #be1e2d; background: #fdeeee; }
.tip:hover::after, .tip:focus::after { content: attr(data-tip); position: absolute; left: -12px; top: 20px; z-index: 60; width: 250px; padding: 10px 12px; background: #111; color: #fff; font-size: 12px; font-weight: 500; line-height: 1.45; border-radius: 8px; white-space: normal; text-align: left; box-shadow: 0 8px 24px rgba(0,0,0,.25); pointer-events: none; }
th .tip:hover::after, th .tip:focus::after, .r .tip:hover::after { left: auto; right: -12px; }
.dboard { display: flex; flex-direction: column; gap: 24px; }
.dboard h2 { margin: 0; font-size: 18px; font-weight: 700; }
.dboard .card h2 { font-size: 16px; }
.dhead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.dhead h1 { margin: 0; }
.dfilters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.dfilters .f { min-width: 190px; flex: 1 1 190px; }
.dfilters .btn { height: 44px; }
.dsec { display: flex; flex-direction: column; gap: 14px; }
.dsec + .dsec { border-top: 1px solid var(--line); padding-top: 20px; }
.lgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.lcard { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.pill { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 20px; background: #f1f1f3; color: #3f3f46; white-space: nowrap; }
.pill-ok { background: #e3f4e9; color: #1d6b3a; }
.missbox { background: #fdeeee; border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.pbtn { min-height: 38px; padding: 4px 10px; border: 1px solid #f0c4c4; border-radius: 8px; background: #fff; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); display: flex; flex-direction: column; align-items: flex-start; cursor: pointer; text-align: left; }
.pbtn span { font-size: 11px; font-weight: 500; color: var(--muted); }
.pbtn.on { border-color: #be1e2d; box-shadow: 0 0 0 1px #be1e2d inset; }
.panel { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.warnbox { border: 1px solid #f3dcb0; background: #fff8eb; border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.subbox { background: #f7f7f8; border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.linkbtn { align-self: flex-start; min-height: 32px; padding: 0; border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 600; color: #be1e2d; cursor: pointer; }
.in.sm { height: 34px; font-size: 13px; padding: 0 8px; width: auto; }
.tlist { max-height: 340px; overflow-y: auto; border-top: 1px solid #f0f0f1; }
.trow { display: flex; align-items: center; gap: 8px; min-height: 44px; border-bottom: 1px solid #f0f0f1; padding: 0 2px; }
.trow input { width: 18px; height: 18px; accent-color: #be1e2d; margin: 0; flex: none; }
.trow label { flex: 1; font-size: 13px; cursor: pointer; display: flex; flex-direction: column; padding: 4px 0; }
.trow label span { font-size: 11px; color: var(--muted); }
.trow button { min-height: 32px; padding: 0 4px; border: 0; background: transparent; font: inherit; font-size: 12px; text-align: right; cursor: pointer; }
.pseg { flex-wrap: wrap; }
.pseg button { flex: 0 0 auto; padding: 0 14px; }
.ktiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.tablebox.fin { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 4px 8px; }
@media (max-width: 520px) { .kval { font-size: 22px; } .ktile { padding: 12px; } .dfilters .f { min-width: 140px; } }
.ktile { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.kval { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fin tr.gain td { color: var(--green); background: #f3faf5; }
.bgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px; border-top: 1px solid var(--line); padding-top: 20px; align-items: start; }
.bgrid .card { gap: 6px; }
.av { width: 38px; height: 38px; border-radius: 50%; background: #be1e2d; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex: none; }
.av.lg { width: 52px; height: 52px; font-size: 18px; }
.bdtoday { display: flex; align-items: center; gap: 12px; background: #fdeeee; border-radius: 10px; padding: 12px; text-decoration: none; color: var(--ink); }
.kv-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 40px; border-bottom: 1px solid #f0f0f1; font-size: 14px; text-decoration: none; color: var(--ink); }
.kv-row a { color: var(--ink); text-decoration: none; }
.call.sm { width: 32px; height: 32px; }
.mjrow { display: flex; flex-direction: column; gap: 4px; padding: 6px 0; border-bottom: 1px solid #f0f0f1; text-decoration: none; color: var(--ink); }
.kvgrid { display: grid; grid-template-columns: minmax(120px, 200px) minmax(0, 1fr); gap: 8px 16px; align-items: baseline; }
@media (max-width: 520px) { .kvgrid { grid-template-columns: minmax(0, 1fr); gap: 2px; } .kvgrid > div:nth-child(even) { margin-bottom: 8px; } }
.hist { border-top: 1px solid #f0f0f1; padding: 8px 0; display: flex; flex-direction: column; gap: 4px; }
.top .who { text-decoration: none; color: var(--muted); }
.panel .btn.sm { height: auto; min-height: 40px; white-space: normal; line-height: 1.2; padding: 6px 10px; }

/* Kunden */
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.ccard { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--ink); }
.ccard:hover { border-color: #be1e2d; }
.ccard .chip { padding: 3px 8px; font-size: 12px; background: #f7f7f8; }
.ccard .chip.off { color: var(--muted); text-decoration: line-through; }
.formgrid .wide { grid-column: 1 / -1; }

.phead { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }

/* Nachrichten */
.nav a { position: relative; }
.nav-badge { display: none; position: absolute; top: 2px; left: 50%; margin-left: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #be1e2d; color: #fff; font-size: 11px; font-weight: 700; align-items: center; justify-content: center; }
.item.conv { gap: 12px; flex-wrap: nowrap; align-items: center; }
.item.conv.unread .strong { color: #0f1b2d; }
.item.conv.unread .small.muted.ell { color: #1f2a37; font-weight: 600; }
.av.grp { background: #e8eef7; color: #1d3b6a; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick { max-height: 260px; overflow: auto; border: 1px solid #e3e7ee; border-radius: 10px; }
.pick-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid #eef1f5; cursor: pointer; }
.pick-row:last-child { border-bottom: 0; }
.chat { display: flex; flex-direction: column; gap: 10px; min-height: calc(100vh - 190px); }
.msgs { flex: 1; display: flex; flex-direction: column; gap: 6px; background: #f3f5f8; border-radius: 14px; padding: 12px; overflow: auto; max-height: calc(100vh - 290px); min-height: 280px; }
.msg { align-self: flex-start; max-width: 82%; background: #fff; border-radius: 14px 14px 14px 4px; padding: 8px 12px; box-shadow: 0 1px 2px rgba(15,27,45,.08); }
.msg.mine { align-self: flex-end; background: #1d3b6a; color: #fff; border-radius: 14px 14px 4px 14px; }
.msg-name { font-size: 12px; font-weight: 700; color: #be1e2d; margin-bottom: 2px; }
.msg-text { white-space: pre-wrap; word-wrap: break-word; }
.msg-time { font-size: 11px; opacity: .65; text-align: right; margin-top: 2px; }
.msg-day { align-self: center; font-size: 12px; color: #5b6676; background: #e6eaf0; border-radius: 10px; padding: 2px 10px; margin: 6px 0; }
.chat-in { display: flex; gap: 8px; align-items: flex-end; position: sticky; bottom: 70px; background: var(--bg, #f6f7f9); padding-top: 4px; }
.chat-in textarea { resize: none; min-height: 44px; }
@media (min-width: 880px) { .chat-in { bottom: 0; } .msgs { max-height: calc(100vh - 220px); } }

/* Dienstplan Woche je Objekt, nach Entwurf */
.dp { display: flex; flex-direction: column; gap: 20px; }
.dp-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.dp-kw { display: flex; align-items: center; gap: 4px; font-size: 14px; color: #5c5c5c; margin-top: 2px; flex-wrap: wrap; }
.dp-kw .btn.ghost.sm { min-height: 32px; padding: 0 8px; }
.dp-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.dp-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.dp-tile { background: #fff; border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit; }
.dp-tl { font-size: 13px; color: #5c5c5c; }
.dp-tv { font-size: 26px; font-weight: 700; color: #111; }
.dp-tv.bad { color: #c41b1b; }
.dp-box { background: #fff; border-radius: 14px; overflow-x: auto; }
.dp-grid { min-width: 960px; display: grid; grid-template-columns: 220px repeat(7, minmax(0, 1fr)); }
.dp-h { padding: 14px 16px; font-size: 12px; font-weight: 700; color: #5c5c5c; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid #e4e4e7; }
.dp-h.day { padding: 14px 10px; font-size: 13px; color: #111; text-transform: none; letter-spacing: 0; border-left: 1px solid #f0f0f1; }
.dp-h.today, .dp-c.today { background: #fdf6f6; }
.dp-h.today { color: #8f1520; }
.dp-obj { padding: 14px 16px; border-bottom: 1px solid #f0f0f1; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.dp-c { position: relative; padding: 8px; border-bottom: 1px solid #f0f0f1; border-left: 1px solid #f0f0f1; display: flex; flex-direction: column; gap: 6px; min-height: 62px; }
.rc { border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 2px; text-decoration: none; }
.rc-t { font-size: 12px; font-weight: 700; }
.rc-l { font-size: 11px; font-weight: 500; }
.rc.full, .dp-m.full { background: #e3f4e9; color: #1d6b3a; }
.rc.gap, .dp-m.gap { background: #fde4e4; color: #9b1515; }
.rc.draft, .dp-m.draft { background: #e4e4e7; color: #3f3f46; }
.rc:hover { filter: brightness(.97); }
.dp-add { position: absolute; right: 4px; bottom: 4px; width: 22px; height: 22px; border-radius: 6px; display: none; align-items: center; justify-content: center; color: #8f1520; background: #fdeeee; text-decoration: none; font-weight: 700; }
.dp-c:hover .dp-add, .dp-add:focus { display: inline-flex; }
.dp-legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: 12px; color: #3f3f46; align-items: center; }
.dp-legend span { display: flex; align-items: center; gap: 6px; }
.dp-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.dp-legend i.full { background: #e3f4e9; } .dp-legend i.gap { background: #fde4e4; } .dp-legend i.draft { background: #e4e4e7; }
.dp-days { display: none; flex-direction: column; gap: 10px; }
.dp-m { display: flex; align-items: center; gap: 10px; border-radius: 10px; padding: 10px 12px; text-decoration: none; }
.dp-ml { font-size: 13px; font-weight: 700; white-space: nowrap; }
.red { color: #be1e2d; }
@media (max-width: 879px) {
  .dp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .dp-tile { padding: 14px; }
  .dp-tv { font-size: 22px; }
  .dp-box { display: none; }
  .dp-days { display: flex; }
  .dp-btns { width: 100%; }
  .dp-btns > * { flex: 1 1 auto; }
}

/* Namenssuche mit Liste */
.ns-row { display: flex; gap: 6px; }
.ns-row .in { flex: 1; }
.ns-t { flex: none; width: 44px; border: 1px solid #d4d4d8; border-radius: 10px; background: #fff; font-size: 16px; cursor: pointer; }
.ns .sugg { max-height: 300px; overflow-y: auto; }

/* Anhänge im Chat */
.chat-box { display: flex; flex-direction: column; gap: 6px; position: sticky; bottom: 70px; background: var(--bg, #f6f7f9); padding-top: 4px; }
.chat-box .chat-in { position: static; padding-top: 0; }
.att-chip { align-items: center; gap: 8px; background: #fff; border: 1px solid #e3e7ee; border-radius: 10px; padding: 4px 4px 4px 12px; font-size: 14px; }
.msg-img img { display: block; max-width: 240px; max-height: 260px; border-radius: 10px; margin-bottom: 4px; }
.msg-pdf { display: flex; align-items: center; gap: 10px; min-width: 200px; max-width: 260px; padding: 8px; border-radius: 10px; background: rgba(0,0,0,.05); color: inherit; text-decoration: none; margin-bottom: 4px; }
.msg.mine .msg-pdf { background: rgba(255,255,255,.14); }
.msg-pdf-i { flex: none; width: 38px; height: 44px; border-radius: 6px; background: #be1e2d; color: #fff; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
@media (min-width: 880px) { .chat-box { bottom: 0; } }
.ns .sugg button { flex: none; }

/* Qualifikationen in der Personalakte, nach Entwurf */
.qgrid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.qcol { display: flex; flex-direction: column; gap: 14px; }
.plist { display: flex; flex-direction: column; }
.prow { display: flex; align-items: center; gap: 12px; padding: 12px 0; border: 0; border-bottom: 1px solid #f0f0f1; background: none; width: 100%; font: inherit; color: inherit; cursor: default; }
button.prow { cursor: pointer; }
button.prow:hover { background: #fafafa; }
.prow:last-child { border-bottom: 0; }
.rel-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.rel-tiles > div { background: #f7f7f8; border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.rel-tiles b { font-size: 22px; }
.rel-tiles span { font-size: 12px; color: #5c5c5c; }
.rel-kv { display: flex; justify-content: space-between; font-size: 14px; padding: 6px 0; border-bottom: 1px solid #f0f0f1; }
.eq { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f0f0f1; }
.eq.ret { opacity: .6; }
@media (max-width: 879px) { .qgrid { grid-template-columns: 1fr; } }

/* Lohnabrechnung in fünf Schritten */
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.step { display: flex; gap: 10px; align-items: flex-start; text-align: left; background: #fff; border: 1px solid #e4e4e7; border-radius: 14px; padding: 12px; cursor: pointer; font: inherit; color: #3f3f46; }
.step.on { border-color: #be1e2d; box-shadow: 0 0 0 2px #fdeeee; color: #111; }
.step-n { flex: none; width: 28px; height: 28px; border-radius: 50%; background: #f4f4f5; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; }
.step.on .step-n { background: #be1e2d; color: #fff; }
.step.ok .step-n { background: #e3f4e9; color: #1d6b3a; }
.bar { height: 8px; border-radius: 4px; background: #f0f0f1; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; }
.mfold { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; border-bottom: 1px solid #f0f0f1; }
.mfold:last-child { border-bottom: 0; }
.nachweis { background: #fff; border-radius: 14px; padding: 24px; display: flex; flex-direction: column; gap: 6px; }
.nw-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid #be1e2d; padding-bottom: 12px; margin-top: 6px; }
.nw-head img { height: 44px; width: auto; }
@media (max-width: 879px) { .steps { grid-template-columns: 1fr 1fr; } .step { padding: 10px; } .nachweis { padding: 14px; } }
@media print { .nachweis { padding: 0; } .side, .top, .nav { display: none !important; } }
.rel-tiles.sm b { font-size: 17px; }
/* v17 Schicht anlegen, Einteilung, Werte */
.opt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 620px) { .opt-grid { grid-template-columns: 1fr; } }
.opt { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 10px 12px; border: 1px solid #d4d4d8; border-radius: 10px; background: #fff; cursor: pointer; }
.opt b { font-size: 14px; }
.opt span { font-size: 12px; color: var(--muted); line-height: 1.35; }
.opt.on { border-color: var(--red); background: var(--red-soft); box-shadow: inset 0 0 0 1px var(--red); }
.seg.wrap { flex-wrap: wrap; }
.seg.wrap button { flex: 1 1 auto; min-width: 120px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chipbtn { height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid #d4d4d8; background: #fff; font-weight: 600; font-size: 13px; cursor: pointer; color: var(--ink2); }
.chipbtn.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.asg.asg-on { background: linear-gradient(90deg, var(--green-soft), transparent 40%); }
.lim { display: flex; flex-direction: column; gap: 3px; max-width: 360px; }
.bar.sm { height: 5px; }
.qa { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; background: var(--green-soft); border-radius: 8px; padding: 6px 8px; }
@media (min-width: 1000px) { .shift-form { max-width: 980px; } }
/* v18 Inventar, Ausgabe, Dienstausweis, QR */
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 760px) { .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 999px) { .main:has(.inv), .main:has(.inv-rep) { max-width: 1240px; } }
.inv-t td, .inv-t th { white-space: nowrap; }
.inv-a { cursor: pointer; }
.inv-a:hover td { background: #fafafa; }
.inv-z td { border-top: 0 !important; padding-top: 2px; padding-bottom: 2px; }
.in.cnt { width: 64px; height: 34px; padding: 0 8px; text-align: right; }
.in.sm, select.in.sm { height: 36px; font-size: 14px; width: auto; padding: 0 8px; }
.inv-cols { align-items: start; }
@media (max-width: 900px) { .inv-cols { grid-template-columns: 1fr; } }
.zbox { display: flex; flex-direction: column; gap: 1px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; min-width: 84px; }
.zbox.low { border-color: #f0c64a; background: #fffaf0; }
.inv-rep { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 12px; align-items: start; }
@media (max-width: 800px) { .inv-rep { grid-template-columns: 1fr; } }
h3 { font-size: 15px; margin: 8px 0 0; }
.qr svg { width: 100%; height: 100%; display: block; }
.qr { margin: 0 auto; }
.scan-frame { position: relative; border-radius: 14px; overflow: hidden; background: #000; aspect-ratio: 1 / 1; max-height: 52vh; }
.scan-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-mark { position: absolute; inset: 18%; border: 3px solid rgba(255,255,255,.9); border-radius: 14px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); pointer-events: none; }
.scan-res.warn { border-color: #f0c64a; background: #fffaf0; }
.pphoto { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none; background: var(--grey-soft); }
.pphoto.xl, .av.xl { width: 76px; height: 76px; font-size: 24px; border-radius: 12px; }
.check-page { max-width: 460px; margin: 0 auto; padding: 28px 18px; display: flex; flex-direction: column; gap: 16px; align-items: center; text-align: center; }
.check-res { width: 100%; border-radius: 16px; padding: 22px 18px; display: flex; flex-direction: column; gap: 10px; align-items: center; border: 2px solid; }
.check-res.ok { border-color: #1d6b3a; background: #e3f4e9; }
.check-res.bad { border-color: #be1e2d; background: #fdeeee; }
.check-ic { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; color: #fff; }
.check-res.ok .check-ic { background: #1d6b3a; }
.check-res.bad .check-ic { background: #be1e2d; }
.check-res .kvgrid { width: 100%; }
/* Dienstausweis im Scheckkartenformat 85,6 x 54 mm */
.idcards { display: flex; flex-wrap: wrap; gap: 18px; }
.idcard { width: 85.6mm; height: 54mm; box-sizing: border-box; border-radius: 3.2mm; background: #fff; border: 1px solid #d4d4d8; box-shadow: 0 4px 16px rgba(0,0,0,.08); overflow: hidden; display: flex; flex-direction: column; font-family: inherit; color: #111; }
.idc-top { display: flex; align-items: center; justify-content: space-between; padding: 2.4mm 3mm 1.6mm; border-bottom: .6mm solid var(--acc, #be1e2d); }
.idc-top img { height: 6.4mm; width: auto; }
.idc-top span { font-size: 2.6mm; font-weight: 800; letter-spacing: .5mm; color: var(--acc, #be1e2d); }
.idc-body { flex: 1; display: flex; gap: 3mm; padding: 2.2mm 3mm; min-height: 0; }
.idc-photo { width: 21mm; height: 27mm; object-fit: cover; border-radius: 1.2mm; background: #f1f1f3; flex: none; }
.idc-photo.empty { display: flex; align-items: center; justify-content: center; font-size: 2.4mm; color: #71717a; border: .3mm dashed #a1a1aa; }
.idc-data { display: flex; flex-direction: column; min-width: 0; }
.idc-l { font-size: 1.9mm; color: #71717a; text-transform: uppercase; letter-spacing: .15mm; margin-top: .6mm; }
.idc-v { font-size: 2.9mm; font-weight: 700; line-height: 1.2; }
.idc-v.big { font-size: 3.6mm; }
.idc-s { font-size: 2.3mm; line-height: 1.3; }
.idc-foot { display: flex; justify-content: space-between; padding: 1.4mm 3mm; background: var(--foot, #111); color: #fff; font-size: 2.4mm; font-weight: 700; }
.idc-back { flex: 1; display: flex; gap: 3mm; padding: 3mm 3mm 1.2mm; min-height: 0; }
.idc-co { flex: 1; min-width: 0; }
.idc-qr { width: 22mm; flex: none; display: flex; flex-direction: column; gap: .6mm; }
.idc-qr .qr { width: 22mm !important; height: 22mm !important; }
.idc-sign { display: flex; gap: 4mm; padding: 0 3mm; }
.idc-sign div { flex: 1; font-size: 1.8mm; color: #71717a; display: flex; flex-direction: column; gap: .4mm; }
.idc-sign i { display: block; border-bottom: .2mm solid #71717a; height: 4mm; }
.idc-legal { font-size: 1.6mm; color: #52525b; padding: 1mm 3mm 2mm; line-height: 1.3; }
@page ausweis { size: 85.6mm 54mm; margin: 0; }
@media print {
  .badge-view .idcards { display: block; }
  .badge-view .idcards > div { page: ausweis; break-after: page; }
  .badge-view .idcard { box-shadow: none; border: 0; border-radius: 0; width: 85.6mm; height: 54mm; }
}
.sheet:has(.wide) { max-width: 920px; }
.seg.scrollx { overflow-x: auto; scrollbar-width: none; }
.seg.scrollx::-webkit-scrollbar { display: none; }
.seg.scrollx button { flex: 0 0 auto; padding: 0 12px; }

/* v19 Personal Analyse, Finanzen, Kalender */
.ana-f { flex-direction: row; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.ana-f .f { min-width: 150px; }
.ana-t td, .ana-t th { vertical-align: top; }
.clickrow { cursor: pointer; }
.clickrow:hover td, .item.clickrow:hover { background: #fafafa; }
.fin-year { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; align-items: end; padding-top: 6px; }
.fy-col { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.fy-col .small { font-size: 11px; white-space: nowrap; }
.fy-bars { display: flex; align-items: flex-end; justify-content: center; gap: 2px; height: 120px; width: 100%; }
.fy-bars i { display: block; width: 40%; max-width: 16px; border-radius: 3px 3px 0 0; min-height: 1px; }
.fy-bars i.r, .lg-dot.r { background: #be1e2d; }
.fy-bars i.c, .lg-dot.c { background: #a1a1aa; }
.fy-col.fut .fy-bars i { opacity: .45; }
.lg-dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: middle; margin-left: 6px; }
@media (max-width: 620px) { .fin-year { grid-template-columns: repeat(6, minmax(0, 1fr)); row-gap: 14px; } .fy-bars { height: 80px; } }
.cal-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; background: #be1e2d; }
.cal-dot.alle { background: #6b7280; }
@media print { .ana-p .card { break-inside: avoid; border: 0; } .ana-p .kv-row { min-height: 26px; } }
.t th.right { text-align: right; }
.ana-cards { display: none; }
.ana-card { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; border-bottom: 1px solid #f0f0f1; }
@media (max-width: 760px) { .ana-tw { display: none; } .ana-cards { display: flex; flex-direction: column; } }
.issue-row.on { background: #fdf2f3; }
.issue-row { border-radius: 8px; padding-left: 6px; padding-right: 6px; }
.ico { display: inline-flex; width: 22px; height: 22px; color: #3f3f46; }
.ico svg { width: 100%; height: 100%; display: block; }
.idcard.kk.front { justify-content: space-between; }
.kk-top { padding: 3mm 3mm 0; }
.kk-top img { height: 8mm; width: auto; }
.kk-mid { padding: 0 3mm; }
.kk-title { font-size: 9mm; font-weight: 900; letter-spacing: .8mm; color: var(--acc, #be1e2d); line-height: 1; }
.kk-label { font-size: 3mm; font-weight: 700; margin-top: 1mm; text-transform: uppercase; letter-spacing: .3mm; }
.kk-foot { display: flex; justify-content: space-between; align-items: baseline; padding: 2mm 3mm; background: var(--foot, #111); color: #fff; }
.kk-foot span { font-size: 2.2mm; text-transform: uppercase; letter-spacing: .2mm; opacity: .8; }
.kk-foot b { font-size: 6mm; letter-spacing: .4mm; }

/* Info-Glocke */
.bell { position: relative; border: 0; background: none; padding: 6px; border-radius: 10px; cursor: pointer; display: inline-flex; color: #27272a; }
.bell:hover { background: #f4f4f5; }
.bell .ico { width: 22px; height: 22px; }
.bell-badge { position: absolute; top: 0; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #be1e2d; color: #fff; font-size: 11px; font-weight: 800; display: none; align-items: center; justify-content: center; box-sizing: border-box; }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bell-panel { position: fixed; z-index: 60; top: calc(58px + env(safe-area-inset-top)); right: 10px; width: min(400px, calc(100vw - 20px)); max-height: min(70vh, 560px); display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.16); overflow: hidden; }
@media (min-width: 880px) { .bell-panel { left: 230px; right: auto; top: 18px; } }
.bell-h { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.bell-list { overflow-y: auto; }
.bell-it { display: flex; gap: 10px; padding: 11px 14px; text-decoration: none; color: inherit; border-bottom: 1px solid #f4f4f5; align-items: flex-start; }
.bell-it:hover { background: #fafafa; }
.bell-it.new { background: #fdf2f3; }
.bell-it.new .strong::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #be1e2d; margin-right: 6px; vertical-align: middle; }
.bell-k { font-size: 18px; line-height: 1.2; }
.bell-b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Chat wie WhatsApp */
.av-img { object-fit: cover; padding: 0; }
.av.sm { width: 30px; height: 30px; font-size: 12px; flex: none; }
.av-gap { width: 30px; flex: none; }
.pp-btn { position: relative; border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; }
.pp-cam { position: absolute; right: -2px; bottom: -2px; background: #fff; border-radius: 50%; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; font-size: 13px; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.conv-unread { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #be1e2d; color: #fff; font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; }
.main:has(.chat.wa) { padding: 0 !important; max-width: none; }
.chat.wa { display: flex; flex-direction: column; height: calc(100dvh - 130px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); gap: 0; margin: 0; min-height: 0; }
@media (min-width: 880px) { .chat.wa { height: 100dvh; } }
.chat-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #fff; border-bottom: 1px solid var(--line); }
.chat-title { border: 0; background: none; text-align: left; min-width: 0; cursor: pointer; padding: 2px 4px; }
.chat-sub { color: var(--muted); }
.typing { color: #1d6b3a; font-weight: 600; }
.typing i { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: currentColor; margin-left: 2px; animation: tdot 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes tdot { 0%, 60%, 100% { opacity: .2; } 30% { opacity: 1; } }
.msgs.wa { flex: 1; overflow-y: auto; padding: 10px 10px 14px; background: #efeae2; display: flex; flex-direction: column; gap: 2px; }
.msgs.wa .msg-day { align-self: center; margin: 10px 0 6px; }
.msgs.wa .msg-day span { background: #fff; color: #52525b; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 8px; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
.msg-row { display: flex; gap: 6px; align-items: flex-end; }
.msg-row.mine { justify-content: flex-end; }
.msgs.wa .msg { max-width: min(78%, 520px); background: #fff; border-radius: 10px; padding: 6px 9px 4px; box-shadow: 0 1px 1px rgba(0,0,0,.1); margin: 0; position: relative; }
.msgs.wa .msg.first { margin-top: 6px; }
.msgs.wa .msg.mine { background: #fde7e9; }
.msgs.wa .msg.first:not(.mine) { border-top-left-radius: 2px; }
.msgs.wa .msg.first.mine { border-top-right-radius: 2px; }
.msgs.wa .msg-name { font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.msgs.wa .msg-text { white-space: pre-wrap; word-break: break-word; font-size: 15px; line-height: 1.35; }
.msgs.wa .msg-time { font-size: 11px; color: #71717a; text-align: right; margin-top: 2px; display: flex; gap: 4px; justify-content: flex-end; align-items: center; }
.msgs.wa .msg.mine { cursor: pointer; }
.tick { font-size: 12px; letter-spacing: -3px; color: #a1a1aa; font-weight: 700; margin-right: 3px; }
.tick.some { color: #71717a; }
.tick.read { color: #1f7ae0; }
.msg-audio { display: flex; align-items: center; gap: 6px; }
.msg-audio audio { height: 36px; max-width: 240px; }
.poll { display: flex; flex-direction: column; gap: 6px; min-width: 240px; }
.poll-opt { position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #e4e4e7; border-radius: 8px; background: #fff; cursor: pointer; overflow: hidden; font: inherit; }
.poll-opt > * { position: relative; z-index: 1; }
.poll-opt .poll-bar { position: absolute; left: 0; top: 0; bottom: 0; background: #fde7e9; z-index: 0; transition: width .3s; }
.poll-opt.mine { border-color: #be1e2d; }
.poll-chk { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #be1e2d; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; color: #fff; flex: none; }
.poll-opt.mine .poll-chk { background: #be1e2d; }
.chat.wa .chat-box { background: #f4f4f5; padding: 8px; border-top: 1px solid var(--line); }
.chat.wa .chat-in { display: flex; align-items: flex-end; gap: 6px; }
.chat.wa .chat-in textarea { border-radius: 22px; padding: 10px 14px; resize: none; min-height: 44px; flex: 1; }
.chat-ic { border: 0; background: none; width: 40px; height: 44px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.chat-send { width: 44px; height: 44px; border-radius: 50%; border: 0; background: #be1e2d; color: #fff; font-size: 18px; cursor: pointer; flex: none; display: inline-flex; align-items: center; justify-content: center; }
.chat-send.mic { font-size: 18px; }
.chat-send:disabled { opacity: .4; }
.rec-bar { align-items: center; gap: 10px; padding: 0 4px; min-height: 44px; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #dc2626; animation: tdot 1s infinite; }
.att-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.att-opt { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 14px 6px; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; font: inherit; font-weight: 600; }
.att-ic { font-size: 26px; }
.msgs.wa { max-height: none; }
.chat.wa .chat-box { position: static; }
.msgs.wa .msg.mine { color: #18181b; }
.msgs.wa .msg.mine .msg-time { color: #71717a; }
.msgs.wa .msg.mine .msg-pdf, .msgs.wa .msg.mine a { color: inherit; }
.msgs.wa .poll-opt { color: #18181b; }

/* Chat Anhängen Liste, schlicht */
.att-list { display: flex; flex-direction: column; }
.att-row { display: flex; align-items: center; gap: 14px; padding: 12px 4px; border: 0; border-top: 1px solid #f0efed; background: none; font: inherit; font-size: 15px; font-weight: 600; color: #18181b; text-align: left; cursor: pointer; width: 100%; }
.att-row:first-child { border-top: 0; }
.att-row:active { background: #fafafa; }
.att-ri { width: 40px; height: 40px; border-radius: 10px; background: #f4f4f5; color: #27272a; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.att-ri svg { width: 22px; height: 22px; }
.att-rt small { display: block; font-weight: 400; color: #71717a; font-size: 12.5px; margin-top: 1px; }
.chat-send svg { width: 22px; height: 22px; }
.ico.sm { width: 18px; height: 18px; color: #52525b; flex: none; }

/* Sprachnachricht gedrückt halten */
.chat-send.mic { touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: transform .15s; }
.chat-send.mic.rec { transform: scale(1.35); background: #9b1515; }
.chat-in .rec-bar { flex: 1; min-width: 0; overflow: hidden; }
.rec-hint { color: #71717a; font-size: 13px; white-space: nowrap; margin-left: auto; padding-right: 8px; transition: transform .05s; }

/* Datei-Betrachter mit X */
.fv { position: fixed; inset: 0; z-index: 1000; background: #111; display: flex; flex-direction: column; }
.fv-bar { display: flex; align-items: center; gap: 8px; padding: calc(env(safe-area-inset-top) + 6px) 8px 6px; background: #18181b; color: #fff; }
.fv-x { width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; flex: none; }
.fv-title { flex: 1; min-width: 0; font-weight: 600; font-size: 15px; }
.fv-btn { border: 1px solid rgba(255,255,255,.35); background: none; color: #fff; border-radius: 8px; padding: 8px 12px; font: inherit; font-size: 14px; cursor: pointer; flex: none; }
.fv-body { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; overflow: auto; -webkit-overflow-scrolling: touch; }
.fv-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.fv-pdf { width: 100%; height: 100%; border: 0; background: #fff; flex: 1; }
.fv-load { color: #d4d4d8; font-size: 15px; }

/* Personal-Übersicht */
.pp-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 720px) { .pp-tiles { grid-template-columns: repeat(2, 1fr); } }
.pp-tile { text-align: left; cursor: pointer; font: inherit; color: inherit; }
.pp-tile.on { border-color: #be1e2d; box-shadow: inset 0 0 0 1px #be1e2d; }
.pp-tile.warn b { color: #8a5300; }
.pp-filters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 720px) { .pp-filters { grid-template-columns: 1fr 1fr; } }
.chip-f { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; color: #3f3f46; cursor: pointer; }
.chip-f.on { background: #18181b; border-color: #18181b; color: #fff; }
.pp-row { display: flex; align-items: center; gap: 10px; }
.pp-row.off { opacity: .7; }
.pp-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; text-decoration: none; color: inherit; }
.pp-call { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; color: #1d6b3a; flex: none; }
.pp-call.off { border: 0; }
.pp-call svg { width: 18px; height: 18px; }

.pp-more { display: flex; flex-direction: column; gap: 10px; }
.pp-morebtn { display: none; flex: none; }
@media (max-width: 720px) { .pp-more { display: none; } .pp-more.open { display: flex; } .pp-morebtn { display: inline-flex; } .pp-tile b { font-size: 20px; } }
.pp-row .ell { white-space: normal; }

/* Kunden und Objekte */
.b-red { background: #fde8ea; color: #9b1515; }
.ccard { padding: 0; }
.ccard-main { display: flex; flex-direction: column; gap: 8px; padding: 14px; text-decoration: none; color: inherit; flex: 1; }
.ccard-foot { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding: 8px 14px; }
.pp-call.mail { color: #27272a; }

.dgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.srow { display: flex; gap: 8px; }
.srow > select { flex: none; width: auto; }
@media (max-width: 720px) { .dgrid { grid-template-columns: 1fr; } .srow { flex-direction: column; } .srow > select { width: 100%; } }

.call { border: 0; cursor: pointer; }
.call svg { width: 22px; height: 22px; }
.call.off { background: #d4d4d8; color: #fff; }

/* Schichtgruppe */
.sg-card { gap: 10px; }
.sg-ic { width: 42px; height: 42px; border-radius: 12px; background: #f4f4f5; display: inline-flex; align-items: center; justify-content: center; flex: none; color: #27272a; }
.sg-ic svg { width: 22px; height: 22px; }
.sg-new { background: #be1e2d; color: #fff; border-radius: 999px; font-size: 11px; font-weight: 800; padding: 2px 8px; flex: none; }
.sg-last { background: #f4f4f5; border-radius: 10px; padding: 8px 10px; font-size: 14px; }
input.tgl { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 13px; background: #d4d4d8; position: relative; cursor: pointer; flex: none; margin: 0; transition: background .15s; }
input.tgl::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; }
input.tgl:checked { background: #be1e2d; }
input.tgl:checked::after { left: 21px; }

/* Verlauf freigeben */
.hist-bar{display:flex;align-items:center;gap:10px;padding:10px 12px;margin:0 0 6px;background:#fff8e6;border:1px solid #f0dca8;border-radius:10px;line-height:1.3}
.hist-bar .ico{color:#8a6400;flex:none}
.hist-ask{display:flex;gap:12px;align-items:flex-start;padding:12px;background:#f6f7f9;border-radius:10px;margin:4px 0 14px;line-height:1.4}
.hist-ask .ico{color:#8a6400;flex:none;margin-top:2px}
.hist-row{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid var(--line,#e6e8ec);cursor:pointer}
.hist-row:last-of-type{border-bottom:0}
.msg-row.sending{opacity:.6}

/* Links und Vorschau im Chat */
.msg-link{color:#0b63c5;text-decoration:underline;word-break:break-all}
.msg.mine .msg-link{color:#0a58b0}
.lp{display:block;text-decoration:none;color:inherit;background:rgba(0,0,0,.05);border-radius:8px;overflow:hidden;margin:2px 0 6px;max-width:300px;border-left:3px solid #be1e2d}
.lp-load .lp-body{opacity:.6}
.lp-img{display:block;width:100%;max-height:170px;object-fit:cover;background:#ddd}
.lp-small{display:flex;align-items:stretch}
.lp-small .lp-img{width:72px;height:72px;max-height:none;flex:none}
.lp-body{padding:7px 10px;min-width:0}
.lp-title{font-weight:600;font-size:14px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.lp-desc{font-size:12.5px;color:#555;line-height:1.35;margin-top:2px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.lp-host{font-size:12px;color:#777;margin-top:3px}

/* Mitarbeiter hinzufügen */
.sheet.pk-sheet{height:88vh;padding-bottom:0}
.pk-chips{flex-wrap:nowrap;overflow-x:auto;gap:6px;padding-bottom:2px}
.pk-chips .chipbtn{white-space:nowrap}.pk-chips .chipbtn b{opacity:.65;font-weight:600}
.pk-list{flex:1;overflow-y:auto;margin:0 -16px;padding:0 16px}
.pk-sec{font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#7a7f87;margin:14px 0 2px}
.pk-row{display:flex;gap:10px;align-items:center;padding:9px 0;border-bottom:1px solid #eef0f2}
.pk-row.off{opacity:.5}
.pk-row .av{width:38px;height:38px;flex:none;font-size:14px}
.pk-cb{width:22px;height:22px;flex:none;accent-color:#be1e2d}
.pk-m{flex:1;min-width:0}.pk-n{font-weight:600;font-size:15px}
.pk-d{font-size:12.5px;color:#666;margin-top:2px;display:flex;gap:4px;align-items:center;flex-wrap:wrap}
.pk-d .badge{font-size:11px;padding:1px 6px}
.b-q{background:#eef0f3;color:#444}
.pk-w{font-size:12px;color:#8a5300;margin-top:2px}
.pk-btns{display:flex;gap:6px;flex:none}
.pk-ib{width:36px;height:36px;border-radius:50%;border:1px solid #d6d9de;display:flex;align-items:center;justify-content:center;background:#fff;color:#15181d;padding:0;cursor:pointer}
.pk-ib svg{width:18px;height:18px}
.pk-wa{color:#1d9a46;border-color:#bfe5c8}.pk-add{color:#be1e2d;border-color:#f0c4c8}
.pk-bar{position:sticky;bottom:0;display:flex;gap:8px;align-items:center;background:#fff;border-top:1px solid #e3e5e9;margin:0 -16px;padding:10px 16px calc(14px + env(safe-area-inset-bottom))}
.sec-t{font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#7a7f87;margin:4px 2px -4px}

/* Abwesenheiten */
.abs-seg{display:flex;flex-wrap:wrap;gap:6px}
.abs-seg button{border:1px solid #d6d9de;border-radius:10px;padding:9px 12px;font-weight:600;font-size:14px;background:#fff;cursor:pointer}
.abs-seg button.on{border-color:#be1e2d;background:#fdeeee;color:#be1e2d}
.abs-up{border:1.5px dashed #c3c7cd;border-radius:12px;padding:14px;text-align:center;font-size:14px;background:#fff;cursor:pointer;width:100%}
.abs-kpi{display:grid;grid-template-columns:repeat(3,1fr);text-align:center;gap:6px}
.abs-kpi b{display:block;font-size:24px}.abs-kpi span{font-size:12px;color:#666}
.abs-grid{display:grid;grid-template-columns:minmax(80px,110px) repeat(7,1fr);gap:3px;margin-top:10px;font-size:12px}
.abs-hd{text-align:center;color:#777;font-weight:600;line-height:1.2}.abs-hd.today{color:#be1e2d}
.abs-nm{font-weight:600;align-self:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.abs-c{height:26px;border-radius:5px;background:var(--c,transparent)}
.abs-c.pend,.abs-leg i.pend{background:repeating-linear-gradient(45deg,var(--c),var(--c) 4px,#fff 4px,#fff 8px)}
.abs-leg{display:flex;flex-wrap:wrap;gap:10px;font-size:12px;color:#555;margin-top:10px}
.abs-leg i{display:inline-block;width:12px;height:12px;border-radius:3px;vertical-align:-2px;margin-right:4px}
.abs-dot{width:12px;height:12px;border-radius:3px;flex:none}
.abs-mx td.center,.abs-mx th.center,.t th.center,.t td.center{text-align:center}
.abs-mx th{font-size:12px}
.abs-mx th,.abs-mx td{padding-left:4px;padding-right:4px}.abs-mx td:first-child{min-width:120px}
.vc-res{background:#f6f7f9;border-radius:12px;padding:14px;display:flex;flex-direction:column;gap:4px}
.vc-big{font-size:34px;font-weight:800;color:#1d7a33;line-height:1.1}.vc-big span{font-size:15px;font-weight:600;color:#333}

/* Dienstanweisungen */
.b-grey { background: #eef0f3; color: #555; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
button.pill { border: 1px solid #e4e4e7; cursor: pointer; padding: 6px 12px; font-size: 13px; }
button.pill.on { background: #15181d; color: #fff; border-color: #15181d; }
.da-tabs { overflow-x: auto; }
.da-tabs button { white-space: nowrap; padding: 0 10px; }
.da-mini { width: 54px; flex: none; text-align: right; font-size: 13px; }
.da-mini .bar { margin-top: 4px; }
.bar { height: 8px; border-radius: 5px; background: #eef0f3; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 5px; background: var(--green); }
.da-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.da-kind { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 10px 8px; font-weight: 600; font-size: 13px; cursor: pointer; }
.da-kind.on { border-color: var(--red); background: var(--red-soft); color: var(--red-dark); }
.da-sec { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid #f0f0f1; }
.da-sec.tap { cursor: pointer; }
.da-sec:last-of-type { border-bottom: 0; }
.da-num { width: 26px; height: 26px; border-radius: 7px; background: #eef0f3; font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; flex: none; }
.da-num.lock { background: var(--amber-soft); }
.da-ed { font-size: 12px; color: var(--red); font-weight: 600; flex: none; }
.da-prev { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.da-ta { min-height: 240px; line-height: 1.45; }
.da-cm { margin: 0 0 10px 36px; background: #fff8e6; border: 1px solid #f3dfa6; border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.da-cm.done { background: #f4f5f7; border-color: #e4e4e7; opacity: .8; }
.da-rep { border-left: 3px solid var(--green); padding-left: 8px; }
.da-rev.angemerkt { border-color: #f3dfa6; background: #fffbf0; }
.da-rev.freigegeben { border-color: #bfe3cb; background: #f3faf5; }
.da-body p { margin: 0 0 10px; }
.da-body ul { margin: 0 0 10px; padding-left: 20px; }
.da-body li { margin-bottom: 4px; }
.da-read { display: flex; flex-direction: column; gap: 12px; }
.da-sticky { position: sticky; top: calc(51px + env(safe-area-inset-top)); z-index: 5; background: var(--bg); margin: 0 -16px; padding: 4px 16px 0; }
@media (min-width: 880px) { .da-sticky { top: 0; margin: 0; padding: 4px 0 0; } }
.da-chips { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: none; }
.da-chips::-webkit-scrollbar { display: none; }
.da-chip { border: 1px solid #d6d9de; background: #fff; border-radius: 14px; padding: 5px 11px; font-size: 12.5px; white-space: nowrap; cursor: pointer; font-weight: 600; color: #3f3f46; }
.da-chip.on { background: #15181d; color: #fff; border-color: #15181d; }
.da-prog { height: 3px; background: #e4e4e7; }
.da-prog i { display: block; height: 3px; width: 0; background: var(--red); transition: width .2s; }
.da-text { font-size: 15px; line-height: 1.55; gap: 4px; }
.da-s h3 { font-size: 16px; margin: 10px 0 6px; scroll-margin-top: 120px; }
.da-s.lock { border-left: 3px solid #e0b84a; background: #fffaf0; padding: 4px 10px; border-radius: 6px; }
.da-s.chg { border-left: 3px solid #4f6bd8; padding-left: 10px; }
.da-ackbar { position: sticky; bottom: calc(66px + env(safe-area-inset-bottom)); background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 -4px 16px rgba(0,0,0,.06); }
@media (min-width: 880px) { .da-ackbar { bottom: 12px; } }
.da-sign { width: 100%; height: 200px; border: 1.5px dashed #a1a1aa; border-radius: 12px; background: #fff; touch-action: none; }
.da-pub { max-width: 720px; margin: 0 auto; padding: calc(16px + env(safe-area-inset-top)) 16px 40px; display: flex; flex-direction: column; gap: 12px; }
.da-pub-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.da-logo { height: 38px; width: auto; display: block; }
.da-pub-sec { font-size: 15px; line-height: 1.55; }
.da-pub-sec h3 { font-size: 16px; }
.da-pub-sec.chg { border-left: 4px solid #4f6bd8; }
.da-pub-sec .da-cm { margin-left: 0; }
.da-pub-foot { position: sticky; bottom: 8px; box-shadow: 0 -4px 16px rgba(0,0,0,.08); }
.da-proof .da-text { font-size: 13px; }
@media print { .da-proof .pb { break-after: page; } .da-proof .da-s { break-inside: avoid; } }

/* Wachbuch */
.ic { display: inline-flex; width: 18px; height: 18px; flex: none; }
.ic svg { width: 100%; height: 100%; }
.bell-k { width: 20px; height: 20px; display: inline-flex; color: #52525b; }
.bell-k svg { width: 20px; height: 20px; }
.da-num .ic { width: 15px; height: 15px; }
.bdg-ic { display: inline-flex; align-items: center; gap: 4px; }
.bdg-ic .ic { width: 13px; height: 13px; }
.ibtn2 { display: inline-flex; align-items: center; gap: 6px; }
.btn .ic { width: 18px; height: 18px; margin-right: 6px; }
.went { background: #fff; border: 1px solid var(--line); border-left: 4px solid transparent; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 5px; }
.went.s-red { border-left-color: var(--red); }
.went.s-blue { border-left-color: #4f6bd8; }
.went.hid { opacity: .7; }
.dh { font-size: 12px; font-weight: 700; color: #71717a; text-transform: uppercase; letter-spacing: .04em; margin: 4px 2px -4px; }
.fixline { display: flex; align-items: center; gap: 6px; background: #f4f5f7; border-radius: 8px; padding: 6px 8px; font-size: 12.5px; color: #52525b; }
.fixline .ic { width: 15px; height: 15px; }
.orig { background: #f4f5f7; border-radius: 8px; padding: 8px 10px; font-size: 13px; color: #52525b; display: flex; flex-direction: column; gap: 2px; }
.linkbtn { background: none; border: 0; padding: 4px 0; color: var(--red); font-weight: 600; font-size: 13px; cursor: pointer; }
.tgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tgrid button { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-weight: 600; font-size: 13px; cursor: pointer; padding: 6px; color: #3f3f46; }
.tgrid button.on { border-color: var(--red); background: var(--red-soft); color: var(--red-dark); }
.res2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.res2 button { min-height: 44px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-weight: 600; font-size: 14px; cursor: pointer; }
.res2 button.on.ohne { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.res2 button.on.mit { border-color: var(--red); background: var(--red-soft); color: var(--red-dark); }
.thumb { position: relative; display: inline-block; }
.thumb button { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 11px; border: 0; background: #111; color: #fff; font-size: 14px; line-height: 1; cursor: pointer; }
.confirm-row { background: #f7f7f8; border-radius: 10px; padding: 10px; gap: 10px; }
.wb { padding-bottom: 70px; }
.wb-fab { position: fixed; left: 16px; right: 16px; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 6; }
@media (min-width: 880px) { .wb-fab { position: sticky; left: auto; right: auto; bottom: 16px; } }
.wb-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wb-kpis div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; }
.wb-kpis b { display: block; font-size: 26px; }
.wb-kpis span { font-size: 12.5px; color: var(--muted); }

/* Kundenportal */
.kp-main { padding-top: 16px; }
.kp-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px var(--green-soft); flex: none; }
.kp-dot.off { background: #a1a1aa; box-shadow: 0 0 0 5px #f4f4f5; }
.kp-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kp-tile { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 10px; display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--ink); text-decoration: none; text-align: center; }
.kp-tile .ic { width: 26px; height: 26px; color: var(--red); }
.kp-badge { position: absolute; top: 8px; right: 10px; background: var(--red); color: #fff; border-radius: 10px; font-size: 11px; padding: 1px 7px; }
.kp-call { width: 40px; height: 40px; border-radius: 20px; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; color: var(--ink); flex: none; background: #fff; }
.kp-call svg { width: 18px; height: 18px; }
.kp-call.g { background: var(--green); border-color: var(--green); color: #fff; }
.kp-msgs { display: flex; flex-direction: column; gap: 8px; }
.kp-msg { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; max-width: 88%; align-self: flex-start; display: flex; flex-direction: column; gap: 3px; }
.kp-msg.me { align-self: flex-end; background: #fdeeee; border-color: #f5cfcf; }
.kp-crow { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 6px; align-items: center; }
.kp-crow:has(> :nth-child(3):last-child) { grid-template-columns: 1fr 1fr auto; }
@media (max-width: 560px) { .kp-crow { grid-template-columns: 1fr 1fr; } }
@media (min-width: 880px) { .kp-main { margin-left: auto; } .kp-nav { display: grid !important; position: fixed; } .top { display: flex !important; } }
.kp-stars { display: flex; gap: 6px; justify-content: center; }
.kp-stars button { width: 46px; height: 46px; border: 0; background: none; color: #d4d4d8; cursor: pointer; padding: 4px; }
.kp-stars button svg { width: 100%; height: 100%; }
.kp-stars button.on { color: #e0a800; }
.kp-stars button.on svg { fill: currentColor; }
/* Qualifikationen: Kacheln und Module */
.qtiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.qtile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font: inherit; color: inherit; }
.qtile.on { border-color: #1d6b3a; background: #eef7f0; }
.qtile.on .small { color: #1d6b3a; }
.qmods { display: flex; flex-wrap: wrap; gap: 6px; }
.qmod { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; font-size: 13px; cursor: pointer; color: inherit; }
.qmod.on { border-color: #1d6b3a; background: #eef7f0; color: #1d6b3a; font-weight: 600; }
.qtile:disabled, .qmod:disabled { cursor: default; }
.btn.danger { background: #fff; border-color: #e3a3a3; color: #9b1515; }
.acc-steps { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--line, #e4e4e7); border-radius: 12px; overflow: hidden; }
.acc-step { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-top: 1px solid var(--line, #e4e4e7); }
.acc-step:first-child { border-top: 0; }
.acc-dot { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 1.5px solid #d4d4d8; display: inline-flex; align-items: center; justify-content: center; }
.acc-step.ok .acc-dot { background: #1d6b3a; border-color: #1d6b3a; color: #fff; }
.acc-dot .ic, .acc-dot svg { width: 14px; height: 14px; }
.mchips { display: flex; flex-wrap: wrap; gap: 6px; }
.mchip { min-width: 52px; padding: 9px 12px; border: 1px solid #d4d4d8; border-radius: 10px; background: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.mchip.on { background: #be1e2d; border-color: #be1e2d; color: #fff; }
.sumrows { display: flex; flex-direction: column; }
.sumrow { display: grid; grid-template-columns: minmax(0, 38%) minmax(0, 1fr); gap: 10px; padding: 8px 0; border-top: 1px solid var(--line, #e4e4e7); }
.sumrow:first-child { border-top: 0; }
.sumrow .strong { overflow-wrap: anywhere; }
@media (max-width: 520px) { .sumrow { grid-template-columns: 1fr; gap: 2px; } }
.tiles .tile { text-decoration: none; color: inherit; min-height: 92px; }
.tiles .tile b { font-size: 24px; }
.tile-new { background: #eef7f0; border-color: #b9dcc3; }
.tile-new b { color: #1d6b3a; }
.next-sh { gap: 2px; text-decoration: none; color: inherit; border-left: 4px solid #be1e2d; }
.res-ask { gap: 10px; }
.res-ask.res-new { border: 2px solid #f0c64a; background: #fffaf0; }
.fbar { display: flex; gap: 8px; flex-wrap: wrap; }
.fbar select { flex: 1 1 140px; width: auto; }
.mcal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; }
.mcal-h { font-size: 12px; color: var(--muted, #71717a); font-weight: 600; }
.mcal-d { min-height: 44px; border-radius: 8px; padding: 4px 0; font-size: 14px; display: flex; flex-direction: column; align-items: center; gap: 1px; color: inherit; text-decoration: none; }
.mcal-d i { font-style: normal; font-size: 10.5px; }
.mcal-d.on { background: #be1e2d; color: #fff; font-weight: 700; }
.mcal-d.res { background: #fdf0c8; color: #6b4a00; font-weight: 700; }
.mcal-d.today { outline: 2px solid #111; outline-offset: -2px; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; }
.lg.on { background: #be1e2d; } .lg.res { background: #f0c64a; }
.pday { width: 40px; flex: none; display: flex; flex-direction: column; align-items: center; font-size: 12px; color: var(--muted, #71717a); }
.pday b { font-size: 18px; color: var(--ink, #111); }
.ntbl td, .ntbl th { padding: 9px 8px; }
.ntbl .c { text-align: center; width: 92px; }
.tour-wrap { position: fixed; inset: 0; background: rgba(17,17,17,.55); z-index: 200; display: flex; align-items: flex-end; justify-content: center; padding: 12px; }
.tour { background: #fff; border-radius: 18px; padding: 20px; width: 100%; max-width: 460px; display: flex; flex-direction: column; gap: 12px; margin-bottom: max(12px, env(safe-area-inset-bottom)); }
.tour-ic { width: 48px; height: 48px; border-radius: 14px; background: #fbe9ea; color: #be1e2d; display: inline-flex; align-items: center; justify-content: center; }
.tour-ic svg { width: 26px; height: 26px; }
.tour-step { font-size: 12px; color: #71717a; font-weight: 600; }
.tour-dots { display: flex; gap: 6px; }
.tour-dots i { width: 8px; height: 8px; border-radius: 50%; background: #e4e4e7; }
.tour-dots i.on { background: #be1e2d; width: 20px; border-radius: 4px; }
@media (min-width: 900px) { .tour-wrap { align-items: center; } }
.pp-prev { position: relative; width: 240px; height: 320px; max-width: 100%; margin: 0 auto; border-radius: 12px; background: #f4f4f5; border: 1px dashed #d4d4d8; display: flex; align-items: center; justify-content: center; text-align: center; padding: 8px; overflow: hidden; }
.pp-prev img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pp-face { position: absolute; left: 22%; right: 22%; top: 9%; height: 58%; border: 2px dashed rgba(190,30,45,.8); border-radius: 50%; pointer-events: none; }
.chips2 { display: flex; flex-wrap: wrap; gap: 6px; }
.chips2 .mchip { font-weight: 500; }
.wk-h { font-weight: 700; font-size: 13px; padding: 10px 0 4px; border-top: 1px solid var(--line, #e4e4e7); color: #3f3f46; }
.wk-h:first-child { border-top: 0; }
.wk-h.today { color: #be1e2d; }
@media (max-width: 600px) { .ntbl .c { width: 50px; padding: 8px 2px; } .ntbl th.c { font-size: 11px; hyphens: manual; } .ntbl td:first-child { font-size: 14px; } }
/* Dienstplan Monat */
.mp-box { --mp-lw: 230px; --mp-cw: 44px; overflow-x: auto; background: #fff; border: 1px solid var(--line, #e4e4e7); border-radius: 14px; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.mp-grid { display: grid; width: max-content; min-width: 100%; }
.mp-grid > div, .mp-grid > a { border-bottom: 1px solid #f0f0f1; }
.mp-lab { position: sticky; left: 0; z-index: 2; background: #fff; border-right: 1px solid #e4e4e7; padding: 6px 10px; display: flex; flex-direction: column; justify-content: center; min-height: 44px; min-width: 0; }
.mp-lab .ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-kwl, .mp-kw { font-size: 11px; font-weight: 700; color: #71717a; min-height: 26px; }
.mp-kw { display: flex; align-items: center; padding-left: 6px; border-left: 1px solid #e4e4e7; background: #fafafa; }
.mp-kwl { background: #fafafa; }
.mp-dh { display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11px; color: #71717a; padding: 4px 0; }
.mp-dh b { font-size: 14px; color: #18181b; }
.mp-dh.mp-lab { align-items: flex-start; font-size: 12px; font-weight: 700; }
.mp-dh.we, .mp-c.we { background: #f7f7f8; }
.mp-dh.today { background: #be1e2d; color: #fff; border-radius: 8px 8px 0 0; }
.mp-dh.today b { color: #fff; }
.mp-c.today { background: #fdf2f3; }
.mp-obj { position: sticky; left: 0; display: flex; align-items: baseline; gap: 10px; padding: 10px 10px 6px; background: #f4f4f5; text-decoration: none; color: inherit; border-top: 1px solid #e4e4e7; }
.mp-obj > span:first-child { position: sticky; left: 10px; }
.mp-c { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 4px 2px; border-left: 1px solid #f0f0f1; min-height: 44px; }
.mp-s { display: block; width: 38px; text-align: center; border-radius: 7px; padding: 5px 0; font-size: 12px; font-weight: 700; text-decoration: none; }
.mp-s.full { background: #e3f4e9; color: #1d6b3a; }
.mp-s.gap { background: #fde4e4; color: #9b1515; }
.mp-s.draft { background: #e4e4e7; color: #3f3f46; }
.mp-add { width: 38px; height: 30px; display: flex; align-items: center; justify-content: center; color: transparent; text-decoration: none; border-radius: 7px; font-size: 18px; }
.mp-add:hover, .mp-add:focus { color: #a1a1aa; background: #f4f4f5; }
.mp-empty { padding: 24px 14px; color: #71717a; }
@media (max-width: 700px) { .mp-box { --mp-lw: 128px; --mp-cw: 42px; } .mp-lab { padding: 6px 8px; } .mp-lab .strong { font-size: 13px; } }
.mpm-cal { padding: 10px; }
.mpm-grid { display: grid; grid-template-columns: 26px repeat(7, minmax(0, 1fr)); gap: 3px; text-align: center; }
.mpm-kw { font-size: 10px; color: #a1a1aa; display: flex; align-items: center; justify-content: center; }
.mpm-d { border: 0; background: none; font: inherit; color: inherit; min-height: 44px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 15px; padding: 0; }
.mpm-d.we { color: #71717a; }
.mpm-d.today span { color: #be1e2d; font-weight: 800; }
.mpm-d.on { background: #be1e2d; color: #fff; }
.mpm-d.on span { color: #fff; font-weight: 700; }
.mpm-dot { width: 7px; height: 7px; border-radius: 50%; display: block; }
.mpm-dot.full { background: #2f9e5b; } .mpm-dot.gap { background: #d92d2d; } .mpm-dot.draft { background: #a1a1aa; }
.mpm-d.on .mpm-dot { box-shadow: 0 0 0 2px #fff; }
.mpm-list { display: flex; flex-direction: column; gap: 10px; }
.mpm-obj { gap: 6px; }
.mpm-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid #f0f0f1; text-decoration: none; color: inherit; }
.mpm-line > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.mpm-line b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mpm-line i { font-style: normal; font-size: 12px; color: #71717a; }
.mpm-line.empty b { color: #71717a; font-weight: 600; }
.mpm-tag { font-size: 12px; font-weight: 700; color: #be1e2d; white-space: nowrap; }
/* Dienstplan Handy B */
.mpb { gap: 10px; }
.mpb-head { position: sticky; top: 0; z-index: 5; background: #fff; margin: -16px -16px 0; padding: 8px 12px 10px; border-bottom: 1px solid #e4e4e7; box-shadow: 0 4px 12px rgba(0,0,0,.04); }
.mpb-top { display: flex; align-items: center; gap: 4px; }
.mpb-top > span { flex: 1; }
.mpb-title { border: 0; background: none; font: inherit; font-size: 18px; font-weight: 800; padding: 6px 4px; display: flex; align-items: center; gap: 6px; color: inherit; }
.mpb-car { font-size: 16px; transition: transform .2s; display: inline-block; }
.mpb-car.up { transform: rotate(180deg); }
.mpb-nav { border: 1px solid #e4e4e7; background: #fff; border-radius: 10px; width: 36px; height: 36px; font-size: 18px; color: #3f3f46; flex: none; }
.mpb-plus { margin-left: auto; width: 40px; height: 40px; border-radius: 12px; background: #be1e2d; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; text-decoration: none; flex: none; }
.mpb-top .btn.sm { margin-left: 4px; }
.mpb-kw { font-size: 11px; font-weight: 700; color: #a1a1aa; margin: 6px 2px 4px; }
.mpb-week, .mpb-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.mpb-month { margin-top: 8px; row-gap: 6px; }
.mpb-d { border: 0; background: none; font: inherit; color: inherit; border-radius: 12px; padding: 6px 0; display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 64px; }
.mpb-d b { font-size: 17px; }
.mpb-wd { font-size: 11px; color: #71717a; }
.mpb-d.we b { color: #71717a; }
.mpb-d.today b { color: #be1e2d; }
.mpb-d.on { background: #18181b; color: #fff; }
.mpb-d.on b, .mpb-d.on .mpb-wd { color: #fff; }
.mpb-m { min-width: 22px; height: 18px; border-radius: 9px; font-style: normal; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; padding: 0 5px; }
.mpb-m.gap { background: #d92d2d; color: #fff; }
.mpb-m.full { background: #e3f4e9; color: #1d6b3a; }
.mpb-m.full svg { width: 12px; height: 12px; }
.mpb-m.draft { background: #e4e4e7; color: #52525b; }
.mpb-dayhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mpb-draftbar { border: 1px solid #e4e4e7; background: #fafafa; border-radius: 12px; padding: 10px 12px; display: flex; justify-content: space-between; font: inherit; font-size: 14px; color: inherit; }
.mpb-draftbar b { color: #be1e2d; }
.mpb-occ { display: flex; flex-direction: column; align-items: flex-end; font-size: 13px; font-weight: 700; white-space: nowrap; border-radius: 9px; padding: 5px 10px; }
.mpb-occ small { font-size: 11px; font-weight: 500; opacity: .8; }
.mpb-occ.gap { background: #fde4e4; color: #9b1515; }
.mpb-occ.full { background: #e3f4e9; color: #1d6b3a; }
.mpb-occ.draft { background: #e4e4e7; color: #3f3f46; }
.mpb .mchips .mchip { padding: 8px 10px; font-size: 13px; white-space: nowrap; min-width: 0; }
.mpb-d.wk { background: #f4f4f5; }
.pp-list { display: flex; flex-direction: column; max-height: 55vh; overflow-y: auto; border: 1px solid #e4e4e7; border-radius: 12px; }
.pp-day { position: sticky; top: 0; background: #f7f7f8; font-size: 12px; font-weight: 700; color: #52525b; padding: 8px 12px; border-bottom: 1px solid #e4e4e7; }
.pp-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid #f0f0f1; cursor: pointer; }
.pp-row input { width: 22px; height: 22px; accent-color: #be1e2d; flex: none; }
.mpb-title { font-size: 16px; white-space: nowrap; min-width: 0; overflow: hidden; }
.rc-obj { font-size: 13px; font-weight: 700; color: #3f3f46; margin-top: 4px; padding-top: 6px; border-top: 1px solid #f0f0f1; }
.rc-obj:first-of-type { border-top: 0; }
.rc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 9px 10px 9px 12px; border-radius: 8px; text-decoration: none; color: #18181b; background: #fafafa; border-left: 4px solid #a1a1aa; }
.rc-row.gap { border-left-color: #d92d2d; }
.rc-row.full { border-left-color: #2f9e5b; }
.rcx-t { font-size: 14px; font-weight: 600; }
.rc-time { font-size: 13px; color: #71717a; font-variant-numeric: tabular-nums; }
.rc-st { font-size: 13px; font-weight: 700; min-width: 58px; text-align: right; }
.rc-row.gap .rc-st { color: #b91c1c; }
.rc-row.full .rc-st { color: #1d6b3a; }
.rc-row.draft .rc-st { color: #71717a; font-weight: 600; }
/* PC: Dienstplan nutzt die volle Breite */
@media (min-width: 900px) {
  .main:has(> .mp-wide) { max-width: none; padding-right: 24px; }
  .mp-wide .mp-box { --mp-lw: 190px; }
  .mp-wide .mp-grid { grid-template-columns: var(--mp-lw) repeat(var(--mp-n, 31), minmax(34px, 1fr)) !important; width: 100%; }
  .mp-wide .mp-s { width: auto; min-width: 30px; padding: 5px 4px; font-size: 12px; }
  .mp-wide .mp-add { width: 100%; }
}
/* Kalender am PC */
.mc-box { background: #fff; border: 1px solid #e4e4e7; border-radius: 14px; overflow: hidden; }
.mc-grid { display: grid; grid-template-columns: 34px repeat(7, minmax(0, 1fr)); }
.mc-h { padding: 8px; font-size: 12px; font-weight: 700; color: #71717a; background: #fafafa; border-bottom: 1px solid #e4e4e7; }
.mc-h.kw, .mc-kw { text-align: center; padding: 8px 0; font-size: 11px; color: #a1a1aa; background: #fafafa; border-right: 1px solid #e4e4e7; }
.mc-kw { border-bottom: 1px solid #f0f0f1; }
.mc-d { min-height: 128px; border-right: 1px solid #f0f0f1; border-bottom: 1px solid #f0f0f1; padding: 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mc-d.we { background: #fcfcfc; }
.mc-d.off { background: #f7f7f8; }
.mc-d.today { background: #fdf2f3; box-shadow: inset 0 0 0 2px #be1e2d; }
.mc-top { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.mc-n { font-weight: 800; font-size: 15px; }
.mc-d.today .mc-n { color: #be1e2d; }
.mc-open { font-size: 11px; font-weight: 700; color: #fff; background: #d92d2d; border-radius: 8px; padding: 1px 6px; }
.mc-add { margin-left: auto; color: #a1a1aa; text-decoration: none; font-size: 18px; line-height: 1; padding: 0 4px; border-radius: 6px; }
.mc-add:hover { background: #f4f4f5; color: #18181b; }
.mc-e { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px; align-items: center; padding: 3px 6px; border-radius: 6px; text-decoration: none; color: #18181b; border-left: 3px solid #a1a1aa; background: #f4f4f5; font-size: 12px; }
.mc-e.gap { border-left-color: #d92d2d; background: #fdeeee; }
.mc-e.full { border-left-color: #2f9e5b; background: #eef8f1; }
.mc-time { font-variant-numeric: tabular-nums; color: #52525b; }
.mc-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.mc-txt b, .mc-txt i { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-txt i { font-style: normal; font-size: 11px; color: #71717a; }
.mc-st { font-weight: 800; font-size: 12px; }
.mc-e.gap .mc-st { color: #b91c1c; } .mc-e.full .mc-st { color: #1d6b3a; } .mc-e.draft .mc-st { color: #71717a; }
.mc-more { border: 0; background: none; font: inherit; font-size: 12px; font-weight: 700; color: #be1e2d; text-align: left; padding: 2px 6px; cursor: pointer; }
.mc-list { display: flex; flex-direction: column; gap: 6px; }
.mc-list .mc-e { font-size: 14px; padding: 8px 10px; }
@media (min-width: 900px) and (max-width: 1599px) {
  .mp-wide .mp-box { --mp-lw: 150px; }
  .mp-wide .mp-grid { grid-template-columns: var(--mp-lw) repeat(var(--mp-n, 31), minmax(28px, 1fr)) !important; }
  .mp-wide .mp-s { min-width: 26px; padding: 4px 2px; font-size: 11px; }
  .mp-wide .mp-lab { padding: 6px 8px; }
  .mp-wide .mp-lab .strong { font-size: 13px; }
}
/* Formulare: Felder sauber auf einer Linie, Datum und Uhrzeit auf iPhone nicht verrutscht */
.grid2, .grid3 { align-items: end; }
.f { min-width: 0; }
input.in[type=date], input.in[type=time], input.in[type=datetime-local] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; text-align: left; line-height: 44px; }
input.in[type=date]::-webkit-date-and-time-value, input.in[type=time]::-webkit-date-and-time-value { text-align: left; margin: 0; }
.se-bar { display: none; }
@media (max-width: 699px) {
  .grid3 { grid-template-columns: 1fr; }
  .grid2.m1 { grid-template-columns: 1fr; }
  .grid3.m-first, .grid3.m-last { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid3.m-first > :first-child { grid-column: 1 / -1; }
  .grid3.m-last > :last-child { grid-column: 1 / -1; }
  .in, select.in { height: 48px; }
  input.in[type=date], input.in[type=time] { line-height: 48px; }
  .se-top { display: none !important; }
  .se-bar { display: grid; grid-template-columns: 1fr 1.3fr; gap: 10px; position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 6; background: rgba(247,247,248,.96); backdrop-filter: blur(6px); padding: 10px 0; margin: 0 -2px; border-top: 1px solid #e4e4e7; }
  .se-bar .btn { height: 48px; }
}
/* Objektfarben */
.mc-dot { width: 22px; height: 22px; border-radius: 50%; flex: none; }
.mp-obj { box-shadow: inset 4px 0 0 var(--oc, transparent); }
.mc-bar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.mc-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.mc-chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid #d4d4d8; background: #fff; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.mc-chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--oc); }
.mc-chip.off { opacity: .45; text-decoration: line-through; }
.mc-g { border-left: 3px solid var(--oc); background: color-mix(in srgb, var(--oc) 7%, #fff); border-radius: 6px; padding: 3px 4px 3px 6px; display: flex; flex-direction: column; gap: 1px; }
.mc-gh { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; color: var(--oc); white-space: nowrap; overflow: hidden; }
.mc-gh i { display: none; }
.mc-gh span { overflow: hidden; text-overflow: ellipsis; }
.mc-g .mc-e { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px; align-items: center; padding: 2px 2px; border: 0; background: none; border-radius: 4px; font-size: 12px; }
.mc-g .mc-e:hover { background: rgba(0,0,0,.05); }
.mc-g .mc-txt { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.mc-st { font-size: 11px; font-weight: 800; border-radius: 6px; padding: 1px 5px; white-space: nowrap; }
.mc-st.gap { background: #fde4e4; color: #b91c1c; }
.mc-st.full { background: #e3f4e9; color: #1d6b3a; }
.mc-st.draft { background: #e4e4e7; color: #52525b; }
.mc-list .mc-g { padding: 8px 10px; gap: 4px; }
.mc-list .mc-gh { font-size: 13px; }
.mc-list .mc-e { font-size: 14px; padding: 6px 2px; }
@media (max-width: 699px) { .shift-form .grid3:not(.m-first):not(.m-last) { grid-template-columns: 1fr !important; } }
.clr-box { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.clr { width: 32px; height: 32px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #d4d4d8; cursor: pointer; padding: 0; position: relative; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: #71717a; background: #fff; }
.clr.on { box-shadow: 0 0 0 3px #18181b; }
.clr-own input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.mc-bar .seg { flex: none; }
.mc-f { display: grid; grid-template-columns: 4px auto minmax(0, 1fr) auto; gap: 6px; align-items: center; padding: 3px 4px 3px 0; border-radius: 6px; text-decoration: none; color: #18181b; background: #fafafa; font-size: 12px; overflow: hidden; }
.mc-f > i { align-self: stretch; background: var(--oc); border-radius: 3px; }
.mc-f .mc-txt { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.mc-f .mc-txt b, .mc-f .mc-txt em { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-f .mc-txt em { font-style: normal; font-size: 11px; color: var(--oc); font-weight: 700; }
.mc-f:hover { background: #f1f1f3; }
.mc-hol { font-size: 11px; font-weight: 700; color: #7c3aed; background: #f1eafe; border-radius: 6px; padding: 1px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mc-d.hol { background: #faf7ff; }
.mp-dh.hol span { color: #7c3aed; font-weight: 800; }
.mc-txt2 { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.mc-txt2 b, .mc-txt2 i { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-txt2 i { font-style: normal; font-size: 11px; color: #71717a; }
.mc-st2 { font-weight: 800; font-size: 12px; }
.mc-e.gap .mc-st2 { color: #b91c1c; } .mc-e.full .mc-st2 { color: #1d6b3a; } .mc-e.draft .mc-st2 { color: #71717a; }
.hol-box { border-top: 1px solid #f0f0f1; padding-top: 10px; }
.hol-box summary { cursor: pointer; color: #be1e2d; }
.hol-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 16px; font-size: 13px; }
.hol-list > div { display: flex; gap: 10px; padding: 4px 0; border-bottom: 1px solid #f4f4f5; }
.hol-list span { color: #71717a; min-width: 105px; font-variant-numeric: tabular-nums; }
/* Druck */
@media print {
  @page { size: A4 landscape; margin: 8mm; }
  body { background: #fff !important; }
  .side, .top, .tabbar, .bnav, nav, .dp-btns, .dp-views, .dp-tiles, .mc-bar, .dp-legend a, .no-print, .se-bar, .mp-add, .mc-add, .mc-more, .seg, .dp-kw button, .btn { display: none !important; }
  .main { margin: 0 !important; padding: 0 !important; max-width: none !important; }
  body.printing::before { content: attr(data-print-title); display: block; font: 700 16px/1.3 system-ui, sans-serif; margin: 0 0 8px; }
  .dp h1 { display: none; }
  .mp-box, .mc-box, .dp-box { overflow: visible !important; border: 1px solid #ccc !important; }
  .mp-wide .mp-grid { grid-template-columns: 130px repeat(var(--mp-n, 31), minmax(0, 1fr)) !important; font-size: 10px; }
  .mp-s { font-size: 9px !important; min-width: 0 !important; padding: 2px 0 !important; }
  .mp-lab { position: static !important; padding: 3px 5px !important; min-height: 0 !important; }
  .mp-c, .mp-dh { min-height: 0 !important; padding: 2px 0 !important; }
  .mc-d { min-height: 0 !important; break-inside: avoid; }
  .mc-e, .mc-f, .mc-g { font-size: 9px !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Gesetzliche Feiertage orange */
.mc-hol { color: #c2410c !important; background: #ffedd5 !important; }
.mc-d.hol { background: #fff7ed !important; }
.mp-dh.hol { background: #ffedd5 !important; }
.mp-dh.hol span, .mp-dh.hol b { color: #c2410c !important; font-weight: 800; }
.mp-c.hol { background: #fff7ed !important; }
.dp-legend i.hol { background: #fdba74; }

/* Monat mit Mitarbeitern */
.mn-box { display: flex; flex-direction: column; gap: 14px; }
.mn-grid { display: grid; grid-template-columns: 170px repeat(7, minmax(0, 1fr)); border: 1px solid #e4e4e7; border-radius: 12px; overflow: hidden; background: #fff; break-inside: avoid; page-break-inside: avoid; }
.mn-grid > div { border-right: 1px solid #f0f0f1; border-bottom: 1px solid #f0f0f1; min-width: 0; }
.mn-kw { background: #fafafa; font-weight: 800; font-size: 13px; padding: 8px 10px; display: flex; align-items: center; }
.mn-dh { background: #fafafa; padding: 6px 8px; font-size: 12px; font-weight: 700; color: #3f3f46; display: flex; flex-direction: column; gap: 1px; }
.mn-dh.we { background: #f4f4f5; }
.mn-dh.today span { color: #be1e2d; }
.mn-dh.hol { background: #ffedd5; color: #c2410c; }
.mn-dh i { font-style: normal; font-size: 10.5px; font-weight: 700; color: #c2410c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mn-dh.out, .mn-c.out { background: #fbfbfb; }
.mn-obj { grid-column: 1 / -1; background: #f7f7f8; padding: 6px 10px; border-left: 4px solid var(--oc, #a1a1aa); font-size: 13px; }
.mn-lab { padding: 6px 10px; display: flex; flex-direction: column; justify-content: center; font-size: 12.5px; }
.mn-c { padding: 4px; display: flex; flex-direction: column; gap: 4px; min-height: 34px; }
.mn-c.we { background: #fcfcfc; }
.mn-c.hol { background: #fff7ed; }
.mn-c.today { box-shadow: inset 0 0 0 2px #be1e2d33; }
.mn-s { display: flex; flex-direction: column; gap: 1px; padding: 4px 6px; border-radius: 7px; text-decoration: none; color: #18181b; border-left: 3px solid #16a34a; background: #f0fdf4; font-size: 12px; line-height: 1.3; }
.mn-s.gap { border-left-color: #dc2626; background: #fef2f2; }
.mn-s.draft { border-left-color: #a1a1aa; background: #f4f4f5; }
.mn-p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mn-p.tl { font-weight: 700; }
.mn-free { color: #b91c1c; font-weight: 700; font-size: 11px; }
.mn-draft { color: #71717a; font-size: 11px; font-weight: 600; }
@media print { .mn-grid { border-radius: 0; grid-template-columns: 145px repeat(7, minmax(0, 1fr)); } .mn-s { font-size: 10px; } .mn-lab .ell { white-space: normal; } }
.mn-more { all: unset; cursor: pointer; font-size: 11px; font-weight: 700; color: #be1e2d; text-decoration: underline; }
@media print { .mn-more { color: #555; text-decoration: none; } }
/* Woche mit Namen am PC */
.rc.rc-names { align-items: flex-start; }
.rc-ti { font-size: 11.5px; font-weight: 700; color: #27272a; }
.rc-who { display: flex; flex-direction: column; gap: 1px; margin-top: 3px; padding-top: 3px; border-top: 1px solid #0000000f; width: 100%; font-size: 11.5px; color: #27272a; font-weight: 500; }
.rc-who span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-who .tl { font-weight: 700; }
.rc-more { color: #52525b; font-weight: 600; }
.dp-h.hol { background: #ffedd5 !important; color: #c2410c !important; }
.dp-h i { display: block; font-style: normal; font-size: 10.5px; font-weight: 700; color: #c2410c; text-transform: none; letter-spacing: 0; }
.dp-c.hol { background: #fff7ed; }
/* Mauskarte mit allen Namen */
.hov { position: fixed; z-index: 9999; background: #fff; border: 1px solid #e4e4e7; border-radius: 12px; box-shadow: 0 12px 32px #0000002a; padding: 12px 14px; max-width: 560px; min-width: 240px; pointer-events: none; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.hov-h { display: flex; flex-direction: column; gap: 2px; }
.hov-h span { color: #71717a; font-size: 12px; }
.hov-s { font-weight: 700; font-size: 12.5px; padding: 4px 8px; border-radius: 7px; align-self: flex-start; }
.hov-s.full { background: #e3f4e9; color: #15803d; } .hov-s.gap { background: #fde4e4; color: #b91c1c; } .hov-s.draft { background: #f4f4f5; color: #52525b; }
.hov-n { display: grid; grid-template-columns: 1fr; gap: 3px 18px; }
.hov-n.c2 { grid-template-columns: 1fr 1fr; } .hov-n.c3 { grid-template-columns: 1fr 1fr 1fr; }
.hov-n span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hov-n .tl { font-weight: 700; }
.hov-e { color: #71717a; }
.hov-f { border-top: 1px solid #f0f0f1; padding-top: 7px; color: #be1e2d; font-weight: 600; font-size: 12px; }
@media print { .hov { display: none; } }
/* Halbe Feiertage 24.12. und 31.12. ab 14 Uhr: hell orange gestreift */
.mp-dh.half, .dp-h.half { background: repeating-linear-gradient(135deg, #fff7ed 0 6px, #ffedd5 6px 12px) !important; }
.mp-dh.half span, .mp-dh.half b, .dp-h.half { color: #c2410c !important; }
.mp-c.half, .dp-c.half, .mc-d.half { background: repeating-linear-gradient(135deg, #ffffff 0 8px, #fff7ed 8px 16px) !important; }
.mc-hol.half { background: #fff7ed !important; border: 1px dashed #fdba74; }
.dp-legend i.half { background: repeating-linear-gradient(135deg, #fff7ed 0 3px, #fdba74 3px 5px); }
.hov.hov-tip { min-width: 0; padding: 7px 11px; font-weight: 700; color: #c2410c; font-size: 12.5px; }
/* Wochenansicht über den Monat */
.dp-weeks { display: flex; flex-direction: column; gap: 14px; }
.dp-wk .dp-grid > .dp-h:first-child { font-size: 13px; color: #111; letter-spacing: 0; }
.dp-h.out, .dp-c.out { background: #fafafa; color: #a1a1aa; }
.dp-wk-empty { padding: 12px 16px; font-size: 13px; }
@media print { .dp-wk { break-inside: avoid; page-break-inside: avoid; } }
/* Seitliches Wischen auf dem Trackpad darf im Dienstplan nicht zur vorherigen Seite springen */
html, body { overscroll-behavior-x: none; }
.mp-box, .dp-box, .mn-box, .dp-weeks { overscroll-behavior-x: contain; }

/* ===== Neuer Dienstplan am PC ===== */
.main:has(> .dpb) { max-width: none; padding: 0 !important; }
.dpb { display: grid; grid-template-columns: minmax(0, 1fr); background: #fafafa; min-height: calc(100vh - 60px); }
.dpb.withp { grid-template-columns: minmax(0, 1fr) 390px; }
.dpb-main { display: flex; flex-direction: column; min-width: 0; }
.lu { display: inline-flex; flex: none; } .lu svg { display: block; }
.dpb-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; background: #fff; border-bottom: 1px solid #ececee; min-height: 64px; }
.dpb-bc { font-size: 11.5px; color: #71717a; }
.dpb-head h1 { font-size: 19px; margin: 2px 0 0; font-weight: 700; }
.dpb-acts { display: flex; gap: 8px; align-items: center; }
.dpb-acts .btn { display: inline-flex; align-items: center; gap: 6px; }
.btn.dpb-warn { color: #b45309; border-color: #f5d08a; background: #fffbeb; }
.dpb-mwrap { position: relative; }
.dpb-menu { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid #e4e4e7; border-radius: 10px; box-shadow: 0 8px 24px #0000001f; padding: 6px; display: flex; flex-direction: column; min-width: 240px; z-index: 40; }
.dpb-menu.up { top: auto; bottom: calc(100% + 6px); }
.dpb-menu[hidden] { display: none; }
.dpb-menu button { all: unset; display: flex; gap: 9px; align-items: center; padding: 8px 10px; border-radius: 6px; font-weight: 500; color: #27272a; cursor: pointer; font-size: 13px; }
.dpb-menu button:hover { background: #f4f4f5; } .dpb-menu button.danger { color: #b91c1c; }
.dpb-kpis { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; padding: 12px 20px 0; }
.dpb-kpi { background: #fff; border: 1px solid #ececee; border-radius: 8px; padding: 8px 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; min-width: 0; }
.dpb-kpi span { display: block; color: #3f3f46; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dpb-kpi small { display: block; color: #8a8a93; font-size: 11px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dpb-kpi > div { min-width: 0; }
.dpb-kpi b { font-size: 19px; } .dpb-kpi b.g { color: #15803d; } .dpb-kpi b.r { color: #be1e2d; } .dpb-kpi b.o { color: #b45309; }
.dpb-bar { display: flex; align-items: center; gap: 8px; padding: 10px 20px 8px; flex-wrap: wrap; }
.dpb-bar .grow { flex: 1; }
.dpb-nb { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid #e4e4e7; border-radius: 8px; background: #fff; cursor: pointer; color: #27272a; padding: 0; position: relative; }
.dpb-cal input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dpb-cal input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.btn.dim { opacity: .55; }
.dpb-rng { font-weight: 700; font-size: 13.5px; margin: 0 2px 0 4px; white-space: nowrap; } .dpb-kw { color: #71717a; font-weight: 500; }
.dpb-seg { margin-left: 4px; }
.dpb-sw { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: #3f3f46; cursor: pointer; margin-left: 4px; }
.dpb-sw input { display: none; } .dpb-sw i { width: 30px; height: 17px; border-radius: 9px; background: #d4d4d8; position: relative; transition: .15s; }
.dpb-sw i:after { content: ''; position: absolute; left: 2px; top: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; transition: .15s; }
.dpb-sw.on i { background: #be1e2d; } .dpb-sw.on i:after { left: 15px; }
.dpb-sel { height: 32px; border: 1px solid #e4e4e7; border-radius: 8px; background: #fff; padding: 0 8px; font-size: 12.5px; color: #27272a; max-width: 200px; }
.dpb-srch { display: inline-flex; align-items: center; gap: 6px; height: 32px; border: 1px solid #e4e4e7; border-radius: 8px; background: #fff; padding: 0 10px; color: #a1a1aa; }
.dpb-search { border: 0; outline: 0; font-size: 12.5px; width: 150px; background: transparent; color: #18181b; }
.dpb-more { display: flex; gap: 14px; align-items: center; padding: 0 20px 8px; }
.dpb-more[hidden] { display: none; }
.dpb-chk { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.dpb-body { padding: 0 20px; min-width: 0; }
.dpb-gw { border: 1px solid #ececee; border-radius: 8px; background: #fff; overflow: auto; max-height: calc(100vh - 290px); min-height: 360px; }
.dpb-grid { display: grid; grid-template-columns: 210px repeat(7, minmax(130px, 1fr)); }
.dpb-gh { position: sticky; top: 0; z-index: 3; background: #fff; border-bottom: 1px solid #e4e4e7; border-left: 1px solid #f0f0f1; padding: 8px; font-size: 12.5px; color: #3f3f46; white-space: nowrap; }
.dpb-gh b { color: #18181b; font-weight: 700; }
.dpb-g0 { left: 0; z-index: 4; border-left: 0; color: #71717a; font-weight: 600; }
.dpb-gh.we, .dpb-gc.we { background: #f7f7f8; }
.dpb-gh.td { background: #fdecee; color: #be1e2d; } .dpb-gh.td b { color: #be1e2d; } .dpb-gc.td { background: #fffafa; }
.dpb-gh.hol { background: #ffedd5; color: #c2410c; } .dpb-gh.hol b { color: #c2410c; } .dpb-gc.hol { background: #fff7ed; }
.dpb-gh.half { background: repeating-linear-gradient(135deg, #fff7ed 0 6px, #ffedd5 6px 12px); color: #c2410c; } .dpb-gh.half b { color: #c2410c; }
.dpb-gc.half { background: repeating-linear-gradient(135deg, #ffffff 0 8px, #fff7ed 8px 16px); }
.dpb-go { position: sticky; left: 0; z-index: 2; background: #fff; padding: 9px 10px; border-bottom: 1px solid #f0f0f1; display: flex; flex-direction: column; gap: 2px; }
.dpb-go b { font-size: 12.5px; } .dpb-go span { font-size: 11px; color: #8a8a93; }
.dpb-gc { border-left: 1px solid #f0f0f1; border-bottom: 1px solid #f0f0f1; padding: 5px; display: flex; flex-direction: column; gap: 5px; min-height: 64px; position: relative; }
.dpb-add { display: none; position: absolute; right: 4px; bottom: 3px; width: 22px; height: 22px; border-radius: 6px; background: #fff; border: 1px solid #e4e4e7; color: #71717a; text-decoration: none; text-align: center; line-height: 20px; font-weight: 700; }
.dpb-gc:hover .dpb-add { display: block; }
.dpb-empty { grid-column: 1 / -1; padding: 28px; color: #71717a; }
.dpb-card { border-radius: 6px; border-left: 3px solid; padding: 5px 7px; font-size: 11.5px; line-height: 1.35; cursor: pointer; user-select: none; }
.dpb-card:hover { filter: brightness(.98); }
.dpb-card.full { background: #ecfdf3; border-color: #16a34a; } .dpb-card.full .dpb-cn { color: #15803d; }
.dpb-card.part { background: #fef7e6; border-color: #e38b0b; } .dpb-card.part .dpb-cn { color: #b45309; }
.dpb-card.empty { background: #fdecee; border-color: #dc2626; } .dpb-card.empty .dpb-cn { color: #b91c1c; }
.dpb-card.over { background: #eaf2ff; border-color: #2563eb; } .dpb-card.over .dpb-cn { color: #1d4ed8; }
.dpb-card.pick, tr.pick td { outline: 2px solid #be1e2d; outline-offset: 1px; }
.dpb-ct { font-weight: 700; display: flex; align-items: center; gap: 4px; color: #18181b; } .dpb-ct .lu { color: #4f46e5; } .dpb-np { margin-left: auto; } .dpb-np .lu { color: #71717a; }
.dpb-cn { font-weight: 700; } .dpb-cl { color: #52525b; }
.dpb-cx { color: #71717a; display: flex; align-items: center; gap: 3px; font-size: 11px; }
.dpb-cw { border-top: 1px solid #0000000f; margin-top: 3px; padding-top: 3px; display: flex; flex-direction: column; } .dpb-cw span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .dpb-cw .tl { font-weight: 700; } .dpb-cw .mut { color: #71717a; }
.dpb-legend { display: flex; gap: 16px; padding: 10px 20px 16px; color: #71717a; font-size: 11.5px; align-items: center; flex-wrap: wrap; }
.dpb-legend span { display: inline-flex; align-items: center; gap: 5px; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 2px; border-left: 3px solid; }
.lg.full { background: #ecfdf3; border-color: #16a34a; } .lg.part { background: #fef7e6; border-color: #e38b0b; } .lg.empty { background: #fdecee; border-color: #dc2626; } .lg.over { background: #eaf2ff; border-color: #2563eb; } .lg.hol { background: #ffedd5; border-color: #fdba74; }
.dpb-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.dpb-tbl th { position: sticky; top: 0; background: #fff; text-align: left; padding: 9px 10px; border-bottom: 1px solid #e4e4e7; color: #52525b; font-weight: 600; cursor: pointer; white-space: nowrap; }
.dpb-tbl th.on { color: #be1e2d; }
.dpb-tbl td { padding: 8px 10px; border-bottom: 1px solid #f0f0f1; white-space: nowrap; } .dpb-tbl td.num { text-align: right; font-variant-numeric: tabular-nums; } .dpb-tbl tr { cursor: pointer; } .dpb-tbl tbody tr:hover td { background: #fafafa; }
.dpb-pill { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; }
.dpb-pill.full { background: #ecfdf3; color: #15803d; } .dpb-pill.part { background: #fef7e6; color: #b45309; } .dpb-pill.empty { background: #fdecee; color: #b91c1c; } .dpb-pill.over { background: #eaf2ff; color: #1d4ed8; } .dpb-pill.draft { background: #f4f4f5; color: #52525b; } .dpb-pill.pub { background: #ecfdf3; color: #15803d; }
.mut { color: #71717a; } .warn { color: #b45309; }
.dpb-panel { position: sticky; top: var(--dpb-top, 56px); height: calc(100vh - var(--dpb-top, 56px)); border-left: 1px solid #ececee; background: #fff; display: flex; flex-direction: column; min-height: 0; }
.dpb-panel[hidden] { display: none; }
.dpb-ph { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 10px; } .dpb-ph b { font-size: 15px; }
.dpb-x { all: unset; cursor: pointer; color: #52525b; display: flex; padding: 4px; border-radius: 6px; } .dpb-x:hover { background: #f4f4f5; }
.dpb-pb { padding: 0 18px 12px; overflow: auto; flex: 1; display: flex; flex-direction: column; gap: 12px; }
.dpb-box { border: 1px solid #ececee; border-radius: 10px; padding: 14px; font-size: 13px; }
.dpb-bt { display: flex; justify-content: space-between; align-items: center; gap: 8px; } .dpb-bt > b { font-size: 15px; }
.dpb-ic { color: #71717a; display: flex; }
.dpb-kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 12.5px; } .dpb-kv span { color: #71717a; } .dpb-kv b { font-weight: 600; }
.dpb-tags { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.dpb-big { font-size: 17px; } .dpb-big.full, .dpb-miss.full { color: #15803d; } .dpb-big.part, .dpb-miss.part { color: #b45309; } .dpb-big.empty, .dpb-miss.empty { color: #b91c1c; } .dpb-big.over, .dpb-miss.over { color: #1d4ed8; }
.dpb-prog { height: 7px; background: #f0f0f1; border-radius: 4px; margin: 9px 0 7px; overflow: hidden; } .dpb-prog i { display: block; height: 100%; border-radius: 4px; }
.dpb-prog.full i { background: #16a34a; } .dpb-prog.part i { background: #e0a11b; } .dpb-prog.empty i { background: #dc2626; } .dpb-prog.over i { background: #2563eb; }
.dpb-miss { font-weight: 600; }
.dpb-sep { border-top: 1px solid #f0f0f1; margin: 12px 0 10px; }
.dpb-lines { display: flex; flex-direction: column; gap: 8px; } .dpb-lines > div { display: flex; align-items: center; gap: 8px; }
.dpb-acc { border: 1px solid #ececee; border-radius: 8px; font-size: 12.5px; }
.dpb-acc summary, a.dpb-link { list-style: none; cursor: pointer; padding: 10px 12px; display: flex; justify-content: space-between; font-weight: 600; color: #18181b; text-decoration: none; }
.dpb-acc summary::-webkit-details-marker { display: none; } .dpb-acc summary span, a.dpb-link span { color: #71717a; font-weight: 500; }
.dpb-plist { padding: 0 12px 10px; display: flex; flex-direction: column; gap: 6px; } .dpb-plist > div { display: flex; justify-content: space-between; gap: 8px; }
.dpb-txt { padding: 0 12px 12px; white-space: pre-wrap; color: #3f3f46; }
.dpb-pf { padding: 12px 18px; border-top: 1px solid #ececee; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dpb-pf .btn { white-space: nowrap; font-size: 13px; padding-left: 8px; padding-right: 8px; display: inline-flex; justify-content: center; align-items: center; gap: 6px; } .dpb-pf .primary { grid-column: 1 / -1; }
@media print { .dpb-panel, .dpb-bar, .dpb-head .dpb-acts, .dpb-add { display: none !important; } .dpb.withp { grid-template-columns: 1fr; } .dpb-gw { max-height: none; overflow: visible; border: 0; } .dpb-grid { grid-template-columns: 150px repeat(7, minmax(0, 1fr)); } .dpb-gh, .dpb-go { position: static; } }
/* Monat und Kalender im neuen Dienstplan: gleiche Besetzungsfarben */
.dpb .mp-s.part { background: #fef7e6; color: #b45309; } .dpb .mp-s.empty { background: #fdecee; color: #b91c1c; } .dpb .mp-s.over { background: #eaf2ff; color: #1d4ed8; } .dpb .mp-s.full { background: #ecfdf3; color: #15803d; }
.dpb .mp-s.unpub { box-shadow: inset 0 0 0 1px #a1a1aa; opacity: .8; }
.mc-st.part { background: #fef7e6; color: #b45309; } .mc-st.over { background: #eaf2ff; color: #1d4ed8; }
.dpb .dp { gap: 10px; }
.mc-e.part { background: #fef7e6; border-left-color: #e38b0b; } .mc-e.part .mc-st2 { color: #b45309; }
.mc-e.over { background: #eaf2ff; border-left-color: #2563eb; } .mc-e.over .mc-st2 { color: #1d4ed8; }
/* Fenster Eingeteilte, Bewerbungen, Meldeliste */
button.dpb-link { all: unset; box-sizing: border-box; width: 100%; border: 1px solid #ececee; border-radius: 8px; padding: 10px 12px; display: flex; justify-content: space-between; font-weight: 600; font-size: 12.5px; cursor: pointer; }
button.dpb-link:hover, a.dpb-link:hover { background: #fafafa; }
.as-g { border: 1px solid #ececee; border-radius: 10px; overflow: hidden; }
.as-gh { display: flex; align-items: center; gap: 4px; padding: 9px 12px; background: #fafafa; border-bottom: 1px solid #f0f0f1; }
.as-p { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid #f4f4f5; font-size: 13.5px; }
.as-p:last-child { border-bottom: 0; }
.ap-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f0f0f1; }
.ml-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid #f4f4f5; } .ml-row.old { opacity: .7; }
.prow .btn.sm { flex: none; }
.as-g, .ap-row { flex: none; }

/* Seitenleiste mit Hauptkategorien */
@media (min-width: 1000px) {
  .side.side-tree { gap: 20px; padding: 22px 12px 14px; overscroll-behavior: contain; }
  .sn { display: flex; flex-direction: column; gap: 2px; }
  .sn .lu { display: inline-flex; flex: none; }
  .sn .lu svg { display: block; }
  .sn-top, .sn-h { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px !important; padding: 6px 10px; border: 0; border-radius: 8px; background: none; color: #3f3f46; font: inherit; font-size: 14px; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer; transition: background .15s, color .15s; }
  .sn-top .lu, .sn-h .lu { color: #6b6b74; transition: color .15s; }
  .sn-top:hover, .sn-h:hover { background: #f4f4f5; }
  .sn-top.on { background: #fdeeee; color: #be1e2d; font-weight: 600; }
  .sn-top.on .lu { color: #be1e2d; }
  .sn-l { flex: 1; min-width: 0; line-height: 1.25; overflow-wrap: anywhere; }
  .sn-chev { margin-left: auto; display: inline-flex; transition: transform .2s ease; }
  .sn-g.open .sn-chev { transform: rotate(90deg); }
  .sn-g.act > .sn-h { background: #be1e2d; color: #fff; font-weight: 600; }
  .sn-g.act > .sn-h .lu { color: #fff; }
  .sn-g.act > .sn-h:hover { background: #a91a28; }
  .sn-sub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .22s ease; }
  .sn-g.open .sn-sub { grid-template-rows: 1fr; }
  .sn-in { overflow: hidden; display: flex; flex-direction: column; gap: 2px; margin-left: 19px; padding-left: 8px; border-left: 1px solid #e4e4e7; }
  .sn-g.open .sn-in { padding-top: 4px; padding-bottom: 6px; }
  .side .sn-i { position: relative; display: flex; align-items: center; gap: 8px; min-height: 36px !important; padding: 6px 10px 6px 12px; border-radius: 6px; color: #52525b; font-size: 14px; font-weight: 500; text-decoration: none; transition: background .15s, color .15s; }
  .side .sn-i:hover { background: #f4f4f5; color: #27272a; }
  .side .sn-i.on { background: #fdeeee; color: #be1e2d; font-weight: 600; }
  .side .sn-i.on::before { content: ''; position: absolute; left: 5px; top: 9px; bottom: 9px; width: 3px; border-radius: 2px; background: #be1e2d; }
  .side .sn-i.on .sn-l { padding-left: 6px; }
  .side .sn-i.soon { color: #a1a1aa; }
  .sn-soon { font-size: 11px; font-weight: 600; color: #8a8a93; background: #f4f4f5; border-radius: 6px; padding: 2px 6px; }
  .sn-b, .sn-sum { display: none; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; box-sizing: border-box; border-radius: 10px; background: #be1e2d; color: #fff; font-size: 11px; font-weight: 700; }
  .sn-g.act > .sn-h .sn-sum { background: #fff; color: #be1e2d; }
  .sn-me { padding: 12px 10px 4px !important; border-radius: 0 !important; }
  .sn-me .lu { color: #8a8a93; display: inline-flex; }
  .sn-me .av { width: 38px; height: 38px; }
}
.soon-ic { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: #fdeeee; color: #be1e2d; }

/* Briefgenerator */
.lt-grid { display: grid; grid-template-columns: minmax(320px, 440px) 1fr; gap: 16px; align-items: start; }
.lt-form { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.lt-pv { position: sticky; top: 92px; min-width: 0; }
@media (max-width: 1100px) { .lt-grid { grid-template-columns: 1fr; } .lt-pv { position: static; } }
.lt-row { display: grid; grid-template-columns: auto 1fr 1.3fr auto auto auto; gap: 4px; align-items: center; }
.lt-foot-grid { display: grid; grid-template-columns: 1fr; gap: 14px; min-width: 0; }
.lt-fg { display: flex; flex-direction: column; gap: 6px; }
.lt-ff { display: grid; grid-template-columns: auto 120px minmax(0, 1fr); gap: 6px; align-items: center; font-size: 13px; }
.lt-fn { color: #3f3f46; }
.in.sm { height: 34px; font-size: 13px; padding: 0 8px; }
.in.sm:disabled { opacity: .45; }
.lt-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.lt-chip { font-size: 12px; background: #f4f4f5; border-radius: 6px; padding: 3px 6px; font-family: ui-monospace, monospace; }
.lt-chip .muted { font-family: Inter, sans-serif; }
.lt-det summary { cursor: pointer; }
.lt-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.lt-card { gap: 8px; text-decoration: none; color: inherit; }
.ltp-box { width: 100%; display: flex; flex-direction: column; gap: 14px; }
.ltp-sheet { position: relative; width: 100%; overflow: hidden; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 6px 20px rgba(0,0,0,.06); background: #fff; }
.ltp-box.mini .ltp-sheet { box-shadow: none; border: 1px solid #e4e4e7; }
.ltp-meta { font-size: 7.5pt; color: #6b6b74; margin-top: auto; }
.ltp .ltp-fhead { height: auto; align-items: flex-end; }
.ltp-pno { position: absolute; right: 20mm; font-size: 7.5pt; color: #6b6b74; }
.logo-prev { border: 1px dashed #d4d4d8; border-radius: 8px; padding: 14px; display: flex; justify-content: center; background: #fff; }
.logo-prev img { max-height: 70px; max-width: 100%; }
.ltp { position: absolute; left: 0; top: 0; width: 210mm; height: 297mm; transform-origin: 0 0; background: #fff; color: #1f1f23; font-family: Arial, Helvetica, 'Liberation Sans', sans-serif; line-height: 1.45; overflow: hidden; }
.ltp * { box-sizing: border-box; }
.ltp-strip { position: absolute; left: 0; top: 0; bottom: 0; width: 6mm; background: #be1e2d; }
.ltp-head { position: absolute; left: 25mm; right: 20mm; top: 13mm; height: 26mm; display: flex; justify-content: space-between; align-items: flex-start; gap: 6mm; }
.ltp-mitte .ltp-head { flex-direction: column; align-items: center; justify-content: flex-start; gap: 2mm; left: 20mm; }
.ltp-logo { display: block; max-width: 90mm; object-fit: contain; }
.ltp-tag { font-size: 8pt; color: #6b6b74; line-height: 1.5; text-align: right; }
.ltp-links .ltp-tag { text-align: right; margin-top: auto; }
.ltp-rechts .ltp-tag { text-align: left; margin-top: auto; }
.ltp-mitte .ltp-tag { text-align: center; letter-spacing: .06em; font-size: 7.5pt; }
.ltp-line { position: absolute; left: 25mm; right: 20mm; top: 39mm; border-top: .5mm solid #be1e2d; }
.ltp-fold { position: absolute; left: 0; width: 5mm; border-top: .3mm solid #9a9aa2; }
.ltp-hole { width: 7mm; }
.ltp-addr { position: absolute; left: 25mm; top: 45mm; width: 85mm; height: 45mm; }
.ltp-ret { font-size: 7pt; color: #6b6b74; height: 17.7mm; padding-top: 11mm; white-space: nowrap; }
.ltp-rcpt { padding-top: 2mm; font-size: 10.5pt; line-height: 1.4; }
.ltp-info { position: absolute; left: 125mm; top: 50mm; width: 65mm; font-size: 8pt; line-height: 1.55; }
.ltp-info table { border-collapse: collapse; }
.ltp-info td { padding: 0; vertical-align: top; white-space: nowrap; }
.ltp-info td:first-child { color: #6b6b74; padding-right: 3mm; }
.ltp-body { position: absolute; left: 25mm; right: 20mm; top: 98.5mm; bottom: 30mm; overflow: hidden; }
.ltp-body > :last-child { margin-bottom: 0; }
.ltp-subj { font-weight: 700; font-size: 1.05em; margin-bottom: 8mm; }
.ltp-body p { margin: 0 0 4.2mm; }
.ltp-sign { margin-top: 6mm; }
.ltp-sn { margin-top: 12mm; font-weight: 600; }
.ltp-role { font-size: .86em; color: #6b6b74; }
.ltp-att { margin-top: 6mm; font-size: .86em; }
.ltp-foot { position: absolute; left: 25mm; right: 20mm; bottom: 8mm; padding-top: 2.5mm; border-top: .25mm solid #d4d4d8; display: grid; gap: 4mm; font-size: 7pt; line-height: 1.5; color: #55555c; justify-content: space-between; }
.ltp-foot b { color: #1f1f23; }
.ltp-foot > div { white-space: nowrap; }
.ltp-foot.dark { left: 0; right: 0; bottom: 0 !important; padding: 4mm 20mm 0 25mm; border: 0; background: #1f1f23; color: #d4d4d8; }
.ltp-foot.dark b { color: #fff; }
.ltp-fc { display: block; text-align: center; border: 0; }
.ltp-fc .ltp-rule { width: 30mm; margin: 0 auto 1.5mm; border-top: .25mm solid #be1e2d; }
.ltp-fc.dark .ltp-rule { display: none; }
.ltp-miss { color: #be1e2d; background: #fdeeee; border-radius: 1mm; padding: 0 .8mm; font-style: italic; }
.ltp-list { margin: 0 0 4.2mm; }
.ltp-li { display: flex; }
.ltp-bul { width: 6mm; flex: none; text-align: center; }

.lt-table { padding: 0; overflow: hidden; gap: 0; }
.lt-tr { display: grid; grid-template-columns: 120px 90px 1.3fr 1.6fr 1fr 130px 130px; gap: 10px; padding: 10px 14px; border-top: 1px solid #f0f0f2; text-decoration: none; color: inherit; align-items: center; font-size: 14px; }
.lt-tr:hover { background: #fafafa; }
.lt-th { border-top: 0; font-size: 12px; font-weight: 700; color: #6b6b74; background: #fafafa; }
@media (max-width: 1000px) { .lt-tr { grid-template-columns: 1fr auto; } .lt-tr > span:nth-child(n+3):not(:nth-child(6)) { display: none; } .lt-th { display: none; } }
.lt-filter { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 8px; }
@media (max-width: 900px) { .lt-filter { grid-template-columns: 1fr; } }
.lt-res { display: flex; flex-direction: column; border-radius: 8px; overflow: hidden; }
.lt-res:not(:empty) { border: 1px solid #e4e4e7; }
.lt-ri { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 12px; border: 0; border-top: 1px solid #f0f0f2; background: #fff; text-align: left; cursor: pointer; font: inherit; }
.lt-ri:first-child { border-top: 0; }
.lt-ri:hover { background: #fdeeee; }
.lt-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #f4f4f5; border-radius: 8px; padding: 6px 6px 6px 12px; font-size: 13px; }
.lt-tb { display: flex; gap: 4px; flex-wrap: wrap; }
.lt-tb button { height: 32px; min-width: 34px; padding: 0 10px; border: 1px solid #e4e4e7; background: #fff; border-radius: 6px; cursor: pointer; font: inherit; font-size: 13px; }
.lt-tb button:hover { background: #f4f4f5; }
.lt-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.lt-pdf { width: 100%; height: calc(100vh - 140px); min-height: 600px; border: 1px solid #e4e4e7; border-radius: 6px; background: #fff; }
button.lt-chip { border: 0; cursor: pointer; }
.ltp-empty{color:#9aa0a6;font-style:italic}

/* Abrechnung als eine Liste */
.pay2-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.pay2-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; background: #fff; border: 1px solid #e4e4e7; border-radius: 14px; padding: 10px 12px; font: inherit; color: #3f3f46; cursor: pointer; text-align: left; }
.pay2-tile b { font-size: 22px; line-height: 1.1; color: #111; }
.pay2-tile span { font-size: 12px; font-weight: 600; }
.pay2-tile.t-klaeren b { color: #b45309; }
.pay2-tile.t-fertig b, .pay2-tile.t-lexware b { color: #1d6b3a; }
.pay2-tile.on { border-color: #be1e2d; box-shadow: 0 0 0 2px #fdeeee; }
.pay2-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 8px; align-items: center; padding: 12px 0; border-bottom: 1px solid #f0f0f1; }
.pay2-row:last-child { border-bottom: 0; }
.pay2-main { min-width: 0; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 3px; }
.pay2-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pay2-warn { color: #9a5b00; }
.pay2-num { display: flex; flex-direction: column; align-items: flex-end; flex: none; font-variant-numeric: tabular-nums; }
.pay2-num span { font-size: 12px; color: var(--muted); }
.pay2-tail { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pay2-tail .pay2-lex { margin-left: auto; }
.pay2-lex { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.pay2-lex input { width: 20px; height: 20px; accent-color: #be1e2d; }
@media (max-width: 640px) {
  .pay2-tiles { gap: 6px; }
  .pay2-tile { padding: 8px 10px; border-radius: 12px; }
  .pay2-tile b { font-size: 20px; }
}

.pay2-row.m-zeile { grid-template-columns: minmax(0, 1fr) auto auto; }
.pay2-right { display: flex; align-items: center; gap: 8px; }
.pay2-kinds { display: grid; grid-template-columns: repeat(4, 64px); gap: 6px; }
.pay2-k { display: flex; flex-direction: column; align-items: flex-end; background: #f6f6f7; border-radius: 8px; padding: 4px 8px; font-variant-numeric: tabular-nums; }
.pay2-k span { font-size: 11px; color: var(--muted); font-weight: 600; }
.pay2-k b { font-size: 14px; }
.pay2-k.zero b { color: #b4b4bb; font-weight: 500; }
.pay2-det { grid-column: 1 / -1; background: #f9f9fa; border-radius: 10px; padding: 4px 12px; }
.pay2-det .t td, .pay2-det .t th { padding: 6px 4px; }
.pay2-tog { width: 36px; height: 36px; border-radius: 10px; border: 1px solid #e4e4e7; background: #fff; font-size: 18px; line-height: 1; cursor: pointer; color: #3f3f46; transition: transform .15s; }
.pay2-tog.open { transform: rotate(180deg); }
.pay2-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.pay2-namebtn { white-space: nowrap; }
@media (max-width: 640px) {
  .pay2-row.m-zeile { grid-template-columns: minmax(0, 1fr) auto; }
  .pay2-row.m-zeile .pay2-kinds { grid-column: 1 / -1; grid-row: 2; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pay2-tile span { font-size: 11px; line-height: 1.2; }
  .pay2-search { grid-template-columns: 1fr; }
}
.pay2-btns { display: flex; gap: 8px; }
@media (max-width: 640px) { .pay2-btns .btn { flex: 1; padding-left: 8px; padding-right: 8px; font-size: 14px; } }

.pay2-kinds.wide { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pay2-kinds.wide .pay2-k { align-items: flex-start; padding: 6px 10px; }
.pay2-kinds.sm .pay2-k { padding: 3px 8px; }
.pay2-kinds.sm .pay2-k b { font-size: 13px; }
.pay2-shift { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-bottom: 1px solid #f0f0f1; }
.pay2-shift:last-child { border-bottom: 0; }
.pay2-shift.bad { background: #fff8e1; margin: 0 -14px; padding: 12px 14px; }
.pay2-times { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pay2-times div { display: flex; flex-direction: column; }
.pay2-times span { font-size: 11px; color: var(--muted); font-weight: 600; }
.pay2-times b { font-size: 13px; font-variant-numeric: tabular-nums; }
.pay2-times .fix b { color: #1f4f99; }
.pay2-shift .btn { white-space: nowrap; flex: none; }
@media (max-width: 640px) { .pay2-kinds.wide .pay2-k { padding: 5px 7px; } .pay2-kinds.wide .pay2-k b { font-size: 13px; white-space: nowrap; } }

.pay2-full { color: #c41b1b; font-weight: 700; }
.pay2-dgrid { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 16px; align-items: start; }
.pay2-dside { position: sticky; top: 70px; }
.pay2-dside .pay2-kinds.wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pay2-dside .pay2-tail { flex-direction: column; align-items: stretch; }
.pay2-dside .pay2-tail .btn { width: 100%; justify-content: center; }
.pay2-dside .pay2-tail .pay2-lex { margin-left: 0; }

.pay2 .nowrap { white-space: nowrap; }
@media (min-width: 900px) {
  .pay2 > .card .pay2-tail .btn { flex: none; }
}

.pay2-tile.t-versendet b { color: #1d6b3a; }
@media (max-width: 640px) { .pay2-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.pay2-move{color:#1f4f99}
tr.pay2-move td{color:#1f4f99}
.pay2-sum{display:flex;flex-direction:column;gap:10px;padding:12px 0 8px;border-top:2px solid #18181b;margin-top:4px}
.pay2-sumrow{display:flex;flex-direction:column;gap:6px}
.pay2-sumrow.strong>div:first-child{font-weight:700}
.pay2-sumrow:not(.strong)>div:first-child{color:#1f4f99}

/* ================= E-Mail ================= */
.mail { display: flex; flex-direction: column; gap: 0; }
.mail-list { display: flex; flex-direction: column; gap: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ml-head { display: flex; flex-direction: column; gap: 10px; padding: 14px 14px 10px; border-bottom: 1px solid var(--line); background: #fff; }
.ml-head h1 { font-size: 20px; }
.ml-pick { font-weight: 600; }
.ml-flt { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px 2px; }
.ml-flt::-webkit-scrollbar { display: none; }
.pillbtn { flex: none; height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid #d4d4d8; background: #fff; font-size: 13px; font-weight: 500; color: var(--ink2); cursor: pointer; white-space: nowrap; }
.pillbtn.on { background: #18181b; border-color: #18181b; color: #fff; }
.ml-items { display: flex; flex-direction: column; }
.ml-it { display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line2); text-decoration: none; color: inherit; background: #fff; align-items: flex-start; }
.ml-it:hover { background: #fafafa; }
.ml-it.sel { background: #fdf2f2; box-shadow: inset 3px 0 0 var(--red); }
.ml-dot { flex: none; width: 8px; height: 8px; border-radius: 4px; margin-top: 7px; background: transparent; }
.ml-it.unread .ml-dot { background: var(--red); }
.ml-from { font-size: 14px; display: block; }
.ml-it.unread .ml-from, .ml-it.unread .ml-subj { font-weight: 700; }
.ml-subj { display: block; font-size: 14px; margin-top: 1px; }
.ml-snip { display: block; font-size: 13px; color: var(--muted); margin-top: 1px; }
.ml-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.ml-tags:empty { display: none; }
.ml-empty { padding: 36px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.ml-foot { padding: 10px; }
.ml-foot:empty { display: none; }
.mlk { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 5px; text-decoration: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mlk.sm { font-size: 11.5px; padding: 1px 7px; }
.mlk-c { background: #fdeeee; color: #9b1515; }
.mlk-u { background: #eef2fb; color: #1f4f99; }
.mlk-a { background: #fff4cc; color: #8a5300; }
.mtag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 5px; background: var(--grey-soft); color: var(--ink2); }
.mtag.due { background: var(--amber-soft); color: var(--amber); }
.mtag.mi { padding: 1px 4px; background: transparent; color: var(--muted); }
.mtag svg, .ml-it .lu svg { width: auto; height: auto; }
.mtag.flag { color: var(--red); }
.fab { position: fixed; right: 16px; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 11; height: 52px; padding: 0 18px; border: 0; border-radius: 26px; background: var(--red); color: #fff; font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 6px 16px rgba(0,0,0,.18); cursor: pointer; }
.act-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 8px 6px; border: 0; border-bottom: 1px solid var(--line2); background: transparent; text-align: left; font-size: 15px; cursor: pointer; color: var(--ink); }
.act-row:last-child { border-bottom: 0; }
.act-row:hover { background: #fafafa; }

/* Mail lesen */
.mail-read, .mail-page .mr-page { background: #fff; }
.mr-bar { display: flex; gap: 6px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fff; }
.mail.wide .mr-bar { position: sticky; top: 0; z-index: 2; }
.mr { padding: 18px 20px 28px; display: flex; flex-direction: column; gap: 14px; max-width: 900px; }
.mr-subj { font-size: 21px; line-height: 1.3; margin: 0; }
.mr-info { display: flex; flex-direction: column; gap: 8px; }
.mr-info:empty { display: none; }
.mr-link { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: #fdf2f2; font-size: 14px; color: var(--ink); text-align: left; border: 0; width: 100%; }
.mr-link a { color: var(--red); text-decoration: none; }
.mr-link.none { background: var(--grey-soft); cursor: pointer; }
.mr-link.none .strong { color: var(--red); }
.mr-note { text-align: left; border: 0; cursor: pointer; width: 100%; }
.mr-frame { width: 100%; border: 0; min-height: 120px; display: block; background: #fff; }
.mr-text { font-size: 14.5px; line-height: 1.6; overflow-wrap: anywhere; }
.mr-q { margin: 6px 0; padding-left: 10px; border-left: 2px solid #d4d4d8; color: var(--muted); }
.mr-atts, .mr-hist { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; }
.mr-att { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.mr-ext { flex: none; width: 40px; height: 40px; border-radius: 8px; background: var(--grey-soft); display: flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 700; color: var(--ink2); }
.mr-h { display: flex; gap: 10px; justify-content: space-between; font-size: 14px; text-decoration: none; color: var(--ink); padding: 4px 0; }
.mr-h:hover { color: var(--red); }
.mr-empty { height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #a1a1aa; font-size: 14px; }
.mail-page { display: flex; flex-direction: column; gap: 10px; }
.mail-page .mr-page { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; padding-bottom: 70px; }
.mail-page .mr-bar { position: fixed; left: 0; right: 0; bottom: calc(62px + env(safe-area-inset-bottom)); top: auto; z-index: 9; border-top: 1px solid var(--line); border-bottom: 0; flex-wrap: nowrap; overflow-x: auto; padding: 8px 10px; box-shadow: 0 -4px 12px rgba(0,0,0,.04); }
.mail-page .mr-bar .btn { flex: none; }
.mail-page .mr { padding: 16px 14px 20px; }
@media (max-width: 879px) { .mail-page .mr-bar .mr-bl { display: none; } .mail-page .mr-bar .btn.primary .mr-bl { display: inline; } }
.wv-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wv-o { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border: 1px solid #d4d4d8; border-radius: 10px; background: #fff; cursor: pointer; text-align: left; }
.wv-o.on { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); background: #fdf6f6; }

/* PC: drei Spalten */
@media (min-width: 1100px) {
  .main:has(.mail.wide) { padding: 0 !important; gap: 0; }
  .mail.wide { flex-direction: row; height: calc(100dvh - var(--toph, 56px)); overflow: hidden; }
  .mail.wide .mail-boxes { flex: 0 0 236px; display: flex; flex-direction: column; gap: 2px; padding: 20px 12px; border-right: 1px solid var(--line); background: #fafafa; overflow-y: auto; }
  .mail.wide .mail-boxes > .btn { margin-bottom: 14px; }
  .mail.wide .mail-list { flex: 0 0 400px; border: 0; border-right: 1px solid var(--line); border-radius: 0; overflow-y: auto; }
  .mail.wide .mail-read { flex: 1 1 auto; min-width: 0; overflow-y: auto; }
  .mail.wide .ml-head { padding: 20px 16px 12px; position: sticky; top: 0; z-index: 2; }
}
.mb-acc { display: flex; gap: 6px; align-items: center; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #8a8a93; padding: 14px 10px 4px; }
.mb-err { width: 18px; height: 18px; border-radius: 9px; background: var(--red); color: #fff; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; text-transform: none; }
.mb-f { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; font-size: 14px; color: var(--ink2); cursor: pointer; text-align: left; width: 100%; }
.mb-f:hover { background: #f1f1f3; }
.mb-f.on { background: #fdeeee; color: #b51a1a; font-weight: 600; }
.mb-n { font-size: 12px; font-weight: 700; color: var(--ink2); }
.mb-f.on .mb-n { color: #b51a1a; }
.mb-set { display: flex; align-items: center; gap: 6px; margin-top: auto; padding: 16px 10px 0; color: var(--muted); text-decoration: none; }

/* Schreiben */
.mc-wrap { z-index: 60; }
/* Auswahlfenster aus dem Schreibfenster heraus liegen darüber */
body:has(.mc) .sheet-wrap:not(.mc-wrap) { z-index: 70; }
.mc { position: fixed; inset: 0; background: #fff; display: flex; flex-direction: column; z-index: 61; padding-top: env(safe-area-inset-top); }
@media (min-width: 880px) { .mc { inset: auto; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(860px, calc(100vw - 48px)); height: min(820px, calc(100vh - 48px)); border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.25); overflow: hidden; } }
.mc-top { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.mc-top .btn.ghost { font-size: 22px; width: 40px; padding: 0; }
.mc-row { display: flex; align-items: center; gap: 8px; padding: 4px 14px; border-bottom: 1px solid var(--line2); min-height: 46px; }
.mc-row > .ma-field { flex: 1; border: 0; padding: 0; }
.ma-field { position: relative; display: flex; align-items: center; gap: 8px; padding: 4px 14px; border-bottom: 1px solid var(--line2); min-height: 46px; flex-wrap: nowrap; }
.ma-l { flex: none; width: 34px; font-size: 14px; color: var(--muted); }
.ma-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex: 1; min-width: 0; padding: 4px 0; }
.ma-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 3px 4px 3px 10px; border-radius: 14px; background: var(--grey-soft); font-size: 13.5px; }
.ma-chip.busy { opacity: .6; }
.ma-chip button { width: 24px; height: 24px; border: 0; background: transparent; font-size: 16px; color: var(--muted); cursor: pointer; border-radius: 12px; }
.ma-in { flex: 1; min-width: 140px; border: 0; outline: 0; font-size: 15px; padding: 6px 0; background: transparent; }
.ma-sug { position: absolute; left: 48px; right: 14px; top: 100%; z-index: 5; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 24px rgba(0,0,0,.12); max-height: 280px; overflow-y: auto; }
.ma-sug:empty { display: none; }
.ma-s { display: block; width: 100%; text-align: left; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line2); background: #fff; cursor: pointer; font-size: 14px; }
.ma-s:hover { background: #fafafa; }
.mc-from { flex: 1; border: 0; background: transparent; font-size: 15px; padding: 8px 0; min-width: 0; }
.mc-subj { flex: 1; border: 0; outline: 0; font-size: 16px; font-weight: 600; padding: 10px 0; min-width: 0; }
.mc-text { flex: 1; border: 0; outline: 0; resize: none; padding: 14px; font-size: 15px; line-height: 1.55; min-height: 180px; }
.mc-atts { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px; }
.mc-atts:empty { display: none; }
.mc-atts:not(:empty) { padding: 8px 14px; border-top: 1px solid var(--line2); }
.mc-tools { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fafafa; }
.ma-field .ma-l { align-self: flex-start; padding-top: 11px; }
.mc-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
.mc-body .mc-text { flex: none; overflow: hidden; }
.mc-sigrow { padding: 0 14px 6px; }
.mc-sigsel { border: 1px solid var(--line); border-radius: 8px; background: #fafafa; font-size: 13px; padding: 5px 8px; color: var(--ink2); max-width: 100%; }
.mc-sig { border: 0; width: calc(100% - 28px); margin: 0 14px 10px; min-height: 120px; display: block; flex: none; }
.mc-quote { margin: 4px 14px 14px; border-top: 1px solid var(--line2); padding-top: 8px; }
.mc-quote summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); padding: 4px 0; }
.mc-quote-t { font-size: 13.5px; line-height: 1.5; color: var(--ink2); padding-top: 6px; overflow-wrap: anywhere; }

/* Dokumente und Einsatzakte */
.docs { display: flex; flex-direction: column; gap: 10px; }
.docs-crumb { font-size: 13.5px; color: var(--muted); padding: 0 2px; }
.docs-crumb a { color: var(--muted); text-decoration: none; font-weight: 600; }
.docs-crumb strong { color: var(--ink); }
.docs-sec { font-size: 12px; font-weight: 700; letter-spacing: .4px; color: var(--muted); text-transform: uppercase; margin: 6px 4px -2px; }
.docs-list { padding-top: 2px; padding-bottom: 2px; gap: 0; }
.docs-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 0; border: 0; border-bottom: 1px solid var(--line2); background: transparent; text-align: left; cursor: pointer; color: inherit; font: inherit; }
.docs-row:last-child { border-bottom: 0; }
div.docs-row { cursor: default; }
.docs-row .grow, .docs-chk .grow, .docs-shift .grow { display: flex; flex-direction: column; gap: 1px; }
.docs-t { display: block; overflow: hidden; text-overflow: ellipsis; }
.docs-ic { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: none; background: #fff4d6; color: #c98a00; }
.docs-ic.year { background: #fff4d6; color: #c98a00; }
.docs-ic.ev { background: var(--red-soft); color: var(--red); }
.docs-ic.file { background: var(--red-soft); color: var(--red); }
.docs-ic.file.xls { background: #e3f4ea; color: #1d7a45; }
.docs-ic.file.doc { background: #e5eefb; color: #2a5fb0; }
.docs-chev { color: #b4b4bb; font-size: 20px; flex: none; }
.docs-checks { padding-top: 2px; padding-bottom: 2px; }
.docs-chk { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 0; border: 0; border-bottom: 1px solid var(--line2); background: transparent; text-align: left; cursor: pointer; color: inherit; font: inherit; }
.docs-chk:last-child { border-bottom: 0; }
.docs-dot { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; flex: none; }
.docs-dot.ok { background: var(--green-soft); color: var(--green); }
.docs-dot.no { background: var(--amber-soft); color: var(--amber); }
.docs-dot.na { background: #f1f1f3; color: #9a9aa2; }
.docs-shift { flex-direction: row; align-items: center; gap: 12px; padding: 11px 14px; text-decoration: none; color: inherit; cursor: pointer; font: inherit; text-align: left; width: 100%; }
.docs-shift > .lu { color: #c98a00; display: inline-flex; }
.docs-set > .lu { color: var(--muted); }
.docs-sw { width: 46px; height: 28px; border-radius: 14px; border: 0; background: #cfd3da; position: relative; flex: none; cursor: pointer; transition: background .15s; }
.docs-sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .15s; }
.docs-sw.on { background: #1f9d55; }
.docs-sw.on::after { left: 21px; }
.docs-cfg { display: flex; flex-direction: column; gap: 8px; }
.docs-cfg-head { display: flex; align-items: center; gap: 12px; }
.docs-cfg-head .grow { display: flex; flex-direction: column; gap: 2px; }
.docs-cfg-row { display: flex; gap: 6px; align-items: center; }
.docs-cfg-row .in:first-child { flex: 1; min-width: 0; }
.docs-cfg-row .docs-rh { width: 124px; flex: none; padding-left: 10px; padding-right: 6px; }
.docs-cfg-row .in:first-child { padding-left: 10px; padding-right: 8px; }
.docs-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.docs-chips .pill { border: 0; cursor: pointer; padding: 7px 11px; font-size: 13px; }
.docs-chips .pill.on { background: var(--red); color: #fff; }
.docs-pick { display: flex; flex-direction: column; gap: 6px; }
.docs-opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.docs-opt .grow { display: flex; flex-direction: column; min-width: 0; }
.docs-opt.on { border-color: var(--red); box-shadow: 0 0 0 1px var(--red) inset; background: #fdf6f6; }
.mtag.ok { background: var(--green-soft); color: var(--green); }
