/* ==========================================================================
   Werkstatt – Angebote & Rechnungen
   Blau/Rot-Diagonale als Markenzeichen, kompakte Werkzeug-Optik
   ========================================================================== */

:root {
	--blue: #2b4aa0;
	--red: #c4361f;
	--blue-soft: #e6eaf6;
	--red-soft: #f8e5e1;
	--green: #2f7a4a;
	--green-soft: #e2f0e6;

	--bg: #f3f1ec;
	--surface: #ffffff;
	--surface-2: #faf9f6;
	--ink: #161616;
	--ink-2: #4a4a4a;
	--muted: #7a776f;
	--line: #dedad2;
	--line-strong: #161616;
	--focus: #2b4aa0;

	--radius: 6px;
	--radius-s: 4px;
	--shadow: 0 1px 0 rgba(0, 0, 0, .04), 0 6px 24px -12px rgba(0, 0, 0, .18);

	--font: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
	--mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #111111;
		--surface: #1a1a1a;
		--surface-2: #151515;
		--ink: #eeece7;
		--ink-2: #c4c1ba;
		--muted: #8d8a83;
		--line: #2c2c2c;
		--line-strong: #eeece7;
		--blue: #5b7be0;
		--red: #e2593f;
		--blue-soft: #1d2540;
		--red-soft: #3a1d17;
		--green: #5fbf82;
		--green-soft: #17301f;
		--focus: #7d97ea;
		--shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 8px 30px -14px rgba(0, 0, 0, .7);
		color-scheme: dark;
	}
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 14px/1.5 var(--font);
	-webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--blue); }

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 24px; line-height: 1.2; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

code { font-family: var(--mono); font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); padding: 0 4px; border-radius: 3px; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.small { font-size: 12px; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.upper { text-transform: uppercase; }
.is-hidden { display: none !important; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* --------------------------------------------------------------------------
   Topbar
   -------------------------------------------------------------------------- */

.topbar {
	position: sticky;
	top: 0;
	z-index: 20;
	display: flex;
	align-items: center;
	gap: 24px;
	padding: 10px 24px;
	background: color-mix(in srgb, var(--surface) 92%, transparent);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--line);
}

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.brand-mark {
	width: 22px;
	height: 22px;
	border-radius: 3px;
	background: linear-gradient(135deg, var(--blue) 50%, var(--red) 50%);
	flex: none;
}

.mainnav { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.mainnav a {
	padding: 6px 10px;
	border-radius: var(--radius-s);
	text-decoration: none;
	color: var(--ink-2);
	white-space: nowrap;
}
.mainnav a:hover { background: var(--surface-2); color: var(--ink); }
.mainnav a[aria-current="page"] { background: var(--ink); color: var(--surface); }

.topbar-actions { display: flex; align-items: center; gap: 8px; }
.logout { font-size: 12px; color: var(--muted); text-decoration: none; margin-left: 6px; }

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.main { max-width: 1320px; margin: 0 auto; padding: 28px 24px 80px; }

.page-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 20px;
}
.crumbs { margin: 0 0 4px; color: var(--muted); }
.crumbs a { text-decoration: none; }
.page-head p { margin: 4px 0 0; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }

.panel {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 18px;
	margin-bottom: 16px;
}
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.panel-title {
	font: 600 11px/1.3 var(--mono);
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--muted);
	margin-bottom: 12px;
}
.panel-head .panel-title { margin-bottom: 0; }
.panel-accent { border-color: var(--blue); box-shadow: inset 3px 0 0 var(--blue); }

.link-small { font-size: 12px; text-decoration: none; color: var(--blue); }

.empty { color: var(--muted); padding: 24px 4px; margin: 0; }
.empty a { color: var(--blue); }

