/* 特约商户 H5 — 对齐 1u/frontend 视觉与布局 */
:root {
  --bg: #f2f4f5;
  --surface: #ffffff;
  --text: #1f2a37;
  --muted: #8b95a6;
  --primary: #ff8a00;
  --primary-press: #e67600;
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.mobile-shell {
  width: 100%;
  max-width: none;
  min-height: 100svh;
  min-height: 100dvh;
  margin: 0;
  background: var(--bg);
  border: none;
  display: flex;
  flex-direction: column;
}

.page-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.page-content.with-nav {
  padding-bottom: calc(52px + env(safe-area-inset-bottom));
}

/* 顶栏 */
.app-header {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  background: var(--surface);
  border-bottom: 1px solid #eef1f6;
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-title {
  font-size: 17px;
  font-weight: 600;
}

.header-back,
.header-placeholder {
  width: 44px;
  height: 44px;
  border: none;
  background: none;
  font-size: 26px;
  line-height: 1;
  color: var(--text);
  cursor: pointer;
}

/* 底栏 */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  transform: none;
  width: 100%;
  max-width: none;
  height: 48px;
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface);
  border-top: 1px solid #eef1f6;
  display: grid;
  grid-template-columns: 1fr 1fr;
  z-index: 50;
}

.bottom-nav .nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #8a96a8;
  font-size: 14px;
}

.bottom-nav .nav-item.is-active {
  color: var(--primary);
  font-weight: 600;
}

.toast {
  display: none;
  position: fixed;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  z-index: 999;
  font-size: 14px;
  max-width: 82%;
  text-align: center;
}

.toast.show { display: block; }

/* ========== 登录注册弹层（我的页） ========== */
.auth-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 220;
  background: rgba(16, 24, 40, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.auth-modal-mask.is-open {
  opacity: 1;
  pointer-events: auto;
}

.auth-modal-panel {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 221;
  width: 100%;
  max-width: 100vw;
  max-height: 88vh;
  overflow-y: auto;
  padding: 8px 14px 24px;
  background: #ececec;
  border-radius: 18px 18px 0 0;
  box-shadow: none;
  transform: translate(-50%, 100%);
  transition: transform 0.24s ease;
  visibility: hidden;
  pointer-events: none;
}

.auth-modal-panel.is-open {
  transform: translate(-50%, 0);
  box-shadow: 0 -8px 30px rgba(7, 20, 40, 0.2);
  visibility: visible;
  pointer-events: auto;
}

.auth-modal-close {
  position: absolute;
  right: 12px;
  top: 8px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  color: #666;
  cursor: pointer;
}

.auth-modal-title {
  margin: 4px 0 12px;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  color: #333;
}

.auth-modal-panel .auth-card {
  margin: 0;
}

.profile-head--guest {
  cursor: pointer;
}

.profile-head--guest:active {
  opacity: 0.85;
}

/* ========== 我的-登录注册（独立页备用） ========== */
.mine-login-wrap {
  padding: 12px 14px 24px;
  background: #ececec;
  min-height: calc(100svh - 52px);
}
.mine-login-tip {
  text-align: center;
  color: #8b95a6;
  font-size: 14px;
  margin: 8px 0 16px;
}

/* ========== 登录注册（RegisterView） ========== */
.register-page {
  min-height: 100svh;
  background: #ececec;
}

.register-page .register-content {
  display: flex;
  justify-content: center;
  padding: 34px 14px 16px;
}

.auth-card {
  width: 100%;
  background: #f6f6f6;
  border-radius: 14px;
  padding: 14px 14px 18px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  margin-bottom: 12px;
}

.tab-btn {
  border: none;
  background: none;
  font-size: 14px;
  color: #5c5c5c;
  font-weight: 500;
  padding: 10px 0;
  position: relative;
  cursor: pointer;
}

.tab-btn.active {
  color: #2f2f2f;
  font-weight: 700;
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 74px;
  height: 4px;
  border-radius: 99px;
  background: #f08a00;
}

.row-field {
  display: flex;
  align-items: center;
  min-height: 54px;
  border-bottom: 1px solid #e7e7e7;
  gap: 12px;
}

.field-label {
  width: 108px;
  flex-shrink: 0;
  font-size: 16px;
  color: #303030;
}

.field-label i {
  color: #d82323;
  font-style: normal;
  margin-right: 4px;
}

.row-field input {
  flex: 1;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 14px;
  color: #2f2f2f;
  outline: none;
}

.row-field input::placeholder { color: #c4c4c4; }

.helper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 14px;
  font-size: 13px;
}

.helper-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #9a9a9a;
}

