/* ========================================
   auth.css - 登录/注册页样式 (2025-2026 现代化重设计)
   养老人才网 yanglaojob
   ======================================== */

/* ===== CSS变量 ===== */
:root {
    --auth-primary: #d4380d;
    --auth-primary-light: #e85d2a;
    --auth-primary-bg: #fff7f0;
    --auth-primary-glow: rgba(255, 68, 0, 0.25);
    --auth-secondary: #1677ff;
    --auth-success: #52c41a;
    --auth-danger: #ff4d4f;
    --auth-text: #1a1a2e;
    --auth-text-secondary: #555770;
    --auth-text-muted: #8c8ca1;
    --auth-border: #e8e8ef;
    --auth-bg: #f4f5f9;
    --auth-card: #ffffff;
    --auth-radius: 10px;
    --auth-radius-lg: 14px;
    --auth-radius-xl: 18px;
    --auth-shadow: 0 2px 12px rgba(26, 26, 46, 0.06);
    --auth-shadow-md: 0 6px 20px rgba(26, 26, 46, 0.08);
    --auth-shadow-lg: 0 12px 36px rgba(26, 26, 46, 0.10);
    --auth-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --auth-font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    --auth-glass: rgba(255, 255, 255, 0.72);
}

/* ===== 页面容器（左右分栏） ===== */
.auth-page {
    min-height: 100vh;
    display: flex;
    background: var(--auth-bg);
}

/* ===== 左侧品牌展示区 ===== */
.auth-brand {
    flex: 0 0 42%;
    background: linear-gradient(135deg, #d4380d 0%, #e85d2a 35%, #e85d2a 65%, #e85d2a 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 48px;
    position: relative;
    overflow: hidden;
}

/* 装饰图形 */
.auth-brand::before {
    content: '';
    position: absolute;
    top: -80px;
    left: -80px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    filter: blur(2px);
}

.auth-brand::after {
    content: '';
    position: absolute;
    bottom: -60px;
    right: -40px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    filter: blur(1px);
}

.auth-brand-logo {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.auth-brand-logo img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.auth-brand-title {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 14px;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
}

.auth-brand-slogan {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    text-align: center;
    max-width: 320px;
    position: relative;
    z-index: 1;
}

/* 装饰圆点 */
.auth-brand-dots {
    display: flex;
    gap: 8px;
    margin-top: 40px;
    position: relative;
    z-index: 1;
}

.auth-brand-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: var(--auth-transition);
}

.auth-brand-dot--active {
    background: #fff;
    width: 24px;
    border-radius: 4px;
}

/* ===== 右侧表单区 ===== */
.auth-form-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    position: relative;
}

/* 背景装饰 */
.auth-form-side::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -120px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 68, 0, 0.04), transparent 70%);
    pointer-events: none;
}

.auth-form-side::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(22, 119, 255, 0.03), transparent 70%);
    pointer-events: none;
}

/* ===== 卡片 ===== */
.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--auth-card);
    border-radius: var(--auth-radius-xl);
    box-shadow: var(--auth-shadow-lg);
    padding: 44px 40px;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

/* ===== 头部 ===== */
.auth-header {
    text-align: center;
    margin-bottom: 36px;
}

.auth-header__title {
    font-size: 26px;
    font-weight: 700;
    color: var(--auth-text);
    margin: 0 0 10px;
    letter-spacing: -0.3px;
}

.auth-header__subtitle {
    font-size: 14px;
    color: var(--auth-text-muted);
    margin: 0;
}

/* 免费提示 */
.auth-free-tip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 5px 16px;
    background: linear-gradient(135deg, rgba(82,196,26,0.08), rgba(82,196,26,0.04));
    border: 1px solid rgba(82,196,26,0.2);
    border-radius: 30px;
    color: #389e0d;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.auth-free-tip svg { flex-shrink: 0; }

/* ===== 用户类型选择器 ===== */
.auth-type-selector {
    display: flex;
    gap: 14px;
    margin-bottom: 32px;
}

.auth-type-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 14px;
    border: 2px solid var(--auth-border);
    border-radius: var(--auth-radius-lg);
    cursor: pointer;
    transition: var(--auth-transition);
    background: #fff;
    position: relative;
    pointer-events: auto;
    z-index: 1;
}

.auth-type-card:hover {
    border-color: #ffb399;
    background: #fffbf9;
    transform: translateY(-2px);
    box-shadow: var(--auth-shadow-md);
}

.auth-type-card.active {
    border-color: var(--auth-primary);
    background: var(--auth-primary-bg);
    box-shadow: 0 0 0 4px rgba(255, 68, 0, 0.06);
}

/* 勾选角标 */
.auth-type-card.active::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #d4380d, #e85d2a);
    border-radius: 0 var(--auth-radius-lg) 0 10px;
    pointer-events: none;
}

