:root {
  --primary: #d97706;
  --primary-dark: #b45309;
  --bg: #0f172a;
  --card-bg: #1e293b;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --border: #334155;
  --success: #16a34a;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Cairo', sans-serif;
}

body {
  background-color: var(--bg);
  color: var(--text);
  padding-bottom: 90px;
}

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

.header {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 50;
}

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

.brand h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
}

.brand p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

.action-btn {
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transition: 0.2s;
}

.action-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.table-bar {
  margin-top: 16px;
  background: var(--card-bg);
  padding: 12px 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--border);
}

.table-bar label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.table-bar input {
  width: 110px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  text-align: center;
}

.categories {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 16px 0;
  scrollbar-width: none;
}

.cat-btn {
  background: var(--card-bg);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 600;
  transition: 0.2s;
}

.cat-btn.active, .cat-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.menu-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.menu-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  background: #0b1120;
}

.card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 10px;
}

.price {
  font-weight: 800;
  color: var(--primary);
  font-size: 1.05rem;
}

.add-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 7px 14px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
}

.add-btn:hover {
  background: var(--primary-dark);
}

.floating-cart {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(217, 119, 6, 0.4);
  z-index: 60;
}

.badge {
  background: #fff;
  color: var(--primary-dark);
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.85rem;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal.open {
  display: flex;
}

.modal-content {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.6rem;
  cursor: pointer;
}

.modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

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

.qty-btn {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
}

.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order-notes input {
  width: 100%;
  padding: 9px 12px;
  margin-bottom: 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}

.total-row {
  display: flex;
  justify-content: space-between;
  font-size: 1.15rem;
}

.whatsapp-btn {
  background: var(--success);
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #10b981;
  color: #fff;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
  z-index: 200;
}

.toast.show {
  opacity: 1;
}

.footer {
  text-align: center;
  padding: 24px 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

.footer strong {
  color: var(--primary);
}
