* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: #f8f8f8; color: #1a1a1a; font-size: 14px; line-height: 1.5;
}
#app { max-width: 480px; margin: 0 auto; min-height: 100vh; background: #f8f8f8; display: flex; flex-direction: column; position: relative; }
a { color: #007aff; text-decoration: none; }

/* 顶部导航 */
#navbar {
  position: sticky; top: 0; z-index: 30; height: 44px; line-height: 44px;
  background: #fff; border-bottom: 1px solid #e5e5e5;
  display: flex; align-items: center; padding: 0 10px;
}
#nav-back { font-size: 26px; color: #007aff; width: 36px; cursor: pointer; display: none; }
#nav-title { flex: 1; text-align: center; font-size: 17px; font-weight: 600; }
#nav-right { width: 36px; text-align: right; color: #007aff; font-size: 13px; cursor: pointer; }

/* 内容区 */
#view { flex: 1; overflow-y: auto; padding: 10px 10px 60px; -webkit-overflow-scrolling: touch; }

/* 底部 tabbar */
#tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; height: 50px; display: flex;
  background: #fff; border-top: 1px solid #e5e5e5; z-index: 30;
}
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 10px; color: #999; gap: 1px; cursor: pointer; }
.tab .ic { font-size: 22px; line-height: 1; }
.tab.active { color: #007aff; }

/* 卡片 */
.card { background: #fff; border-radius: 8px; padding: 12px; margin-bottom: 10px; }
.card .title { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.muted { color: #999; font-size: 12px; }
.row { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px solid #f2f2f2; }
.row:last-child { border-bottom: none; }

/* 统计块 */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { text-align: center; padding: 10px 4px; background: #f7f8fa; border-radius: 8px; }
.stat .n { font-size: 20px; font-weight: 700; color: #1a1a1a; }
.stat .l { font-size: 11px; color: #888; margin-top: 3px; }

/* banner */
.banner { margin-bottom: 10px; }
.banner img, .banner .ph { width: 100%; height: 150px; border-radius: 8px; display: block; object-fit: cover; background: #e9eef7; }
.banner .ph { display: flex; align-items: center; justify-content: center; color: #9aa7bd; font-size: 14px; }
.banner-ind { position: absolute; right: 16px; bottom: 16px; background: rgba(0,0,0,.4); color: #fff; font-size: 11px; padding: 1px 8px; border-radius: 10px; }

/* 按钮（uni 风格） */
.btn { display: block; width: 100%; padding: 12px; border: none; border-radius: 5px; background: #007aff; color: #fff; font-size: 17px; cursor: pointer; margin-top: 14px; }
.btn.ghost { background: #fff; color: #007aff; border: 1px solid #007aff; }
.btn.sm { display: inline-block; width: auto; padding: 7px 14px; font-size: 13px; margin-top: 0; border-radius: 4px; }
.btn.danger { background: #e64340; }
.btn[disabled] { opacity: .5; }

/* 表单 cell */
.cell { display: flex; align-items: center; padding: 12px 2px; border-bottom: 1px solid #f2f2f2; }
.cell .lab { width: 92px; color: #333; flex: none; font-size: 14px; }
.cell .lab .req { color: #e64340; margin-right: 2px; }
.cell input, .cell select, .cell textarea { flex: 1; border: none; padding: 4px 0; font-size: 14px; outline: none; background: transparent; text-align: right; }
.cell .qr-pick { width: 64px; height: 64px; background: #f2f2f2; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #999; font-size: 12px; flex: none; }
.ipt { width: 100%; padding: 12px; border: 1px solid #e3e3e3; border-radius: 6px; font-size: 15px; margin-top: 8px; box-sizing: border-box; background: #fff; }
textarea.ipt { resize: vertical; min-height: 72px; }
.seg { display: inline-flex; border: 1px solid #007aff; border-radius: 5px; overflow: hidden; }
.seg span { padding: 6px 16px; font-size: 13px; color: #007aff; cursor: pointer; }
.seg span.on { background: #007aff; color: #fff; }
.hint { color: #e64340; font-size: 12px; margin-top: 8px; }

/* 用户卡（我的） */
.usercard { display: flex; align-items: center; gap: 12px; }
.avatar { width: 50px; height: 50px; border-radius: 50%; background: #007aff; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; flex: none; }
.usercard .name { font-weight: 600; font-size: 16px; }
.usercard .sub { color: #888; font-size: 12px; margin-top: 2px; }

/* 我的菜单 */
.menulist { background: #fff; border-radius: 8px; margin-bottom: 10px; overflow: hidden; }
.menulist .mi { display: flex; justify-content: space-between; align-items: center; padding: 14px 12px; border-bottom: 1px solid #f2f2f2; font-size: 14px; cursor: pointer; }
.menulist .mi:last-child { border-bottom: none; }
.menulist .mi .arrow { color: #c0c0c0; font-size: 16px; }

/* 商品/订单条目 */
.item { background: #fff; border-radius: 8px; padding: 12px; margin-bottom: 10px; }
.item .t { font-weight: 600; }
.item .price { color: #e64340; font-weight: 700; }
.item .meta { color: #999; font-size: 12px; margin-top: 4px; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; background: #eee; color: #666; }
.tag.hot { background: #ffe9e9; color: #e64340; }
.tag.ok { background: #e7f7ec; color: #1aab4b; }

/* tabs 行（订单状态等） */
.htabs { display: flex; border-bottom: 1px solid #e5e5e5; margin-bottom: 8px; }
.htabs span { flex: 1; text-align: center; padding: 10px 0; font-size: 13px; color: #666; cursor: pointer; border-bottom: 2px solid transparent; }
.htabs span.on { color: #007aff; border-bottom-color: #007aff; font-weight: 600; }

.toast { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.8); color: #fff; padding: 10px 16px; border-radius: 20px; font-size: 13px; z-index: 99; max-width: 80%; text-align: center; }

/* 登录页 */
.login-wrap { padding: 30px 24px; }
.login-wrap .welcome { font-size: 22px; font-weight: 700; text-align: center; margin-bottom: 24px; }
.login-wrap .fld { margin-bottom: 14px; position: relative; }
.login-wrap .fld input { width: 100%; padding: 13px 12px; border: 1px solid #e3e3e3; border-radius: 8px; font-size: 15px; background: #fff; box-sizing: border-box; }
.login-wrap .remember { display: flex; align-items: center; gap: 6px; color: #666; font-size: 13px; margin: 4px 0 18px; }
.login-wrap .remember input { width: auto; }
.login-wrap .links { display: flex; justify-content: space-between; margin-top: 14px; font-size: 13px; }
.login-wrap .links a { color: #007aff; }
.agree { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #666; margin: 8px 0; }
.agree input { width: auto; }

/* 详情页通用 */
.detail-block { background: #fff; border-radius: 8px; padding: 12px; margin-bottom: 10px; }
.detail-block .k { color: #888; font-size: 12px; }
.detail-block .v { margin-top: 3px; font-size: 14px; }
.empty { text-align: center; color: #999; padding: 30px 0; font-size: 13px; }
.section-title { font-size: 14px; font-weight: 600; margin: 4px 2px 8px; }
