/*
 * Gefluegelhof Rehm – Design "Hofbuch"
 * Eine vollstaendig neue, kartenfreie Layoutschicht fuer die bestehende App.
 * Alle data-action-Attribute und damit die vorhandene Funktionslogik bleiben erhalten.
 */

:root {
  --forest: #17251f;
  --forest-2: #2f463b;
  --forest-3: #dfe7e1;
  --cream: #f1efe8;
  --paper: #fffdf7;
  --ink: #171916;
  --muted: #686b64;
  --line: #b9b8b0;
  --yolk: #efc14b;
  --yolk-soft: #f6e9b9;
  --terra: #c3482e;
  --terra-soft: #f1d7d0;
  --sage: #687c6e;
  --shadow: none;
  --shadow-small: none;
  --product-image-ratio: 1 / 1;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--cream);
}

* { border-radius: 0; }

html { background: var(--cream); }

body {
  color: var(--ink);
  background: var(--cream);
}

h1, h2, h3, .brand-name, .metric-value {
  font-family: "Arial Narrow", "Segoe UI", Arial, sans-serif;
  font-weight: 850;
  letter-spacing: -0.045em;
}

h1 { font-size: clamp(2.7rem, 6vw, 5.9rem); line-height: 0.92; }
h2 { font-size: clamp(1.75rem, 3vw, 2.7rem); line-height: 0.98; }
h3 { letter-spacing: -0.025em; }
p { line-height: 1.55; }

::selection { color: var(--ink); background: var(--yolk); }

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid var(--terra);
  outline-offset: 3px;
}

.page-width { width: min(1320px, calc(100% - 56px)); }
.app-shell { background: var(--cream); }

