/* 登录三页共用样式（IAM 首页 / 账号登录 / 注册）+ 管理后台登录复用。
 * 设计稿画布 1672×941（与 img/iam/bg.png 同尺寸），整版等比缩放适配视口：
 * 页面内所有元素固定在画布坐标上，窗口任意缩放只改变整体 scale，绝不重排。
 * 缩放由各页内联 fitStage 脚本驱动（scale = min(vw/1672, vh/941)）。
 */

html, body { margin: 0; padding: 0; }
body.auth-scene {
    min-height: 100vh;
    /* 背景不等比缩放：由 body 直接铺满视口（cover 居中裁边），宽屏两侧不再露灰底；
       等比缩放的画布只承载人物/卡片/按钮等内容元素（背景图为抽象渐变，裁切无对位问题） */
    background: #F4F6FA url("/img/iam/bg.png") center / cover no-repeat;
    font-family: "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
    -webkit-font-smoothing: antialiased;
}
/* 纯登录场景锁定视口不滚动；管理后台（admin.html）同 body 还有数据看板，保持可滚动 */
body.auth-scene:not(.admin-page) {
    height: 100vh;
    overflow: hidden;
}

/* ===== 画布（1672×941，fitStage 整体等比缩放） ===== */
.stage {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 1672px;
    height: 941px;
    transform: translate(-50%, -50%);
    transform-origin: center center;
    overflow: hidden;
    /* 背景已由 body 铺满：画布底色透明，让背景透出 */
    background: transparent;
}
/* 画布内的背景图已由 body 背景替代（铺满视口），隐藏防重叠 */
.stage-bg { display: none; }

/* ===== 华熙生物 logo（页面左上角通用） ===== */
.corner-logo {
    position: absolute;
    left: 44px;
    top: 30px;
    height: 47px;
    z-index: 5;
    user-select: none;
    pointer-events: none;
}

/* ===== 品牌（图标 + 标题） ===== */
.brand { position: absolute; display: flex; align-items: center; }
.brand--center {
    left: 0; right: 0; top: 222px;
    justify-content: center;
    gap: 30px;
    /* 图标+标题作为一个整体压在页面中轴上（flex 居中即可）：
       整组中心与副标语、登录按钮同处一条纵向中线 */
}
.brand--corner { left: 117px; top: 113px; gap: 24px; }
.brand-icon {
    display: flex; align-items: center; justify-content: center;
    width: 96px; height: 96px; border-radius: 24px;
    background: #FFFFFF;
    box-shadow: 0 16px 36px rgba(31, 64, 140, 0.14);
    flex: none;
}
.brand--corner .brand-icon { width: 78px; height: 78px; border-radius: 12px; }
.brand-icon svg { width: 100%; height: 100%; }
.brand-title {
    margin: 0;
    font-size: 64px; font-weight: 800; color: #1B3668;
    letter-spacing: 5px; line-height: 1.2; white-space: nowrap;
}
.brand--corner .brand-title { font-size: 46px; letter-spacing: 3px; }
.brand-slogan {
    position: absolute; left: 0; right: 0; top: 331px;
    margin: 0; text-align: center;
    font-size: 26px; color: #66748F; letter-spacing: 14px; text-indent: 14px;
}
.brand-subtitle {
    /* 标语下方的居中小标题（如管理后台登录页的「管理后台」） */
    position: absolute; left: 0; right: 0; top: 387px;
    margin: 0; text-align: center;
    font-size: 19px; font-weight: 600; color: #8A97B1;
    letter-spacing: 8px; text-indent: 8px;
}

/* ===== 场景元素（人物 / 玻璃卡 / 绿植 / 点阵 / 星芒）===== */
.character {
    position: absolute; left: 150px; top: 264px; width: 366px;
    z-index: 2; user-select: none; pointer-events: none;
}
.stage--corner .character { left: 232px; top: 318px; width: 332px; }

