body {
  background: #0f172a;
  color: #e2e8f0;
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
header {
  background: #1e293b;
  color: #f8fafc;
  text-align: center;
  padding: 1rem;
}
nav { margin-top: .5rem; }
nav a {
  color: #93c5fd;
  margin: 0 .5rem;
  text-decoration: none;
  font-weight: 500;
}
nav a.active { color: #fff; text-decoration: underline; }
main {
  flex: 1;
  width: 90%;
  max-width: 800px;
  margin: 20px auto;
  background: #1e293b;
  padding: 20px;
  border-radius: 12px;
}
textarea, input {
  width: 100%;
  padding: 10px;
  background: #0f172a;
  color: #e2e8f0;
  border: 1px solid #334155;
  border-radius: 8px;
  margin-top: 10px;
}
.meal-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 14px;
  border-radius: 12px;
}
.meal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.meal-name {
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text);
  width: 80%;
}
.meal-type {
  background: var(--muted);
  color: var(--subtext);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
}
.meal-section label {
  color: var(--subtext);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.meal-section textarea {
  width: 100%;
  background: var(--muted);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px;
  resize: vertical;
  min-height: 50px;
}
.meal-actions {
  display: flex;
  gap: 8px;
}
.btn-save, .btn-delete {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
}
.btn-save { background: var(--accent); color: white; }
.btn-delete { background: var(--err); color: white; }

.cart-row {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--muted);
  border: 1px solid var(--border);
  padding: 10px;
  border-radius: 10px;
  margin-bottom: 6px;
}
.cart-row input {
  flex: 1;
  background: transparent;
  color: var(--text);
  border: none;
  padding: 4px;
}
.cart-qty {
  max-width: 70px;
  border: 1px solid var(--border);
  text-align: center;
  border-radius: 6px;
  background: var(--panel);
}
.spin {
  animation: spin 1s linear infinite;
}
@keyframes spin { from {transform:rotate(0deg);} to {transform:rotate(360deg);} }

button {
  background: #3b82f6;
  border: none;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  margin-top: 10px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}
button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

button {
  background: #3b82f6;
  border: none;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  margin-top: 10px;
  cursor: pointer;
  transition: background .2s;
}
button:hover { background: #60a5fa; }
.row { display:flex; gap:10px; flex-wrap:wrap; }
#results, #cart-items, #meals-list, #weekly-meals {
  margin-top: 20px;
  padding: 10px;
  background: #0f172a;
  border-radius: 8px;
}
.card { background:#0b1220; border:1px solid #334155; border-radius:12px; padding:12px; margin:8px 0; }
.badge { display:inline-block; padding:2px 8px; border-radius:9999px; background:#0b172b; border:1px solid #334155; font-size:12px; }
@media (max-width:600px) { main { padding: 12px; } button { width: 100%; } }