:root {
  color-scheme: light;
  --bg: #f7efe8;
  --panel: #fffdf9;
  --text: #2f241d;
  --muted: #7b6758;
  --accent: #d97f3d;
  --accent-dark: #a85a21;
  --border: #ecd7c5;
  --shadow: 0 18px 45px rgba(87, 49, 18, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #fdf6ee 0%, var(--bg) 100%);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  background: linear-gradient(135deg, #7b3f1f, #c96f35);
  color: white;
  padding: 28px;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.76rem;
  opacity: 0.9;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.hero p {
  margin: 0;
  max-width: 600px;
  opacity: 0.95;
}

.stats {
  min-width: 220px;
  background: rgba(255, 255, 255, 0.16);
  padding: 16px;
  border-radius: 16px;
  backdrop-filter: blur(6px);
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
}

.controls {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin: 22px 0;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow);
}

label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: white;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

.content-grid {
  display: grid;
  grid-template-columns: 370px 1fr;
  gap: 22px;
}

.recipe-form h2,
.recipe-list-panel h2 {
  margin-top: 0;
  margin-bottom: 12px;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

button {
  border: none;
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

button:hover {
  transform: translateY(-1px);
}

button[type="submit"],
.primary {
  background: var(--accent);
  color: white;
}

.secondary {
  background: #f0e0d2;
  color: var(--accent-dark);
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.recipe-list {
  display: grid;
  gap: 14px;
}

.recipe-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  background: #fff;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 8px;
}

.chip {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fbe3d2;
  color: var(--accent-dark);
  font-size: 0.8rem;
  font-weight: 700;
}

.card-actions {
  display: flex;
  gap: 8px;
}

.recipe-card h3 {
  margin: 0 0 8px;
}

.recipe-card p,
.recipe-card li {
  color: var(--muted);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 12px 0;
  font-size: 0.92rem;
  color: var(--accent-dark);
  font-weight: 600;
}

.empty-state {
  text-align: center;
  padding: 24px 12px;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 16px;
  background: #fff;
}

.status-message {
  margin-top: 10px;
  min-height: 1.2rem;
  color: var(--accent-dark);
  font-weight: 600;
}

.status-message.error {
  color: #b0412e;
}

@media (max-width: 900px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding: 14px;
  }

  .hero,
  .controls {
    grid-template-columns: 1fr;
    display: grid;
  }

  .hero {
    gap: 16px;
  }
}
