* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

html,
body {
  width: 100%;
  min-height: 100%;
  background: #20242a;
  color: #232930;
  font-family: "Microsoft YaHei", "PingFang SC", "STHeitiSC-Light", Helvetica, Arial, sans-serif;
}

body {
  display: flex;
  justify-content: center;
  overflow-x: hidden;
  line-height: 1;
  -webkit-text-size-adjust: none;
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-backface-visibility: hidden;
}

button,
input,
textarea,
select {
  border: 0;
  outline: none;
  font: inherit;
}

button {
  cursor: default;
}

input,
textarea {
  appearance: none;
  -webkit-user-select: auto;
  user-select: auto;
}

input::placeholder,
textarea::placeholder {
  color: #bbb;
}

img {
  display: block;
  max-width: 100%;
}

ul,
ol,
li {
  list-style: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

.cancopy {
  -webkit-user-select: auto;
  user-select: auto;
}

/* 静态页面手机外壳 */
.app-shell {
  position: relative;
  width: 100%;
  max-width: 375px;
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background: #f4f4f4;
}

/* 通用颜色变量 */
:root {
  --iloan-primary: #ffde2b;
  --iloan-primary-deep: #ff9c00;
  --iloan-primary-gradient: linear-gradient(139deg, #ffed3e 0%, #ffde2b 100%);
  --iloan-danger: #f12506;
  --iloan-text: #232930;
  --iloan-text-strong: #000;
  --iloan-text-muted: #999;
  --iloan-border: #ddd;
  --iloan-page-bg: #f4f4f4;
  --iloan-card-bg: #fff;
}

/* 顶部导航 */
.van-nav-bar {
  position: relative;
  z-index: 2;
  height: 46px;
  background: #fff;
  color: #000;
}

.van-nav-bar--fixed {
  position: sticky;
  top: 0;
}

.van-nav-bar__content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 46px;
}

.van-nav-bar__left,
.van-nav-bar__right {
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  color: #000;
  font-size: 14px;
}

.van-nav-bar__left {
  left: 16px;
}

.van-nav-bar__right {
  right: 16px;
}

.van-nav-bar__title {
  max-width: 70%;
  overflow: hidden;
  color: #000;
  font-size: 16px;
  font-weight: 500;
  line-height: 46px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.van-icon-arrow-left::before {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  content: "";
  transform: rotate(45deg);
}

/* 通用内容区域 */
.page-content {
  min-height: calc(100vh - 46px);
  background: #f4f4f4;
}

.page-content--with-tabbar {
  padding-bottom: 60px;
}

.page-section {
  padding: 12px 16px;
}

/* Vant 按钮基础结构 */
.van-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #323233;
  text-align: center;
  white-space: nowrap;
}

.van-button__content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.van-button__text {
  overflow: hidden;
  text-overflow: ellipsis;
}

.van-button--round {
  border-radius: 55px;
}

.van-button--block {
  display: flex;
  width: 100%;
}

.van-button--info,
.van-button--primary {
  height: 55px;
  border: none;
  border-radius: 55px;
  background: var(--iloan-primary-gradient);
  color: #000;
  font-size: 18px;
  line-height: 55px;
}

.van-button--info .van-button__text,
.van-button--primary .van-button__text {
  font-weight: 700;
}

.van-button--danger {
  background: var(--iloan-danger);
  color: #fff;
}

.van-button--warning {
  background: var(--iloan-primary-deep);
  color: #fff;
}

.van-button--plain {
  border: 1px solid var(--iloan-primary-deep);
  background: #fff;
  color: var(--iloan-primary-deep);
}

/* 底部固定主按钮 */
.fixed.van-button,
.fixed.van-button--info,
.fixed.van-button--primary {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  max-width: 375px;
  height: 55px;
  margin: 0 auto;
  border-radius: 0;
  font-size: 18px;
  font-weight: 700;
}

/* 表单提交主按钮 */
.submit.van-button,
.submit.van-button--info,
.submit.van-button--primary {
  width: 100%;
  height: 55px;
  border: none;
  border-radius: 55px;
  background: var(--iloan-primary-gradient);
  color: #000;
  font-size: 18px;
  font-weight: 700;
}

/* Cell 和表单输入公共样式 */
.van-cell {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  background: #fff;
  color: #323233;
  font-size: 14px;
  line-height: 24px;
}

.van-cell::after {
  position: absolute;
  right: 16px;
  bottom: 0;
  left: 16px;
  height: 1px;
  background: var(--iloan-border);
  content: "";
  transform: scaleY(0.5);
}

.van-cell:last-child::after {
  display: none;
}

.van-cell-group {
  overflow: hidden;
  background: #fff;
}

.van-cell__title,
.van-cell__value {
  min-width: 0;
  flex: 1;
}

.van-cell__value {
  color: #969799;
  text-align: right;
}

.van-field {
  min-height: 50px;
}

.van-field__label {
  width: auto;
  margin-right: 10px;
  color: #323233;
}

.van-field__body {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
}

.van-field__control {
  display: block;
  width: 100%;
  min-width: 0;
  height: 30px;
  border: 0;
  background: transparent;
  color: #323233;
  font-size: 14px;
  line-height: 30px;
}

.van-field__control:disabled {
  color: #323233;
  -webkit-text-fill-color: #323233;
}

.van-field__right-icon {
  flex: 0 0 auto;
  margin-left: 8px;
  color: var(--iloan-primary-deep);
}

/* 静态页面复刻 Vant Field 的通用输入容器 */
.vl-field {
  display: flex;
  align-items: center;
  min-height: 50px;
  overflow: hidden;
  border-bottom: 1px solid #cbcbcb;
  background: #fff;
  color: #383838;
}

.vl-field__icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-right: 10px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
}

