/* 重庆科技大学教师科研项目招投标系统（教师端） */

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

html,
body {
    height: 100%;
}

body {
    font-family     : -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
    background-color: transparent;
    display         : flex;
    flex-direction  : column;
    line-height     : 1.5715;
    color           : rgba(0, 0, 0, 0.85);
    /* opacity      : 0; */
    /* animation    : fadeIn 0.1s ease forwards; */
    overflow-x: hidden; /* 只移除水平滚动条 */
    min-height: 100vh;
}

body.has-bg {
    position  : relative;
    min-height: 100vh;

}

body.has-bg::before {
    content   : '';
    position  : fixed;
    top       : 0;
    left      : 0;
    width     : 100%;
    height    : 100%;
    background: url('../images/bg1.jpg') no-repeat center center;
    background-size: cover;
    background-position: top;
    z-index   : -1;
}

/* 页头样式 */
.header-bar {
    background   : #ffffff;
    padding      : 0 15px;
    box-shadow   : 0 1px 3px rgba(0, 0, 0, 0.1);
    flex-shrink  : 0;
    z-index      : 1000;
    width        : 100%;
    margin-bottom: 0;
    border-bottom: 1px solid #e5e7eb;
}

/* 页头导航样式 */
.page-header {
    margin: 20px auto 0;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    padding: 0;
    position: relative;
    z-index: 999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: calc(100% - 40px);
    max-width: 1200px;
    min-width: 320px; /* 最小支持手机屏幕 */
    box-sizing: border-box;
}

.page-header .header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #475569;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    flex-shrink: 0;
}

.btn-back:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #334155;
    transform: scale(1.05);
}

.btn-back span {
    display: none;
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    text-align: left;
    flex: 1;
}

.header-actions {
    min-width: 100px;
}

/* 链接组样式 */
.link-group {
    text-align : center;
    margin-top : 20px;
    padding-top: 20px;
    border-top : 1px solid #f0f0f0;
    font-size  : 14px;
    color      : rgba(0, 0, 0, 0.45);
}

.link-group span {
    margin-right: 8px;
}

.link {
    color          : #1890ff;
    text-decoration: none;
    font-weight    : 400;
    transition     : color 0.2s ease;
    cursor         : pointer;
}

.link:hover {
    color          : #40a9ff;
    text-decoration: underline;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.header-content {
    max-width      : 1200px;
    margin         : 0 auto;
    display        : flex;
    align-items    : center;
    justify-content: space-between;
    height         : 64px;
}

.logo-section {
    display    : flex;
    align-items: center;
    gap        : 0;
    height     : 100%;
}

.logo-img {
    width        : 48px;
    height       : 48px;
    border-radius: 0;
    object-fit   : contain;
    transition   : all 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

.title-img {
    object-fit : contain;
    transition : all 0.3s ease;
    margin-left: 16px;
    height     : 48px;
}

.title-img:hover {
    transform: translateY(-1px);
}

.logo-icon {
    width          : 32px;
    height         : 32px;
    background     : #1890ff;
    border-radius  : 6px;
    display        : flex;
    align-items    : center;
    justify-content: center;
    color          : white;
    font-size      : 14px;
    font-weight    : 500;
}

.system-name {
    font-size     : 20px;
    font-weight   : 600;
    color         : rgba(0, 0, 0, 0.85);
    letter-spacing: -0.5px;
    font-family   : -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height   : 1.2;
    margin        : 0;
    padding       : 0;
}

/* 用户信息样式 */
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #f1f5f9;
    background: #f8fafc;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    line-height: 1.2;
}

.logout-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.logout-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
}

/* 主要内容区域 */
.main-content {
    flex           : 1;
    display        : flex;
    justify-content: center;
    box-sizing     : border-box;
    margin         : 0 16px;
}

.container {
    width    : 100%;
    max-width: 480px;
    margin   : 0 auto;
}

/* 原来的auth-box样式被覆盖，下面有新的毛玻璃样式 */

.panel-header {
    text-align   : center;
    margin-bottom: 32px;
    padding      : 0;
    position     : relative;
}

.panel-title {
    font-size     : 24px;
    font-weight   : 600;
    color         : rgba(0, 0, 0, 0.85);
    margin-bottom : 8px;
    letter-spacing: -0.5px;
    position      : relative;
    display       : inline-block;
}

.panel-title::after {
    content      : '';
    position     : absolute;
    bottom       : -8px;
    left         : 0;
    width        : 40px;
    height       : 2px;
    background   : #1890ff;
    border-radius: 1px;
    margin       : 0 auto;
    left         : 50%;
    transform    : translateX(-50%);
}

