* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f5f5;
  color: #333;
  font-size: 14px;
  min-height: 100vh;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px;
}

/* 导航 */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
  font-size: 16px;
  font-weight: 600;
}

.navbar .back {
  color: #ff6b6b;
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
}

.navbar .action {
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  background: none;
  border: none;
  cursor: pointer;
}

/* 卡片 */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s;
  text-decoration: none;
}

.btn-primary {
  background: #ff6b6b;
  color: #fff;
}

.btn-gray {
  background: #f0f0f0;
  color: #666;
}

.btn-outline {
  background: transparent;
  border: 1px solid #ff6b6b;
  color: #ff6b6b;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn:active {
  opacity: 0.75;
}

/* 表单 */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  color: #666;
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  background: #fff;
  transition: border-color 0.15s;
}

.form-input:focus {
  border-color: #ff6b6b;
}

textarea.form-input {
  resize: vertical;
  min-height: 80px;
}

/* 状态 badge */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.badge-pending {
  background: #fff3e0;
  color: #e65100;
}

.badge-done {
  background: #e8f5e9;
  color: #2e7d32;
}

/* 空状态 */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #999;
}

.section-title {
  font-size: 13px;
  color: #999;
  padding: 12px 0 8px;
  font-weight: 500;
}

/* Tab 栏 */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #eee;
  display: flex;
  z-index: 100;
}

.tabbar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0 10px;
  text-decoration: none;
  color: #999;
  font-size: 11px;
  gap: 3px;
}

.tabbar a.active {
  color: #ff6b6b;
}

.tabbar a .icon {
  font-size: 22px;
  line-height: 1;
}

.page-content {
  padding-bottom: 70px;
}

/* 菜品 */
.dish-card {
  background: #fff;
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  padding: 12px;
  gap: 12px;
}

.dish-img {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.dish-img-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}

.dish-info {
  flex: 1;
  min-width: 0;
}

.dish-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dish-desc {
  font-size: 12px;
  color: #999;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 数量控制 */
.qty-ctrl {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s;
}

.qty-btn:active {
  opacity: 0.7;
}

.qty-btn-minus {
  background: #f0f0f0;
  color: #666;
}

.qty-btn-plus {
  background: #ff6b6b;
  color: #fff;
}

.qty-num {
  min-width: 20px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
}

/* 购物车悬浮条 */
.cart-bar {
  position: fixed;
  bottom: 60px;
  left: 16px;
  right: 16px;
  background: #333;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px 10px 16px;
  z-index: 99;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.cart-bar .cart-count {
  color: #fff;
  font-size: 14px;
}

.cart-bar .cart-go {
  background: #ff6b6b;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}

/* 弹窗 */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  display: none;
  align-items: flex-end;
}

.modal-mask.show {
  display: flex;
}

.modal {
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 20px 16px 32px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.modal.show {
  transform: translateY(0);
}

.modal-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
}

.modal-btns {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.modal-btns .btn {
  flex: 1;
}

/* 订单 */
.order-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.order-date {
  font-size: 15px;
  font-weight: 600;
}

.order-item-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #555;
  padding: 3px 0;
}

.order-note {
  font-size: 12px;
  color: #999;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #f0f0f0;
}

.order-time {
  font-size: 11px;
  color: #bbb;
  margin-top: 6px;
}
