/* =========================================================
   Table booking: widget (/reservierung), floor plan, owner panel (/admin), guest page (/buchung)
   Uses the tokens from style.css (--gold, --line, --f-label …).
   ========================================================= */

/* ---------- widget ---------- */
.booking { border-top: 1px solid var(--line); scroll-margin-top: 60px; }
.bk {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(30px, 3.4vw, 48px);
  grid-template-areas: "steps" "plan" "form";
  border: 1px solid var(--line); background: rgba(10, 9, 7, .72); padding: clamp(22px, 3.4vw, 52px);
  position: relative; z-index: 1;
}
.bk__controls { grid-area: steps; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 34px clamp(28px, 3.5vw, 64px); align-items: start; min-width: 0; }
/* times get their own full-width row */
.bk__controls .bk__step:last-child { grid-column: 1 / -1; }
.bk__step { min-width: 0; }
.bk__form, .bk__done { grid-area: form; min-width: 0; max-width: 980px; }
.bk__form .bk__fields { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bk__form .bk__fields .field { grid-column: span 2; }
.bk__form .bk__fields .field--check { grid-column: 1 / -1; }
.bk__label {
  font-family: var(--f-label); font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--gold);
  margin: 0 0 14px; display: flex; align-items: center; gap: 12px;
}
.bk__label span { color: var(--muted); letter-spacing: .1em; }
.bk__label em { font-style: normal; color: var(--muted); letter-spacing: .14em; }
.bk__muted { color: var(--muted); font-style: italic; font-size: .95rem; margin: 0; }

.bk__party { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.bk__round {
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold);
  font-size: 22px; line-height: 1; display: grid; place-items: center; transition: background .3s, color .3s;
}
.bk__round:hover { background: var(--gold); color: var(--black); }
.bk__party-n { font-family: var(--f-display); font-size: 2.6rem; color: var(--text); min-width: 1.4em; text-align: center; line-height: 1; }
.bk__party-note { font-size: .92rem; color: var(--muted); font-style: italic; }

.bk__days { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--gold-deep) transparent; padding-bottom: 8px; }
.bk__day {
  flex: 0 0 64px; padding: 10px 4px; border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 2px;
  transition: border-color .3s, background .3s, color .3s;
}
.bk__day small { font-family: var(--f-label); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.bk__day b { font-family: var(--f-display); font-weight: 400; font-size: 1.5rem; color: var(--text); line-height: 1.1; }
.bk__day:hover:not(:disabled) { border-color: var(--gold); }
.bk__day:disabled { opacity: .3; cursor: not-allowed; }
.bk__day[aria-selected="true"] { background: var(--gold); border-color: var(--gold); }
.bk__day[aria-selected="true"] small, .bk__day[aria-selected="true"] b { color: var(--black); }

.bk__times, .adm-times { display: flex; flex-wrap: wrap; gap: 8px; }
.bk__time {
  min-width: 72px; padding: 11px 12px; border: 1px solid var(--line); font-family: var(--f-display); font-size: 1.05rem; color: var(--text);
  transition: border-color .3s, background .3s, color .3s;
}
.bk__time:hover { border-color: var(--gold); }
.bk__time.is-full { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(201,164,92,.5); }
.bk__time[aria-selected="true"], .bk__time[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--black); text-decoration: none; }

.bk__summary { font-family: var(--f-display); font-size: 1.15rem; color: var(--gold-light); margin: 0 0 22px; }
.bk__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 20px; }
.bk__fields .field { grid-column: auto; }
.bk__fields .field--full { grid-column: 1 / -1; }
.bk__submit { margin-top: 28px; }
.bk__submit:disabled { opacity: .45; cursor: not-allowed; }
.bk__done { border: 1px solid var(--line); padding: 30px; }
.bk__done-mark { color: var(--gold); margin: 0 0 6px; }
.bk__done h3 { font-family: var(--f-display); font-weight: 400; color: var(--gold); font-size: 2rem; margin: 0 0 14px; }
.bk__done p { margin: 0 0 16px; }

