/* Keramico Geschäftsprogramm – Gestaltung
   Ruhige, steinige Farbwelt passend zu Keramik; gut lesbar für den Arbeitsalltag. */

:root {
  --bg: #f4f2ee;
  --surface: #ffffff;
  --surface-2: #faf9f6;
  --line: #e4e0d8;
  --line-strong: #d3cdc2;
  --text: #24221f;
  --text-2: #6b665e;
  --accent: #2f4a45;
  --accent-hover: #233935;
  --accent-soft: #e6eeec;
  --side: #23302e;
  --side-text: #c9d3d0;
  --side-active: #34464a;
  --ok: #2e7d4f;
  --ok-soft: #e5f2ea;
  --warn: #b5541c;
  --warn-soft: #fbece2;
  --danger: #b3261e;
  --danger-soft: #fbe7e5;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(36, 34, 31, .05), 0 1px 1px rgba(36, 34, 31, .03);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; font-weight: 600; letter-spacing: -.01em; margin: 0; }
h2 { font-size: 1.05rem; font-weight: 600; margin: 0 0 .9rem; }
h3 { font-size: .95rem; font-weight: 600; margin: 1.4rem 0 .6rem; }
p { margin: 0 0 .8rem; }
code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: 0 .3em; font-size: .9em; }
hr { border: 0; border-top: 1px solid rgba(255,255,255,.08); margin: .6rem 0; }
.muted { color: var(--text-2); }
.small { font-size: .85rem; }
.ico { width: 18px; height: 18px; flex: none; }

