:root {
  /* Hintergrund wie Homepage krumme-linde.de: body bgcolor F6EFB1 */
  --bg: #F6EFB1;
  --bg-glow-a: #FBF8EF;
  --bg-glow-b: #EFE6A8;
  /* Wie Fritz: kein heller Formular-Kasten, nur Felder hellgrau */
  --paper: transparent;
  --surface: #FBF8EF;
  --field-bg: #f3f4f2;
  --ink: #1a2b33;
  --muted: #4a5c64;
  --line: #d4c98a;
  --accent: #00501E;
  --accent-hover: #008000;
  --danger: #f0060a;
  --admin-head: #E8DFA0;
  --font: Comfortaa, "Segoe UI", Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html { font-size: 18px; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 480px at 8% -8%, var(--bg-glow-a) 0%, transparent 62%),
    radial-gradient(900px 420px at 100% 0%, var(--bg-glow-b) 0%, transparent 55%);
  min-height: 100vh;
  line-height: 1.5;
}

.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
}
body.ist-eingebettet {
  overflow-x: hidden;
}
body.ist-eingebettet .wrap {
  padding-top: 0.4rem;
  padding-bottom: 1rem;
}

/* Bestellübersicht: volle Bildschirmbreite nutzen */
.wrap.admin {
  max-width: none;
  width: 100%;
  padding: 1.25rem 1.5rem 3rem;
}

.home-zurueck {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
}
.home-zurueck a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
}
.home-zurueck a:hover {
  color: var(--accent-hover);
}

.brand {
  text-align: center;
  margin-bottom: 1rem;
}
.brand h1 {
  font-family: var(--font);
  font-size: 2rem;
  font-weight: 700;
  margin: 0.2rem 0;
}
.brand .sub {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0.4rem 0 0;
}

.info, .faq {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0.5rem 0;
  margin: 1rem 0;
}
.info h2, .faq h2, .form-card h2 {
  text-align: center;
  font-size: 1.1rem;
  margin: 0 0 0.75rem;
}
.info p {
  font-size: 1rem;
  margin: 0 0 1.25rem;
  text-align: center;
}
.info p:last-child {
  margin-bottom: 0;
}
.faq p, .faq li {
  font-size: 1rem;
  margin: 0.55rem 0;
  text-align: center;
}
.info strong.alert {
  color: var(--danger);
  text-decoration: underline;
}
.faq details {
  margin: 0.5rem 0;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(26, 43, 51, 0.12);
  text-align: left;
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  text-align: left;
}
.faq details p {
  text-align: left;
}

.form-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 1.1rem 0 1.4rem;
  box-shadow: none;
}

