:root {
  --cream: #fff5de;
  --paper: #fffaf0;
  --ink: #331b11;
  --muted: #846454;
  --red: #d84322;
  --red-dark: #a82d18;
  --amber: #ffb229;
  --green: #2f8a52;
  --mint: #dff2cc;
  --line: rgba(110, 61, 34, 0.18);
  --shadow: rgba(95, 42, 16, 0.2);
  --display: "Yeseva One", Georgia, serif;
  --body: "Rubik", Arial, sans-serif;
  --mono: "JetBrains Mono", Consolas, monospace;
}

* {
  box-sizing: border-box;
  scrollbar-width: none;
}

*::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 8%, rgba(255, 178, 41, 0.3), transparent 28%),
    radial-gradient(circle at 92% 18%, rgba(47, 138, 82, 0.18), transparent 26%),
    linear-gradient(135deg, #fff7e6, #ffe6b8 48%, #fff1d0);
  color: var(--ink);
  font-family: var(--body);
  overflow-x: hidden;
  animation: pageEnter 360ms cubic-bezier(0.2, 0.9, 0.22, 1) both;
}

body.is-page-leaving {
  pointer-events: none;
  animation: pageLeave 180ms ease both;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.side-panel {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  border-right: 1px solid rgba(255, 255, 255, 0.66);
  background: rgba(255, 250, 240, 0.82);
  padding: 24px;
  box-shadow: 18px 0 42px rgba(95, 42, 16, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--red), var(--amber));
  color: #fff8e8;
  font-family: var(--display);
  font-size: 26px;
  box-shadow: inset 0 -8px 18px rgba(102, 30, 10, 0.22);
}

.brand strong {
  font-weight: 900;
}

.side-nav {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.side-nav a {
  position: relative;
  min-height: 48px;
  display: flex;
  align-items: center;
  border-radius: 16px;
  padding: 0 16px;
  background: rgba(255, 238, 200, 0.72);
  color: var(--muted);
  font-weight: 900;
  overflow: hidden;
  transition:
    background 220ms ease,
    box-shadow 220ms ease,
    color 220ms ease,
    transform 220ms ease;
}

.side-nav a:hover {
  background: #fffaf0;
  color: var(--ink);
  transform: translateX(2px);
}

.side-nav a.active {
  background: #fffaf0;
  color: var(--ink);
  box-shadow: 0 14px 28px rgba(51, 27, 17, 0.16);
}

.admin-user {
  margin-top: auto;
  display: grid;
  gap: 5px;
  border-radius: 22px;
  background: var(--ink);
  color: #fff5de;
  padding: 18px;
}

.admin-user span,
.admin-user small,
.eyebrow,
.stat-card span,
.search-field span,
.insight-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-user span,
.admin-user small {
  color: rgba(255, 245, 222, 0.7);
}

.admin-user strong {
  font-size: 18px;
}

.admin-user a,
.admin-profile-link {
  width: max-content;
  margin-top: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 245, 222, 0.12);
  padding: 8px 12px;
  color: #fff5de;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.workspace {
  min-width: 0;
  padding: 132px clamp(18px, 4vw, 48px) 48px;
}

.workspace-head {
  position: fixed;
  top: 14px;
  left: calc(280px + clamp(12px, 3vw, 36px));
  right: clamp(12px, 3vw, 36px);
  z-index: 90;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
  justify-content: initial;
  gap: 18px;
  align-items: center;
  margin-bottom: 0;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 26px;
  background: rgba(255, 250, 240, 0.82);
  padding: 12px;
  box-shadow: 0 14px 34px rgba(95, 42, 16, 0.12);
}

.workspace-head > div {
  min-width: 0;
}

.workspace-head .eyebrow,
.workspace-head h1 {
  display: none;
}

.admin-site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 0 0 auto;
  grid-column: 2;
  border-radius: 18px;
  background: rgba(255, 238, 200, 0.78);
  padding: 8px;
}

.admin-site-nav a {
  min-width: 112px;
  min-height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 900;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.admin-site-nav a:hover {
  background: #fffaf0;
  color: var(--red);
  transform: translateY(-1px);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--red);
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.05;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(42px, 6vw, 86px);
}

