/* Tokens */
:root {
	--header-height: 3rem;
	--footer-height: 2rem;
	--sheet-footer-gap: 0.25rem;
	--sidebar-width: 13.5rem;
	--entity-sheet-width: min(100vw, 42rem);
	--detail-page-max-width: 64rem;
	--border: #d0d6d8;
	--text: #161b1d;
	--muted: #4b585b;
	--bg: #fff;
	--bg-muted: #f1f3f3;
	--font-size: 13px;
	--font-size-sm: 0.8125rem;
	--font-size-xs: 0.75rem;
	--font-size-heading: 1.0625rem;
	--space-xs: 0.25rem;
	--space-sm: 0.375rem;
	--space-md: 0.5rem;
	--space-lg: 0.75rem;
	--space-xl: 0.875rem;
	--radius: 4px;
	--radius-lg: 6px;
}

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

.mb-1 {
	margin-bottom: 0.5rem;
}

/* Typography */

body {
	margin: 0;
	font-family: system-ui, sans-serif;
	font-size: var(--font-size);
	line-height: 1.35;
	color: var(--text);
	background: var(--bg);
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 var(--space-sm);
	font-weight: 600;
}

p {
	margin: 0 0 var(--space-lg);
}

a {
	color: inherit;
}

.small {
	font-size: var(--font-size-sm);
}

/* Buttons */

.button-group {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem;
}

.button-group > #best-view-actions,
.button-group > #best-edit-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem;
}

.button-group form {
	display: contents;
}

.button-group button {
	padding: 0.25rem 0.75rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--bg);
	color: var(--text);
	font-size: var(--font-size-sm);
	cursor: pointer;
}

button.primary,
a.primary {
	display: inline-block;
	padding: 0.3125rem 0.75rem;
	background: var(--text);
	color: var(--bg);
	border: none;
	border-radius: var(--radius);
	font-size: var(--font-size-sm);
	text-decoration: none;
}

a.primary:hover {
	color: var(--bg);
}

button.outline,
a.outline {
	display: inline-block;
	padding: 0.25rem 0.75rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--bg);
	color: var(--text);
	font-size: var(--font-size-sm);
	text-decoration: none;
	cursor: pointer;
}

button.outline:hover,
a.outline:hover {
	background: var(--bg-muted);
}

button.destructive {
	background: #9b1c1c;
	color: var(--bg);
	border: none;
	border-radius: var(--radius);
	font-size: var(--font-size-sm);
	cursor: pointer;
}

button.destructive:hover {
	background: #7f1d1d;
}

/* Grid  */

.row {
	--grid-gap: 0.375rem;
	display: flex;
	flex-wrap: wrap;
	gap: var(--grid-gap);
	width: 100%;
}

.col-1 {
	flex: 0 0 calc(8.333% - var(--grid-gap) * 11 / 12);
	max-width: calc(8.333% - var(--grid-gap) * 11 / 12);
}
.col-2 {
	flex: 0 0 calc(16.667% - var(--grid-gap) * 10 / 12);
	max-width: calc(16.667% - var(--grid-gap) * 10 / 12);
}
.col-3 {
	flex: 0 0 calc(25% - var(--grid-gap) * 9 / 12);
	max-width: calc(25% - var(--grid-gap) * 9 / 12);
}
.col-4 {
	flex: 0 0 calc(33.333% - var(--grid-gap) * 8 / 12);
	max-width: calc(33.333% - var(--grid-gap) * 8 / 12);
}
.col-5 {
	flex: 0 0 calc(41.667% - var(--grid-gap) * 7 / 12);
	max-width: calc(41.667% - var(--grid-gap) * 7 / 12);
}
.col-6 {
	flex: 0 0 calc(50% - var(--grid-gap) * 6 / 12);
	max-width: calc(50% - var(--grid-gap) * 6 / 12);
}
.col-7 {
	flex: 0 0 calc(58.333% - var(--grid-gap) * 5 / 12);
	max-width: calc(58.333% - var(--grid-gap) * 5 / 12);
}
.col-8 {
	flex: 0 0 calc(66.667% - var(--grid-gap) * 4 / 12);
	max-width: calc(66.667% - var(--grid-gap) * 4 / 12);
}
.col-9 {
	flex: 0 0 calc(75% - var(--grid-gap) * 3 / 12);
	max-width: calc(75% - var(--grid-gap) * 3 / 12);
}
.col-10 {
	flex: 0 0 calc(83.333% - var(--grid-gap) * 2 / 12);
	max-width: calc(83.333% - var(--grid-gap) * 2 / 12);
}
.col-11 {
	flex: 0 0 calc(91.667% - var(--grid-gap) * 1 / 12);
	max-width: calc(91.667% - var(--grid-gap) * 1 / 12);
}
.col-12 {
	flex: 0 0 100%;
	max-width: 100%;
}

