/* WP-Custom Kundenportal – gleiche Farbwelt wie wp-custom.de, nur Systemschriften (keine externen Ressourcen) */

:root {
	--bg: oklch(0.16 0.012 260);
	--bg-alt: oklch(0.145 0.012 260);
	--card: oklch(0.19 0.012 260);
	--border: oklch(0.28 0.01 260);
	--border-bright: oklch(0.35 0.02 260);
	--text: oklch(0.95 0.005 260);
	--text-2: oklch(0.85 0.005 260);
	--text-4: oklch(0.68 0.01 260);
	--accent: oklch(0.65 0.19 260);
	--accent-link: oklch(0.75 0.15 260);
	--accent-ink: oklch(0.13 0.01 260);
	--mint: oklch(0.75 0.17 160);
	--warn: oklch(0.8 0.15 80);
	--danger: oklch(0.68 0.19 25);
	--font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	--mono: ui-monospace, 'SF Mono', Consolas, 'Liberation Mono', monospace;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	font-size: 15px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

a { color: var(--accent-link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent-link); outline-offset: 2px; }

h1, h2, h3 { margin: 0 0 12px; line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: clamp(24px, 4vw, 32px); }
h2 { font-size: 18px; }
h3 { font-size: 15px; margin-top: 20px; }
p { margin: 0 0 12px; }
code { font-family: var(--mono); font-size: 0.92em; }

.muted { color: var(--text-4); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.break { word-break: break-all; }

.eyebrow {
	margin: 0 0 6px;
	font-family: var(--mono);
	font-size: 12px;
	color: var(--accent-link);
}

/* ---------- Kopf & Fuß ---------- */

.topbar {
	display: flex;
	align-items: center;
	gap: 24px;
	flex-wrap: wrap;
	padding: 14px clamp(16px, 4vw, 40px);
	border-bottom: 1px solid var(--border);
	background: var(--bg-alt);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand small { font-weight: 500; color: var(--text-4); margin-left: 4px; }
.brand-mark {
	width: 28px;
	height: 28px;
	border-radius: 7px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, oklch(0.65 0.19 260), oklch(0.65 0.19 200));
	color: var(--accent-ink);
	font-family: var(--mono);
	font-size: 14px;
}
.nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.nav a { padding: 6px 12px; border-radius: 8px; color: var(--text-2); font-size: 14px; }
.nav a:hover { background: var(--card); text-decoration: none; color: var(--text); }

.main {
	flex: 1;
	width: 100%;
	max-width: 1100px;
	margin: 0 auto;
	padding: 32px clamp(16px, 4vw, 40px) 48px;
}
.main-narrow { max-width: 560px; padding-top: 8vh; }

.footer {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px;
	padding: 18px clamp(16px, 4vw, 40px);
	border-top: 1px solid var(--border);
	color: var(--text-4);
	font-size: 12px;
}
.footer-secure::before { content: '\1F512\00A0'; }

/* ---------- Bausteine ---------- */

.page-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 24px;
}
.page-head h1 { margin: 0; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.card {
	padding: 24px;
	margin-bottom: 20px;
	border-radius: 14px;
	background: var(--card);
	border: 1px solid var(--border);
}
.card-center { text-align: left; }
.card-accent { border-color: var(--accent); }
.card-danger { border-color: oklch(0.45 0.12 25); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.card-link { display: flex; flex-direction: column; gap: 10px; color: var(--text); margin: 0; }
.card-link:hover { border-color: var(--border-bright); text-decoration: none; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.grid-top { align-items: start; gap: 20px; }
@media (max-width: 760px) {
	.grid-2, .grid-4 { grid-template-columns: minmax(0, 1fr); }
}

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat { padding: 18px 20px; border-radius: 14px; background: var(--card); border: 1px solid var(--border); }
.stat strong { display: block; font-size: 26px; line-height: 1.2; }
.stat-label { font-size: 13px; color: var(--text-4); }
.stat-warn { border-color: oklch(0.55 0.12 80); }
.stat-warn strong { color: var(--warn); }

.badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 100px;
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
}
.badge-muted { background: oklch(0.26 0.01 260); color: var(--text-4); }
.badge-info { background: oklch(0.65 0.19 260 / 0.18); color: var(--accent-link); }
.badge-accent { background: var(--accent); color: var(--accent-ink); }
.badge-warn { background: oklch(0.8 0.15 80 / 0.18); color: var(--warn); }
.badge-ok { background: oklch(0.75 0.17 160 / 0.18); color: var(--mint); }
.badge-danger { background: oklch(0.68 0.19 25 / 0.2); color: var(--danger); }

.progress { height: 8px; border-radius: 100px; background: oklch(0.26 0.01 260); overflow: hidden; margin: 6px 0; }
.progress-bar { display: block; height: 100%; border-radius: 100px; background: linear-gradient(90deg, var(--accent), var(--mint)); }
.w-0 { width: 0; } .w-5 { width: 5%; } .w-10 { width: 10%; } .w-15 { width: 15%; } .w-20 { width: 20%; }
.w-25 { width: 25%; } .w-30 { width: 30%; } .w-35 { width: 35%; } .w-40 { width: 40%; } .w-45 { width: 45%; }
.w-50 { width: 50%; } .w-55 { width: 55%; } .w-60 { width: 60%; } .w-65 { width: 65%; } .w-70 { width: 70%; }
.w-75 { width: 75%; } .w-80 { width: 80%; } .w-85 { width: 85%; } .w-90 { width: 90%; } .w-95 { width: 95%; } .w-100 { width: 100%; }

.project-row {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 14px 0;
	border-bottom: 1px solid var(--border);
	color: var(--text);
}
.project-row:last-child { border-bottom: none; }
.project-row:hover { text-decoration: none; }
.project-row:hover strong { color: var(--accent-link); }
.project-row-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 20px; border-left: 2px solid var(--border); margin-left: 4px; }
.timeline li::before {
	content: '';
	position: absolute;
	left: -6px;
	top: 6px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--accent);
}
.timeline li p { margin: 4px 0 0; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; flex-direction: column; padding: 10px 0; border-bottom: 1px solid var(--border); }
.list li:last-child { border-bottom: none; }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 12px 0; }
.kv dt { color: var(--text-4); }
.kv dd { margin: 0; }

