/* login.css - 扁平极简风格，调整卡片宽度适配带图/无图页面 */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #f5f7fa;
    color: #1e293b;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 主容器 */
.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

/* 卡片基础样式 */
.auth-panel {
    display: flex;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s;
}
.auth-panel:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

/* 带图片的卡片 (登录页) */
.auth-panel--with-banner {
    max-width: 960px; /* 整体宽度控制 */
    width: 100%;
}
.auth-panel--with-banner .auth-panel__form {
    flex: 1 1 50%;
    padding: 48px 44px;
}
.auth-panel--with-banner .auth-panel__banner {
    flex: 1 1 50%;
    position: relative;
    background: #eef2f6;
}

/* 无图片的卡片 (注册/忘记密码) */
.auth-panel--no-banner {
    max-width: 460px; /* 窄卡片 */
    width: 100%;
    margin: 0 auto;
}
.auth-panel--no-banner .auth-panel__form {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    padding: 44px 36px;
}

/* 左侧表单通用样式 */
.auth-panel__title {
    font-size: 30px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 6px;
}
.auth-panel__subtitle {
    font-size: 15px;
    color: #64748b;
    margin-bottom: 28px;
    border-left: 3px solid var(--color-primary);
    padding-left: 16px;
}

/* 下划线选项卡 */
.auth-tabs {
    display: flex;
    gap: 24px;
    margin-bottom: 28px;
    border-bottom: 1px solid #e9edf2;
}
.auth-tabs__btn {
    border: none;
    background: transparent;
    padding: 8px 0 10px;
    font-size: 16px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: 0.2s;
}
.auth-tabs__btn:hover {
    color: #1e293b;
}
.auth-tabs__btn--active {
    color: #0f172a;
    font-weight: 600;
    border-bottom-color: var(--color-primary);
}

/* 表单元素 */
.auth-form {
    transition: opacity 0.2s;
}
.auth-form--hidden {
    display: none;
}
.auth-form__group {
    margin-bottom: 18px;
}
.auth-form__group--with-btn {
    display: flex;
    gap: 12px;
    align-items: stretch;
}
.auth-form__group--with-btn .auth-form__label,
.auth-form__group--with-btn .auth-form__label--flex {
    flex: 1;
    min-width: 0;
}
.auth-form__label {
    display: flex;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0 14px;
    background: #f8fafc;
    height: 48px;
    transition: 0.2s;
}
.auth-form__label:focus-within {
    border-color: var(--color-primary);
    background: white;
}
.auth-form__icon {
    font-size: 16px;
    color: #94a3b8;
    margin-right: 10px;
    width: 18px;
    text-align: center;
}
.auth-form__input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0;
    font-size: 15px;
    color: #1e293b;
    outline: none;
    height: 100%;
}
.auth-form__input::placeholder {
    color: #b3c0cd;
}
.auth-form__code-btn {
    flex-shrink: 0;
    min-width: 120px;
    background: #eef2f6;
    border: 1px solid #d1d9e6;
    border-radius: 8px;
    padding: 0 16px;
    height: 48px;
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    cursor: pointer;
    white-space: nowrap;
    transition: 0.2s;
}
.auth-form__code-btn:hover {
    background: #e2e8f0;
}
.auth-form__code-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.auth-form__options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 14px 0 22px;
    font-size: 14px;
}
.auth-form__remember {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
}
.auth-form__remember input[type="checkbox"] {
    accent-color: var(--color-primary);
    width: 16px;
    height: 16px;
}
.auth-form__link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}
.auth-form__link:hover {
    text-decoration: underline;
}
.auth-form__submit {
    width: 100%;
    background: var(--color-primary);
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: 0.2s;
}
.auth-form__submit:hover {
    background: var(--color-primary);
}

