/* 小程序内置组件的网页默认样式（尽量贴近微信） */
:root { --rpx: calc(min(100vw, 480px) / 750); --navh: 44px; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #eef1f5; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif; -webkit-tap-highlight-color: transparent; }
body.need-login #wx-nav, body.need-login #wx-pages { display: none; }
#wx-pages { padding-top: var(--navh); }
.wx-page { min-height: calc(100vh - var(--navh)); box-sizing: border-box; }
.wx-text { white-space: pre-line; user-select: text; }
.wx-image { width: 320px; height: 240px; display: inline-block; }
.wx-page .img-widthFix { height: auto; }
.wx-page .img-aspectFit { object-fit: contain; } .wx-page .img-aspectFill { object-fit: cover; }
.wx-scroll-view { display: block; }
.wx-scroll-x { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
.wx-scroll-y { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.wx-input { display: block; border: 0; outline: 0; background: transparent; font: inherit; color: inherit; padding: 0; margin: 0; height: 1.4em; min-height: 1.4em; line-height: 1.4em; box-sizing: border-box; width: 100%; text-align: inherit; border-radius: 0; -webkit-appearance: none; appearance: none; }
.wx-input::placeholder, .wx-textarea::placeholder { color: #b5b5b5; }
.wx-input:disabled, .wx-textarea:disabled { color: inherit; opacity: 1; -webkit-text-fill-color: currentColor; }
.wx-textarea { display: block; width: 300px; height: 150px; border: 0; outline: 0; background: transparent; font: inherit; color: inherit; padding: 0; margin: 0; resize: vertical; box-sizing: border-box; line-height: 1.5; }
.wx-autoh { height: auto; min-height: 3em; field-sizing: content; }
.wx-button { display: block; position: relative; margin: 0 auto; padding: 0 14px; box-sizing: border-box; font: inherit; font-size: 17px; text-align: center; line-height: 2.55555556; border-radius: 5px; color: #000; background: #f2f2f2; border: 0; cursor: pointer; overflow: hidden; -webkit-appearance: none; }
.wx-button:disabled { opacity: .5; cursor: default; }
.wx-btn-primary { background: #07c160; color: #fff; }
.wx-btn-warn { background: #fa5151; color: #fff; }
.wx-btn-mini { display: inline-block; font-size: 13px; padding: 0 1.34em; line-height: 2.3; }
.wx-btn-plain { background: transparent; border: 1px solid currentColor; }
.wx-page button:not(:disabled):active { filter: brightness(.94); }
.wx-picker { position: relative; display: block; cursor: pointer; }
.wx-picker-native { position: absolute; left: 0; top: 0; width: 100%; height: 100%; opacity: 0; margin: 0; padding: 0; border: 0; font-size: 16px; cursor: pointer; z-index: 2; -webkit-appearance: none; appearance: none; }
.wx-picker-native:disabled { cursor: default; display: none; }
input[type=date].wx-picker-native::-webkit-calendar-picker-indicator { position: absolute; left: 0; top: 0; width: 100%; height: 100%; margin: 0; padding: 0; cursor: pointer; }
.wx-switch { display: inline-block; position: relative; width: 52px; height: 32px; border-radius: 16px; background: #dfdfdf; transition: background .2s; vertical-align: middle; cursor: pointer; flex: none; }
.wx-switch i { position: absolute; top: 2px; left: 2px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: left .2s; }
.wx-switch.on { background: #07c160; }
.wx-switch.on i { left: 22px; }
.wx-checkbox { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.wx-checkbox i { display: inline-flex; width: 18px; height: 18px; border: 1px solid #ccc; border-radius: 3px; align-items: center; justify-content: center; font-style: normal; font-size: 13px; color: #07c160; }
.wx-nav { cursor: pointer; }
.wx-page [class*="btn"], .wx-page [bindtap] { cursor: pointer; }

/* 顶部导航 */
#wx-nav { position: fixed; top: 0; left: 0; right: 0; height: var(--navh); z-index: 50; background: #17325c; color: #fff; display: flex; align-items: center; padding: 0 6px; box-sizing: border-box; }
#wx-nav .nb-back { width: 40px; font-size: 30px; line-height: 40px; text-align: center; cursor: pointer; visibility: hidden; flex: none; }
#wx-nav .nb-t { flex: 1; text-align: center; font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#wx-nav .nb-r { width: 80px; display: flex; justify-content: flex-end; gap: 4px; flex: none; }
#wx-nav .nb-r span { width: 36px; height: 36px; line-height: 36px; text-align: center; font-size: 19px; cursor: pointer; border-radius: 4px; }
#wx-nav .nb-r span:hover, #wx-nav .nb-back:hover { background: rgba(255,255,255,.12); }
#wx-nav .spin { animation: wxspin 1s linear infinite; }
@keyframes wxspin { to { transform: rotate(360deg); } }

/* 提示 / 弹窗 / 加载 */
#wx-toast { position: fixed; z-index: 3000; left: 50%; top: 45%; transform: translate(-50%, -50%); background: rgba(17,17,17,.82); color: #fff; border-radius: 8px; text-align: center; display: none; max-width: 80vw; }
#wx-toast.icon { min-width: 120px; padding: 18px 14px 14px; }
#wx-toast.plain { padding: 10px 16px; font-size: 14px; }
#wx-toast .ti { font-size: 34px; line-height: 40px; margin-bottom: 4px; }
#wx-toast .ti.spin { animation: wxspin 1s linear infinite; }
#wx-toast .tt { font-size: 14px; line-height: 1.4; word-break: break-all; }
#wx-loading { position: fixed; inset: 0; z-index: 2900; display: none; align-items: center; justify-content: center; }
#wx-loading .box { background: rgba(17,17,17,.82); color: #fff; border-radius: 8px; padding: 18px 20px 12px; min-width: 110px; text-align: center; }
#wx-loading .sp { width: 30px; height: 30px; margin: 0 auto 8px; border: 3px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: wxspin .8s linear infinite; }
#wx-loading .tt { font-size: 14px; }
.wx-mask { position: fixed; inset: 0; z-index: 2800; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; }
.wx-modal { width: 320px; max-width: 86vw; background: #fff; border-radius: 12px; overflow: hidden; text-align: center; }
.wx-modal .mt { font-size: 17px; font-weight: 600; padding: 26px 20px 8px; }
.wx-modal .mc { font-size: 15px; color: #555; padding: 4px 22px 22px; white-space: pre-line; word-break: break-all; max-height: 60vh; overflow: auto; text-align: left; }
.wx-modal .mt + .mc { text-align: center; }
.wx-modal .mi { width: 100%; box-sizing: border-box; border: 1px solid #ddd; border-radius: 6px; padding: 8px; font: inherit; font-size: 15px; resize: vertical; }
.wx-modal .mb { display: flex; border-top: 1px solid #eee; }
.wx-modal .mb .b { flex: 1; height: 50px; line-height: 50px; font-size: 17px; font-weight: 600; cursor: pointer; }
.wx-modal .mb .b + .b { border-left: 1px solid #eee; }
.wx-mask.as { align-items: flex-end; }
.wx-sheet { width: 100%; max-width: 520px; background: #f2f2f2; border-radius: 12px 12px 0 0; overflow: hidden; padding-bottom: env(safe-area-inset-bottom); }
.wx-sheet .at { background: #fff; color: #888; font-size: 13px; padding: 14px; text-align: center; border-bottom: 1px solid #eee; }
.wx-sheet .it { background: #fff; text-align: center; font-size: 17px; padding: 15px; border-bottom: 1px solid #eee; cursor: pointer; }
.wx-sheet .it.cx { margin-top: 8px; border: 0; }

/* 登录页 */
#lg { position: fixed; inset: 0; z-index: 100; background: linear-gradient(160deg, #17325c 0, #1f5fbf 100%); display: flex; align-items: center; justify-content: center; padding: 16px; box-sizing: border-box; overflow: auto; }
.lg-box { width: 100%; max-width: 360px; background: #fff; border-radius: 10px; padding: 26px 22px 20px; box-sizing: border-box; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.lg-logo { width: 52px; height: 52px; border-radius: 12px; background: #17325c; color: #fff; font-size: 26px; font-weight: 700; line-height: 52px; text-align: center; margin: 0 auto 8px; }
.lg-t { text-align: center; font-size: 19px; font-weight: 700; color: #1f2733; margin-bottom: 16px; }
.lg-tabs { display: flex; border-bottom: 1px solid #e7ebf1; margin-bottom: 14px; }
.lg-tabs span { flex: 1; text-align: center; padding: 8px 0; color: #8a94a4; cursor: pointer; border-bottom: 2px solid transparent; font-size: 15px; }
.lg-tabs span.on { color: #1f5fbf; border-bottom-color: #1f5fbf; font-weight: 600; }
.lg-i { display: block; width: 100%; box-sizing: border-box; height: 44px; border: 1px solid #d8dee8; border-radius: 6px; padding: 0 12px; font-size: 16px; margin-bottom: 10px; outline: none; background: #fff; }
.lg-i:focus { border-color: #1f5fbf; }
.lg-b { display: block; width: 100%; height: 44px; border: 0; border-radius: 6px; background: #1f5fbf; color: #fff; font-size: 16px; cursor: pointer; margin-top: 4px; }
.lg-n { font-size: 12px; color: #8a94a4; margin-top: 12px; line-height: 1.6; }
.lg-e { color: #c4372f; font-size: 13px; min-height: 18px; margin-top: 8px; text-align: center; }
.wx-modal .lg-i { margin-bottom: 8px; }
