/* ── Schriften (lokal gehostet) ─────────────────────────────────────────── */
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/lora-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/lora-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Work Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/work-sans-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Work Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/work-sans-600.woff2') format('woff2');
}

/* ── Variables ──────────────────────────────────────────────────────────── */
:root {
  --bg: oklch(0.97 0.012 60);
  --bg-alt: oklch(0.94 0.016 60);
  --bg-card: oklch(0.995 0.004 60);
  --bg-input: oklch(0.995 0.004 60);
  --border: oklch(0.88 0.012 55);
  --border-focus: oklch(0.55 0.1 40);
  --text: oklch(0.24 0.02 50);
  --text-muted: oklch(0.42 0.02 50);
  --accent: oklch(0.55 0.1 40);
  --accent-deep: oklch(0.4 0.09 40);
  --accent-hover: oklch(0.48 0.1 40);
  --on-accent: oklch(0.99 0.005 60);
  --color-success: #16a34a;
  --color-error: #dc2626;
  --color-warn: #d97706;
  --contact-bg: oklch(0.3 0.03 50);
  --contact-input-bg: oklch(0.35 0.03 50);
  --contact-input-border: oklch(0.5 0.02 50);
  --contact-text: oklch(0.96 0.01 60);
  --radius: 4px;
  --radius-sm: 3px;
  --shadow: 0 2px 12px rgba(40,20,10,0.08);
  font-family: 'Work Sans', system-ui, sans-serif;
}

/* ── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body, #root { height: 100%; }
body { background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6 { font-family: 'Lora', serif; font-weight: 600; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: inherit; }

/* ── Navbar ─────────────────────────────────────────────────────────────── */
.navbar {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0 2rem;
  height: 60px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar-brand a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.brand-logo { height: 42px; width: auto; display: block; }
.navbar-links { display: flex; gap: 0.25rem; flex: 1; }
.navbar-links a {
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.navbar-links a:hover { background: rgba(0,0,0,0.04); color: var(--text); text-decoration: none; }
.navbar-links a.active { background: color-mix(in oklch, var(--accent) 15%, transparent); color: var(--accent); }
.navbar-user { display: flex; align-items: center; gap: 0.75rem; margin-left: auto; }
.user-badge { font-size: 0.75rem; color: var(--text-muted); }
.user-name { font-size: 0.875rem; font-weight: 500; color: var(--text); }

/* ── Auth Page ──────────────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: radial-gradient(ellipse at 50% 0%, color-mix(in oklch, var(--accent) 8%, transparent) 0%, transparent 60%);
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
  text-align: center;
}
.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.auth-title { font-size: 1.4rem; font-weight: 600; margin-bottom: 0.5rem; }
.auth-subtitle { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.75rem; }
.auth-form { text-align: left; display: flex; flex-direction: column; gap: 1rem; }

/* ── Sent state ─────────────────────────────────────────────────────────── */
.sent-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.sent-state { display: flex; flex-direction: column; align-items: center; }
.dev-box {
  margin-top: 1.5rem;
  width: 100%;
  background: color-mix(in oklch, var(--accent) 8%, transparent);
  border: 1px solid color-mix(in oklch, var(--accent) 30%, transparent);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: left;
}
.dev-box-label { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.5rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
.dev-link { font-size: 0.78rem; word-break: break-all; color: var(--accent); }

/* ── Form elements ──────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
label { font-size: 0.85rem; font-weight: 500; color: var(--text-muted); }
input, select, textarea {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.6rem 0.875rem;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}
input:focus, select:focus { border-color: var(--border-focus); }
input::placeholder { color: var(--text-muted); }
select { appearance: none; cursor: pointer; }
select option { background: var(--bg-card); }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  transition: background 0.15s;
  white-space: nowrap;
  display: inline-block;
}
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); text-decoration: none; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  transition: all 0.15s;
  display: inline-block;
}
.btn-ghost:hover { border-color: var(--text-muted); color: var(--text); text-decoration: none; }
.btn-danger {
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius-sm);
  color: var(--color-error);
  font-size: 0.85rem;
  padding: 0.35rem 0.65rem;
  transition: background 0.15s;
}
.btn-danger:hover { background: rgba(239,68,68,0.25); }
.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.82rem; }

/* ── Alerts ─────────────────────────────────────────────────────────────── */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}
.alert-error { background: rgba(220,38,38,0.08); border: 1px solid rgba(220,38,38,0.25); color: #b91c1c; }
.alert-success { background: rgba(22,163,74,0.08); border: 1px solid rgba(22,163,74,0.25); color: #15803d; }

/* ── Loading ─────────────────────────────────────────────────────────────── */
.loading-screen { display: flex; flex-direction: column; align-items: center; gap: 1rem; padding: 3rem; color: var(--text-muted); }
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Page Layout ─────────────────────────────────────────────────────────── */
.page { max-width: 1400px; margin: 0 auto; padding: 2rem; }
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.page-title { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.03em; }
.page-sub { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.25rem; }
.stats-row { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.stat-chip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 0.35rem 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.mb-6 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.section-title { font-family: 'Work Sans', sans-serif; font-size: 1rem; font-weight: 600; margin-bottom: 1rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.78rem; }

/* ── Products Grid ───────────────────────────────────────────────────────── */
.products-grid {
  display: grid;
  /* Zwei Produkte pro Reihe – über die gesamte Breite, die zuvor drei Karten
     einnahmen; jede Karte wird dadurch entsprechend breiter. */
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
@media (max-width: 560px) {
  .products-grid { grid-template-columns: 1fr; }
}
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
}
.product-card:hover { border-color: var(--border-focus); transform: translateY(-2px); }
.product-img {
  height: 120px;
  background: linear-gradient(135deg, color-mix(in oklch, var(--accent) 18%, transparent), color-mix(in oklch, var(--accent-deep) 12%, transparent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: color-mix(in oklch, var(--accent) 55%, transparent);
  letter-spacing: -0.02em;
  cursor: pointer;
  overflow: hidden;
}
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-body { padding: 1.25rem; }
.product-name { font-size: 1rem; font-weight: 600; margin-bottom: 0.4rem; cursor: pointer; }
.product-name:hover { color: var(--accent); }
.product-desc { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 1rem; }
.product-footer { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.product-footer > .btn-primary:only-child { width: 100%; }
.product-price { font-size: 1.1rem; font-weight: 700; color: var(--accent); display: block; }
.product-stock { font-size: 0.75rem; color: var(--text-muted); }

/* ── Cart ────────────────────────────────────────────────────────────────── */

/* ── Tabs ────────────────────────────────────────────────────────────────── */
.tab-bar { display: flex; gap: 0.25rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.tab {
  background: none;
  border: none;
  padding: 0.65rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── Inline Form ─────────────────────────────────────────────────────────── */
.inline-form { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: flex-end; }
.inline-form input, .inline-form select { flex: 1; min-width: 150px; width: auto; }

/* ── Table ───────────────────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.data-table th {
  background: rgba(0,0,0,0.025);
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td { padding: 0.9rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody:last-of-type > tr:first-child > td { border-bottom: none; }
.data-table tr:hover td { background: rgba(0,0,0,0.015); }
.order-details-row td { background: rgba(0,0,0,0.02); }
.order-details-row:hover td { background: rgba(0,0,0,0.02); }
.order-details { padding: 0.5rem 0 0.25rem; }
.cell-main { font-weight: 500; }
.cell-sub { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.2rem; }
.empty-row { text-align: center; color: var(--text-muted); padding: 2rem !important; }
code { font-size: 0.78rem; color: var(--text-muted); font-family: monospace; }

/* ── Status select ───────────────────────────────────────────────────────── */
.status-select {
  width: auto;
  font-size: 0.78rem;
  padding: 0.3rem 0.6rem;
  background: rgba(0,0,0,0.04);
  border-color: transparent;
  font-weight: 600;
}
.status-select:focus { border-color: var(--border-focus); }

/* ── Checkout ────────────────────────────────────────────────────────────── */
.checkout-section { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.payment-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.75rem; margin-bottom: 1.25rem; }
.payment-option {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.payment-option:hover { border-color: var(--text-muted); }
.payment-option:has(input:checked) { border-color: var(--accent); background: color-mix(in oklch, var(--accent) 8%, transparent); }
.payment-option input { width: auto; margin-top: 0.3rem; accent-color: var(--accent); }
.payment-option-disabled { opacity: 0.5; cursor: not-allowed; }
.payment-option-disabled:hover { border-color: var(--border); }
.payment-name { font-weight: 600; font-size: 0.92rem; }
.payment-desc { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.15rem; }
.btn-checkout { width: 100%; padding: 0.85rem; font-size: 0.95rem; text-align: center; }

.qty-controls { display: flex; align-items: center; gap: 0.5rem; }
.qty-value { min-width: 1.5rem; text-align: center; font-weight: 600; }

/* ── Confirmation ────────────────────────────────────────────────────────── */
.confirmation-card { border-color: rgba(34,197,94,0.4); }
.confirmation-head { display: flex; gap: 1rem; align-items: flex-start; }
.confirmation-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(34,197,94,0.15);
  color: var(--color-success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
}
.confirmation-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.25rem; }
.invoice-note { margin-top: 1rem; font-size: 0.88rem; color: var(--text-muted); }
.bank-box {
  margin-top: 1.25rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
}
.bank-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem 1.5rem;
  font-size: 0.88rem;
}
.bank-grid span { color: var(--text-muted); }

@media (max-width: 640px) {
  .payment-options { grid-template-columns: 1fr; }
}

/* ── Content page ────────────────────────────────────────────────────────── */
.content-list { display: flex; flex-direction: column; gap: 1.25rem; }
.content-post {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
}
.content-post-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.content-post-title { font-size: 1.25rem; font-weight: 600; }
.content-post-date { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; }
.content-post-body { color: var(--text); line-height: 1.7; white-space: pre-wrap; }
.content-cta { display: flex; justify-content: center; margin-top: 2rem; }
.content-cta .btn-checkout { width: auto; min-width: 240px; }

/* ── Filterleiste ────────────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.filter-search { flex: 1; min-width: 220px; }
.filter-bar select { width: auto; min-width: 140px; }
.filter-count { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; margin-left: auto; }

/* ── Rich-Text-Editor ────────────────────────────────────────────────────── */
.rte { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-input); }
.rte-toolbar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  padding: 0.4rem 0.5rem;
  background: rgba(0,0,0,0.025);
  border-bottom: 1px solid var(--border);
}
.rte-btn {
  min-width: 30px;
  height: 30px;
  padding: 0 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.85rem;
  line-height: 1;
}
.rte-btn:hover { border-color: var(--text-muted); }
.rte-divider { width: 1px; height: 20px; background: var(--border); margin: 0 0.25rem; }
.rte-select {
  width: auto;
  height: 30px;
  padding: 0 0.5rem;
  font-size: 0.82rem;
}
.rte-color {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
}
.rte-color input { width: 28px; height: 28px; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; background: none; }
.rte-editor {
  min-height: 160px;
  padding: 0.75rem 0.9rem;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text);
  outline: none;
  white-space: pre-wrap;
}
.rte-editor:empty::before { content: attr(data-placeholder); color: var(--text-muted); }
.rte-editor h2, .content-post-body h2 { font-size: 1.4rem; font-weight: 700; margin: 0.6rem 0 0.4rem; line-height: 1.3; }
.rte-editor h3, .content-post-body h3 { font-size: 1.1rem; font-weight: 600; margin: 0.5rem 0 0.3rem; line-height: 1.3; }
.content-post-body h2:first-child, .content-post-body h3:first-child { margin-top: 0; }

/* ── Customer management ─────────────────────────────────────────────────── */
.card-head-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
details summary::-webkit-details-marker { display: none; }
details summary { display: flex; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.9rem 1rem;
}
textarea {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.6rem 0.875rem;
  outline: none;
  width: 100%;
  resize: vertical;
  transition: border-color 0.15s;
}
textarea:focus { border-color: var(--border-focus); }
.customer-status { font-size: 0.82rem; font-weight: 600; white-space: nowrap; }
.center-cell { text-align: center; }
.action-row { display: flex; gap: 0.4rem; flex-wrap: nowrap; align-items: center; }
.action-row form { margin: 0; }
.row-selected td { background: color-mix(in oklch, var(--accent) 7%, transparent) !important; }
.customer-detail { border-color: var(--border-focus); }
.stock-empty { color: var(--color-error); font-weight: 600; }
/* Überfällige Bestellungen (Zahlungsziel abgelaufen) farbig hervorheben */
.data-table tr.order-overdue td { background: rgba(220, 38, 38, 0.10); }
.data-table tr.order-overdue:hover td { background: rgba(220, 38, 38, 0.16); }
.overdue-text { color: #dc2626; font-weight: 600; }
.detail-meta { font-size: 0.85rem; color: var(--text-muted); }

/* ── Status history ──────────────────────────────────────────────────────── */
.history-section { border-top: 1px solid var(--border); padding-top: 1.25rem; }
.history-list { list-style: none; }
.history-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 0;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
}
.history-item:last-child { border-bottom: none; }
.history-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.history-status { font-weight: 500; flex: 1; }
.history-time { color: var(--text-muted); font-size: 0.78rem; }

/* ── Role badges ─────────────────────────────────────────────────────────── */
.role-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
}
.role-admin { background: color-mix(in oklch, var(--accent) 12%, transparent); color: var(--accent-deep); }
.role-customer { background: rgba(22,163,74,0.1); color: #15803d; }

/* Schmale Lesespalte für Impressum/Datenschutz (teilt sich die Breite mit .legal-section-inner) */
.landing-page { max-width: 760px; }

/* ── Landingpage: Kopfzeile ───────────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.1rem 2.5rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.site-nav-logo { display: flex; align-items: center; gap: 0.55rem; font-weight: 600; font-size: 1.15rem; color: var(--text); }
.site-nav-links { display: flex; gap: 1.5rem; flex: 1; }
.site-nav-links a { font-size: 0.875rem; color: var(--text); }
.site-nav-links a:hover { color: var(--accent); text-decoration: none; }
.site-nav-crisis { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }
.site-nav-crisis strong { color: var(--text); font-weight: 600; }
@media (max-width: 1040px) {
  .site-nav-links, .site-nav-crisis { display: none; }
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.landing-hero {
  position: relative;
  padding: 5rem 2.5rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}
.landing-hero-inner { max-width: 560px; }
.landing-kicker { color: var(--accent-deep); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.9rem; }
.landing-hero h1 { font-size: 2.3rem; letter-spacing: -0.01em; margin-bottom: 1.1rem; line-height: 1.28; }
.landing-lead { color: var(--text-muted); font-size: 1rem; line-height: 1.7; margin-bottom: 1.25rem; }
.landing-hero .btn-primary { margin-top: 0.5rem; }
.landing-hero-art { position: relative; aspect-ratio: 1 / 1; border-radius: var(--radius); overflow: hidden; background: var(--bg-alt); }
.landing-hero-art::before {
  content: ''; position: absolute; top: -15%; left: 30%; width: 65%; height: 65%; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in oklch, var(--accent) 55%, transparent), transparent 70%);
}
.landing-hero-art::after {
  content: ''; position: absolute; bottom: -10%; right: -10%; width: 75%; height: 75%;
  border-radius: 42% 58% 60% 40% / 45% 45% 55% 55%;
  background:
    repeating-linear-gradient(135deg, color-mix(in oklch, #7c9a82 65%, transparent) 0 2px, transparent 2px 10px),
    color-mix(in oklch, #9db7a0 45%, transparent);
}
@media (max-width: 860px) {
  .landing-hero { grid-template-columns: 1fr; text-align: center; padding: 3rem 1.5rem; }
  .landing-hero-inner { max-width: 100%; margin: 0 auto; }
  .landing-hero-art { max-width: 320px; margin: 0 auto; }
}

/* ── Inhalts-Sektionen (abwechselnder Hintergrund) ───────────────────────── */
.legal-section { padding: 3.5rem 2.5rem; }
.legal-section:nth-of-type(even) { background: var(--bg-alt); }
.legal-section-inner { max-width: 720px; margin: 0 auto; }
.legal-section h2 { font-size: 1.7rem; margin-bottom: 1.25rem; }
.landing-text { color: var(--text); line-height: 1.75; margin-bottom: 0.9rem; }
.landing-text:last-child { margin-bottom: 0; }
.landing-subtitle { font-size: 1.1rem; margin-bottom: 0.6rem; }
.landing-list { color: var(--text); line-height: 1.75; margin: 0 0 0.9rem 1.25rem; }

/* Rechtsquellen- und Konzept-Karten mit Tag */
.legal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.75rem; margin-top: 0.5rem; }
.legal-tag { display: block; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--accent-deep); margin-bottom: 0.6rem; }
.legal-concept { border-top: 2px solid var(--accent); padding-top: 1rem; }

/* Grundsätze */
.principle-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1.75rem; margin-top: 0.5rem; }

/* FAQ */
.faq-list { display: flex; flex-direction: column; }
.faq-item { border-bottom: 1px solid var(--border); padding: 1.1rem 0; }
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-item summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--accent); font-size: 1.3rem; font-weight: 400; flex-shrink: 0; }
.faq-item[open] summary::after { content: '–'; }
.faq-item p { margin-top: 0.9rem; }

/* Kontakt-Sektion (dunkel abgesetzt) */
.landing-contact { background: var(--contact-bg); padding: 4rem 2.5rem; }
.landing-contact-inner { max-width: 640px; margin: 0 auto; }
.landing-contact h2 { font-size: 1.7rem; margin-bottom: 1rem; color: var(--contact-text); }
.landing-contact .page-sub { color: var(--contact-text); }
.landing-contact .page-sub { opacity: 0.75; }
.landing-contact label { color: var(--contact-text); opacity: 0.8; }
.landing-contact input, .landing-contact textarea {
  background: var(--contact-input-bg);
  border-color: var(--contact-input-border);
  color: var(--contact-text);
}
.landing-contact input::placeholder, .landing-contact textarea::placeholder { color: var(--contact-text); opacity: 0.45; }

/* Honeypot-Feld: für Menschen unsichtbar, für Bots ausfüllbar */
.hp-field { position: absolute; left: -9999px; top: -9999px; }

/* Globale Fußzeile */
.site-footer { text-align: center; padding: 2rem 1rem 3rem; font-size: 0.85rem; color: var(--text-muted); }
.site-footer a { color: var(--text-muted); }
.site-footer-sep { margin: 0 0.5rem; }

/* ── Kundenauswahl-Popup ─────────────────────────────────────────────────── */
.customer-picker { display: inline-block; }
.picker-dialog {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0;
  width: 100%;
  max-width: 480px;
  max-height: 70vh;
  background: var(--bg-card);
  color: var(--text);
}
.picker-dialog::backdrop { background: rgba(20,10,5,0.45); }
.picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-card);
}
.picker-search { flex: 1; }
.picker-list { list-style: none; overflow-y: auto; max-height: calc(70vh - 64px); }