/* 第三方登录 */
.auth-third {
    margin: 28px 0 14px;
    text-align: center;
}
.auth-third__title {
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 18px;
    position: relative;
}
.auth-third__title::before,
.auth-third__title::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 25%;
    height: 1px;
    background: #e2e8f0;
}
.auth-third__title::before { left: 0; }
.auth-third__title::after { right: 0; }
.auth-third__list {
    display: flex;
    justify-content: center;
    gap: 20px;
}
.auth-third__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #475569;
    padding: 6px 12px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    min-width: 70px;
    transition: 0.2s;
}
.auth-third__item:hover {
    background: #f1f5f9;
}
.auth-third__icon {
    font-size: 20px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    margin-bottom: 5px;
}
.auth-third__item--wechat .auth-third__icon { color: #2bae1a; }
.auth-third__item--alipay .auth-third__icon { color: #1677ff; }
.auth-third__name {
    font-size: 13px;
    font-weight: 500;
}

/* PC端辅助链接 */
.auth-extra {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e9edf2;
}
.auth-extra__link {
    color: #64748b;
    font-size: 14px;
    text-decoration: none;
}
.auth-extra__link:hover {
    color: var(--color-primary-hover);
}

/* 右侧图片区域 */
.auth-panel__banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.auth-panel__banner-link {
    position: absolute;
    inset: 0;
    display: block;
    z-index: 2;
    pointer-events: auto;
    cursor: pointer;
}

/* 移动端注册提示 (默认隐藏) */
.auth-third__mobile-reg {
    display: none;
}

/* 移动端优化 */
@media screen and (max-width: 768px) {
    .auth-main {
        padding: 24px 12px;
    }
    .auth-panel--no-banner {
        max-width: 100%;
    }
    .auth-panel--with-banner {
        flex-direction: column;
        max-width: 400px;
    }
    .auth-panel--with-banner .auth-panel__banner {
        display: none; /* 移动端隐藏图片 */
    }
    .auth-panel--with-banner .auth-panel__form,
    .auth-panel--no-banner .auth-panel__form {
        padding: 32px 24px;
    }
    .auth-extra {
        display: none;
    }
    .auth-third__mobile-reg {
        display: block;
        margin-top: 16px;
        font-size: 14px;
    }
    .auth-third__mobile-reg a {
        color: var(--color-primary);
        font-weight: 500;
    }
}

@media screen and (max-width: 480px) {
    .auth-form__group--with-btn {
        gap: 8px;
    }
    .auth-panel--with-banner .auth-panel__form,
    .auth-panel--no-banner .auth-panel__form {
        padding: 24px 18px;
    }
    .auth-form__code-btn {
        min-width: 96px;
        padding: 0 12px;
        font-size: 13px;
    }
    .auth-third__list {
        gap: 12px;
    }
    .auth-third__item {
        min-width: 70px;
        padding: 6px 10px;
    }
}


.auth-form__remember--wrap {
    flex-wrap: wrap;
    gap: 4px 6px;
    line-height: 1.5;
}
.auth-form__label--password {
    position: relative;
}
.auth-form__label--password .auth-form__input {
    padding-right: 42px;
}
.auth-form__toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.auth-form__pwd-toggle {
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
}
.auth-form__pwd-toggle:hover {
    color: var(--color-primary-hover);
}

.auth-policy-link{
    color: var(--color-primary);
}

.auth-form__group--compact {
    margin-bottom: 15px;
}

.auth-top-action {
    text-align: right;
    margin-bottom: 16px;
}

.auth-top-action__text,
.auth-tip-text {
    color: #64748b;
    font-size: 14px;
}

.auth-third--tip {
    margin-top: 20px;
}

.auth-modal__content {
    padding: 16px;
    max-height: calc(80vh - 110px);
    overflow: auto;
    line-height: 1.8;
}

.auth-modal__empty {
    color: #999;
}

.auth-wechat-modal {
    text-align: center;
    padding: 20px;
}

.auth-wechat-modal__frame {
    width: 800px;
    height: 800px;
    border: 0;
}

.auth-wechat-modal__text {
    margin-top: 15px;
}
