/* ============================================================
 * 认证页公共样式（登录 / 注册）
 * 覆盖范围：view/auth/login/index.html, view/auth/register/index.html
 * ============================================================ */

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

body {
    min-height: 100vh;
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    background: #eef2f6;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* 背景装饰 */
body::before {
    content: '';
    position: fixed;
    top: -40%;
    right: -20%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(249,115,22,.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    bottom: -30%;
    left: -15%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(249,115,22,.04) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.auth-wrapper {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

/* 品牌区 */
.auth-brand {
    text-align: center;
    margin-bottom: 32px;
}

.auth-brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
    text-decoration: none;
}

.auth-brand-logo img {
    height: 40px;
    width: auto;
}

.auth-brand-text strong {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #333;
    line-height: 1.3;
    text-align: left;
}

.auth-brand-text span {
    font-size: 12px;
    color: #aaa;
    text-align: left;
}

.auth-brand p {
    display: none;
}

/* 卡片 */
.auth-card {
    background: #fff;
    border-radius: 12px;
    padding: 36px 32px 28px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06), 0 0 1px rgba(0,0,0,.05);
}

.auth-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 28px;
    text-align: center;
}

/* 表单 */
.auth-field {
    margin-bottom: 20px;
}

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

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap .auth-input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #bbb;
    pointer-events: none;
    transition: color .2s;
}

.auth-input-wrap .auth-input-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 密码显示/隐藏（注册页专用） */
.auth-eye-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #bbb;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color .2s;
    outline: none;
}

.auth-eye-toggle:hover {
    color: #f97316;
}

.auth-eye-toggle svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-input {
    width: 100%;
    height: 44px;
    padding: 0 40px 0 40px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fafbfc;
    font-size: 14px;
    color: #333;
    transition: all .2s;
    outline: none;
}

.auth-input::placeholder {
    color: #bbb;
}

.auth-input:focus {
    border-color: #f97316;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(249,115,22,.08);
}

.auth-input-wrap:focus-within .auth-input-icon {
    color: #f97316;
}

/* 按钮 */
.auth-submit {
    width: 100%;
    height: 44px;
    margin-top: 8px;
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all .25s;
    box-shadow: 0 4px 12px rgba(249,115,22,.25);
    letter-spacing: .5px;
}

.auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(249,115,22,.3);
}

.auth-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(249,115,22,.2);
}

.auth-submit:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
}

/* 底部链接 */
.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: #aaa;
}

.auth-footer a {
    color: #f97316;
    text-decoration: none;
    font-weight: 500;
    transition: color .15s;
}

.auth-footer a:hover {
    color: #ea580c;
}

/* 回首页 */
.auth-back {
    text-align: center;
    margin-top: 24px;
}

.auth-back a {
    font-size: 12px;
    color: #ccc;
    text-decoration: none;
    transition: color .15s;
}

.auth-back a:hover {
    color: #f97316;
}

/* 入场动画 */
@keyframes authSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-brand { animation: authSlideUp .5s ease both; }
.auth-card { animation: authSlideUp .5s ease .1s both; }
.auth-back { animation: authSlideUp .5s ease .2s both; }

/* 移动端 */
@media (max-width: 480px) {
    .auth-card {
        padding: 28px 20px 22px;
        border-radius: 10px;
    }

    .auth-brand-icon {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .auth-brand-text strong {
        font-size: 20px;
    }

    .auth-title {
        font-size: 18px;
    }
}


/* ── 注册协议勾选 ── */
.auth-agreement {
    margin: 4px 0 16px;
    font-size: 13px;
    color: #666;
}

.auth-agreement-label {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    cursor: pointer;
    line-height: 1.6;
}

.auth-agreement-label input[type="checkbox"] {
    margin-top: 3px;
    flex: none;
    cursor: pointer;
}

.auth-agreement a {
    color: #ff6a00;
    text-decoration: none;
}

.auth-agreement a:hover {
    text-decoration: underline;
}

/* ── 注册邮箱验证码 ── */
.auth-input-wrap--code {
    display: flex;
    align-items: center;
    gap: 8px;
}
.auth-input-wrap--code .auth-input {
    flex: 1;
    min-width: 0;
}
.auth-code-btn {
    flex-shrink: 0;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--primary-blue, #2563eb);
    border-radius: 4px;
    background: #eff6ff;
    color: var(--primary-blue, #2563eb);
    font-size: 13px;
    cursor: pointer;
}
.auth-code-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ── 登录滑块验证 ── */
.captcha-stage {
    position: relative;
    width: 300px;
    max-width: 100%;
    height: 150px;
    margin: 0 auto 10px;
    border-radius: 6px;
    overflow: hidden;
    background: #f1f5f9;
}
.captcha-bg {
    display: block;
    width: 300px;
    height: 150px;
    user-select: none;
}
.captcha-piece {
    position: absolute;
    top: 0;
    left: 0;
    width: 50px;
    height: 50px;
    cursor: grab;
    user-select: none;
}
.captcha-track {
    position: relative;
    width: 300px;
    max-width: 100%;
    height: 40px;
    margin: 0 auto;
    background: #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
}
.captcha-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 40px;
    background: #dbeafe;
    border-radius: 20px 0 0 20px;
}
.captcha-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background: #2563eb;
    color: #fff;
    border-radius: 20px;
    cursor: grab;
    user-select: none;
    z-index: 2;
}
.captcha-tip {
    display: block;
    margin-top: 6px;
    text-align: center;
    color: #8a93a0;
    font-size: 12px;
    cursor: pointer;
}

/* 算术验证码 */
.math-captcha {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #f5f7fa;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}
.math-captcha__question {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    letter-spacing: 1px;
    white-space: nowrap;
}
.math-captcha__eq {
    font-size: 18px;
    color: #6b7280;
}
.math-captcha__input {
    flex: 1;
    min-width: 0;
    height: 38px;
    padding: 0 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
    text-align: center;
    background: #fff;
}
.math-captcha__input:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}
.math-captcha__refresh {
    flex: none;
    width: 38px;
    height: 38px;
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 20px;
    color: #6b7280;
    line-height: 1;
}
.math-captcha__refresh:hover {
    color: #2563eb;
    border-color: #93c5fd;
}
