
/* =====================================================================
   ZENTRALE GESTALTUNG – ERP, Tickets und Shop · ERP 1.29.0
   01 Schriften / Variablen   02 Hell / Dunkel / System   03 Grundlayout
   04 Navigation             05 Formulare               06 Tabellen / Suche
   07 Karten / Meldungen     08 Belegeditor              09 Shop
   10 Mobil / Tablet        11 Drucken

   Feste Gestaltung ausschließlich hier bearbeiten. shop/style.php liefert
   dieselbe Datei bei eigener Shop-URL aus. shop_theme.php setzt ausschließlich
   Einstellungsvariablen. Konfigurierbare Beleg-/PDF-Vorlagen bleiben separat.
   ===================================================================== */

/* 01 · SCHRIFTEN UND KONSTANTEN
   Sansation unter SIL OFL 1.1: Originaldateien in fonts/sansation, Lizenz OFL.txt.
   Beide Web-Einstiegspunkte liefern dieselben Schriften vom eigenen Server. */
@font-face {
	font-family: "Sansation";
	src: url("webfont.php?face=light&v=1.29.0") format("truetype");
	font-weight: 300;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Sansation";
	src: url("webfont.php?face=regular&v=1.29.0") format("truetype");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Sansation";
	src: url("webfont.php?face=bold&v=1.29.0") format("truetype");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Sansation";
	src: url("webfont.php?face=lightitalic&v=1.29.0") format("truetype");
	font-weight: 300;
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: "Sansation";
	src: url("webfont.php?face=italic&v=1.29.0") format("truetype");
	font-weight: 400;
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: "Sansation";
	src: url("webfont.php?face=bolditalic&v=1.29.0") format("truetype");
	font-weight: 700;
	font-style: italic;
	font-display: swap;
}

:root {
	--font-family: "Sansation", "Segoe UI", system-ui, Arial, sans-serif;
	--font-light: 300;
	--font-regular: 400;
	--header-bg: #172338;
	--header-fg: #fff;
	--nav-active-bg: #2b4566;
	--link-color: #3284c7;
	--button-bg: #1965a6;
	--button-link-bg: #31649a;
	--button-fg: #fff;
	--danger-bg: #94502f;
	--error-color: #d44;
	--warning-line: #d88b21;
	--warning-text: #b66c10;
	--ticket-alert-line: #d99224;
	--content-width: 1200px;
	--radius-panel: 12px;
	--radius-control: 7px;
	--shop-accent: #1965a6;
	--shop-logo-width: 160px;
	--shop-columns: 2;
}

/* 02 · FARBSCHEMATA – theme.js setzt ausschließlich data-theme. */
html, html[data-theme="light"] {
	color-scheme: light;
	--bg: #f5f7fb;
	--panel: #fff;
	--fg: #172338;
	--line: #b9c3d1;
}

html[data-theme="dark"] {
	color-scheme: dark;
	--bg: #101824;
	--panel: #1b2939;
	--fg: #e8eef8;
	--line: #536277;
}

@media (prefers-color-scheme: dark) {
	html:not([data-theme]), html[data-theme="system"] {
		color-scheme: dark;
		--bg: #101824;
		--panel: #1b2939;
		--fg: #e8eef8;
		--line: #536277;
	}
}

/* 03 · GRUNDLAYOUT / TYPOGRAFIE
   Überschriften erben ihre Schriftfamilie: So bleiben die im Belegeditor
   ausgewählten Schriften innerhalb einer Vorschau erhalten. */
* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font-family: var(--font-family);
	font-size: 16px;
	font-weight: var(--font-light);
}

h1, h2, h3, h4, h5, h6, strong, b, th, label, legend, dt, summary {
	font-weight: var(--font-regular);
}

h1, h2, h3 {
	overflow-wrap: anywhere;
}

main {
	max-width: var(--content-width);
	margin: 30px auto;
	padding: 0 20px;
}

a {
	color: var(--link-color);
}

small {
	font-weight: inherit;
}

dd {
	margin-bottom: .75rem;
}

