/* 客户手机微信直看交互体验版专属适配样式（全面屏安全区、四端欢迎页、顶部秒切条、长按存图弹层） */

/* 真机移动端：隐藏假信号状态栏，使用 dvh 与全面屏底部安全区，手感等同原生小程序 */
@media (max-width: 840px) {
  .wx-statusbar {
    display: none !important;
  }
  .mp-device {
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-width: 100vw !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
  }
  .wx-navbar {
    padding-top: env(safe-area-inset-top, 0px);
    height: calc(44px + env(safe-area-inset-top, 0px));
  }
  .wx-tabbar,
  .wx-actionbar {
    padding-bottom: max(6px, env(safe-area-inset-bottom, 0px));
    height: auto !important;
    min-height: 54px;
  }
}

/* ==================== 顶部常驻「四端视角秒切条」 ==================== */
.demo-role-strip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  background: #065f46;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}
.demo-role-strip::-webkit-scrollbar {
  display: none;
}

.demo-role-chip {
  flex: 1 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  color: rgba(236, 253, 245, 0.9);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  text-align: center;
  white-space: nowrap;
  min-height: 30px;
}

.demo-role-chip.active {
  background: #fef08a;
  color: #064e3b;
  border-color: #facc15;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
}

.demo-role-chip.is-reset {
  flex: 0 0 auto;
  background: rgba(15, 23, 42, 0.34);
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.22);
}

/* ==================== 首屏「四端角色选择欢迎页」 ==================== */
.demo-welcome-overlay {
  position: absolute;
  inset: 0;
  z-index: 80;
  background: #f4f7f9;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.dw-hero {
  background: linear-gradient(135deg, #064e3b 0%, #047857 58%, #059669 100%);
  color: #ffffff;
  padding: calc(20px + env(safe-area-inset-top, 0px)) 16px 18px;
  border-radius: 0 0 22px 22px;
  box-shadow: 0 8px 24px rgba(4, 120, 87, 0.2);
}

.dw-brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dw-logo {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.14);
  padding: 5px;
  object-fit: contain;
  flex-shrink: 0;
}

.dw-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.4px;
  line-height: 1.2;
}

.dw-sub {
  font-size: 12px;
  color: #d1fae5;
  margin-top: 3px;
}

.dw-index-pill {
  margin-top: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  padding: 8px 11px;
  font-size: 12px;
  color: #ecfdf5;
}

.dw-index-pill strong {
  color: #fef08a;
  font-family: var(--font-mono);
  font-size: 14px;
}

.dw-body {
  padding: 15px 14px calc(22px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.dw-section-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dw-section-head h2 {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
}

.dw-section-head span {
  font-size: 12px;
  color: #64748b;
}

.dw-role-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dw-role-card {
  width: 100%;
  text-align: left;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 13px 13px 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.04);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.dw-role-card:active {
  transform: scale(0.985);
}

.dw-role-card.is-buyer {
  border-left: 4px solid #059669;
}

.dw-role-card.is-seller {
  border-left: 4px solid #10b981;
}

.dw-role-card.is-driver {
  border-left: 4px solid #2563eb;
}

.dw-role-card.is-admin {
  border-left: 4px solid #d97706;
}

.dw-rc-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dw-rc-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  flex-shrink: 0;
}

.dw-rc-icon.buyer {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.dw-rc-icon.seller {
  background: linear-gradient(135deg, #10b981 0%, #0d9488 100%);
}

.dw-rc-icon.driver {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.dw-rc-icon.admin {
  background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
}

.dw-rc-titles {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.dw-rc-titles strong {
  font-size: 14.5px;
  font-weight: 800;
  color: #0f172a;
}

.dw-rc-titles span {
  font-size: 11.5px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dw-rc-arrow {
  font-size: 12.5px;
  font-weight: 800;
  color: #059669;
  background: #ecfdf5;
  padding: 5px 10px;
  border-radius: 999px;
  flex-shrink: 0;
}

.dw-rc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.dw-rc-tags span {
  font-size: 11px;
  font-weight: 600;
  color: #334155;
  background: #f1f5f9;
  padding: 3px 8px;
  border-radius: 6px;
}

.dw-quick-tools {
  margin-top: 2px;
}

.dw-tool-btn {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  background: #ecfdf5;
  border: 1px dashed #34d399;
  color: #065f46;
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
}

.dw-footnote {
  text-align: center;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.5;
  padding-top: 4px;
}

/* ==================== 30 秒核心亮点导览卡片（工作台顶部） ==================== */
.demo-tour-card {
  background: #ffffff;
  border: 1px solid #a7f3d0;
  border-radius: 12px;
  padding: 9px 11px;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.06);
}

.demo-tour-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 800;
  color: #065f46;
}

.demo-tour-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.demo-tour-pill {
  padding: 5px 9px;
  border-radius: 8px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #047857;
  font-size: 11.5px;
  font-weight: 700;
}

.demo-tour-pill:active {
  background: #059669;
  color: #ffffff;
}

/* ==================== 微信长按保存高清图片全屏预览弹层 ==================== */
.demo-img-modal {
  position: absolute;
  inset: 0;
  z-index: 95;
  background: rgba(15, 23, 42, 0.94);
  display: flex;
  flex-direction: column;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 14px calc(14px + env(safe-area-inset-bottom, 0px));
  gap: 10px;
}

.demo-img-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
}

.demo-img-close-btn {
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 700;
}

.demo-img-tip {
  background: #059669;
  color: #ffffff;
  padding: 8px 11px;
  border-radius: 9px;
  font-size: 12.5px;
  text-align: center;
  line-height: 1.4;
}

.demo-img-stage {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 4px 0;
}

.demo-img-stage img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  -webkit-touch-callout: default;
  user-select: auto;
}

.demo-img-modal-foot {
  flex-shrink: 0;
}

/* 手机版五流铁证档案册卡片排版 */
.demo-dossier-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.demo-dossier-cell {
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 11.5px;
}

.demo-dossier-cell.pending {
  background: #f8fafc;
  border-color: #e2e8f0;
}

/* 修正 4 个角色登录 Tab 网格（确保 4 列整齐） */
.mp-login-role-tabs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
