:root {
  color-scheme: light;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #2d241e;
  background: #faf6f1;
  --accent: #aa452c;
  --deep: #30231e;
  --muted: #6d5b50;
  --line: #ebded3;
}
* { box-sizing: border-box; }
body, h1, h2, p { margin: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #bd914c; outline-offset: 3px; }
.shell { display: grid; grid-template-columns: 214px minmax(0, 1fr); min-height: 100svh; }
.sidebar { background: #fffdfa; border-inline-end:1px solid var(--line); padding: 34px 18px; display: flex; flex-direction: column; gap: 30px; }
.brand { display: grid; justify-items: start; }
.brand img { display:block; width:min(166px,100%); height:auto; border-radius:8px; }
nav { display: grid; gap: 8px; }
nav button { text-align: left; background: transparent; border: 1px solid transparent; color: var(--muted); border-radius: 8px; padding: 12px; }
nav button:hover, nav button[aria-current="page"] { background: #f8e8dd; border-color: #efd6c7; color: #873522; }
nav button[aria-current="page"] { font-weight: 700 }
main { max-width: 1400px; width: 100%; margin: 0 auto; padding: 0 clamp(18px, 4vw, 52px) 36px; }
.top { min-height: 68px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; padding-block: 12px; color: var(--muted); font-size: .875rem; }
.top-divider { color:#b99682; padding-inline:4px }
.hero { display:grid; grid-template-columns: 1fr 1.05fr; min-height: 225px; overflow:hidden; border-radius: 16px; color: #3d261d; background:#f4dfcd; }
.hero-copy { display:grid; align-content:center; gap:12px; padding:clamp(20px,4vw,48px); }
.hero-food { background:#b35f43 url("dining-hero.webp") center 55% / cover no-repeat; }
h1 { font-size: clamp(2.15rem, 4.5vw, 3.65rem); line-height: 1.13; }
.hero p { max-width: 26rem; color: #644439; line-height: 1.65; }
.section-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-block: 26px 14px; }
.section-title { font-size: 1.35rem; }
.section-bar p { margin-top:4px; font-size:.875rem }
.section-tools { display:flex; flex-wrap:wrap; gap:8px; align-items:center }
.switcher { display: flex; gap: 4px; border: 1px solid var(--line); border-radius: 9px; background: #f1e7de; padding: 3px; }
.switcher button { border: 0; background: transparent; padding: 8px 14px; border-radius: 6px; color: var(--muted); }
.switcher button[aria-pressed="true"] { background: #fff; color: var(--deep); font-weight: 650; box-shadow: 0 1px 3px #142d241b; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.card { min-width:0; background: #fffdfa; border: 1px solid var(--line); border-radius: 12px; padding: clamp(16px, 2vw, 24px); display: grid; align-content: start; gap: 13px; }
.card-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.card h2 { font-size: 1.15rem; }
.time { font-size: 2rem; font-weight: 680; line-height: 1; font-variant-numeric: tabular-nums; }
.meal-times { display:grid; gap:6px; }
.muted { color: var(--muted); }
.menu { padding-block: 12px; line-height: 1.6; border-block: 1px solid var(--line); overflow-wrap: anywhere; }
.tag { color: #20523c; background: #e6f3e9; border-radius: 99px; padding: 4px 9px; font-size: .875rem; }
.tag.cancelled { background: #f8eadb; color: #78451e; }
.tag.closed { background: #eef0ec; color: #48584d; }
.action { background: var(--accent); color: #fff; border: 1px solid var(--accent); border-radius: 8px; padding: 10px 14px; }
.action.secondary { background: #fffdfa; color: #933923; border-color: #d7ad99; }
.action:not(:disabled):hover { filter:brightness(.95); }
.action:disabled { background: #eef0ec; border-color: #eef0ec; color: #536256; cursor: default; }
.form-field { display: grid; gap: 6px; }
input, select, textarea { width: 100%; min-width: 0; border: 1px solid #cdbbad; color: var(--deep); background: white; border-radius: 7px; padding: 8px; }
textarea { resize: vertical; min-height: 78px; }
input[type="checkbox"] { width: auto; }
.metric { font-size: 2.35rem; font-weight: 680; line-height: 1; }
.status { margin-top: 16px; color: #873522; min-height: 1.4em; }
.week-days { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:6px; margin-bottom:14px; }
.week-days button { display:grid; gap:3px; justify-items:center; border:1px solid var(--line); border-radius:9px; background:#fffdfa; color:var(--muted); padding:8px 2px; font-size:.875rem; }
.week-days button strong { color:var(--deep); font-size:1.05rem; }
.week-days button[aria-pressed="true"] { background:#f9e6db; border-color:#d8a996; color:#873522; }
.week-days button[aria-pressed="true"] strong { color:#873522; }
.week-actions { display:flex; justify-content:flex-end; margin-top:14px; }
.empty-menu { border:1px dashed #d7ad99; border-radius:12px; padding:20px; color:var(--muted); background:#fffdfa; }
.meal-tools, .dish-list { display:flex; flex-wrap:wrap; gap:8px; }
.meal-tools .action { padding:8px 10px; font-size:.875rem; }
.dish-list button, .dish-list label { border:1px solid var(--line); border-radius:8px; background:#faf6f1; color:var(--deep); padding:7px 10px; }
.dish-list button:hover { border-color:#d7ad99; }
#dish-dialog { width:min(540px,calc(100% - 32px)); max-height:85svh; color:var(--deep); background:#fffdfa; border:1px solid var(--line); border-radius:14px; padding:20px; }
#dish-dialog::backdrop { background:#30231e70; }
#dish-dialog form { display:grid; gap:12px; }
#dish-dialog fieldset { margin:0; min-width:0; border:1px solid var(--line); border-radius:9px; padding:8px; }
#dish-dialog legend { padding-inline:5px; font-weight:650; }
#dish-dialog .meal-tools { justify-content:flex-end; }
.dish-error { color:#a73826; }
.dish-error:empty { display:none; }
.session { display:grid; gap:8px; margin-top:auto; color:var(--muted); }
.session[hidden] { display:none; }
.session button { border:1px solid var(--line); border-radius:8px; color:var(--deep); padding:8px; background:transparent; }
.login-card { width:min(100%,480px); margin:clamp(20px,8vh,80px) auto 0; padding:clamp(18px,5vw,42px); }
.login-card h1 { font-size:clamp(1.6rem,3vw,2.3rem); }
.login-card form { display:grid; gap:14px; }
@media (max-width: 1050px) { .shell { grid-template-columns: 185px minmax(0, 1fr); } .cards { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 680px) {
  .shell { display: block; }
  .sidebar { padding: 15px 16px; gap: 12px; border-inline-end:0; border-bottom:1px solid var(--line); }
  .brand img { width: 108px; }
  nav { display:flex; flex-wrap:wrap; gap:5px; }
  nav button { padding: 8px 4px; text-align: center; }
  .hero { min-height: 0; grid-template-columns: 1fr 1fr; }
  .hero-copy { padding:18px 14px; }
  .hero h1 { font-size:clamp(1.65rem,5vw,2.2rem); }
  .top { min-height:48px; }
  .cards { grid-template-columns: minmax(0,1fr); }
}
