@import url("https://fonts.googleapis.com/css2?family=Bungee:wght@400&family=Inter:wght@400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800&family=Oxanium:wght@500;600;700;800&family=Spectral:ital,wght@0,500;0,700;1,500;1,700&display=swap");

:root {
  color-scheme: light;
  --page: #f3f3f4;
  --surface: #ffffff;
  --surface-soft: #f7f7f8;
  --surface-muted: #eeeeef;
  --ink: #111318;
  --text: #1d1f25;
  --muted: #8b8d95;
  --muted-strong: #6f737c;
  --border: rgba(0, 0, 0, 0.08);
  --border-soft: rgba(0, 0, 0, 0.06);
  --brand: #2f6df6;
  --green: #15803d;
  --green-soft: #ecfdf3;
  --blue-soft: #eef3ff;
  --warn: #a16207;
  --warn-soft: #fff8e6;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--page);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

p,
h1,
h2,
h3 {
  margin: 0;
}

.app-shell {
  min-height: 100dvh;
  display: flex;
  background: var(--page);
}

.dashboard-sidebar {
  position: sticky;
  top: 0;
  width: 256px;
  height: 100dvh;
  flex: 0 0 256px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #d7d7dc;
  background: #ffffff;
}

.sidebar-brand {
  padding: 24px 20px 18px;
  border-bottom: 1px solid var(--border);
}

.product-mark {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
}

.product-mark img {
  display: block;
  width: 155px;
  height: auto;
  user-select: none;
}

.product-mark.sm img {
  width: 118px;
}

.product-mark span {
  margin-top: 4px;
  color: #4b4f57;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.11em;
  white-space: nowrap;
}

.product-mark.sm span {
  font-size: 7px;
  letter-spacing: 0.105em;
}

.tenant-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 20px;
}

.tenant-avatar {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(17, 19, 24, 0.08);
  border-radius: 50%;
  background: rgba(47, 109, 246, 0.08);
  color: var(--brand);
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(17, 19, 24, 0.06);
}

.tenant-copy {
  min-width: 0;
}

.tenant-copy p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.tenant-copy span {
  display: block;
  margin-top: 3px;
  color: #4b4f57;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.mode-switch {
  display: grid;
  gap: 2px;
  padding: 14px 12px;
}

.mode-button {
  min-height: 38px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #343840;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  transition:
    background 300ms var(--ease),
    color 300ms var(--ease),
    transform 300ms var(--ease);
}

.mode-button::before {
  width: 17px;
  height: 17px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 17px;
  border-radius: 6px;
  background: #eeeeef;
  color: #6f737c;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.mode-button[data-mode="cashier"]::before {
  content: "C";
}

.mode-button[data-mode="kitchen"]::before {
  content: "K";
}

.mode-button[data-mode="management"]::before {
  content: "M";
}

.mode-button:hover {
  background: #f5f5f6;
  color: var(--ink);
}

.mode-button:active,
.primary-button:active,
.secondary-button:active,
.danger-button:active,
.small-button:active,
.icon-button:active,
.table-chip:active,
.category-chip:active,
.guest-chip:active,
.menu-item:active {
  transform: scale(0.99);
}

.mode-button.active {
  background: #f4f4f5;
  color: var(--ink);
  font-weight: 800;
}

.mode-button.active::before {
  background: var(--blue-soft);
  color: var(--brand);
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px 20px 20px;
}

