:root {
  --ink: #211611;
  --muted: #77675f;
  --paper: #fff8e6;
  --panel: rgba(255, 248, 230, 0.9);
  --line: rgba(83, 45, 31, 0.16);
  --rouge: #b63f35;
  --jade: #216e58;
  --blue: #245f73;
  --gold: #c89032;
  --cream: #fffaf0;
  --shadow: 0 18px 54px rgba(66, 38, 24, 0.14);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(182, 63, 53, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(200, 144, 50, 0.08) 1px, transparent 1px),
    linear-gradient(135deg, #fff5dc 0%, #f5e0bb 48%, #eecdb7 100%);
  background-size: 44px 44px, 44px 44px, auto;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 16%, rgba(200, 144, 50, 0.28), transparent 18rem),
    radial-gradient(circle at 90% 4%, rgba(33, 110, 88, 0.18), transparent 22rem);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

.royal-glow {
  position: fixed;
  width: 34vw;
  max-width: 520px;
  aspect-ratio: 1;
  right: -10vw;
  top: 10vh;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 248, 213, 0.75), rgba(182, 63, 53, 0.12) 52%, transparent 70%);
  filter: blur(2px);
}

.app-shell {
  position: relative;
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 18px;
}

.topbar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: #fff8e5;
  background: linear-gradient(145deg, var(--rouge), #76251f);
  border: 2px solid rgba(255, 240, 188, 0.72);
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.16), 0 8px 24px rgba(118, 37, 31, 0.22);
  font-weight: 900;
  will-change: transform;
}

.brand strong {
  display: block;
  font-size: 21px;
  letter-spacing: 0;
}

.brand small,
.hint,
.hero-copy,
.customer-card label,
.owner-login p {
  color: var(--muted);
}

.nav {
  display: flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.72);
  box-shadow: 0 8px 24px rgba(80, 48, 32, 0.08);
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 800;
}

.nav a.active {
  color: #fff8e5;
  background: var(--ink);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  align-items: center;
  gap: 24px;
  padding: clamp(24px, 5vw, 56px);
  min-height: 256px;
  overflow: hidden;
  position: relative;
}

.hero::after {
  content: "徐";
  position: absolute;
  right: clamp(18px, 9vw, 140px);
  bottom: -44px;
  color: rgba(182, 63, 53, 0.08);
  font-size: clamp(130px, 22vw, 280px);
  font-weight: 900;
  line-height: 1;
}

.hero-copy-wrap {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--rouge);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 900;
}

h1,
h2,
p {
  margin-top: 0;
}

.hero h1,
.owner-login h1,
.dashboard-head h1 {
  margin-bottom: 12px;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: 0;
}

.hero-ticket {
  position: relative;
  z-index: 1;
  aspect-ratio: 1 / 1.15;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #fff9ea;
  background: linear-gradient(150deg, var(--jade), #174737);
  border: 1px solid rgba(255, 240, 188, 0.58);
  border-radius: 8px;
  transform: rotate(3deg);
  box-shadow: inset 0 -10px 0 rgba(0, 0, 0, 0.13), 0 14px 34px rgba(23, 71, 55, 0.22);
  will-change: transform;
}

.hero-ticket strong {
  font-size: 58px;
  line-height: 1;
}

.order-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 330px;
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}

.customer-card,
.cart-panel,
.menu-admin,
.owner-login,
.dashboard-head {
  padding: 18px;
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 900;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  outline: none;
}

textarea {
  min-height: 86px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--rouge);
  box-shadow: 0 0 0 3px rgba(182, 63, 53, 0.12);
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-tabs button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff8ea;
  color: var(--ink);
  font-weight: 800;
}

.category-tabs button.active {
  background: var(--rouge);
  color: #fff9ea;
  border-color: transparent;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.dish-card {
  min-height: 224px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.8);
  box-shadow: 0 10px 30px rgba(50, 32, 20, 0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  will-change: transform, opacity;
}

.dish-card::before {
  content: "";
  position: absolute;
  inset: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--rouge), var(--gold), var(--jade));
}

.dish-card.unavailable {
  opacity: 0.48;
}

.dish-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.dish-card h3 {
  margin: 0;
  font-size: 22px;
}

.price {
  color: var(--rouge);
  font-weight: 900;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(36, 95, 115, 0.1);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.dish-card p {
  color: var(--muted);
  line-height: 1.65;
  flex: 1;
}

.qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.qty-control {
  display: inline-grid;
  grid-template-columns: 38px 42px 38px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: #fff8ea;
}

.qty-control button {
  height: 36px;
  border: 0;
  background: transparent;
  font-size: 20px;
}

.qty-control span {
  text-align: center;
  font-weight: 900;
}

.add-button,
.primary-button,
.add-dish button {
  border: 0;
  border-radius: 8px;
  padding: 12px 14px;
  color: #fff9ea;
  background: var(--ink);
  font-weight: 900;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.17);
}

.primary-button {
  width: 100%;
  background: linear-gradient(145deg, var(--rouge), #812b26);
}

.panel-title,
.dashboard-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.cart-items {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  max-height: 46vh;
  overflow: auto;
}

.cart-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.45);
}

.empty {
  color: var(--muted);
  padding: 20px;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.owner-shell {
  margin-top: 18px;
}

.owner-login {
  width: min(460px, 100%);
  margin: 8vh auto;
}

.hidden {
  display: none !important;
}

.owner-dashboard {
  display: grid;
  gap: 16px;
}

.stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.stats span {
  padding: 10px 12px;
  border-radius: 999px;
  background: #fff8ea;
  border: 1px solid var(--line);
}

.kanban {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.order-column {
  min-height: 260px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.67);
}

.order-column h2 {
  font-size: 18px;
}

.order-card {
  padding: 14px;
  border-radius: 8px;
  background: var(--cream);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(45, 30, 18, 0.08);
  margin-bottom: 10px;
  will-change: transform;
}

.order-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.order-card ul {
  margin: 10px 0;
  padding-left: 18px;
}

.order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.order-actions button,
.admin-menu-list button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 10px;
  background: #fff8ea;
  font-weight: 800;
}

.add-dish {
  display: grid;
  grid-template-columns: 1.1fr 0.8fr 0.55fr 1.5fr auto;
  gap: 10px;
  margin-bottom: 14px;
}

.admin-menu-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.admin-dish {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
}

.admin-dish strong {
  display: block;
  margin-bottom: 5px;
}

@media (max-width: 1100px) {
  .order-layout,
  .kanban {
    grid-template-columns: 1fr 1fr;
  }

  .cart-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 10px;
  }

  .topbar,
  .hero,
  .order-layout,
  .kanban,
  .add-dish {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: stretch;
  }

  .nav {
    justify-content: center;
  }

  .hero-ticket {
    width: 160px;
  }
}
