/* app.css —— 可交互 Web 版外壳样式（复用 base.css 里由 WXSS 转换来的小程序样式） */

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: #eef1f6;
  color: #101828;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button { border: 0; background: none; font-family: inherit; color: inherit; cursor: pointer; }

/* 小程序里 input 没有默认边框，浏览器需要重置 */
input, textarea {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  line-height: normal;
}
input:focus, textarea:focus { outline: none; }
textarea { resize: none; }

/* ---------------- 站点头部 ---------------- */
.site { max-width: 1180px; margin: 0 auto; padding: 34px 24px 60px; }

.site__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.site__title { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: 0.5px; }

.site__sub {
  margin: 8px 0 0;
  max-width: 640px;
  font-size: 13px;
  line-height: 1.75;
  color: #667085;
}
.site__sub b { color: #2e5bff; font-weight: 600; }

.site__actions { display: flex; gap: 8px; flex-wrap: wrap; }

.site__btn {
  padding: 8px 14px;
  font-size: 12px;
  color: #475467;
  background: #fff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  transition: 0.15s;
}
.site__btn:hover { color: #2e5bff; border-color: #2e5bff; }

/* ---------------- 手机外框 ---------------- */
.stage { display: flex; justify-content: center; }

.phone {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 375px;
  height: 812px;
  flex: none;
  background: #f4f6fa;
  border-radius: 40px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(16, 24, 40, 0.24), 0 0 0 1px rgba(16, 24, 40, 0.05);
}

.phone__view { position: relative; flex: 1; overflow: hidden; }

/* 状态栏 */
.statusbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 0 22px;
  font-size: 12px;
  font-weight: 600;
  color: #101828;
  pointer-events: none;
  transition: color 0.2s;
}
.statusbar--light { color: #fff; }

/* ---------------- 屏幕容器 ---------------- */
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #f4f6fa;
}

.screen__scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.screen__scroll::-webkit-scrollbar { width: 0; }

/* 导航栏 */
.navbar {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding-top: 44px;
  box-sizing: content-box;
  font-size: 16px;
  font-weight: 600;
  color: #101828;
  background: #fff;
  border-bottom: 1px solid rgba(16, 24, 40, 0.05);
}
.navbar--dark { color: #fff; background: #12224a; border-bottom: 0; }
.navbar--green { color: #fff; background: #0f9f6e; border-bottom: 0; }

.navbar__back {
  position: absolute;
  left: 4px;
  top: 44px;
  width: 44px;
  height: 44px;
  font-size: 24px;
  line-height: 42px;
  color: inherit;
  opacity: 0.85;
}
.navbar__back:hover { opacity: 0.55; }

/* ---------------- tabBar ---------------- */
.tabbar {
  flex: none;
  display: flex;
  height: 56px;
  padding-bottom: 6px;
  background: #fff;
  border-top: 1px solid #eaecf0;
}
.tabbar.is-hidden { display: none; }

.tabbar__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 10px;
  color: #8a94a6;
}
.tabbar__item.is-active { color: #2e5bff; font-weight: 600; }
.tabbar__icon { display: block; width: 24px; height: 24px; }

/* ---------------- 铺满屏幕的修正 ---------------- */
.phone .home,
.phone .rs,
.phone .qp,
.phone .hs,
.phone .ms { min-height: 100%; }

.phone .footer-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
}

.phone .rs { padding-bottom: 132px; }
.phone .qp { padding-bottom: 136px; }

/* 主按钮撑满（小程序 button 默认块级，HTML 需要补） */
button.btn:not(.qp__submit):not(.rs__btn) { width: 100%; }

/* 横向滚动的类型标签 */
.chips {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }

/* 数字输入：HTML input 有默认宽度，需要显式压到容器内 */
.num { flex: 1 1 0; min-width: 0; }
.num__box { width: 100%; min-width: 0; }
.num__input { flex: 1 1 0; width: 100%; min-width: 0; }
.qp__value { min-width: 0; }

/* 补充信息折叠区 */
.acc__body { display: none; }
.acc__body.is-open { display: block; }

/* 保价货值行：默认隐藏 */
.qp__row--hide { display: none; }

/* ---------------- 开关 ---------------- */
.switch {
  position: relative;
  flex: none;
  width: 51px;
  height: 31px;
  margin-left: 12px;
  border-radius: 999px;
  background: #e4e7ec;
  transition: background 0.2s;
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
}
.switch.is-on { background: #2e5bff; }
.switch.is-on::after { transform: translateX(20px); }

/* ---------------- 弹层容器 ---------------- */
.layers {
  position: absolute;
  inset: 0;
  z-index: 60;
  pointer-events: none;
}
.layers > * { pointer-events: auto; }

.layers .cp { position: absolute; }
.layers .cp__sheet { height: 76%; }
.layers .cp__body { overflow-y: auto; }
.layers .cp__body::-webkit-scrollbar { width: 0; }

/* 记录页删除 */
.hs__del {
  padding: 4px 8px;
  font-size: 11px;
  color: #b0b7c3;
  border-radius: 6px;
}
.hs__del:hover { color: #ff5a1f; background: #fff3ec; }

/* ---------------- 弹窗 ---------------- */
.modal {
  position: absolute;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
}
.modal__mask { position: absolute; inset: 0; background: rgba(16, 24, 40, 0.45); }

.modal__box {
  position: relative;
  width: 100%;
  max-width: 300px;
  padding: 22px 20px 16px;
  background: #fff;
  border-radius: 16px;
  text-align: center;
  animation: modal-in 0.18s ease;
}

@keyframes modal-in {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

.modal__title { font-size: 16px; font-weight: 600; }
.modal__content {
  max-height: 340px;
  margin-top: 10px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.75;
  color: #475467;
  text-align: left;
  white-space: pre-line;
}
.modal__actions { display: flex; gap: 10px; margin-top: 18px; }
.modal__btn {
  flex: 1;
  height: 40px;
  font-size: 14px;
  color: #475467;
  background: #f2f4f7;
  border-radius: 10px;
}
.modal__btn--primary { color: #fff; background: #2e5bff; }
.modal__btn--danger { color: #fff; background: #ff5a1f; }

/* ---------------- Toast ---------------- */
.toast {
  position: absolute;
  left: 50%;
  bottom: 118px;
  z-index: 80;
  max-width: 78%;
  padding: 10px 18px;
  font-size: 13px;
  line-height: 1.5;
  color: #fff;
  text-align: center;
  background: rgba(16, 24, 40, 0.86);
  border-radius: 10px;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- 提交状态条 ---------------- */
.send-status {
  margin: 0 0 12px;
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  color: #667085;
  background: #f2f4f7;
  border-radius: 10px;
}
.send-status.is-ok { color: #067647; background: #ecfdf3; }
.send-status.is-warn { color: #c2410c; background: #fff7ed; }

/* ---------------- 小屏：手机全屏 ---------------- */
@media (max-width: 760px) {
  .site { padding: 0; }
  .site__head { display: none; }
  .stage { height: 100vh; }
  .phone {
    width: 100%;
    height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }
}