.vl-field__prefix {
  flex: 0 0 auto;
  margin-right: 10px;
  color: #383838;
  font-size: 14px;
}

.vl-field__control {
  min-width: 0;
  flex: 1;
  height: 48px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #383838;
  font-size: 14px;
}

.vl-field__control::placeholder {
  color: #bbb;
}

.vl-field__button {
  flex: 0 0 auto;
  min-width: 84px;
  height: 34px;
  padding: 0 12px;
  border-radius: 17px;
  background: #100146;
  color: #fff;
  font-size: 12px;
}

/* 复选框公共样式 */
.van-checkbox {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.van-checkbox__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  border: 1px solid #c8c9cc;
  border-radius: 50%;
  background: #fff;
}

.van-checkbox__icon--checked {
  border-color: #4dd077;
  background: #4dd077;
}

.van-checkbox__icon--checked::after {
  width: 8px;
  height: 4px;
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  content: "";
  transform: rotate(-45deg);
}

/* 遮罩、弹窗和 Popup */
.van-overlay,
.dialog-mask {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
}

.dialog-mask {
  display: none;
}

.dialog-mask.is-show {
  display: flex;
}

.van-overlay[hidden],
.van-popup[hidden] {
  display: none;
}

.van-dialog,
.vl-dialog {
  position: relative;
  width: min(320px, calc(100% - 48px));
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  color: #323233;
  font-size: 16px;
}

.van-dialog__header {
  padding: 24px 24px 0;
  color: #000;
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
  text-align: center;
}

.van-dialog__content {
  padding: 20px 24px;
  color: #646566;
  font-size: 14px;
  line-height: 22px;
}

.van-dialog__footer {
  display: flex;
  border-top: 1px solid #ebedf0;
}

.van-dialog__cancel,
.van-dialog__confirm {
  flex: 1;
  height: 48px;
  background: #fff;
  color: #323233;
  font-size: 16px;
}

.van-dialog__confirm {
  color: var(--iloan-primary-deep);
}

.van-popup {
  position: fixed;
  z-index: 21;
  max-width: 375px;
  background: #fff;
}

.van-popup--bottom {
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  margin: 0 auto;
  border-radius: 16px 16px 0 0;
}

.van-popup--right {
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
}

/* Tab 和列表切换 */
.van-tabs {
  background: #fff;
}

.van-tabs__wrap {
  position: relative;
  height: 44px;
  overflow: hidden;
}

.van-tabs__nav {
  display: flex;
  height: 44px;
  background: #fff;
}

.van-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  flex: 1;
  color: #646566;
  font-size: 14px;
}

.van-tab--active {
  color: var(--iloan-primary-deep);
  font-weight: 700;
}

.van-tabs__line {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 40px;
  height: 3px;
  border-radius: 3px;
  background: var(--iloan-primary-deep);
  transform: translateX(-50%);
}

/* 底部 Tabbar */
.van-tabbar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  display: flex;
  width: 100%;
  max-width: 375px;
  height: 50px;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 -1px 8px rgba(0, 0, 0, 0.06);
}

.van-tabbar-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  flex: 1;
  color: #646566;
  font-size: 12px;
  text-align: center;
}

.van-tabbar-item--active {
  color: var(--iloan-primary-deep);
}

.van-tabbar-item__icon {
  width: 24px;
  height: 24px;
  margin: 0 auto 2px;
  font-size: 24px;
}

.van-tabbar-item__text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Picker 选择器 */
.van-picker {
  background: #fff;
}

.van-picker__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  border-bottom: 1px solid #ebedf0;
}

.van-picker__cancel,
.van-picker__confirm {
  min-width: 64px;
  height: 44px;
  padding: 0 16px;
  background: transparent;
  color: var(--iloan-primary-deep);
  font-size: 14px;
}

.van-picker__title {
  color: #323233;
  font-size: 16px;
  font-weight: 700;
}

.van-picker-column__item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  color: #323233;
  font-size: 16px;
}

/* 静态展示常用工具类 */
.is-hidden {
  display: none !important;
}

.text-primary {
  color: var(--iloan-primary-deep) !important;
}

.text-danger {
  color: var(--iloan-danger) !important;
}

.text-muted {
  color: var(--iloan-text-muted) !important;
}

.card {
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
}
