:root {
  --black: #09090b;
  --ink: #171717;
  --muted: #6e6e73;
  --line: #e8e2d8;
  --soft: #f7f3eb;
  --gold: #b8872f;
  --gold-soft: #f5ead7;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: #f7f5ef;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

button,
input,
textarea,
select {
  font: inherit;
}

.admin-shell {
  width: min(1600px, 100%);
  margin: 0 auto;
  padding: 0;
}

.admin-header {
  display: none;
  align-items: center;
}

.sidebar-brand {
  display: grid;
  justify-items: center;
  gap: 0.1rem;
  padding: 0.6rem 0 1rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  color: #f4cb75;
  border: 1px solid rgba(244, 203, 117, 0.35);
  border-radius: 999px;
  font-size: 1.3rem;
}

.sidebar-brand strong {
  color: #f4cb75;
  font-size: 1rem;
}

.sidebar-brand span {
  color: #f4cb75;
  font-size: 0.78rem;
}

.management-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.4rem 0 1rem;
  border-bottom: 1px solid var(--line);
}

.management-header h2 {
  margin: 0;
  font-size: 1.6rem;
}

.management-header p,
.muted-copy {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.account-menu {
  position: relative;
  z-index: 20;
}

.account-menu summary {
  list-style: none;
}

.account-menu summary::-webkit-details-marker {
  display: none;
}

.restaurant-switcher {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.45rem 0.55rem 0.45rem 0.8rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 0.75rem 2rem rgba(20, 16, 10, 0.06);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.restaurant-switcher:hover {
  border-color: rgba(184, 135, 47, 0.45);
  box-shadow: 0 1rem 2.4rem rgba(20, 16, 10, 0.1);
  transform: translateY(-1px);
}

.account-copy {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.account-restaurant {
  color: var(--ink);
  white-space: nowrap;
}

.account-copy small {
  max-width: 15rem;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.restaurant-switcher strong,
.account-avatar,
.account-dropdown-profile strong,
.account-dropdown-profile img {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  color: var(--white);
  background: linear-gradient(135deg, #c3933f, #f0bd55);
  border-radius: 999px;
  flex: 0 0 auto;
  object-fit: cover;
}

.account-chevron {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1;
}

.account-dropdown {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  width: min(21rem, calc(100vw - 2rem));
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: 0 1.5rem 4rem rgba(20, 16, 10, 0.22);
}

.account-dropdown-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem;
  margin-bottom: 0.45rem;
  background: #f7f2e9;
  border-radius: 0.8rem;
}

.account-dropdown-profile div {
  display: grid;
  min-width: 0;
}

.account-dropdown-profile b,
.account-dropdown-profile span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-dropdown-profile span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.account-dropdown a,
.account-dropdown button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 2.7rem;
  padding: 0 0.9rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 0.7rem;
  font: inherit;
  font-weight: 900;
  text-align: left;
  text-decoration: none;
}

.account-dropdown a:hover,
.account-dropdown button:hover {
  background: #f4ead8;
}

.account-dropdown button {
  color: #9f1d1d;
  cursor: pointer;
}

.admin-header p,
.admin-header h1 {
  margin: 0;
}

.admin-header p {
  color: #d7b56e;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

.admin-header a {
  color: var(--black);
  background: #f4e8d3;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 900;
  white-space: nowrap;
}

.alert,
.panel,
.login-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  box-shadow: 0 14px 34px rgba(18, 18, 19, 0.06);
}

.business-shell { max-width: 1180px; margin: 0 auto; padding: 2rem; }
.business-header { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.business-header h1 { font-size: 1.8rem; margin: 0; }
.business-identity { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.business-identity span { color: var(--muted); }
.business-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 2rem; padding-top: 1.5rem; }
.business-layout h2 { font-size: 1.25rem; margin: 0 0 1rem; }
.business-list { display: grid; gap: .75rem; }
.business-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 8px; background: white; }
.business-row > div { min-width: 0; overflow-wrap: anywhere; }
.business-row h3 { margin: 0; font-size: 1rem; }
.business-row p { margin: .25rem 0 0; color: var(--muted); }
.business-row button { white-space: normal; }
.business-notice { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.business-form { display: grid; gap: 1rem; }
.business-form label { min-width: 0; }
.business-form input, .business-form select, .business-form textarea { box-sizing: border-box; min-width: 0; width: 100%; }
@media (max-width: 760px) {
  .business-shell { padding: 1rem; }
  .business-header { align-items: flex-start; flex-direction: column; }
  .business-layout { grid-template-columns: minmax(0,1fr); }
  .business-row { align-items: flex-start; flex-direction: column; }
}

.alert {
  margin-bottom: 0.75rem;
  padding: 0.9rem 1rem;
  font-weight: 800;
}

.alert.error {
  color: #7a1d1d;
  background: #fff0f0;
}

.alert.success {
  color: #235128;
  background: #eff9ef;
}

.login-card {
  width: min(440px, 100%);
  margin: 4rem auto;
  padding: 1.25rem;
}

.qr-login-card {
  width: min(520px, calc(100% - 2rem));
  display: grid;
  gap: 1rem;
  text-align: center;
}

.qr-login-card .eyebrow {
  margin: 0;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.qr-login-card h2 {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
}

.qr-login-frame {
  width: min(20rem, 100%);
  min-height: min(20rem, 78vw);
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: linear-gradient(180deg, #fff, #f8f2e8);
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.qr-login-frame img {
  width: 100%;
  max-width: 18rem;
  border-radius: 0.7rem;
}

.qr-login-loading {
  color: var(--muted);
  font-weight: 800;
}

.qr-login-status {
  display: grid;
  gap: 0.25rem;
}

.qr-login-status strong {
  font-size: 1.05rem;
}

.qr-login-status span,
.qr-login-card small {
  color: var(--muted);
  font-weight: 700;
}

.login-card p,
.login-card span {
  color: var(--muted);
}

.login-card form {
  display: grid;
  gap: 0.75rem;
}

.control-layout {
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  gap: 0;
  align-items: start;
  min-height: 100vh;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: grid;
  align-content: start;
  gap: 0.85rem;
  padding: 1rem;
  color: var(--white);
  background: linear-gradient(180deg, #08111a, #0a0d12);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.admin-sidebar nav {
  display: grid;
  gap: 0.35rem;
}

.nav-group-label {
  margin: 0.65rem 0 0.1rem;
  color: rgba(244, 203, 117, 0.72);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav-item,
.logout-button {
  min-height: 2.85rem;
  border: 0;
  border-radius: 0.6rem;
  padding: 0 0.85rem;
  text-align: left;
  font-weight: 900;
}

.nav-item {
  color: rgba(255, 255, 255, 0.86);
  background: transparent;
}

.nav-item.active {
  color: var(--white);
  background: linear-gradient(135deg, #7c541b, #b8872f);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.logout-button {
  width: 100%;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.08);
  text-align: center;
}

.admin-panel-view {
  display: none;
}

.admin-panel-view.active {
  display: block;
}

.item-editor-overlay.active {
  display: grid;
}

.item-editor-overlay:not(.active) {
  display: none;
}

.item-editor-sheet {
  position: relative;
  width: min(1120px, 100%);
  height: 93dvh;
  max-height: 980px;
  padding: 0.7rem 1.25rem 1.25rem;
}

.item-editor-sheet .page-action-header {
  padding-right: 5.4rem;
  margin-bottom: 1rem;
  box-shadow: none;
}

.sheet-floating-close {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border: 1px solid rgba(18, 18, 19, 0.08);
  border-radius: 999px;
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff 0%, #f7f4ed 100%);
  box-shadow: 0 14px 34px rgba(18, 18, 19, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  font-size: 1.55rem;
  line-height: 1;
  font-weight: 850;
  cursor: pointer;
}

.sheet-floating-close:active {
  transform: translateY(1px) scale(0.98);
}

.panel {
  padding: 1rem;
}

.page-action-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1rem;
  padding: 1.25rem 1.45rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  box-shadow: 0 18px 42px rgba(18, 18, 19, 0.07);
}

.page-action-header h2,
.page-action-header p {
  margin: 0;
}

.page-action-header h2 {
  font-size: 1.8rem;
  line-height: 1.05;
}

.page-action-header p {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.35;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-end;
}

.menu-flow-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.25rem;
}

.menu-flow-steps span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.7rem;
  padding: 0.55rem 0.7rem;
  color: var(--muted);
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  font-weight: 900;
}

.menu-flow-steps b {
  display: inline-grid;
  width: 1.45rem;
  height: 1.45rem;
  place-items: center;
  color: var(--muted);
  background: #f0ede7;
  border-radius: 999px;
  font-size: 0.8rem;
}

.menu-flow-steps .active {
  color: var(--ink);
  background: #fff6dd;
  border-color: rgba(190, 137, 38, 0.42);
}

.menu-flow-steps .active b,
.menu-flow-steps .complete b {
  color: var(--white);
  background: var(--gold);
}

.menu-flow-steps .complete {
  color: var(--ink);
  background: #f9f6ed;
}

.builder-flow-steps {
  margin: -0.25rem 0 1rem;
}

.action-button,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.1rem;
  padding: 0 1.15rem;
  border-radius: 0.65rem;
  text-decoration: none;
  white-space: nowrap;
  font-weight: 950;
}

.secondary-action {
  color: var(--ink);
  background: #fbfaf7;
  border: 1px solid var(--line);
}

.builder-back-button {
  color: var(--gold);
  background: #fff8ec;
  border-color: #e8c882;
}

.control-layout > .admin-panel-view {
  padding: 1.25rem 1.5rem;
}

.admin-tabs {
  display: flex;
  gap: 1.25rem;
  margin: 0.4rem 0 1rem;
}

.tab-link {
  min-height: 2.25rem;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-weight: 850;
}

.tab-link.active {
  color: var(--gold);
  border-bottom: 2px solid var(--gold);
}

.management-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(20rem, 0.85fr);
  gap: 1rem;
}

.menu-management-wide {
  grid-template-columns: minmax(0, 1fr);
}

.management-main {
  display: grid;
  gap: 1rem;
}

.management-aside {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.compact-primary {
  min-height: 2.5rem;
  padding: 0 1rem;
}

.menu-table {
  display: grid;
}

.menu-table-head,
.menu-row {
  display: grid;
  grid-template-columns: minmax(9rem, 1.25fr) minmax(7.5rem, 0.75fr) minmax(5.25rem, 0.5fr) minmax(5.75rem, 0.5fr) minmax(15rem, 0.9fr);
  gap: 0.75rem;
  align-items: center;
  padding: 0.7rem 0.6rem;
  border-bottom: 1px solid var(--line);
}

.menu-table-head {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.menu-name-cell,
.library-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.menu-name-button {
  min-height: auto;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  font-weight: 950;
  text-align: left;
}

.menu-icon {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  color: var(--gold);
  background: #fbecd6;
  border-radius: 999px;
  font-weight: 950;
}

.switch-label {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 0.45rem;
  color: #16823b;
  font-size: 0.84rem;
  white-space: nowrap;
}

.switch-label input {
  display: none;
}

.switch-label span {
  position: relative;
  width: 2.15rem;
  height: 1.15rem;
  background: #b8bdc4;
  border-radius: 999px;
}

.switch-label span::after {
  content: "";
  position: absolute;
  top: 0.15rem;
  left: 0.15rem;
  width: 0.85rem;
  height: 0.85rem;
  background: var(--white);
  border-radius: 999px;
  transition: transform 180ms ease;
}

.switch-label input:checked + span {
  background: #1fa653;
}

.switch-label input:checked + span::after {
  transform: translateX(1rem);
}

.menu-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
}

.menu-actions form {
  margin: 0;
}

.menu-actions button {
  min-height: 2rem;
  padding: 0 0.6rem;
  color: var(--ink);
  background: #f8f7f3;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  font-weight: 850;
  font-size: 0.84rem;
}

.menu-actions .menu-delete-button {
  color: #9f1d1d;
  background: #fff8f7;
  border-color: #f1c9c4;
}

.more-dot {
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
}

.menu-note {
  padding: 0.7rem;
  color: var(--muted);
  background: #fbfaf7;
  font-size: 0.82rem;
}

.library-table {
  display: grid;
}

.library-row {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 0.7fr 0.8fr 0.65fr 0.45fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

.small-thumb {
  width: 2.35rem;
  border-radius: 0.45rem;
}

.pill-status {
  width: fit-content;
  padding: 0.25rem 0.55rem;
  color: #167336;
  background: #dff5e3;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
}

.info-card {
  display: grid;
  gap: 1rem;
}

.info-card h3 {
  margin: 0;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.how-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  text-align: center;
}

.how-steps div {
  display: grid;
  gap: 0.4rem;
  justify-items: center;
}

.how-steps strong {
  display: grid;
  place-items: center;
  width: 1.4rem;
  height: 1.4rem;
  color: var(--white);
  background: #d09a3e;
  border-radius: 999px;
}

.how-steps span,
.info-card p {
  color: var(--muted);
  font-size: 0.82rem;
}

.example-flow {
  display: grid;
  gap: 0.6rem;
}

.example-flow > strong {
  justify-self: center;
  padding: 0.65rem 1rem;
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
}

.example-flow div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem;
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
}

.customer-timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 1rem;
  background: #fff8ec;
  border: 1px solid #ead4ad;
  border-radius: 0.8rem;
}

.customer-timeline div {
  display: grid;
  gap: 0.25rem;
  padding-left: 0.75rem;
  border-left: 1px solid #e3ceb0;
}

.customer-timeline span {
  color: var(--muted);
}

.menu-status-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 0 0 1rem;
}

.menu-status-strip div {
  display: grid;
  gap: 0.35rem;
  min-height: 5rem;
  padding: 0.85rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  box-shadow: 0 12px 28px rgba(18, 18, 19, 0.05);
}

.menu-status-strip span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.menu-status-strip strong {
  align-self: end;
  font-size: 1rem;
}

.setup-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
  padding: 1.15rem;
  background: linear-gradient(135deg, #111114, #2b2115);
  border-radius: 0.95rem;
  box-shadow: 0 18px 42px rgba(18, 18, 19, 0.12);
}

.setup-card h2 {
  margin: 0.15rem 0 0.35rem;
  color: var(--white);
}

.setup-card-copy {
  max-width: 56rem;
  margin: 0 0 0.85rem;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 750;
  line-height: 1.35;
}

.setup-meter {
  height: 0.45rem;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  overflow: hidden;
}

.setup-meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #f7dfad, #c18a2b);
}

.setup-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.setup-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
  padding: 0.55rem;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 0.6rem;
  font-size: 0.78rem;
}

.setup-step span {
  width: 0.65rem;
  height: 0.65rem;
  background: #8b8b91;
  border-radius: 999px;
}

.setup-step.complete span {
  background: #42c773;
}

.setup-step strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.setup-step em {
  color: #f4cb75;
  font-style: normal;
  font-weight: 900;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.metric-card {
  display: grid;
  gap: 0.45rem;
  padding: 1rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  box-shadow: 0 14px 34px rgba(18, 18, 19, 0.05);
}

.metric-card span {
  color: var(--muted);
  font-weight: 800;
}

.metric-card strong {
  font-size: 1.55rem;
}

.builder-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(22rem, 0.95fr);
  gap: 1rem;
}

.builder-item-list,
.builder-sections {
  display: grid;
  gap: 0.65rem;
}

.builder-food-row,
.builder-assignment,
.table-list article,
.orders-list article {
  display: grid;
  gap: 0.55rem;
  padding: 0.75rem;
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}

.menu-status-card div,
.example-flow div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem;
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
}

.builder-available,
.builder-current {
  align-self: start;
}

.builder-current-full {
  width: 100%;
}

.builder-category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.65rem 0;
}