h2 {
  margin-bottom: 0;
  font-size: clamp(28px, 3.4vw, 44px);
}

.head-actions,
.filter-row,
.order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.head-actions {
  display: none !important;
}

.action-button,
.ghost-button,
.mini-button,
.filter-button,
.status-button {
  min-height: 42px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  padding: 0 15px;
  font-weight: 900;
}

.status-button {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition:
    color 220ms ease,
    transform 220ms ease,
    box-shadow 220ms ease,
    background 220ms ease;
}

.status-button::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: var(--button-fill, var(--red));
  opacity: 0;
  transform: translateX(-55%) scaleX(0.35);
  transform-origin: left center;
  transition:
    opacity 220ms ease,
    transform 340ms cubic-bezier(0.2, 0.9, 0.2, 1);
  content: "";
}

.status-button span {
  position: relative;
  z-index: 1;
}

.status-button:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(110, 61, 34, 0.24), 0 10px 22px rgba(95, 42, 16, 0.1);
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--green), #174f31);
  color: #fffaf0;
  box-shadow: 0 14px 28px rgba(47, 138, 82, 0.18);
}

.ghost-button,
.mini-button,
.filter-button,
.status-button {
  background: #fffaf0;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}

.access-card,
.panel,
.stat-card,
.control-strip {
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  background: rgba(255, 250, 240, 0.88);
  box-shadow: 0 16px 40px rgba(95, 42, 16, 0.1);
}

.access-card {
  max-width: 560px;
  padding: 34px;
}

.access-card p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.6;
}

.admin-content {
  display: grid;
  gap: 18px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  padding: 22px;
}

.stat-card strong {
  display: block;
  margin: 8px 0 4px;
  font-family: var(--mono);
  font-size: clamp(26px, 4vw, 42px);
}

.stat-card small {
  color: var(--muted);
  font-weight: 700;
}

.last-status-pill {
  width: max-content;
  border-radius: 999px;
  padding: 10px 13px;
  font-family: var(--body) !important;
  font-size: 13px !important;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.last-status-pill.status-new {
  background: #ffcf69;
  color: #6a3a00;
}

.last-status-pill.status-cooking {
  background: var(--red);
  color: #fff5de;
}

.last-status-pill.status-done {
  background: var(--green);
  color: #fffaf0;
}

.last-status-pill.status-picked {
  background: var(--ink);
  color: #fff5de;
}

.control-strip {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 12px;
  padding: 16px;
}

.search-field {
  display: grid;
  gap: 8px;
}

.search-field input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffaf0;
  color: var(--ink);
  outline: 0;
  padding: 0 15px;
  font-weight: 700;
}

.search-field input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(216, 67, 34, 0.12);
}

.filter-button {
  position: relative;
  overflow: hidden;
  transition:
    color 220ms ease,
    transform 220ms ease,
    box-shadow 220ms ease,
    background 220ms ease;
}

.filter-button::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--ink), #5b2418);
  opacity: 0;
  transform: translateX(-55%) scaleX(0.35);
  transform-origin: left center;
  transition:
    opacity 220ms ease,
    transform 340ms cubic-bezier(0.2, 0.9, 0.2, 1);
  content: "";
}

.filter-button:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(110, 61, 34, 0.24), 0 10px 22px rgba(95, 42, 16, 0.1);
}

.filter-button span {
  position: relative;
  z-index: 1;
}

.filter-button.active {
  background: #fffaf0;
  color: #fff5de;
  box-shadow: 0 14px 24px rgba(51, 27, 17, 0.15);
}

.filter-button.active::before {
  opacity: 1;
  transform: translateX(0) scaleX(1);
}

.board-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 18px;
  align-items: start;
}

.right-column {
  align-self: start;
  margin-top: 0;
}

.panel {
  padding: 22px;
}

.orders-toolbar {
  display: grid;
  grid-template-columns: minmax(420px, 560px);
  justify-content: start;
  gap: 10px;
  align-items: center;
  margin: 18px 0 16px;
}

.order-type-switch {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  min-width: 0;
  border-radius: 14px;
  background: #fff7e6;
  padding: 6px;
  box-shadow: inset 0 0 0 1px var(--line);
}

