/* New Split-Screen Layout for Auth Pages with Nova Cloud Branding */

:root {
    --auth-blue: #007bff;
    /* Standard modern blue */
    --auth-blue-hover: #0069d9;
    --auth-bg: #f8fafc;
    --auth-text-main: #111827;
    --auth-text-secondary: #4b5563;
    --auth-border: #e5e7eb;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.auth-split-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Left Poster Side */
.auth-poster {
    flex: 1.2;
    position: relative;
    background: url('../img/auth_poster.png') no-repeat center center;
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 80px;
    color: #fff;
}

.auth-poster::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.15) 100%);
    z-index: 1;
}

.auth-poster-content {
    position: relative;
    z-index: 2;
}

.poster-logo {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.poster-title {
    font-size: 52px;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 28px;
    letter-spacing: -0.02em;
}

.poster-subtitle {
    font-size: 22px;
    opacity: 0.95;
    line-height: 1.6;
    max-width: 550px;
}

.poster-footer {
    position: absolute;
    bottom: 30px;
    left: 80px;
    right: 80px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    z-index: 2;
}

.poster-records {
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
}

.record-link {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.3s;
}

.record-link:hover {
    color: rgba(255, 255, 255, 0.9);
}

.record-separator {
    color: rgba(255, 255, 255, 0.3);
    margin: 0 4px;
}

.record-text {
    color: rgba(255, 255, 255, 0.6);
}

.poster-copyright {
    color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 1024px) {
    .poster-footer {
        display: none;
    }
}

/* Right Form Side */
.auth-form-side {
    flex: 1;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    overflow-y: auto;
}

.auth-form-container {
    width: 100%;
    max-width: 340px;
    animation: fadeIn 0.6s ease-out;
    margin: auto;
    position: relative;
    padding: 20px 24px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

/* 新样式表单容器 */
.auth-form-container.new-style {
    max-width: 420px;
    padding: 16px 24px 20px;
    border-radius: 8px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    margin-bottom: 20px;
    text-align: left;
}

.auth-header-top {
    margin-bottom: 2px;
}

.auth-subtitle {
    font-size: 13px;
    color: var(--auth-text-secondary);
    line-height: 1.4;
}

/* 隐藏原来的标题样式（使用新布局时） */
.auth-form-container.new-style .auth-header {
    display: none;
}

/* 登录表单区域紧凑 */
.auth-form-container.new-style .login-form {
    margin-top: 0;
}

.form-inputs-wrapper {
    margin-top: 16px;
    padding-top: 8px;
}

.form-main {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* 表单元素间距 - 适当的间距让布局更美观 */
.form-main .form-item + .form-item {
    margin-top: 12px !important;
}

/* 复选框与上方输入框间距 */
.form-main .form-item + .auth-checkbox-row {
    margin-top: 12px !important;
}

/* 按钮容器与上方元素间距 - 紧凑 */
.form-main .auth-checkbox-row + .login-btn-wrapper,
.form-main .read-item + .login-btn-wrapper {
    margin-top: 8px !important;
}

/* 忘记密码链接与按钮间距 */
.form-main .form-item + .forget-link-wrapper {
    margin-top: 12px !important;
}

/* 表单标签样式 - 灰色字体 */
body .auth-form-container.new-style .form-label,
body #login .form-label,
body #regist .form-label,
body #forget .form-label {
    display: block !important;
    font-size: 14px !important;
    color: #6b7280 !important;
    margin-bottom: 6px !important;
    margin-top: 0 !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    padding: 0 !important;
}

/* 第一个表单项 */
body .auth-form-container.new-style .form-main .form-item:first-of-type,
body .auth-form-container.new-style .form-main .form-item:first-child {
    margin-top: 0 !important;
}

/* Form Items - 适当的间距 */
body #login .form-item,
body #regist .form-item,
body #forget .form-item,
body .auth-form-container.new-style .form-item {
    margin-bottom: 0 !important;
    margin-top: 12px !important;
    min-height: auto !important;
    height: auto !important;
    line-height: 1.4 !important;
}

/* 登录按钮容器间距 */
body #login .login-btn-wrapper,
body .auth-form-container.new-style .login-btn-wrapper {
    margin-top: 12px !important;
}

/* 第一个表单项无上边距 */
body #login .form-main > .form-item:first-child,
body #regist .form-main > .form-item:first-child,
body #forget .form-main > .form-item:first-child {
    margin-top: 0 !important;
}

/* form-main 内的 div 间距 */
body #login .form-main > div,
body #regist .form-main > div,
body #forget .form-main > div {
    margin-bottom: 0 !important;
    margin-top: 12px !important;
}