/* Masthead und Navigation */
.demo-ribbon {
  min-height: 24px;
  padding: 4px 20px;
  color: var(--ink);
  background: var(--yolk);
  border: 0;
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.demo-ribbon strong { color: inherit; }

.topbar {
  min-height: 68px;
  color: var(--ink);
  background: var(--paper);
  border: 0;
  border-bottom: 1px solid var(--ink);
  box-shadow: none;
  backdrop-filter: none;
}

.topbar-inner { min-height: 68px; }
.brand { gap: 10px; }

.brand-mark {
  width: 37px;
  height: 37px;
  color: var(--paper);
  background: var(--ink);
  border: 0;
  border-radius: 0;
}

.brand-mark svg { width: 20px; }
.brand-name { font-size: 1.06rem; letter-spacing: -0.035em; }
.brand-place { font-size: 0.58rem; letter-spacing: 0.19em; }

.top-nav { align-self: stretch; gap: 0; border-left: 1px solid var(--line); }

.top-nav button {
  position: relative;
  min-width: 160px;
  align-self: stretch;
  padding: 0 22px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  font-size: 0.76rem;
  font-weight: 800;
}

.top-nav button:hover { color: var(--terra); background: #f4f1e8; }
.top-nav button.active { color: var(--paper); background: var(--ink); }

.topbar-actions { gap: 0; border-left: 1px solid var(--line); }

.user-chip {
  min-height: 44px;
  gap: 9px;
  padding: 0 13px 0 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 0;
}

.avatar {
  width: 44px;
  height: 44px;
  color: var(--paper);
  background: var(--terra);
  border-radius: 0;
}

.icon-button {
  width: 44px;
  height: 44px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
}

.icon-button:hover { color: var(--paper); background: var(--terra); }

.inline-edit-toggle {
  min-height: 44px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.inline-edit-toggle:hover,
.inline-edit-toggle.active { color: var(--paper); background: var(--forest); }

/* Werkzeuge und Formulare */
.button {
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 0;
  font-size: 0.78rem;
  font-weight: 820;
  box-shadow: none;
  transition: color 120ms ease, background 120ms ease, border-color 120ms ease;
}

.button:hover { transform: none; }
.button-primary { color: var(--paper); background: var(--ink); box-shadow: none; }
.button-primary:hover { background: var(--terra); }
.button-yolk { color: var(--ink); background: var(--yolk); box-shadow: none; }
.button-yolk:hover { background: #ffd569; }
.button-secondary { color: var(--ink); background: transparent; border-color: var(--ink); }
.button-secondary:hover { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.button-ghost { color: var(--ink); background: transparent; box-shadow: none; }
.button-ghost:hover { color: var(--terra); background: transparent; }
.button-danger { color: #8c291d; background: var(--terra-soft); }
.button-small { min-height: 36px; padding: 7px 10px; border-radius: 0; }

.field { gap: 5px; }
.field label { color: var(--ink); font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; }

.input, .select, .textarea {
  min-height: 45px;
  padding: 10px 1px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
}

.input:focus, .select:focus, .textarea:focus {
  border-color: var(--terra);
  box-shadow: 0 2px 0 var(--terra);
}

.role-switch {
  padding: 0;
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 0;
  gap: 0;
}

.role-switch button {
  padding: 11px;
  color: var(--ink);
  border-radius: 0;
}

.role-switch button + button { border-left: 1px solid var(--ink); }
.role-switch button.active { color: var(--paper); background: var(--ink); box-shadow: none; }

/* Anmeldung – offene Zweiteilung ohne Karte */
.login-page { grid-template-columns: minmax(0, 1.18fr) minmax(420px, 0.82fr); background: var(--paper); }

.login-story {
  min-height: 100vh;
  padding: 38px clamp(32px, 5vw, 82px);
  color: var(--ink);
  background: var(--paper);
  border-right: 1px solid var(--ink);
}

.login-story::before {
  z-index: 0;
  inset: 0 0 0 auto;
  width: clamp(28px, 4vw, 68px);
  height: 100%;
  background: var(--yolk);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.login-story .brand-mark { color: var(--paper); background: var(--ink); }
.story-copy { max-width: 760px; padding: 60px 0; }
.story-copy h1 { max-width: 730px; margin-bottom: 30px; color: var(--ink); font-size: clamp(3.8rem, 7.2vw, 8rem); }
.story-copy p { max-width: 570px; color: var(--muted); font-size: 1.08rem; }
.login-story .eyebrow { color: var(--terra); }
.farm-line { align-items: center; padding-top: 18px; color: var(--ink); border-top: 1px solid var(--ink); }
.farm-line span { margin-left: auto; font-weight: 850; }

.login-panel {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: clamp(35px, 7vw, 100px);
  background: #dfe7e1;
}

.login-card {
  width: min(430px, 100%);
  margin: 0 auto;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.login-card h2 { max-width: 350px; margin-bottom: 10px; font-size: clamp(2.6rem, 5vw, 4.5rem); }
.login-card > p { color: #505a54; }
.password-toggle { border-radius: 0; }
.login-error { border-left: 4px solid var(--terra); border-radius: 0; }
.demo-logins { border-top: 1px solid var(--ink); }
.demo-logins p { color: var(--ink); }
.demo-buttons { gap: 0; }
.demo-buttons .button + .button { border-left: 0; }
.small-note { color: #5e665f; }

/* Kundenansicht – Verzeichnis statt Kartenraster */
.customer-main { padding: 0 0 90px; }

.customer-hero,
.customer-hero-compact {
  display: block;
  min-height: 0;
  padding: 54px 0 38px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 5px solid var(--ink);
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.customer-hero::after { display: none; }
.customer-hero-compact .hero-copy h1 { max-width: 960px; margin-bottom: 22px; font-size: clamp(3.4rem, 7vw, 6.8rem); }
.eyebrow { color: var(--terra); font-size: 0.67rem; letter-spacing: 0.2em; }
.hero-compact-row { align-items: end; }
.hero-compact-row p { max-width: 680px; color: var(--muted); font-size: 1rem; }

.pickup-pill {
  max-width: 420px;
  padding: 11px 0 8px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 3px solid var(--yolk);
  border-radius: 0;
}

.section-head { align-items: end; margin: 34px 0 0; padding: 0 0 18px; border-bottom: 1px solid var(--ink); }
.section-head h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
.shop-filter-actions { max-width: 760px; gap: 10px; }
.customer-product-search .input { color: var(--ink); background: transparent; border: 1px solid var(--ink); border-radius: 0; box-shadow: none; }
.category-chips { justify-content: flex-end; gap: 0; border: 1px solid var(--ink); }

.category-chip {
  min-height: 38px;
  padding: 8px 11px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-right: 1px solid var(--ink);
  border-radius: 0;
  font-size: 0.7rem;
}

.category-chip:last-child { border-right: 0; }
.category-chip.active, .category-chip:hover { color: var(--paper); background: var(--ink); }
.sold-out-filter { min-height: 35px; padding: 4px 0; border-radius: 0; }
.receipt-product-quantity { border-radius: 0; }

.comparison-bar {
  margin: 0 0 30px;
  padding: 15px 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.comparison-bar > svg { color: var(--terra); }
.shop-layout { grid-template-columns: minmax(0, 1fr) 285px; gap: 36px; }
.product-sections { gap: 40px; }
.product-category-section { border-top: 3px solid var(--ink); }

.product-category-title {
  min-height: 58px;
  align-items: center;
  padding: 0;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
}

.product-category-title h3 { color: var(--ink); font-size: 1.7rem; text-transform: uppercase; }
.product-category-title span { color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase; }

.category-introduction {
  margin: 0;
  color: var(--ink);
  background: #e3e7df;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
}

.category-introduction summary { min-height: 52px; padding: 10px 14px; }
.category-introduction-copy { padding: 14px 44px 18px; border-top: 1px solid #adb5ad; }
.product-grid { display: block; }

.product-card {
  display: grid;
  grid-template-columns: 155px minmax(0, 1fr);
  min-height: 218px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  transition: none;
}

.product-card:hover { transform: none; box-shadow: none; }
.product-favorite-button { left: 104px; right: auto; border-color: var(--ink); border-radius: 0; box-shadow: 3px 3px 0 rgba(23,25,22,0.14); }
.product-favorite-button.active { border-color: var(--ink); background: var(--yolk); color: var(--ink); }

.product-visual,
.admin-product-visual {
  width: 100%;
  height: 100%;
  min-height: 218px;
  aspect-ratio: auto;
  border: 0;
  border-right: 1px solid var(--ink);
}

.product-visual::after { display: none; }
.product-visual .emoji { font-size: 3.25rem; filter: none; }
.product-photo { min-height: 100%; }
.tone-yellow { background: #ead17c; }
.tone-green { background: #cad6c9; }
.tone-terra { background: #e4b5a8; }
.tone-blue { background: #bfcfd0; }

.product-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(215px, 255px);
  grid-template-rows: auto auto auto auto 1fr;
  column-gap: 24px;
  padding: 18px 0 18px 22px;
}

.product-kicker,
.product-card h3,
.product-meta,
.weight-note,
.last-week-panel { grid-column: 1; }

.product-kicker { color: var(--terra); font-size: 0.6rem; letter-spacing: 0.12em; }
.product-card h3 { min-height: 0; margin: 5px 0 6px; font-size: 1.2rem; }
.product-meta { min-height: 0; margin-bottom: 8px; }

.weight-note {
  width: max-content;
  max-width: 100%;
  color: var(--ink);
  background: var(--yolk-soft);
  border-radius: 0;
}

.last-week-panel {
  align-self: end;
  margin: 6px 0 0;
  padding: 8px 0 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-top: 1px dashed var(--line);
  border-radius: 0;
}

.last-week-panel.no-order { color: var(--muted); background: transparent; }

.product-direct-order,
.egg-order-control,
.product-foot {
  grid-column: 2;
  grid-row: 1 / span 5;
  align-self: center;
  margin: 0;
  padding: 0 20px 0 24px;
  border: 0;
  border-left: 1px solid var(--line);
}

.product-direct-order { grid-template-columns: 1fr; }
.product-add-button { width: 100%; justify-content: center; }
.egg-order-control { gap: 10px; }
.egg-order-amount { grid-template-columns: 1fr; }
.egg-order-amount .button { width: 100%; justify-content: center; }
.packaging-choice-head strong { color: var(--ink); text-transform: uppercase; letter-spacing: 0.06em; }
.packaging-choice-list { gap: 0; border-top: 1px solid var(--ink); }
.packaging-choice { padding: 8px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.packaging-choice.is-selected { background: #e1e7df; box-shadow: inset 3px 0 0 var(--ink); }
.packaging-choice-copy strong { color: var(--ink); }
.packaging-choice .button { border-radius: 0; }

.direct-input-wrap,
.product-quantity-input,
.egg-option-field .select {
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 0;
}

.sold-out { border-radius: 0; }
.product-unavailable { color: #64655f; background: #e5e4de; border-color: var(--line); box-shadow: none; }

/* Offener Bestellzettel */
.cart {
  position: sticky;
  top: 94px;
  padding: 0 0 0 22px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-left: 4px solid var(--ink);
  border-radius: 0;
  box-shadow: none;
}

.cart-head { padding: 0 0 13px; border-bottom: 3px solid var(--ink); }
.cart-head h3 { text-transform: uppercase; }
.cart-count { color: var(--ink); background: var(--yolk); border-radius: 0; }
.cart-clear-button { color: var(--terra); border: 0; border-radius: 0; }
.cart-clear-button:hover { color: var(--ink); background: transparent; }
.cart-empty { color: var(--muted); }
.cart-list { gap: 0; }
.cart-line { padding: 13px 0; border-bottom: 1px solid var(--line); }
.cart-product { color: var(--ink); }
.cart-packaging-title { color: var(--terra); }
.cart-remove-button { color: var(--terra); background: transparent; border: 0; border-radius: 0; }
.cart-quantity-wrap { color: var(--ink); background: var(--paper); border: 1px solid var(--ink); border-radius: 0; }
.cart-quantity-input { color: var(--ink); }
.cart-quantity-wrap small, .cart-packaging-info { color: var(--muted); }

.mobile-cart-bar,
.mobile-cart-bar.expanded {
  color: var(--paper);
  background: var(--ink);
  border: 0;
  border-top: 4px solid var(--yolk);
  border-radius: 0;
  box-shadow: none;
}

/* Bestellhistorie als Aktenzeilen */
.history-grid { gap: 0; border-top: 3px solid var(--ink); }

.order-card {
  padding: 22px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  box-shadow: none;
}

.order-items span { background: transparent; border: 1px solid var(--line); border-radius: 0; }
.status { border-radius: 0; }
.order-edit-row { background: var(--yolk-soft); border-radius: 0; }

/* Verwaltung – horizontale Arbeitsleiste statt Seitenleiste */
.admin-shell { background: var(--cream); }
.admin-layout { display: block; min-height: calc(100vh - 92px); }

.admin-sidebar {
  position: sticky;
  z-index: 18;
  top: 92px;
  padding: 0;
  color: var(--paper);
  background: var(--ink);
  border: 0;
}

.admin-menu {
  position: static;
  width: min(1320px, calc(100% - 56px));
  min-height: 54px;
  display: flex;
  gap: 0;
  margin: 0 auto;
  overflow-x: auto;
}

.admin-menu button {
  flex: 1 0 auto;
  min-width: 126px;
  justify-content: center;
  padding: 0 16px;
  color: rgba(255,255,255,0.72);
  background: transparent;
  border: 0;
  border-right: 1px solid rgba(255,255,255,0.18);
  border-radius: 0;
}

.admin-menu button:first-child { border-left: 1px solid rgba(255,255,255,0.18); }
.admin-menu button:hover { color: #fff; background: #2d3631; }
.admin-menu button.active { color: var(--ink); background: var(--yolk); }

.admin-main {
  max-width: 1320px;
  width: calc(100% - 56px);
  margin: 0 auto;
  padding: 44px 0 80px;
}

.admin-heading { align-items: end; margin-bottom: 34px; padding-bottom: 24px; border-bottom: 5px solid var(--ink); }
.admin-heading h1 { max-width: 880px; margin-bottom: 9px; font-size: clamp(3rem, 6vw, 6rem); }
.admin-heading p { max-width: 780px; color: var(--muted); }
.admin-list-search { max-width: 760px; }
.admin-list-search .input { color: var(--ink); background: transparent; border: 1px solid var(--ink); border-radius: 0; box-shadow: none; }
.admin-search-result-count { color: var(--ink); text-transform: uppercase; letter-spacing: 0.08em; }
.heading-actions { align-self: end; }

.metrics {
  display: flex;
  gap: 0;
  margin-bottom: 38px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.metric {
  flex: 1;
  min-height: 148px;
  padding: 18px 22px;
  background: transparent;
  border: 0;
  border-left: 1px solid var(--ink);
  border-radius: 0;
  box-shadow: none;
}

.metric:first-child { border-left: 0; }
.metric-icon { color: var(--terra); background: transparent; border: 1px solid var(--ink); border-radius: 0; }
.metric-value { font-size: 3.2rem; line-height: 1; }

.day-dashboard { gap: 0; }
.day-dashboard-head {
  padding: 0 0 20px;
  background: transparent;
  border: 0;
  border-bottom: 3px solid var(--ink);
  border-radius: 0;
  box-shadow: none;
}

.day-controls .input { padding-inline: 8px; border: 1px solid var(--ink); }
.day-arrow { border: 1px solid var(--ink); }
.day-workflow { gap: 0; border-bottom: 3px solid var(--ink); }
.day-workflow article { padding: 18px 16px; border: 0; border-left: 1px solid var(--ink); border-radius: 0; box-shadow: none; background: transparent; }
.day-workflow article:first-child { border-left: 0; }
.day-workflow article > span { border: 1px solid var(--ink); border-radius: 0; }
.day-workflow article.is-complete { background: #dfe7e1; }
.day-dashboard-grid { gap: 30px; }

.panel {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.panel-head { padding: 15px 0; background: transparent; border-bottom: 1px solid var(--ink); }
.panel-body { padding: 18px 0; }
.day-order-line { padding-inline: 0; }
.notice { background: transparent; border: 1px solid var(--line); border-radius: 0; box-shadow: none; }

/* Filter und Tabellen */
.order-control-panel {
  position: relative;
  top: auto;
  padding: 0 0 20px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.order-quick-filters { padding-bottom: 12px; }
.order-quick-filters button { border-color: var(--ink); border-radius: 0; }
.order-quick-filters button.active { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.order-quick-filters button strong { border-radius: 0; }
.order-search-field, .order-date-filter { border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; background: transparent; }
.order-date-filter .input { border: 0; }

.table-wrap { border-top: 3px solid var(--ink); }
.data-table { background: transparent; border-radius: 0; box-shadow: none; }
.data-table th { color: var(--ink); background: transparent; border-bottom: 1px solid var(--ink); }
.data-table td { border-top: 1px solid var(--line); }
.data-table tbody tr:hover { background: #e7e7e0; }
.table-sort-button.active { color: var(--paper); background: var(--ink); }
.order-changed-badge { border-radius: 0; }
.order-complete-track, .order-complete-track > span { border-radius: 0; }

/* Produkte in der Verwaltung als Liste */
.admin-product-grid { display: block; border-top: 3px solid var(--ink); }

.admin-product {
  min-height: 150px;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

.admin-product .admin-product-visual { min-height: 150px; }
.admin-product-body { align-self: center; padding: 18px 22px; }
.admin-product-body h3 { font-size: 1.2rem; }
.admin-product-row { margin-top: 16px; padding-top: 10px; border-top: 1px solid var(--line); }
.toggle input, .toggle input::after { border-radius: 0; }

.product-extra-unit-editor,

/* Kunden, Einstellungen und Websitewerkzeuge ohne Karten */
.customer-category-summary { gap: 0; border: 1px solid var(--ink); }
.customer-category-summary span { flex: 1; border: 0; border-right: 1px solid var(--ink); border-radius: 0; background: transparent; }
.customer-category-summary span:last-child { border-right: 0; }
.delivery-weekday-block { border-color: var(--ink); border-radius: 0; background: transparent; }
.delivery-weekday-option span { border-radius: 0; }
.delivery-weekday-option input:checked + span { border-color: var(--terra); background: #ead8d1; box-shadow: inset 0 -4px 0 var(--terra); }

.settings-grid { display: block; border-top: 3px solid var(--ink); }

.setting-card {
  min-height: 128px;
  display: grid;
  grid-template-columns: 52px minmax(190px, 0.7fr) minmax(260px, 1.3fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 20px;
  padding: 18px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  box-shadow: none;
}

.setting-card > * { min-width: 0; }
.setting-card h3, .setting-card p { margin: 0; overflow-wrap: anywhere; }
.setting-card > .setting-icon { grid-column: 1; grid-row: 1 / 3; }
.setting-card > h3 { grid-column: 2; grid-row: 1 / 3; align-self: center; }
.setting-card > p { grid-column: 3; grid-row: 1 / 3; align-self: center; }
.setting-card > .status { grid-column: 4; grid-row: 1; align-self: end; justify-self: end; max-width: 100%; white-space: normal; text-align: center; }
.setting-card > .setting-action,
.setting-card > .setting-action-group { grid-column: 4; grid-row: 2; align-self: start; justify-self: end; margin: 7px 0 0; }
.setting-icon { color: var(--terra); background: transparent; border: 1px solid var(--ink); border-radius: 0; }
.setting-action { position: static; margin: 0; }

.builder-safety-note,
.builder-editor-section,
.builder-category-editor,
.builder-category-section,
.builder-preview-toolbar,
.builder-preview-browser,
.builder-save-bar {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  box-shadow: none;
}

.builder-safety-note { border: 1px solid var(--ink); }
.builder-editor-section, .builder-category-section { border-top: 3px solid var(--ink); }
.builder-editor-section[open] > summary, .builder-category-editor[open] > summary { background: #e1e6df; }
.builder-save-bar { border: 1px solid var(--ink); background: rgba(241,239,232,0.97); }
.builder-preview-browser { border: 1px solid var(--ink); }
.builder-browser-bar { background: var(--ink); color: var(--paper); }
.builder-login-preview { background: var(--paper); color: var(--ink); }
.builder-login-preview .brand-name { color: var(--ink); }
.builder-login-preview .eyebrow { color: var(--terra); }
.builder-login-preview h2 { color: var(--ink); }
.builder-login-preview p { color: var(--muted); }
.builder-preview-tagline { color: var(--terra); border-top-color: var(--ink); }
.builder-preview-hero { background: var(--ink); }
.builder-preview-chips span { border-radius: 0; }

/* Modale bleiben als Arbeitsblaetter, nicht als schwebende Karten */
.modal-backdrop { background: rgba(23,25,22,0.72); backdrop-filter: none; }
.modal { background: var(--paper); border: 2px solid var(--ink); border-radius: 0; box-shadow: none; }
.modal-head { background: var(--paper); border-bottom: 3px solid var(--ink); }
.modal-close { border-radius: 0; }
.toast { background: var(--ink); border-left: 5px solid var(--yolk); border-radius: 0; box-shadow: none; }
.empty-state { background: transparent; border: 1px dashed var(--line); border-radius: 0; box-shadow: none; }

@media (max-width: 1100px) {
  .page-width, .admin-main, .admin-menu { width: min(100% - 36px, 1320px); }
  .top-nav button { min-width: 138px; padding-inline: 15px; }
  .shop-layout { grid-template-columns: minmax(0, 1fr) 250px; gap: 25px; }
  .product-card { grid-template-columns: 125px minmax(0, 1fr); }
  .product-favorite-button { left: 74px; }
  .product-body { grid-template-columns: minmax(0, 1fr) 210px; gap: 18px; }
  .product-direct-order, .egg-order-control, .product-foot { padding-inline: 18px 12px; }
  .setting-card { grid-template-columns: 46px minmax(170px, 0.65fr) minmax(220px, 1.35fr); grid-template-rows: auto auto auto; }
  .setting-card > .setting-icon { grid-column: 1; grid-row: 1 / 3; align-self: start; }
  .setting-card > h3 { grid-column: 2; grid-row: 1; align-self: center; }
  .setting-card > .status { grid-column: 3; grid-row: 1; align-self: center; }
  .setting-card > p { grid-column: 2 / -1; grid-row: 2; align-self: start; }
  .setting-card > .setting-action,
  .setting-card > .setting-action-group { grid-column: 2 / -1; grid-row: 3; justify-self: start; align-self: start; }
}

@media (max-width: 900px) {
  .login-page { grid-template-columns: 1fr; }
  .login-story { display: none; }
  .login-panel { background: #dfe7e1; }
  .login-card { padding: 0; background: transparent; border: 0; box-shadow: none; }
  .mobile-login-brand { display: inline-flex; margin-bottom: 55px; }
  .shop-layout { grid-template-columns: 1fr; }
  .cart { top: auto; margin-top: 25px; }
  .day-dashboard-grid { grid-template-columns: 1fr; }
  .admin-product-grid { grid-template-columns: 1fr; }
  .content-builder-layout { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .page-width, .admin-main { width: min(100% - 22px, 1320px); }
  .topbar, .topbar-inner { min-height: 62px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-name { font-size: 0.95rem; }
  .customer-main { padding-top: 0; }
  .mobile-customer-nav { margin: 14px 0 0; border: 1px solid var(--ink); }
  .customer-hero, .customer-hero-compact { padding: 36px 0 28px; border-bottom-width: 4px; }
  .customer-hero-compact .hero-copy h1 { font-size: clamp(2.7rem, 13vw, 4.2rem); }
  .hero-compact-row { align-items: stretch; }
  .section-head { align-items: stretch; margin-top: 26px; }
  .shop-filter-actions { max-width: 100%; }
  .category-chips { justify-content: flex-start; border: 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
  .category-chip { border-right: 1px solid var(--ink); }
  .comparison-bar { align-items: stretch; padding-block: 14px; }
  .product-category-title { min-height: 50px; }
  .product-card { grid-template-columns: 1fr; min-height: 0; }
  .product-favorite-button { left: auto; right: 10px; }
  .product-visual { min-height: 112px; height: 112px; border-right: 0; border-bottom: 1px solid var(--ink); }
  .product-body { display: block; padding: 16px 0; }
  .product-card h3 { font-size: 1.25rem; }
  .last-week-panel { margin-top: 12px; padding-top: 10px; }
  .product-direct-order, .egg-order-control, .product-foot {
    margin-top: 14px;
    padding: 14px 0 0;
    border-left: 0;
    border-top: 1px solid var(--ink);
  }
  .cart { display: none; }
  .mobile-cart-bar, .mobile-cart-bar.expanded { border-radius: 0; }
  .admin-layout { display: block; }
  .admin-sidebar { position: fixed; top: auto; bottom: 0; padding: 0; background: var(--ink); border-top: 3px solid var(--yolk); }
  .admin-menu {
    width: 100%;
    min-height: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    display: grid;
    gap: 0;
    padding: 0;
    overflow: visible;
    scroll-snap-type: none;
  }
  .admin-menu button { min-width: 0; min-height: 49px; padding: 5px 3px; scroll-snap-align: none; }
  .admin-menu button:first-child { border-left: 0; }
  .admin-menu button span { max-width: 100%; overflow: visible; overflow-wrap: anywhere; text-overflow: clip; white-space: normal; }
  .admin-menu button.active { color: var(--ink); background: var(--yolk); }
  .admin-main { padding: 28px 0 calc(142px + env(safe-area-inset-bottom)); }
  .admin-heading { align-items: stretch; padding-bottom: 18px; border-bottom-width: 4px; }
  .admin-heading h1 { font-size: clamp(2.75rem, 13vw, 4.3rem); }
  .metrics { display: block; }
  .metric { min-height: 112px; padding: 15px 0; border-left: 0; border-top: 1px solid var(--line); }
  .metric:first-child { border-top: 0; }
  .metric-value { font-size: 2.5rem; }
  .day-dashboard-head { align-items: stretch; }
  .day-workflow article { border-left: 0; border-top: 1px solid var(--ink); }
  .day-workflow article:first-child { border-top: 0; }
  .admin-product { grid-template-columns: 94px minmax(0, 1fr); min-height: 124px; }
  .admin-product .admin-product-visual { min-height: 124px; border-bottom: 0; border-right: 1px solid var(--ink); }
  .admin-product-body { padding: 14px; }
  .settings-grid { border-top-width: 2px; }
  .setting-card { display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: auto auto auto auto; gap: 10px 14px; padding: 18px 0; }
  .setting-card > .setting-icon { grid-column: 1; grid-row: 1; align-self: start; }
  .setting-card > h3 { grid-column: 2; grid-row: 1; align-self: center; }
  .setting-card > p { grid-column: 1 / -1; grid-row: 2; }
  .setting-card > .status { grid-column: 1 / -1; grid-row: 3; justify-self: start; align-self: start; }
  .setting-card > .setting-action,
  .setting-card > .setting-action-group { grid-column: 1 / -1; grid-row: 4; justify-self: stretch; align-self: start; }
  .setting-card > .setting-action { width: 100%; }
  .setting-card > .setting-action-group { width: 100%; }
  .setting-card > .setting-action-group .button { flex: 1 1 160px; }
  .customer-category-summary { overflow: visible; }
  .customer-category-summary span { min-width: 120px; flex: 1 1 120px; }
  .data-table tr { background: transparent; border-top-color: var(--ink); }
  .modal { border-width: 1px; }
}

@media (max-width: 430px) {
  .login-panel { padding: 28px 20px; }
  .mobile-login-brand { margin-bottom: 42px; }
  .login-card h2 { font-size: 2.85rem; }
  .demo-buttons { display: grid; }
  .demo-buttons .button + .button { border-top: 0; border-left: 1px solid var(--ink); }
  .customer-hero-compact .hero-copy h1 { font-size: 2.8rem; }
  .pickup-pill { width: 100%; }
  .category-introduction-copy { padding-inline: 14px; }
}

@media print {
  body { background: white !important; }
}