/* ── Produkt-Detail-Popup ────────────────────────────────────────────────── */
/* Der globale Reset setzt margin:0 – dadurch entfällt die native Zentrierung
   von <dialog>. Deshalb hier explizit mittig positionieren. */
.product-dialog {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  inset: 0;
  margin: auto;
  /* Höhe nach Inhalt, damit margin:auto auch vertikal zentriert – auch im
     Fallback ohne native <dialog>-Unterstützung. */
  height: -webkit-fit-content;
  height: -moz-fit-content;
  height: fit-content;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(40,20,10,0.22);
  padding: 0;
  width: calc(100% - 2rem);
  max-width: 620px;
  max-height: 96vh;
  max-height: min(96vh, 1100px);
  background: var(--bg-card);
  color: var(--text);
  overflow: hidden;
  display: none;
  flex-direction: column;
}
.product-dialog[open] { display: flex; }
.product-dialog::backdrop { background: rgba(20,10,5,0.5); }
.product-dialog .picker-head { flex: 0 0 auto; padding: 1.1rem 1.5rem; position: static; }
.product-dialog .picker-head strong { font-family: 'Lora', serif; font-size: 1.3rem; font-weight: 600; line-height: 1.3; }
/* flex-basis auto + min-height 0: Body nimmt seine Inhaltshöhe ein und scrollt
   erst, wenn das Popup die Maximalhöhe erreicht. Mit "flex: 1" (Basis 0%)
   fällt der Body in Safari/WebKit auf 0 px zusammen – Inhalte unsichtbar. */