/* App Shell */

.app-shell {
	padding-top: var(--header-height);
	min-height: 100vh;
}

.app-main-column {
	display: flex;
	flex-direction: column;
	margin-left: var(--sidebar-width);
	min-height: calc(100vh - var(--header-height));
}

.app-main-column > main {
	flex: 1 1 auto;
}

.main-content {
	padding: var(--space-lg);
}

.app-footer {
	position: sticky;
	bottom: 0;
	z-index: 55;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: var(--footer-height);
	padding: var(--space-sm) var(--space-lg);
	border-top: 1px solid var(--border);
	background: var(--bg);
	font-size: var(--font-size-sm);
	color: var(--muted);
	text-align: center;
}

/* Header */

.app-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	height: var(--header-height);
	padding: 0 var(--space-lg);
	border-bottom: 1px solid var(--border);
	background: var(--bg);
	font-size: var(--font-size-sm);
}

.app-header h1 {
	margin: 0;
	font-size: var(--font-size-heading);
	font-weight: bold;
}

.app-header .col-6:last-child {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: var(--space-lg);
}

/* Sidebar */

.app-sidebar {
	position: fixed;
	top: var(--header-height);
	left: 0;
	bottom: 0;
	width: var(--sidebar-width);
	border-right: 1px solid var(--border);
	background: var(--bg-muted);
	overflow-y: auto;
}

.app-nav {
	padding: var(--space-lg);
}

.app-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.app-nav__section {
	display: block;
	margin-top: var(--space-lg);
	padding: var(--space-xs) var(--space-sm);
	font-size: var(--font-size-xs);
	color: var(--muted);
}

.app-nav__link {
	display: flex;
	align-items: center;
	font-size: var(--font-size-sm);
	gap: var(--space-sm);
	padding: 0.1875rem var(--space-xs);
	color: var(--text);
	text-decoration: none;
}

.app-nav__link .fa-solid {
	width: 1rem;
	flex-shrink: 0;
	text-align: center;
	font-size: 0.8125rem;
}

.app-nav__link:hover {
	background: #e3e7e8;
	border-radius: var(--radius);
}

.app-nav__link.active {
	background: #e3e7e8;
	font-weight: 600;
	border-radius: var(--radius);
}

.app-nav__link.disabled {
	color: var(--muted);
	pointer-events: none;
}

/* Page Header */

.page-header {
	padding: var(--space-md) var(--space-lg);
	border-bottom: 1px solid var(--border);
}

.page-header h1 {
	margin: 0;
	font-size: var(--font-size-heading);
	font-weight: bold;
}

.page-header-title {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.status-badge {
	display: inline-block;
	padding: 0.0625rem 0.375rem;
	border-radius: 3px;
	font-size: var(--font-size-xs);
	font-weight: 500;
	line-height: 1.3;
	white-space: nowrap;
}

.status-badge--paid {
	background: #e0f2fe;
	color: #0c4a6e;
}

.status-badge--complete {
	background: #d1fae5;
	color: #065f46;
}

.status-badge--storno {
	background: #e4e4e7;
	color: #27272a;
}

.status-badge--open {
	background: #fef3c7;
	color: #78350f;
}

.status-badge--draft {
	background: #f4f4f5;
	color: #3f3f46;
}

.page-header .col-6:last-child,
.page-header .col-8:last-child {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.25rem;
}

.page-header-subtitle {
	margin: 0.125rem 0 0;
	font-size: var(--font-size-sm);
	color: var(--muted);
}

.filter-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: var(--space-md);
	padding: var(--space-md) var(--space-lg);
	border-bottom: 1px solid var(--border);
}

