:root {
  --ml-bg: #f6f8fc;
  --ml-surface: #ffffff;
  --ml-text: #1f2937;
  --ml-text-secondary: #6b7280;
  --ml-text-muted: #9ca3af;
  --ml-accent: #3b82f6;
  --ml-accent-soft: #93c5fd;
  --ml-ok: #22c55e;
  --ml-radius: 26px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
}

body {
  background: var(--ml-bg);
  color: var(--ml-text);
  font-family: "PingFang SC", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 布局 ---------- */
.ml-page {
  min-height: 100vh;
  padding: 64px 24px 36px;
  display: flex;
  flex-direction: column;
}

.ml-header {
  text-align: center;
  margin-bottom: 44px;
  animation: ml-rise 0.6s ease both;
}

.ml-header h1 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #111827;
}

.ml-header .ml-sub {
  margin-top: 12px;
  font-size: 13px;
  color: var(--ml-text-muted);
  letter-spacing: 0.32em;
  text-indent: 0.32em;
}

.ml-header .ml-sub::before,
.ml-header .ml-sub::after {
  content: "";
  display: inline-block;
  width: 20px;
  height: 1px;
  margin: 0 12px;
  background: #cdd4e0;
  vertical-align: middle;
}

.ml-shell {
  position: relative;
  /* 设计稿画框尺寸：整个内容壳固定 960×600 */
  width: 960px;
  height: 600px;
  max-width: 100%;
  margin: 0 auto;
  animation: ml-rise 0.7s 0.08s ease both;
}

@keyframes ml-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 主卡片 ---------- */
.ml-card {
  background: var(--ml-surface);
  border-radius: var(--ml-radius);
  box-shadow:
    0 32px 80px -24px rgba(23, 32, 51, 0.16),
    0 4px 16px rgba(23, 32, 51, 0.06);
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: center;
  /* 壳固定 600 高，卡片铺满 */
  height: 100%;
}

