:root {
  --bg: #f6f2eb;
  --surface: #ffffff;
  --fill: #ece5da;
  --ink: #1c1916;
  --ink2: #5e554c;
  --line: rgba(28, 25, 22, 0.12);
  --accent: #0e5a55;
  --on-accent: #ffffff;
  --saffron: #8a520c;
  --spice: #b3261e;
  --veg: #2f6b3e;
  --placeholder: #e3d8c8;
  --serif: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --radius: 12px;
  --shadow: 0 18px 50px rgba(28, 25, 22, 0.08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.45;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg.lucide { width: 15px; height: 15px; stroke-width: 1.75; flex: none; }

.shell { display: grid; grid-template-columns: 196px minmax(0, 1fr); min-height: 100vh; }
.workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 320px 240px at 108% -30px, rgba(14, 90, 85, 0.09), transparent 68%),
    radial-gradient(ellipse 240px 190px at -6% 108%, rgba(138, 82, 12, 0.07), transparent 70%),
    var(--bg);
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 22px;
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 -2px 0 rgba(14, 90, 85, 0.22);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 3;
}
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.top-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 8px;
  padding: 6px 10px;
  color: var(--ink2);
  font-size: 13px;
}
.top-link:hover, .top-link.on { background: var(--fill); color: var(--ink); }
.top-link.on { color: var(--accent); font-weight: 600; }
aside {
  padding: 16px 12px;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(ellipse 150px 130px at 130% 112%, rgba(14, 90, 85, 0.14), transparent 70%),
    linear-gradient(180deg, #ffffff 0%, #f4efe6 100%);
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.03em;
  padding: 4px 8px 0;
}
.wordmark::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 62% 38% 55% 45%;
  background: linear-gradient(160deg, #16756c, #0e5a55);
  flex: none;
}
.tagline {
  margin: 0 8px 10px;
  color: var(--saffron);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
nav { display: flex; flex-direction: column; gap: 2px; }
nav a, .ghost {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  padding: 7px 8px;
  color: var(--ink2);
  font-size: 13px;
}
nav a.on, nav a:hover { background: var(--fill); color: var(--ink); }
nav a.on { background: rgba(14, 90, 85, 0.1); color: var(--accent); font-weight: 600; }
.signout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(180deg, #16756c 0%, #0e5a55 78%);
  color: var(--on-accent);
  border: 0;
  border-radius: 8px;
  padding: 6px 10px;
  min-height: 32px;
  font-size: 13px;
  font-weight: 500;
}
.signout:hover { filter: brightness(1.08); }

main { padding: 18px 22px 40px; width: 100%; max-width: none; }
h1 { font-family: var(--serif); font-weight: 500; font-size: 22px; margin: 0; letter-spacing: -0.03em; }
h2 { font-size: 14px; font-weight: 600; margin: 0 0 8px; }
.who { color: var(--ink2); font-size: 12px; }

.card, .panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(28, 25, 22, 0.045);
  padding: 14px;
}
.panel > h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel > h2::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 62% 38% 48% 52%;
  background: var(--saffron);
  flex: none;
}
.stack { display: flex; flex-direction: column; gap: 12px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }
.dish { display: block; min-width: 0; }
.dish:hover .photo { box-shadow: 0 0 0 2px rgba(14, 90, 85, 0.28); }
.photo {
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  background: var(--placeholder) center/cover no-repeat;
  margin-bottom: 6px;
  display: grid;
  place-items: end start;
  padding: 6px;
}
.photo span { background: var(--surface); border-radius: 999px; padding: 2px 6px; font-size: 10px; color: var(--ink2); }
.dish-meta { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; min-width: 0; }
.dish strong { font-size: 13px; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.price { flex: none; font-variant-numeric: tabular-nums; font-size: 12px; color: var(--ink2); }
.tags { color: var(--ink2); font-size: 11px; min-height: 1.1em; margin-top: 2px; }
.sold { color: var(--spice); }

.category { margin-bottom: 22px; }
.category h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
.category h2::before {
  content: "";
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--saffron);
}
.toolbar { margin: 0 0 14px; }
.row { display: flex; gap: 8px; align-items: center; }
.hint { margin: 0 0 8px; color: var(--ink2); font-size: 12px; }