.glass { position: absolute; z-index: 1; pointer-events: none; user-select: none; }
.glass--check { left: 448px; top: 402px; width: 188px; }
.glass--donut { left: 578px; top: 326px; width: 186px; }
.glass--phone { left: 605px; top: 574px; width: 178px; }
/* IAM 首页（#stage）：两张玻璃装饰卡移到页面右侧；admin 登录页（#loginScreen）
   右侧是白色登录卡片，保持默认左侧布局，不走此覆盖 */
#stage .glass--check { left: 1170px; }
#stage .glass--phone { left: 1321px; }
.stage--corner .glass--check { left: 482px; top: 428px; width: 176px; }
.stage--corner .glass--donut { left: 602px; top: 330px; width: 172px; }
.stage--corner .glass--phone { left: 626px; top: 558px; width: 166px; }

.plant { position: absolute; left: 839px; top: 706px; width: 88px; z-index: 3; pointer-events: none; }
.stage--corner .plant { left: 828px; top: 716px; width: 82px; }

.dots {
    position: absolute; right: 67px; top: 58px;
    width: 196px; height: 110px; z-index: 1;
    background-image: radial-gradient(circle, #C7D5EC 2.6px, transparent 3.1px);
    background-size: 22px 22px;
    opacity: .75;
}
.sparkle { position: absolute; z-index: 1; pointer-events: none; }
.sparkle--big { right: 84px; top: 264px; width: 30px; height: 30px; }
.sparkle--small { right: 58px; top: 318px; width: 16px; height: 16px; }

/* ===== IAM 首页：企业账号登录按钮 =====
   按钮与提示/链接统一锚定页面中轴（与主标题、副标题同一条纵向中线） */
.iam-button {
    position: absolute; left: 50%; top: 500px; transform: translateX(-50%);
    width: 612px; height: 112px;
    display: flex; align-items: center; justify-content: center; gap: 18px;
    border: none; border-radius: 999px; padding: 0 32px;
    background: linear-gradient(180deg, #4C86F8 0%, #3172F2 100%);
    box-shadow: 0 20px 44px rgba(47, 107, 240, 0.35), inset 0 2px 0 rgba(255, 255, 255, 0.25);
    color: #FFFFFF; font-size: 30px; font-weight: 600; letter-spacing: 3px;
    font-family: inherit; cursor: pointer; z-index: 4;
    transition: filter .18s ease;
    box-sizing: border-box;
}
.iam-button:hover { filter: brightness(1.05); }
.iam-button:active { filter: brightness(.95); }
.iam-button:focus-visible { outline: 3px solid rgba(47, 114, 242, .45); outline-offset: 3px; }
.iam-button svg { flex: none; }

.iam-tip {
    position: absolute; left: 50%; top: 636px; transform: translateX(-50%);
    width: 612px; margin: 0; min-height: 24px;
    text-align: center; font-size: 16px; color: #8A97B1;
    opacity: 0; transition: opacity .25s ease; z-index: 4;
    pointer-events: none;
}
.iam-tip.visible { opacity: 1; }

/* ===== 登录 / 注册：白色卡片（画布右侧 + 竖向居中） ===== */
.auth-card {
    /* 固定在画布右侧，竖向按卡片实际高度居中：登录/注册两种高度各自精准居中 */
    position: absolute; right: 112px; top: 50%;
    transform: translateY(-50%);
    width: 595px;
    box-sizing: border-box; padding: 0 52px 48px;
    background: #FFFFFF; border-radius: 28px;
    box-shadow: 0 34px 80px rgba(30, 64, 140, 0.13);
    z-index: 4;
}

.auth-avatar {
    width: 100px; height: 100px; border-radius: 50%;
    background: #E9F1FE; margin: 56px auto 0;
    display: flex; align-items: center; justify-content: center;
}
.auth-card--register .auth-avatar { width: 92px; height: 92px; margin-top: 44px; }
.auth-title {
    margin: 20px 0 0; text-align: center;
    font-size: 30px; font-weight: 700; color: #1B3668;
    letter-spacing: 8px; text-indent: 8px;
}

/* 输入框组 */
.field { margin-top: 26px; }
.auth-card--login .field:first-of-type { margin-top: 42px; }
.auth-card--register .field:first-of-type { margin-top: 26px; }
.input-wrap {
    position: relative; height: 72px;
    display: flex; align-items: center;
    border: 1.5px solid #E4EAF4; border-radius: 16px; background: #FFFFFF;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.input-wrap:focus-within {
    border-color: #8FB0F7;
    box-shadow: 0 0 0 4px rgba(61, 116, 245, 0.10);
}
.input-wrap.invalid { border-color: #E08A8A; }
.input-icon {
    position: absolute; left: 24px;
    display: flex; align-items: center; justify-content: center;
    color: #A9B6CE; pointer-events: none;
}
.input-wrap input {
    width: 100%; height: 100%; box-sizing: border-box;
    border: none; outline: none; background: transparent;
    padding: 0 60px 0 62px;
    font-size: 19px; color: #23324F; font-family: inherit;
}
.input-wrap input::placeholder { color: #A0ADC4; }

.eye {
    position: absolute; right: 16px;
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    border: none; border-radius: 10px; background: none;
    color: #A9B6CE; cursor: pointer;
}
.eye:hover { color: #7E90B5; }
.eye .eye-closed { display: none; }
.eye.is-on .eye-open { display: none; }
.eye.is-on .eye-closed { display: flex; }

.field-error { margin: 6px 0 0; font-size: 13px; line-height: 1.25; color: #DE5F5F; }
.field-error:empty { display: none; }

/* 记住账号 */
.remember {
    display: flex; align-items: center; gap: 10px;
    margin: 20px 0 0;
    font-size: 15px; color: #5A6B8C;
    cursor: pointer; user-select: none; position: relative;
}
.remember input { position: absolute; opacity: 0; pointer-events: none; }
.remember .box {
    width: 20px; height: 20px; border-radius: 6px;
    border: 1.5px solid #C9D3E6; background: #FFFFFF;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s ease, border-color .15s ease;
    flex: none;
}
.remember .box svg { opacity: 0; transition: opacity .12s ease; }
.remember input:checked + .box { background: #3D74F5; border-color: #3D74F5; }
.remember input:checked + .box svg { opacity: 1; }
.remember input:focus-visible + .box { outline: 2px solid rgba(61, 116, 245, .4); outline-offset: 2px; }

/* 按钮：仅作用于登录/注册卡片内（避免与 style.css 全站 .btn-primary/.btn-outline 类名冲突，
   管理后台看板复用本文件场景样式时按钮不会被拉成大胶囊） */
.auth-card .btn-primary {
    display: block; width: 100%; height: 72px; margin-top: 30px;
    border: none; border-radius: 999px;
    background: linear-gradient(180deg, #4C86F8 0%, #3172F2 100%);
    box-shadow: 0 16px 36px rgba(47, 107, 240, 0.30), inset 0 2px 0 rgba(255, 255, 255, 0.25);
    color: #FFFFFF; font-size: 22px; font-weight: 600;
    letter-spacing: 10px; text-indent: 10px;
    font-family: inherit; cursor: pointer;
    transition: filter .18s ease;
}
.auth-card .btn-primary:hover { filter: brightness(1.05); }
.auth-card .btn-primary:active { filter: brightness(.95); }
.auth-card .btn-primary:disabled { filter: saturate(.55) brightness(1.02); cursor: default; }

.divider { height: 1px; background: #EEF2F8; margin: 32px 0 28px; }

.auth-card .btn-outline {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 72px; box-sizing: border-box;
    border: 1.5px solid #DFE6F2; border-radius: 999px; background: #FFFFFF;
    color: #33445F; font-size: 20px; letter-spacing: 10px; text-indent: 10px;
    text-decoration: none; cursor: pointer;
    transition: border-color .15s ease;
}
.auth-card .btn-outline:hover { border-color: #B9C9E8; }

.auth-switch { margin: 28px 0 0; text-align: center; font-size: 17px; color: #5A6B8C; }
.auth-switch a { margin-left: 8px; color: #3D74F5; font-weight: 600; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }
