* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: #f6f7f4;
  color: #1e2b24;
  font: 14px/1.65 'PingFang SC', 'Microsoft YaHei', sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: 0; background: none; }
button:disabled { cursor: not-allowed; opacity: .45; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid #157347; outline-offset: 2px; }
a { color: #157347; text-decoration: none; }

header.top {
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid #e6e9e2;
  padding: 16px 28px; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 700; letter-spacing: .5px; }
.logo { width: 40px; height: 40px; line-height: 40px; text-align: center; background: #157347; color: #d9f0c4; border-radius: 12px; font-weight: 700; }
.sub { font-size: 11px; font-weight: 400; color: #6f7d74; letter-spacing: 1px; }
.tabs { display: flex; background: #eef1eb; padding: 4px; border-radius: 10px; gap: 3px; }
.tabs button { border-radius: 7px; padding: 9px 18px; color: #5b6a61; font-weight: 500; }
.tabs button.active { color: #fff; background: #157347; }
.tag { font-size: 11px; letter-spacing: 1px; color: #6f7d74; }
.ribbon { font-size: 12px; background: #edf3e9; color: #4f6657; padding: 9px 28px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }

main { max-width: 1280px; margin: auto; padding: 28px; }
.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.gap { margin-top: 16px; }
h1 { font-size: 30px; margin: 2px 0 6px; line-height: 1.35; letter-spacing: -.3px; }
h2 { font-size: 20px; margin: 0 0 10px; }
h3 { font-size: 15px; margin: 0 0 8px; }
p { margin: 0 0 12px; }
.muted { color: #6f7d74; }
.small { font-size: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: #fff; color: #1e2b24; border: 1px solid #dfe3dc; border-radius: 10px;
  padding: 9px 16px; font-weight: 500; text-decoration: none;
}
.btn.primary { background: #157347; color: #fff; border-color: #157347; }
.btn.danger { color: #b34d45; border-color: #ead0cc; }
.btn.small { padding: 6px 11px; font-size: 12px; border-radius: 8px; }

.pill { display: inline-flex; align-items: center; background: #eef1eb; color: #4f6657; border-radius: 999px; padding: 4px 13px; font-size: 12px; }
.pill.warn { background: #fbece9; color: #b34d45; }
.chip { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 11px; font-size: 12px; font-weight: 600; }
.st-queued { background: #fff3e0; color: #b7791f; }
.st-cooking { background: #e8f0fe; color: #2563eb; }
.st-shipping { background: #f1e8fe; color: #7c3aed; }
.st-done { background: #e7f6ec; color: #15803d; }
.st-cancelled { background: #f1f3f2; color: #6b7280; }

.note { background: #eef1eb; border-radius: 12px; padding: 12px 15px; color: #4f6657; }
.note.warning { background: #fbf1df; color: #8a5a2a; }
.note.error { background: #fbece9; color: #b34d45; }
.empty { color: #8b9790; padding: 26px; text-align: center; }

.metric { background: #fff; border: 1px solid #e6e9e2; border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; min-width: 160px; box-shadow: 0 1px 2px rgba(30,43,36,.03); }
.metric strong { font-size: 26px; font-weight: 700; }
.metric.green { background: #eef6ee; border-color: #dcecdc; }
.metrics { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }

.panel { background: #fff; border: 1px solid #e6e9e2; border-radius: 16px; padding: 20px; margin-bottom: 18px; box-shadow: 0 1px 2px rgba(30,43,36,.03); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
input, select, textarea { border: 1px solid #dfe3dc; border-radius: 10px; padding: 9px 12px; background: #fff; color: #1e2b24; }
input:focus, select:focus, textarea:focus { border-color: #157347; outline: none; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 12px; color: #6f7d74; }
.formgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid #edf0ea; vertical-align: top; }
th { color: #6f7d74; font-size: 12px; font-weight: 500; background: #fafbf9; }
td button + button { margin-left: 6px; }

.layout { display: flex; gap: 18px; align-items: flex-start; }
.sidebar { width: 220px; background: #fff; border: 1px solid #e6e9e2; border-radius: 16px; padding: 12px; flex-shrink: 0; }
.sidebar button { display: block; width: 100%; text-align: left; padding: 11px 13px; border-radius: 10px; color: #4f5d55; margin: 3px 0; font-weight: 500; }
.sidebar button.active { background: #157347; color: #fff; }
.content { flex: 1; min-width: 0; }
.intro { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }

.productgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.product .food { margin-bottom: 10px; }
.product h3 { margin: 0 0 4px; }

.food { border-radius: 14px; overflow: hidden; height: 120px; display: flex; align-items: center; justify-content: center; }
.food svg { height: 100%; width: auto; }

.twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.chart { display: flex; flex-direction: column; gap: 12px; margin: 16px 0 20px; }
.chart-row { display: flex; align-items: center; gap: 12px; }
.chart-label { width: 90px; flex-shrink: 0; font-size: 13px; color: #4f5d55; }
.chart-bar { flex: 1; background: #eef1eb; border-radius: 999px; height: 14px; overflow: hidden; }
.chart-bar i { display: block; height: 100%; background: linear-gradient(90deg, #157347, #7cc47e); border-radius: 999px; }
.chart-val { width: 82px; text-align: right; font-weight: 700; font-size: 13px; }

.employee { display: flex; gap: 28px; align-items: flex-start; }
.phone { width: 370px; flex-shrink: 0; background: #fff; border: 1px solid #e6e9e2; border-radius: 26px; overflow: hidden; box-shadow: 0 18px 44px rgba(30,43,36,.08); }
.phonehead { background: #157347; color: #fff; padding: 15px 18px; display: flex; justify-content: space-between; align-items: center; }
.phonebody { padding: 16px; min-height: 440px; }
.phonefoot { border-top: 1px solid #edf0ea; padding: 12px 16px; background: #fff; }
.navmobile { display: flex; border-top: 1px solid #edf0ea; margin-top: 12px; padding-top: 8px; }
.navmobile button { flex: 1; color: #6f7d74; padding: 8px 0; font-weight: 500; }
.navmobile button.active { color: #157347; font-weight: 700; }
.price { color: #b76e2f; font-weight: 700; }
.meal { display: flex; gap: 14px; border: 1px solid #e6e9e2; border-radius: 16px; padding: 13px; margin-bottom: 13px; background: #fff; }
.meal .food { width: 112px; height: 112px; flex-shrink: 0; }
.meal .info { flex: 1; min-width: 0; }
.qty { display: inline-flex; align-items: center; gap: 9px; }
.qty button { width: 30px; height: 30px; border-radius: 50%; background: #eef1eb; color: #157347; font-size: 17px; line-height: 1; }
.selects { display: flex; gap: 8px; margin: 10px 0; flex-wrap: wrap; }
.selects button { background: #eef1eb; color: #4f6657; border-radius: 999px; padding: 6px 15px; font-size: 13px; }
.selects button.active { background: #157347; color: #fff; }
.hero { background: #eef6ee; border-radius: 16px; padding: 16px; margin-bottom: 14px; }
.order { border: 1px solid #e6e9e2; border-radius: 16px; padding: 14px; margin-bottom: 13px; background: #fff; }
.success { text-align: center; padding: 24px 10px; }
.check { width: 60px; height: 60px; line-height: 60px; border-radius: 50%; background: #157347; color: #d9f0c4; font-size: 30px; margin: 0 auto 12px; }
.step { display: flex; gap: 14px; margin-bottom: 16px; }
.step .num { width: 34px; height: 34px; line-height: 34px; text-align: center; border-radius: 50%; background: #157347; color: #d9f0c4; flex-shrink: 0; font-weight: 700; }
.service { background: #fff; border: 1px solid #e6e9e2; border-radius: 16px; padding: 16px; }
.guide { flex: 1; min-width: 0; }
.guide > * { margin-bottom: 16px; }
.scope-list { padding-left: 20px; }
.scope-list li { margin-bottom: 8px; }
.footer { color: #8b9790; font-size: 12px; margin-top: 16px; }

.modalback { position: fixed; inset: 0; background: rgba(20,30,25,.45); display: flex; align-items: center; justify-content: center; padding: 18px; z-index: 50; }
.modal { background: #fff; border-radius: 18px; padding: 22px; max-width: 520px; width: 100%; max-height: 88vh; overflow: auto; }
.modal.wide { max-width: 880px; }
.close { font-size: 24px; color: #6f7d74; line-height: 1; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: #1e2b24; color: #fff; padding: 10px 18px; border-radius: 999px; z-index: 80; max-width: 82vw; font-size: 13px; }
.hidden { display: none; }

#print-area { display: none; }
@media print {
  body * { visibility: hidden; }
  #print-area, #print-area * { visibility: visible; }
  #print-area { display: block; position: absolute; left: 0; top: 0; width: 100%; background: #fff; color: #000; }
  .ticket { border: 1px solid #999; border-radius: 6px; padding: 8px 12px; margin-bottom: 10px; page-break-inside: avoid; }
}

@media (max-width: 900px) {
  main { padding: 18px; }
  header.top { padding: 12px 16px; }
  .tabs { width: 100%; overflow-x: auto; }
  .tabs button { flex-shrink: 0; }
  .employee { flex-direction: column; }
  .phone { width: 100%; }
  .twocol, .formgrid { grid-template-columns: 1fr; }
  .layout { flex-direction: column; }
  .sidebar { width: 100%; display: flex; gap: 6px; overflow-x: auto; }
  .sidebar button { width: auto; flex-shrink: 0; }
  .sidebar .tag { display: none; }
  .metric { min-width: 130px; flex: 1; }
}