.panel-subtitle {
    font-size  : 14px;
    color      : rgba(0, 0, 0, 0.45);
    font-weight: 400;
    line-height: 1.5715;
    margin-top : 16px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group:last-of-type {
    margin-bottom: 24px;
}

.input-with-icon {
    position   : relative;
    display    : flex;
    align-items: center;
}

.input-with-icon i {
    position : absolute;
    left     : 12px;
    color    : rgba(0, 0, 0, 0.25);
    font-size: 14px;
    z-index  : 2;
}

.form-input {
    width        : 100%;
    padding      : 8px 12px 8px 38px;
    border       : 1px solid #d9d9d9;
    border-radius: 6px;
    font-size    : 14px;
    transition   : all 0.3s ease;
    background   : #fff;
    height       : 40px;
}

.form-input:focus {
    outline     : none;
    border-color: #40a9ff;
    box-shadow  : 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.form-input::placeholder {
    color: rgba(0, 0, 0, 0.25);
}

.btn {
    width          : 100%;
    padding        : 8px 15px;
    border         : none;
    border-radius  : 6px;
    font-size      : 14px;
    font-weight    : 400;
    cursor         : pointer;
    transition     : all 0.3s ease;
    text-align     : center;
    text-decoration: none;
    display        : block;
    height         : 40px;
}

.btn-primary {
    background: #1890ff;
    color     : white;
    border    : 1px solid #1890ff;
}

.btn-primary:hover {
    background  : #40a9ff;
    border-color: #40a9ff;
    box-shadow  : 0 2px 0 rgba(0, 0, 0, 0.045);
}

.btn-primary:active {
    background  : #096dd9;
    border-color: #096dd9;
}

.link-group {
    text-align : center;
    margin-top : 24px;
    padding-top: 20px;
    border-top : 1px solid #f0f0f0;
}

.link {
    color          : #2c80ff;
    text-decoration: none;
    font-size      : 14px;
    transition     : color 0.2s ease;
}

.link:hover {
    color          : #1a6fd8;
    text-decoration: underline;
}

.error-message {
    color     : #e74c3c;
    font-size : 12px;
    margin-top: 6px;
    display   : none;
}

/* 记住密码样式 */
.remember-password {
    margin-bottom: 25px;
    margin-top   : -5px;
}

.checkbox-label {
    display    : flex;
    align-items: center;
    cursor     : pointer;
    font-size  : 14px;
    color      : #666;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width        : 18px;
    height       : 18px;
    border       : 2px solid #ddd;
    border-radius: 3px;
    margin-right : 10px;
    position     : relative;
    transition   : all 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked+.checkmark {
    background  : #2c80ff;
    border-color: #2c80ff;
}

.checkbox-label input[type="checkbox"]:checked+.checkmark::after {
    content     : '';
    position    : absolute;
    left        : 5px;
    top         : 2px;
    width       : 4px;
    height      : 8px;
    border      : solid white;
    border-width: 0 2px 2px 0;
    transform   : rotate(45deg);
}

.checkbox-text {
    font-size: 14px;
    color    : #666;
}

/* 页脚样式 */
.footer-bar {
    background : transparent;
    border-top : none;
    padding    : 16px 0;
    margin-top : auto;
    flex-shrink: 0;
    position   : relative;
    width      : 100%;
}

body:not(.main-page) .main-content {
    padding-bottom: 80px;
}

.footer-content {
    max-width : 1200px;
    margin    : 0 auto;
    padding   : 0 20px;
    text-align: center;
}

.footer-info {
    font-size  : 12px;
    color      : rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.footer-info p {
    margin: 2px 0;
}

/* 背景图相关设置（为后期添加背景图做准备） */
body.has-bg {
    background-size      : cover;
    background-position  : center;
    background-repeat    : no-repeat;
    background-attachment: fixed;
}

body.has-bg .main-content {
    background   : transparent;
    margin       : 0;
    border-radius: 0;
    border       : none;
}

.auth-box {
    background     : rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(25px);
    border-radius  : 20px;
    padding        : 40px 35px;
    box-shadow     : 0 20px 60px rgba(0, 0, 0, 0.15);
    border         : 1px solid rgba(255, 255, 255, 0.3);
    max-width      : 480px;
    margin         : 0 auto;
}

/* 页面加载动画 */
@keyframes fadeIn {
    from {
        opacity  : 0;
        transform: translateY(10px);
    }

    to {
        opacity  : 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity  : 0;
        transform: translateY(20px);
    }

    to {
        opacity  : 1;
        transform: translateY(0);
    }
}

/* 面板动画 */
.tab-panel {
    display  : none;
    animation: slideInUp 0.4s ease forwards;
}

.tab-panel.active {
    display: block;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .page-header {
        width: calc(100% - 30px);
        margin: 15px auto 0;
    }
    
    .page-header .header-content {
        padding: 12px 20px;
        gap: 15px;
    }
    
    .page-title {
        font-size: 18px;
    }
}

/* 中等宽度设备样式 */
@media (max-width: 992px) and (min-width: 769px) {
    .page-header {
        width: calc(100% - 40px);
        margin: 12px auto 0;
    }
    
    .page-header .header-content {
        padding: 11px 24px;
        gap: 14px;
    }
    
    .page-title {
        font-size: 17px;
    }
    
    /* 确保内容区域有左右外边距 */
    .main-content {
        margin: 0 20px;
    }
    
    .container {
        padding: 0 20px;
    }
}

@media (max-width: 768px) {
    .page-header {
        width: calc(100% - 20px);
        margin: 10px auto 0;
        border-radius: 8px;
    }
    
    .page-header .header-content {
        padding: 12px 16px;
        gap: 12px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .page-title {
        font-size: 16px;
        text-align: left;
        margin: 0;
        flex: 1;
        line-height: 1.2;
    }
    
    .btn-back {
        align-self: center;
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .header-actions {
        align-self: center;
        text-align: right;
        flex-shrink: 0;
    }
    
    .header-content {
        padding: 0 15px;
    }

    .system-name {
        font-size: 16px;
    }

    .container {
        padding: 15px;
    }

    .login-box,
    .register-box {
        padding: 30px 20px;
    }

    .title {
        font-size: 18px;
    }

    .logo {
        width    : 50px;
        height   : 50px;
        font-size: 16px;
    }

    /* 平板和移动端隐藏title图 */
    .title-img {
        display: none;
    }

    .logo-section {
        gap: 0;
    }
}

@media (max-width: 480px) {
    .page-header {
        width: calc(100% - 16px);
        margin: 8px auto 0;
        border-radius: 6px;
    }
    
    .page-header .header-content {
        padding: 8px 12px;
        gap: 8px;
    }
    
    .page-title {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .btn-back {
        padding: 6px 12px;
        font-size: 12px;
        margin-bottom: 6px;
    }
}