.sidebar-footer-label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sidebar-footer-value {
  margin-top: 6px;
  color: var(--brand);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

.content-shell {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.mobile-header {
  display: none;
}

.main {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 36px;
}

.page-header {
  min-height: 80px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.72fr);
  align-items: start;
  gap: 18px;
  margin-bottom: 16px;
  padding-top: 5px;
}

.page-header h1 {
  color: var(--ink);
  font-family: "Spectral", Georgia, serif;
  font-size: 44px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0;
}

.page-header p {
  max-width: 680px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.shift-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.shift-pill {
  position: relative;
  min-height: 94px;
  padding: 18px 17px;
  background: transparent;
}

.shift-pill:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: var(--border);
}

.metric-label,
.panel-kicker,
.device-sub,
.order-meta,
.cart-sub,
.empty-text,
.receipt-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.metric-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.metric-value {
  margin-top: 14px;
  color: var(--ink);
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.shift-pill.strong .metric-value {
  color: var(--brand);
}

.serve-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.74fr) minmax(360px, 1.46fr) minmax(315px, 0.9fr);
  gap: 12px;
  align-items: start;
}

.panel,
.checkout-panel,
.hardware-log,
.receipt-sheet,
.kitchen-column,
.device-tile {
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.035);
}

.panel,
.checkout-panel {
  padding: 16px;
}

.checkout-panel {
  position: sticky;
  top: 20px;
}

.panel-head,
.cart-head,
.column-head,
.device-head,
.receipt-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.panel-title,
.cart-title,
.column-title,
.device-title,
.receipt-title {
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0;
}

.table-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.table-chip,
.category-chip,
.guest-chip,
.stepper-btn,
.icon-button {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
}

.table-chip {
  min-height: 52px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 800;
  transition:
    border-color 300ms var(--ease),
    background 300ms var(--ease),
    transform 300ms var(--ease);
}

.table-chip:hover,
.guest-chip:hover,
.category-chip:hover,
.stepper-btn:hover,
.icon-button:hover,
.secondary-button:hover,
.small-button:hover {
  border-color: rgba(47, 109, 246, 0.28);
  background: #fbfbfc;
}

.table-chip.active,
.category-chip.active,
.guest-chip.active {
  border-color: rgba(47, 109, 246, 0.25);
  background: var(--blue-soft);
  color: var(--brand);
}

.service-row,
.cart-row,
.active-order,
.log-row,
.receipt-row,
.receipt-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.service-row {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.stepper {
  display: flex;
  align-items: center;
  gap: 9px;
}

.stepper-btn,
.icon-button {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 800;
  transition:
    border-color 300ms var(--ease),
    background 300ms var(--ease),
    transform 300ms var(--ease);
}

.pax-count {
  min-width: 28px;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
}

.guest-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 14px;
}

.guest-chip {
  min-height: 46px;
  border-radius: 10px;
  padding: 0 14px;
  text-align: left;
  font-size: 15px;
  font-weight: 800;
  transition:
    border-color 300ms var(--ease),
    background 300ms var(--ease),
    transform 300ms var(--ease);
}

.active-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.active-order {
  align-items: flex-start;
  padding: 13px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.025);
}

.order-main {
  display: grid;
  gap: 5px;
}

.order-id {
  color: var(--ink);
  font-weight: 800;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid #e2e2e6;
  border-radius: 7px;
  background: var(--surface-muted);
  color: var(--muted-strong);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.status-pill.queued {
  border-color: #fde68a;
  background: var(--warn-soft);
  color: var(--warn);
}

.status-pill.preparing {
  border-color: rgba(47, 109, 246, 0.16);
  background: var(--blue-soft);
  color: var(--brand);
}

.status-pill.ready,
.status-pill.served,
.status-pill.paid {
  border-color: #bbf7d0;
  background: var(--green-soft);
  color: var(--green);
}

.menu-panel {
  min-width: 0;
}

.category-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 14px 0 2px;
  scrollbar-width: none;
}

.category-row::-webkit-scrollbar {
  display: none;
}

.category-chip {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  transition:
    border-color 300ms var(--ease),
    background 300ms var(--ease),
    transform 300ms var(--ease);
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.menu-item {
  min-height: 126px;
  padding: 15px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--surface);
  text-align: left;
  display: grid;
  gap: 12px;
  align-content: space-between;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.025);
  transition:
    transform 300ms var(--ease),
    background 300ms var(--ease),
    box-shadow 300ms var(--ease);
}

