:root {
  color-scheme: light;
  --paper: #faf7f2;
  --panel: #fffdfa;
  --ink: #2a221d;
  --quiet: #675a50;
  --line: #e6dcd1;
  --accent: #9c3919;
  --accent-hot: #7b2a11;
  --accent-soft: #fce5d9;
  --sidebar: #2a201a;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
::selection { background: #ffbc96; color: #2a201a; }
:focus-visible { outline: 3px solid #c64c26; outline-offset: 3px; }
button, input, select, textarea { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { min-height: 42px; padding: .56rem .95rem; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--panel); font-weight: 650; cursor: pointer; }
button:hover { background: #f4ece4; border-color: #cdb9aa; }
button:disabled { opacity: .55; cursor: default; }
button.primary { background: var(--accent); border-color: var(--accent); color: white; }
button.primary:hover { background: var(--accent-hot); }
a { color: var(--accent-hot); text-underline-offset: .22em; }
label { display: grid; gap: .4rem; font-size: .9rem; font-weight: 650; }
input, select, textarea { min-width: 0; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; padding: .56rem .67rem; background: var(--panel); color: var(--ink); }
input:focus, select:focus, textarea:focus { border-color: #c64c26; }
input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; margin: 0; accent-color: var(--accent); }
p, h1, h2, h3 { margin: 0; }
h1 { font-size: 2rem; line-height: 1.14; letter-spacing: -.035em; }
h2 { font-size: 1.25rem; letter-spacing: -.025em; }
h3 { font-size: 1rem; }
.visually-hidden { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.boot { display: grid; min-height: 100svh; place-items: center; color: var(--quiet); }
.sign-in { display: grid; grid-template-columns: .88fr 1.12fr; min-height: 100svh; }
.sign-in-content { display: grid; place-items: center; padding: 2rem; }
.sign-in form { width: min(100%, 340px); }
.sign-in .wordmark { object-fit: cover; display: block; width: 145px; height: auto; margin: 0 0 1.55rem -.47rem; mix-blend-mode: multiply; }
.sign-in p { margin: .6rem 0 1.65rem; color: var(--quiet); }
.sign-in label { margin: 0 0 1rem; }
.sign-in button { width: 100%; margin-top: .45rem; }
.sign-in-photo { display: flex; align-items: end; background: linear-gradient(0deg, #25160dc9, transparent 49%), url("/counter.jpg") 46% center / cover; color: #fff8ef; padding: 2.1rem 2.45rem; font-size: 1.2rem; font-weight: 720; }
.shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100svh; }
.sidebar { display: flex; position: sticky; top: 0; height: 100svh; flex-direction: column; background: var(--sidebar); padding: 1.65rem .85rem 1rem; }
.brand { display: flex; flex-direction: column; align-items: flex-start; padding: 0 12px; gap: .62rem; margin-bottom: 2rem; text-decoration: none; color: #ffebdc; }
.brand img { display: block; width: 108px; height: auto; border-radius: 7px; }
.brand span { font-size: .95rem; letter-spacing: -.015em; font-weight: 650; }
.nav { display: grid; gap: 4px; }
.nav a { display: block; padding: .7rem .76rem; color: #f0dfd1; text-decoration: none; border-radius: 7px; font-weight: 600; font-size: .88rem; white-space: nowrap; }
.nav a:hover { background: #483127; }
.nav a[aria-current] { background: #613321; color: #fff7ed; }
.sign-out { margin-top: auto; text-align: left; background: transparent; color: #f0dfd1; border-color: transparent; }
.sign-out:hover { background: #483127; border-color: transparent; }
.toolbar { min-height: 67px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 9px 14px; padding: .65rem clamp(1rem, 3.6vw, 3rem); border-bottom: 1px solid var(--line); background: var(--panel); }
.toolbar div { display: flex; align-items: center; gap: .67rem; min-width: 0; }
.toolbar strong { font-size: .93rem; white-space: nowrap; }
.toolbar span { color: var(--quiet); font-size: .82rem; }
.toolbar-divider { height: .85rem; width: 1px; background: var(--line); }
.account { overflow: hidden; text-overflow: ellipsis; max-width: 20ch; white-space: nowrap; }
.page { max-width: 1450px; margin: auto; padding: clamp(1rem, 3.6vw, 3rem); }
.page-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.page-heading p, .help { color: var(--quiet); margin-top: .43rem; line-height: 1.5; }
.filters { display: flex; align-items: center; flex-wrap: wrap; gap: .52rem; margin-bottom: 1rem; }
.filter { display: inline-flex; gap: .48rem; align-items: center; }
.filter[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-hot); border-color: #e5b8a5; }
.filter-count { min-width: 19px; font-size: .8rem; font-weight: 750; text-align: center; font-variant-numeric: tabular-nums; }
.list { border: 1px solid var(--line); border-radius: 13px; overflow: hidden; background: var(--panel); }
.row { display: grid; grid-template-columns: minmax(110px, .9fr) minmax(115px, 1.1fr) minmax(75px, .7fr) minmax(110px, .95fr) 85px; gap: .8rem; align-items: center; padding: .95rem 1rem; }
.row + .row { border-top: 1px solid var(--line); }
.list-heading { background: #f4ede5; color: var(--quiet); font-size: .85rem; font-weight: 650; }
.row > * { min-width: 0; }
.order-id { font-weight: 720; }
.stacked { display: grid; gap: .2rem; overflow-wrap: anywhere; }
.secondary { color: var(--quiet); font-size: .86rem; }
.money { font-variant-numeric: tabular-nums; }
.badge { display: inline-flex; width: fit-content; padding: .22rem .53rem; border-radius: 6px; background: #eee8e1; color: #514236; line-height: 1.35; font-size: .83rem; font-weight: 680; }
.badge[data-state="payment_review"], .badge[data-state="paused"] { background: #fbe1cd; color: #803213; }
.badge[data-state="receipt_correction"], .badge[data-state="declined"] { background: #fae1e1; color: #873130; }
.badge[data-state="preparing"] { background: #f4ebc7; color: #643f0d; }
.badge[data-state="ready"], .badge[data-state="open"] { background: #e1eee0; color: #235130; }
.message { color: #923316; font-size: .87rem; line-height: 1.45; margin-block: .42rem; }
.message:empty { display: none; }
.notice { margin-bottom: 1rem; padding: .75rem .9rem; background: #e5efe1; color: #274829; border-radius: 8px; }
.notice[data-kind="error"] { color: #803213; background: #fbe1cd; }
.empty { padding: 2.5rem 1rem; text-align: center; }
.empty p { color: var(--quiet); margin-top: .5rem; }
.panel { max-width: 680px; padding: 1.15rem; background: var(--panel); border: 1px solid var(--line); border-radius: 13px; }
fieldset { border: 0; padding: 0; margin: 0 0 1.15rem; min-width: 0; }
legend { font-weight: 760; padding: 0 0 .65rem; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.switch-label { display: inline-flex; gap: .55rem; align-items: center; }
.help { font-size: .87rem; }
textarea { width: 100%; resize: vertical; }
.search { width: min(100%, 250px); }
#more-history { margin-top: 1rem; }
.menu-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(95px, 135px) auto auto; gap: 1rem; align-items: center; padding: 1rem; }
.menu-row + .menu-row { border-top: 1px solid var(--line); }
.menu-row strong { display: block; }
.menu-row p { margin-top: .3rem; }
dialog { max-height: calc(100dvh - 1.2rem); width: min(690px, calc(100vw - 1.2rem)); border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--ink); padding: 1.15rem; }
dialog::backdrop { background: #20160ec4; }
.ticket-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; border-bottom: 1px solid var(--line); margin-bottom: 1.1rem; padding-bottom: .9rem; }
.ticket-heading p { margin-top: .35rem; color: var(--quiet); }
.ticket-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: .9rem 0 1.1rem; }
.ticket-block { display: grid; gap: .48rem; overflow-wrap: anywhere; }
.ticket-items { margin: .55rem 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.ticket-items li { padding: .61rem 0; border-bottom: 1px solid var(--line); }
.ticket-total { display: flex; justify-content: space-between; margin-top: .65rem; }
.receipt { display: grid; gap: .5rem; align-content: start; }
.receipt img { display: block; max-width: 100%; max-height: 300px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; }
.ticket-actions { display: flex; flex-wrap: wrap; gap: .62rem; margin-top: 1rem; }
.action-fields { display: grid; gap: .55rem; margin-top: .95rem; }
.action-fields label { max-width: 520px; }
@media (max-width: 880px) {
  .shell { grid-template-columns: 170px minmax(0, 1fr); }
  .row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, .7fr) minmax(99px, 1fr) 81px; gap: .5rem; }
}
@media (max-width: 760px) {
  .row { grid-template-columns: minmax(0, 1fr) minmax(105px, auto); align-items: start; padding: .75rem; }
  .list-heading { display: none; }
  .row > button { grid-column: 2; justify-self: start; }
}
@media (max-width: 640px) {
  .shell { display: block; }
  .sidebar { position: static; height: auto; padding: .63rem .85rem 0; display: grid; grid-template-columns: 1fr auto; column-gap: .65rem; align-items: center; }
  .brand { flex-direction: row; align-items: center; padding: 0; margin: 0; width: fit-content; }
  .brand img { width: 75px; }
  .sign-out { grid-column: 2; grid-row: 1; margin: 0; }
  .nav { grid-column: span 2; display: flex; overflow: auto; padding: .55rem 0; }
  .nav a { padding: .57rem .64rem; }
  .toolbar { min-height: 52px; }
  .sign-in { display: flex; flex-direction: column; }
  .sign-in-photo { min-height: 190px; order: -1; background-position: center 39%; padding: .8rem 1.15rem; font-size: 1rem; }
  .sign-in-content { flex: 1; padding: 1.45rem; }
  h1 { font-size: 1.75rem; }
  .menu-row { grid-template-columns: minmax(0, 1fr) auto; gap: .65rem; }
  .menu-row > .stacked { grid-column: span 2; }
  .menu-row button { justify-self: start; }
  .ticket-grid { grid-template-columns: 1fr; }
}