.builder-category-filter button {
  min-height: 2.2rem;
  padding: 0 0.7rem;
  border: 1px solid var(--line);
  background: #fbfaf7;
  border-radius: 999px;
  font-weight: 850;
}

.builder-category-filter button.active {
  color: var(--white);
  background: var(--black);
}

.builder-menu-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 0.8rem 0 1rem;
  padding: 0.35rem;
  overflow-x: auto;
  background: #f1ece3;
  border: 1px solid var(--line);
  border-radius: 999px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.builder-menu-tabs button {
  flex: 0 0 auto;
  min-height: 2.7rem;
  padding: 0 0.9rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-weight: 950;
  scroll-snap-align: start;
}

.builder-menu-tabs button.active {
  color: var(--white);
  background: linear-gradient(180deg, #172940, #07111e);
  box-shadow: 0 10px 24px rgba(7, 17, 30, 0.22);
}

.builder-menu-tabs span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  min-height: 1.35rem;
  margin-left: 0.35rem;
  color: inherit;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  font-size: 0.75rem;
}

.builder-food-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.builder-gallery-item {
  display: grid;
  grid-template-columns: 3.6rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  min-width: 0;
}

.builder-gallery-item strong,
.builder-gallery-item span {
  display: block;
  min-width: 0;
}

