/* Archivo (SIL Open Font License), self-hosted so no external requests are needed */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(../fonts/archivo-latin-wdth-normal.woff2) format('woff2-variations'), url(../fonts/archivo-latin-wdth-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(../fonts/archivo-latin-ext-wdth-normal.woff2) format('woff2-variations'), url(../fonts/archivo-latin-ext-wdth-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --leather: #2B363C;
  --leather-2: #3A474E;
  --walnut: #9B6842;
  --walnut-ink: #7A4F31;
  --walnut-soft: #D2A67F;
  --table: #23282B;
  --daylight: #EDF1F3;
  --paper: #FFFFFF;
  --ink: #1D2428;
  --ink-2: #5A656C;
  --line: #D6DDE1;
  --amber: #DE962F;
  --steel: #3D7EA6;
  --green: #3A845E;
  --red: #B2432A;
  --grey: #80888E;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--daylight);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
img { max-width: 100%; display: block; }
a { color: var(--walnut-ink); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--steel); outline-offset: 2px; }
[hidden] { display: none !important; }
code { font-size: .92em; background: rgba(43, 54, 60, .08); padding: 1px 6px; border-radius: 5px; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 12px; border: 0;
  font-weight: 600; font-size: 16px; line-height: 1.2; cursor: pointer; text-decoration: none;
  background: var(--leather); color: #fff; white-space: nowrap;
}
.btn:hover { background: var(--leather-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { background: #B5BEC3; cursor: not-allowed; transform: none; }
.btn-ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { background: #fff; box-shadow: inset 0 0 0 1.5px var(--ink-2); }
.btn-danger { background: var(--red); }
.btn-danger:hover { background: #9A3822; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn-wide { width: 100%; }
.link, .link-btn {
  background: none; border: 0; padding: 4px 2px; color: var(--walnut-ink); font-weight: 600;
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.link.quiet { color: var(--ink-2); }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--daylight); font-size: 24px; line-height: 1; cursor: pointer; flex: none; }

/* forms */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field > label, .field-label { font-weight: 600; font-size: 15px; }
.field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.field select, .field textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 10px;
  border: 1.5px solid var(--line); background: #fff;
}
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--steel); outline: none; box-shadow: 0 0 0 3px rgba(61, 126, 166, .2); }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.hint { font-size: 13px; color: var(--ink-2); }
.field-error { font-size: 14px; color: var(--red); font-weight: 600; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--leather); flex: none; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* notices */
.notice { padding: 12px 16px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.notice-warn { background: #FBEFD9; border-color: #EFD3A2; color: #6B4510; }
.notice-error { background: #F7E1DB; border-color: #EBBDAF; color: #7C2B17; }
.notice-success { background: #DDEEE4; border-color: #B8DAC6; color: #22553B; }

/* status */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 2px 10px 2px 8px; border-radius: 99px; white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.s-new { background: #FBEAD3; color: #8A560E; }
.s-preparing { background: #DCEAF3; color: #245A7C; }
.s-ready { background: #E4E6F6; color: #3E4A8C; }
.s-delivered { background: #DDEEE4; color: #276144; }
.s-cancelled { background: #E7EAEC; color: #555E64; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 104px; transform: translateX(-50%); z-index: 90;
  background: var(--leather); color: #fff; padding: 12px 18px; border-radius: 12px;
  max-width: calc(100% - 32px); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .45); font-size: 15px;
}
.toast.is-error { background: #7C2B17; }

/* ---------- seat map (layout from the CMS) ---------- */
.map { --u: 31px; --inset: 4px; --back: 6px; --boff: -5px; --r: 9px; display: inline-flex; flex-direction: column; align-items: center; gap: 10px; }
.map-scroll { max-width: 100%; overflow-x: auto; display: flex; justify-content: center; padding: 8px 8px 4px; }
.map-scroll > .map { margin: 0 auto; }
.map-grid { display: grid; grid-template-columns: repeat(var(--cols), var(--u)); grid-template-rows: repeat(var(--rows), var(--u)); }
.map-edge { display: flex; align-items: center; gap: 10px; align-self: stretch; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.map-edge::before, .map-edge::after { content: ""; flex: 1; height: 1px; background: var(--line); min-width: 16px; }
.map-edge-top::before, .map-edge-top::after { height: 3px; background: repeating-linear-gradient(90deg, #BFD0D9 0 18px, transparent 18px 21px); }
.map .table { background: var(--table); border-radius: 4px; position: relative; margin: 1px; box-shadow: 0 12px 26px -10px rgba(35, 40, 43, .55); }
.map .table-seam { position: absolute; left: 0; right: 0; top: 44%; height: 1px; background: rgba(255, 255, 255, .1); }
.seat {
  margin: var(--inset); border: 0; padding: 0; border-radius: var(--r); min-width: 0; min-height: 0;
  background: var(--leather); color: #E8EDEF; position: relative; display: grid; place-items: center;
}
.seat::before { content: ""; position: absolute; background: var(--walnut); border-radius: 3px; }
.seat.back-left::before { left: var(--boff); top: 14%; bottom: 14%; width: var(--back); }
.seat.back-right::before { right: var(--boff); top: 14%; bottom: 14%; width: var(--back); }
.seat.back-top::before { top: var(--boff); left: 14%; right: 14%; height: var(--back); }
.seat.back-bottom::before { bottom: var(--boff); left: 14%; right: 14%; height: var(--back); }
.seat-label { font-size: 19px; font-weight: 700; font-stretch: 78%; font-variant-numeric: tabular-nums; line-height: 1; }
button.seat { cursor: pointer; transition: background .12s; }
button.seat:hover:not(:disabled):not(.is-selected) { background: var(--leather-2); }
button.seat:active:not(:disabled) { transform: scale(.96); }
.seat.is-selected { background: var(--walnut); color: #fff; box-shadow: 0 0 0 3px var(--daylight), 0 0 0 5.5px var(--walnut); }
.seat.is-selected::before { background: #5B3A24; }
.seat.is-off { background: repeating-linear-gradient(135deg, #C9D1D5 0 6px, #DCE2E5 6px 12px); color: #7F8A90; cursor: not-allowed; }
.seat.is-off::before { background: #B9C3C8; }
.seat.is-busy::after { content: ""; position: absolute; top: -5px; right: -5px; width: 13px; height: 13px; border-radius: 50%; background: var(--amber); border: 2.5px solid var(--daylight); }
@media (min-width: 600px) { .map-lg { --u: 36px; --inset: 5px; --back: 7px; --boff: -6px; } .map-lg .seat-label { font-size: 22px; } }
.map-md { --u: 22px; --inset: 3px; --back: 4px; --boff: -3px; --r: 7px; }
.map-md .seat-label { font-size: 14px; }
.map-sm { --u: 7px; --inset: 1px; --back: 2px; --boff: -2px; --r: 2px; gap: 0; }
.map-sm .seat { background: #56626A; }
.map-sm .seat::before { background: #6E5140; }
.map-sm .seat.is-selected { background: #F5B962; box-shadow: 0 0 0 2px rgba(245, 185, 98, .35); }
.map-sm .seat.is-selected::before { background: #F5B962; }
.map-sm .table { background: #15191B; box-shadow: inset 0 0 0 1px #3A4247; border-radius: 2px; }
.map-heat .seat { background: color-mix(in srgb, var(--walnut) calc(var(--heat) * 100%), #DCE2E5); color: var(--ink); }
.map-heat .seat.is-hot { color: #fff; }
.map-heat .seat::before { background: #B4BEC4; }

/* item visuals */
.thumb { flex: none; width: 58px; height: 58px; border-radius: 14px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; color: var(--leather); overflow: hidden; }
.thumb svg { width: 34px; height: 34px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.sm { width: 48px; height: 48px; border-radius: 12px; }
.thumb.sm svg { width: 28px; height: 28px; }
.thumb.xs { width: 40px; height: 40px; border-radius: 10px; }
.thumb.xs svg { width: 24px; height: 24px; }

/* plain pages: sign in, installer, errors */
.plain-body { min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; padding: 48px 16px; }
.plain { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 28px; display: grid; gap: 16px; }
.plain-wide { max-width: 640px; }
.plain-brand { font-size: 14px; color: var(--ink-2); font-weight: 600; }
.plain h1 { font-size: 30px; font-weight: 700; font-stretch: 86%; line-height: 1.1; }
.section-title { font-size: 18px; font-weight: 600; margin-top: 8px; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.checks li { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 10px 14px; background: #fff; font-size: 15px; }
.checks li span { text-align: right; color: var(--green); font-weight: 600; }
.checks li.fail span { color: var(--red); font-weight: 400; max-width: 280px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Company logo */
.brand-mark, .plain-logo, .g-logo, .adm-logo, .svc-logo, .qr-logo, .logo-img { display: block; object-fit: contain; }
.plain-brand { display: flex; align-items: center; gap: 10px; }
.plain-logo { height: 34px; width: auto; max-width: 150px; border-radius: 6px; }
.g-logo { height: 38px; width: auto; max-width: 130px; border-radius: 7px; flex: none; }
