/* ============================================================
   assets/css/app.css - 小猫咪到家网站版统一样式
   视觉上沿用原微信小程序（暖色米白底 + 橙红主色）
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #FFF8EE;
  --card: #FFFFFF;
  --primary: #E87A5A;
  --primary-dark: #D96A4A;
  --accent: #BFA98F;
  --text: #4A3B32;
  --text-light: #9A8B80;
  --green: #52B788;
  --border: #F0E6D9;
  --radius: 24px;
  --shadow: 0 8px 24px rgba(232, 122, 90, 0.10);
}
html, body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

/* ---------- 布局容器 ---------- */
.page-nav { height: 64px; }
.page { max-width: 980px; margin: 0 auto; padding: 16px 16px 80px; }
.section { margin-bottom: 28px; }
.section__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.section__title { font-size: 20px; font-weight: 700; }
.section__more { color: var(--accent); font-size: 14px; }
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px;
}
.muted { color: var(--text-light); font-size: 13px; }
.empty {
  text-align: center; color: var(--text-light);
  padding: 60px 0; font-size: 14px;
}

/* ---------- 顶部导航 ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: #FFFFFF; border-bottom: 1px solid var(--border);
}
.topbar__inner {
  max-width: 980px; margin: 0 auto; height: 64px;
  display: flex; align-items: center; gap: 8px; padding: 0 16px;
}
.topbar__logo { font-size: 20px; font-weight: 800; color: var(--primary); white-space: nowrap; }
.topbar__logo small { font-size: 12px; color: var(--accent); font-weight: 400; margin-left: 6px; }
.topbar__nav { flex: 1; display: flex; gap: 4px; margin-left: 16px; overflow-x: auto; }
.topbar__nav a {
  padding: 8px 14px; border-radius: 999px; font-size: 15px;
  color: var(--accent); white-space: nowrap;
}
.topbar__nav a.on { background: var(--primary); color: #fff; }
.topbar__admin {
  padding: 8px 16px; border-radius: 999px; font-size: 14px;
  border: 1px solid var(--primary); color: var(--primary);
}

/* ---------- 底部栏（移动端） ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: #fff; border-top: 1px solid var(--border);
  display: flex; display: none;
}
.tabbar a {
  flex: 1; text-align: center; padding: 10px 0 12px;
  color: var(--accent); font-size: 12px;
}
.tabbar a.on { color: var(--primary); }
.tabbar .tabbar__icon { font-size: 22px; line-height: 1; display: block; margin-bottom: 2px; }
@media (max-width: 768px) {
  .tabbar { display: flex; }
  .topbar__nav { display: none; }
  .topbar__admin { margin-left: auto; }
  .page { padding-bottom: 90px; }
}

/* ---------- 轮播 ---------- */
.banner { position: relative; border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; }
.banner img { width: 100%; height: 150px; object-fit: cover; }
.banner__title {
  position: absolute; left: 16px; bottom: 14px; color: #fff;
  font-size: 20px; font-weight: 700; text-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.banner__dots { position: absolute; right: 16px; bottom: 14px; display: flex; gap: 5px; }
.banner__dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.5); }
.banner__dots i.on { background: #fff; }

/* ---------- 猫咪卡片 ---------- */
.cat-scroll { display: flex; overflow-x: auto; gap: 14px; padding-bottom: 6px; }
.cat-card {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  width: 150px; flex-shrink: 0; cursor: pointer;
}
.cat-card--fluid { width: 100%; }
.cat-card__cover { width: 150px; height: 150px; object-fit: cover; }
.cat-card--fluid .cat-card__cover { width: 100%; height: 200px; }
.cat-card__body { padding: 12px; }
.cat-card__name { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.cat-card__meta { font-size: 12px; color: var(--text-light); margin-top: 4px; }
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; background: #FBEFE4; color: var(--primary-dark);
}
.cat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px;
}

