:root {
  --green: #14532d;
  --green-2: #166534;
  --green-soft: #e9f6ef;
  --paper: #f5f7f8;
  --card: #ffffff;
  --ink: #172033;
  --muted: #667085;
  --line: #dde3ea;
  --accent: #f97316;
  --danger: #dc2626;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: Calibri, Arial, sans-serif;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

input,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--green);
}

label span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
}

h2 {
  font-size: 20px;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
  background: linear-gradient(135deg, #e9f6ef, #f8fafc);
}

.login-card {
  width: min(420px, 100%);
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 24px;
  box-shadow: 0 18px 60px rgba(15, 63, 37, 0.14);
}

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

.login-brand {
  margin-bottom: 4px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-weight: 900;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.login-card button,
.primary {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  padding: 0 16px;
  font-weight: 800;
}

.inline-message {
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fef2f2;
  color: #991b1b;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 700;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: var(--green);
  color: #fff;
}

.eyebrow {
  color: #bbf7d0;
  font-size: 13px;
  font-weight: 800;
}

.dark {
  color: var(--green);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.session-chip {
  display: grid;
  justify-items: end;
  line-height: 1.15;
}

.session-chip strong {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.session-chip span {
  color: #dcfce7;
  font-size: 12px;
  font-weight: 800;
}

.shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 14px 14px 96px;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-bottom: 12px;
}

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

.ghost {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  padding: 0 12px;
  font-weight: 800;
}

.ghost.light {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.icon-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--green);
  font-size: 24px;
  font-weight: 800;
}

.table-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px;
}

.section-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 12px;
}

.section-tabs button {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
  text-align: left;
}

.section-tabs button.active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.section-tabs strong {
  font-size: 17px;
}

.section-tabs span {
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 14px;
  font-weight: 900;
}

.section-tabs button.active span {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.table-card {
  min-height: 132px;
  display: grid;
  align-content: space-between;
  justify-items: start;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 14px;
  text-align: left;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.table-card span,
.table-card small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.table-card strong {
  font-size: 28px;
  line-height: 1;
}

.table-card em {
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.status-open {
  background: #dcfce7;
  color: #166534;
}

.status-busy {
  background: #ffedd5;
  color: #c2410c;
}

.status-reserved {
  background: #dbeafe;
  color: #1d4ed8;
}

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

.category-tabs button {
  flex: 0 0 auto;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
  font-weight: 800;
}

.category-tabs button.active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.product-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
}

.product-image {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #dcfce7, #ffedd5);
  color: var(--green);
  font-size: 38px;
  font-weight: 800;
}

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

.product-body {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.product-name {
  min-height: 42px;
  font-weight: 800;
  line-height: 1.15;
}

.product-remark {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
}

.product-price {
  color: var(--green);
  font-weight: 900;
}

.product-card button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--green-2);
  color: #fff;
  font-weight: 800;
}

.checkout-page {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.checkout-header,
.cart-total,
.cart-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.checkout-header {
  justify-content: flex-start;
  margin-bottom: 14px;
}

.cart-items {
  display: grid;
  gap: 10px;
  min-height: 64px;
  padding: 12px 0;
}

.cart-line {
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.cart-line-main {
  min-width: 0;
}

.cart-name {
  font-weight: 900;
}

.cart-meta,
.cart-addons,
.cart-remark {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.cart-addons {
  margin-top: 4px;
  color: #36553f;
}

.cart-remark {
  margin-top: 4px;
  font-style: italic;
}

.cart-controls {
  display: grid;
  grid-template-columns: 36px 34px 36px;
  align-items: center;
  justify-items: center;
  gap: 4px;
}

.cart-controls button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--green);
  font-size: 20px;
  font-weight: 900;
}

.customer-form {
  display: grid;
  gap: 10px;
  margin: 8px 0 14px;
}

.cart-total {
  border-top: 1px solid var(--line);
  padding: 14px 0;
  font-size: 18px;
}

.cart-total strong {
  color: var(--green);
}

.cart-button,
.confirm-button {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  padding: 0 16px;
  font-weight: 900;
  box-shadow: 0 18px 50px rgba(20, 83, 45, 0.28);
}

.confirm-button {
  justify-content: center;
  background: var(--accent);
}

.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.56);
  padding: 18px;
}

.dialog-box {
  width: min(440px, 100%);
  display: grid;
  gap: 14px;
  border-radius: 8px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.26);
}

.addon-box {
  width: min(560px, 100%);
}

.pax-box {
  width: min(620px, 100%);
  padding: 26px;
}

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

.pax-grid button {
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.05);
}

.pax-grid button:hover {
  border-color: var(--green);
  color: var(--green);
}

.dialog-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dialog-title-row p,
.dialog-box p {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.single-action {
  display: flex;
  justify-content: flex-end;
}

.single-action .ghost {
  border-color: transparent;
  color: #1d4ed8;
}

.addon-groups {
  display: grid;
  gap: 12px;
  max-height: min(52vh, 520px);
  overflow-y: auto;
  padding-right: 2px;
}

.addon-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.addon-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.addon-group-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.addon-options {
  display: grid;
  gap: 8px;
}

.addon-option {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #edf0f3;
  border-radius: 8px;
  padding: 9px;
}

.addon-option input {
  width: 18px;
  min-height: 18px;
}

.addon-option span {
  margin: 0;
}

.addon-option span strong,
.addon-option span small {
  display: block;
}

.addon-option span small {
  color: var(--muted);
  font-size: 12px;
}

.addon-option em {
  color: var(--green);
  font-style: normal;
  font-weight: 900;
}

.empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  padding: 22px;
  text-align: center;
  font-weight: 800;
}

.message {
  position: fixed;
  left: 50%;
  bottom: 84px;
  z-index: 30;
  transform: translateX(-50%);
  width: min(420px, calc(100% - 28px));
  border-radius: 8px;
  background: #111827;
  color: #fff;
  padding: 12px 14px;
  text-align: center;
  font-weight: 800;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
}

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

  .top-actions {
    align-items: flex-end;
    flex-direction: column;
  }

  .session-chip strong {
    max-width: 130px;
  }

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

  .section-tabs {
    grid-template-columns: 1fr;
  }

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

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

  .pax-grid button {
    min-height: 68px;
  }

  .product-name {
    min-height: 52px;
  }

  .cart-line {
    align-items: flex-start;
  }
}
