:root {
  --bg: #f4f4f6;
  --panel: #ffffff;
  --panel-2: #fafafb;
  --line: #e4e4e9;
  --line-2: #d4d4db;
  --text: #0d1b33;
  --muted: #6b6b76;
  --faint: #9a9aa4;
  --accent: #005cfb;
  --accent-2: #0047c4;
  --accent-soft: #e6efff;
  --on-accent: #fff;
  --ok: #1f7a4d;
  --ok-soft: #e4f4ec;
  --warn: #9a5b00;
  --warn-soft: #fbf0dc;
  --bad: #b42318;
  --bad-soft: #fdeceb;
  --info: #2557a7;
  --info-soft: #e7eefa;
  --radius: 10px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --shadow: 0 1px 2px rgba(16, 16, 24, 0.05), 0 4px 16px rgba(16, 16, 24, 0.04);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0f0f12;
    --panel: #17171b;
    --panel-2: #1c1c21;
    --line: #2a2a31;
    --line-2: #383841;
    --text: #ececf1;
    --muted: #a0a0ab;
    --faint: #6f6f7a;
    --accent: #4d8dff;
    --accent-2: #6fa3ff;
    --accent-soft: #14234a;
    --ok: #4cc38a;
    --ok-soft: #13291f;
    --warn: #e0a84a;
    --warn-soft: #2e2413;
    --bad: #f0706a;
    --bad-soft: #351816;
    --info: #7aa5ec;
    --info-soft: #172338;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #0f0f12;
  --panel: #17171b;
  --panel-2: #1c1c21;
  --line: #2a2a31;
  --line-2: #383841;
  --text: #ececf1;
  --muted: #a0a0ab;
  --faint: #6f6f7a;
  --accent: #4d8dff;
  --accent-2: #6fa3ff;
  --accent-soft: #14234a;
  --ok: #4cc38a;
  --ok-soft: #13291f;
  --warn: #e0a84a;
  --warn-soft: #2e2413;
  --bad: #f0706a;
  --bad-soft: #351816;
  --info: #7aa5ec;
  --info-soft: #172338;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
}
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
h1 {
  font-size: 22px;
  margin: 0;
  letter-spacing: -0.01em;
}
h2 {
  font-size: 16px;
  margin: 0 0 12px;
}
h3 {
  font-size: 14px;
  margin: 0 0 8px;
}
.muted {
  color: var(--muted);
}
.faint {
  color: var(--faint);
}
.small {
  font-size: 12px;
}
.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.hidden {
  display: none !important;
}

/* Layout */
.app {
  display: grid;
  grid-template-columns: 232px 1fr;
  min-height: 100vh;
}
.side {
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 18px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 18px;
}
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--on-accent);
  display: grid;
  place-items: center;
  font-weight: 700;
}
.brand-name {
  font-weight: 650;
  line-height: 1.15;
}
.brand-sub {
  font-size: 11px;
  color: var(--muted);
}
.logo {
  display: block;
  height: 28px;
  width: auto;
}
.logo.lg {
  height: 44px;
}
.logo.dark {
  display: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .logo.light {
    display: none;
  }
  :root:not([data-theme='light']) .logo.dark {
    display: block;
  }
}
:root[data-theme='dark'] .logo.light {
  display: none;
}
:root[data-theme='dark'] .logo.dark {
  display: block;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 500;
}
.nav a:hover {
  background: var(--panel-2);
  text-decoration: none;
}
.nav a.active {
  background: var(--accent-soft);
  color: var(--accent);
}
.nav svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.side-foot {
  margin-top: auto;
  padding: 10px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.main {
  min-width: 0;
}
.top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  position: sticky;
  top: 0;
  z-index: 5;
}
.top .spacer {
  flex: 1;
}
.content {
  padding: 24px 28px 60px;
  max-width: 1400px;
}
.page-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.page-head .spacer {
  flex: 1;
}
.menu-btn {
  display: none;
}

/* Elemente */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.grid {
  display: grid;
  gap: 16px;
}
/* Editor-Spalten */
.split {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
}
.split3 {
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
}
.g2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.g3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.g4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.kpi .label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.kpi .value {
  font-size: 22px;
  font-weight: 650;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.kpi .sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-weight: 550;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover {
  background: var(--panel-2);
  text-decoration: none;
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.btn.primary:hover {
  background: var(--accent-2);
}
.btn.danger {
  color: var(--bad);
}
.btn.ghost {
  border-color: transparent;
  background: transparent;
}
.btn.sm {
  height: 28px;
  padding: 0 10px;
  font-size: 13px;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn svg {
  width: 16px;
  height: 16px;
}
/* Inline-Icons (icon('name')) in Text, Überschriften und Badges.
   Konvention: `${icon('mail')} Text` (Leerzeichen = Abstand). Kontexte wie .btn svg / .nav svg legen eigene Größen fest. */
.ic {
  width: 1.05em;
  height: 1.05em;
  vertical-align: -0.17em;
  flex: none;
  display: inline-block;
  overflow: visible;
  pointer-events: none;
}
.ic.lg {
  width: 1.3em;
  height: 1.3em;
  vertical-align: -0.28em;
}
.ic.ok {
  color: var(--ok);
}
.ic.warn {
  color: var(--warn);
}
.ic.bad {
  color: var(--bad);
}
.ic.info {
  color: var(--info);
}
.ic.accent {
  color: var(--accent);
}
.ic.muted {
  color: var(--muted);
}
.badge .ic {
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
}
.badge > .ic:first-child {
  margin-right: 0.3em;
} /* inline-flex verschluckt das Leerzeichen nach dem Symbol */
.btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

input,
select,
textarea {
  font: inherit;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  width: 100%;
  min-height: 34px;
}
textarea {
  resize: vertical;
  min-height: 64px;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent);
  outline-offset: 0;
  border-color: var(--accent);
}
input[type='checkbox'],
input[type='radio'] {
  width: auto;
  min-height: 0;
  padding: 0;
}
label.f {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 550;
  color: var(--muted);
}
label.chk {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 500;
  color: var(--text);
}
.form {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.form .full {
  grid-column: 1 / -1;
}
.search {
  max-width: 320px;
}

table.t {
  width: 100%;
  border-collapse: collapse;
}
.t th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.t td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.t tr.click {
  cursor: pointer;
}
.t tr.click:hover td {
  background: var(--panel-2);
}
.t tr:last-child td {
  border-bottom: 0;
}
.table-wrap {
  overflow-x: auto;
}
.empty {
  padding: 36px;
  text-align: center;
  color: var(--muted);
}
/* Leerer Zustand mit Symbol, Titel, Text und optionalen Aktionen */
.empty-state {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
}
.empty-state > .ic {
  width: 36px;
  height: 36px;
  color: var(--faint);
  margin-bottom: 4px;
}
.empty-state > b {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}
.empty-state > p {
  margin: 0;
  max-width: 520px;
}
.empty-state > .btn-row {
  margin-top: 10px;
  justify-content: center;
}
/* Kurzer Hinweis direkt unter einer Überschrift */
.title-note {
  margin-top: -6px !important;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 550;
  background: var(--panel-2);
  color: var(--muted);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.badge.ok {
  background: var(--ok-soft);
  color: var(--ok);
  border-color: transparent;
}
.badge.warn {
  background: var(--warn-soft);
  color: var(--warn);
  border-color: transparent;
}
.badge.bad {
  background: var(--bad-soft);
  color: var(--bad);
  border-color: transparent;
}
.badge.info {
  background: var(--info-soft);
  color: var(--info);
  border-color: transparent;
}
.badge.accent {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: transparent;
}

.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
  overflow-x: auto;
}
.tabs button {
  background: none;
  border: 0;
  padding: 10px 14px;
  font: inherit;
  font-weight: 550;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.tabs button.active {
  color: var(--accent);
  border-color: var(--accent);
}

.dl {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 6px 12px;
  margin: 0;
}
.dl dt {
  color: var(--muted);
}
.dl dd {
  margin: 0;
}

/* Modal & Toast */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 14, 0.45);
  display: grid;
  place-items: center;
  z-index: 50;
  padding: 16px;
}
.modal {
  background: var(--panel);
  border-radius: 14px;
  width: min(640px, 100%);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.modal.wide {
  width: min(980px, 100%);
}
.modal header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal header h2 {
  margin: 0;
  flex: 1;
}
.modal .body {
  padding: 18px 20px;
  overflow: auto;
}
.modal footer {
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.toasts {
  position: fixed;
  right: 20px;
  bottom: 84px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 60;
}
.toast {
  background: var(--text);
  color: var(--bg);
  padding: 10px 14px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 380px;
}
.toast.bad {
  background: var(--bad);
  color: #fff;
}
.toast.good {
  background: #15803d;
  color: #fff;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.toast.good::before {
  content: '✓';
  font-weight: 700;
}

/* Login */
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background: radial-gradient(1200px 600px at 20% -10%, var(--accent-soft), transparent), var(--bg);
}
.login {
  width: min(400px, 100%);
}
.login .card {
  padding: 28px;
}
.login h1 {
  margin-bottom: 4px;
}
.login form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}
.error {
  color: var(--bad);
  font-size: 13px;
}

/* Belegeditor */
.items td {
  padding: 6px 4px;
  vertical-align: top;
}
.items input,
.items select,
.items textarea {
  min-height: 30px;
  padding: 5px 8px;
}
.items textarea {
  min-height: 32px;
  height: 32px;
}
.items tr.titel textarea {
  font-weight: 650;
}
.items .handle {
  color: var(--faint);
  cursor: grab;
  padding-top: 10px;
  text-align: center;
}
.totals {
  margin-left: auto;
  width: min(380px, 100%);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  margin-top: 12px;
}
.totals .strong {
  font-weight: 700;
  font-size: 15px;
  border-top: 1px solid var(--line);
  padding-top: 6px;
}

/* Kalender */
.cal {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.cal .dh {
  padding: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.cal .day {
  min-height: 112px;
  padding: 6px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  background: var(--panel);
}
.cal .day.other {
  background: var(--panel-2);
  color: var(--faint);
}
.cal .day.today .dn {
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 999px;
}
.cal .dn {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  font-size: 12px;
  font-weight: 600;
  padding: 0 4px;
}
.cal .ev {
  display: block;
  margin-top: 3px;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal .ev.g {
  background: var(--info-soft);
  color: var(--info);
}

/* DMS */
.drop {
  border: 2px dashed var(--line-2);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  color: var(--muted);
}
.drop.over {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.preview {
  width: 100%;
  height: 60vh;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
}
.preview-img {
  max-width: 100%;
  max-height: 60vh;
  display: block;
  margin: 0 auto;
  border-radius: var(--radius-sm);
}

/* Chart */
.bars {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 6px;
  align-items: end;
  height: 160px;
  padding-top: 8px;
}
.bar {
  background: var(--accent);
  border-radius: 4px 4px 0 0;
  min-height: 2px;
  position: relative;
  opacity: 0.85;
}
.bar:hover {
  opacity: 1;
}
.bar-l {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  margin-top: 6px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  cursor: pointer;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--faint);
}
.dot.on {
  background: var(--ok);
}
.dot.off {
  background: var(--warn);
}

.list-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.list-row:last-child {
  border-bottom: 0;
}
.note {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  white-space: pre-wrap;
}

@media (max-width: 1100px) {
  .g4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .g3 {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 820px) {
  .app {
    grid-template-columns: 1fr;
  }
  .side {
    position: fixed;
    z-index: 40;
    left: 0;
    top: 0;
    width: 260px;
    transform: translateX(-100%);
    transition: transform 0.2s;
  }
  .side.open {
    transform: none;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.3);
  }
  .menu-btn {
    display: inline-flex;
  }
  .content {
    padding: 16px;
  }
  .top {
    padding: 10px 16px;
  }
  .g2,
  .g3,
  .g4,
  .form,
  .split,
  .split3 {
    grid-template-columns: minmax(0, 1fr);
  }
  .cal .day {
    min-height: 70px;
  }
  .cal .ev {
    font-size: 10px;
  }
}
@media print {
  .side,
  .top {
    display: none;
  }
  .app {
    display: block;
  }
}

/* ===== Globale Suche ===== */
.gsearch {
  position: relative;
  flex: 3;
  max-width: 520px;
} /* Vorrang vor dem Abstandhalter, damit der Platzhalter nicht abgeschnitten wird */
.gsearch input {
  padding-left: 34px;
  padding-right: 46px;
  background: var(--panel-2);
}
.gs-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--faint);
  display: flex;
}
.gs-icon svg {
  width: 16px;
  height: 16px;
}
.gsearch kbd {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font: 11px var(--font);
  color: var(--faint);
  border: 1px solid var(--line-2);
  border-radius: 5px;
  padding: 1px 5px;
}
.gs-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  max-height: 70vh;
  overflow: auto;
  z-index: 30;
  padding: 6px;
}
.gs-sec {
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--faint);
  padding: 8px 10px 4px;
}
.gs-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: var(--text);
}
.gs-item:hover,
.gs-item.kb {
  background: var(--accent-soft);
  text-decoration: none;
}
.gs-empty {
  padding: 14px;
}
mark {
  background: #ffe58a;
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) mark {
    background: #6b5a12;
  }
}
:root[data-theme='dark'] mark {
  background: #6b5a12;
}

