/* ==========================================================================
   auth.css —— 登录 / 注册 / 找回密码 页专用
   与 element.css 共用设计令牌，页面本身不引入 layui
   ========================================================================== */

.auth-body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: var(--el-text-regular);
    background: linear-gradient(135deg, #f5f7fa 0%, #e9eef6 100%);
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 40px 36px 28px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 21, 41, .08);
    box-sizing: border-box;
}

/* ---------- 头部 ---------- */
.auth-head {
    text-align: center;
    margin-bottom: 28px;
}

.auth-head .auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    font-size: 17px;
    font-weight: 600;
    color: var(--el-text-primary);
}

.auth-head .auth-logo img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.auth-title {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 600;
    color: var(--el-text-primary);
}

.auth-sub {
    margin: 0;
    font-size: 13px;
    color: var(--el-text-secondary);
}

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

.auth-label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    color: var(--el-text-regular);
}

.auth-input {
    width: 100%;
    height: 42px;
    padding: 0 13px;
    font-size: 14px;
    color: var(--el-text-primary);
    background: #fff;
    border: 1px solid var(--el-border);
    border-radius: 8px;
    outline: none;
    box-sizing: border-box;
    transition: border-color .2s, box-shadow .2s;
}

.auth-input::placeholder {
    color: var(--el-text-placeholder);
}

.auth-input:focus {
    border-color: var(--el-primary);
    box-shadow: 0 0 0 3px rgba(64, 158, 255, .12);
}

/* 验证码行：输入框 + 图片 */
.auth-code-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.auth-code-row .auth-input {
    flex: 1;
    min-width: 0;
}

.auth-captcha {
    flex-shrink: 0;
    width: 112px;
    height: 42px;
    border: 1px solid var(--el-border);
    border-radius: 8px;
    cursor: pointer;
    object-fit: cover;
    background: #fff;
}

/* 邮箱验证码行：输入框 + 发送按钮 */
.auth-send-btn {
    flex-shrink: 0;
    height: 42px;
    padding: 0 14px;
    font-size: 13px;
    color: var(--el-primary);
    background: var(--el-primary-lighter);
    border: 1px solid #b3d8ff;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s;
}

.auth-send-btn:hover {
    background: #d9ecff;
}

.auth-send-btn:disabled {
    color: var(--el-text-placeholder);
    background: var(--el-fill);
    border-color: var(--el-border-light);
    cursor: not-allowed;
}

/* ---------- 按钮 ---------- */
.auth-btn {
    width: 100%;
    height: 44px;
    margin-top: 6px;
    font-size: 15px;
    font-weight: 500;
    color: #fff;
    background: var(--el-primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background .2s, opacity .2s;
}

.auth-btn:hover {
    background: #66b1ff;
}

.auth-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
}

/* ---------- 底部链接 ---------- */
.auth-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    font-size: 14px;
}

.auth-links a {
    color: var(--el-primary);
    text-decoration: none;
}

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

.auth-links .auth-back {
    color: var(--el-text-secondary);
}

/* ---------- 内联提示（如重置链接失效） ---------- */
.auth-alert {
    margin-bottom: 18px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.7;
    color: #cf1322;
    background: #fff1f0;
    border: 1px solid #ffccc7;
    border-radius: 8px;
}

.auth-alert a {
    color: var(--el-primary);
    text-decoration: none;
}

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

/* 只读输入（如重置页展示的邮箱） */
.auth-input:disabled {
    color: var(--el-text-secondary);
    background: var(--el-fill);
    cursor: not-allowed;
}

/* ---------- 提示 toast（替代 layui.layer，避免为弹窗引入整个 layui） ---------- */
.auth-toast {
    position: fixed;
    top: 28px;
    left: 50%;
    max-width: 80vw;
    padding: 11px 20px;
    font-size: 14px;
    color: #fff;
    background: rgba(48, 49, 51, .92);
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .15);
    opacity: 0;
    transform: translate(-50%, -14px);
    transition: opacity .25s, transform .25s;
    pointer-events: none;
    z-index: 9999;
}

.auth-toast.is-show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.auth-toast.is-error {
    background: #f56c6c;
}

.auth-toast.is-success {
    background: #67c23a;
}

/* ---------- 小屏适配 ---------- */
@media (max-width: 480px) {
    .auth-card {
        padding: 32px 22px 24px;
        box-shadow: none;
        border-radius: 10px;
    }

    .auth-captcha {
        width: 96px;
    }
}