.type-button {
  position: relative;
  min-height: 48px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
  overflow: hidden;
  padding: 0 14px;
  white-space: nowrap;
  transition:
    color 220ms ease,
    transform 220ms ease,
    box-shadow 220ms ease,
    background 220ms ease;
}

.type-button::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--ink), #5b2418);
  opacity: 0;
  transform: translateX(-55%) scaleX(0.35);
  transform-origin: left center;
  transition:
    opacity 220ms ease,
    transform 340ms cubic-bezier(0.2, 0.9, 0.2, 1);
  content: "";
}

.type-button.create-segment::before {
  background: linear-gradient(135deg, var(--green), #174f31);
}

.type-button span {
  position: relative;
  z-index: 1;
}

.type-button:hover {
  transform: translateY(-1px);
}

.type-button:focus-visible,
.builder-mode-button:focus-visible {
  outline: 3px solid rgba(216, 67, 34, 0.28);
  outline-offset: 2px;
}

.type-button.is-selected-muted {
  color: var(--ink);
  background: rgba(255, 238, 200, 0.9);
  cursor: pointer;
  pointer-events: auto;
  box-shadow: inset 0 0 0 1px rgba(216, 67, 34, 0.18);
}

.type-button.active {
  background: transparent;
  color: #fff5de;
  box-shadow: 0 12px 24px rgba(51, 27, 17, 0.14);
}

.type-button.create-segment.active {
  box-shadow: 0 12px 24px rgba(47, 138, 82, 0.2);
}

.type-button.active::before {
  opacity: 1;
  transform: translateX(0) scaleX(1);
}

.create-order-button {
  min-height: 68px;
  border-radius: 14px;
  background: var(--green);
  padding-inline: 34px;
  white-space: nowrap;
  box-shadow: 0 18px 34px rgba(47, 138, 82, 0.24);
  font-size: 17px;
  letter-spacing: 0;
}

.create-order-button:hover {
  transform: translateY(-2px) scale(1.015);
  box-shadow: 0 22px 38px rgba(47, 138, 82, 0.28);
}

.admin-order-builder {
  display: grid;
  gap: 14px;
  margin: -6px 0 18px;
  border-radius: 22px;
  background: #fff7e6;
  padding: 16px;
  box-shadow: inset 0 0 0 1px var(--line), 0 18px 34px rgba(95, 42, 16, 0.08);
}

.admin-order-builder.builder-enter {
  animation: builderSlide 320ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.builder-top-row {
  display: grid;
  grid-template-columns: minmax(430px, 1.15fr) minmax(340px, 0.85fr);
  gap: 16px;
  align-items: stretch;
}

.builder-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
  padding: 6px;
  box-shadow: inset 0 0 0 1px var(--line);
}

.builder-mode-button {
  min-height: 52px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
  transition:
    color 200ms ease,
    transform 200ms ease,
    background 200ms ease,
    box-shadow 200ms ease;
}

.builder-mode-button:hover {
  transform: translateY(-1px);
}

.builder-mode-button.active {
  background: var(--ink);
  color: #fff5de;
  box-shadow: 0 10px 20px rgba(51, 27, 17, 0.14);
}

.builder-search {
  margin-top: 12px;
  margin-bottom: 0;
}

.builder-products {
  display: grid;
  gap: 14px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
}

.builder-product-group {
  display: grid;
  gap: 10px;
}

.builder-product-group h3 {
  margin: 0;
  color: var(--red-dark);
  font-size: 17px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.builder-product-group > div {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.builder-product {
  position: relative;
  min-height: 138px;
  display: grid;
  align-content: space-between;
  border: 0;
  border-radius: 16px;
  background: #fffaf0;
  color: var(--ink);
  cursor: pointer;
  padding: 14px;
  text-align: left;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.builder-product:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 1px rgba(216, 67, 34, 0.2), 0 12px 24px rgba(95, 42, 16, 0.1);
}

.builder-product.is-added {
  animation: productAccept 520ms cubic-bezier(0.18, 0.95, 0.22, 1.2);
  box-shadow: inset 0 0 0 2px rgba(47, 138, 82, 0.35), 0 16px 30px rgba(47, 138, 82, 0.16);
}

.builder-product span,
.builder-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.builder-product span {
  font-size: 13px;
}

.builder-product strong {
  font-size: 16px;
}

.builder-product small {
  color: var(--green);
  font-family: var(--mono);
  font-weight: 900;
}

.builder-product b {
  position: absolute;
  right: 12px;
  bottom: 12px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--ink);
  color: #fff5de;
}

.builder-summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
  margin-top: 18px;
}

.builder-total-card,
.builder-phone-field,
.builder-cart,
.builder-fields {
  border-radius: 16px;
  background: #fffaf0;
  padding: 14px;
  box-shadow: inset 0 0 0 1px var(--line);
}

.builder-cart-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}