.filter-bar--scroll {
	flex-wrap: nowrap;
	overflow-x: auto;
}

.filter-group {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: var(--space-md);
}

.filter-field {
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
	flex-shrink: 0;
}

.filter-field label {
	margin: 0;
	font-size: var(--font-size-xs);
	font-weight: 600;
}

.filter-field input,
.filter-field select {
	display: block;
	width: 100%;
	padding: 0.25rem 0.375rem;
	font: inherit;
	font-size: var(--font-size-sm);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--bg);
}

.filter-field--narrow {
	width: 8.5rem;
}

.filter-field--medium {
	width: 10.5rem;
}

.filter-field--wide {
	width: 13.5rem;
}

.filter-search {
	width: 13.5rem;
	flex-shrink: 0;
	padding: 0.25rem 0.375rem;
	font: inherit;
	font-size: var(--font-size-sm);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--bg);
}

.filter-divider {
	padding: 0 0.5rem;
}

.filter-bar .filter-pills {
	align-self: center;
}

.filter-note {
	align-self: center;
	font-size: var(--font-size-sm);
	color: var(--muted);
}

.filter-hint {
	padding: 0 var(--space-lg) var(--space-md);
	font-size: var(--font-size-sm);
	color: var(--muted);
}

.filter-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem;
	flex-shrink: 0;
}

.filter-actions button {
	padding: 0.25rem 0.75rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--bg);
	font-size: var(--font-size-sm);
	cursor: pointer;
}

.filter-actions button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-md);
	padding: var(--space-md) var(--space-lg);
	border-bottom: 1px solid var(--border);
}

.text-end {
	text-align: right;
}

.text-center {
	text-align: center;
}

.table .button-group {
	justify-content: flex-end;
}

.table-detail-row td {
	background: var(--bg-muted);
}

.alert-warning {
	padding: var(--space-md) var(--space-lg);
	margin: var(--space-lg);
	border: 1px solid #fcd34d;
	border-radius: var(--radius);
	background: #fef3c7;
	font-size: var(--font-size-sm);
}

/* Toasts */

.app-toast-container {
	position: fixed;
	top: 1rem;
	right: 1rem;
	z-index: 1100;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: var(--space-md);
	max-width: min(24rem, calc(100vw - 2rem));
	pointer-events: none;
}

body:has(.app-header) .app-toast-container {
	top: calc(var(--header-height) + 0.5rem);
}

.app-toast {
	padding: var(--space-md) var(--space-lg);
	border-radius: var(--radius-lg);
	border: 1px solid var(--border);
	background: var(--bg);
	box-shadow: 0 4px 12px rgb(22 27 29 / 12%);
	font-size: var(--font-size-sm);
	line-height: 1.4;
	opacity: 0;
	transform: translateY(-0.5rem);
	transition: opacity 0.2s ease, transform 0.2s ease;
	pointer-events: auto;
}

.app-toast.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.app-toast.is-hiding {
	opacity: 0;
	transform: translateY(-0.5rem);
}

.app-toast--error {
	border-color: #f5c2c7;
	background: #f8d7da;
	color: #842029;
}

.app-toast--success {
	border-color: #badbcc;
	background: #d1e7dd;
	color: #0f5132;
}

.rotated-chevron {
	display: inline-block;
	transform: rotate(90deg);
}

/* Sub Navigation */

.sub-navigation {
	padding: var(--space-sm) var(--space-lg);
	border-bottom: 1px solid var(--border);
}

/* Cards */