.menu-item:hover,
.menu-item:focus-visible {
  transform: translateY(-1px);
  background: #fbfbfc;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.075);
  outline: none;
}

.item-name {
  display: block;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.16;
  font-weight: 800;
}

.item-bottom {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.item-price {
  color: var(--brand);
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.item-tag {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
}

.add-dot {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  flex: 0 0 auto;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.cart-lines {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.cart-row {
  align-items: flex-start;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item-name {
  color: var(--ink);
  font-weight: 800;
}

.cart-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-pill {
  min-width: 31px;
  text-align: center;
  font-weight: 800;
}

.cart-total {
  display: grid;
  gap: 8px;
  padding: 12px 0 14px;
}

.total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted-strong);
  font-size: 14px;
  font-weight: 600;
}

.total-row.final {
  color: var(--ink);
  font-size: 24px;
  font-weight: 800;
}

.total-row.final strong {
  color: var(--brand);
}

.primary-button,
.secondary-button,
.danger-button,
.small-button {
  min-height: 40px;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  transition:
    background 300ms var(--ease),
    border-color 300ms var(--ease),
    transform 300ms var(--ease),
    opacity 300ms var(--ease);
}

.primary-button {
  width: 100%;
  color: #fff;
  background: var(--ink);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.primary-button:hover {
  background: #2a2c32;
}

.primary-button:disabled,
.secondary-button:disabled,
.danger-button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.secondary-button {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid #e3e3e7;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.035);
}

.danger-button {
  color: #991b1b;
  background: #fff5f5;
  border: 1px solid #fecaca;
}

.small-button {
  min-height: 34px;
  padding: 0 11px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid #e3e3e7;
}

.empty-state {
  min-height: 132px;
  display: grid;
  place-items: center;
  padding: 22px;
  border: 1px solid #dfe0e5;
  border-radius: 10px;
  text-align: center;
  background: var(--surface-muted);
}

.empty-title {
  margin-bottom: 5px;
  color: var(--muted-strong);
  font-weight: 800;
}

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

.kitchen-column {
  min-height: 68vh;
  padding: 15px;
}

.column-count {
  min-width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--surface-muted);
  color: var(--muted-strong);
  font-weight: 800;
}

.kitchen-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.kitchen-ticket {
  padding: 14px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.025);
}

.ticket-top,
.ticket-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ticket-items {
  display: grid;
  gap: 7px;
  margin: 13px 0;
  padding: 0;
  list-style: none;
}

.ticket-items li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #343840;
  font-size: 13px;
  font-weight: 600;
}

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

.device-tile {
  min-height: 172px;
  padding: 16px;
  display: grid;
  align-content: space-between;
  gap: 18px;
}

.device-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
}

.device-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hardware-log {
  margin-top: 12px;
  padding: 16px;
}

.log-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.log-row {
  padding: 11px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--surface);
}

.log-msg {
  color: var(--ink);
  font-weight: 800;
}

.log-time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.receipt-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(17, 19, 24, 0.28);
  backdrop-filter: blur(12px);
}

.receipt-sheet {
  width: min(430px, 100%);
  padding: 18px;
  background: var(--surface);
}

.receipt-lines {
  display: grid;
  gap: 9px;
  margin: 18px 0;
  padding: 14px 0;
  border-top: 1px dashed #d7d8dd;
  border-bottom: 1px dashed #d7d8dd;
}

.receipt-total-row {
  color: var(--ink);
  font-weight: 800;
  font-size: 20px;
}

.receipt-total-row strong {
  color: var(--brand);
}

.receipt-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

/* Simplified role UI */
.serve-grid {
  grid-template-columns: minmax(220px, 0.7fr) minmax(380px, 1.35fr) minmax(310px, 0.82fr);
  gap: 28px;
}

