:root {
  --bg: #0f1115;
  --card: #1a1d24;
  --card-2: #21252f;
  --text: #f2f3f5;
  --muted: #9aa0ac;
  --accent: #e6b800;
  --accent-2: #ffd54a;
  --good: #3ddc84;
  --warn: #ff9f43;
  --danger: #ff5c5c;
  --border: #2b2f3a;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 16px 120px;
}

header.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(15,17,21,0.92);
  backdrop-filter: blur(6px);
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header.top h1 {
  font-size: 17px;
  margin: 0;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.table-badge {
  background: var(--accent);
  color: #1a1200;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 14px;
  white-space: nowrap;
}

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 16px 4px;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  flex: none;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.tab-btn.active {
  background: var(--accent);
  color: #1a1200;
  border-color: var(--accent);
}

.menu-list {
  padding: 4px 16px;
}

.item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
}

.item-info h3 {
  margin: 0 0 4px;
  font-size: 15px;
}
.item-info .price {
  color: var(--muted);
  font-size: 13px;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qty-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card-2);
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.qty-btn:active { transform: scale(0.94); }

.qty-num {
  min-width: 20px;
  text-align: center;
  font-weight: 700;
}

.add-btn {
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: #1a1200;
  font-weight: 700;
  padding: 9px 14px;
  cursor: pointer;
}

.subcategory-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-2);
  margin: 14px 4px 8px;
}

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

.modifier-row {
  margin: -4px 0 10px;
  padding: 0 2px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.modifier-group-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 5px;
}
.modifier-select {
  width: 100%;
  padding: 9px 11px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--card-2);
  color: var(--text);
  font-size: 13px;
}
.modifier-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.modifier-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
}
.modifier-chip input { accent-color: var(--accent); }

.note-row {
  margin: -4px 0 10px;
  padding: 0 2px;
}
.note-row .note-input {
  width: 100%;
  padding: 9px 11px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--card-2);
  color: var(--text);
  font-size: 13px;
}
.note-row .note-input::placeholder { color: var(--muted); }

.note-preview {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 400;
}

.section-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 18px 16px 8px;
}

.cart-fab {
  background: var(--accent);
  color: #1a1200;
  border: none;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(230,184,0,0.3);
  white-space: nowrap;
  flex: none;
}
.cart-fab .cart-fab-icon { font-size: 14px; line-height: 1; }
.cart-fab .cart-fab-count {
  background: rgba(26,18,0,0.18);
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 11px;
}
.cart-fab .cart-fab-total { white-space: nowrap; }

.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: none;
  z-index: 20;
}
.sheet-backdrop.open { display: block; }

.sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--card);
  border-radius: 20px 20px 0 0;
  padding: 18px 16px 26px;
  max-height: 82vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.25s ease;
  z-index: 21;
}
.sheet.open { transform: translateY(0); }

.sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 999px;
  margin: 0 auto 14px;
}

.sheet h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.cart-row, .order-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.cart-row:last-child, .order-row:last-child { border-bottom: none; }

.cart-row .name { flex: 1; }
.cart-row .remove {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 13px;
  cursor: pointer;
  margin-left: 10px;
}

.total-row {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  font-size: 17px;
  padding: 14px 0 4px;
}

.primary-btn {
  width: 100%;
  background: var(--accent);
  color: #1a1200;
  border: none;
  border-radius: 12px;
  padding: 15px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  margin-top: 10px;
}
.primary-btn:disabled { opacity: 0.5; }

.secondary-btn {
  width: 100%;
  background: var(--card-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 15px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
}

.status-chip {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.status-new { background: #3a3520; color: var(--accent-2); }
.status-preparing { background: #33291a; color: var(--warn); }
.status-ready { background: #17332a; color: var(--good); }
.status-served { background: #24262c; color: var(--muted); }

.pay-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.pay-option {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  cursor: pointer;
}
.pay-option .icon { font-size: 22px; }
.pay-option .label { font-weight: 700; font-size: 15px; }
.pay-option .desc { font-size: 12px; color: var(--muted); }

.split-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.split-line:last-child { border-bottom: none; }
.split-line .split-line-info { flex: 1; min-width: 0; }
.split-line .split-line-name { font-size: 14px; }
.split-line .split-line-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.split-line .split-line-none { font-size: 12px; color: var(--muted); }

.empty-hint {
  text-align: center;
  color: var(--muted);
  padding: 40px 16px;
  font-size: 14px;
}

.toast {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--good);
  color: #06210f;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, top 0.2s ease;
}
.toast.show { opacity: 1; top: 22px; }

a { color: var(--accent-2); }