/* ---------- Grundrahmen ---------- */
.shell { display: flex; min-height: 100vh; }
.side {
  width: 232px; flex: none; background: var(--side); color: var(--side-text);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 18px 12px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: #fff; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 8px; background: #c8b89c; color: var(--side);
  display: grid; place-items: center; font-weight: 700; font-size: 18px;
}
.brand-text { font-weight: 600; font-size: 16px; line-height: 1.1; display: flex; flex-direction: column; }
.brand-text small { font-weight: 400; font-size: 12px; opacity: .65; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 6px;
  color: var(--side-text); font-size: 14.5px;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.nav-item.active { background: var(--side-active); color: #fff; }
.nav-item.disabled { opacity: .45; cursor: default; }
.nav-item.disabled:hover { background: none; color: var(--side-text); }
.nav-item em { margin-left: auto; font-style: normal; font-size: 11px; border: 1px solid rgba(255,255,255,.25); border-radius: 10px; padding: 0 7px; }
.side-foot { border-top: 1px solid rgba(255,255,255,.08); padding: 12px 8px 0; }
.side-foot .who { display: block; color: #fff; font-weight: 500; margin-bottom: 4px; }
.side-foot .linkbtn { color: var(--side-text); display: inline-flex; align-items: center; gap: 6px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top {
  display: flex; align-items: center; gap: 12px; padding: 12px 32px; background: var(--surface);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5;
}
.topsearch { position: relative; flex: 1; max-width: 520px; }
.topsearch .ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-2); }
.topsearch input { width: 100%; padding-left: 36px; background: var(--surface-2); }
.top .menu-toggle { display: none; }
.content { padding: 28px 32px 60px; max-width: 1320px; width: 100%; }

/* ---------- Seitenkopf ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; }
.back { display: inline-block; font-size: .85rem; color: var(--text-2); margin-bottom: 4px; }
.count { font-size: .95rem; font-weight: 500; color: var(--text-2); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 1px 9px; vertical-align: middle; margin-left: 6px; }

/* ---------- Karten ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; margin-bottom: 20px; }
.card.flush { padding: 0; overflow: hidden; }
.card.narrow { max-width: 520px; }
.card-title { display: flex; align-items: center; gap: 8px; padding: 16px 20px; margin: 0; border-bottom: 1px solid var(--line); }
.card-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card.flush .card-title-row { padding-right: 20px; border-bottom: 1px solid var(--line); }
.card.flush .card-title-row .card-title { border-bottom: 0; }
.card:not(.flush) .card-title-row { margin-bottom: .9rem; }
.card:not(.flush) .card-title-row h2 { margin: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-2 > .card { margin-bottom: 0; }
.empty { padding: 28px 20px; color: var(--text-2); text-align: center; }
.empty.ok { color: var(--ok); }

/* ---------- Kennzahlen ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; color: var(--text);
}
a.stat:hover { border-color: var(--line-strong); text-decoration: none; }
.stat span { font-size: .82rem; color: var(--text-2); }
.stat strong { font-size: 1.45rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat.is-warn { border-color: #efc9b0; background: var(--warn-soft); }
.stat.is-warn strong { color: var(--warn); }
.result .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-inline { text-align: right; display: flex; flex-direction: column; }
.stat-inline span { font-size: .8rem; color: var(--text-2); }
.stat-inline strong { font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.stat-inline small { color: var(--text-2); }
.stat-inline.is-low strong { color: var(--warn); }

/* ---------- Tabellen ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; font-weight: 500; font-size: .8rem; color: var(--text-2); text-transform: uppercase; letter-spacing: .03em; padding: 10px 20px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 20px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table.compact td, .table.compact th { padding: 7px 14px; }
.card:not(.flush) .table { margin-top: 1rem; }
.card:not(.flush) .table td:first-child, .card:not(.flush) .table th:first-child { padding-left: 0; }
.table.clickable tbody tr { cursor: pointer; }
.table.clickable tbody tr:hover { background: var(--surface-2); }
.table td a { color: var(--text); font-weight: 500; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.w-num { width: 110px; }
.w-date { width: 100px; }
.is-low { color: var(--warn); font-weight: 600; }
.neg { color: var(--danger); }
.pos { color: var(--ok); }
tr.is-muted td { opacity: .55; }
.actions { white-space: nowrap; }
.actions .inline + .inline, .actions .inline-details { margin-left: 10px; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; }
.table-scroll .table td:first-child, .table-scroll .table th:first-child { padding-left: 14px; }

/* ---------- Tags ---------- */
.tag { display: inline-block; font-size: .75rem; font-weight: 500; padding: 1px 8px; border-radius: 20px; background: #eeebe5; color: var(--text-2); vertical-align: middle; }
.tag-ok { background: var(--ok-soft); color: var(--ok); }
.tag-customer { background: var(--accent-soft); color: var(--accent); }
.tag-supplier { background: #f3ecdf; color: #85602a; }
h1 .tag { margin-left: 8px; font-size: .8rem; }

/* ---------- Formulare ---------- */
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 6px; padding: 8px 11px; width: 100%; min-height: 38px;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
input[type="checkbox"] { width: 16px; height: 16px; min-height: 0; accent-color: var(--accent); margin: 0; }
input[type="file"] { padding: 6px; background: var(--surface-2); }
.form label { display: flex; flex-direction: column; gap: 5px; font-size: .85rem; font-weight: 500; color: var(--text-2); }
.form > label { margin-bottom: 14px; }
.form label .muted { font-weight: 400; }
label.check { flex-direction: row !important; align-items: center; gap: 8px !important; font-weight: 400 !important; color: var(--text) !important; font-size: .9rem; cursor: pointer; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 16px; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: 1 / -1; }
.grid-move { display: grid; grid-template-columns: 200px 140px 160px 1fr auto; gap: 12px; align-items: end; }
.map-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; margin-bottom: 18px; }
.map-grid select.is-mapped { border-color: var(--ok); background: var(--ok-soft); }
.field-info { align-self: end; padding-bottom: 9px; color: var(--text-2); font-size: .9rem; }
.form-actions { display: flex; gap: 10px; margin-top: 20px; align-items: center; }
.grid-4 > .form-actions { margin-top: 6px; }
.form.grid-4 > label { margin-bottom: 0; }
.hint { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.row-form { display: flex; gap: 6px; margin-top: 6px; }
.row-form input { width: 180px; }
.hidden { display: none !important; }

.filters { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.filters input[type="search"] { max-width: 300px; }
.filters select { width: auto; }
.filters.tight { margin: 0; padding: 10px 0; }
.filters.tight label { display: flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--text-2); }
.filters.tight input { width: auto; min-height: 32px; padding: 4px 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; font: inherit; font-size: 14px; font-weight: 500;
  padding: 8px 15px; min-height: 38px; border-radius: 6px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-danger { color: var(--danger); border-color: #ecc2be; }
.btn-danger:hover { background: var(--danger-soft); }
.btn-small { min-height: 32px; padding: 4px 11px; font-size: 13px; }
.btn-block { width: 100%; }
.btn .ico { width: 16px; height: 16px; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-size: .9rem; color: var(--accent); cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
.iconbtn { background: none; border: 1px solid var(--line); border-radius: 6px; padding: 7px; cursor: pointer; color: var(--text); display: grid; place-items: center; }
form.inline { display: inline; }
.inline-details { display: inline-block; vertical-align: top; }
.inline-details summary { list-style: none; display: inline; }
.inline-details summary::-webkit-details-marker { display: none; }

.danger-zone { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-top: 4px; }
.danger-zone .muted { margin-left: auto; }

/* ---------- Meldungen ---------- */
.flash { padding: 11px 15px; border-radius: 6px; margin-bottom: 16px; font-size: .92rem; border: 1px solid; }
.flash-ok { background: var(--ok-soft); color: #1e5a38; border-color: #c4e2cf; }
.flash-error { background: var(--danger-soft); color: #8c1d17; border-color: #efc2be; }

/* ---------- Listen ---------- */
.steps { padding-left: 1.2rem; margin: 0 0 1rem; }
.steps li { margin-bottom: .45rem; }
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li { border-bottom: 1px solid var(--line); }
.link-list li:last-child { border-bottom: 0; }
.link-list a { display: block; padding: 10px 0; }
.roadmap { list-style: none; padding: 0; margin: 0; }
.roadmap li { padding: 8px 0 8px 28px; position: relative; color: var(--text-2); }
.roadmap li::before { content: ""; position: absolute; left: 4px; top: 13px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-strong); }
.roadmap li.done { color: var(--text); }
.roadmap li.done::before { background: var(--ok); border-color: var(--ok); }
.pager { display: flex; width: fit-content; max-width: 100%; justify-content: center; align-items: stretch; margin: 4px auto 20px; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); font-size: .95rem; }
.pager .pg { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 38px; padding: 0 10px; color: var(--accent); text-decoration: none; border-left: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.pager .pg:first-child { border-left: 0; }
.pager a.pg:hover { background: var(--accent-soft); }
.pager a.pg:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.pager .pg.is-current { background: var(--surface-2); color: var(--text-2); font-weight: 600; }
.pager .pg.is-disabled { color: var(--line-strong); }
@media (max-width: 480px) { .pager .pg { min-width: 34px; padding: 0 6px; } }

/* ---------- Login / Einrichtung ---------- */
body.bare { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.bare-box { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 30px rgba(36, 34, 31, .07); padding: 32px; width: 100%; max-width: 420px; }
.bare-box h1 { font-size: 1.35rem; margin-bottom: 14px; }
.brand-center { padding: 0 0 22px; color: var(--text); justify-content: center; }
.brand-center .brand-mark { background: var(--accent); color: #fff; }

/* ---------- Mobil ---------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-move { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .side { position: fixed; left: 0; top: 0; z-index: 20; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0,0,0,.25); }
  .side.open { transform: none; }
  .top .menu-toggle { display: grid; }
  .top { padding: 10px 16px; }
  .content { padding: 20px 16px 48px; }
  .grid-2, .grid-4, .map-grid { grid-template-columns: 1fr; }
  .span-2, .span-3 { grid-column: auto; }
  .table:not(.table-list) th:nth-child(n+4), .table:not(.table-list) td:nth-child(n+4) { display: none; }
  .table td.num, .table th.num { display: table-cell; }
  .table td, .table th { padding-left: 14px; padding-right: 14px; }
  .filters input[type="search"] { max-width: none; }
  .danger-zone .muted { margin-left: 0; width: 100%; }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat strong { font-size: 1.15rem; }
  .grid-move { grid-template-columns: 1fr; }
}

/* ---------- Listen im Stil von bexio (Kontakte) ---------- */
.head-actions { display: flex; gap: 10px; }
.list-card { overflow: visible; }
.list-toolbar { display: flex; align-items: center; gap: 28px; padding: 18px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.search-box { position: relative; width: 320px; max-width: 100%; }
.search-box .ico { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: var(--text-2); }
.search-box input { padding-right: 36px; }
.tabs { display: flex; gap: 22px; }
.tabs a { color: var(--text); padding: 6px 0; border-bottom: 2px solid transparent; }
.tabs a:hover { text-decoration: none; color: var(--accent); }
.tabs a.is-active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 500; }
.colpicker { margin-left: auto; position: relative; }
.colpicker summary { list-style: none; cursor: pointer; padding: 6px 4px; color: var(--text); user-select: none; }
.colpicker summary::-webkit-details-marker { display: none; }
.colpicker-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; box-shadow: 0 8px 24px rgba(36, 34, 31, .12); padding: 8px 14px; min-width: 180px;
  display: flex; flex-direction: column; gap: 2px;
}
.colpicker-menu label.check { padding: 5px 0; }
.table-scroll-x { overflow-x: auto; }
.table-list th { background: var(--surface); }
.table-list thead tr:first-child th { text-transform: none; letter-spacing: 0; font-size: .85rem; font-weight: 600; color: var(--text); padding-top: 14px; padding-bottom: 8px; border-bottom: 0; }
.table-list .filter-row th { padding-top: 0; padding-bottom: 12px; background: var(--surface-2); border-top: 1px solid var(--line); padding-top: 10px; }
.table-list .filter-row input, .table-list .filter-row select { min-height: 34px; padding: 5px 9px; font-size: 14px; background: var(--surface); }
.table-list td { padding-top: 10px; padding-bottom: 10px; white-space: nowrap; }
.table-list td, .table-list th { padding-left: 14px; padding-right: 14px; }
.table-list td:first-child, .table-list th:first-child { padding-left: 20px; }
.table-list:not(.cols-ready) [data-col="nr"], .table-list:not(.cols-ready) [data-col="mobile"], .table-list:not(.cols-ready) [data-col="kat"] { display: none; }
.col-hidden { display: none !important; }
a.sort { color: var(--text); }
a.sort:hover { color: var(--accent); text-decoration: none; }
a.sort.is-sorted { color: var(--accent); }
.w-typ { width: 64px; }
.w-nr { width: 80px; }
.w-plz { width: 90px; }
.typ-cell { color: var(--text-2); }
.typ-cell .ico { width: 19px; height: 19px; display: block; }
.truncate { max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.nowrap { white-space: nowrap; }
.table td a.plain-link { color: var(--accent); font-weight: 400; }
tr.no-click td { cursor: default; }
.list-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); color: var(--text-2); font-size: .9rem; flex-wrap: wrap; }
.list-foot .pager { margin: 0; }
@media (max-width: 860px) {
  .list-toolbar { gap: 14px; }
  .search-box { width: 100%; }
  .colpicker { margin-left: 0; }
  .colpicker-menu { left: 0; right: auto; }
}
.table-list .filter-row input { min-width: 0; width: 100%; }
.table-list td:last-child, .table-list th:last-child { padding-right: 20px; }
.table-list th[data-col="plz"] input { min-width: 64px; }
.table-list th[data-col="typ"] select { min-width: 58px; padding-right: 4px; }
.table-list [data-col="tel"] { width: 150px; }
.table-list td[data-col="name"] { max-width: 290px; overflow: hidden; text-overflow: ellipsis; }
.table-list td[data-col="ort"] { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.table-list [data-col="typ"] { padding-right: 6px; }
.table-list th[data-col="typ"] select { min-width: 50px; }
.table-list td[data-col="email"] { max-width: 220px; }

/* ---------- Detailansicht im Stil von bexio (Produkte) ---------- */
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.crumbs { font-size: .85rem; color: var(--text-2); margin-bottom: 4px; }
.crumbs span { margin: 0 4px; }
.detail-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.detail-title h1 { font-size: 1.45rem; }
.detail-title h1 .muted { font-weight: 400; margin-left: 6px; }
.detail-title .iconbtn { border-color: transparent; color: var(--text-2); }
.detail-title .iconbtn:hover { border-color: var(--line); color: var(--text); background: var(--surface); }
.iconbtn-danger:hover { color: var(--danger) !important; }
.detail-card { padding: 26px 28px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 260px; gap: 40px; }
.detail-grid-edit { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.sec-title { font-size: 1rem; font-weight: 600; padding-bottom: 9px; border-bottom: 1px solid var(--line); margin: 0 0 6px; }
section > .sec-title ~ .sec-title, section .sec-title:not(:first-child) { margin-top: 28px; }
.info { margin: 0; }
.info-row { display: grid; grid-template-columns: 158px minmax(0, 1fr); gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.info-row:last-child { border-bottom: 0; }
.info-row dt { color: var(--text-2); }
.info-row dd { margin: 0; overflow-wrap: anywhere; }
.action-list { list-style: none; padding: 0; margin: 4px 0 0; }
.action-list li { padding: 7px 0; }
.action-list a, .action-list .linkbtn { display: inline-flex; align-items: center; gap: 9px; font-size: .95rem; color: var(--accent); }
.action-list .ico { color: var(--accent); }
.meta { margin-top: 18px; line-height: 1.6; }
.tabs-card { border-bottom: 1px solid var(--line); margin: -6px 0 18px; }
.tabs-card a { padding: 8px 0 10px; }
.move-form { margin-bottom: 8px; }
.grid-2-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin-top: 12px; }
.form .grid-2-form > label { margin-bottom: 0; }
.grid-2-form .span-2 { grid-column: 1 / -1; }
@media (max-width: 1100px) {
  .detail-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .detail-grid aside { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .detail-card { padding: 18px 16px; }
  .detail-grid, .detail-grid-edit { grid-template-columns: 1fr; gap: 24px; }
  .info-row { grid-template-columns: 130px minmax(0, 1fr); }
  .grid-2-form { grid-template-columns: 1fr; }
}

/* ---------- QR-Code und Etiketten ---------- */
.qr-box { display: flex; gap: 14px; align-items: flex-start; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.qr-box > a { flex: none; display: block; width: 104px; border: 1px solid var(--line); border-radius: 6px; padding: 4px; background: #fff; }
.qr-box > div { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.qr { display: block; width: 100%; height: auto; }

.label-options { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; }
.label-options > p { width: 100%; margin: 0; }
.opt-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.opt-label { font-size: .85rem; color: var(--text-2); font-weight: 500; margin-right: 4px; }
.chip { display: inline-block; padding: 5px 12px; border: 1px solid var(--line-strong); border-radius: 20px; color: var(--text); font-size: .88rem; background: var(--surface); }
.chip:hover { text-decoration: none; border-color: var(--accent); }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.num-input { width: 80px; min-height: 32px; padding: 4px 8px; }

.label-sheet { display: flex; flex-wrap: wrap; gap: 14px; }
.label {
  background: #fff; color: #000; border: 1px dashed #b8b2a7; display: flex; flex-direction: column; align-items: center;
  padding: 3mm; overflow: hidden; font-family: var(--font); box-sizing: border-box; break-inside: avoid; text-align: center;
}
.label-qr { flex: none; }
.label-qr .qr { width: 100%; }
.label-text { display: flex; flex-direction: column; align-items: center; min-width: 0; width: 100%; flex: 1; }
.label-nr { font-weight: 700; letter-spacing: .02em; }
.label-name { font-weight: 600; line-height: 1.15; overflow-wrap: anywhere; }
.label-sub { color: #444; line-height: 1.2; margin-top: 1mm; overflow: hidden; }
.label-price { font-weight: 700; margin-top: auto; padding-top: 1.5mm; }
.label-price span { font-weight: 400; }
.label-vat { color: #555; }
.label-brand { color: #777; letter-spacing: .12em; text-transform: uppercase; }

/* Hochformat: QR-Code oben, Text darunter */
.format-klein .label { width: 29mm; height: 62mm; padding: 2mm; }
.format-klein .label-qr { width: 25mm; }
.format-klein .label-text { margin-top: 1mm; }
.format-klein .label-nr { font-size: 9pt; }
.format-klein .label-name { font-size: 6.5pt; max-height: 3.5em; overflow: hidden; }
.format-klein .label-sub { font-size: 5.5pt; max-height: 2.4em; }
.format-klein .label-price { font-size: 8pt; }
.format-klein .label-brand { display: none; }

.format-mittel .label { width: 50mm; height: 90mm; padding: 3.5mm; }
.format-mittel .label-qr { width: 40mm; }
.format-mittel .label-text { margin-top: 2mm; }
.format-mittel .label-nr { font-size: 13pt; }
.format-mittel .label-name { font-size: 9pt; margin-top: .5mm; }
.format-mittel .label-sub { font-size: 6.5pt; max-height: 3.7em; }
.format-mittel .label-price { font-size: 12pt; }
.format-mittel .label-vat { font-size: 6pt; }
.format-mittel .label-brand { font-size: 6pt; margin-top: 1mm; }

.format-a6 .label { width: 105mm; height: 148mm; padding: 8mm; }
.format-a6 .label-qr { width: 72mm; }
.format-a6 .label-text { margin-top: 4mm; }
.format-a6 .label-nr { font-size: 22pt; }
.format-a6 .label-name { font-size: 15pt; margin-top: 1mm; }
.format-a6 .label-sub { font-size: 9pt; max-height: 5em; margin-top: 2mm; }
.format-a6 .label-price { font-size: 22pt; }
.format-a6 .label-vat { font-size: 8pt; }
.format-a6 .label-brand { font-size: 8pt; margin-top: 2mm; }

@page klein { size: 29mm 62mm; margin: 0; }
@page mittel { size: 50mm 90mm; margin: 0; }
@page grossa6 { size: 105mm 148mm; margin: 0; }

@media print {
  body { background: #fff !important; }
  .side, .top, .no-print, .flash { display: none !important; }
  .shell, .main { display: block; }
  .content { padding: 0 !important; max-width: none; }
  .label-sheet { display: block; }
  .label { border: 0; break-after: page; page-break-after: always; }
  .label:last-child { break-after: auto; page-break-after: auto; }
  .format-klein .label { page: klein; }
  .format-mittel .label { page: mittel; }
  .format-a6 .label { page: grossa6; }
}

/* ---------- Belege (Verkauf/Einkauf) ---------- */
.doc-tabs { display: flex; gap: 4px; margin-bottom: 14px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.doc-tabs a { padding: 10px 14px; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 6px; }
.doc-tabs a:hover { color: var(--text); text-decoration: none; }
.doc-tabs a.is-active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.doc-tabs .count { margin-left: 0; font-size: .78rem; padding: 0 7px; }
.badge-warn { background: var(--warn); color: #fff; border-radius: 10px; font-size: .72rem; padding: 0 6px; font-weight: 600; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }

.status { display: inline-block; font-size: .76rem; font-weight: 600; padding: 2px 9px; border-radius: 4px; background: #e9e6e0; color: #57524a; white-space: nowrap; }
.status-offen, .status-bestellt { background: #dbe9ee; color: #2c6478; }
.status-angenommen, .status-bezahlt, .status-erledigt, .status-geliefert { background: var(--ok-soft); color: var(--ok); }
/* Bestellung: bestellt (blau) → bestätigt (violett) → teilgeliefert (ocker) → geliefert (grün mit Haken) */
.status-bestaetigt { background: #ebe4f6; color: #5d3f92; }
.status-geliefert::before, .status-bezahlt::before, .status-erledigt::before { content: "✓ "; }
.status-teilbezahlt, .status-teilgeliefert { background: #f3ecdf; color: #85602a; }
.status-ueberfaellig, .status-abgelehnt { background: var(--danger-soft); color: var(--danger); }
.status-storniert { background: #eceae6; color: #8a857c; text-decoration: line-through; }
.table-docs td { white-space: nowrap; }
.table-docs td.truncate { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }

.doc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 20px; align-items: start; }
.doc-main { padding: 22px 24px; margin-bottom: 0; min-width: 0; }
.doc-titel { margin: 0 0 12px; color: var(--text-2); }
.doc-titel strong { color: var(--text); }
.doc-side { padding: 18px 20px; position: sticky; top: 80px; margin-bottom: 0; }
.side-title { font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); margin: 18px 0 6px; padding-bottom: 5px; border-bottom: 1px dotted var(--line-strong); }
.side-title:first-child { margin-top: 0; }
.doc-side .action-list li { padding: 4px 0; }
.doc-side .action-list .linkbtn, .doc-side .action-list a { font-size: .92rem; text-align: left; }
.side-info, .side-sums { margin: 0; }
.side-info > div { margin-bottom: 8px; }
.side-info dt { color: var(--text-2); font-size: .85rem; }
.side-info dd { margin: 0; }
.side-sums > div { display: flex; justify-content: space-between; padding: 3px 0; font-size: .9rem; }
.side-sums dt { color: var(--text-2); }
.side-sums dd { margin: 0; font-variant-numeric: tabular-nums; }
.side-sums .strong dt, .side-sums .strong dd { font-weight: 700; color: var(--text); }
.pay-row { display: flex; justify-content: space-between; gap: 8px; font-size: .85rem; padding: 4px 0; border-bottom: 1px dotted var(--line); }
.pay-form { margin-top: 10px; }
.pay-form .grid-2-form { margin-top: 0; gap: 8px; }
.pay-form .btn { margin-top: 10px; }
.lock-note { display: flex; gap: 8px; align-items: center; background: #f3ecdf; color: #6b5023; border-radius: 6px; padding: 9px 12px; margin-bottom: 14px; font-size: .9rem; }
.lock-note .ico { flex: none; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset[disabled] input, fieldset[disabled] textarea, fieldset[disabled] select { background: var(--surface-2); color: var(--text-2); }

.narrow-form { max-width: 640px; }
.contact-preview { margin: -6px 0 14px; line-height: 1.5; }
.ac-wrap { position: relative; }
.ac-list {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 8px; box-shadow: 0 10px 28px rgba(36, 34, 31, .14); max-height: 340px; overflow-y: auto; padding: 4px;
}
.ac-item { display: flex; flex-direction: column; align-items: flex-start; width: 100%; text-align: left; background: none; border: 0; padding: 7px 10px; border-radius: 6px; cursor: pointer; font: inherit; color: var(--text); }
.ac-item span { font-size: .82rem; color: var(--text-2); }
.ac-item:hover, .ac-item.is-active { background: var(--accent-soft); }
.ac-empty { padding: 8px 10px; color: var(--text-2); font-size: .9rem; }

.pos-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.pos-toolbar .prod-ac { flex: 1; min-width: 260px; }
.pos-table th { text-transform: none; letter-spacing: 0; font-size: .8rem; color: var(--text); font-weight: 600; background: var(--surface); padding: 8px 6px; }
.pos-table td { padding: 8px 6px; vertical-align: top; border-bottom: 1px solid var(--line); }
.pos-table input, .pos-table select, .pos-table textarea { min-height: 32px; padding: 5px 7px; font-size: 14px; }
.pos-table .num-in { text-align: right; width: 82px; }
.pos-table .num-in.short { width: 58px; }
.pos-table .unit-in { width: 62px; }
.pos-table select { width: 64px; padding-right: 2px; }
.pos-table .pos-title { font-weight: 600; }
.pos-codes { display: flex; gap: 10px; margin: 5px 0; flex-wrap: wrap; }
.pos-codes label { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--text-2); white-space: nowrap; }
.pos-codes input { width: 110px; min-height: 28px !important; padding: 3px 7px !important; font-size: 13px !important; }
.pos-table textarea { resize: vertical; overflow: hidden; }
.pos-table .pos-sum { padding-top: 14px; font-weight: 600; white-space: nowrap; }
.pos-table .pos-actions { white-space: nowrap; padding-top: 10px; }
.pos-table .pos-nr { padding-top: 14px; color: var(--text-2); }
.pos-row-text td { background: var(--surface-2); }
.iconbtn.small { padding: 2px 6px; font-size: 13px; min-width: 26px; display: inline-flex; }
.w-pos { width: 36px; }
.w-qty { width: 92px; }
.w-unit { width: 72px; }
.w-price { width: 92px; }
.w-rab { width: 68px; }
.w-mwst { width: 74px; }
.w-sum { width: 100px; }
.w-act { width: 96px; }
.pos-table tfoot td, .pos-view tfoot td { border-bottom: 0; padding: 5px 6px; }
tfoot .t-first td { border-top: 1px solid var(--text) !important; padding-top: 9px !important; }
tfoot .t-grand td { border-top: 1px solid var(--text) !important; border-bottom: 3px double var(--text) !important; padding: 8px 6px !important; }
tfoot tr td:first-child { border: 0 !important; }
.pos-view td { vertical-align: top; }
.pos-view .pos-text { margin-top: 10px; color: var(--text-2); }
.progress-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line-strong); font-size: .86rem; }
.progress-grid > div { display: flex; flex-direction: column; gap: 2px; }
.progress-grid .neg { color: var(--danger); }
.progress-grid .pos { color: var(--ok); }

.comment-box { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.comment-box .form > label { margin-bottom: 8px; }
.log { list-style: none; padding: 0; margin: 16px 0 0; }
.log li { display: flex; flex-direction: column; padding: 9px 0; border-bottom: 1px solid var(--line); }
.log-text { color: var(--text); }
tr.is-current td { background: var(--accent-soft); }

.dialog { border: 0; border-radius: 12px; padding: 0; width: min(760px, calc(100vw - 32px)); box-shadow: 0 24px 60px rgba(0, 0, 0, .25); }
.dialog::backdrop { background: rgba(30, 32, 30, .45); }
.dialog form { padding: 22px 24px; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.dialog-head h2 { margin: 0; font-size: 1.2rem; }
.dialog-sub { color: var(--text-2); margin-bottom: 10px; }
.conv-table .qty-input { width: 100px; text-align: right; min-height: 32px; padding: 4px 8px; }
.conv-table td { vertical-align: middle; }
.conv-table td.truncate { max-width: 420px; white-space: normal; }

.logo-row { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.logo-preview { width: 240px; min-height: 70px; display: grid; place-items: center; border: 1px dashed var(--line-strong); border-radius: 8px; padding: 10px; background: #fff; }
.logo-preview img { max-width: 100%; max-height: 80px; }
.logo-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.logo-form > label { margin-bottom: 0 !important; }

@media (max-width: 1100px) {
  .doc-layout { grid-template-columns: 1fr; }
  .doc-side { position: static; }
}
@media (max-width: 860px) {
  .doc-main { padding: 16px; }
  .progress-grid { grid-template-columns: 1fr; gap: 10px; }
}
.pos-view th { white-space: nowrap; }
.pos-view td.pos-desc { min-width: 240px; }
.pos-view .progress-row td { border-top: 0; padding-top: 0; }
.pos-view .progress-grid { margin-top: 0; max-width: 560px; }
.pos-view .progress-grid span { display: flex; justify-content: space-between; gap: 16px; }
.tabs-card { overflow-x: auto; scrollbar-width: none; }
.tabs-card::-webkit-scrollbar { display: none; }
.tabs-card a { white-space: nowrap; flex: none; }
/* Belegseite: ganze Breite nutzen, Seitenleiste immer rechts, Positionen kompakt */
.content { max-width: 1680px; }
.content:has(.doc-layout) { max-width: none; }
.doc-layout { grid-template-columns: minmax(0, 1fr) 270px; }
.pos-table th, .pos-table td { padding-left: 4px; padding-right: 4px; }
.pos-table th:first-child, .pos-table td:first-child { padding-left: 0; }
.pos-table .w-typ { width: 26px; }
.pos-table .w-pos { width: 26px; }
.pos-table .w-qty { width: 132px; }
.pos-table .w-price { width: 86px; }
.pos-table .w-rab { width: 56px; }
.pos-table .w-mwst { width: 62px; }
.pos-table .w-sum { width: 88px; }
.pos-table .w-act { width: 30px; }
.pos-table .pos-desc-edit { min-width: 200px; }
.pos-table .qty-cell { white-space: nowrap; }
.pos-table .qty-cell .num-in { width: 70px; }
.pos-table .qty-cell .unit-in { width: 54px; margin-left: 4px; }
.pos-table .num-in { width: 78px; }
.pos-table .num-in.short { width: 48px; }
.pos-table select { width: 58px; }
.pos-table .pos-actions { padding-top: 6px; }
.pos-table .pos-actions .iconbtn { display: flex; width: 24px; height: 22px; padding: 0; justify-content: center; align-items: center; margin-bottom: 2px; }
.pos-codes input { width: 96px; }
@media (max-width: 1440px) {
  .doc-layout { grid-template-columns: minmax(0, 1fr) 248px; gap: 16px; }
  .doc-main { padding: 20px 18px; }
  .doc-side { padding: 16px; }
  .pos-table .w-qty { width: 118px; }
  .pos-table .qty-cell .num-in { width: 62px; }
  .pos-table .qty-cell .unit-in { width: 48px; }
  .pos-table .w-price, .pos-table .num-in { width: 74px; }
  .pos-table .w-sum { width: 80px; }
  .pos-table .pos-desc-edit { min-width: 130px; }
}
@media (max-width: 1440px) {
  .pos-codes input { width: 76px !important; }
  .pos-codes label { font-size: .75rem; gap: 4px; }
}
.pos-table .unit-in { padding-left: 6px !important; padding-right: 4px !important; }
.pos-table .unit-in::-webkit-calendar-picker-indicator { display: none !important; }
@media (max-width: 1440px) { .pos-table .qty-cell .unit-in { width: 52px; } .pos-table .qty-cell .num-in { width: 58px; } }

/* ---------- Teilen per Link ---------- */
.share-box { margin: 4px 0 8px; }
.share-row { display: flex; gap: 6px; }
.share-row input { min-height: 32px; padding: 4px 8px; font-size: 12px; color: var(--text-2); background: var(--surface-2); }
.share-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; }
.seen { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0 0; padding: 9px 10px; background: var(--ok-soft); color: #1e5a38; border-radius: 6px; font-size: .86rem; line-height: 1.4; }
.seen .ico { flex: none; margin-top: 1px; }
.not-seen { display: flex; gap: 6px; align-items: center; margin: 6px 0 0; }
.not-seen .ico { width: 15px; height: 15px; }
.seen-ico { color: var(--ok); display: inline-flex; vertical-align: middle; margin-left: 4px; }
.seen-ico .ico { width: 16px; height: 16px; }
.test-mail { margin-top: 14px; max-width: 520px; }
.test-mail input { width: auto; flex: 1; }
.share-meta .linkbtn, .share-meta a { white-space: nowrap; }

/* ---------- Lieferantenrechnungen (2.3) ---------- */
.status-uebermittelt { background: #e4e8f4; color: #3d4f86; }
.chip-n { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 3px; border-radius: 9px; background: var(--surface-2); color: var(--text-2); font-size: .75rem; text-align: center; }
.chip.is-active .chip-n { background: rgba(255, 255, 255, .22); color: #fff; }
.filter-note { margin: 0 0 10px; font-size: .9rem; }
.bulk-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 10px 16px; background: #eef1f8; border-bottom: 1px solid var(--line); font-size: .9rem; }
.table-bills td.truncate { max-width: 230px; }
.table-bills td .ico { width: 14px; height: 14px; vertical-align: -2px; }
.bill-form .sec-title { margin-top: 18px; }
.bill-form .sec-title:first-of-type { margin-top: 0; }
.bill-form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.bill-items th { text-transform: none; letter-spacing: 0; font-size: .8rem; color: var(--text); font-weight: 600; padding: 8px 6px; }
.bill-items td { padding: 6px; vertical-align: middle; border-bottom: 1px solid var(--line); }
.bill-items tfoot td { border-bottom: 0; padding: 5px 6px; }
.bill-items input, .bill-items select { min-height: 32px; padding: 5px 7px; font-size: 14px; width: 100%; }
.bill-items input.num { text-align: right; }
.bill-items .w-konto { width: 92px; }
.bill-items .w-mwst { width: 124px; }
.bill-items .w-betrag { width: 140px; }
.bill-items .w-vst { width: 90px; }
.bill-items .w-act { width: 40px; }
.bill-items tr.strong td { font-weight: 600; font-size: 1rem; }
.qr-paste { margin: 4px 0 12px; padding: 10px 12px; border: 1px dashed var(--line-strong); border-radius: 8px; background: var(--surface-2); }
.qr-paste summary { cursor: pointer; font-weight: 600; font-size: .92rem; }
.qr-paste textarea { width: 100%; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
.qr-paste p { margin: 6px 0; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; }
.bill-preview-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.bill-preview { width: 100%; height: 1000px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.bill-preview-img { max-width: 100%; border: 1px solid var(--line); border-radius: 8px; }
.upload-inline label.linkbtn { cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 760px) {
  .bill-preview { height: 600px; }
  .bill-items .w-betrag { width: 110px; }
}
.card-pad { padding: 10px 20px 0; margin: 0; }
.list-toolbar select { width: auto; min-width: 130px; }
.table-bills td.truncate { max-width: 190px; }
.table-bills th, .table-bills td { padding-left: 10px; padding-right: 10px; }
.bill-form fieldset:disabled input, .bill-form fieldset:disabled select, .bill-form fieldset:disabled textarea { color: var(--text); }
@media (max-width: 760px) {
  .page-head { flex-wrap: wrap; gap: 12px; }
  .head-actions { flex-wrap: wrap; }
}

/* ---------- Zwei-Faktor-Anmeldung (2.4) ---------- */
.card-title-row.plain { padding: 0; border: 0; margin-bottom: 8px; }
.card-title-row.plain h2 { margin: 0; }
.totp-qr { width: 210px; margin: 10px 0; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.totp-qr svg { display: block; width: 100%; height: auto; }
.secret { word-spacing: 4px; font-size: .95rem; }
.code-input { font-size: 1.35rem !important; letter-spacing: .18em; text-align: center; font-variant-numeric: tabular-nums; max-width: 220px; }
.row-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.help-details { margin: 14px 0 6px; }
.help-details summary { cursor: pointer; color: var(--accent); }
.codes-box { background: #f3ecdf; border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; }
.codes { columns: 2; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1rem; padding-left: 22px; margin: 8px 0 12px; }
.codes li { margin: 3px 0; }
.device-list { padding-left: 18px; margin: 6px 0 10px; }
.bare-box .code-input { max-width: none; }
@media print {
  body.print-codes * { visibility: hidden; }
  body.print-codes .codes-box, body.print-codes .codes-box * { visibility: visible; }
  body.print-codes .codes-box { position: absolute; left: 0; top: 0; width: 100%; background: none; }
  body.print-codes .codes-box button { display: none; }
}
.side-sums > div { gap: 10px; } .side-sums dd { white-space: nowrap; text-align: right; }

/* ---------- Datensicherung (2.5) ---------- */
.backup-status { padding: 14px 20px; border-left: 4px solid var(--ok); }
.backup-status.is-warn { border-left-color: var(--danger); }
.script-row { align-items: flex-start; margin-top: 8px; }
.script-row textarea { flex: 1; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; white-space: pre; overflow-x: auto; }
.backup-hint { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.backup-hint:hover { text-decoration: underline; }

/* ---------- Bank (2.6) ---------- */
.w-check { width: 34px; }
.inline-label { display: flex; align-items: center; gap: 8px; font-size: .9rem; white-space: nowrap; }
.inline-label input { width: auto; }
.pay-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); }
.pay-when { display: flex; flex-direction: column; gap: 6px; }
.pay-when input[type="date"] { width: auto; min-height: 30px; padding: 3px 6px; margin-left: 6px; }
.pay-sum { display: flex; align-items: center; gap: 14px; font-weight: 600; flex-wrap: wrap; }
.row-form.compact { margin: 0 0 4px; flex-wrap: nowrap; }
.row-form.compact select { max-width: 320px; min-height: 32px; padding: 4px 6px; font-size: 13px; }
.next-step { border-left: 4px solid var(--accent); }
tr.is-muted td { color: var(--text-2); }
.pay-when label.check { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pay-when input[type="radio"] { width: 16px; height: 16px; min-height: 0; margin: 0; padding: 0; flex: none; }
.pay-form-table td.truncate { max-width: 180px; }
.pay-form-table td.mono { font-size: .8rem; }
.grid-2 + .card { margin-top: 20px; }

/* ---------- Archiv aus bexio (2.7) ---------- */
.progress { height: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; margin: 10px 0; }
.progress-bar { height: 100%; width: 0; background: var(--accent); transition: width .4s; }
.bexio-run { border-left: 4px solid var(--accent); }
.check-group { border: 0; padding: 0; margin: 4px 0 12px; display: flex; flex-direction: column; gap: 6px; }
.check-group legend { font-weight: 600; font-size: .9rem; margin-bottom: 6px; }

/* ---------- Mahnwesen (2.8) ---------- */
.mahn-row { align-items: flex-start; }
.mahn-row .iconbtn, .mahn-row .linkbtn .ico { width: 16px; height: 16px; }

/* ---------- Transportauftrag (2.9) ---------- */
.ta-top { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.ta-top .card { margin: 0; }
.ta-drop { border: 2px dashed var(--line-strong); }
.ta-drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.ta-drop label.btn { cursor: pointer; }
.ab-log { list-style: none; padding: 0; margin: 10px 0 0; max-height: 180px; overflow: auto; }
.ab-log li { padding: 4px 0; border-top: 1px solid var(--line); }
.ab-log li.ok { color: var(--ok); }
.ab-log li.err { color: var(--danger); }
.ab-log select { max-width: 220px; min-height: 26px; padding: 2px 4px; font-size: 12px; }
.ta-groups { }
.ta-group { break-inside: avoid; border-top: 1px solid var(--line); padding: 8px 0 4px; }
.ta-ghead { display: flex; align-items: center; gap: 8px; padding: 4px 16px; cursor: pointer; }
.ta-table td { padding: 4px 6px; vertical-align: middle; border: 0; }
.ta-table tr.is-sel td { background: var(--surface-2); }
.ta-text { width: 100%; min-width: 260px; }
.ta-table { width: 100%; }
.ta-in { min-height: 28px !important; padding: 3px 6px !important; font-size: 13px !important; width: 110px; }
.ta-in.ta-kg { width: 70px; text-align: right; }
select.ta-in { width: 105px; }
.ta-in.is-custom { background: #d9e7ec; font-weight: 600; }
.ta-in.is-saving { opacity: .6; }
.ta-in.is-error { border-color: var(--danger) !important; }
@media (max-width: 900px) { .ta-top { grid-template-columns: 1fr; } }
.ta-table { table-layout: fixed; }
.ta-table td:nth-child(1) { width: 34px; }
.ta-table td:nth-child(2) { width: auto; }
.ta-table td:nth-child(3) { width: 120px; }
.ta-table td:nth-child(4) { width: 124px; }
.ta-table td:nth-child(5) { width: 84px; }
.ta-table td:nth-child(6) { width: 118px; }
.ta-table td:nth-child(7) { width: 58px; }
.ta-table td.ta-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
@media (max-width: 900px) { .ta-table { table-layout: auto; } .ta-table td.ta-text { white-space: normal; } }
.dir-info { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-top: 10px; }
.dirchip { padding: 2px 8px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.dirchip.on { background: var(--ok-soft); border-color: transparent; }
.dir-msg { flex-basis: 100%; color: var(--text-2); }

/* ---------- 3.0 Kundenportal: Zähler, Freigabe ---------- */
.nav-count { margin-left: auto; background: #c8b89c; color: var(--side); border-radius: 10px; font-size: 11.5px; font-weight: 700; padding: 0 7px; line-height: 18px; }
.flash-warn { background: var(--warn-soft); color: #7d3a12; border-color: #f0cdb6; }
.flash .ico { vertical-align: -4px; margin-right: 4px; }
.btn-block { width: 100%; justify-content: center; }
.fg-table td { vertical-align: top; }
.fg-hints { min-width: 170px; }
.fg-hint { display: inline-block; font-size: 12px; line-height: 1.4; padding: 1px 7px; border-radius: 10px; margin: 0 4px 4px 0; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); }
.fg-hint.fg-ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.fg-hint.fg-warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.fg-total td { font-weight: 600; border-top: 2px solid var(--line-strong); }
.fg-best { border-top: 1px solid var(--line); padding: 14px 24px 6px; }
.fg-best-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.fg-best-act { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.fg-best .table { margin: 6px 0 10px; }
.fg-ohne { background: var(--warn-soft); }
.fg-ohne .table { background: var(--surface); }
.portal-add { border-top: 1px solid var(--line); }
.portal-add .grid-4 { align-items: end; }
.portal-add-check { padding-bottom: 10px; }
.ws-list { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; }
.ws-list li { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.ws-list .status { flex: none; font-size: 11px; }

/* ---------- 3.3 Buchhaltung ---------- */
.print-only { display: none; }
@media print { .print-only { display: block; } .no-print { display: none !important; } .card { box-shadow: none; } }
.fibu-buchen summary { cursor: pointer; }
.fibu-form { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px 12px; align-items: end; margin-top: 14px; }
.fibu-form .fibu-text { grid-column: span 4; }
.fibu-form label:has(select[name=mwst_code]) { grid-column: span 2; }
.fibu-form-btn { padding-bottom: 1px; }
.fibu-journal td { vertical-align: top; }
.w-konto { width: 110px; }
.inline-field { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 6px !important; }
.inline-field input, .inline-field select { width: auto; }
.fibu-q { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); }
.fibu-q-manuell { background: #f3ecdf; border-color: transparent; color: #85602a; }
.fibu-q-auto { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.fibu-q-mwst { background: #e4e8f4; border-color: transparent; color: #3d4f86; }
.fibu-klasse td { background: var(--surface-2); font-weight: 600; font-size: 13px; color: var(--text-2); }
.fibu-bil { margin: 0 0 6px; }
.fibu-bil thead th { background: var(--surface-2); }
.fibu-gewinn { font-size: 1.1rem; }
.mw-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.mw-layout > .card { margin: 0; }
.mw-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.mw-table td { padding-top: 7px; padding-bottom: 7px; }
.mw-z { width: 56px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.mw-sec td { background: var(--surface-2); font-weight: 600; }
.mw-table tr.strong td { font-weight: 600; }
.mw-total td { font-weight: 700; font-size: 1.05rem; border-top: 2px solid var(--line-strong); }
.mw-det summary { cursor: pointer; list-style: none; }
.mw-det { margin-top: 16px; }
@media (max-width: 1100px) {
  .fibu-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fibu-form .fibu-text, .fibu-form label:has(select[name=mwst_code]) { grid-column: span 2; }
  .mw-layout { grid-template-columns: 1fr; }
}
.code-pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 10px; max-height: 360px; overflow: auto; white-space: pre-wrap; word-break: break-all; }
.side-version { display: block; font-size: 11px; opacity: .5; margin: -2px 0 6px; }
/* Reiter in einer Karte (Kontakt › Belege) */
.card.flush .card-tabs { padding: 0 20px; margin: 0; border-bottom: 1px solid var(--line); }
.card-tabs .count { font-size: .75rem; padding: 0 7px; margin-left: 4px; }
.card-tabs a.is-active .count { border-color: var(--accent); color: var(--accent); }
/* Kundenrabatt im Positionseditor */
.rabatt-hint { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--text-2); margin-left: auto; }
.rabatt-hint strong { color: var(--accent); }
/* Kontaktpersonen */
.kp-table tr.is-selected td { background: var(--surface-2); }
.kp-table td form.inline { display: inline; margin-left: 4px; }
.kp-form { padding-bottom: 18px; border-top: 1px solid var(--line); }
.kp-form .form-actions { margin-top: 12px; }
.vk-hint { background: var(--warn-soft); border-bottom: 1px solid var(--line); padding: 12px 20px; } .vk-hint p { margin: 0; } .vk-hint .btn { margin-left: 8px; }
.rv-check { align-self: end; padding-bottom: 10px; }
.radio-list { display: grid; gap: 6px; margin: 8px 0 4px; } .radio-list label { display: flex !important; flex-direction: row !important; align-items: center; gap: 10px; font-weight: 400; } .radio-list input[type=radio] { width: auto; margin: 0; flex: none; }
.inline-check { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 6px; } .inline-check input { width: auto; margin: 0; }
/* Bank: eigene Konten */
.bk-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 0 0 18px; }
.bk-card { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; color: var(--text); box-shadow: var(--shadow); }
.bk-card:hover { text-decoration: none; border-color: var(--line-strong); }
.bk-card.is-kasse { background: var(--surface-2); box-shadow: none; }
.bk-name { font-weight: 600; }
.bk-name .tag { font-size: 11px; }
.bk-iban { font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.bk-saldo { font-size: 1.25rem; font-weight: 600; margin-top: 6px; font-variant-numeric: tabular-nums; }
.bk-meta { font-size: 12px; color: var(--text-2); }
.pay-von { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.pay-von select { width: auto; }
[hidden] { display: none !important; }
.kontakt-tabs { margin-bottom: 16px; }
/* Paket-Hinweis bei m²-Positionen */
.pak-hint { font-size: 12px; color: var(--text-2); margin-top: 3px; white-space: nowrap; min-height: 0; }
.pak-hint.is-ok { color: #24683d; }
.pak-hint .linkbtn { font-size: 12px; padding: 0; }

/* ---------- Auswertungen ---------- */
.aw-zeit { display: flex; align-items: center; justify-content: space-between; gap: 14px 24px; flex-wrap: wrap; padding: 14px 18px; }
.aw-frei { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.aw-frei label { display: flex; align-items: center; gap: 6px; font-size: .88rem; color: var(--text-2); margin: 0; }
.aw-frei input { min-height: 32px; padding: 4px 8px; width: auto; }
.stat small { font-size: .8rem; display: block; margin-top: 2px; }
.aw-head { padding: 14px 18px 4px; }
.aw-table td { vertical-align: top; }
.aw-rang { width: 34px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.aw-bar { display: block; width: 100%; max-width: 260px; height: 6px; margin-top: 5px; }
.aw-anteil .aw-bar { max-width: 90px; margin-left: auto; }
.aw-bar-bg { fill: var(--line); }
.aw-bar-fg { fill: var(--accent); }
.aw-bar-ek .aw-bar-fg { fill: #b08a4a; }
.aw-neu { font-size: .78rem; color: var(--ok); font-weight: 600; }
.aw-chart { overflow-x: auto; }
.aw-chart svg { width: 100%; min-width: 520px; height: auto; max-height: 260px; display: block; }
.aw-c-jetzt { fill: var(--accent); }
.aw-c-vor { fill: #cfd8d5; }
.aw-c-axis { stroke: var(--line-strong); stroke-width: 1; }
.aw-c-lbl { font-size: 10px; fill: var(--text-2); }
.aw-legende { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.aw-legende i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-left: 8px; }
.aw-l-jetzt { background: var(--accent); }
.aw-l-vor { background: #cfd8d5; }
.aw-mehr { padding: 10px 18px; margin: 0; }
.aw-dl .btn { margin-top: 6px; }
@media (max-width: 640px) {
  .aw-zeit { padding: 12px; }
  .aw-bar { max-width: none; }
}
.aw-dub { border-color: #e3c98f; background: #fdf8ec; }
.aw-dub .table { background: transparent; }
.aw-pfeil { width: 30px; color: var(--text-2); text-align: center; }
.aw-dub-alle { margin-top: 12px; }

/* Mehrfachauswahl in Listen */
.bulk-cell { width: 44px; padding: 0 !important; }
.bulk-hit { display: flex; align-items: center; justify-content: center; min-height: 44px; width: 44px; cursor: pointer; margin: 0; }
.bulk-hit input { width: 18px; height: 18px; cursor: pointer; }
.bulk-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 18px; background: #eef3f1; border-bottom: 1px solid var(--line); }
.bulk-bar[hidden] { display: none; }
tr.is-selected td { background: #f3f7f5; }

/* Produktfoto */
.pb-box { display: grid; gap: 8px; margin-bottom: 18px; }
.pb-img { display: block; width: 100%; max-width: 260px; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.pb-leer { padding: 14px; border: 1px dashed var(--line-strong); border-radius: 8px; }
.pb-upload { cursor: pointer; }

/* Bankzahlung erstellt (wie bexio) */
.status-bz { background: #f6e3a1; color: #6b4f00; }
.bz-form { display: grid; gap: 8px; margin-bottom: 8px; }
.bz-form label { font-size: .85rem; }
.bz-box { display: grid; gap: 6px; margin-bottom: 8px; }
.bz-hinweis { margin-bottom: 12px; }
.bz-kopie { margin: 4px 0 6px; }

/* QR-Rechnung hochladen */
.qrr-box { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 18px; border: 1px dashed var(--line-strong); border-radius: 10px; background: var(--surface-2, #f6f4ef); }
.qrr-btn { cursor: pointer; }
.qrr-box.is-ok { border-color: var(--ok); background: var(--ok-soft); }
.qrr-box.is-err { border-color: #e2b4ad; background: var(--danger-soft); }
.form .qrr-box .qrr-btn { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; color: #fff; font-size: .95rem; font-weight: 600; margin: 0; width: auto; }
.form .qrr-box .qrr-btn .ico { width: 18px; height: 18px; margin: 0; }
.form .qrr-box .qrr-btn:hover { color: #fff; }

/* Designstudio */
.ds-grid { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 20px; align-items: start; }
.ds-form { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; }
.ds-form .sec-title { margin-top: 18px; }
.ds-form .sec-title:first-of-type { margin-top: 0; }
.ds-range { display: flex; align-items: center; gap: 10px; color: var(--text); }
.ds-range input[type="range"] { flex: 1; padding: 0; min-height: 0; accent-color: var(--accent); }
.ds-range output { min-width: 34px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.ds-farbe { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ds-farbe input[type="color"], .ds-form input[type="color"] { width: 46px; height: 34px; padding: 2px; }
.ds-swatch { width: 26px; height: 26px; padding: 2px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; }
.ds-swatch svg { width: 100%; height: 100%; display: block; }
.ds-actions { position: sticky; bottom: -1px; background: var(--surface); padding-top: 10px; }
.ds-preview { overflow: hidden; }
.ds-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.ds-frame { border: 0; display: block; transform-origin: 0 0; background: #d9d6d0; }
@media (max-width: 1000px) {
  .ds-grid { grid-template-columns: 1fr; }
  .ds-form { position: static; max-height: none; }
}
.ds-marke-logo { display: flex; align-items: center; gap: 14px; }
.ds-marke-logo img { max-width: 220px; max-height: 70px; border: 1px solid var(--line); border-radius: 6px; padding: 6px; background: #fff; }
#marke { margin-top: 20px; }
/* Radio-Knöpfe und Häkchen in Beschriftungen immer klein und links */
label.check input[type="radio"], label.check input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; margin: 0; padding: 0; flex: none; accent-color: var(--accent); }
label.check { justify-content: flex-start; text-align: left; }
.pos-table tbody tr.pos-row > td { border-bottom: 1px solid var(--line-strong); }

/* Sortimentsstatus Produkte (4.6) */
.tag-auslauf { background: #fdf0d8; color: #8a5a00; }
.tag-ausser { background: #fbe3e1; color: #a1302a; }
h1 .tag + .tag { margin-left: 6px; }
tr.is-ausser td { color: var(--text-2); }
.serie-link { font-weight: 500; }

/* Datensicherung: Wiederherstellen (4.7) */
.backup-table td { vertical-align: top; }
.backup-table .btn-small { margin-right: 8px; }
.backup-status.is-info { border-left: 4px solid var(--accent); }
.backup-upload { border-top: 1px solid var(--line); }
.backup-upload-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.restore-card { max-width: 760px; padding: 24px 28px; }
.restore-card h2 { margin: 0 0 4px; }
.restore-art { border: 0; padding: 0; margin: 18px 0 8px; display: grid; gap: 10px; }
.restore-art legend { font-weight: 600; margin-bottom: 8px; }
.restore-opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.restore-opt input { margin-top: 3px; }
.restore-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.restore-opt.is-disabled { opacity: .55; cursor: not-allowed; }
.restore-hinweise { margin: 14px 0; padding-left: 18px; color: var(--text-2); }
.restore-hinweise li { margin: 4px 0; }
.restore-pw { display: grid; gap: 6px; max-width: 320px; margin-bottom: 16px; }
.backup-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
.backup-table td:last-child a, .backup-table td:last-child form { margin-left: 6px; }
.notfall-card.is-warn { border-left: 4px solid var(--danger); }
.notfall-code { margin: 14px 0; padding: 16px 18px; border: 2px dashed var(--accent); border-radius: 10px; background: var(--accent-soft); }
.notfall-code-wert { font: 600 1.5rem/1.3 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .08em; margin: 6px 0; word-break: break-all; }

/* Buchhaltung: Kontoblätter und Offene Posten (4.8) */
.kontoblatt { margin-bottom: 16px; break-inside: avoid-page; }
.kontoblatt .card-title a { font-weight: 600; }
.op-card { margin-bottom: 18px; }
.op-alter { display: flex; gap: 18px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.op-sub td { font-weight: 600; background: var(--surface-2); }
@media print {
  .kontoblatt, .op-card { box-shadow: none; border: 0; }
  .kontoblatt .table, .op-card .table { font-size: 8.5pt; }
  .kontoblatt .truncate { max-width: none; white-space: normal; }
}
.fibu-dl { display: flex; gap: 10px 24px; flex-wrap: wrap; align-items: center; margin: 4px 0 12px; }
.fibu-dl-item { display: inline-flex; gap: 6px; align-items: center; }
.fibu-dl-item strong { margin-right: 2px; }
.select-small { min-width: 150px; padding: 6px 30px 6px 10px; font-size: .9rem; }

/* MWST: Steuersätze und Grundeinstellungen (4.9.2) */
.mw-subtabs { margin: 0 0 14px; }
.mw-codes th, .mw-codes td { white-space: nowrap; }
.mw-codes td:nth-child(3) { white-space: normal; }
.mw-codes td:nth-child(5) { max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.mw-filter-row th { background: var(--surface); padding-top: 6px; padding-bottom: 8px; font-weight: 400; text-transform: none; }
.mw-filter-row input, .mw-filter-row select { width: 100%; min-width: 60px; padding: 5px 8px; font-size: .85rem; }
.mw-aktiv { font-size: 1rem; width: 28px; }
.mw-code-form .grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 16px; }
.mw-code-form .span-2 { grid-column: span 2; }
@media (max-width: 860px) { .mw-code-form .grid-4 { grid-template-columns: 1fr 1fr; } }
.mw-code-del { display: block; margin: -8px 0 16px; }
.mw-grund { max-width: 900px; }
.mw-fix { margin: 14px 0 6px; max-width: 560px; }
.is-hidden { display: none; }
.fibu-dl-item .btn + .btn { margin-left: 4px; }
.mw-bexio { margin-top: 10px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Notfall-Kopie auf dem Synology (4.9.4) */
.kopie-banner { margin: 0 0 16px; padding: 12px 16px; border-radius: 10px; background: #fff4d6; border: 1px solid #f0d58a; color: #6b4a00; font-size: .92rem; }
.kopie-banner.is-aktiv { background: #fde7e5; border-color: #f0b9b3; color: #8a1f17; }
.kopie-banner a { font-weight: 600; }
.kopie-steps li { margin: 6px 0; }
/* Einklappbare Anleitungen (Datensicherung) */
.fold-card > summary { display: flex; align-items: baseline; gap: 12px; cursor: pointer; list-style: none; }
.fold-card > summary::-webkit-details-marker { display: none; }
.fold-card > summary h2 { margin: 0; }
.fold-card > summary::before { content: '▸'; color: var(--text-2); }
.fold-card[open] > summary::before { content: '▾'; }
.fold-card[open] > summary { margin-bottom: 12px; }
.fold-card[open] > summary .muted { display: none; }
.script-line { background: var(--surface-2); padding: 8px 10px; border-radius: 8px; font-size: .85rem; overflow-x: auto; margin: 6px 0; }
.pos-table .w-mwst { width: 104px; }
.mwst-code-sel { width: 100px; font-size: .85rem; padding-left: 6px; padding-right: 22px; }

/* ---------- Löhne ---------- */
.lohn-jahr select { min-width: 96px; }
.lohn-jahr-tab tr.is-current td { background: var(--accent-soft, #eef4f1); }
.lohn-monat-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 14px; }
.lohn-monat-head h2 { margin: 0 6px; font-size: 1.35rem; min-width: 150px; text-align: center; }
.lohn-head-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.lohn-erstellen { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.lohn-erstellen p { margin: 0; }
.lohn-abr { margin-bottom: 16px; }
.lohn-abr-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.lohn-abr-head h3 { margin: 0; font-size: 1.08rem; display: flex; gap: 10px; align-items: center; }
.lohn-abr-sum { display: flex; gap: 18px; flex-wrap: wrap; margin-left: auto; font-size: .9rem; color: var(--muted); }
.lohn-abr-sum strong { color: var(--text); font-variant-numeric: tabular-nums; }
.lohn-abr-sum .lohn-aus strong { font-size: 1.02rem; }
.lohn-pos .w-lart { width: 240px; }
.lohn-pos .w-menge, .lohn-pos .w-ansatz { width: 96px; }
.lohn-pos .w-betrag { width: 120px; }
.lohn-pos select, .lohn-pos input { width: 100%; }
.lohn-pos tr.is-sv td { color: var(--muted); }
.lohn-sv { margin: 6px 0 12px; }
.lohn-sv th:first-child { width: auto; }
.lohn-kinder input, .lohn-kinder select { width: 100%; min-width: 90px; }
.lohn-einst .card { margin-bottom: 14px; }
.lohn-ma-form .card { margin-bottom: 14px; }
@media (max-width: 760px) {
  .lohn-abr-sum { margin-left: 0; }
  .lohn-head-actions { margin-left: 0; }
}

.lohn-bexio-btn { display: flex; align-items: flex-end; }
.lohn-next { padding-bottom: 14px; margin-bottom: 4px; } .lohn-next p { margin: 0 0 10px; }

/* ---------- Dashboard: Ausgaben (Entwurf B) ---------- */
/* ---------- Widget ---------- */
.xp {
  --text-3: #8f897f;
  --track: #eeebe5;
  --ok-soft: #e5f1e9;
  --warn-soft: #f8ebe2;
  margin-bottom: 20px;
  container-type: inline-size;
  container-name: xp;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font);
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.xp a { color: inherit; }
.xp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Kopf */
.xp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 28px 0; }
.xp-eyebrow { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.xp-range { margin: 3px 0 0; font-size: 12.5px; color: var(--text-2); }
.xp-vs { color: var(--text-3); }

.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; }
.seg-item { padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 500; color: var(--text-2); text-decoration: none; white-space: nowrap; transition: background-color .18s ease, color .18s ease; }
.seg-item:hover { color: var(--text); background: #f0ede7; }
.seg-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.seg-item.is-active { background: var(--accent); color: #fff; }

/* Hero: Total + Monatsverlauf */
.xp-hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; padding: 26px 28px 30px; border-bottom: 1px solid var(--line); }
.xp-label { margin: 0 0 6px; font-size: 12px; color: var(--text-2); }
.xp-num { margin: 0; font-size: 48px; line-height: 1; font-weight: 650; letter-spacing: -.035em; white-space: nowrap; }
.xp-cur { font-size: 17px; font-weight: 500; letter-spacing: 0; color: var(--text-2); margin-right: 8px; vertical-align: 21px; }
.xp-cents { font-size: 22px; font-weight: 500; letter-spacing: -.01em; color: var(--text-3); }
.xp-delta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 0 0; font-size: 13.5px; }
.xp-pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-weight: 600; }
.xp-delta.is-up .xp-pill { background: var(--warn-soft); color: var(--warn); }
.xp-delta.is-down .xp-pill { background: var(--ok-soft); color: var(--ok); }
.xp-delta-txt { color: var(--text-2); }
.xp-note { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13.5px; line-height: 1.55; color: var(--text-2); max-width: 46ch; }
.xp-note a { color: var(--text); font-weight: 550; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.xp-note a:hover { text-decoration-color: var(--accent); }

/* Monatsverlauf */
.mv { margin: 0; display: flex; flex-direction: column; min-width: 0; }
.mv-cap { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; font-size: 12px; color: var(--text-2); }
.mv-legend { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); }
.lg-bar { display: inline-block; width: 8px; height: 10px; border-radius: 2px 2px 0 0; background: var(--accent); }
.lg-tick { display: inline-block; width: 12px; height: 2px; margin-left: 8px; background: var(--text); }
.mv-chart { position: relative; flex: 1; min-height: 150px; margin-left: 30px; }
.mv-plot { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.mv-gl { position: absolute; left: -30px; font-size: 10.5px; color: var(--text-3); transform: translateY(-50%); }
.mv-gl--100 { top: 20%; }
.mv-gl--50 { top: 60%; }
.mv-grid { stroke: var(--line); stroke-width: 1; }
.mv-base { stroke: #cfc9bd; stroke-width: 1; }
.mv-hit { fill: transparent; }
.mv-bar { fill: #c9d6d3; transition: fill .15s ease; }
.mv-col.is-last .mv-bar { fill: var(--accent); }
.mv-prev { stroke: var(--text); stroke-width: 2; }
.mv-col { outline: none; cursor: default; }
.mv-col:hover .mv-bar, .mv-col:focus .mv-bar { fill: var(--accent); }
.mv-col:hover .mv-hit, .mv-col:focus .mv-hit { fill: rgba(47, 74, 69, .05); }
.mv-months { display: grid; grid-template-columns: repeat(12, 1fr); margin: 8px 0 0 30px; font-size: 10.5px; color: var(--text-3); text-align: center; }
.mv-months .is-last { color: var(--text); font-weight: 600; }

/* Rangliste */
.rk-head, .rk-row > .dv > summary, .rk-row:not(.rk-row--rest) {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.6fr) 132px 60px 88px;
  column-gap: 20px;
  align-items: center;
}
.rk-head { padding: 16px 28px 8px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.rk-head-bar { display: flex; justify-content: space-between; }
.rk-head-key { display: inline-flex; align-items: center; gap: 6px; letter-spacing: .02em; text-transform: none; }
.rk-head-key .lg-tick { width: 2px; height: 10px; margin-left: 0; }
.rk-head-r { text-align: right; }

.rk { list-style: none; margin: 0; padding: 0 0 6px; }
.rk-row { position: relative; border-top: 1px solid var(--line); }
.rk-row:first-child { border-top-color: transparent; }
.rk-row:not(.rk-row--rest), .dv-sum { padding: 13px 28px; grid-template-rows: auto auto; row-gap: 1px; transition: background-color .15s ease; }
.rk-row:not(.rk-row--rest):hover, .dv-sum:hover { background: var(--surface-2); }
.rk-row:not(.rk-row--rest):focus-within { background: var(--surface-2); }

.rk-name { grid-row: 1 / 3; display: flex; align-items: baseline; gap: 10px; min-width: 0; font-size: 14.5px; font-weight: 550; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.rk-name:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(47, 74, 69, .35); }
a.rk-name:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
a.rk-name::after { content: ""; position: absolute; inset: 0; } /* ganze Zeile klickbar */
.rk-nr { flex: none; font-size: 11.5px; font-weight: 500; color: var(--text-3); }
.rk-bar { grid-row: 1 / 3; width: 100%; height: 12px; display: block; }
.rk-track { fill: var(--track); }
.rk-fill { fill: var(--accent); }
.rk-row:first-child .rk-fill { fill: var(--accent); }
.rk-prev { stroke: var(--text); stroke-width: 2; }
.rk-amount { text-align: right; font-size: 14.5px; font-weight: 600; white-space: nowrap; }
.rk-cur { font-size: 11px; font-weight: 500; color: var(--text-3); }
.rk-share { grid-row: 1 / 3; text-align: right; font-size: 13.5px; color: var(--text-2); }
.rk-delta { grid-row: 1 / 3; justify-self: end; display: inline-flex; align-items: center; gap: 3px; padding: 3px 8px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.rk-delta.is-up { color: var(--warn); background: var(--warn-soft); }
.rk-delta.is-down { color: var(--ok); background: var(--ok-soft); }
.rk-arrow { font-size: 11px; }
.rk-prevamt { grid-column: 3; grid-row: 2; text-align: right; font-size: 11.5px; color: var(--text-3); white-space: nowrap; }

/* Diverse (aufklappbar) */
.dv-sum { list-style: none; cursor: pointer; }
.dv-sum::-webkit-details-marker { display: none; }
.dv-sum:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.dv-count { font-size: 11.5px; font-weight: 500; color: var(--text-3); }
.dv-toggle { position: relative; flex: none; width: 18px; height: 18px; border: 1px solid var(--line); border-radius: 50%; align-self: center; transition: transform .2s ease, background-color .15s ease; }
.dv-toggle::before, .dv-toggle::after { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 1.5px; background: var(--text-2); transform: translate(-50%, -50%); }
.dv-toggle::after { transform: translate(-50%, -50%) rotate(90deg); transition: opacity .15s ease; }
.dv[open] .dv-toggle::after { opacity: 0; }
.dv-sum:hover .dv-toggle { background: var(--surface); }
.dv .rk-fill { fill: #9fb3af; }
.dv-list { list-style: none; margin: 0; padding: 4px 28px 14px 76px; background: var(--surface-2); columns: 2; column-gap: 40px; }
.dv-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto 76px; gap: 12px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); break-inside: avoid; font-size: 13px; }
.dv-list a { display: flex; gap: 8px; min-width: 0; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dv-list a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.dv-amt { text-align: right; color: var(--text-2); }
.dv-list .rk-delta { grid-row: auto; font-size: 11.5px; padding: 2px 7px; }

/* Fuss */
.xp-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 28px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-3); }
.xp-more { color: var(--accent) !important; font-weight: 600; text-decoration: none; white-space: nowrap; }
.xp-more:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Mittlere Breite ---------- */
@container xp (max-width: 860px) {
  .xp-hero { grid-template-columns: 1fr; gap: 28px; }
  .rk-head, .rk-row > .dv > summary, .rk-row:not(.rk-row--rest) { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 124px 56px 84px; column-gap: 14px; }
}

/* ---------- Telefon (Container < 560 px) ---------- */
@container xp (max-width: 560px) {
  .xp-head { flex-direction: column; gap: 14px; padding: 18px 16px 0; }
  .seg { width: 100%; }
  .seg-item { flex: 1; text-align: center; padding: 7px 4px; font-size: 12px; }
  .xp-hero { padding: 22px 16px 24px; gap: 26px; }
  .xp-num { font-size: 36px; }
  .xp-cur { font-size: 14px; vertical-align: 14px; margin-right: 6px; }
  .xp-cents { font-size: 17px; }
  .xp-delta { gap: 8px; font-size: 13px; }
  .mv-chart { min-height: 120px; margin-left: 26px; }
  .mv-gl { left: -26px; }
  .mv-months { margin-left: 26px; font-size: 9.5px; }
  .mv-months span:nth-child(odd) { visibility: hidden; }

  .rk-head { display: none; }
  .rk { padding-top: 4px; }
  .rk-row:not(.rk-row--rest), .rk-row > .dv > summary {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto;
    column-gap: 12px;
    row-gap: 6px;
    padding: 14px 16px;
  }
  .rk-name { grid-column: 1 / 3; grid-row: 1; font-size: 14px; }
  .rk-amount { grid-column: 3; grid-row: 1; font-size: 14px; }
  .rk-bar { grid-column: 1 / 4; grid-row: 2; }
  .rk-share { grid-column: 1; grid-row: 3; text-align: left; font-size: 12px; font-weight: 600; color: var(--text); }
  .rk-prevamt { grid-column: 2; grid-row: 3; justify-self: start; }
  .rk-prevamt::before { content: "\00b7\00a0\00a0"; }
  .rk-delta { grid-column: 3; grid-row: 3; font-size: 11.5px; padding: 2px 7px; }
  .dv-list { columns: 1; padding: 2px 16px 12px; }
  .dv-list li { grid-template-columns: minmax(0, 1fr) auto auto; }
  .xp-foot { flex-direction: column; align-items: flex-start; padding: 14px 16px; }
}

.rk-delta.is-flat { color: var(--text-2); background: var(--surface-2); border: 1px solid var(--line); }
.xp-leer { margin: 0; padding: 22px 28px; color: var(--text-2); font-size: 14px; }
.xp h2.xp-eyebrow { border: 0; padding: 0; }

/* Auftragsbestätigungen zur Bestellung */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ab-list .ab-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ab-list .ab-item a { align-items: flex-start; min-width: 0; }
.ab-list .ab-name { overflow-wrap: anywhere; line-height: 1.3; }
.ab-list .ab-item .iconbtn { flex: none; color: var(--text-2); }
.ab-list .ab-pick { cursor: pointer; position: relative; }
.ab-list .ab-pick:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.ab-hint { margin: 2px 0 8px; }
.ab-tag { display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .03em; padding: 1px 5px; border-radius: 4px; background: #ebe4f6; color: #5d3f92; vertical-align: 1px; }

/* AB-Eingang */
.ab-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ab-head-title { margin: 0 0 4px; overflow-wrap: anywhere; }
.ab-head-title .ico { vertical-align: -3px; margin-right: 4px; }
.ab-done { overflow-x: auto; }
.ab-done td.truncate { white-space: normal; overflow-wrap: anywhere; }
.ab-aktiv { margin-top: 10px; }
.ab-head p:last-child { margin-bottom: 0; }
.ab-section { font-size: 1.05rem; margin: 26px 0 10px; }
.ab-mail { margin-bottom: 12px; }
.ab-mail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ab-mail-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ab-subject { overflow-wrap: anywhere; }
.ab-files { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.ab-files a { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); overflow-wrap: anywhere; }
.ab-text { margin-top: 10px; }
.ab-text summary { cursor: pointer; color: var(--text-2); }
.ab-text pre { white-space: pre-wrap; font: inherit; font-size: .86rem; color: var(--text-2); max-height: 260px; overflow: auto; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; margin: 8px 0 0; }
.ab-assign { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.ab-vorschlag { text-align: left; }
.ab-vorschlag span { white-space: normal; }
.ab-nr { display: flex; gap: 6px; align-items: center; }
.ab-nr input { width: 220px; }
.ab-setup { margin-top: 26px; }
@media (max-width: 640px) {
  .ab-nr { width: 100%; }
  .ab-nr input { flex: 1; width: auto; min-width: 0; }
  .ab-col-datum { display: none; }
  .ab-done thead { display: none; }
  .ab-done table, .ab-done tbody, .ab-done tr, .ab-done td { display: block; width: auto; }
  .ab-done tr { padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .ab-done td { padding: 2px 0; border: 0; white-space: normal; text-align: left; }
  .ab-done td:empty { display: none; }
}
.ab-section-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ab-section-row .ab-section { margin-bottom: 10px; }
.ta-in.is-auto { background: var(--ok-soft); }
.titel-link { color: var(--accent); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 2px; }
.titel-link:hover { text-decoration-color: var(--accent); }

/* Kontrolle Auftragsbestätigung ↔ Bestellung */
.abk { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin: 0 0 14px; }
.abk > summary { display: flex; align-items: center; gap: 8px; padding: 10px 14px; cursor: pointer; list-style: none; }
.abk > summary::-webkit-details-marker { display: none; }
.abk-ico { display: inline-flex; }
.abk-ok > summary { color: var(--ok); }
.abk-abweichung, .abk-unvollstaendig { border-color: #e6c3a8; background: var(--warn-soft); }
.abk-abweichung > summary, .abk-unvollstaendig > summary { color: var(--warn); }
.abk-unlesbar > summary { color: var(--text-2); }
.abk-table { margin: 0; background: var(--surface); border-top: 1px solid var(--line); }
.abk-table tr.abk-abweichung td, .abk-table tr.abk-einheit td { color: var(--warn); }
.abk-table tr.abk-ok td:last-child { color: var(--ok); }
.abk-table tr.abk-fehlt td:last-child { color: var(--text-2); }
.abk-zeile { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .75rem; }
.card .abk .abk-table th:first-child, .card .abk .abk-table td:first-child, .abk .abk-table th:first-child, .abk .abk-table td:first-child { padding-left: 14px; }
.abk-table th:last-child, .abk-table td:last-child { padding-right: 14px; }
.lt-form { display: grid; gap: 8px; margin: 4px 0 8px; }
.lt-row { display: grid; gap: 6px; }
.lt-row select, .lt-row input { width: 100%; min-width: 0; box-sizing: border-box; }
.lt-form .btn { justify-self: start; }
.abgeholt-form { margin: 10px 0 4px; }

/* E-Mail-Signatur: Vorschau */
.sig-vorschau { display: block; width: 100%; max-width: 640px; height: 290px; background: #fff; border: 1px solid var(--line, #ddd); border-radius: 8px; margin: 10px 0 14px; }
.sig-bild { margin-bottom: 6px; }
.sig-dialog { margin-top: -4px; }
.sig-mini { display: block; width: 100%; height: 200px; border: 1px dashed var(--line, #ddd); border-radius: 6px; background: #fff; margin-top: 4px; }
.filter-note { margin: 0; padding: 8px 16px; font-size: .85rem; background: var(--soft, #f6f5f1); border-bottom: 1px solid var(--line, #e5e2da); }
.export-links { font-size: .82rem; color: var(--muted, #777); margin-left: auto; margin-right: 12px; }

/* ---------- Seitenleiste aufgeräumt (wie bexio): kompakte Einträge, Untermenüs ---------- */
.doc-side .side-title { margin: 18px 0 6px; padding-bottom: 5px; font-size: .7rem; }
.doc-side .side-title:first-child { margin-top: 0; }
.doc-side .action-list { margin: 2px 0 0; }
.doc-side .action-list li { padding: 2px 0; }
.doc-side .action-list .linkbtn, .doc-side .action-list a { font-size: .9rem; line-height: 1.35; padding: 3px 0; gap: 8px; }
.doc-side .action-list .ico { width: 16px; height: 16px; flex: none; }
.doc-side p { margin: 4px 0; }
.doc-side .action-list li.split { display: flex; align-items: center; justify-content: space-between; gap: 6px; position: relative; flex-wrap: wrap; }
.side-drop { position: static; }
.side-drop > summary { list-style: none; cursor: pointer; width: 24px; height: 24px; border-radius: 5px; display: grid; place-items: center; color: var(--text-2); }
.side-drop > summary::-webkit-details-marker { display: none; }
.side-drop > summary::after { content: ""; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; }
.side-drop > summary:hover, .side-drop[open] > summary { background: var(--soft, #f3f1ec); color: var(--accent); }
.side-drop[open] > summary::after { transform: rotate(180deg); }
.side-drop-menu { width: 100%; margin: 2px 0 4px; padding: 4px 0 4px 24px; border-left: 2px solid var(--line, #e5e2da); display: grid; gap: 2px; }
.side-drop[open] { display: contents; }
.side-drop[open] > .side-drop-menu { order: 3; }
.side-drop-menu a, .side-drop-menu .linkbtn { font-size: .86rem !important; }
.side-more { margin: 2px 0 6px; }
.side-more > summary { cursor: pointer; font-size: .82rem; color: var(--accent); list-style: none; padding: 2px 0; }
.side-more > summary::-webkit-details-marker { display: none; }
.side-more > summary::before { content: "▸ "; color: var(--text-2); }
.side-more[open] > summary::before { content: "▾ "; }
.side-more .ws-list { margin-top: 6px; }
/* Dokumentinformationen wie bexio: Bezeichnung klein, Wert darunter */
.doc-side .side-info { display: grid; gap: 10px; font-size: .9rem; }
.doc-side .side-info > div { display: block; margin: 0; }
.doc-side .side-info dt { font-size: .78rem; color: var(--text-2); margin-bottom: 1px; }
.doc-side .side-info dd { margin: 0; line-height: 1.35; }
.doc-side .side-info .side-auto { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; margin-top: 2px; font-size: .78rem; color: var(--text-2); }
.doc-side .seen { padding: 6px 8px; font-size: .8rem; margin-top: 4px; }
.doc-side .not-seen { font-size: .78rem; }
.doc-side .abgeholt-form { margin: 6px 0 2px; }
.doc-side .status { white-space: normal; text-align: left; line-height: 1.3; }
.doc-side .abgeholt-form .btn { width: 100%; justify-content: center; white-space: normal; font-size: .82rem; line-height: 1.25; padding: 7px 10px; }
.side-drop-menu .share-row { display: flex; gap: 6px; margin: 2px 0 4px; }
.side-drop-menu .share-row input { flex: 1; min-width: 0; font-size: .78rem; padding: 4px 6px; }

/* Kontakt: schreibgeschützte Ansicht (erst «Bearbeiten» öffnet die Felder) */
.ansicht-feld { border: 0; margin: 0; padding: 0; min-width: 0; }
.ansicht-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ansicht-kopf h2 { margin: 0; }
.form-ansicht input:disabled, .form-ansicht select:disabled, .form-ansicht textarea:disabled {
  background: var(--surface-2, #f7f6f2); border-color: transparent; color: var(--text); opacity: 1; -webkit-text-fill-color: var(--text); cursor: default; box-shadow: none;
}
.form-ansicht select:disabled { appearance: none; -webkit-appearance: none; background-image: none; }
.form-ansicht input:disabled::placeholder, .form-ansicht textarea:disabled::placeholder { color: transparent; -webkit-text-fill-color: transparent; }
.form-ansicht textarea:disabled { resize: none; }
.form-ansicht label > .muted.small, .form-ansicht .grid-4 > p.muted { display: none; }
.form-ansicht label.check { opacity: 1; }

/* Kontakt: Übersicht wie bexio */
.k-uebersicht { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.k-ansicht, .k-personen { padding: 18px 22px; margin-bottom: 0; }
.k-ansicht-kopf { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.k-kopf-r { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.k-name { margin: 0; font-size: 1.15rem; }
.k-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.k-raster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.k-dl { margin: 0; padding: 10px 0; display: grid; gap: 4px; font-size: .92rem; align-content: start; }
.k-trenn { border-top: 1px solid var(--line); }
.k-voll { grid-column: 1 / -1; }
.k-dl > div { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 10px; }
.k-dl dt { color: var(--text-2); }
.k-dl dd { margin: 0; overflow-wrap: anywhere; line-height: 1.45; }
.k-h { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); margin: 0; }
.k-pliste { list-style: none; margin: 0; padding: 0; }
.k-pliste li { padding: 9px 0; border-top: 1px solid var(--line); font-size: .92rem; }
.k-pliste li:first-child { border-top: 0; padding-top: 0; }
.k-pname { font-weight: 600; }
@media (max-width: 1000px) { .k-uebersicht, .k-raster { grid-template-columns: 1fr; } }

/* Bank: Abgleichen wie bexio */
.bk-hinweis { margin: 0; padding-top: 0; }
.bk-table td { vertical-align: top; }
.bk-text { max-width: 420px; overflow-wrap: anywhere; }
.bk-form-zelle { min-width: 430px; }
.bk-form { display: grid; gap: 5px; }
.bk-zeile { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.bk-zeile .bk-konto { width: 92px; }
.bk-zeile select { max-width: 230px; }
.bk-zeile2 input[name=text] { flex: 1; min-width: 160px; }
.bk-zeile2 .check { gap: 4px; white-space: nowrap; color: var(--text-2); }
.bk-muster { width: 120px; padding: 2px 5px; font-size: .8rem; }
.bk-ign { margin-right: 8px; }
.bk-vorschlag { background: var(--ok-soft, #eef6f0); }
.bk-lr { margin-top: 6px; }
.bk-lr summary { cursor: pointer; color: var(--text-2); }
.bk-lr[open] summary { margin-bottom: 5px; }
.bk-lr select { max-width: 330px; }
.bk-auto-code { outline: 2px solid var(--accent, #2f4a3f); outline-offset: 1px; transition: outline-color .6s; }

/* Bank-Übersicht wie bexio «Banking» – kompakt, alles auf einer Seite */
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.bko-alt { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.bko-liste { display: grid; gap: 10px; margin-bottom: 12px; }
.bko { display: grid; grid-template-columns: minmax(200px, 1.3fr) 1fr 1fr 1fr auto; gap: 18px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow); }
.bko-konto { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.bko-konto h2 { margin: 0; font-size: 1rem; }
.bko-konto h2 .tag { font-size: 11px; vertical-align: middle; }
.bko-feld { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-left: 16px; border-left: 1px solid var(--line); }
.bko-label { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); font-weight: 600; }
.bko-saldo { font-size: 1.15rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bko-zahl { font-weight: 600; }
.bko-btns { display: flex; flex-direction: column; gap: 6px; }
.bko-btns .btn { justify-content: center; }
.bko-weitere { display: flex; gap: 10px; flex-wrap: wrap; }
.bko-mini { display: flex; gap: 14px; align-items: baseline; padding: 8px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); }
.bko-mini:hover { text-decoration: none; border-color: var(--line-strong); }
.bk-anleitung { margin-top: 6px; }
.bk-anleitung summary { cursor: pointer; color: var(--text-2); }
@media (max-width: 1000px) {
  .bko { grid-template-columns: 1fr 1fr; }
  .bko-konto { grid-column: 1 / -1; }
  .bko-feld:nth-of-type(2) { border-left: 0; padding-left: 0; }
  .bko-btns { flex-direction: row; grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .bko { grid-template-columns: 1fr; }
  .bko-feld { border-left: 0; padding-left: 0; }
}

/* Transaktionen wie bexio */
.bk-filter { justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.bk-suche input { min-width: 240px; }
.bk-tx td { vertical-align: middle; }
.bk-tx-text a { color: var(--text); }
.bk-tx tr.is-link { cursor: pointer; }
.bk-tx tr.is-link:hover td { background: var(--surface-2); }
.bkst { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; white-space: nowrap; color: #fff; }
.bkst-offen { background: #d9772b; }
.bkst-auto { background: #5a9a4a; }
.bkst-ok { background: #3f6f57; }
.bkst-ign { background: #9a9a92; }
.bk-leer { text-align: center; padding: 48px 16px; }
.bk-leer strong { display: block; font-size: 1.1rem; margin-bottom: 6px; }
.bk-detail-nav { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.bk-nav-pfeile { margin-left: auto; display: flex; gap: 6px; }
.bk-detail { display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr); gap: 10px; align-items: start; }
.bk-pfeil { align-self: start; margin-top: 26px; font-size: 1.6rem; color: var(--text-3, #aaa); text-align: center; }
.bk-bank-kopf { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.bk-bank-betrag { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bk-dl { margin: 0; }
.bk-bank-fuss { display: flex; justify-content: flex-end; margin-top: 14px; }
.bk-ziel { padding: 0; overflow: hidden; }
.bk-ziel .empty { margin: 18px; }
.bk-ziel-tabs { display: flex; gap: 4px; padding: 0 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.bk-ziel-tabs a { padding: 12px 10px 10px; color: var(--text-2); border-bottom: 2px solid transparent; text-decoration: none; font-weight: 500; }
.bk-ziel-tabs a.is-active { color: var(--text); border-bottom-color: var(--accent); }
.bk-ziel-inhalt { padding: 16px 18px 18px; }
.bk-kand { display: grid; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 4px; }
.bk-kand-zeile { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--line); cursor: pointer; font-weight: 400; }
.bk-kand-zeile:last-child { border-bottom: 0; }
.bk-kand-zeile:has(input:checked) { background: var(--accent-soft, #e7efe9); }
.bk-ziel .bk-muster { width: 160px; display: inline-block; padding: 2px 6px; }
@media (max-width: 900px) {
  .bk-detail { grid-template-columns: 1fr; }
  .bk-pfeil { display: none; }
}
.form .bk-kand-zeile { display: grid; grid-template-columns: auto 1fr auto; flex-direction: row; gap: 10px; text-align: left; font-size: .9rem; color: var(--text); font-weight: 400; }
.form .bk-kand-zeile input { margin: 0; }
.bk-merken { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.form .bk-merken label.check { flex-direction: row; align-items: center; gap: 6px; }
.bk-dl { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; }
.bk-dl dt { color: var(--text-2); font-size: .85rem; }
.bk-dl dd { margin: 0; }

/* Konto-Auswahl mit Suchliste (wie bexio) */
.kombo { position: relative; display: block; }
.kombo > input { width: 100%; }
.kombo-name { display: block; font-size: 12px; color: var(--text-2); min-height: 1em; margin-top: 2px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kombo-name:empty { display: none; }
.kombo-liste { position: absolute; z-index: 50; top: calc(100% + 2px); left: 0; min-width: max(100%, 340px); max-width: 520px; max-height: 320px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: 0 12px 30px rgba(0, 0, 0, .14); padding: 4px 0; }
.kombo-eintrag { display: flex; gap: 10px; padding: 7px 12px; cursor: pointer; font-size: .9rem; font-weight: 400; color: var(--text); line-height: 1.3; }
.kombo-eintrag b { min-width: 44px; font-variant-numeric: tabular-nums; font-weight: 600; }
.kombo-eintrag:hover, .kombo-eintrag.is-aktiv { background: var(--surface-2); }
.kombo-eintrag.is-aktiv { box-shadow: inset 3px 0 0 var(--accent); }
.kombo-leer { padding: 8px 12px; color: var(--text-2); font-size: .85rem; }
.inline-field .kombo, .kombo:has(> .w-konto) { display: inline-block; }
.kombo:has(> .w-konto) .kombo-name { display: none; }
.kombo-gruppe { padding: 8px 12px 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); }
.kombo-liste .kombo-eintrag { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.kombo-liste:has(.kombo-gruppe) { min-width: 100%; max-width: none; }

/* Shop-Versand */
.vs-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.vs-form select { max-width: 170px; }
.vs-kg { width: 64px; }
.vs-mehr summary { cursor: pointer; color: var(--text-2); white-space: nowrap; }
.vs-mehr[open] summary { margin-bottom: 6px; }
.vs-mehr input[name=sendungsnr] { width: 170px; }
.vs-frame { width: 100%; height: 520px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.vs-bereit td { background: #f2f7f3; }
.vs-nr { margin-top: 4px; font-variant-numeric: tabular-nums; }

/* Einstellungen: Übersicht mit Kacheln (wie bexio) */
.es-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.es-kachel { display: flex; gap: 16px; align-items: flex-start; padding: 22px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--text); min-height: 118px; }
.es-kachel:hover { text-decoration: none; border-color: var(--line-strong); background: var(--surface-2); }
.es-kachel strong { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.es-text { display: block; color: var(--text-2); font-size: .88rem; line-height: 1.45; }
.es-ico { flex: none; width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft, #e7efe9); color: var(--accent); }
.es-ico svg { width: 22px; height: 22px; }
.es-zurueck { margin: -6px 0 14px; color: var(--text-2); }
.es-zurueck a { font-weight: 600; }

/* Protokoll */
.pr-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-bottom: 14px; }
.pr-kachel { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); }
.pr-kachel:hover { text-decoration: none; border-color: var(--line-strong); }
.pr-kachel.is-active { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }

/* Ladenverkauf */
.ld-kasse { display: grid; gap: 14px; }
.ld-suche { position: relative; display: flex; gap: 8px; align-items: center; }
.ld-suche input[type="search"] { flex: 1; font-size: 1.05rem; padding: 10px 12px; }
.ld-suche .kombo-liste { top: calc(100% + 2px); min-width: min(100%, 520px); }
.ld-tabelle td { vertical-align: middle; }
.ld-tabelle .ld-zahl { width: 90px; text-align: right; }
.ld-tabelle tfoot td { border-top: 2px solid var(--line-strong); font-size: 1.05rem; }
.ld-zahlen { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; }
.ld-zahlart { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border: 1px solid var(--line-strong); border-radius: var(--radius); cursor: pointer; font-weight: 600; }
.ld-zahlart:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--surface-2); }
.ld-fertig { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; border-left: 3px solid var(--accent); }
.ld-summen { margin-left: auto; font-size: .9rem; }
tr.is-muted td { opacity: .55; }
@media (max-width: 640px) { .ld-tabelle .ld-zahl { width: 64px; } .ld-zahlen { justify-content: stretch; } .ld-zahlen .btn { width: 100%; } }
.ld-kopf { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ld-kopf .card-title { margin: 0; }
.ld-kopf input[type="date"] { width: auto; }

/* Cleanox-Shop › Produkte */
.sp-kopf { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.sp-hilfe { margin: 0; padding-top: 0; }
.sp-tabelle .sp-nr { width: 110px; }
.sp-tabelle tr.sp-offen td { background: #fff8e1; }
.sp-tabelle tr.sp-abw td.sp-warn, .sp-warn { color: #b3261e; font-weight: 600; }
@media (prefers-color-scheme: dark) { .sp-tabelle tr.sp-offen td { background: rgba(255, 200, 0, .08); } }
.sp-tabelle td:first-child { min-width: 200px; }
.sp-tabelle th { white-space: normal; }
.sp-fuss { display: flex; flex-wrap: wrap; gap: 10px; }
.sp-tabelle td .btn-small + .btn-small { margin-left: 4px; }
.sp-standard { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sp-tabelle td:nth-child(4) { min-width: 190px; }
.sp-knoepfe { min-width: 130px; }
.sp-knoepfe .btn-small { display: block; width: 100%; margin: 0 0 4px; }
.sp-tabelle td .sp-knoepfe .btn-small + .btn-small, .sp-knoepfe .btn-small + .btn-small { margin-left: 0; }
.sp-tabelle td:nth-child(3) { min-width: 170px; }
.sp-tabelle td:nth-child(4) { min-width: 0; }
.ta-zfuss { display: flex; justify-content: flex-end; }
.ta-auftraege .ta-akopf td { background: var(--surface-2); border-top: 2px solid var(--line-strong); padding-top: 10px; padding-bottom: 10px; }
.ta-auftraege tbody.ta-auftrag tr:not(.ta-akopf) td:nth-child(2) { padding-left: 4px; }
.ta-einst { margin-top: 18px; align-items: start; }
.ta-skript { width: 100%; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; white-space: pre; }
/* Leiste «Angewählte rückgängig» bleibt beim Scrollen unten sichtbar, sobald etwas angewählt ist */
.ta-zfuss.is-aktiv { position: sticky; bottom: 0; z-index: 5; background: var(--surface); border-top: 1px solid var(--line-strong); box-shadow: 0 -6px 16px rgba(0, 0, 0, .08); }
.ta-zfuss.is-aktiv .btn { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Menü links etwas kompakter (5.13.11): alle Punkte ohne Scrollen sichtbar */
.side { padding: 14px 10px; }
.brand { padding: 2px 8px 12px; }
.brand-mark { width: 30px; height: 30px; font-size: 16px; }
.brand-text { font-size: 15px; }
.nav { gap: 1px; }
.nav-item { padding: 6px 10px; gap: 10px; font-size: 13.5px; }
.nav-item .ico { width: 17px; height: 17px; }
.nav hr { margin: 6px 4px; }
.side-foot { padding-top: 10px; }
.side-foot .who { font-size: 13.5px; margin-bottom: 2px; }
@media (max-height: 760px) { .nav-item { padding: 5px 10px; font-size: 13px; } .nav hr { margin: 4px 4px; } }

/* Dashboard «Ausgaben» kompakt mit Kreis (5.14.0) */
.xk { display: grid; grid-template-columns: minmax(0, 1.05fr) 190px minmax(0, 1.35fr); gap: 28px; align-items: center; padding: 16px 24px 18px; }
.xk-num { margin: 0; font-size: 32px; line-height: 1.05; font-weight: 650; letter-spacing: -.03em; white-space: nowrap; }
.xk-num .xp-cur { font-size: 13px; vertical-align: 12px; margin-right: 6px; }
.xk-num .xp-cents { font-size: 16px; }
.xk .xp-delta { margin: 8px 0 0; font-size: 12.5px; gap: 8px; }
.xk-note { margin: 8px 0 0; font-size: 12px; color: var(--text-2); line-height: 1.45; }
.xk-note a { color: var(--text); font-weight: 550; }
.xk-verlauf { margin: 12px 0 0; }
.xk-verlauf figcaption { font-size: 11px; color: var(--text-3); margin-bottom: 4px; }
.xk-mv { display: block; width: 100%; height: 56px; overflow: visible; }
.xk-verlauf .mv-months { margin: 3px 0 0; font-size: 9.5px; }
.xk-kreis { display: flex; justify-content: center; }
.xk-pie { width: 180px; height: 180px; display: block; }
.xk-ring { fill: none; stroke: var(--track, #eceae4); stroke-width: 6.5; }
.xk-slice circle { fill: none; stroke-width: 6.5; transition: stroke-width .15s ease, opacity .15s ease; cursor: pointer; }
.xk-slice:hover circle, .xk-slice:focus circle { stroke-width: 8.5; }
.xk-pie:hover .xk-slice:not(:hover) circle { opacity: .55; }
.xk-pie-lbl { font-size: 6px; font-weight: 700; fill: var(--text); }
.xk-pie-sub { font-size: 2.6px; fill: var(--text-2); }
.xk-c0 circle { stroke: #2f4a45; } .xk-dot.xk-c0 { background: #2f4a45; }
.xk-c1 circle { stroke: #6b8f71; } .xk-dot.xk-c1 { background: #6b8f71; }
.xk-c2 circle { stroke: #c8b89c; } .xk-dot.xk-c2 { background: #c8b89c; }
.xk-c3 circle { stroke: #7fa6b8; } .xk-dot.xk-c3 { background: #7fa6b8; }
.xk-c4 circle { stroke: #b5835a; } .xk-dot.xk-c4 { background: #b5835a; }
.xk-c5 circle { stroke: #9c8fb8; } .xk-dot.xk-c5 { background: #9c8fb8; }
.xk-c6 circle { stroke: #d49a8f; } .xk-dot.xk-c6 { background: #d49a8f; }
.xk-c7 circle { stroke: #bdb7aa; } .xk-dot.xk-c7 { background: #bdb7aa; }
.xk-leg { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.xk-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) 46px 64px 66px; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 6px; color: var(--text); text-decoration: none; font-size: 13px; cursor: pointer; }
a.xk-row:hover, .xk-rest summary:hover { background: var(--surface-2); text-decoration: none; }
.xk-dot { width: 10px; height: 10px; border-radius: 3px; }
.xk-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xk-pct { text-align: right; color: var(--text-2); font-variant-numeric: tabular-nums; }
.xk-chf { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.xk-row .rk-delta { grid-row: auto; justify-self: end; padding: 2px 6px; font-size: 11px; }
.xk-rest summary { list-style: none; }
.xk-rest summary::-webkit-details-marker { display: none; }
.xk-rest summary .xk-name::after { content: " ▾"; color: var(--text-3); }
.xk-rest details[open] summary .xk-name::after { content: " ▴"; }
.xk-sub { list-style: none; margin: 2px 0 6px 26px; padding: 0; font-size: 12px; max-height: 220px; overflow-y: auto; }
.xk-sub li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 8px; }
.xk-sub a { color: var(--text-2); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xk-sub a:hover { color: var(--accent); text-decoration: underline; }
.xp .xp-head { padding: 16px 24px 0; }
@media (max-width: 1100px) { .xk { grid-template-columns: 1fr 170px; } .xk-leg { grid-column: 1 / -1; } }
@media (max-width: 640px) { .xk { grid-template-columns: 1fr; padding: 14px 16px; } .xk-kreis { order: -1; } .xk-row { grid-template-columns: 10px minmax(0, 1fr) 42px 60px; } .xk-row .rk-delta { display: none; } }

/* Listen (Kontakte, Produkte, Verkauf …) kompakter (5.14.0) */
.table-list { font-size: 13.5px; }
.table-list th { padding: 7px 12px; font-size: .74rem; }
.table-list td { padding: 6px 12px; }
.table-list .filter-row th { padding-top: 6px; padding-bottom: 7px; }
.table-list .filter-row input, .table-list .filter-row select { min-height: 28px; padding: 3px 7px; font-size: 13px; }
.table-list td .ico, .table-list td svg.ico { width: 15px; height: 15px; }
.card:has(.table-list) .list-toolbar { padding: 10px 14px; gap: 18px; }
.list-toolbar input[type="search"] { min-height: 32px; }

/* Bank › Transaktionen kompakter (5.14.0) */
.bk-tx { font-size: 13px; }
.bk-tx th { padding: 7px 12px; font-size: .72rem; }
.bk-tx td { padding: 5px 12px; line-height: 1.35; }
.bk-tx .bkst { padding: 1px 6px; font-size: 11px; }
.bk-tx-text { max-width: 0; width: 100%; }
.bk-tx-text, .bk-tx-text a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-bx-kand { margin: 10px 0 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.bk-bx-kand p { margin: 0 0 6px; }
.bk-bx-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 5px 0; border-top: 1px solid var(--line); font-size: 13px; }
.bk-bx-zeile:first-of-type { border-top: 0; }

/* Lieferantenrechnungen: Sammel-Upload */
.lr-stapel { padding: 0; margin-bottom: 16px; }
.lr-stapel-kopf { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px; }
.lr-stapel-kopf::-webkit-details-marker { display: none; }
.lr-stapel[open] .lr-stapel-kopf { border-bottom: 1px solid var(--line); }
.lr-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 14px 16px; padding: 22px 16px; border: 2px dashed var(--line-strong); border-radius: 10px; text-align: center; cursor: pointer; }
.lr-drop:hover, .lr-drop.is-over { border-color: var(--accent); background: var(--surface-2); }
.lr-stapel-liste td.warn { color: #9a5b00; }
.lr-stapel-liste .lr-datei { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-stapel > p { margin: 8px 16px 14px; }
.lr-ebill { display: flex; gap: 8px; margin: 0 16px 10px; font-size: 13px; }

/* ---------- Quittungen scannen (Einkauf › Quittungen) ---------- */
.qt-scan { padding: 0; margin-bottom: 16px; }
.qt-scan-kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.qt-scan-kopf strong { display: inline-flex; align-items: center; gap: 6px; }
.qt-zahlart { display: inline-flex; align-items: center; gap: 14px; }
.qt-zahlart .check { margin: 0; }
.qt-scan > p { margin: 8px 16px 14px; }
.qt-pruef-liste { display: flex; flex-direction: column; }
.qt-pruef { display: grid; grid-template-columns: 170px 1fr; gap: 16px; padding: 14px 16px; border-top: 1px solid var(--line); }
.qt-pruef:first-child { border-top: 0; }
.qt-vorschau { display: flex; align-items: center; justify-content: center; min-height: 120px; max-height: 260px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.qt-vorschau img, .qt-vorschau canvas { display: block; max-width: 100%; max-height: 258px; height: auto; object-fit: contain; }
.qt-felder { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.qt-zeile1, .qt-zeile2 { display: grid; gap: 10px; }
.qt-zeile1 { grid-template-columns: 120px minmax(160px, 1fr) 130px; }
.qt-zeile2 { grid-template-columns: 160px minmax(160px, 1fr) 170px; }
.qt-felder label { margin: 0; }
.qt-felder .warn-text { color: #9a5b00; margin: 0; }
.qt-aktionen { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
@media (max-width: 760px) {
  .qt-pruef { grid-template-columns: 1fr; }
  .qt-zeile1, .qt-zeile2 { grid-template-columns: 1fr 1fr; }
  .qt-geschaeft { grid-column: 1 / -1; }
}
.qt-liste-kopf { padding: 14px 16px 6px; }

/* Preise inkl. MWST: enthaltene MWST klein unter dem Total */
.t-klein td { color: var(--muted, #6b6b6b); font-size: 0.9em; }
.bk-auto-info { margin: -6px 0 12px; display: flex; align-items: center; gap: 6px; }
.ld-datum { display: inline-flex; align-items: center; gap: 6px; margin: 0 8px 0 0; font-weight: 400; }
.ld-datum input { width: auto; }
.ld-datum-aendern { display: inline-block; }
.ld-datum-aendern summary { display: inline; cursor: pointer; color: var(--accent); list-style: none; }
.ld-datum-aendern summary::-webkit-details-marker { display: none; }
.ld-datum-aendern[open] form { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.ld-datum-aendern input[type=date] { width: auto; padding: 4px 6px; }

/* Logo «Workspace» (drei Säulen) */
.brand .ws-logo { width: 34px; height: 34px; flex: none; color: #fff; }
.brand-center .ws-logo { color: var(--side, #23302e); width: 40px; height: 40px; }
.brand-text { letter-spacing: -.1px; }
.brand-text small { font-size: 9.5px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 500; margin-top: 3px; opacity: .6; }
.dash-oben { margin-bottom: 16px; }
.dash-oben .card-title-row { flex-wrap: nowrap; }
.dash-oben .card-title-row > .small, .dash-oben .card-title-row > a { white-space: nowrap; }
.dash-oben .card-title-row .card-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 700px) { .dash-oben .card-title-row { flex-wrap: wrap; } }

.lf-skonto { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 10px; grid-column: 1 / -1; }
.lf-skonto-titel { grid-column: 1 / -1; font-size: 13px; font-weight: 600; }
@media (max-width: 700px) { .lf-skonto { grid-template-columns: 1fr 1fr; } }
.bk-tx tfoot .bk-tx-total td { border-top: 2px solid var(--line-strong, #cfcac0); padding-top: 10px; padding-bottom: 10px; }

/* ---------- Zahlungsaufträge: ruhige, einzeilige Liste ---------- */
.za-liste { table-layout: fixed; width: 100%; font-size: 13px; border-collapse: collapse; }
.za-liste th { padding: 8px 12px; font-size: .72rem; }
.za-liste tbody td { padding: 7px 12px; line-height: 1.3; vertical-align: middle; border-bottom: 1px solid var(--line); }
.za-liste tbody tr:last-child td { border-bottom: 1px solid var(--line-strong); }
.za-liste tr.is-link { cursor: pointer; }
.za-liste tr.is-link:hover td { background: var(--surface-2); }
.za-c-name { width: 22%; } .za-c-iban { width: 20%; } .za-c-re { width: 19%; } .za-c-dat { width: 92px; }
.za-c-betrag { width: 170px; } .za-c-status { width: 112px; } .za-c-datei { width: 36px; }
.za-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.za-liste td.za-text:first-child { font-weight: 600; }
.za-iban { color: var(--text-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.za-ref { color: var(--text-2); font-weight: 400; }
.za-dat { font-variant-numeric: tabular-nums; }
.za-leer { color: var(--text-2); }
.za-betrag { font-variant-numeric: tabular-nums; font-weight: 600; }
.za-cur { color: var(--text-2); font-weight: 400; font-size: 11.5px; margin-right: 2px; }
.za-skonto { display: inline-block; margin-right: 8px; padding: 0 6px; border-radius: 9px; font-size: 10.5px; font-weight: 600; line-height: 16px; color: var(--ok); background: var(--ok-soft); vertical-align: 1px; }
.za-status { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); }
.za-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #9a9a92; flex: none; }
.za-st-uebermittelt::before { background: #5a9a4a; }
.za-st-ausgefuehrt::before { background: var(--accent); }
.za-st-offen::before { background: #d9772b; }
.za-datei a { color: var(--text-2); display: inline-flex; }
.za-datei a:hover { color: var(--text); }
.za-datei svg { width: 15px; height: 15px; }
.za-liste tfoot td { padding: 9px 12px; border: 0; background: var(--surface-2); }
.za-liste tfoot tr td, .za-liste tfoot tr:first-child td { border-top: 0 !important; border-bottom: 0 !important; box-shadow: none; }
.za-liste tfoot td:first-child { font-weight: 600; }

/* ---------- Bank: alle Listen ruhig und einzeilig (wie Zahlungsaufträge) ---------- */
.bk-liste { font-size: 13px; }
.bk-liste th { padding: 8px 12px; font-size: .72rem; }
.bk-liste td { padding: 7px 12px; line-height: 1.3; vertical-align: middle; white-space: nowrap; }
.bk-liste td.truncate, .bk-liste td.bk-tx-text { max-width: 0; overflow: hidden; text-overflow: ellipsis; }
.bk-liste td.bk-tx-text { width: 100%; }
.bk-liste td.bk-tx-text a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.bk-liste td.bk-name { width: 22%; font-weight: 600; }
.bk-liste td.bk-text { width: 40%; }
.bk-liste .bk-dat { font-variant-numeric: tabular-nums; }
.bk-liste .bk-betrag { font-variant-numeric: tabular-nums; font-weight: 600; }
.bk-liste .bk-betrag.pos { color: var(--ok); }
.bk-liste .bk-betrag.neg { color: var(--danger); }
.bk-zu { display: inline-block; margin-right: 8px; padding: 0 6px; border-radius: 9px; font-size: 11px; line-height: 17px; color: var(--accent); background: var(--accent-soft); vertical-align: 1px; }
.bk-leise { color: var(--text-2); }
.bk-leise:hover { color: var(--text); }
.bk-links a { color: var(--accent); }
/* Status überall als Punkt mit Text statt farbiger Felder */
.bkst { display: inline-flex; align-items: center; gap: 7px; padding: 0 !important; background: none !important; color: var(--text-2) !important; font-size: 12.5px !important; font-weight: 400; }
.bkst::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #9a9a92; flex: none; }
.bkst.bkst-offen::before { background: #d9772b; }
.bkst.bkst-auto::before { background: #5a9a4a; }
.bkst.bkst-ok::before { background: var(--accent); }
.bkst.bkst-ign::before { background: #b7b3aa; }

/* ---------- Produktliste: fein und einzeilig ---------- */
.pr-liste { table-layout: fixed; width: 100%; font-size: 13px; }
.pr-liste col.pr-c-chk { width: 44px; }
.pr-liste col.pr-c-nr { width: 84px; }
.pr-liste col.pr-c-bez { width: 34%; }
.pr-liste col.pr-c-lf { width: 14%; }
.pr-liste col.pr-c-serie { width: 26%; }
.pr-liste col.pr-c-preis { width: 76px; }
.pr-liste col.pr-c-best { width: 92px; }
.pr-liste th { padding: 8px 12px; font-size: .72rem; }
.pr-liste td { padding: 6px 12px; line-height: 1.3; vertical-align: middle; white-space: nowrap; }
.pr-liste td.pr-kurz { overflow: hidden; text-overflow: ellipsis; }
.pr-liste td.pr-kurz a { color: var(--text); }
.pr-liste td.pr-kurz a.serie-link { font-weight: 500; }
.pr-liste .pr-nr { color: var(--text-2); font-variant-numeric: tabular-nums; }
.pr-liste .pr-leise { color: var(--text-2); font-size: 12px; font-weight: 400; }
.pr-liste .pr-zahl { font-variant-numeric: tabular-nums; }
.pr-liste .pr-vp { font-weight: 600; }
.pr-liste .bulk-hit { min-height: 30px; }

/* ---------- Einheitliche feine Listen: Kontakte, Produkte, Lager, Verkauf ---------- */
.table.liste-fein { font-size: 13px; }
.table.liste-fein th { padding: 8px 12px; font-size: .72rem; }
.table.liste-fein td { padding: 6px 12px; line-height: 1.3; vertical-align: middle; white-space: nowrap; }
.table.liste-fein td:first-child, .table.liste-fein th:first-child { padding-left: 16px; }
.table.liste-fein td:last-child, .table.liste-fein th:last-child { padding-right: 16px; }
.table.liste-fein td.bulk-cell, .table.liste-fein th.bulk-cell { padding: 0 !important; }
.table.liste-fein .bulk-hit { min-height: 30px; }
.table.liste-fein td.num { font-variant-numeric: tabular-nums; }
.table.liste-fein td .muted, .table.liste-fein td.muted { color: var(--text-2); }
.table.liste-fein .status { font-size: 11.5px; padding: 1px 8px; }
.table.liste-fein .btn-small { padding: 2px 8px; font-size: 12px; min-height: 0; }
.table.liste-fein svg { width: 14px; height: 14px; }
/* Kontakte: Kopfzeile mit Filtern ebenfalls kleiner */
.table-list.liste-fein thead tr:first-child th { font-size: .72rem; font-weight: 500; text-transform: uppercase; letter-spacing: .03em; color: var(--text-2); padding-top: 9px; padding-bottom: 6px; }
.table-list.liste-fein thead tr:first-child th a { color: inherit; }
.table-list.liste-fein .filter-row th { padding-top: 6px; padding-bottom: 8px; }
.table-list.liste-fein .filter-row input, .table-list.liste-fein .filter-row select { min-height: 28px; padding: 3px 8px; font-size: 12.5px; }
.table-list.liste-fein td:first-child, .table-list.liste-fein th:first-child { padding-left: 16px; }
.table-list.liste-fein td:last-child, .table-list.liste-fein th:last-child { padding-right: 16px; }
/* Lager: lange Bezeichnungen und Bemerkungen kürzen */
.table.liste-fein td.fein-kurz { max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
/* Shop: Versand-Listen fein */
.table.liste-fein .small { font-size: 12px; }
.table.liste-fein td.vs-snr a { font-weight: 400; font-variant-numeric: tabular-nums; color: var(--text-2); }
.table.liste-fein td.vs-aktion { text-align: right; color: var(--text-2); }
.table.liste-fein td.vs-aktion a { font-weight: 400; color: var(--text-2); }
.table.liste-fein td.vs-aktion a:hover, .table.liste-fein td.vs-snr a:hover { color: var(--accent); }
.table.liste-fein.vs-table td { white-space: normal; vertical-align: top; padding-top: 8px; padding-bottom: 8px; }

/* ---------- Schriftgrösse der Listen (Einstellungen › Darstellung) ---------- */
body.ls-normal .table.liste-fein, body.ls-normal .bk-liste, body.ls-normal .za-liste { font-size: 14.5px; }
body.ls-normal .table.liste-fein td, body.ls-normal .bk-liste td, body.ls-normal .za-liste tbody td { padding-top: 9px; padding-bottom: 9px; }
body.ls-normal .table.liste-fein th, body.ls-normal .bk-liste th, body.ls-normal .za-liste th { font-size: .76rem; padding-top: 10px; padding-bottom: 10px; }
body.ls-normal .table.liste-fein .small, body.ls-normal .pr-liste .pr-leise { font-size: 13px; }
body.ls-normal .table-list.liste-fein .filter-row input, body.ls-normal .table-list.liste-fein .filter-row select { min-height: 32px; font-size: 14px; }
body.ls-gross .table.liste-fein, body.ls-gross .bk-liste, body.ls-gross .za-liste { font-size: 16px; }
body.ls-gross .table.liste-fein td, body.ls-gross .bk-liste td, body.ls-gross .za-liste tbody td { padding-top: 12px; padding-bottom: 12px; line-height: 1.4; }
body.ls-gross .table.liste-fein th, body.ls-gross .bk-liste th, body.ls-gross .za-liste th { font-size: .82rem; padding-top: 12px; padding-bottom: 12px; }
body.ls-gross .table.liste-fein .small, body.ls-gross .pr-liste .pr-leise { font-size: 14px; }
body.ls-gross .table.liste-fein .status { font-size: 13px; }
body.ls-gross .table-list.liste-fein .filter-row input, body.ls-gross .table-list.liste-fein .filter-row select { min-height: 36px; font-size: 15px; }
body.ls-gross .pr-liste col.pr-c-preis { width: 90px; } body.ls-gross .pr-liste col.pr-c-best { width: 110px; } body.ls-gross .pr-liste col.pr-c-nr { width: 96px; }
.ls-wahl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 6px 0 4px; }
@media (max-width: 640px) { .ls-wahl { grid-template-columns: 1fr; } }
.ls-opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 8px; cursor: pointer; background: var(--surface); }
.ls-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.ls-opt input { margin: 0; }
.ls-opt > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.ls-muster { font-weight: 600; width: 34px; text-align: center; color: var(--text); }
.ls-opt-fein .ls-muster { font-size: 13px; } .ls-opt-normal .ls-muster { font-size: 16px; } .ls-opt-gross .ls-muster { font-size: 20px; }
.form .ls-opt, .ls-opt { flex-direction: row !important; align-items: center !important; justify-content: flex-start; font-weight: 400; margin: 0; }
.form .ls-opt input[type=radio] { width: 16px; height: 16px; min-height: 0; flex: none; accent-color: var(--accent); }
.ls-opt strong { color: var(--text); font-size: 14px; }
.table.liste-fein td.vs-aktion .linkbtn { color: var(--text-2); font-weight: 400; }
.table.liste-fein td.vs-aktion .linkbtn:hover { color: var(--accent); }

/* Sortierbare Listen */
th.sortbar { cursor: pointer; user-select: none; }
th.sortbar:hover { color: var(--text); }
th.sortbar::after { content: '↕'; margin-left: 5px; opacity: .3; font-size: .9em; }
th.sortbar.sort-auf::after { content: '↑'; opacity: .9; }
th.sortbar.sort-ab::after { content: '↓'; opacity: .9; }
th.sortbar.sort-auf, th.sortbar.sort-ab { color: var(--text); }
th.sortbar:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Buchhaltung: Bilanz und Erfolgsrechnung als eigene Seiten, ER mit Vergleich */
.fibu-bilanz-seiten { gap: 0; }
.fibu-bilanz-seiten > div:first-child { border-right: 1px solid var(--line); }
@media (max-width: 900px) { .fibu-bilanz-seiten > div:first-child { border-right: 0; } }
.er-vgl { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 0 6px; }
.er-vgl-jahr { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; cursor: pointer; margin: 0; }
.er-vgl-jahr input { margin: 0; }
.er-vergleich .er-text { width: 100%; }
.er-vergleich td.er-alt, .er-vergleich th.er-alt { color: var(--text-2); }
.er-vergleich td.er-neu { font-weight: 600; }
.er-vergleich td.er-diff { color: var(--text-2); }
.er-vergleich td.er-pct { min-width: 64px; }
.er-vergleich tr.er-gruppe td { background: var(--surface-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--text-2); font-weight: 500; }
.er-vergleich tr.fg-total td { font-weight: 600; border-top: 1px solid var(--line-strong); }
.er-vergleich tr.er-ergebnis td { font-weight: 700; border-top: 2px solid var(--line-strong); background: var(--surface-2); }
.er-vergleich tbody + tbody { border-top: 0; }
@media print { .er-vergleich { font-size: 10px; } .er-vergleich td, .er-vergleich th { padding: 3px 6px !important; } }
.row-form .er-vgl, .er-vgl { flex: none; width: auto; }
.row-form .er-vgl-jahr, .er-vgl .er-vgl-jahr { flex: none; width: auto; flex-direction: row; padding: 5px 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); }
.er-vgl .er-vgl-jahr:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.er-vgl .er-vgl-jahr input { width: 14px; height: 14px; min-height: 0; accent-color: var(--accent); }

/* Neue Lieferantenrechnung: ein Feld für eine oder mehrere Rechnungen */
.qrr-box.qrr-mehr { display: block; padding: 0; border: 0; background: none; }
.qrr-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px 16px; border: 2px dashed var(--line-strong); border-radius: 10px; text-align: center; cursor: pointer; background: var(--surface-2); margin: 0; }
.form .qrr-drop { font-weight: 400; }
.qrr-drop:hover, .qrr-drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.qrr-drop-titel { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .98rem; color: var(--text); }
.qrr-drop-titel .ico { width: 18px; height: 18px; }
.qrr-drop [data-qrr-msg] { max-width: 760px; }
.qrr-mehr.is-ok .qrr-drop { border-color: var(--ok); background: var(--ok-soft); }
.qrr-mehr.is-err .qrr-drop { border-color: #e2b4ad; background: var(--danger-soft); }
.qrr-mehr .lr-ebill { margin: 10px 2px 0; font-weight: 400; flex-direction: row; align-items: flex-start; }
.qrr-mehr .lr-ebill input { width: auto; min-height: 0; margin-top: 3px; }
.qrr-mehr .qrr-liste { margin-top: 10px; }
.qrr-mehr > p[data-lr-sum] { margin: 8px 2px 0; }
.qrr-mehr > p[data-lr-sum]:empty { display: none; }
.qrr-mehr { margin-bottom: 18px; }
.form .qrr-mehr label.lr-ebill { display: block; font-size: 13px; line-height: 1.45; }
.form .qrr-mehr label.lr-ebill input { display: inline-block; vertical-align: -2px; margin: 0 6px 0 0; }
.qrr-mehr .lr-stapel-liste { table-layout: fixed; width: 100%; font-size: 12.5px; }
.qrr-mehr .lr-stapel-liste th { font-size: .7rem; padding: 7px 8px; }
.qrr-mehr .lr-stapel-liste td { padding: 6px 8px; vertical-align: top; overflow-wrap: anywhere; }
.qrr-mehr .lr-stapel-liste th:nth-child(1) { width: 20%; }
.qrr-mehr .lr-stapel-liste th:nth-child(2) { width: 17%; }
.qrr-mehr .lr-stapel-liste th:nth-child(3) { width: 14%; }
.qrr-mehr .lr-stapel-liste th:nth-child(4) { width: 11%; }
.qrr-mehr .lr-stapel-liste th:nth-child(5) { width: 12%; }
.qrr-mehr .lr-stapel-liste .lr-datei { max-width: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qrr-mehr .lr-stapel-liste td .muted.small { font-size: 11.5px; line-height: 1.35; margin-top: 2px; }
.qrr-box.is-ziel .qrr-drop, .qrr-box.is-ziel:not(.qrr-mehr) { border-color: var(--accent); background: var(--accent-soft); }

/* Auftrag: warum noch offen (Belegfluss) */
.au-rest { margin-top: 16px; padding: 12px 14px; border: 1px solid #ecd2a8; background: #fdf6ea; border-radius: 8px; }
.au-rest p { margin: 0 0 8px; }
.au-rest .table { background: transparent; }

/* ---------- Buchhaltung › Prioritas (Jahresrechnung des Treuhänders) ---------- */
.prio-upload { padding: 0; margin-bottom: 14px; }
.prio-upload > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px; }
.prio-upload > summary::-webkit-details-marker { display: none; }
.prio-upload[open] > summary { border-bottom: 1px solid var(--line); }
.prio-upload-form { padding: 12px 16px 0; }
.prio-upload > p { margin: 8px 16px 14px; }
.prio-blaetter { margin: 0 0 12px; flex-wrap: wrap; }
.prio-vgl-hinweis { margin: 0 0 10px; color: var(--text-2); }
.prio-bilanz { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.prio-bilanz.mit-vgl { grid-template-columns: 1fr; }
@media (max-width: 1000px) { .prio-bilanz { grid-template-columns: 1fr; } }
.prio-tab { font-size: 13px; }
.prio-tab th { font-size: .72rem; }
.prio-tab td { padding-top: 5px; padding-bottom: 5px; }
.prio-tab td.prio-alt, .prio-tab th.prio-alt, .prio-tab td.prio-delta { color: var(--text-2); }
.prio-tab tr.prio-titel td { background: var(--surface-2); font-size: .74rem; text-transform: uppercase; letter-spacing: .03em; color: var(--text-2); font-weight: 600; padding-top: 8px; }
.prio-tab tr.prio-text td { color: var(--text-2); font-size: 12.5px; white-space: normal; line-height: 1.45; }
.prio-tab tr.prio-total td { font-weight: 700; border-top: 1px solid var(--line-strong); }
.prio-tab th.prio-ws, .prio-tab td.prio-ws { background: #f6f8fb; }
.prio-tab td.prio-abw { color: #b3261e; font-weight: 600; }
.prio-tab td.prio-gleich { color: var(--ok); text-align: right; }
@media (prefers-color-scheme: dark) { .prio-tab th.prio-ws, .prio-tab td.prio-ws { background: rgba(255,255,255,.04); } }

/* Prioritas: Workspace-Ansicht */
.prio-tag { display: inline-block; margin-left: .4em; padding: 0 .4em; border-radius: 3px; font-size: .75em; background: #fff3cd; color: #7a5a00; vertical-align: middle; }
.prio-ws-chip { font-weight: 600; }
@media print { .prio-tag { border: 1px solid #999; background: none; } }

/* Logo «work.space» (Schriftzug mit goldenem Punkt) */
.ws-wm { display: inline-flex; align-items: baseline; font-weight: 800; font-size: 22px; letter-spacing: -.035em; line-height: 1; color: inherit; }
.ws-wm i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #E0B566; margin: 0 1px; }
.ws-wm b { font-weight: 500; }
.brand .brand-text { gap: 4px; }
.brand-center { justify-content: center; }
.brand-center .brand-text { align-items: center; color: var(--side, #23302e); }
.brand-center .ws-wm { font-size: 34px; }
.brand-center .ws-wm i { width: 7px; height: 7px; background: #B7791F; }

/* Demo-Zugang */
.demo-band { background: #1F3A33; color: #F1E3C4; font-size: 13px; padding: 7px 16px; text-align: center; }
.demo-band a { color: #fff; font-weight: 600; margin-left: 10px; text-decoration: underline; }
.demo-gesperrt { max-width: 640px; margin: 40px auto; text-align: center; }
.demo-gesperrt .btn { margin: 6px; }

/* Auswahlfelder: überall gleich wie die Eingabefelder (Safari/Mac zeigt sonst graue, gewölbte Knöpfe) */
select:not([multiple]):not([size]) {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235E6964' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 11px 8px;
  padding-right: 30px; cursor: pointer;
}
select:not([multiple]):not([size]):disabled { cursor: default; opacity: .75; }
/* schmale Auswahlfelder (Einheit, MWST in Positionen, Typ-Filter): kleiner Pfeil, wenig Abstand */
.pos-table select, .table-list th[data-col="typ"] select, .ab-log select, .row-form.compact select {
  padding-right: 18px !important; background-position: right 5px center; background-size: 9px 6px;
}
.form-ansicht select:disabled { background-image: none; padding-right: 11px; }

/* Buchhaltung: Änderungsprotokoll */
.prot-geloescht { color: var(--danger, #b42318); font-weight: 600; }
.prot-geaendert { color: #8a5a00; font-weight: 600; }
.prot-entsperrt { color: var(--danger, #b42318); font-weight: 600; }
.prot-gesperrt, .prot-start { color: var(--text-2, #555); font-weight: 600; }