/* --------------------------------------------------------------------------
   KPIs
   -------------------------------------------------------------------------- */

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 16px 18px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	text-decoration: none;
	transition: border-color .15s;
}
.kpi:hover { border-color: var(--ink); color: inherit; }
.kpi-label { font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.kpi-value { font: 600 24px/1.3 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi-sub { font-size: 12px; color: var(--muted); }
.kpi-alert { border-color: var(--red); }
.kpi-alert .kpi-value { color: var(--red); }

/* --------------------------------------------------------------------------
   Tabellen
   -------------------------------------------------------------------------- */

.table-wrap { overflow-x: auto; margin: 0 -4px; }
.table { width: 100%; border-collapse: collapse; }
.table th {
	font: 600 10.5px var(--mono);
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--muted);
	text-align: left;
	padding: 6px 8px;
	border-bottom: 1px solid var(--line-strong);
}
.table td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: none; }
.table .num { text-align: right; }
.table a { text-decoration: none; }
.row-link { cursor: pointer; }
.row-link:hover td { background: var(--surface-2); }

.list-sum { color: var(--muted); text-align: right; margin: 12px 0 0; }

/* --------------------------------------------------------------------------
   Status, Tags
   -------------------------------------------------------------------------- */

.status {
	display: inline-flex;
	align-items: center;
	font: 600 10.5px/1 var(--mono);
	text-transform: uppercase;
	letter-spacing: .06em;
	padding: 5px 7px;
	border-radius: 3px;
	border: 1px solid var(--line);
	color: var(--ink-2);
	background: var(--surface);
	white-space: nowrap;
	vertical-align: middle;
}
.status-entwurf { border-style: dashed; color: var(--muted); }
.status-versendet { background: var(--blue-soft); border-color: transparent; color: var(--blue); }
.status-angenommen, .status-bezahlt { background: var(--green-soft); border-color: transparent; color: var(--green); }
.status-abgelehnt, .status-storniert { text-decoration: line-through; color: var(--muted); }
.status-abgerechnet { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.status-ueberfaellig { background: var(--red); color: #fff; border-color: var(--red); }

.tag {
	display: inline-block;
	font: 600 9.5px/1 var(--mono);
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--red);
	border: 1px solid currentColor;
	border-radius: 3px;
	padding: 3px 4px;
	margin-left: 4px;
	vertical-align: 1px;
}

.lock { font: 600 10.5px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.lock::before { content: "⚿ "; }

.seen { color: var(--blue); font-size: 10px; margin-left: 4px; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 36px;
	padding: 7px 14px;
	font: 500 13px/1.2 var(--font);
	color: var(--ink);
	background: var(--surface);
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-s);
	text-decoration: none;
	cursor: pointer;
	white-space: nowrap;
	transition: background .12s, color .12s, border-color .12s;
}
.btn:hover { background: var(--ink); color: var(--surface); }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.btn-ghost { border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger-ghost { border-color: transparent; color: var(--red); background: transparent; padding-left: 0; }
.btn-danger-ghost:hover { background: transparent; color: var(--red); text-decoration: underline; }
.btn-small { min-height: 30px; padding: 5px 10px; font-size: 12.5px; }
.btn-block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.btn-col { display: flex; flex-direction: column; gap: 6px; }
form.inline { display: inline; margin: 0; }
.btn-col form.inline { display: block; }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }

.icon-btn {
	width: 26px;
	height: 26px;
	display: inline-grid;
	place-items: center;
	border: 1px solid transparent;
	border-radius: 3px;
	background: none;
	color: var(--muted);
	font: 14px/1 var(--mono);
	cursor: pointer;
	padding: 0;
}
.icon-btn:hover { border-color: var(--line); color: var(--ink); background: var(--surface); }
.icon-btn-danger:hover { color: var(--red); border-color: var(--red); }

/* --------------------------------------------------------------------------
   Formulare
   -------------------------------------------------------------------------- */

.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; min-width: 0; }
.field > span {
	font: 600 10.5px var(--mono);
	text-transform: uppercase;
	letter-spacing: .07em;
	color: var(--muted);
}
.field > span small { text-transform: none; letter-spacing: 0; font-weight: 400; }

