:root {
  --bg: #b5c0ad;
  --card: #fef8ee;
  --text: #2c2c2c;
  --muted: #8a8a8a;
  --accent: #e89a6a;
  --accent-deep: #d4845a;
  --ok: #3d8b6e;
  --danger: #c45c4a;
  --shadow: 0 8px 24px rgba(88, 66, 44, 0.1);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
}

body {
  padding-bottom: env(safe-area-inset-bottom);
}

.hidden {
  display: none !important;
}

.view {
  min-height: 100vh;
}

/* 登录 */
#view-login {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border-radius: 22px;
  padding: 28px 22px 24px;
  box-shadow: var(--shadow);
}

.brand {
  margin: 0;
  color: var(--accent-deep);
  font-size: 15px;
  font-weight: 700;
}

.login-card h1 {
  margin: 6px 0 0;
  font-size: 28px;
}

.hint {
  margin: 10px 0 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.pin-input {
  width: 100%;
  height: 56px;
  border: 1px solid rgba(88, 66, 44, 0.12);
  border-radius: 16px;
  padding: 0 16px;
  font-size: 22px;
  letter-spacing: 4px;
  background: #fff;
  margin-bottom: 14px;
}

.error {
  color: var(--danger);
  min-height: 20px;
  font-size: 14px;
  margin: 10px 0 0;
}

/* 顶栏 */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
  background: rgba(181, 192, 173, 0.96);
  backdrop-filter: blur(8px);
}

.top-brand {
  margin: 0;
  font-size: 13px;
  color: var(--accent-deep);
  font-weight: 700;
}

.top-sub {
  margin: 2px 0 0;
  font-size: 20px;
  font-weight: 700;
}

.content {
  padding: 8px 14px 100px;
}

/* 按钮 */
.btn {
  border: none;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 700;
  padding: 0 18px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-block {
  width: 100%;
  height: 54px;
  font-size: 18px;
}

.btn-ghost {
  background: rgba(254, 248, 238, 0.85);
  color: var(--accent-deep);
  height: 40px;
  font-size: 15px;
}

.btn-ok {
  background: var(--ok);
  color: #fff;
  width: 100%;
  height: 52px;
  font-size: 18px;
  margin-top: 12px;
}

.btn-soft {
  background: rgba(232, 154, 106, 0.16);
  color: var(--accent-deep);
  width: 100%;
  height: 48px;
}

/* 订单卡 */
.card {
  background: var(--card);
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.pick {
  font-size: 34px;
  font-weight: 800;
  color: var(--accent-deep);
  letter-spacing: 1px;
  line-height: 1;
}

.status {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-deep);
}

.meta {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.goods {
  margin-top: 12px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
}

.pay-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(88, 66, 44, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pay-label {
  color: var(--muted);
  font-size: 14px;
}

.pay-num {
  font-size: 22px;
  font-weight: 800;
}

.empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--muted);
  font-size: 16px;
}

.menu-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid rgba(88, 66, 44, 0.08);
}

.menu-row:first-child {
  border-top: none;
}

.menu-name {
  font-size: 17px;
  font-weight: 700;
}

.menu-price {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
}

.switch {
  min-width: 96px;
  height: 44px;
  border-radius: 999px;
  border: none;
  font-size: 15px;
  font-weight: 700;
}

.switch.on {
  background: rgba(61, 139, 110, 0.15);
  color: var(--ok);
}

.switch.off {
  background: rgba(196, 92, 74, 0.14);
  color: var(--danger);
}

/* 底栏 */
.tabbar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  height: 64px;
  border-radius: 999px;
  background: #2c2c2c;
  display: flex;
  padding: 6px;
  box-shadow: 0 10px 28px rgba(44, 33, 24, 0.28);
  z-index: 20;
}

.tab {
  flex: 1;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-size: 15px;
  font-weight: 700;
  border-radius: 999px;
}

.tab.on {
  background: var(--accent);
  color: #fff;
}

/* 配置表单 */
.field {
  display: block;
  margin-top: 14px;
}

.field span {
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
}

.field.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.field.row-between span {
  margin-bottom: 0;
  font-size: 16px;
  color: var(--text);
  font-weight: 650;
}

.field-hint {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.field-input,
.field-textarea {
  width: 100%;
  border: 1px solid rgba(88, 66, 44, 0.12);
  border-radius: 14px;
  background: #fff;
  font-size: 18px;
  color: var(--text);
  padding: 12px 14px;
}

.field-input {
  height: 52px;
}

.field-textarea {
  resize: vertical;
  min-height: 88px;
  line-height: 1.5;
}