body #login .form-main > div:first-child,
body #regist .form-main > div:first-child,
body #forget .form-main > div:first-child {
    margin-top: 0 !important;
}

/* 登录按钮容器 */
body #login .form-main > .login-btn-wrapper {
    margin-top: 12px !important;
}

/* 输入框容器 - 无间距（高优先级） */
body .auth-form-container.new-style .el-input,
body .auth-form-container.new-style .el-input__inner {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    padding: 0 !important;
}



/* 国别码选择器 */
body .auth-form-container.new-style .el-input-group__prepend .el-select {
    width: 80px !important;
    margin: 0 !important;
}

body .auth-form-container.new-style .el-input-group__prepend .el-select .el-input__inner {
    border: none !important;
    background: transparent !important;
    text-align: center !important;
    height: 34px !important;
    line-height: 34px !important;
    padding: 0 !important;
}

/* 强制Element UI组件无间距 */
body .auth-form-container.new-style .el-form-item {
    margin-bottom: 0 !important;
}

body .auth-form-container.new-style .el-input-group {
    margin-bottom: 0 !important;
}

/* 修复Element UI输入框默认margin */
body .auth-form-container.new-style .el-input {
    display: block !important;
}

body .auth-form-container.new-style .el-input__inner {
    line-height: 40px !important;
    height: 40px !important;
    margin: 0 !important;
    padding: 0 12px !important;
}

/* 修复form-main内的所有元素 */
body .auth-form-container.new-style .form-main > * {
    margin-top: 12px !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
}

body .auth-form-container.new-style .form-main > *:first-child {
    margin-top: 0 !important;
}

/* 登录按钮容器 */
body .auth-form-container.new-style .form-main > .login-btn-wrapper {
    margin-top: 12px !important;
}

/* 登录按钮 - 紧凑间距 */
body .auth-form-container.new-style .el-button--primary.login-btn {
    height: 40px !important;
    margin-top: 0 !important;
}

/* 复选框区域 - 适当的间距 */
body .auth-form-container.new-style .auth-checkbox-row {
    margin: 12px 0 0 !important;
    padding: 0 !important;
}

/* 验证码区域 */
.form-main .form-item.code-item {
    display: flex;
    gap: 0;
    margin-top: 12px !important;
}

.form-main .form-item.code-item .el-input {
    flex: 1;
}

.form-main .form-item.code-item .el-input__inner {
    border-radius: 4px 0 0 4px;
    border-right: none;
}

.form-main .form-item.code-item count-down-button,
.form-main .form-item.code-item .count-down-btn {
    width: 100px !important;
    flex-shrink: 0;
    border-radius: 0 4px 4px 0 !important;
    height: 38px;
    background: var(--auth-blue) !important;
    border: 1px solid var(--auth-blue) !important;
    color: #fff !important;
    font-size: 13px;
    padding: 0;
}

.auth-header-top {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
    position: relative;
}

.auth-title {
    font-size: 22px;
    color: var(--auth-text-main);
    font-weight: 700;
}

.auth-subtitle {
    font-size: 13px;
    color: var(--auth-text-secondary);
}

.auth-subtitle a {
    color: var(--auth-blue);
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
}

/* UI Overrides for Nova Theme (assuming Element Plus/UI) */
.auth-form-container .el-input__inner,
#login .auth-form-container .el-input__inner,
#regist .auth-form-container .el-input__inner,
#forget .auth-form-container .el-input__inner {
    height: 38px;
    border-radius: 4px;
    border: 1px solid #d9d9d9;
    transition: all 0.2s ease;
    font-size: 14px;
    background-color: #fff;
    padding: 0 10px;
}

.auth-form-container .el-input__inner:hover {
    border-color: #d1d5db;
}

.auth-form-container .el-input__inner:focus {
    border-color: var(--auth-blue);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

/* 输入框错误状态 */
.auth-form-container .el-input.is-error .el-input__inner {
    border-color: #dc2626;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.1);
}

.auth-form-container .el-button--primary,
#login .auth-form-container .el-button--primary,
#regist .auth-form-container .el-button--primary,
#forget .auth-form-container .el-button--primary {
    background: var(--auth-blue) !important;
    border: none !important;
    height: 38px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    width: 100%;
    transition: all 0.2s ease;
    padding: 0;
}

.auth-form-container .el-button--primary:hover {
    background: #0069d9 !important;
}

.auth-form-container .el-button--primary:active {
    background: #0056b3 !important;
}