.errors {
  background: #fef5f5;
  color: #b00020;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.errors ul { margin: 0.3rem 0 0; padding-left: 1.2rem; }

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 1rem;
}
.field { display: flex; flex-direction: column; gap: 0.3rem; }
.field.full { grid-column: 1 / -1; }
.field.col-3 { grid-column: span 1; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field .req::after { content: " *"; color: #f11111; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  background: var(--field-bg);
}
textarea { min-height: 110px; resize: vertical; }
input:focus, textarea:focus {
  outline: 2px solid #c9b96a;
  border-color: var(--accent);
}

.radios { display: flex; flex-direction: column; gap: 0.45rem; }
.radios label {
  font-weight: 400;
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.check {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-weight: 400;
}
.check input { margin-top: 0.25rem; }

.total-box {
  margin-top: 0.35rem;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1.15rem;
  font-weight: 700;
  background: var(--field-bg);
}
.hint { margin: 6px 0 0; font-size: 0.92rem; color: var(--muted); }

.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.actions { margin-top: 1.1rem; }
button[type="submit"], .btn {
  appearance: none;
  border: 0;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  cursor: pointer;
}
button[type="submit"]:hover, .btn:hover { background: var(--accent-hover); }
button[disabled] { opacity: 0.55; cursor: wait; }

.footer-contact {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.95rem;
  color: var(--muted);
}

.confirm {
  background: transparent;
  border-radius: 0;
  padding: 1.5rem 0;
  border: 0;
  text-align: center;
}
.confirm h1 {
  font-family: var(--font);
  font-weight: 700;
}
.confirm-uebersicht {
  margin-top: 2rem;
  text-align: center;
}
.confirm-uebersicht h2 {
  font-family: var(--font);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.85rem;
}
.confirm-uebersicht p {
  margin: 0.35rem 0;
}
.confirm-uebersicht .confirm-betrag {
  margin-top: 0.85rem;
  font-weight: 700;
}
.confirm-kontakt {
  margin-top: 2rem;
}
.confirm-zurueck {
  margin-top: 1.2rem;
}

.admin .admin-table-wrap {
  overflow-x: visible;
  width: 100%;
}
.admin table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.9rem;
  table-layout: auto;
}
.admin th, .admin td {
  border-bottom: 1px solid var(--line);
  padding: 0.55rem 0.65rem;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.admin th { background: var(--admin-head); white-space: nowrap; }
.admin td:nth-child(1),
.admin td:nth-child(6),
.admin td:nth-child(7) {
  white-space: nowrap;
}
.btn-small {
  display: inline-block;
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
  text-decoration: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
}
.btn-small:hover { background: var(--accent-hover); }
.btn-secondary {
  background: #4a5c64;
  text-decoration: none;
  display: inline-block;
}
.btn-secondary:hover { background: #314149; }
.zahlungsmail-page h1 { margin-bottom: 0.4rem; }
.zahlungsmail-nav { margin: 0 0 0.75rem; }
.zahlungsmail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin: 1rem 0;
}
.zahlungsmail-preview,
.zahlungsmail-editor {
  max-width: 720px;
  font-size: 1rem;
  line-height: 1.55;
}
.zahlungsmail-preview p,
.zahlungsmail-editor p { margin: 0 0 0.9rem; }
.zahlungsmail-preview img,
.zahlungsmail-editor img { display: block; margin-top: 0.25rem; }
.zahlungsmail-editor {
  min-height: 22rem;
  outline: none;
}
.zahlungsmail-editor:focus {
  box-shadow: 0 0 0 2px rgba(74, 92, 100, 0.35);
}
.zahlungsmail-form .field { margin-bottom: 1rem; }
.zahlungsmail-form input[type="text"] { width: 100%; max-width: 720px; }
.zahlungsmail-status { margin: 0.5rem 0 0.75rem; font-weight: 600; }
.zahlungsmail-flash {
  padding: 0.65rem 0.85rem;
  margin: 0 0 1rem;
  border-left: 4px solid #4a5c64;
  background: #f3f6f4;
}
.zahlungsmail-flash-ok { border-color: #5a7a3a; background: #eef5e6; }
.zahlungsmail-flash-err { border-color: #a04040; background: #f8ecec; color: #5a2020; }
.zahlungsmail-buero-status { margin-top: 0.65rem; }
.pill {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.8rem;
}
.pill-ok { background: #d8e8c8; }

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--accent);
}
.admin-tab {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  text-decoration: none;
  color: var(--ink);
  background: var(--surface);
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
}
.admin-tab.is-active {
  background: var(--accent);
  color: #fff;
}
.admin-tab-logout { margin-left: auto; background: #e8e0b8; }
.admin-meta { margin: 0 0 0.75rem; }
.admin-ok {
  background: var(--admin-head);
  border: 1px solid #c9b96a;
  padding: 0.65rem 0.85rem;
  margin: 0 0 1rem;
}
.admin-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: flex-end;
  margin: 0 0 1rem;
}
.admin-filter label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.9rem;
}
.admin-filter select {
  font: inherit;
  padding: 0.35rem 0.5rem;
}
.readonly-box {
  background: var(--field-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  min-height: 2.2rem;
  white-space: pre-wrap;
}
.admin-edit h3 { margin: 1.25rem 0 0.4rem; font-size: 1.05rem; }
.buero-gast-block {
  margin: 0.75rem 0 1.1rem;
  padding: 0.85rem 1rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field-bg);
}
.buero-gast-kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  margin-bottom: 0.25rem;
}
.buero-gast-kopf h3 {
  margin: 0;
}
.buero-gast-btn {
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  border: 2px solid var(--accent);
  background: #fff;
  color: var(--accent);
  cursor: pointer;
  white-space: normal;
  text-align: center;
  max-width: 18rem;
  line-height: 1.25;
}
.buero-gast-btn:hover {
  background: var(--accent);
  color: #fff;
}
.buero-gast-block.is-unlocked .buero-gast-btn {
  border-color: #8a4a2a;
  color: #8a4a2a;
}
.buero-gast-block.is-unlocked .buero-gast-btn:hover {
  background: #8a4a2a;
  color: #fff;
}
.buero-gast-block .buero-gast-felder > h3 {
  margin-top: 1rem;
}
.buero-gast-block.is-locked .buero-gast-felder {
  opacity: 0.72;
  pointer-events: none;
}
.buero-gast-block.is-locked input[readonly] {
  background: #eef2f0;
  cursor: default;
}
.buero-gast-block.is-unlocked {
  border-color: #8aa896;
  box-shadow: inset 0 0 0 1px rgba(70, 120, 90, 0.18);
}
.buero-gast-block.is-unlocked #buero-gast-hint {
  color: #2f5a40;
  font-weight: 600;
}
.admin-edit .buero-zeile {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.85rem 1.25rem;
}
.admin-edit .buero-zeile .field { flex: 0 0 auto; }
.admin-edit .input-menge { width: 5.5rem; }
.admin-edit .input-preis { width: 7.5rem; }
.admin-edit .input-status,
.admin-edit .input-datum {
  font: inherit;
  padding: 0.55rem 0.65rem;
  border: 1px solid #c5d0c8;
  border-radius: 6px;
  background: var(--field-bg);
}
.admin-edit .input-status { width: 12.5rem; }
.admin-edit .input-datum { width: 11.5rem; }
.admin-edit .buero-betrag {
  width: max-content;
  min-width: 8.5rem;
  min-height: 0;
  white-space: nowrap;
}
.admin-edit .buero-pos-wrap {
  width: auto;
  max-width: 100%;
  display: inline-block;
  vertical-align: top;
}
.admin-edit .pos-editor { width: auto; max-width: 100%; }
.admin-edit .pos-editor .col-bez { width: 28rem; }
.admin-edit .pos-editor .col-menge { width: 6.5rem; }
.admin-edit .pos-editor .col-preis { width: 8.5rem; }
.pos-editor input[type="text"],
.pos-editor input[type="number"] {
  width: 100%;
  font: inherit;
  padding: 0.3rem 0.4rem;
}
.admin-edit .pos-editor input.input-bez {
  width: 100%;
  min-width: 18rem;
}
.admin-edit .pos-editor input.input-menge { width: 5.5rem; }
.admin-edit .pos-editor input.input-preis { width: 7.5rem; }
.is-storno { opacity: 0.65; }

