:root {
  color-scheme: light;
  --ink: #17211b;
  --muted: #5f6b63;
  --line: #d9dfd8;
  --surface: #f8faf6;
  --panel: #ffffff;
  --accent: #2f8f5b;
  --accent-2: #e7b43f;
  --danger: #c84d3f;
  --closed: #77756e;
  --shadow: 0 18px 45px rgba(23, 33, 27, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--surface);
  color: var(--ink);
}

button,
select {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(248, 250, 246, 0.92);
  backdrop-filter: blur(18px);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(1.45rem, 3vw, 2.3rem);
}

h2 {
  font-size: 1.2rem;
}

.session-pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 24px clamp(18px, 4vw, 48px) 20px;
}

.menu-workspace,
.order-panel,
.admin-mirror {
  min-width: 0;
}

.status-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.status-band strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
}

.status-band p {
  margin: 5px 0 0;
  color: var(--muted);
}

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 5px rgba(231, 180, 63, 0.18);
}

.status-band.open .status-dot {
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(47, 143, 91, 0.16);
}

.status-band.closed .status-dot {
  background: var(--closed);
  box-shadow: 0 0 0 5px rgba(119, 117, 110, 0.16);
}

.status-band.blocked .status-dot {
  background: var(--danger);
  box-shadow: 0 0 0 5px rgba(200, 77, 63, 0.16);
}

.ghost-button,
.primary-button,
.switch-control {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.ghost-button {
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
}

.order-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 18px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.order-steps article {
  padding: 16px;
  background: var(--panel);
}

.order-steps span {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  margin-bottom: 10px;
  border-radius: 50%;
  background: #e4efe7;
  color: var(--accent);
  font-weight: 900;
}

.order-steps strong {
  display: block;
}

.order-steps p,
.panel-copy,
.order-note {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.category-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 16px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.tab-button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
  white-space: nowrap;
}

.tab-button.active {
  border-color: var(--accent);
  background: #e4efe7;
  color: var(--accent);
}

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

.menu-item {
  position: relative;
  display: flex;
  min-height: 360px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.item-photo {
  min-height: 150px;
  background-position: center;
  background-size: cover;
}

.photo-boneless {
  background-image: linear-gradient(135deg, rgba(23, 33, 27, 0.1), rgba(23, 33, 27, 0.28)), url("./assets/boneless.png");
}

.photo-papas {
  background-image: linear-gradient(135deg, rgba(23, 33, 27, 0.06), rgba(23, 33, 27, 0.15)), url("./assets/papas.png");
}

.photo-chili {
  background-image: linear-gradient(135deg, rgba(23, 33, 27, 0.07), rgba(23, 33, 27, 0.16)), url("./assets/nachos.png");
}

.photo-bebida {
  background-image: linear-gradient(135deg, rgba(23, 33, 27, 0.05), rgba(23, 33, 27, 0.16)), url("./assets/bebidas.png");
}

.photo-cerveza {
  background-image: linear-gradient(135deg, rgba(23, 33, 27, 0.05), rgba(23, 33, 27, 0.16)), url("./assets/cerveza.png");
}

.photo-waffle {
  background-image: linear-gradient(135deg, rgba(23, 33, 27, 0.05), rgba(23, 33, 27, 0.16)), url("./assets/waffle.png");
}

.item-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 14px;
}

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

.item-title {
  margin: 0;
  font-size: 1.05rem;
}

.price {
  font-weight: 900;
  white-space: nowrap;
}

.item-desc {
  margin: 8px 0 12px;
  color: var(--muted);
  line-height: 1.4;
}

.item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.badge {
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef2ee;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.badge.available {
  background: #e2f3e7;
  color: var(--accent);
}

.badge.low_stock {
  background: #fff1c8;
  color: #856000;
}

.badge.sold_out,
.badge.hidden,
.badge.site_closed,
.badge.view_only {
  background: #eee9e5;
  color: var(--closed);
}

.add-button {
  min-height: 42px;
  margin-top: 14px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  cursor: pointer;
  font-weight: 900;
}

.add-button:disabled {
  cursor: not-allowed;
  background: #c9cec8;
  color: #69736c;
}

.order-panel {
  position: sticky;
  top: 96px;
  align-self: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.field-label {
  display: block;
  margin: 18px 0 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
}

.cart-list {
  display: grid;
  gap: 8px;
  min-height: 86px;
  margin: 18px 0;
}

.cart-empty {
  display: grid;
  min-height: 86px;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.cart-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.cart-row p {
  margin: 3px 0 0;
  color: var(--muted);
}

.qty-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.qty-controls button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  font-weight: 900;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  margin: 16px 0;
  padding-top: 14px;
  border-top: 2px solid var(--ink);
}

.cart-total strong {
  font-size: 1.35rem;
}

.primary-button {
  width: 100%;
  background: var(--accent);
  color: white;
  font-weight: 900;
}

.primary-button:disabled {
  cursor: not-allowed;
  background: #b8c5bb;
}

.admin-mirror {
  width: min(1440px, 100%);
  margin: 0 auto 38px;
  padding: 0 clamp(18px, 4vw, 48px);
}

.admin-mirror > div:first-child {
  margin: 10px 0 12px;
}

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

.switch-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  text-align: left;
}

.switch-control span {
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 800;
}

.switch-control strong {
  color: var(--accent);
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .order-panel {
    position: static;
  }

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

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

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .session-pill {
    width: 100%;
    justify-content: center;
  }

  .status-band,
  .order-steps {
    grid-template-columns: 1fr;
  }

  .status-band {
    align-items: stretch;
    flex-direction: column;
  }

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

  .menu-item {
    min-height: 330px;
  }
}