/* 04 · KOPFBEREICH / NAVIGATION
   nav-group = Oberbereich; nav-submenu = zugehörige Unterpunkte. */
header {
	display: flex;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
	background: var(--header-bg);
	color: var(--header-fg);
	padding: 18px 4%;
}

header a {
	color: var(--header-fg);
}

nav {
	display: flex;
	gap: 14px;
	align-items: center;
	flex-wrap: wrap;
}

.app-header {
	align-items: start;
	gap: 16px;
}

.brand {
	font-weight: var(--font-regular);
	text-decoration: none;
	font-size: 20px;
	white-space: nowrap;
}

.brand-logo {
	max-height: 110px;
	object-fit: contain;
}

.app-header nav {
	flex: 1 1 100%;
	min-width: 0;
	align-items: flex-start;
	gap: 6px;
}

.app-header nav a {
	padding: 8px 10px;
	border-radius: var(--radius-control);
	text-decoration: none;
}

.app-header nav a:hover, .app-header nav a[aria-current="page"], .nav-group[open] > summary {
	background: var(--nav-active-bg);
	color: var(--header-fg);
}

.app-header .theme {
	margin-left: auto;
}

.nav-toggle {
	display: none;
}

.nav-group {
	position: relative;
	margin: 0;
	padding: 0;
	border: 0;
}

.nav-group > summary {
	cursor: pointer;
	padding: 8px 10px;
	border-radius: var(--radius-control);
}

.nav-submenu {
	display: flex;
	flex-direction: column;
	gap: 3px;
	padding: 6px;
	border: 1px solid #63738a;
	border-radius: 8px;
	min-width: 205px;
}

.nav-planned {
	padding: 8px 10px;
	opacity: .6;
	font-size: .9em;
}

/* 05 · FORMULARE / BEDIENELEMENTE */
form, .panel {
	background: var(--panel);
	padding: 22px;
	border-radius: var(--radius-panel);
	margin: 18px 0;
}

label {
	display: block;
	margin: 0 0 15px;
}

input, select, textarea {
	display: block;
	width: 100%;
	margin-top: 5px;
	padding: 10px;
	border: 1px solid var(--line);
	border-radius: var(--radius-control);
	font: inherit;
	background: var(--bg);
	color: var(--fg);
}

input[type="checkbox"] {
	display: inline;
	width: auto;
	margin-right: 8px;
}

button, .button {
	padding: 11px 16px;
	background: var(--button-bg);
	border: 0;
	border-radius: var(--radius-control);
	color: var(--button-fg);
	cursor: pointer;
	font: inherit;
	font-weight: var(--font-regular);
}

.button {
	display: inline-block;
	background: var(--button-link-bg);
	padding: 10px 14px;
	border-radius: 6px;
	text-decoration: none;
}

button:disabled {
	opacity: .4;
}

button.danger {
	background: var(--danger-bg);
}

.inline {
	display: inline;
	margin: 0;
	padding: 0;
	background: none;
}

.grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
	gap: 0 20px;
}

.grid > * {
	min-width: 0;
}

.repeat-row {
	border: 1px solid var(--line);
	padding: 16px;
	margin: 12px 0;
	border-radius: 8px;
}

fieldset {
	border: 1px solid var(--line);
	border-radius: 8px;
	margin: 15px 0;
}

.theme {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	font-size: 12px;
	margin: 0;
}

.theme label {
	margin: 0;
}

.theme button {
	padding: 9px 12px;
}

.theme span {
	max-width: 220px;
	font-size: 12px;
}

/* 06 · TABELLEN / SUCHE / ADRESSEN */
table {
	width: 100%;
	border-collapse: collapse;
	background: var(--panel);
	margin-top: 20px;
}

td, th {
	padding: 12px;
	text-align: left;
	border-bottom: 1px solid var(--line);
}

.table-wrap {
	overflow-x: auto;
}

.line-editor {
	min-width: 1100px;
}

.line-editor input, .line-editor select {
	min-width: 85px;
}

.line-editor .description {
	min-width: 210px;
}

.line-editor td:first-child {
	min-width: 230px;
}

