/* ============================================================
   auth-page.css  登录 / 注册页专属样式
   与全站导航、登录弹窗保持同一设计语言：
   蓝 #2563eb、白底卡片、线性 SVG 图标、圆角 10/16px、克制阴影。
   版本 20260909-1
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #0f172a;
    background: linear-gradient(180deg, #eef4ff 0%, #f6f9ff 46%, #ffffff 100%);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border: 1px solid #e8edf4;
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, .12);
    padding: 32px 32px 26px;
}

/* 品牌 */
.auth-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
}
.auth-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #4f8dff, #2563eb 55%, #1d4ed8);
    color: #fff;
    box-shadow: 0 4px 10px rgba(37, 99, 235, .25);
}
.auth-brand-mark svg { width: 20px; height: 20px; }
.auth-brand-name {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.auth-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
}
.auth-subtitle {
    margin-top: 6px;
    font-size: 13.5px;
    color: #64748b;
}

/* 消息提示 */
.auth-message {
    margin-top: 18px;
    padding: 10px 12px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fef2f2;
    color: #dc2626;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
}
.auth-message[hidden] { display: none; }
.auth-message.is-success {
    border-color: #a7f3d0;
    background: #ecfdf5;
    color: #059669;
}

/* 表单 */
.auth-form { margin-top: 20px; }
.auth-field { display: block; margin-top: 16px; }
.auth-field:first-child { margin-top: 0; }
.auth-label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: #334155;
}
.auth-input-wrap {
    position: relative;
    display: block;
    margin-top: 8px;
}
.auth-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: #a3aec3;
    pointer-events: none;
}
.auth-input-icon svg { display: block; width: 18px; height: 18px; }
.auth-input-wrap:has(.auth-qq-preview) .auth-input {
    padding-right: 56px;
}
.auth-qq-preview {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    align-items: center;
    justify-content: center;
}
.auth-qq-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.auth-input {
    display: block;
    width: 100%;
    height: 46px;
    padding: 0 14px 0 44px;
    border: 1px solid #dbe2ec;
    border-radius: 10px;
    outline: none;
    background: #fff;
    color: #0f172a;
    font: inherit;
    font-size: 14.5px;
    font-weight: 500;
    transition: border-color .15s, box-shadow .15s;
}
.auth-input::placeholder { color: #b0bac9; font-weight: 400; }
.auth-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.auth-field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* 按钮 */
.auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 46px;
    margin-top: 22px;
    border: 1px solid #2563eb;
    border-radius: 10px;
    padding: 0 16px;
    background: #2563eb;
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.auth-submit:hover { background: #1d4ed8; border-color: #1d4ed8; }
.auth-submit:disabled { cursor: not-allowed; opacity: .6; }
.auth-submit svg { width: 17px; height: 17px; }

.auth-oauth-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0 12px;
    color: #94a3b8;
    font-size: 12px;
}
.auth-oauth-divider::before,
.auth-oauth-divider::after {
    content: '';
    height: 1px;
    flex: 1;
    background: #edf1f6;
}
.auth-oauth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 42px;
    border: 1px solid #dbe2ec;
    border-radius: 10px;
    background: #fff;
    color: #334155;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .15s, background .15s;
}
.auth-oauth-btn:hover { border-color: #cbd5e1; background: #f8fafc; }
.auth-oauth-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #24a1ff;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

/* 底部链接 */
.auth-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
    font-size: 13px;
}
.auth-links a {
    color: #64748b;
    text-decoration: none;
    transition: color .15s;
}
.auth-links a:hover { color: #2563eb; }
.auth-links a.is-primary { color: #2563eb; font-weight: 600; }
.auth-links a.is-primary:hover { color: #1d4ed8; text-decoration: underline; }

@media (max-width: 480px) {
    .auth-card { padding: 26px 22px 22px; border-radius: 14px; }
    .auth-field-grid { grid-template-columns: 1fr; gap: 0; }
}