/* 按钮加载状态 */
.auth-form-container .el-button--primary.is-loading {
    opacity: 0.9;
}

/* Tabs for Auth Types - 新样式：左对齐 */
.auth-tabs {
    display: flex;
    justify-content: flex-start;
    gap: 24px;
    margin-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.auth-tab-item {
    padding-bottom: 8px;
    cursor: pointer;
    font-size: 15px;
    color: var(--auth-text-secondary);
    position: relative;
    transition: color 0.3s;
    font-weight: 500;
    line-height: 1.2;
}

.auth-tab-item:hover {
    color: var(--auth-text-main);
}

.auth-tab-item.active {
    color: var(--auth-blue);
    font-weight: 600;
}

.auth-tab-item.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--auth-blue);
    border-radius: 2px 2px 0 0;
}

/* 表单顶部区域：Tab + 右侧链接 */
.auth-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    border-bottom: 1px solid #e5e7eb;
}

.auth-form-header .auth-tabs {
    margin-bottom: 0;
    border-bottom: none;
    flex: 1;
}

.auth-header-link {
    font-size: 14px;
    color: var(--auth-text-secondary);
    white-space: nowrap;
}

.auth-header-link a {
    color: var(--auth-blue);
    text-decoration: none;
    font-weight: 500;
    margin-left: 4px;
}

.auth-header-link a:hover {
    text-decoration: underline;
}

/* Oauth & Links */
.oauth-section {
    margin-top: 8px;
}



.oauth-divider {
    position: relative;
    text-align: center;
    margin-bottom: 16px;
}

.oauth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #f1f5f9;
}

.oauth-divider span {
    position: relative;
    background: #fff;
    padding: 0 12px;
    color: #94a3b8;
    font-size: 13px;
}

.oauth-icons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.oauth-icon-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--auth-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.oauth-icon-btn:hover {
    border-color: var(--auth-blue);
    background: #f8fafc;
    transform: scale(1.05);
}

.auth-checkbox-row {
    margin-top: 6px;
    margin-bottom: 0;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    justify-content: flex-start;
}

.auth-checkbox-row .el-checkbox {
    margin-top: 2px;
    flex-shrink: 0;
}

/* 登录按钮和忘记密码容器 */
.login-btn-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    margin-top: 8px !important;
}

.login-btn-wrapper .login-btn {
    width: 100%;
}

/* 忘记密码链接 - 紧贴按钮右下角 */
.forget-link-inline {
    line-height: 1;
}