/* ===== Dokumentenmanagement ===== */
.content.wide {
  max-width: none;
  padding-bottom: 16px;
}
.dms {
  display: grid;
  grid-template-columns: 240px minmax(340px, 1fr) minmax(420px, 1.25fr);
  height: calc(100vh - 110px);
  min-height: 520px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.dms.compact {
  grid-template-columns: minmax(320px, 1fr) minmax(400px, 1.3fr);
  height: 72vh;
}
.dms-side {
  border-right: 1px solid var(--line);
  overflow: auto;
  padding: 10px 8px;
  background: var(--panel-2);
}
.side-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--faint);
  padding: 14px 10px 4px;
}
.side-sec.scroll {
  max-height: 34vh;
  overflow: auto;
}
.tree-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  position: relative;
  border: 1px dashed transparent;
}
.tree-item:hover {
  background: var(--panel);
}
.tree-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.tree-item.drop-over {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.ti-icon {
  width: 18px;
  text-align: center;
  flex: none;
}
.ti-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ti-count {
  font-size: 11px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.ti-menu,
.ti-add {
  border: 0;
  background: none;
  color: var(--faint);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 0 4px;
  border-radius: 4px;
}
.ti-menu {
  display: none;
}
.tree-item:hover .ti-menu {
  display: inline;
}
.ti-menu:hover,
.ti-add:hover {
  background: var(--line);
  color: var(--text);
}

.dms-list {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-right: 1px solid var(--line);
  position: relative;
}
.dms-list.file-over::after {
  content: 'Loslassen zum Hochladen';
  position: absolute;
  inset: 8px;
  border: 2px dashed var(--accent);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent-soft) 85%, transparent);
  display: grid;
  place-items: center;
  color: var(--accent);
  font-weight: 650;
  z-index: 5;
}
.dms-bar {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.dms-search {
  position: relative;
  flex: 1;
}
.dms-search svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--faint);
}
.dms-search input {
  padding-left: 32px;
}
.dms-filters {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.dms-filters select,
.dms-filters input {
  min-height: 30px;
  padding: 4px 8px;
  font-size: 13px;
}
.dms-selbar {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 8px 10px;
  background: var(--info-soft);
  color: var(--info);
  font-size: 13px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.dms-selbar .spacer {
  flex: 1;
}
.dms-ocr {
  padding: 6px 12px;
  font-size: 12px;
  background: var(--warn-soft);
  color: var(--warn);
  display: flex;
  gap: 8px;
  align-items: center;
}
.dms-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.dms-rows {
  overflow: auto;
  flex: 1;
  outline: none;
}
.drow {
  display: grid;
  grid-template-columns: 18px 30px 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.drow:hover {
  background: var(--panel-2);
}
.drow.active {
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent);
}
.drow.sel {
  background: var(--info-soft);
}
.drow .dchk {
  margin-top: 3px;
}
.dicon {
  font-size: 20px;
  line-height: 1;
  padding-top: 1px;
}
.dmain {
  min-width: 0;
}
.dname {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dmeta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dproj {
  color: var(--accent);
}
.dsnip {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dside {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-end;
  font-size: 13px;
}
.dside .badge {
  font-size: 11px;
  padding: 1px 6px;
}
.drag-ghost {
  position: fixed;
  top: -100px;
  left: -100px;
  background: var(--accent);
  color: #fff;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.dms-view {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--panel);
}
.dms-empty {
  margin: auto;
  text-align: center;
  color: var(--muted);
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 30px;
}
.dms-empty svg {
  width: 40px;
  height: 40px;
  color: var(--faint);
}
.dv-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.dv-title {
  flex: 1;
  min-width: 0;
}
.dv-close {
  display: none;
}
.dv-tabs {
  margin: 0;
  padding: 0 8px;
}
.dv-tabs button {
  padding: 8px 12px;
  font-size: 13px;
}
.dv-body {
  overflow: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.dv-pane {
  flex: none;
}
.dprev {
  width: 100%;
  height: 46vh;
  border: 0;
  background: var(--panel-2);
  display: block;
}
.dprev.img {
  display: grid;
  place-items: center;
  padding: 10px;
  overflow: auto;
}
.dprev.img img {
  max-width: 100%;
  max-height: 50vh;
  border-radius: var(--radius-xs);
  box-shadow: var(--shadow);
}
.dprev.text {
  margin: 0;
  padding: 14px;
  white-space: pre-wrap;
  font:
    12px/1.5 ui-monospace,
    Menlo,
    monospace;
  overflow: auto;
  height: 52vh;
  color: var(--text);
}
.dprev.none {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  height: 30vh;
}
.dprev.none div:first-child {
  font-size: 32px;
}
.dv-index {
  padding: 14px;
  border-top: 1px solid var(--line);
}
.dv-index-head {
  margin-bottom: 10px;
  display: flex;
  gap: 6px;
  align-items: baseline;
  flex-wrap: wrap;
}
.dv-index .form {
  gap: 8px 12px;
}
.dv-index input,
.dv-index select {
  min-height: 32px;
  padding: 5px 9px;
}
.dv-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 14px;
}
.dv-actions .spacer {
  flex: 1;
}
.f.is-auto input,
.f.is-auto select {
  background: color-mix(in srgb, #ffe58a 35%, var(--panel));
  border-color: #e2c14b;
}
.auto-chip {
  font-size: 10px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: #ffe58a;
  color: #6b5300;
  border-radius: 4px;
  padding: 0 5px;
  margin-left: 6px;
}
.spinner {
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1200px) {
  .dms {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .dms.compact {
    grid-template-columns: 1fr;
  }
  .dms-view {
    position: fixed;
    inset: 0;
    z-index: 45;
    transform: translateX(100%);
    transition: transform 0.2s;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.25);
  }
  .dms-view.open {
    transform: none;
  }
  .dv-close {
    display: inline-flex;
  }
}
@media (max-width: 820px) {
  .dms {
    grid-template-columns: 1fr;
    height: auto;
  }
  .dms-side {
    max-height: 40vh;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .dms-rows {
    max-height: 60vh;
  }
  .gsearch kbd {
    display: none;
  }
}

/* ===== Belegeditor: OZ & Katalog ===== */
.items tr.eventual td {
  background: color-mix(in srgb, var(--warn-soft) 60%, transparent);
}
.oz-input {
  width: 82px !important;
  font-size: 12px;
}
.cat-list {
  max-height: 50vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-top: 10px;
}
.cat-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.cat-row:hover {
  background: var(--accent-soft);
}
.cat-row:last-child {
  border-bottom: 0;
}
.kind-sel {
  min-height: 26px !important;
  padding: 2px 4px !important;
  font-size: 11px;
  width: 82px;
}
.items .oz-input {
  margin-top: 4px;
  min-height: 26px !important;
  padding: 2px 6px !important;
}
.dprev.pdfv {
  overflow: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.pdf-page {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  background: #fff;
  border-radius: 2px;
}
.pdf-info {
  align-self: flex-start;
}

/* ===== PDF-Ansicht, Rechtsprüfung, Positionsbilder, Zeiterfassung ===== */
.modal.pdf-modal-wrap {
  width: min(980px, 100%);
  height: 94vh;
  max-height: 94vh;
}
.pdf-modal-wrap .body {
  padding: 0;
  background: var(--panel-2);
  flex: 1;
}
.pdf-modal {
  height: 100%;
}
.pdf-modal .dprev,
.pdf-modal.dprev {
  height: auto;
}
.pdf-modal > .dms-empty {
  padding: 60px;
}
#pdfModal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 14px;
  overflow: auto;
  height: 100%;
}
.legal-box {
  border: 1px solid var(--line);
  background: var(--panel-2);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: grid;
  gap: 4px;
}
.legal-box.ok {
  color: var(--ok);
  background: var(--ok-soft);
  border-color: transparent;
}
.pos-img {
  display: block;
  max-width: 160px;
  max-height: 110px;
  border-radius: var(--radius-xs);
  margin-top: 6px;
  border: 1px solid var(--line);
  object-fit: cover;
}
.time-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.time-form .f {
  flex: 1;
  min-width: 120px;
}
.logo-row {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.logo-prev {
  width: 180px;
  height: 80px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  background: #fff;
}
.logo-prev img {
  max-width: 170px;
  max-height: 70px;
}
.liq {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}
.liq > div:first-child {
  min-width: 320px;
}
.liq-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 3px 0;
}
.liq-row.total {
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 6px;
  font-size: 15px;
}
.liq-side {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.list-scroll {
  max-height: 260px;
  overflow: auto;
}
.check-list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: grid;
  gap: 6px;
  font-size: 13px;
}
.navbtns {
  display: flex;
  gap: 2px;
}
.navbtns svg {
  width: 16px;
  height: 16px;
}

/* Formulare */
.sig {
  position: relative;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  background: var(--panel);
}
.sig canvas {
  display: block;
  width: 100%;
  height: 120px;
  touch-action: none;
  cursor: crosshair;
}
.sig-clear {
  position: absolute;
  top: 6px;
  right: 6px;
}
.sig-hint {
  position: absolute;
  left: 12px;
  bottom: 8px;
  pointer-events: none;
}
table.frm td {
  padding: 4px 6px;
}
table.frm input {
  min-height: 32px;
}
.photo-pick {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}
.photo-pick label {
  position: relative;
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  background: var(--panel-2);
}
.photo-pick label:has(input:checked) {
  border-color: var(--accent);
}
.photo-pick img {
  width: 100%;
  height: 96px;
  object-fit: cover;
  display: block;
}
.photo-pick input {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 18px;
  min-height: 0;
}
.photo-pick span {
  display: block;
  font-size: 11px;
  padding: 4px 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===================== Grundfarben, Typografie und Karten ===================== */
:root {
  --bg: #f5f5f7;
  --panel: #ffffff;
  --panel-2: #f9f9fb;
  --line: #e8e8ed;
  --line-2: #d2d2d7;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --faint: #8e8e93;
  --accent: #0a5cdb;
  --accent-2: #0848ad;
  --accent-soft: #eef3fd;
  --on-accent: #fff;
  --ink: #1d1d1f;
  --on-ink: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 24px -12px rgba(0, 0, 0, 0.1);
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #000000;
    --panel: #1c1c1e;
    --panel-2: #232326;
    --line: #2c2c2e;
    --line-2: #3a3a3c;
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --faint: #7c7c80;
    --accent: #4d8dff;
    --accent-2: #6fa3ff;
    --accent-soft: #15233f;
    --ink: #f5f5f7;
    --on-ink: #1d1d1f;
    --shadow: none;
  }
}
:root[data-theme='dark'] {
  --bg: #000000;
  --panel: #1c1c1e;
  --panel-2: #232326;
  --line: #2c2c2e;
  --line-2: #3a3a3c;
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --faint: #7c7c80;
  --accent: #4d8dff;
  --accent-2: #6fa3ff;
  --accent-soft: #15233f;
  --ink: #f5f5f7;
  --on-ink: #1d1d1f;
  --shadow: none;
}
body {
  font-size: 14px;
  letter-spacing: -0.005em;
}
h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.022em;
}
h2 {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.012em;
}
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.kpi .value {
  font-size: 24px;
  letter-spacing: -0.02em;
}
.kpi .label {
  font-size: 12.5px;
}
/* Seitenleiste */
.side {
  background: var(--bg);
  border-right: 1px solid var(--line);
  padding: 20px 12px 14px;
}
.nav {
  display: grid;
  gap: 1px;
}
.nav a {
  color: var(--text);
  font-weight: 500;
  padding: 7px 10px;
  border-radius: var(--radius);
}
.nav a svg {
  color: var(--muted);
}
.nav a:hover {
  background: color-mix(in srgb, var(--text) 5%, transparent);
}
.nav a.active {
  background: var(--panel);
  color: var(--text);
  font-weight: 600;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.06),
    0 0 0 1px var(--line);
}
.nav a.active svg {
  color: var(--accent);
}
.side-foot {
  border-top: 1px solid var(--line);
}
/* Kopfleiste */
.top {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
  padding: 10px 28px;
}
.content {
  padding: 28px 32px 64px;
  max-width: 1480px;
  margin: 0 auto;
  width: 100%;
}
.page-head {
  margin-bottom: 22px;
}
/* Schaltflächen: Hauptaktion dunkel, Blau nur als Akzent */
.btn {
  border-radius: var(--radius-sm);
  font-weight: 550;
  border-color: var(--line-2);
}
.btn:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
  outline-offset: 2px;
}
.btn.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-ink);
}
.btn.primary:hover {
  background: color-mix(in srgb, var(--ink) 85%, var(--bg));
  border-color: transparent;
}
.btn.ghost {
  border-color: transparent;
}
input,
select,
textarea {
  border-radius: var(--radius);
  border-color: var(--line-2);
}
input:focus,
select:focus,
textarea:focus {
  outline: 3px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-color: var(--accent);
}
/* Tabellen, Reiter, Badges */
.t th {
  font-size: 11.5px;
  color: var(--faint);
  text-transform: none;
  letter-spacing: 0;
}
.t td {
  border-bottom-color: var(--line);
}
.t tr.click:hover td {
  background: color-mix(in srgb, var(--accent) 4%, var(--panel));
}
.t td:first-child,
.t th:first-child {
  white-space: nowrap;
}
.tabs {
  border-bottom-color: var(--line);
  gap: 4px;
}
.tabs button {
  color: var(--muted);
  padding: 10px 12px;
}
.tabs button.active {
  color: var(--text);
  border-bottom-color: var(--ink);
}
.badge {
  border-radius: 999px;
  font-weight: 600;
}
.modal {
  border-radius: 18px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.35);
}
/* Navigation: Beschriftungen, die bei wenig Platz verschwinden */
.top .lbl {
  margin-left: 2px;
}
/* ---------- Anpassung an die Fenstergröße ---------- */
@media (max-width: 1280px) {
  .content {
    padding: 24px 24px 56px;
  }
}
@media (max-width: 1100px) {
  .app {
    grid-template-columns: 1fr;
  }
  .side {
    position: fixed;
    z-index: 40;
    left: 0;
    top: 0;
    width: 264px;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    background: var(--panel);
  }
  .side.open {
    transform: none;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.25);
  }
  .side-backdrop {
    position: fixed;
    inset: 0;
    z-index: 39;
    background: rgba(0, 0, 0, 0.25);
  }
  .menu-btn {
    display: inline-flex;
  }
  .top {
    padding: 10px 18px;
  }
  .split,
  .split3 {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 820px) {
  .content {
    padding: 18px 16px 48px;
  }
  h1 {
    font-size: 22px;
  }
  .top .lbl,
  .gsearch kbd,
  .navbtns {
    display: none;
  }
  .gsearch input {
    min-width: 0;
    padding-right: 10px;
  } /* ⌘K ist hier ausgeblendet – Platz für den Platzhalter */
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table-wrap > table.t {
    min-width: 620px;
  }
  .page-head {
    gap: 10px;
  }
  .page-head .btn {
    height: 36px;
  }
  .kpi .value {
    font-size: 21px;
  }
}
@media (max-width: 520px) {
  .g2,
  .g3,
  .g4 {
    grid-template-columns: minmax(0, 1fr);
  }
  .gsearch {
    max-width: none;
  }
  .modal {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 16px 16px 0 0;
    margin-top: auto;
  }
  .modal-bg {
    align-items: flex-end;
    padding: 0;
  }
}

