/* Arco Design 风格样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: #f7f8fa;
    min-height: 100vh;
}

/* 统一去掉a标签下划线 */
a {
    text-decoration: none;
}

/* 容器布局 */
.auth-container {
    display: flex;
    height: 100vh;
    background-image: url('/static/images/auth.jpeg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    min-height: 100vh;
}

/* Logo */
.auth-logo {
    position: fixed;
    top: 17.5px;
    left: 35px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
}

.auth-logo img {
    height: 38px;
}

.auth-logo-text {
    margin-left: 12px;
    color: #1d2129;
    font-weight: 600;
    font-size: 20px;
}

/* 内容区域 */
.auth-content {
    position: relative;
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    padding-bottom: 40px;
}

.auth-content-inner {
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, .05);
    box-sizing: border-box;
    padding: 48px;
    position: relative;
    width: 476px;
}

/* 表单标题 */
.form-title {
    margin-bottom: 6px;
    color: #1f2329;
    font-weight: 700;
    font-size: 22px;
    line-height: 30px;
}

.form-subtitle {
    color: #86909c;
    font-size: 14px;
    line-height: 20px;
    margin-bottom: 24px;
}

/* Tab切换 */
.auth-tabs {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    border-bottom: 1px solid #e5e6eb;
    padding: 0 4px;
    margin-top: 16px;
}

.auth-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 16px;
    font-size: 15px;
    font-weight: 500;
    color: #4e5969;
    cursor: pointer;
    background: transparent;
    border: none;
    border-radius: 6px 6px 0 0;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.auth-tab::after {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 0;
    height: 2px;
    background: #165dff;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}

.auth-tab:hover,
.auth-tab:focus-visible {
    color: #165dff;
}

.auth-tab:focus-visible {
    outline: 2px solid rgba(22, 93, 255, 0.3);
    outline-offset: 2px;
}

.auth-tab.active {
    color: #165dff;
    font-weight: 600;
}

.auth-tab.active::after {
    transform: scaleX(1);
}

.auth-tab-content {
    display: none;
}

.auth-tab-content.active {
    display: block;
}

/* 表单样式 */
.auth-form {
    margin-top: 24px;
}

.form-item {
    margin-bottom: 20px;
}

.form-item label {
    display: block;
    margin-bottom: 8px;
    color: #1d2129;
    font-size: 14px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border: 1px solid #e5e6eb;
    border-radius: 4px;
    font-size: 14px;
    color: #1d2129;
    background-color: #fff;
    transition: all 0.2s;
}

.form-input:hover {
    border-color: #c9cdd4;
}

.form-input:focus {
    outline: none;
    border-color: #165dff;
    box-shadow: 0 0 0 2px rgba(22, 93, 255, 0.1);
}

.form-input::placeholder {
    color: rgb(134, 144, 156);
}

/* 输入框组（带后缀按钮） */
.input-group {
    position: relative;
}

.input-group .form-input {
    padding-right: 100px;
}

.input-suffix-btn {
    position: absolute;
    right: 1px;
    top: 1px;
    height: 36px;
    padding: 0 15px;
    background: transparent;
    color: #165dff;
    border: none;
    border-radius: 0 4px 4px 0;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.input-suffix-btn:hover {
    background: rgba(22, 93, 255, 0.05);
}

.input-suffix-btn:disabled {
    color: #c9cdd4;
    cursor: not-allowed;
    background: transparent;
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    width: 100%;
    background: #165dff;
    color: #fff;
    border-color: #165dff;
}

.btn-primary:hover {
    background: #4080ff;
    border-color: #4080ff;
}

.btn-primary:active {
    background: #0e42d2;
    border-color: #0e42d2;
}

.btn-primary:disabled {
    background: #94bfff;
    border-color: #94bfff;
    cursor: not-allowed;
}

.btn-text {
    background: transparent;
    color: #165dff;
    height: 32px;
    padding: 0 15px;
    font-size: 14px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    -webkit-appearance: none;
    appearance: none;
    user-select: none;
    transition: all 0.2s;
}

.btn-text:hover {
    background-color: rgb(242, 243, 245);
    border-color: transparent;
}

/* 表单操作区 */
.form-actions {
    margin-top: 16px;
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

/* 协议文本 */
.agreement-text {
    display: flex;
    align-items: center;
    color: #86909c;
    font-size: 12px;
    flex-wrap: wrap;
}

.agreement-text a {
    color: #4e5969;
    text-decoration: none;
}

.agreement-text a:hover {
    color: #165dff;
}

/* 复选框 */
.checkbox {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    cursor: pointer;
}

/* 消息提示 */
.message {
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.message-success {
    background: #e8ffea;
    color: #00b42a;
    border: 1px solid #7be188;
}

.message-error {
    background: #ffece8;
    color: #f53f3f;
    border: 1px solid #fbaca3;
}

.message-info {
    background: #e8f7ff;
    color: #0fc6c2;
    border: 1px solid #7de1fc;
}

.message-warning {
    background: #fff7e8;
    color: #ff7d00;
    border: 1px solid #ffcf8b;
}

/* 页脚 */
.auth-footer {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 100%;
    padding: 20px;
    text-align: center;
    color: #86909c;
    font-size: 12px;
}

/* 微信扫码Tab内容 */
.wechat-scan-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 0;
}

.wechat-scan-qrcode {
    width: 220px;
    height: 220px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    background: #fff;
}

.wechat-scan-qrcode iframe {
    border-radius: 8px;
    width: 200px !important;
    height: 200px !important;
}

.wechat-scan-tips {
    text-align: center;
    color: #4e5969;
    font-size: 14px;
    line-height: 22px;
    margin-bottom: 16px;
}

.wechat-scan-tips p {
    margin: 4px 0;
}

.wechat-scan-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 280px;
    color: #86909c;
}

.wechat-scan-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e6eb;
    border-top-color: #165dff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 第三方登录 */
.oauth-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: #86909c;
    font-size: 14px;
}

.oauth-divider::before,
.oauth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e6eb;
}

.oauth-divider span {
    padding: 0 16px;
}

.oauth-buttons {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.oauth-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid #e5e6eb;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.oauth-btn:hover {
    border-color: #165dff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(22, 93, 255, 0.15);
}

.oauth-btn svg {
    width: 24px;
    height: 24px;
}

.oauth-btn.wechat {
    color: #07c160;
}

.oauth-btn.wechat:hover {
    border-color: #07c160;
    background: rgba(7, 193, 96, 0.05);
    box-shadow: 0 4px 12px rgba(7, 193, 96, 0.15);
}

.oauth-btn.qq {
    color: #12b7f5;
}

.oauth-btn.qq:hover {
    border-color: #12b7f5;
    background: rgba(18, 183, 245, 0.05);
    box-shadow: 0 4px 12px rgba(18, 183, 245, 0.15);
}

/* 响应式 */
@media (max-width: 768px) {
    .auth-content-inner {
        width: 90%;
        padding: 32px 24px;
    }

    .auth-logo {
        left: 20px;
    }

    .oauth-buttons {
        gap: 16px;
    }

    .oauth-btn {
        width: 44px;
        height: 44px;
    }
}