.builder-gallery-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-food-thumb {
  width: 3.6rem;
  border-radius: 0.65rem;
}

.builder-food-row span,
.builder-assignment small,
.table-list span,
.orders-list span {
  color: var(--muted);
}

.builder-food-row button,
.builder-actions button,
.table-list button {
  min-height: 2.3rem;
  border: 0;
  border-radius: 999px;
  padding: 0 0.8rem;
  background: var(--black);
  color: var(--white);
  font-weight: 900;
}

.builder-food-row.assigned {
  opacity: 0.62;
}

.builder-food-row button:disabled {
  color: var(--muted);
  background: #ece7de;
}

.builder-category {
  display: grid;
  gap: 0.65rem;
}

.builder-category h3 {
  margin: 0.4rem 0 0;
}

.builder-category-pane {
  display: none;
  gap: 0.85rem;
}

.builder-category-pane.active {
  display: grid;
}

.builder-category-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.builder-category-header h3 {
  margin: 0;
}

.builder-category-header small,
.builder-empty-category span {
  color: var(--muted);
  font-weight: 800;
}

.builder-add-food-button {
  min-height: 3.1rem;
  padding: 0 1.15rem;
  color: #111;
  background: linear-gradient(180deg, #ffe9ac, #f2bf48);
  border: 1px solid #d49a21;
  border-radius: 0.75rem;
  box-shadow: 0 12px 28px rgba(196, 137, 28, 0.28);
  font-weight: 950;
  white-space: nowrap;
}

.builder-add-food-button:hover,
.builder-add-food-button:focus {
  background: linear-gradient(180deg, #fff0bf, #f6c653);
  box-shadow: 0 14px 32px rgba(196, 137, 28, 0.36);
}

.builder-sort-list {
  display: grid;
  gap: 0.75rem;
}

.builder-assignment-card {
  display: grid;
  grid-template-columns: auto 5.2rem minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
  padding: 0.75rem;
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: 0 10px 24px rgba(18, 18, 19, 0.04);
}

.builder-assignment-card.dragging {
  opacity: 0.62;
  transform: scale(0.985);
}

.builder-drag-handle {
  width: 2.35rem;
  min-height: 2.35rem;
  padding: 0;
  color: var(--gold);
  background: #f2ecdf;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: grab;
  font-weight: 950;
}

.builder-food-thumb {
  position: relative;
  width: 5.2rem;
  aspect-ratio: 1;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, #4c3a1e, #1b130a);
  border-radius: 0.75rem;
  font-weight: 950;
}

.builder-food-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.builder-food-row .gallery-food-thumb {
  width: 3.6rem;
  min-width: 3.6rem;
  border-radius: 0.65rem;
}

.builder-food-thumb span {
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
}

.builder-assignment-form {
  display: grid;
  grid-template-columns: minmax(12rem, 1.4fr) minmax(7rem, 0.55fr) auto auto auto;
  gap: 0.65rem;
  align-items: end;
}

.builder-assignment-title {
  min-width: 0;
}

.builder-assignment-title strong,
.builder-assignment-title small {
  display: block;
}

.builder-assignment-title strong {
  overflow-wrap: anywhere;
}

.builder-assignment-title small {
  margin-top: 0.25rem;
  color: var(--muted);
  line-height: 1.25;
}

.builder-assignment-title small span {
  display: inline-block;
}

.builder-menu-number {
  margin-right: 0.35rem;
}

.builder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

.builder-empty-category {
  display: grid;
  gap: 0.25rem;
  min-height: 8rem;
  place-items: center;
  padding: 1rem;
  text-align: center;
  background: #fbfaf7;
  border: 1px dashed var(--line);
  border-radius: 1rem;
}

.mini-check {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.mini-check input {
  width: auto;
}

.builder-add-sheet {
  width: min(560px, 100%);
  height: 90dvh;
  max-height: calc(100dvh - 2rem);
  overflow: hidden;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.builder-add-options {
  display: grid;
  gap: 1rem;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.15rem;
}

.builder-add-options section,
.builder-new-item-form {
  display: grid;
  gap: 0.75rem;
  align-content: start;
}

.builder-add-options h3 {
  margin: 0;
}

.builder-create-sheet {
  width: min(900px, 100%);
  height: 90dvh;
  max-height: calc(100dvh - 2rem);
  overflow: hidden;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.builder-create-sheet .builder-new-item-form {
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.15rem;
}

.builder-category-sheet {
  width: min(560px, 100%);
  max-height: min(86vh, 760px);
  overflow: hidden;
  grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
}

.builder-category-create {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.builder-category-manager-list {
  display: grid;
  align-content: start;
  gap: 0.65rem;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  padding-right: 0.25rem;
  overscroll-behavior: contain;
}

.builder-category-manager-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.75rem;
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}

.builder-category-manager-row span {
  color: var(--muted);
  font-weight: 800;
}

.builder-category-manager-row button {
  min-height: 2.2rem;
  padding: 0 0.8rem;
  color: #8a1f1f;
  background: #fff4f2;
  border: 1px solid #efc8c2;
  border-radius: 999px;
  font-weight: 950;
}

.sheet-close-button {
  min-height: 2.45rem;
  padding: 0 0.9rem;
  color: var(--ink);
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 950;
  box-shadow: 0 8px 20px rgba(9, 9, 11, 0.08);
}

.sheet-helper {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
}

.builder-category-status {
  display: none;
  padding: 0.7rem 0.8rem;
  border-radius: 0.75rem;
  font-weight: 850;
}

.builder-category-status.success,
.builder-category-status.error {
  display: block;
}

.builder-category-status.success {
  color: #14572a;
  background: #eef9ef;
  border: 1px solid #cae8ce;
}

.builder-category-status.error {
  color: #8a1f1f;
  background: #fff2f1;
  border: 1px solid #efc8c2;
}

.sheet-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 0.35rem;
}

body.sheet-lock {
  overflow: hidden;
}

.sheet-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel h2,
.login-card h2 {
  margin: 0;
}

.panel-title a,
.panel-link-button {
  color: var(--gold);
  font-weight: 900;
  text-decoration: none;
}

.panel-link-button {
  border: 0;
  background: transparent;
  padding: 0;
  min-height: auto;
  cursor: pointer;
  font: inherit;
}

.item-form {
  display: grid;
  gap: 0.85rem;
}

.settings-form {
  display: grid;
  gap: 0.85rem;
}

.restaurant-settings-form {
  margin-top: 1rem;
}

.settings-card {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
}

.settings-card-title {
  display: grid;
  gap: 0.25rem;
}

.settings-card-title h3,
.settings-card-title p {
  margin: 0;
}

.settings-card-title p {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.4;
}

.theme-control {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.theme-control legend {
  padding: 0;
  font-weight: 850;
}

.theme-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.theme-options label {
  position: relative;
  display: grid;
}

.theme-options input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.theme-options span {
  display: grid;
  place-items: center;
  min-height: 3rem;
  padding: 0 0.85rem;
  color: var(--ink);
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  font-weight: 900;
}

.theme-options input:checked + span {
  color: var(--white);
  background: var(--black);
  border-color: var(--black);
}

label {
  display: grid;
  gap: 0.35rem;
  font-weight: 850;
}

small {
  color: var(--muted);
  font-weight: 600;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: #fbfaf7;
  padding: 0.75rem;
  outline: none;
}

.upload-control {
  position: relative;
  display: grid;
  gap: 0.35rem;
  min-height: 4.35rem;
  padding: 0.7rem;
  background: #fbfaf7;
  border: 1px dashed #d8d0c1;
  border-radius: 0.7rem;
}

.upload-control input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 2.35rem;
  padding: 0 0.9rem;
  color: var(--white);
  background: var(--black);
  border-radius: 999px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(8, 8, 10, 0.16);
}

.upload-control small {
  color: var(--muted);
}

textarea {
  min-height: 6rem;
  resize: vertical;
}

.form-row.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.form-row.three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.checks label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--soft);
  border-radius: 0.55rem;
}

.checks input {
  width: auto;
  accent-color: var(--black);
}

.current-image {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.8rem;
  align-items: center;
  padding: 0.75rem;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 0.55rem;
}

.image-preview {
  display: grid;
  place-items: center;
  aspect-ratio: 1.25;
  color: var(--white);
  background: linear-gradient(135deg, #242428, #8d6a2b);
  border-radius: 0.5rem;
  overflow: hidden;
  font-weight: 950;
}

.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.current-image span {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.current-image strong {
  display: block;
  color: var(--ink);
  font-weight: 950;
}

.current-image small {
  color: var(--muted);
  line-height: 1.3;
}

.primary,
.small-button,
.login-card button {
  min-height: 3rem;
  border: 0;
  color: var(--white);
  background: var(--black);
  border-radius: 0.65rem;
  font-weight: 900;
}

.small-button {
  width: auto;
  min-height: 2.35rem;
  padding: 0 0.8rem;
  white-space: nowrap;
}

.ghost,
.row-actions button,
.category-row button,
.remove-row {
  border: 0;
  color: var(--muted);
  background: transparent;
  font-weight: 850;
}

.subsection-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.subsection-title h3 {
  margin: 0;
  font-size: 1rem;
}

.modifier-editor {
  display: grid;
  gap: 0.55rem;
  padding: 0.8rem;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 0.65rem;
}

.option-groups-shell {
  display: grid;
  gap: 0.75rem;
}

.option-groups-shell [data-option-groups] {
  display: grid;
  gap: 0.85rem;
}

.group-summary {
  min-width: 0;
}

.group-summary h3 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-end;
}

.admin-sheet-overlay[hidden] {
  display: none;
}

.admin-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 1rem;
}

.admin-sheet-scrim {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 10, 0);
  backdrop-filter: blur(0);
  transition: background 320ms ease, backdrop-filter 320ms ease;
}

.admin-slide-sheet {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1rem;
  width: min(520px, 100%);
  max-height: min(88vh, 780px);
  overflow-y: auto;
  padding: 0.7rem 1rem 1rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(232, 226, 216, 0.9);
  border-radius: 1.35rem 1.35rem 0.95rem 0.95rem;
  box-shadow: 0 -22px 55px rgba(9, 9, 11, 0.24);
  transform: translateY(calc(100% + 1.5rem));
  transition: transform 360ms cubic-bezier(0.2, 0.9, 0.22, 1);
}

.admin-sheet-overlay.open .admin-sheet-scrim {
  background: rgba(8, 8, 10, 0.34);
  backdrop-filter: blur(7px);
}

.admin-sheet-overlay.open .admin-slide-sheet {
  transform: translateY(0);
}

.admin-slide-sheet.builder-add-sheet,
.admin-slide-sheet.builder-create-sheet {
  height: 90dvh;
  max-height: calc(100dvh - 2rem);
  overflow: hidden;
}

.sheet-handle {
  width: 3.1rem;
  height: 0.34rem;
  margin: 0.1rem auto 0.25rem;
  background: #d8d2c8;
  border-radius: 999px;
}

.sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.sheet-header h2,
.sheet-header p {
  margin: 0;
}

.eyebrow {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.text-button {
  border: 0;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
}

.menu-edit-form {
  display: grid;
  gap: 0.9rem;
}

.inline-check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3rem;
  padding: 0.75rem 0.9rem;
  color: var(--ink);
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}

.inline-check input,
.day-checks input {
  width: auto;
  accent-color: var(--black);
}

.day-checks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.day-checks label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 0.65rem;
  color: var(--ink);
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 900;
}

