/* Fundus – Komponenten. Farben als Tokens, das Theme kann sie überschreiben. */
:root {
  --fu-bg: #F2F3F6; --fu-surface: #FFFFFF; --fu-ink: #191B26; --fu-muted: #5B5F70; --fu-line: #D9DBE3;
  --fu-accent: #6B1E4E; --fu-on-accent: #FFFFFF; --fu-accent-soft: #F2E4EC;
  --fu-tag: #F2C14E; --fu-tag-ink: #3A2A00;
  --fu-ok: #1E7A4C; --fu-ok-soft: #E1F2E8; --fu-warn: #9A5B00; --fu-warn-soft: #FBEED6; --fu-bad: #B3261E; --fu-bad-soft: #F9E1DF;
  --fu-sw-l: 87%; --fu-sw-g: 34%;
  --fu-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --fu-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --fu-r: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fu-bg: #111219; --fu-surface: #1A1C26; --fu-ink: #ECEDF3; --fu-muted: #A2A6B7; --fu-line: #2D3040;
    --fu-accent: #DA86BA; --fu-on-accent: #22101B; --fu-accent-soft: #3A2232;
    --fu-tag: #E6B84A; --fu-tag-ink: #2A1E00;
    --fu-ok: #62C792; --fu-ok-soft: #173326; --fu-warn: #E3A647; --fu-warn-soft: #3A2A10; --fu-bad: #F27D74; --fu-bad-soft: #3D1A18;
    --fu-sw-l: 22%; --fu-sw-g: 74%;
  }
}

.fundus { color: var(--fu-ink); }
.fundus *, .fundus *::before, .fundus *::after { box-sizing: border-box; }
.fundus a { color: inherit; }
.fundus h2, .fundus h3, .fundus h4 { font-family: var(--fu-display); margin: 0; line-height: 1.2; }
.fundus h3 { font-size: 1.15rem; }
.fundus-narrow { max-width: 640px; margin-inline: auto; }
.fundus-muted { color: var(--fu-muted); }
.fundus-mono { font-family: var(--fu-mono); font-variant-numeric: tabular-nums; font-size: .92em; }
.fundus-eyebrow { font-family: var(--fu-mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--fu-muted); }
.fundus-lead { font-size: 1.15rem; margin: 0 0 1rem; }
.fundus-help { font-size: .85rem; color: var(--fu-muted); margin: 0; }
.fundus-unit { font-weight: 400; color: var(--fu-muted); }
.fundus-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Hinweise und Pillen */
.fundus-notice { border-radius: 8px; padding: .75rem 1rem; margin: 0 0 1rem; font-size: .95rem; }
.fundus-notice--ok { background: var(--fu-ok-soft); color: var(--fu-ok); }
.fundus-notice--warn { background: var(--fu-warn-soft); color: var(--fu-warn); }
.fundus-notice--bad { background: var(--fu-bad-soft); color: var(--fu-bad); }
.fundus-notice--info { background: var(--fu-accent-soft); color: var(--fu-ink); }
.fundus-notice a { color: inherit; font-weight: 600; }
.fundus-pill { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: .75rem; font-weight: 600; white-space: nowrap; line-height: 1.6; }
.fundus-pill--ok { background: var(--fu-ok-soft); color: var(--fu-ok); }
.fundus-pill--warn { background: var(--fu-warn-soft); color: var(--fu-warn); }
.fundus-pill--bad { background: var(--fu-bad-soft); color: var(--fu-bad); }
.fundus-pill--info { background: var(--fu-accent-soft); color: var(--fu-accent); }
.fundus-count { display: inline-grid; place-items: center; min-width: 1.4em; height: 1.4em; border-radius: 999px; background: var(--fu-accent); color: var(--fu-on-accent); font-size: .72rem; padding: 0 .35em; }