.bk__plan { grid-area: plan; min-width: 0; border-top: 1px solid var(--line); padding-top: clamp(24px, 3vw, 40px); }
.bk__plan-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px 20px; }
.bk__legend { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .85rem; color: var(--muted); }
.bk__legend li { display: inline-flex; align-items: center; gap: 7px; }
.bk__legend i { width: 14px; height: 14px; border-radius: 3px; border: 1.5px solid var(--gold); display: inline-block; }
.bk__legend .is-wish { background: var(--gold); }
.bk__legend .is-taken { background: #2a251c; border-color: #3a3326; }
.bk__legend .is-small { border-color: rgba(201,164,92,.25); }
.bk__legend .is-requested { border-style: dashed; }
.bk__swipe { display: none; margin: 8px 0 0; font-family: var(--f-label); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); text-align: center; }
.bk__hint { margin: 12px 0 0; font-size: .95rem; color: var(--muted); font-style: italic; min-height: 3em; }

/* ---------- floor plan (svg) ---------- */
.fp { width: 100%; height: auto; max-height: calc(100vh - 110px); display: block; margin: 0 auto; touch-action: manipulation; user-select: none; shape-rendering: geometricPrecision; text-rendering: geometricPrecision; }
/* phones: keep tables big enough to tap, swipe sideways for the rest of the room */
.fp-scroll { overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--gold-deep) transparent; }
.fp-bg { fill: #0f0d09; stroke: rgba(201,164,92,.3); }
.fp-area { fill: rgba(201,164,92,.045); stroke: rgba(201,164,92,.32); stroke-dasharray: 5 7; }
.fp-area__label { fill: var(--gold); font-family: var(--f-label); font-size: 17px; letter-spacing: .24em; text-transform: uppercase; }
.fp-fixture { fill: #1e1a13; stroke: rgba(201,164,92,.35); }
.fp-door { fill: none; stroke: var(--gold); stroke-dasharray: 3 4; }
.fp-fixture__label { fill: #b5ab97; font-family: var(--f-label); font-size: 16px; letter-spacing: .22em; text-transform: uppercase; }
.fp-t .fp-shape { fill: #1a160f; stroke: var(--gold-light); stroke-width: 2.5; transition: fill .3s, stroke .3s; }
.fp-t .fp-seat { fill: #1a160f; stroke: var(--gold-light); stroke-width: 2; transition: fill .3s; }
.fp-num { fill: #f3e0aa; font-family: var(--f-display); font-size: 30px; pointer-events: none; }
.fp-cap { fill: #c2b8a4; font-family: var(--f-label); font-size: 14px; letter-spacing: .06em; pointer-events: none; }
.fp-t--booked .fp-cap, .fp-t--requested .fp-cap { fill: var(--text); }
.fp-t[role="button"] { cursor: pointer; outline: none; }
.fp-t[role="button"]:hover .fp-shape, .fp-t[role="button"]:focus-visible .fp-shape { fill: rgba(201,164,92,.18); }
.fp-t[role="button"]:focus-visible .fp-shape { stroke-width: 4; }
.fp-t--idle .fp-shape, .fp-t--idle .fp-seat { stroke: rgba(201,164,92,.7); }
.fp-t--small { opacity: .5; }
.fp-t--small .fp-shape, .fp-t--small .fp-seat { stroke-dasharray: 4 4; }
.fp-t--taken .fp-shape, .fp-t--booked .fp-shape { fill: #2b261d; stroke: #4a412f; }
.fp-t--taken .fp-seat, .fp-t--booked .fp-seat { fill: #2b261d; stroke: #4a412f; }
.fp-t--taken .fp-num, .fp-t--taken .fp-cap { fill: #7a6d55; }
.fp-t--booked .fp-num { fill: var(--muted); }
.fp-t--requested .fp-shape, .fp-t--requested .fp-seat { stroke-dasharray: 6 5; }
.fp-t--wish .fp-shape, .fp-t--wish .fp-seat { fill: var(--gold); }
.fp-t--wish .fp-num, .fp-t--wish .fp-cap { fill: var(--black); }

/* ---------- guest page ---------- */
.guest { padding-top: clamp(150px, 18vw, 220px); min-height: 80vh; }
.guest-card { max-width: 640px; margin: 0 auto; text-align: center; border: 1px solid var(--line); padding: clamp(28px, 5vw, 60px); background: rgba(10,9,7,.7); position: relative; z-index: 1; }
.guest-card .display { margin-bottom: 26px; }
.guest-rows { display: grid; gap: 0; margin: 0 auto 26px; max-width: 420px; text-align: left; border-top: 1px solid var(--line); }
.guest-rows div { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
.guest-rows dt { font-family: var(--f-label); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.guest-rows dd { margin: 0; font-family: var(--f-display); color: var(--text); }
.guest-text { margin: 0 0 26px; }
.guest-home { display: inline-block; margin-top: 30px; }

/* ---------- owner panel ---------- */
.page-admin { padding-bottom: 120px; }
.page-admin::after { display: none; }
.adm { max-width: 1400px; margin: 0 auto; padding: 0 clamp(14px, 3vw, 40px); }
.adm-login { max-width: 380px; margin: 14vh auto 0; text-align: center; }
.adm-login img { margin: 0 auto 14px; }
.adm-login h1 { font-family: var(--f-display); font-weight: 400; color: var(--gold); font-size: 2rem; margin: 0 0 30px; }
.adm-login form { display: grid; gap: 22px; text-align: left; }
.adm-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.adm-brand { display: inline-flex; align-items: center; gap: 12px; font-family: var(--f-display); font-size: 1.3rem; color: var(--gold); }
.adm-top__actions { display: flex; align-items: center; gap: 18px; }
.adm-link { font-family: var(--f-label); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.adm-link:hover { color: var(--gold); }
.adm-pending { margin: 22px 0 0; padding: 18px; border: 1px solid var(--gold); background: rgba(201,164,92,.06); }
.adm-pending .bk__label span { color: var(--black); background: var(--gold); padding: 2px 8px; border-radius: 20px; letter-spacing: 0; }
.adm-pending__list { display: flex; flex-wrap: wrap; gap: 8px; }
.adm-chip { padding: 10px 14px; border: 1px solid var(--line); text-align: left; font-size: .95rem; color: var(--text); transition: border-color .3s; }
.adm-chip b { font-family: var(--f-display); font-weight: 400; color: var(--gold); margin-right: 6px; }
.adm-chip:hover { border-color: var(--gold); }
.adm-days { display: flex; gap: 6px; overflow-x: auto; padding: 18px 0 8px; scrollbar-width: none; }
.adm-days::-webkit-scrollbar { display: none; }
.adm-day { flex: 0 0 auto; min-width: 64px; padding: 8px 10px; border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 2px; position: relative; }
.adm-day small { font-family: var(--f-label); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.adm-day b { font-family: var(--f-display); font-weight: 400; color: var(--text); }
.adm-day[aria-pressed="true"] { border-color: var(--gold); background: rgba(201,164,92,.12); }
.adm-count { position: absolute; top: -7px; right: -5px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #2a251c; color: var(--text); font-size: 11px; display: grid; place-items: center; }
.adm-count.has-open { background: var(--gold); color: var(--black); }
.adm-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(20px, 3vw, 40px); margin-top: 18px; align-items: start; }
.adm-list__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.adm-list__head h2 { font-family: var(--f-display); font-weight: 400; color: var(--gold); font-size: 1.6rem; margin: 0; }
.adm-date, .adm-new input { color-scheme: dark; }
.adm-date { background: transparent; color: var(--text); border: 1px solid var(--line); padding: 8px 10px; font: inherit; }
.adm-empty { padding: 30px 0; }
.adm-card { display: grid; grid-template-columns: 64px 1fr; gap: 14px; padding: 16px; border: 1px solid var(--line); margin-bottom: 10px; transition: border-color .3s, background .3s; }
.adm-card.is-active { border-color: var(--gold); background: rgba(201,164,92,.08); }
.adm-card.is-cancelled, .adm-card.is-declined { opacity: .45; }
.adm-card__time { font-family: var(--f-display); font-size: 1.4rem; color: var(--gold); margin: 0; }
.adm-card h3 { font-family: var(--f-display); font-weight: 400; font-size: 1.2rem; margin: 0 0 6px; color: var(--text); }
.adm-card h3 small { font-family: var(--f-label); font-size: 11px; letter-spacing: .12em; color: var(--muted); margin-left: 6px; }
.adm-card p { margin: 0 0 6px; font-size: .95rem; }
.adm-card a { color: var(--gold); }
.adm-card__note { font-style: italic; color: var(--muted); }
.adm-badge { display: inline-block; font-family: var(--f-label); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; padding: 3px 8px; margin-right: 6px; border: 1px solid var(--line); color: var(--muted); }
.is-requested .adm-badge { border-color: var(--gold); background: var(--gold); color: var(--black); }
.is-assigned .adm-badge { border-color: var(--gold); color: var(--gold); }
.is-confirmed .adm-badge { border-color: #6f9a5d; color: #9fca8b; }
.adm-card__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.adm-card__actions .btn { padding: 10px 14px; font-size: 10px; }
.adm-plan { position: sticky; top: 12px; }
.adm-plan__head { margin-bottom: 12px; }
.adm-plan .bk__legend { margin-top: 12px; }
.is-assigning .adm-times { opacity: .4; pointer-events: none; }
.adm-bar {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60; max-width: 760px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 14px 18px; background: #16130e; border: 1px solid var(--gold); box-shadow: 0 16px 40px rgba(0,0,0,.6);
}
.adm-bar p { margin: 0; font-size: .95rem; }
.adm-bar em { color: #e08a6a; font-style: normal; }
.adm-bar__btns { display: flex; gap: 8px; }
.adm-bar .btn:disabled { opacity: .45; }
.adm-dialog { background: #12100c; color: var(--text); border: 1px solid var(--gold); padding: 0; max-width: 560px; width: calc(100% - 24px); }
.adm-dialog::backdrop { background: rgba(0,0,0,.7); }
.adm-new { padding: 26px; display: grid; gap: 20px; }
.adm-new h2 { font-family: var(--f-display); font-weight: 400; color: var(--gold); margin: 0; }

.adm-dialog--wide { max-width: 1100px; height: min(86vh, 900px); }
.adm-outbox { padding: 22px; display: flex; flex-direction: column; gap: 12px; height: 100%; }
.adm-outbox__head { display: flex; justify-content: space-between; align-items: center; }
.adm-outbox__head h2 { font-family: var(--f-display); font-weight: 400; color: var(--gold); margin: 0; }
.adm-outbox__grid { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 14px; flex: 1; min-height: 0; }
.adm-outbox__list { list-style: none; margin: 0; padding: 0; overflow-y: auto; border: 1px solid var(--line); }
.adm-outbox__list li { border-bottom: 1px solid var(--line); }
.adm-outbox__list li.bk__muted { padding: 14px; }
.adm-outbox__list button { width: 100%; text-align: left; padding: 12px 14px; display: grid; gap: 4px; }
.adm-outbox__list small { font-size: 11px; color: var(--muted); }
.adm-outbox__list b { font-weight: 400; font-size: .95rem; color: var(--text); }
.adm-outbox__list li[aria-current="true"] { background: rgba(201,164,92,.12); }
.adm-outbox__view { width: 100%; height: 100%; min-height: 420px; border: 1px solid var(--line); background: #0a0907; }
.adm-test { border-style: dashed; }

@media (max-width: 980px) {
  .adm-grid { grid-template-columns: minmax(0, 1fr); }
  .adm-plan { position: static; order: -1; }
  .adm-outbox__grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: 180px 1fr; }
}
@media (max-width: 767px) {
  .bk { padding: 18px 14px; margin-left: calc(var(--gutter) * -1 + 4px); margin-right: calc(var(--gutter) * -1 + 4px); }
  .bk__fields, .bk__form .bk__fields { grid-template-columns: 1fr; }
  .bk__form .bk__fields .field { grid-column: auto; }
  .bk__controls { grid-template-columns: minmax(0, 1fr); }
  .bk__party-n { font-size: 2.2rem; }
  .fp { min-width: 760px; max-height: none; }
  .bk__swipe { display: block; }
  .fp-scroll { margin-right: -14px; padding-bottom: 6px; }
  .adm-card { grid-template-columns: 1fr; gap: 4px; }
  .adm-top__actions .btn { padding: 9px 12px; }
  .adm-brand { font-size: 1.1rem; }
  .adm-times .bk__time { min-width: 62px; padding: 9px 8px; font-size: .95rem; }
}