.forget-link-inline .forget-link {
    font-size: 13px;
    color: var(--auth-text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.forget-link-inline .forget-link:hover {
    color: var(--auth-blue);
}

.forget-link {
    color: var(--auth-text-secondary);
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s;
}

.forget-link:hover {
    color: var(--auth-blue);
}

/* 提示信息样式优化 */
.read-item {
    margin: 8px 0;
}

.read-item .el-alert {
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.5;
    border: none;
}

.read-item .el-alert--error {
    background-color: #fef2f2;
    color: #dc2626;
}

.read-item .el-alert--error .el-alert__icon {
    color: #dc2626;
    font-size: 16px;
}

.read-item .el-alert--success {
    background-color: #f0fdf4;
    color: #16a34a;
}

.read-item .el-alert--success .el-alert__icon {
    color: #16a34a;
    font-size: 16px;
}

.read-item .el-alert--warning {
    background-color: #fffbeb;
    color: #d97706;
}

.read-item .el-alert--warning .el-alert__icon {
    color: #d97706;
    font-size: 16px;
}

.read-item .el-alert__content {
    padding: 0;
}

.read-item .el-alert__title {
    font-size: 14px;
    font-weight: 500;
}

/* 提示信息动画 */
.read-item {
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-lang-switcher {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
}

/* QR Code Toggle */
.qr-code-toggle {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.qr-code-toggle:hover {
    background: rgba(0, 123, 255, 0.08);
}

/* 新样式下二维码切换按钮位置调整 */
.auth-form-container.new-style .qr-code-toggle {
    top: 20px;
    right: 20px;
}

/* 移动端顶部导航栏 */
.mobile-nav-bar {
    display: none;
}

@media (max-width: 1024px) {
    .auth-poster {
        display: none;
    }

    .mobile-nav-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 16px;
        background: #fff;
        border-bottom: 1px solid #e5e7eb;
        width: 100%;
        box-sizing: border-box;
    }

    .mobile-nav-logo {
        display: flex;
        align-items: center;
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }

    .mobile-nav-logo img {
        max-height: 32px;
        max-width: 140px;
        width: auto;
    }

    .mobile-nav-logo span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-nav-home {
        font-size: 13px;
        color: var(--auth-blue);
        text-decoration: none;
        padding: 5px 10px;
        border: 1px solid var(--auth-blue);
        border-radius: 6px;
        transition: all 0.3s;
        white-space: nowrap;
        margin-left: 10px;
    }

    .mobile-nav-home:hover {
        background: var(--auth-blue);
        color: #fff;
    }

    /* 移动端隐藏左侧海报 */
    .auth-split-wrapper {
        flex-direction: column;
    }

    /* 调整表单区域 - 内容上移 */
    .auth-form-side {
        padding: 20px;
        min-height: auto;
        align-items: flex-start;
        padding-top: 10px;
    }

    /* 移动端表单容器上移 */
    .auth-form-container {
        margin-top: 0;
    }

    .auth-form-container.new-style {
        padding: 12px 20px 16px;
    }

    /* 语言切换器位置调整 */
    .auth-lang-switcher {
        position: static;
        text-align: right;
        margin-bottom: 10px;
    }
}

@media (max-width: 640px) {
    .auth-form-side {
        padding: 12px 16px 16px;
        background: #fff;
        align-items: flex-start;
        padding-top: 8px;
    }
    
    .auth-form-container {
        padding: 16px 16px 20px;
        border: none;
        box-shadow: none;
        max-width: 100%;
        margin-top: 0;
    }

    .auth-form-container.new-style {
        position: relative;
        padding: 48px 16px 14px;
        margin-top: 0;
    }
    
    /* 小屏幕下语言切换器 - 固定在右上角 */
    .auth-lang-switcher {
        position: absolute;
        top: 12px;
        right: 12px;
        z-index: 10;
    }

    .auth-title {
        font-size: 22px;
    }
    
    .auth-subtitle {
        font-size: 13px;
    }

    /* 小屏幕下顶部间距更小 */
    .auth-header {
        margin-bottom: 6px;
    }

    /* 小屏幕下Tab间距优化 */
    .auth-tabs {
        margin-bottom: 6px;
        gap: 16px;
    }

    .auth-tab-item {
        font-size: 14px;
        padding-bottom: 6px;
    }

    /* 小屏幕下表单标签 */
    .form-label {
        font-size: 13px;
        margin-bottom: 4px;
        margin-top: 0;
        color: #6b7280;
    }
    
    /* 小屏幕下输入区域容器 */
    .form-inputs-wrapper {
        margin-top: 12px;
        padding-top: 4px;
    }

    .form-main .form-item:first-of-type .form-label {
        margin-top: 0;
    }

    .form-main .form-item + .form-item {
        margin-top: 10px !important;
    }
    
    /* 小屏幕下复选框区域 */
    .auth-checkbox-row {
        margin-top: 10px !important;
    }
    
    /* 小屏幕下登录按钮 */
    .el-button--primary.login-btn {
        margin-top: 0 !important;
    }
    
    /* 小屏幕下登录按钮容器 */
    .login-btn-wrapper {
        gap: 2px;
        margin-top: 6px !important;
    }
    
    .forget-link-inline {
        line-height: 1;
    }

    /* 小屏幕下顶部链接 */
    .auth-header-link {
        font-size: 12px;
    }
}

@media (max-width: 1024px) {
    .auth-form-side {
        background: #fff;
        padding: 50px 20px 20px;
        align-items: flex-start;
        position: relative;
    }
    
    .auth-form-container {
        border: none;
        box-shadow: none;
        padding: 16px 20px 20px;
        margin-top: 0;
    }

    .auth-form-container.new-style {
        position: relative;
        padding: 44px 20px 16px;
        max-width: 100%;
    }
    
    /* 移动端语言切换器 - 固定在右上角 */
    .auth-lang-switcher {
        position: absolute;
        top: 12px;
        right: 16px;
        z-index: 10;
        margin: 0;
    }

    /* 移动端顶部表单头部 */
    .auth-form-container.new-style .auth-form-header {
        flex-wrap: wrap;
        gap: 8px 0;
    }
    
    /* 移动端表单容器 */
    .auth-form-container.new-style {
        position: relative;
        padding-top: 48px !important;
        margin-top: 0 !important;
    }

    /* 二维码切换按钮位置调整 */
    .qr-code-toggle {
        position: static;
        text-align: right;
        margin-bottom: 4px;
    }

    .auth-form-container.new-style .qr-code-toggle {
        position: static;
        float: right;
        margin-bottom: 8px;
    }
}