/* =====================================================
   GoCheck 登录/注册页 — 明亮蓝白灰专业风
   左侧品牌面板 + 右侧表单卡片，与落地页视觉统一
   ===================================================== */

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

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --ink: #0f172a;
    --ink-2: #334155;
    --ink-3: #64748b;
    --bg: #ffffff;
    --bg-soft: #f8fafc;
    --line: #e2e8f0;
    --sans: 'PingFang SC', 'Microsoft YaHei', 'Inter', -apple-system, 'Segoe UI', sans-serif;
}

body {
    font-family: var(--sans);
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg-soft);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

/* ============ 顶部导航 ============ */
.auth-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.auth-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.auth-logo-mark {
    width: 34px; height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 800;
}

.auth-logo-text {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.3px;
}

.auth-logo-text b { color: var(--primary); font-weight: 800; }

.auth-nav-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--ink-3);
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    transition: all .25s ease;
}

.auth-nav-back:hover {
    color: var(--primary);
    border-color: var(--primary);
}

/* ============ 主容器：左右分栏 ============ */
.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 64px 24px 0;
}

.auth-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: 1060px;
    margin: auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(15, 23, 42, .08);
}

/* ============ 左侧品牌面板 ============ */
.auth-brand {
    position: relative;
    background: linear-gradient(160deg, #2563eb 0%, #1e40af 100%);
    color: #fff;
    padding: 56px 48px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.auth-brand::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 260px; height: 260px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
}

.auth-brand::after {
    content: '';
    position: absolute;
    bottom: -100px; left: -60px;
    width: 240px; height: 240px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
}

.brand-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #fff;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .25);
    padding: 6px 14px;
    border-radius: 999px;
    width: fit-content;
    margin-bottom: 32px;
}

.brand-title {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: -.3px;
    margin-bottom: 14px;
}

.brand-desc {
    font-size: 15px;
    color: rgba(255, 255, 255, .78);
    line-height: 1.8;
    margin-bottom: 40px;
}

.brand-points {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: auto;
}

.brand-point {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    color: rgba(255, 255, 255, .92);
}

.brand-point svg {
    flex-shrink: 0;
    margin-top: 3px;
}

/* ============ 右侧表单区 ============ */
.auth-main {
    padding: 56px 52px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-title {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -.3px;
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 14.5px;
    color: var(--ink-3);
    margin-bottom: 30px;
}

/* 登录方式切换 */
.login-tabs {
    display: flex;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 24px;
}

.login-tab {
    flex: 1;
    padding: 9px 14px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-3);
    cursor: pointer;
    border-radius: 6px;
    transition: all .25s ease;
}

.login-tab.active {
    color: var(--primary);
    background: #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .1);
}

.login-tab:hover:not(.active) { color: var(--ink-2); }

/* 表单 */
.login-forms { position: relative; }

.login-form { display: none; }
.login-form.active { display: block; animation: fadeIn .35s ease; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.form-label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink-2);
    margin-bottom: 7px;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--line);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    color: var(--ink);
    background: #fff;
    transition: all .25s ease;
}

.form-input::placeholder { color: #94a3b8; }

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.form-input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .1);
}

/* 表单选项 */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 4px 0 16px;
    font-size: 14px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: var(--ink-2);
    user-select: none;
}

.checkbox-label input[type="checkbox"] { display: none; }

.checkbox-custom {
    width: 17px; height: 17px;
    border: 1.5px solid var(--line);
    border-radius: 4px;
    margin-right: 8px;
    position: relative;
    transition: all .25s ease;
    background: #fff;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    top: 1.5px; left: 4.5px;
    width: 4px; height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-text { font-size: 13.5px; }

/* 按钮 */
.btn {
    width: 100%;
    padding: 13px 28px;
    border: none;
    border-radius: 8px;
    font-size: 15.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all .25s ease;
    position: relative;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, .3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, .35);
}

.btn-primary:active { transform: translateY(0); }

.btn.loading { pointer-events: none; opacity: .85; }

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 18px; height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid transparent;
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 错误提示 */
.error-message {
    color: #ef4444;
    font-size: 12.5px;
    margin-top: 5px;
    min-height: 16px;
    line-height: 16px;
    visibility: hidden;
    opacity: 0;
    transition: opacity .2s ease;
}

.error-message.show {
    visibility: visible;
    opacity: 1;
}

/* 验证码 */
.captcha-group {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.captcha-input { flex: 1; }

.captcha-btn {
    padding: 12px 16px;
    background: var(--primary-light);
    border: 1.5px solid rgba(37, 99, 235, .25);
    border-radius: 8px;
    color: var(--primary);
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all .25s ease;
    white-space: nowrap;
    min-width: 112px;
}

.captcha-btn:hover:not(:disabled) {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.captcha-btn:disabled {
    background: var(--bg-soft);
    border-color: var(--line);
    color: #94a3b8;
    cursor: not-allowed;
}

.captcha-btn.loading {
    position: relative;
    color: transparent;
}

.captcha-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 15px; height: 15px;
    margin: -7.5px 0 0 -7.5px;
    border: 2px solid transparent;
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 底部链接 */
.auth-links {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 22px;
}

.auth-link {
    color: var(--ink-3);
    font-size: 14px;
    margin: 0;
}

.auth-link a {
    color: var(--primary);
    font-weight: 600;
    transition: color .25s ease;
}

.auth-link a:hover { color: var(--primary-dark); }

/* 浏览器自动填充 */
.form-input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #fff inset !important;
    -webkit-text-fill-color: var(--ink) !important;
}

.form-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 30px #fff inset, 0 0 0 3px rgba(37, 99, 235, .12) !important;
}

/* 页脚 */
.auth-footer {
    background: #fff;
    border-top: 1px solid var(--line);
    padding: 18px 0;
    text-align: center;
    font-size: 13px;
    color: var(--ink-3);
}

/* 步骤指示器（忘记密码） */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.step-number {
    width: 30px; height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-soft);
    border: 1.5px solid var(--line);
    color: var(--ink-3);
    font-size: 13.5px;
    font-weight: 700;
    transition: all .3s ease;
}

.step-label {
    font-size: 12px;
    color: var(--ink-3);
    white-space: nowrap;
    transition: color .3s ease;
}

.step.active .step-number {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 3px 10px rgba(37, 99, 235, .3);
}

.step.active .step-label {
    color: var(--primary);
    font-weight: 600;
}

.step.completed .step-number {
    background: var(--primary-light);
    border-color: var(--primary-light);
    color: var(--primary);
}

.step-line {
    width: 52px;
    height: 2px;
    background: var(--line);
    margin: 0 10px 20px;
    border-radius: 2px;
    transition: background .3s ease;
}

.step-line.completed { background: var(--primary); }

/* 分步表单 */
.form-step { display: none; }
.form-step.active { display: block; animation: fadeIn .35s ease; }

/* ============ 响应式 ============ */
@media (max-width: 900px) {
    .auth-panel { grid-template-columns: 1fr; max-width: 480px; }
    .auth-brand { display: none; }
    .auth-main { padding: 44px 36px; }
}

@media (max-width: 768px) {
    .auth-shell { padding: 64px 16px 0; }
    .auth-main { padding: 36px 24px; }
    .captcha-group { flex-direction: column; }
    .captcha-btn { min-width: auto; }
    .auth-links { flex-direction: column; gap: 12px; }
}