.builder-block-title {
  display: block;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.builder-cart-frame {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}

.builder-count-ribbon {
  position: absolute;
  top: 0;
  right: 0;
  width: 176px;
  min-height: 38px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff5de;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  transform: translate(48px, 18px) rotate(45deg);
  transform-origin: center;
  box-shadow: 0 10px 20px rgba(95, 42, 16, 0.12), inset 0 0 0 1px var(--line);
  z-index: 2;
}

.builder-count-ribbon::before {
  content: none;
}

.builder-summary strong {
  display: block;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 26px;
}

.builder-total-card {
  display: grid;
  align-content: center;
  min-height: 70px;
}

.builder-phone-field {
  width: 100%;
  box-sizing: border-box;
  min-height: 56px;
  border: 0;
  border-radius: 14px;
  background: #fffaf0;
  padding: 0 16px;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px var(--line);
}

.builder-cart {
  display: grid;
  gap: 8px;
  min-height: 96px;
  max-height: 220px;
  overflow: auto;
  overscroll-behavior: contain;
  padding-top: 18px;
}

.builder-cart-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px auto 32px;
  gap: 8px;
  align-items: center;
}

.builder-cart-row button {
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: var(--ink);
  color: #fff5de;
  cursor: pointer;
  font-weight: 900;
}

.builder-fields {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(260px, 0.42fr);
  gap: 10px;
}

.builder-fields input:not([type="hidden"]) {
  min-width: 0;
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  padding: 0 14px;
  color: var(--ink);
  font-weight: 800;
  box-shadow: inset 0 0 0 1px var(--line);
}

.builder-fields.is-cash {
  grid-template-columns: minmax(360px, 1fr) minmax(260px, 0.42fr);
}

.builder-fields.is-cash .create-order-button {
  justify-self: stretch;
}