.checklist { list-style: none; padding: 0; margin: 0 0 20px; }
.checklist .ok { color: var(--mint); }
.checklist .fail { color: var(--danger); }

.notice { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; border: 1px solid; }
.notice-ok { border-color: oklch(0.55 0.12 160); background: oklch(0.75 0.17 160 / 0.1); }
.notice-error { border-color: oklch(0.5 0.15 25); background: oklch(0.68 0.19 25 / 0.12); }

.icon-circle {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 14px;
	font-size: 24px;
	background: oklch(0.65 0.19 260 / 0.18);
	color: var(--accent-link);
}

.secret {
	padding: 14px;
	border-radius: 10px;
	background: var(--bg-alt);
	border: 1px dashed var(--warn);
	font-family: var(--mono);
	font-size: 14px;
	white-space: pre-wrap;
	word-break: break-all;
}
.secret-inline { font-size: 16px; letter-spacing: 0.05em; color: var(--warn); }
.qr-wrap { display: inline-block; padding: 8px; margin: 4px 0 16px; border-radius: 12px; background: #fff; line-height: 0; }
.qr-wrap svg { display: block; max-width: 100%; height: auto; }

.danger-zone { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); }

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

.stack { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; color: var(--text-4); }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="date"], input[type="password"], select, textarea {
	width: 100%;
	padding: 10px 12px;
	border-radius: 8px;
	border: 1px solid var(--border);
	background: var(--bg);
	color: var(--text);
	font: inherit;
	color-scheme: dark;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.inline-form { display: inline; margin: 0; }
.inline-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.inline-row input[type="text"], .inline-row input[type="date"] { width: auto; min-width: 180px; }

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 18px;
	border-radius: 9px;
	border: 1px solid transparent;
	font: inherit;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	text-decoration: none;
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn-small { padding: 6px 12px; font-size: 13px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--text-2); border-color: var(--border-bright); }
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }
.btn-danger { background: transparent; color: var(--danger); border-color: oklch(0.5 0.15 25); }

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

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { font-size: 12px; font-weight: 600; color: var(--text-4); text-transform: uppercase; letter-spacing: 0.03em; }
.table .num { text-align: right; white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: none; }
.table-form td { padding: 6px; vertical-align: top; }
.table-form textarea { min-height: 40px; }
.table-form .col-qty, .table-form .col-unit { width: 90px; }
.table-form .col-price { width: 140px; }
