:root {
  --primary: #ff6a00;
  --primary-dark: #e85d00;
  --accent: #00b578;
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #1a1a1a;
  --text-2: #666666;
  --text-3: #999999;
  --border: #ececec;
  --danger: #f04438;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

/* 移动端容器 */
.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  padding-bottom: 70px;
}

.hidden { display: none !important; }

/* 顶部导航 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--primary);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar .brand { font-size: 18px; font-weight: 700; }
.topbar .brand span { font-size: 12px; font-weight: 400; opacity: .85; margin-left: 6px; }
.topbar .action { color: #fff; font-size: 14px; text-decoration: none; }

/* 卡片 */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  margin: 12px 16px;
  box-shadow: var(--shadow);
}

/* 表单 */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  background: #fafafa;
  outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--primary);
  background: #fff;
}
.field textarea { resize: vertical; min-height: 70px; }

/* 按钮 */
.btn {
  display: block;
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: opacity .15s;
}
.btn:active { opacity: .8; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-ghost { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-danger { background: #fff; color: var(--danger); border: 1px solid #ffd6d3; }
.btn-sm { display: inline-block; width: auto; padding: 7px 14px; font-size: 13px; border-radius: 8px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* 底部标签栏 */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
}
.tabbar a {
  flex: 1;
  text-align: center;
  padding: 10px 0 8px;
  color: var(--text-3);
  text-decoration: none;
  font-size: 11px;
}
.tabbar a .icon { font-size: 22px; display: block; line-height: 1; margin-bottom: 2px; }
.tabbar a.active { color: var(--primary); }

/* 列表项 */
.item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.item .item-main { flex: 1; }
.item .item-title { font-size: 15px; font-weight: 600; }
.item .item-sub { font-size: 13px; color: var(--text-3); margin-top: 3px; }
.item .item-right { text-align: right; }

/* 状态标签 */
.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.tag-pending { background: #fff3e6; color: var(--primary); }
.tag-accepted { background: #e6f0ff; color: #2f6bff; }
.tag-picking { background: #fff7e6; color: #f5a623; }
.tag-delivering { background: #e6f7f0; color: #00a06b; }
.tag-completed { background: #e8f5ee; color: #00a06b; }
.tag-cancelled { background: #f0f0f0; color: #999; }

/* 时间线 */
.timeline { padding: 4px 0; }
.timeline .tl-item {
  display: flex;
  margin-bottom: 14px;
}
.timeline .tl-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--primary);
  margin: 4px 10px 0 0;
  flex-shrink: 0;
}
.timeline .tl-text { font-size: 13px; color: var(--text-2); }
.timeline .tl-time { font-size: 11px; color: var(--text-3); margin-top: 2px; }

/* 地址节点 */
.route-addr { display: flex; margin: 10px 0; }
.route-addr .dot { width: 8px; height: 8px; border-radius: 50%; margin: 6px 10px 0 2px; flex-shrink: 0; }
.route-addr .dot.pick { background: var(--accent); }
.route-addr .dot.deliver { background: var(--primary); }
.route-addr .addr-text { flex: 1; }
.route-addr .addr-name { font-size: 14px; font-weight: 600; }
.route-addr .addr-detail { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* 段选择器 */
.seg {
  display: flex;
  background: #f0f0f0;
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 16px;
}
.seg .seg-item {
  flex: 1;
  text-align: center;
  padding: 9px 0;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  color: var(--text-2);
}
.seg .seg-item.active { background: #fff; color: var(--primary); font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,.08); }

/* 提示 */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,.8);
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 999;
  pointer-events: none;
}

/* 登录/注册页 */
.auth-page {
  min-height: 100vh;
  background: linear-gradient(160deg, #ff6a00 0%, #ff8c33 100%);
  padding: 60px 24px 40px;
}
.auth-page .logo {
  text-align: center;
  color: #fff;
  margin-bottom: 40px;
}
.auth-page .logo .t { font-size: 30px; font-weight: 800; }
.auth-page .logo .s { font-size: 14px; opacity: .9; margin-top: 8px; }
.auth-box { background: #fff; border-radius: 16px; padding: 24px; box-shadow: 0 8px 30px rgba(0,0,0,.15); }

/* 首页 */
.hero {
  background: linear-gradient(160deg, #ff6a00 0%, #ff8c33 100%);
  color: #fff;
  padding: 24px 20px 30px;
  border-radius: 0 0 24px 24px;
}
.hero .welcome { font-size: 20px; font-weight: 700; }
.hero .sub { font-size: 13px; opacity: .9; margin-top: 6px; }
.mode-cards { display: flex; gap: 12px; margin: 16px; }
.mode-card {
  flex: 1;
  background: #fff;
  border-radius: 14px;
  padding: 20px 16px;
  text-align: center;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.mode-card .mi { font-size: 36px; }
.mode-card .mt { font-size: 16px; font-weight: 700; margin-top: 8px; }
.mode-card .md { font-size: 12px; color: var(--text-3); margin-top: 4px; }

/* 头部统计 */
.stats { display: flex; gap: 10px; }
.stat-box {
  flex: 1;
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-box .num { font-size: 22px; font-weight: 800; color: var(--primary); }
.stat-box .label { font-size: 12px; color: var(--text-3); margin-top: 4px; }

.page-title { font-size: 17px; font-weight: 700; padding: 16px 16px 4px; }

/* 金额 */
.price { color: var(--primary); font-weight: 700; }
.price-big { font-size: 24px; }

/* 空状态 */
.empty { text-align: center; padding: 60px 20px; color: var(--text-3); }
.empty .ei { font-size: 50px; margin-bottom: 12px; }