.panel,
.checkout-panel,
.kitchen-column,
.management-block,
.hardware-log,
.device-tile {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.panel,
.checkout-panel,
.management-block {
  padding: 0;
}

.checkout-panel {
  border-left: 1px solid var(--border);
  padding-left: 24px;
}

.panel-head,
.cart-head,
.column-head,
.device-head {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.table-grid,
.guest-stack {
  gap: 7px;
}

.menu-grid {
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 10px;
  border-top: 1px solid var(--border);
}

.menu-item {
  min-height: 88px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.menu-item:hover,
.menu-item:focus-visible {
  transform: none;
  background: transparent;
  box-shadow: none;
}

.item-bottom {
  min-width: 124px;
}

.active-order,
.kitchen-ticket,
.log-row {
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.empty-state {
  min-height: 112px;
  border: 0;
  border-radius: 10px;
  background: var(--surface-muted);
}

.kitchen-board {
  gap: 28px;
}

.kitchen-column {
  min-height: auto;
  padding: 0;
}

.hardware-grid {
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 14px;
}

.device-tile {
  min-height: auto;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.device-head {
  padding-bottom: 0;
  border-bottom: 0;
}

.device-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 12px;
}

.hardware-log {
  margin-top: 26px;
  padding: 0;
}

.role-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 30px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.role-link-card {
  display: grid;
  gap: 7px;
  color: var(--ink);
  text-decoration: none;
}

.role-link-card span {
  font-size: 18px;
  font-weight: 800;
}

.role-link-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.role-link-card.active span,
.role-link-card:hover span {
  color: var(--brand);
}

.management-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 34px;
  align-items: start;
}

.management-list {
  gap: 0;
}

.cashier-device,
.kitchen-device,
.management-device {
  min-height: 100dvh;
  background: var(--page);
}

.device-topbar {
  min-height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.58);
}

.device-brand-row {
  display: flex;
  align-items: center;
  gap: 34px;
  min-width: 0;
}

.device-eyebrow {
  color: var(--muted-strong);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.device-topbar h1 {
  margin-top: 2px;
  color: var(--ink);
  font-family: "Spectral", Georgia, serif;
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
}

.device-topbar span,
.device-time span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.device-time {
  text-align: right;
  white-space: nowrap;
}

.device-time strong {
  color: var(--ink);
  font-size: 22px;
  font-weight: 800;
}

.cashier-tablet-main {
  height: calc(100dvh - 94px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.34fr);
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas:
    "flow flow"
    "menu cart";
  gap: 18px 24px;
  padding: 18px 24px 22px;
  overflow: hidden;
}

.cashier-flow-strip {
  grid-area: flow;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.cashier-flow-step,
.cashier-step-label {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.cashier-flow-step > span,
.cashier-step-label > span,
.cashier-section-title span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--surface-muted);
  color: var(--muted-strong);
  font-size: 15px;
  font-weight: 800;
}

.cashier-flow-step.active > span,
.cashier-step-label > span,
.cashier-section-title span {
  background: var(--ink);
  color: #fff;
}

.cashier-flow-step strong,
.cashier-flow-step small,
.cashier-step-label strong,
.cashier-step-label small {
  display: block;
  min-width: 0;
}

.cashier-flow-step strong,
.cashier-step-label strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
}

.cashier-flow-step small,
.cashier-step-label small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cashier-menu-panel,
.cashier-cart-panel {
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
}

.cashier-menu-panel {
  grid-area: menu;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
}

.cashier-cart-panel {
  grid-area: cart;
  min-width: 0;
}

.cashier-setup-bar,
.cashier-order-card {
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.035);
}

.cashier-setup-bar {
  display: grid;
  grid-template-columns: minmax(150px, 0.25fr) minmax(280px, 1fr) minmax(260px, 0.42fr);
  gap: 18px;
  align-items: center;
  min-height: 112px;
  padding: 16px;
}

.cashier-table-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.cashier-table-strip::-webkit-scrollbar {
  display: none;
}

.cashier-table-strip .table-chip {
  min-width: 70px;
  min-height: 58px;
  flex: 0 0 auto;
  font-size: 21px;
}

.cashier-quick-controls {
  display: grid;
  gap: 10px;
}

.quick-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quick-control > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.cashier-device .guest-chip {
  min-height: 42px;
  padding: 0 10px;
  font-size: 12px;
  text-align: center;
}

.cashier-device .stepper-btn,
.cashier-device .icon-button {
  width: 42px;
  height: 42px;
}

.cashier-product-board {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.cashier-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 2px 14px;
  border-bottom: 1px solid var(--border);
}

.cashier-category-row {
  flex: 1;
  justify-content: flex-end;
  padding: 0;
}

.cashier-category-row .category-chip {
  min-height: 42px;
}

.category-chip span {
  margin-left: 6px;
  color: var(--muted);
}

.cashier-product-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(170px, 1fr));
  gap: 12px;
  overflow: auto;
  padding: 14px 2px 4px;
  scrollbar-width: thin;
}

