/* ==========================================================================
   Casa D'Italia — reservations UI (customer booking page, homepage band,
   and the owner dashboard). Extends site.css.
   ========================================================================== */

/* The HTML `hidden` attribute must always win. Without this, any rule that sets
   `display` (e.g. .modal { display: grid }) silently overrides it and the element
   stays on screen even though the markup says hidden. */
[hidden] { display: none !important; }

/* ---------- nav emphasis: make Reservations the obvious action ---------- */
.nav__links a.nav__cta {
  padding: 0.55rem 1rem;
  border: 1px solid currentColor;
  border-bottom-color: currentColor !important;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.nav__links a.nav__cta:hover { background: var(--wine); border-color: var(--wine); color: #fff; }
.nav.is-stuck .nav__links a.nav__cta,
.nav.is-solid .nav__links a.nav__cta { color: var(--wine); }
.nav.is-stuck .nav__links a.nav__cta:hover,
.nav.is-solid .nav__links a.nav__cta:hover { color: #fff; }

/* ---------- homepage reservation band ---------- */
.reserve-band {
  background: var(--wine);
  color: #fff;
  padding-block: clamp(3rem, 6vw, 4.5rem);
}
.reserve-band .btn--paper { background: var(--paper); border-color: var(--paper); color: var(--wine); }
.reserve-band .btn--paper:hover { background: #fff; border-color: #fff; }
/* The loyalty pitch itself (.perk, .perk__title, .perk__steps, .perk__fine) is
   styled once, near the end of this file, and shared with the booking page. */

/* ---------- booking card ---------- */
.booking {
  max-width: 980px;
  margin-inline: auto;
  background: #fff;
  border: 1px solid var(--line);
}
.booking__step {
  padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1.25rem, 4vw, 2.5rem);
  border-top: 1px solid var(--line);
}
.booking__step:first-child { border-top: 0; }
.step-title {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  margin: 0 0 1.25rem;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 400;
}
.step-title__n {
  width: 28px; height: 28px;
  flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  align-self: center;
}
.step-hint { margin: -0.75rem 0 1.25rem; color: var(--muted); font-size: 0.9rem; }

/* party pills */
.pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pill {
  min-width: 48px; height: 48px;
  padding: 0 0.9rem;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.15rem;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.pill:hover { border-color: var(--ink); }
.pill[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.pill--call { font-family: var(--sans); font-size: 0.8rem; text-decoration: none; display: inline-flex; align-items: center; }

/* calendar */
.cal { max-width: 460px; }
.cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.cal__month { font-family: var(--serif); font-size: 1.3rem; }
.cal__nav {
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: 1.1rem;
}
.cal__nav:disabled { opacity: 0.3; cursor: default; }
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal__dow { text-align: center; color: var(--muted); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; padding: 0.35rem 0; }
.cal__day {
  aspect-ratio: 1;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.05rem;
  cursor: pointer;
}
.cal__day:hover:not(:disabled) { border-color: var(--ink); }
.cal__day:disabled { color: rgba(28, 23, 20, 0.28); cursor: default; }
.cal__day.is-today { color: var(--wine); font-weight: 600; }
.cal__day[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.cal__day.is-blackout { text-decoration: line-through; }

/* time slots */
.slots { display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.slot {
  height: 44px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
}
.slot:hover:not(:disabled) { border-color: var(--ink); }
.slot:disabled { color: rgba(28, 23, 20, 0.3); text-decoration: line-through; cursor: default; background: transparent; }
.slot[aria-pressed="true"] { background: var(--wine); border-color: var(--wine); color: #fff; }
.slots-empty { color: var(--muted); font-size: 0.95rem; }
.slots-empty a { color: var(--wine); }

/* details form */
.fgrid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .fgrid { grid-template-columns: 1fr 1fr; } .fgrid .full { grid-column: 1 / -1; } }
.field label { display: block; margin-bottom: 0.35rem; color: var(--ink-soft); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.field textarea { min-height: 96px; resize: vertical; }
.check { display: flex; gap: 0.6rem; align-items: flex-start; color: var(--ink-soft); font-size: 0.9rem; }
.check input { margin-top: 0.3rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* summary + submit */
.booking__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem clamp(1.25rem, 4vw, 2.5rem);
  background: var(--cream);
  border-top: 1px solid var(--line);
}
.summary { font-family: var(--serif); font-size: 1.2rem; }
.summary span + span::before { content: "·"; margin: 0 0.6rem; color: var(--gold); }
.summary--empty { color: var(--muted); font-size: 1rem; }
.btn--lg { padding: 1.1rem 2.4rem; font-size: 0.78rem; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.msg { margin: 1rem 0 0; padding: 0.85rem 1rem; font-size: 0.92rem; }
.msg--error { background: #fbeaea; color: #7a1c1c; border-left: 3px solid var(--wine); }
.msg--info { background: var(--cream); color: var(--ink-soft); }

/* confirmation */
.confirm { max-width: 720px; margin-inline: auto; text-align: center; }
.confirm__mark {
  width: 64px; height: 64px;
  margin: 0 auto 1.25rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--wine);
  color: #fff;
  font-size: 1.6rem;
}
.confirm__card {
  margin: 2rem auto 0;
  padding: 1.75rem;
  background: #fff;
  border: 1px solid var(--line);
  text-align: left;
}
.confirm__row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.confirm__row:last-child { border-bottom: 0; }
.confirm__row dt { color: var(--muted); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.confirm__row dd { margin: 0; font-family: var(--serif); font-size: 1.15rem; text-align: right; }
.reward-box {
  margin: 1.5rem auto 0;
  padding: 1.25rem 1.5rem;
  background: var(--wine);
  color: #fff;
}
.reward-box strong { display: block; font-family: var(--serif); font-size: 1.5rem; font-weight: 400; }
.reward-box p { margin: 0.35rem 0 0; opacity: 0.9; font-size: 0.92rem; }
.confirm__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-top: 1.75rem; }
.fine { margin-top: 1.5rem; color: var(--muted); font-size: 0.82rem; }

/* ---------- owner dashboard ---------- */
.admin { min-height: 100vh; background: var(--paper); }
.admin__bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: center;
  padding: 0.9rem var(--pad);
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.admin__brand { font-family: var(--serif); font-size: 1.25rem; margin-right: auto; }
.admin__brand small { display: block; font-family: var(--sans); font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); }
.admin__body { padding: 1.5rem var(--pad) 4rem; max-width: 1400px; margin-inline: auto; }
.tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; }
.tab { padding: 0.75rem 1rem; border: 0; background: transparent; font: inherit; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--wine); }
.toolbar { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-bottom: 1.25rem; }
.toolbar input, .toolbar select { padding: 0.55rem 0.7rem; border: 1px solid var(--line); background: #fff; font: inherit; font-size: 0.9rem; }
.btn--sm { padding: 0.6rem 1rem; font-size: 0.64rem; }
.btn--wine { background: var(--wine); border-color: var(--wine); color: #fff; }
.day { margin-bottom: 2rem; }
.day__head { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: baseline; margin-bottom: 0.5rem; }
.day__title { font-family: var(--serif); font-size: 1.4rem; }
.day__meta { color: var(--muted); font-size: 0.85rem; }
.load { height: 6px; width: 220px; background: var(--cream); border: 1px solid var(--line); }
.load i { display: block; height: 100%; background: var(--gold); }
.load i.hot { background: var(--wine); }
.tbl { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); font-size: 0.9rem; }
.tbl th { text-align: left; padding: 0.6rem 0.75rem; background: var(--cream); font-size: 0.64rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); }
.tbl td { padding: 0.65rem 0.75rem; border-top: 1px solid var(--line); vertical-align: top; }
.tbl td.time { font-family: var(--serif); font-size: 1.1rem; white-space: nowrap; }
.tbl .muted { color: var(--muted); font-size: 0.8rem; }
.tbl a { color: var(--wine); text-decoration: none; }
.status { display: inline-block; padding: 0.2rem 0.55rem; font-size: 0.62rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; border: 1px solid currentColor; }
.status--confirmed { color: #2b5c3f; }
.status--seated { color: #8a6a12; }
.status--completed { color: #3a3a3a; }
.status--cancelled, .status--no_show { color: #7a1c1c; }
.badge { display: inline-block; padding: 0.2rem 0.5rem; background: var(--wine); color: #fff; font-size: 0.62rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.badge--gold { background: var(--gold); }
.badge--grey { background: #999; }
.acts { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.acts button { padding: 0.35rem 0.55rem; border: 1px solid var(--line); background: #fff; font: inherit; font-size: 0.7rem; cursor: pointer; }
.acts button:hover { border-color: var(--ink); }
.tbl tr.is-done td { opacity: 0.55; }
.empty { padding: 2rem; text-align: center; color: var(--muted); background: #fff; border: 1px solid var(--line); }
.login { max-width: 380px; margin: 14vh auto 0; padding: 2.5rem; background: #fff; border: 1px solid var(--line); text-align: center; }
.login .field { text-align: left; margin: 1.25rem 0; }
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(28, 23, 20, 0.5); padding: 1rem; }
.modal__card { width: min(720px, 100%); max-height: 92vh; overflow: auto; background: #fff; padding: 1.75rem; }
.modal__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; font-family: var(--serif); font-size: 1.4rem; }
.modal__close { border: 0; background: transparent; font-size: 1.5rem; cursor: pointer; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.kv div { padding: 1rem; background: #fff; border: 1px solid var(--line); }
.kv b { display: block; font-family: var(--serif); font-size: 1.8rem; font-weight: 400; }
.kv span { color: var(--muted); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; }

/* ---------- large-party card hold ---------- */
.notice {
  margin-top: 1.25rem;
  padding: 0.9rem 1.1rem;
  border-left: 3px solid var(--gold);
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.6;
}
.notice strong { color: var(--ink); }
.card-box {
  padding: 1.25rem;
  border: 1px solid var(--line);
  background: var(--paper);
  min-height: 120px;
}

/* ---------- waitlist ---------- */
.waitbox {
  margin-top: 1.25rem;
  padding: 1.5rem;
  border: 1px solid var(--gold);
  background: var(--paper);
}
.waitbox h3 { margin: 0 0 0.5rem; font-family: var(--serif); font-size: 1.4rem; font-weight: 400; }
.waitbox p { margin: 0 0 1.1rem; color: var(--ink-soft); font-size: 0.92rem; }
.waitbox--done { border-color: var(--wine); }
.waitbox--done h3 { color: var(--wine); }

/* ---------- admin extras ---------- */
.status--pending_card { color: #8a6a12; }
.badge--green { background: #2b5c3f; }
.acts button.danger { border-color: var(--wine); color: var(--wine); }
.acts button.danger:hover { background: var(--wine); color: #fff; }

/* ==========================================================================
   Loyalty pitch — the headline offer, not a footnote.
   Shared by the booking page (.perk) and the homepage band (.reserve-band).
   ========================================================================== */
.perk {
  display: block;
  max-width: 860px;
  margin: 0 auto 2.75rem;
  padding: clamp(2rem, 4.5vw, 3rem) clamp(1.25rem, 4vw, 3rem);
  border: 0;
  background: var(--wine);
  color: #fff;
  text-align: center;
}
.perk .eyebrow,
.reserve-band .eyebrow { color: rgba(255, 255, 255, 0.72); margin-bottom: 0.85rem; }
.perk__title {
  margin: 0;
  color: #fff;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.1rem, 5.2vw, 3.4rem);
  line-height: 1.08;
}
.perk__title em { font-style: italic; color: #f0d9a8; }

/* three equal columns, zero gap: the connector between two circles is then
   exactly (column width - circle diameter), so it lines up at every width */
.perk__steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 560px;
  margin: 2rem auto 1.75rem;
  padding: 0;
  list-style: none;
}
.perk__steps li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  padding: 0 0.25rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.45;
  text-transform: uppercase;
}
.perk__steps li span {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  color: #fff;
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: 0;
}
.perk__steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 28px;
  left: calc(50% + 28px);
  width: calc(100% - 56px);
  height: 1px;
  background: rgba(255, 255, 255, 0.4);
}
.perk__steps li.is-reward { color: #f0d9a8; }
.perk__steps li.is-reward span { background: #f0d9a8; border-color: #f0d9a8; color: var(--wine-deep); }
.perk__fine {
  max-width: 600px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.98rem;
  line-height: 1.7;
}
.perk__fine strong { color: #fff; font-weight: 600; }

/* discreet staff sign-in link in the footer: findable, but still legible (>= 4.5:1) */
.footer__legal a { color: rgba(250, 247, 242, 0.75); text-decoration: underline; text-underline-offset: 0.2em; }
.footer__legal a:hover { color: #fff; }

/* homepage band: same pitch, centered, with the button underneath */
.reserve-band__inner.is-centered { display: block; text-align: center; }
.reserve-band__inner.is-centered .btn { margin-top: 2rem; }

/* ==========================================================================
   Events & Specials page
   ========================================================================== */
.ev-list { display: grid; gap: 1.25rem; max-width: 860px; margin-inline: auto; }
.ev-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  background: #fff;
  border: 1px solid var(--line);
}
.ev-card.is-featured { border-color: var(--gold); box-shadow: 0 10px 30px rgba(28, 23, 20, 0.07); }
.ev-card__date {
  display: grid; align-content: center; justify-items: center; gap: 0.1rem;
  padding: 1rem 0.5rem;
  background: var(--wine); color: #fff; text-align: center;
}
.ev-card__date b { font-family: var(--serif); font-size: 2.2rem; font-weight: 400; line-height: 1; }
.ev-card__date span { font-size: 0.62rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; }
.ev-card__date--mark { background: var(--ink); }
.ev-card__body { padding: 1.4rem 1.6rem 1.5rem; }
.ev-card__kind { margin: 0 0 0.35rem; color: var(--gold); font-size: 0.62rem; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; }
.ev-card__title { margin: 0; font-family: var(--serif); font-size: 1.65rem; font-weight: 400; line-height: 1.15; }
.ev-card__when { margin: 0.35rem 0 0; color: var(--wine); font-size: 0.85rem; font-weight: 500; }
.ev-card__text { margin: 0.75rem 0 0; color: var(--ink-soft); font-size: 0.95rem; line-height: 1.7; }
@media (max-width: 520px) {
  .ev-card { grid-template-columns: 68px 1fr; }
  .ev-card__date b { font-size: 1.7rem; }
  .ev-card__body { padding: 1.1rem 1.1rem 1.25rem; }
}

.evcal { max-width: 980px; margin-inline: auto; }
.evcal .cal__head { max-width: 460px; margin: 0 auto 1rem; }
.evcal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.evcal__dow { padding: 0.4rem 0; text-align: center; color: var(--muted); font-size: 0.64rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }
.evcal__cell {
  min-height: 104px;
  display: flex; flex-direction: column; gap: 3px;
  padding: 0.4rem;
  background: #fff;
  border: 1px solid var(--line);
  font: inherit; color: var(--ink); text-align: left;
}
.evcal__cell.is-blank { background: transparent; border-color: transparent; }
.evcal__cell.is-past { opacity: 0.45; }
.evcal__cell.has-events { cursor: pointer; }
.evcal__cell.has-events:hover, .evcal__cell[aria-pressed="true"] { border-color: var(--wine); }
.evcal__cell[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--wine); }
.evcal__num { font-family: var(--serif); font-size: 1.05rem; line-height: 1; }
.evcal__cell.is-today .evcal__num { color: var(--wine); font-weight: 600; }
.evcal__chip {
  display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  padding: 2px 5px;
  background: var(--ink); color: #fff;
  font-size: 0.62rem; font-weight: 500; line-height: 1.5;
}
.evcal__chip--announcement, .evcal__chip--promotion { background: var(--wine); }
.evcal__chip--special { background: var(--gold); color: var(--ink); }
.evcal__more { color: var(--muted); font-size: 0.6rem; }
@media (max-width: 640px) {
  .evcal__cell { min-height: 58px; padding: 0.3rem; align-items: center; }
  .evcal__chip { width: 7px; height: 7px; padding: 0; border-radius: 50%; font-size: 0; }
  .evcal__more { display: none; }
}
.ev-day { max-width: 860px; margin: 2rem auto 0; }
.ev-day__title { margin: 0 0 1rem; text-align: center; font-family: var(--serif); font-size: 1.5rem; font-weight: 400; }

/* ==========================================================================
   Promotional pop-up (site.js). Shown once per visitor per campaign.
   ========================================================================== */
.promo {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center;
  padding: 1rem;
  background: rgba(20, 15, 12, 0.72);
  animation: promo-in 0.35s ease both;
}
@keyframes promo-in { from { opacity: 0; } to { opacity: 1; } }
.promo__card {
  position: relative;
  width: min(540px, 100%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  background: var(--paper);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.promo__media, .promo__media img { display: block; width: 100%; }
.promo__media img { height: auto; }
.promo__body { padding: 1.5rem 1.5rem 1.75rem; text-align: center; }
.promo__title { margin: 0 0 0.5rem; font-family: var(--serif); font-size: 1.9rem; font-weight: 400; line-height: 1.15; }
.promo__text { margin: 0 0 1.25rem; color: var(--ink-soft); font-size: 0.98rem; }
.promo__close {
  position: sticky; top: 0.6rem; float: right; z-index: 2;
  width: 44px; height: 44px; margin: 0.6rem 0.6rem -50px 0;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: rgba(20, 15, 12, 0.78); color: #fff;
  font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.promo__close:hover, .promo__close:focus-visible { background: var(--wine); outline: 2px solid #fff; outline-offset: 2px; }
html.promo-open { overflow: hidden; }

/* ==========================================================================
   Staff schedule (schedule.html) — Sunday-to-Saturday grid, roles as rows
   ========================================================================== */
.weekbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin-bottom: 1rem; }
.weekbar__label { min-width: 15rem; text-align: center; font-family: var(--serif); font-size: 1.45rem; }
.weekbar__field { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--muted); font-size: 0.8rem; }
.weekbar__field input { padding: 0.45rem 0.6rem; border: 1px solid var(--line); background: #fff; font: inherit; font-size: 0.9rem; color: var(--ink); }
#hint .msg { margin: 0 0 0.75rem; }
.sched-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); }
.sched { width: 100%; min-width: 1060px; border-collapse: collapse; table-layout: fixed; }
.sched th, .sched td { padding: 0.45rem; border: 1px solid var(--line); vertical-align: top; }
.sched thead th { background: var(--cream); font-weight: 400; text-align: center; }
.sched__corner { width: 112px; color: var(--muted); font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; }
.sched__day b { display: block; font-family: var(--serif); font-size: 1.2rem; font-weight: 400; }
.sched__day small { display: block; color: var(--muted); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; }
.sched__day.is-today { box-shadow: inset 0 -3px 0 var(--wine); }
.sched__day.is-closed { background: #ece5dc; }
.sched__cov { display: block; margin-top: 0.3rem; color: var(--wine); font-size: 0.68rem; font-weight: 600; }
.sched__cov--none { color: var(--muted); font-weight: 400; }
.sched__closed { display: inline-flex; align-items: center; gap: 0.25rem; margin-top: 0.35rem; color: var(--muted); font-size: 0.68rem; cursor: pointer; }
.sched__role {
  position: sticky; left: 0; z-index: 1;
  background: #fff; text-align: left;
  border-left: 4px solid var(--role, var(--line)) !important;
  font-size: 0.66rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft);
}
.sched td.is-closed { background: repeating-linear-gradient(135deg, #f6f1ea, #f6f1ea 6px, #efe7dd 6px, #efe7dd 12px); }
.shift {
  display: block; width: 100%;
  margin: 0 0 0.3rem; padding: 0.35rem 0.45rem;
  border: 1px solid var(--line); border-left: 3px solid var(--role, var(--wine));
  background: var(--paper); color: var(--ink);
  font: inherit; font-size: 0.78rem; line-height: 1.35; text-align: left; cursor: pointer;
}
.shift:hover, .shift:focus-visible { border-color: var(--ink); border-left-color: var(--role, var(--wine)); outline: none; }
.shift b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.shift span { color: var(--muted); }
.shift.is-open { border-style: dashed; border-left-style: solid; background: #fff; }
.shift.is-open b { color: var(--muted); font-style: italic; font-weight: 500; }
.shift.is-conflict { border-color: #b3261e; background: #fbeaea; }
.shift__note { display: block; color: var(--ink-soft); font-size: 0.68rem; }
.addshift { width: 100%; padding: 0.3rem; border: 1px dashed var(--line); background: transparent; color: var(--muted); font: inherit; font-size: 0.72rem; cursor: pointer; }
.addshift:hover, .addshift:focus-visible { border-color: var(--ink); color: var(--ink); outline: none; }
.sched__notes textarea { width: 100%; min-height: 3.2rem; padding: 0.35rem; border: 1px solid var(--line); background: var(--paper); font: inherit; font-size: 0.78rem; resize: vertical; }
/* wide tables scroll inside their own box on phones instead of pushing the page sideways */
#summary, #staffList, #tplList { overflow-x: auto; }
.sched-h3 { margin: 2rem 0 0.75rem; font-family: var(--serif); font-size: 1.4rem; font-weight: 400; }
.tbl tfoot th { padding: 0.6rem 0.75rem; border-top: 2px solid var(--line); background: var(--cream); text-align: left; }
.timepick { display: flex; gap: 0.4rem; }
.timepick select { flex: 0 0 auto; width: auto; }
.timepick input { flex: 1; }
.rolelist { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); }
.rolelist li { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.45rem 0.6rem; border-top: 1px solid var(--line); }
.rolelist li:first-child { border-top: 0; }
.rolelist button:disabled { opacity: 0.35; cursor: default; }
.print-only { display: none; }
@media print {
  @page { size: landscape; margin: 10mm; }
  body.admin { background: #fff; }
  .admin__bar, .tabs, .weekbar, .toolbar, #hint, .addshift, .sched__closed, .sched__notes textarea, .sched-h3, #summary { display: none !important; }
  .print-only { display: block !important; }
  .print-title { margin: 0 0 8px; font-family: var(--serif); font-size: 16pt; }
  .admin__body { padding: 0; max-width: none; }
  .sched-wrap { overflow: visible; border: 0; }
  .sched { min-width: 0; font-size: 8.5pt; }
  .sched__role { position: static; }
  .shift { break-inside: avoid; padding: 2px 4px; }
}

/* ==========================================================================
   Two-tier staff area: owner vs staff. The server enforces permissions;
   these rules only decide what each role is shown.
   ========================================================================== */
body[data-role="staff"] .owner-only { display: none !important; }
body:not([data-role="staff"]) .staff-only { display: none !important; }
.whoami { color: var(--muted); font-size: 0.78rem; letter-spacing: 0.04em; }
.shift.is-static { cursor: default; }
.shift.is-static:hover { border-color: var(--line); border-left-color: var(--role, var(--wine)); }
.shift.is-mine { background: #fff4d9; border-color: var(--gold); border-left-color: var(--role, var(--wine)); box-shadow: 0 0 0 1px var(--gold); }
.sched__closedtag { display: inline-block; margin-top: 0.35rem; padding: 0.1rem 0.4rem; background: var(--ink); color: #fff; font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; }
.daynote { display: block; color: var(--ink-soft); font-size: 0.78rem; white-space: pre-wrap; }
.sched__timeoff td { background: #fbf7ef; }
.offtag { display: block; margin: 0 0 0.25rem; padding: 0.2rem 0.4rem; border-left: 3px solid var(--gold); background: #fff; font-size: 0.74rem; }
.offtag.is-pending { border-left-style: dashed; color: var(--muted); }
.offtag em { font-size: 0.66rem; }
.tbl tr.is-me td { background: #fff4d9; }
.req { margin: 0 0 0.9rem; padding: 1rem 1.1rem; background: #fff; border: 1px solid var(--line); }
.req.is-pending { border-left: 3px solid var(--gold); }
.req__head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.75rem; }
.req__type { color: var(--gold); font-size: 0.64rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; }
.req__head .status { margin-left: auto; }
.req__when { margin: 0.45rem 0 0; font-family: var(--serif); font-size: 1.2rem; }
.req__msg { margin: 0.35rem 0 0; color: var(--ink-soft); white-space: pre-wrap; }
.req__reply { margin: 0.5rem 0 0; padding: 0.5rem 0.7rem; background: var(--cream); font-size: 0.9rem; }
.req__meta { margin: 0.4rem 0 0; color: var(--muted); font-size: 0.74rem; }
.req__acts { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.req__note { flex: 1 1 220px; padding: 0.5rem 0.6rem; border: 1px solid var(--line); font: inherit; font-size: 0.88rem; }
#reqList { overflow-x: auto; }
/* on a phone the bookings table scrolls sideways instead of stretching the page */
#list .day { overflow-x: auto; }

/* reservation history (the paper trail inside the Change box) */
.histwrap { margin-top: 1.75rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.histwrap h4 { margin: 0 0 0.6rem; font: 600 0.72rem/1 Arial, sans-serif; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.hist { max-height: 15rem; overflow-y: auto; }
.hist__row { padding: 0.5rem 0.7rem; margin-bottom: 0.4rem; background: var(--cream); font-size: 0.88rem; }
.hist__when { color: var(--muted); font-size: 0.74rem; margin-bottom: 0.15rem; }
.hist__old { color: var(--muted); text-decoration: line-through; }
.hist__why { color: var(--muted); font-size: 0.82rem; font-style: italic; margin-top: 0.15rem; }
.fine.err { color: var(--wine); }

/* sign-in: Staff Login / Owner Login toggle */
.logintoggle { display: grid; grid-template-columns: 1fr 1fr; margin: 1.5rem 0 0; border: 1px solid var(--wine); }
.logintoggle button { padding: 0.65rem 0.5rem; border: 0; background: #fff; color: var(--wine); font: inherit; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer; }
.logintoggle button[aria-selected="true"] { background: var(--wine); color: #fff; }
.logintoggle button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.login .showpw { justify-content: flex-start; margin: -0.6rem 0 1.25rem; font-size: 0.85rem; }
@media print { .whoami { display: none !important; } .shift.is-mine { box-shadow: none; } }

/* dashboard: eight tabs need to wrap on narrower windows */
.tabs { flex-wrap: wrap; }

/* dashboard: event / pop-up editors */
.editor { display: grid; gap: 1.5rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1100px) { .editor { grid-template-columns: 1.15fr 0.85fr; } }
.editor__form { padding: 1.5rem; background: #fff; border: 1px solid var(--line); }
.editor__form h3 { margin: 0 0 1rem; font-family: var(--serif); font-size: 1.4rem; font-weight: 400; }
.editor__form .field label { text-align: left; }
.daypick { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.daypick label { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.35rem 0.6rem; border: 1px solid var(--line); font-size: 0.8rem; cursor: pointer; }
.imgpick { display: grid; gap: 0.6rem; }
.imgpick img { max-width: 220px; border: 1px solid var(--line); }
.hint { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.78rem; line-height: 1.5; }

/* ==========================================================================
   Booking flow: centered and symmetric
   ========================================================================== */
.booking__step { text-align: center; }
.step-title { justify-content: center; }
.pills { justify-content: center; }
.cal { margin-inline: auto; }
.cal__legend { margin: 0.9rem 0 0; color: var(--muted); font-size: 0.82rem; }
/* Time slots: a centered wrapping row, so a short last row (e.g. 5 of 7) sits in the
   middle instead of packing to the left the way a grid does. */
.slots { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; max-width: 760px; margin-inline: auto; }
.slots-group { margin: 1.25rem 0 0.6rem; text-align: center; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold, #b3924f); }
.slots-group:first-child { margin-top: 0; }
.slot { flex: 0 0 98px; }
#form, .notice, .waitbox, .card-box, .contact-form { max-width: 760px; margin-inline: auto; }
.card-box { text-align: left; }
.field label { text-align: center; }
.check { justify-content: center; text-align: left; }.waitbox { text-align: center; }
.booking__foot { flex-direction: column; justify-content: center; gap: 1.1rem; text-align: center; }
