/* Druckerei-CRM */
:root {
  --brand: #1d4ed8;
  --bg: #f4f5f7;
  --panel: #ffffff;
  --text: #1a1d23;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --side: #111827;
  --side-text: #c9ced8;
  --ok: #059669;
  --ok-bg: #ecfdf5;
  --warn: #b45309;
  --warn-bg: #fffbeb;
  --err: #dc2626;
  --err-bg: #fef2f2;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
h2 { font-size: 15px; margin: 0; }
h3 { font-size: 14px; margin: 12px 0 0; }
code { background: #f1f3f6; padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.r { text-align: right; }
.nowrap { white-space: nowrap; }
.ic { width: 18px; height: 18px; flex: none; }

/* Layout */
.app { display: flex; min-height: 100vh; }
.side { width: 232px; background: var(--side); color: var(--side-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; flex: none; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px; color: #fff; text-decoration: none !important; }
.brand b { display: block; font-size: 14.5px; line-height: 1.2; }
.brand small { display: block; font-size: 11.5px; color: #8b93a3; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--brand); display: grid; place-items: center; color: #fff; flex: none; }
.brand-mark .ic { width: 19px; height: 19px; }
.side nav { padding: 6px 10px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side nav a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 8px; color: var(--side-text); font-weight: 500; text-decoration: none; }
.side nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side nav a.active { background: rgba(255, 255, 255, .1); color: #fff; }
.side nav a.active .ic { color: #fff; }
.side nav .count { margin-left: auto; background: var(--brand); color: #fff; font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; }
.me { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-top: 1px solid rgba(255, 255, 255, .08); }
.me a { color: #8b93a3; margin-left: auto; display: flex; }
.me a:hover { color: #fff; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: #374151; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.me-name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 12px; padding: 12px 28px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.search { flex: 1; max-width: 520px; position: relative; display: flex; align-items: center; }
.search .ic { position: absolute; left: 11px; color: var(--muted); width: 16px; height: 16px; pointer-events: none; }
.search input { width: 100%; padding-left: 34px !important; background: var(--bg); border-color: transparent !important; }
.search input:focus { background: #fff; border-color: var(--brand) !important; }
.top .btn.primary { margin-left: auto; }
.menu-btn { display: none; }
.content { padding: 24px 28px 60px; max-width: 1440px; width: 100%; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.back { font-size: 13px; color: var(--muted); display: inline-block; margin-bottom: 4px; }

/* Karten */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; box-shadow: var(--shadow); }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head .link { font-size: 13px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid2 > .card { margin-bottom: 18px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.empty { color: var(--muted); padding: 18px; text-align: center; margin: 0; }
.card .empty { padding: 10px 0; }
.card.flush .empty { padding: 32px; }

/* Buttons & Formulare */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line-strong); background: #fff; color: var(--text); font: inherit; font-weight: 550; cursor: pointer; white-space: nowrap; text-decoration: none !important; line-height: 1.3; }
.btn:hover { background: #f9fafb; border-color: #c4c8cf; }
.btn .ic { width: 16px; height: 16px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.success { background: var(--ok-bg); border-color: #a7f3d0; color: var(--ok); }
.btn.warn { background: var(--warn-bg); border-color: #fcd34d; color: var(--warn); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: #f3f4f6; color: var(--text); }
.btn.danger, .btn.ghost.danger { color: var(--err); }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn.block { width: 100%; justify-content: center; padding: 11px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn { border: 0; background: transparent; width: 30px; height: 30px; border-radius: 7px; display: inline-grid; place-items: center; cursor: pointer; color: var(--muted); font-size: 18px; text-decoration: none !important; }
.icon-btn:hover { background: #f3f4f6; color: var(--text); }
.icon-btn.danger:hover { background: var(--err-bg); color: var(--err); }
.icon-btn .ic { width: 16px; height: 16px; }
form.inline, .inline { display: inline; }
input, select, textarea { font: inherit; color: inherit; border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 10px; background: #fff; width: 100%; min-width: 0; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--brand); }
input[type=color] { padding: 2px; height: 38px; }
input[readonly] { background: #f9fafb; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 550; color: #374151; }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.hint { font-weight: 400; color: var(--muted); font-size: 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.form-grid .span2 { grid-column: span 2; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form .card-head { width: 100%; margin-bottom: 4px; }
.inline-form input[type=email] { max-width: 320px; }
.inline-form p { width: 100%; margin: 4px 0 0; }
.inline-search input { width: 240px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; margin: 0; }
legend { font-weight: 600; font-size: 13px; padding: 0 4px; }
.items-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; }

/* Meldungen */
.flash { padding: 11px 14px; border-radius: 8px; margin-bottom: 14px; background: var(--ok-bg); color: #065f46; border: 1px solid #a7f3d0; }
.flash.err { background: var(--err-bg); color: #991b1b; border-color: #fecaca; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1.6; vertical-align: middle; }
.badge.status { --c: #64748b; background: color-mix(in srgb, var(--c) 13%, #fff); color: color-mix(in srgb, var(--c) 80%, #000); }
.badge.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
h1 .badge { font-size: 12.5px; }
.badge.paid { background: var(--ok-bg); color: var(--ok); }
.badge.unpaid { background: var(--err-bg); color: var(--err); }
.badge-btn { border: 0; background: none; padding: 0; cursor: pointer; }
.due { white-space: nowrap; }
.due.late, .late-text { color: var(--err); font-weight: 600; }
.due.soon { color: var(--warn); font-weight: 600; }
.dot { --c: #64748b; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.doc-type { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 1px 7px; border-radius: 5px; background: #eef2ff; color: #4338ca; }
.doc-type.rechnung { background: #ecfdf5; color: #047857; }
.doc-type.lieferschein { background: #fff7ed; color: #c2410c; }

/* Tabellen */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; padding: 11px 14px; border-bottom: 1px solid var(--line); background: #fafbfc; white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table.compact td { padding: 9px 4px; }
.table.compact td:first-child { padding-left: 0; }
.table.compact td:last-child { padding-right: 0; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: #f9fafb; }
.table .sub, .sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.table th.r, .table td.r { text-align: right; }
.table td.actions { display: flex; gap: 4px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
tr.storno td { opacity: .55; }
tr.storno b { text-decoration: line-through; }

/* Tabs & Filter */
.tabs { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.tabs.scroll { overflow-x: auto; scrollbar-width: thin; }
.tabs a { padding: 9px 12px; color: var(--muted); font-weight: 550; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: flex; gap: 6px; align-items: center; text-decoration: none; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--text); border-bottom-color: var(--brand); }
.tabs a em { font-style: normal; font-size: 11.5px; background: #eef0f3; border-radius: 99px; padding: 0 7px; color: var(--muted); }
.tabs.small { border: 0; margin: 0; }
.filters { display: flex; gap: 6px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.chip { padding: 4px 11px; border: 1px solid var(--line-strong); border-radius: 99px; font-size: 13px; color: var(--text); background: #fff; text-decoration: none !important; }
.chip.active { background: var(--text); color: #fff; border-color: var(--text); }

/* Dashboard */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 2px; color: var(--text); text-decoration: none !important; box-shadow: var(--shadow); transition: border-color .15s; }
.kpi:hover { border-color: var(--line-strong); }
.kpi b { font-size: 24px; letter-spacing: -.02em; line-height: 1.2; margin-top: 8px; }
.kpi span:last-child { color: var(--muted); font-size: 13px; }
.kpi.alert { border-color: #fecaca; background: #fffafa; }
.kpi.alert b { color: var(--err); }
.kpi-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: #f1f3f6; color: #374151; }
.kpi-ic.blue { background: #eff6ff; color: #1d4ed8; }
.kpi-ic.violet { background: #f5f3ff; color: #7c3aed; }
.kpi-ic.red { background: #fef2f2; color: #dc2626; }
.kpi-ic.amber { background: #fffbeb; color: #b45309; }
.pipeline { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.pipe { --c: #64748b; border-radius: 9px; padding: 12px; background: color-mix(in srgb, var(--c) 8%, #fff); border-top: 3px solid var(--c); color: var(--text); text-decoration: none !important; display: flex; flex-direction: column; }
.pipe b { font-size: 22px; }
.pipe span { font-size: 12.5px; color: var(--muted); }

/* Status-Stepper */
.stepper-card { padding: 16px 18px 12px; }
.stepper { display: flex; gap: 0; overflow-x: auto; padding-bottom: 4px; }
.step { --c: #94a3b8; flex: 1; min-width: 104px; border: 0; background: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 7px; position: relative; padding: 0 4px; font: inherit; color: var(--muted); }
.step::before { content: ""; position: absolute; top: 15px; left: -50%; right: 50%; height: 3px; background: var(--line); z-index: 0; }
.step:first-child::before { display: none; }
.step.done::before, .step.current::before { background: color-mix(in srgb, var(--brand) 55%, #fff); }
.step-dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--line-strong); font-weight: 700; font-size: 13px; position: relative; z-index: 1; transition: transform .15s; }
.step:hover .step-dot { transform: scale(1.08); border-color: var(--c); }
.step.done .step-dot { background: color-mix(in srgb, var(--brand) 12%, #fff); border-color: var(--brand); color: var(--brand); }
.step.current .step-dot { background: var(--c); border-color: var(--c); color: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 22%, transparent); }
.step-dot .ic { width: 15px; height: 15px; }
.step-label { font-size: 12px; text-align: center; line-height: 1.3; font-weight: 550; }
.step.current .step-label { color: var(--text); font-weight: 700; }
.stepper-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); flex-wrap: wrap; }

/* Positionen */
.items { width: 100%; border-collapse: collapse; }
.items th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; text-align: left; padding: 0 5px 8px; white-space: nowrap; }
.items td { padding: 5px; vertical-align: top; border-top: 1px solid var(--line); }
.items td.pos { color: var(--muted); padding-top: 13px; width: 24px; font-size: 12px; }
.items td.desc { min-width: 170px; width: 100%; }
.items td.desc input { font-weight: 600; margin-bottom: 4px; }
.items td.desc textarea { font-size: 13px; color: #4b5563; min-height: 34px; }
.items input { padding: 7px 8px; }
.items .num { text-align: right; width: 78px; }
.items .num.tiny { width: 50px; }
.items .unit { width: 80px; font-size: 13px; }
.items .line-total { padding-top: 13px; font-weight: 600; min-width: 82px; }
.items td:last-child { width: 34px; padding-top: 9px; }
.totals { margin: 12px 0 0 auto; max-width: 300px; display: flex; flex-direction: column; gap: 4px; }
.totals div { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); }
.totals b { color: var(--text); font-weight: 600; }
.totals .grand { border-top: 1px solid var(--line-strong); padding-top: 6px; margin-top: 2px; color: var(--text); font-size: 15px; }
.totals .grand b { font-weight: 750; }

/* Belege */
.doc-buttons { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.docs { margin-top: 4px; }

/* Dateien */
.dropzone { position: relative; border: 2px dashed var(--line-strong); border-radius: 10px; padding: 22px; text-align: center; transition: .15s; background: #fafbfc; }
.dropzone.over { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, #fff); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.dropzone label { flex-direction: row; justify-content: center; align-items: center; gap: 10px; color: var(--muted); font-weight: 500; pointer-events: none; }
.dropzone .progress { height: 4px; background: var(--line); border-radius: 4px; margin-top: 12px; overflow: hidden; display: none; }
.dropzone .progress i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }
.dropzone.uploading .progress { display: block; }
.files { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; }
.files li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.files li:last-child { border-bottom: 0; }
.thumb { width: 46px; height: 46px; border-radius: 7px; background: #f1f3f6; display: grid; place-items: center; overflow: hidden; flex: none; text-decoration: none !important; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .ext { font-size: 10.5px; font-weight: 800; color: #4b5563; }
.file-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.file-info a { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }

/* Seitenleiste im Auftrag */
.contact { display: flex; flex-direction: column; gap: 2px; }
.contact b { font-size: 14.5px; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow-y: auto; }
.timeline li { padding-left: 14px; border-left: 2px solid var(--line); display: flex; flex-direction: column; }
.timeline li.err { border-left-color: #fecaca; }
.timeline small { color: var(--muted); font-size: 11.5px; }
.note-form { display: flex; gap: 6px; margin-bottom: 14px; }
.danger-zone { text-align: right; }
.mini-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.mini-list li { display: flex; flex-direction: column; gap: 3px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.mini-list li:last-child { border: 0; }

/* Neuer Auftrag */
.seg { display: inline-flex; background: #f1f3f6; border-radius: 9px; padding: 3px; margin-bottom: 14px; }
.seg label { flex-direction: row; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 7px; cursor: pointer; font-weight: 550; }
.seg label:has(input:checked) { background: #fff; box-shadow: var(--shadow); }
.seg input { display: none; }
.mode { display: none; }
.mode.show { display: block; }
#customer-select { margin-top: 8px; height: auto; }

/* Board */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.lane { --c: #64748b; background: #eceef2; border-radius: 10px; display: flex; flex-direction: column; max-height: calc(100vh - 210px); }
.lane header { display: flex; align-items: center; gap: 8px; padding: 11px 12px; font-weight: 650; font-size: 13px; border-top: 3px solid var(--c); border-radius: 10px 10px 0 0; }
.lane header .dot { background: var(--c); }
.lane header em { margin-left: auto; font-style: normal; color: var(--muted); font-weight: 600; }
.lane-body { padding: 0 8px 8px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 80px; }
.lane.over { background: color-mix(in srgb, var(--c) 14%, #eceef2); }
.kcard { background: #fff; border-radius: 8px; box-shadow: var(--shadow); border: 1px solid var(--line); cursor: grab; }
.kcard.dragging { opacity: .45; }
.kcard a { display: block; padding: 10px 11px; color: var(--text); text-decoration: none !important; }
.kc-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 13px; }
.kc-title { font-weight: 600; margin: 3px 0 1px; font-size: 13.5px; }
.kc-cust { color: var(--muted); font-size: 12.5px; }
.kc-foot { display: flex; justify-content: space-between; margin-top: 7px; font-size: 12px; }

/* Einstellungen / Sonstiges */
.code { background: #0f172a; color: #e2e8f0; border-radius: 8px; padding: 12px 14px; font-size: 12.5px; overflow-x: auto; margin: 0; white-space: pre; }
.logo-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.logo-preview { max-height: 70px; max-width: 260px; border: 1px solid var(--line); border-radius: 8px; padding: 6px; background: #fff; }
.settings-form > p { margin-top: 0; }
.mail-body { white-space: pre-wrap; font: inherit; font-size: 13px; background: #f9fafb; padding: 10px; border-radius: 6px; margin: 8px 0 0; }
details summary { cursor: pointer; }
.attach .check { font-weight: 450; }

/* Anmeldung */
body.bare { display: grid; place-items: center; min-height: 100vh; padding: 16px; background: linear-gradient(160deg, #eef2f7, #f8fafc); }
.auth-card { width: 100%; max-width: 400px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 28px; box-shadow: 0 10px 30px rgba(15, 23, 42, .08); }
.auth-card h1 { margin: 22px 0 6px; }
.auth-card .brand { padding: 0; color: var(--text); }
.auth-card .brand small { color: var(--muted); }
.auth-card form { margin-top: 16px; }

/* Mobil */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pipeline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .side { position: fixed; left: 0; top: 0; bottom: 0; z-index: 50; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
  .side.open { transform: none; }
  .menu-btn { display: inline-grid; }
  .top { padding: 10px 16px; }
  .top .btn.primary span { display: none; }
  .content { padding: 16px 16px 50px; }
  .grid2, .form-grid, .row2 { grid-template-columns: minmax(0, 1fr); }
  .form-grid .span2 { grid-column: auto; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inline-search input { width: 100%; }
  .items thead { display: none; }
  .items, .items tbody, .items tr, .items td { display: block; width: 100%; }
  .items tr.item-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line); position: relative; }
  .items td { border: 0; padding: 0; }
  .items td.pos { display: none; }
  .items td.desc { grid-column: 1 / -1; min-width: 0; padding-right: 34px; }
  .items td:last-child { position: absolute; right: 0; top: 10px; width: auto; padding: 0; }
  .items td::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); }
  .items td.desc::before { display: none; }
  .items .num, .items .unit, .items .num.tiny { width: 100%; }
  .items .line-total { padding-top: 0; text-align: left; }
  .table th, .table td { padding: 10px 12px; }
}
