/* ===== 登录 / 注册页（手机端优先，与聊天页同风格） ===== */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
    --primary: #4C6EF5;
    --primary-dark: #3b5bdb;
    --bg: #f2f4f8;
    --text: #1a1a2e;
    --gray: #888;
    --danger: #FA5252;
}

html, body { height: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    overscroll-behavior: none;
}

.auth-page {
    position: relative;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: calc(env(safe-area-inset-top) + 24px) 20px calc(env(safe-area-inset-bottom) + 24px);
    background: linear-gradient(160deg, #eef1ff 0%, #f2f4f8 45%, #f7f8fc 100%);
}

/* ===== 品牌区 ===== */
.brand { text-align: center; margin-bottom: 28px; animation: fadeUp .4s ease; }

.brand-logo {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, #4C6EF5, #7048e8);
    border-radius: 20px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 34px;
    box-shadow: 0 10px 24px rgba(76,110,245,.35);
    margin-bottom: 14px;
}

.brand-name { font-size: 20px; font-weight: 700; letter-spacing: 1px; }
.brand-sub { font-size: 13px; color: var(--gray); margin-top: 4px; }

/* ===== 表单卡片 ===== */
.auth-card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 20px;
    padding: 26px 22px;
    box-shadow: 0 12px 32px rgba(30, 40, 90, .08);
    animation: fadeUp .45s ease;
}

@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.auth-card h1 { font-size: 18px; font-weight: 600; margin-bottom: 20px; text-align: center; }

.form-group { margin-bottom: 16px; }

.form-label {
    display: block;
    font-size: 13px;
    color: #556;
    margin-bottom: 6px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #e4e7f0;
    border-radius: 12px;
    font-size: 15px;
    background: #f8f9fd;
    color: var(--text);
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
    -webkit-appearance: none;
    appearance: none;
}

.form-input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(76,110,245,.12);
}

select.form-input { cursor: pointer; }

.btn-primary {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #4C6EF5, #7048e8);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .15s, box-shadow .2s, opacity .2s;
    box-shadow: 0 6px 16px rgba(76,110,245,.3);
}

.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .6; }

.form-error {
    background: rgba(250,82,82,.08);
    border: 1px solid rgba(250,82,82,.25);
    color: var(--danger);
    font-size: 13px;
    line-height: 1.5;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 14px;
}

.field-error { color: var(--danger); font-size: 12px; margin-top: 4px; display: block; }

.auth-code-tip { font-size: 12px; margin-top: 4px; color: var(--gray); min-height: 16px; }
.auth-code-tip.is-ready { color: var(--success, #2e7d32); }
.auth-code-tip.is-warn { color: var(--danger); }

.auth-footer { text-align: center; margin-top: 18px; font-size: 13px; color: var(--gray); }
.auth-footer a { color: var(--primary); text-decoration: none; font-weight: 500; }
.auth-footer a:active { opacity: .7; }

/* 备案号：绝对定位于页面底部，不参与 flex 布局，表单居中位置不受影响 */
.page-icp {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(env(safe-area-inset-bottom) + 12px);
    font-size: 11px;
    color: #A8B4C8;
    text-align: center;
}