.auth-type-card.active::before {
    content: '';
    position: absolute;
    top: 4px;
    right: 6px;
    width: 9px;
    height: 5px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg);
    z-index: 2;
    pointer-events: none;
}

.auth-type-card__icon {
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
    color: var(--auth-text-muted);
    transition: var(--auth-transition);
}

.auth-type-card.active .auth-type-card__icon {
    color: var(--auth-primary);
    transform: scale(1.1);
}

.auth-type-card__label {
    font-size: 13px;
    font-weight: 500;
    color: var(--auth-text-secondary);
    transition: var(--auth-transition);
}

.auth-type-card.active .auth-type-card__label {
    color: var(--auth-primary);
    font-weight: 600;
}

.auth-type-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
    z-index: -1;
}

.auth-type-card svg,
.auth-type-card span {
    pointer-events: none;
}

/* ===== 表单组 ===== */
.auth-form-group {
    margin-bottom: 22px;
    position: relative;
}

.auth-form-group__label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--auth-text-secondary);
    margin-bottom: 8px;
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-wrap__icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: #b0b0c0;
    pointer-events: none;
    transition: var(--auth-transition);
}

.auth-input {
    width: 100%;
    height: 48px;
    padding: 0 14px 0 44px;
    border: 1.5px solid var(--auth-border);
    border-radius: var(--auth-radius);
    font-size: 14px;
    color: var(--auth-text);
    background: #fff;
    transition: var(--auth-transition);
    outline: none;
    box-sizing: border-box;
}

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

.auth-input:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px rgba(255, 68, 0, 0.06), var(--auth-shadow-md);
}

.auth-input:focus + .auth-input-wrap__icon,
.auth-input:focus ~ .auth-input-wrap__icon {
    color: var(--auth-primary);
}

/* 密码可见切换 */
.auth-input-wrap__toggle {
    position: absolute;
    right: 14px;
    width: 22px;
    height: 22px;
    color: #b0b0c0;
    cursor: pointer;
    transition: var(--auth-transition);
    background: none;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-input-wrap__toggle:hover {
    color: var(--auth-text-secondary);
}

.auth-input--password {
    padding-right: 48px;
}

/* ===== 验证码行 ===== */
.auth-captcha-row {
    display: flex;
    gap: 14px;
    align-items: center;
}

.auth-captcha-row .auth-input-wrap {
    flex: 1;
}

.auth-captcha-img {
    height: 48px;
    border-radius: var(--auth-radius);
    cursor: pointer;
    flex-shrink: 0;
    border: 1.5px solid var(--auth-border);
    transition: var(--auth-transition);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.auth-captcha-img:hover {
    opacity: 0.85;
    border-color: var(--auth-primary);
    box-shadow: 0 2px 8px rgba(212,56,13,0.12);
}

.auth-captcha-img:active {
    transform: scale(0.97);
}

/* ===== 错误提示 ===== */
.auth-form-error {
    font-size: 12px;
    color: var(--auth-danger);
    margin-top: 6px;
    min-height: 18px;
}

/* ===== 错误提示条 ===== */
.auth-alert {
    padding: 14px 18px;
    border-radius: var(--auth-radius);
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
    animation: authAlertIn .3s ease;
}

.auth-alert--error {
    background: #fff1f0;
    color: var(--auth-danger);
    border: 1px solid rgba(255, 77, 79, 0.12);
}

@keyframes authAlertIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== 提交按钮 ===== */
.auth-submit-btn {
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, #d4380d, #e85d2a);
    color: #fff;
    border: none;
    border-radius: var(--auth-radius);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 4px;
    cursor: pointer;
    transition: var(--auth-transition);
    margin-top: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(255, 68, 0, 0.22);
}

.auth-submit-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.15), transparent);
    pointer-events: none;
}

.auth-submit-btn:hover {
    box-shadow: var(--auth-primary-glow), 0 8px 24px rgba(255, 68, 0, 0.28);
    transform: translateY(-2px);
}

.auth-submit-btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 8px rgba(255, 68, 0, 0.2);
}

.auth-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ===== 协议文本 ===== */
.auth-agreement {
    text-align: center;
    font-size: 12px;
    color: var(--auth-text-muted);
    margin-top: 18px;
}

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

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

/* ===== 底部链接 ===== */
.auth-footer {
    text-align: center;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--auth-border);
    font-size: 14px;
    color: var(--auth-text-muted);
}

.auth-footer a {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
    transition: var(--auth-transition);
}

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

/* ===== Toast 通知 ===== */
.auth-toast-container {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
}

