/* 后厨页独立样式 — 仅 index.php 引用 */

:root {
  --k-bg: #f5f0e8;
  --k-surface: #fffefb;
  --k-ink: #1c1917;
  --k-muted: #78716c;
  --k-line: #e7e5e4;
  --k-accent: #c2410c;
  --k-accent-hover: #9a3412;
  --k-accent-soft: rgba(194, 65, 12, 0.12);
  --k-amber: #d97706;
  --k-blue: #0369a1;
  --k-danger: #b91c1c;
  --k-danger-soft: #fef2f2;
  --k-radius: 16px;
  --k-radius-sm: 12px;
  --k-shadow: 0 4px 24px rgba(28, 25, 23, 0.06);
  --k-shadow-nav: 0 1px 3px rgba(28, 25, 23, 0.04);
  --k-max: 520px;
}

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

body.kitchen {
  margin: 0;
  min-height: 100dvh;
  font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--k-bg);
  color: var(--k-ink);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.kitchen-shell {
  max-width: var(--k-max);
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #fffefa 0%, var(--k-bg) 32%);
}

/* —— 顶栏 —— */
.kitchen-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: calc(12px + env(safe-area-inset-top, 0)) 16px 14px;
  background: rgba(255, 254, 251, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(231, 229, 228, 0.8);
}

.kitchen-header__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.kitchen-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kitchen-brand__name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--k-ink);
  line-height: 1.2;
}

.kitchen-brand__sub {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--k-muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.kitchen-btn-new {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(145deg, #ea580c 0%, var(--k-accent) 100%);
  border: none;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(194, 65, 12, 0.35);
  transition: transform 0.12s, box-shadow 0.12s;
}
.kitchen-btn-new:active { transform: scale(0.97); }

.kitchen-tools {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kitchen-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: var(--k-surface);
  border: 1px solid var(--k-line);
  border-radius: var(--k-radius-sm);
  box-shadow: var(--k-shadow-nav);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.kitchen-search:focus-within {
  border-color: rgba(194, 65, 12, 0.35);
  box-shadow: 0 0 0 3px var(--k-accent-soft);
}
.kitchen-search svg { flex-shrink: 0; opacity: 0.45; color: var(--k-muted); }
.kitchen-search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--k-ink);
  outline: none;
}
.kitchen-search input::placeholder { color: #a8a29e; }

/* —— 主体双栏 —— */
.kitchen-layout {
  flex: 1;
  display: flex;
  min-height: 0;
}

.kitchen-rail {
  width: 100px;
  flex-shrink: 0;
  padding: 8px 6px 12px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.kitchen-rail__label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #a8a29e;
  padding: 6px 4px;
  text-align: center;
  text-transform: uppercase;
}
.kitchen-rail__label:not(:first-of-type) {
  border-top: 1px dashed var(--k-line);
  margin-top: 8px;
  padding-top: 10px;
}

.kitchen-rail a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 50px;
  padding: 8px 6px 9px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.25;
  color: #57534e;
  text-decoration: none;
  text-align: center;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
/* 与主区 .kitchen-titlebar 同系虚线，隔开每一项 */
.kitchen-rail a:not(:last-of-type) {
  border-bottom: 1px dashed var(--k-line);
}
.kitchen-rail a .e { font-size: 1rem; line-height: 1; }
.kitchen-rail a:hover { background: rgba(255, 255, 255, 0.6); }
.kitchen-rail a.is-active {
  color: var(--k-accent);
  background: #fff;
  border-color: rgba(194, 65, 12, 0.2);
  box-shadow: var(--k-shadow-nav);
}
.kitchen-rail a.is-active:not(:last-of-type) {
  border-bottom: 1px dashed var(--k-line);
}
.kitchen-rail a.is-active .e { filter: none; }

.kitchen-rail a.kitchen-rail--sub {
  min-height: 48px;
  font-size: 0.7rem;
  padding-left: 4px;
  padding-right: 4px;
}

.kitchen-main {
  flex: 1;
  min-width: 0;
  padding: 8px 12px calc(20px + env(safe-area-inset-bottom, 0)) 8px;
  overflow-y: auto;
}

.kitchen-titlebar {
  margin: 0 0 14px;
  padding: 4px 2px 12px;
  border-bottom: 1px dashed var(--k-line);
  text-align: center;
}

.kitchen-titlebar h2 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--k-ink);
  line-height: 1.45;
  letter-spacing: 0.02em;
}
.kitchen-titlebar .n {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.78em;
  font-weight: 600;
  color: var(--k-muted);
  vertical-align: middle;
}

.kitchen-empty {
  margin: 32px 8px;
  padding: 28px 20px;
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--k-muted);
  background: var(--k-surface);
  border: 1px dashed var(--k-line);
  border-radius: var(--k-radius);
}

.kitchen-empty strong { color: var(--k-ink); font-weight: 700; }

/* —— 菜品卡片 —— */
.dish-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dish {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--k-surface);
  border: 1px solid var(--k-line);
  border-radius: var(--k-radius);
  box-shadow: var(--k-shadow);
}

.dish__media {
  flex-shrink: 0;
}
.dish__img {
  display: block;
  width: 76px;
  height: 76px;
  border-radius: 14px;
  object-fit: cover;
  background: #e7e5e4;
}

.dish__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dish__name {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--k-ink);
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.dish__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.dish__tags:empty { display: none; }
.dish__tags span {
  font-size: 0.62rem;
  font-weight: 500;
  color: #57534e;
  padding: 3px 8px;
  background: #f5f5f4;
  border-radius: 6px;
}

.dish__meta {
  margin: 0;
  font-size: 0.68rem;
  color: #a8a29e;
}
.dish__meta:empty { display: none; }

.dish__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid #f5f5f4;
}
.dish__bar--single {
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px solid #f5f5f4;
  justify-content: flex-end;
}

.kitchen-err {
  margin: 24px 16px;
  padding: 16px 18px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--k-radius-sm);
}

/* 按钮 */
.k-btn {
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 9px;
  border: none;
  cursor: pointer;
  transition: filter 0.12s, transform 0.1s;
}
.k-btn:active { transform: scale(0.97); }
.k-btn--noon { color: #92400e; background: #fffbeb; }
.k-btn--noon:hover { background: #fef3c7; }
.k-btn--night { color: #1e3a5f; background: #f0f9ff; }
.k-btn--night:hover { background: #e0f2fe; }
.k-btn--danger { color: var(--k-danger); background: var(--k-danger-soft); border: 1px solid #fecaca; }
.k-btn--ghost { color: #78716c; background: #fafaf9; border: 1px solid var(--k-line); }

form.k-inline { display: inline; }