.day-checks label:has(input:checked) {
  color: var(--black);
  background: var(--gold-soft);
  border-color: rgba(184, 135, 47, 0.35);
}

.modifier-head,
.modifier-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 7rem auto;
  gap: 0.5rem;
  align-items: center;
}

.modifier-head {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.modifier-row input {
  background: var(--white);
}

.remove-row {
  min-height: 2.75rem;
  padding: 0 0.45rem;
}

.category-create,
.category-row {
  display: grid;
  gap: 0.55rem;
}

.category-create {
  grid-template-columns: minmax(0, 1fr) 6rem auto auto;
  align-items: center;
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}

.category-create label,
.category-row label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.sort-field {
  display: grid;
  gap: 0.25rem;
}

.sort-field small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.2;
}

.category-create input[type="checkbox"],
.category-row input[type="checkbox"] {
  width: auto;
  accent-color: var(--black);
}

.category-list {
  display: grid;
  gap: 0.55rem;
}

.category-row {
  grid-template-columns: 2.75rem minmax(0, 1fr) 5.6rem auto auto;
  align-items: center;
  padding: 0.7rem;
  background: linear-gradient(180deg, #fffdf9 0%, #fbfaf7 100%);
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  box-shadow: 0 0.65rem 1.7rem rgba(18, 18, 19, 0.04);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.category-row.dragging {
  opacity: 0.62;
  transform: scale(0.995);
  border-color: rgba(184, 135, 47, 0.58);
  box-shadow: 0 1rem 2.2rem rgba(18, 18, 19, 0.1);
}

.drag-handle {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid var(--line);
  color: #8a6a34;
  background: #f7eedf;
  border-radius: 999px;
  cursor: grab;
  font-size: 1rem;
  font-weight: 950;
  letter-spacing: -0.18em;
  touch-action: none;
}

.drag-handle:active {
  cursor: grabbing;
}

.category-main {
  display: grid;
  gap: 0.3rem;
}

.category-main input {
  font-weight: 850;
}

.category-active {
  justify-self: center;
}

.category-actions {
  display: flex;
  gap: 0.45rem;
  justify-content: flex-end;
}

.category-actions button {
  min-height: 2.35rem;
  padding: 0 0.8rem;
  border-radius: 999px;
}

.category-actions button[name="action"][value="save_category"] {
  color: #111;
  background: #f7eedf;
  border: 1px solid #e2ceb0;
}

.category-actions button[name="action"][value="delete_category"] {
  color: #8f2d24;
  background: #fff8f6;
  border: 1px solid #f0d2cc;
}

.item-list {
  display: grid;
  gap: 0.7rem;
}

.admin-item {
  display: grid;
  grid-template-columns: 4.25rem 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
}

.admin-item.inactive {
  opacity: 0.58;
}

.thumb {
  display: grid;
  place-items: center;
  width: 4.25rem;
  aspect-ratio: 1;
  color: var(--white);
  background: linear-gradient(135deg, #242428, #8d6a2b);
  border-radius: 0.55rem;
  overflow: hidden;
  font-weight: 950;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-item p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
}

.row-actions form {
  margin: 0;
}

.row-actions a,
.row-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0 0.9rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 950;
  line-height: 1;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.row-actions a {
  color: #111;
  background: linear-gradient(180deg, #f8dfad 0%, #c18a2b 100%);
  border: 1px solid rgba(138, 91, 18, 0.25);
  box-shadow: 0 0.45rem 1rem rgba(169, 112, 32, 0.2);
}

.row-actions button {
  color: #8f2d24;
  background: #fff8f6;
  border: 1px solid #f0d2cc;
}

.row-actions a:hover,
.row-actions button:hover {
  transform: translateY(-1px);
}

.row-actions a:focus-visible,
.row-actions button:focus-visible {
  outline: 3px solid rgba(193, 138, 43, 0.28);
  outline-offset: 2px;
}

.orders-table {
  display: grid;
  gap: 0.45rem;
}

.orders-list,
.table-list {
  display: grid;
  gap: 0.65rem;
}

.orders-list article {
  grid-template-columns: minmax(10rem, 1fr) 0.8fr 0.9fr 0.7fr auto;
  align-items: center;
}

.orders-list article div {
  display: grid;
  gap: 0.15rem;
}

.orders-list em {
  width: fit-content;
  padding: 0.25rem 0.55rem;
  color: #167336;
  background: #dff5e3;
  border-radius: 999px;
  font-style: normal;
  font-weight: 900;
}

.table-list article {
  grid-template-columns: minmax(9rem, 1fr) auto auto auto auto;
  align-items: center;
}

.table-list a {
  color: var(--gold);
  font-weight: 900;
  text-decoration: none;
}

.kitchen-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.kitchen-board section {
  display: grid;
  gap: 0.65rem;
  align-content: start;
  padding: 0.75rem;
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
}

.kitchen-board h3,
.kitchen-card p {
  margin: 0;
}

.kitchen-card {
  display: grid;
  gap: 0.65rem;
  padding: 0.8rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}

.kitchen-card ul {
  margin: 0;
  padding-left: 1.1rem;
}

.kitchen-card button {
  min-height: 2.4rem;
  border: 0;
  color: var(--white);
  background: var(--black);
  border-radius: 999px;
  font-weight: 900;
}

.orders-table > div {
  display: grid;
  grid-template-columns: 1.1fr 0.8fr 1fr 0.7fr 0.7fr;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}

.orders-table span {
  color: var(--muted);
}

.qr-control-card {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}

.qr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.qr-print-help {
  display: grid;
  gap: 0.25rem;
  margin: 0.9rem 0;
  padding: 0.8rem;
  color: var(--muted);
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
}

.qr-print-help strong {
  color: var(--ink);
}

.qr-sheet {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.qr-sheet.medium {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.qr-sheet.large {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.qr-sheet.small {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.qr-sticker {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 0.85rem;
  align-items: center;
  min-height: 9.5rem;
  padding: 0.85rem;
  background: var(--white);
  border: 1px dashed #cabdaa;
  border-radius: 0.8rem;
  break-inside: avoid;
  page-break-inside: avoid;
}

.qr-code {
  display: grid;
  place-items: center;
  width: 7rem;
  aspect-ratio: 1;
  padding: 0.35rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
}

.qr-code img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-sticker-body {
  min-width: 0;
}

.qr-sticker-body p,
.qr-sticker-body h3 {
  margin: 0;
}

.qr-sticker-body .brand {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.qr-sticker-body h3 {
  margin-top: 0.15rem;
  font-size: 1.65rem;
}

.qr-sticker-body .instruction {
  margin-top: 0.2rem;
  color: var(--muted);
  font-weight: 750;
}

.qr-sticker-body code {
  display: block;
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.25;
}

code {
  overflow-wrap: anywhere;
}

@media (max-width: 860px) {
	  .control-layout,
	  .page-action-header,
  .management-header,
  .menu-flow-steps,
  .setup-card,
  .metric-grid,
  .builder-layout,
  .builder-add-options,
  .menu-status-strip,
  .form-row.two,
  .form-row.three,
  .category-create,
  .category-row,
  .builder-assignment,
  .builder-assignment-card,
  .builder-assignment-form,
  .orders-table > div,
  .orders-list article,
  .table-list article,
  .kitchen-board {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
  }

  .management-header {
    align-items: stretch;
  }

  .account-menu,
  .restaurant-switcher {
    width: 100%;
  }

  .restaurant-switcher {
    justify-content: space-between;
  }

  .admin-sidebar nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .builder-category-header,
  .builder-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .builder-food-thumb {
    width: 4.5rem;
  }

  .nav-group-label {
    grid-column: 1 / -1;
  }

  .setup-steps {
    grid-template-columns: 1fr;
  }

  .nav-item {
    text-align: center;
  }

  .modifier-head {
    display: none;
  }

  .modifier-row {
    grid-template-columns: 1fr;
  }

  .admin-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-item {
    grid-template-columns: 3.8rem 1fr;
  }

  .row-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
  }

  .page-action-header {
    align-items: stretch;
  }

  .header-actions,
  .action-button,
  .secondary-action {
    width: 100%;
  }

  .qr-sheet,
  .qr-sheet.medium,
  .qr-sheet.large,
  .qr-sheet.small {
    grid-template-columns: 1fr;
  }
}

@media print {
  body {
    background: var(--white);
  }

  .admin-header,
  .admin-sidebar,
  .qr-control-card,
  .qr-print-help,
  .panel-title button,
  .alert,
  .admin-panel-view:not([data-panel="qr"]) {
    display: none !important;
  }

  .admin-shell {
    width: 100%;
    padding: 0;
  }

  .control-layout {
    display: block;
  }

  .panel {
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  .panel-title {
    margin: 0 0 0.35in;
  }

  .qr-sheet {
    gap: 0;
    margin: 0;
  }

  .qr-sheet.medium,
  .qr-sheet.large {
    grid-template-columns: repeat(2, 1fr);
  }

  .qr-sheet.small {
    grid-template-columns: repeat(2, 1fr);
  }

  .qr-sticker {
    border: 1px dashed #999;
    border-radius: 0;
    min-height: 3.2in;
    padding: 0.22in;
  }

  .qr-sheet.large .qr-sticker {
    min-height: 4.5in;
  }

  .qr-sheet.small .qr-sticker {
    min-height: 2.05in;
  }

  .qr-sheet.large .qr-code {
    width: 1.45in;
  }

  .qr-sheet.medium .qr-code {
    width: 1.25in;
  }

  .qr-sheet.small .qr-code {
    width: 0.95in;
  }
}

/* Shared operator controls on order details and both kitchen displays. */
.order-status-action {margin:12px 0;display:flex;max-width:100%;}
.order-status-action button {min-height:46px;padding:12px 20px;border:1px solid #222;border-radius:10px;background:#222;color:#fff;font:600 16px/1.3 system-ui;cursor:pointer;white-space:normal;}
.order-status-action button:focus-visible {outline:3px solid #9b7b37;outline-offset:4px;}
.order-status-action button:hover {background:#3a3a3a;}
.kitchen-order-summary {min-width:0;background:#fff;border-bottom:1px solid var(--line);}
.kitchen-order-summary .order-status-action {margin:0;padding:0 14px 14px;}
.kitchen-order-summary .order-status-action button {width:100%;}
.kitchen-status {font-weight:700;color:#6f5723;}
.kitchen-card .order-status-action {margin:0;}
.kitchen-card .order-status-action button {width:100%;border-radius:10px;min-height:46px;}
.kds-shell .page-action-header > a {flex-shrink:0;}
@media(max-width:600px){.order-detail-screen>.order-status-action button{width:100%;}.kds-shell .page-action-header{flex-wrap:wrap;}.kds-shell .page-action-header>div{flex-basis:100%;}.kitchen-order-summary .order-summary-row{overflow-wrap:anywhere;}}
