:root {
  --bg: #0d0d0d;
  --card: #141414;
  --border: #262626;
  --text: #f5f5f5;
  --muted: #a8a8a8;
  --accent: #0095f6;
  --danger: #ed4956;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  padding-bottom: 50px;
}

.toolbar {
  display: none;
  background: #fff3cd;
  color: #333;
  padding: 10px 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  font-size: 0.85rem;
  align-items: center;
  justify-content: space-between;
}
.toolbar button {
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
}

.cart-floating-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #000000;
  color: #fff;
  border: 1px solid #ffe082;
  padding: 12px 20px;
  border-radius: 30px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 6px;
}
#cart-badge {
  background: #fff;
  color: #000;
  padding: 2px 6px;
  border-radius: 50%;
  font-size: 0.75rem;
}

.profile-card {
  display: flex;
  padding: 20px 16px;
  gap: 20px;
  align-items: center;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  max-width: 800px;
  margin: 0 auto 16px auto;
}
.avatar-box { width: 75px; height: 75px; flex-shrink: 0; position: relative; }
@media(min-width:768px){ .avatar-box { width: 95px; height: 95px; } }
.avatar-box img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.is-edit .avatar-box { cursor: pointer; }
.is-edit .avatar-box:hover #avatar-overlay { display: flex !important; }

.upload-box {
  display: none;
  background: var(--card);
  border: 2px dashed var(--accent);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  max-width: 600px;
  margin: 0 auto 20px auto;
}
.is-edit .upload-box { display: block; }
.upload-box input, .upload-box textarea {
  width: 100%; padding: 8px; margin: 6px 0;
  border: 1px solid var(--border); border-radius: 6px;
  background: #222; color: #fff;
}

.category-section {
  max-width: 800px;
  margin: 0 auto 24px auto;
  padding: 0 10px;
}
.category-title {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 12px;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 4px;
}

.menu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media(min-width: 768px) {
  .menu-grid { grid-template-columns: repeat(2, 1fr); }
}

.menu-item-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s;
}
.menu-item-card:hover { transform: scale(1.01); }
.menu-item-img {
  width: 110px;
  height: 110px;
  object-fit: cover;
  flex-shrink: 0;
}
.menu-item-info {
  padding: 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.menu-item-name { font-weight: bold; font-size: 0.95rem; margin-bottom: 2px; }
.menu-item-desc { font-size: 0.75rem; color: var(--muted); margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.menu-item-footer { display: flex; justify-content: space-between; align-items: center; }
.menu-item-price { font-weight: bold; color: var(--accent); font-size: 0.9rem; }

.add-btn {
  background: #222;
  color: #fff;
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
  cursor: pointer;
}
.add-btn:hover { background: var(--accent); }

.del-btn {
  display: none;
  position: absolute;
  top: 4px; right: 4px;
  background: var(--danger);
  color: #fff; border: 0;
  width: 22px; height: 22px;
  border-radius: 50%; font-weight: bold;
  cursor: pointer; z-index: 10;
}
.is-edit .del-btn { display: flex; align-items: center; justify-content: center; }
.is-edit .editable-txt { outline: 1px dashed var(--accent); }

#email-box { display: none !important; }
.is-edit #email-box { display: inline !important; }

/* Modals */
.cart-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.8);
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.cart-modal.open { display: flex; }
.cart-content {
  background: var(--card);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 450px;
  border-radius: 12px;
  padding: 20px;
}