.kueche-sums {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 0.75rem 0 1.25rem;
}
.kueche-sums div {
  background: #fff;
  border: 1px solid var(--line);
  padding: 0.65rem 1rem;
  min-width: 7rem;
  text-align: center;
}
.kueche-sums strong {
  display: block;
  font-size: 1.6rem;
  line-height: 1.2;
}
.kueche-sums span { font-size: 0.85rem; color: var(--muted); }

.pack-block,
.kellner-block {
  background: #fff;
  border: 1px solid var(--line);
  padding: 0.85rem 1rem;
  margin: 0 0 1rem;
  page-break-inside: avoid;
  break-inside: avoid;
}
.pack-head { margin-bottom: 0.35rem; }
.pack-mengen { margin-bottom: 0.5rem; }
.pack-zeile { margin: 0.35rem 0; }
.pack-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}
.pack-text,
.nachricht-print {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.vp-form { margin-top: 0.75rem; padding-top: 0.65rem; border-top: 1px dashed var(--line); }
.kellner-geld {
  margin: 0.65rem 0;
  padding: 0.55rem 0.7rem;
  background: var(--surface);
  border: 1px solid var(--line);
}
.kasse-summe {
  margin-top: 0.5rem;
  font-size: 1.05rem;
}
.mwst-hinweis {
  background: #fff3cd;
  border: 2px solid #c9a227;
  padding: 0.85rem 1rem;
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  page-break-inside: avoid;
}
.is-ausgegeben { border-left: 5px solid #2e7d32; }

@media print {
  body {
    background: #fff !important;
    background-image: none !important;
    font-size: 11pt;
    color: #000;
  }
  .wrap.admin { padding: 0; max-width: none; }
  .no-print { display: none !important; }
  .pack-block,
  .kellner-block {
    border: 1px solid #000;
    margin-bottom: 0.7rem;
    box-shadow: none;
  }
  .mwst-hinweis {
    border: 2px solid #000;
    background: #fff;
  }
  .kueche-sums div { border: 1px solid #000; }
  a { color: #000; text-decoration: none; }
  .print-header h2 { margin-top: 0; }
}

@media (max-width: 900px) {
  .admin .admin-table-wrap {
    overflow-x: auto;
  }
}

@media (max-width: 700px) {
  html { font-size: 16px; }
  .brand h1 { font-size: 1.55rem; }
  .brand .sub { font-size: 1.1rem; }
  .grid { grid-template-columns: 1fr; }
  .field.col-3 { grid-column: auto; }
}

.admin .admin-summen {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin: 0 0 0.75rem;
}
.admin .admin-summen div {
  background: #fff;
  border: 1px solid var(--line);
  padding: 0.35rem 0.8rem;
  min-width: 8.5rem;
}
.admin .admin-summen strong {
  display: block;
  font-size: 1.35rem;
  line-height: 1.15;
}
.admin .admin-summen span {
  font-size: 0.82rem;
  color: var(--muted);
}
.admin .buero-werkzeug input[type="text"] { width: 14rem; }
.admin .buero-werkzeug button[type="submit"] {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
}
.admin .buero-treffer {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.buero-ansichten {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.55rem;
}
.buero-scroll-top {
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
  height: 14px;
  margin-bottom: 2px;
}
.buero-scroll-top-inner {
  height: 1px;
}
.admin .buero-scroll {
  overflow-x: auto;
  width: 100%;
}
.admin table.buero-liste {
  width: max-content;
  min-width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-family: "Segoe UI", Tahoma, sans-serif;
  font-size: 17px;
  line-height: 1.35;
  background: #fff;
}
.admin .buero-liste.view-kontrolle,
.admin .buero-liste.view-zahlungen,
.admin .buero-liste.view-gastdaten {
  width: 100%;
}
.admin .buero-liste .c-nr { width: 58px; }
.admin .buero-liste .c-name { width: 158px; }
.admin .buero-liste .c-datum { width: 82px; }
.admin .buero-liste .c-eingang { width: 118px; }
.admin .buero-liste .c-telefon { width: 120px; }
.admin .buero-liste .c-email { width: 200px; }
.admin .buero-liste .c-mail { width: 130px; }
.admin .buero-liste .c-menge { width: 50px; }
.admin .buero-liste .c-beilagen { width: 88px; }
.admin .buero-liste .c-zusatz { width: 120px; }
.admin .buero-liste .c-geld { width: 92px; }
.admin .buero-liste .c-ueber { width: 118px; }
.admin .buero-liste .c-status { width: 96px; }
.admin .buero-liste .c-text { width: 390px; }
.admin .buero-liste .c-erg { width: 270px; }
.admin .buero-liste .c-msg { width: 590px; }

/* Gastdaten-Spalten nur in Gastdaten (andere Ansichten unverändert) */
.admin .buero-liste.view-kontrolle [data-col="bestelldatum"],
.admin .buero-liste.view-kontrolle [data-col="telefon"],
.admin .buero-liste.view-kontrolle [data-col="email"],
.admin .buero-liste.view-kontrolle [data-col="mailstatus"],
.admin .buero-liste.view-zahlungen [data-col="bestelldatum"],
.admin .buero-liste.view-zahlungen [data-col="telefon"],
.admin .buero-liste.view-zahlungen [data-col="email"],
.admin .buero-liste.view-zahlungen [data-col="mailstatus"],
.admin .buero-liste.view-alle [data-col="bestelldatum"],
.admin .buero-liste.view-alle [data-col="telefon"],
.admin .buero-liste.view-alle [data-col="email"],
.admin .buero-liste.view-alle [data-col="mailstatus"] { display: none; }

/* Bestellkontrolle: Zahlungs-Spalten aus */
.admin .buero-liste.view-kontrolle [data-col="gesamt"],
.admin .buero-liste.view-kontrolle [data-col="ueberwiesen"],
.admin .buero-liste.view-kontrolle [data-col="bezahlt"],
.admin .buero-liste.view-kontrolle [data-col="offen"],
.admin .buero-liste.view-kontrolle [data-col="status"] { display: none; }
.admin .buero-liste.view-kontrolle .c-name { width: 140px; }
.admin .buero-liste.view-kontrolle .c-zusatz { width: 110px; }
.admin .buero-liste.view-kontrolle .c-erg { width: 160px; }
.admin .buero-liste.view-kontrolle .c-msg { width: auto; }
.admin .buero-liste.view-kontrolle .c-text:not(.c-erg):not(.c-msg) { width: 140px; }

/* Gastdaten: nur Kontakt / Eingang / Abholung / Mail */
.admin .buero-liste.view-gastdaten [data-col="brust"],
.admin .buero-liste.view-gastdaten [data-col="keule"],
.admin .buero-liste.view-gastdaten [data-col="keine_vorliebe"],
.admin .buero-liste.view-gastdaten [data-col="beilagen"],
.admin .buero-liste.view-gastdaten [data-col="zusatz"],
.admin .buero-liste.view-gastdaten [data-col="gesamt"],
.admin .buero-liste.view-gastdaten [data-col="ueberwiesen"],
.admin .buero-liste.view-gastdaten [data-col="bezahlt"],
.admin .buero-liste.view-gastdaten [data-col="offen"],
.admin .buero-liste.view-gastdaten [data-col="status"],
.admin .buero-liste.view-gastdaten [data-col="kuechennotiz"],
.admin .buero-liste.view-gastdaten [data-col="gastnachricht"],
.admin .buero-liste.view-gastdaten [data-col="bueronotiz"] { display: none; }
.admin .buero-liste.view-gastdaten .c-name { width: 160px; }
.admin .buero-liste.view-gastdaten .c-email { width: auto; min-width: 160px; }
.admin .buero-liste.view-gastdaten td.mailstatus { font-size: 0.92rem; line-height: 1.3; }
.admin .buero-liste.view-gastdaten th[data-col="bestelldatum"],
.admin .buero-liste.view-gastdaten td[data-col="bestelldatum"] {
  position: sticky;
  left: 58px;
  z-index: 3;
  background: #fff;
}
.admin .buero-liste.view-gastdaten th[data-col="bestelldatum"] {
  z-index: 5;
  background: var(--admin-head);
}
.admin .buero-liste.view-gastdaten td.stick-name,
.admin .buero-liste.view-gastdaten th.stick-name { left: 176px; }

/* Zahlungen: nur Beträge / Status */
.admin .buero-liste.view-zahlungen [data-col="brust"],
.admin .buero-liste.view-zahlungen [data-col="keule"],
.admin .buero-liste.view-zahlungen [data-col="keine_vorliebe"],
.admin .buero-liste.view-zahlungen [data-col="beilagen"],
.admin .buero-liste.view-zahlungen [data-col="zusatz"],
.admin .buero-liste.view-zahlungen [data-col="kuechennotiz"],
.admin .buero-liste.view-zahlungen [data-col="gastnachricht"],
.admin .buero-liste.view-zahlungen [data-col="bueronotiz"] { display: none; }
.admin .buero-liste.view-zahlungen .c-name { width: 220px; }
.admin .buero-liste.view-zahlungen .c-geld { width: 110px; }
.admin .buero-liste.view-zahlungen .c-ueber { width: 130px; }
.admin .buero-liste.view-zahlungen .c-status { width: 110px; }
.admin .buero-liste th,
.admin .buero-liste td {
  padding: 0.22rem 0.28rem;
  vertical-align: top;
  word-break: normal;
  overflow-wrap: normal;
  white-space: normal;
  background: #fff;
}
.admin .buero-liste th {
  position: sticky;
  top: 0;
  z-index: 2;
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
  background: var(--admin-head);
}
.admin .buero-liste th a {
  color: inherit;
  text-decoration: none;
}
.admin .buero-liste th a.is-sort { text-decoration: underline; }
.admin .buero-liste td.num { white-space: nowrap; }
.admin .buero-liste th.menge,
.admin .buero-liste td.menge { text-align: center; }
.admin .buero-liste th.beilagen,
.admin .buero-liste td.beilagen {
  border-left: 2px solid #7d9486;
  padding-left: 0.55rem;
  white-space: nowrap;
  position: relative;
}
.admin .buero-liste th.zusatz,
.admin .buero-liste td.zusatz {
  border-left: 1px solid #c5d0c8;
  padding-left: 0.45rem;
}
.buero-detail-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.buero-detail-pop {
  position: absolute;
  z-index: 8;
  left: 0;
  top: calc(100% + 2px);
  min-width: 10rem;
  padding: 0.45rem 0.55rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  font-size: 0.92rem;
  font-weight: 400;
  white-space: nowrap;
  line-height: 1.35;
}
.admin .buero-liste td.stick,
.admin .buero-liste th.stick {
  position: sticky;
  left: 0;
  z-index: 3;
}
.admin .buero-liste th.stick { z-index: 5; }
.admin .buero-liste td.stick-name,
.admin .buero-liste th.stick-name { left: 58px; }
.admin .buero-liste td.offen { font-weight: 700; }
.admin .buero-liste td.stick-name {
  box-shadow: 3px 0 0 #e3ece8;
}
.admin .buero-liste .buero-name {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}
.admin .buero-liste .buero-name:hover { text-decoration: underline; }
.admin .buero-liste tr.is-storno td { background: #f4f4f4; }
.admin .buero-liste .buero-leer { white-space: normal; }

.kueche-seite .kueche-kopf h2 {
  margin: 0.15rem 0 0.35rem;
  font-size: 1.35rem;
}
.kueche-seite .kueche-meta {
  margin: -0.2rem 0 0.45rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.kueche-seite .kueche-scroll { overflow-x: auto; }
.kueche-seite table.kueche-liste {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  background: #fff;
  font-family: "Segoe UI", Tahoma, sans-serif;
  font-size: 17px;
  line-height: 1.28;
}
.kueche-seite .kueche-liste .k-nr { width: 7%; }
.kueche-seite .kueche-liste .k-name { width: 14%; }
.kueche-seite .kueche-liste .k-menge { width: 4.5%; }
.kueche-seite .kueche-liste .k-zusatz { width: 28%; }
.kueche-seite .kueche-liste .k-erg { width: 20%; }
.kueche-seite .kueche-liste .k-msg { width: 22%; }
.kueche-seite .kueche-liste th,
.kueche-seite .kueche-liste td {
  border-bottom: 1px solid var(--line);
  padding: 0.12rem 0.22rem;
  vertical-align: top;
  word-break: normal;
  overflow-wrap: break-word;
  white-space: normal;
  background: #fff;
}
.kueche-seite .kueche-liste th {
  background: var(--admin-head);
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
  text-align: left;
}
.kueche-seite .kueche-liste th.menge,
.kueche-seite .kueche-liste td.menge { text-align: center; }
.kueche-seite .kueche-liste td.num { white-space: nowrap; }
.kueche-seite .kueche-liste th.zusatz,
.kueche-seite .kueche-liste td.zusatz {
  border-left: 2px solid #7d9486;
  padding-left: 0.45rem;
}

@media print {
  .kueche-seite .kueche-kopf h2 {
    font-family: "Segoe UI", Tahoma, sans-serif;
    font-size: 13pt;
    margin: 0 0 2mm;
  }
  .kueche-seite table.kueche-liste {
    font-size: 12pt;
    line-height: 1.22;
  }
  .kueche-seite .kueche-liste thead { display: table-header-group; }
  .kueche-seite .kueche-liste tr,
  .kueche-seite .kueche-liste td {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .kueche-seite .kueche-liste th {
    font-size: 10pt;
    background: #fff;
    border-bottom: 1.5pt solid #000;
  }
  .kueche-seite .kueche-liste th,
  .kueche-seite .kueche-liste td {
    border-bottom: 0.4pt solid #000;
    padding: 0.7mm 1mm;
  }
  .kueche-seite .kueche-liste th.zusatz,
  .kueche-seite .kueche-liste td.zusatz { border-left: 0.8pt solid #000; }
}

.ausgabe-seite .mwst-hinweis {
  padding: 0.35rem 0.6rem;
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  line-height: 1.35;
  border-width: 1px;
  max-width: 46rem;
}
.ausgabe-seite .ausgabe-kopf h2 {
  margin: 0.1rem 0 0.4rem;
  font-size: 1.25rem;
}
.ausgabe-seite .ausgabe-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin: 0 0 0.45rem;
}
.ausgabe-seite .ausgabe-filter a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
}
.ausgabe-seite .ausgabe-filter a.is-aktiv {
  color: var(--accent);
  text-decoration: underline;
}
.ausgabe-seite .ausgabe-suche {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  margin: 0 0 0.35rem;
}
.ausgabe-seite .ausgabe-suche input[type="search"] {
  width: 16rem;
  font: inherit;
  padding: 0.35rem 0.5rem;
}
.ausgabe-seite .ausgabe-suche button {
  padding: 0.35rem 0.7rem;
  font-size: 0.9rem;
}
.ausgabe-seite .ausgabe-meta {
  margin: 0 0 0.4rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.ausgabe-seite .ausgabe-liste {
  width: 100%;
  max-width: 34rem;
  border-collapse: collapse;
  background: #fff;
  font-size: 1.05rem;
}
.ausgabe-seite .ausgabe-liste th,
.ausgabe-seite .ausgabe-liste td {
  border-bottom: 1px solid var(--line);
  padding: 0.28rem 0.4rem;
  text-align: left;
  word-break: normal;
  white-space: nowrap;
}
.ausgabe-seite .ausgabe-liste th { background: var(--admin-head); }
.ausgabe-seite .ausgabe-liste a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}
.tk-seite .tk-hinweis {
  margin: 0 0 0.6rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.tk-seite .tk-tag {
  max-width: 28rem;
  margin: 0 0 0.7rem;
  padding: 0.45rem 0.65rem;
  background: #fff;
  border: 1px solid var(--line);
}
.tk-seite .tk-tag h2 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}
.tk-seite .tk-tag div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.12rem 0;
}
.tk-seite .tk-tag p {
  margin: 0.3rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}
.ausgabe-seite .ausgabe-buero {
  background: #f3f0e6;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}
.ausgabe-seite .bereits-boniert {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.95rem;
  font-weight: 700;
}
.ausgabe-seite .ausgabe-karte {
  max-width: 34rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.9rem 0.55rem;
  margin: 0 0 0.7rem;
}
.ausgabe-seite .ausgabe-karte h3 { margin: 0 0 0.45rem; font-size: 1.15rem; }
.ausgabe-seite .ausgabe-karte h4 { margin: 0 0 0.25rem; font-size: 1rem; }
.ausgabe-seite .ausgabe-karte p { margin: 0.2rem 0; }
.ausgabe-seite .ausgabe-karte section.kasse {
  margin-top: 0.55rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--line);
}
.ausgabe-seite .kasse-zeile {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.28rem 0;
  border-bottom: 1px solid #e4ecee;
}
.ausgabe-seite .kasse-zeile span:last-child { white-space: nowrap; text-align: right; }
.ausgabe-seite .kasse-zeile.kasse-summe {
  margin-top: 0;
  border-bottom: 0;
  padding: 0.12rem 0;
  font-weight: 700;
}
.ausgabe-seite .kasse-zeile.kasse-summe strong {
  font-size: 1.05rem;
  white-space: nowrap;
  text-align: right;
}
.ausgabe-seite .kasse-hinweis {
  margin-top: 0;
  font-size: 0.78rem;
  color: var(--muted);
}
.ausgabe-seite .kasse-offen {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-top: 0.35rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--line);
  font-weight: 700;
}
.ausgabe-seite .kasse-offen strong { font-size: 1.2rem; text-align: right; }
.ausgabe-seite .ausgabe-karte form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.45rem;
}
.ausgabe-seite .ausgabe-zurueck {
  color: var(--ink);
  font-weight: 700;
}
.ausgabe-druck { display: none; }

@media print {
  .ausgabe-seite .ausgabe-kopf h2 {
    font-family: "Segoe UI", Tahoma, sans-serif;
    font-size: 13pt;
    margin: 0 0 2mm;
  }
  .ausgabe-druck { display: block; }
  .ausgabe-seite .ausgabe-kontrolle-druck {
    font-family: "Segoe UI", Tahoma, sans-serif;
    font-size: 11pt;
    margin: 0 0 2mm;
  }
  .ausgabe-seite table.ausgabe-notfall {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-family: "Segoe UI", Tahoma, sans-serif;
    font-size: 10.5pt;
    line-height: 1.22;
  }
  .ausgabe-seite .ausgabe-notfall .n-nr { width: 6%; }
  .ausgabe-seite .ausgabe-notfall .n-name { width: 12%; }
  .ausgabe-seite .ausgabe-notfall .n-menge { width: 4%; }
  .ausgabe-seite .ausgabe-notfall .n-zusatz { width: 10%; }
  .ausgabe-seite .ausgabe-notfall .n-geld { width: 7%; }
  .ausgabe-seite .ausgabe-notfall .n-status { width: 7%; }
  .ausgabe-seite .ausgabe-notfall .n-text { width: 11%; }
  .ausgabe-seite .ausgabe-notfall .n-msg { width: 14%; }
  .ausgabe-seite .ausgabe-notfall .n-buero { width: 11%; }
  .ausgabe-seite .ausgabe-notfall thead { display: table-header-group; }
  .ausgabe-seite .ausgabe-notfall tr,
  .ausgabe-seite .ausgabe-notfall td {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .ausgabe-seite .ausgabe-notfall th,
  .ausgabe-seite .ausgabe-notfall td {
    border-bottom: 0.4pt solid #000;
    padding: 0.7mm 1mm;
    vertical-align: top;
    word-break: normal;
    overflow-wrap: break-word;
    white-space: normal;
    text-align: left;
    background: #fff;
  }
  .ausgabe-seite .ausgabe-notfall th {
    font-size: 9pt;
    white-space: nowrap;
    border-bottom: 1.5pt solid #000;
  }
  .ausgabe-seite .ausgabe-notfall th.menge,
  .ausgabe-seite .ausgabe-notfall td.menge { text-align: center; }
  .ausgabe-seite .ausgabe-notfall td.num { white-space: nowrap; }
  .ausgabe-seite .ausgabe-notfall td.ueber { white-space: normal; }
  .ausgabe-seite .ausgabe-notfall td.offen { font-weight: 700; }
}

.form-abstand {
  grid-column: 1 / -1;
  height: 1.4rem;
}
#kohl-hinweis-box[hidden] {
  display: none !important;
  margin: 0;
  padding: 0;
  border: 0;
}
.hint-warn {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #c9a227;
  background: #fff8e1;
  color: #5c4a00;
  border-radius: 6px;
  font-size: 0.95rem;
}
.hint-warn:empty {
  display: none;
  padding: 0;
  border: 0;
}
.beilagen-extra {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px dashed var(--muted, #888);
}
.beilagen-extra h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}
.bestell-abschluss {
  margin-top: 0.35rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #eef2ea;
}
.bestell-abschluss h3 {
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
}
.uebersicht-block {
  margin: 0 0 0.85rem;
  padding: 0 0 0.75rem;
  border-bottom: 1px solid var(--line);
}
.uebersicht-block:last-of-type {
  margin-bottom: 0.5rem;
}
.uebersicht-h {
  margin: 0 0 0.45rem;
  font-size: 0.98rem;
  font-weight: 700;
}
.bestell-uebersicht-liste {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.98rem;
  line-height: 1.35;
}
.bestell-uebersicht-liste li {
  margin: 0;
}
.uebersicht-meta {
  margin: 0.55rem 0 0.35rem;
  font-size: 0.92rem;
  color: var(--muted, #555);
}
.uebersicht-zeile {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.35rem 1rem;
  margin-top: 0.35rem;
  font-size: 0.98rem;
  font-weight: 600;
}
.uebersicht-extra-liste li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.25rem 1rem;
}
.uebersicht-extra-liste .uebersicht-preis {
  font-weight: 600;
  white-space: nowrap;
}
.bestell-ueberweisung {
  margin-top: 0.35rem;
  padding-top: 0.15rem;
  border-top: none;
}
.bestell-ueberweisung .uebersicht-gesamt {
  margin-top: 0;
}
.bestell-ueberweisung label {
  font-weight: 700;
  font-size: 1rem;
}
.bestell-ueberweisung .total-box {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 1.05rem;
  font-weight: 700;
  text-align: right;
}
.bestell-ueberweisung .hint {
  margin-top: 0.45rem;
}
@media (max-width: 560px) {
  .bestell-abschluss {
    padding: 0.75rem 0.8rem;
  }
  .uebersicht-zeile,
  .uebersicht-extra-liste li {
    gap: 0.2rem 0.75rem;
  }
}
#rechnung-felder[hidden],
#buero-rechnung-felder[hidden] {
  display: none !important;
  margin: 0;
  padding: 0;
  border: 0;
}
.rechnung-felder {
  margin-top: 0.15rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--field-bg);
}
.rechnung-grid {
  margin: 0;
}
.admin-rechnung {
  margin: 0.75rem 0 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #eef2ea;
}
.admin-rechnung h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
}
.admin-rechnung p {
  margin: 0.2rem 0;
}