.ml-hero-wrap {
  position: relative;
  /* 新建层叠上下文：保证 ::before 圆点的 z-index:-1 落在蓝底之上、内容之下，不会穿到卡片后面 */
  z-index: 0;
  /* 对角渐变：左下角、右上角浅蓝偏白，沿对角线方向中间过渡为蓝色 */
  background: linear-gradient(to top right, #edf4fd 0%, #f5f9ff 30%,#dbe8fc 60%, #f5f9ff 100%);
  border-radius: 18px;
  /* 设计稿：上 padding 高于下 padding */
  padding: 55px 35px 50px;
  display: flex;
  flex-direction: column;
  /* 标题/描述贴顶部，截图贴底部，中间留白 */
  justify-content: space-between;
  overflow: hidden;
}

/* 左下角装饰圆点：6 列 × 3 排，位于截图下层。
   网格从距左边、底边各约 14px 处开始；截图底边会压住第 1 排的大部分圆点 */
.ml-hero-wrap::before {
  content: "";
  position: absolute;
  left: 14px;
  bottom: 14px;
  width: 108px; /* 6 × 18px */
  height: 54px; /* 3 × 18px */
  background-image: radial-gradient(circle, rgba(59, 130, 246, 0.28) 3px, transparent 3.5px);
  background-size: 18px 18px;
  pointer-events: none;
  z-index: -1;
}

/* 设计稿：标题 + 两行描述 */
.ml-hero-head {
  margin-bottom: 20px;
}

.ml-hero-title {
  font-size: 24px;
  font-weight: 700;
  color: #172033;
  margin-bottom: 8px;
}

.ml-hero-desc {
  font-size: 13px;
  line-height: 1.8;
  color: #999999;
  /* moduleDesc 里用 \n 手动断行，固定两行，不随宽度变化 */
  white-space: pre-line;
}

/* 截图：白色卡片底 + 阴影。高度跟随图片（宽度为准），不拉伸 */
.ml-hero-shot {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 8px 24px -12px rgba(23, 32, 51, 0.18);
  /* padding: 12px; */
  overflow: hidden;
}

.ml-hero {
  width: 100%;
  display: block;
  pointer-events: none;
}

/* ---------- 用户面板 ---------- */
.ml-user {
  text-align: center;
  padding: 6px 4px 0;
  min-height: 360px;
}

.ml-avatar-wrap {
  position: relative;
  width: 92px;
  height: 92px;
  margin: 0 auto 18px;
}

.ml-avatar-wrap::before {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  background: conic-gradient(from 140deg, var(--ml-accent-soft), var(--ml-accent), var(--ml-accent-soft));
  z-index: -1;
}

.ml-avatar {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  object-fit: cover;
  background: #eef1f6;
  border: 4px solid #fff;
  display: block;
  box-shadow: 0 10px 26px rgba(23, 32, 51, 0.16);
}

.ml-avatar-fallback {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: #eef2f8;
  color: var(--ml-accent);
  border: 4px solid #fff;
  box-shadow: 0 10px 26px rgba(23, 32, 51, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 700;
}

.ml-avatar-wrap.is-guest::before {
  display: none;
}

.ml-avatar-wrap.is-guest .ml-avatar-fallback {
  background: rgba(255, 255, 255, 0.65);
  border: 2px dashed #c9d2e2;
  box-shadow: none;
  color: #8a94a8;
}

.ml-avatar-wrap.is-guest .ml-avatar-fallback svg {
  width: 34px;
  height: 34px;
}

.ml-user-name {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ml-user-company,
.ml-user-phone {
  font-size: 13px;
  color: var(--ml-text-secondary);
  margin-bottom: 4px;
}

.ml-user-role {
  display: inline-block;
  font-size: 12px;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  padding: 3px 12px;
  border-radius: 6px;
  margin: 2px 0 6px;
}

.ml-user-phone {
  color: var(--ml-text-muted);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.ml-enter {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 14px;
  background: var(--ml-accent);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 12px 26px -8px rgba(23, 32, 51, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.ml-enter:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 16px 32px -8px rgba(23, 32, 51, 0.4);
}

.ml-enter:active {
  transform: translateY(0);
}

.ml-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.ml-ghost {
  flex: 1;
  height: 38px;
  border: 1px solid #e2e6ee;
  border-radius: 10px;
  background: #fff;
  color: var(--ml-text-secondary);
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.ml-ghost:hover {
  color: var(--ml-accent);
  border-color: var(--ml-accent);
  background: #fff;
}

.ml-ghost svg {
  width: 14px;
  height: 14px;
}

.ml-footer {
  margin-top: auto;
  padding-top: 34px;
  text-align: center;
  font-size: 12px;
  color: #b6bccb;
}

/* ---------- 访客态：右侧内嵌登录卡 ---------- */
.ml-login-host {
  width: 100%;
  margin-top: 14px;
  text-align: left;
}

.ml-guest-logo {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  background: #eef1f6;
  border: 4px solid #fff;
  display: block;
  margin: 0 auto;
  box-shadow: 0 10px 26px rgba(23, 32, 51, 0.16);
}

/* 访客态右栏与左侧图垂直居中（.ml-card 的 align-items: center 兜底显式化） */
.ml-page.ml-guest .ml-user {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

/* 访客态：左右两栏拉伸等高、顶部对齐（左图铺满高度，cover 裁剪） */
.ml-page.ml-guest .ml-card {
  align-items: stretch;
  /* 壳高固定 600，行高显式撑满，避免 auto 行高依赖内容 */
  grid-template-rows: minmax(0, 1fr);
}

.ml-page.ml-guest .ml-hero-wrap {
  height: 100%;
}

/* 访客态：截图以宽度为准铺满，高度按图片比例自适应（垂直方向由 .ml-hero-shot 居中） */
.ml-page.ml-guest .ml-hero {
  width: 100%;
  height: auto;
}

/* ---------- 响应式 ---------- */
@media (max-width: 800px) {
  .ml-page.ml-guest .ml-card {
    grid-template-columns: 1fr;
  }

  .ml-card {
    grid-template-columns: 1fr;
    padding: 20px;
    gap: 20px;
    height: auto;
  }

  /* 小屏取消壳的固定高度，内容自然撑开 */
  .ml-shell {
    height: auto;
  }

  .ml-hero-wrap {
    display: none;
  }

  /* 访客态：手机端登录卡限制最大宽度并水平居中 */
  .ml-page.ml-guest .ml-user {
    width: 100%;
    max-width: 420px;
    height: auto;
    margin: 0 auto;
  }

  /* 访客态：logo 撑高右栏，手机端缩小 */
  .ml-page.ml-guest .ml-guest-logo {
    width: 64px;
    height: 64px;
    margin-bottom: 12px;
  }
}

@media (max-width: 560px) {
  .ml-page {
    padding: 44px 16px 24px;
  }

  .ml-header {
    margin-bottom: 36px;
  }

  .ml-header h1 {
    font-size: 24px;
  }

  .ml-card {
    padding: 16px;
  }
}

[v-cloak] {
  display: none;
}
