@font-face { font-family: 'Caveat Brush'; font-style: normal; font-weight: 400; font-display: swap; src: url("../assets/fonts/caveat-brush-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Caveat Brush'; font-style: normal; font-weight: 400; font-display: swap; src: url("../assets/fonts/caveat-brush-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../assets/fonts/figtree-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../assets/fonts/figtree-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Admin-Bereich: ruhig und übersichtlich, die Marke kommt über Logo, Rosé-Akzente und Grün. Diagrammfarben im Skript geprüft (dataviz). */
:root {
  color-scheme: light;
  --ink: #1f2a24; --muted: #5c6b63; --leise: #7b877f; --marke: #1e5b45; --marke-dunkel: #123d2e;
  --hell: #fcecf2; --akzent: #f7a8c6; --liebe: #c9215f; --linie: #eee4e8; --raster: #efeaec; --flaeche: #ffffff; --seite: #fbf7f8;
  --s1: #d0266a; --s2: #1baf7a; --s3: #6250d6; --s4: #eda100;
  --gut: #006300; --stop: #a3163f; --warn: #8a5a00;
  --text: 'Figtree', 'Segoe UI', Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--seite); color: var(--ink); font: 400 15.5px/1.5 var(--text); }
h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 700; }
h1 { font-size: 1.65rem; } h2 { font-size: 1.1rem; } h3 { font-size: .98rem; }
p { margin: 0; }
a { color: var(--marke-dunkel); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--liebe); outline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }

/* Anmeldung */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--hell); }
.login form { background: #fff; border-radius: 18px; padding: 30px 26px; width: 100%; max-width: 380px; display: grid; gap: 14px; text-align: center; }
.login .logo-svg { height: 62px; width: auto; margin: 0 auto; display: block; }

/* Gerüst */
.geruest { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: 100vh; }
.seitenleiste { background: #fff; border-right: 1px solid var(--linie); padding: 18px 12px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.seitenleiste .logo-svg { height: 46px; width: auto; display: block; margin: 0 8px; }
.menue { display: grid; gap: 2px; }
.menue a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 9px; text-decoration: none; color: var(--ink); font-weight: 500; white-space: nowrap; }
.menue a:hover { background: var(--seite); }
.menue a[aria-current] { background: var(--hell); color: #9c1649; font-weight: 700; }
.zaehler { background: var(--liebe); color: #fff; border-radius: 999px; font-size: .74rem; font-weight: 700; padding: 0 7px; line-height: 1.5; }
.leiste-unten { margin-top: auto; display: grid; gap: 6px; padding: 0 4px; }
.inhalt { padding: 22px clamp(16px, 3vw, 34px) 60px; min-width: 0; }
.demo-band { background: #fff3d6; color: #5d4300; border: 1px solid #f1dca4; border-radius: 10px; padding: 9px 14px; margin-bottom: 18px; font-size: .92rem; }
.seiten-kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.seiten-kopf p { color: var(--muted); }
.reihe { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Knöpfe und Felder */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--marke); color: #fff; border: 1px solid var(--marke); border-radius: 999px; padding: 8px 16px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--marke-dunkel); }
.btn-hell { background: #fff; color: var(--marke-dunkel); border-color: #cfd8d3; }
.btn-hell:hover { background: var(--seite); }
.btn-stop { background: #fff; color: var(--stop); border-color: #e6bcc8; }
.btn-klein { padding: 4px 11px; font-size: .88rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.feld { display: grid; gap: 4px; min-width: 0; }
.feld label, .feld > span { font-size: .84rem; font-weight: 600; color: var(--muted); }
input[type=text], input[type=search], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=password], input[type=time], select, textarea {
  width: 100%; min-width: 0; background: #fff; border: 1px solid #d8d4d6; border-radius: 9px; padding: 8px 10px; }
textarea { resize: vertical; }
.filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin-bottom: 14px; }
.filter .feld { flex: 0 1 170px; }
.filter .suche { flex: 1 1 220px; }
.zeitwahl { display: flex; flex-wrap: wrap; gap: 4px; background: #fff; border: 1px solid var(--linie); padding: 3px; border-radius: 999px; }
.zeitwahl button { border: 0; background: none; padding: 5px 12px; border-radius: 999px; cursor: pointer; font-size: .9rem; color: var(--muted); font-weight: 500; }
.zeitwahl button[aria-pressed=true] { background: var(--hell); color: #9c1649; font-weight: 700; }
.zweier { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.breit { grid-column: 1 / -1; }

/* Karten und Kennzahlen */
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 14px; padding: 16px 18px; min-width: 0; }
.karte > h2 { margin-bottom: 2px; }
.karte-text { color: var(--muted); font-size: .9rem; margin-bottom: 12px; }
.raster { display: grid; gap: 14px; }
.r2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.r3-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 14px; }
.kpi { background: #fff; border: 1px solid var(--linie); border-radius: 14px; padding: 14px 16px; }
.kpi-name { font-size: .88rem; color: var(--muted); }
.kpi-wert { font-size: 1.7rem; font-weight: 700; line-height: 1.25; }
.kpi-delta { font-size: .85rem; color: var(--muted); }
.hoch { color: var(--gut); font-weight: 600; } .runter { color: var(--stop); font-weight: 600; }
.hero { grid-column: span 2; }
.hero .kpi-wert { font-size: clamp(2.4rem, 5vw, 3.2rem); letter-spacing: -.01em; }
.abstand { margin-top: 14px; }

/* Listen */
.tabelle-huelle { overflow-x: auto; margin-inline: -4px; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th { text-align: left; font-size: .8rem; font-weight: 600; color: var(--muted); padding: 7px 10px; border-bottom: 1px solid var(--linie); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid #f6f0f2; vertical-align: top; }
td.zahl, th.zahl { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.klick { cursor: pointer; }
tr.klick:hover td { background: var(--seite); }
.klein { font-size: .84rem; color: var(--muted); }
.fett { font-weight: 600; }
.chip { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: #f1eff0; color: #4d5650; white-space: nowrap; }
.chip-neu { background: var(--hell); color: #9c1649; }
.chip-gut { background: #e4f3ea; color: #145c33; }
.chip-warn { background: #fdf1d3; color: #6f4a00; }
.chip-stop { background: #fbe5ea; color: #8c1230; }
.chip-blau { background: #eae7fb; color: #40329f; }
.seiten { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.aufgaben { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.aufgaben a { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 9px; background: var(--seite); text-decoration: none; color: var(--ink); }
.aufgaben a:hover { background: var(--hell); }
.aufgaben .zeichen { flex: none; font-weight: 700; }
.leer { color: var(--muted); padding: 10px 0; }

/* Diagramme */
.diagramm { position: relative; width: 100%; }
.diagramm svg { display: block; width: 100%; height: auto; overflow: visible; }
.diagramm text { font: 400 12px var(--text); fill: var(--leise); font-variant-numeric: tabular-nums; }
.diagramm .treffer { fill: transparent; cursor: default; }
.diagramm .treffer:hover, .diagramm .treffer:focus { fill: rgba(31, 42, 36, .04); outline: none; }
.legende { display: flex; flex-wrap: wrap; gap: 14px; font-size: .86rem; color: var(--muted); margin-bottom: 6px; }
.legende i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.tipp { position: fixed; z-index: 90; background: var(--ink); color: #fff; padding: 7px 10px; border-radius: 8px; font-size: .84rem; pointer-events: none; max-width: 240px; line-height: 1.4; }
.tipp i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }
.karte-kopf { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.ansicht { background: none; border: 0; color: var(--muted); font-size: .84rem; cursor: pointer; text-decoration: underline; padding: 2px; white-space: nowrap; }
.balken { display: grid; gap: 7px; }
.balken-zeile { display: grid; grid-template-columns: minmax(90px, 38%) minmax(0, 1fr); gap: 10px; align-items: center; font-size: .9rem; }
.balken-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.balken-spur { display: flex; align-items: center; gap: 7px; min-width: 0; }
.balken-mark { height: 14px; background: var(--s1); border-radius: 0 4px 4px 0; min-width: 2px; flex: none; }
.balken-wert { font-size: .84rem; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Firmen-Tafel */
.tafel { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.spalte { background: var(--seite); border-radius: 11px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.spalte-kopf { display: flex; justify-content: space-between; font-weight: 700; font-size: .9rem; }
.fkarte { background: #fff; border: 1px solid var(--linie); border-radius: 9px; padding: 8px 10px; display: grid; gap: 4px; }
.fkarte button.name { all: unset; cursor: pointer; font-weight: 600; font-size: .9rem; overflow-wrap: anywhere; }
.fkarte button.name:hover { text-decoration: underline; }
.fkarte button.name:focus-visible { outline: 3px solid var(--liebe); }
.fkarte select { padding: 3px 6px; font-size: .82rem; }

/* Küchenplan */
.tag-karte + .tag-karte { margin-top: 14px; }
.mengen { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 18px; }
.mengen li { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dotted #e4dade; padding: 2px 0; }
.ruhetag { color: var(--warn); font-weight: 600; }

/* Gutschein-Ideen */
.ideen { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.idee { background: #fff; border: 1px solid var(--linie); border-radius: 13px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.idee h3 { font-size: 1rem; }
.idee .wert { color: #9c1649; font-weight: 700; font-size: .95rem; }
.idee p { font-size: .9rem; color: var(--muted); }
.idee .btn { margin-top: auto; align-self: flex-start; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--linie); margin-bottom: 14px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 8px 14px; cursor: pointer; font-weight: 500; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs button[aria-selected=true] { color: #9c1649; border-color: var(--liebe); font-weight: 700; }

/* Dialoge */
dialog { border: 0; border-radius: 16px; padding: 0; width: min(760px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); color: var(--ink); }
dialog::backdrop { background: rgba(18, 30, 25, .45); }
.dlg-kopf { position: sticky; top: 0; background: #fff; display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--linie); z-index: 2; }
.dlg-rumpf { padding: 16px 18px; display: grid; gap: 14px; }
.dlg-fuss { position: sticky; bottom: 0; background: #fff; padding: 12px 18px; border-top: 1px solid var(--linie); display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.zu { border: 0; background: none; font-size: 1.3rem; cursor: pointer; line-height: 1; padding: 4px 8px; color: var(--muted); }
.fakten { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 14px; }
.fakten div span { display: block; font-size: .8rem; color: var(--muted); }
.vorschau { width: 100%; height: 520px; border: 1px solid var(--linie); border-radius: 10px; background: #fcecf2; }
.angebot-feld { border: 1px solid var(--linie); border-radius: 10px; padding: 10px 12px; display: grid; gap: 8px; }
.produktwahl { display: grid; gap: 4px; max-height: 300px; overflow-y: auto; border: 1px solid var(--linie); border-radius: 10px; padding: 8px 10px; }
.produktwahl label { display: grid; grid-template-columns: minmax(0, 1fr) auto 72px; gap: 8px; align-items: center; font-size: .9rem; }
.summe-zeile { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.05rem; }
.treffer-liste { display: grid; gap: 2px; margin-top: 4px; }
.treffer-liste button { all: unset; cursor: pointer; padding: 5px 9px; border-radius: 7px; font-size: .9rem; }
.treffer-liste button:hover, .treffer-liste button:focus-visible { background: var(--hell); }
.hinweis { background: var(--seite); border-radius: 10px; padding: 10px 12px; font-size: .92rem; }
.hinweis-warn { background: #fff3d6; color: #5d4300; }
.schalter { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; font-weight: 600; }
.schalter input { width: 18px; height: 18px; accent-color: var(--marke); }

.meldung { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 120; max-width: calc(100vw - 32px); font-size: .94rem; }
.meldung.stop { background: var(--stop); }

/* Gutschein zum Drucken */
.gkarte { width: 148mm; max-width: 100%; aspect-ratio: 148 / 105; background: var(--hell); border-radius: 12px; padding: 7mm; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5mm; position: relative; color: var(--marke-dunkel); overflow: hidden; }
.gkarte .logo-svg { height: 15mm; width: auto; display: block; }
.gkarte .gtitel { font-family: 'Caveat Brush', var(--text); font-size: 34px; line-height: 1.05; margin-top: 3mm; color: var(--liebe); }
.gkarte .gwert { font-size: 26px; font-weight: 700; margin-top: 1mm; }
.gkarte .gtext { font-size: 12px; margin-top: 2mm; color: var(--ink); line-height: 1.35; }
.gkarte .gcode { font-size: 13px; font-weight: 700; letter-spacing: .08em; margin-top: 2mm; }
.gkarte .gqr { align-self: end; background: #fff; padding: 2mm; border-radius: 6px; }
.gkarte .gqr img, .gkarte .gqr canvas { width: 24mm !important; height: 24mm !important; display: block; }

@media (max-width: 1100px) { .r2, .r3-1 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 820px) {
  .geruest { grid-template-columns: minmax(0, 1fr); }
  .seitenleiste { position: sticky; top: 0; z-index: 30; height: auto; flex-direction: row; align-items: center; padding: 8px 10px; border-right: 0; border-bottom: 1px solid var(--linie); gap: 8px; overflow: hidden; }
  .seitenleiste .logo-svg { height: 34px; margin: 0; flex: none; }
  .menue { display: flex; overflow-x: auto; flex: 1 1 auto; min-width: 0; gap: 2px; scrollbar-width: none; }
  .menue a { padding: 7px 10px; font-size: .92rem; }
  .leiste-unten { display: none; }
  .inhalt { padding: 14px 16px 50px; }
  .hero { grid-column: 1 / -1; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .zweier { grid-template-columns: minmax(0, 1fr); }
  .balken-zeile { grid-template-columns: minmax(70px, 34%) minmax(0, 1fr); }
}
@media print {
  body { background: #fff; }
  .seitenleiste, .demo-band, .kein-druck, .meldung, dialog::backdrop { display: none !important; }
  .geruest { display: block; }
  .inhalt { padding: 0; }
  .karte { border: 1px solid #ccc; break-inside: avoid; }
  body.druck-gutschein .geruest { display: none; }
  body.druck-gutschein dialog { display: block; position: static; width: auto; max-height: none; box-shadow: none; }
  body.druck-gutschein .dlg-kopf, body.druck-gutschein .dlg-fuss, body.druck-gutschein .kein-druck { display: none !important; }
  .gkarte { -webkit-print-color-adjust: exact; print-color-adjust: exact; border: 1px dashed #bbb; }
}

td select { min-width: 132px; }
@media (max-width: 820px) {
  .zeitwahl { flex-wrap: nowrap; width: 100%; justify-content: space-between; }
  .zeitwahl button { padding: 5px 8px; font-size: .84rem; white-space: nowrap; }
  .balken-name { white-space: normal; overflow: visible; line-height: 1.25; }
}