.card {
	padding: var(--space-lg);
	margin: var(--space-md);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
}

.card h2 {
	margin: 0 0 var(--space-md);
	font-size: var(--font-size-xs);
	font-weight: bold;
}

.card-header-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-md);
	margin-bottom: var(--space-md);
}

.card-header-row h2 {
	margin: 0;
}

/* Invoice tab (Bestellungen) */

.invoice-amount-summary {
	margin-top: var(--space-lg);
	padding-top: var(--space-lg);
	border-top: 1px solid var(--border);
}

.invoice-amount-summary__value {
	margin: 0;
	font-size: var(--font-size-heading);
	font-weight: 600;
}

.invoice-action-list {
	display: flex;
	flex-direction: column;
	gap: var(--space-md);
	margin-top: var(--space-md);
}

.invoice-action {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: var(--space-lg);
	padding: var(--space-md) var(--space-lg);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--bg-muted);
}

.invoice-action__body p {
	margin: 0;
}

.invoice-action__body p + p {
	margin-top: var(--space-xs);
}

.invoice-action button {
	flex-shrink: 0;
}

.invoice-send-status {
	margin: 0 0 var(--space-md);
}

.invoice-send-card {
	margin-top: var(--space-md);
}

.invoice-send-form {
	display: flex;
	flex-direction: column;
	gap: var(--space-sm);
}

.invoice-send-form label {
	margin: 0;
}

.invoice-send-form__submit {
	width: 100%;
	margin-top: var(--space-xs);
}

.main-content .card .table {
	margin: 0 -0.25rem;
}

.main-content .row .card {
	margin: var(--space-sm);
}

.main-content > .card,
.main-content .tab-pane > .card,
.main-content .tab-pane > .table {
	margin-top: 0;
	margin-bottom: var(--space-md);
}

.chart-bars-container {
	height: 180px;
}

.chart-bars-container--tall {
	height: 200px;
}

.chart-bars {
	display: flex;
	align-items: flex-end;
	gap: 0.25rem;
	height: 100%;
}

.chart-bar-col {
	flex: 1 1 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
	height: 100%;
	min-width: 0;
}

.chart-bar {
	width: 100%;
	background: var(--text);
	border-radius: 3px 3px 0 0;
}

.chart-bar-label {
	margin-top: 0.125rem;
	font-size: var(--font-size-xs);
	color: var(--muted);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 100%;
}

/* Item */

.item {
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: var(--space-md) var(--space-lg);
	margin-bottom: var(--space-xs);
}

.item p {
	margin: 0.25rem 0 0 0;
	padding: 0;
	font-size: var(--font-size-sm);
}

[data-item-list] .item {
	display: block;
	width: 100%;
	text-align: left;
	font: inherit;
	color: inherit;
	cursor: pointer;
}

button.item {
	appearance: none;
	background: var(--bg);
}

[data-item-list] .item.active,
[data-item-list] tr[data-open-edit-sheet].active {
	background: var(--bg-muted);
}

[data-item-list] tr[data-open-edit-sheet],
tr[data-navigate] {
	cursor: pointer;
}

/* Forms */

form label {
	display: block;
	margin-bottom: 0.125rem;
	font-size: var(--font-size-xs);
	font-weight: 600;
}

form input,
form select {
	display: block;
	width: 100%;
	padding: 0.25rem 0.375rem;
	font: inherit;
	text-align: left;
	font-size: var(--font-size-sm);
	border-radius: var(--radius);
	border: 1px solid var(--border);
	background: var(--bg);
}

form textarea {
	display: block;
	width: 100%;
	padding: 0.25rem 0.375rem;
	font: inherit;
	font-size: var(--font-size-sm);
	border: 1px solid var(--border);
	background: var(--bg);
}

form input[type="checkbox"] {
	display: inline-block;
	width: auto;
	margin: 0;
}

form label:has(input[type="checkbox"]) {
	display: inline-flex;
	align-items: center;
	gap: var(--space-sm);
	font-size: var(--font-size-sm);
}