.text-link {
  border: none;
  background: none;
  color: #9a9a9a;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}

.submit-btn {
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 99px;
  background: #ff8a00;
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
}

.submit-btn:active { background: #ea7d00; }
.submit-btn:disabled { opacity: 0.7; }

.error-text {
  margin: 8px 0 0;
  color: #d82323;
  font-size: 13px;
}

.forgot-mask {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.68);
}

.forgot-mask.show { display: flex; }

.forgot-dialog {
  width: min(620px, 100%);
  border-radius: 16px;
  background: #f6f6f6;
  overflow: hidden;
}

.forgot-body { padding: 10px 16px 0; }

.forgot-item {
  display: flex;
  align-items: center;
  min-height: 60px;
  border-bottom: 1px solid #e8e8e8;
  gap: 12px;
}

.forgot-label {
  width: 94px;
  flex-shrink: 0;
  font-size: 16px;
}

.forgot-item input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 15px;
  outline: none;
}

.forgot-actions {
  border-top: 1px solid #e6e6e6;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.forgot-cancel,
.forgot-confirm {
  height: 56px;
  border: none;
  background: #f6f6f6;
  font-size: 18px;
  cursor: pointer;
}

.forgot-confirm { color: #dfa321; }

/* ========== 首页卡片（HomeView） ========== */
.home-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
}

.card {
  border: 1px solid #e9edf4;
  background: #fff;
  box-shadow: 0 6px 16px rgba(15, 33, 64, 0.06);
}

.display-card {
  min-height: 136px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  border-color: #ffdcb6;
  background:
    linear-gradient(120deg, rgba(255, 138, 0, 0.16) 0%, rgba(255, 138, 0, 0) 62%),
    linear-gradient(180deg, #ffffff 0%, #fff7ef 100%);
}

.pay-banner {
  width: 100%;
  padding: 24px 20px;
  text-align: center;
}

.pay-banner .logo {
  font-weight: 700;
  color: #c62828;
  font-size: 15px;
  letter-spacing: 1px;
}

.pay-banner h2 {
  margin: 10px 0 4px;
  font-size: 26px;
  color: #d66d00;
}

.pay-banner .sub {
  color: #8b95a6;
  font-size: 14px;
}

.display-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.aftersale-card {
  min-height: 124px;
  padding: 16px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.aftersale-title {
  margin: 0;
  color: #ff7a00;
  font-size: 16px;
  line-height: 1.15;
}

.aftersale-subtitle {
  margin: 6px 0 0;
  color: #1f2a37;
  font-size: 18px;
  line-height: 1.2;
}

.aftersale-desc {
  margin: 6px 0 0;
  color: #8b95a6;
  font-size: 14px;
}

.aftersale-btn {
  border: none;
  border-radius: 999px;
  background: #ff8500;
  color: #fff;
  height: 40px;
  min-width: 102px;
  padding: 0 16px;
  font-size: 16px;
  font-weight: 600;
  flex-shrink: 0;
  cursor: pointer;
}

.pay-banner-logo-img {
  max-height: 48px;
  margin-bottom: 8px;
  display: inline-block;
}

.home-diy-image-card,
.home-diy-notice-card {
  padding: 0;
  overflow: hidden;
}

.home-diy-image-link {
  display: block;
}

.home-diy-notice-card {
  padding: 14px 16px;
}

.home-diy-notice-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #5a6472;
}

.home-diy-title-card {
  padding: 14px 16px;
}

.home-diy-title-main {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.home-diy-title-sub {
  margin: 6px 0 0;
  font-size: 13px;
  color: #8b95a6;
}

.home-diy-text-card {
  padding: 14px 16px;
}

.home-diy-text-body {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #5a6472;
}

.home-diy-button-wrap {
  text-align: center;
  margin: 0 0 12px;
}

.home-diy-btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.home-diy-link-card {
  padding: 0;
}

.home-diy-link-card-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
}

.home-diy-link-card-img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.home-diy-link-card-copy h4 {
  margin: 0;
  font-size: 15px;
  color: #1f2a37;
}

.home-diy-link-card-copy p {
  margin: 4px 0 0;
  font-size: 13px;
  color: #8b95a6;
}

.home-diy-grid-card {
  padding: 12px 8px;
}

.home-diy-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.home-diy-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #1f2a37;
  font-size: 12px;
  padding: 4px;
}

.home-diy-grid-item img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  margin-bottom: 4px;
}

.home-diy-grid-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #f0f2f5;
  margin-bottom: 4px;
}

.home-diy-grid-label {
  text-align: center;
  line-height: 1.3;
}

.home-diy-divider {
  margin: 0 0 12px;
}

.home-diy-spacer {
  display: block;
}

.user-card {
  min-height: 108px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px #d5d9e3;
  background: #e8edf5;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.35);
}

.user-phone {
  margin: 0 0 4px;
  font-size: 12px;
  color: #8f7c66;
}

.username {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #172235;
}

.meta-line {
  margin: 2px 0 0;
  font-size: 12px;
  color: #8f7c66;
}

.upgrade-link {
  color: var(--primary);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
}

.upgrade-link--signed {
  cursor: default;
}