.orders-page {
  animation: adminPageIn 280ms ease both;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.panel-head.compact {
  margin-bottom: 14px;
}

.order-list,
.guest-list,
.right-column {
  display: grid;
  gap: 12px;
}

.order-list.filter-flip .order-card,
.order-list.filter-flip .empty-state {
  animation: orderFilterIn 340ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.order-card {
  display: grid;
  gap: 14px;
  border-radius: 20px;
  background: #fff7e6;
  padding: 16px;
  animation: adminItemIn 320ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.order-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.order-top strong {
  display: block;
  font-size: 18px;
}

.order-top span,
.order-meta,
.order-items,
.guest-list li,
.empty-state {
  color: var(--muted);
  line-height: 1.5;
}

.status-pill {
  border-radius: 999px;
  padding: 7px 10px;
  background: var(--mint);
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.status-pill.new {
  background: #fff0d0;
  color: #a85f00;
}

.status-pill.cooking {
  background: #ffe5dd;
  color: var(--red-dark);
}

.status-pill.done {
  background: var(--mint);
  color: var(--green);
}

.status-pill.picked {
  background: var(--ink);
  color: #fff5de;
}

.order-items {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.status-button.active {
  background: #fffaf0;
  color: #fff;
  box-shadow: 0 12px 22px rgba(95, 42, 16, 0.12);
}

.status-button.is-activating {
  color: #fff;
}

.status-button.active::before,
.status-button.is-activating::before {
  opacity: 1;
  transform: translateX(0) scaleX(1);
}

.status-button[data-status="new"] {
  --button-fill: #6a3a00;
  background: #fff1cd;
  color: #6a3a00;
}

.status-button[data-status="cooking"] {
  --button-fill: var(--red-dark);
  background: #ffe5dd;
  color: var(--red-dark);
}

.status-button[data-status="done"] {
  --button-fill: var(--green);
  background: var(--mint);
  color: var(--green);
}

.status-button[data-status="picked"] {
  --button-fill: var(--ink);
  background: #ead8c2;
  color: var(--ink);
}

.status-button.active,
.status-button.is-activating,
.status-button.active span,
.status-button.is-activating span {
  color: #fff;
}

.order-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 18px;
  row-gap: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  background: rgba(255, 250, 240, 0.92);
  padding: 22px;
  box-shadow: 0 16px 40px rgba(95, 42, 16, 0.1);
}

.order-card::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 8px;
  height: 100%;
  background: var(--status-color, var(--amber));
  content: "";
}

.status-ribbon {
  position: absolute;
  top: 22px;
  right: -44px;
  width: 148px;
  padding: 7px 0;
  background: var(--status-color, var(--amber));
  color: var(--status-ink, var(--ink));
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
  transform: rotate(38deg);
  box-shadow: 0 10px 22px rgba(51, 27, 17, 0.16);
}

.order-open-cell {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 10px;
  min-width: 116px;
}

.order-number,
.status-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.order-open-cell .order-number {
  max-width: 116px;
  border-radius: 16px;
  background: #fff7e6;
  color: var(--ink);
  padding: 10px 12px;
  text-align: center;
  font-size: 14px;
  line-height: 1.15;
  font-family: var(--mono);
  font-weight: 900;
  box-shadow: inset 0 0 0 1px var(--line);
}

.order-toggle {
  position: relative;
  z-index: 2;
  width: 48px;
  height: 48px;
  align-self: center;
  border: 0;
  border-radius: 999px;
  background: var(--status-color, var(--ink));
  color: var(--status-ink, #fff5de);
  cursor: pointer;
  box-shadow: 0 14px 26px rgba(51, 27, 17, 0.18);
  transition: transform 220ms ease, background 220ms ease;
}

.order-toggle span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: translate(-62%, -50%) rotate(-45deg);
  transition: transform 240ms ease;
}

.order-card.open .order-toggle span {
  transform: translate(-50%, -66%) rotate(45deg);
}

.order-summary {
  min-width: 0;
  display: grid;
  align-items: stretch;
}

.order-price-box {
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 5px;
  width: 100%;
  border-radius: 18px;
  background: #fff7e6;
  padding: 14px 24px;
}

.order-price-box span:first-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.order-price-box strong {
  display: block;
  font-family: var(--mono);
  font-size: clamp(24px, 3vw, 36px);
}

.order-price-box span:last-child {
  color: var(--muted);
  font-weight: 800;
}

.order-details {
  grid-column: 1 / -1;
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: 0;
  transition:
    grid-template-rows 320ms ease,
    opacity 220ms ease,
    margin-top 320ms ease;
}

.order-card.open .order-details {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 18px;
}

.order-details-inner {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.38fr);
  align-items: stretch;
  gap: 20px;
  overflow: hidden;
}

.order-card.open .order-details-inner {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.order-main {
  min-width: 0;
  display: grid;
}

.items-panel {
  height: 100%;
  border-radius: 20px;
  background: #fff7e6;
  padding: 16px;
  box-shadow: inset 0 0 0 1px var(--line);
}

.items-title {
  display: flex;
  align-items: center;
  justify-content: start;
  gap: 9px;
  margin-bottom: 14px;
}

.items-title span {
  color: var(--ink);
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.items-title strong {
  color: var(--red-dark);
  font-family: var(--mono);
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1;
}

.order-items {
  display: grid;
  gap: 8px;
  max-height: 204px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
  overscroll-behavior: contain;
}

.order-items li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-radius: 14px;
  background: #ffe9b6;
  color: #5a2c18;
  padding: 11px 12px;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(216, 67, 34, 0.08);
}

.order-items li strong {
  flex: 0 0 auto;
  color: var(--red-dark);
  font-family: var(--mono);
  font-weight: 900;
}

.phone-box,
.order-side {
  border-radius: 20px;
  background: #fffaf0;
  padding: 18px;
  box-shadow: inset 0 0 0 1px var(--line);
}

.phone-box strong,
.phone-box small {
  display: block;
}

.phone-box strong {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.15;
}

.phone-box small {
  margin-top: 7px;
  color: var(--muted);
  font-weight: 800;
}

.order-side-stack {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
}

.order-side {
  min-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  align-content: stretch;
  gap: 14px;
}

.order-side strong {
  display: block;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 28px;
}

.progress {
  display: grid;
  align-self: end;
  gap: 8px;
}

.progress-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(51, 27, 17, 0.12);
  overflow: hidden;
}

.progress-track i {
  display: block;
  width: var(--progress, 25%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--amber), var(--red), var(--green), var(--ink));
}

.order-details-inner > .order-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  border-radius: 18px;
  background: #fff7e6;
  padding: 10px;
  box-shadow: inset 0 0 0 1px var(--line);
}