.btn, button.btn, button.secondary {
  border-radius: 8px;
  padding: 7px 12px;
  min-height: 34px;
  font-size: 13px;
  font-weight: 500;
}
.btn, button.btn {
  background: linear-gradient(180deg, #16756c 0%, #0e5a55 78%);
  color: var(--on-accent);
  border: 0;
}
.btn.secondary, button.secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn.warn { background: var(--spice); }
button:disabled { opacity: 0.45; cursor: not-allowed; }

label { display: block; font-size: 12px; color: var(--ink2); margin-bottom: 10px; }
input, select, textarea {
  width: 100%;
  margin-top: 4px;
  background: var(--fill);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 7px 10px;
  min-height: 34px;
  font-size: 13px;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(14, 90, 85, 0.28);
  background: var(--surface);
}
textarea { min-height: 72px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.form-grid > button, .form-grid > p { grid-column: 1 / -1; }
.tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.tabs button { background: var(--fill); border: 0; border-radius: 999px; padding: 4px 10px; min-height: 28px; font-size: 12px; }
.tabs button.on { background: linear-gradient(180deg, #16756c 0%, #0e5a55 78%); color: white; }
.miss { color: var(--saffron); font-size: 11px; margin: -4px 0 8px; }

.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) minmax(320px, 0.95fr);
  background: var(--bg);
}
.auth-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 48px 56px 56px;
  color: #f6f2eb;
  background: linear-gradient(180deg, #16756c 0%, #0e5a55 58%, #0a4541 100%);
}
.auth-brand::before {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: -70px;
  top: -40px;
  border-radius: 46% 54% 62% 38%;
  background: rgba(246, 242, 235, 0.08);
  pointer-events: none;
}
.auth-panel {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100%;
  overflow: hidden;
  padding: 36px 24px;
  background: var(--bg);
}
.auth-panel::before,
.auth-panel::after {
  content: "";
  position: absolute;
  pointer-events: none;
  background: rgba(14, 90, 85, 0.06);
}
.auth-panel::before {
  width: 240px;
  height: 240px;
  right: -60px;
  top: -50px;
  border-radius: 58% 42% 48% 52%;
}
.auth-panel::after {
  width: 180px;
  height: 180px;
  left: -40px;
  bottom: -30px;
  border-radius: 42% 58% 46% 54%;
}
.auth-brand h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #f6f2eb;
  font-size: clamp(42px, 5vw, 68px);
  line-height: 0.95;
}
.auth-kicker {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(246, 242, 235, 0.72);
}
.auth-line {
  position: relative;
  z-index: 1;
  max-width: 28ch;
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(246, 242, 235, 0.86);
}
.auth-card {
  position: relative;
  z-index: 1;
  width: min(380px, 100%);
  margin: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 28px 26px 24px;
}
.auth-card h2 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.03em;
  margin: 4px 0 18px;
}
.auth-card .auth-kicker { color: var(--saffron); }
.auth-card input {
  background: #f8f4ee;
  border: 1px solid rgba(28, 25, 22, 0.08);
  min-height: 42px;
  border-radius: 10px;
}
.auth-card input:focus { background: #fff; }
.auth .btn { width: 100%; margin-top: 6px; min-height: 42px; }
.error { color: var(--spice); font-size: 12px; margin: 0 0 10px; }
@media (max-width: 800px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { min-height: 240px; padding: 28px 24px; }
  .auth-brand h1 { font-size: 40px; }
  .auth-card { margin-top: 0; }
}

.today-list { display: flex; flex-direction: column; gap: 8px; }
.today-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(28, 25, 22, 0.04);
  padding: 8px 10px;
}
.today-item .btn { flex: none; }
.frame {
  width: 100%;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
  padding: 0;
}
.preview-dish {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.preview-dish img,
.preview-dish .photo {
  width: 148px;
  height: 104px;
  max-width: 100%;
  object-fit: cover;
  border-radius: 8px;
  margin: 0;
  aspect-ratio: auto;
}
.preview-copy { min-width: 0; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.preview-copy strong { min-width: 0; overflow-wrap: anywhere; }
.stale { background: #f3e2c4; }
.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(28, 25, 22, 0.045);
}
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--ink2); font-size: 11px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 10px; }
.checks label { display: flex; gap: 6px; align-items: center; margin: 0; font-size: 12.5px; color: var(--ink); }
.checks input { width: auto; min-height: 0; margin: 0; }
.option-row input { margin-top: 0; }
#dish-message, #upload-message, #publish-message, #settings-message { font-size: 12px; color: var(--ink2); }

@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  aside { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  nav { flex-direction: row; flex-wrap: wrap; }
  .topbar { padding: 10px 14px; }
  .form-grid { grid-template-columns: 1fr; }
  main { padding: 14px; }
  .preview-copy { flex-direction: column; align-items: flex-start; gap: 2px; }
}
