/* base.css - 原生 HTML 元素适配（配合 app.css 使用）
   响应式基准：750rpx = 屏宽，1rem = 32rpx（与 uni-app 编译产物一致）
   设计稿 375px 下：1px = 2rpx，1rem = 16px，故 rem = px/16 */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "h5titlebar", "微软雅黑", "PingFang SC", Helvetica, Arial, sans-serif;
  background-color: #f5f5f7;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
img { display: inline-block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; }

/* 页面容器（手机竖屏适配） */
.page {
  min-height: 100vh;
  background: #fff;
  position: relative;
}

/* 隐藏滚动条但可滚动 */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* 底部 Tab 栏（复刻原 APK tabBar：height 50px = 100rpx = 3.125rem） */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 3.125rem;
  background: #ffffff;
  border-top: 1px solid rgba(0,0,0,.4);
  display: flex;
  z-index: 999;
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar .tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1875rem;
  color: #999999;
  font-size: 0.625rem;
  cursor: pointer;
}
.tabbar .tab img { width: 1.5rem; height: 1.5rem; }
.tabbar .tab.active { color: #ce0000; }

/* 输入框 */
.input-box {
  background: #f9f9f9;
  border-radius: 0.3125rem;
  padding: 0.625rem 0.9375rem;
  color: #000;
  font-size: 0.875rem;
  border: none;
  outline: none;
  width: 100%;
}

/* 弹窗 */
.modal-mask {
  position: fixed;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.45);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal {
  width: 80%;
  background: #fff;
  border-radius: 0.9375rem;
  padding: 0.9375rem;
  box-shadow: 0 0 0.9375rem rgba(0,0,0,.3);
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,.75);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  z-index: 99999;
  max-width: 80%;
  text-align: center;
}

/* 数字字体 */
.num { font-family: "DIN-MED", "DINPro-Medium", var(--number-font-family, inherit); }

/* 按钮（对齐 uni-app uni-button 默认样式） */
button {
  position: relative;
  display: block;
  margin-left: auto;
  margin-right: auto;
  padding: 0.25rem 0.875rem;
  box-sizing: border-box;
  font-size: 0.9375rem;
  text-align: center;
  text-decoration: none;
  line-height: 2.4;
  border-radius: 3.125rem;
  border: none;
  outline: none;
  cursor: pointer;
  color: #000;
  background-color: #f8f8f8;
  -webkit-tap-highlight-color: transparent;
}
button[type="primary"], button.primary {
  background-image: linear-gradient(90deg, #ea7377, #e4454a);
  color: #fff;
  border: 0;
  outline: none;
}
button[type="warn"], button.warn {
  border: 1px solid #ddd;
  background-image: none;
  background-color: #fff;
  color: #595959;
}
button[type="default"], button.default {
  background-color: #ddd;
  color: #a5a5a5;
}
button:disabled { opacity: 0.5; }

/* 输入框（对齐 uni-app uni-input） */
input, textarea {
  font-size: 0.9375rem;
  line-height: 1.4;
  color: #000;
  background: transparent;
  border: none;
  outline: none;
  padding: 0;
  margin: 0;
}
input::placeholder, textarea::placeholder { color: #999; }

/* 文本（对齐 uni-app uni-text 默认 pre-line） */
.uni-text, .pre-line { white-space: pre-line; }

/* 转账成功页按钮竖排（一列，全宽） */
.succes2 .btnBox .btn,
.succes2 .btnBox .btn2 { display: block; width: 100%; box-sizing: border-box; }

/* ===== 清理 app.css 中 uniapp 组件标签重命名导致的通用选择器污染 =====
   原 uni-view/uni-slider/uni-switch/uni-text/uni-image/uni-input/
   uni-navigator/uni-checkbox/uni-icon 等组件被重命名成了
   div/span/img/input/a/label/i，污染了所有同名 HTML 元素。
   这里把通用标签还原为默认值，业务样式仍由类选择器控制（特异性更高不受影响）。 */
div { display: block; margin: 0; width: auto; height: auto; background-color: transparent; cursor: default; align-items: normal; }
span { white-space: normal; display: inline; padding: 0; font-size: inherit; border-right: none; cursor: default; }
img { position: static; overflow: visible; }
input { height: auto; min-height: auto; line-height: normal; overflow: visible; width: auto; }
label { display: inline; cursor: default; }
a { display: inline; }
i { display: inline; font-size: inherit; counter-reset: none; counter-increment: none; list-style-type: initial; }

/* ===== 子页面顶部 44px 白色占位盒子 =====
   之前用 padding-top: env(safe-area-inset-top) 做状态栏安全区适配，但在 iOS WebView
   里会额外顶出一段灰色空白区域（body 灰色背景露出），用户不需要这段。已移除该适配，
   让 44px 白色占位盒子直接从页面顶部开始。 */

/* ===== 禁用 WebView 默认长按菜单/文本选择 =====
   APK WebView 中长按图片/文本会弹出系统长按菜单，干扰自定义长按
   （转账结果选择、贷款设置、长按进入修改数据页等）。
   禁用默认长按行为，让 touchstart/mousedown 长按逻辑正常触发。 */
* {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
input, textarea {
  -webkit-user-select: text;
  user-select: text;
}
img {
  -webkit-user-drag: none;
  -webkit-user-select: none;
}

/* ===== 深色模式兜底：金额/数字元素保持黑色，避免继承 body 的近白色 ===== */
@media (prefers-color-scheme: dark){
  .price-font,
  .passbox .text,
  .passbox .price,
  .import .left .number,
  .sinbox .item .right,
  .zhichang .price-font,
  .zhichang-hidden .price-font{color:#000}
}

/* ===== 返回图标放大：修改页等子页面返回箭头太小，放大并扩大点击区域 ===== */
.back, .back-icon, .query-back, .detail-back {
  width: 1.5rem !important;
  height: 1.5rem !important;
  padding: 0.375rem;
  cursor: pointer;
}