.order-card.status-new {
  --status-color: #ffcf69;
  --status-ink: #6a3a00;
  --progress: 25%;
}

.order-card.status-cooking {
  --status-color: var(--red);
  --status-ink: #fff5de;
  --progress: 50%;
}

.order-card.status-done {
  --status-color: var(--green);
  --status-ink: #fffaf0;
  --progress: 78%;
}

.order-card.status-picked {
  --status-color: var(--ink);
  --status-ink: #fff5de;
  --progress: 100%;
}

.guest-list {
  margin: 0;
  padding: 0;
  list-style: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.guest-list li {
  position: relative;
  border-radius: 16px;
  background: #fff7e6;
  padding: 14px 14px 46px;
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
  animation: adminItemIn 320ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.guest-list strong {
  display: block;
  color: var(--ink);
  margin-bottom: 4px;
}

.guest-waiting-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  border-radius: 999px;
  background: var(--guest-status, var(--amber));
  color: var(--guest-status-ink, #6a3a00);
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.guests-page {
  animation: adminPageIn 280ms ease both;
}

.guests-panel {
  display: grid;
  gap: 18px;
}

.guest-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.guest-result-card {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 0;
  border-radius: 18px;
  background: #fff7e6;
  color: var(--ink);
  cursor: pointer;
  padding: 16px;
  text-align: left;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: transform 180ms ease, box-shadow 180ms ease;
  animation: guestCardIn 280ms ease both;
}

.guest-result-card:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 1px rgba(216, 67, 34, 0.2), 0 14px 28px rgba(95, 42, 16, 0.12);
}

.guest-avatar {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--red), var(--amber));
  color: #fff5de;
  font-family: var(--display);
  font-size: 25px;
}

.guest-result-card strong,
.guest-result-card span,
.guest-result-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guest-result-card span,
.guest-result-card small,
.guest-result-stats {
  color: var(--muted);
  font-weight: 800;
}

.guest-result-stats {
  text-align: right;
}

.guest-result-stats strong {
  color: var(--green);
  font-family: var(--mono);
}

.guest-modal {
  width: min(760px, calc(100vw - 28px));
  border: 0;
  border-radius: 26px;
  padding: 0;
  background: transparent;
}

.guest-modal[open] .guest-profile-card {
  animation: guestModalIn 260ms cubic-bezier(0.2, 0.9, 0.22, 1) both;
}

.guest-modal.is-closing .guest-profile-card {
  animation: guestModalOut 220ms ease both;
}

.guest-modal::backdrop {
  background: rgba(51, 27, 17, 0.54);
}

.guest-profile-card {
  position: relative;
  display: grid;
  gap: 18px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 26px;
  background: #fff7e6;
  padding: 28px;
  box-shadow: 0 30px 90px rgba(51, 27, 17, 0.28);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: var(--ink);
  cursor: pointer;
}

.modal-close::before,
.modal-close::after {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #fff5de;
  content: "";
}

.modal-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.modal-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.guest-profile-head {
  display: flex;
  gap: 16px;
  align-items: center;
  padding-right: 54px;
}

.guest-profile-head h2 {
  margin-bottom: 6px;
}

.guest-profile-head > div > span {
  color: var(--muted);
  font-weight: 900;
}

.guest-profile-metrics,
.guest-profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.guest-profile-metrics article,
.guest-profile-grid section,
.guest-note {
  border-radius: 18px;
  background: #fffaf0;
  padding: 16px;
  box-shadow: inset 0 0 0 1px var(--line);
}

