:root {
  color-scheme: light; --accent: #385345; --ink: #1d2921; --muted: #566458;
  --surface: #fff; --canvas: #f3f4ee; --line: #dce2d8; --button: #203c2e;
  font: 16px/1.5 system-ui, sans-serif;
}
.dark { color-scheme: dark; --ink: #f0f3eb; --muted: #bac8bb; --surface: #202b25;
  --canvas: #17211b; --line: #45554a; --button: #2e553f; }
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); }
.dashboard, .panel-login {
  --ink: #192b25; --muted: #4e6258; --canvas: #f1f5f2; --line: #dce6df; --button: #176044;
  --panel-tint: #e9f4ed; --panel-accent: #1d6448;
  --panel-font: Inter, "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  font-family: var(--panel-font);
}
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: Georgia, serif; font-weight: 500; letter-spacing: -.035em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); line-height: 1.08; }
h2 { font-size: 1.65rem; line-height: 1.15; margin-bottom: .9rem; }
h3 { font-size: .96rem; }
.dashboard :is(h1, h2), .panel-login h1 { font-family: var(--panel-font); font-weight: 720; letter-spacing: -.045em; }
.dashboard h1 { font-size: clamp(2rem, 4vw, 3.15rem); }
.dashboard h2 { font-size: clamp(1.15rem, 2.2vw, 1.45rem); letter-spacing: -.03em; }
.dashboard :is(a, button, input, select, textarea):focus-visible,
.panel-login :is(a, button, input, select, textarea):focus-visible { outline: 2px solid #269267; outline-offset: 3px; }
a { color: inherit; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; }
button { border: 1px solid transparent; border-radius: .55rem; background: var(--button); color: white; padding: .62rem .95rem; font-weight: 650; cursor: pointer; }
button:disabled { opacity: .65; cursor: default; }
.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
input, textarea, select { width: 100%; min-width: 0; color: var(--ink); border: 1px solid var(--line); background: var(--surface); border-radius: .55rem; padding: .58rem .7rem; }
input[type=color] { padding: .2rem; height: 2.8rem; }
textarea { resize: vertical; }
form { display: grid; gap: .75rem; }
label { display: grid; gap: .27rem; font-size: .88rem; font-weight: 650; }
form button { justify-self: start; }
.hint { color: var(--muted); font-size: .86rem; }
.eyebrow { color: var(--muted); font-weight: 750; font-size: .75rem; letter-spacing: .13em; text-transform: uppercase; margin-bottom: .5rem; }
.error, .notice { padding: .65rem .85rem; border-radius: .55rem; background: #e0ece0; color: #173c26; margin-bottom: .8rem; }
.error { background: #ffe4dc; color: #852613; }
.topbar {
  position: sticky; inset-block-start: 0; z-index: 4;
  display: flex; align-items: center; flex-wrap: wrap; gap: .45rem 1rem;
  padding: .7rem max(1rem, calc((100% - 1220px) / 2));
  border-bottom: 1px solid var(--line); background: var(--surface); color: var(--ink);
  box-shadow: 0 2px 12px #163c2910;
}
.wordmark {
  display: inline-flex; align-items: center; color: #183c2e;
  font-size: 1.37rem; font-weight: 790; line-height: 1; letter-spacing: -.06em; text-decoration: none;
}
.wordmark::before {
  content: ""; flex: 0 0 1.9rem; height: 1.9rem; margin-inline-end: .48rem; border-radius: .6rem;
  background:
    linear-gradient(#fff 0 0) 50% 39% / .87rem .26rem,
    linear-gradient(#fff 0 0) 35% 63% / .14rem .5rem,
    linear-gradient(#fff 0 0) 65% 63% / .14rem .5rem,
    #176044;
  background-repeat: no-repeat;
}
.wordmark span { color: #2b875d; }
.topbar nav { display: flex; align-items: center; flex-wrap: wrap; gap: .14rem; min-width: 0; }
.topbar nav a {
  display: inline-flex; align-items: center; min-height: 40px; padding: .38rem .55rem;
  border-radius: .48rem; color: var(--muted); font-size: .85rem; font-weight: 620;
  text-decoration: none; white-space: nowrap;
}
.topbar nav a:hover, .topbar nav a[aria-current="page"] { color: #184e37; background: var(--panel-tint); }
.account { display: flex; align-items: center; gap: .55rem; margin-inline-start: auto; min-width: 0; font-size: .82rem; }
.account > span { max-width: min(11rem, 25vw); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account button { padding: .35rem .6rem; font-size: .81rem; white-space: nowrap; }
.container { width: min(1220px, calc(100% - 2rem)); margin: 2rem auto; }
.page-title { margin-bottom: 1.45rem; }
.page-title > p:last-child { color: var(--muted); margin-top: .5rem; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; margin-bottom: 1rem; }
.metrics article, .panel, .booking-card { border: 1px solid var(--line); background: var(--surface); border-radius: .85rem; }
.metrics article { padding: .9rem 1rem; }
.metrics span { display: block; color: var(--muted); font-size: .84rem; }
.metrics strong { font: 2rem Georgia, serif; }
.dashboard .metrics strong { font-family: var(--panel-font); font-weight: 750; line-height: 1.15; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.dashboard :is(.panel, .metrics article) { border-radius: .9rem; box-shadow: 0 3px 14px #153d2508; }
.dashboard :is(input, select, textarea, button, .secondary) { border-radius: .55rem; }
.dashboard :is(input, select, textarea) { box-shadow: inset 0 1px 2px #152d1f07; }
.dashboard .secondary:hover { background: #f4f8f5; }
.dashboard :is(#report-settings, #seating-areas, [id^="booking-"]) { scroll-margin-top: 7rem; }
.columns { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1rem; }
.stack { display: grid; align-content: start; gap: 1rem; min-width: 0; }
.panel { padding: 1.2rem; min-width: 0; }
.code-item + .code-item { margin-block-start: .85rem; }
.copy-row { display: flex; align-items: start; gap: .5rem; margin-top: .3rem; }
.copy-row input, .copy-row textarea { font: .81rem/1.45 ui-monospace, monospace; background: var(--canvas); }
details { margin-top: .8rem; font-size: .86rem; }
summary { cursor: pointer; font-weight: 650; }
details p { margin-top: .5rem; }
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; }
.preview iframe { width: 100%; height: 650px; border: 1px solid var(--line); border-radius: .6rem; margin-top: .65rem; }
.qr { display: block; width: min(160px, 100%); background: white; margin-bottom: .4rem; }
.booking { padding: clamp(.55rem, 3vw, 1.6rem); }
.booking-card { width: min(100%, 440px); margin-inline: auto; padding: clamp(.85rem, 4vw, 1.5rem); border-top: 5px solid var(--accent); }
.booking-card header, .booking-card h1 { margin-bottom: .85rem; }
.booking-card h1 { font-size: clamp(1.7rem, 7vw, 2.55rem); }
.booking-card nav { display: flex; gap: .9rem; margin-top: 1rem; font-size: .82rem; }
.preview-launcher { display: flex; justify-content: flex-end; margin-bottom: .85rem; }
.preview-launcher button { background: var(--accent); color: var(--accent-text, #fff); border-radius: 999px; opacity: 1; }
.booking-card form button { width: 100%; background: var(--accent); color: var(--accent-text, #fff); }
.booking-card nav [aria-current="true"] { font-weight: 750; }
.logo { display: block; width: auto; max-width: 100%; max-height: 65px; margin-bottom: .65rem; }
@media (max-width: 770px) { .columns { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .metrics { grid-template-columns: repeat(2, 1fr); } .container { margin-block: 1.35rem; } .topbar { gap: .65rem; } }

#availability-status:empty { display: none; }

@media (max-width: 980px) {
  .topbar nav { order: 4; flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; }
}
@media (max-width: 440px) {
  .topbar { gap: .35rem .55rem; padding: .55rem .7rem; }
  .topbar .account > span { display: none; }
  .topbar nav a { flex-shrink: 0; }
  .container { width: calc(100% - 1.35rem); }
}
.hours-panel { max-width: 700px; }
.hours-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.hours-row { min-width: 0; margin: 0; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: .55rem; }
.hours-row legend { padding: 0 .25rem; font-weight: 650; }
.hours-closed { display: flex; align-items: center; gap: .35rem; margin-top: .5rem; }
.hours-closed input { width: auto; }
@media (max-width: 420px) { .hours-grid { grid-template-columns: 1fr; } }

.booking-card label[hidden] { display: none; }
.hours-row > .hint { margin-top: .55rem; }

.layout-picker { border: 0; padding: 0; margin: 0; min-width: 0; }
.layout-picker legend { padding: 0; margin-bottom: .35rem; font-size: .88rem; font-weight: 650; }
.layout-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; }
.layout-choices label {
  display: flex; align-items: center; gap: .35rem; min-height: 44px;
  padding: .3rem .5rem; border: 1px solid var(--line); border-radius: .55rem; cursor: pointer;
}
.layout-choices label:has(input:checked) { border-color: var(--button); background: var(--canvas); }
.layout-choices input { width: auto; margin: 0; accent-color: var(--button); }
.booking-fields, .booking-schedule, .booking-contact { display: contents; }

.booking-layout-compact .booking-card { width: min(100%, 390px); }
.booking-layout-compact .booking-card header { margin-bottom: .5rem; }
.booking-layout-compact .booking-card h1 { font-size: clamp(1.7rem, 6vw, 2rem); margin-bottom: 0; }
.booking-layout-compact .booking-card form { gap: .5rem; }
.booking-layout-compact .booking-schedule {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: .4rem .55rem;
}
.booking-layout-compact .booking-schedule > :nth-child(n + 3) { grid-column: 1 / -1; }

.booking-layout-sectioned .booking-card { width: min(100%, 730px); border-top-width: 1px; }
.booking-layout-sectioned .booking-card header {
  border-inline-start: .25rem solid var(--accent); padding-inline-start: .75rem; margin-bottom: 1.1rem;
}
.booking-layout-sectioned .booking-card header h1 { margin-bottom: 0; }
.booking-layout-sectioned .booking-fields { display: grid; gap: .65rem; }
.booking-layout-sectioned :is(.booking-schedule, .booking-contact) {
  display: grid; gap: .55rem; align-content: start; padding: .7rem;
  border: 1px solid var(--line); border-radius: .65rem; background: var(--canvas); min-width: 0;
}
.booking-layout-sectioned .booking-fields h2 { font-size: 1.25rem; margin: 0 0 .25rem; }
@media (min-width: 445px) {
  .booking-layout-sectioned .booking-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 350px) {
  .layout-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.panel-login {
  display: grid; place-items: center; min-height: 100vh; min-height: 100dvh;
  background: radial-gradient(ellipse at 42% 20%, #dfeee4, transparent 56%), var(--canvas);
}
.panel-login .booking-card {
  padding: clamp(1.25rem, 5vw, 2rem); border: 1px solid var(--line); border-radius: 1.15rem;
  box-shadow: 0 18px 56px #163c2916;
}
.panel-login .booking-card h1 { font-size: clamp(1.8rem, 6vw, 2.35rem); margin-bottom: 1.25rem; }
.panel-login .booking-card button { background: var(--button); color: #fff; }

.booking-table-plan {
  display: grid;
  gap: .38rem;
  padding: .65rem;
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: var(--canvas);
}
.booking-fields .booking-table-plan h2, .booking-table-plan h2 {
  margin: 0;
  font: 720 .95rem/1.3 system-ui, sans-serif;
  letter-spacing: -.015em;
}
.booking-table-plan .hint { margin: 0; font-size: .73rem; }
.booking-tables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 4.65rem), 1fr));
  gap: .32rem;
  max-block-size: 15rem;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-y: auto;
}
.booking-table {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: .14rem;
  min-width: 0;
  padding: .4rem .23rem;
  border: 1px solid var(--table-line, var(--line));
  border-radius: .48rem;
  background: var(--table-bg, var(--surface));
  color: var(--table-ink, var(--ink));
  text-align: center;
  font: .69rem/1.25 system-ui, sans-serif;
  overflow-wrap: anywhere;
}
.booking-table[data-state="free"] { --table-bg: #e8f4eb; --table-line: #b6d5bd; --table-ink: #235337; }
.booking-table[data-state="reserved"] { --table-bg: #fff0e3; --table-line: #e8c1a0; --table-ink: #774319; }
.dark .booking-table[data-state="free"] { --table-bg: #263d2e; --table-line: #557a5f; --table-ink: #d3efda; }
.dark .booking-table[data-state="reserved"] { --table-bg: #413127; --table-line: #936c4b; --table-ink: #f7ddc6; }
.booking-table-symbol {
  width: 1.15rem;
  height: .7rem;
  margin: .1rem 0;
  border: 1px solid currentColor;
  border-radius: .23rem;
  box-shadow: -.38rem 0 0 -.22rem currentColor, .38rem 0 0 -.22rem currentColor;
}
.booking-table-capacity { opacity: .88; }
.booking-table-status { font-size: .67rem; font-weight: 720; }
.booking-area-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 7.25rem), 1fr)); }
.booking-area { align-content: center; gap: .28rem; min-height: 3.45rem; padding: .5rem; font-size: .78rem; }
.booking-area-symbol {
  width: .95rem; height: .75rem; border: 1px solid currentColor; border-radius: .2rem;
  background: linear-gradient(currentColor, currentColor) 56% center / 1px 100% no-repeat,
              linear-gradient(currentColor, currentColor) right 50% / 44% 1px no-repeat;
}