.cashier-product-card {
  min-height: 218px;
  display: grid;
  grid-template-rows: 104px minmax(58px, auto) auto;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: #fff;
  text-align: left;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.035);
  transition:
    border-color 220ms var(--ease),
    box-shadow 220ms var(--ease),
    transform 220ms var(--ease);
}

.cashier-product-card:hover,
.cashier-product-card:focus-visible {
  border-color: rgba(47, 109, 246, 0.28);
  box-shadow: 0 10px 24px rgba(17, 19, 24, 0.08);
  outline: none;
}

.cashier-product-card:active {
  transform: scale(0.99);
}

.product-visual {
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #f1f1f2;
  color: var(--ink);
}

.product-visual.grill {
  background: #fff1e7;
  color: #8a3a10;
}

.product-visual.kitchen {
  background: var(--blue-soft);
  color: var(--brand);
}

.product-visual.side {
  background: var(--green-soft);
  color: var(--green);
}

.product-visual.drink {
  background: #eef0f3;
  color: #343840;
}

.product-visual span {
  font-size: 32px;
  font-weight: 800;
}

.product-copy strong,
.product-copy small,
.product-bottom span {
  display: block;
}

.product-copy strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.15;
}

.product-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.product-bottom > span:first-child {
  color: var(--brand);
  font-size: 20px;
  font-weight: 800;
}

.cashier-device .cart-title,
.cashier-device .panel-title {
  font-size: 24px;
}

.cashier-order-card {
  padding: 16px;
}

.cashier-order-head {
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.cashier-cart-lines {
  min-height: 184px;
  max-height: 34vh;
  overflow: auto;
  padding-right: 2px;
  scrollbar-width: thin;
}

.cashier-cart-total {
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.cashier-send-button {
  min-height: 58px;
  font-size: 16px;
}

.open-orders-panel {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.open-orders-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 4px;
}

.open-orders-head p,
.open-orders-head strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
}

.open-orders-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.cashier-device .active-list {
  gap: 0;
}

.cashier-device .active-order {
  padding: 12px 0;
}

.kitchen-device {
  background: #f5f6f7;
}

.kitchen-display-main {
  min-height: calc(100dvh - 94px);
  display: grid;
  grid-template-columns: minmax(390px, 1.1fr) minmax(310px, 0.8fr) minmax(270px, 0.55fr);
  gap: 26px;
  padding: 24px;
}

.kitchen-focus,
.receipt-output-panel,
.kitchen-rail {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
}

.kitchen-focus {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 24px;
}

.kitchen-focus-head,
.receipt-output-head,
.kitchen-rail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.kitchen-focus h2 {
  margin-top: 6px;
  color: var(--ink);
  font-size: 54px;
  font-weight: 800;
  line-height: 1;
}

.kitchen-big-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 0;
  color: var(--muted-strong);
  font-size: 14px;
  font-weight: 800;
}

.kitchen-big-meta span {
  padding-right: 12px;
  border-right: 1px solid var(--border);
}

.kitchen-big-meta span:last-child {
  border-right: 0;
}

.kitchen-big-items {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
}