.auth-toast {
    padding: 14px 28px;
    border-radius: var(--auth-radius-lg);
    font-size: 14px;
    color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    animation: authToastIn .35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    max-width: 380px;
    text-align: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.auth-toast--success {
    background: rgba(82, 196, 26, 0.92);
}

.auth-toast--error {
    background: rgba(255, 77, 79, 0.92);
}

.auth-toast--info {
    background: rgba(22, 119, 255, 0.92);
}

.auth-toast--out {
    animation: authToastOut .25s ease forwards;
}

@keyframes authToastIn {
    from {
        opacity: 0;
        transform: translateY(-16px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes authToastOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-16px) scale(0.96);
    }
}

/* ===== 密码强度指示器 ===== */
.uc-pwd-strength {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.uc-pwd-bar {
    flex: 1;
    height: 6px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 3px;
    overflow: hidden;
}

.uc-pwd-fill {
    height: 100%;
    width: 0;
    border-radius: 3px;
    transition: all .4s cubic-bezier(0.4, 0, 0.2, 1);
}

.uc-pwd-text {
    font-size: 12px;
    color: var(--auth-text-muted);
    white-space: nowrap;
    min-width: 50px;
}

/* ===== 表单验证错误 ===== */
.uc-input-error {
    border-color: var(--auth-danger) !important;
    box-shadow: 0 0 0 4px rgba(255, 77, 79, 0.08) !important;
}

.uc-field-error {
    color: var(--auth-danger);
    font-size: 12px;
    margin-top: 6px;
    display: block;
}

/* ===== 第三方登录按钮区 ===== */
.auth-oauth-section {
    margin-bottom: 24px;
}

.auth-oauth-buttons {
    display: flex;
    gap: 12px;
}

.auth-oauth-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    border-radius: var(--auth-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--auth-transition);
    text-decoration: none;
    border: 1.5px solid var(--auth-border);
    background: #fff;
    color: var(--auth-text-secondary);
}

.auth-oauth-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--auth-shadow-md);
}

.auth-oauth-btn:active {
    transform: translateY(0) scale(0.98);
}

/* 微信登录按钮 */
.auth-oauth-btn--wechat {
    color: #07c160;
    border-color: rgba(7, 193, 96, 0.25);
}

.auth-oauth-btn--wechat:hover {
    background: rgba(7, 193, 96, 0.06);
    border-color: #07c160;
}

/* QQ登录按钮 */
.auth-oauth-btn--qq {
    color: #12b7f5;
    border-color: rgba(18, 183, 245, 0.25);
}

.auth-oauth-btn--qq:hover {
    background: rgba(18, 183, 245, 0.06);
    border-color: #12b7f5;
}

/* 分割线 */
.auth-divider {
    display: flex;
    align-items: center;
    margin-top: 20px;
    margin-bottom: 4px;
    gap: 16px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--auth-border);
}

.auth-divider span {
    font-size: 12px;
    color: var(--auth-text-muted);
    white-space: nowrap;
}

/* ===== 响应式 ===== */
@media (max-width: 991px) {
    .auth-brand {
        flex: 0 0 36%;
        padding: 40px 32px;
    }
    .auth-brand-title {
        font-size: 26px;
    }
    .auth-form-side {
        padding: 36px;
    }
}

@media (max-width: 767px) {
    .auth-page {
        flex-direction: column;
        min-height: auto;
    }

    /* 移动端品牌区缩小 */
    .auth-brand {
        flex: none;
        padding: 36px 24px 28px;
    }

    .auth-brand-logo {
        width: 56px;
        height: 56px;
        border-radius: 16px;
        margin-bottom: 16px;
    }

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

    .auth-brand-title {
        font-size: 22px;
        margin-bottom: 8px;
    }

    .auth-brand-slogan {
        font-size: 13px;
    }

    .auth-brand-dots {
        margin-top: 20px;
    }

    .auth-form-side {
        padding: 24px 16px 36px;
    }

    .auth-card {
        padding: 28px 22px;
        max-width: 100%;
        border-radius: var(--auth-radius-lg);
        box-shadow: var(--auth-shadow-md);
    }

    .auth-header__title {
        font-size: 22px;
    }

    .auth-type-selector {
        gap: 10px;
    }

    .auth-type-card {
        padding: 14px 10px;
    }

    .auth-type-card__icon {
        width: 30px;
        height: 30px;
    }

    .auth-type-card__label {
        font-size: 12px;
    }

    .auth-submit-btn {
        height: 46px;
        font-size: 15px;
    }

    .auth-input {
        height: 46px;
    }

    .auth-captcha-img {
        height: 46px;
    }
}

@media (max-width: 400px) {
    .auth-brand {
        padding: 28px 16px 20px;
    }

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

    .auth-card {
        padding: 24px 18px;
    }

    .auth-type-card {
        padding: 12px 8px;
    }
}