/* Knöpfe */
.fundus-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border: 1px solid var(--fu-line); background: var(--fu-surface); color: var(--fu-ink); border-radius: 8px; padding: .55rem 1rem; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; line-height: 1.3; }
.fundus-btn:hover { border-color: var(--fu-muted); }
.fundus-btn--primary { background: var(--fu-accent); border-color: var(--fu-accent); color: var(--fu-on-accent); }
.fundus-btn--primary:hover { filter: brightness(1.08); border-color: var(--fu-accent); }
.fundus-btn--ghost { background: transparent; }
.fundus-btn--small { padding: .3rem .7rem; font-size: .85rem; }
.fundus-btn--block { width: 100%; }
.fundus a.fundus-btn--primary { color: var(--fu-on-accent); }
.fundus-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.fundus :focus-visible { outline: 2px solid var(--fu-accent); outline-offset: 2px; }

/* Formulare */
.fundus-form { display: grid; gap: 1.25rem; }
.fundus-panel { background: var(--fu-surface); border: 1px solid var(--fu-line); border-radius: var(--fu-r); padding: 1.25rem; display: grid; gap: 1rem; }
.fundus-panel--flat { background: transparent; padding: 1rem; }
.fundus-panel p { margin: 0; }
.fundus-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.fundus-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
.fundus-field { display: grid; gap: .35rem; font-size: .85rem; font-weight: 600; min-width: 0; }
.fundus-field input, .fundus-field select, .fundus-field textarea,
.fundus-login input[type=text], .fundus-login input[type=password] {
  width: 100%; border: 1px solid var(--fu-line); background: var(--fu-surface); color: var(--fu-ink);
  border-radius: 8px; padding: .55rem .75rem; font: inherit; font-weight: 400; font-size: 1rem; max-width: 100%;
}
.fundus-field textarea { resize: vertical; min-height: 6rem; }
.fundus-check { display: flex; align-items: center; gap: .5rem; font-size: .92rem; font-weight: 400; }
.fundus-fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: .35rem; }
.fundus-fieldset legend { font-size: .85rem; font-weight: 600; margin-bottom: .35rem; padding: 0; }
.fundus-login form { display: grid; gap: .75rem; }
.fundus-login p { margin: 0; display: grid; gap: .35rem; font-size: .9rem; }
.fundus-login .login-remember { display: block; }
.fundus-login #wp-submit { background: var(--fu-accent); color: var(--fu-on-accent); border: 0; border-radius: 8px; padding: .6rem 1.2rem; font: inherit; font-weight: 600; cursor: pointer; }
.fundus-drop { display: grid; gap: .5rem; border: 2px dashed var(--fu-line); border-radius: var(--fu-r); padding: 1rem; font-size: .9rem; color: var(--fu-muted); cursor: pointer; }
.fundus-drop input { font-size: .9rem; color: var(--fu-ink); max-width: 100%; }
.fundus-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: .5rem; }
.fundus-thumb { display: grid; gap: .25rem; border: 0; padding: 0; background: none; cursor: pointer; }
.fundus-thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; display: block; }
.fundus-typechoice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.fundus-typecard { display: grid; gap: .4rem; background: var(--fu-surface); border: 1px solid var(--fu-line); border-radius: var(--fu-r); padding: 1rem; text-decoration: none; }
.fundus-typecard:hover { border-color: var(--fu-accent); }
.fundus-typecard b { font-family: var(--fu-display); font-size: 1.2rem; }
.fundus-typecard > span:last-child { color: var(--fu-muted); font-size: .92rem; }
.fundus-sketch { width: 100%; max-width: 420px; color: var(--fu-muted); }

/* Karten */
.fundus-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.fundus-grid--small { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.fundus-card { display: flex; flex-direction: column; background: var(--fu-surface); border: 1px solid var(--fu-line); border-radius: var(--fu-r); overflow: hidden; text-decoration: none; color: var(--fu-ink); }
.fundus-card:hover { border-color: var(--fu-accent); }
.fundus-swatch { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; max-width: 100%; overflow: hidden; background: hsl(var(--h, 300) 32% var(--fu-sw-l)); color: hsl(var(--h, 300) 45% var(--fu-sw-g)); }
.fundus-swatch > svg { width: 50%; height: auto; }
.fundus-swatch > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fundus-inv { position: absolute; left: 10px; top: 10px; background: var(--fu-tag); color: var(--fu-tag-ink); font-family: var(--fu-mono); font-size: .72rem; padding: 2px 8px 2px 14px; border-radius: 3px; clip-path: polygon(8px 0, 100% 0, 100% 100%, 8px 100%, 0 50%); }
.fundus-offer { position: absolute; right: 10px; top: 10px; }
.fundus-card-body { display: flex; flex-direction: column; gap: .3rem; padding: .8rem .9rem .9rem; flex: 1; }
.fundus-card-type { font-family: var(--fu-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--fu-muted); }
.fundus-card-title { font-family: var(--fu-display); font-weight: 700; font-size: 1.05rem; line-height: 1.2; }
.fundus-meta { font-size: .83rem; color: var(--fu-muted); }
.fundus-price { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: auto; padding-top: .55rem; border-top: 1px dashed var(--fu-line); font-size: .9rem; }
.fundus-price b { font-family: var(--fu-mono); font-weight: 500; }
.fundus-cond { display: inline-flex; gap: 3px; vertical-align: middle; }
.fundus-cond i { width: 12px; height: 7px; border-radius: 2px; background: var(--fu-line); }
.fundus-cond i.on { background: var(--fu-ok); }
.fundus-empty { border: 1px dashed var(--fu-line); border-radius: var(--fu-r); padding: 2rem; text-align: center; color: var(--fu-muted); }

/* Katalog */
.fundus-catalog { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.fundus-filters { background: var(--fu-surface); border: 1px solid var(--fu-line); border-radius: var(--fu-r); padding: 1.1rem; display: grid; gap: 1rem; }
.fundus-stage { border-top: 1px solid var(--fu-line); padding-top: .9rem; display: grid; gap: .75rem; }
.fundus-stage[open] { display: grid; }
.fundus-stage summary { cursor: pointer; font-weight: 700; font-family: var(--fu-display); }
.fundus-stage > * + * { margin-top: .6rem; }
.fundus-results-bar { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .9rem; }
.fundus-sort select { width: auto; border: 1px solid var(--fu-line); border-radius: 8px; padding: .35rem .6rem; background: var(--fu-surface); color: var(--fu-ink); font: inherit; }
.fundus-pager { display: flex; gap: .35rem; margin-top: 1.25rem; flex-wrap: wrap; }
.fundus-pager a { min-width: 2.2rem; text-align: center; padding: .35rem .6rem; border: 1px solid var(--fu-line); border-radius: 6px; text-decoration: none; }
.fundus-pager a[aria-current] { background: var(--fu-ink); color: var(--fu-bg); border-color: var(--fu-ink); }

/* Detail */
.fundus-detail-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1.75rem; align-items: start; }
.fundus-detail-main { display: grid; gap: 1.1rem; min-width: 0; }
.fundus-gallery { display: grid; gap: .5rem; }
.fundus-gallery-main { position: relative; border-radius: var(--fu-r); overflow: hidden; aspect-ratio: 16 / 10; }
.fundus-gallery-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fundus-gallery .fundus-thumbs { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
.fundus-desc > *:first-child { margin-top: 0; }
.fundus-specs { width: 100%; border-collapse: collapse; font-size: .92rem; }
.fundus-specs th, .fundus-specs td { text-align: left; padding: .5rem 0; border-bottom: 1px solid var(--fu-line); vertical-align: top; }
.fundus-specs th { font-weight: 500; color: var(--fu-muted); width: 45%; padding-right: 1rem; }
.fundus-specs td { font-family: var(--fu-mono); font-variant-numeric: tabular-nums; }
.fundus-fitbox { border-radius: var(--fu-r); padding: .9rem 1rem; border: 1px solid var(--fu-line); display: grid; gap: .4rem; }
.fundus-fitbox ul, .fundus-fitbox p { margin: 0; padding-left: 1.1rem; font-size: .92rem; }
.fundus-fitbox p { padding-left: 0; }
.fundus-fitbox--passt { background: var(--fu-ok-soft); }
.fundus-fitbox--knapp { background: var(--fu-warn-soft); }
.fundus-fitbox--zu_gross { background: var(--fu-bad-soft); }
.fundus-fitbox--anpassbar { background: var(--fu-accent-soft); }
.fundus-bookbox { background: var(--fu-surface); border: 1px solid var(--fu-line); border-radius: var(--fu-r); padding: 1.25rem; display: grid; gap: 1rem; position: sticky; top: 90px; }
.fundus-prices { display: grid; gap: .2rem; }
.fundus-big { font-family: var(--fu-mono); font-size: 1.5rem; font-weight: 500; }
.fundus-busy ul { margin: .3rem 0 0; padding-left: 1.1rem; font-size: .9rem; }
.fundus-seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--fu-line); border-radius: 8px; overflow: hidden; }
.fundus-seg label { position: relative; text-align: center; cursor: pointer; }
.fundus-seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.fundus-seg span { display: block; padding: .5rem; font-weight: 600; }
.fundus-seg input:checked + span { background: var(--fu-ink); color: var(--fu-bg); }
.fundus-seg input:focus-visible + span { outline: 2px solid var(--fu-accent); outline-offset: -2px; }
.fundus-request { gap: .9rem; }
.fundus-estimate:empty { display: none; }
.fundus-provider { display: flex; gap: .75rem; align-items: center; border-top: 1px solid var(--fu-line); padding-top: .9rem; font-size: .92rem; }
.fundus-avatar { flex: none; width: 40px; height: 40px; border-radius: 8px; background: var(--fu-accent-soft); color: var(--fu-accent); display: grid; place-items: center; font-weight: 700; font-family: var(--fu-display); }

/* Mitgliederbereich */
.fundus-dash { display: grid; gap: 1.25rem; }
.fundus-dash-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; }
.fundus-dash-head h2 { font-size: 1.8rem; margin-top: .2rem; }
.fundus-tabs { display: flex; gap: .25rem; flex-wrap: wrap; border-bottom: 1px solid var(--fu-line); }
.fundus-tabs a { padding: .55rem .9rem; text-decoration: none; color: var(--fu-muted); border-bottom: 3px solid transparent; margin-bottom: -1px; font-weight: 500; }
.fundus-tabs a[aria-current] { color: var(--fu-ink); border-color: var(--fu-accent); }
.fundus-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.fundus-kpi { background: var(--fu-surface); border: 1px solid var(--fu-line); border-radius: var(--fu-r); padding: 1rem; display: grid; gap: .1rem; text-decoration: none; }
.fundus-kpi:hover { border-color: var(--fu-accent); }
.fundus-kpi b { font-family: var(--fu-display); font-size: 2rem; font-variant-numeric: tabular-nums; }
.fundus-kpi span { font-size: .85rem; color: var(--fu-muted); }
.fundus-table-wrap { overflow-x: auto; background: var(--fu-surface); border: 1px solid var(--fu-line); border-radius: var(--fu-r); }
.fundus-table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 620px; }
.fundus-table th { text-align: left; font-size: .75rem; font-weight: 600; color: var(--fu-muted); padding: .6rem .8rem; border-bottom: 1px solid var(--fu-line); }
.fundus-table td { padding: .7rem .8rem; border-bottom: 1px solid var(--fu-line); vertical-align: middle; }
.fundus-table tr:last-child td { border-bottom: 0; }
.fundus-table .num { text-align: right; font-family: var(--fu-mono); }
.fundus-row-actions { text-align: right; white-space: nowrap; }
.fundus-requests { display: grid; gap: .75rem; }
.fundus-request-item { background: var(--fu-surface); border: 1px solid var(--fu-line); border-radius: var(--fu-r); padding: 1rem; display: grid; gap: .55rem; }
.fundus-request-top { display: flex; justify-content: space-between; gap: .75rem; flex-wrap: wrap; align-items: start; }
.fundus-request-item blockquote { margin: 0; padding-left: .8rem; border-left: 3px solid var(--fu-line); font-size: .95rem; }
.fundus-request-item p { margin: 0; }
.fundus-request-actions { display: grid; gap: .6rem; }
.fundus-contact { background: var(--fu-ok-soft); border-radius: 8px; padding: .6rem .8rem; font-size: .92rem; }

/* Backend */
.fundus-admin h4 { margin: 1rem 0 .5rem; }

@media (max-width: 900px) {
  .fundus-catalog, .fundus-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .fundus-bookbox { position: static; }
  .fundus-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fundus-grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .fundus-grid2, .fundus-grid3, .fundus-typechoice { grid-template-columns: minmax(0, 1fr); }
}