/* 管理首页 */
.admin-search-card,
.invite-card {
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-search-title,
.invite-title {
  margin: 0;
  font-size: 17px;
  color: #1f2a37;
}

.admin-search-desc {
  margin: 0;
  font-size: 14px;
  color: #8b95a6;
}

.admin-search-btn {
  align-self: flex-end;
  border: none;
  border-radius: 999px;
  background: #ff8500;
  color: #fff;
  height: 40px;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.invite-code-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.invite-code-display {
  flex: 1;
  min-height: 44px;
  line-height: 44px;
  padding: 0 12px;
  background: #f5f7fa;
  border-radius: 8px;
  font-size: 16px;
  letter-spacing: 2px;
  cursor: pointer;
}

.invite-code-toggle {
  border: 1px solid #e5e9f0;
  background: #fff;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  cursor: pointer;
}

.invite-code-input {
  width: 100%;
  height: 44px;
  border: 1px solid #ff8a00;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 16px;
}

.invite-error,
.invite-loading {
  font-size: 13px;
  color: #d82323;
  margin: 0;
}

/* ========== 我的（MineView） ========== */
.mine-page {
  min-height: 100%;
  padding: 4px 5px 14px;
  background:
    radial-gradient(circle at 96% 4%, rgba(255, 216, 168, 0.5) 0, rgba(255, 216, 168, 0) 28%),
    linear-gradient(180deg, #f7f0e9 0, #f3f3f3 210px, #f2f4f5 210px, #f2f4f5 100%);
}

.profile-head {
  padding: 14px 18px 16px;
  display: flex;
  gap: 14px;
  align-items: center;
  position: relative;
}

.profile-personal-link {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: #5a6472;
  text-decoration: none;
  white-space: nowrap;
}

.profile-head .avatar {
  width: 58px;
  height: 58px;
}

.profile-head .phone {
  font-size: 14px;
  color: #1f2a37;
  margin: 0;
}

.profile-head .username {
  margin: 5px 0 0;
  font-size: 20px;
  font-weight: 700;
}

.profile-head .time-line {
  margin: 4px 0 0;
  font-size: 12px;
  color: #3a4656;
}

/* 特权中心卡片（对标图一） */
.vip-card-v2 {
  margin: 10px 18px 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(18, 26, 45, 0.14);
  cursor: pointer;
  border: none;
  width: calc(100% - 36px);
  text-align: left;
  padding: 0;
  display: block;
  color: #fff;
  position: relative;
}

.vip-card-v2::after {
  content: "";
  position: absolute;
  right: -24px;
  top: -30px;
  width: 140px;
  height: 140px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  pointer-events: none;
}

.vip-card-v2__head {
  padding: 14px 16px 14px;
  position: relative;
  z-index: 1;
}

.vip-card-v2__head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.vip-card-v2__tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
}

.vip-crown {
  font-size: 15px;
  line-height: 1;
  opacity: 0.95;
}

.vip-card-v2__slogan {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  position: relative;
  z-index: 1;
}

.vip-card-v2 .privilege-btn {
  font-size: 12px;
  color: #3d4f5f;
  border: none;
  border-radius: 999px;
  padding: 5px 14px;
  background: #fff;
  flex-shrink: 0;
  font-weight: 500;
}

.vip-card-v2__body {
  background: #fff;
  color: #1f2a37;
  position: relative;
  z-index: 2;
  padding: 12px 16px 14px;
}

.vip-rebate-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.vip-rebate-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.vip-rebate-user {
  display: inline;
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: #2f2f2f;
  line-height: 1.2;
  white-space: nowrap;
}

.vip-rebate-user-text {
  display: inline;
}

.vip-rebate-amount {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 18px;
  font-weight: 600;
  color: #1a2230;
  letter-spacing: 0.02em;
  line-height: 1.3;
  cursor: pointer;
  font-family: inherit;
}

.vip-badge-pending {
  display: inline;
  margin-left: 1px;
  padding: 0 3px 1px;
  font-size: 8px;
  line-height: 1;
  font-weight: 600;
  vertical-align: text-top;
  border-radius: 2px;
  background: linear-gradient(90deg, #ff9a3c, #ff6b35);
  color: #fff;
  letter-spacing: 0;
  white-space: nowrap;
}

.vip-card {
  margin: 10px 18px 0;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(18, 26, 45, 0.12);
  cursor: pointer;
  border: none;
  width: calc(100% - 36px);
  text-align: left;
  padding: 0;
}

.vip-card--active .vip-top-row {
  background: linear-gradient(140deg, #fbd16d, #fbae38);
}

.vip-card--active .vip-title-group {
  background: linear-gradient(140deg, #fbd269, #fab031);
}

.vip-top-row {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.privilege-btn {
  font-size: 13px;
  color: #8a96a8;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.6);
}

.vip-card--active .privilege-btn {
  color: #d96e00;
  border-color: rgba(217, 110, 0, 0.25);
}

.vip-title-group {
  padding: 14px 16px 16px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.vip-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #2f2f2f;
}

.vip-title--inactive {
  padding: 14px 16px 16px;
  color: #5a6472;
}

.vip-price::before {
  content: '¥';
  font-size: 14px;
  margin-right: 2px;
}

.menu-card {
  margin: 14px 12px 0;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(18, 26, 45, 0.06);
}

.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: none;
  border-bottom: 1px solid #f0f2f6;
  background: #fff;
  font-size: 15px;
  color: #2f2f2f;
  text-decoration: none;
  cursor: pointer;
}

.menu-item:last-child { border-bottom: none; }

.menu-item .arrow {
  color: #c2c9d4;
}

/* 表单页 */
.form-page {
  padding: 12px 14px 24px;
}

.form-tip {
  margin-bottom: 12px;
  font-size: 14px;
  color: #666;
}

.form-tip--warn {
  color: #c62828;
  background: #fff5f5;
  border: 1px solid #ffcdd2;
  border-radius: 8px;
  padding: 10px 12px;
  line-height: 1.5;
}

.form-card {
  background: #fff;
  border-radius: 10px;
  padding: 4px 14px;
  box-shadow: 0 2px 10px rgba(18, 26, 45, 0.06);
}

.form-card.is-hidden {
  display: none !important;
}

/* 合同签订（与信息填写 form-page 一致） */
.form-page--contract-sign .form-card--contract {
  padding: 0;
  overflow: hidden;
}

.form-page--contract-sign .contract-step-tip {
  margin: 0;
  padding: 12px 14px;
  font-size: 13px;
  color: #888;
  line-height: 1.5;
  border-bottom: 1px solid #eef1f6;
}

.form-page--contract-sign .contract-read-body {
  flex: none;
  min-height: auto;
  max-height: none;
  overflow: visible;
  background: #e8eaed;
  position: relative;
}

.sign-page--esign .form-page--contract-sign .contract-read-body {
  min-height: auto;
  touch-action: auto;
}

.form-page--contract-sign .contract-pdf-pages {
  height: auto;
  min-height: 100%;
  padding: 10px 10px 20px;
}

.form-page--contract-sign .contract-pdf-pages--scroll .contract-pdf-page {
  margin: 0 auto 10px;
  max-width: 100%;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.form-page--contract-sign .contract-pdf-pages--scroll .contract-pdf-page img {
  display: block;
  width: 100%;
  height: auto;
}

.form-page--contract-sign .contract-pdf-pages--embed,
.contract-view-page .contract-pdf-pages--embed {
  height: auto;
  min-height: 0;
}

.contract-pdf-embed {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: none;
  background: #fff;
}

.contract-draft-status {
  margin: 0 0 8px;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.5;
  color: #b45309;
  background: #fffbeb;
  border-radius: 8px;
  text-align: center;
  flex-shrink: 0;
}

.contract-read-hint {
  margin: 0;
  padding: 48px 16px;
  text-align: center;
  color: #8b95a6;
  font-size: 14px;
  line-height: 1.6;
}

.page--contract-sign .form-tip {
  flex-shrink: 0;
}

.contract-pdf-page img,
.form-page--contract-sign .contract-pdf-page img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}


.contract-read-sentinel {
  width: 100%;
  height: 32px;
  flex-shrink: 0;
  pointer-events: none;
}

.form-page--contract-sign .form-card--contract > .submit-btn {
  display: block;
  width: calc(100% - 28px);
  margin: 12px 14px 14px;
}

.form-page--contract-sign .form-card--contract > .submit-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.form-page--contract-sign .form-card--contract-sign-step {
  padding: 14px;
}

.form-page--contract-sign #sign-step-sign.form-card--contract {
  padding: 14px;
}

.form-page--contract-sign.form-page--with-footer {
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}

.form-page--contract-sign #sign-step-sign.form-card--contract {
  padding: 14px;
}

.form-page--contract-sign .sign-back-read-btn {
  display: inline-block;
  margin: 0 0 12px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--primary);
  font-size: 14px;
  cursor: pointer;
}

/* 签名预览区 */
.form-page--contract-sign .sign-preview {
  display: block;
  width: 100%;
  min-height: 140px;
  padding: 0;
  border: 1px dashed #d5dae3;
  border-radius: 10px;
  background: #fafbfc;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.form-page--contract-sign .sign-preview:active {
  background: #f3f5f8;
}

.form-page--contract-sign .sign-preview.has-signature {
  border-style: solid;
  border-color: #e5e9f0;
  background: #fff;
}

.form-page--contract-sign .sign-preview-result {
  display: none;
  width: 100%;
  aspect-ratio: 2.6 / 1;
  min-height: 88px;
  max-height: 42vw;
  background-color: #fff;
  overflow: hidden;
}

.sign-preview-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  pointer-events: none;
}

.form-page--contract-sign .sign-preview.has-signature .sign-preview-result {
  display: block;
}

.form-page--contract-sign .sign-preview.has-signature .sign-preview-placeholder {
  display: none !important;
}

.form-page--contract-sign .sign-preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  padding: 16px;
  color: #8b95a6;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.form-page--contract-sign .sign-preview-icon {
  display: block;
  font-size: 28px;
  color: var(--primary);
  margin-bottom: 8px;
}