input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
input[type="date"], input[type="number"], input[type="search"], input[type="file"],
select, textarea {
	width: 100%;
	min-height: 36px;
	padding: 7px 10px;
	font: 14px/1.4 var(--font);
	color: var(--ink);
	background: var(--surface-2);
	border: 1px solid var(--line);
	border-radius: var(--radius-s);
	transition: border-color .12s, background .12s;
}
input.mono, .mono input { font-family: var(--mono); font-size: 13px; }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--ink) 35%, var(--line)); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--focus); background: var(--surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 18%, transparent); }
textarea { resize: vertical; min-height: 60px; }
textarea[data-autosize] { overflow: hidden; }
input[readonly] { color: var(--ink-2); }

.row-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 12px; }
.span-2 { grid-column: span 2; }

.check { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0 12px; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--blue); }

details.more { margin: 4px 0 10px; }
details.more summary { cursor: pointer; font-size: 12.5px; color: var(--blue); margin-bottom: 10px; }

.form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sticky-actions {
	position: sticky;
	bottom: 12px;
	padding: 10px;
	background: color-mix(in srgb, var(--surface) 92%, transparent);
	backdrop-filter: blur(8px);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

.stack > * + * { margin-top: 0; }

.filters { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
	display: inline-flex;
	gap: 6px;
	align-items: center;
	padding: 5px 10px;
	font-size: 12.5px;
	border: 1px solid var(--line);
	border-radius: 999px;
	text-decoration: none;
	background: var(--surface);
}
.chip span { font: 11px var(--mono); color: var(--muted); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.chip.is-active span { color: inherit; opacity: .7; }
.filter-inputs { display: flex; gap: 8px; }
.filter-inputs select { width: auto; }
.filter-inputs input { width: 220px; }

/* Segment-Auswahl */
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; margin-bottom: 12px; }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; }
.segmented span { display: block; text-align: center; padding: 8px 4px; font-size: 12.5px; border-right: 1px solid var(--line); hyphens: manual; }
.segmented label:last-child span { border-right: none; }
.segmented input:checked + span { background: var(--ink); color: var(--surface); }
.segmented input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: -2px; }

/* --------------------------------------------------------------------------
   Dokument-Formular
   -------------------------------------------------------------------------- */

.docform-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.docform-side { position: sticky; top: 72px; }

.items { display: flex; flex-direction: column; border-top: 1px solid var(--line-strong); }

