/* Dorfhof Markt Hartmannsdorf – Ticketshop */
:root {
  --accent: #7a1f2b; --accent-2: #9c2f3d; --ink: #1f2328; --muted: #6b7280; --line: #e5e7eb;
  --bg: #f6f4f1; --card: #fff; --ok: #1e8e3e; --bad: #c62828; --warn: #b26a00; --radius: 12px;
  --cell: 28px; --na: #d4d4d8;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--accent); }
h1 { font-size: 1.8rem; line-height: 1.2; margin: .4em 0 .3em; }
h2 { font-size: 1.25rem; margin: 1.2em 0 .5em; }
h3 { font-size: 1rem; margin: 0 0 .6em; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
main.container { padding-top: 12px; padding-bottom: 40px; min-height: 60vh; }
main.narrow { max-width: 760px; }
main.wide { max-width: 1500px; }
.muted { color: var(--muted); } .small, small { font-size: .85rem; } .mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.r { text-align: right; }

/* Kopf / Fuß */
.site-header { background: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.hdr { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand-mark { width: 40px; height: 40px; border-radius: 10px; background: #fff; color: var(--accent); display: grid; place-items: center; font-weight: 800; letter-spacing: -.5px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.1rem; } .brand-text small { opacity: .85; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: #fff; text-decoration: none; padding: 6px 10px; border-radius: 8px; font-size: .95rem; }
.nav a:hover { background: rgba(255,255,255,.15); }
.testbar { background: #fff4d6; color: #7a5200; text-align: center; font-size: .85rem; padding: 4px; border-bottom: 1px solid #f0dca0; font-weight: 600; }
.site-footer { border-top: 1px solid var(--line); padding: 20px 0; color: var(--muted); font-size: .9rem; background: #fff; }
.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.site-footer a { color: var(--muted); }
body.has-cartbar .site-footer { padding-bottom: 110px; }

/* Buttons & Formulare */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid #cfd4da; background: #fff; color: var(--ink); padding: 9px 16px; border-radius: 9px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; transition: background .15s, transform .05s; }
.btn:hover { background: #f3f4f6; } .btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; } .btn.primary:hover { background: var(--accent-2); }
.btn.danger { color: var(--bad); border-color: #f1c0c0; } .btn.danger:hover { background: #fdecec; }
.btn.sm { padding: 5px 10px; font-size: .85rem; border-radius: 7px; }
.btn.big { padding: 13px 22px; font-size: 1.05rem; }
.btn:disabled, .btn.disabled { opacity: .45; pointer-events: none; }
.btn.pulse { box-shadow: 0 0 0 3px rgba(var(--accent-rgb, 122,31,43),.25); }
label { display: block; font-weight: 600; font-size: .9rem; margin: 0 0 12px; }
/* Kontrollkästchen mit Text: Text läuft als normaler Fließtext (auch mit Links/Hervorhebungen) neben dem Kästchen – kein Flex,
   sonst wird jeder Textteil eine eigene schmale Spalte (Mobil). */
label.check { display: block; position: relative; padding-left: 26px; font-weight: 400; }
label.check > input[type=checkbox], label.check > input[type=radio] { position: absolute; left: 0; top: 3px; margin: 0; }
input, select, textarea { display: block; width: 100%; margin-top: 4px; font: inherit; font-weight: 400; padding: 9px 11px; border: 1px solid #cfd4da; border-radius: 8px; background: #fff; color: var(--ink); }
input[type=checkbox], input[type=radio] { width: auto; display: inline-block; margin: 0; }
input[type=color] { padding: 2px; height: 36px; width: 42px; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(var(--accent-rgb, 122,31,43),.35); border-color: var(--accent); }
.card { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.08); margin: 0 0 16px; }
.alert { padding: 12px 14px; border-radius: 10px; margin: 10px 0; }
.alert.err, .err.alert { background: #fdecec; color: #8a1c1c; } .alert.ok { background: #e7f6ec; color: #145a2a; } .alert.warn { background: #fff4d6; color: #6b4a00; }
p.ok { color: var(--ok); } p.err { color: var(--bad); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .grid3 { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 8px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.back { display: inline-block; font-size: .9rem; text-decoration: none; margin-top: 6px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: #eee; color: #444; white-space: nowrap; }
.badge.green { background: #e2f5e8; color: #17692f; } .badge.red { background: #fde4e4; color: #9b1c1c; } .badge.orange { background: #fff0d9; color: #8a5100; }
.badge.grey { background: #eceef1; color: #555; } .badge.blue { background: #e1ecfb; color: #1c4f9b; }

/* Startseite */
.hero { background: linear-gradient(135deg, var(--accent), var(--accent-dark, #4a121a)); color: #fff; border-radius: var(--radius); padding: 34px 28px; margin: 8px 0 18px; }
.hero h1 { margin: 0 0 6px; font-size: 2rem; } .hero p { margin: 0; opacity: .9; }
.section-title { margin-top: 0; }
.event-list { display: grid; gap: 16px; }
.event-card { display: grid; grid-template-columns: 180px 1fr; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.event-media { background: #efe9e3; display: grid; place-items: center; min-height: 150px; }
.event-media img { width: 100%; height: 100%; object-fit: cover; }
.datebox { text-align: center; color: var(--accent); line-height: 1.05; }
.datebox .day { display: block; font-size: 3rem; font-weight: 800; } .datebox .mon { display: block; font-size: 1.2rem; font-weight: 700; text-transform: uppercase; } .datebox .yr { color: var(--muted); font-size: .9rem; }
.event-body { padding: 16px 20px; display: flex; flex-direction: column; }
.event-body h3 { font-size: 1.3rem; margin: 0 0 4px; }
.when { color: var(--accent); font-weight: 600; margin: 0 0 6px; }
.desc { margin: 0 0 12px; color: #374151; }
.event-foot { margin-top: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.event-foot .price { font-weight: 700; font-size: 1.05rem; } .event-foot .btn { margin-left: auto; }

/* Veranstaltungsseite */
.event-head { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 10px; }
.event-head h1 { margin-top: 4px; } .event-img { width: 240px; max-width: 40%; border-radius: var(--radius); object-fit: cover; }
.legend, .ed-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 10px 0; font-size: .9rem; }
.lg { display: inline-flex; align-items: center; gap: 6px; }
.lg i { width: 18px; height: 18px; border-radius: 5px 5px 3px 3px; display: inline-block; }
.lg i.sel { background: #111; box-shadow: inset 0 0 0 2px #ffd54f; } .lg i.na { background: var(--na); }
.lg i.blocked { background: repeating-linear-gradient(45deg, #9ca3af 0 3px, #e5e7eb 3px 6px); } .lg i.sold { background: #fff; box-shadow: inset 0 0 0 3px #111; }
.lg i.held { background: #fff; box-shadow: inset 0 0 0 3px #f59e0b; } .lg i.nocat { background: #fff; border: 2px dashed #9ca3af; } .lg i.gapi { background: #fff; border: 1px dotted #cbd5e1; }
.map-wrap { background: #fff; border-radius: var(--radius); padding: 18px 8px 22px; box-shadow: 0 1px 3px rgba(0,0,0,.08); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hint { font-size: .85rem; text-align: center; }

/* Sitzplan-Raster */
.seatgrid { display: grid; grid-template-columns: calc(var(--cell) * 1.2) repeat(var(--cols), var(--cell)) calc(var(--cell) * 1.2); gap: 4px 3px; justify-content: center; width: max-content; margin: 0 auto; user-select: none; -webkit-user-select: none; }
.stage { grid-column: 1 / -1; background: linear-gradient(#3a3f47, #23272e); color: #fff; text-align: center; font-weight: 700; letter-spacing: .25em; text-transform: uppercase; padding: 8px; border-radius: 0 0 50% 50% / 0 0 22px 22px; margin: 0 8% 18px; font-size: .9rem; }
.sec-head { grid-column: 1 / -1; text-align: center; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); margin: 8px 10% 2px; padding-bottom: 2px; }
.rowlbl { display: grid; place-items: center; font-size: calc(var(--cell) * .42); font-weight: 700; color: var(--muted); height: var(--cell); }
.seat, .gap { width: var(--cell); height: var(--cell); }
.seat { --c: #9ca3af; border: 0; padding: 0; background: var(--c); color: #fff; border-radius: 7px 7px 4px 4px; font: 600 calc(var(--cell) * .38)/1 system-ui, sans-serif; display: grid; place-items: center; cursor: pointer; box-shadow: inset 0 -3px 0 rgba(0,0,0,.18); transition: transform .08s; }
.seat:hover:not(:disabled) { transform: scale(1.12); }
.seat.selected { background: #111; box-shadow: inset 0 0 0 2px #ffd54f; color: #ffd54f; }
.seat.na, .seat:disabled { background: var(--na); color: #a1a1aa; cursor: not-allowed; box-shadow: none; }
.seat:focus-visible { outline: 3px solid #ffd54f; outline-offset: 1px; }
/* Editor-Darstellung */
.editing .seat { cursor: crosshair; }
.editing .gap { border: 1px dotted #cbd5e1; border-radius: 5px; cursor: crosshair; }
.editing .seat.nocat { background: #fff; color: #6b7280; border: 2px dashed #9ca3af; box-shadow: none; }
.editing .seat.blocked { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.75) 0 3px, transparent 3px 7px); color: #111; }
.editing .seat.sold { box-shadow: inset 0 0 0 3px #111; }
.editing .seat.held { box-shadow: inset 0 0 0 3px #f59e0b; }
.editing .inrect { outline: 3px solid #2563eb; outline-offset: 0; }
.editing .gap.inrect { background: rgba(37,99,235,.12); }
.editing .rowlbl input.rl { width: 100%; height: calc(var(--cell) - 2px); margin: 0; padding: 0 2px; text-align: center; font-size: calc(var(--cell) * .42); font-weight: 700; border: 1px solid transparent; background: #f3f4f6; }
.editing .rowpick { cursor: pointer; border-radius: 6px; } .editing .rowpick:hover { background: #e0e7ff; color: #1e3a8a; }

/* Warenkorb-Leiste */
.cartbar { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0,0,0,.08); z-index: 20; }
.cart-inner { display: flex; align-items: center; gap: 14px; padding-top: 10px; padding-bottom: 10px; }
.cart-info { display: flex; flex-direction: column; min-width: 0; flex: 1; } .cart-info span { font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-total { font-size: 1.3rem; font-weight: 800; }

/* Kasse */
.timer { background: #e8f0fe; color: #1a3d7c; padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; }
.timer.urgent { background: #fdecec; color: #8a1c1c; }
.seats-table { width: 100%; border-collapse: collapse; margin: 8px 0; }
.seats-table th, .seats-table td { padding: 7px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.seats-table th.r, .seats-table td.r { text-align: right; } .seats-table tfoot th { font-size: 1.05rem; border-bottom: 0; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.testmode { background: #fff4d6; border: 1px dashed #d9a400; color: #6b4a00; padding: 10px 12px; border-radius: 10px; margin: 0 0 14px; }

/* Bestätigung & Tickets */
.confirm { text-align: center; background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,.08); margin-bottom: 18px; }
.check-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 32px; display: grid; place-items: center; margin: 0 auto; }
.confirm h1 { margin-top: 10px; }
.tickets { display: grid; gap: 14px; }
.ticket { display: flex; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.12); border-left: 8px solid var(--accent); position: relative; break-inside: avoid; }
.t-main { flex: 1; padding: 14px 18px; min-width: 0; }
.t-site { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.t-title { font-size: 1.25rem; font-weight: 800; margin: 2px 0; } .t-when { color: var(--accent); font-weight: 600; }
.t-seat { display: flex; gap: 14px; margin: 8px 0 4px; font-size: 1.05rem; flex-wrap: wrap; } .t-seat b { font-size: 1.35rem; }
.t-meta { font-size: .85rem; color: var(--muted); }
.t-qr { width: 150px; padding: 12px; border-left: 2px dashed var(--line); display: grid; place-items: center; }
.t-qr svg { width: 100%; height: auto; }
.t-void { position: absolute; top: 40%; left: 20%; transform: rotate(-12deg); font-size: 2rem; font-weight: 900; color: rgba(198,40,40,.5); border: 4px solid rgba(198,40,40,.5); padding: 0 10px; }
.t-void.used { color: rgba(28,79,155,.5); border-color: rgba(28,79,155,.5); }

/* Admin */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.page-head h1 { margin-bottom: 0; }
.table-wrap { overflow-x: auto; background: #fff; border-radius: var(--radius); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
table.list { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.list th, table.list td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.list th { background: #fafafa; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
table.list th.r, table.list td.r { text-align: right; }
table.list tr.past td { opacity: .6; }
td.acts { display: flex; flex-wrap: wrap; gap: 4px; }
.bar { height: 6px; background: #eceef1; border-radius: 4px; overflow: hidden; width: 160px; margin: 4px 0; } .bar span { display: block; height: 100%; background: var(--accent); }
.tpl-list { list-style: none; padding: 0; } .tpl-list li { background: #fff; padding: 8px 12px; border-radius: 8px; margin-bottom: 6px; display: flex; gap: 10px; align-items: center; } .tpl-list li .btn { margin-left: auto; }
.thumb { max-width: 220px; border-radius: 8px; display: block; margin-bottom: 8px; }
.filters { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; } .filters input#search { max-width: 380px; margin: 0; } .filters label { margin: 0; }
.login { max-width: 420px; margin: 40px auto; }
.lookup { max-width: 480px; margin: 32px auto; }
.notfound { text-align: center; margin: 40px auto; padding: 36px 24px; }
.notfound .nf-code { font-size: 4.5rem; font-weight: 800; line-height: 1; color: var(--accent); opacity: .85; letter-spacing: .04em; }
.notfound h1 { margin: 10px 0 8px; }
.notfound p { color: #555; max-width: 520px; margin: 0 auto 20px; }
.notfound code { background: #f3f4f6; padding: 2px 6px; border-radius: 5px; word-break: break-all; font-size: .9em; }
.notfound .actions { justify-content: center; }

/* Editor */
.editor { display: grid; grid-template-columns: 350px 1fr; gap: 16px; align-items: start; }
.ed-side { display: flex; flex-direction: column; gap: 12px; }
.panel { background: #fff; border-radius: var(--radius); padding: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.panel label { margin-bottom: 8px; }
.tools { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.tools label { display: flex; align-items: center; gap: 6px; margin: 0; border: 1px solid var(--line); border-radius: 8px; padding: 7px 8px; font-size: .85rem; cursor: pointer; }
.tools label:has(input:checked) { border-color: var(--accent); background: var(--accent-tint, #fbeff1); color: var(--accent); }
.btnrow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cat-row { display: grid; grid-template-columns: 36px minmax(0,1fr) 26px 30px; gap: 5px; align-items: center; margin-bottom: 6px; }
.cat-row input { margin: 0; padding: 6px 7px; min-width: 0; } .cat-row input[type=color] { width: 36px; padding: 2px; } .cat-row .eur { display: flex; align-items: center; gap: 3px; } .cat-row .eur input { text-align: right; }
.ed-main { position: sticky; top: 8px; }
.ed-stats { background: #fff; border-radius: 10px; padding: 8px 12px; font-size: .88rem; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.warn-t { color: var(--warn); }
.ed-map { max-height: calc(100vh - 150px); overflow: auto; touch-action: none; }

/* Einlass */
.ci-res { border-radius: var(--radius); padding: 18px 20px; margin: 10px 0; color: #fff; }
.ci-res h2 { margin: 0 0 6px; font-size: 1.6rem; }
.ci-res.ok { background: var(--ok); } .ci-res.bad { background: var(--bad); } .ci-res.warn { background: var(--warn); } .ci-res.info { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.ci-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding: 8px 0; }
.ci-log { list-style: none; padding: 0; font-size: .9rem; } .ci-log li { padding: 5px 10px; border-left: 4px solid #ccc; background: #fff; margin-bottom: 4px; border-radius: 4px; }
.ci-log li.ok { border-color: var(--ok); } .ci-log li.bad { border-color: var(--bad); } .ci-log li.warn { border-color: var(--warn); }
#ci-video { width: 100%; max-height: 320px; border-radius: 10px; margin-top: 10px; background: #000; }

/* Toasts */
#toasts { position: fixed; top: 14px; right: 14px; z-index: 100; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 28px)); }
.toast { background: #1f2328; color: #fff; padding: 11px 14px; border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.2); transition: opacity .5s; font-size: .92rem; }
.toast.err { background: #b3261e; } .toast.ok { background: #1e7b34; } .toast.info { background: #1c4f9b; } .toast.hide { opacity: 0; }

/* Mobil */
@media (max-width: 900px) {
  .editor { grid-template-columns: 1fr; } .ed-main { position: static; order: -1; } .ed-map { max-height: none; }
}
@media (max-width: 640px) {
  .cart-info strong { font-size: .95rem; white-space: nowrap; }
  h1 { font-size: 1.45rem; } .hero { padding: 22px 18px; } .hero h1 { font-size: 1.5rem; }
  .brand-text strong { font-size: .98rem; } .brand-mark { width: 34px; height: 34px; }
  .event-card { grid-template-columns: 1fr; } .event-media { min-height: 90px; }
  .datebox { display: flex; gap: 8px; align-items: baseline; padding: 12px; } .datebox .day { font-size: 1.8rem; } .datebox span { display: inline !important; }
  .event-foot .btn { margin-left: 0; width: 100%; }
  .event-head { flex-direction: column; } .event-img { width: 100%; max-width: 100%; }
  .map-wrap { padding: 12px 4px 16px; margin: 0 -8px; border-radius: 0; }
  .seatgrid { gap: 3px 2px; }
  .cart-inner { gap: 10px; } .cart-total { font-size: 1.1rem; } .cartbar .btn { padding: 10px 12px; }
  .grid2 { grid-template-columns: 1fr; }
  .ticket { flex-direction: column; } .t-qr { width: 100%; border-left: 0; border-top: 2px dashed var(--line); } .t-qr svg { width: 180px; }
  table.list.cards thead { display: none; } table.list.cards tr { display: block; border-bottom: 1px solid var(--line); padding: 6px 0; } table.list.cards td { display: block; border: 0; padding: 4px 12px; }
  table.list.cards td[data-l]::before { content: attr(data-l) ": "; font-weight: 600; color: var(--muted); font-size: .8rem; }
}
@media print {
  .site-header, .site-footer, .testbar, .no-print, #toasts { display: none !important; }
  body { background: #fff; } .ticket { box-shadow: none; border: 1px solid #999; border-left: 8px solid #000; margin-bottom: 10mm; }
}

/* ===== Version 2: Termine, Preisklassen, Abendkasse, Benutzer ===== */
.nav a.active { background: rgba(255,255,255,.22); }
.nav a.me { border: 1px solid rgba(255,255,255,.35); } .nav a.me small { opacity: .8; }
.step { font-size: 1.1rem; margin: 14px 0 6px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; align-items: end; }
label.check.bottom { margin-bottom: 20px; }
.btn.block { width: 100%; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.card-head h2 { margin: 0; }
.table-wrap.flat { box-shadow: none; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; }
.badge.ok { background: #e2f5e8; color: #17692f; } .badge.warn { background: #fff0d9; color: #8a5100; } .badge.err { background: #fde4e4; color: #9b1c1c; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 6px 0 12px; border-bottom: 2px solid var(--line); }
.tabs button { border: 0; background: none; font: inherit; font-weight: 600; padding: 8px 14px; cursor: pointer; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); }
.tabs button b { background: var(--accent); color: #fff; border-radius: 999px; padding: 0 7px; font-size: .75rem; margin-left: 4px; } .tabs button b:empty { display: none; }
.tabs.sm { margin: 8px 0; } .tabs.sm button { padding: 4px 10px; font-size: .85rem; }
.filters select, .filters input { width: auto; min-width: 180px; margin: 0; } .filters input[type=search] { min-width: 260px; }

/* Startseite: Termin-Chips */
.event-card { border-top: 5px solid var(--ev, var(--accent)); }
.event-media { background: #fff; padding: 10px; } .event-media img { object-fit: contain; max-height: 190px; }
.date-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.date-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 9px; text-decoration: none; color: var(--ink); background: #faf8f6; font-size: .92rem; }
.date-chip:hover { border-color: var(--accent); background: var(--accent-tint, #fbeff1); }
.date-chip b { color: var(--accent); }

/* Veranstaltung: Terminliste */
.dates-list { display: grid; gap: 8px; margin-bottom: 16px; }
.date-row { display: grid; grid-template-columns: minmax(200px, 1.3fr) 1fr auto; gap: 12px; align-items: center; background: #fff; border-radius: var(--radius); padding: 12px 16px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.dr-date { display: flex; flex-direction: column; } .dr-day { font-weight: 800; font-size: 1.08rem; color: var(--accent); } .dr-time { color: var(--muted); font-size: .92rem; }
.price-table td, .price-table th { white-space: nowrap; }
.event-img { background: #fff; object-fit: contain; padding: 6px; }
.event-head.compact { align-items: center; }
.event-logo { width: 110px; height: 110px; object-fit: contain; background: #fff; border-radius: 12px; padding: 6px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.date-switch { display: inline-flex; align-items: center; gap: 8px; margin: 4px 0 0; font-weight: 600; } .date-switch select { width: auto; margin: 0; }
.cart-card { margin-top: 16px; } .pc-sel { margin: 0; padding: 6px 8px; min-width: 170px; }
.lg i.blk { background: repeating-linear-gradient(45deg, #9ca3af 0 3px, #e5e7eb 3px 6px); }
.seat.blk { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.6) 0 3px, transparent 3px 7px); color: #111; }

/* Kasse / Bestellung */
.kasse-ev-head, .order-ev { display: flex; gap: 14px; align-items: center; margin-bottom: 6px; }
.kasse-ev-head img, .order-ev img { width: 84px; height: 84px; object-fit: contain; border-radius: 10px; background: #fff; border: 1px solid var(--line); padding: 4px; }
.kasse-ev-head h2, .order-ev h2 { margin: 0; }
.methods { display: grid; gap: 8px; margin: 6px 0 14px; }
.method { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 12px; cursor: pointer; font-weight: 400; margin: 0; }
.method:has(input:checked) { border-color: var(--accent); background: var(--accent-tint, #fbeff1); }
.method input { margin-top: 4px; } .method span { display: flex; flex-direction: column; } .method small { color: var(--muted); }
.check-icon.wait { background: var(--warn); font-size: 26px; }
.confirm.cancelled h1 { color: var(--bad); }
.bank-grid { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: start; }
.bank dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; } .bank dt { color: var(--muted); } .bank dd { margin: 0; word-break: break-word; }
.epc { text-align: center; width: 180px; } .epc svg { width: 170px; height: auto; display: block; margin: 0 auto 4px; }

/* Ticket mit Logo */
.ticket { border-left-color: var(--ev, var(--accent)); }
.t-logo { width: 150px; flex: 0 0 150px; display: grid; place-items: center; padding: 12px; background: linear-gradient(180deg, #fff, #faf7f4); border-right: 1px solid var(--line); }
.t-logo img { max-width: 100%; max-height: 150px; object-fit: contain; }
.ticket .t-title { font-size: 1.45rem; color: var(--ev, var(--ink)); } .ticket .t-when { color: var(--ev, var(--accent)); font-size: 1.05rem; }

/* Admin: Dashboard / Veranstaltung */
.adm-ev { border-top: 5px solid var(--ev, var(--accent)); }
.adm-ev-head { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.adm-ev-head img, .adm-ev-head .noimg { width: 72px; height: 72px; object-fit: contain; border-radius: 10px; border: 1px solid var(--line); background: #fff; padding: 3px; }
.noimg { display: grid; place-items: center; font-size: .7rem; color: var(--muted); }
.adm-ev-t { flex: 1; min-width: 200px; } .adm-ev-t h2 { margin: 0; }
.adm-ev-head .actions { margin-left: auto; }
.ev-admin .card h2 { margin-top: 0; }
.logo-prev { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; } .logo-prev .thumb { max-width: 160px; max-height: 120px; object-fit: contain; border: 1px solid var(--line); padding: 4px; background: #fff; margin: 0; }
#dates .dtf input { padding: 6px 8px; }
/* Datumsfelder TT.MM.JJJJ + HH:MM mit kleinem Kalender */
.dtf { display: flex; align-items: center; gap: 4px; margin-top: 4px; flex-wrap: nowrap; }
.dtf input { margin: 0; }
.dtf input.dtf-d { width: 8.6em; flex: 0 0 auto; }
.dtf input.dtf-t { width: 5.6em; flex: 0 0 auto; }
.dtf input.invalid { border-color: var(--bad); background: #fff5f5; }
.dtf-cal { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid #cfd4da; border-radius: 8px; background: #fff; color: var(--muted); cursor: pointer; padding: 0; }
.dtf-cal:hover { background: #f3f4f6; color: var(--accent); }
.filters .dtf { margin: 0; } .filters .dtf input { min-width: 0; }
.dtf-pop { position: absolute; z-index: 1000; width: 260px; background: #fff; border: 1px solid #d0d4da; border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.16); padding: 8px; font-size: .9rem; font-weight: 400; }
.dtf-pop .hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.dtf-pop .hd button, .dtf-pop .ft button { border: 1px solid #e0e3e7; background: #fff; border-radius: 6px; padding: 3px 10px; cursor: pointer; font: inherit; }
.dtf-pop .gr { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dtf-pop .gr span { text-align: center; font-size: .75rem; color: var(--muted); padding: 2px 0; }
.dtf-pop .gr button { border: 0; background: none; padding: 6px 0; border-radius: 6px; cursor: pointer; font: inherit; }
.dtf-pop .gr button:hover { background: #f1f2f4; }
.dtf-pop .gr button.today { box-shadow: inset 0 0 0 1px var(--accent); }
.dtf-pop .gr button.sel { background: var(--accent); color: #fff; }
.dtf-pop .ft { text-align: center; margin-top: 6px; }
.date-form { border-top: 1px solid var(--line); padding-top: 12px; } .date-form h3 { margin-bottom: 8px; }
table.matrix { border-collapse: collapse; width: 100%; }
table.matrix th, table.matrix td { border-bottom: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; }
table.matrix thead th { background: #fafafa; min-width: 170px; }
table.matrix th.cat { white-space: nowrap; font-weight: 600; }
.pc-name { margin: 0 0 6px; font-weight: 700; }
.pc-flags { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .8rem; font-weight: 400; }
.pc-flags label { display: inline-flex; gap: 4px; align-items: center; margin: 0; font-weight: 400; font-size: .8rem; }
.pc-flags .btn { margin-left: auto; padding: 2px 8px; }
table.matrix .eur { display: flex; align-items: center; gap: 4px; } table.matrix .price { margin: 0; text-align: right; max-width: 110px; }

/* Bestellungen */
table.orders td.seats { max-width: 320px; }
.seat-tag { display: inline-block; background: #f3f4f6; border-radius: 6px; padding: 1px 6px; margin: 1px 0; font-size: .8rem; white-space: nowrap; }
.seat-tag.x { text-decoration: line-through; opacity: .6; } .seat-tag.used { background: #e1ecfb; }
table.list tr.x td { opacity: .55; }
table.orders td.acts { max-width: 250px; } table.orders .btn.primary { white-space: normal; text-align: left; }

/* Abendkasse */
.bo { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.bo-side { position: sticky; top: 8px; } .bo-side .card { padding: 16px; } .bo-side h2 { margin-top: 0; }
.bo-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.1rem; margin: 6px 0 12px; } .bo-total b { font-size: 1.6rem; }
.ok-card { border: 2px solid var(--ok); } .ok-card h2 { color: var(--ok); } .bo-cash { font-size: 1.2rem; } .bo-cash b { font-size: 1.5rem; }
.bo-my { list-style: none; padding: 0; margin: 0; font-size: .88rem; max-height: 320px; overflow: auto; }
.bo-my li { display: flex; justify-content: space-between; gap: 6px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); } .bo-my li.x { opacity: .5; }

/* Bericht */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi { background: #fff; border-radius: var(--radius); padding: 14px 16px; box-shadow: 0 1px 3px rgba(0,0,0,.08); } .kpi span { display: block; color: var(--muted); font-size: .85rem; } .kpi b { font-size: 1.5rem; }
table.list tr.sum td { font-weight: 700; background: #fafafa; }

/* Benutzer */
.roles-info { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.roles-info div { background: #fff; border-radius: 10px; padding: 10px 14px; box-shadow: 0 1px 3px rgba(0,0,0,.06); } .roles-info b { display: block; } .roles-info span { font-size: .85rem; color: var(--muted); }
.badge.role-admin { background: var(--accent-soft, #fde4e4); color: var(--accent); } .badge.role-kassier { background: #e1ecfb; color: #1c4f9b; } .badge.role-verkaeufer { background: #e2f5e8; color: #17692f; }
dialog { border: 0; padding: 0; border-radius: var(--radius); width: min(620px, calc(100vw - 24px)); background: transparent; } dialog::backdrop { background: rgba(0,0,0,.4); } dialog .card { margin: 0; }

/* Einstellungen / Protokolle */
.settings .card h2 { margin-top: 0; }
.sticky-save { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding: 14px 0; }
.btnrow input[type=email] { width: auto; flex: 1; min-width: 200px; margin: 0; }
.maillog { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
tr.click { cursor: pointer; } tr.click:hover td, tr.active td { background: var(--accent-tint, #fbeff1); }
.mail-view { position: sticky; top: 8px; } .mail-meta { font-size: .9rem; }
.mail-view iframe { width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.mail-view pre { white-space: pre-wrap; font-size: .85rem; background: #fafafa; padding: 12px; border-radius: 8px; max-height: 70vh; overflow: auto; }

@media (max-width: 1000px) {
  .bo { grid-template-columns: 1fr; } .bo-side { position: static; }
  .maillog { grid-template-columns: 1fr; }
  .grid4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .date-row { grid-template-columns: 1fr; gap: 6px; } .date-row .btn { width: 100%; }
  .event-logo { width: 72px; height: 72px; } .event-head.compact { flex-direction: row; gap: 12px; }
  .pc-sel { min-width: 0; width: 100%; } .cart-card { padding: 12px; } .cart-card .seats-table td { font-size: .88rem; }
  .bank-grid { grid-template-columns: 1fr; } .epc { width: 100%; }
  .t-logo { width: 100%; flex: none; border-right: 0; border-bottom: 1px solid var(--line); } .t-logo img { max-height: 110px; }
  .kpis, .roles-info { grid-template-columns: 1fr 1fr; } .grid4, .grid3 { grid-template-columns: 1fr; }
  .filters select, .filters input { width: 100%; min-width: 0; }
  td.acts { padding-top: 8px !important; }
}
@media print {
  .ticket { border-left: 8px solid var(--ev, #000); page-break-inside: avoid; }
  .t-logo { border-right: 1px solid #ccc; }
  body.admin .page-head .actions, .filters, .tabs { display: none !important; }
}
.event-head > div { min-width: 0; flex: 1; } .event-head h1 { overflow-wrap: anywhere; }
.date-switch { flex-wrap: wrap; max-width: 100%; } .date-switch select { max-width: 100%; }
body.cart-active main.container { padding-bottom: 110px; }
.lg { flex-wrap: wrap; } .lg small { white-space: normal; }
@media (max-width: 640px) {
  .legend .lg { flex-basis: 100%; white-space: nowrap; }
  .cart-card .seats-table thead { display: none; }
  .cart-card .seats-table tr, #bo-rows tr { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px 8px; align-items: center; border-bottom: 1px solid var(--line); padding: 8px 0; }
  .cart-card .seats-table td, #bo-rows td { border: 0; padding: 0; }
  .cart-card .seats-table td:first-child, #bo-rows td:first-child { grid-column: 1 / -1; font-weight: 600; }
}
#bo-rows tr { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px 8px; align-items: center; border-bottom: 1px solid var(--line); padding: 8px 0; }
#bo-rows td { border: 0; padding: 0; } #bo-rows td:first-child { grid-column: 1 / -1; font-weight: 600; }
body.admin .hdr { max-width: 1500px; flex-wrap: nowrap; } body.admin .nav { justify-content: flex-end; }
body.admin .nav a { padding: 6px 8px; font-size: .9rem; }
@media (max-width: 1100px) { body.admin .hdr { flex-wrap: wrap; } }
.maillog td:first-child, #audit td:first-child { white-space: nowrap; }
#report .card h2, .settings .card h2, .bank h2 { margin-top: 0; }
table.list .mono { white-space: nowrap; }
[hidden] { display: none !important; }
.brand { flex-shrink: 0; } .brand-text strong { white-space: nowrap; }
@media (max-width: 1500px) { body.admin .nav a.me small { display: none; } }
body.admin .nav { gap: 2px; } body.admin .nav a { padding: 5px 6px; font-size: .86rem; }
@media (min-width: 1101px) { body.admin .nav { flex-wrap: nowrap; white-space: nowrap; } }
.sticky-save { position: static; background: none; padding: 4px 0 10px; }

/* ---------- v3: Logo, Verkaufskanäle, Rolle Abendkasse ---------- */
.brand-mark { overflow: hidden; flex: 0 0 auto; }
.brand-mark.has-logo { background: #fff; padding: 3px; }
.brand-mark.has-logo img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 7px; }
.brand-mark.big { width: 96px; height: 96px; border-radius: 18px; font-size: 2.2rem; background: var(--accent); color: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.brand-mark.big.has-logo { background: #fff; border: 1px solid var(--line); padding: 6px; }
.logo-row { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.logo-ctrl { flex: 1 1 320px; } .logo-ctrl .btnrow { align-items: center; }
.badge.role-abendkasse { background: #f1e4fb; color: #5b2a86; } .badge.role-obmann { background: #fdf0d5; color: #7a4b00; }
.badge.ch-online { background: #e1ecfb; color: #1c4f9b; }
.badge.ch-barverkauf { background: #e2f5e8; color: #17692f; }
.badge.ch-abendkasse { background: #f1e4fb; color: #5b2a86; }
h1 .badge { vertical-align: middle; font-size: .8rem; }
.seg { display: inline-flex; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.seg .btn { border-radius: 0; border: 0; margin: 0; }
.seg .btn + .btn { border-left: 1px solid var(--line); }
.bo-ch-hint { margin: -6px 0 12px; }
.kpi.ch-barverkauf { border-top: 3px solid #17692f; } .kpi.ch-abendkasse { border-top: 3px solid #5b2a86; }
.role-hint { margin: -4px 0 10px; min-height: 1.2em; }
.pc-flags .badge { font-size: .7rem; }
.seg .btn.primary, .seg .btn.primary:hover { background: var(--accent); color: #fff; }
.prefix-hint { align-self: end; margin: 0 0 14px; }
#prefix-example { white-space: nowrap; }

/* ---------- v5: Mobil – Menü, Tabellen, Einlass ---------- */
.nav-toggle { display: none; }
@media (max-width: 900px) {
  body.admin .hdr { flex-wrap: wrap; row-gap: 6px; }
  body.admin .nav-toggle { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.35);
    border-radius: 9px; padding: 9px 14px; font: inherit; font-weight: 600; cursor: pointer; min-height: 44px; }
  body.admin .nav { display: none; flex-basis: 100%; flex-direction: column; gap: 2px; padding: 4px 0 6px; white-space: normal; }
  body.admin .hdr.nav-open .nav { display: flex; }
  body.admin .nav a { padding: 12px 12px; font-size: 1rem; border-radius: 8px; }
  body.admin .nav a.me small { display: inline; }
}
@media (max-width: 640px) {
  .table-wrap:not(.flat) { margin: 0 -8px; border-radius: 0; }
  .table-wrap > table.list:not(.cards) { min-width: 560px; }
  .table-wrap > table.list:not(.cards) td, .table-wrap > table.list:not(.cards) th { padding: 8px 10px; }
  .btn { min-height: 42px; } .btn.sm { min-height: 36px; }
  input, select, textarea { font-size: 16px; }   /* verhindert automatisches Hineinzoomen in iOS Safari */
  .page-head { flex-wrap: wrap; } .page-head .actions { width: 100%; }
  .date-switch, .date-switch select { width: 100%; }
}
.table-wrap.flat { overflow-x: auto; }
.price-table { min-width: 320px; }

.zoom-ctl { display: flex; justify-content: flex-end; align-items: center; gap: 6px; margin: 4px 0 6px; }
.zoom-ctl .btn { min-width: 40px; font-size: 1.05rem; }
.map-wrap.zoomable { touch-action: pan-x pan-y; overscroll-behavior-x: contain; }
.bo-sticky { display: none; }
@media (max-width: 1000px) {
  .bo-sticky:not([hidden]) { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: #1f2328; color: #fff; box-shadow: 0 -4px 16px rgba(0,0,0,.2); font-size: 1.05rem; }
  .bo-sticky .btn { min-height: 46px; }
  body.bo-has-sel main.container { padding-bottom: 90px; }
  .bo-side .btn.big { min-height: 54px; }
  #bo-rows .pc-sel { min-height: 44px; }
  #bo-rows [data-rm] { min-width: 44px; min-height: 44px; }
}
/* Einlass */
.ci-top { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-end; justify-content: space-between; }
.ci-date-l { flex: 1 1 320px; margin: 0; font-size: 1rem; } .ci-date-l select { min-height: 48px; font-size: 1rem; }
.ci-counter { flex: 0 1 280px; min-width: 220px; }
.ci-count { font-size: 1.5rem; } .ci-count b { font-size: 2rem; color: var(--ok); } .ci-count b + b, .ci-count #ci-sold { color: var(--ink); }
.ci-bar { height: 8px; background: #e5e7eb; border-radius: 6px; overflow: hidden; margin: 4px 0 2px; } .ci-bar i { display: block; height: 100%; background: var(--ok); transition: width .4s; }
.ci-tabs { display: flex; width: 100%; margin: 12px 0; } .ci-tabs .btn { flex: 1; min-height: 50px; font-size: 1rem; }
.ci-grid { display: block; }
@media (min-width: 1100px) {
  .ci-tabs { display: none; }
  .ci-grid { display: grid; grid-template-columns: minmax(380px, 460px) 1fr; gap: 18px; align-items: start; margin-top: 14px; }
  .ci-grid > section[hidden] { display: block !important; }
}
.ci-cam h2 { margin-top: 0; }
.ci-video-wrap { position: relative; background: #000; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; margin-bottom: 10px; }
.ci-video-wrap video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ci-frame { position: absolute; inset: 14% 22%; border: 3px solid rgba(255,255,255,.9); border-radius: 16px; box-shadow: 0 0 0 999px rgba(0,0,0,.28); pointer-events: none; }
.ci-cam-status { position: absolute; left: 0; right: 0; top: 0; padding: 8px 12px; background: linear-gradient(rgba(0,0,0,.6), transparent); color: #fff; font-weight: 600; text-align: center; }
.ci-cam-tools { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 8px; justify-content: center; padding: 10px; background: linear-gradient(transparent, rgba(0,0,0,.55)); }
.ci-cam-tools .btn { min-height: 46px; background: rgba(255,255,255,.92); }
.ci-opts { display: flex; gap: 18px; margin: 10px 0 4px; } .ci-opts label { margin: 0; }
#ci-code { min-height: 50px; font-size: 1.1rem; letter-spacing: .03em; }
.ci-flash { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 24px; color: #fff; text-align: center; cursor: pointer; animation: ciIn .12s ease-out; }
.ci-flash.ok { background: #138a36; } .ci-flash.bad { background: #c62828; } .ci-flash.warn { background: #e65100; }
.ci-flash-icon { font-size: clamp(5rem, 22vw, 9rem); line-height: 1; font-weight: 800; }
.ci-flash-title { font-size: clamp(2.2rem, 9vw, 4.2rem); font-weight: 800; letter-spacing: .02em; margin: 8px 0 14px; line-height: 1.05; }
.ci-flash-sub { font-size: clamp(1.1rem, 4.6vw, 1.6rem); white-space: pre-line; line-height: 1.35; max-width: 820px; margin: 0 auto; }
.ci-flash-hint { margin-top: 26px; opacity: .8; font-size: .95rem; }
@keyframes ciIn { from { transform: scale(1.04); } to { transform: none; } }
.ci-kpis { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.ci-kpis .k { background: #f3f4f6; border-radius: 8px; padding: 6px 10px; } .ci-kpis .k b { font-size: 1.15rem; margin-right: 3px; }
.ci-kpis .k.ok { background: #e2f5e8; color: #17692f; } .ci-kpis .k.warn { background: #fff4d6; color: #7a4d00; }
.seat.ci-free { background: #fff; color: #9ca3af; box-shadow: inset 0 0 0 1.5px #cbd5e1; }
.seat.ci-sold { background: #2563eb; color: #fff; }
.seat.ci-arrived { background: #16a34a; color: #fff; box-shadow: inset 0 0 0 2px #0b5d27; }
.seat.ci-pending { background: #fbbf24; color: #5b3b00; }
.seat.ci-blocked { background: repeating-linear-gradient(45deg, #9ca3af 0 3px, #e5e7eb 3px 6px); color: #374151; }
.lg i.ci-free { background: #fff; box-shadow: inset 0 0 0 1.5px #cbd5e1; } .lg i.ci-sold { background: #2563eb; } .lg i.ci-arrived { background: #16a34a; }
.lg i.ci-pending { background: #fbbf24; }
.ci-seat-act { margin-top: 6px; } .ci-top .ci-past { flex-basis: 100%; margin: 6px 0 0; } .lg i.ci-blocked { background: repeating-linear-gradient(45deg, #9ca3af 0 3px, #e5e7eb 3px 6px); }
.ci-seat-info { margin-top: 10px; background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.ci-res .ci-row .btn { min-height: 44px; }
@media (max-width: 640px) {
  .ci-counter { flex-basis: 100%; }
  .ci-page h1 { display: none; }
  #ci-recent { min-width: 520px; }
}
.ci-flash-big { display: inline-block; background: #fff; color: #7c2d00; font-weight: 800; font-size: clamp(1.35rem, 6vw, 2.3rem); line-height: 1.2; padding: 10px 18px; border-radius: 12px; margin: 0 0 14px; box-shadow: 0 4px 18px rgba(0,0,0,.25); }
/* Grid-Spalten dürfen schmaler als ihr Inhalt werden (Saalplan scrollt dann innen) */
.bo > *, .editor > *, .ci-grid > * { min-width: 0; }
@media (max-width: 1000px) { .bo, .editor { grid-template-columns: minmax(0, 1fr); } }

/* ===== Kassabericht: offene (noch nicht bezahlte) Bestellungen – optisch getrennt von den Einnahmen ===== */
.open-orders { border-top: 4px solid var(--warn); }
.open-orders h2 small { font-weight: 400; font-size: .9rem; }
.open-kpis { margin: 10px 0 14px; }
.open-kpis .kpi { background: #fff8ec; box-shadow: none; border: 1px solid #f3dfbd; }
.open-kpis .kpi.due b { color: var(--warn); }
table.list tr.due-soon td { background: #fff4e0; }
table.list tr.due-overdue td { background: #fde4e4; }
.nowrap { white-space: nowrap; }
.print-only { display: none; }
@media print {
  .print-only { display: block; }
  .open-list tr { page-break-inside: avoid; }
  table.list tr.due-soon td, table.list tr.due-overdue td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (max-width: 640px) {
  table.list.open-list tr.sum td:empty { display: none; }
  table.list.open-list td.r { text-align: left; }
}
/* Freigaben-Liste: Datumsfilter Freigabe / Bestellung als Gruppen */
.filters fieldset.dfl { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px 8px; margin: 0; }
.filters fieldset.dfl legend { font-size: .8rem; font-weight: 600; color: var(--muted); padding: 0 4px; }
table.rel-list tr.sum td { font-weight: 600; }
@media (max-width: 700px) { .filters fieldset.dfl { width: 100%; } .filters fieldset.dfl label { flex: 1 1 140px; } table.list.cards.rel-list tr.sum td:not([data-l]) { display: none; } }
/* Protokoll: Spalte „Erneut senden“ (Administrator und Kassier) */
.maillog { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
#mails td.acts { width: 190px; min-width: 190px; } #mails td.acts .btn { display: block; width: 100%; margin: 0 0 4px; white-space: normal; line-height: 1.25; font-size: .78rem; padding-left: 8px; padding-right: 8px; }
#mails td:first-child { white-space: normal; min-width: 5.5em; }
#mails .resend-hint { display: block; white-space: normal; max-width: 210px; line-height: 1.3; }
@media (max-width: 900px) { #mails td.acts { min-width: 0; } #mails td.acts .btn { display: inline-block; width: auto; margin: 2px 4px 2px 0; } #mails .resend-hint { max-width: none; } }
/* E-Mail-Protokoll: Suche + Seiten */
.ml-search { align-items: flex-end; gap: 8px; } .ml-search label.grow { flex: 1 1 260px; } .ml-search input[type=search] { width: 100%; margin: 0; }
.ml-search .ml-count { flex-basis: 100%; } .pager { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; margin: 10px 0; }
@media (max-width: 700px) { .ml-search .btn { flex: 1 1 auto; } .pager .btn { flex: 1 1 40%; } .pager span { order: -1; flex-basis: 100%; text-align: center; } }
.ml-col { min-width: 0; }
@media (max-width: 900px) { .maillog { grid-template-columns: minmax(0, 1fr); } }
/* Einlass: Hinweis falscher Termin bei Bestellnummer */
.ci-wrongdate { font-size: 1.05rem; }
/* Sitzplatzliste – kompakt, druckfreundlich A4 */
.sl-form { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: flex-end; }
.sl-form fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px 8px; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: flex-end; min-width: 0; }
.sl-form legend { font-size: .85rem; font-weight: 700; padding: 0 4px; }
.sl-form label { margin: 0; } .sl-form select { margin: 0; width: auto; min-width: 150px; max-width: 100%; } .sl-form .sl-dir select { min-width: 0; }
.sl-form .sl-date select { min-width: 260px; } .sl-form label.check { display: flex; gap: 6px; align-items: center; font-weight: 400; }
.sl-sheet { background: #fff; border-radius: var(--radius); padding: 12px 14px; margin-top: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.sl-head h2 { margin: 0 0 2px; font-size: 1.15rem; } .sl-sum { margin: 0; font-size: .9rem; } .sl-meta { margin: 2px 0 8px; font-size: .78rem; color: #555; }
.sl-table { width: 100%; border-collapse: collapse; font-size: .8rem; line-height: 1.25; }
.sl-table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .02em; border-bottom: 1.5px solid #333; padding: 3px 5px; white-space: nowrap; }
.sl-table td { border-bottom: 1px solid #e3e3e3; padding: 2px 5px; vertical-align: top; } .sl-table .c { text-align: center; } .sl-table .nowrap { white-space: nowrap; }
.sl-table tbody tr:nth-child(even) td { background: #f7f7f8; }
.sl-table tr.sl-open td { color: #8a4b00; } .sl-table tr.sl-blocked td { color: #777; font-style: italic; }
.sl-old { display: inline-block; background: #0b57b8; color: #fff; border-radius: 4px; padding: 0 4px; font-size: .68rem; font-weight: 700; font-style: normal; line-height: 1.4; }
.sl-imp { display: inline-block; border: 1px solid #0b57b8; color: #0b57b8; border-radius: 4px; padding: 0 3px; font-size: .64rem; font-weight: 700; font-family: inherit; line-height: 1.3; }
.sl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sl-legend { margin: 0 0 6px; font-size: .78rem; } .sl-legend .lg i { width: 13px; height: 13px; }
/* Zeilenfarben wie im Einlass-Saalplan: blau = bezahlt, noch nicht da · gelb = offen/unbezahlt · grün = eingelassen (Streifen in Saalplanfarbe + helle Fläche) */
.sl-table tr.sl-st-sold td { background: #e3ecfd !important; } .sl-table tr.sl-st-sold td:first-child { box-shadow: inset 5px 0 0 #2563eb; }
.sl-table tr.sl-st-arrived td { background: #dcf5e4 !important; } .sl-table tr.sl-st-arrived td:first-child { box-shadow: inset 5px 0 0 #16a34a; }
.sl-table tr.sl-st-pending td { background: #fdf1cc !important; } .sl-table tr.sl-st-pending td:first-child { box-shadow: inset 5px 0 0 #fbbf24; }
.sl-table tr.sl-st-blocked td:first-child { box-shadow: inset 5px 0 0 #9ca3af; }
@media (max-width: 700px) {
  .sl-form .sl-date, .sl-form .sl-date select, .sl-form fieldset { width: 100%; } .sl-form select { min-width: 0; } .sl-form .sl-go, .sl-form .sl-go .btn { width: 100%; }
  .sl-form .sl-sort label { flex: 1 1 56%; } .sl-form .sl-sort label.sl-dir { flex: 1 1 36%; } .sl-form .sl-sort select { width: 100%; }
  .sl-sheet { padding: 10px 8px; }
  /* Handy: jede Zeile als kompakter Block – Zeile 1: Reihe · Platz · Name · ✓, Zeile 2: Kat. · Tarif · Status, Zeile 3: Bestellnr. */
  .sl-table thead { display: none; } .sl-table, .sl-table tbody { display: block; } .sl-table { font-size: .85rem; }
  .sl-table tr { display: grid; grid-template-columns: 5.6em 4.2em minmax(0, 1fr) auto; column-gap: 6px; padding: 5px 2px 5px 9px; border-bottom: 1px solid #e3e3e3; }
  .sl-table tr.sl-st-sold { background: #e3ecfd !important; box-shadow: inset 5px 0 0 #2563eb; } .sl-table tr.sl-st-arrived { background: #dcf5e4 !important; box-shadow: inset 5px 0 0 #16a34a; }
  .sl-table tr.sl-st-pending { background: #fdf1cc !important; box-shadow: inset 5px 0 0 #fbbf24; } .sl-table tr.sl-st-blocked { box-shadow: inset 5px 0 0 #9ca3af; }
  .sl-table tr[class*="sl-st-"] td { background: none !important; box-shadow: none !important; }
  .sl-table tbody tr:nth-child(even) { background: #f7f7f8; } .sl-table tbody tr:nth-child(even) td { background: none; }
  .sl-table td { border: 0; padding: 0; text-align: left !important; }
  .sl-table td:nth-child(1) { grid-area: 1 / 1; white-space: nowrap; font-weight: 600; } .sl-table td:nth-child(2) { grid-area: 1 / 2; font-weight: 600; }
  .sl-table td:nth-child(5) { grid-area: 1 / 3; font-weight: 600; overflow-wrap: anywhere; } .sl-table td:nth-child(8) { grid-area: 1 / 4; font-weight: 700; color: #138a36; }
  .sl-table td:nth-child(3) { grid-area: 2 / 1; font-size: .78rem; } .sl-table td:nth-child(4) { grid-area: 2 / 2 / 3 / 4; font-size: .78rem; white-space: normal; }
  .sl-table td:nth-child(7) { grid-area: 2 / 4; font-size: .78rem; } .sl-table td:nth-child(6) { grid-area: 3 / 2 / 4 / 5; font-size: .76rem; color: #444; }
  .sl-table td[colspan] { grid-column: 1 / 5; }
}
@media print {
  @page { size: A4; margin: 10mm 8mm; }
  body.seatlist-page main.container { max-width: none; padding: 0; margin: 0; }
  body.seatlist-page .sl-sheet { box-shadow: none; padding: 0; margin: 0; }
  .sl-head h2 { font-size: 12pt; } .sl-sum { font-size: 8.5pt; } .sl-meta { font-size: 7.5pt; margin-bottom: 3pt; }
  .sl-table { font-size: 7.6pt; line-height: 1.15; } .sl-table th { font-size: 6.8pt; padding: 1pt 3pt; } .sl-table td { padding: .6pt 3pt; }
  .sl-table thead { display: table-header-group; } .sl-table tr { page-break-inside: avoid; break-inside: avoid; }
  .sl-table tbody tr:nth-child(even) td, .sl-old, .sl-table tr[class*="sl-st-"], .sl-table tr[class*="sl-st-"] td, .sl-legend i { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sl-wrap { overflow: visible; }
}

/* Zahlungserinnerung (Kassabericht, Administrator und Kassier) */
.remind-btn.remind-urgent { background: #c62828; border-color: #b71c1c; color: #fff; }
.remind-btn.remind-urgent:hover { background: #b71c1c; }
.remind-done { font-size: .85rem; color: #555; }
.remind-td .print-only { display: none; }
@media print {
  .remind-btn { display: none !important; }
  .remind-td .print-only { display: inline !important; }
  .remind-td .remind-done { display: none; } /* print-only-Duplikat darunter */
}

/* Bestellungen: Storno-/Verfallsangabe */
.orders .cx-info { display: inline-block; max-width: 15em; line-height: 1.3; color: #6b2a2a; overflow-wrap: anywhere; }
@media (max-width: 700px) { .orders .cx-info { max-width: none; } }
@media print { .orders .cx-info { color: #000; } }

/* Kassabericht: Verkaufstage (Administrator, Kassier, Obleute) */
.sales-days .sd-head { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: baseline; justify-content: space-between; }
.sales-days .sd-list td.r, .sales-days .sd-list th.r { white-space: nowrap; }
.sales-days .sd-list td.zero { color: #9a9a9a; }
.sales-days .sd-list tr.we td:first-child { color: #7a3b3b; }
.sales-days .sd-legend { margin: .75rem 0 0; padding-left: 1.1rem; line-height: 1.45; }
.sales-days .sd-legend li { margin: .15rem 0; }
.sales-days .sd-list td.r { font-variant-numeric: tabular-nums; }
.sales-days .sd-list .sd-total { border-left: 2px solid var(--line); font-weight: 600; }
.sales-days .sd-list .sd-ord { border-right: 2px solid var(--line); }
.sales-days .sd-list td.neg { color: #a12a2a; }
.sales-days .sd-netto { font-weight: 400; }
.sales-days .sd-list td.sd-total.zero { font-weight: 400; }
.sales-days .sd-mobile-hint { display: none; margin: 0 0 .3rem; }
@media (max-width: 700px) {
  .sales-days .sd-mobile-hint { display: block; }
  .card.sales-days { padding-left: 8px; padding-right: 8px; }   /* mehr Platz für 7 Spalten */
  .sales-days .sd-head, .sales-days .sd-mobile-hint, .sales-days .sd-legend { margin-left: 4px; margin-right: 4px; }
  .table-wrap > table.list.sd-list { min-width: 0; font-size: .58rem; }
  .table-wrap > table.list.sd-list th, .table-wrap > table.list.sd-list td { padding: 5px 2px; }
  .sales-days .sd-list .yr2 { display: none; }   /* Handy: Jahr zweistellig (06.10.26) */
  .sales-days .sd-list th, .sales-days .sd-list th.r { font-size: .6rem; letter-spacing: 0; text-transform: none; white-space: normal; line-height: 1.15; hyphens: manual; }
  .sales-days .sd-list .sd-pre, .sales-days .sd-list .cur { display: none; }
  .sales-days .sd-list td .wd { display: block; font-size: .6rem; color: var(--muted); }
  .sales-days .sd-list tr.we td .wd { color: #7a3b3b; }
  .sales-days .sd-list td:first-child, .sales-days .sd-list th:first-child { padding-left: 4px; }
  .sales-days .sd-list td:last-child, .sales-days .sd-list th:last-child { padding-right: 5px; }
  .sales-days .sd-list .sd-total { padding-left: 3px; }
  .sales-days .sd-list .sd-ord { padding-right: 3px; }
}
@media print {
  .sales-days { break-before: auto; }
  .sales-days .sd-list tr { break-inside: avoid; }
  .sales-days .sd-list td.zero { color: #777; }
  .sales-days .no-print { display: none !important; }
}

/* Zahlungsfrist abgelaufen (Administrator und Kassier): kein automatischer Verfall mehr – Hinweis + Knopf „Verfallen“ (08.10.2026) */
.badge.fx-badge { background: #c62828; color: #fff; font-weight: 700; letter-spacing: .01em; }
table.orders tr.fx-overdue td { background: #fff4f4; }
table.orders tr.fx-overdue td:first-child { box-shadow: inset 4px 0 0 #c62828; }
.open-list .expire-btn { display: block; margin-top: 6px; }
@media (max-width: 700px) { .open-list .expire-btn { display: inline-block; margin: 6px 0 0 6px; } }
@media (max-width: 640px) {   /* Karten-Ansicht: ganze Karte hinterlegen */
  table.orders.cards tr.fx-overdue { background: #fff4f4; box-shadow: inset 4px 0 0 #c62828; }
  table.orders.cards tr.fx-overdue td { background: transparent; box-shadow: none; }
}
@media print {
  .expire-btn { display: none !important; }
  .badge.fx-badge { background: none; color: #000; border: 1px solid #000; }
  table.orders tr.fx-overdue td { background: none; box-shadow: none; }
}

/* Rechtstexte (eigene Texte je Installation, recht.php) */
.legal h2 { font-size: 1.15rem; margin: 1.4em 0 .4em; } .legal h2:first-child { margin-top: 0; } .legal h3 { font-size: 1rem; margin: 1.1em 0 .3em; }
.legal p, .legal li { line-height: 1.55; } .legal ul, .legal ol { padding-left: 1.4em; } .legal a { overflow-wrap: anywhere; }
.legal table.kv th { text-align: left; padding: 2px 14px 2px 0; font-weight: 600; vertical-align: top; } .legal table.kv td { padding: 2px 0; }

/* Besteller auf dem Ticket-Abriss: absolut im unteren Rand des Abrisses – Ticket-, Abriss- und QR-Maße bleiben unverändert */
.t-qr { position: relative; }
.t-qr-buyer { position: absolute; left: 6px; right: 6px; bottom: 5px; display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.15; pointer-events: none; }
.t-qr-buyer-l { font-size: 7px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.t-qr-buyer-n { max-width: 100%; font-size: 9px; line-height: 1.12; font-weight: 700; color: var(--ev, var(--ink)); white-space: normal; overflow-wrap: break-word; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; }
@media (max-width: 640px) {   /* Abriss unter dem Ticket, QR mittig: Name links neben dem QR-Code im freien Rand */
  .t-qr-buyer { left: 10px; right: auto; bottom: 10px; width: calc(50% - 90px - 16px); align-items: flex-start; text-align: left; }
  .t-qr-buyer-n { white-space: normal; overflow-wrap: break-word; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
}
@media print { .t-qr-buyer-n { color: #000; } }
/* Kassabericht: zuklappbare Abschnitte (Überschrift + Knopf); Drucken zeigt immer alle Abschnitte vollständig */
#report .rep-head { display: flex; flex-wrap: nowrap; gap: .4rem .8rem; align-items: center; justify-content: space-between; } #report .rep-head h2 { flex: 1 1 auto; min-width: 0; } #report .sec-toggle { flex: 0 0 auto; }
#report .rep-head h2, #report .sd-head h2 { margin: 0; }
#report .sd-head { align-items: center; }
#report .sd-head .sec-actions { order: 9; }
#report .sec-toggle { min-width: 7.5em; } @media (max-width: 560px) { #report .sec-toggle { min-width: 0; } }
#report section.card > .sec-body { margin-top: .8rem; }
#report section.collapsed > .sec-body { display: none; }
#report section.collapsed { padding-bottom: 1rem; }
@media print { #report section.collapsed > .sec-body { display: block; } .sec-toggle { display: none !important; } }
/* Kassabericht: Knöpfe je Abschnitt (CSV, Drucken, auf/zu) rechts neben der Überschrift; Mobil: Überschrift oben, Knöpfe rechtsbündig darunter */
#report .sec-actions { display: flex; gap: 6px; flex: 0 0 auto; align-items: center; margin-left: auto; }
#report .sd-head { flex-wrap: nowrap; }
@media (max-width: 640px) { #report .rep-head, #report .sd-head { flex-wrap: wrap; } #report .rep-head h2, #report .sd-head h2 { flex: 1 1 100%; } #report .sec-actions { margin-left: auto; } }
/* „Anzeigen“ immer am rechten Rand des Filterbereichs */
#rf > button.primary { margin-left: auto; align-self: flex-end; }
@media (max-width: 640px) { #rf > button.primary { min-width: 9em; } }
/* Nur einen Abschnitt drucken */
@media print {
  body.print-section #report > .kpis, body.print-section #report > section.card:not(.print-target) { display: none !important; }
  body.print-section #report > section.print-target { break-before: avoid; }
}
#report td.buyers { min-width: 9em; max-width: 22em; overflow-wrap: anywhere; }
@media print { #report .table-wrap { overflow: visible !important; } #report table.list { width: 100%; font-size: 8.5pt; table-layout: auto; } #report table.list th, #report table.list td { padding: 3px 5px; } #report td.buyers { min-width: 0; max-width: none; } }
@media print { #report table.list small, #report table.list .mono, #report table.list .badge { font-size: 7.5pt; } #report table.list th { font-size: 7pt; letter-spacing: 0; } #report table.list { font-size: 8pt; } }
/* Tickets drucken: immer das Querformat wie am Desktop (auch vom Handy aus, wo das Druck-Layout die schmale Fensterbreite verwendet),
   gleiche Maße wie der Desktop-Druck (728 × 232 px, Abriss 150 px, QR 124 px). Kein Grid beim Drucken: WebKit/Safari (iPhone) hält sich
   bei Grid-Elementen nicht an break-inside: avoid und schneidet Tickets (QR) am Seitenende ab – als Block-Elemente nie geteilt. */
@media print {
  .tickets { display: block; width: 728px; max-width: none; }
  .ticket { display: flex; flex-direction: row; width: 728px; max-width: none; margin: 0 0 10mm; break-inside: avoid; page-break-inside: avoid; -webkit-column-break-inside: avoid; }
  .t-logo { width: 150px; flex: 0 0 150px; border-bottom: 0; border-right: 1px solid #ccc; } .t-logo img { max-height: 150px; }
  .t-qr { width: 150px; flex: 0 0 150px; border-top: 0; border-left: 2px dashed var(--line); } .t-qr svg { width: 100%; }
  .t-qr-buyer { left: 6px; right: 6px; bottom: 5px; width: auto; align-items: center; text-align: center; }
}
/* Tickets drucken: ganzes Ticket gleichmäßig auf 85 % (zoom, Proportionen und QR-Verhältnis wie am Bildschirm):
   728 × 232 px → 619 × 197 px ≈ 163,7 × 52,2 mm, QR ≈ 28 mm. Seitenrand 7 mm, Abstand 4 mm → Desktop 5 Tickets je A4-Seite.
   KEINE erzwungenen Seitenumbrüche – nur break-inside: avoid. iPhone-Safari (eigene Ränder + Verkleinerung ~0,92) bringt
   dadurch im ungünstigsten Fall 4 je Seite, aber nie ein einzelnes Ticket allein mitten im Ausdruck. Titel im Druck max. 2 Zeilen. */
@media print {
  @page { size: A4; margin: 7mm; }
  body:has(.tickets) main.container { max-width: none; margin: 0; padding: 0; min-height: 0; }
  .tickets { margin: 0; padding: 0; }
  .ticket { zoom: .85; height: 232px; box-sizing: border-box; margin: 0 0 calc(4mm / .85); break-inside: avoid; page-break-inside: avoid; }
  .ticket .t-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}
