/* Werbezentrum Dortmund – Konfigurator & Adminbereich. Ein Stylesheet für beide. */

@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('../fonts/inter-regular.woff') format('woff'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url('../fonts/inter-medium.woff') format('woff'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url('../fonts/inter-semibold.woff') format('woff'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-display: swap; src: url('../fonts/inter-bold.woff') format('woff'); }

:root {
  --accent: #E4572E;
  --on-accent: #ffffff;
  --ink: #141414;
  --ink-2: #3d3d3a;
  --muted: #6e6d68;
  --line: #e6e4df;
  --line-2: #d6d3cc;
  --bg: #f5f4f1;
  --surface: #ffffff;
  --surface-2: #faf9f7;
  --success: #1f7a4d;
  --success-bg: #e7f4ec;
  --warn: #9a5b00;
  --warn-bg: #fdf3e1;
  --danger: #b42318;
  --danger-bg: #fdecea;
  --info-bg: #eef2f7;
  --accent-soft: color-mix(in srgb, var(--accent) 9%, white);
  --accent-line: color-mix(in srgb, var(--accent) 55%, white);
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 20, 20, .04), 0 4px 16px rgba(20, 20, 20, .05);
  --shadow-lg: 0 12px 40px rgba(20, 20, 20, .16);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.5; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11'; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
.visually-hidden, .hp { position: absolute !important; left: 0; top: 0; width: 1px !important; height: 1px !important; min-height: 0 !important; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0 !important; padding: 0 !important; margin: -1px; opacity: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.icon { display: inline-flex; flex-shrink: 0; }
.icon svg { display: block; }
[hidden] { display: none !important; }

/* ---- Kopfzeile ------------------------------------------------------------ */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.topbar-inner { max-width: 1200px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.brand img { width: 34px; height: 34px; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { font-size: 15px; font-weight: 700; }
.brand-text span { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-phone { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; text-decoration: none; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; }
.topbar-phone:hover { border-color: var(--line-2); background: var(--surface-2); }

.shell { max-width: 1200px; margin: 0 auto; padding: 24px 20px 120px; }
.loading { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); padding: 80px 0; }

/* ---- Fortschritt ------------------------------------------------------------ */
.stepper { display: flex; align-items: center; gap: 8px; margin-bottom: 24px; overflow-x: auto; scrollbar-width: none; }
.stepper-item { display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--muted); background: transparent; border: 1px solid transparent; white-space: nowrap; }
.stepper-item + .stepper-item::before { content: ''; width: 20px; height: 1px; background: var(--line-2); margin: 0 4px 0 -12px; }
button.stepper-item:hover { background: var(--surface); border-color: var(--line); }
.stepper-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 600; background: var(--surface); border: 1px solid var(--line-2); }
.stepper-item.is-current { color: var(--ink); }
.stepper-item.is-current .stepper-dot { background: var(--ink); border-color: var(--ink); color: #fff; }
.stepper-item.is-done { color: var(--ink-2); }
.stepper-item.is-done .stepper-dot { background: var(--success-bg); border-color: transparent; color: var(--success); }

/* ---- Überschriften -------------------------------------------------------- */
.step-head { margin-bottom: 20px; }
.step-head h1 { font-size: clamp(24px, 3.2vw, 32px); font-weight: 700; letter-spacing: -0.02em; }
.step-head p { color: var(--muted); margin-top: 6px; font-size: 16px; }
.step-head-row { display: flex; align-items: center; gap: 14px; }
.step-head-row > div { flex: 1; min-width: 0; }
.step-head-row h1 { font-size: clamp(22px, 2.6vw, 28px); }
.step-head-row p { margin-top: 2px; font-size: 15px; }

/* ---- Produkte ------------------------------------------------------------------ */
.product-group + .product-group { margin-top: 28px; }
.group-title { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 12px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.product-card { display: flex; align-items: center; gap: 14px; text-align: left; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s, box-shadow .15s, transform .15s; }
.product-card:hover { border-color: var(--line-2); box-shadow: var(--shadow); transform: translateY(-1px); }
.product-card.is-selected { border-color: var(--accent); }
.product-icon { width: 48px; height: 48px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.product-icon-sm { width: 44px; height: 44px; }
.product-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.product-text strong { font-size: 16px; font-weight: 600; }
.product-text span { font-size: 14px; color: var(--muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-arrow { color: var(--line-2); }
.product-card:hover .product-arrow { color: var(--ink); }

.trust { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px 24px; color: var(--ink-2); font-size: 14px; }
.trust li { display: flex; align-items: center; gap: 8px; }
.trust .icon { color: var(--success); }
.trust-compact { flex-direction: column; gap: 6px; margin-top: 16px; font-size: 13px; color: var(--muted); }

/* ---- Layout mit Seitenspalte ------------------------------------------------ */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.col-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.col-main > .step-head { margin-bottom: 4px; }
.col-side { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 16px; }

/* ---- Karten & Abschnitte ------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.sec { padding: 22px 24px 24px; }
.sec-title { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 650; margin-bottom: 16px; }
.sec-num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 600; background: var(--ink); color: #fff; flex-shrink: 0; }
.sec-optional { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); padding: 2px 8px; border-radius: 999px; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.sub { margin-top: 18px; }

/* ---- Formularfelder ------------------------------------------------------------ */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { display: block; font-size: 14px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field .field-label { margin-bottom: 0; }
.req { color: var(--accent); }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=url], input:not([type]), select, textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface); font-size: 16px; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 96px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(20, 20, 20, .08); }
.has-error input, .has-error textarea, input[aria-invalid=true] { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 13px; font-weight: 500; margin-top: 6px; }
.field .field-error { margin-top: 0; }
.hint { color: var(--muted); font-size: 13px; margin-top: 10px; }
.hint-accent { color: var(--success); font-weight: 500; }
.center { text-align: center; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.field-wide { grid-column: 1 / -1; }

.input-unit { position: relative; display: block; }
.input-unit input { padding-right: 44px; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.input-unit .unit { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; pointer-events: none; }

.check { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ink); flex-shrink: 0; }
.check.has-error span { color: var(--danger); }

/* ---- Größe ------------------------------------------------------------------- */
.size-inputs { display: grid; grid-template-columns: 1fr auto 1fr auto; gap: 10px; align-items: end; }
.swap { margin-bottom: 4px; }
.size-preview { display: flex; align-items: center; gap: 24px; margin-top: 18px; padding: 18px; background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: var(--radius-sm); min-height: 156px; }
.size-box { position: relative; background: var(--accent-soft); border: 2px solid var(--accent-line); border-radius: 3px; flex-shrink: 0; margin: 0 26px 18px 0; transition: width .2s, height .2s; }
.size-w, .size-h { position: absolute; font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.size-w { left: 50%; bottom: -20px; transform: translateX(-50%); }
.size-h { top: 50%; left: 100%; transform: translateY(-50%); margin-left: 6px; }
.size-area { display: flex; flex-direction: column; margin-left: auto; text-align: right; }
.size-area strong { white-space: nowrap; font-size: 20px; font-variant-numeric: tabular-nums; }
.size-area span { font-size: 13px; color: var(--muted); }

/* ---- Chips & Umschalter ---------------------------------------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; }
.chips-label { font-size: 13px; color: var(--muted); margin-right: 2px; }
.chip { padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-size: 14px; font-weight: 500; transition: all .12s; }
.chip:hover { border-color: var(--ink); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.segmented { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 3px; gap: 2px; min-height: 46px; }
.segmented button { border: 0; background: transparent; padding: 6px 14px; border-radius: 7px; font-size: 15px; font-weight: 500; color: var(--muted); }
.segmented button.is-on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); font-weight: 600; }
.segmented-wide { display: flex; flex-wrap: wrap; }
.segmented-wide button { flex: 1; }

/* ---- Auswahl-Optionen -------------------------------------------------------- */
.options { display: flex; flex-direction: column; gap: 8px; }
.option { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 13px 16px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-sm); transition: border-color .12s, background .12s; }
.option:hover { border-color: var(--ink-2); }
.option.is-on { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.option.is-disabled { opacity: .7; }
.option-radio, .option-box { width: 22px; height: 22px; flex-shrink: 0; border: 1.5px solid var(--line-2); border-radius: 50%; display: grid; place-items: center; color: var(--on-accent); background: var(--surface); }
.option-box { border-radius: 6px; }
.option.is-on .option-radio, .option.is-on .option-box { background: var(--accent); border-color: var(--accent); }
.option-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.option-text strong { font-weight: 600; font-size: 15px; }
.option-text span { font-size: 13px; color: var(--muted); line-height: 1.4; }
.option-text .option-warn { color: var(--warn); font-weight: 500; }
.option-price { font-size: 14px; font-weight: 600; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---- Menge ---------------------------------------------------------------------- */
.qty-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.stepper-input { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.stepper-input button { width: 46px; border: 0; background: var(--surface-2); display: grid; place-items: center; }
.stepper-input button:hover:not(:disabled) { background: var(--line); }
.stepper-input button:disabled { color: var(--line-2); cursor: default; }
.stepper-input input { width: 90px; border: 0; border-radius: 0; text-align: center; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; box-shadow: none !important; }
.stepper-input.has-error { border-color: var(--danger); }
.qty-unit { color: var(--muted); }
.mini-details { margin-top: 12px; font-size: 14px; }
.mini-details summary { cursor: pointer; color: var(--ink-2); font-weight: 500; }
.mini-table { border-collapse: collapse; margin-top: 8px; min-width: 220px; }
.mini-table td { padding: 5px 14px 5px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.mini-table tr.is-on td { font-weight: 700; color: var(--success); }

/* ---- Abzeichen / Hinweise ------------------------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
.badge-success { background: var(--success-bg); color: var(--success); border-color: transparent; }
.badge-warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.badge-danger { background: var(--danger-bg); color: var(--danger); border-color: transparent; }
.badge-accent { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.notice { padding: 14px 16px; border-radius: var(--radius-sm); background: var(--info-bg); font-size: 14px; color: var(--ink-2); display: flex; gap: 10px; align-items: flex-start; }
.notice-warn { background: var(--warn-bg); color: var(--warn); }
.notice-danger { background: var(--danger-bg); color: var(--danger); }
.notice-success { background: var(--success-bg); color: var(--success); }
.notice .icon { margin-top: 1px; }

/* ---- Preis ------------------------------------------------------------------------ */
.price-card { padding: 22px; }
.price-title { font-size: 15px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.price-total { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.price-amount { font-size: 38px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.price-vat { color: var(--muted); font-size: 14px; }
.price-sub { display: flex; gap: 6px 16px; flex-wrap: wrap; color: var(--ink-2); font-size: 14px; margin: 4px 0 12px; font-variant-numeric: tabular-nums; }
.price-empty { color: var(--muted); padding: 10px 0 16px; }
.price-onrequest { display: flex; flex-direction: column; gap: 4px; padding: 4px 0 16px; }
.price-onrequest strong { font-size: 24px; }
.price-onrequest span { color: var(--muted); font-size: 14px; }
.price-card > .btn { margin-top: 16px; }
.price-details { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; font-size: 14px; }
.price-details summary { cursor: pointer; font-weight: 500; color: var(--ink-2); padding: 4px 0; }
.price-lines { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 14px; font-variant-numeric: tabular-nums; }
.price-lines td { padding: 5px 0; vertical-align: top; }
.price-lines td:last-child { text-align: right; white-space: nowrap; padding-left: 12px; }
.price-lines .is-minus td { color: var(--success); }
.price-lines .is-sum td { border-top: 1px solid var(--line); padding-top: 8px; font-weight: 600; }
.price-lines .is-total td { font-weight: 700; font-size: 15px; }

.mobile-bar { display: none; }

/* ---- Zusammenfassung --------------------------------------------------------------- */
.summary-card { padding: 22px; }
.summary-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.summary-head h2 { font-size: 17px; }
.summary-list { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; font-size: 14px; }
.summary-list dt { color: var(--muted); }
.summary-list dd { margin: 0; font-weight: 500; text-align: right; }
.summary-price { display: grid; grid-template-columns: 1fr auto; align-items: baseline; margin: 16px 0; padding-top: 14px; border-top: 1px solid var(--line); }
.summary-price span { color: var(--muted); font-size: 14px; }
.summary-price strong { font-size: 26px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.summary-price small { grid-column: 1 / -1; text-align: right; color: var(--muted); font-size: 13px; }
.summary-card .btn-block { margin-top: 16px; }
.link-btn { background: none; border: 0; padding: 4px 0; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.link-btn:hover { color: var(--accent); }

/* ---- Datei ------------------------------------------------------------------------- */
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 32px 20px; border: 2px dashed var(--line-2); border-radius: var(--radius); background: var(--surface-2); cursor: pointer; transition: all .15s; color: var(--muted); }
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone .icon { color: var(--accent); }
.dropzone strong { color: var(--ink); font-size: 16px; }
.dropzone span { font-size: 13px; }
.dropzone .btn { margin-top: 6px; color: var(--ink); }
.file-row { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.file-thumb { width: 72px; height: 72px; border-radius: 8px; background: var(--surface-2) repeating-conic-gradient(#eee 0% 25%, #fff 0% 50%) 50% / 12px 12px; display: grid; place-items: center; overflow: hidden; flex-shrink: 0; color: var(--muted); border: 1px solid var(--line); }
.file-thumb img { width: 100%; height: 100%; object-fit: contain; }
.file-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--muted); }
.file-name { font-size: 15px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-status { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; margin-top: 2px; }
.file-status.is-ok { color: var(--success); }
.file-status.is-error { color: var(--danger); }
.file-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.file-actions .hint { margin: 0; }
.progress { position: relative; height: 22px; background: var(--line); border-radius: 999px; overflow: hidden; margin-top: 4px; }
.progress-bar { position: absolute; inset: 0 auto 0 0; background: var(--accent); transition: width .2s; }
.progress span { position: relative; font-size: 12px; font-weight: 600; color: var(--ink); padding-left: 10px; line-height: 22px; mix-blend-mode: multiply; }
.file-hints { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.file-hints li { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 8px; background: var(--info-bg); color: var(--ink-2); }
.file-hints li .icon { margin-top: 2px; }
.file-hints .is-good { background: var(--success-bg); color: var(--success); }
.file-hints .is-ok { background: var(--success-bg); color: var(--success); }
.file-hints .is-warn { background: var(--warn-bg); color: var(--warn); }

/* ---- Danke --------------------------------------------------------------------- */
.done { max-width: 620px; margin: 24px auto; padding: 40px 32px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.done h1 { font-size: 30px; }
.done-icon { width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; background: var(--success-bg); color: var(--success); }
.done-icon.is-warn { background: var(--warn-bg); color: var(--warn); }
.done-lead { font-size: 18px; color: var(--ink-2); }
.done-id { display: flex; flex-direction: column; padding: 12px 28px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); }
.done-id span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.done-id strong { font-size: 22px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.done-steps { text-align: left; margin: 8px 0; padding-left: 22px; color: var(--ink-2); display: flex; flex-direction: column; gap: 8px; }
.done-contact { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 6px; }

/* ---- Buttons ------------------------------------------------------------------------ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: var(--radius-sm); border: 1px solid transparent; font-size: 15px; font-weight: 600; text-decoration: none; transition: background .15s, border-color .15s, transform .05s; white-space: nowrap; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 88%, black); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover:not(:disabled) { background: #000; }
.btn-secondary { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn-secondary:hover:not(:disabled) { border-color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover:not(:disabled) { background: rgba(20, 20, 20, .05); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-ghost { background: transparent; color: var(--danger); }
.btn-danger-ghost:hover { background: var(--danger-bg); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn-lg { min-height: 52px; font-size: 16px; }
.btn-block { width: 100%; }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); display: inline-grid; place-items: center; color: var(--ink-2); flex-shrink: 0; }
.icon-btn:hover { border-color: var(--line-2); color: var(--ink); background: var(--surface-2); }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .4); border-top-color: currentColor; border-radius: 50%; animation: spin .7s linear infinite; }
.spinner-dark { border-color: var(--line-2); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Toast / Dialog / Drawer -------------------------------------------------------- */
#toast-host { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 15px; font-weight: 500; box-shadow: var(--shadow-lg); animation: toast-in .2s ease-out; max-width: calc(100vw - 32px); }
.toast-ok .icon { color: #7ee2a8; }
.toast-error { background: var(--danger); }
.toast.out { opacity: 0; transform: translateY(8px); transition: all .3s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.overlay { position: fixed; inset: 0; background: rgba(20, 20, 20, .45); z-index: 80; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.overlay.out { opacity: 0; transition: opacity .18s; }
@keyframes fade { from { opacity: 0; } }
.dialog { background: var(--surface); border-radius: var(--radius); padding: 24px; width: 100%; max-width: 420px; box-shadow: var(--shadow-lg); }
.dialog h3 { font-size: 19px; margin-bottom: 8px; }
.dialog p { color: var(--ink-2); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.overlay-drawer { display: flex; justify-content: flex-end; align-items: stretch; padding: 0; z-index: 70; }
.drawer { width: min(560px, 100vw); height: 100vh; height: 100dvh; background: var(--surface); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: slide .2s ease-out; }
@keyframes slide { from { transform: translateX(40px); opacity: .4; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 19px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 18px; }
.drawer-foot { display: flex; gap: 10px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); }
.drawer-foot .spacer { flex: 1; }

/* ================================================================== */
/*  Adminbereich                                                       */
/* ================================================================== */
.admin { background: linear-gradient(to right, var(--surface) 240px, var(--bg) 240px); min-height: 100vh; display: grid; grid-template-columns: 240px 1fr; grid-template-rows: auto 1fr; }
.admin .topbar { grid-column: 1 / -1; }
.admin .topbar-inner { max-width: none; }
.admin-nav { padding: 16px 12px; border-right: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; gap: 2px; position: sticky; top: 59px; height: calc(100vh - 59px); overflow-y: auto; }
.admin-nav button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; font-size: 15px; font-weight: 500; color: var(--ink-2); text-align: left; }
.admin-nav button:hover { background: var(--surface-2); color: var(--ink); }
.admin-nav button.is-on { background: var(--ink); color: #fff; }
.admin-nav .count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.admin-nav .nav-sep { height: 1px; background: var(--line); margin: 10px 4px; }
.admin-nav .nav-foot { margin-top: auto; font-size: 12px; color: var(--muted); padding: 10px 12px; display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); flex-shrink: 0; }
.dot.is-off { background: var(--danger); }
.dot.is-demo { background: var(--warn); }
.admin-main { padding: 28px 32px 80px; min-width: 0; max-width: 1100px; }
.admin-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.admin-head h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.admin-head p { color: var(--muted); margin-top: 4px; font-size: 15px; max-width: 640px; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs button { border: 0; background: transparent; padding: 10px 14px; font-size: 15px; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button:hover { color: var(--ink); }
.tabs button.is-on { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.tabs .count { margin-left: 6px; font-size: 12px; color: var(--muted); }

.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); min-height: 64px; }
.row:last-child { border-bottom: 0; }
.row.is-inactive .row-main { opacity: .5; }
.row-click { cursor: pointer; }
.row-click:hover { background: var(--surface-2); }
.row-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); flex-shrink: 0; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-main strong { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-main span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-value { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 15px; }
.row-tools { display: flex; gap: 4px; align-items: center; }
.row-tools .icon-btn { width: 34px; height: 34px; border-color: transparent; background: transparent; }
.row-tools .icon-btn:hover { border-color: var(--line); background: var(--surface); }
.row-tools .icon-btn:disabled { opacity: .25; cursor: default; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .icon { color: var(--line-2); }

.switch { position: relative; width: 44px; height: 26px; flex-shrink: 0; display: inline-block; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line-2); transition: background .15s; }
.switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s; }
.switch input:checked + span { background: var(--success); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.toggle-row:last-child { border-bottom: 0; }
.toggle-row > div { display: flex; flex-direction: column; }
.toggle-row strong { font-size: 15px; font-weight: 600; }
.toggle-row span { font-size: 13px; color: var(--muted); }

.form-section { display: flex; flex-direction: column; gap: 14px; }
.form-section + .form-section { border-top: 1px solid var(--line); padding-top: 18px; }
.form-section h3 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.field-help { font-size: 13px; color: var(--muted); }
.input-suffix { position: relative; }
.input-suffix input { padding-right: 64px; }
.input-suffix > span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; pointer-events: none; }
.checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
.checklist label { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; cursor: pointer; }
.checklist label:hover { border-color: var(--line-2); }
.checklist input { width: 18px; height: 18px; accent-color: var(--ink); margin: 0; }
.checklist label:has(input:checked) { border-color: var(--ink); background: var(--surface-2); }
.icon-picker { display: grid; grid-template-columns: repeat(auto-fill, 44px); gap: 6px; }
.icon-picker button { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; color: var(--ink-2); }
.icon-picker button.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.panel + .panel { margin-top: 16px; }
.panel h2 { font-size: 17px; margin-bottom: 4px; }
.panel > p { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.panel-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.tier-table { width: 100%; border-collapse: collapse; }
.tier-table th { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); padding: 0 8px 8px 0; }
.tier-table td { padding: 4px 8px 4px 0; }
.tier-table td:last-child { width: 44px; }

.search { position: relative; flex: 1; min-width: 200px; max-width: 320px; }
.search input { padding-left: 40px; min-height: 42px; }
.search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; justify-content: space-between; }

.req-thumb { width: 52px; height: 52px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; color: var(--muted); flex-shrink: 0; }
.req-thumb img { width: 100%; height: 100%; object-fit: cover; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-neu { background: var(--accent-soft); color: var(--accent); }
.status-bearbeitung { background: var(--warn-bg); color: var(--warn); }
.status-erledigt { background: var(--success-bg); color: var(--success); }
.status-select { display: flex; gap: 6px; flex-wrap: wrap; }
.status-select button { border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: 14px; font-weight: 500; }
.status-select button.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.detail-grid { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14px; margin: 0; }
.detail-grid dt { color: var(--muted); }
.detail-grid dd { margin: 0; font-weight: 500; word-break: break-word; }
.detail-grid a { color: var(--ink); }
.detail-file { display: flex; gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.detail-file .req-thumb { width: 96px; height: 96px; }
.detail-file .req-thumb img { object-fit: contain; }
.detail-file > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.detail-file strong { color: var(--ink); font-size: 15px; word-break: break-all; }
.quick-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pre { white-space: pre-wrap; font-size: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin: 0; font-family: inherit; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: 100%; max-width: 380px; padding: 32px; text-align: center; }
.login-card img { width: 52px; height: 52px; margin: 0 auto 16px; }
.login-card h1 { font-size: 22px; margin-bottom: 6px; }
.login-card p { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.login-card form { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.login-card .field-error { text-align: center; }
.login-card .back { display: inline-block; margin-top: 18px; font-size: 14px; color: var(--muted); }
.banner { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 14px; flex-wrap: wrap; }
.banner > span:not(.icon) { flex: 1; min-width: 200px; }
.banner-warn { background: var(--warn-bg); color: var(--warn); }
.banner-danger { background: var(--danger-bg); color: var(--danger); }
.banner-info { background: var(--info-bg); color: var(--ink-2); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat span { font-size: 13px; color: var(--muted); }
.stat strong { display: block; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.color-row { display: flex; gap: 10px; align-items: center; }
.color-row input[type=color] { width: 52px; height: 46px; padding: 3px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface); }

/* ================================================================== */
/*  Handy & Tablet                                                    */
/* ================================================================== */
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .col-side { position: static; }
  .page-configure .col-side .price-card > .btn { display: none; }
  .page-configure .mobile-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(0, 0, 0, .06); }
  .mobile-bar-price { display: flex; flex-direction: column; line-height: 1.2; }
  .mobile-bar-price strong { font-size: 22px; font-variant-numeric: tabular-nums; }
  .mobile-bar-price span { font-size: 12px; color: var(--muted); }
  .mobile-bar .btn { min-height: 48px; padding: 10px 22px; }
  .admin { grid-template-columns: 1fr; background: var(--bg); }
  .admin-nav { position: sticky; top: 59px; height: auto; flex-direction: row; overflow-x: auto; padding: 8px; border-right: 0; border-bottom: 1px solid var(--line); z-index: 20; scrollbar-width: none; }
  .admin-nav button { width: auto; white-space: nowrap; padding: 8px 12px; font-size: 14px; }
  .admin-nav .nav-sep, .admin-nav .nav-foot { display: none; }
  .admin-main { padding: 20px 16px 80px; }
}
@media (max-width: 640px) {
  .shell { padding: 16px 16px 120px; }
  .topbar-inner { padding: 10px 16px; }
  .brand-text span { display: none; }
  .topbar-phone span { display: none; }
  .topbar-phone { padding: 8px; }
  .stepper-label { display: none; }
  .stepper-item.is-current .stepper-label { display: inline; }
  .sec { padding: 18px 16px 20px; }
  .product-grid { grid-template-columns: 1fr; gap: 8px; }
  .product-card { padding: 12px 14px; }
  .product-icon { width: 42px; height: 42px; }
  .size-inputs { grid-template-columns: 1fr auto 1fr; }
  .size-inputs .segmented { grid-column: 1 / -1; }
  .size-inputs .segmented button { flex: 1; }
  .size-preview { gap: 12px; }
  .form-grid, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .option { padding: 12px 14px; gap: 12px; }
  .done { padding: 28px 18px; }
  .row { padding: 10px 12px; gap: 10px; }
  .row-icon { display: none; }
  .drawer-body { padding: 16px; }
  .step-head-row .product-icon { display: none; }
  .topbar-actions .btn-label { display: none; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { .topbar, .stepper, .mobile-bar, .btn { display: none !important; } body { background: #fff; } }