.item {
	display: grid;
	grid-template-columns: 34px minmax(0, 1fr) auto;
	gap: 8px 12px;
	padding: 14px 0;
	border-bottom: 1px solid var(--line);
	align-items: start;
}
.item-handle { grid-column: 1; grid-row: 1 / span 2; }
.item-text { grid-column: 2; grid-row: 1; }
.item-tools { grid-column: 3; grid-row: 1; }
.item-numbers { grid-column: 2 / -1; grid-row: 2; }
.item-handle { display: flex; flex-direction: column; align-items: center; gap: 0; }
.item-pos { font-size: 11px; color: var(--muted); padding: 8px 0 2px; }
.item-text { display: flex; flex-direction: column; gap: 6px; }
.item-title { font-weight: 600; }
.item-desc { min-height: 36px; font-size: 13px; }
.item-numbers { display: grid; grid-template-columns: 90px 90px 130px 84px minmax(110px, 1fr); gap: 8px; }
.mini { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mini > span { font: 600 9.5px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini input, .mini select { padding: 7px 6px; font-size: 13px; }
.mini input[data-qty], .mini input[data-price] { text-align: right; }
.item-total output { display: block; text-align: right; padding: 8px 0; font-size: 13px; font-weight: 600; }
.item-tools { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.item-kind-switch { width: 96px; min-height: 28px; padding: 3px 6px; font-size: 11.5px; }

.item--optional { background: repeating-linear-gradient(135deg, transparent 0 8px, color-mix(in srgb, var(--red) 5%, transparent) 8px 9px); }
.item--optional .item-total output { color: var(--muted); font-weight: 400; }
.item--text .item-numbers { display: none; }
.item--text .item-title { font-size: 15px; }

.items-add { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; }

.sums { margin-left: auto; max-width: 380px; border-top: 1px solid var(--line-strong); padding-top: 8px; }
.sums > div { display: flex; justify-content: space-between; gap: 16px; padding: 3px 0; font-size: 13px; }
.sums [data-sum-taxes] { display: block; padding: 0; }
.sums [data-sum-taxes] > div { display: flex; justify-content: space-between; padding: 3px 0; color: var(--ink-2); }
.sums .sum-gross, .sums .sum-due { font-weight: 700; font-size: 15px; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 8px; }

/* --------------------------------------------------------------------------
   Detailansicht
   -------------------------------------------------------------------------- */

.show-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }

.share-link { display: flex; gap: 6px; }
.share-link input { font-size: 12px; }

.related { list-style: none; padding: 0; margin: 14px 0 0; border-top: 1px solid var(--line); }
.related li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.related a { text-decoration: none; color: var(--blue); }

.details { margin: 0; }
.details > div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.details dt { color: var(--muted); }
.details dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.note { background: var(--surface-2); border-left: 2px solid var(--red); padding: 8px 10px; margin: 12px 0 0; }

.notice { background: var(--blue-soft); color: var(--ink); padding: 10px 12px; border-radius: var(--radius-s); margin: 12px 0; font-size: 13px; }
.notice a { color: var(--blue); }

/* Papier */
.paper {
	background: #fff;
	color: #161616;
	border-radius: 2px;
	box-shadow: var(--shadow);
	padding: clamp(20px, 5vw, 56px) clamp(20px, 5vw, 60px);
	border-top: 6px solid;
	border-image: linear-gradient(90deg, var(--blue) 50%, var(--red) 50%) 1;
	--muted: #77746c;
	--line: #e2ded6;
	--line-strong: #161616;
}
.paper-head { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.paper-sender { font-size: 10.5px; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 4px; margin: 0 0 8px; }
.paper-recipient p { margin: 0; }
.paper-meta { margin: 0; font-size: 12px; min-width: 220px; }
.paper-meta > div { display: flex; justify-content: space-between; gap: 18px; padding: 2px 0; }
.paper-meta dt { color: var(--muted); }
.paper-meta dd { margin: 0; }
.paper-title { font-size: 22px; margin-bottom: 4px; }
.paper-subject { font-size: 15px; margin: 0 0 16px; }
.paper-text { margin: 0 0 16px; max-width: 70ch; }
.paper-items { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 13px; }
.paper-items th { font: 600 10px var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); text-align: left; padding: 6px 6px; border-bottom: 1px solid var(--line-strong); }
.paper-items td { padding: 10px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.paper-items .num { text-align: right; }
.paper-items .pos { width: 36px; color: var(--muted); }
.line-desc { color: #555; font-size: 12.5px; margin-top: 3px; }
.line-optional td { color: #77746c; }
.line-calc { display: none; font-size: 11.5px; color: #77746c; margin-top: 4px; }
.line-text td { border-bottom: none; padding-top: 18px; }
.paper-sums { margin: 8px 0 24px auto; max-width: 400px; font-size: 13px; }
.paper-sums > div { display: flex; justify-content: space-between; gap: 16px; padding: 4px 6px; }
.paper-sums dt { font-family: var(--font); }
.paper-sums dd { margin: 0; white-space: nowrap; }
.paper-sums .total { border-top: 1px solid #161616; border-bottom: 1px solid #161616; font-weight: 700; font-size: 14px; padding: 7px 6px; }
.paper .muted { color: #77746c; }

/* --------------------------------------------------------------------------
   Flash
   -------------------------------------------------------------------------- */

.flash {
	padding: 10px 14px;
	border-radius: var(--radius-s);
	margin: 0 0 18px;
	background: var(--green-soft);
	color: var(--green);
	border: 1px solid color-mix(in srgb, var(--green) 30%, transparent);
	font-size: 13.5px;
}
.flash-error { background: var(--red-soft); color: var(--red); border-color: color-mix(in srgb, var(--red) 30%, transparent); }

/* --------------------------------------------------------------------------
   Login & öffentliche Seiten
   -------------------------------------------------------------------------- */

.plain { min-height: 100vh; }
.split-bg {
	position: fixed;
	inset: 0;
	z-index: -1;
	background: linear-gradient(118deg, var(--blue) 0 50%, var(--red) 50% 100%);
}
.plain-main { max-width: 900px; margin: 0 auto; padding: 48px 16px 80px; }

.card {
	background: var(--surface);
	border-radius: var(--radius);
	padding: 28px;
	box-shadow: 0 20px 60px -20px rgba(0, 0, 0, .45);
}
.card-title { font-size: 20px; margin-bottom: 4px; }
.login { max-width: 380px; margin: 10vh auto 0; }
.login form { margin-top: 20px; }

.public-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 20px;
	color: #fff;
}
.public-brand { font-size: 20px; font-weight: 600; margin: 0; }
.public-logo { max-height: 48px; max-width: 220px; background: #fff; padding: 6px 10px; border-radius: 4px; }
.public-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.public-actions .btn:not(.btn-primary) { background: rgba(255, 255, 255, .92); border-color: transparent; color: #161616; }
.public-actions .btn-primary { background: #161616; border-color: #161616; }
.public-hint { color: rgba(255, 255, 255, .85); margin: -8px 0 14px; }
.public .notice { background: #fff; }
.accept { margin-top: 20px; }
.public-foot { margin-top: 28px; color: rgba(255, 255, 255, .85); text-align: center; }

/* Einstellungen */
.logo-field img { max-height: 60px; max-width: 220px; display: block; margin: 6px 0; background: #fff; padding: 6px; border: 1px solid var(--line); border-radius: 4px; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
	.docform-grid, .show-grid { grid-template-columns: minmax(0, 1fr); }
	.docform-side { position: static; }
}

@media (max-width: 900px) {
	.kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.grid-2 { grid-template-columns: minmax(0, 1fr); }
	.topbar { flex-wrap: wrap; gap: 8px 16px; padding: 10px 16px; }
	.mainnav { order: 3; flex-basis: 100%; }
	.topbar-actions { margin-left: auto; }
}

@media (max-width: 640px) {
	.main { padding: 20px 16px 80px; }
	h1 { font-size: 20px; }
	.kpi-value { font-size: 20px; }
	.row-2, .row-3 { grid-template-columns: minmax(0, 1fr); }
	.span-2 { grid-column: auto; }
	.item-numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.item-total { grid-column: span 2; }
	.topbar-actions .btn:not(.btn-primary) { display: none; }
	.filter-inputs { width: 100%; }
	.filter-inputs input { width: 100%; }
	.table th:nth-child(2), .table td:nth-child(2) { display: none; }
	.panel { padding: 14px; }
	.paper-head { flex-direction: column; }
	.paper-items .col-hide { display: none; }
	.paper-items .pos { width: 28px; }
	.line-calc { display: block; }
	.paper { padding: 22px 18px; }
	.paper-sums dt { font-size: 12px; }
	.public-actions { width: 100%; }
	.public-actions .btn { flex: 1; }
}

/* Nachträge */
.stack-sections > .panel { margin-bottom: 16px; }
.cell-number .tag { display: table; margin: 4px 0 0; }
