:root {
  --bg: #f4f5f7; --card: #fff; --ink: #222; --muted: #666; --line: #e1e1e1;
  --accent: #12344b; --accent-2: #e7edf2; --warn: #b4441f; --warn-bg: #fbece6; --ok: #2f7a4a; --ok-bg: #e5f3ea;
  --radius: 4px; --side: 230px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.5 Lato, "Helvetica Neue", Helvetica, Arial, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 23px; font-weight: 700; letter-spacing: .01em; color: var(--accent); margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 12px; font-weight: 600; }
h2:not(:first-child) { margin-top: 22px; }
h3 { font-size: 14px; margin: 16px 0 6px; }
.muted { color: var(--muted); }
.neg { color: var(--warn); font-weight: 600; }
.pre { white-space: pre-line; }
.r { text-align: right; }
.count { font-size: 13px; font-weight: 500; color: var(--muted); background: #e9ecef; padding: 2px 9px; border-radius: 20px; }
code { background: #eceff2; padding: 1px 5px; border-radius: 4px; }

/* Layout */
.side { position: fixed; inset: 0 auto 0 0; width: var(--side); background: #12344b; color: #d5dee6; display: flex; flex-direction: column; padding: 18px 12px; overflow-y: auto; }
.brand { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; color: #fff; padding: 2px 8px 18px; }
.brand:hover { text-decoration: none; }
.brand b { letter-spacing: .02em; }
.brand small { display: block; font-size: 11px; color: #9fb4c5; font-weight: 400; text-transform: uppercase; letter-spacing: .08em; margin-top: 2px; }
.brand-logo { width: 76px; height: auto; background: #fff; padding: 5px; flex: none; display: block; }
.side nav a { display: block; color: #d5dee6; padding: 7px 10px; border-radius: 7px; margin: 1px 0; }
.side nav a:hover { background: rgba(255,255,255,.08); text-decoration: none; color: #fff; }
.side nav a.on { background: rgba(255,255,255,.14); color: #fff; font-weight: 700; box-shadow: inset 3px 0 0 #fff; }
.nav-h { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: #8fa6b8; padding: 16px 10px 4px; }
.side-foot { margin-top: auto; padding: 12px 10px 0; font-size: 12px; color: #9fb4c5; }
.side-foot a { color: #fff; }
main { margin-left: var(--side); padding: 26px 32px 60px; max-width: 1400px; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.crumbs { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.actions, .btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px; }
.grid2 .card { margin-bottom: 0; }
.card.flush { padding: 0; overflow: hidden; }
.pad { padding: 16px 20px 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.card-head h2 { margin: 0; }
.scroll-x { overflow-x: auto; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #cfd5db; background: #fff; color: var(--ink); padding: 7px 13px; border-radius: 3px; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { background: #f0f2f5; text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #0b2435; }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.danger { color: var(--warn); border-color: #e9c3b5; }
.btn.danger:hover { background: var(--warn-bg); }
.icon { border: 0; background: none; font-size: 18px; line-height: 1; color: #a3a9a5; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.icon:hover { color: var(--warn); background: var(--warn-bg); }

/* Forms */
.form label, form label { display: block; font-size: 12px; font-weight: 600; color: #4b524e; margin-bottom: 10px; }
input, select, textarea { display: block; width: 100%; margin-top: 4px; font: inherit; color: var(--ink); background: #fff; border: 1px solid #d2d7dc; border-radius: 7px; padding: 7px 9px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid #9db6ca; border-color: var(--accent); }
input[type=checkbox], input[type=radio] { display: inline; width: auto; margin: 0 6px 0 0; }
input[type=file] { border: 1px dashed #bfc6bb; padding: 14px; background: #f8f9fa; }
label.check { display: flex; align-items: center; font-weight: 500; color: var(--ink); font-size: 13px; }
.row { display: flex; gap: 12px; align-items: flex-end; }
.row > label { flex: 1; }
.row > .w1 { flex: 1; } .row > .w2 { flex: 2; } .row > .w3 { flex: 3; }
.row.pay { margin-top: 14px; }
.row.pay .btn { margin-bottom: 10px; }
.seg { display: inline-flex; background: #e6e9ed; border-radius: 9px; padding: 3px; margin-bottom: 16px; }
.seg label { margin: 0; padding: 6px 16px; border-radius: 7px; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--ink); display: flex; align-items: center; }
.seg label:has(input:checked) { background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.1); }
.seg input { display: none; }
form.inline { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
form.inline label { display: flex; align-items: center; gap: 8px; margin: 0; }
form.inline select { margin: 0; width: auto; }
input.short { width: 150px; display: inline-block; margin: 0; }
input.tiny { width: 60px; display: inline-block; margin: 0 4px; padding: 3px 6px; text-align: right; }
.upload { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.foot-actions { display: flex; justify-content: flex-end; }

/* Filter */
.filters { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.filters input[type=search] { max-width: 340px; margin: 0; }
.filters select { width: auto; margin: 0; }
.filters label.check { margin: 0; }
.pills { display: flex; gap: 4px; flex-wrap: wrap; }
.pill { padding: 5px 11px; border-radius: 20px; background: #e9ecef; color: var(--ink); font-size: 13px; }
.pill:hover { text-decoration: none; background: #dde2e7; }
.pill.on { background: var(--accent); color: #fff; }

/* Tabellen */
table.list { width: 100%; border-collapse: collapse; }
.list th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); background: #f8f9fa; white-space: nowrap; }
.list td { padding: 9px 12px; border-bottom: 1px solid #eceef0; vertical-align: top; }
.list th.r, .list td.r { text-align: right; white-space: nowrap; }
.list tbody tr { cursor: pointer; }
.list.static tbody tr { cursor: default; }
.list tbody tr:hover { background: #f4f7fa; }
.list tfoot td { font-weight: 700; padding: 10px 12px; background: #f8f9fa; }
.list tr.archived { opacity: .5; }
.list tr.subtotal td { font-weight: 700; border-top: 1.5px solid var(--ink); }
.list .empty { text-align: center; color: var(--muted); padding: 30px; }
.card > .list { margin-top: 4px; }
.clip { max-width: 420px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.map select { min-width: 150px; font-weight: 500; font-size: 12px; }
.map select.set { border-color: var(--accent); background: var(--accent-2); }
.map td { white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }

.kind { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; font-size: 11px; font-weight: 700; margin-right: 6px; vertical-align: 1px; }
.kind-firma { background: #e1e9f0; color: var(--accent); }
.kind-person { background: #eee6d9; color: #7a5a24; }
h1 .kind { width: 28px; height: 28px; font-size: 14px; }

.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 20px; background: #eceee9; color: #555; white-space: nowrap; }
.s-offen { background: #e6eef8; color: #2a5a8f; }
.s-angenommen, .s-bezahlt, .s-geliefert, .s-erledigt { background: var(--ok-bg); color: var(--ok); }
.s-teilbezahlt, .s-in_arbeit { background: #fbf2dc; color: #8a6412; }
.s-abgelehnt, .s-storniert { background: #f0eeee; color: #8b6f6f; text-decoration: line-through; }
.s-ueberfaellig { background: var(--warn-bg); color: var(--warn); }

/* Kacheln */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.tiles.small { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; color: var(--ink); }
a.tile:hover { text-decoration: none; border-color: #b9c9c0; }
.tile-l { font-size: 12px; color: var(--muted); font-weight: 600; }
.tile-v { font-size: 22px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.tiles.small .tile-v { font-size: 18px; }
.tile-s { font-size: 12px; color: var(--muted); }
.tile.warn { border-color: #efc9b9; background: #fff8f5; }
.tile.warn .tile-v { color: var(--warn); }

dl.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; margin: 0; }
dl.kv dt { color: var(--muted); font-size: 13px; }
dl.kv dd { margin: 0; }
.person { padding: 8px 0; border-bottom: 1px solid #eceef0; }

.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; background: var(--ok-bg); color: var(--ok); border: 1px solid #c7e3d1; }
.flash.error { background: var(--warn-bg); color: var(--warn); border-color: #f0cdbf; }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px; }
.toolbar .sep { width: 1px; height: 26px; background: var(--line); }
.danger-zone { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }

details.menu { position: relative; }
details.menu summary { list-style: none; }
details.menu summary::-webkit-details-marker { display: none; }
details.menu > div { position: absolute; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); min-width: 180px; z-index: 10; padding: 4px; }
details.menu > div a { display: block; padding: 7px 12px; border-radius: 6px; color: var(--ink); }
details.menu > div a:hover { background: #f0f2f5; text-decoration: none; }
details.texts { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; }
details.texts summary { cursor: pointer; font-weight: 600; }
details.texts[open] summary { margin-bottom: 10px; }
.logo-prev { max-height: 60px; max-width: 220px; }

/* Positionen-Editor */
table.pos { width: 100%; border-collapse: collapse; }
.pos th { font-size: 12px; color: var(--muted); text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); background: #f8f9fa; }
.pos td { padding: 6px; border-bottom: 1px solid #eceef0; vertical-align: top; }
.pos input, .pos select, .pos textarea { margin: 0; padding: 5px 7px; }
.pos textarea { margin-top: 4px; font-size: 13px; min-height: 30px; overflow: hidden; color: #4b524e; }
.pos .n { width: 105px; text-align: right; }
.pos .n input { text-align: right; }
.pos .n.s { width: 75px; }
.pos .u { width: 80px; }
.pos .x { width: 34px; text-align: center; }
.pos .drag { width: 22px; color: #b6bcb7; cursor: grab; text-align: center; user-select: none; padding-top: 11px; }
.pos .tot { padding-top: 11px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pos .nm { display: flex; gap: 6px; align-items: center; }
.pos .sku { font-size: 11px; background: #eceff2; padding: 2px 6px; border-radius: 4px; color: var(--muted); white-space: nowrap; }
.pos .f-name { font-weight: 600; }
.pos tr.k-text td { background: #f9fafb; }
.pos tr.k-zwischensumme td { background: #eef2f6; }
.pos .f-name.sub { font-weight: 700; border-color: transparent; background: transparent; }
.pos tr.dragging { opacity: .4; }
.pos-add { display: flex; gap: 8px; padding: 12px; align-items: center; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pos-add .grow { flex: 1; min-width: 260px; }
.pos-add input { margin: 0; }
.totals { margin-left: auto; max-width: 440px; padding: 12px 20px 16px; }
.totals > div > div, .totals > div:not(#t_vat) { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; gap: 12px; }
.totals b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.totals .grand { border-top: 2px solid var(--accent); margin-top: 4px; padding-top: 8px; font-size: 16px; }

/* Autocomplete */
.ac { position: relative; }
.ac-list { display: none; position: absolute; left: 0; right: 0; top: calc(100% + 2px); background: #fff; border: 1px solid #cfd5db; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 20; max-height: 320px; overflow-y: auto; font-weight: 400; }
.ac-item { padding: 8px 12px; cursor: pointer; display: flex; gap: 8px; align-items: baseline; font-size: 14px; color: var(--ink); }
.ac-item .r { margin-left: auto; }
.ac-item.on, .ac-item:hover { background: var(--accent-2); }
.ac-empty { padding: 10px 12px; color: var(--muted); font-size: 13px; }

/* Login */
.login-body { display: grid; place-items: center; min-height: 100vh; background: #12344b; }
.login { width: 340px; }
.login .brand { color: var(--accent); padding: 0 0 18px; }
.login .brand-logo { padding: 0; width: 90px; }
.login .brand { align-items: center; text-align: center; width: 100%; }
.login .brand small { color: var(--muted); }
.login .btn { width: 100%; justify-content: center; margin-top: 6px; }


@media print { .side, .actions, .toolbar, .danger-zone { display: none; } main { margin: 0; } }
.list td:first-child { white-space: nowrap; }
.env-banner { background: #fff4d6; border: 1px solid #f0d58a; color: #6b4e00; padding: 8px 14px; border-radius: 4px; margin-bottom: 16px; font-size: 13px; font-weight: 600; }
.env-tag { display: inline-block; margin-top: 6px; font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: #f0c419; color: #12344b; padding: 1px 8px; border-radius: 3px; }
.side-test { border-right: 4px solid #f0c419; }
.tags { display: flex; gap: 4px; flex-wrap: wrap; }
.tag { display: inline-block; font-size: 11px; font-weight: 600; background: var(--accent-2); color: var(--accent); padding: 1px 7px; border-radius: 3px; white-space: nowrap; }
a.tag:hover { text-decoration: none; background: #d5e0ea; }
.tag-alt { background: #eef0e6; color: #4d5a2a; }
.head-tags { margin-top: 8px; }
td.tags { display: table-cell; max-width: 240px; }
td.tags .tag { margin: 0 3px 3px 0; }
td.nowrap, .list td.owner { white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin: -4px 0 12px; max-height: 92px; overflow-y: auto; }
.chip { border: 1px solid #d2d7dc; background: #fff; border-radius: 12px; padding: 2px 9px; font: inherit; font-size: 12px; cursor: pointer; color: #444; }
.chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 4px 0 18px; }
.card.note { background: var(--accent-2); border-color: #c9d6e2; padding: 12px 16px; }
.inline-label { margin: 8px 0 0; max-width: 420px; }
.ac-item .kind { flex: none; }
.mlabel { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 3px; color: #fff; background: var(--c, #12344b); white-space: nowrap; vertical-align: middle; }
h1 .mlabel { font-size: 12px; }
.list.mails td { vertical-align: top; }
.list.mails td.dir { color: var(--muted); width: 18px; padding-left: 0; padding-right: 0; text-align: center; }
.list.mails td.who { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list.mails tr.labeled td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.label-pick { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 12px; }
.label-pick .lp { display: flex; align-items: center; gap: 4px; margin: 0; font-weight: 500; cursor: pointer; }
.label-pick input { margin: 0; }
.atts { display: flex; flex-direction: column; gap: 4px; }
.att { padding: 6px 10px; border: 1px solid var(--line); border-radius: 4px; background: #fafbfc; }
.mailbody { font-size: 14px; line-height: 1.55; max-height: 70vh; overflow: auto; }
.mailframe { width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.mail-grid .card { margin-bottom: 0; }
.reminder { border-color: #f0d58a; background: #fff8e1; margin-bottom: 18px; }
input.colorpick { width: 38px; height: 32px; padding: 2px; display: inline-block; margin: 0; vertical-align: middle; }
.snip { font-size: 12px; color: #555; margin-top: 3px; line-height: 1.45; }
.snip mark, .mailbody mark, .list.mails b mark { background: #ffe58a; color: inherit; padding: 0 1px; border-radius: 2px; }
.filters input.wide { max-width: 420px; flex: 1 1 320px; }
.filters input.date { width: 150px; display: inline-block; margin: 0 0 0 4px; }
.mailsearch { margin: 0; padding-bottom: 0; }
.mailsearch input[type=search] { max-width: 420px; }
.tiles.mini { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.tiles.mini .tile { padding: 9px 12px; }
.tiles.mini .tile-l { font-size: 11px; }
.tiles.mini .tile-v { font-size: 16px; margin-top: 0; }
.tiles.mini .tile-s { font-size: 11px; }
@media (max-width: 1100px) { .tiles.mini { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tabs { display: flex; align-items: flex-end; gap: 2px; padding: 12px 16px 0; border-bottom: 1px solid var(--line); }
.tab { border: 1px solid transparent; border-bottom: 0; background: none; font: inherit; font-weight: 600; color: var(--muted); padding: 8px 14px; border-radius: 4px 4px 0 0; cursor: pointer; margin-bottom: -1px; }
.tab:hover { color: var(--accent); }
.tab.on { background: #fff; border-color: var(--line); color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); }
.tab .count { font-size: 11px; padding: 1px 7px; }
.tabs-right { margin-left: auto; padding-bottom: 8px; }
details.multisel { position: relative; }
details.multisel summary { list-style: none; }
details.multisel summary::-webkit-details-marker { display: none; }
.multisel-panel { position: absolute; z-index: 15; top: calc(100% + 4px); left: 0; background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 10px 12px; min-width: 260px; display: flex; flex-direction: column; gap: 6px; }
.multisel-panel label.check { margin: 0; }
.multisel-panel .btns { margin-top: 6px; }
.filter-chip { display: inline-flex; gap: 6px; align-items: center; background: var(--accent-2); border: 1px solid #c9d6e2; padding: 5px 10px; border-radius: 4px; margin-bottom: 12px; font-size: 13px; }
.filter-chip > a:last-child { font-size: 16px; color: var(--muted); margin-left: 4px; }
#mails.card.flush, #belege.card.flush { overflow: visible; }
.website-row { align-items: center; margin-bottom: 10px; }
.website-row input { margin: 0; flex: 1; }
.imp-box { margin: 0 0 12px; }
.imp-table td, .imp-table th { padding: 6px 8px; }
.imp-table input { margin: 0; }
input.filled { background: #eef7ee; border-color: #8fc79a; }
.tagsel { position: relative; margin-bottom: 12px; }
.tagsel > label { margin-bottom: 4px; }
.tagsel-box { min-height: 36px; border: 1px solid #d2d7dc; border-radius: 7px; padding: 5px 8px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; cursor: pointer; background: #fff; }
.tagsel-box:focus, .tagsel-box:hover { border-color: var(--accent); }
.tagsel-box .tag { font-size: 12px; padding: 2px 4px 2px 8px; display: inline-flex; align-items: center; gap: 2px; }
.tagsel-box .x { border: 0; background: none; cursor: pointer; color: var(--accent); font-size: 14px; line-height: 1; padding: 0 3px; }
.tagsel-chips { display: contents; }
.tagsel-panel { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.14); padding: 8px; }
.tagsel-search { margin: 0 0 6px; }
.tagsel-list { max-height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.tagsel-list label.check { margin: 0; padding: 3px 4px; border-radius: 4px; }
.tagsel-list label.check:hover { background: var(--accent-2); }
.tagsel-new { margin-top: 6px; }
.taglist td { padding: 4px 8px; }

/* ---------------- Tablet & Handy ---------------- */
.mobile-bar, .nav-backdrop { display: none; }
@media (max-width: 1100px) {
  :root { --side: 210px; }
  main { padding: 22px 20px 60px; }
  .grid2 { grid-template-columns: 1fr; }
  .grid2 .card { margin-bottom: 0; }
  .card.flush { overflow-x: auto; }
  .tiles.mini { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .mobile-bar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 40; background: #12344b; color: #fff; padding: 8px 12px; height: 56px; }
  .mobile-bar.side-test { border-bottom: 3px solid #f0c419; border-right: 0; }
  .mobile-brand { display: flex; align-items: center; gap: 10px; color: #fff; min-width: 0; }
  .mobile-brand:hover { text-decoration: none; }
  .mobile-brand img { height: 38px; background: #fff; padding: 3px; }
  .mobile-brand b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mobile-brand .env-tag { margin: 0; }
  .burger { width: 42px; height: 42px; border: 0; background: rgba(255,255,255,.1); border-radius: 6px; display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 0 10px; cursor: pointer; flex: none; }
  .burger span { display: block; height: 2px; background: #fff; border-radius: 2px; }
  .side { transform: translateX(-100%); transition: transform .2s ease; z-index: 50; width: 270px; box-shadow: 4px 0 24px rgba(0,0,0,.25); }
  body.nav-open .side { transform: none; }
  body.nav-open .nav-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 45; }
  .side nav a { padding: 10px 12px; }
  main { margin-left: 0; padding: 16px 14px 60px; }
  h1 { font-size: 20px; }
  .head { align-items: flex-start; }
  .head .actions { width: 100%; }
  .btn { min-height: 40px; }
  .btn.small { min-height: 34px; }
  input, select, textarea { font-size: 16px; }   /* verhindert Zoom auf dem iPhone */
  .card { padding: 14px; }
  .pad { padding: 14px 14px 0; }
  .filters { flex-direction: column; align-items: stretch; }
  .filters input[type=search], .filters select, .filters input.wide { max-width: none; width: 100%; flex: none; }
  .filters label.check { flex-wrap: nowrap; }
  .filters .pills, .pills { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; min-width: 0; max-width: 100%; }
  main { overflow-x: clip; }
  .card-head { flex-wrap: wrap; gap: 8px; }
  form.inline { flex-wrap: wrap; }
  input.short { max-width: 100%; }
  .pill { white-space: nowrap; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tiles.mini { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile-v { font-size: 18px; }
  .list th, .list td { padding: 8px 10px; }
  .grid2 > *, main > * { min-width: 0; }
  table.list { display: block; overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
  table.list > thead, table.list > tbody, table.list > tfoot { width: 100%; }
  .tabs { max-width: 100%; }
  .hide-sm { display: none !important; }
  .show-sm { display: inline !important; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; padding: 8px 8px 0; }
  .tab { white-space: nowrap; padding: 8px 10px; }
  .tabs-right { position: sticky; right: 0; background: #fff; padding-left: 6px; }
  .toolbar { gap: 8px; }
  .toolbar .sep { display: none; }
  dl.kv { grid-template-columns: 110px 1fr; }
  .danger-zone { justify-content: flex-start; }
  .multisel-panel, .ac-list { max-width: calc(100vw - 40px); }
  table.pos { min-width: 820px; }
  .pos-add { flex-direction: column; align-items: stretch; }
  .totals { max-width: none; }
  .mailframe, .mailbody { max-height: none; height: auto; }
  .mailframe { height: 60vh; }
  .login { width: calc(100vw - 32px); max-width: 360px; }
}
@media (max-width: 640px) {
  .row { flex-direction: column; align-items: stretch; gap: 0; }
  .row > label { width: 100%; }
  .website-row { flex-direction: row; gap: 8px; }
  .website-row .btn { white-space: nowrap; }
  .tiles.mini .tile-s { display: none; }
  .list.mails td.who { max-width: 120px; }
  .head .actions .btn { flex: 1 1 auto; justify-content: center; }
  details.menu > div { right: auto; left: 0; }
}
@media print { .mobile-bar { display: none; } }
.tag-b2c { background: #fbf2dc; color: #8a6412; }
label.check.b2c { margin: 4px 0 14px; font-weight: 600; }
.person-firms { margin-bottom: 8px; }
.firm-links td { padding: 6px 8px; vertical-align: middle; }
.firm-links input { margin: 0; }
.firm-links .kind { margin-right: 6px; }
.firm-links:empty, .firm-links tbody:empty { display: none; }
.firm-links { width: 100%; } .firm-links td:nth-child(2) { width: 42%; } .firm-links td:nth-child(3) { width: 1%; white-space: nowrap; }
.row-actions { display: inline-flex; gap: 2px; align-items: center; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 0; background: none; border-radius: 6px; color: #7a838c; cursor: pointer; }
.icon-btn:hover { background: var(--accent-2); color: var(--accent); text-decoration: none; }
.icon-btn.danger:hover { background: var(--warn-bg); color: var(--warn); }
.btn.icon-only { padding: 0 10px; min-width: 40px; justify-content: center; }
.btn.icon-only.danger { color: var(--warn); }
@media (max-width: 900px) { .icon-btn { width: 38px; height: 38px; } }
.title-actions { display: inline-flex; gap: 2px; margin-left: 2px; }
.title-actions .icon-btn svg { width: 20px; height: 20px; }
.round-plus { width: 40px; height: 40px; cursor: pointer; }
.round-plus svg { width: 28px; height: 28px; }
details.menu[open] > .round-plus { background: var(--accent-2); color: var(--accent); }
details.menu > div[data-title]::before { content: attr(data-title); display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 6px 12px 4px; }
.grid2 > .rel-card { margin-bottom: 0; } .rel-card .row.pay { flex-wrap: wrap; }
.grid2 > * { min-width: 0; } .rel-card .list td { padding: 7px 8px; }
details.menu .menu-h { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 12px 4px; border-top: 1px solid var(--line); margin-top: 4px; }
.dash-sec { margin-bottom: 26px; }
.dash-h { font-size: 17px; text-transform: none; letter-spacing: 0; color: var(--accent); font-weight: 700; margin: 0 0 10px; padding-bottom: 6px; border-bottom: 2px solid var(--accent); }
.dash-sec .tiles { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-bottom: 12px; }
.dash-sec > .card.flush { margin-bottom: 0; }
.dash-sec .grid2 .card .list { table-layout: fixed; width: 100%; } .dash-sec .grid2 .card .list td { overflow-wrap: anywhere; } .dash-sec .grid2 .card .list td.r { width: 26%; } .dash-sec .grid2 .card .list td:nth-child(3) { width: 24%; }

.dash-h a { color: inherit; text-decoration: none; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.dash-h a span { font-size: 13px; font-weight: 400; opacity: .75; }
.dash-h a:hover span { opacity: 1; text-decoration: underline; }
.dash-sec .more { display: inline-block; margin-top: 8px; font-size: 13px; }

/* Produkte */
.thumb-col { width: 52px; padding-right: 0 !important; }
.thumb { width: 44px; height: 44px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 4px; display: block; }
.thumb.none { background: #f3f5f7; }
table.products td { vertical-align: middle; }
.prod-html { font-size: 14px; line-height: 1.45; }
.prod-html img { max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 4px; }
.prod-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.img-edit { display: grid; grid-template-columns: 160px 1fr; gap: 16px; align-items: start; }
.img-prev { width: 160px; height: 160px; border: 1px solid var(--line); border-radius: 6px; display: flex; align-items: center; justify-content: center; background: #fff; overflow: hidden; }
.img-prev img { max-width: 100%; max-height: 100%; object-fit: contain; }
.card h3 { font-size: 13px; margin: 16px 0 4px; color: var(--accent); }
p.muted.pad { padding-bottom: 16px; margin: 0; }
@media (max-width: 1100px) { .prod-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .img-edit { grid-template-columns: 1fr; }
  .thumb-col { width: 44px; } .thumb { width: 36px; height: 36px; }
  .prod-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.drop { position: relative; border: 2px dashed var(--line); border-radius: 8px; padding: 18px; text-align: center; color: var(--muted); cursor: pointer; display: block; }
.drop.over { border-color: var(--accent); background: var(--accent-2); }
.drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
table.rules input.pct { width: 70px; }
table.rules select, table.rules input { font-size: 13px; }
tr.review td { background: #fff8e1; }
.warn-t { color: #a15c00; }
.tag-warn { background: var(--warn-bg); color: var(--warn); }
.tablewrap { overflow-x: auto; }

.show-sm { display: none; }
.imgpick .pick-main { width: 90px; height: 70px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); background: #f3f5f7; display: block; }
.alts { display: flex; flex-wrap: wrap; gap: 4px; }
.alts img { width: 54px; height: 42px; object-fit: cover; border-radius: 3px; border: 2px solid transparent; cursor: pointer; background: #f3f5f7; }
.alts img.on { border-color: var(--accent); }
.webpick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.webpick img { width: 72px; height: 56px; object-fit: cover; border-radius: 4px; border: 2px solid transparent; cursor: pointer; background: #f3f5f7; }
.webpick img:hover { border-color: var(--accent); }
.webpick .ser { width: 100%; font-size: 12px; color: var(--muted); margin-top: 4px; }
.legend { margin: -6px 0 12px; padding-left: 18px; }
table.cleanup td { vertical-align: top; }
table.cleanup .w-prod { width: 32%; }
label.sug { display: block; font-size: 13px; margin: 0 0 4px; cursor: pointer; line-height: 1.35; }
label.sug input { margin-right: 6px; }
input.codein { margin-top: 4px; max-width: 260px; font-size: 13px; padding: 5px 8px; }
input.namein { width: 100%; font-size: 13px; padding: 5px 8px; min-width: 220px; }

.run-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1100px) { .run-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .run-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
label.sug.best { background: #eef5ee; border-radius: 4px; padding: 2px 4px; margin-left: -4px; }
/* Formatierbares Textfeld */
.field { display: block; margin-bottom: 12px; }
.field .lbl { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.rte { border: 1px solid #c9ced3; border-radius: 6px; background: #fff; }
.rte:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-2); }
.rte-bar { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; padding: 4px; border-bottom: 1px solid var(--line); background: #f7f8fa; border-radius: 6px 6px 0 0; }
.rte-bar button { border: 0; background: none; padding: 4px 9px; border-radius: 4px; font-size: 13px; color: var(--ink); cursor: pointer; min-height: 30px; }
.rte-bar button:hover { background: var(--accent-2); }
.rte-bar button.on { background: var(--accent); color: #fff; }
.rte-bar .sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }
.rte-area { min-height: 140px; max-height: 420px; overflow-y: auto; padding: 10px 12px; font-size: 14px; line-height: 1.5; outline: none; }
.rte-area p, .desc-fmt p { margin: 0 0 6px; }
.rte-area ul, .rte-area ol, .desc-fmt ul, .desc-fmt ol { margin: 4px 0 6px; padding-left: 22px; }
.desc-fmt { margin-top: 8px; }
.prod-tiles3 { grid-template-columns: repeat(3, minmax(0, 220px)); }
@media (max-width: 600px) { .prod-tiles3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.grp-sum { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 24px; }
.grp-sum ul { margin: 4px 0 0; padding-left: 16px; font-size: 13px; }
.bulk { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 14px; position: sticky; top: 0; z-index: 5; }
.bulk select { width: auto; }
.bulk .btn.primary { margin-left: auto; }

/* Produktgruppen-Verwaltung */
.pg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.pg-block { border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; }
.pg-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.pg-row input.short { width: 190px; }
.pg-main input.short { font-weight: 700; }
.pg-sub { padding-left: 18px; }
.pg-tools { margin-left: auto; white-space: nowrap; }
.pg-add { padding-left: 18px; margin-top: 6px; display: flex; gap: 6px; }
.pg-add input.short { width: 190px; }
.pg-row a.muted { white-space: nowrap; }

/* Betragsfelder mit €-Zeichen */
.money-wrap { position: relative; display: block; }
.money-wrap::after { content: "€"; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; font-size: 13px; }
.money-wrap input.money { padding-right: 24px; text-align: right; }
td .money-wrap input.money { padding-right: 20px; }
td .money-wrap::after { right: 7px; }

/* Optionale Positionen im Beleg-Editor */
.pos .nm { display: flex; align-items: center; gap: 6px; }
.pos label.opt { font-size: 12px; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 3px; cursor: pointer; }
.pos label.opt input { width: auto; }
.pos tr.optional td { background: #f7f8fa; }
.pos tr.optional .tot { color: var(--muted); text-decoration: line-through; }
.pos .fmt-hint { font-size: 11px; color: var(--muted); margin-top: 2px; }
.bar { height: 10px; background: var(--accent-2); border-radius: 5px; overflow: hidden; margin: 6px 0 10px; }
.bar > div { height: 100%; background: var(--accent); transition: width .4s; }
.ok-t { color: var(--ok); font-weight: 600; }

/* Kontaktart als Symbol statt Buchstabe (Haus = Firma, Person = Person) */
.kind { font-size: 0 !important; }
.kind::before { content: ""; width: 13px; height: 13px; background: currentColor; -webkit-mask: var(--kind-icon) center / contain no-repeat; mask: var(--kind-icon) center / contain no-repeat; }
h1 .kind::before { width: 18px; height: 18px; }
.kind-firma { --kind-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5 1.5 11.5h3V21h5.5v-6h4v6h5.5v-9.5h3z'/%3E%3C/svg%3E"); }
.kind-person { --kind-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8' r='4.2'/%3E%3Cpath d='M3.5 21c0-4.7 3.8-8 8.5-8s8.5 3.3 8.5 8z'/%3E%3C/svg%3E"); }
/* Kontaktliste: Name darf umbrechen (erste Spalte ist nicht mehr die Nummer); breite Tabellen scrollen statt abgeschnitten zu werden */
.contacts-list td:first-child { white-space: normal; min-width: 220px; }
.card.flush { overflow-x: auto; }
.phones .ph-l { display: inline-block; width: 14px; font-size: 10px; font-weight: 700; color: var(--muted); }
.phones div + div { margin-top: 2px; }
/* Vorgänge */
.vg-head .muted { margin-top: 4px; }
.board { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; align-items: stretch; }
.board .col { flex: 1 1 0; min-width: 150px; transition: flex-grow .25s ease, background .15s; }
@media (hover: hover) and (min-width: 761px) { .board .col:hover { flex-grow: 2.6; } }
.board.board-closed .col { max-width: 480px; }
.board .col { background: #eef1f4; border-radius: 6px; padding: 10px; min-height: 420px; transition: background .15s; }
.board .col.over { background: #dfe7ee; outline: 2px dashed var(--accent); }
.board .col h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #5b6773; margin: 0 0 10px; display: flex; justify-content: space-between; gap: 6px; }
.board .col h3 span { background: #fff; border-radius: 10px; padding: 0 8px; color: var(--accent); height: 18px; }
.col-empty { color: #9aa4ae; text-align: center; padding: 14px 0; }
.tk { display: block; position: relative; background: #fff; border: 1px solid #dde2e7; border-left: 3px solid var(--accent); border-radius: 6px; padding: 10px; margin-bottom: 9px;
      font-size: 12.5px; color: var(--ink); text-decoration: none; box-shadow: 0 1px 2px rgba(0,0,0,.04); cursor: grab; }
.tk:hover { box-shadow: 0 3px 10px rgba(0,0,0,.08); text-decoration: none; }
.tk.dragging { opacity: .4; }
.tk.warn { border-left-color: #d99a1c; } .tk.late { border-left-color: #c0392b; }
.tk b { display: block; font-size: 13px; margin-bottom: 3px; color: var(--accent); }
.tk .meta { color: #6b7682; font-size: 11.5px; line-height: 1.5; }
.tk .row { display: flex; justify-content: space-between; align-items: center; margin-top: 7px; gap: 6px; }
.tk .amt { font-weight: 700; color: var(--accent); margin-right: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.chip { font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 3px; background: #e1e9f0; color: var(--accent); }
.chip.r { background: #fbe3e0; color: #a5281b; } .chip.y { background: #fbf0d9; color: #8a5d00; } .chip.g { background: #e0f1e7; color: #24724a; }
.av { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; display: inline-grid; place-items: center; flex: none; }
.vg-steps { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 16px; }
.vg-steps .step { border: 1px solid #cfd5db; background: #fff; padding: 6px 12px; border-radius: 16px; font: inherit; font-size: 12.5px; cursor: pointer; color: #5b6773; }
.vg-steps .step.done { background: #e1e9f0; color: var(--accent); border-color: #c9d6e1; }
.vg-steps .step.on { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
.ac-wrap { position: relative; }
#vg-ac:not(:empty) { display: block; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form select { flex: 1; min-width: 220px; }
.vg-link { margin-right: 16px; font-size: 13px; }
.vg-mail-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 6px 0 4px; }
@media (max-width: 760px) { .board { scroll-snap-type: x mandatory; } .board .col { flex: 0 0 78vw; scroll-snap-align: start; } }
/* Produkt-Downloads */
.stack { display: flex; flex-direction: column; gap: 18px; } .stack > .card { margin-bottom: 0; }
.dl-list { list-style: none; margin: 0 0 10px; padding: 0; }
.dl-list li { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid #eceef0; align-items: baseline; flex-wrap: wrap; }
.dl-kind { width: 170px; flex: none; font-weight: 600; font-size: 13px; }
.dl-items { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.dl-item { display: flex; gap: 6px; align-items: center; } .dl-item a { overflow-wrap: anywhere; }
.dl-item .icon-btn { padding: 0 4px; }
.dl-add summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 13px; margin-top: 4px; }
.dl-add form { margin-top: 10px; }
@media (max-width: 760px) { .dl-kind { width: 100%; } }
.tk-link { display: block; color: inherit; text-decoration: none; } .tk-link:hover { text-decoration: none; }
.tk .more { display: none; margin-top: 6px; border-top: 1px dashed #e2e6ea; padding-top: 6px; }
@media (hover: hover) and (min-width: 761px) { .col:hover .tk .more { display: block; } }
.tk .preview { margin: 4px 0; font-size: 11.5px; color: #4a5560; line-height: 1.45; }
.tk table.mini { width: 100%; border-collapse: collapse; font-size: 11.5px; margin-bottom: 4px; }
.tk table.mini td { padding: 2px 0; } .tk table.mini td.r { text-align: right; white-space: nowrap; }
.tk-actions { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.tk.mail { border-left-color: #6b8aa5; }
.col-mails { background: #e8eef4; }
.inline-label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.inline-label input { padding: 6px 8px; }
.tk { overflow-wrap: break-word; hyphens: auto; } .tk b, .tk .meta { overflow-wrap: anywhere; }
/* Belegliste: Status-Auswahl, die nach rechts aufklappt */
.status-slide { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.status-slide .pill { border: 1px solid #cfd5db; background: #fff; font: inherit; font-size: 13px; cursor: pointer; }
.status-slide .pill.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.status-toggle .arrow { display: inline-block; transition: transform .25s; margin-left: 4px; }
.status-slide.open .status-toggle .arrow { transform: rotate(180deg); }
.status-opts { display: inline-flex; gap: 6px; max-width: 0; overflow: hidden; opacity: 0; white-space: nowrap;
               transition: max-width .35s ease, opacity .25s ease; }
.status-slide.open .status-opts { max-width: 1400px; opacity: 1; overflow-x: auto; }
.status-opts .pill.on { background: var(--accent-2); color: var(--accent); border-color: #c9d6e1; font-weight: 600; }
.icon-btn.disabled { opacity: .3; cursor: default; }
@media (max-width: 760px) { .status-slide { flex-wrap: wrap; } .status-slide.open .status-opts { flex-wrap: wrap; white-space: normal; } }
/* Belegliste: Produkte beim Überfahren aufklappen */
.list tr.peek > td { padding: 0 12px; border-bottom: 0; background: #f7f9fb; white-space: normal; }
.list tr.peek .peek-in { max-height: 0; overflow: hidden; transition: max-height .25s ease .35s, padding .25s ease .35s; padding: 0 0 0 4px; }
@media (hover: hover) {
  .list tr.doc-row:hover + tr.peek .peek-in, .list tr.peek:hover .peek-in { max-height: 320px; padding: 6px 0 10px 4px; }
  .list tr.doc-row:hover, .list tr.doc-row:hover + tr.peek > td { background: #f1f5f8; }
  .list tr.doc-row:hover + tr.peek > td { border-bottom: 1px solid #eceef0; }
}
.peek-tbl { border-collapse: collapse; font-size: 12.5px; width: 100%; max-width: 900px; }
.peek-tbl td { padding: 3px 10px 3px 0; border: 0 !important; vertical-align: top; }
.peek-tbl td.q { width: 70px; white-space: nowrap; color: #5b6773; }
.peek-tbl tr.opt td { color: #8a95a0; }
.list tr.doc-row td { white-space: normal; }
.list tr.doc-row td.r, .list tr.doc-row td:nth-child(1), .list tr.doc-row td:nth-child(2) { white-space: nowrap; }
.list tr.peek .peek-in { width: 0; min-width: 100%; box-sizing: border-box; }
.peek-tbl td:nth-child(2) { overflow-wrap: anywhere; }
.list tr.doc-row td { padding-left: 8px; padding-right: 8px; }
.list tr.doc-row td:nth-child(3), .list tr.doc-row td:nth-child(4) { overflow-wrap: anywhere; hyphens: auto; min-width: 110px; }
.list tr.doc-row .row-actions { gap: 0; }
.list:has(tr.doc-row) th { padding-left: 8px; padding-right: 8px; }
/* Positionen in der Belegansicht bearbeiten */
.pos-view td.drag, .pos-view th.drag-h { width: 22px; padding-left: 6px; padding-right: 0; color: #aab3bc; cursor: grab; user-select: none; font-size: 13px; letter-spacing: -2px; }
.pos-view tr.pos-row:hover td.drag { color: var(--accent); }
.pos-view tr.dragging { opacity: .45; background: #eef3f7; }
.pos-view td.pos-act { width: 1%; padding-left: 4px; }
.pos-view td.pos-act .icon-btn { padding: 2px 4px; }
.pos-view tr.pos-row td.pos-act { opacity: .35; transition: opacity .15s; }
.pos-view tr.pos-row:hover td.pos-act { opacity: 1; }
@media (hover: none) { .pos-view tr.pos-row td.pos-act { opacity: 1; } }
.list tr.pos-edit > td { background: #f6f8fa; padding: 12px 14px 14px; white-space: normal; max-width: 0; }
tr.pos-edit .pf-grid > label, tr.pos-edit .pf-grid input, tr.pos-edit .pf-grid select { min-width: 0; }
tr.pos-edit .rte-area { overflow-wrap: anywhere; }
.pos-form label { font-size: 12px; }
.pf-grid { display: grid; grid-template-columns: 2fr 1fr .7fr .7fr 1fr .7fr .7fr; gap: 8px 10px; }
.pf-grid .w2 { grid-column: span 1; }
.pf-foot { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; } .pf-foot .grow { flex: 1; }
.pos-add-row { padding: 8px 14px 4px; display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; border-top: 1px solid #eceef0; }
.pos-plus { width: 30px; height: 30px; border-radius: 50%; border: 1.5px dashed #9fb0c0; background: #fff; color: var(--accent); font-size: 20px; line-height: 1; cursor: pointer; flex: none; }
.pos-plus:hover { border-style: solid; background: var(--accent-2); }
#pos-add { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; flex: 1; }
#pos-add[hidden] { display: none; }
#pos-add .ac-wrap { flex: 1; min-width: 260px; }
@media (max-width: 760px) { .pf-grid { grid-template-columns: 1fr 1fr; } }
.sym-btn { min-width: 38px; justify-content: center; font-weight: 700; font-size: 15px; padding-left: 8px; padding-right: 8px; }
.btn.small.sym-btn { min-width: 34px; font-size: 14px; }
.sym-btn .sq { display: inline-block; width: 12px; height: 12px; border: 2px solid currentColor; border-radius: 2px; }
/* Positionsarten (Symbole wie in Bexio) */
.pos-tools { display: inline-flex; gap: 4px; align-items: center; }
.pt-btn { width: 34px; height: 32px; display: inline-grid; place-items: center; border: 1px solid #cfd5db; background: #fff; border-radius: 4px;
          color: #3b4650; cursor: pointer; padding: 0; }
.pt-btn:hover { background: var(--accent-2); color: var(--accent); border-color: #b9c8d6; }
.pb-line { display: block; text-align: center; font-size: 11.5px; color: #8a95a0; border-top: 1.5px dashed #b9c2cb; padding-top: 3px; letter-spacing: .04em; text-transform: uppercase; }
.pos-view tr.discount td { color: #8a3a2e; }
.disc-row { display: flex; gap: 8px; align-items: center; } .disc-row .f-name { flex: 1; } .disc-row .f-dval { width: 90px; text-align: right; }
.pf-grid.pf-disc { grid-template-columns: 2fr 1fr 2fr; }
.disc-row .f-name { flex: 1 1 auto; min-width: 180px; width: auto; } .disc-row .f-dval { flex: 0 0 110px; } .disc-row .f-dmode { flex: 0 0 auto; width: auto; }
.head-icons { gap: 4px; align-items: center; }
.icon-btn.big { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 6px; position: relative; }
.icon-btn.big svg { width: 22px; height: 22px; }
.icon-btn.big:hover { background: var(--accent-2); color: var(--accent); }
.ib-note { position: absolute; bottom: -4px; right: -2px; font-size: 8.5px; font-weight: 700; background: #fff; padding: 0 2px; color: var(--muted); }
.filters .inline-label { margin: 0; max-width: none; }
.filters .inline-label input { padding: 9px 10px; margin: 0; width: auto; }
.toolbar .status-right { margin-left: auto; }
.filters .filter-plus { margin-left: auto; }
/* Formatierungsleiste in Positionen */
.rte.small { margin-top: 4px; }
.rte.small .rte-bar { padding: 2px; } .rte.small .rte-bar button { min-height: 24px; padding: 2px 7px; font-size: 12px; }
.rte.small .rte-area { min-height: 38px; max-height: 260px; padding: 6px 9px; font-size: 13px; }
.rte-area:empty::before { content: attr(data-ph); color: #9aa4ae; }
.rte.small .rte-bar { opacity: .55; transition: opacity .15s; } .rte.small:focus-within .rte-bar, .rte.small:hover .rte-bar { opacity: 1; }
.desc-fmt.muted { color: var(--muted); }
.pos-add-row { justify-content: flex-end; }
.pos td.u select.unit-sel { width: 100%; min-width: 92px; }
.opt-head { margin: 22px 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: #5b6773; border-top: 1px solid var(--line); padding-top: 16px; }
.pos-optional tbody tr.pos-row td { color: #4a5560; }
.card-link { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.card-link:hover { border-color: #b9c8d6; box-shadow: 0 2px 10px rgba(18,52,75,.08); }
.card-link .card-link-hint { font-weight: 400; text-transform: none; letter-spacing: 0; opacity: 0; transition: opacity .15s; margin-left: 6px; }
.card-link:hover .card-link-hint { opacity: 1; }
@media (hover: none) { .card-link .card-link-hint { opacity: 1; } }
.filters details.filter-plus { margin-left: auto; }
.filters details.menu > div { right: 0; left: auto; }
/* Standard: Plus immer rechts auf Höhe des Suchfelds, auch wenn die Filter umbrechen */
.filters:has(> .filter-plus) { position: relative; padding-right: 52px; }
.filters > .filter-plus { position: absolute; right: 0; top: 0; margin: 0; }
.filters > a.filter-plus, .filters > details.filter-plus > summary { height: 40px; }
/* Nachfassen */
.fu-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 18px; font-size: 13.5px; }
.fu-bar.due { border-color: #e7c66f; background: #fffaf0; }
.fu-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.fu-actions .btn svg { width: 15px; height: 15px; }
.rc-chosen { list-style: none; padding: 0; margin: 12px 0 0; }
.rc-chosen li { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; margin-bottom: 6px; background: #f8f9fa; }
.rc-chosen li .icon-btn { margin-left: auto; width: 26px; height: 26px; }
ul.plain { list-style: none; padding: 0; margin: 0; } ul.plain li { padding: 4px 0; }
.s-ersetzt { background: #f0f1f3; color: #8a95a0; }
.rc-list li { display: flex; align-items: center; gap: 6px; } .rc-list li .icon-btn { margin-left: auto; width: 26px; height: 26px; }
/* Auch angeboten an: kleine Kästchen unter dem Empfänger */
.sib-wrap { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); cursor: default; }
.sib-wrap .lbl { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.sib-boxes { display: flex; flex-wrap: wrap; gap: 6px; }
.sib-box { display: flex; flex-direction: column; gap: 1px; padding: 6px 10px; border: 1px solid #d5dce3; border-left: 3px solid var(--accent);
           border-radius: 5px; background: #f8fafb; color: var(--ink); font-size: 12.5px; max-width: 260px; text-decoration: none; }
.sib-box:hover { background: var(--accent-2); text-decoration: none; }
.sib-box b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sib-box span { font-size: 11px; color: var(--muted); }
.sib-box.s-box-angenommen { border-left-color: #2e8b57; } .sib-box.s-box-abgelehnt { border-left-color: #b9a3a3; opacity: .7; }
.sib-box.s-box-entwurf { border-left-color: #b9c2cb; }
/* Sammelangebote in der Liste */
.list tr.grp-row { cursor: pointer; background: #f4f7fa; }
.list tr.grp-row:hover { background: #eaf0f5; }
.list tr.grp-row td { border-bottom: 1px solid #e3e8ed; }
.grp-caret { display: inline-block; transition: transform .2s; color: var(--accent); font-weight: 700; }
.grp-row.open .grp-caret { transform: rotate(90deg); }
.list tr.grp-child.doc-row td:first-child { padding-left: 26px; border-left: 3px solid #c9d6e1; }
.grp-status .badge { margin-right: 2px; }
.grp-names { max-width: 240px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grp-rcpt { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: var(--accent); } .grp-rcpt svg { width: 16px; height: 16px; }
/* Einheiten-Auswahl mit freier Eingabe */
input.unit-combo { 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 1l5 5 5-5' fill='none' stroke='%23555' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; padding-right: 26px; cursor: pointer; }
.combo-list { position: absolute; z-index: 60; background: #fff; border: 1px solid #c9d2db; border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.14); padding: 4px; font-size: 14px; }
.combo-item { padding: 7px 10px; border-radius: 4px; cursor: pointer; }
.combo-item:hover, .combo-item.on { background: var(--accent-2); color: var(--accent); }
.combo-hint { padding: 6px 10px 4px; font-size: 11.5px; color: var(--muted); border-top: 1px solid #eef0f2; margin-top: 2px; }
.pos td.u input.unit-combo { width: 100%; min-width: 92px; }
@media (max-width: 760px) { .list tr.pos-edit > td > .pos-form { position: sticky; left: 14px; width: calc(100vw - 58px); } }
/* Dialog (z. B. Angebot annehmen) */
dialog.dlg { border: 0; border-radius: 8px; padding: 0; width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 40px); box-shadow: 0 12px 40px rgba(0,0,0,.25); color: var(--ink); }
dialog.dlg::backdrop { background: rgba(18,52,75,.45); }
dialog.dlg form { display: flex; flex-direction: column; max-height: calc(100vh - 40px); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px 6px; }
.dlg-head h2 { margin: 0; font-size: 18px; }
dialog.dlg form > p, dialog.dlg form > .acc-sum, dialog.dlg form > .acc-sib { margin: 4px 18px 10px; }
.acc-wrap { overflow: auto; margin: 0 18px; border: 1px solid var(--line); border-radius: 6px; min-height: 80px; }
.acc-pos { margin: 0; } .acc-pos td { vertical-align: middle; white-space: normal !important; }
.acc-pos input.acc-num { width: 82px; text-align: right; padding: 5px 7px; }
.acc-pos tr.off td { opacity: .45; } .acc-pos tr.off td:first-child { opacity: 1; }
.acc-pos tr.opt td b { font-weight: 600; color: #5b6773; }
.acc-sum { text-align: right; font-size: 13px; color: var(--muted); } .acc-sum b { color: var(--ink); font-size: 15px; }
.acc-sib { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 12px 18px 16px; border-top: 1px solid var(--line); margin-top: 6px; background: #fafbfc; }
.acc-note { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
@media (max-width: 600px) { .acc-pos th:nth-child(2), .acc-pos td:nth-child(2) { display: none; } .acc-pos input.acc-num { width: 64px; } .dlg-foot .btn { flex: 1; justify-content: center; } }
.dlg-head h2 { text-transform: none; letter-spacing: 0; color: var(--ink); font-weight: 700; }
.acc-pos td.r { white-space: nowrap !important; }
/* Abweichende Adressen und Zahlungsplan */
.alt-addr { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 6px; padding-top: 8px; border-top: 1px dashed var(--line); }
.alt-addr .lbl, .addr-alt .lbl { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.alt-addr p { margin: 2px 0 0; }
.plan-wrap { margin: 0 0 10px; }
.plan-tbl td { vertical-align: middle; white-space: normal !important; }
.plan-tbl input[name=label] { width: 100%; min-width: 140px; }
.plan-tbl input.acc-num { width: 96px; }
.plan-tbl input[readonly] { background: #f3f5f7; color: #6b7680; }
.plan-tbl tr.plan-final td { background: #f8fafb; }
.plan-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .plan-foot .grow { flex: 1; }
.plan-presets { display: flex; gap: 8px; flex-wrap: wrap; }
.addr-alt { margin-top: 10px; }
.addr-alt > label.check { display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: 13px; }
.addr-alt .addr-box { margin: 6px 0 4px 24px; }
.addr-alt .addr-box[hidden] { display: none; }
.plan-tbl td.nowrap, .plan-tbl td.plan-val { white-space: nowrap !important; }
.dash-sub { font-size: 13px; margin: 16px 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
/* Ausführungsmerkmale */
.specs { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 6px; }
.spec { font-size: 12px; background: #eef2f6; color: #3b4650; border-radius: 3px; padding: 1px 7px; }
.spec b { font-weight: 600; }
.spec-state { font-size: 12px; font-weight: 700; border-radius: 3px; padding: 1px 7px; text-decoration: none; }
.spec-state.open { background: #fff3cd; color: #7a5600; } .spec-state.ok { background: #e3f3e6; color: #1f6b33; }
.spec-edit { margin-top: 10px; border-top: 1px dashed #d5dbe0; padding-top: 8px; }
.spec-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.spec-head select { width: auto; max-width: 100%; }
.spec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 10px; }
.spec-grid label { font-size: 12px; min-width: 0; }
.spec-grid label:has(.spec-k) { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; align-items: end; }
.spec-head .lbl { font-size: 13px; color: var(--muted); }
/* Kundenbestellung / Abgleich */
.chk-box { border-radius: 6px; padding: 9px 12px; margin-bottom: 12px; font-size: 13px; }
.chk-box ul { margin: 4px 0 0; padding-left: 20px; }
.chk-box.warn { background: #fdf0ef; border: 1px solid #e8a39b; color: #9b2a1e; }
.chk-box.ok { background: #e9f6ec; border: 1px solid #b8e0c2; color: #1f6b33; font-weight: 600; }
.co-src { display: flex; gap: 8px; flex-wrap: wrap; }
.co-src .btn svg { width: 16px; height: 16px; }
.co-mails { max-height: 46vh; }
.co-mail { display: flex; gap: 10px; align-items: flex-start; padding: 8px 12px; border-bottom: 1px solid #eef0f2; cursor: pointer; font-size: 13px; }
.co-mail:hover { background: #f6f8fa; } .co-mail input { margin-top: 3px; }
.co-tel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px 12px; margin: 0 18px; }
dialog.dlg form > p { margin-left: 18px; margin-right: 18px; }
.co-meta { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; margin-bottom: 8px; }
.co-note { background: #f7f8fa; border-radius: 4px; padding: 8px 10px; font-size: 13px; }
.co-nr { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 10px; } .co-nr label { max-width: 260px; }
.co-tbl td { vertical-align: top; white-space: normal !important; } .co-tbl td.r { white-space: nowrap !important; }
.co-tbl th { white-space: normal; line-height: 1.2; }
.co-tbl input.acc-num { width: 84px; } .co-tbl input.diff { border-color: #e0a800; background: #fff8e1; }
.co-tbl tr.co-abw td { background: #fffbec; } .co-tbl tr.co-fehlt td, .co-tbl tr.co-neu td { background: #fdf1f0; }
.co-snip { max-width: 420px; overflow-wrap: anywhere; }
.co-act { min-width: 200px; } .co-act .btn { margin: 3px 3px 0 0; }
.co-assign { display: inline-flex; gap: 4px; align-items: center; margin-top: 3px; } .co-assign select { max-width: 200px; padding: 4px 6px; }
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-top: 4px; }
.d-ok { background: #2e9e4f; } .d-abw { background: #e0a800; } .d-fehlt, .d-neu { background: #d64535; }
.co-foot { margin-top: 10px; }
.co-raw { margin-top: 10px; } .co-raw pre { max-height: 300px; overflow: auto; background: #f7f8fa; padding: 10px; font-size: 12px; white-space: pre-wrap; }
.ok-txt { color: #1f6b33; }
.send-check label.check { display: flex; gap: 8px; align-items: center; margin-top: 8px; font-weight: 600; }
@media (max-width: 700px) {
  .co-tbl thead { display: none; }
  .co-tbl, .co-tbl tbody, .co-tbl tr, .co-tbl td { display: block; }
  .co-tbl tr { display: grid; grid-template-columns: 18px 1fr 1fr; gap: 4px 10px; padding: 10px 10px 12px; border-bottom: 1px solid var(--line); }
  .co-tbl td { border: 0 !important; padding: 0 !important; }
  .co-tbl td.co-dot { grid-row: span 1; }
  .co-tbl td.co-name { grid-column: 2 / 4; }
  .co-tbl td.r { grid-column: auto; text-align: left; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
  .co-tbl td.r:nth-of-type(3), .co-tbl td.r:nth-of-type(5) { grid-column: 2; }
  .co-tbl td.r::before { content: attr(data-l); font-size: 11px; color: var(--muted); }
  .co-tbl td.co-act { grid-column: 1 / 4; min-width: 0; }
  .co-tbl input.acc-num { width: 100%; }
  .co-snip { max-width: none; }
}
@media (max-width: 700px) {
  .co-tbl tr.co-abw { background: #fffbec; } .co-tbl tr.co-fehlt, .co-tbl tr.co-neu { background: #fdf1f0; }
  .co-tbl tr td { background: transparent !important; }
}
.qty-u { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.qty-u .u { min-width: 34px; text-align: left; color: var(--muted); font-size: 13px; }
.acc-pos td { vertical-align: middle; }
.chk-box.storno { background: #f0eeee; border: 1px solid #ddd3d3; color: #8b6f6f; font-weight: 600; }
/* Auftragsstatus */
.s-in_bearbeitung { background: #e6eef8; color: #2a5a8f; }
.s-im_bestellprozess { background: #fbf2dc; color: #8a6412; }
.s-in_produktion { background: #efe8f8; color: #5b3d8f; }
.s-warten_fertigstellung { background: #f3ecf9; color: #6d4f99; }
.s-in_versand { background: #e1f3f1; color: #17695f; }
.s-abgeschlossen { background: var(--ok-bg); color: var(--ok); }
/* Empfänger: Firma + Ansprechpartner */
.card.rcpt { padding: 0; overflow: hidden; }
.rcpt-block { padding: 16px 20px; }
.rcpt-block.card-link:hover { background: #f7f9fb; }
.rcpt-person { border-top: 1px solid var(--line); }
.rcpt-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.rcpt-head h2 { margin-bottom: 8px; } .rcpt-head h3 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.rcpt-head .icon-btn { margin: -4px -6px 0 0; }
.rcpt-block p.pre { margin: 0; }
.rcpt-links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; font-size: 13px; }
.rcpt .alt-addr, .rcpt .sib-wrap, .rcpt > p.small { margin-left: 20px; margin-right: 20px; }
.rcpt .alt-addr { margin-bottom: 14px; }
.rcpt-list { max-height: 50vh; min-height: 0; }
.rcpt-hit { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid #eef0f2; background: #fff; padding: 9px 12px; cursor: pointer; font: inherit; }
.rcpt-hit:hover { background: #f2f6fa; }
.rcpt .sib-wrap { margin-top: 0; padding-bottom: 14px; }
/* Abgleich: alles auf einer Höhe, passende Felder grün */
.co-tbl td { vertical-align: middle; }
.co-tbl td.co-name { vertical-align: middle; }
.co-tbl tr.co-ok input.acc-num { border-color: #8fcca2; background: #eef8f1; }
.co-tbl tr.co-ok td.co-act .ok-txt { font-weight: 600; }
.co-nr { align-items: flex-end; } .co-nr label { margin: 0; } .co-nr > span { padding-bottom: 10px; }
.co-tbl th { vertical-align: bottom; }
.co-tbl input.acc-num, .acc-pos input.acc-num, .plan-tbl input.acc-num { text-align: right; }
td.r > input.acc-num { display: block; margin-left: auto; }
/* Ausführung klären */
.spec-card { border-left: 4px solid #cfd5db; }
.spec-card.st-offen { border-left-color: #d64535; } .spec-card.st-geklaert { border-left-color: #2e9e4f; }
.spec-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 10px; }
.spec-card-head select.spec-st { width: auto; max-width: 100%; margin: 0; }
.spec-hint { color: #5b6773; background: #f3f6f9; border-radius: 4px; padding: 3px 8px; margin-top: 4px; display: inline-block; }
.spec-x span { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.spec-sup { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px dashed #d5dbe0; }
.spec-sup > label:first-child { flex: 1; min-width: 240px; margin: 0; }
.spec-sup label.check { display: flex; gap: 6px; align-items: center; padding-bottom: 9px; }
.bottom-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-bottom: 30px; }
/* Lieferantenbestellung im Auftrag */
.lf-steps { display: grid; gap: 8px; margin-bottom: 12px; }
.lf-step { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border: 1px solid var(--line); border-left: 4px solid #d64535; border-radius: 6px; padding: 10px 12px; }
.lf-step.done { border-left-color: #2e9e4f; }
.lf-btns { display: flex; gap: 6px; flex-wrap: wrap; } .lf-btns .btn svg { width: 15px; height: 15px; }
.lf-tbl tr { cursor: pointer; }
.lf-opts { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 18px 10px; } .lf-opts label { flex: 1; min-width: 200px; }
.lf-groups { max-height: 50vh; }
.lf-group { border-bottom: 1px solid var(--line); padding: 10px 12px; }
.lf-ghead { display: grid; grid-template-columns: minmax(120px, 1fr) 2fr 2fr; gap: 8px; align-items: center; margin-bottom: 6px; }
.lf-ghead select, .lf-ghead input { margin: 0; }
.lf-pos td { vertical-align: middle; white-space: normal !important; } .lf-pos td.nowrap { white-space: nowrap !important; }
.lf-warn { margin: 0 18px 10px; } .lf-warn label.check { display: flex; gap: 6px; align-items: center; margin-top: 6px; font-weight: 600; }
@media (max-width: 700px) { .lf-ghead { grid-template-columns: 1fr; } }
/* Dokumente & Bilder */
.file-up { display: grid; grid-template-columns: 220px 1fr; gap: 12px; align-items: stretch; margin-bottom: 12px; }
.file-up .fu-cat { margin: 0; }
.fu-drop { position: relative; display: flex; align-items: center; justify-content: center; text-align: center; border: 2px dashed #b9c6d2; border-radius: 8px;
           padding: 14px; background: #f8fafc; color: var(--accent); cursor: pointer; min-height: 64px; margin: 0; }
.fu-drop:hover, .fu-drop.over { background: #eef4fa; border-color: var(--accent); }
.fu-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; width: 100%; height: 100%; }
.fu-drop svg { width: 16px; height: 16px; vertical-align: -3px; }
.file-up.busy .fu-drop { opacity: .5; pointer-events: none; }
.fu-group { margin-top: 10px; } .fu-gh { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 6px; }
.fu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.fu-item { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; background: #fff; position: relative; }
.fu-thumb { display: flex; align-items: center; justify-content: center; height: 120px; background: #f1f4f7; overflow: hidden; }
.fu-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fu-ext { font-weight: 800; font-size: 18px; color: #5b6773; border: 2px solid #b9c2cb; border-radius: 4px; padding: 10px 12px; background: #fff; }
.fu-meta { padding: 6px 8px 8px; display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.fu-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.fu-act { position: absolute; top: 4px; right: 4px; display: flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.fu-item:hover .fu-act { opacity: 1; } @media (hover: none) { .fu-act { opacity: 1; } }
.fu-act .icon-btn { background: rgba(255,255,255,.92); border-radius: 4px; padding: 3px 5px; text-decoration: none; }
@media (max-width: 600px) { .file-up { grid-template-columns: 1fr; } .fu-grid { grid-template-columns: repeat(2, 1fr); } }
.file-up .fu-cat { display: flex; flex-direction: column; justify-content: center; }
.fu-gh { display: flex; align-items: center; gap: 6px; text-transform: none; font-size: 14px; color: var(--ink); letter-spacing: 0; }
.fu-folder-ic { font-size: 16px; }
.fu-gh .fu-add { margin-left: auto; color: var(--accent); }
.fu-group { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fbfcfd; }
.file-up { grid-template-columns: minmax(240px, 1fr) 2fr; }
/* Mailverlauf im Auftrag */
.mh-wrap { margin: 0 14px 14px; max-height: 420px; }
.mh-tbl tr { cursor: pointer; } .mh-tbl td { vertical-align: top; white-space: normal !important; } .mh-tbl td.nowrap { white-space: nowrap !important; }
.mh-dir { width: 18px; font-weight: 700; } .mh-ein .mh-dir { color: #2a5a8f; } .mh-aus .mh-dir { color: #2e9e4f; }
.mh-who { max-width: 220px; overflow-wrap: anywhere; color: #5b6773; }
.mh-tbl .tag { margin-left: 4px; }
@media (max-width: 700px) { .mh-tbl td.mh-who { display: none; } }
.mh-wrap { min-height: 0; }
/* Ordner auf-/zuklappen */
.fu-gh { cursor: pointer; user-select: none; }
.fu-group > .fu-grid { display: none; margin-top: 8px; }
.fu-group.open > .fu-grid { display: grid; }
.fu-tog { display: inline-grid; place-items: center; width: 20px; height: 20px; border: 1.5px solid #9fb0c0; border-radius: 4px; font-weight: 700; color: var(--accent); line-height: 1; }
.fu-tog::before { content: "+"; } .fu-group.open .fu-tog::before { content: "−"; }
.fu-gh .fu-add { margin-left: auto; color: var(--accent); }
.fu-ren { display: flex; gap: 6px; align-items: center; flex: 1; max-width: 520px; }
.fu-ren[hidden], .fu-title[hidden], .fu-gh [hidden] { display: none !important; }
.fu-ren input { margin: 0; padding: 4px 8px; }
.fu-gh .fu-edit { opacity: .55; } .fu-gh:hover .fu-edit { opacity: 1; }
/* Bildbetrachter (Overlay) */
.lb { position: fixed; inset: 0; z-index: 1000; background: rgba(10, 22, 32, .96); display: none; }
.lb.on { display: block; }
.lb-stage { position: absolute; inset: 56px 70px 70px; display: flex; align-items: center; justify-content: center; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; box-shadow: 0 8px 30px rgba(0,0,0,.4); }
.lb-stage iframe { width: 100%; height: 100%; border: 0; background: #fff; border-radius: 4px; }
.lb-file { text-align: center; color: #dfe6ec; } .lb-file .fu-ext { display: inline-block; margin-bottom: 10px; }
.lb-x { position: absolute; top: 10px; right: 14px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(255,255,255,.14);
        color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 64px; border: 0; border-radius: 8px;
          background: rgba(255,255,255,.12); color: #fff; font-size: 40px; line-height: 1; cursor: pointer; }
.lb-x:hover, .lb-nav:hover { background: rgba(255,255,255,.26); }
.lb-prev { left: 12px; } .lb-next { right: 12px; } .lb-nav[hidden] { display: none; }
.lb-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 20px; color: #e6edf2; display: flex; gap: 14px; align-items: baseline;
          justify-content: center; flex-wrap: wrap; font-size: 14px; }
.lb-cap span { color: #a9b6c1; font-size: 13px; } .lb-cap a { color: #fff; }
@media (max-width: 600px) { .lb-stage { inset: 56px 8px 90px; } .lb-nav { top: auto; bottom: 46px; transform: none; width: 44px; height: 44px; font-size: 30px; } }
.link-offer select { margin: 0; padding: 4px 8px; font-size: 13px; }
/* Mailverlauf links, Dokumente rechts */
.grid2.side2 { align-items: start; margin-bottom: 18px; }
.grid2.side2 > .card { margin-bottom: 0; min-width: 0; }
.side2 .file-up { grid-template-columns: 1fr; }
.side2 .fu-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.side2 .fu-thumb { height: 100px; }
.side2 .mh-tbl td.mh-who { display: none; }
.side2 .mh-wrap { max-height: 560px; }
/* Erkannte Bestelldaten */
.co-info { border: 1px solid #b9d3ea; background: #f2f7fc; border-radius: 6px; padding: 10px 12px; margin: 0 0 12px; font-size: 13px; }
.co-info-h { margin-bottom: 6px; }
.co-info-row { display: grid; grid-template-columns: 210px 1fr 200px; gap: 6px 10px; align-items: center; padding: 4px 0; border-top: 1px solid #dde8f2; }
.co-info-row label.check { display: flex; gap: 6px; align-items: center; margin: 0; font-weight: 600; }
.co-info-row input, .co-info-row textarea { margin: 0; padding: 5px 8px; font-size: 13px; }
.co-info-foot { display: flex; justify-content: flex-end; margin-top: 8px; }
@media (max-width: 760px) { .co-info-row { grid-template-columns: 1fr; } }
/* AB gegenzeichnen */
.cs-box { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border: 1px solid var(--line);
          border-left: 4px solid #d64535; border-radius: 6px; padding: 10px 12px; margin-bottom: 10px; }
.cs-box.done { border-left-color: #2e9e4f; }
.stamp-prev { max-width: 220px; border: 1px dashed #ccd; padding: 4px; background: #fff; }
/* Registerkarten Auftragsablauf */
.otab-bar { display: flex; gap: 4px; margin: 0 0 -1px; overflow-x: auto; position: relative; z-index: 1; }
.otab { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-bottom-color: transparent; background: #eef1f4;
        color: var(--muted); font: inherit; font-weight: 600; font-size: 14px; padding: 10px 16px; border-radius: 8px 8px 0 0; cursor: pointer; white-space: nowrap; }
.otab:hover { background: #e4e9ee; color: var(--ink); }
.otab.on { background: var(--card); color: var(--ink); border-color: var(--line); border-bottom-color: var(--card); }
.otab-dot { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; font-size: 11px; color: #fff; background: #c9d0d6; }
.otab.st-ok .otab-dot { background: #2e9e4f; } .otab.st-open .otab-dot { background: #d64535; } .otab.st-part .otab-dot { background: #e0a800; }
.otab-panel { border-top-left-radius: 0; }
.otab-panel[hidden] { display: none !important; }
.vs-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 18px; } .vs-grid .lbl, .abr-list .lbl { display: block; font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.vs-grid p.pre { margin: 0; }
.vs-ls { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); } .vs-ls h3 { margin: 0; font-size: 14px; }
.vs-later { margin: 12px 0 0; }
.abr-list { margin-bottom: 12px; font-size: 14px; }
@media (max-width: 700px) { .vs-grid { grid-template-columns: 1fr; } .otab { padding: 9px 11px; font-size: 13px; } }
.abr-head { margin-bottom: 10px; } #zahlungsplan .card-head + .card-head { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
/* Versand / Sendungen */
.vs-ship { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); } .vs-ship h3 { margin: 0; font-size: 14px; }
.ship-form { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-top: 10px; background: #fbfcfd; }
.ship-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; } .ship-head .ship-del { margin-left: auto; }
.ship-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ship-grid .lbl { display: block; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.ship-pk { margin: 10px 0; } .ship-pk td { vertical-align: middle; } .ship-pk input.acc-num { width: 70px; } .ship-pk select { min-width: 140px; margin: 0; }
.ship-pk input, .ship-pk select { margin: 0; }
@media (max-width: 700px) { .ship-grid { grid-template-columns: 1fr; } }
.ship-form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.ship-form.booked fieldset input, .ship-form.booked fieldset textarea, .ship-form.booked fieldset select { background: #f3f5f7; color: var(--text); }
.ship-opts { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-top: 6px; }
.ship-opts .chk { display: flex; align-items: center; gap: 6px; font-size: 13px; margin: 0; } .ship-opts .chk input { width: auto; margin: 0; }
.ship-opts select { width: auto; margin: 0 0 0 auto; }
.ship-pk select.stk { min-width: 70px; }
.ship-price { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: flex-end; padding: 10px 12px; margin: 6px 0 10px; background: #eef6ef; border: 1px solid #cfe5d2; border-radius: 8px; }
.ship-price .lbl { display: block; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.ship-price .big { font-size: 18px; } .ship-track { margin: 4px 0 8px; }
.ship-addr label { margin-bottom: 6px; } .ship-addr .row { gap: 8px; }
.pa-form { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-top: 10px; }
.pa-form .row { gap: 10px; } .pa-foot { display: flex; align-items: center; gap: 8px; }
.pa-add { margin-top: 12px; } .pa-add > summary { list-style: none; } .pa-add > summary::-webkit-details-marker { display: none; }
.pa-foot .grow { flex: 1; }
/* Sendung: untere Zeile (Abholdatum | Zusatzleistungen) auf einer Höhe, Zusatzleistungen als runde Klickpunkte */
.ship-grid .ship-bottom { align-items: flex-end; }
.ship-bottom > label, .ship-bottom > .opt-cell { margin-bottom: 0; }
.opt-cell .flbl { display: block; font-size: 12px; font-weight: 600; color: #4b524e; }
.opt-dots { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin-top: 4px; min-height: 38px; }
label.optdot { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; font-weight: 500; color: var(--ink); cursor: pointer; }
label.optdot input { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; margin: 0; padding: 0; border: 2px solid #b5bdc4;
  border-radius: 50%; background: #fff; cursor: pointer; display: inline-grid; place-content: center; flex: none; }
label.optdot input::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); transform: scale(0); transition: transform .12s; }
label.optdot input:checked { border-color: var(--accent); } label.optdot input:checked::before { transform: scale(1); }
label.optdot input:focus-visible { outline: 2px solid #9db6ca; outline-offset: 2px; }
label.optdot { white-space: nowrap; flex: none; } .opt-cell { min-width: 0; }
/* Versand: wer versendet? */
.ship-form[data-mode="cargoboard"] .ext-only { display: none !important; }
.ship-form:not([data-mode="cargoboard"]) .cb-only { display: none !important; }
.ship-mode { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 12px; }
label.mode-pill { margin: 0; cursor: pointer; } label.mode-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
label.mode-pill span { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border: 1px solid #cdd4da; border-radius: 999px; background: #fff;
  font-size: 13px; font-weight: 600; color: #4b524e; }
label.mode-pill span::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #b5bdc4; box-sizing: border-box; }
label.mode-pill input:checked + span { border-color: var(--accent); color: var(--accent); background: #eef3f7; }
label.mode-pill input:checked + span::before { border-color: var(--accent); background: radial-gradient(var(--accent) 0 3px, transparent 3.5px); }
label.mode-pill input:focus-visible + span { outline: 2px solid #9db6ca; }
.ship-ext label { margin-bottom: 6px; } .ship-ext .row { gap: 8px; }
.ship-notify { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 12px; margin: 4px 0 10px; border: 1px solid #d5dee6; border-radius: 8px; background: #f4f8fb; }
/* Pflichtfelder, die für die Frachtpreisanfrage fehlen */
.ship-form .missing { border-color: #d64545 !important; background: #fff5f5 !important; box-shadow: 0 0 0 1px #d64545; }
.ship-err { margin: 6px 0 4px; padding: 8px 12px; border-radius: 8px; background: #fdecec; color: #a12b2b; font-size: 13px; font-weight: 600; }
.ship-new-head { flex-wrap: wrap; gap: 8px; } .ship-new { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.mode-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid #cdd4da; border-radius: 999px; background: #fff;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--accent); cursor: pointer; }
.mode-btn:hover { border-color: var(--accent); background: #eef3f7; } .mode-btn svg { width: 16px; height: 16px; }
.req { color: #d64545; margin-left: 2px; font-weight: 700; } .ship-form:not([data-mode="cargoboard"]) .req { display: none; }
.vs-addr { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); } .vs-addr .vs-edit { margin-left: 4px; vertical-align: middle; } .vs-addr .kv { margin-top: 8px; }
.la-lbl { display:block; font-size:12px; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; margin:4px 0 6px; }
.vs-pickup select { max-width: 340px; margin-bottom: 8px; } .vs-pickup .pre { margin: 4px 0 0; }
.vs-pickup .vs-other { display: none; max-width: 520px; } .vs-pickup .vs-other.show, .vs-pickup.other .vs-other { display: block; }
.vs-pickup.other > .pre { display: none; } .vs-pickup .vs-other label { margin-bottom: 6px; } .vs-pickup .vs-other .row { gap: 8px; }
.co-color { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 6px 0 0; font-size: 12px; font-weight: 600; }
.co-color input { width: auto; flex: 1; min-width: 180px; margin: 0; } .co-color input.diff { border-color: #d64545; background: #fff5f5; }
.co-hint { margin-top: 6px; color: #8a6d1a; } .co-hint .btn { margin-top: 3px; }
.lf-block { margin-top: 10px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
a.mode-btn { text-decoration: none; } .mode-btn:disabled { opacity: .45; cursor: not-allowed; } .plan-presets { justify-content: flex-end; margin: 4px 0; }
.abr-info { margin: 4px 0 6px; } .abr-info .vs-edit { margin-left: 6px; vertical-align: middle; }
.co-tel-more { margin: 4px 0 8px; } .co-tel-more summary { cursor: pointer; color: var(--accent); }
.co-tel-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } @media (max-width: 700px) { .co-tel-grid2 { grid-template-columns: 1fr; } }
/* kurze Erfolgsmeldung (ohne Klick) */
.ok-pop { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(20, 40, 60, .18); z-index: 1000; opacity: 0; transition: opacity .25s; pointer-events: none; }
.ok-pop.show { opacity: 1; }
.ok-pop-box { display: flex; align-items: center; gap: 14px; max-width: 460px; margin: 16px; padding: 20px 24px; background: #fff; border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.18); font-size: 16px; font-weight: 600; color: var(--ink); transform: scale(.96); transition: transform .25s; }
.ok-pop.show .ok-pop-box { transform: scale(1); }
.ok-pop-ic { flex: none; width: 40px; height: 40px; border-radius: 50%; background: #2e9d5b; color: #fff; display: grid; place-items: center; font-size: 22px; }
.mode-btn.disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.mode-btn.small-btn { padding: 4px 10px; font-size: 12px; } .mode-btn.small-btn svg { width: 14px; height: 14px; }
.lang-pick { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 8px 24px; } .lang-pick label.optdot { white-space: normal; }
.ab-next { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.bg-info .check { margin-top: 2px; } .bg-line { margin-top: 2px; }
.bg-info .row { align-items: flex-start; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; margin-bottom: 18px; align-items: stretch; }
.grid3 > .card { margin: 0; } .grid3 > script { display: none; } .bg-col > div { margin-bottom: 4px; }
@media (max-width: 1100px) { .grid3 { grid-template-columns: 1fr 1fr; } .grid3 > .bg-info { grid-column: 1 / -1; } }
@media (max-width: 700px) { .grid3 { grid-template-columns: 1fr; } }
.bg-info { position: relative; } .bg-info .bg-edit { position: absolute; top: 14px; right: 14px; }
.weblink-list { margin: 4px 0 8px 26px; padding-left: 14px; } .weblink-list li { margin: 2px 0; }
.lf-addr { padding: 10px 12px; margin: 4px 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfd; } .lf-addr .row { gap: 8px; } .lf-addr label { margin-bottom: 6px; }
.dlg .lf-addr { margin: 4px 18px 10px; }
