/*
 * static/gastro.css – Grundgestalt des Gastro Hubs (Haut „bsc“: Kaffee auf Creme).
 *
 * Farben nur über Token. Die Namen sind die des Office und der anderen Hubs (--primary, --surface,
 * --text-dim …), damit static/hub-dialog.js und static/hub-wache.js ohne eigene Styles passen. Eine
 * Haut (static/haut/<key>.css) überschreibt nur Token und Glas – nie hartes Braun in neue Regeln.
 *
 * Sprache wie im Hub, nicht wie eine Vorlage: Haarlinien statt Kästchenwand, ein Akzent, Zahl und
 * Wort nebeneinander. Touchflächen ≥ 44 px. Tabs linksbündig.
 */
:root, html[data-theme="light"] {
  --bg: #f5f1ea; --bg2: #ece5d9;
  --surface: #ffffff; --surface2: #f3eee6; --hover: rgba(138, 90, 59, .07);
  --border: #ddd3c4; --text: #2a241e; --text-dim: #7a6f62;
  --primary: #8a5a3b; --primary-h: #74492e; --on-primary: #ffffff;
  --success: #2f7d4f; --warning: #a8741a; --danger: #b23b30;
  --shadow: rgba(60, 40, 20, .12);
  --radius: 10px;
}
html[data-theme="dark"] {
  --bg: #1b1714; --bg2: #231e1a;
  --surface: #26201b; --surface2: #2e2722; --hover: rgba(214, 167, 125, .08);
  --border: #3f362e; --text: #ece4da; --text-dim: #a3968a;
  --primary: #d6a77d; --primary-h: #e2b994; --on-primary: #1b1714;
  --success: #6cc08d; --warning: #d9a548; --danger: #e07a6e;
  --shadow: rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ── Knöpfe und Felder ─────────────────────────────────────────────── */
.knopf {
  min-height: 44px; padding: 0 18px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.knopf:hover { background: var(--hover); }
.knopf.haupt { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.knopf.haupt:hover { background: var(--primary-h); }
.knopf:disabled { opacity: .6; cursor: default; }
.feld { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-dim); }
.feld input, .feld textarea, .feld select {
  min-height: 44px; padding: 10px 12px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 15px;
}
.feld textarea { min-height: 96px; resize: vertical; }
.feld input:focus, .feld textarea:focus { outline: 2px solid color-mix(in srgb, var(--primary) 45%, transparent); border-color: var(--primary); }
.fehler { color: var(--danger); font-size: 13px; min-height: 18px; }
.laedt::before {
  content: ""; width: 14px; height: 14px; border-radius: 50%; display: inline-block; vertical-align: -2px;
  border: 2px solid color-mix(in srgb, currentColor 30%, transparent); border-top-color: currentColor;
  animation: dreh .8s linear infinite; margin-right: 8px;
}
@keyframes dreh { to { transform: rotate(360deg); } }

/* ── Anmeldung ─────────────────────────────────────────────────────── */
.anmeldung { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.anm-blatt {
  width: 380px; max-width: 100%; display: flex; flex-direction: column; gap: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 28px 26px;
  box-shadow: 0 10px 30px var(--shadow);
}
.anm-blatt h1 { margin: 0; font-size: 24px; color: var(--primary); }
.anm-unter { margin: -8px 0 4px; color: var(--text-dim); font-size: 13px; }
.anm-merken { flex-direction: row; align-items: center; gap: 10px; min-height: 44px; color: var(--text); font-size: 14px; }
.anm-merken input { width: 20px; height: 20px; min-height: 0; }
.anm-links { margin: 0; font-size: 13px; color: var(--text-dim); text-align: center; }

/* ── Kopf ──────────────────────────────────────────────────────────── */
.kopf {
  position: sticky; top: 0; z-index: 50; height: 56px; padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.kopf-marke { display: flex; align-items: center; gap: 10px; min-width: 0; }
.kopf-marke svg { width: 26px; height: 26px; color: var(--primary); flex-shrink: 0; }
.kopf-marke b { font-size: 17px; white-space: nowrap; }
.kopf-ort { color: var(--text-dim); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kopf-rechts { display: flex; align-items: center; gap: 8px; position: relative; }
.kopf-knopf {
  min-height: 40px; min-width: 40px; padding: 0 12px; border-radius: 20px;
  border: 1px solid var(--border); background: var(--surface2); color: var(--text); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.kopf-knopf svg { width: 18px; height: 18px; }
.menue {
  position: absolute; right: 0; top: 48px; min-width: 230px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 28px var(--shadow);
  display: flex; flex-direction: column;
}
.menue > a, .menue > button {
  min-height: 44px; padding: 0 12px; border: 0; background: none; text-align: left; border-radius: 8px;
  display: flex; align-items: center; color: var(--text); text-decoration: none; cursor: pointer;
}
.menue > a:hover, .menue > button:hover { background: var(--hover); }
.menue hr { border: 0; border-top: 1px solid var(--border); margin: 4px 6px; }

/* ── Rumpf: Navigation links, Inhalt rechts (am Handy: Leiste oben) ───────── */
.rumpf { display: flex; min-height: calc(100vh - 56px - 40px); }
.nav {
  width: 220px; flex-shrink: 0; padding: 14px 10px; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 2px;
}
.nav button {
  min-height: 44px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--text);
  text-align: left; cursor: pointer; font-weight: 500;
}
.nav button:hover { background: var(--hover); }
.nav button.an { background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); font-weight: 700; }
.inhalt { flex: 1; min-width: 0; padding: 26px 30px 90px; max-width: 1300px; }
.inhalt:focus { outline: none; }   /* nur programmatischer Fokus nach dem Bereichswechsel */
.inhalt h2 { margin: 0 0 4px; font-size: 22px; }
.inhalt .unter { margin: 0 0 22px; color: var(--text-dim); }
@media (max-width: 760px) {
  .rumpf { flex-direction: column; }
  .nav { width: auto; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); padding: 6px 10px; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav button { white-space: nowrap; }
  .inhalt { padding: 18px 16px 90px; }
  .kopf-ort { display: none; }
}

/* ── Listen mit Haarlinien statt Kästchen ──────────────────────────── */
.liste { margin: 0 0 26px; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.liste > li { display: flex; align-items: baseline; gap: 16px; padding: 12px 2px; border-bottom: 1px solid var(--border); }
.liste .wer { flex: 0 0 210px; font-weight: 600; }
.liste .was { flex: 1; color: var(--text-dim); }
.liste .wann { flex-shrink: 0; color: var(--text-dim); font-size: 13px; }
@media (max-width: 760px) { .liste > li { flex-direction: column; gap: 2px; } .liste .wer { flex: none; } }
.abschnitt { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--text-dim); }
.hinweis-zeile { padding: 12px 14px; border-left: 3px solid var(--primary); background: var(--surface2); border-radius: 0 8px 8px 0; margin: 0 0 22px; }

/* ── Fuß und Versionshinweis ───────────────────────────────────────── */
.fuss { height: 40px; display: flex; align-items: center; justify-content: flex-end; padding: 0 16px; border-top: 1px solid var(--border); }
.fuss-version { min-height: 36px; border: 0; background: none; color: var(--text-dim); cursor: pointer; font-size: 12px; text-decoration: underline; }
.neu-leiste {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 70;
  display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 10px 26px var(--shadow);
}

/* ── Feedback-Widget ───────────────────────────────────────────────── */
.fb-knopf {
  position: fixed; right: 18px; bottom: 54px; z-index: 60; min-height: 44px; padding: 0 18px;
  border-radius: 22px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  box-shadow: 0 6px 18px var(--shadow); cursor: pointer; font-weight: 600;
}
.fb-blatt {
  position: fixed; right: 18px; bottom: 108px; z-index: 61; width: 360px; max-width: calc(100vw - 36px);
  max-height: calc(100vh - 140px); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 16px 40px var(--shadow);
  padding: 18px; display: flex; flex-direction: column; gap: 12px;
}
.fb-blatt h3 { margin: 0; font-size: 16px; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; align-self: flex-start; }
.seg button { min-height: 40px; min-width: 90px; border: 0; background: var(--surface2); color: var(--text-dim); font-weight: 600; cursor: pointer; }
.seg button.an { background: var(--primary); color: var(--on-primary); }
.fb-bilder { font-size: 13px; color: var(--text-dim); }
.fb-fuss { display: flex; justify-content: flex-end; gap: 8px; }
