/* Tablemere application, wide screens and touch tills first. The phone app is in mobile.css. */
.app-body { --bar: 40px; }
.app-body .demo-bar { position: sticky; top: 0; z-index: 15; height: var(--bar); flex-wrap: nowrap; white-space: nowrap; }
.shell { --side: 204px; display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: calc(100vh - var(--bar)); }
.rail { position: sticky; top: var(--bar); align-self: start; display: flex; flex-direction: column; gap: 16px; height: calc(100vh - var(--bar)); padding: 16px 10px 12px; background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto; scrollbar-width: thin; }
.rail .brand { padding: 0 6px; }
.rail nav ul { display: grid; gap: 6px; }
.rail nav a { display: flex; align-items: center; gap: 11px; min-height: 40px; padding: 0 12px; border-radius: var(--radius); color: var(--ink-2); font-weight: 700; text-decoration: none; }
.rail nav a:hover { background: var(--soft); color: var(--ink); }
.rail nav a.is-active { background: var(--navy); color: #fff; }
.rail nav a .pill { margin-left: auto; font-style: normal; }
.rail-foot { display: grid; gap: 6px; margin-top: auto; }
.rail-clock { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: var(--radius); background: var(--soft); font: 700 15px/1.2 var(--head); }
.rail-clock small { display: block; font: 400 13px/1.3 var(--font); color: var(--ink-2); }
.whoami { display: flex; align-items: center; gap: 9px; padding: 8px 4px 2px; border-top: 1px solid var(--line); line-height: 1.3; }
.whoami strong { display: block; font-size: 14.5px; }
.whoami div span { font-size: 13px; color: var(--ink-2); }
.avatar { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 99px; background: var(--accent-tint); color: var(--accent-dark); font-size: 13.5px; font-weight: 700; }
.side-btn { display: flex; align-items: center; gap: 9px; min-height: 34px; padding: 0 8px; border: 0; border-radius: var(--radius); background: none; color: var(--ink-2); font-size: 14px; cursor: pointer; text-align: left; }
.side-btn:hover { background: var(--soft); color: var(--ink); }
.pill { display: inline-block; min-width: 22px; padding: 0 6px; border-radius: 99px; background: var(--soft); color: var(--ink); font-size: 12.5px; font-weight: 700; line-height: 22px; text-align: center; }
.pill-accent { background: var(--accent); color: #fff; }
.content { min-width: 0; width: 100%; max-width: 1320px; padding: 18px 24px 48px; }
.content > * + * { margin-top: 16px; }
.icon-btn { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; }

.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.page-head h1 { font: 700 27px/1.2 var(--head); letter-spacing: -.025em; }
.page-head p { color: var(--ink-2); }
.page-actions, .actionbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.actionbar:empty, .page-actions:empty { display: none; }
.back { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; font-weight: 700; font-size: 14.5px; text-decoration: none; }
.back + .page-head { margin-top: 2px; }
.card, .kcard { min-width: 0; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.card-flush { padding: 0; overflow: hidden; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; margin-bottom: 10px; }
.card-head a { font-size: 14px; font-weight: 700; }
.card h2, .kcard h2, .panel h2, .check h2 { font: 700 17px/1.25 var(--head); letter-spacing: -.01em; }
.columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.columns-wide { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.column { display: grid; gap: 16px; min-width: 0; }
.muted { color: var(--ink-2); }
.hint { margin-top: 10px; color: var(--ink-2); font-size: 14px; }
.late { color: var(--danger); font-weight: 700; }
.badge { display: inline-flex; align-items: center; padding: 1px 9px; border-radius: 99px; font-size: 13px; font-weight: 700; line-height: 1.65; white-space: nowrap; }
.tone-ok { background: var(--ok-tint); color: var(--ok); }
.tone-neutral { background: var(--soft); color: #473e38; }
.tone-warn { background: var(--warn-tint); color: var(--warn); }
.tone-danger { background: var(--danger-tint); color: var(--danger); }
.tone-info { background: var(--info-tint); color: var(--info); }
.tone-wait { background: var(--wait-tint); color: var(--wait); }
.tone-accent { background: var(--accent-tint); color: var(--accent-dark); }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.stat { display: flex; flex-direction: column; padding: 13px 18px; background: var(--surface); color: var(--ink); text-decoration: none; }
a.stat:hover { background: #fdf4ef; }
.stat-name, .stat-sub { font-size: 14px; color: var(--ink-2); }
.stat-value { font: 700 28px/1.3 var(--head); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* Filters */
.filterbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; }
.filter-selects { display: flex; flex-wrap: wrap; gap: 10px; }
.filter-selects:empty { display: none; }
.filter { display: grid; gap: 2px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.filter select { min-height: 44px; max-width: 100%; padding: 0 10px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); color: var(--ink); font-size: 15px; font-weight: 400; }
.searchfield { display: flex; align-items: center; gap: 9px; flex: 1 1 240px; max-width: 380px; min-height: 44px; padding: 0 13px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); color: var(--ink-2); }
.searchfield:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-tint); }
.searchfield input { flex: 1; min-width: 0; height: 40px; border: 0; background: none; color: var(--ink); outline: none; }
.tabs { display: flex; gap: 6px; max-width: 100%; padding: 2px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 7px; flex: none; min-height: 42px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--surface); font-size: 14.5px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.tab.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.tab.is-active .pill { background: #fff; color: var(--ink); }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 4px; border-radius: 12px; background: var(--soft); }
.segmented button { min-height: 44px; border: 0; border-radius: 9px; background: none; color: var(--ink-2); font-weight: 700; cursor: pointer; }
.segmented button.is-on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(40, 30, 20, .2); }
.list-count { color: var(--ink-2); font-size: 14px; }
.more-row { text-align: center; }

/* Tables and lists */
.table-wrap { overflow-x: auto; overscroll-behavior-x: contain; }
.table-scroll { max-height: 420px; overflow-y: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
th { padding: 10px; background: #faf8f6; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 13px; font-weight: 700; text-align: left; white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--line); }
td:not(.wrap) { white-space: nowrap; }
th:first-child, td:first-child { padding-left: 16px; }
th:last-child, td:last-child { padding-right: 16px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr[data-href] { cursor: pointer; }
tbody tr:hover { background: #fdf6f2; }
td a { font-weight: 700; color: var(--ink); text-decoration: none; }
tfoot td { border-top: 2px solid var(--ink); border-bottom: 0; font-weight: 700; }
th.num, td.num { text-align: right; }
.card:not(.card-flush) > .table-wrap { margin-inline: -18px; }
.card > .table-wrap th:first-child, .card > .table-wrap td:first-child { padding-left: 18px; }
.card > .table-wrap th:last-child, .card > .table-wrap td:last-child { padding-right: 18px; }
.empty { padding: 22px 16px; text-align: center; }
.empty h3 { font: 700 16px/1.3 var(--head); }
.empty p { color: var(--ink-2); margin-top: 3px; }
.empty .btn { margin-top: 12px; }
.empty .icon { width: 30px; height: 30px; color: var(--ok); }
.rows li + li, .plain li + li { border-top: 1px solid var(--line); }
.rows a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; padding: 8px 0; color: var(--ink); text-decoration: none; }
.rows a:hover strong { color: var(--accent-dark); }
.rows a > span:first-child { display: grid; min-width: 0; line-height: 1.38; white-space: pre-wrap; }
.rows small { color: var(--ink-2); font-size: 13.5px; }
.card-list .card-head { margin-bottom: 2px; }
.plain li { display: grid; padding: 8px 0; line-height: 1.4; }
.plain span { color: var(--ink-2); font-size: 14px; }
.facts > div { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; }
.facts > div + div { border-top: 1px solid var(--line); }
.facts dt { color: var(--ink-2); }
.facts dd { min-width: 0; text-align: right; overflow-wrap: anywhere; font-weight: 700; font-variant-numeric: tabular-nums; }
.callout { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: var(--radius); background: var(--info-tint); }
.callout-warn { background: var(--warn-tint); }
.callout .icon { margin-top: 2px; }

/* Floor plan: the signature screen */
.floor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 306px; gap: 16px; align-items: start; }
.floor-main { display: grid; gap: 12px; min-width: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 14px; border-radius: 4px; border: 2px solid var(--st-line); background: var(--st-bg); }
.legend b { color: var(--ink); }
.st-free { --st-bg: #fff; --st-line: #b9aea3; --st-ink: #221c19; }
.st-reserved { --st-bg: #dbeafa; --st-line: #2f6ea8; --st-ink: #12395c; }
.st-seated { --st-bg: #ece4f8; --st-line: #7757ab; --st-ink: #37235c; }
.st-kitchen { --st-bg: #fde7b8; --st-line: #b97800; --st-ink: #5a3500; }
.st-ready { --st-bg: #1f6338; --st-line: #1f6338; --st-ink: #fff; }
.st-dining { --st-bg: #e6ded4; --st-line: #8d7d6c; --st-ink: #332920; }
.st-bill { --st-bg: #a63a14; --st-line: #a63a14; --st-ink: #fff; }
.st-dirty { --st-bg: repeating-linear-gradient(135deg, #e4e0db 0 5px, #f6f4f1 5px 10px); --st-line: #8f877f; --st-ink: #3d3631; }
.rooms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.room { padding: 10px 12px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.room h2 { font: 700 15px/1.3 var(--head); }
.room-dining { grid-column: 1 / -1; }
.room-plan { position: relative; height: 262px; margin-top: 6px; border-radius: 8px; background: #f7f4f0 radial-gradient(#ddd4c9 1px, transparent 1.4px) 0 0 / 18px 18px; }
.room-bar .room-plan, .room-back .room-plan { height: 242px; }
.tbl { position: absolute; display: grid; place-items: center; height: 94px; padding: 0; border: 0; background: none; cursor: pointer; }
.tbl-face { display: grid; align-content: center; justify-items: center; width: 100%; height: 100%; padding: 4px; background: var(--st-bg); border: 2px solid var(--st-line); border-radius: 12px; color: var(--st-ink); line-height: 1.2; text-align: center; box-shadow: 0 3px 0 rgba(60, 40, 20, .12); }
.st-free .tbl-face { border-style: dashed; }
.tbl-face b { font: 700 19px/1.15 var(--head); }
.tbl-face strong { font-size: 12.5px; }
.tbl-face small { font-size: 12px; }
.shape-round { width: 14.5%; min-width: 96px; max-width: 108px; height: 100px; }
.shape-round .tbl-face { width: 100px; max-width: 100%; border-radius: 50%; }
.shape-square { width: 17%; min-width: 98px; }
.shape-long { width: 27%; min-width: 124px; }
.shape-booth { width: 19%; min-width: 102px; }
.shape-booth .tbl-face { border-radius: 26px 26px 10px 10px; border-top-width: 7px; }
.room-bar .shape-round, .room-bar .shape-square { width: 34%; max-width: 128px; }
.room-bar .shape-square .tbl-face { border-radius: 12px; }
.room-back .shape-long { width: 48%; }
.room-back .shape-square { width: 33%; }
.tbl:hover .tbl-face { transform: translateY(-1px); }
.tbl.is-sel .tbl-face { outline: 3px solid var(--navy); outline-offset: 3px; }
.tbl.is-other .tbl-face { opacity: .62; }
.tbl.is-late .tbl-face { border-color: var(--danger); border-width: 4px; }
.panel { position: sticky; top: calc(var(--bar) + 16px); display: grid; gap: 12px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.panel .panel-head h2 { font-size: 22px; }
.panel-acts { display: grid; gap: 8px; }
.panel-acts:empty { display: none; }
.mini { padding: 8px 12px; border-radius: var(--radius); background: var(--bg); font-size: 14px; }
.mini li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.mini em { flex: none; font-style: normal; color: var(--ink-2); }
.solo { max-width: 420px; }
.solo .panel { position: static; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile { display: grid; align-content: start; gap: 2px; height: 100%; min-height: 96px; padding: 10px 12px; border: 2px solid var(--st-line); border-radius: 12px; background: var(--st-bg); color: var(--st-ink); text-decoration: none; line-height: 1.25; }
.tile.st-free { border-style: dashed; }
.tile.is-late { border: 4px solid var(--danger); }
.tile.is-other { opacity: .65; }
.tile-top { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; font-size: 13px; font-weight: 700; }
.tile-top b { font: 700 21px/1.2 var(--head); }
.tile strong { font-size: 14.5px; }
.tile small { font-size: 13px; }

/* Order taking: menu beside the check */
.order-grid { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 16px; align-items: start; }
.menupane { display: grid; gap: 12px; align-content: start; min-width: 0; }
.menu-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }
.seatpick { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 700; font-size: 14px; }
.tabs-seat .tab { justify-content: center; min-width: 42px; padding: 0 10px; }
.dishes { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
.dish { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; width: 100%; height: 100%; min-height: 102px; padding: 13px 14px 11px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); text-align: left; cursor: pointer; box-shadow: 0 2px 0 var(--line); }
.dish:hover { border-color: var(--accent); }
.dish:active { transform: translateY(2px); box-shadow: none; background: var(--accent-tint); }
.dish strong { font: 600 15.5px/1.3 var(--head); letter-spacing: -.01em; }
.dish > span { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.dish small { color: var(--ink-2); font-size: 13px; text-align: right; line-height: 1.25; }
.dish em { position: absolute; top: -7px; right: -5px; min-width: 24px; height: 24px; border-radius: 99px; background: var(--accent); color: #fff; font: 700 13px/24px var(--font); text-align: center; }
.dish.is-off { background: var(--soft); box-shadow: none; cursor: not-allowed; color: var(--ink-2); }
.dish.is-off small { color: var(--danger); font-weight: 700; }
.check { position: sticky; top: calc(var(--bar) + 12px); display: flex; flex-direction: column; max-height: calc(100vh - var(--bar) - 24px); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-lg); overflow: hidden; }
.check-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.check-head p { color: var(--ink-2); font-size: 14px; }
.check-body { flex: 1; min-height: 120px; overflow-y: auto; padding: 4px 16px 8px; }
.check-body h3 { margin: 10px 0 0; font: 700 13.5px/1.3 var(--head); color: var(--ink-2); }
.check-foot { padding: 8px 16px 14px; border-top: 1px dashed var(--line-2); background: #fcfbf9; }
.cl > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 9px 0; }
.cl > li + li { border-top: 1px solid var(--line); }
.cl-main { display: grid; line-height: 1.35; }
.cl-main small { color: var(--ink-2); font-size: 13.5px; }
.cl > li > b { font-variant-numeric: tabular-nums; text-align: right; }
.cl-state, .cl-qty { grid-column: 1 / -1; }
.cl-bill .cl-state { justify-self: start; }
.cl-bill .cl-state:empty { display: none; }
.cl-qty { display: flex; align-items: center; gap: 6px; }
.cl-qty button { display: grid; place-items: center; min-width: 44px; height: 38px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); cursor: pointer; }
.cl-qty span { min-width: 26px; text-align: center; font-weight: 700; }
.cl-qty .cl-edit { margin-left: auto; padding: 0 14px; font-weight: 700; }
.cl .is-void .cl-main strong { text-decoration: line-through; color: var(--ink-2); }
.totals { margin-top: 4px; font-variant-numeric: tabular-nums; }
.totals > div { display: flex; justify-content: space-between; gap: 12px; padding: 1px 0; }
.totals .is-disc { color: var(--ok); }
.totals .is-sub { border-top: 1px solid var(--line); margin-top: 3px; padding-top: 4px; font-weight: 700; }
.totals .is-total { font: 700 18px/1.5 var(--head); }
.totals-wide > div { padding: 4px 0; }
.totals-wide .is-total { border-top: 2px solid var(--ink); margin-top: 4px; padding-top: 7px; font-size: 16px; }
.cl-bill + .totals { padding-top: 10px; border-top: 2px solid var(--ink); }
.check-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.check-acts .grow { flex: 1 1 150px; min-height: 50px; }
.paybox { padding: 18px; border-radius: var(--radius-lg); background: var(--navy); color: #fff; }
.paybox > span { font-size: 14px; color: #d8cfc8; }
.paybox > b { display: block; font: 700 38px/1.2 var(--head); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.paybox.is-paid { background: #17492a; }
.paybox .muted { color: #d8cfc8; margin-top: 4px; }
.paybox .callout { margin-top: 8px; color: var(--ink); }
.paybox .btn:not(.btn-primary) { background: transparent; border-color: #75655c; color: #fff; }
.paybox .btn-primary { flex-basis: 100%; }
.paybox .btn-primary:disabled { background: #6b5a52; border-color: #6b5a52; opacity: .7; }
.card .btn-small + .btn-small { margin-left: 6px; }
.card p + .btn { margin-top: 10px; }
.pays li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; }
.pays li + li { border-top: 1px solid var(--line); }
.pays span { display: grid; }
.pays small { color: var(--ink-2); }

/* Bookings, approvals, rules, shift, reports */
.waits, .rules { display: grid; gap: 10px; }
.waits > li, .rules > li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; }
.wait-main { display: grid; flex: 1 1 240px; line-height: 1.4; }
.wait-main small { color: var(--ink-2); font-size: 14px; }
.wait-acts, .rule-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.rules > li > div:first-child { flex: 1 1 300px; }
.rules p { color: var(--ink-2); font-size: 14.5px; }
.is-past { background: #faf9f7; }
.requests { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.requests > li { display: flex; flex-direction: column; gap: 9px; }
.req-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.req-top b { font: 700 20px/1.2 var(--head); }
.requests blockquote { margin: 0; padding: 10px 12px; border-radius: var(--radius); background: var(--bg); }
.req-acts { display: flex; gap: 8px; margin-top: auto; }
.req-acts .btn { flex: 1; min-height: 48px; }
.proof { display: flex; gap: 10px; margin-top: 12px; padding: 11px 13px; border-radius: var(--radius); background: var(--ok-tint); font-size: 14.5px; }
.proof .icon { margin-top: 2px; color: var(--ok); }
.locked, .locked-card { max-width: 520px; margin-inline: auto; text-align: center; }
.locked { padding: 36px 16px; }
.locked > .icon { width: 36px; height: 36px; margin: 0 auto 12px; color: var(--accent); }
.locked p { margin-bottom: 18px; color: var(--ink-2); }

/* Kitchen screen: dark, large and readable from the pass */
.is-kds { background: #151210; }
.is-kds .content { max-width: none; color: #f4efe9; }
.is-kds .shell { background: #151210; }
.is-kds .rail { background: #1e1a17; border-color: #38302a; color: #f4efe9; }
.is-kds .rail nav a, .is-kds .side-btn, .is-kds .whoami div span { color: #c9bdb2; }
.is-kds .rail nav a:hover, .is-kds .side-btn:hover { background: #2d2723; color: #fff; }
.is-kds .rail nav a.is-active { background: #f4efe9; color: #1e1a17; }
.is-kds .rail-clock { background: #2d2723; }
.is-kds .rail-clock small, .is-kds .page-head p { color: #c9bdb2; }
.is-kds .whoami { border-color: #38302a; }
.is-kds .back { color: #ffb99a; }
.is-kds .content .tab { background: #24201c; border-color: #4a413a; color: #f4efe9; }
.is-kds .content .tab.is-active { background: #f4efe9; border-color: #f4efe9; color: #1e1a17; }
.is-kds .kcard { background: #221d1a; border-color: #3d342e; }
.is-kds .facts > div + div { border-color: #3d342e; }
.is-kds .facts dt { color: #c9bdb2; }
.is-kds .empty p, .lane-empty { color: #b9ada2; }
.is-kds .locked p { color: #c9bdb2; }
.is-kds .card { color: var(--ink); }
.lanes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.lanes-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lanes-one { grid-template-columns: minmax(0, 1fr); }
.lanes-one .lane > ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.lane h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 2px solid #4a413a; font: 700 18px/1.3 var(--head); }
.lane > ul { display: grid; gap: 12px; align-items: start; }
.lane-empty { padding: 22px 12px; border: 1px dashed #4a413a; border-radius: 12px; text-align: center; }
.ticket { --tk: #8ec0ea; background: #26211d; color: #f4efe9; border: 1px solid #443b34; border-top: 5px solid var(--tk); border-radius: 12px; overflow: hidden; }
.ticket.stage-cooking { --tk: #f0b14a; }
.ticket.stage-ready { --tk: #6fcf8c; }
.ticket.stage-served { --tk: #8f847a; }
.ticket.is-slow { --tk: #f0b14a; }
.ticket.is-late { --tk: #ff6f61; }
.ticket-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; color: inherit; text-decoration: none; border-bottom: 1px solid #443b34; }
.ticket-head > b { font: 700 28px/1 var(--head); }
.ticket-head > span { display: grid; line-height: 1.3; }
.ticket-head small { color: #c9bdb2; font-size: 13px; }
.ticket-head em { padding: 3px 9px; border-radius: 8px; background: #38302a; font: 700 15px/1.4 var(--head); font-style: normal; white-space: nowrap; }
.is-slow .ticket-head em { background: #5a3d0c; color: #ffdb99; }
.is-late .ticket-head em { background: #b3261e; color: #fff; }
.ticket ul { padding: 4px 12px; }
.ticket ul li { display: flex; gap: 11px; padding: 7px 0; }
.ticket ul li + li { border-top: 1px solid #3a322c; }
.ticket ul b { min-width: 18px; font: 700 18px/1.35 var(--head); }
.ticket ul span { display: grid; line-height: 1.35; font-size: 16.5px; }
.ticket ul small { color: #c9bdb2; font-size: 14px; }
.ticket ul .tnote { color: #ffd37a; font-weight: 700; }
.ticket .is-void { text-decoration: line-through; opacity: .6; }
.ticket .is-dim { opacity: .38; }
.ticket .bump { display: flex; width: calc(100% - 20px); margin: 6px 10px 10px; min-height: 52px; background: #f4efe9; border-color: #f4efe9; color: #1e1a17; font-size: 16px; }
.ticket.stage-cooking .bump { background: #6fcf8c; border-color: #6fcf8c; color: #0d2b17; }
.ticket .bump-quiet, .ticket.stage-ready .bump { background: transparent; border-color: #6b5f55; color: #f4efe9; }
.allday { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; align-items: start; }
.allday li { display: flex; align-items: center; gap: 14px; padding: 9px 0; border-top: 1px solid #3d342e; }
.allday h2 { margin-bottom: 8px; }
.allday b { min-width: 28px; font: 700 26px/1 var(--head); color: #ffb99a; }
.served { display: grid; gap: 8px; max-width: 720px; }
.served a { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid #3d342e; border-radius: 12px; background: #221d1a; color: #f4efe9; text-decoration: none; }
.served b { font: 700 22px/1 var(--head); }
.served span { display: grid; line-height: 1.35; }
.served small { color: #c9bdb2; font-size: 13.5px; }
.served em { font-style: normal; color: #c9bdb2; white-space: nowrap; }
.ticket-detail { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 360px); gap: 16px; align-items: start; }

/* Role choice */
.signin { max-width: 960px; margin: 0 auto; padding: 44px 20px 64px; text-align: center; }
.signin h1 { margin-top: 28px; font: 700 clamp(26px, 3.4vw, 34px)/1.2 var(--head); letter-spacing: -.025em; }
.signin-sub { max-width: 52ch; margin: 8px auto 0; color: var(--ink-2); }
.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 26px; text-align: left; }
.role { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; width: 100%; height: 100%; padding: 22px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-lg); color: var(--ink); text-align: left; cursor: pointer; }
.role:hover { border-color: var(--accent); box-shadow: 0 12px 26px -18px rgba(60, 30, 10, .6); }
.role-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--accent-tint); color: var(--accent-dark); }
.role-icon .icon { width: 24px; height: 24px; }
.role-title { margin-top: 10px; font: 700 20px/1.2 var(--head); }
.role-name { color: var(--accent-dark); font-weight: 700; }
.role-short { display: none; }
.role-points { display: grid; gap: 7px; margin-top: 12px; color: var(--ink-2); }
.role-points > span { display: flex; gap: 8px; }
.role-points .icon { width: 16px; height: 16px; margin-top: 3px; color: var(--ok); }
.noscript { padding: 40px; text-align: center; }
.toasts { position: fixed; z-index: 60; right: 18px; bottom: 18px; display: grid; gap: 8px; max-width: 380px; pointer-events: none; }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 12px; background: #17492a; color: #fff; font-weight: 700; box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .6); animation: toast-in .22s ease-out; }
.toast-warn { background: #7c1d1d; }
.toast .icon { margin-top: 2px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* Popups: the title and buttons stay in view while the fields scroll */
dialog { width: min(580px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 16px; background: var(--surface); color: var(--ink); overflow: hidden; box-shadow: 0 30px 70px -20px rgba(30, 20, 12, .6); }
dialog::backdrop { background: rgba(28, 22, 18, .6); }
dialog form { display: flex; flex-direction: column; max-height: calc(100dvh - 24px); }
.modal-head { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font: 700 19px/1.25 var(--head); }
.modal-body { min-height: 0; padding: 16px 18px; overflow-y: auto; overscroll-behavior: contain; }
.modal-body > * + * { margin-top: 12px; }
.modal-body h3 { font: 700 15px/1.3 var(--head); }
.modal-foot { display: flex; flex: none; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.form-grid:has(> [data-for]) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wide { grid-column: 1 / -1; }
.recipe-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px; gap: 10px; align-items: start; }
.modal-note { color: var(--ink-2); }
.modal-note strong { color: var(--ink); }
.field { display: grid; gap: 4px; min-width: 0; }
.field > span { font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.field em, .mods em { font-style: normal; font-weight: 400; }
.field input, .field select, .field textarea { width: 100%; min-width: 0; min-height: 46px; padding: 8px 11px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); font-size: 16px; }
.field textarea { resize: vertical; }
.field [aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.error, .form-error { display: block; color: var(--danger); font-size: 14px; font-weight: 700; }
.error:empty { display: none; }
.form-error { padding: 10px 12px; border-radius: var(--radius); background: var(--danger-tint); }
.mods legend { padding: 0; margin-bottom: 6px; font-size: 14px; font-weight: 700; }
.mods > div { display: flex; flex-wrap: wrap; gap: 8px; }
.mods label { position: relative; cursor: pointer; }
.mods input { position: absolute; opacity: 0; }
.mods span { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 15px; border: 1px solid var(--line-2); border-radius: var(--radius); font-weight: 700; }
.mods span b { font-weight: 400; font-size: 13.5px; }
.mods input:checked + span { border-color: var(--accent); background: var(--accent-tint); color: var(--accent-dark); box-shadow: 0 0 0 1px var(--accent); }
.mods input:focus-visible + span, .choices input:focus-visible { outline: 3px solid #1f6fd6; outline-offset: 2px; }
.choices { display: grid; gap: 8px; }
.choices label { display: flex; gap: 12px; align-items: flex-start; padding: 11px 13px; border: 1px solid var(--line-2); border-radius: var(--radius); cursor: pointer; }
.choices label:has(:checked) { border-color: var(--accent); background: #fdf3ee; }
.choices input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); }
.choices span { display: grid; line-height: 1.4; }
.choices small { color: var(--ink-2); font-size: 13.5px; }
.choices em { font-style: normal; font-size: 13.5px; font-weight: 700; color: var(--warn); }
.choices .is-off { background: var(--soft); cursor: not-allowed; }
.tick { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.tick input { width: 20px; height: 20px; accent-color: var(--accent); }
.due { display: flex; justify-content: space-between; align-items: baseline; }
.due b { font: 700 30px/1.2 var(--head); }
.charge { padding: 10px 13px; border-radius: var(--radius); background: var(--soft); }

/* Narrower desktops: the rail stacks icon over label, and side panels move under */
@media (max-width: 1179px) {
  .shell { --side: 92px; }
  .rail { padding-inline: 6px; }
  .rail .brand { justify-content: center; padding: 0; font-size: 0; gap: 0; }
  .rail nav a { flex-direction: column; justify-content: center; gap: 2px; min-height: 52px; padding: 4px 2px; font-size: 12px; text-align: center; position: relative; }
  .rail nav a .pill { position: absolute; top: 2px; right: 6px; min-width: 18px; line-height: 18px; font-size: 11.5px; }
  .rail-clock { flex-direction: column; gap: 2px; padding: 6px 2px; text-align: center; font-size: 13px; }
  .rail-clock small { font-size: 12px; }
  .whoami { justify-content: center; }
  .whoami > div { display: none; }
  .side-btn { flex-direction: column; justify-content: center; gap: 2px; min-height: 46px; padding: 4px 2px; font-size: 12px; text-align: center; line-height: 1.2; }
  .content { padding-inline: 16px; }
  .floor-grid { grid-template-columns: minmax(0, 1fr); }
  .floor-grid .panel { position: static; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .columns, .columns-wide { grid-template-columns: minmax(0, 1fr); }
  .order-grid { grid-template-columns: minmax(0, 1fr) 306px; gap: 12px; }
  .dishes { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .requests { grid-template-columns: minmax(0, 1fr); }
  .lanes { gap: 10px; }
  .ticket-head { gap: 8px; padding-inline: 9px; grid-template-columns: auto minmax(0, 1fr); }
  .ticket-head em { grid-column: 1 / -1; justify-self: start; }
  .ticket-detail { grid-template-columns: minmax(0, 1fr); max-width: 460px; }
}
@media (min-width: 761px) and (max-width: 880px) {
  .rooms { grid-template-columns: minmax(0, 1fr); }
  .order-grid { grid-template-columns: minmax(0, 1fr) 280px; }
}
/* Loading placeholder shown while a screen opens */
.page-skel { display: grid; grid-column: 1 / -1; align-content: start; gap: 14px; width: 100%; min-width: 0; padding: 2px; }
.page-skel i { display: block; height: 96px; border-radius: var(--radius-lg, 8px); background: linear-gradient(90deg, rgba(100, 112, 128, .13) 25%, rgba(100, 112, 128, .05) 50%, rgba(100, 112, 128, .13) 75%); background-size: 200% 100%; animation: skel-shimmer 1s linear infinite; }
.page-skel .sk-title { width: min(280px, 70%); height: 30px; }
.page-skel .sk-line { width: min(420px, 90%); height: 14px; }
.page-skel > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.page-skel .sk-block { height: 280px; }
@keyframes skel-shimmer { to { background-position: -200% 0; } }
@media (max-width: 760px) { .page-skel > div { grid-template-columns: minmax(0, 1fr); } .page-skel > div i { height: 68px; } }
.page-in > * { animation: page-in .3s ease-out both; }
@keyframes page-in { from { opacity: 0; } }
.page-skel.is-flush { box-sizing: border-box; padding: 22px 24px; }
/* On the bill, the void button or status sits beside the price */
@media (min-width: 761px) {
  .cl-bill > li { grid-template-columns: minmax(0, 1fr) auto 84px; align-items: center; }
  .cl-bill .cl-state { grid-column: 2; grid-row: 1; justify-self: end; }
  .cl-bill > li > b { grid-column: 3; grid-row: 1; }
  .dish { min-height: 118px; }
}