/* Typeahead suggestion dropdowns */

.typeahead-field {
	position: relative;
}

.best-cust-suggest,
.best-prod-suggest {
	position: absolute;
	z-index: 20;
	top: 100%;
	left: 0;
	right: 0;
	margin-top: 0.25rem;
	max-height: 12rem;
	overflow: auto;
	border: 1px solid var(--border);
	border-radius: 5px;
	background: var(--bg);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.best-cust-suggest:empty,
.best-prod-suggest:empty {
	display: none;
}

.entity-sheet [data-sheet-body]:has(.best-cust-suggest:not(:empty)),
.entity-sheet [data-sheet-body]:has(.best-prod-suggest:not(:empty)) {
	overflow: visible;
}

.suggest-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.suggest-list li {
	margin: 0;
	border-bottom: 1px solid var(--border);
}

.suggest-list li:last-child {
	border-bottom: none;
}

.suggest-list button {
	display: block;
	width: 100%;
	padding: var(--space-md) var(--space-lg);
	border: none;
	border-radius: 0;
	background: var(--bg);
	color: var(--text);
	font: inherit;
	font-size: var(--font-size-sm);
	line-height: 1.3;
	text-align: left;
	cursor: pointer;
}

.entity-sheet .suggest-list button {
	border: none;
}

.suggest-list button:hover,
.suggest-list button:focus-visible {
	background: var(--bg-muted);
	outline: none;
}

.suggest-list .suggest-empty,
.suggest-error {
	margin: 0;
	padding: var(--space-md) var(--space-lg);
	font-size: var(--font-size-sm);
	color: var(--muted);
}

.suggest-error {
	color: #9b1c1c;
}

/* Tables */

.table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--font-size-sm);
}

.table thead th {
	background: var(--bg-muted);
}

.table th,
.table td {
	padding: 0.25rem 0.375rem;
	border: 1px solid var(--border);
	text-align: left;
	vertical-align: top;
}

.table-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

/* Bottom list sheet */

.list-sheet {
	position: fixed;
	z-index: 50;
	left: var(--sidebar-width);
	right: var(--space-lg);
	bottom: calc(var(--footer-height) + var(--sheet-footer-gap));
	display: flex;
	flex-direction: column;
	border: 1px solid var(--border);
	background: var(--bg);
	transition: height 200ms ease-out;
}

.list-sheet-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-md);
	padding: var(--space-md) var(--space-lg);
	border-bottom: 1px solid var(--border);
}

.list-sheet-header [role="group"] {
	display: flex;
	gap: 0.25rem;
}

.list-sheet-header [data-sheet-set] {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	padding: 0.125rem;
	border-radius: var(--radius);
	border: 1px solid var(--border);
	background: var(--bg);
	color: var(--text);
	cursor: pointer;
}

.list-sheet-header [data-sheet-set].active {
	background: var(--bg-muted);
}
.list-sheet-header input[type="search"] {
	margin-right: var(--space-md);
	padding: 0.3125rem 0.5rem;
	width: 240px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--bg);
	color: var(--text);
	font-size: var(--font-size-sm);
}

.list-sheet-header form select {
	margin-right: var(--space-md);
	padding: 0.3125rem 0.5rem;
	width: 170px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--bg);
	color: var(--text);
	font-size: var(--font-size-sm);
}

.list-sheet-header form button {
	padding: 0.3125rem 0.75rem;
	border: none;
	border-radius: var(--radius);
	background: var(--text);
	color: var(--bg);
	font-size: var(--font-size-sm);
	cursor: pointer;
}

