/* ============================================
   企业微信查询应用 — 移动端优先样式
   ============================================ */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Microsoft YaHei", sans-serif;
  background: #f5f6f9;
  color: #333;
  font-size: 15px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

/* ---- 顶部导航 ---- */
.header {
  background: linear-gradient(135deg, #1677ff, #4096ff);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.header h1 { font-size: 18px; font-weight: 600; }
.header .back {
  font-size: 20px; color: #fff; text-decoration: none;
  line-height: 1; padding: 4px 0;
}

/* ---- 搜索栏 ---- */
.search-bar {
  margin: 12px 16px;
  display: flex;
  gap: 8px;
}
.search-bar input {
  flex: 1;
  height: 42px;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 15px;
  outline: none;
  background: #fff;
}
.search-bar input:focus { border-color: #1677ff; }
.search-bar button {
  height: 42px;
  padding: 0 20px;
  background: #1677ff;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
}
.search-bar button:active { opacity: 0.8; }

/* ---- 结果区域 ---- */
.result-info {
  margin: 0 16px 8px;
  font-size: 13px;
  color: #999;
}
.result-list { margin: 0 16px 20px; }

/* 卡片 */
.card {
  background: #fff;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.card .title {
  font-size: 16px;
  font-weight: 600;
  color: #222;
  margin-bottom: 6px;
}
.card .row {
  display: flex;
  font-size: 14px;
  color: #666;
  margin-bottom: 3px;
}
.card .row .label {
  width: 56px;
  flex-shrink: 0;
  color: #999;
}
.card .row .value { flex: 1; }

/* 余额高亮 */
.card .balance {
  font-size: 18px;
  font-weight: 700;
  color: #e65c00;
}

/* 消费记录小列表 */
.record-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
}
.record-item:last-child { border-bottom: none; }

.r-desc {
  flex: 1 1 auto;
  min-width: 48px;
  color: #333;
}

.r-debit {
  color: #e65c00;
  font-weight: 600;
  white-space: nowrap;
}

.r-credit {
  color: #52c41a;
  font-weight: 600;
  white-space: nowrap;
}

.r-balance-label {
  color: #bbb;
  font-size: 12px;
}

.r-balance {
  color: #666;
  font-weight: 500;
  white-space: nowrap;
}

.r-time {
  width: 100%;
  color: #bbb;
  font-size: 11px;
  margin-top: 2px;
}

/* ---- 首页入口卡片 ---- */
.home-list { margin: 20px 16px; }
.entry-card {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 10px;
  padding: 18px 16px;
  margin-bottom: 12px;
  text-decoration: none;
  color: #333;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transition: transform 0.1s;
}
.entry-card:active { transform: scale(0.98); }
.entry-card .icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-right: 14px;
  flex-shrink: 0;
}
.entry-card .icon.person { background: #e6f4ff; color: #1677ff; }
.entry-card .icon.car    { background: #fff7e6; color: #fa8c16; }
.entry-card .icon.food   { background: #f6ffed; color: #52c41a; }
.entry-card .info .name { font-size: 16px; font-weight: 600; }
.entry-card .info .desc { font-size: 13px; color: #999; margin-top: 2px; }
.entry-card .arrow { margin-left: auto; color: #ccc; font-size: 18px; }

/* ---- 详情区 ---- */
.detail-section {
  margin: 12px 16px;
}
.detail-section h3 {
  font-size: 15px;
  color: #1677ff;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e8e8e8;
}

/* ---- 空状态 ---- */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: #bbb;
}
.empty .icon { font-size: 48px; margin-bottom: 10px; }

/* ---- 加载中 ---- */
.loading {
  text-align: center;
  padding: 40px;
  color: #999;
}