.line-editor td:first-child input, .line-editor td:first-child select {
	width: 100%;
}

.line-editor [data-record-search] {
	min-width: 210px;
}

[data-search-status] {
	display: block;
	min-height: 1.3em;
}

.import-value {
	white-space: normal;
	overflow-wrap: anywhere;
	max-width: 32rem;
}

pre.address {
	white-space: pre-wrap;
	font: inherit;
	margin: 0;
}

/* 07 · KARTEN / EINSTELLUNGEN / MELDUNGEN */
.cards {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
}

.cards a {
	padding: 25px;
	background: var(--panel);
	border-radius: var(--radius-panel);
}

.settings-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
	gap: 18px;
}

.settings-card {
	display: block;
	background: var(--panel);
	padding: 22px;
	border: 1px solid var(--line);
	border-radius: var(--radius-panel);
	text-decoration: none;
	color: var(--fg);
}

.settings-card h2 {
	margin: 0 0 10px;
	font-size: 20px;
}

.settings-card p {
	margin: 0;
	line-height: 1.5;
}

.notice {
	padding: 12px;
	border: 1px solid var(--line);
	border-radius: 8px;
}

.error {
	color: var(--error-color);
}

.warning {
	border: 2px solid var(--warning-line);
}

.warning strong {
	color: var(--warning-text);
}

.ticket-alerts {
	border: 2px solid var(--ticket-alert-line);
}

.route-status:empty {
	display: none;
}

.route-status {
	position: fixed;
	bottom: 16px;
	left: 16px;
	right: 16px;
	padding: 14px;
	background: var(--panel);
	color: var(--fg);
	border: 1px solid var(--line);
	border-radius: 8px;
	z-index: 10;
}

#app-content:focus {
	outline: none;
}

[aria-busy="true"] {
	opacity: .7;
}

/* 08 · BELEGVORSCHAU / FORMULAR-EDITOR
   Belegschriften, Logo, Positionen und Spaltenbreiten bleiben konfigurierbar. */
.document-preview {
	max-width: 900px;
	background: var(--panel);
	padding: 24px !important;
	margin: auto;
	font-weight: var(--font-regular);
}

.document-preview td {
	overflow-wrap: anywhere;
}

/* Belegtypografie bleibt wie im PDF; nur App-Titel verwenden Regular. */
.document-preview h1, .document-preview h2, .document-preview h3, .document-preview h4, .document-preview h5, .document-preview h6, .document-preview strong, .document-preview b, .document-preview th {
	font-weight: 700;
}

.document-preview small {
	font-weight: 400;
}

.document-head {
	display: flex;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
}

.totals {
	margin-left: auto;
	max-width: 360px;
}

.layout-workspace {
	display: grid;
	grid-template-columns: minmax(320px, 1fr) minmax(500px, 1.5fr);
	gap: 20px;
}