.list-sheet-header > div:last-child {
	display: flex;
	flex: 1;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.list-sheet-header > div:last-child form {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.list-sheet-body {
	flex: 1;
	overflow: auto;
	min-height: 0;
}

.list-sheet-page-padding {
	padding-bottom: calc(
		min(42vh, 28rem) + var(--footer-height) + var(--sheet-footer-gap)
	);
	transition: padding-bottom 200ms ease-out;
}

.item-list-row {
	display: block;
	width: 100%;
	padding: var(--space-md) var(--space-lg);
	text-align: left;
	border: none;
	border-bottom: 1px solid var(--border);
	background: var(--bg);
	cursor: pointer;
	font: inherit;
	font-size: var(--font-size-sm);
}

.item-list-row.active {
	background: var(--bg-muted);
}

.list-sheet [data-sheet-set].active {
	font-weight: 600;
}

/* Right entity sheet */

.entity-sheet {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 200;
}

.entity-sheet.is-open {
	display: block;
}

.entity-sheet button {
	padding: 0.3125rem 0.625rem;
	border: none;
	border-radius: var(--radius);
	background: var(--bg);
	border: 1px solid var(--border);
	color: var(--text);
	font-size: var(--font-size-sm);
	cursor: pointer;
}

.entity-sheet > .backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.2);
}

.entity-sheet > aside {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: var(--entity-sheet-width);
	max-width: 100%;
	display: flex;
	flex-direction: column;
	border-left: 1px solid var(--border);
	background: var(--bg);
}

.entity-sheet > aside > header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: var(--space-md);
	padding: var(--space-lg);
	border-bottom: 1px solid var(--border);
}

.entity-sheet > aside > header h2 {
	margin: 0;
	font-size: var(--font-size-heading);
}

.entity-sheet > aside > form,
.entity-sheet > aside > [data-sheet-body] {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-height: 0;
}

.entity-sheet > aside > form {
	flex: 0 0 auto;
}

.entity-sheet .entity-sheet-fields {
	padding: 0 var(--space-lg) var(--space-lg);
}

.entity-sheet [data-sheet-body] {
	flex: 1;
	overflow: auto;
	padding: var(--space-lg);
	min-height: 0;
}

.entity-sheet .card {
	margin: 0 0 var(--space-lg);
}

.entity-sheet footer button.primary {
	background: var(--text);
	color: var(--bg);
	border: none;
}

.entity-sheet footer {
	display: flex;
	justify-content: flex-end;
	gap: var(--space-md);
	padding: var(--space-lg);
	border-top: 1px solid var(--border);
}

/* JS visibility helper */

.d-none {
	display: none !important;
}

/* Tab navigation (client-side panels, e.g. Artikel pricing) */

.nav {
	display: flex;
	flex-wrap: wrap;
	list-style: none;
	padding: 0;
	margin: 0;
	gap: 0.125rem;
}

.nav-item {
	display: flex;
}

.nav-pills .nav-link,
[role="tablist"] .nav-link {
	padding: 0.1875rem 0.75rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	color: var(--text);
	font-size: var(--font-size-xs);
	cursor: pointer;
	text-decoration: none;
}

.nav-pills .nav-link.active,
[role="tablist"] .nav-link.active,
[role="tablist"] [role="tab"].active {
	background: var(--text);
	color: var(--bg);
	border-color: var(--text);
}

/* Icons */

.fa-solid {
	width: 1em;
	text-align: center;
	vertical-align: -0.125em;
}

.icon-md {
	font-size: 1.25rem;
}

/* Modal */

.app-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 300;
}

.app-modal.is-open {
	display: block;
}

.app-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.2);
}

.app-modal__dialog {
	position: relative;
	margin: 10vh auto;
	max-width: 28rem;
	padding: var(--space-lg);
	border: 1px solid var(--border);
	background: var(--bg);
	font-size: var(--font-size-sm);
}

.app-modal__header,
.app-modal__footer {
	display: flex;
	justify-content: space-between;
	gap: 0.5rem;
}

.app-modal__footer {
	justify-content: flex-end;
	margin-top: var(--space-lg);
	gap: var(--space-md);
}

.app-modal__footer button {
	padding: 0.3125rem 0.625rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--bg);
	color: var(--text);
	font-size: var(--font-size-sm);
	cursor: pointer;
}

.app-modal__footer button.primary {
	background: var(--text);
	color: var(--bg);
	border: none;
}
