/* Reservierung Neujahrskonzert – responsive für Handy, Tablet, Desktop */
:root {
    --primaer: #14233c;
    --akzent: #c9a24a;
    --bg: #f5f3ee;
    --text: #1d2330;
    --muted: #6b7280;
    --line: #e4e0d6;
    --card: #fff;
    --ok: #1f7a4d;
    --err: #b42318;
    --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; background: var(--bg); color: var(--text);
    font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--primaer); }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 600; line-height: 1.2; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }

/* ---------- Kopfbereich ---------- */
.hero {
    background:
        radial-gradient(circle at 15% 20%, rgba(255,255,255,.10) 0 2px, transparent 3px) 0 0/90px 90px,
        radial-gradient(circle at 70% 60%, rgba(201,162,74,.35) 0 1.5px, transparent 2.5px) 0 0/120px 120px,
        linear-gradient(160deg, var(--primaer), #0b1424);
    color: #fff; text-align: center; padding: 3.2rem 1.2rem 4.5rem;
}
.hero-inner { max-width: 720px; margin: 0 auto; }
.logo { max-height: 90px; max-width: 70%; margin-bottom: 1rem; }
.eyebrow { margin: 0; letter-spacing: .18em; text-transform: uppercase; font-size: .8rem; color: var(--akzent); }
.hero h1 { font-size: clamp(2rem, 7vw, 3.3rem); margin: .4rem 0 1.2rem; }
.facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem .9rem; }
.facts li { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: 999px; padding: .4rem .9rem; font-size: .95rem; }
.ic { margin-right: .35rem; }

/* ---------- Layout ---------- */
.wrap { max-width: 640px; margin: -2.5rem auto 2rem; padding: 0 1rem; position: relative; }
.wrap.narrow { max-width: 400px; margin-top: 12vh; }
.wrap.wide { max-width: 1280px; margin-top: 1.2rem; }
.card { background: var(--card); border-radius: var(--radius); padding: 1.5rem; box-shadow: 0 8px 30px rgba(20,35,60,.08); margin-bottom: 1rem; }
.card h2 { margin-top: 0; color: var(--primaer); }
.intro p:first-child { margin-top: 0; }