.layout-workspace form .grid {
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.layout-preview-panel {
	position: sticky;
	top: 16px;
	align-self: start;
	min-width: 0;
}

.paper-scroll {
	overflow: auto;
	max-height: 80vh;
	border: 1px solid #aaa;
	background: #ddd;
}

.paper-preview {
	width: 794px;
	height: 1123px;
	max-width: none;
	border: 0;
	background: white;
}

.paper-preview.zoom50 {
	zoom: .5;
}

.paper-preview.zoom75 {
	zoom: .75;
}

.paper-preview.zoom100 {
	zoom: 1;
}

.goods-pdf-preview {
	width: 100%;
	height: 750px;
	border: 1px solid var(--border, #aaa);
}

/* 09 · SHOP / PRODUKTE
   Nur --shop-Variablen werden aus den Einstellungen übernommen. */
.shop-app button, .shop-app .button {
	background: var(--shop-accent);
}

.shop-app a {
	color: var(--shop-accent);
}

.shop-app .brand-logo {
	width: var(--shop-logo-width);
	max-width: 100%;
}

.product-image {
	display: block;
	max-width: 100%;
	object-fit: contain;
	background: #fff;
	border-radius: 8px;
	margin: 0 auto 12px;
}

.image-placeholder {
	min-height: 80px;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: .65;
}

.category-heading {
	grid-column: 1/-1;
}

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

.shop-products .category-heading {
	grid-column: 1/-1;
	margin-bottom: 0;
}

.shop-products .panel {
	min-width: 0;
}

@media (min-width: 700px) {
	.shop-products {
		grid-template-columns: var(--shop-intermediate-columns, repeat(auto-fill, minmax(260px, 1fr)));
	}
}

@media (min-width: 900px) {
	.shop-app .shop-products {
		grid-template-columns: repeat(var(--shop-columns), minmax(0, 1fr));
	}
}

/* 10 · MOBIL / TABLET */
@media (max-width: 950px) {
	.layout-workspace {
		display: block;
	}
	
	.layout-preview-panel {
		position: static;
		margin-top: 20px;
	}
	
	.paper-scroll {
		max-height: 70vh;
	}
}

@media (max-width: 720px) {
	.app-header {
		padding: 14px 20px;
	}
	
	.app-header .theme {
		flex: 1 1 100%;
		margin: 0;
	}
	
	.app-ready .nav-toggle {
		display: block;
		margin-left: auto;
	}
	
	.app-ready #main-menu:not(.is-open) {
		display: none;
	}
	
	.app-header nav {
		flex-direction: column;
		align-items: stretch;
	}
	
	.app-header nav a {
		padding: 12px;
	}
	
	.nav-group {
		width: 100%;
	}
	
	.nav-submenu {
		min-width: 0;
		margin-bottom: 8px;
	}
	
	main {
		margin-top: 20px;
	}
	
	form, .panel {
		padding: 16px;
	}
}

/* 11 · DRUCKEN – PDF-Erzeugung wird nicht durch App-Schriften ersetzt. */
@media print {
	html, html[data-theme="dark"], html[data-theme="light"], html[data-theme="system"] {
		color-scheme: light;
		--bg: #fff;
		--panel: #fff;
		--fg: #111;
		--line: #bbb;
	}
	
	header, .no-print, .route-status, .nav-toggle {
		display: none !important;
	}
	
	main {
		margin: 0;
		padding: 0;
		max-width: none;
	}
	
	main > h1 {
		display: none;
	}
	
	.document-preview {
		padding: 0 !important;
		border: 0;
	}
	
	.document-preview .table-wrap {
		overflow: visible;
	}
	
	.document-preview table {
		font-size: 10px;
		table-layout: fixed;
		width: 100%;
	}
	
	.document-preview th:nth-child(2) {
		width: 30%;
	}
	
	table {
		font-size: 11px;
	}
	
	tr {
		break-inside: avoid;
	}
	
	a {
		color: inherit;
	}
	
	thead {
		display: table-header-group;
	}
	
	@page {
		size: A4;
		margin: 18mm;
	}
}

/* Shopkopf: Logo unabhängig von Navigation links oder rechts anordnen. */
.shop-app.shop-logo-left header .brand-logo { order: -1; margin-right: 16px; }
.shop-app.shop-logo-right header .brand-logo { order: 10; margin-left: auto; }

/* Artikelgalerie und längere Shoptexte: Dateien behalten ihr Seitenverhältnis. */
.product-gallery { display:flex; flex-wrap:wrap; gap:16px; margin:16px 0; }
.product-gallery figure { margin:0; max-width:180px; }
.product-gallery img { object-fit:contain; max-width:100%; }
.shop-description { overflow-wrap:anywhere; line-height:1.55; margin:12px 0; }

/* 09.1 · SHOP-NAVIGATION UND KATEGORIESTARTSEITE
   Alle Layoutregeln bleiben in dieser zentralen Datei. */
.shop-app { --shop-accent: #1965a6; }
.shop-app header { display:flex; align-items:center; flex-wrap:wrap; gap:14px; padding:18px max(20px,calc((100vw - 1380px)/2)); border-bottom:1px solid var(--line); background:var(--panel); }
.shop-app main { max-width:1420px; width:100%; margin:0 auto; padding:30px 24px 64px; }
.shop-app header a { text-decoration:none; }
.shop-app .shop-category-menu { position:relative; margin-right:auto; }
.shop-category-menu summary { cursor:pointer; padding:10px 14px; border:1px solid var(--line); border-radius:8px; }
.shop-category-menu nav { position:absolute; z-index:20; top:100%; left:0; min-width:240px; max-width:min(360px,85vw); max-height:65vh; overflow:auto; background:var(--panel); border:1px solid var(--line); box-shadow:0 12px 30px #0002; border-radius:10px; padding:10px; }
.shop-category-menu nav a { display:block; padding:10px; overflow-wrap:anywhere; }
.shop-category-menu nav a:hover { background:var(--bg); }
.shop-appearance { display:flex; align-items:center; gap:8px; font-size:14px; }
.shop-appearance select { width:auto; margin:0; }
.shop-search { display:flex; align-items:end; gap:12px; margin:0 0 30px; }
.shop-search label { flex:1; margin:0; }
.shop-search input { margin-bottom:0; }
.shop-search button { margin:0; }
.shop-eyebrow { text-transform:uppercase; letter-spacing:.12em; font-size:12px; }
.shop-category-tiles { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:20px; margin:24px 0; }
.shop-category-tile { display:flex; flex-direction:column; gap:16px; min-height:200px; padding:26px; border:1px solid var(--line); border-radius:14px; background:var(--panel); text-decoration:none; transition:transform .15s,border-color .15s; }
.shop-category-tile:hover { transform:translateY(-3px); border-color:var(--shop-accent); }
.shop-category-tile h2 { margin:0; color:var(--fg); font-size:22px; }
.shop-category-tile>span:last-child { margin-top:auto; font-size:14px; }
.shop-category-symbol { font-size:36px; }
.shop-intro { padding-top:24px; border-top:1px solid var(--line); }
.shop-breadcrumb { font-size:14px; margin-bottom:20px; overflow-wrap:anywhere; }
.shop-catalog-toolbar { display:flex; justify-content:space-between; align-items:center; gap:20px; margin-bottom:20px; }
.shop-catalog-toolbar h1 { margin:0; }
.shop-view-switch { display:flex; gap:4px; border:1px solid var(--line); border-radius:9px; padding:4px; }
.shop-view-switch a { padding:8px 14px; border-radius:6px; text-decoration:none; }
.shop-view-switch a[aria-current="true"] { background:var(--shop-accent); color:white; }
/* 09.2 · PRODUKTLISTE / KACHELN – Standard ist immer die Liste. */
.shop-catalog-products { display:grid; grid-template-columns:minmax(0,1fr); gap:12px; }
.shop-product-item { display:grid; grid-template-columns:90px minmax(0,1fr) minmax(140px,auto) auto; gap:22px; align-items:center; padding:18px 22px; border:1px solid var(--line); background:var(--panel); border-radius:12px; min-width:0; }
.shop-product-thumb { display:block; min-width:0; text-decoration:none; }
.shop-product-thumb .product-image { width:80px; height:76px; margin:0; border-radius:5px; }
.shop-product-thumb .image-placeholder { font-size:11px; min-height:76px; text-align:center; }
.shop-product-name h2 { font-size:18px; margin:0 0 6px; }
.shop-product-name h2 a { color:var(--fg); text-decoration:none; }
.shop-product-name p { margin:0; font-size:13px; opacity:.75; overflow-wrap:anywhere; }
.shop-price { display:flex; flex-direction:column; gap:4px; }
.shop-price strong { font-size:21px; white-space:nowrap; }
.shop-price small { font-size:12px; }
.shop-product-open { font-size:14px; white-space:nowrap; }
html[data-shop-view="grid"] .shop-catalog-products { grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); }
html[data-shop-view="grid"] .shop-product-item { display:flex; flex-direction:column; align-items:stretch; gap:16px; padding:24px; }
html[data-shop-view="grid"] .shop-product-thumb .product-image { width:100%; height:190px; }
html[data-shop-view="grid"] .shop-product-thumb .image-placeholder { min-height:190px; }
html[data-shop-view="grid"] .shop-product-price { margin-top:auto; }
.shop-pagination { display:flex; gap:20px; margin-top:24px; }
/* 09.3 · ARTIKELPROFIL – volle Inhaltsbreite, Galerie, Optionen, Zubehör. */
.shop-product-profile { width:100%; }
.shop-profile-top { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); gap:48px; align-items:start; }
.shop-profile-media { min-width:0; }
.shop-main-image { padding:24px; border:1px solid var(--line); border-radius:16px; background:var(--panel); }
.shop-main-image .product-image { width:100%; height:420px; margin:0; }
.shop-main-image .image-placeholder { min-height:360px; }
.shop-profile-media .product-gallery { gap:12px; }
.shop-profile-media .product-gallery figure { max-width:122px; }
.shop-gallery-choice { display:block; border:1px solid var(--line); border-radius:8px; overflow:hidden; background:white; }
.shop-gallery-choice[aria-current="true"] { outline:2px solid var(--shop-accent); outline-offset:2px; }
.shop-gallery-choice img { display:block; object-fit:contain; max-width:100%; }
.product-gallery figcaption { font-size:12px; padding-top:5px; overflow-wrap:anywhere; }
.shop-muted { font-size:12px; opacity:.75; }
.shop-profile-summary h1 { font-size:clamp(26px,3vw,40px); margin:12px 0 24px; }
.shop-product-facts { display:grid; grid-template-columns:auto minmax(0,1fr); gap:8px 16px; font-size:14px; margin:24px 0; }
.shop-product-facts dd { margin:0; overflow-wrap:anywhere; }
.shop-profile-summary .shop-price { margin:30px 0; }
.shop-profile-summary .shop-price strong { font-size:32px; }
.shop-profile-description,.shop-option-section,.shop-accessories { margin-top:36px; padding-top:24px; border-top:1px solid var(--line); }
.shop-description { overflow-wrap:anywhere; line-height:1.7; }
.shop-profile-config { scroll-margin-top:24px; }
.shop-table-scroll { overflow-x:auto; }
.shop-table-scroll table { width:100%; border-collapse:collapse; background:var(--panel); }
.shop-table-scroll th,.shop-table-scroll td { padding:16px; text-align:left; border-bottom:1px solid var(--line); vertical-align:middle; }
.shop-table-scroll input[type="checkbox"],.shop-table-scroll input[type="radio"] { width:20px; height:20px; margin:0; accent-color:var(--shop-accent); }
.shop-table-scroll label { margin:0; }
.shop-option-details { display:block; font-size:13px; margin-top:5px; }
.shop-buybar { display:flex; align-items:end; justify-content:flex-end; gap:20px; padding:24px 0; }
.shop-buybar label { width:110px; margin:0; }
.shop-buybar input { margin-bottom:0; }
.shop-buybar button { margin:0; }
.shop-app :focus-visible { outline:3px solid var(--shop-accent); outline-offset:3px; }
@media (max-width:800px) {
 .shop-app main { padding:24px 16px 48px; }
 .shop-profile-top { grid-template-columns:minmax(0,1fr); gap:24px; }
 .shop-main-image .product-image { height:300px; }
 .shop-product-item { grid-template-columns:64px minmax(0,1fr); gap:14px; padding:16px; }
 .shop-product-thumb .product-image { width:60px; height:64px; }
 .shop-product-price { grid-column:2; }
 .shop-product-open { grid-column:2; }
 .shop-catalog-toolbar { align-items:flex-start; flex-direction:column; }
 .shop-search { align-items:stretch; flex-direction:column; }
 .shop-buybar { justify-content:start; flex-wrap:wrap; }
 .shop-category-tiles { grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:12px; }
 .shop-category-tile { padding:20px; min-height:180px; }
}
@media (prefers-reduced-motion:reduce) { .shop-category-tile { transition:none; } }

/* 09.4 · Lesbare Shoplinks in beiden Farbschemata. */
.shop-app a { color:var(--shop-link,var(--shop-accent)); }
.shop-app a.button { display:inline-block; color:#fff; text-decoration:none; }
.shop-view-switch a[aria-current="true"] { color:#fff; }
html[data-theme="dark"] .shop-app { --shop-link:color-mix(in srgb,var(--shop-accent),white 60%); }
@media (prefers-color-scheme:dark) {
 html:not([data-theme]) .shop-app,html[data-theme="system"] .shop-app { --shop-link:color-mix(in srgb,var(--shop-accent),white 60%); }
}

/* Shopkopf erbt die Vordergrundfarbe des gewählten Schemas. */
.shop-app header { color:var(--fg); }

.shop-category-menu nav { display:block; }

/* Kompakte Suche lässt die Kategorien auch auf kleinen Displays oben stehen. */
.shop-app .shop-search { padding:0; background:transparent; border:0; }
@media (max-width:800px) {
 .shop-app .shop-search { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:10px; margin-bottom:24px; }
 .shop-app .shop-search button { padding:11px 16px; }
}

@media (min-width:1000px) {
 html[data-shop-view="grid"] .shop-catalog-products { grid-template-columns:repeat(var(--shop-grid-columns,3),minmax(0,1fr)); }
}

/* 09.5 · KATEGORIEBILDER – Upload oder sichtbares Produkt als Ersatzbild. */
.shop-category-image { display:block; width:100%; height:180px; object-fit:contain; background:#fff; border-radius:8px; }
.category-image-preview { display:block; width:260px; height:170px; object-fit:contain; background:#fff; border:1px solid var(--line); border-radius:8px; margin:16px 0; }

/* ===== Übersicht: kompakte, zugängliche Statuskacheln ===== */
.dashboard-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr));gap:14px;margin:18px 0}
.dashboard-tile{border:2px solid #23834b;border-radius:10px;padding:14px;background:var(--panel,var(--card,#fff));min-width:0}
.dashboard-tile.status-open{border-color:#d6800b}.dashboard-tile.status-overdue{border-color:#c33c43}
.dashboard-tile h2{font-size:1rem;margin:0 0 8px}.dashboard-number{font-size:1.8rem;line-height:1.2;margin:8px 0}
.dashboard-number span{display:block;font-size:.85rem;margin-top:6px}.dashboard-note{font-size:.8rem;opacity:.8}
.dashboard-tile details{font-size:.85rem;margin-top:10px}.dashboard-tile summary{cursor:pointer}
.status-dot{display:inline-block;width:.65em;height:.65em;border-radius:50%;margin-right:4px}
.status-dot.clear{background:#23834b}.status-dot.open{background:#d6800b}.status-dot.overdue{background:#c33c43}
.dashboard-legend{font-size:.8rem}.dashboard-tile details p{overflow-wrap:anywhere}

/* Dashboard: gut lesbare verlinkte Überschriften auch im Dunkelmodus. */
.dashboard-tile h2 a{color:var(--fg)}

/* Shoplogo: dieselbe Moduswahl wie die übrige Oberfläche, ohne Seitenneuladen. */
.shop-app .shop-logo-dark{display:none}
html[data-theme="dark"] .shop-app .shop-logo-light{display:none}
html[data-theme="dark"] .shop-app .shop-logo-dark{display:block}
@media(prefers-color-scheme:dark){
 html:not([data-theme]) .shop-app .shop-logo-light,
 html[data-theme="system"] .shop-app .shop-logo-light{display:none}
 html:not([data-theme]) .shop-app .shop-logo-dark,
 html[data-theme="system"] .shop-app .shop-logo-dark{display:block}
}

/* Gemeinsame Oberflächenlogos: ERP, Shop und Tickets; Belege bleiben separat. */
.surface-logo-dark{display:none}
html[data-theme="dark"] .surface-logo-light{display:none}
html[data-theme="dark"] .surface-logo-dark{display:block}
@media(prefers-color-scheme:dark){
 html:not([data-theme]) .surface-logo-light,
 html[data-theme="system"] .surface-logo-light{display:none}
 html:not([data-theme]) .surface-logo-dark,
 html[data-theme="system"] .surface-logo-dark{display:block}
}