.product-dialog-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 1.5rem 1.5rem 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  font-size: 0.95rem;
  line-height: 1.6;
}
.product-dialog-img { width: 100%; max-height: 240px; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 1.25rem; }
.product-dialog-price { font-size: 1.25rem; font-weight: 700; color: var(--accent); margin-bottom: 1rem; }
.product-dialog-desc { color: var(--text); }
.product-dialog-lead { font-size: 1rem; line-height: 1.65; margin-bottom: 0.75rem; }
.product-dialog-lead:last-child { margin-bottom: 0; }
.product-dialog-desc .content-post-body { font-size: 0.92rem; color: var(--text-muted); white-space: normal; }
.product-dialog-form .form-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem 1.25rem; }
.product-dialog-form label { font-size: 0.85rem; color: var(--text); }
.product-dialog-form input, .product-dialog-form select { padding: 0.7rem 0.9rem; font-size: 0.95rem; }
/* Native Zahlen-Pfeile ausblenden – ruhigeres Bild */
.product-dialog-form input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.product-dialog-form input[type=number]::-webkit-inner-spin-button,
.product-dialog-form input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
/* Button bleibt beim Scrollen am unteren Rand sichtbar */
.product-dialog-footer {
  position: -webkit-sticky;
  position: sticky;
  bottom: 0;
  margin: 1.5rem -1.5rem 0;
  padding: 1rem 1.5rem 1.25rem;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}