.guest-profile-metrics span,
.guest-profile-grid h3 {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.guest-profile-metrics strong {
  display: block;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: clamp(22px, 4vw, 34px);
}

.guest-profile-grid {
  grid-template-columns: 0.85fr 1.15fr;
}

.guest-chip-list,
.guest-order-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.guest-chip-list button,
.guest-order-list article {
  border: 0;
  border-radius: 13px;
  background: #fff1cd;
  padding: 10px 12px;
  color: var(--ink);
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.guest-order-list article {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
}

.guest-order-list small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-weight: 800;
}

.guest-note {
  color: var(--muted);
  font-weight: 800;
}

.mini-modal {
  width: min(520px, calc(100vw - 28px));
}

.mini-profile-card {
  gap: 12px;
}

.insight-list {
  display: grid;
  gap: 10px;
}

.insight-list div {
  border-radius: 16px;
  background: #fff7e6;
  padding: 14px;
}

.insight-list strong {
  display: block;
  margin-top: 5px;
}

.insights-page {
  animation: adminPageIn 280ms ease both;
}

.insights-panel {
  display: grid;
  gap: 18px;
}

.insight-dashboard {
  display: grid;
  gap: 16px;
}

.insight-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.insight-metrics article,
.chart-card,
.donut-card,
.channel-card,
.top-list-card {
  border-radius: 18px;
  background: #fff7e6;
  padding: 16px;
  box-shadow: inset 0 0 0 1px var(--line);
}

.insight-metrics span,
.chart-head span,
.channel-card > span,
.top-products span,
.status-legend span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.insight-metrics strong {
  display: block;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: clamp(22px, 3vw, 34px);
}

.chart-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.chart-head strong {
  font-family: var(--mono);
}

.revenue-chart {
  min-height: 230px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.revenue-bar {
  min-width: 0;
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 7px;
  height: 220px;
  align-items: end;
}

.revenue-bar i {
  width: 100%;
  min-height: 8px;
  border-radius: 12px 12px 5px 5px;
  background: linear-gradient(180deg, var(--green), var(--amber), var(--red));
  box-shadow: 0 12px 24px rgba(216, 67, 34, 0.14);
}

.revenue-bar span,
.revenue-bar b {
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.revenue-bar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.revenue-bar b {
  font-family: var(--mono);
  font-size: 11px;
}

.split-charts {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(260px, 1fr);
  gap: 14px;
}

.donut-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
}

.status-donut {
  width: 150px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  position: relative;
}

.status-donut::after {
  position: absolute;
  inset: 28px;
  border-radius: inherit;
  background: #fff7e6;
  content: "";
}

.status-donut span {
  position: relative;
  z-index: 1;
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 900;
}

.status-legend,
#channelBars,
.top-products {
  display: grid;
  gap: 9px;
}

.status-legend div,
.channel-row,
.top-products div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.status-legend i {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.channel-row i,
.top-products i {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red), var(--amber), var(--green));
}

.channel-row.cash i {
  background: linear-gradient(90deg, var(--ink), var(--red));
}

.channel-row strong,
.top-products strong,
.status-legend strong {
  font-family: var(--mono);
}

.cashier-control {
  display: flex;
  justify-content: center;
  padding: 10px 0 0;
}

.cashier-button {
  position: relative;
  overflow: hidden;
  min-height: 56px;
  border: 0;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff5de;
  cursor: pointer;
  padding: 0 24px;
  font-weight: 900;
  box-shadow: 0 18px 36px rgba(168, 45, 24, 0.22);
  transition: background 320ms ease, box-shadow 320ms ease, transform 220ms ease;
}

.cashier-button::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.34), transparent);
  content: "";
  transform: translateX(-120%) skewX(-18deg);
  transition: transform 520ms ease;
}

.cashier-button.is-switching {
  animation: cashierSwitch 420ms ease both;
}

.cashier-button.is-switching::after {
  transform: translateX(160%) skewX(-18deg);
}

.cashier-button.is-closed {
  background: linear-gradient(135deg, var(--green), #174f31);
  box-shadow: 0 18px 36px rgba(47, 138, 82, 0.22);
}

.toast-stack {
  position: fixed;
  left: 50%;
  top: 98px;
  z-index: 160;
  width: min(430px, calc(100vw - 28px));
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  border-radius: 18px;
  background: var(--ink);
  color: #fff5de;
  padding: 15px 18px;
  font-weight: 900;
  box-shadow: 0 24px 56px rgba(51, 27, 17, 0.24);
  animation: toastIn 260ms ease both;
}

.toast.hiding {
  animation: toastOut 240ms ease both;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(14px) scale(0.96);
  }
}