/* ---------- 服务流程 ---------- */
.flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.flow__item { text-align: center; }
.flow__icon {
  width: 46px; height: 46px; margin: 0 auto 6px; border-radius: 50%;
  background: #FBEFE4; color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.flow__title { font-size: 13px; font-weight: 600; }
.flow__desc { font-size: 11px; color: var(--text-light); margin-top: 2px; }
@media (max-width: 768px) { .flow { grid-template-columns: repeat(5, 1fr); } }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block; padding: 12px 26px; border: none; border-radius: 999px;
  font-size: 16px; background: var(--primary); color: #fff; text-align: center;
  transition: opacity .15s;
}
.btn:active { opacity: .85; }
.btn--block { width: 100%; }
.btn--ghost { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn--gray { background: #F0E6D9; color: var(--text); }
.btn--sm { padding: 7px 16px; font-size: 13px; }
.btn[disabled] { background: #E3D9CE; color: #fff; cursor: not-allowed; }
.btn--danger { background: #E55B5B; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field__label { font-size: 14px; color: var(--text); margin-bottom: 6px; display: block; font-weight: 600; }
.field__label b { color: var(--primary); }
.input, select.input, textarea.input {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: 14px; font-size: 15px; background: #fff; color: var(--text);
  outline: none; resize: none;
}
.input:focus { border-color: var(--primary); }
textarea.input { min-height: 88px; }
.form-tip { font-size: 12px; color: var(--text-light); margin-top: 4px; }

/* ---------- 猫咪详情 ---------- */
.detail-hero { position: relative; border-radius: var(--radius); overflow: hidden; }
.detail-hero img { width: 100%; height: 260px; object-fit: cover; }
.detail-hero .badge { position: absolute; top: 12px; right: 12px; }
.detail-title { font-size: 24px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.tag {
  padding: 4px 12px; background: #F7F0E6; border-radius: 999px;
  font-size: 12px; color: var(--text);
}
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; text-align: center; }
.info-cell { background: #FBF5EC; border-radius: 14px; padding: 10px 6px; }
.info-cell b { font-size: 18px; color: var(--primary); display: block; }
.info-cell span { font-size: 12px; color: var(--text-light); }

/* ---------- 预约表单 ---------- */
.date-scroll { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.date-chip {
  flex-shrink: 0; width: 74px; padding: 10px 4px; text-align: center;
  border-radius: 14px; background: #FBF5EC; cursor: pointer;
}
.date-chip.on { background: var(--primary); color: #fff; }
.date-chip b { display: block; font-size: 18px; }
.date-chip span { font-size: 11px; }
.slot-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.slot {
  padding: 12px; text-align: center; border-radius: 14px;
  background: #FBF5EC; cursor: pointer; font-size: 14px;
}
.slot.on { background: var(--primary); color: #fff; }
.slot[disabled] { opacity: .4; cursor: not-allowed; }
.hour-pick { display: flex; gap: 10px; flex-wrap: wrap; }
.hour {
  padding: 10px 20px; border-radius: 999px; background: #FBF5EC;
  cursor: pointer; font-size: 14px;
}
.hour.on { background: var(--primary); color: #fff; }

/* ---------- 价格条 ---------- */
.pricebar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: #fff; border-top: 1px solid var(--border);
  padding: 12px 16px;
}
.pricebar__inner { max-width: 980px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.pricebar .price { font-size: 22px; font-weight: 800; color: var(--primary); }
.pricebar .price small { font-size: 13px; font-weight: 400; color: var(--text-light); }
@media (max-width: 768px) { .pricebar { bottom: 60px; } }
.safelock { position: fixed; bottom: 84px; left: 0; right: 0; z-index: 85; max-width: 980px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 769px) { .safelock { bottom: 64px; } }

/* ---------- 订单 ---------- */
.order-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 14px; overflow: hidden; }
.order-card__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.order-card__status { font-size: 14px; font-weight: 700; color: var(--primary); }
.order-card__body { display: flex; gap: 12px; padding: 14px 16px; }
.order-card__cover { width: 76px; height: 76px; border-radius: 14px; object-fit: cover; flex-shrink: 0; }
.order-card__name { font-size: 16px; font-weight: 700; }
.order-card__meta { font-size: 13px; color: var(--text-light); margin-top: 4px; }
.order-card__foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; background: #FBF7F0;
}
.filter-row { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; }
.fchip {
  padding: 8px 18px; border-radius: 999px; background: #FBF5EC;
  font-size: 13px; cursor: pointer; white-space: nowrap;
}
.fchip.on { background: var(--primary); color: #fff; }

/* ---------- 时间线 ---------- */
.timeline { padding-left: 4px; }
.timeline__item { position: relative; padding-left: 24px; padding-bottom: 18px; }
.timeline__item:before {
  content: ''; position: absolute; left: 6px; top: 4px; bottom: 0;
  width: 2px; background: var(--border);
}
.timeline__item:last-child:before { display: none; }
.timeline__item:after {
  content: ''; position: absolute; left: 1px; top: 5px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--primary); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--primary);
}
.timeline__note { font-size: 14px; }
.timeline__time { font-size: 12px; color: var(--text-light); }

/* ---------- 评价 ---------- */
.star-row { font-size: 32px; color: #E8DCCF; display: flex; gap: 6px; }
.star-row .on { color: #F5B94A; }
.star-row i { cursor: pointer; font-style: normal; }
.review-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin-bottom: 12px; }
.review-card__top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.review-card__avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.review-card__name { font-size: 14px; font-weight: 600; }
.review-card__stars { color: #F5B94A; font-size: 13px; }
.review-card__content { font-size: 14px; color: var(--text); }

/* ---------- 登录(后台) ---------- */
.login-wrap { max-width: 380px; margin: 80px auto; text-align: center; }
.login-wrap h1 { font-size: 22px; margin-bottom: 6px; color: var(--primary); }
.login-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; margin-top: 20px; }
.admin-nav {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px;
}
.admin-nav a {
  padding: 8px 16px; border-radius: 999px; background: #fff;
  border: 1px solid var(--border); font-size: 13px;
}
.admin-nav a.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: 16px; box-shadow: var(--shadow); padding: 16px; text-align: center; }
.stat-card b { display: block; font-size: 28px; color: var(--primary); }
.stat-card span { font-size: 12px; color: var(--text-light); }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; min-width: 640px; }
th, td { padding: 12px 14px; text-align: left; font-size: 14px; border-bottom: 1px solid var(--border); }
th { background: #FBF7F0; color: var(--text); font-weight: 600; position: sticky; top: 64px; }
tr:hover td { background: #FDF9F2; }
.mini-btn {
  padding: 5px 12px; border-radius: 999px; border: 1px solid var(--primary);
  color: var(--primary); background: #fff; font-size: 12px; cursor: pointer;
}
.mini-btn.on { background: var(--primary); color: #fff; }

/* ---------- 页脚 ---------- */
.footer { text-align: center; color: var(--text-light); font-size: 12px; padding: 24px 0 8px; }

/* ---------- 工具类 ---------- */
.flex { display: flex; align-items: center; gap: 8px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.hide-scrollbar::-webkit-scrollbar { display: none; }
.modal-mask {
  position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal {
  background: #fff; border-radius: 20px; width: 100%; max-width: 400px;
  padding: 24px; box-shadow: 0 12px 40px rgba(0,0,0,.2); max-height: 86vh; overflow-y: auto;
}
.modal h3 { margin-bottom: 14px; font-size: 18px; }
.agree-line { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--text); margin-bottom: 8px; cursor: pointer; }
.agree-line a { color: var(--primary); }
.agree-line input { margin-top: 3px; }
