:root {
  --ink: #12160f;
  --ink-soft: #1c2418;
  --panel: rgba(28, 36, 24, 0.78);
  --line: rgba(232, 214, 170, 0.14);
  --text: #f3efe4;
  --muted: #a7b09a;
  --amber: #d4a24a;
  --amber-deep: #b8822e;
  --sage: #8faf7a;
  --danger: #d86a5b;
  --radius: 14px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--ink);
  line-height: 1.45;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 90% 60% at 12% -10%, rgba(212, 162, 74, 0.28), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 10%, rgba(143, 175, 122, 0.16), transparent 50%),
    linear-gradient(165deg, #0d110c 0%, #171d14 42%, #0f140e 100%);
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  pointer-events: none;
}

.top {
  display: grid;
  gap: 1.5rem;
  padding: 2.25rem clamp(1.25rem, 4vw, 3rem) 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
  align-items: end;
}

@media (min-width: 900px) {
  .top {
    grid-template-columns: 1.4fr 1fr;
  }
}

.eyebrow {
  margin: 0 0 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: var(--sage);
  font-weight: 600;
}

.brand {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.8rem, 7vw, 4.6rem);
  letter-spacing: -0.02em;
  line-height: 0.95;
  color: var(--text);
}

.lede {
  margin: 0.75rem 0 0;
  max-width: 28rem;
  color: var(--muted);
  font-size: 1.02rem;
}

.pdf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
  justify-content: flex-start;
}

.week-meta {
  flex-basis: 100%;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.layout {
  display: grid;
  gap: 1.25rem;
  padding: 0 clamp(1.25rem, 4vw, 3rem) 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 980px) {
  .layout {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
  }
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem 1.35rem;
  backdrop-filter: blur(10px);
}

.panel-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 500;
}

.hint {
  margin: 0.35rem 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.add-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: end;
  margin-bottom: 1rem;
}

.field {
  display: grid;
  gap: 0.28rem;
  min-width: 7.5rem;
}

.field.grow {
  flex: 1 1 10rem;
}

.field.inline {
  min-width: 8rem;
}

.field span {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  background: rgba(10, 14, 9, 0.55);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.62rem 0.75rem;
  outline: none;
}

input:focus,
select:focus {
  border-color: rgba(212, 162, 74, 0.55);
  box-shadow: 0 0 0 3px rgba(212, 162, 74, 0.15);
}

.btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.62rem 1.05rem;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn.primary {
  background: linear-gradient(180deg, var(--amber), var(--amber-deep));
  color: #1a1408;
}

.btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn.danger {
  background: transparent;
  border-color: rgba(216, 106, 91, 0.45);
  color: #f0b0a6;
}

.table-wrap {
  overflow-x: auto;
}

.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.data th,
.data td {
  text-align: left;
  padding: 0.55rem 0.35rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.data th {
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.data td.name {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.data.muted td {
  color: var(--muted);
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.badge.kitchen {
  color: var(--sage);
  border-color: rgba(143, 175, 122, 0.35);
}

.row-actions {
  display: flex;
  gap: 0.35rem;
  justify-content: flex-end;
}

.archived-block {
  margin-top: 1rem;
  color: var(--muted);
}

.archived-block summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  background: #23301f;
  border: 1px solid rgba(212, 162, 74, 0.4);
  color: var(--text);
  padding: 0.7rem 1rem;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  z-index: 20;
}

.toast.error {
  border-color: rgba(216, 106, 91, 0.55);
}

.foot {
  max-width: 1200px;
  margin: 0 auto 2rem;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  display: flex;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.8rem;
}

@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }
}