/* Fallback ohne <dialog>-Unterstützung: als eigenes Overlay darstellen */
.product-dialog-fallback {
  display: flex;
  z-index: 1000;
  box-shadow: 0 0 0 100vmax rgba(20,10,5,0.5);
}

/* ── Admin: Produktbild ──────────────────────────────────────────────────── */
.product-thumb {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  display: block;
}
.product-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in oklch, var(--accent) 15%, transparent);
  color: color-mix(in oklch, var(--accent) 60%, transparent);
  font-weight: 700;
}
.product-image-preview { max-width: 140px; border-radius: var(--radius-sm); margin-bottom: 0.5rem; display: block; }
.picker-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: 100%;
  text-align: left;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 0.9rem;
}
.picker-item:hover { background: color-mix(in oklch, var(--accent) 6%, transparent); }
.picker-empty { padding: 1.5rem 1rem; text-align: center; color: var(--text-muted); font-size: 0.88rem; }

/* ── Verpflichtungserklärung ─────────────────────────────────────────────── */
.declaration-confirm {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text);
  cursor: pointer;
}
.declaration-confirm input { width: auto; margin-top: 0.2rem; accent-color: var(--accent); }

/* ── Produktbezogene Abfragefelder ───────────────────────────────────────── */
.field-chip {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  margin: 0 0.25rem 0.25rem 0;
  border-radius: 99px;
  background: color-mix(in oklch, var(--accent) 12%, transparent);
  color: var(--accent-deep);
  white-space: nowrap;
}
.field-chip-bmi { background: color-mix(in oklch, var(--color-success) 15%, transparent); color: #15803d; }

/* Abschnitte im Produkt-Popup und im Warenkorb – gleiche Trennlinien-Optik
   wie die übrigen Abschnitte der Seite. */
.product-section { margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.product-section > .section-title { margin-bottom: 1.1rem; color: var(--text); }
.bmi-box {
  margin-top: 1.25rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
}
.bmi-head { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 0.4rem; }
.bmi-figure { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.bmi-value { font-size: 1.6rem; font-weight: 700; color: var(--accent); line-height: 1.2; }
.bmi-category {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.2rem 0.65rem;
  border-radius: 99px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
}
.bmi-box[data-state="empty"] .bmi-value { color: var(--text-muted); }
.bmi-box[data-state="empty"] .bmi-category { background: none; border: none; padding: 0; font-weight: 400; color: var(--text-muted); }
.bmi-recommendation {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent-deep);
}
.bmi-recommendation:empty { display: none; }
.bmi-note { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.3rem; line-height: 1.5; }
.bmi-recommendation:empty + .bmi-note { margin-top: 0.85rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }

.cart-fields { padding: 0 0 0.75rem; }
.cart-fields > summary {
  font-size: 0.8rem;
  color: var(--accent);
  cursor: pointer;
  padding: 0.2rem 0;
  list-style: none;
}
.cart-fields > summary::before { content: '✎ '; }
.cart-fields[open] > summary::before { content: '▾ '; }

.order-field-group { border-top: 1px solid var(--border); padding-top: 0.75rem; margin-top: 0.75rem; }
.order-field-group:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.order-field-product { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.6rem; }
.order-field-product .cell-sub { display: inline; margin-left: 0.35rem; }

/* ── Staffelpreise ───────────────────────────────────────────────────────── */
.field-chip-tier { background: color-mix(in oklch, var(--color-warn) 15%, transparent); color: #b45309; }

/* ── Warenkorb-Seite ─────────────────────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.nav-badge {
  display: inline-block;
  min-width: 1.25rem;
  margin-left: 0.35rem;
  padding: 0.05rem 0.4rem;
  border-radius: 99px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}
.nav-badge[hidden] { display: none; }

/* Kompakte Leiste auf der Produktseite */
.cart-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.9rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.cart-summary-text { display: flex; flex-direction: column; gap: 0.15rem; }
.cart-summary-meta { font-size: 0.85rem; color: var(--text-muted); }

/* Positionen: Produkt | Menge | Preis */
.cart-table-wrap { overflow-x: auto; }
.cart-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.cart-table th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0 0.75rem 0.7rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.cart-table td { padding: 1rem 0.75rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.cart-table th:first-child, .cart-table td:first-child { padding-left: 0; }
.cart-table th:last-child, .cart-table td:last-child { padding-right: 0; width: 1%; }
.cart-table .num { text-align: right; white-space: nowrap; }
.cart-table form { margin: 0; }
.cart-table .qty-controls { justify-content: flex-end; }
.cart-product { font-weight: 600; font-size: 1rem; color: var(--text); }
.cart-line-price { font-weight: 700; font-size: 1rem; }
.cart-tier-select { width: auto; min-width: 11rem; padding: 0.45rem 0.7rem; font-size: 0.88rem; }
.cart-table tfoot td { border-bottom: none; padding-top: 1rem; }
.cart-total-label {
  text-align: right;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.cart-total-value { font-size: 1.2rem; font-weight: 700; color: var(--accent); }
.cart-empty { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* Angaben zur Person – getrennt von den Positionen */
.person-block + .person-block { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.person-block-head { font-weight: 600; margin-bottom: 0.75rem; }
.person-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.9rem 1.25rem;
  margin: 0 0 0.75rem;
}
.person-grid dt { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.15rem; }
.person-grid dd { margin: 0; font-weight: 600; font-size: 0.95rem; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.cart-fields .product-section { margin-top: 0.75rem; padding-top: 0; border-top: none; }
.cart-fields .product-section > .section-title { display: none; }

/* Handy: jede Position als Block – oben Produkt + Entfernen, darunter Menge
   links und Preis rechts. So bleibt der Preis immer sichtbar. */
@media (max-width: 600px) {
  .cart-table-wrap { overflow-x: visible; }
  .cart-table, .cart-table tbody, .cart-table tfoot { display: block; width: 100%; }
  .cart-table thead { display: none; }
  .cart-table tr {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "prod remove" "qty price";
    align-items: center;
    gap: 0.6rem 0.75rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
  }
  .cart-table td { padding: 0; border-bottom: none; }
  .cart-table th:last-child, .cart-table td:last-child { width: auto; }
  .cart-table tbody td:nth-child(1) { grid-area: prod; }
  .cart-table tbody td:nth-child(2) { grid-area: qty; text-align: left; }
  .cart-table tbody td:nth-child(3) { grid-area: price; }
  .cart-table tbody td:nth-child(4) { grid-area: remove; }
  .cart-table .qty-controls { justify-content: flex-start; }
  .cart-tier-select { min-width: 0; max-width: 100%; }
  .cart-table tfoot tr { grid-template-areas: "label total"; border-bottom: none; padding-bottom: 0; }
  .cart-table tfoot td:nth-child(1) { grid-area: label; }
  .cart-table tfoot td:nth-child(2) { grid-area: total; }
  .cart-table tfoot td:nth-child(3) { display: none; }
}

/* ── Navigation auf dem Handy ────────────────────────────────────────────── */
/* Zweizeilig: oben Logo + Abmelden, darunter die Links als wischbare Leiste –
   so passen alle Menüpunkte (inkl. Warenkorb mit Zähler) auch auf 375 px. */
@media (max-width: 640px) {
  .navbar {
    height: auto;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    padding: 0.5rem 1rem;
  }
  .brand-logo { height: 34px; }
  .navbar-user { gap: 0.5rem; }
  .user-badge, .user-name { display: none; }
  .navbar-links {
    order: 3;
    flex: 1 0 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .navbar-links::-webkit-scrollbar { display: none; }
  .navbar-links a { padding: 0.4rem 0.7rem; white-space: nowrap; flex-shrink: 0; }
}

/* ── Verwaltung: Produktformular ─────────────────────────────────────────── */
.product-admin-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.product-admin-head .section-title { margin-bottom: 0.75rem; }
.admin-section { padding: 1.5rem 0; border-top: 1px solid var(--border); }
.admin-section:first-of-type { border-top: none; padding-top: 0.5rem; }
.admin-section-head { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 1.1rem; }
.admin-section-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: color-mix(in oklch, var(--accent) 14%, transparent);
  color: var(--accent-deep);
  font-size: 0.85rem;
  font-weight: 700;
}
.admin-section-title { font-size: 1rem; font-weight: 600; color: var(--text); line-height: 1.75rem; }
.admin-section-hint { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.1rem; }
.admin-grid-3 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem 1.25rem; }
.product-admin-form label { color: var(--text); }
.label-hint { color: var(--text-muted); font-weight: 400; }
.admin-note { margin-top: 0.9rem; font-size: 0.85rem; color: var(--text-muted); line-height: 1.55; }
.admin-note[hidden] { display: none; }
.admin-state { font-weight: 600; color: var(--text-muted); }
.admin-state.is-on { color: var(--color-success); }

/* Zahlenfelder ohne Pfeile – ruhigeres Bild */
.product-admin-form input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.product-admin-form input[type=number]::-webkit-inner-spin-button,
.product-admin-form input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* Bild */
.admin-image { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.admin-image input[type=file] { flex: 1; min-width: 220px; }
.admin-image-preview {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.admin-image-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-alt);
}

/* Hintergrundfarbe der Produktkarte – wählbare Pastelltöne */
.color-swatches { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.color-swatch {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.7rem 0.4rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  background: var(--bg-card);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.color-swatch input { position: absolute; opacity: 0; pointer-events: none; }
.color-swatch:has(input:checked) {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px color-mix(in oklch, var(--accent) 35%, transparent);
}
.color-swatch-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.color-swatch-dot.is-none {
  background:
    linear-gradient(45deg, transparent 45%, var(--color-error, #ef4444) 45%, var(--color-error, #ef4444) 55%, transparent 55%),
    var(--bg-card);
}
.color-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid var(--border);
  vertical-align: middle;
  margin-right: 0.35rem;
}

/* Zeilen: Abfragefelder und Staffeln */
.admin-rows { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 1rem; background: var(--bg-card); }
.admin-rows-head,
.admin-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(150px, 0.9fr) minmax(200px, 1.6fr);
  gap: 0.75rem 1rem;
  align-items: center;
}
.admin-tier-rows .admin-rows-head,
.admin-tier-row { grid-template-columns: minmax(140px, 1fr) minmax(130px, 1fr) minmax(130px, 1fr) minmax(120px, 0.9fr); }
.admin-rows-head {
  padding: 0.7rem 0;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.admin-row { padding: 0.8rem 0; border-top: 1px solid var(--border); transition: opacity 0.15s; }
.admin-row-name { display: flex; flex-direction: column; gap: 0.1rem; }
.admin-row-name strong { font-size: 0.92rem; font-weight: 600; }
.admin-row.is-off .admin-row-name,
.admin-row.is-off input,
.admin-row.is-off .admin-fixed { opacity: 0.5; }
.admin-tier-rows.is-off .admin-row { opacity: 0.5; }
.admin-fixed { font-size: 0.85rem; color: var(--text-muted); }
.admin-unit-price { font-size: 0.88rem; font-weight: 600; color: var(--text); white-space: nowrap; }

/* Eingabe mit Einheit rechts (Stk, kg, €) */
.input-affix { display: flex; align-items: stretch; }
.input-affix input { border-top-right-radius: 0; border-bottom-right-radius: 0; min-width: 0; }
.input-affix span {
  display: flex;
  align-items: center;
  padding: 0 0.7rem;
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--bg-alt);
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Aktionsleiste */
.admin-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.admin-actions .btn-primary { padding: 0.65rem 1.5rem; }

/* Schmale Bildschirme: Zeilen untereinander, Spaltenköpfe als Beschriftung */
@media (max-width: 760px) {
  .admin-rows-head { display: none; }
  .admin-row,
  .admin-tier-row { grid-template-columns: 1fr; gap: 0.5rem; }
  .admin-row > [data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.78rem;
    color: var(--text-muted);
  }
  .admin-row:first-of-type { border-top: none; }
  .admin-actions { flex-direction: column-reverse; align-items: stretch; }
  .admin-actions .btn-primary, .admin-actions .btn-ghost { text-align: center; }
}

/* ── Reiter der Verwaltung auf dem Handy ─────────────────────────────────── */
/* Sieben Reiter passen nicht auf 375 px – die Leiste wird wischbar, statt die
   ganze Seite seitlich überstehen zu lassen. Desktop bleibt unverändert. */
@media (max-width: 760px) {
  .tab-bar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tab-bar::-webkit-scrollbar { display: none; }
  .tab { flex-shrink: 0; white-space: nowrap; padding: 0.65rem 0.9rem; margin-bottom: 0; }
}

/* ── Kunde: Meine Bestellungen ───────────────────────────────────────────── */
.customer-orders { display: flex; flex-direction: column; gap: 1.25rem; }
.customer-order-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.customer-order-title { font-size: 1.15rem; font-weight: 600; }
.order-status-pill {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--status-color);
  background: color-mix(in oklch, var(--status-color) 14%, transparent);
}
.order-status-text { font-size: 0.92rem; color: var(--text); margin-bottom: 1.25rem; }

/* Fortschritt: Punkte mit Verbindungslinie, erledigte Schritte in Statusfarbe */
.order-steps { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 0.9rem; }
.order-step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.4rem; text-align: center; }
.order-step::before {
  content: '';
  position: absolute;
  top: 6px;
  right: 50%;
  width: 100%;
  height: 2px;
  background: var(--border);
}
.order-step:first-child::before { display: none; }
.order-step.is-done::before, .order-step.is-current::before { background: var(--status-color); }
.order-step-dot {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border);
}
.order-step.is-done .order-step-dot { background: var(--status-color); border-color: var(--status-color); }
.order-step.is-current .order-step-dot { border-color: var(--status-color); box-shadow: 0 0 0 4px color-mix(in oklch, var(--status-color) 20%, transparent); }
.order-step-label { font-size: 0.75rem; color: var(--text-muted); }
.order-step.is-current .order-step-label { color: var(--text); font-weight: 600; }

.customer-order-facts { margin-bottom: 0; }
.customer-order .bank-box { margin-top: 1rem; }
.customer-order .history-item { flex-wrap: wrap; }
.customer-order .history-time { white-space: nowrap; }
.customer-order-more { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.customer-order-more > summary { cursor: pointer; font-size: 0.88rem; font-weight: 600; color: var(--accent); list-style: none; }
.customer-order-more > summary::before { content: '▸ '; }
.customer-order-more[open] > summary::before { content: '▾ '; }
.customer-order-more[open] > summary { margin-bottom: 1rem; }

/* Handy: nur der aktuelle Schritt ist beschriftet – sonst kollidieren die Texte */
@media (max-width: 600px) {
  .order-step-label { visibility: hidden; white-space: nowrap; }
  .order-step.is-current .order-step-label { visibility: visible; }
  .order-step:first-child .order-step-label { align-self: flex-start; }
  .order-step:last-child .order-step-label { align-self: flex-end; }
}