@keyframes adminPageIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes guestCardIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes adminItemIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes guestModalIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes guestModalOut {
  to {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
}

@keyframes cashierSwitch {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  42% {
    transform: translateY(-2px) scale(1.035);
  }
  72% {
    transform: translateY(1px) scale(0.985);
  }
}

@keyframes orderFilterIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes builderSlide {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes productAccept {
  0% {
    transform: translateY(0) scale(1);
  }
  35% {
    transform: translateY(-4px) scale(1.04);
  }
  70% {
    transform: translateY(1px) scale(0.985);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes createPulse {
  0%,
  100% {
    filter: saturate(1);
    box-shadow: 0 18px 34px rgba(16, 185, 79, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.34);
  }
  50% {
    filter: saturate(1.25);
    box-shadow: 0 22px 42px rgba(44, 255, 119, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  }
}

@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pageLeave {
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

@media (max-width: 980px) {
  body {
    padding-bottom: 220px;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
    width: min(100% - 20px, 1440px);
    grid-template-columns: 1fr auto;
    margin-top: 10px;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.66);
  }

  .side-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 120;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    box-shadow: 0 18px 44px rgba(51, 27, 17, 0.2);
  }

  .admin-user {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(max(12px, env(safe-area-inset-bottom)) + 72px);
    z-index: 119;
    justify-self: stretch;
  }

  .workspace-head {
    position: fixed;
    top: 10px;
    left: 10px;
    right: 10px;
    z-index: 90;
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    margin: 0;
  }

  .admin-site-nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stats-grid,
  .board-grid,
  .control-strip,
  .orders-toolbar,
  .builder-top-row,
  .builder-products,
  .builder-summary,
  .builder-fields,
  .insight-metrics,
  .split-charts,
  .guest-results,
  .guest-profile-metrics,
  .guest-profile-grid {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .guest-results,
  .guest-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .builder-product-group > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .builder-cart-panel,
  .builder-total-card {
    grid-column: auto;
    grid-row: auto;
  }

  .order-details-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .workspace {
    padding: 106px 14px 48px;
  }

  .workspace-head,
  .order-top {
    display: grid;
  }

  .workspace-head {
    position: fixed;
    top: 10px;
    left: 10px;
    right: 10px;
    grid-template-columns: 1fr;
    margin: 0;
  }

  .panel-head {
    display: flex;
    align-items: center;
  }

  .orders-panel .panel-head {
    grid-template-columns: none;
  }

  .orders-panel .panel-head h2 {
    font-size: clamp(24px, 7vw, 34px);
  }

  .orders-panel .panel-head .mini-button {
    margin-left: auto;
    flex: 0 0 auto;
    padding: 0 12px;
  }

  .head-actions,
  .filter-row,
  .order-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .control-strip .filter-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .orders-toolbar {
    grid-template-columns: 1fr;
  }

  .order-type-switch {
    grid-template-columns: repeat(3, minmax(132px, 1fr));
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .create-order-button {
    width: 100%;
  }

  .builder-fields.is-cash .create-order-button {
    justify-self: stretch;
  }

  .builder-product-group > div {
    grid-template-columns: 1fr;
  }

  .type-button:first-child,
  .type-button:last-child {
    border-radius: 10px;
  }

  .action-button,
  .ghost-button {
    width: 100%;
  }

  .order-card {
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 12px;
    padding: 18px 14px;
  }

  .order-open-cell {
    min-width: 66px;
    justify-items: center;
    gap: 8px;
  }

  .order-toggle {
    width: 44px;
    height: 44px;
  }

  .order-price-box {
    min-height: 86px;
    padding: 13px 14px;
  }

  .order-price-box strong {
    font-size: clamp(24px, 8vw, 34px);
  }

  .order-details-inner > .order-actions {
    grid-template-columns: 1fr 1fr;
  }

  .order-open-cell .order-number {
    max-width: none;
    font-size: 12px;
  }
}
