/* =============================================================
   auth.css — 登录 / 注册页
   PC：左右分栏（品牌叙事区 + 表单区）；手机：单列
   ============================================================= */

.auth-wrap {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(380px, 44%) 1fr;
}

/* ---------- 左侧品牌区 ---------- */
.auth-brand {
    position: relative;
    background:
        radial-gradient(1200px 600px at -10% 110%, color-mix(in srgb, var(--primary) 30%, transparent), transparent 60%),
        var(--primary-strong);
    color: #fff;
    padding: 56px 56px 40px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 超大衬线水印字（编辑感的签名元素） */
.auth-brand::after {
    content: "启明";
    position: absolute;
    right: -40px;
    bottom: -70px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 220px;
    line-height: 1;
    color: rgb(255 255 255 / 0.06);
    pointer-events: none;
    white-space: nowrap;
}

.auth-brand .brand { color: #fff; margin-bottom: 0; }
.auth-brand-sub {
    margin: 8px 0 auto;
    color: rgb(255 255 255 / 0.62);
    font-size: 13px;
    letter-spacing: 0.08em;
    position: relative;
    z-index: 1;
}

.auth-headline {
    font-size: clamp(30px, 3.4vw, 44px);
    letter-spacing: 0.01em;
    margin: 48px 0 28px;
    position: relative;
    z-index: 1;
}

.auth-points {
    list-style: none;
    display: grid;
    gap: 14px;
    position: relative;
    z-index: 1;
}
.auth-points li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: rgb(255 255 255 / 0.86);
    font-size: 15px;
}
.auth-points .ico {
    width: 20px; height: 20px;
    color: rgb(255 255 255 / 0.65);
    margin-top: 3px;
}

.auth-footnote {
    margin-top: 48px;
    color: rgb(255 255 255 / 0.55);
    font-size: 13px;
    letter-spacing: 0.08em;
}

/* ---------- 右侧表单区 ---------- */
.auth-form-area {
    display: flex;
    flex-direction: column;
    padding: 32px clamp(20px, 6vw, 72px);
}

/* ---------- 注册 / 登录方式切换 ---------- */
.method-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin: 0 0 22px;
    padding: 4px;
    background: color-mix(in srgb, var(--text-faint) 14%, transparent);
    border-radius: 999px;
}
.method-tab {
    border: 0;
    background: transparent;
    padding: 9px 0;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 200ms var(--ease), color 200ms var(--ease);
}
.method-tab.active {
    background: var(--primary-soft);
    color: var(--primary);
}
.method-tab.disabled {
    color: var(--text-faint);
    opacity: 0.55;
    cursor: not-allowed;
}

/* ---------- 轻量弹窗（「功能开发中」提示） ---------- */
.v3-modal-mask {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgb(16 14 11 / 0.5);
    backdrop-filter: blur(4px);
    animation: v3ModalIn 150ms var(--ease);
}
.v3-modal {
    width: min(340px, 100%);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 28px 24px 20px;
    text-align: center;
    animation: v3ModalPop 200ms var(--ease);
}
.v3-modal-msg {
    margin: 0 0 20px;
    font-size: 15px;
    font-weight: 600;
}
.v3-modal .btn { width: 100%; }
@keyframes v3ModalIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes v3ModalPop {
    from { opacity: 0; transform: translateY(10px) scale(0.97); }
    to { opacity: 1; transform: none; }
}

.auth-card {
    width: min(460px, 100%);
    margin: auto 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 36px 34px 28px;
}

.auth-title { font-size: 28px; }
.auth-sub {
    color: var(--text-muted);
    font-size: 14px;
    margin: 6px 0 26px;
}

/* ---------- 账号类型选择 ---------- */
.type-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.type-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 12px 10px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color 200ms var(--ease), background 200ms var(--ease);
}
.type-card:hover { border-color: var(--primary); }
.type-card input { position: absolute; opacity: 0; pointer-events: none; }
.type-ico { color: var(--text-muted); }
.type-ico .ico { width: 22px; height: 22px; }
.type-name { font-weight: 700; font-size: 15px; }
.type-desc { font-size: 11px; color: var(--text-faint); line-height: 1.4; }
.type-card:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-soft);
}
.type-card:has(input:checked) .type-ico { color: var(--primary); }

/* ---------- 验证码行 ---------- */
.code-row {
    display: grid;
    grid-template-columns: 1fr 148px;
    gap: 10px;
}
.btn-send { white-space: nowrap; }
.btn-send[disabled] { opacity: 0.6; cursor: not-allowed; }

/* ---------- 全局表单提示 ---------- */
.form-alert {
    display: none;
    margin-top: 16px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: var(--danger-soft);
    color: var(--danger);
    font-size: 14px;
}
.form-alert.show { display: block; }

.form-alert.ok { background: var(--ok-soft); color: var(--ok); }

.form-note {
    margin-top: 18px;
    text-align: center;
    color: var(--text-faint);
    font-size: 12px;
}

#register-form .btn-block { margin-top: 6px; }

/* 开发模式验证码提示 */
.dev-code-tip {
    margin-top: 8px;
    font-size: 13px;
    color: var(--accent);
    word-break: break-all;
}

/* ---------- 手机端（<768px） ---------- */
@media (max-width: 767px) {
    .auth-wrap { grid-template-columns: 1fr; }

    .auth-brand {
        padding: 22px 20px 26px;
        background: var(--primary-strong);
    }
    .auth-headline { font-size: 24px; margin: 14px 0 14px; }
    .auth-points { gap: 8px; }
    .auth-points li { font-size: 13px; }
    .auth-points .type-ico { display: none; }
    .auth-footnote { display: none; }
    .auth-brand::after { font-size: 120px; bottom: -38px; right: -14px; }

    .auth-form-area { padding: 4px 16px 32px; }
    .auth-card { padding: 26px 20px 22px; box-shadow: var(--shadow); }
    .auth-title { font-size: 24px; }

    .type-cards { grid-template-columns: 1fr; } /* 类型卡片改整行，触摸目标更大 */
    .type-card { flex-direction: row; align-items: center; gap: 10px; }
    .type-desc { margin-left: auto; text-align: right; }

    .code-row { grid-template-columns: 1fr; }

    /* 手机端触控目标加大 */
    .btn { min-height: 48px; }
    .control input { min-height: 48px; font-size: 16px; } /* ≥44px 且防 iOS 缩放 */
}