.form-page--contract-sign .error-text {
  margin: 10px 0 0;
  font-size: 13px;
  color: #e03e3e;
  line-height: 1.45;
  word-break: break-word;
}

/* 底部固定：确认签名并支付 */
.sign-page-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  transform: none;
  z-index: 55;
  width: 100%;
  max-width: none;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid #eef1f6;
  box-shadow: 0 -4px 16px rgba(18, 26, 45, 0.08);
  box-sizing: border-box;
}

.sign-page-footer.is-hidden {
  display: none !important;
}

.sign-page-footer .submit-btn {
  margin: 0;
}

.sign-page-footer .submit-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* 支付处理中：纯文字遮罩，无额外资源请求 */
.pay-wake-overlay {
  position: fixed;
  inset: 0;
  z-index: 520;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(16, 24, 40, 0.42);
  box-sizing: border-box;
  pointer-events: none;
}

.pay-wake-overlay.is-open {
  display: flex;
}

.pay-wake-text {
  margin: 0;
  padding: 12px 20px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  font-size: 15px;
  font-weight: 500;
  color: #1f2a37;
  line-height: 1.5;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
}

.contract-read-error {
  margin: 16px 0;
  padding: 12px;
  font-size: 14px;
  line-height: 1.5;
  color: #c0392b;
  text-align: center;
}

.contract-read-error.is-hidden {
  display: none;
}

/* 全屏手写签名（竖屏 / 横屏均为整屏） */
body.sign-pad-open {
  overflow: hidden;
}

.sign-landscape-pad {
  position: fixed;
  inset: 0;
  z-index: 400;
  width: 100%;
  height: 100%;
  height: 100dvh;
  background: #fff;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.sign-landscape-pad.is-open {
  display: flex;
}

.sign-landscape-rotor {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.sign-landscape-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  background: #fff;
  padding-top: env(safe-area-inset-top);
}

.sign-pad-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 0;
  flex-shrink: 0;
}

.sign-pad-sheet-title {
  font-size: 16px;
  font-weight: 600;
  color: #1f2a37;
}

.sign-pad-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #f3f5f8;
  color: #6b7280;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.sign-landscape-hint {
  flex-shrink: 0;
  margin: 0;
  padding: 6px 14px 8px;
  font-size: 13px;
  color: #6b7280;
  text-align: center;
  line-height: 1.45;
}

.sign-landscape-canvas-wrap {
  flex: 1;
  min-height: 0;
  width: calc(100% - 20px);
  margin: 0 auto;
  border: 1px solid #e5e9f0;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.sign-landscape-canvas-wrap .sign-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  background: #fff;
}

.sign-landscape-toolbar {
  flex-shrink: 0;
  display: flex;
  gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid #eef1f6;
}

.sign-pad-btn {
  flex: 1;
  height: 44px;
  border-radius: 22px;
  border: 1px solid #e5e9f0;
  background: #fff;
  font-size: 15px;
  color: #2f2f2f;
  cursor: pointer;
}

.sign-pad-btn--primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}

.sign-pad-btn:active {
  opacity: 0.9;
}

/* 合同签名（旧全屏样式保留兼容） */
.sign-page {
  padding: 12px;
}

.sign-page--flow {
  padding: 0 0 12px;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 24px);
  min-height: calc(100dvh - 24px);
  box-sizing: border-box;
}

/* 签约阅读 / 查看合同：整页滚动（兼容各机型微信，避免嵌套滚动失效） */
body.page--contract-sign,
body.page--contract-view {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.page--contract-sign,
.page--contract-view {
  overflow: visible;
}

.page--contract-sign .mobile-shell,
.page--contract-view .mobile-shell {
  min-height: 100svh;
  min-height: 100dvh;
  height: auto;
  overflow: visible;
}

.page--contract-sign .page-content,
.page--contract-view .page-content {
  display: block;
  flex: none;
  min-height: auto;
  overflow: visible;
}

.page--contract-sign .form-page--contract-sign {
  flex: none;
  display: block;
  min-height: auto;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

.page--contract-sign #sign-step-read.form-card--contract {
  flex: none;
  display: block;
  min-height: auto;
}

.page--contract-view .contract-view-page {
  flex: none;
  display: block;
  min-height: auto;
  padding: 12px 14px calc(24px + env(safe-area-inset-bottom));
  background: var(--bg);
}

.page--contract-view .contract-view-page .contract-read-body {
  flex: none;
  min-height: auto;
  height: auto;
  overflow: visible;
  background: #f7f8fa;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(18, 26, 45, 0.06);
}

.page--contract-view .contract-view-page .contract-pdf-pages {
  padding: 10px 10px 16px;
  height: auto;
  min-height: 0;
}

.page--contract-view .contract-view-page .contract-pdf-page {
  margin: 0 auto 10px;
  background: #fff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1), 0 0 1px rgba(0, 0, 0, 0.06);
  border-radius: 2px;
}

.page--contract-view .contract-view-page .contract-pdf-page:last-child {
  margin-bottom: 0;
}

.page--contract-view .contract-view-page .contract-pdf-page canvas {
  display: block;
  width: 100% !important;
  height: auto !important;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.contract-view-footer {
  flex-shrink: 0;
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid #eef1f6;
  text-align: center;
}

.contract-view-pages {
  font-size: 13px;
  color: #8b95a6;
  line-height: 1.4;
}

.sign-page--esign {
  flex: none;
  display: block;
  min-height: auto;
  height: auto;
  padding: 0;
}

.sign-page--esign .contract-read-body {
  flex: none;
  min-height: auto;
  overflow: visible;
  background: #e8eaed;
  touch-action: auto;
}
.sign-page--esign .sign-step--read {
  flex: 1;
  min-height: 0;
}

.sign-hint {
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
}

.sign-hint--compact {
  padding: 10px 12px 0;
  margin-bottom: 0;
}

.sign-hint-sep {
  margin: 0 4px;
  color: #ccc;
}

.sign-hint-price {
  color: var(--primary);
}

.sign-step.is-hidden {
  display: none !important;
}

.sign-step--read {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.sign-read-tip {
  margin: 0;
  padding: 10px 12px;
  font-size: 13px;
  color: #888;
  background: #f7f8fa;
  border-bottom: 1px solid #eef1f6;
}

.contract-read-body {
  flex: none;
  position: relative;
  min-height: auto;
  background: #f0f2f5;
  overflow: visible;
}

.sign-page--esign .contract-read-body {
  flex: none;
  min-height: auto;
  overflow: visible;
  background: #e8eaed;
  touch-action: auto;
}

.contract-read-loading {
  position: absolute;
  left: 0;
  right: 0;
  top: 40%;
  text-align: center;
  font-size: 14px;
  color: #999;
  z-index: 1;
}

.contract-read-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 52vh;
  min-height: 52dvh;
  border: none;
  background: #fff;
}

.contract-pdf-pages {
  padding: 12px 12px 24px;
  min-height: 100%;
}
.contract-pdf-page {
  margin: 0 auto 12px;
  max-width: 100%;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  overflow: hidden;
}
.contract-pdf-page canvas {
  display: block;
  width: 100% !important;
  height: auto !important;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}
.sign-page--esign .sign-read-done-btn:disabled {
  opacity: 0.45;
}

.contract-read-footer {
  flex-shrink: 0;
  padding: 12px;
  background: #fff;
  border-top: 1px solid #eef1f6;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
}

.sign-read-done-btn {
  display: block;
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.sign-read-done-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.sign-read-done-btn.primary {
  background: var(--primary);
  color: #fff;
}

.sign-step--sign {
  padding: 12px;
}

.sign-back-read-btn {
  display: inline-block;
  margin-bottom: 8px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--primary);
  font-size: 14px;
  cursor: pointer;
}

.profile-contract-btn {
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--primary);
  box-sizing: border-box;
}

.sign-canvas-wrap {
  background: #fff;
  border: 1px solid #e5e9f0;
  border-radius: 8px;
  padding: 8px;
}

.sign-canvas {
  width: 100%;
  height: 200px;
  touch-action: none;
  display: block;
  background: #fff;
}

.toolbar-row {
  display: flex;
  gap: 10px;
  padding: 12px 0;
}

.toolbar-row button {
  flex: 1;
  height: 44px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #fff;
  font-size: 15px;
  cursor: pointer;
}

.toolbar-row .primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.success-page {
  padding: 40px 20px;
  text-align: center;
}

.success-badge {
  width: 72px;
  height: 72px;
  line-height: 72px;
  border-radius: 50%;
  background: #e8f8ef;
  color: #2e9e5b;
  font-size: 36px;
  margin: 0 auto 16px;
}

.admin-search-form {
  margin: 12px;
  padding: 14px;
  background: #fff;
  border-radius: 10px;
}

.admin-search-form input {
  width: 100%;
  height: 42px;
  margin-bottom: 8px;
  border: 1px solid #e5e9f0;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 15px;
}

.contract-list { margin: 0 12px 12px; }

.contract-item {
  background: #fff;
  padding: 14px;
  margin-bottom: 8px;
  border-radius: 8px;
  border: 1px solid #eef1f6;
}

.contract-item a {
  color: var(--primary);
  font-size: 13px;
  text-decoration: none;
}

.pdf-frame {
  width: 100%;
  height: calc(100vh - 48px);
  border: none;
  background: #fff;
}

.page--admin-contract-pdf .page-content {
  padding: 0;
  min-height: auto;
}

.admin-contract-view {
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
}

.admin-contract-toolbar {
  margin: 0;
  padding: 10px 14px 0;
  text-align: right;
}

.admin-contract-pdf-link {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--primary, #f97316);
  color: var(--primary, #f97316);
  font-size: 13px;
  text-decoration: none;
  background: #fff;
}

.admin-contract-error {
  margin: 16px;
  padding: 12px;
}

.agreement-body {
  margin: 12px;
  padding: 16px;
  background: #fff;
  border-radius: 10px;
  line-height: 1.75;
  font-size: 14px;
  white-space: pre-wrap;
  word-break: break-word;
}

/* 售后弹层 */
.sheet-mask,
.picker-mask,
.dialog-mask,
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, 0.42);
  z-index: 120;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.sheet-mask.is-open,
.picker-mask.is-open,
.dialog-mask.is-open,
.modal-mask.is-open {
  opacity: 1;
  pointer-events: auto;
}

.picker-mask.is-open {
  z-index: 210;
}

/* 弹层挂在 main 外，保证 fixed 与可点击 */
.page-modals .sheet-mask,
.page-modals .after-sale-sheet,
.page-modals .picker-mask,
.page-modals .vip-picker {
  z-index: 200;
}
.page-modals .sheet-mask.is-open {
  z-index: 200;
}
.page-modals .after-sale-sheet.is-open {
  z-index: 201;
}
.page-modals .picker-mask.is-open {
  z-index: 210;
}
.page-modals .vip-picker.is-open {
  z-index: 211;
}

.after-sale-sheet,
.vip-picker {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: 100%;
  max-width: 100vw;
  border-radius: 18px 18px 0 0;
  box-shadow: none;
  z-index: 121;
  transform: translate(-50%, 100%);
  transition: transform 0.24s ease;
  visibility: hidden;
  pointer-events: none;
  box-sizing: border-box;
}

.after-sale-sheet {
  background: #fff;
  padding: 10px 16px 18px;
}

.vip-picker {
  background: #f2f4f5;
  padding: 12px 14px calc(14px + env(safe-area-inset-bottom));
  max-height: min(72vh, 420px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.after-sale-sheet.is-open,
.vip-picker.is-open {
  transform: translate(-50%, 0);
  box-shadow: 0 -8px 30px rgba(7, 20, 40, 0.2);
  visibility: visible;
  pointer-events: auto;
}

.vip-picker.is-open {
  z-index: 211;
}

/* 提现倒计时：居中弹窗（勿用底部抽屉，避免被底栏裁切） */
.withdrawal-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  width: min(320px, calc(100vw - 48px));
  max-width: calc(100vw - 48px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(7, 20, 40, 0.18);
  padding: 24px 20px 20px;
  z-index: 302;
  transform: translate(-50%, -46%) scale(0.96);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.22s ease, opacity 0.22s ease;
  text-align: center;
}

.withdrawal-modal.is-open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#withdraw-mask.is-open {
  z-index: 301;
}

.withdrawal-modal .modal-title {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 600;
  color: #172235;
}

.withdrawal-text {
  margin: 0 0 20px;
  font-size: 15px;
  color: #6b7280;
  line-height: 1.6;
}

.sheet-handle {
  width: 46px;
  height: 4px;
  border-radius: 99px;
  background: #d8dde6;
  margin: 4px auto 10px;
}

.sheet-title {
  margin: 0;
  text-align: center;
  font-size: 18px;
}

.qr-box {
  margin: 14px auto 0;
  width: min(360px, 90%);
  text-align: center;
  padding: 12px;
}

.qr-box img {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: 8px;
}

.qr-placeholder {
  display: inline-block;
  padding: 12px;
  color: #8b95a6;
  font-size: 14px;
}

.picker-title {
  margin: 0 0 10px;
  padding-left: 2px;
  text-align: left;
  font-size: 14px;
  color: #606b78;
}

.picker-option {
  width: 100%;
  height: 52px;
  margin: 0;
  border: none;
  border-radius: 12px;
  background: #fff;
  font-size: 16px;
  color: #1f2a37;
  cursor: pointer;
}

.picker-option + .picker-option {
  margin-top: 8px;
}

.picker-option:active {
  background: #f7f9fb;
}

.dialog-mask.is-open {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.dialog-box {
  width: min(320px, 100%);
  background: #fff;
  border-radius: 14px;
  padding: 20px 16px 0;
  overflow: hidden;
}

.dialog-title {
  margin: 0;
  text-align: center;
  font-size: 18px;
}

.dialog-desc {
  text-align: center;
  margin: 14px 0 0;
  color: #5a6472;
  font-size: 15px;
}

.dialog-actions {
  display: flex;
  margin-top: 18px;
  border-top: 1px solid #eef1f6;
}

.dialog-cancel,
.dialog-confirm {
  flex: 1;
  height: 52px;
  border: none;
  background: #fff;
  font-size: 17px;
  cursor: pointer;
}

.dialog-cancel {
  color: #666;
  border-right: 1px solid #eef1f6;
}

.dialog-confirm {
  color: #fff;
  font-weight: 600;
  background: var(--primary);
}

.withdraw-amount-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: 100%;
  max-width: 100vw;
  background: #fff;
  border-radius: 18px 18px 0 0;
  box-shadow: none;
  padding: 10px 16px 20px;
  z-index: 122;
  transform: translate(-50%, 100%);
  transition: transform 0.24s ease;
  visibility: hidden;
  pointer-events: none;
}

.withdraw-amount-sheet.is-open {
  transform: translate(-50%, 0);
  box-shadow: 0 -8px 30px rgba(7, 20, 40, 0.2);
  visibility: visible;
  pointer-events: auto;
}

#withdraw-amount-mask.is-open {
  z-index: 121;
}

.withdraw-amount-tip {
  margin: 8px 0 14px;
  font-size: 14px;
  color: #5a6472;
  text-align: center;
}

.withdraw-amount-tip strong {
  color: #1a2230;
  font-size: 17px;
}

.withdraw-amount-field {
  display: block;
  margin-bottom: 10px;
}

.withdraw-amount-label {
  display: block;
  font-size: 14px;
  color: #3a4553;
  margin-bottom: 6px;
}

.withdraw-amount-input {
  width: 100%;
  height: 48px;
  border: 1px solid #e5e9f0;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 18px;
  box-sizing: border-box;
}

.withdraw-amount-error {
  margin: 0 0 10px;
  font-size: 13px;
  color: #e54d42;
  text-align: center;
}

.withdraw-amount-submit {
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 10px;
  background: var(--primary, #2f6bff);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 8px;
}

.withdraw-amount-cancel {
  width: 100%;
  height: 42px;
  border: none;
  background: transparent;
  color: #8b95a6;
  font-size: 15px;
  cursor: pointer;
}

.days-highlight {
  color: var(--primary);
  font-size: 22px;
  font-weight: 700;
}

.modal-close-btn {
  display: block;
  margin-top: 4px;
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 23px;
  background: var(--primary);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

body.sheet-open,
body.picker-open {
  overflow: hidden;
}

.feedback-sheet { max-height: 92vh; overflow-y: auto; }
.feedback-form { padding: 0 4px 8px; }
.feedback-field { display: block; margin-bottom: 14px; }
.feedback-label { display: block; font-size: 14px; color: #333; margin-bottom: 6px; }
.feedback-label i { color: #e74c3c; font-style: normal; }
.feedback-field input,
.feedback-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 15px;
  background: #fff;
}
.feedback-field input[readonly] { background: #f5f6f8; color: #666; }
.feedback-field textarea { resize: vertical; min-height: 120px; }
.feedback-error { color: #e74c3c; font-size: 13px; margin: 0 0 10px; }
.feedback-submit {
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}
.feedback-submit:disabled { opacity: 0.6; }
.feedback-qr-tip { text-align: center; font-size: 12px; color: #999; margin: 16px 0 8px; }
.qr-box--small { max-width: 140px; margin: 0 auto 12px; }
.qr-box--small img { width: 100%; display: block; border-radius: 8px; }

.idcard-upload-block {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eef1f6;
}

.idcard-upload-title {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
  color: #1f2a37;
}

.idcard-upload-hint {
  margin: 10px 0 0;
  font-size: 12px;
  color: #8b95a6;
  line-height: 1.5;
}

.idcard-upload-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.idcard-slot {
  position: relative;
  aspect-ratio: 1.58;
  border: 1px dashed #c8d0dc;
  border-radius: 10px;
  background: #f8f9fb;
  overflow: hidden;
  cursor: pointer;
}

.idcard-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.idcard-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #8b95a6;
  font-size: 13px;
  gap: 6px;
}

.idcard-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #dde3ec;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--primary);
}

.idcard-loading {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--primary);
  z-index: 2;
}

.idcard-actions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
  padding: 28px 4px 4px;
  gap: 4px;
  z-index: 3;
}

.idcard-actions button {
  flex: 1;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  color: #1f2a37;
  font-size: 11px;
  padding: 4px 0;
  border-radius: 4px;
  cursor: pointer;
}

.idcard-preview-layer {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  z-index: 130;
  max-width: min(92vw, 400px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.idcard-preview-layer.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.idcard-preview-layer img {
  width: 100%;
  border-radius: 10px;
  display: block;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.idcard-preview-close {
  display: block;
  width: 100%;
  margin-top: 10px;
  height: 40px;
  border: none;
  border-radius: 8px;
  background: #fff;
  font-size: 15px;
  cursor: pointer;
}

#idcard-preview-mask.is-open {
  z-index: 129;
}

.field-required,
.idcard-upload-title .field-required {
  color: #e03e3e;
  font-style: normal;
  font-weight: normal;
}

.profile-view-card {
  padding: 14px 16px 18px;
}

.profile-view-section-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: #1f2a37;
}

.profile-view-idcards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.profile-view-idcard {
  border: none;
  padding: 0;
  background: #f7f8fa;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  text-align: center;
}

.profile-view-idcard img {
  width: 100%;
  aspect-ratio: 1.58;
  object-fit: cover;
  display: block;
  background: #eef1f6;
}

.profile-view-idcard span {
  display: block;
  padding: 6px 4px;
  font-size: 12px;
  color: #5a6472;
}

.profile-view-idcard--empty {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #8b95a6;
  cursor: default;
}

.profile-view-list {
  margin: 0;
  padding: 0;
}

.profile-view-row {
  display: flex;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid #f0f2f6;
  font-size: 15px;
}

.profile-view-row:last-child {
  border-bottom: none;
}

.profile-view-row dt {
  width: 72px;
  flex-shrink: 0;
  margin: 0;
  color: #8b95a6;
  font-weight: normal;
}

.profile-view-row dd {
  flex: 1;
  margin: 0;
  color: #1f2a37;
  word-break: break-all;
}

.profile-edit-btn {
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--primary);
}

@media (min-width: 431px) {
  body { background: #e0e4e8; }
}