/* Verfügbarkeit */
.avail .bar, .stat .bar { height: 8px; background: #ece8df; border-radius: 99px; overflow: hidden; }
.avail .bar span, .stat .bar span { display: block; height: 100%; background: var(--akzent); border-radius: 99px; }
.avail p { margin: .5rem 0 0; font-size: .95rem; }
.avail.low .bar span { background: #d97706; }
.avail.none .bar span { background: var(--err); }

/* ---------- Formular ---------- */
fieldset { border: 0; padding: 0; margin: 0 0 1.4rem; min-width: 0; }
legend { font-weight: 700; color: var(--primaer); margin-bottom: .6rem; font-size: 1.05rem; }
label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .9rem; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=search], textarea, select {
    display: block; width: 100%; margin-top: .3rem; padding: .75rem .85rem;
    border: 1.5px solid var(--line); border-radius: 10px; font: inherit; font-weight: 400;
    background: #fff; color: var(--text); transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--akzent); box-shadow: 0 0 0 3px rgba(201,162,74,.2); }
.grid2 { display: grid; gap: 0 1rem; }
@media (min-width: 560px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.ticket-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.t-label strong { display: block; }
.t-label span { color: var(--muted); font-size: .9rem; }
.stepper { display: flex; align-items: center; gap: .3rem; flex-shrink: 0; }
.stepper button {
    width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--primaer); background: #fff;
    color: var(--primaer); font-size: 1.4rem; line-height: 1; cursor: pointer; touch-action: manipulation;
}
.stepper button:hover:not(:disabled) { background: var(--primaer); color: #fff; }
.stepper button:disabled { opacity: .3; cursor: not-allowed; }
.stepper input { width: 3.2rem; text-align: center; padding: .5rem 0; border: 0; font-size: 1.2rem; font-weight: 700; -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.total-row { display: flex; justify-content: space-between; padding: .9rem 0 .2rem; font-size: 1.05rem; }
.total-row strong { color: var(--primaer); }

.check-label { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; font-size: .9rem; }
.check-label input { width: 20px; height: 20px; margin-top: .15rem; flex-shrink: 0; accent-color: var(--primaer); }

.btn {
    display: inline-block; width: 100%; padding: .95rem 1.2rem; border: 0; border-radius: 10px;
    background: var(--primaer); color: #fff; font: inherit; font-weight: 700; font-size: 1.05rem;
    text-align: center; text-decoration: none; cursor: pointer; transition: transform .1s, filter .15s;
}
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: scale(.99); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn.ghost { background: transparent; color: var(--primaer); border: 1.5px solid var(--primaer); margin-top: 1rem; }

.errors { background: #fef3f2; border: 1px solid #fecdca; color: var(--err); border-radius: 10px; padding: .8rem 1rem; margin-bottom: 1rem; }
.errors ul { margin: 0; padding-left: 1.1rem; }
.notice { text-align: center; }

/* ---------- Bestätigung ---------- */
.success { text-align: center; }
.check { width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 50%; background: var(--ok); color: #fff; font-size: 2rem; line-height: 64px; }
.code { font: 700 1.9rem/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .08em; color: var(--primaer); background: #faf6ea; border: 2px dashed var(--akzent); border-radius: 10px; padding: .8rem; display: inline-block; margin: .2rem 0 1.2rem; }
.summary { width: 100%; border-collapse: collapse; margin-bottom: 1rem; text-align: left; }
.summary td { padding: .5rem 0; border-bottom: 1px solid var(--line); }
.summary td:last-child { text-align: right; }
.summary .total td { font-weight: 700; border-bottom: 0; }
.hint { background: #faf6ea; border-radius: 10px; padding: .8rem 1rem; }

.foot { text-align: center; color: var(--muted); font-size: .85rem; padding: 1rem 1rem 2rem; }


/* ---------- Saalplan ---------- */
.plan-status { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: space-between; margin-bottom: .8rem; font-size: .93rem; }
#planinfo.warn { color: #b45309; font-weight: 600; }
.btn.small-light { width: auto; padding: .5rem .9rem; font-size: .88rem; background: #faf6ea; color: var(--primaer); border: 1.5px solid var(--akzent); }
.btn.small-light:disabled { opacity: .45; cursor: not-allowed; }
.saal { background: #fbfaf7; border: 1px solid var(--line); border-radius: 12px; padding: .8rem .5rem .6rem; }
.buehne {
    margin: 0 8% 1.1rem; padding: .45rem; text-align: center; color: #fff; font-weight: 700; letter-spacing: .3em; font-size: .8rem;
    background: linear-gradient(180deg, var(--primaer), #22385e); border-radius: 6px 6px 40% 40% / 6px 6px 18px 18px;
}
.saal-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: .3rem; }
.sitzgrid { display: grid; gap: 4px 3px; align-items: center; min-width: calc(var(--spalten) * 17px + 3em); }
.wisch-hinweis { display: none; text-align: center; font-size: .78rem; color: var(--muted); margin: -.5rem 0 .4rem; }
.zu-breit .wisch-hinweis { display: block; }
@media (max-width: 480px) { .card { padding: 1.2rem 1rem; } .saal { padding: .7rem .35rem .5rem; } }
.rl { font-size: .72rem; font-weight: 700; color: var(--muted); text-align: center; }
.gang { display: block; }
.sitz {
    display: block; position: relative; aspect-ratio: 1 / 1.05; width: 100%; min-width: 0; padding: 0; margin: 0;
    border: 0; border-radius: 4px 4px 2px 2px; font: inherit; text-decoration: none;
    box-shadow: inset 0 -3px 0 rgba(0,0,0,.12);
}
.sitz i { font-style: normal; font-size: .58rem; line-height: 1; position: absolute; inset: 0; display: none; align-items: center; justify-content: center; }
@media (min-width: 640px) { .sitz i { display: flex; } }
.sitz.frei { background: #fff; outline: 1.5px solid #b9c3d3; outline-offset: -1.5px; color: #8a94a6; }
button.sitz.frei { cursor: pointer; touch-action: manipulation; }
button.sitz.frei:hover { background: #fff4d6; }
.sitz.gewaehlt, .sitz.frei.gewaehlt { background: var(--akzent); outline-color: var(--akzent); color: var(--primaer); font-weight: 700; }
.sitz.belegt { background: #c6ccd6; color: #fff; cursor: not-allowed; }
.sitz.gesperrt { background: repeating-linear-gradient(45deg, #e7e3d9 0 3px, #f5f2ea 3px 6px); color: transparent; }
.saal-admin .sitz.belegt { background: var(--primaer); cursor: pointer; }
.saal-admin .sitz.abgeholt { background: var(--ok); color: #fff; }
.saal-admin a.sitz:hover { filter: brightness(1.3); }
.legende { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1rem; padding: 0; margin: .8rem 0 0; font-size: .8rem; color: var(--muted); }
.legende li { display: flex; align-items: center; gap: .35rem; }
.legende .sitz { width: 14px; height: 15px; aspect-ratio: auto; }
details.saal-box { background: #fff; border-radius: 12px; padding: .8rem 1rem; margin-bottom: 1rem; box-shadow: 0 2px 10px rgba(20,35,60,.05); }
details.saal-box summary { cursor: pointer; font-weight: 700; color: var(--primaer); }
details.saal-box .saal { margin-top: .8rem; max-width: 900px; margin-left: auto; margin-right: auto; }
.sitze-zelle { font-size: .85rem; }

/* ---------- Admin ---------- */
.admin-bar {
    background: var(--primaer); color: #fff; padding: .8rem 1.2rem; display: flex; flex-wrap: wrap;
    gap: .6rem; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 5;
}
.admin-bar strong { margin-right: .6rem; }
.muted-inv { color: rgba(255,255,255,.7); font-size: .9rem; }
.admin-bar nav { display: flex; gap: .4rem; flex-wrap: wrap; }
.btn.small { width: auto; padding: .45rem .8rem; font-size: .9rem; background: var(--akzent); color: var(--primaer); }
.btn.ghost-inv { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.4); }
.login h1 { margin-bottom: .2rem; color: var(--primaer); }
.flash { background: #ecfdf3; color: var(--ok); border-radius: 10px; padding: .7rem 1rem; margin-bottom: 1rem; }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; margin-bottom: 1rem; }
.stat { background: #fff; border-radius: 12px; padding: .9rem 1rem; box-shadow: 0 2px 10px rgba(20,35,60,.05); }
.stat span { display: block; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.stat strong { display: block; font-size: 1.4rem; color: var(--primaer); margin: .15rem 0 .3rem; }
.stat small { color: var(--muted); }

.toolbar { display: flex; gap: .6rem; margin-bottom: 1rem; flex-wrap: wrap; }
.toolbar input { flex: 1 1 240px; margin: 0; }
.toolbar select { flex: 1 1 140px; width: auto; margin: 0; }

.list { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 10px rgba(20,35,60,.05); font-size: .92rem; }
.list th { background: #faf8f3; text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: .7rem .6rem; }
.list td { padding: .65rem .6rem; border-top: 1px solid var(--line); vertical-align: top; }
.list .num { text-align: right; white-space: nowrap; }
.list tr.done { background: #f3faf6; }
.list tr:target { outline: 2px solid var(--akzent); }
.list code { font-weight: 700; color: var(--primaer); }
.actions form { display: flex; flex-wrap: wrap; gap: .3rem; }
.pill { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: .35rem .7rem; font: inherit; font-size: .82rem; cursor: pointer; white-space: nowrap; }
.pill.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.pill.danger { color: var(--err); }
.pill.danger:hover { background: var(--err); color: #fff; }
.printonly { display: none; }

/* Admin-Tabelle als Karten auf dem Handy */
@media (max-width: 820px) {
    .list, .list tbody, .list tr, .list td { display: block; width: 100%; }
    .list thead { display: none; }
    .list { background: transparent; box-shadow: none; }
    .list tr { background: #fff; border-radius: 12px; margin-bottom: .7rem; padding: .4rem .2rem; box-shadow: 0 2px 10px rgba(20,35,60,.05); }
    .list td { border: 0; display: flex; justify-content: space-between; gap: 1rem; padding: .35rem .8rem; text-align: right; }
    .list td::before { content: attr(data-label); font-weight: 600; color: var(--muted); text-align: left; flex-shrink: 0; }
    .list td.num { text-align: right; }
    .list td .v { min-width: 0; overflow-wrap: anywhere; }
    .list td.actions { display: block; text-align: left; padding-top: .6rem; }
    .list td.actions::before { display: none; }
    .list td.printonly { display: none !important; }
    .pill { padding: .55rem .9rem; font-size: .9rem; }
}

/* ---------- Druck (Kassenliste) ---------- */
@media print {
    body { background: #fff; font-size: 10.5pt; }
    .admin-bar nav, .toolbar, .noprint, .flash, details.saal-box { display: none !important; }
    .admin-bar { position: static; background: none; color: #000; padding: 0 0 .5rem; border-bottom: 2px solid #000; }
    .muted-inv { color: #333; }
    .wrap.wide { max-width: none; margin: .5rem 0; padding: 0; }
    .stats { grid-template-columns: repeat(4, 1fr); }
    .stat { box-shadow: none; border: 1px solid #ccc; padding: .4rem .6rem; }
    .stat .bar { display: none; }
    .list { box-shadow: none; font-size: 10pt; }
    .list, .list tbody, .list tr, .list td { display: revert; }
    .list thead { display: table-header-group; }
    .list td::before { display: none; }
    .list tr { page-break-inside: avoid; }
    .list tr.storniert { display: none !important; }
    .list td, .list th { border: 1px solid #bbb; padding: .3rem .4rem; text-align: left; }
    .list .num { text-align: right; }
    .list td.printonly, .list th.printonly { display: table-cell !important; }
    .box { display: inline-block; width: 14px; height: 14px; border: 1.5px solid #000; }
    a { color: #000; text-decoration: none; }
}

/* Gut zu wissen */
.gut h2 { font-size: 1.15rem; margin-bottom: .6rem; }
.gut ul { margin: 0; padding: 0; list-style: none; }
.gut li { position: relative; padding: .35rem 0 .35rem 1.6rem; border-bottom: 1px solid var(--line); }
.gut li:last-child { border-bottom: 0; }
.gut li::before { content: "♪"; position: absolute; left: .2rem; color: var(--akzent); font-weight: 700; }
.foot p { margin: .3rem 0; }
.storno-box .code-in { text-transform: uppercase; letter-spacing: .08em; font-family: ui-monospace, Menlo, Consolas, monospace; }
.btn.danger { background: #b42318; }
.list tr.storniert { opacity: .55; }
.list tr.storniert td:first-child code { text-decoration: line-through; }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: .1rem .45rem; border-radius: 99px; background: #fef3f2; color: #b42318; }

/* Untermenü "Weitere" */
.menue { position: relative; }
.menue summary { list-style: none; cursor: pointer; }
.menue summary::-webkit-details-marker { display: none; }
.menue-liste {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 250px;
    background: #fff; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.2); padding: .35rem; display: flex; flex-direction: column;
}
.menue-liste a { color: var(--text); text-decoration: none; padding: .6rem .8rem; border-radius: 7px; font-size: .92rem; }
.menue-liste a:hover, .menue-liste a.aktiv { background: #faf6ea; }

/* Modul Sitzplätze */
.seiten-titel { color: var(--primaer); margin: .2rem 0 .3rem; font-size: 1.5rem; }
.flash.flash-err { background: #fef3f2; color: var(--err); }
.mailstatus { font-size: .85rem; }
.mailstatus.ok { color: var(--ok); font-weight: 600; }
.mailstatus.offen { color: #b45309; }
.mailstatus.geaendert { color: var(--err); font-weight: 600; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.knopfreihe .btn { width: auto; flex: 1 1 200px; }
.knopfreihe .btn.ghost { margin-top: 0; }
#zuweisen .saal { max-width: 900px; }
button.sitz.frei.gewaehlt:hover { background: var(--akzent); filter: brightness(1.08); }
#zuweisen { max-width: none; }
.gast-kopf .seiten-titel { margin-top: 0; }
textarea { resize: vertical; }
@media print { .menue { display: none; } }
