/* =========================================================
   登录 / 注册页专属样式（auth.css） - 基于 640px 统一容器
   ========================================================= */

.auth-app {
    max-width: 640px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-page);
    position: relative;
    overflow-x: hidden;
}

/* 顶部渐变装饰 */
.auth-app::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 300px;
    background: radial-gradient(circle, rgba(254,83,83,0.15) 0%, rgba(254,83,83,0) 70%);
    pointer-events: none;
    z-index: 0;
}

/* 复用 header-bar 样式，稍微调整边距 */
.auth-header {
    background: transparent !important;
    box-shadow: none !important;
    border-bottom: none !important;
}

.auth-content {
    padding: 0 20px 40px;
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.auth-brand {
    padding: 10px 0 24px;
}

.auth-logo {
    font-size: 30px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.auth-tagline {
    font-size: 12px;
    color: var(--primary);
    opacity: 0.9;
    margin-top: 4px;
    letter-spacing: 0.4px;
}

.auth-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 20px;
}

.auth-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* 表单卡片 */
.auth-card {
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: 0 6px 24px rgba(254,83,83,0.08);
    padding: 10px 20px 24px;
    margin-bottom: 20px;
    margin-top: 16px;
}

.form-item {
    position: relative;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-light);
    min-height: 54px;
    transition: border-color 0.2s;
}

.form-item:focus-within {
    border-bottom-color: var(--primary);
}

.form-item.is-error {
    border-bottom-color: #e74c3c;
}

.form-icon {
    width: 22px;
    flex-shrink: 0;
    color: var(--text-muted);
    font-size: 16px;
    text-align: center;
    margin-right: 10px;
    transition: color 0.2s;
}

.form-item:focus-within .form-icon {
    color: var(--primary);
}

.form-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-size: 15px;
    color: var(--text-main);
    padding: 14px 0;
    -webkit-appearance: none;
    appearance: none;
}

.form-input::placeholder {
    color: var(--text-muted);
    font-size: 14px;
}

/* 输入框右侧操作 */
.form-suffix {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
}

.input-clear {
    width: 26px;
    height: 26px;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-soft);
    color: var(--text-muted);
    font-size: 11px;
    cursor: pointer;
    border: none;
}
.input-clear.show { display: flex; }

.pwd-toggle {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    border: none;
    background: none;
}

/* 验证码区域 */
.captcha-img {
    width: 100px;
    height: 38px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--border-light);
    flex-shrink: 0;
    margin-left: 10px;
}
.captcha-img img { width: 100%; height: 100%; object-fit: cover; }

/* 错误提示 */
.form-error {
    display: none;
    font-size: 12px;
    color: #e74c3c;
    padding: 4px 0 0 32px;
    line-height: 1.4;
}
.form-error.show { display: block; }

/* 协议复选框 */
.agree-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 18px 0 4px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}
.agree-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 1px;
    accent-color: var(--primary);
    flex-shrink: 0;
    cursor: pointer;
}
.agree-row a { color: var(--primary); }

/* 主按钮 */
.auth-submit {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 24px;
    background: var(--primary);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin-top: 20px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(254,83,83,0.28);
    transition: opacity 0.2s;
    letter-spacing: 1px;
}
.auth-submit:active { opacity: 0.85; }
.auth-submit:disabled { opacity: 0.6; cursor: not-allowed; box-shadow: none; }

/* 底部切换链接 (调整到按钮下方) */
.auth-switch-bottom {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}
.auth-switch-bottom a {
    color: var(--primary);
    font-weight: 600;
    margin-left: 4px;
}