/* Backend der digitalen Speisekarte */
:root {
  --bg: #F4F4F4;
  --surface: #FFFFFF;
  --ink: #1F1F1F;
  --muted: #5E5E5E;
  --line: #DADADA;
  /* Neutrales Grau: --brand für die Kopfleiste, --accent für Schrift, Links und Knöpfe */
  --brand: #3A3A3A;
  --accent: #4A4A4A;
  --accent-dark: #2B2B2B;
  --accent-light: #EDEDED;
  /* Grün nur noch als Bedeutungsfarbe für „online“ und Erfolgsmeldungen */
  --success: #2E6B45;
  --success-light: #E4F1E8;
  --danger: #9E2F28;
  --danger-light: #F8E9E7;
  --warning-light: #FBF3DC;
  --radius: 6px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; }
/* mit Kopfleiste: html in Leistenfarbe, damit oben beim Über-den-Rand-Scrollen kein Hellgrau aufblitzt */
html.with-bar { background: var(--brand); }
html.with-bar body { background: var(--bg); min-height: 100vh; }
a { color: var(--accent); }
h1 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 .25rem; font-weight: 650; }
h2 { font-size: 1.1rem; margin: 0 0 .75rem; font-weight: 650; }
h3 { font-size: 1rem; margin: 1.25rem 0 .5rem; }
code { font-size: .875em; background: var(--bg); padding: .1em .35em; border-radius: 3px; }
.invisible { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Kopfleiste */
.bar { background: var(--brand); color: #fff; }
.bar-inner { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.75rem; min-height: 3.5rem; }
.bar a, .bar .link { color: #fff; text-decoration: none; }
.brand { font-weight: 700; font-size: 1.05rem; display: flex; align-items: baseline; gap: .6rem; }
.brand span { font-weight: 400; opacity: .8; font-size: .9rem; }
.main-nav { display: flex; gap: 1.25rem; }
.main-nav a { padding: 1rem 0 .85rem; border-bottom: 3px solid transparent; opacity: .85; }
.main-nav a:hover, .main-nav a[aria-current] { opacity: 1; border-bottom-color: #fff; }
.switcher select { background: rgba(0,0,0,.16); color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: var(--radius); padding: .3rem .5rem; font: inherit; }
.link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; }

/* Inhalt */
.content { max-width: 72rem; margin: 0 auto; padding: 1.75rem 1.25rem 4rem; }
.page-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; }
.page-header h1 { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.breadcrumb { margin: 0 0 .35rem; font-size: .875rem; color: var(--muted); }
.muted { color: var(--muted); font-size: .875rem; margin: 0; }
.empty { color: var(--muted); font-style: italic; margin: .5rem 0 1rem; }
.short { max-width: 40rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }

/* Meldungen */
.notice { padding: .7rem 1rem; border-radius: var(--radius); margin: 0 0 1rem; border-left: 4px solid; }
.notice-success { background: var(--success-light); border-color: var(--success); }
.notice-error { background: var(--danger-light); border-color: var(--danger); }
.notice-info { background: var(--warning-light); border-color: #C49A2C; }

/* Knöpfe */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  padding: .5rem .95rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 500;
  text-decoration: none; cursor: pointer; white-space: nowrap; line-height: 1.2;
}
.button:hover { border-color: var(--accent); color: var(--accent); }
.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.button.primary:hover { background: var(--accent-dark); color: #fff; }
.button.danger { color: var(--danger); }
.button.danger:hover { border-color: var(--danger); background: var(--danger-light); }
.button.small { padding: .3rem .6rem; font-size: .8125rem; }
.button.icon { padding: .2rem .45rem; font-size: .875rem; min-width: 1.9rem; }
.button.wide { width: 100%; }
.button-space { display: inline-block; min-width: 1.9rem; }
form.inline { display: inline; margin: 0; }
.button-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: 1rem; }
.page-header .button-bar { margin-top: 0; }
.sort { display: inline-flex; gap: .2rem; }

/* Boxen & Gruppen */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.4rem; margin: 0 0 1.5rem; }
.card.narrow { max-width: 28rem; }
.group { margin-bottom: 2.25rem; }
.group-header { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.group-header h2 { margin: 0 auto 0 0; font-size: 1.2rem; }
.settings-card summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.settings-card[open] summary { margin-bottom: 1rem; }

/* Tabellen */
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table th { text-align: left; font-size: .8125rem; font-weight: 600; color: var(--muted); background: #FAFAFA; padding: .55rem .75rem; border-bottom: 1px solid var(--line); }
.table td { padding: .6rem .75rem; border-bottom: 1px solid #ECECEC; vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions > * { margin-left: .2rem; }
.title-link { font-weight: 600; text-decoration: none; color: var(--ink); }
.title-link:hover { color: var(--accent); text-decoration: underline; }
.items .day { font-weight: 600; white-space: nowrap; width: 1%; }
.items tr.group-start td { border-top: 2px solid var(--line); }
tr.is-hidden td { opacity: .55; }
tr.is-hidden td.actions { opacity: 1; }
.missing { color: #BBBBBB; }

/* Tabellen mit Popups (Bearbeiten, Kategorie-Auswahl …): nicht abschneiden, Ecken stattdessen an den Kopfzellen runden */
.table:has(.floating) { overflow: visible; }
.table:has(.floating) thead th:first-child { border-top-left-radius: var(--radius); }
.table:has(.floating) thead th:last-child { border-top-right-radius: var(--radius); }

/* Produktübersicht: Karten an-/abhaken */
.menu-checks { display: flex; flex-wrap: wrap; gap: .3rem; }
.menu-checks form.inline { display: contents; }
.menu-check { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .55rem .2rem .4rem; border: 1px solid var(--line); border-radius: 1rem;
  background: var(--surface); color: var(--muted); font: inherit; font-size: .8125rem; line-height: 1.3; cursor: pointer; white-space: nowrap; list-style: none; }
.menu-check::-webkit-details-marker { display: none; }
.menu-check::before { content: ""; width: .8rem; height: .8rem; border: 1.5px solid currentColor; border-radius: 3px; box-sizing: border-box; flex: none; }
.menu-check:hover { border-color: var(--accent); color: var(--accent); }
.menu-check.on { background: var(--success-light); border-color: var(--success); color: var(--success); font-weight: 600; }
.menu-check.on::before { background: var(--success) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; border-color: var(--success); }
.menu-check.on:hover { background: var(--danger-light); border-color: var(--danger); color: var(--danger); }
.menu-check.on:hover::before { background-color: var(--danger); border-color: var(--danger); }
.menu-check.on.is-fixed { text-decoration: none; }
.menu-check.on.is-fixed:hover { background: var(--success-light); border-color: var(--accent); color: var(--accent); }
.menu-check.on.is-fixed:hover::before { background-color: var(--success); border-color: var(--success); }
.menu-check.is-disabled { opacity: .5; cursor: default; }
.menu-check-pick .floating { left: 0; right: auto; width: min(18rem, 85vw); }
.menu-check-pick .floating p { margin: 0 0 .5rem; font-size: .8125rem; }
.section-choice { display: flex; flex-wrap: wrap; gap: .3rem; }

.status { display: inline-block; font-size: .75rem; font-weight: 600; padding: .1rem .5rem; border-radius: 1rem; vertical-align: middle; }
.status.on { background: var(--success-light); color: var(--success); }
.status.off { background: #ECECEC; color: var(--muted); }
.status.soon { background: var(--warning-light); color: #7A5C10; }
.status.previous { background: var(--danger-light); color: var(--danger); }
.status.shared { background: #E6EEF7; color: #2D4F73; font-weight: 500; }
.brand-small { font-size: .75rem; color: var(--accent); border: 1px solid currentColor; border-radius: 1rem; padding: 0 .4rem; margin-left: .3rem; }

/* Kategorien in der Kartenbearbeitung */
.section { margin: 0 0 2rem; scroll-margin-top: 1rem; }
.section-header { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; flex-wrap: wrap; }
.section-header h2 { margin: 0 auto 0 0; font-size: 1.2rem; }
.rename { position: relative; display: inline-block; }
.rename summary { list-style: none; }
.rename summary::-webkit-details-marker { display: none; }
.floating { position: absolute; right: 0; top: calc(100% + .35rem); z-index: 10; width: min(24rem, 85vw); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: 0 8px 24px rgba(0,0,0,.14); text-align: left; white-space: normal; }

/* Schnelleingabe */
.quick { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .6rem; padding: .6rem; background: #FAFAFA; border: 1px dashed var(--line); border-radius: var(--radius); }
.quick label:not(.invisible) { font-weight: 600; }
.quick input, .quick select { padding: .45rem .6rem; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; background: #fff; }
.quick-name { flex: 1 1 16rem; min-width: 0; }
.quick-price { width: 6.5rem; }
.new-section .quick { background: none; border: 0; padding: 0; margin: 0; }

/* Formulare */
.form h2 { margin-top: .25rem; }
.form h2 ~ h2 { margin-top: 1.5rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0 1.25rem; }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.field { margin-bottom: 1rem; display: flex; flex-direction: column; gap: .3rem; }
.field label { font-weight: 600; font-size: .9rem; }
.field small { color: var(--muted); font-size: .8125rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: .55rem .7rem; border: 1px solid #C8C8C8; border-radius: var(--radius);
  font: inherit; background: #fff; color: var(--ink);
}
.field input[type="color"] { height: 2.6rem; padding: .2rem; }
.field input[type="file"] { padding: .4rem; }
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus, .quick input:focus, .quick select:focus { border-color: var(--accent); outline: 2px solid var(--accent-light); }
.checkbox { display: inline-flex; align-items: flex-start; gap: .45rem; cursor: pointer; margin: .2rem 1.25rem .4rem 0; }
.checkbox input { margin-top: .25rem; accent-color: var(--accent); }
.checkbox small { color: var(--muted); }
.checkbox:has(input:disabled) { cursor: default; }
.checkbox-row { margin: .5rem 0; }
fieldset.allergens { border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem 1rem .5rem; margin: 0 0 1rem; }
fieldset.allergens legend { font-weight: 600; font-size: .9rem; padding: 0 .3rem; }
.allergen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); }
.allergen-grid .checkbox { margin-right: 0; }
/* Varianten: Menge / Zusatz, Preis (im Gericht auch Preis auf dieser Karte), Entfernen – eine Zeile je Variante */
fieldset.variants { border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem 1rem .75rem; margin: 0 0 1rem; }
fieldset.variants legend { font-weight: 600; font-size: .9rem; padding: 0 .3rem; }
fieldset.variants > small { display: block; margin-top: .4rem; color: var(--muted); font-size: .8125rem; }
.variant { display: grid; grid-template-columns: minmax(10rem, 1fr) 8rem auto; gap: 0 .75rem; align-items: end; }
.with-overrides .variant { grid-template-columns: minmax(10rem, 1fr) 8rem 9rem auto; }
.variant .field { margin-bottom: .6rem; }
.variant .field.translatable { grid-column: auto; }
.variant + .variant .field > label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.variant-remove { margin-bottom: .6rem; }
.variant-add { margin-top: .1rem; }
.variant-price + .variant-price { margin-top: .2rem; }
@media (max-width: 40rem) {
  .variant, .with-overrides .variant { grid-template-columns: 1fr 1fr; }
  .variant .variant-note { grid-column: 1 / -1; }
  .variant + .variant { border-top: 1px solid var(--line); padding-top: .6rem; }
  .variant + .variant .field > label { position: static; width: auto; height: auto; clip: auto; }
}
.logo-preview { max-width: 10rem; max-height: 4rem; margin-top: .5rem; border: 1px solid var(--line); padding: .25rem; background: #fff; }

.copy { margin-bottom: .75rem; }
.qr { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: flex-start; }
.qr > div:last-child { flex: 1; min-width: 14rem; }
.qr-image { width: 10rem; }
.qr-image svg { display: block; width: 10rem; height: 10rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: repeating-conic-gradient(#EEE 0 25%, #FFF 0 50%) 0 0 / 12px 12px; } /* Schachbrett zeigt Transparenz */
.qr-warning { margin: .5rem 0 0; font-size: .8125rem; color: #9A3412; }
.qr-options { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; align-items: flex-start; margin-top: .75rem; }
.qr-options .field { margin: 0; }
.qr-options input[type=number] { width: 6rem; }
.qr-options input[type=color] { width: 3.5rem; height: 2.2rem; padding: .15rem; }
.copy label { display: block; font-weight: 600; font-size: .875rem; margin-bottom: .25rem; }
.copy-row { display: flex; gap: .4rem; }
.copy-row input { flex: 1; min-width: 0; padding: .45rem .6rem; border: 1px solid var(--line); border-radius: var(--radius); font: .8125rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: #FAFAFA; }

/* Anmeldung */
.login { max-width: 24rem; margin: 10vh auto 0; }
.login h1 { margin-bottom: 1.25rem; color: var(--accent); }

@media (max-width: 52rem) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border-bottom: 1px solid var(--line); padding: .4rem 0; }
  .table td { border: 0; padding: .25rem .75rem; }
  .table .actions { text-align: left; white-space: normal; }
  .items .day:empty { display: none; }
}
.table th.right { text-align: right; }
.section-header .sort { min-width: 4rem; }

/* Darstellung mit Vorschau */
.appearance { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem); gap: 1.5rem; align-items: start; margin-bottom: .5rem; }
.grid.colors { grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
.field input[type="color"]:disabled { opacity: .35; }
.field .checkbox { margin: .1rem 0 0; font-weight: 400; font-size: .875rem; }
.contrast-hint { margin: 0; font-size: .8125rem; color: var(--accent); }
.contrast-hint.warning { color: #8A5A00; background: var(--warning-light); padding: .4rem .6rem; border-radius: var(--radius); }
.preview { position: sticky; top: 1rem; }
.preview-label { margin: 0 0 .3rem; font-size: .8125rem; font-weight: 600; color: var(--muted); }
.preview-area {
  background: var(--v-background, #fff); color: var(--v-text, #1F1F1F); font-family: var(--v-font, Georgia, serif);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem 1.3rem;
}
.preview.transparent .preview-area { background: repeating-conic-gradient(#EEE 0 25%, #FFF 0 50%) 0 0 / 12px 12px; } /* Schachbrett wie beim QR-Code */
.v-title, .v-section { font-family: var(--v-heading-font, var(--v-font, Georgia, serif)); }
.v-title { font-size: 1.6rem; line-height: 1.15; color: var(--v-accent); margin-bottom: .6rem; }
.v-section { font-weight: 600; font-size: 1.05rem; padding-bottom: .3rem; margin-bottom: .5rem; border-bottom: 1px solid var(--v-accent); }
.v-item { display: flex; justify-content: space-between; gap: 1rem; margin-top: .55rem; font-weight: 600; }
.v-price { white-space: nowrap; }
.v-text { font-size: .9rem; color: color-mix(in srgb, var(--v-text) 68%, var(--v-background)); }
.v-label { font: 500 .65rem/1.5 system-ui, sans-serif; color: var(--v-accent); border: 1px solid currentColor; border-radius: 1rem; padding: 0 .4rem; vertical-align: .15em; }
@media (max-width: 52rem) { .appearance { grid-template-columns: 1fr; } .preview { position: static; } }
.field .checkbox input { width: auto; padding: 0; border: 0; }

/* Geschützter Adminbereich */
.nav-admin { display: inline-flex; align-items: center; gap: .35rem; }
.admin-bar { background: #262626; color: #E6E6E6; font-size: .875rem; }
.admin-bar-inner { max-width: 72rem; margin: 0 auto; padding: .4rem 1.25rem; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.25rem; }
.admin-bar-title { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; color: #fff; }
.admin-bar nav { display: flex; flex-wrap: wrap; gap: .2rem; flex: 1; }
.admin-bar nav a.right { margin-left: auto; }
.admin-bar nav a { color: #E6E6E6; text-decoration: none; padding: .3rem .65rem; border-radius: var(--radius); }
.admin-bar nav a:hover { background: rgba(255,255,255,.1); }
.admin-bar nav a[aria-current] { background: #fff; color: var(--ink); font-weight: 600; }
.admin-bar .button { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.admin-bar .button:hover { background: rgba(255,255,255,.12); color: #fff; border-color: #fff; }
.lock { width: 3.5rem; height: 3.5rem; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center; background: var(--accent-light); color: var(--accent); }

/* Ausgabe & Zeitplan */
fieldset.output { border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.1rem 1rem; margin: 1rem 0; }
fieldset.output legend { font-weight: 650; padding: 0 .3rem; }
fieldset.output > .muted { margin: 0 0 .9rem; }
.grid.channels { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.schedule-panel { background: #FAFAFA; border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; scroll-margin-top: 1rem; }
.schedule-panel[hidden] { display: none; }
.schedule-title { margin: 0 0 .5rem; font-weight: 600; font-size: .9rem; }
.schedule-help { display: block; margin-top: .5rem; color: var(--muted); font-size: .8125rem; }
.schedule { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .45rem 0; border-bottom: 1px solid #ECECEC; }
.schedule-list { margin-bottom: .6rem; }
.weekdays { display: inline-flex; gap: 3px; }
.day-toggle { position: relative; }
.day-toggle input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.day-toggle span { display: inline-block; min-width: 2.2rem; text-align: center; padding: .35rem .3rem; border: 1px solid #C8C8C8; border-radius: var(--radius); font-size: .8125rem; font-weight: 600; background: #fff; color: var(--muted); }
.day-toggle input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.day-toggle input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.time { display: inline-flex; align-items: center; gap: .35rem; font-size: .875rem; color: var(--muted); }
.time input { padding: .35rem .5rem; border: 1px solid #C8C8C8; border-radius: var(--radius); font: inherit; color: var(--ink); }
.output-summary { font-size: .8125rem; line-height: 1.45; }
.output-summary .channel span:first-child { color: var(--muted); }
.output-summary .channel-off { color: var(--muted); }
.output-summary .channel-scheduled { color: #6A4A00; }
.output-summary.row { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; margin: .35rem 0 0; }
.now-header { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem 1rem; }
.now-header h2 { margin: 0; }
.now-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem 2rem; margin: .75rem 0 1rem; }
.now-grid h3 { margin: 0 0 .3rem; font-size: .95rem; }
.now-grid ul { margin: 0 0 .6rem; padding-left: 1.1rem; }
.now-grid .empty { margin: 0 0 .6rem; }
.time-preview { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding-top: .8rem; border-top: 1px solid #ECECEC; font-size: .875rem; }
.time-preview input { padding: .35rem .5rem; border: 1px solid #C8C8C8; border-radius: var(--radius); font: inherit; }

/* Garger-Logo in der Kopfleiste */
.brand { align-items: center; gap: .65rem; }
.brand img { width: 34px; height: 34px; border-radius: 7px; display: block; }
.brand-text { display: flex; align-items: baseline; gap: .6rem; }
.bar { font-weight: 600; }
.main-nav a { opacity: .92; }
.login-logo { display: block; width: 72px; height: 72px; margin: 0 auto 1rem; border-radius: 14px; }
.login h1 { text-align: center; }
.brand .brand-text { font-weight: 700; opacity: 1; font-size: 1.05rem; }
.brand .brand-text span { font-weight: 400; opacity: .85; font-size: .9rem; }
.contrast-hint { color: var(--success); }

/* Aktionen ohne Neuladen (admin.js): Meldungen unten einblenden, Knopf während des Sendens dämpfen */
.toasts { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 100;
  display: flex; flex-direction: column; gap: .5rem; width: min(32rem, calc(100% - 2rem)); }
.toasts .notice { margin: 0; box-shadow: 0 6px 20px rgba(0, 0, 0, .18); cursor: pointer; }
form.loading button { opacity: .5; cursor: progress; }

/* Gericht- und Produktformular: Produktangaben und Angaben für diese Karte getrennt */
fieldset.area { border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem .4rem; margin: 0 0 1.1rem; }
fieldset.area > legend { font-weight: 600; padding: 0 .35rem; }
fieldset.area > legend a { font-weight: 400; font-size: .85rem; margin-left: .5rem; }
.field select[size] { padding: .25rem; }
/* eigener Pfeil mit Abstand zum Rand (Safari setzt den eigenen ganz an den Rand) */
select:not([size]):not([multiple]) {
  appearance: none; -webkit-appearance: none; padding-right: 2.2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23555' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .75rem center; background-size: .75rem auto;
}
.switcher select:not([size]):not([multiple]) { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.product-search { margin-bottom: .35rem; }
.field.search { max-width: 26rem; }
.button.is-disabled { opacity: .45; cursor: not-allowed; }

/* Kopfleiste in einer Zeile: Mandantenwahl neben dem Logo, Name + Abmelden im Benutzermenü */
.bar-inner { flex-wrap: nowrap; gap: .5rem 1.5rem; }
.switcher select { max-width: 14rem; text-overflow: ellipsis; }
.main-nav { white-space: nowrap; font-size: .9rem; font-weight: 500; }
.user-menu { margin-left: auto; position: relative; font-size: .9rem; font-weight: 500; }
.user-menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .4rem; padding: .45rem .1rem; opacity: .92; white-space: nowrap; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary::after { content: ""; border: 4px solid transparent; border-top-color: currentColor; margin-top: 4px; }
.user-menu summary:hover, .user-menu[open] summary, .user-menu summary[aria-current] { opacity: 1; }
.user-menu-list { position: absolute; right: 0; top: calc(100% + .35rem); z-index: 50; min-width: 11rem; padding: .3rem;
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.user-menu-list form { margin: 0; }
.user-menu-list a, .user-menu-list .link { display: block; width: 100%; text-align: left; color: var(--ink); font-weight: 500; padding: .5rem .7rem; border-radius: 4px; }
.user-menu-list a:hover, .user-menu-list .link:hover { background: var(--bg); text-decoration: none; }

/* Auswahlknopf (z. B. PDF A4/A5, je Sprache eine Zeile): Liste wie im Benutzermenü */
.dropdown { position: relative; display: inline-block; }
.dropdown > summary { list-style: none; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown > summary::after { content: ""; border: 4px solid transparent; border-top-color: currentColor; margin-top: 4px; }
.dropdown-list { position: absolute; right: 0; top: calc(100% + .25rem); z-index: 50; min-width: 100%; padding: .3rem;
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.dropdown-list a { display: block; color: var(--ink); text-decoration: none; font-size: .875rem; font-weight: 500; padding: .45rem .7rem; border-radius: 4px; white-space: nowrap; }
.dropdown-list a:hover { background: var(--bg); text-decoration: none; }
.dropdown-row { display: flex; align-items: center; gap: .1rem; }
.dropdown-row + .dropdown-row { border-top: 1px solid var(--line); }
.dropdown-row > span { flex: 1; font-size: .8rem; color: var(--muted); padding: .45rem 1rem .45rem .7rem; white-space: nowrap; }

/* Schmale Bildschirme: Navigation als eigene, seitlich wischbare Zeile */
@media (max-width: 70rem) {
  .bar-inner { flex-wrap: wrap; column-gap: 1rem; padding-top: .5rem; }
  .main-nav { order: 3; width: 100%; gap: 1.1rem; overflow-x: auto; scrollbar-width: none; margin-top: -.25rem; }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav a { padding: .55rem 0 .6rem; }
  .switcher select { max-width: 42vw; }
}
@media (max-width: 30rem) {
  .brand:has(+ .switcher) .brand-text { display: none; } /* Agentur: Platz für die Mandantenwahl */
}

/* Übersetzungen in Formularen */
.field.translatable { grid-column: 1 / -1; }
.field .languages { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .5rem .75rem; }
.field .language { position: relative; }
.field .language input, .field .language textarea { width: 100%; padding-left: 2.6rem; }
.field .language-code { position: absolute; left: .45rem; top: .55rem; font-size: .6875rem; font-weight: 700; letter-spacing: .04em;
  color: var(--muted); background: var(--accent-light); border-radius: 3px; padding: .05rem .3rem; pointer-events: none; }
.field .language .missing { background: var(--warning-light); }
/* ab zwei weiteren Sprachen (admin.js): Deutsch + gewählte Sprache, Kürzel als Auswahl */
.field .languages.switchable .language [lang] { padding-left: 3.4rem; }
.field .language select.language-code { width: auto; top: .45rem; padding: .1rem 1.1rem .1rem .3rem; border: 0; pointer-events: auto; cursor: pointer;
  font: inherit; font-size: .6875rem; font-weight: 700; color: var(--muted); background-color: var(--accent-light);
  background-position: right .3rem center; background-size: .5rem auto; }

/* Seite „Übersetzen“ */
.translate-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.25rem; margin: 0 0 1rem; }
.tabs-small { display: flex; flex-wrap: wrap; gap: .25rem; }
.tabs-small a { padding: .3rem .7rem; border: 1px solid var(--line); border-radius: 2rem; text-decoration: none; color: var(--ink); background: var(--surface); font-size: .875rem; }
.tabs-small a[aria-current] { background: var(--accent); border-color: var(--accent); color: #fff; }
.location-tabs { margin-bottom: 1.5rem; }
.embed-options { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-bottom: .5rem; }
.embed-options form { display: flex; align-items: center; gap: .4rem 1rem; flex-wrap: wrap; }
.embed-options .checkbox { margin: 0; }
.embed-options select { padding: .35rem .6rem; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; background: #fff; }
.table.translate td { width: 50%; }
.table.translate td:first-child { color: var(--muted); }
.table.translate .field-name { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); margin-bottom: .15rem; }
.table.translate input, .table.translate textarea { width: 100%; padding: .45rem .6rem; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; background: #fff; }
.table.translate input:focus, .table.translate textarea:focus { border-color: var(--accent); outline: 2px solid var(--accent-light); }
.table.translate .group-row th { background: #F2F2F2; color: var(--ink); font-size: .9rem; text-transform: none; }
.table.translate .group-row.sub th { background: #FAFAFA; font-weight: 500; padding-left: 1.5rem; }
.floating-bottom { position: sticky; bottom: 0; background: var(--bg); padding: .75rem 0; margin-top: 0; border-top: 1px solid var(--line); }
.language-select { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: .25rem 1rem; margin-bottom: 1rem; }
.table.translate .suggestion { background: #FFFBEA; border-style: dashed; }
.suggestion-hint { display: block; font-size: .75rem; color: #8A6D1F; margin-top: .2rem; }

/* Adminbereich: Betrieb, Unternehmen, Zugänge, Mandanten */
[hidden] { display: none !important; }
h1 .muted { font-weight: 400; font-size: .6em; }
.inherits { background: var(--bg); border-left: 3px solid var(--line); padding: .5rem .75rem; border-radius: var(--radius); }
.field-value { padding: .5rem .1rem; font-size: .95rem; }
.role-explanation { margin: -.25rem 0 1.25rem; padding-left: 1.1rem; font-size: .875rem; }
.form.floating.wide { min-width: min(30rem, 90vw); }
.tenant-block .group-header h2 { font-size: 1.15rem; }
.tenant-block .table { margin-bottom: .75rem; }
.new-location > summary { list-style: none; display: inline-block; cursor: pointer; }
.new-location > summary::-webkit-details-marker { display: none; }
.new-location[open] > summary { margin-bottom: .75rem; }
/* Symbole in den Leisten (Zahnrad „Einstellungen“, Schild „Adminbereich“) */
.admin-bar-title svg { vertical-align: -2px; margin-right: .15rem; }

/* Schriften (Adminbereich): Name in der Schrift selbst */
.font-sample { display: block; font-size: 1.375rem; line-height: 1.3; }