/* Cloud-Speicher */
.cloud-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}
.cloud-p {
  border: 1px solid var(--line, #e8e8ed);
  border-radius: 14px;
  padding: 16px;
}
.cloud-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
@media (max-width: 620px) {
  .cloud-grid {
    grid-template-columns: 1fr;
  }
}

/* Großhandel */
.ws-list {
  display: grid;
  gap: 8px;
}
.ws-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line, #e8e8ed);
  border-radius: 12px;
  flex-wrap: wrap;
}
.ws-row .btn-row {
  margin: 0;
}
.ws-wait {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  padding: 14px;
  border-radius: 12px;
  background: var(--accent-soft, #eef4ff);
}
.ws-wait[hidden] {
  display: none;
}
.spin {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.8s linear infinite;
  flex: 0 0 18px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Erkannte Rechnungsdaten */
.inv {
  display: grid;
  gap: 12px;
  padding: 4px 2px 12px;
}
.inv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
}
.inv-box {
  border: 1px solid var(--line, #e8e8ed);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.45;
}
.inv-h {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted, #86868b);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.inv-dl {
  grid-template-columns: minmax(90px, max-content) 1fr;
  gap: 4px 12px;
  margin-top: 8px;
  font-size: 13px;
}
.inv-dl dd {
  word-break: break-word;
}
.inv-lines td,
.inv-lines th {
  font-size: 13px;
  padding: 6px 8px;
}
.inv-badge {
  justify-self: start;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft, #eef4ff);
  color: var(--accent, #0a5cdb);
}
.ok-dot {
  color: #1a7f37;
  font-weight: 700;
}
.warn-dot {
  color: #b25000;
  font-weight: 700;
}
.inv-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 12px;
  font-size: 13px;
}
.inv-strip > span {
  font-weight: 700;
}
.inv-strip > div {
  flex: 1;
}
.inv-strip.ok {
  background: #eaf7ee;
  color: #14532d;
}
.inv-strip.warn {
  background: #fff6e5;
  color: #7a4a00;
}

/* Aufgaben */
.task-add {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.task-add input[name='title'] {
  flex: 1;
}
.task-add input[type='date'] {
  width: auto;
}
.task-group {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted, #86868b);
  margin: 16px 0 6px;
}
.task-group.bad {
  color: var(--bad, #d70015);
}
.task {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 6px;
  border-bottom: 1px solid var(--line2, #f0f0f3);
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.task:hover {
  background: var(--hover, #f5f5f7);
}
.task-check {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid #b0b0b8;
  background: transparent;
  display: grid;
  place-items: center;
  font-size: 13px;
  line-height: 1;
  color: #fff;
  cursor: pointer;
  margin-top: 1px;
  padding: 0;
}
.task-check:hover {
  border-color: var(--accent, #0a5cdb);
}
.task.done .task-check {
  background: #1a7f37;
  border-color: #1a7f37;
}
.task.done .task-title {
  text-decoration: line-through;
  color: var(--muted, #86868b);
}
.task-main {
  flex: 1;
  min-width: 0;
}
.task-title {
  font-weight: 500;
}
.task-notes {
  color: var(--muted, #6e6e73);
  white-space: pre-wrap;
  margin-top: 2px;
}
@media (max-width: 520px) {
  .task-add {
    flex-wrap: wrap;
  }
  .task-add input[name='title'] {
    flex: 1 1 100%;
  }
  .task-add input[type='date'] {
    flex: 1;
  }
}

/* Stempeluhr */
.nav-plus {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--accent-soft, #eef4ff);
  color: var(--accent, #0a5cdb);
  margin-left: 4px;
}
.clock-card {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  padding: 28px 24px;
}
.clock-state {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  background: #f0f0f3;
  color: #6e6e73;
}
.clock-state.on {
  background: #eaf7ee;
  color: #1a7f37;
}
.clock-state.pause {
  background: #fff6e5;
  color: #b25000;
}
.clock-time {
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 10px 0 2px;
  font-variant-numeric: tabular-nums;
}
.clock-btns {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}
.clock-big {
  flex: 1;
  justify-content: center;
  font-size: 20px;
  padding: 20px 12px;
  border-radius: 16px;
}
@media (max-width: 520px) {
  .clock-time {
    font-size: 46px;
  }
  .clock-big {
    padding: 18px 10px;
  }
}

/* ---------- E-Mail-Verlauf, E-Mail-Ansicht, Signatur, Rechtstexte ---------- */
.mail-list {
  display: flex;
  flex-direction: column;
}
.mail-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 11px 4px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.mail-row:last-child {
  border-bottom: 0;
}
.mail-row:hover {
  background: var(--panel-2);
}
.mail-dir {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
}
.mail-dir.in {
  background: var(--info-soft);
  color: var(--info);
}
.mail-dir.out {
  background: var(--ok-soft);
  color: var(--ok);
}
.mail-main {
  flex: 1;
  min-width: 0;
}
.mail-subj {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mail-row .num {
  white-space: nowrap;
}
.mail-head {
  display: grid;
  gap: 3px;
  font-size: 13px;
  padding: 12px 14px;
  background: var(--panel-2);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  overflow-wrap: anywhere;
}
.mail-head .mail-subj {
  font-size: 15px;
  white-space: normal;
  margin-bottom: 4px;
}
.mail-att {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}
.chip {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  background: var(--panel);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chip:hover {
  border-color: var(--accent);
}
.mail-body {
  margin: 0 0 12px;
  padding: 12px 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 13.5px/1.55 var(--font);
  max-height: 46vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: var(--panel);
}
.dprev.mailv {
  height: auto;
  padding: 12px 14px;
  overflow: auto;
  max-height: 60vh;
}
.dprev.mailv .mail-body {
  max-height: none;
}
.mail-textframe {
  display: block;
  width: 100%;
  min-height: 120px;
  padding: 0;
  background: transparent;
}
.mail-textframe.hidden {
  display: none;
}
.mail-assign {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 8px;
}
@media (max-width: 600px) {
  .mail-assign {
    grid-template-columns: 1fr;
  }
}
.mail-preview {
  width: 100%;
  height: 520px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #eef0f3;
}
.mail-preview.tall {
  height: 70vh;
}
.hint-box {
  margin: -2px 0 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--warn-soft);
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}
.chk-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 8px;
}
textarea.mono-ish {
  font:
    12.5px/1.5 ui-monospace,
    Menlo,
    monospace;
  width: 100%;
}

/* ---------- E-Mail-Verlauf als Unterhaltung (im NAVO-Stil) ---------- */
.chat-card {
  padding-bottom: 0;
  overflow: hidden;
}
.chat {
  margin: 0 -18px;
  display: flex;
  flex-direction: column;
  background: var(--panel-2);
  border-top: 1px solid var(--line);
}
.chat-scroll {
  max-height: 64vh;
  min-height: 220px;
  overflow-y: auto;
  padding: 16px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.chat-empty {
  margin: auto;
  text-align: center;
  color: var(--muted);
  padding: 30px 10px;
  max-width: 420px;
}
.chat-day {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
}
.chat-day::before,
.chat-day::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.chat-row {
  display: flex;
}
.chat-row.out {
  justify-content: flex-end;
}
.bubble {
  position: relative;
  max-width: min(74%, 640px);
  min-width: 140px;
  padding: 10px 13px 8px;
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: 14px;
  line-height: 1.5;
}
.chat-row.in .bubble {
  border-top-left-radius: 4px;
}
.chat-row.out .bubble {
  background: var(--accent-soft);
  border-color: transparent;
  border-top-right-radius: 4px;
}
.b-head {
  display: flex;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
  font-size: 12.5px;
  margin-bottom: 2px;
}
.b-from {
  color: var(--accent);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.b-to {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.b-proj {
  font-size: 11px;
  color: var(--muted);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  padding: 0 6px;
  flex: none;
}
.b-subj {
  font-weight: 600;
  margin: 1px 0 3px;
}
.b-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.b-text.clamp {
  display: -webkit-box;
  -webkit-line-clamp: 14;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.b-text a,
.b-more {
  color: var(--accent);
}
.b-more {
  border: 0;
  background: none;
  padding: 2px 0;
  cursor: pointer;
  font-size: 13px;
}
.b-att {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}
.b-file {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
}
.chat-row.in .b-file {
  background: var(--panel-2);
}
.b-file:hover {
  border-color: var(--accent);
}
.b-ic {
  font-size: 18px;
  text-align: center;
}
.b-fn {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.b-fs {
  color: var(--muted);
  font-size: 11.5px;
}
.b-meta {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 4px;
}
.b-ticks {
  color: var(--accent);
  font-weight: 600;
}
.b-menu {
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 0 4px;
  margin-right: auto;
  opacity: 0.5;
}
.bubble:hover .b-menu {
  opacity: 1;
}
.chat-compose {
  position: sticky;
  bottom: 0;
  background: var(--panel);
  border-top: 1px solid var(--line);
  padding: 10px 14px 12px;
  display: grid;
  gap: 8px;
}
.cc-top {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 8px;
}
.cc-files {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cc-files:empty {
  display: none;
}
.cc-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.cc-row textarea {
  flex: 1;
  resize: none;
  min-height: 40px;
  max-height: 220px;
  padding: 9px 12px;
  font: 14px/1.45 var(--font);
}
.cc-attach {
  flex: none;
  height: 40px;
  width: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
}
.cc-send {
  flex: none;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--radius);
  border: 0;
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}
.cc-send:disabled {
  opacity: 0.5;
}
@media (max-width: 640px) {
  .bubble {
    max-width: 88%;
  }
  .cc-top {
    grid-template-columns: 1fr;
  }
}
.ap-list {
  max-height: 50vh;
  overflow: auto;
  display: grid;
  gap: 2px;
}
.ap-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.ap-row:hover {
  background: var(--panel-2);
}

/* ---------- Abschläge / Gutschrift ---------- */
.ded-box {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.ded-list {
  display: grid;
  gap: 6px;
}
.ded-cand {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}
.ded-cand:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.ded-cand.used {
  opacity: 0.65;
}
.ded-manual {
  display: grid;
  grid-template-columns: 1.6fr 1fr 0.9fr 0.6fr auto;
  gap: 6px;
  margin-bottom: 6px;
}
@media (max-width: 640px) {
  .ded-manual {
    grid-template-columns: 1fr 1fr;
  }
}
.ded-sum {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--panel-2);
  border-radius: var(--radius);
}
.choice-row {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

/* ---------- „Neu“-Menü ---------- */
.new-btn .lbl {
  margin-left: 2px;
}
.qn-ctx {
  margin: -4px 0 12px;
  padding: 10px 12px;
  background: var(--accent-soft);
  border-radius: var(--radius);
}
.qn-group + .qn-group {
  margin-top: 16px;
}
.qn-h {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.qn-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
@media (max-width: 640px) {
  .qn-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.qn-item {
  display: flex;
  gap: 10px;
  align-items: center;
  text-align: left;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font: inherit;
}
.qn-item:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.qn-item b {
  display: block;
  font-weight: 600;
}
.qn-ic {
  font-size: 20px;
  width: 28px;
  text-align: center;
  flex: none;
}
.abo-banner {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ---------- Mitarbeiter-Zugang ---------- */
.acc-box {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}
.acc-box h3 {
  margin: 0 0 8px;
}
.acc-box[hidden],
.acc-picks[hidden],
.acc-row[hidden] {
  display: none;
}
.acc-scope {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}
.acc-picks .grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 720px) {
  .acc-picks .grid2 {
    grid-template-columns: 1fr;
  }
}
.acc-pick {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  min-width: 0;
}
.acc-pick-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}
.acc-pick-head input {
  flex: 1 1 140px;
  min-width: 0;
}
.acc-list {
  max-height: 220px;
  overflow: auto;
  padding: 4px 0;
}
.acc-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 14px;
}
.acc-row:hover {
  background: var(--accent-soft);
}
.acc-row input {
  margin-top: 3px;
}
.acc-perms {
  display: grid;
  gap: 6px;
}
.prices-hidden {
  color: var(--faint);
  font-style: italic;
}
.discreet-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #fff4d6;
  color: #7a5600;
  border: 1px solid #f0d58a;
}
:root[data-theme='dark'] .discreet-badge {
  background: #3a2f12;
  color: #f0d58a;
  border-color: #5c4a1a;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .discreet-badge {
    background: #3a2f12;
    color: #f0d58a;
    border-color: #5c4a1a;
  }
}
.chat-compose .cc-opts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  padding: 6px 4px 0;
}
.chat-compose .cc-opts .chk {
  margin: 0;
}
.b-head .discreet-badge {
  margin-right: 6px;
}

/* ---------- Finanzen ---------- */
.pos {
  color: var(--ok, #12805c);
}
.neg {
  color: var(--bad, #c0392b);
}
.fin-accounts {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}
.fin-acc-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}
.hint-box.err {
  border-color: color-mix(in srgb, var(--bad, #c0392b) 40%, transparent);
  background: color-mix(in srgb, var(--bad, #c0392b) 8%, var(--panel));
}
.tx-table tr.clickable {
  cursor: pointer;
}
.tx-table tr.clickable:hover td {
  background: var(--accent-soft);
}
.tx-purpose {
  max-width: 560px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.tx-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.tx-amount {
  font-size: 22px;
  font-weight: 700;
  white-space: nowrap;
}
.tx-purpose-box {
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  white-space: pre-wrap;
  word-break: break-word;
}
.cand-list {
  display: grid;
  gap: 6px;
}
.cand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
}
.cand > div:first-child {
  flex: 1 1 220px;
  min-width: 0;
}
.cand input[type='number'] {
  min-height: 30px;
  padding: 4px 6px;
}
.choice-list {
  display: grid;
  gap: 8px;
}
.choice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--panel);
}
.choice:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.choice input {
  margin-top: 4px;
}
.ebics-step {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.ebics-step:first-of-type {
  border-top: 0;
}
.ebics-n {
  flex: 0 0 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  color: var(--muted);
}
.ebics-step.active .ebics-n {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.ebics-step.done .ebics-n {
  background: var(--ok, #12805c);
  border-color: var(--ok, #12805c);
  color: #fff;
}
.ebics-step.done .ebics-b > b {
  color: var(--muted);
  font-weight: 550;
}
.ebics-b {
  flex: 1;
  min-width: 0;
}
.ebics-c {
  margin-top: 8px;
}
.ebics-form.form {
  margin-bottom: 4px;
}
.hash {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin-top: 6px;
  flex-wrap: wrap;
}
.hash code {
  font-size: 12px;
  word-break: break-all;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  padding: 4px 6px;
}
@media (max-width: 720px) {
  .tx-table th:nth-child(3),
  .tx-table td:nth-child(3) {
    display: none;
  }
  .fin-kpis {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 720px) {
  .tx-table td:first-child .muted {
    display: none;
  }
  .tx-table td,
  .tx-table th {
    padding-left: 6px;
    padding-right: 6px;
  }
  .tx-purpose {
    max-width: 52vw;
  }
}
.lic-row {
  margin: 14px 0;
}
.lic-h {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
}
.lic-bar {
  height: 8px;
  border-radius: 99px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  overflow: hidden;
  margin-top: 6px;
}
.lic-bar i {
  display: block;
  height: 100%;
  background: var(--ok);
}
.lic-bar i.high {
  background: var(--warn);
}
.lic-bar i.full {
  background: var(--bad);
}

/* Formatierte Texte */
.rt {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
  margin-top: 6px;
}
.rt:focus-within {
  border-color: var(--accent, #005cfb);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #005cfb) 18%, transparent);
}
.rt-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  align-items: center;
  padding: 5px 6px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.rt-bar button {
  border: 0;
  background: transparent;
  color: var(--text);
  min-width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}
.rt-bar button:hover {
  background: var(--line);
}
.rt-bar select {
  width: auto;
  height: 30px;
  padding: 0 6px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}
.rt-colors {
  display: inline-flex;
  gap: 3px;
  align-items: center;
  margin: 0 4px;
}
.rt-colors button[data-color] {
  min-width: 18px;
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
}
.rt-more {
  position: relative;
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  border-radius: 50%;
  color: var(--muted);
}
.rt-more input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
}
.rt-sep {
  width: 1px;
  height: 20px;
  background: var(--line);
  margin: 0 4px;
}
.rt-area {
  padding: 10px 12px;
  line-height: 1.55;
  outline: none;
  overflow-wrap: anywhere;
  max-height: 420px;
  overflow-y: auto;
  color: var(--text);
  background: var(--panel);
}
.rt-area:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
  white-space: pre-line;
}
.rt-area p,
.rt-area div,
.rt-area blockquote {
  margin-top: 0;
  margin-bottom: 0;
}
.rt-area blockquote {
  border: 0;
  padding: 0;
}
.rich-view p {
  margin: 0;
}
@media (max-width: 640px) {
  .rt-bar {
    gap: 0;
  }
  .rt-colors button[data-color]:nth-child(n + 5) {
    display: none;
  }
}

.update-bar {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 70;
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 12px;
  padding: 10px 12px 10px 16px;
  max-width: calc(100vw - 32px);
  flex-wrap: wrap;
}
/* Auswahl im Leistungskatalog */
.sel-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: var(--info-soft);
  color: var(--info);
  border-radius: 12px;
  font-size: 13px;
}
.sel-bar.hidden {
  display: none;
}
.t tr.sel td {
  background: var(--accent-soft);
}
@media (max-width: 640px) {
  .update-bar {
    left: 12px;
    right: 12px;
    transform: none;
    bottom: calc(12px + env(safe-area-inset-bottom));
    justify-content: space-between;
  }
}

/* ---------- Scrollen: Bereiche dürfen schrumpfen (sonst wird unten abgeschnitten) ---------- */
.dms > *,
.dms-list,
.dms-view {
  min-height: 0;
}
.dms-rows,
.dv-body,
.dms-side {
  min-height: 0;
  overflow-y: auto;
}
.side {
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* ---------- Sichtbare Bildlaufleisten mit Pfeilen (Maus/Trackpad; auf Touch-Geräten bleibt es nativ) ---------- */
@media (pointer: fine) {
  ::-webkit-scrollbar {
    width: 13px;
    height: 13px;
  }
  ::-webkit-scrollbar-track {
    background: var(--panel-2);
  }
  ::-webkit-scrollbar-corner {
    background: var(--panel-2);
  }
  ::-webkit-scrollbar-thumb {
    background-color: color-mix(in srgb, var(--muted) 55%, transparent);
    border-radius: var(--radius-sm);
    border: 3px solid transparent;
    background-clip: content-box;
    min-height: 36px;
    min-width: 36px;
  }
  ::-webkit-scrollbar-thumb:hover {
    background-color: color-mix(in srgb, var(--muted) 85%, transparent);
  }
  ::-webkit-scrollbar-button:single-button {
    display: block;
    width: 13px;
    height: 13px;
    background-color: var(--panel-2);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 7px 7px;
  }
  ::-webkit-scrollbar-button:single-button:hover {
    background-color: color-mix(in srgb, var(--muted) 18%, var(--panel-2));
  }
  ::-webkit-scrollbar-button:single-button:vertical:decrement {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M5 2l4 6H1z' fill='%23888'/%3E%3C/svg%3E");
  }
  ::-webkit-scrollbar-button:single-button:vertical:increment {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M5 8L1 2h8z' fill='%23888'/%3E%3C/svg%3E");
  }
  ::-webkit-scrollbar-button:single-button:horizontal:decrement {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 5l6-4v8z' fill='%23888'/%3E%3C/svg%3E");
  }
  ::-webkit-scrollbar-button:single-button:horizontal:increment {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M8 5L2 9V1z' fill='%23888'/%3E%3C/svg%3E");
  }
  ::-webkit-scrollbar-button:vertical:start:increment,
  ::-webkit-scrollbar-button:vertical:end:decrement,
  ::-webkit-scrollbar-button:horizontal:start:increment,
  ::-webkit-scrollbar-button:horizontal:end:decrement {
    display: none;
  }
}
/* Firefox kennt keine Pfeile – dort zumindest eine sichtbare Leiste */
@supports (-moz-appearance: none) {
  * {
    scrollbar-width: auto;
    scrollbar-color: #9aa0a6 transparent;
  }
}

/* Shop */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
.shop-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 100%;
}
.shop-item img,
.shop-noimg {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border-radius: var(--radius);
  background: var(--bg2, rgba(127, 127, 127, 0.08));
}
.shop-noimg {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.shop-noimg svg {
  width: 42px;
  height: 42px;
}
.shop-desc {
  color: var(--muted);
  max-height: 7.5em;
  overflow: auto;
}
.shop-price {
  font-size: 1.15em;
  font-weight: 650;
}
.tabs {
  overflow-y: hidden;
}

/* Nicht gebuchte Pakete */
.nav a.nav-locked {
  opacity: 0.62;
}
.nav-more {
  margin: 6px 0;
  border-top: 1px solid var(--line);
  padding-top: 6px;
}
.nav-more > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius);
  color: var(--muted);
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.nav-more > summary::-webkit-details-marker {
  display: none;
}
.nav-more > summary:hover {
  background: color-mix(in srgb, var(--text) 5%, transparent);
  color: var(--text);
}
.nav-more > summary svg {
  color: var(--muted);
  transition: transform 0.15s;
}
.nav-more[open] > summary svg {
  transform: rotate(45deg);
}
.nav-more > summary .nav-plus {
  margin-left: auto;
}
.nav-more a {
  padding-left: 18px !important;
}
.lock-ic {
  display: inline-flex;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  background: var(--bg2, rgba(127, 127, 127, 0.1));
  flex: none;
}
.lock-ic svg {
  width: 22px;
  height: 22px;
}

.shop-pkgs {
  display: grid;
  gap: 8px;
}
.shop-pkg {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}
.shop-pkg:has(input:checked) {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.shop-pkg input {
  margin-top: 3px;
}
/* NAVO-Abo im Shop */
.abo-card {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: linear-gradient(90deg, var(--accent-soft), var(--panel) 70%);
}
.abo-card.paid {
  border-color: var(--line);
  background: var(--panel);
}
.abo-card .abo-ic {
  display: inline-flex;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--on-accent);
  flex: none;
}
.abo-card .abo-ic svg {
  width: 22px;
  height: 22px;
}
.abo-card .abo-txt {
  flex: 1 1 260px;
  min-width: 0;
}
.abo-card h3 {
  margin: 0 0 2px;
}
.abo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}
.abo-main {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.abo-main .card h3 {
  margin-top: 0;
}
.abo-side {
  position: sticky;
  top: 12px;
  display: grid;
  gap: 12px;
}
.abo-sum table {
  width: 100%;
  border-collapse: collapse;
}
.abo-sum td {
  padding: 4px 0;
  vertical-align: top;
}
.abo-sum td.num {
  text-align: right;
  white-space: nowrap;
  padding-left: 10px;
}
.abo-sum .abo-total td {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.abo-qty {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px 14px;
  margin-top: 12px;
}
.abo-choice {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}
@media (max-width: 900px) {
  .abo-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .abo-side {
    position: static;
  }
}

/* Abrechnung nach Aufwand */
.seg-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}
.rate-form {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
.rate-lines {
  margin: 10px 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.rep-row {
  display: grid;
  grid-template-columns: 96px 12px 96px 1fr auto;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}
@media (max-width: 560px) {
  .rep-row {
    grid-template-columns: 1fr 12px 1fr auto;
  }
  .rep-row [data-k='text'] {
    grid-column: 1 / -2;
    grid-row: 2;
  }
}
.share-prev {
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
}
.share-item {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.share-item:first-child {
  border-top: 0;
}
.share-item .btn-row {
  flex-wrap: wrap;
}
.cost-sel {
  margin-top: 4px;
  font-size: 11px;
}
.labor-35a {
  color: var(--accent, #005cfb);
  font-weight: 600;
}
.letter-pick {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
  color: inherit;
  font: inherit;
}
.letter-pick:hover {
  border-color: var(--accent);
}
.letter-pick span {
  display: block;
  margin-top: 2px;
}
.letter-hint {
  background: var(--accent-soft);
  border-color: transparent;
  font-size: 14px;
}
.letter-prev {
  white-space: pre-wrap;
  font-size: 13.5px;
  line-height: 1.55;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
  max-height: 70vh;
  overflow: auto;
}
.ok-line {
  color: var(--ok, #18864b);
}
.bad-line {
  color: var(--bad, #c0392b);
  margin: 3px 0;
}
.warn-line {
  color: #b45309;
  margin: 3px 0;
}
.acc-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}
.acc-tile {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}
.acc-big {
  font-size: 26px;
  font-weight: 700;
  margin: 2px 0;
}
.acc-big small {
  font-size: 14px;
  font-weight: 500;
}
.acc-big.neg {
  color: var(--bad, #c0392b);
}
.acc-big.pos {
  color: var(--ok, #18864b);
}
.snip-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
}
.snip-row select {
  width: auto;
  max-width: 280px;
}
.abs-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.abs-row:first-child {
  border-top: 0;
}
.abs-act {
  display: flex;
  align-items: center;
  gap: 6px;
}
.hrow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.hrow .spacer {
  flex: 1;
}
.im-map {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.im-prev {
  max-height: 420px;
  overflow: auto;
}
/* Ihr Steuerberater */
.adv-list {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.adv-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.adv-item:last-child {
  border-bottom: 0;
}
.adv-item > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
/* lange Knopftexte (Steuerberater-Exporte) dürfen umbrechen statt die Seite zu verbreitern */
a.btn[data-exp] {
  white-space: normal;
  height: auto;
  min-height: 34px;
  padding-top: 6px;
  padding-bottom: 6px;
  line-height: 1.3;
}

/* Bank verbinden */
.fin-steps {
  display: flex;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  counter-reset: st;
}
.fin-steps li {
  flex: 1;
  counter-increment: st;
  font-size: 13px;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  border: 1px solid var(--line);
}
.fin-steps li::before {
  content: counter(st) '. ';
  font-weight: 600;
}
.fin-steps li.on {
  color: var(--text);
  border-color: var(--text);
  font-weight: 600;
  background: var(--panel);
}
.fin-steps li.done {
  color: var(--muted);
}
.fin-steps li.done::before {
  content: '✓ ';
}
.bank-hits {
  display: grid;
  gap: 6px;
  margin: 4px 0 10px;
}
.bank-hit {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.bank-hit:hover,
.bank-hit:focus {
  border-color: var(--text);
  outline: none;
}
.bank-chosen {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  margin-bottom: 14px;
}
.bank-chosen > div {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.bank-ic {
  font-size: 22px;
}
.fs-manual summary {
  cursor: pointer;
  color: var(--muted);
}
@media (max-width: 560px) {
  .fin-steps li {
    font-size: 11.5px;
    padding: 6px 7px;
  }
}

/* DATEV-Anbindung */
.dv-client {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 10px 12px;
  border: 1px solid var(--line, #e3e6ea);
  border-radius: var(--radius);
  margin: 8px 0;
}
.dv-client > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.dv-send {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.dv-send .btn {
  white-space: normal;
}
.dv-lohn {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}
.dv-lohn input {
  width: auto;
  min-width: 150px;
}
.dv-jobs td {
  vertical-align: top;
}
.dv-jobs .small {
  overflow-wrap: anywhere;
  max-width: 420px;
}
.dv-jobs th {
  text-align: left;
}
@media (max-width: 640px) {
  .dv-jobs thead {
    display: none;
  }
  .dv-jobs,
  .dv-jobs tbody,
  .dv-jobs tr,
  .dv-jobs td {
    display: block;
    width: 100%;
  }
  .dv-jobs tr {
    padding: 8px 0;
    border-bottom: 1px solid var(--line, #e3e6ea);
  }
  .dv-jobs td {
    padding: 2px 0;
    border: 0;
  }
  .dv-jobs td[data-l]::before {
    content: attr(data-l) ': ';
    color: var(--muted, #6b7280);
    font-size: 12px;
  }
}

/* Nachrichten (Messenger) */
.nav-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 11.5px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.msgr {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  height: calc(100vh - 150px);
  height: calc(100dvh - 150px);
  min-height: 420px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.msgr-side {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: var(--panel);
}
.msgr-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 14px 8px;
}
.msgr-top h1 {
  margin: 0;
  font-size: 20px;
  flex: 1;
}
.msgr-tools {
  display: flex;
  gap: 6px;
}
.msgr-tools .spin svg {
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.msgr-side > .search {
  margin: 0 14px 8px;
  width: calc(100% - 28px);
}
.msgr-filter {
  display: flex;
  gap: 4px;
  padding: 0 10px 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}
.msgr-filter button {
  border: 0;
  background: none;
  padding: 5px 9px;
  border-radius: 99px;
  color: var(--muted);
  font: 500 12.5px var(--font);
  cursor: pointer;
}
.msgr-filter button.active {
  background: var(--accent-soft);
  color: var(--accent);
}
.msgr-filter button span {
  font-weight: 650;
}
.msgr-list {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.msgr-item {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}
.msgr-item:hover {
  background: var(--panel-2);
  text-decoration: none;
}
.msgr-item.active {
  background: var(--accent-soft);
}
.msgr-av {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 650;
  font-size: 13px;
}
.msgr-item.active .msgr-av {
  background: var(--accent);
  color: var(--on-accent);
}
.msgr-body {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 1px;
}
.msgr-l1 {
  display: flex;
  gap: 8px;
  align-items: baseline;
  min-width: 0;
}
.msgr-l1 b,
.msgr-l1 a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.msgr-item.unread .msgr-l1 b {
  font-weight: 750;
}
.msgr-time {
  flex: none;
  font-size: 11.5px;
  color: var(--muted);
}
.msgr-time.due {
  color: var(--bad);
  font-weight: 650;
}
.msgr-l2 {
  font-size: 13px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.msgr-item.unread .msgr-l2 {
  color: var(--text);
}
.msgr-l3 {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  min-width: 0;
}
.msgr-l3 > .muted {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.msgr-unread {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 11.5px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.msgr-item.fu .msgr-l3 .btn {
  margin-left: auto;
}
.msgr-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--panel-2);
}
.msgr-empty {
  margin: auto;
  text-align: center;
  color: var(--muted);
  padding: 24px;
  display: grid;
  gap: 6px;
  max-width: 360px;
}
.msgr-empty-ic {
  font-size: 40px;
}
.msgr-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.msgr-who {
  min-width: 0;
}
.msgr-who > div {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.msgr-back {
  display: none;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
}
.msgr-chat {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.msgr-chat > .chat {
  margin: 0;
  flex: 1;
  min-height: 0;
  border-top: 0;
}
.msgr-chat .chat-scroll {
  max-height: none;
  flex: 1;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
@media (max-width: 700px) {
  .msgr {
    grid-template-columns: minmax(0, 1fr);
    height: calc(100vh - 120px);
    height: calc(100dvh - 120px);
  }
  .msgr.has-thread .msgr-side {
    display: none;
  }
  .msgr:not(.has-thread) .msgr-main {
    display: none;
  }
  .msgr-back {
    display: inline-flex;
  }
}
/* Chat: offene Fragen, Wiedervorlage, Plus-Menü */
.bubble.q-open {
  border-color: var(--warn);
  box-shadow:
    0 0 0 1px var(--warn) inset,
    var(--shadow);
}
.b-q {
  background: var(--warn-soft);
  color: var(--warn);
  border-radius: var(--radius-sm);
  padding: 6px 9px;
  margin: 2px 0 6px;
  font-size: 12.5px;
}
.b-q i {
  color: var(--text);
  font-style: normal;
}
.b-qbtn {
  border: 0;
  background: none;
  color: var(--accent);
  cursor: pointer;
  font: 600 12px var(--font);
  padding: 0 0 0 6px;
}
.b-act {
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 13px;
  padding: 0 3px;
  opacity: 0.45;
  filter: grayscale(1);
}
.bubble:hover .b-act,
.b-act.on {
  opacity: 1;
  filter: none;
}
.b-ok {
  color: var(--ok);
  font-weight: 600;
}
.cc-plus {
  font-size: 22px !important;
  line-height: 1;
  color: var(--accent) !important;
  font-weight: 400;
}
.plus-pop {
  position: fixed;
  z-index: 1000;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
  padding: 6px;
  display: grid;
  min-width: 240px;
}
.plus-pop button {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 0;
  background: none;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font: 500 14px var(--font);
  cursor: pointer;
  text-align: left;
}
.plus-pop button:hover {
  background: var(--accent-soft);
}
.plus-pop button span {
  width: 22px;
  text-align: center;
  font-size: 16px;
}
.fu-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
/* Projekt: geteilt mit */
.shared-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 14px 0 0;
  padding: 10px 14px;
  background: var(--info-soft);
  border-radius: var(--radius);
  font-size: 13px;
}
.shared-strip .chip {
  background: var(--panel);
}
.shared-strip .live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  display: inline-block;
  margin-right: 4px;
}
.shared-strip svg {
  width: 16px;
  height: 16px;
  vertical-align: -3px;
  margin-right: 4px;
}
.gs-sugg {
  display: block;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.gs-sugg b {
  color: var(--accent);
}
.msgr-prep {
  margin: 8px 14px 0;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--info-soft);
  color: var(--info);
  font-size: 12.5px;
}
.msgr-miss {
  margin-left: auto;
  white-space: nowrap;
}

/* Buchungslink: Zeitfenster, Vorschau mit ausnehmbaren Tagen/Zeiten */
.bk-sec {
  margin-top: 14px;
}
.bk-win {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.bk-win input[type='time'] {
  width: 120px;
}
.bk-days {
  display: grid;
  gap: 6px;
  max-height: 280px;
  overflow: auto;
  padding: 2px;
}
.bk-day {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.bk-d {
  min-width: 92px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}
.bk-ts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  flex: 1;
  min-width: 0;
}
.bk-t {
  padding: 4px 8px;
  border: 1px solid var(--accent, #2563eb);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.bk-t.off,
.bk-day.off .bk-d {
  opacity: 0.45;
  text-decoration: line-through;
  border-color: var(--line);
}
.bk-day.off .bk-t {
  opacity: 0.3;
  text-decoration: line-through;
  cursor: default;
}
@media (max-width: 520px) {
  .bk-day {
    flex-direction: column;
    gap: 4px;
  }
}

/* Nachrichten: Hinweisleiste, Kontakt-Suche */
.msgr-bar {
  margin: 8px 12px 0;
  padding: 8px 12px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.msgr-bar.warn {
  background: var(--bad-soft);
  color: var(--bad);
}
.ac-res {
  display: grid;
  gap: 4px;
  margin: 8px 0;
  max-height: 220px;
  overflow: auto;
}
.ac-row {
  text-align: left;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.ac-row.on {
  border-color: var(--accent);
  background: var(--accent-soft);
}
@media (max-width: 700px) {
  .msgr-head .msgr-miss {
    display: none;
  }
}

/* Projekt: Wirtschaftlichkeit */
.fin-card summary {
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.fin-card summary::-webkit-details-marker {
  display: none;
}
.fin-card summary::before {
  content: '▸';
  margin-right: 6px;
  color: var(--muted);
  transition: transform 0.15s;
}
.fin-card[open] summary::before {
  transform: rotate(90deg);
}
.fin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 14px;
}
.fin-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  font-size: 14px;
}
.fin-row b {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.fin-row.total {
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 8px;
}
.fin-row.muted b {
  font-weight: 500;
}
.fin-sub {
  padding-left: 10px;
  border-left: 2px solid var(--line);
  margin: 2px 0 4px;
}
.fin-sub .fin-row {
  padding: 2px 0;
}
.fin-bar {
  height: 8px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
  margin: 6px 0 4px;
}
.fin-bar span {
  display: block;
  height: 100%;
  background: var(--ok);
}
.fin-bar.warn span {
  background: var(--warn);
}
.fin-bar.bad span {
  background: var(--bad);
}
@media (max-width: 900px) {
  .fin-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* Übersicht: Handlungsempfehlungen */
.card.hints {
  margin-bottom: 16px;
  padding-top: 12px;
  padding-bottom: 8px;
}
.hint {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  color: inherit;
  text-decoration: none;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.hint:first-of-type {
  border-top: 0;
}
.hint:hover {
  background: var(--panel-2);
}
.hint span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.hint .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--info);
  flex: none;
}
.hint.warn .dot {
  background: var(--warn);
}
.hint.bad .dot {
  background: var(--bad);
}

/* Liquiditätsprognose */
.fc-chart {
  width: 100%;
  height: auto;
  display: block;
  margin-top: 8px;
}
.fc-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
}
.fc-zero {
  stroke: var(--bad);
  stroke-width: 1;
  stroke-dasharray: 4 3;
  opacity: 0.7;
}
.fc-grid {
  stroke: var(--line);
  stroke-width: 1;
}
.fc-lbl {
  fill: var(--muted);
  font-size: 11px;
  font-family: var(--font);
}
.liq-fc {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  font-size: 14px;
}
.liq-fc:hover .muted {
  color: var(--accent);
}
.fc-m {
  display: none;
  margin-top: 4px;
}
@media (max-width: 700px) {
  .fc-table th:nth-child(3),
  .fc-table td:nth-child(3),
  .fc-table th:nth-child(5),
  .fc-table td:nth-child(5) {
    display: none;
  }
  .fc-m {
    display: block;
  }
  .table-wrap > table.t.fc-table {
    min-width: 0;
  }
  .fc-table td,
  .fc-table th {
    padding: 8px 6px;
  }
  .fc-table td.num {
    white-space: nowrap;
  }
}

/* Zwei-Faktor-Anmeldung */
.tf-steps {
  padding-left: 20px;
  display: grid;
  gap: 14px;
  margin: 10px 0 0;
}
.tf-qr {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 8px;
}
.tf-qr img {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 6px;
}
.tf-key {
  font-size: 13px;
  word-break: break-all;
}
.tf-form {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  max-width: 320px;
}
.tf-form input {
  font-size: 20px;
  letter-spacing: 4px;
  text-align: center;
}
.rc-codes {
  font-size: 17px;
  line-height: 1.7;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 16px;
  columns: 2;
}

/* Autopilot */
.ap-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ap-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
}
.ap-row:first-child {
  border-top: 0;
}
.ap-row input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  flex: none;
}

/* Dokument kam per E-Mail */
.dv-mail {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 8px;
  padding: 8px 12px;
  border-radius: var(--radius);
  background: var(--panel-2);
  border: 1px solid var(--line);
  font-size: 13px;
}
.dv-mail span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dv-mail .btn {
  flex: none;
}

/* Steuerberater-Versand */
.am-contents {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

/* NAVO AI */
.ai-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 10px 16px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  background: var(--accent, #005cfb);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}
.ai-fab span {
  font-size: 16px;
}
.ai-panel {
  position: fixed;
  right: 16px;
  bottom: 16px;
  top: 76px;
  width: min(420px, calc(100vw - 32px));
  z-index: 70;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}
.ai-panel header {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.ai-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ai-msg {
  max-width: 92%;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.ai-msg p {
  margin: 0 0 6px;
}
.ai-msg p:last-child {
  margin: 0;
}
.ai-msg ul {
  margin: 4px 0 6px 18px;
  padding: 0;
}
.ai-msg.user {
  align-self: flex-end;
  background: var(--accent, #005cfb);
  color: #fff;
  white-space: pre-wrap;
}
.ai-msg.assistant {
  align-self: flex-start;
  background: var(--panel-2);
  border: 1px solid var(--line);
}
.ai-msg.error {
  align-self: flex-start;
  background: rgba(220, 38, 38, 0.08);
  color: var(--bad, #b91c1c);
}
.ai-tools {
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted, #888);
}
.ai-prop {
  align-self: stretch;
  border: 1px solid var(--accent, #005cfb);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--panel, #fff);
  font-size: 13px;
}
.ai-prop-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}
.ai-prop-t {
  width: 100%;
  border-collapse: collapse;
  margin: 6px 0;
  font-size: 12px;
}
.ai-prop-t td {
  padding: 4px 4px;
  border-top: 1px solid var(--line);
  vertical-align: top;
}
.ai-prop-t td.num {
  text-align: right;
  white-space: nowrap;
}
.ai-prop-t tr.chk td:first-child .muted {
  color: var(--warn, #b45309);
}
.dict-wrap {
  position: relative;
  display: block;
}
.dict-wrap > textarea,
.dict-wrap > input {
  width: 100%;
  padding-right: 40px;
}
#noteF .dict-wrap {
  flex: 1;
}
.ai-form .dict-wrap {
  flex: 1;
  display: flex;
}
.ai-form .dict-wrap > textarea {
  flex: 1;
}
.dict-btn {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel, #fff);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  opacity: 0.75;
}
.dict-btn:hover {
  opacity: 1;
}
.dict-btn.rec {
  background: #dc2626;
  border-color: #dc2626;
  opacity: 1;
  animation: dictPulse 1.2s infinite;
}
@keyframes dictPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.5);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(220, 38, 38, 0);
  }
}
.ai-empty {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}
.ai-empty .chip {
  cursor: pointer;
  text-align: left;
}
.ai-form {
  display: flex;
  gap: 8px;
  padding: 10px 12px 4px;
  border-top: 1px solid var(--line);
}
.ai-form textarea {
  flex: 1;
  resize: none;
  min-height: 42px;
}
.ai-note {
  padding: 0 12px 10px;
}
@media (min-width: 701px) {
  .ai-panel header {
    cursor: grab;
    user-select: none;
    touch-action: none;
  }
  .ai-panel.dragging header {
    cursor: grabbing;
  }
  .ai-panel header .btn {
    cursor: pointer;
  }
}
.ai-panel.dragging {
  transition: none;
  opacity: 0.97;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}
.ai-panel.min {
  top: auto;
  height: auto !important;
}
.ai-panel.min > :not(header) {
  display: none !important;
}
.ai-panel.min header {
  border-bottom: 0;
}
@media (max-width: 700px) {
  .ai-panel.min {
    top: auto;
    inset: auto 0 0 0;
    border-radius: 16px 16px 0 0;
  }
}
@media (max-width: 700px) {
  .ai-panel {
    inset: 0;
    width: auto;
    border-radius: 0;
    top: 0;
  }
  .ai-fab {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }
}
/* Integrationscenter */
.ic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
.ic-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}
.ic-row:first-of-type {
  border-top: 0;
}
.ic-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ic-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-2);
  flex: none;
}
.ic-dot.ok {
  background: #16a34a;
}
.ic-dot.warn {
  background: #d97706;
}
.ic-row:hover {
  text-decoration: none;
}

/* Kalkulation je Position */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px 18px;
}
.calc-grid h3 {
  margin: 4px 0 6px;
  font-size: 14px;
}
.calc-grid .form {
  grid-template-columns: 1fr;
}
.calc-res {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--panel-2);
  border: 1px solid var(--line);
}
.calc-res div {
  display: flex;
  flex-direction: column;
}
.calc-res .big b {
  font-size: 20px;
}
.calc-sug {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-bottom: 8px;
  font-size: 13px;
}
.btn.calc-on {
  background: rgba(22, 163, 74, 0.12);
}
.accept-link {
  display: flex;
  gap: 8px;
}
.accept-link input {
  flex: 1;
  font-size: 13px;
}

/* Spesen: auf dem Handy als Karten statt Tabelle */
@media (max-width: 700px) {
  .exp-t thead {
    display: none;
  }
  .exp-t,
  .exp-t tbody,
  .exp-t tr,
  .exp-t td {
    display: block;
    width: 100%;
  }
  .exp-t tr {
    border-top: 1px solid var(--line);
    padding: 10px 0;
  }
  .exp-t tr:first-child {
    border-top: 0;
  }
  .exp-t td {
    border: 0 !important;
    padding: 2px 0 !important;
    text-align: left !important;
  }
  .exp-t td:first-child {
    font-weight: 600;
  }
  .exp-t td.exp-act {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
}

.abs-row.au-req {
  background: color-mix(in srgb, var(--bad, #c0392b) 6%, transparent);
  border-radius: var(--radius-sm);
  padding-left: 8px;
  padding-right: 8px;
}

/* Persönlicher Bereich – bewusst eigener, ruhiger Look (grün statt Firmenblau) */
.privat-view {
  --pr: #0f766e;
  --pr-soft: color-mix(in srgb, #0f766e 10%, var(--panel));
}
.pr-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  padding: 18px 20px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--pr-soft), var(--panel));
  border: 1px solid color-mix(in srgb, var(--pr) 25%, var(--line));
}
.pr-head h1 {
  margin: 2px 0 0;
}
.pr-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pr);
}
.pr-tabs {
  display: flex;
  gap: 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 3px;
  flex-wrap: wrap;
}
.pr-tabs button {
  border: 0;
  background: transparent;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 13.5px;
  color: var(--muted);
  cursor: pointer;
}
.pr-tabs button.on {
  background: var(--pr);
  color: #fff;
}
.privat-view .btn.primary {
  background: var(--pr);
  border-color: var(--pr);
}
.privat-view .row {
  display: flex;
}
.pr-cand {
  border-left: 4px solid var(--pr);
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.pr-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.pr-kpis .kpi {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pr-kpis .kpi b {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}
.pr-obj {
  margin-bottom: 14px;
  border-top: 3px solid var(--pr);
}
.cc-from select {
  width: auto;
  max-width: 260px;
  padding: 3px 6px;
  font-size: 13px;
}
@media (max-width: 700px) {
  .pr-head {
    padding: 14px;
  }
  .pr-tabs {
    width: 100%;
  }
  .pr-tabs button {
    flex: 1;
  }
}
.pr-area {
  margin-top: 8px;
  width: auto;
  max-width: 260px;
  font-size: 13px;
  padding: 4px 8px;
}

/* NAVO AI: Verlauf, Live-Antwort, Status */
.ai-panel header .btn.active {
  background: var(--panel-2);
}
.ai-sub {
  padding: 4px 12px 6px;
  border-bottom: 1px solid var(--line);
}
.ai-status {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  color: var(--muted, #888);
  margin-top: 4px;
}
.ai-live p:last-of-type {
  margin-bottom: 4px;
}
.ai-hist {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ai-hist-row {
  display: flex;
  gap: 4px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2px 4px 2px 0;
}
.ai-hist-row.cur {
  border-color: var(--accent, #005cfb);
}
.ai-hist-open {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
  background: none;
  border: 0;
  padding: 8px 10px;
  cursor: pointer;
  color: inherit;
  font: inherit;
  min-width: 0;
}
.ai-hist-open span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.ai-hist-open:hover {
  background: var(--panel-2);
  border-radius: var(--radius-sm);
}

/* Positionen: Titel + Beschreibung, Bild rechts */
.pos-desc {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.pos-desc > textarea,
.pos-text {
  flex: 1;
  min-width: 0;
}
.pos-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pos-title {
  font-weight: 650;
}
.pos-img.side {
  float: right;
  margin: 0 0 6px 10px;
  width: 96px;
  max-height: 110px;
  cursor: pointer;
}
.pos-desc .pos-img.side {
  float: none;
  margin: 0;
  flex: none;
  width: 64px;
  height: 64px;
  max-height: 64px;
}
.pos-body {
  color: var(--muted, #555);
}
.img-pick-top {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.img-pick-search {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.img-pick-search input {
  flex: 1;
  min-width: 0;
}
.img-pick-res h4 {
  margin: 12px 0 6px;
  font-size: 13px;
}
.img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}
.img-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card, #fff);
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}
.img-tile:hover {
  border-color: var(--accent, #005cfb);
}
.img-tile img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius-xs);
  background: #f2f3f5;
}
.img-tile span {
  font-size: 11px;
  line-height: 1.25;
  color: var(--muted, #666);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.img-tile.busy {
  opacity: 0.5;
}

/* NAVO AI: Anhänge */
.ai-form {
  align-items: flex-end;
}
.ai-clip {
  flex: none;
  font-size: 17px;
  padding: 6px 8px;
}
.ai-att:empty {
  display: none;
}
.ai-att {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 12px 0;
}
.ai-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  background: var(--card, #fff);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-chip button {
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 0 0 2px;
  color: inherit;
}
.ai-chip.busy {
  opacity: 0.75;
}
.ai-files {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.ai-msg.user .ai-chip {
  background: transparent;
  border-color: currentColor;
}
.ai-panel.drop {
  outline: 2px dashed var(--accent, #005cfb);
  outline-offset: -6px;
}

/* Umsatz zuordnen */
.tx-best {
  margin: 14px 0 4px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--ok, #1d7d3c) 45%, transparent);
  background: color-mix(in srgb, var(--ok, #1d7d3c) 8%, var(--panel, #fff));
}
.tx-more {
  margin-top: 14px;
}
.tx-more summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}
.tx-sel:empty {
  display: none;
}
.tx-sel {
  position: sticky;
  bottom: -1px;
  background: var(--panel, #fff);
  padding-bottom: 6px;
}

/* Website-Buttons */
.wb-row {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 4px 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.wb-row:first-of-type {
  border-top: 0;
}
.wb-row .muted {
  grid-column: 1 / -1;
}
@media (max-width: 700px) {
  .wb-row {
    grid-template-columns: 1fr;
  }
}

/* ----------: Menü in Gruppen, ausblendbar, ruhigere Oberfläche ---------- */
.menu-btn {
  display: inline-flex;
}
.app.side-hidden {
  grid-template-columns: 1fr;
}
.app.side-hidden .side {
  display: none;
}
@media (max-width: 1100px) {
  .app.side-hidden .side {
    display: flex;
  }
} /* gleiche Grenze wie MOBILE_Q in app.js */
.nav-grp {
  margin-top: 6px;
}
.nav-gh {
  all: unset;
  box-sizing: border-box;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--faint);
  padding: 10px 10px 4px;
}
.nav-gh:hover {
  color: var(--text);
}
.nav-caret {
  font-size: 10px;
}
.nav-grp.closed .nav-gi {
  display: none;
}
.nav-tail {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.nav-edit {
  opacity: 0.7;
  font-size: 13px;
}
.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin: -4px 0 18px;
}
.subnav a {
  padding: 9px 14px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  font-weight: 550;
  font-size: 14px;
}
.subnav a:hover {
  color: var(--text);
}
.subnav a.active {
  color: var(--text);
  border-bottom-color: var(--accent, #005cfb);
}
/* weniger Effekte: keine Übergangs- und Einblend-Animationen (Ladeanzeigen bleiben) */
*,
*::before,
*::after {
  transition: none !important;
  scroll-behavior: auto !important;
}
.toast,
.modal,
.modal-bg,
.card,
.gs-results {
  animation: none !important;
}
.menu-list li {
  cursor: grab;
}
.menu-edit {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.menu-edit .grp {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: var(--panel);
}
.menu-edit .grp-h {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}
.menu-edit .grp-h input {
  flex: 1;
  font-weight: 650;
}
.menu-edit ul {
  list-style: none;
  margin: 0;
  padding: 0;
  min-height: 36px;
}
.menu-edit li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin: 4px 0;
  background: var(--bg);
}
.menu-edit li.off {
  opacity: 0.5;
}
.menu-edit li .sp {
  flex: 1;
}
.menu-edit li.drag {
  outline: 2px dashed var(--accent, #005cfb);
}
.top {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: var(--bg) !important;
}
.bad-text {
  color: #c0392b;
  font-weight: 600;
}
.menu-edit li svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.mono {
  font-family: ui-monospace, Menlo, monospace;
}
.nowrap {
  white-space: nowrap;
}
.mail-btn {
  display: inline-block;
  margin: 2px 0;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.mail-btn:hover {
  text-decoration: none;
  filter: brightness(0.95);
}
.mail-preview.tall {
  width: 100%;
  height: 60vh;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.plan-t th,
.plan-t td {
  vertical-align: top;
  min-width: 130px;
}
.plan-cell {
  position: relative;
  padding-bottom: 28px !important;
}
.plan-cell.drop {
  outline: 2px dashed var(--accent);
}
.plan-today {
  background: var(--accent-soft);
}
.plan-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 5px 7px;
  margin: 0 0 5px;
  font-size: 13px;
  cursor: grab;
}
.plan-abs {
  font-size: 12px;
  color: #b45309;
  background: #fff7e6;
  border-radius: var(--radius-xs);
  padding: 2px 6px;
  margin-bottom: 4px;
}
.plan-add {
  position: absolute;
  right: 6px;
  bottom: 4px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
}
.plan-add:hover {
  color: var(--accent);
}

/* DMS: Archiv, Tabelle, Stempel, Verlauf */
.dms.tableview {
  grid-template-columns: 240px minmax(0, 1.6fr) minmax(360px, 1fr);
}
.dms.compact.tableview {
  grid-template-columns: minmax(0, 1.5fr) minmax(360px, 1fr);
}
.dms-table {
  width: 100%;
  font-size: 13px;
}
.dms-table th[data-sort] {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.dms-tablewrap {
  overflow-x: auto;
}
.dms-table tr.trow {
  cursor: pointer;
}
.dms-table td,
.dms-table th {
  padding: 6px 8px;
  vertical-align: middle;
}
.dms-table tr.trow.active td {
  background: var(--accent-soft, rgba(37, 99, 235, 0.08));
}
.dms-table tr.trow.sel td {
  background: rgba(37, 99, 235, 0.05);
}
.dms-table .dt-name {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.side-more > summary {
  cursor: pointer;
  list-style: none;
}
.side-more > summary::-webkit-details-marker {
  display: none;
}
.side-more > summary::after {
  content: ' ▸';
}
.side-more[open] > summary::after {
  content: ' ▾';
}
.side-cloud {
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 4px;
}
.stamp {
  --sc: #475569;
  display: inline-block;
  border: 2px solid var(--sc);
  color: var(--sc);
  border-radius: var(--radius-xs);
  padding: 3px 10px;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: transparent;
  cursor: pointer;
  transform: rotate(-2deg);
}
.stamp.sm {
  padding: 0 6px;
  font-size: 10px;
  border-width: 1.5px;
  cursor: default;
  margin-right: 4px;
}
.stamp:hover:not(.sm) {
  background: color-mix(in srgb, var(--sc) 10%, transparent);
}
.dv-retain {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
}
.timeline {
  margin-top: 8px;
}
.tl-row {
  display: flex;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.tl-row:last-child {
  border-bottom: 0;
}
.tl-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted, #94a3b8);
  margin-top: 5px;
  flex: none;
}
.catbars {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}
.catbar {
  display: grid;
  grid-template-columns: 180px 1fr 100px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}
.catbar .bar {
  height: 8px;
  background: var(--panel-2);
  border-radius: 4px;
  overflow: hidden;
}
.catbar .bar i {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
}
.value.bad {
  color: var(--bad);
}
@media (max-width: 700px) {
  .catbar {
    grid-template-columns: 1fr 80px;
  }
  .catbar .bar {
    display: none;
  }
}
/* Aufmaß aus Grundriss */
.tk {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 14px;
  height: calc(100vh - 170px);
  min-height: 520px;
}
.tk-canvas {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
}
.tk-tools {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.tk-stage {
  flex: 1;
  overflow: auto;
  background: #f1f5f9;
}
.tk-stage svg {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  touch-action: none;
}
.tk-room polygon {
  fill: rgba(37, 99, 235, 0.14);
  stroke: #2563eb;
  cursor: pointer;
}
.tk-room.sel polygon {
  fill: rgba(234, 88, 12, 0.18);
  stroke: #ea580c;
}
.tk-room text {
  fill: #1e293b;
  text-anchor: middle;
  font-weight: 700;
  pointer-events: none;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 3px;
}
.tk-room text.tk-sub {
  font-weight: 500;
}
.tk-v {
  fill: #fff;
  stroke: #ea580c;
  stroke-width: 2;
  cursor: move;
}
.tk-draft {
  fill: none;
  stroke: #16a34a;
  stroke-dasharray: 6 4;
}
.tk-dv {
  fill: #16a34a;
}
.tk-scale {
  stroke: #dc2626;
  stroke-dasharray: 8 4;
}
.tk-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
}
.tk-tab {
  font-size: 12.5px;
  margin-top: 6px;
}
.tk-tab tr.active td {
  background: rgba(234, 88, 12, 0.08);
}
.tk-op {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-bottom: 4px;
  font-size: 12px;
}
.tk-op input {
  width: 56px;
  padding: 3px 5px;
}
.tk-dl {
  margin-top: 8px;
  font-size: 13px;
}
tr.click {
  cursor: pointer;
}
@media (max-width: 900px) {
  .tk {
    grid-template-columns: 1fr;
    height: auto;
  }
  .tk-stage {
    height: 60vh;
  }
}
.ai-panel .ai-title {
  margin-left: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}
.ai-sug {
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.ai-newline {
  text-align: center;
  margin: 6px 0 2px;
}
.setup-bar {
  height: 8px;
  background: var(--panel-2);
  border-radius: 4px;
  overflow: hidden;
  margin: 0 0 16px;
}
.setup-bar i {
  display: block;
  height: 100%;
  background: var(--ok, #16a34a);
}
.setup-list {
  display: grid;
  gap: 10px;
  max-width: 860px;
}
.setup-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.setup-n {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--panel-2);
  font-weight: 700;
  flex: none;
}
.setup-step.ok .setup-n {
  background: #16a34a;
  color: #fff;
}
.setup-main {
  flex: 1;
  min-width: 0;
}
.setup-guide summary {
  cursor: pointer;
  color: var(--accent);
  margin-top: 4px;
}
.setup-guide ol,
.setup-guide ul {
  padding-left: 18px;
}
.setup-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  border-left: 3px solid var(--accent);
}
.dms-search {
  min-width: 0;
  flex: 1 1 160px;
}
.dms:not(.compact) .hide-narrow {
  display: none;
}
.dms.tableview .hide-narrow {
  display: inline;
}
.pop-menu {
  position: absolute;
  z-index: 1000;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
  padding: 6px;
  min-width: 210px;
  display: flex;
  flex-direction: column;
}
.pop-menu a,
.pop-menu button {
  text-align: left;
  background: none;
  border: 0;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}
.pop-menu a:hover,
.pop-menu button:hover {
  background: var(--panel-2);
}
.pop-menu .danger {
  color: var(--bad);
}
.pop-menu hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 4px 0;
}
.del-col {
  width: 34px;
  white-space: nowrap;
}
td.del-act {
  text-align: right;
}
.del-act .btn {
  opacity: 0.45;
}
tr:hover .del-act .btn,
.list-row:hover .del-act .btn {
  opacity: 1;
}
.del-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 8px;
  background: var(--panel-2);
  border-radius: var(--radius-sm);
}
.list-row > .del-col {
  display: inline-flex;
  align-items: center;
}
.list-row > .del-col:first-child + * {
  flex: 1;
  min-width: 0;
} /* Inhalt links bündig statt mittig zwischen Auswahl und Papierkorb */
.set-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.set-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  position: sticky;
  top: 70px;
}
.set-nav .set-g {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 12px 10px 4px;
}
.set-nav .set-g:first-child {
  margin-top: 0;
}
.set-nav button {
  text-align: left;
  background: none;
  border: 0;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 14px;
  color: inherit;
  cursor: pointer;
}
.set-nav button:hover {
  background: var(--panel-2);
}
.set-nav button.active {
  background: var(--panel);
  box-shadow: 0 0 0 1px var(--line);
  font-weight: 600;
}
@media (max-width: 800px) {
  .set-layout {
    grid-template-columns: 1fr;
  }
  .set-nav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }
  .set-nav .set-g {
    width: 100%;
    margin: 6px 0 0;
  }
}
.pop-menu svg {
  width: 16px;
  height: 16px;
  vertical-align: -3px;
  margin-right: 4px;
}
/* Posteingang (Outlook-Ansicht) */
.ib {
  display: grid;
  grid-template-columns: 210px minmax(300px, 400px) minmax(0, 1fr);
  height: calc(100vh - 110px);
  height: calc(100dvh - 110px);
  min-height: 460px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.ib-folders {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--panel-2);
  padding: 12px 8px;
  overflow-y: auto;
  min-height: 0;
}
.ib-top h1 {
  font-size: 20px;
  margin: 2px 6px 10px;
}
.ib-new {
  margin: 0 4px 10px;
  justify-content: center;
}
.ib-f {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  background: none;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 14px;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.ib-f:hover {
  background: var(--panel);
}
.ib-f.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.ib-f.drop {
  outline: 2px dashed var(--accent);
}
.ib-fl {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ib-f b {
  font-size: 12px;
  color: var(--accent);
}
.ib-fh {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 12px 10px 4px;
  min-height: 1px;
}
.ib-foot {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.ib-mode {
  margin-top: auto;
  display: flex;
  gap: 4px;
  padding-top: 12px;
}
.ib-mode button {
  flex: 1;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius-sm);
  padding: 6px 4px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  color: inherit;
}
.ib-mode button.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: transparent;
  font-weight: 600;
}
.ib-list {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border-right: 1px solid var(--line);
}
.ib-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}
.ib-bar .search {
  flex: 1;
  min-width: 0;
  margin: 0;
}
.ib-all {
  display: flex;
  padding: 0 4px;
}
.ib-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 8px 10px;
  background: var(--accent-soft);
  border-bottom: 1px solid var(--line);
}
.ib-actions b {
  margin-right: 4px;
  font-size: 13px;
}
.ib-rows {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  outline: none;
}
.ib-row {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  position: relative;
  border-left: 3px solid transparent;
}
.ib-row:hover {
  background: var(--panel-2);
}
.ib-row.active {
  background: var(--accent-soft);
}
.ib-row.sel {
  background: rgba(37, 99, 235, 0.07);
}
.ib-row.unread {
  border-left-color: var(--accent);
}
.ib-row.unread .ib-who,
.ib-row.unread .ib-l2 {
  font-weight: 700;
  color: var(--text);
}
.ib-chk {
  margin-top: 3px;
  flex: none;
}
.ib-main {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}
.ib-l1 {
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.ib-who {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}
.ib-when {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}
.ib-l2 {
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ib-l3 {
  font-size: 12.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ib-hover {
  position: absolute;
  right: 8px;
  top: 6px;
  display: none;
  gap: 2px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.ib-hover button:not(.btn) {
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 15px;
  padding: 4px 6px;
  border-radius: var(--radius-xs);
}
.ib-hover button:hover {
  background: var(--panel-2);
}
.ib-row:hover .ib-hover {
  display: flex;
}
.ib-read {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  background: var(--panel);
}
.ib-rhead {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 1;
}
.ib-tools {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.ib-rhead h2 {
  font-size: 19px;
  margin: 4px 0 10px;
}
.ib-meta {
  display: flex;
  gap: 10px;
  align-items: center;
}
.ib-assign {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
}
.ib-body {
  padding: 14px 18px;
}
.ib-frame {
  width: 100%;
  min-height: 420px;
  border: 0;
  background: #fff;
  border-radius: var(--radius-sm);
}
.toast.undo {
  display: flex;
  align-items: center;
  gap: 14px;
}
.toast.undo button {
  background: none;
  border: 0;
  color: #93c5fd;
  font-weight: 700;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}
@media (max-width: 1100px) {
  .ib {
    grid-template-columns: 170px minmax(260px, 340px) minmax(0, 1fr);
  }
}
@media (max-width: 800px) {
  .ib {
    grid-template-columns: 1fr;
    height: auto;
  }
  .ib-folders {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .ib-read:empty {
    display: none;
  }
  .ib-hover {
    display: flex;
    position: static;
    box-shadow: none;
  }
}
.doc-tabs {
  margin: 0 0 12px;
}
.tab-n {
  display: inline-block;
  min-width: 18px;
  padding: 0 6px;
  margin-left: 4px;
  border-radius: var(--radius);
  background: var(--panel-2);
  font-size: 11.5px;
  font-weight: 650;
  color: var(--muted);
}
.doc-tabs button.active .tab-n {
  background: var(--accent-soft);
  color: var(--accent);
}
.g5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
@media (max-width: 1200px) {
  .g5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .g5 {
    grid-template-columns: 1fr 1fr;
  }
}
/* Beteiligte & Gruppenchat */
.pt-card {
  margin-top: 16px;
  padding: 12px 16px;
}
.pt-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.pt-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.pt-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 999px;
  padding: 4px 12px 4px 4px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
}
.pt-chip:hover {
  border-color: var(--accent);
}
.pt-chip.online {
  border-color: #16a34a;
}
.pt-txt {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.pt-txt b {
  font-size: 13px;
}
.msgr-av.sm {
  width: 30px;
  height: 30px;
  font-size: 11px;
  position: relative;
}
.pt-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #94a3b8;
  border: 2px solid var(--panel);
}
.pt-dot.on {
  background: #16a34a;
}
.pt-team {
  margin-left: 6px;
}
.pt-access {
  margin-top: 12px;
  padding: 12px;
  background: var(--panel-2);
  border-radius: var(--radius);
}
.pt-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 8px 0;
}
.pt-drawer {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(420px, 100vw);
  background: var(--panel);
  border-left: 1px solid var(--line);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.12);
  z-index: 900;
  display: flex;
  flex-direction: column;
}
.pt-drawer header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.pt-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pt-msg {
  background: var(--panel-2);
  border-radius: var(--radius);
  padding: 8px 12px;
  max-width: 88%;
}
.pt-msg.me {
  align-self: flex-end;
  background: var(--accent-soft);
}
.pt-msg.ext {
  border-left: 3px solid #d97706;
}
.pt-form {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
}
.pt-form textarea {
  flex: 1;
}
/* DMS: Modus-Umschalter + Stapelverarbeitung */
.dms-modes {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 12px;
}
.dms-modes button {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 9px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  color: inherit;
}
.dms-modes button.active {
  background: var(--accent);
  color: var(--on-accent, #fff);
  border-color: var(--accent);
}
.dms-modes button.active .tab-n {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}
.stk {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 170px);
  height: calc(100dvh - 170px);
  min-height: 520px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.stk-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.stk-main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  min-height: 0;
}
.stk-view {
  overflow: auto;
  background: #e9edf2;
  padding: 16px;
  min-height: 0;
}
.stk-pdf {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.stk-pdf canvas {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  background: #fff;
  max-width: 100%;
}
.stk-img {
  display: flex;
  justify-content: center;
}
.stk-img img {
  max-width: 100%;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}
.stk-done {
  text-align: center;
  padding: 80px 20px;
}
.stk-side {
  border-left: 1px solid var(--line);
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.stk-name {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stk-fields {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.stk-fields label {
  display: grid;
  gap: 3px;
  font-size: 12px;
  color: var(--muted);
}
.stk-fields input,
.stk-fields select {
  font-size: 14px;
}
.stk-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.stk-ok {
  width: 100%;
  margin-top: 10px;
  justify-content: center;
}
.stk-keys {
  display: grid;
  gap: 5px;
}
.stk-kh {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-top: 6px;
}
.stk-k {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font: inherit;
  cursor: pointer;
  text-align: left;
  color: inherit;
}
.stk-k:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.stk-k:disabled {
  opacity: 0.45;
  cursor: default;
}
.stk-k kbd,
.stk-help kbd {
  display: inline-block;
  min-width: 24px;
  text-align: center;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--panel-2);
  font: 600 12px var(--font);
}
.stk-help {
  line-height: 2;
  margin-top: 6px;
}
.pp-list {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  max-height: 50vh;
  overflow: auto;
}
.pp-item {
  text-align: left;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.pp-item.first,
.pp-item:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
@media (max-width: 900px) {
  .stk-main {
    grid-template-columns: 1fr;
  }
  .stk-view {
    height: 55vh;
  }
}
.cloud-card {
  margin-top: 12px;
}
.ais-t td {
  vertical-align: top;
}
.ais-t select {
  max-width: 200px;
  margin-top: 4px;
}
.ais-why {
  color: var(--muted);
  margin-top: 3px;
}
.ais-conf {
  font-weight: 700;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
}
.ais-conf.hi {
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
}
.ais-conf.mid {
  background: rgba(217, 119, 6, 0.12);
  color: #d97706;
}
.ais-conf.lo {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}
.stk-ai {
  border: 1px dashed var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 8px 10px;
  font-size: 13px;
}

/* ---------- Nachrichten (Messenger) ---------- */
.cx .msgr-av {
  font-size: 15px;
}
.cx .chat-scroll {
  padding: 14px 16px 10px;
}
.cx .bubble {
  min-width: 0;
}
.cx-img {
  display: block;
  max-width: min(320px, 100%);
  max-height: 320px;
  border-radius: var(--radius-sm);
  margin: 2px 0 4px;
  object-fit: cover;
  background: var(--panel-2);
}
.cx-quote {
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  border-radius: var(--radius-xs);
  padding: 4px 8px;
  margin: 2px 0 6px;
  font-size: 12.5px;
}
.cx-quote div {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 420px;
}
.cx-del .bubble {
  opacity: 0.6;
}
.cx-replybar {
  display: flex;
  align-items: center;
  gap: 8px;
  border-left: 3px solid var(--accent);
  background: var(--panel-2);
  border-radius: var(--radius-xs);
  padding: 6px 8px;
}
.cx-replybar > div {
  flex: 1;
  min-width: 0;
}
.cx-replybar .muted {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cx-people {
  display: grid;
  gap: 2px;
  max-height: 50vh;
  overflow-y: auto;
}
.cx-people > div {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 6px 4px;
}
.cx-person {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 0;
  background: none;
  border-radius: var(--radius-sm);
  color: var(--text);
  font: 500 14px var(--font);
  cursor: pointer;
  text-align: left;
  text-decoration: none;
}
.cx-person:hover {
  background: var(--accent-soft);
  text-decoration: none;
}
.cx-link {
  display: flex;
  gap: 8px;
}
.cx-link input {
  flex: 1;
  min-width: 0;
}
.cx .chat-compose {
  position: static;
}
.cx .cc-row textarea {
  min-height: 40px;
}
@media (max-width: 700px) {
  .cx .msgr-head .btn.sm {
    padding: 4px 8px;
  }
  .cx-img {
    max-width: 100%;
  }
}
.cx-offline {
  margin: 8px 12px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 13px;
}
.cx-pending .bubble {
  opacity: 0.7;
  border: 1px dashed var(--line-2);
}
.nav-badge.muted-badge {
  background: var(--line-2);
  color: var(--text);
}
@keyframes liveBump {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.18);
  }
  100% {
    transform: scale(1);
  }
}
.live-bump {
  animation: liveBump 0.35s ease-out;
  display: inline-block;
}
.stk-loading {
  display: grid;
  place-items: center;
  height: 100%;
  min-height: 240px;
}
.set-select {
  display: none;
}
@media (max-width: 800px) {
  .set-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .set-layout > * {
    min-width: 0;
  }
  .set-nav {
    display: none;
  }
  .set-select {
    display: block;
    width: 100%;
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 600;
    padding: 10px 12px;
  }
}
@media (max-width: 820px) {
  .top .spacer {
    display: none;
  }
  .top {
    gap: 8px;
  }
}
/* Mobil: Reiterleisten in einer Zeile wischen, Tabellen seitlich scrollen statt quetschen */
@media (max-width: 820px) {
  .subnav {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .subnav::-webkit-scrollbar {
    display: none;
  }
  .subnav a {
    white-space: nowrap;
    flex: none;
  }
  :has(> table.t) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .t td {
    min-width: 84px;
  }
  .t td:has(> input[type='checkbox']:only-child),
  .t th:has(> input[type='checkbox']:only-child) {
    min-width: 0;
    width: 28px;
  }
  .t td:nth-child(-n + 2),
  .t td.num,
  .t th.num {
    white-space: nowrap;
  }
}
@media (max-width: 600px) {
  .hide-touch {
    display: none;
  }
} /* Tastatur-Hinweise ergeben auf dem Handy keinen Sinn */
/* Angebote/Rechnungen auf dem Handy als Karten: Nummer + Betrag, Kunde + Status, Datum · Projekt – nichts mehr seitlich verborgen */
@media (max-width: 600px) {
  .table-wrap > table.t.doc-t {
    min-width: 0;
  }
  table.t.doc-t thead {
    display: none;
  }
  table.t.doc-t tr {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    column-gap: 10px;
    row-gap: 2px;
    padding: 10px 2px;
    border-bottom: 1px solid var(--line);
  }
  table.t.doc-t tr:last-child {
    border-bottom: 0;
  }
  table.t.doc-t td {
    display: block;
    min-width: 0;
    padding: 0;
    border: 0;
    white-space: normal;
  }
  table.t.doc-t td.del-col:not(.del-act) {
    grid-column: 1;
    grid-row: 1 / span 3;
    width: auto;
  }
  table.t.doc-t .c-no {
    grid-column: 2;
    grid-row: 1;
  }
  table.t.doc-t .c-gross {
    grid-column: 3;
    grid-row: 1;
    text-align: right;
    font-weight: 550;
  }
  table.t.doc-t .c-cust {
    grid-column: 2;
    grid-row: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  table.t.doc-t .c-st {
    grid-column: 3;
    grid-row: 2;
    text-align: right;
  }
  table.t.doc-t .c-date {
    grid-column: 2;
    grid-row: 3;
    font-size: 12px;
    color: var(--muted);
  }
  table.t.doc-t .c-proj {
    grid-column: 2;
    grid-row: 4;
    color: var(--muted);
  }
  table.t.doc-t .c-proj:empty,
  table.t.doc-t .c-art,
  table.t.doc-t .c-open:empty {
    display: none;
  }
  table.t.doc-t .c-open {
    grid-column: 3;
    grid-row: 3;
    text-align: right;
    font-size: 12px;
    color: var(--muted);
  }
  table.t.doc-t .c-open::before {
    content: 'offen ';
  }
  table.t.doc-t td.del-act {
    grid-column: 3;
    grid-row: 4;
    width: auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
  }
}
/* Briefkorb im Vollbild: nur Vorschau und Bedienfeld */
.stk-sidewrap {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-left: 1px solid var(--line);
}
.stk-sidewrap .stk-side {
  border-left: 0;
  flex: 1;
}
.stk-fbar {
  display: none;
  gap: 4px;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}
.stk.full {
  position: fixed;
  inset: 0;
  z-index: 900;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  border-radius: 0;
  border: 0;
}
.stk.full .stk-bar {
  display: none;
}
.stk.full .stk-fbar {
  display: flex;
}
.stk.full .stk-main {
  grid-template-columns: minmax(0, 1fr) 380px;
}
body.stk-fullscreen {
  overflow: hidden;
}
body.stk-fullscreen .ai-fab,
body.stk-fullscreen #aiFab {
  display: none !important;
}
@media (max-width: 900px) {
  .stk.full .stk-main {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
  .stk.full .stk-view {
    height: 60vh;
  }
  .stk-sidewrap {
    border-left: 0;
  }
}
/* Einsatzplanung: Tagesbesatzung per Ziehen */
.plan-staff {
  margin-bottom: 12px;
  position: sticky;
  top: 0;
  z-index: 5;
}
.plan-staff.drop {
  outline: 2px dashed var(--accent);
}
.plan-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.plan-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-size: 12.5px;
  cursor: grab;
  user-select: none;
}
.plan-chip:hover {
  border-color: var(--accent);
}
.plan-chip.picked {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.plan-chip.in {
  background: var(--accent-soft);
  border-color: transparent;
  padding: 2px 4px 2px 8px;
}
.plan-chip.in.day {
  border: 1px dashed var(--accent);
}
.plan-chip.in.abs {
  background: #fff1e6;
  color: #b45309;
}
.plan-chip button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 0 2px;
}
.plan-chip button:hover {
  color: var(--bad, #c0392b);
}
.plan-crew {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}
.plan-veh.drop {
  outline: 2px dashed var(--accent);
}
/* Standortverlauf */
.trk-svg {
  width: 100%;
  height: auto;
  background: var(--bg, #f5f6f8);
  border-radius: var(--radius);
  margin-bottom: 6px;
}
.trk-tl {
  display: grid;
  gap: 2px;
}
.trk-row {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 8px;
  align-items: start;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.trk-n {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 700;
}
.trk-row.gap {
  opacity: 0.75;
}
.stk-new {
  border: 1px dashed var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 8px 10px;
  margin-top: 10px;
  display: grid;
  gap: 4px;
}
.stk-new .chk {
  display: block;
  line-height: 1.4;
}
.stk-more {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}
.stk-more .btn {
  flex: 1;
  justify-content: center;
}
.plan-multi {
  margin-top: 10px;
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 8px;
}
.plan-days {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.plan-day {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12.5px;
  cursor: pointer;
}
.plan-day:has(input:checked) {
  border-color: var(--accent, #2563eb);
  background: color-mix(in srgb, var(--accent, #2563eb) 12%, transparent);
}
.stk-auto {
  display: inline-flex;
  gap: 2px;
  align-items: center;
}
.stk-auto.on #stkAutoTgl {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #2563eb) 18%, transparent);
}
.stk-bar {
  flex-wrap: wrap;
  row-gap: 6px;
}
.stk-bar > b {
  white-space: nowrap;
}
#stkAuto {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  flex-wrap: nowrap;
}
.trial-pill {
  background: color-mix(in srgb, var(--accent, #2563eb) 12%, transparent);
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  font-size: 12.5px;
}
@media (max-width: 600px) {
  .trial-pill b {
    display: none;
  }
}
.calc-kpi {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.calc-kpi summary {
  cursor: pointer;
  font-size: 13.5px;
}

/* Erste Schritte (Startseite) */
.ob-bar {
  height: 8px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
}
.ob-bar span {
  display: block;
  height: 100%;
  background: var(--ok, #158a43);
  border-radius: 99px;
}
.ob-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.ob-step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
}
.ob-step > span:last-child {
  display: flex;
  flex-direction: column;
}
.ob-step:hover {
  border-color: var(--accent);
}
.ob-step.next {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent) inset;
}
.ob-step.done {
  opacity: 0.6;
}
.ob-step.done b {
  text-decoration: line-through;
}
.ob-chk {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-top: 1px;
}
.ob-step.done .ob-chk {
  background: var(--ok, #158a43);
  border-color: var(--ok, #158a43);
}

.plan-route {
  display: inline-block;
  margin: 2px 4px 2px 0;
  color: var(--accent);
  text-decoration: none;
}
.plan-route:hover {
  text-decoration: underline;
}

/* Live-Vorschau im Beleg-Editor */
.live-prev {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(46vw, 760px);
  background: var(--panel-2, #f3f4f6);
  border-left: 1px solid var(--line);
  z-index: 40;
  display: flex;
  flex-direction: column;
  box-shadow: -6px 0 20px rgba(0, 0, 0, 0.08);
}
.live-prev .lp-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel, #fff);
}
.live-prev .lp-body {
  flex: 1;
  overflow: auto;
  padding: 14px;
}
.live-prev .pdf-page {
  display: block;
  margin: 0 auto 14px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.18);
  background: #fff;
}
.live-prev .pdf-info {
  display: none;
}
body.live-open .main {
  margin-right: min(46vw, 760px);
  min-width: 0;
} /* Formular und Kopfleiste enden vor der Vorschau */
#liveBtn.active {
  border-color: var(--accent);
  color: var(--accent);
}
@media (max-width: 900px) {
  .live-prev {
    width: 100vw;
  }
  body.live-open .main {
    margin-right: 0;
  }
}

/* Hilfe-Center */
.help-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100vw);
  background: var(--panel, #fff);
  border-left: 1px solid var(--line);
  z-index: 60;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.12);
}
.help-drawer .hd-head {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.help-drawer .hd-search {
  padding: 12px 16px;
}
.help-drawer .hd-search input {
  width: 100%;
}
.help-drawer .hd-body {
  flex: 1;
  overflow: auto;
  padding: 0 16px 20px;
}
.help-drawer .hd-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 12px 2px;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.help-drawer .hd-item:hover b {
  color: var(--accent);
}
.help-drawer .hd-art {
  line-height: 1.55;
}
.help-drawer .hd-art li {
  margin: 4px 0;
}

.wx-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.wx-day {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px;
  text-align: center;
}
.wx-day.warn {
  border-color: var(--bad);
}
.wx-ic {
  font-size: 24px;
  line-height: 1.3;
  color: var(--muted);
}
.wx-ic svg {
  width: 26px;
  height: 26px;
  vertical-align: middle;
}

.addr-sug {
  position: absolute;
  z-index: 200;
  background: var(--panel, #fff);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}
.addr-sug button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 9px 12px;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.addr-sug button:hover {
  background: var(--panel-2, #f3f4f6);
}

.ph-hero {
  border-left: 3px solid var(--accent);
}
.ph-vstatus {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  margin-bottom: 8px;
  font-size: 13px;
}
.ph-vstatus.ok {
  background: var(--ok-soft);
  border-color: transparent;
}
.ph-vstatus.ok b {
  color: var(--ok);
}
.ph-vstatus.warn {
  background: var(--warn-soft);
  border-color: transparent;
}
.hint-box.ok {
  background: var(--ok-soft);
}
.ph-dg {
  color: var(--ok);
  font-weight: 600;
}
.ph-dg.bad {
  color: var(--bad);
}
.ph-vapi code {
  word-break: break-all;
}
.ph-tr {
  line-height: 1.6;
  max-height: 60vh;
  overflow: auto;
}

.stb-sec {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.stb-sec:first-child {
  border-top: 0;
  padding-top: 0;
}

.liq.liq-min .liq-det {
  display: none;
}
.liq.liq-min .liq-fc {
  margin-top: 6px;
}

.badge.conn {
  letter-spacing: 0.04em;
  font-weight: 700;
  font-size: 11px;
  vertical-align: middle;
}
.badge.conn .conn-l {
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  opacity: 0.85;
  margin-left: 6px;
}

/* Firmenwechsel (Mehrfirmen) */
.brand-switch {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.brand-switch:hover {
  color: var(--accent);
}
.co-menu {
  position: fixed;
  z-index: 80;
  min-width: 260px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  padding: 6px;
  overflow: hidden;
}
.co-menu .co-head {
  padding: 6px 10px 4px;
}
.co-menu .co-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: inherit;
  text-decoration: none;
  font-weight: 550;
}
.co-menu .co-item:hover {
  background: var(--panel-2);
}
.co-menu .co-item.cur {
  color: var(--accent);
}
.co-menu .co-add {
  border-top: 1px solid var(--line);
  border-radius: 0;
  margin-top: 4px;
  padding-top: 10px;
  font-weight: 500;
  color: var(--accent);
}

/* ===================== Anmeldung ===================== */
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}
.login {
  width: min(960px, 100%);
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  border-radius: 24px;
  overflow: hidden;
  box-shadow:
    0 30px 80px -30px rgba(0, 0, 0, 0.35),
    0 0 0 1px var(--line);
  background: var(--panel);
}
.login-side {
  position: relative;
  padding: 44px 40px;
  color: #fff;
  background:
    radial-gradient(900px 500px at 10% 0%, rgba(255, 255, 255, 0.18), transparent 60%),
    linear-gradient(160deg, #0a5cdb 0%, #0848ad 55%, #1d1d1f 140%);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.login-side h2 {
  margin: 26px 0 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #fff;
}
.login-side p {
  margin: 0;
  opacity: 0.8;
  font-size: 13px;
}
.login-side .logo {
  height: 36px;
  filter: brightness(0) invert(1);
}
.login-side .logo.dark {
  display: none !important;
}
.login-side .logo.light {
  display: block !important;
}
.login-feats {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  gap: 14px;
}
.login-feats li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.4;
}
.login-feats li div div {
  opacity: 0.78;
}
.login-ico {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.14);
  display: grid;
  place-items: center;
  font-size: 17px;
  backdrop-filter: blur(6px);
}
.login-foot {
  margin-top: auto;
  padding-top: 26px;
  font-size: 12px;
  opacity: 0.65;
}
.login-form.card {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 44px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-form h1 {
  font-size: 28px;
}
.login-form form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}
.login-form .f {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  display: grid;
  gap: 6px;
}
.login-form input {
  min-height: 44px;
  font-size: 15px;
  padding: 9px 12px;
}
.login-brand.mobile {
  display: none;
  margin-bottom: 18px;
}
.pw-wrap {
  position: relative;
}
.pw-wrap input {
  padding-right: 42px;
}
.pw-eye {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--faint);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.pw-eye svg {
  width: 18px;
  height: 18px;
}
.pw-eye:hover,
.pw-eye.on {
  color: var(--accent);
  background: var(--accent-soft);
}
.btn.lg {
  height: 46px;
  font-size: 15px;
  justify-content: center;
  border-radius: 12px;
}
.login-form .btn.primary.lg {
  margin-top: 4px;
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.login-form .btn.primary.lg:hover {
  background: var(--accent-2);
}
.login-form .error:empty {
  display: none;
}
@media (max-width: 760px) {
  .login {
    grid-template-columns: 1fr;
    border-radius: 18px;
  }
  .login-side {
    display: none;
  }
  .login-brand.mobile {
    display: block;
  }
  .login-form.card {
    padding: 28px 22px;
  }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .login {
    box-shadow: 0 0 0 1px var(--line);
  }
}
.login.single {
  grid-template-columns: 1fr;
  width: min(560px, 100%);
  border-radius: 20px;
}
.login.single .card {
  border: 0;
  box-shadow: none;
  padding: 36px;
}

/* ===================== NAVO – Apple-Look (klar, weich, ruhig) ===================== */
:root {
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --bg: #f5f5f7;
  --panel-2: #f7f7f9;
  --line: #e5e5ea;
  --line-2: #d1d1d6;
  --accent: #0071e3;
  --accent-2: #0077ed;
  --accent-soft: #e8f0fe;
  --shadow: 0 1px 1px rgba(0, 0, 0, 0.03), 0 8px 28px -14px rgba(0, 0, 0, 0.14);
  --glass: rgba(245, 245, 247, 0.72);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #000;
    --panel: #1c1c1e;
    --panel-2: #2c2c2e;
    --line: #2c2c2e;
    --line-2: #3a3a3c;
    --accent: #0a84ff;
    --accent-2: #409cff;
    --accent-soft: #0a2a4f;
    --glass: rgba(0, 0, 0, 0.6);
    --shadow: none;
  }
}
:root[data-theme='dark'] {
  --bg: #000;
  --panel: #1c1c1e;
  --panel-2: #2c2c2e;
  --line: #2c2c2e;
  --line-2: #3a3a3c;
  --accent: #0a84ff;
  --accent-2: #409cff;
  --accent-soft: #0a2a4f;
  --glass: rgba(0, 0, 0, 0.6);
  --shadow: none;
}
body {
  font-size: 14px;
  line-height: 1.47;
  letter-spacing: -0.008em;
}
h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.025em;
}
h2 {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.015em;
}
h3 {
  font-weight: 650;
  letter-spacing: -0.01em;
}
/* Seitenleiste als Glasfläche */
.side {
  background: var(--glass);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  border-right: 1px solid var(--line);
  padding: 18px 12px 14px;
}
.nav a {
  padding: 8px 11px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 13.5px;
  transition: background 0.12s ease;
}
.nav a:hover {
  background: color-mix(in srgb, var(--text) 6%, transparent);
}
.nav a.active {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  box-shadow: none;
}
.nav a.active svg {
  color: #fff;
}
.side-foot {
  border-top: 1px solid var(--line);
  color: var(--muted);
}
/* Kopfleiste */
.top {
  background: var(--glass);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  padding: 10px 28px;
  min-height: 54px;
}
.top .btn {
  border-radius: 10px;
}
.top .search,
.top input[type='search'] {
  background: color-mix(in srgb, var(--text) 5%, transparent);
  border-color: transparent;
  border-radius: 10px;
  min-height: 34px;
}
.top .search:focus,
.top input[type='search']:focus {
  background: var(--panel);
  border-color: var(--accent);
}
/* Karten und Kennzahlen */
.card {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 20px;
}
.card.kpi {
  padding: 18px 20px;
}
.kpi .value {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.kpi .label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
}
/* Schaltflächen: weich, Hauptaktion in Apple-Blau */
.btn {
  border-radius: 10px;
  height: 34px;
  font-weight: 550;
  border-color: var(--line-2);
  background: var(--panel);
  transition:
    background 0.12s ease,
    transform 0.08s ease;
}
.btn:hover {
  background: var(--panel-2);
}
.btn:active {
  transform: scale(0.985);
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn.primary:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
}
.btn.ghost {
  border-color: transparent;
  background: transparent;
}
.btn.ghost:hover {
  background: color-mix(in srgb, var(--text) 6%, transparent);
}
.btn.sm {
  border-radius: 8px;
}
.btn.danger {
  color: var(--bad);
}
/* Eingaben: gruppiert, großzügig */
input,
select,
textarea {
  border-radius: 10px;
  border-color: var(--line-2);
  min-height: 36px;
  background: var(--panel);
  transition:
    border-color 0.12s ease,
    box-shadow 0.12s ease;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}
label.f {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  gap: 5px;
}
input[type='checkbox'],
input[type='radio'] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}
/* Reiter als Segmentsteuerung */
.tabs {
  border-bottom: 0;
  gap: 2px;
  padding: 3px;
  background: color-mix(in srgb, var(--text) 6%, transparent);
  border-radius: 11px;
  width: max-content;
  max-width: 100%;
  margin-bottom: 18px;
}
.tabs button {
  padding: 6px 14px;
  border-radius: 8px;
  border-bottom: 0;
  margin-bottom: 0;
  font-size: 13px;
  font-weight: 550;
  color: var(--muted);
  transition:
    background 0.12s ease,
    color 0.12s ease;
}
.tabs button.active {
  background: var(--panel);
  color: var(--text);
  border-color: transparent;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.1),
    0 0 0 0.5px rgba(0, 0, 0, 0.04);
}
.tabs button:hover:not(.active) {
  color: var(--text);
}
/* Tabellen */
.t th {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--faint);
  padding: 8px 12px;
}
.t td {
  padding: 11px 12px;
}
.t tr.click:hover td {
  background: color-mix(in srgb, var(--accent) 5%, var(--panel));
}
.t tr.click td:first-child {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}
.t tr.click td:last-child {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}
/* Badges, Dialoge, Hinweise */
.badge {
  font-weight: 600;
  font-size: 11.5px;
  padding: 3px 9px;
}
.modal-bg {
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal {
  border-radius: 20px;
  box-shadow:
    0 40px 100px -20px rgba(0, 0, 0, 0.45),
    0 0 0 0.5px rgba(0, 0, 0, 0.08);
}
.modal header {
  padding: 18px 22px 14px;
  border-bottom-color: var(--line);
}
.modal header h2 {
  font-size: 18px;
}
.modal .body {
  padding: 18px 22px;
}
.modal footer {
  padding: 14px 22px;
  background: var(--panel-2);
  border-top-color: var(--line);
  border-radius: 0 0 20px 20px;
}
.toast {
  border-radius: 14px;
  padding: 11px 16px;
  backdrop-filter: blur(10px);
  font-weight: 500;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.35);
}
.hint-box {
  border-radius: 12px;
}
.pill {
  border-radius: 999px;
}
.ai-fab {
  box-shadow: 0 10px 30px -10px rgba(0, 113, 227, 0.6);
}
.ai-panel {
  border-radius: 20px;
}
.co-menu,
.help-drawer {
  border-radius: 16px;
}
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--text) 18%, transparent);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-track {
  background: transparent;
}
@media (max-width: 900px) {
  .tabs {
    width: 100%;
    overflow-x: auto;
  }
}
/* Eigenes Firmenlogo oben links (Einstellungen → Firma & Logo); NAVO dann klein unten */
.side .logo.co-logo {
  height: auto;
  max-height: 44px;
  max-width: 180px;
  width: auto;
  object-fit: contain;
  display: block;
}
.side-foot .powered {
  margin-top: 8px;
  opacity: 0.55;
}
.side-foot .powered .logo.xs {
  height: 16px;
}
/* Kontostand-Karte auf der Übersicht */
.card.konto {
  margin-bottom: 16px;
}
.konto-row {
  display: flex;
  gap: 28px;
  align-items: center;
  flex-wrap: wrap;
}
.konto-sum {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.konto-acc {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 240px;
}
.konto-acc a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: inherit;
  font-size: 13px;
  padding: 2px 0;
}
.konto-acc a:hover {
  text-decoration: none;
  color: var(--accent);
}
.konto-acc b {
  font-variant-numeric: tabular-nums;
}
/* Hinweis-Banner, Wartungsseite, Rückmeldung */
#banners {
  padding: 12px 32px 0;
  max-width: 1480px;
  margin: 0 auto;
  width: 100%;
}
.nb {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  margin-bottom: 8px;
  background: var(--info-soft);
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--info) 25%, transparent);
}
.nb span {
  flex: 1;
}
.nb-ok {
  background: var(--ok-soft);
  border-color: color-mix(in srgb, var(--ok) 25%, transparent);
}
.nb-warn {
  background: var(--warn-soft);
  border-color: color-mix(in srgb, var(--warn) 30%, transparent);
}
.maint {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  display: grid;
  place-items: center;
  padding: 24px;
}
.maint-box {
  text-align: center;
  max-width: 440px;
}
.maint-box .logo {
  margin: 0 auto 24px;
}
.maint-box h1 {
  margin-bottom: 8px;
}
.hd-fb {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.tips .tip {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.tips .tip:last-child {
  border-bottom: 0;
}
.tips .tip b {
  display: block;
}
.tips .tip .tx {
  flex: 1;
  font-size: 13px;
}
.tips .tip .gain {
  color: var(--ok);
  font-size: 12px;
  font-weight: 600;
  margin-left: 8px;
}
.tips .tip .ico {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex: none;
  font-size: 15px;
}
.tips .tip.warn .ico {
  background: var(--warn-soft);
  color: var(--warn);
}
.tips .tip .ico svg {
  width: 17px;
  height: 17px;
}

/* Verarbeitung läuft (Texterkennung / NAVO AI): grüner, drehender Ring neben „Dokumente“ */
.nav-work {
  margin-left: auto;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(52, 199, 89, 0.25);
  border-top-color: #34c759;
  animation: nav-spin 1s linear infinite;
  flex: 0 0 auto;
}
.nav-badge + .nav-work,
.nav-work + .nav-badge {
  margin-left: 6px;
}
@keyframes nav-spin {
  to {
    transform: rotate(360deg);
  }
}
.work-text {
  font-size: 12px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.work-text:before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(52, 199, 89, 0.25);
  border-top-color: #34c759;
  animation: nav-spin 1s linear infinite;
}

/* Schnell umsortieren (Dokumente) */
.qm-q {
  width: 100%;
  font-size: 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
}
.qm-list {
  max-height: 50vh;
  overflow: auto;
  margin-top: 8px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
}
.qm-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--line-2);
}
.qm-item:last-child {
  border-bottom: 0;
}
.qm-item.sel {
  background: var(--accent);
  color: #fff;
}
.qm-item.sel .muted {
  color: rgba(255, 255, 255, 0.8);
}
.qm-item b {
  flex: 1;
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.toast-undo {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
}

/* Ankreuzfragen der KI */
.stk-q {
  margin: 8px 0;
  padding: 10px 12px;
  border: 1px solid #f5c842;
  background: #fff8e1;
  border-radius: var(--radius);
}
.stk-q-h {
  font-size: 13px;
  margin-bottom: 6px;
}
.stk-q-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  margin: 4px 0;
  cursor: pointer;
  font: inherit;
  color: var(--text);
}
.stk-q-opt:hover {
  border-color: var(--accent);
  background: var(--accent-soft, #eef4ff);
}
.stk-q-opt.none {
  color: var(--muted);
}
.stk-q-box {
  width: 16px;
  height: 16px;
  border: 2px solid var(--muted);
  border-radius: 4px;
  flex: 0 0 auto;
}
.stk-q-opt:hover .stk-q-box {
  border-color: var(--accent);
}
.stk-q-opt:hover .stk-q-box:after {
  content: '✓';
  display: block;
  font-size: 12px;
  line-height: 12px;
  text-align: center;
  color: var(--accent);
}
.stk-q-free {
  display: flex;
  gap: 6px;
  margin: 6px 0 4px;
}
.stk-q-free input {
  flex: 1;
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: #fff;
  color: var(--text);
}
.stk-q.done {
  background: #eaf7ee;
  border-color: #8fd19e;
}
.stk-q-msg.neg {
  color: var(--bad);
}
.ai-act {
  margin-top: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #eaf7ee;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Buchhaltung */
.chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.chip.active .muted {
  color: rgba(255, 255, 255, 0.8);
}
.bh-t tr.active td {
  background: var(--accent-soft, #eef4ff);
}
.kpi.warn .value {
  color: #b45309;
}
.bh-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.bh-split {
  grid-template-columns: minmax(0, 1fr) 360px;
}
@media (max-width: 1100px) {
  .bh-split {
    grid-template-columns: 1fr;
  }
}

/* NAVO-AI-Knopf, Kennzahlen auf dem Handy, Reiter */
.ai-fab b {
  font-weight: 600;
}
.ai-fab.in-top {
  position: static;
  flex: none;
  height: 34px;
  padding: 0 14px;
  font-size: 13px;
  box-shadow: none;
  justify-content: center;
}
.content {
  padding-bottom: 96px;
}
.fin-kpis > *,
.g5 > *,
.kpi,
.kpi > * {
  min-width: 0;
}
.kpi .value {
  overflow-wrap: anywhere;
}
.subnav {
  scroll-behavior: smooth;
}
.tabs {
  box-sizing: border-box;
}
@media (max-width: 720px) {
  .fin-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .g5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .g5 > :first-child:nth-last-child(5),
  .g5 > :first-child:nth-last-child(3) {
    grid-column: span 2;
  } /* ungerade Kartenzahl: erste Karte volle Breite statt einer verwaisten letzten */
  .kpi .value {
    font-size: clamp(17px, 5.6vw, 24px);
  }
  .ai-fab {
    width: 52px;
    height: 52px;
    padding: 0;
    justify-content: center;
    right: 14px;
  }
  .ai-fab b {
    display: none;
  }
  .ai-fab span {
    font-size: 22px;
  }
  .ai-fab.in-top {
    width: 34px;
    height: 34px;
    padding: 0;
  }
  .ai-fab.in-top span {
    font-size: 16px;
  }
  .subnav {
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
    mask-image: linear-gradient(90deg, #000 88%, transparent);
  }
}
.logo {
  max-width: 100%;
}
.pt-head {
  flex-wrap: wrap;
  row-gap: 8px;
}
/* weitere Firmennamen */
.oc-list {
  display: grid;
  gap: 8px;
}
.oc-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, 1.4fr) auto;
  gap: 10px;
  align-items: end;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2, transparent);
}
.oc-row .f {
  margin: 0;
}
@media (max-width: 720px) {
  .oc-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .oc-row .f:not(:first-child) {
    grid-column: 1 / -1;
  }
}
@media (max-width: 720px) {
  .oc-row [data-del] {
    grid-row: 1;
    grid-column: 2;
  }
}

/* Offene Posten */
.op-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-width: 2px;
}
.op-card.on {
  border-color: var(--accent, #005cfb);
}
.op-card .value {
  font-size: 24px;
  font-weight: 700;
}
.op-bar {
  display: flex;
  height: 8px;
  border-radius: 99px;
  overflow: hidden;
  background: var(--line);
  margin-top: 8px;
}
.op-bar span {
  display: block;
  height: 100%;
}
.op-b0 {
  background: #22a06b;
}
.op-b1 {
  background: #e2a400;
}
.op-b2 {
  background: #e5701b;
}
.op-b3 {
  background: #d13b3b;
}
.op-leg {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 6px;
}
.op-leg i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 4px;
  vertical-align: middle;
}
.op-leg b {
  color: var(--text);
  font-weight: 600;
}

/* Layout-Studio */
.ls {
  display: grid;
  grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.ls-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
  margin: 10px 0 6px;
}
.ls-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
  padding: 8px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.ls-card canvas {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1.414;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.ls-card b {
  font-size: 13px;
  margin-top: 4px;
}
.ls-card .small {
  font-size: 11px;
  line-height: 1.3;
}
.ls-card.on {
  border-color: var(--accent, #005cfb);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #005cfb) 18%, transparent);
}
.ls-colors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.ls-colors input[type='color'] {
  width: 70px;
  height: 36px;
  padding: 2px;
}
.ls-sw {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.ls-swatch {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--line);
  cursor: pointer;
}
.ls-preview {
  position: sticky;
  top: 76px;
}
.ls-preview iframe {
  width: 100%;
  height: calc(100vh - 170px);
  min-height: 560px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
@media (max-width: 1000px) {
  .ls {
    grid-template-columns: 1fr;
  }
  .ls-preview {
    position: static;
  }
  .ls-preview iframe {
    height: 70vh;
    min-height: 420px;
  }
}
[hidden] {
  display: none !important;
}
.extra-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 170px 36px;
  gap: 8px;
  margin-bottom: 6px;
  align-items: center;
}
@media (max-width: 640px) {
  .extra-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 36px;
  }
  .extra-row [data-x='label'] {
    grid-column: 1/-1;
  }
}
.finfo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 5px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line, #c9d1dc);
  background: var(--card, #fff);
  color: var(--muted, #5b6675);
  font:
    italic 700 10px/1 Georgia,
    serif;
  cursor: pointer;
  vertical-align: 1px;
}
.finfo:hover,
.finfo:focus-visible {
  border-color: var(--accent, #0a5cff);
  color: var(--accent, #0a5cff);
}
.finfo-pop {
  position: fixed;
  z-index: 3000;
  background: var(--card, #fff);
  color: var(--text, #1d1d22);
  border: 1px solid var(--line, #d8dee6);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
}
.finfo-pop b {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
}
.lp-page {
  position: relative;
  display: block;
  width: max-content;
  margin: 0 auto 10px;
}
.lp-page canvas {
  display: block;
}
.lp-hit {
  position: absolute;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  outline: 1.5px dashed transparent;
  outline-offset: 1px;
}
.lp-hit:hover,
.lp-hit:focus-visible {
  background: color-mix(in srgb, var(--accent, #0a5cff) 9%, transparent);
  outline-color: var(--accent, #0a5cff);
}
.lp-flash {
  animation: lpFlash 1.8s ease;
}
@keyframes lpFlash {
  0%,
  40% {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #0a5cff) 45%, transparent);
    border-radius: 8px;
  }
  100% {
    box-shadow: 0 0 0 3px transparent;
  }
}
.pk-row {
  display: grid;
  gap: 6px;
  margin-bottom: 6px;
  align-items: start;
}
.pk-var {
  grid-template-columns: 110px minmax(0, 1fr) 90px 110px 34px;
}
.pk-item {
  grid-template-columns: 120px minmax(0, 1fr) 170px 70px 100px 110px 34px;
}
.pk-item textarea {
  min-height: 38px;
  resize: vertical;
}
.pk-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  max-height: 200px;
  overflow: auto;
}
.pk-choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel, #fff);
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
}
.pk-choice.active,
.pk-choice:hover {
  border-color: var(--accent, #0a5cff);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent, #0a5cff) 20%, transparent);
}
@media (max-width: 760px) {
  .pk-var {
    grid-template-columns: 80px minmax(0, 1fr) 34px;
  }
  .pk-var [data-v='unit'],
  .pk-var [data-v='default'] {
    grid-column: span 1;
  }
  .pk-item {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 34px;
  }
  .pk-item textarea {
    grid-column: 1/-1;
    order: -1;
  }
}
/* ---------- Ansicht: alles links / alles oben (Einstellungen → Menü anpassen) ---------- */
.tn-brand,
.topnav {
  display: none;
}
@media (min-width: 1101px) {
  /* Alles links: Suche, Zurück/Vor, Hilfe, Hell/Dunkel und Abmelden in der Seitenleiste */
  .app.layout-left .side .top {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 0 10px;
    margin: 0 0 6px;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: transparent !important;
    backdrop-filter: none;
  }
  .app.layout-left .side .top .menu-btn,
  .app.layout-left .side .top .spacer {
    display: none;
  }
  .app.layout-left .side .top .gsearch {
    order: -1;
    flex: 1 1 100%;
    max-width: none;
  }
  .app.layout-left .side .top .gsearch kbd {
    display: none;
  }

  .app.layout-left .side .top .lbl {
    display: none;
  }
  .app.layout-left .side .top .btn {
    height: 32px;
    min-height: 32px;
    padding: 0 8px;
  }
  .app.layout-left .side .top .navbtns {
    display: flex;
    gap: 2px;
  }
  .app.layout-left .side .top .navbtns {
    margin-right: auto;
  }
  /* Höhe aus dem Inhalt (sonst überlappt die zweite Zeile „START“); NAVO AI als eigene, volle Zeile unter Suche und Knöpfen */
  .app.layout-left .side .top {
    flex: none;
    height: auto;
    min-height: 0;
    align-items: center;
    row-gap: 8px;
  }
  .app.layout-left .side .top .ai-fab.in-top {
    order: 10;
    flex: 1 1 100%;
    width: 100%;
    height: 34px;
  }
  /* Alles oben: Menüleiste statt Seitenleiste */
  .app.layout-top {
    grid-template-columns: 1fr;
  }
  .app.layout-top .side {
    display: none;
  }
  .app.layout-top .top .menu-btn,
  .app.layout-top .top .navbtns {
    display: none;
  }
  .app.layout-top .top {
    flex-wrap: nowrap;
  }
  .app.layout-top .tn-brand {
    display: flex;
    align-items: center;
    margin-right: 4px;
  }
  .app.layout-top .tn-brand img {
    max-height: 30px;
    max-width: 120px;
  }
  .app.layout-top .tn-brand img:not(.logo) {
    display: block;
  }
  .app.layout-top .topnav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
  }
  .app.layout-top .topnav[hidden] {
    display: none;
  }
  .app.layout-top .gsearch {
    flex: 0 1 220px;
    max-width: 240px;
    min-width: 150px;
  }
  .app.layout-top .gsearch kbd,
  .app.layout-top .top .lbl {
    display: none;
  }
  .app.layout-top .top {
    gap: 8px;
    padding-left: 20px;
    padding-right: 20px;
  }
  .tn-grp {
    position: relative;
  }
  .tn-btn,
  .tn-grp.single > a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 8px;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    font-weight: 550;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
  }
  .tn-grp.single > a svg,
  .tn-btn svg {
    width: 16px;
    height: 16px;
  }
  .tn-btn:hover,
  .tn-grp.open > .tn-btn,
  .tn-grp.single > a:hover {
    background: color-mix(in srgb, var(--accent) 9%, transparent);
  }
  .tn-grp.has-active > .tn-btn,
  .tn-grp.single > a.active {
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 11%, transparent);
  }
  .tn-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 230px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.14);
    padding: 6px;
    z-index: 60;
  }
  .tn-menu.right {
    left: auto;
    right: 0;
  }
  .tn-grp.open > .tn-menu {
    display: block;
  }
  .tn-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
  }
  .tn-menu a svg {
    width: 17px;
    height: 17px;
    opacity: 0.8;
  }
  .tn-menu a:hover,
  .tn-menu a.active {
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    color: var(--accent);
  }
}
.lay-opts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}
.lay-opt {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}
.lay-opt.on {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 20%, transparent);
}
.lay-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.lay-pic {
  position: relative;
  display: block;
  height: 64px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  margin-bottom: 6px;
  overflow: hidden;
}
.lay-pic i {
  position: absolute;
  background: color-mix(in srgb, var(--accent) 35%, transparent);
}
.lay-pic .lp-side {
  left: 0;
  top: 0;
  bottom: 0;
  width: 26%;
}
.lay-pic .lp-topbar {
  left: 26%;
  right: 0;
  top: 0;
  height: 18%;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}
.lay-pic .lp-side.tall {
  width: 30%;
  background: color-mix(in srgb, var(--accent) 45%, transparent);
}
.lay-pic .lp-topbar.thick {
  left: 0;
  height: 26%;
  background: color-mix(in srgb, var(--accent) 45%, transparent);
}

.gs-results.gs-floating {
  position: fixed;
  left: 244px;
  top: 16px;
  width: 460px;
  max-width: calc(100vw - 260px);
  max-height: calc(100vh - 40px);
  overflow: auto;
  z-index: 80;
}
/* Layout-Studio: eigene Layouts & Briefpapier */
.ls-card.ls-add {
  border-style: dashed;
  justify-content: flex-start;
}
.ls-card.ls-add .ls-add-i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1 / 1.414;
  border-radius: 4px;
  background: var(--panel-2, #f3f5f8);
  font-size: 34px;
  color: var(--accent, #005cfb);
}
.ls-own {
  margin: 12px 0 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2, #f7f9fc);
}
.ls-own .ls-bg {
  margin: 10px 0;
  padding: 10px;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.ls-own .ls-checks {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0 10px;
}
/* Positionen verschieben (Drag & Drop am Griff) */
.items .drag-grip {
  display: block;
  width: 100%;
  margin: 0 0 4px;
  padding: 2px 0;
  font-size: 16px;
  line-height: 1;
  color: var(--faint, #9aa3ad);
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  border-radius: 6px;
  text-align: center;
}
.items .drag-grip:hover {
  color: var(--accent, #005cfb);
  background: color-mix(in srgb, var(--accent, #005cfb) 10%, transparent);
}
body.rows-dragging,
body.rows-dragging * {
  cursor: grabbing !important;
  user-select: none !important;
}
.items tr.dragging {
  opacity: 0.35;
}
/* Beleg-Editor auf dem Handy: jede Position als Block (Art/Nr. · Text volle Breite · Menge/Einheit/Preis/USt. · Summe + Aktionen) statt 620 px breiter Tabelle */
@media (max-width: 600px) {
  .table-wrap > table.t.items:has(tr[data-i]) {
    min-width: 0;
  }
  table.t.items:has(tr[data-i]) thead {
    display: none;
  }
  table.t.items tr[data-i] {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
  }
  table.t.items tr[data-i] > td {
    display: block;
    min-width: 0;
    width: auto !important;
    padding: 0;
    border: 0;
  }
  table.t.items tr[data-i] > td:nth-child(1) {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 0;
    text-align: left;
  }
  table.t.items tr[data-i] > td:nth-child(1) .drag-grip {
    width: auto;
    margin: 0;
  }
  table.t.items tr[data-i] > td:nth-child(1) > div {
    margin: 0 !important;
  }
  table.t.items tr[data-i] > td:nth-child(1) select {
    width: auto;
  }
  table.t.items tr[data-i] > td:nth-child(2) {
    grid-column: 1 / -1;
  }
  table.t.items tr[data-i] > td[colspan] {
    display: none;
  }
  table.t.items tr[data-i] > td:nth-child(n + 3):nth-child(-n + 6):not([colspan])::before {
    display: block;
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 2px;
  }
  table.t.items tr[data-i] > td:nth-child(3):not([colspan])::before {
    content: 'Menge';
  }
  table.t.items tr[data-i] > td:nth-child(4):not(:last-child)::before {
    content: 'Einheit';
  }
  table.t.items tr[data-i] > td:nth-child(5)::before {
    content: 'Preis €';
  }
  table.t.items tr[data-i] > td:nth-child(6)::before {
    content: 'USt.';
  }
  table.t.items tr[data-i] > td:nth-child(7) {
    grid-column: 1 / span 2;
    padding-top: 6px !important;
    font-weight: 600;
    text-align: left;
  }
  table.t.items tr[data-i] > td:last-child {
    grid-column: span 2 / -1;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    white-space: normal !important;
  }
  table.t.items tr[data-i] > td:nth-child(4):last-child {
    grid-column: 1 / -1;
  }
  table.t.items:has(tr[data-i]) tr.titlesum {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
  }
  table.t.items:has(tr[data-i]) tr.titlesum > td {
    display: block;
    padding: 0;
    border: 0;
    text-align: left;
  }
  table.t.items:has(tr[data-i]) tr.titlesum > td:empty {
    display: none;
  }
}
/* Titelsumme (gegliederte Positionen): Betrag rechtsbündig in der Gesamt-Spalte */
.items tr.titlesum > td {
  font-weight: 650;
  border-bottom: 2px solid var(--line-2, #d5d9de);
}
.items tr.titlesum > td[data-tsum] {
  white-space: nowrap;
}
.items tr.drop-before > td {
  box-shadow: inset 0 3px 0 var(--accent, #005cfb);
}
.items tr.drop-after > td {
  box-shadow: inset 0 -3px 0 var(--accent, #005cfb);
}
.items tr.just-moved > td {
  background: color-mix(in srgb, var(--accent, #005cfb) 9%, transparent);
  transition: background 0.8s;
}
/* Live-Stempelungen */
.live-clock .lc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.live-clock .lc-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  margin-left: 4px;
  vertical-align: middle;
  animation: lcPulse 2s infinite;
}
@keyframes lcPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}
.live-clock .lc-scale {
  position: relative;
  height: 14px;
  margin: 0 0 2px calc(200px + 300px + 24px);
  margin-right: 110px;
  font-size: 10px;
  color: var(--muted);
}
.live-clock .lc-scale span {
  position: absolute;
  transform: translateX(-50%);
}
.live-clock .lc-row {
  display: grid;
  grid-template-columns: 200px 300px minmax(0, 1fr) 100px;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.live-clock .lc-row.aus {
  opacity: 0.75;
}
.live-clock .lc-who {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.live-clock .lc-who .small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.live-clock .lc-times {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.live-clock .lc-times div {
  display: flex;
  flex-direction: column;
}
.live-clock .lc-times b {
  font-variant-numeric: tabular-nums;
  font-size: 15px;
}
.live-clock .lc-net {
  color: var(--accent, #005cfb);
}
.live-clock .lc-bar {
  position: relative;
  height: 14px;
  border-radius: 7px;
  background: var(--panel-2, #eef1f5);
  overflow: hidden;
}
.live-clock .lc-seg {
  position: absolute;
  top: 0;
  bottom: 0;
  background: #22c55e;
  border-radius: 7px;
}
.live-clock .lc-pause {
  position: absolute;
  top: 0;
  bottom: 0;
  background: repeating-linear-gradient(45deg, #f59e0b, #f59e0b 3px, #fcd34d 3px, #fcd34d 6px);
}
.live-clock .lc-pause.auto {
  background: repeating-linear-gradient(45deg, #94a3b8, #94a3b8 3px, #cbd5e1 3px, #cbd5e1 6px);
}
.live-clock .lc-now {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 2px;
  background: #ef4444;
}
.live-clock .lc-pauses {
  margin-top: 5px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.live-clock .lc-pz {
  padding: 1px 7px;
  border-radius: 9px;
  background: #fef3c7;
  color: #92400e;
  font-variant-numeric: tabular-nums;
}
.live-clock .lc-pz.auto {
  background: #e2e8f0;
  color: #334155;
}
@media (max-width: 1100px) {
  .live-clock .lc-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .live-clock .lc-scale {
    display: none;
  }
}
/* NAVO-App (iPhone/iPad): keine Kauf-/Upgrade-Verweise (App-Store-Richtlinie 3.1.1), keine Desktop-Downloads */
.ios-app a[href^='#/shop'],
.ios-app a[href*='/konto#lizenz'],
.ios-app a[href$='/konto'],
.ios-app .trial-pill,
.ios-app [data-nav='#/shop'] {
  display: none !important;
}
.ios-app .login-card,
.ios-app .content {
  -webkit-touch-callout: none;
}
.ios-app input,
.ios-app textarea,
.ios-app [contenteditable] {
  -webkit-touch-callout: default;
}
/* Touch-Geräte: Knöpfe der Kopfzeile mindestens 44 px (Apple/Material) */
@media (pointer: coarse) {
  .top .btn.sm {
    height: 44px;
    min-width: 44px;
  }
}

/* Kopfleiste schlank (Handy, Tablet, NAVO-App): Hilfe, Hell/Dunkel und Abmelden liegen unten im Menü und unter Einstellungen → Mein Konto */
.side-acts {
  display: none;
}
.side-acts a,
.side-acts button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 6px;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  text-align: left;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
}
.side-acts a:hover,
.side-acts button:hover {
  background: var(--hover, rgba(127, 127, 127, 0.12));
}
.side-acts {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}
@media (max-width: 1100px) {
  .top .top-x {
    display: none !important;
  }
  .side-acts {
    display: block;
  }
}
.ios-app .top .top-x {
  display: none !important;
}
.ios-app .side-acts {
  display: block;
}
/* Wiedervorlage-Vorschläge am Handy: Text volle Breite, Knöpfe darunter */
@media (max-width: 720px) {
  #fuSugg .crm-sugg {
    flex-wrap: wrap;
  }
  #fuSugg .crm-sugg .main {
    flex: 1 1 calc(100% - 44px);
    min-width: 0;
  }
  #fuSugg .crm-sugg > .btn {
    margin-left: auto;
  }
  #fuSugg .crm-sugg > .btn + .btn {
    margin-left: 6px;
  }
}
/* abgehakte Aufgabe verschwindet sofort */
.task.task-gone {
  animation: taskGone 0.26s ease forwards;
  pointer-events: none;
  overflow: hidden;
}
.task.task-gone .task-check {
  background: #1a7f37;
  border-color: #1a7f37;
}
@keyframes taskGone {
  0% {
    opacity: 1;
    max-height: 200px;
  }
  100% {
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-bottom-width: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .task.task-gone {
    animation-duration: 0.01s;
  }
}
/* Aufgaben aufräumen – Filterleiste, Auswahlmodus, Hinweis (public/taskclean.js) */
.tc-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 10px;
}
.tc-bar select,
.tc-bar input[type='search'] {
  width: auto;
  min-width: 0;
}
.tc-bar input[type='search'] {
  flex: 1 1 180px;
}
.tc-bar .chk {
  margin: 0;
  white-space: nowrap;
}
.tc-sel {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  margin: 0 0 8px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
}
.tc-sel b {
  margin-right: auto;
}
.task .tc-box {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--accent);
}
.task.tc-on {
  background: var(--accent-soft);
}
.tc-mode .task-check {
  display: none;
}
.tc-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  margin: 0 0 12px;
  border: 1px solid var(--warn);
  border-radius: var(--radius);
  background: var(--warn-soft);
  color: var(--text);
}
.tc-banner .tc-txt {
  flex: 1 1 260px;
}
.tc-src {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.tc-src:last-child {
  border-bottom: 0;
}
.tc-src .grow {
  flex: 1;
  min-width: 0;
}
.at-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.at-row:last-child {
  border-bottom: 0;
}
.at-row .grow {
  flex: 1;
  min-width: 0;
}
.at-row select {
  width: auto;
}
.at-ex {
  font-style: italic;
}
.at-row .at-on {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--accent);
}
@media (max-width: 520px) {
  .tc-bar select,
  .tc-bar input[type='search'] {
    flex: 1 1 100%;
  }
  .tc-bar #tcSelect {
    margin-left: auto;
  }
  .at-row {
    flex-wrap: wrap;
  }
  .at-row select {
    flex: 1 1 100%;
  }
}

/* Personalakte: Unterlagen */
.ps-up-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.ps-drop {
  border-radius: var(--radius-sm);
  min-height: 60px;
  transition:
    background 0.15s,
    outline-color 0.15s;
  outline: 2px dashed transparent;
  outline-offset: 2px;
}
.ps-drop.over {
  background: var(--hover, #f5f5f7);
  outline-color: var(--accent, #0a5cdb);
}
.ps-file {
  align-items: center;
}
.ps-file-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ps-file-main a {
  overflow-wrap: anywhere;
}
.ps-up-head .spacer {
  flex: 1;
}
.ps-login {
  display: flex;
  margin: 14px 0 6px;
}
.ps-login-fields .form {
  margin-bottom: 4px;
}
.ps-file .btn-row {
  flex-wrap: nowrap;
  gap: 2px;
  flex-shrink: 0;
}
.ps-pay {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  align-items: start;
}
.ps-pay-sum {
  position: sticky;
  top: 76px;
}
.ps-pay-h {
  margin: 16px 0 4px;
}
.ps-pay-total {
  font-size: 1.05em;
  border-top: 1px solid var(--line, #e5e5ea);
  padding-top: 8px;
}
@media (max-width: 860px) {
  .ps-pay {
    grid-template-columns: 1fr;
  }
  .ps-pay-sum {
    position: static;
  }
}
/* Verträge & Fixkosten: laufende Kosten inkl. Personal */
.pk-card {
  margin-bottom: 14px;
}
.pk-head {
  display: flex;
  gap: 24px;
  align-items: flex-end;
  flex-wrap: wrap;
  justify-content: space-between;
}
.pk-total {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
}
.pk-split {
  display: flex;
  gap: 28px;
}
.pk-split div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pk-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--accent-soft, #d6e6fb);
  margin: 14px 0 4px;
  overflow: hidden;
}
.pk-bar i {
  display: block;
  height: 100%;
  background: var(--accent, #0a5cdb);
}
.pk-rows summary {
  cursor: pointer;
  margin-top: 10px;
  font-weight: 500;
}
.pk-sum td {
  font-weight: 600;
}
.pk-rows th.num {
  text-align: right;
}
/* Übersicht: erst zeigen, wenn nachgeladene Karten stehen (kein Springen) */
.view-hold {
  opacity: 0;
}
#view,
.view {
  transition: opacity 0.12s ease;
}