.kitchen-big-items li {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 78px;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
  font-size: 27px;
  font-weight: 800;
}

.kitchen-big-items strong {
  color: var(--brand);
  font-size: 32px;
}

.kitchen-big-actions {
  margin-top: auto;
  padding-top: 24px;
}

.kitchen-big-actions .small-button,
.kds-ticket .small-button {
  min-height: 48px;
  min-width: 112px;
  background: var(--ink);
  color: #fff;
}

.kitchen-queue-rails {
  display: grid;
  gap: 14px;
  align-content: start;
}

.kitchen-rail {
  padding: 16px;
}

.kitchen-rail-head span,
.receipt-output-head p {
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
}

.kitchen-rail-head strong {
  color: var(--brand);
  font-size: 24px;
  font-weight: 800;
}

.kitchen-rail-list {
  display: grid;
  gap: 0;
}

.kds-ticket {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.kds-ticket:last-child {
  border-bottom: 0;
}

.kds-ticket strong,
.kds-ticket span {
  display: block;
}

.kds-ticket strong {
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
}

.kds-ticket span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.rail-empty {
  padding: 22px 0 6px;
  color: var(--muted);
  font-weight: 800;
}

.receipt-output-panel {
  padding: 16px;
}

.receipt-output-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.receipt-tape {
  margin-top: 18px;
  padding: 18px 15px;
  background: #fbfbfc;
  color: var(--ink);
  font-family: "Oxanium", "Inter", monospace;
}

.receipt-tape.empty {
  min-height: 180px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

.receipt-tape-title {
  font-size: 15px;
  font-weight: 800;
  text-align: center;
}

.receipt-tape-meta {
  margin: 8px 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #d7d8dd;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.receipt-tape-row,
.receipt-tape-total {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  font-size: 12px;
  font-weight: 700;
}

.receipt-tape-total {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px dashed #d7d8dd;
  font-size: 15px;
  font-weight: 800;
}

.receipt-tape .secondary-button {
  width: 100%;
  margin-top: 16px;
}

.management-desktop-main {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.management-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.management-metric {
  min-height: 118px;
  padding: 18px 20px;
  border-right: 1px solid var(--border);
}

.management-metric:last-child {
  border-right: 0;
}

.management-metric span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.management-metric strong {
  display: block;
  margin-top: 20px;
  color: var(--ink);
  font-size: 38px;
  font-weight: 800;
  line-height: 1;
}

.management-metric.strong strong {
  color: var(--brand);
}

.management-role-links {
  margin-bottom: 34px;
}

.management-command-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 38px;
  align-items: start;
}

.customer-app {
  min-height: 100dvh;
  background: var(--page);
}

.customer-main {
  width: min(440px, 100%);
  margin: 0 auto;
  padding: 18px 14px 34px;
}

.customer-hero {
  min-height: 122px;
  display: grid;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.customer-hero h1 {
  margin-top: 8px;
  color: var(--ink);
  font-family: "Spectral", Georgia, serif;
  font-size: 48px;
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: 0;
}

.customer-hero p:not(.customer-eyebrow) {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.customer-eyebrow,
.customer-section-head span {
  color: var(--muted-strong);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.customer-confirm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.customer-confirm strong,
.customer-confirm span {
  display: block;
}

.customer-confirm strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
}

.customer-confirm div span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.customer-table-zone {
  padding: 18px 0 8px;
}

.customer-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.customer-section-head p {
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
}

.customer-table-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 13px 0 4px;
  scrollbar-width: none;
}

.customer-table-row::-webkit-scrollbar {
  display: none;
}

.customer-table-row .table-chip {
  min-width: 62px;
  flex: 0 0 auto;
}

.customer-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
  padding-top: 14px;
}

.customer-category-row {
  padding-top: 13px;
}

.customer-menu-grid {
  margin-top: 8px;
}

.customer-order-zone {
  position: static;
  border-left: 0;
  padding-left: 0;
}

.customer-order-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

@media (max-width: 1180px) {
  .dashboard-sidebar {
    display: none;
  }

  .mobile-header {
    display: grid;
    gap: 14px;
    padding: 13px 12px 11px;
    border-bottom: 1px solid var(--border);
    background: var(--page);
  }

  .mobile-mode-switch {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 4px;
    border: 1px solid #dedee2;
    border-radius: 18px;
    background: #e9e6df;
  }

  .mobile-mode-switch .mode-button {
    justify-content: center;
    min-height: 40px;
    padding: 0 8px;
    border-radius: 14px;
    font-size: 12px;
  }

  .mobile-mode-switch .mode-button::before {
    display: none;
  }

  .main {
    padding: 20px 12px 28px;
  }

  .page-header {
    grid-template-columns: 1fr;
  }

  .serve-grid,
  .kitchen-board,
  .hardware-grid,
  .management-grid,
  .role-links,
  .customer-layout {
    grid-template-columns: 1fr;
  }

  .checkout-panel,
  .customer-order-zone {
    position: static;
    border-left: 0;
    padding-left: 0;
  }

  .kitchen-column {
    min-height: auto;
  }

  .kitchen-display-main,
  .management-command-grid {
    grid-template-columns: 1fr;
  }

  .receipt-output-panel {
    order: -1;
  }

  .management-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cashier-tablet-main {
    height: auto;
    min-height: calc(100dvh - 94px);
    grid-template-columns: 1fr;
    grid-template-areas:
      "flow"
      "menu"
      "cart";
    overflow: visible;
  }

  .cashier-flow-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cashier-cart-panel {
    border-left: 0;
    padding-left: 0;
  }

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

  .cashier-product-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    overflow: visible;
  }
}

@media (max-width: 720px) {
  .page-header h1 {
    font-size: 38px;
  }

  .page-header p {
    font-size: 13px;
  }

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

  .shift-pill {
    min-height: 78px;
    padding: 13px 10px;
  }

  .metric-label {
    font-size: 9px;
    letter-spacing: 0.08em;
  }

  .metric-value {
    margin-top: 12px;
    font-size: 20px;
  }

  .table-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .table-chip {
    min-height: 46px;
  }

  .menu-grid {
    grid-template-columns: 1fr;
  }

  .customer-main {
    padding: 18px 12px 28px;
  }

  .customer-hero {
    min-height: 128px;
  }

  .customer-hero h1 {
    font-size: 46px;
  }

  .customer-order-zone {
    padding-top: 2px;
  }

  .device-topbar {
    display: grid;
    padding: 14px 12px;
  }

  .device-brand-row {
    gap: 16px;
  }

  .device-topbar h1 {
    font-size: 34px;
  }

  .device-time {
    text-align: left;
  }

  .cashier-tablet-main,
  .kitchen-display-main,
  .management-desktop-main {
    height: auto;
    min-height: calc(100dvh - 94px);
    grid-template-columns: 1fr;
    padding: 14px 12px 28px;
    overflow: visible;
  }

  .cashier-tablet-main {
    grid-template-areas:
      "flow"
      "menu"
      "cart";
  }

  .cashier-flow-strip {
    grid-template-columns: 1fr;
  }

  .cashier-cart-panel {
    border-left: 0;
    padding-left: 0;
  }

  .cashier-product-grid {
    grid-template-columns: 1fr;
  }

  .cashier-board-head {
    display: grid;
  }

  .cashier-category-row {
    justify-content: flex-start;
  }

  .management-metrics {
    grid-template-columns: 1fr;
  }

  .management-metric {
    min-height: 86px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .management-metric strong {
    margin-top: 10px;
    font-size: 30px;
  }

  .kitchen-focus h2 {
    font-size: 42px;
  }

  .kitchen-big-items li {
    grid-template-columns: 64px minmax(0, 1fr);
    min-height: 64px;
    font-size: 21px;
  }

  .receipt-actions {
    grid-template-columns: 1fr;
  }
}
