:root {
  --ink: #2a1c14;
  --muted: #7a6456;
  --paper: #f4ebe1;
  --card: #fffaf4;
  --line: #e6d3c3;
  --accent: #c2410c;
  --accent-dark: #9a3412;
  --gold: #d4a017;
  --deep: #3b2118;
  --sage: #4d7c0f;
  --shadow: 0 18px 40px rgba(61, 32, 20, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #fde7d0 0%, transparent 55%),
    radial-gradient(900px 400px at 100% 0%, #f5d0b0 0%, transparent 50%),
    var(--paper);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button, input, select, textarea { font-family: inherit; }

.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }

.site-header {
  background: var(--deep);
  color: #f8eadb;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 8px 24px rgba(42, 28, 20, 0.18);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Songti SC", "STSong", serif;
  letter-spacing: 0.12em;
}
.brand-mark {
  width: 36px;
  height: 36px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--gold);
  font-size: 18px;
}
.brand small { display: block; color: #d7b89a; letter-spacing: 0.28em; font-size: 10px; margin-top: 2px; }
.nav-links { display: flex; align-items: center; gap: 18px; font-size: 14px; }
.nav-links a { color: #f3e2d0; opacity: 0.86; }
.nav-links a:hover { opacity: 1; color: #fff; }
.cart-link {
  position: relative;
  padding: 6px 12px;
  border: 1px solid rgba(212, 160, 23, 0.45);
  border-radius: 999px;
}
.badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  min-width: 18px;
  height: 18px;
  font-size: 11px;
  display: grid;
  place-items: center;
  padding: 0 4px;
}

.hero {
  padding: 42px 0 18px;
}
.hero h1 {
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(32px, 5vw, 54px);
  margin: 0 0 8px;
  letter-spacing: 0.08em;
}
.hero p { color: var(--muted); margin: 0 0 20px; font-size: 15px; }
.search-bar {
  display: flex;
  gap: 8px;
  background: var(--card);
  padding: 8px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.search-bar input {
  flex: 1;
  border: 0;
  outline: none;
  padding: 10px 12px;
  background: transparent;
  font-size: 15px;
}
.search-bar button, .btn {
  border: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
}
.btn:hover { background: var(--accent-dark); }
.btn.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn.sage { background: var(--sage); }
.btn.small { padding: 6px 12px; font-size: 13px; border-radius: 9px; }

.cats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 22px 0;
}
.chip {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
}
.chip.active {
  background: var(--deep);
  color: #fff;
  border-color: var(--deep);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
  padding-bottom: 48px;
}
.dish-card {
  background: var(--card);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.cover {
  height: 132px;
  display: grid;
  place-items: center;
  font-size: 58px;
  position: relative;
}
.cover .sold {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(42, 28, 20, 0.62);
  color: #fff;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 999px;
}
.dish-body { padding: 14px 16px 16px; }
.dish-body h3 { margin: 0 0 6px; font-size: 18px; }
.meta { color: var(--muted); font-size: 13px; margin-bottom: 12px; min-height: 36px; }
.price-row { display: flex; align-items: center; justify-content: space-between; }
.price { color: var(--accent); font-size: 22px; font-weight: 700; }
.price em { font-style: normal; font-size: 13px; }

.flash {
  margin: 16px 0 0;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
}
.flash.ok { background: #ecfccb; color: #3f6212; }
.flash.err { background: #fee2e2; color: #991b1b; }

.auth-page {
  min-height: calc(100vh - 70px);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
}
.auth-side {
  background: linear-gradient(160deg, #3b2118, #7c2d12 70%);
  color: #f8eadb;
  padding: 72px 56px;
}
.auth-side h1 { font-family: "Songti SC", serif; font-size: 48px; letter-spacing: 0.14em; margin: 0; }
.auth-side p { opacity: 0.82; line-height: 1.8; max-width: 360px; }
.auth-form { padding: 72px 48px; }
.form-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--shadow);
}
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; }
input[type=text], input[type=password], input[type=number], textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 15px;
}
.hint { margin-top: 14px; color: var(--muted); font-size: 13px; }

.table-wrap { overflow: auto; background: var(--card); border-radius: 18px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; }
th { background: #f7eee4; color: var(--muted); font-weight: 600; }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 18px 0 28px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
}
.stat b { display: block; font-size: 28px; margin-top: 6px; }
.muted { color: var(--muted); }
.page { padding: 28px 0 64px; }
.page h2 { font-family: "Songti SC", serif; letter-spacing: 0.08em; margin: 0 0 16px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: #ffedd5;
  color: #9a3412;
}
.tag.green { background: #ecfccb; color: #3f6212; }
.tag.gray { background: #f1f5f9; color: #475569; }
.tag.blue { background: #e0f2fe; color: #075985; }

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  padding: 28px 0 40px;
  font-size: 13px;
}

.qty { display: flex; align-items: center; gap: 8px; }
.qty button { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; }

.detail {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
}
.review { border-top: 1px solid var(--line); padding: 12px 0; }

@media (max-width: 860px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .detail { grid-template-columns: 1fr; }
  .nav-links { gap: 10px; font-size: 13px; }
}
