/* Schlankes Stylesheet – keine Fremd-Schriften, keine Frameworks */
:root { --brand: #8a1c1c; --ink: #1d1d1f; --muted: #6b6b70; --line: #e3e1dc; --bg: #faf8f5; --card: #fff; --ok: #1f7a3d; --err: #b3261e; --warn: #9a6200; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--brand); }
h1 { font-size: 1.6rem; margin: 1.2rem 0 .8rem; }
h2 { font-size: 1.25rem; margin: 1.4rem 0 .6rem; }
h3 { font-size: 1.05rem; margin: 1rem 0 .4rem; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 440px; margin: 2rem auto; }
.hidden { display: none !important; }
.small, small { font-size: .85rem; color: var(--muted); }
.big { font-size: 1.15rem; }
.pre { white-space: pre-wrap; }
.warn { color: var(--warn); }
code, .code { font-family: ui-monospace, Menlo, Consolas, monospace; background: #f1efe9; padding: 1px 5px; border-radius: 4px; word-break: break-all; }

/* Kopf und Fuß */
.top { background: var(--brand); color: #fff; }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding-top: 10px; padding-bottom: 10px; }
.top a { color: #fff; text-decoration: none; }
.brand { font-weight: 700; font-size: 1.15rem; margin-right: auto; }
.top nav.main { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.top nav.main a { opacity: .9; padding: 2px 0; border-bottom: 2px solid transparent; }
.top nav.main a.on, .top nav.main a:hover { opacity: 1; border-bottom-color: #fff; }
.langs { display: flex; gap: 8px; font-size: .85rem; }
.langs a.on { font-weight: 700; text-decoration: underline; }
.admin-top { background: #2a2a2e; }
.admin-top nav.main a.on { border-bottom-color: var(--brand); }
.logout { display: flex; align-items: center; gap: 8px; font-size: .85rem; }
.foot { margin-top: 3rem; padding: 1.2rem 0 2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.foot .wrap { display: flex; flex-direction: column; gap: 4px; }
.impersonate { background: var(--warn); color: #fff; text-align: center; padding: 6px 16px; font-size: .9rem; }
.impersonate form { display: inline; }

/* Karten, Kacheln */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin: 12px 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 1rem 0; }
.tile { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 22px 16px; text-align: center; font-weight: 600; font-size: 1.1rem; text-decoration: none; }
.tile:hover { border-color: var(--brand); }
.notice { background: #fff6e0; border-left: 4px solid var(--warn); padding: 10px 14px; border-radius: 6px; }
.hint { background: #f1efe9; padding: 10px 14px; border-radius: 6px; }

/* Speisekarte */
.cat h3 { border-bottom: 2px solid var(--brand); padding-bottom: 4px; }
.outlet { color: var(--brand); }
.items { list-style: none; margin: 0; padding: 0; }
.item { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.item p { margin: 2px 0; color: var(--muted); font-size: .92rem; }
.item .price { white-space: nowrap; display: flex; align-items: center; gap: 10px; font-weight: 600; }
.qty { width: 64px; text-align: center; font-size: 1rem; padding: 6px; }
.badge { display: inline-block; font-size: .75rem; padding: 1px 7px; border-radius: 10px; background: #efe9dd; color: var(--ink); font-weight: 500; }
.badge.ok { background: #dff2e5; color: var(--ok); }
.badge.danger { background: #fbe1df; color: var(--err); }
.allergens { display: block; }
.total { font-size: 1.1rem; }

/* Formulare */
.field { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; }
.field > span { font-weight: 600; font-size: .92rem; }
input, select, textarea { font: inherit; padding: 8px 10px; border: 1px solid #cfccc5; border-radius: 6px; background: #fff; max-width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
textarea { width: 100%; }
fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 10px 0; padding: 8px 12px; }
legend { font-weight: 600; font-size: .92rem; padding: 0 4px; }
.radio, .check { display: inline-flex; align-items: center; gap: 6px; margin: 4px 12px 4px 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 14px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 14px; align-items: end; }
.rowform { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
.rowform input { width: auto; }
.w-s { width: 70px; }
.btn { display: inline-block; font: inherit; padding: 8px 14px; border: 1px solid #bdb9b0; background: #fff; border-radius: 6px; cursor: pointer; color: var(--ink); text-decoration: none; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.danger { border-color: var(--err); color: var(--err); }
.btn.small { padding: 3px 9px; font-size: .85rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
button.link { background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }
form.inline { display: inline-flex; gap: 6px; align-items: center; margin: 2px 4px 2px 0; }
.flash { padding: 10px 14px; border-radius: 6px; margin: 12px 0; }
.flash.ok { background: #dff2e5; color: var(--ok); }
.flash.error { background: #fbe1df; color: var(--err); }
.flash ul { margin: 0; padding-left: 18px; }

/* Reservierung */
.slots { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.slot { display: flex; flex-direction: column; align-items: center; min-width: 78px; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; font-weight: 600; }
.slot:hover { border-color: var(--brand); }
.slot.guarantee { border-style: dashed; }
.slot small { font-weight: 400; font-size: .7rem; }
.guarantee-box { border-color: var(--warn); background: #fffaf0; }

/* Admin */
.subnav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.subnav a { padding: 4px 10px; border-radius: 14px; background: #ecebe7; text-decoration: none; color: var(--ink); font-size: .9rem; }
.subnav a.on { background: var(--ink); color: #fff; }
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.bar h2 { margin-right: auto; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.order-card { background: #fff; border: 1px solid var(--line); border-left: 6px solid #bbb; border-radius: 8px; padding: 12px; }
.order-card.st-neu { border-left-color: var(--err); box-shadow: 0 0 0 2px #fbe1df; }
.order-card.st-angenommen { border-left-color: var(--warn); }
.order-card.st-fertig { border-left-color: var(--ok); }
.order-card header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.order-card header .time { font-size: 1.25rem; margin-right: 6px; }
.order-card .status { font-weight: 600; font-size: .9rem; }
.order-card p { margin: 4px 0; }
.order-card .note { background: #fff6e0; padding: 4px 8px; border-radius: 4px; }
.order-card .actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.reject input { width: 140px; }
.lines { list-style: none; padding: 0; margin: 6px 0; }
.lines li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border-bottom: 1px dotted var(--line); }
table.list { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin: 8px 0; }
table.list th, table.list td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.list th { background: #f4f2ee; font-size: .88rem; }
.num { text-align: right !important; white-space: nowrap; }
td.num small { display: block; }
tr.sum th, tr.sum td { font-weight: 700; background: #f4f2ee; }
tr.inactive { opacity: .5; }
tr.rst-no_show td { background: #fdf0ef; }
tr.rst-erschienen td { color: var(--muted); }
.actions form { margin: 2px; }
.stats { display: flex; flex-wrap: wrap; gap: 20px; font-size: 1.05rem; }
.datenav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0; }
.bon { background: #fff; border: 1px dashed #aaa; padding: 12px; max-width: 420px; font-size: .85rem; white-space: pre; overflow-x: auto; }
.qr img { width: 220px; height: 220px; }
.qrgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.qrgrid.klein { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.qrgrid.gross { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.qrcard { margin: 0; padding: 10px; border: 1px solid #ccc; border-radius: 8px; text-align: center; background: #fff; break-inside: avoid; page-break-inside: avoid; }
.qrcard img { width: 100%; height: auto; }
.qrhead { font-weight: 700; color: var(--brand); margin-bottom: 4px; }
.qrnum { font-size: 1.3rem; }
.qrcard.gross .qrnum { font-size: 1.8rem; }
.qrcta { font-size: .75rem; color: var(--muted); }
details.card > summary { cursor: pointer; }
.itemform .grid3 { align-items: start; }

@media (max-width: 640px) {
  h1 { font-size: 1.35rem; }
  .item { flex-direction: column; }
  .item .price { justify-content: space-between; }
  table.list { font-size: .9rem; display: block; overflow-x: auto; }
}
@media print {
  .top, .foot, .subnav, .datenav, .noprint, .btn, form.inline, .impersonate { display: none !important; }
  .qrgrid { grid-template-columns: repeat(3, 1fr); gap: 8mm; }
  .qrgrid.klein { grid-template-columns: repeat(4, 1fr); }
  .qrgrid.gross { grid-template-columns: repeat(2, 1fr); }
  .qrcard { border: 1px dashed #999; }
  body { background: #fff; }
  .card, table.list { border-color: #999; }
}

/* Gutschein-Editor */
.editor { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.editor .preview { position: sticky; top: 12px; }
.editor iframe { width: 100%; aspect-ratio: 595 / 420; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.imgpick { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px dashed #cfccc5; border-radius: 8px; }
.imgpick .lbl { font-weight: 600; font-size: .92rem; }
.imgpick .thumb { max-width: 100%; max-height: 120px; object-fit: contain; align-self: flex-start; border: 1px solid var(--line); }
.signpad canvas { width: 100%; aspect-ratio: 3 / 1; background: #fffdf8; border: 1px solid #cfccc5; border-radius: 8px; touch-action: none; cursor: crosshair; }
.actions-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
@media (max-width: 900px) { .editor { grid-template-columns: minmax(0, 1fr); } .editor .preview { position: static; } }

/* Gutschein drucken */
.printchoice { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 12px 0; }
.printchoice > div { border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.printchoice h2 { margin-top: 0; }
.pdfframe { width: 100%; height: 80vh; border: 1px solid var(--line); background: #fff; }

/* Tagesübersicht Reservierungen (Druck A4 quer) */
.sheethead h1 { margin-bottom: 2px; }
.sheethead p { margin: 0 0 8px; }
.sheet { margin: 10px 0 18px; }
.scroll { overflow-x: auto; }
table.plan { border-collapse: collapse; width: 100%; background: #fff; font-size: .8rem; table-layout: fixed; }
table.plan th, table.plan td { border: 1px solid #d5d1c9; padding: 3px 4px; vertical-align: top; }
table.plan thead th { background: #f4f2ee; font-weight: 600; text-align: left; font-size: .75rem; }
table.plan thead th .half { color: var(--muted); font-weight: 400; }
table.plan th.tname { width: 70px; background: #faf9f6; text-align: left; }
table.plan th.tname small { display: block; font-weight: 400; color: var(--muted); }
table.plan tr.area th { background: #ecebe7; text-align: left; font-size: .8rem; }
table.plan tr.load td { text-align: center; color: var(--muted); background: #faf9f6; }
table.plan td.res { background: #fbeee9; border-left: 3px solid var(--brand); }
table.plan td.res.st-angefragt { background: #fff6e0; border-left-color: var(--warn); }
table.plan td.res.st-erschienen { background: #e9f4ec; border-left-color: var(--ok); }
table.plan td.res.st-no_show { background: #eee; border-left-color: #888; text-decoration: line-through; }
.tag { display: inline-block; margin-left: 4px; font-size: .7rem; padding: 0 5px; border-radius: 8px; background: #efe9dd; font-style: normal; text-decoration: none; }
.tag.warn { background: #fbe1df; color: var(--err); }
table.timeline td.chk, table.timeline th.chk { width: 28px; text-align: center; }
table.timeline .box { display: inline-block; width: 16px; height: 16px; border: 1.5px solid #555; border-radius: 3px; line-height: 14px; font-size: .8rem; }
table.timeline tr.newtime td { border-top: 2px solid #bdb9b0; }
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  .overview .sheet { break-inside: auto; }
  .overview.view-beide .sheet + .sheet { break-before: page; }
  table.plan { font-size: 7.5pt; }
  table.plan td.res, .tag { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .impersonate { display: none; }
}

/* Demo-Hinweis */
.demobanner { background: #1f5c7a; color: #fff; text-align: center; font-size: .85rem; padding: 5px 16px; }
@media print { .demobanner { display: none; } }
.bonlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 12px; }
.bonlist .bon { max-width: none; margin: 0; }

/* Tagesabschluss drucken (A4 hoch) */
.printbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 14px; }
.printbar form.inline { display: inline-flex; gap: 6px; align-items: center; }
.printbar select { width: auto; }
.dayreport h2 { margin: 16px 0 6px; font-size: 1.05rem; }
.dayreport table.list.compact { font-size: .85rem; }
.dayreport table.list.compact td, .dayreport table.list.compact th { padding: 3px 6px; }
.warnbox { border: 2px solid var(--err); padding: 6px 10px; border-radius: 6px; font-weight: 600; }
.cashcount { margin-top: 18px; border: 1.5px solid #555; border-radius: 6px; padding: 8px 12px; break-inside: avoid; }
.cashcount h2 { margin-top: 0; }
.cashcount table { width: 100%; border-collapse: collapse; }
.cashcount th { text-align: left; font-weight: 600; padding: 8px 6px 8px 0; width: 22%; }
.cashcount td { padding: 8px 6px; }
.cashcount td.line { border-bottom: 1px solid #555; width: 28%; }
.signs { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 34px; }
.signs div { border-top: 1px solid #555; padding-top: 4px; font-size: .8rem; color: #555; }
@page hoch { size: A4 portrait; margin: 12mm; }
@media print {
  .dayreport { page: hoch; font-size: 9pt; }
  .dayreport h1 { font-size: 15pt; }
  .dayreport h2 { margin: 10px 0 4px; font-size: 11pt; }
  .dayreport table.report th { white-space: nowrap; }
  .dayreport table.list td, .dayreport table.list th { padding: 2px 6px; }
  .cashcount { margin-top: 10px; }
  .signs { margin-top: 24px; }
  .dayreport table.report small { display: inline; margin-left: 4px; }
  .dayreport table.list { break-inside: auto; }
  .dayreport tr { break-inside: avoid; }
  .warnbox { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Demo-Startseite */
.demo-home { max-width: 1100px; }
.demo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin: 14px 0; }
.demo-card h2 { margin: 0 0 2px; }
.demo-card ul, .demo-home ul { padding-left: 18px; margin: 8px 0 0; }
.demo-card li { margin: 4px 0; overflow-wrap: anywhere; }
.demo-home code { white-space: nowrap; }
.demo-home .card h2 { margin-top: 0; }

/* Kassen-Nachbuchung */
.printonly { display: none; }
.tag.ok { background: #e3f1e6; color: var(--ok); }
.poslist td.chk, .poslist th.chk { width: 30px; text-align: center; }
.poslist td.chk input { width: 20px; height: 20px; }
.poslist .box { display: inline-block; width: 15px; height: 15px; border: 1.5px solid #555; border-radius: 3px; line-height: 13px; font-size: .8rem; text-align: center; }
.poslist tr.done td { color: var(--muted); }
.poslist h3 { font-size: .95rem; margin: 10px 0 4px; }
.possection { margin-bottom: 18px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 10px 0; }
.kpis > div { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: #fff; display: flex; flex-direction: column; }
.kpis span { font-size: .8rem; color: var(--muted); }
.kpis strong { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.kpis small { color: var(--muted); }
.grid2.tight { gap: 14px; }
.monthreport table.days tr.empty td { color: #aaa; }
@media print {
  .printonly { display: inline-block; }
  .signs.printonly { display: grid; }
  .poslist .possection { break-inside: auto; }
  .kpis > div { border-color: #999; }
  .monthreport .grid2 { grid-template-columns: 1fr 1fr; }
}
.poslist .box.printonly { display: none; }
.dayreport > .subnav { margin-top: 12px; }
@media print { .poslist .box.printonly { display: inline-block; } .poslist td.chk input { display: none; } }
.monthreport table.days td:first-child { white-space: nowrap; }
@media print {
  .monthreport table.days td, .monthreport table.days th { padding: 1px 5px; font-size: 8pt; }
  .dayreport a { color: inherit; text-decoration: none; }
}

/* Spam-Schutz */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.captcha { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 12px 0; background: #fff; }
.captcha-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0; }
.captcha-row img { border: 1px solid var(--line); border-radius: 6px; max-width: 100%; height: auto; }
.captcha-input { max-width: 180px; font-size: 1.3rem; letter-spacing: .25em; }
.zones input { width: 100%; }

/* Website & Widget */
.snippet h4 { margin: 0 0 6px; }
.snippet pre.code, pre.code { white-space: pre-wrap; word-break: break-all; background: #f4f2ee; padding: 8px 10px; border-radius: 6px; font-size: .85rem; margin: 0; }
.widget-preview { width: 100%; max-width: 720px; height: 640px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }

/* Widget-Modus (iFrame auf der Website des Betriebs) */
body.embed { background: transparent; }
body.embed .top.slim { position: static; padding: 0; background: transparent; color: inherit; border-bottom: 1px solid var(--line); }
body.embed .top.slim .wrap { padding-top: 6px; padding-bottom: 6px; }
body.embed .top.slim a { color: var(--brand); }
body.embed .top.slim .langs a.on { font-weight: 700; }
body.embed main.wrap { padding-top: 10px; padding-bottom: 10px; }
body.embed .foot.slim { margin-top: 10px; padding: 8px 0; font-size: .8rem; background: transparent; border-top: 1px solid var(--line); }
