:root {
  --brand-brown: #6b3a1f;
  --brand-red: #c0392b;
  --brand-yellow: #f5b642;
  --brand-cream: #fff8ee;
}

body {
  background-color: var(--brand-cream);
  font-family: "Segoe UI", "Sarabun", Tahoma, sans-serif;
  padding-bottom: 90px;
}

.app-navbar {
  background: linear-gradient(90deg, var(--brand-brown), var(--brand-red));
}

.app-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 12px 24px;
}

/* หมวดหมู่เมนู */
.category-tabs .nav-link {
  border-radius: 999px;
  font-weight: 600;
  color: var(--brand-brown);
  border: 2px solid var(--brand-brown);
  margin-right: 8px;
  padding: 8px 20px;
}
.category-tabs .nav-link.active {
  background-color: var(--brand-red);
  border-color: var(--brand-red);
  color: #fff;
}

.order-type-toggle .btn {
  font-weight: 600;
}

/* การ์ดสินค้า */
.product-card {
  border: none;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  overflow: hidden;
  margin-bottom: 14px;
}
.product-card .card-body {
  padding: 14px 16px;
}
.product-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brand-brown);
}
.product-desc {
  font-size: .85rem;
  color: #888;
}
.product-price {
  font-weight: 700;
  color: var(--brand-red);
  font-size: 1.05rem;
}
.takeaway-badge {
  font-size: .7rem;
}

.btn-add-cart {
  background-color: var(--brand-yellow);
  border-color: var(--brand-yellow);
  color: var(--brand-brown);
  font-weight: 700;
  border-radius: 999px;
  padding: 8px 18px;
}
.btn-add-cart:hover {
  background-color: #e0a02f;
  color: #3d2210;
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.qty-stepper button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--brand-brown);
  background: #fff;
  color: var(--brand-brown);
  font-size: 1.2rem;
  line-height: 1;
}
.qty-stepper .qty-value {
  min-width: 24px;
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
}

/* แถบตะกร้าล่างจอ */
.cart-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--brand-brown);
  color: #fff;
  padding: 12px 18px;
  z-index: 1040;
  box-shadow: 0 -3px 10px rgba(0,0,0,.2);
}
.cart-bar .btn-view-cart {
  background: var(--brand-yellow);
  color: var(--brand-brown);
  font-weight: 700;
  border-radius: 999px;
}

.option-group-label {
  font-weight: 700;
  color: var(--brand-brown);
  margin-bottom: 6px;
}

.btn-check + .btn-outline-brand {
  border-radius: 999px;
  border: 2px solid var(--brand-brown);
  color: var(--brand-brown);
  font-weight: 600;
}
.btn-check:checked + .btn-outline-brand {
  background-color: var(--brand-red);
  border-color: var(--brand-red);
  color: #fff;
}

.status-badge {
  font-size: .95rem;
  padding: 8px 14px;
}

.cart-item-row {
  border-bottom: 1px solid #eee;
  padding: 10px 0;
}

/* การ์ดสถานะโต๊ะ */
.table-status-legend { color: #777; }
.legend-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-right: 4px;
}
.legend-dot.free { background: #2fa84f; }
.legend-dot.busy { background: #c0392b; }

.table-card {
  border: 2px solid #e2d9cc;
  border-radius: 12px;
  background: #fff;
  padding: 10px 4px;
  text-align: center;
  cursor: pointer;
  transition: transform .1s ease, border-color .15s ease;
}
.table-card:active { transform: scale(.96); }
.table-card-no { font-weight: 800; font-size: 1.15rem; color: var(--brand-brown); }
.table-card-status { font-size: .75rem; font-weight: 700; margin-top: 2px; }

.table-card.free .table-card-status { color: #2fa84f; }
.table-card.busy { background: #fdf1ee; border-color: #eabdb4; }
.table-card.busy .table-card-status { color: #c0392b; }

.table-card.selected {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(192,57,43,.2);
}
.table-card.selected .table-card-no { color: var(--brand-red); }

.my-order-card {
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.empty-state {
  text-align: center;
  color: #999;
  padding: 40px 10px;
}
