/* --- 全局与OA风格基础样式 --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "SimSun", "Microsoft YaHei", sans-serif;
}

/* 👑 核心修复：让 body 具备 Flex 垂直拉伸能力 */
html, body {
    height: 100%;
}

body {
    background-color: #f4f7fa;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* 删除了 padding-bottom: 100px 防止无意义留白 */
}

a {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

/* 全局切页淡入 */
.container {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 传统的教务表格控件焦点 */
input[type="text"]:focus,
input[type="number"]:focus {
    background-color: #fffdf4;
    border-color: #ff9900 !important;
    box-shadow: 0 0 5px rgba(255, 153, 0, 0.3);
}

/* --- 顶部导航栏 --- */
.header-navbar {
    background-color: #003366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 60px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    flex-shrink: 0; /* 防止被压缩 */
}

.logo {
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    list-style: none;
    height: 100%;
}

.nav-item {
    text-decoration: none !important;
    color: #b8d6fd;
    outline: none;
    display: flex;
    align-items: center;
    padding: 0 20px;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.3s;
    font-weight: bold;
}

.nav-item:hover {
    background-color: #004080;
}

.nav-item.active {
    color: #ff9900;
    background-color: #002244;
    border-bottom: 3px solid #ff9900;
}

/* --- 📦 OA 面板与基础按钮 --- */
.container {
    flex: 1; /* 替换掉原来的 flex: 1 0 auto; */
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
}

.panel {
    background: #fff;
    border: 1px solid #c2d1e5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.panel-header {
    font-size: 16px;
    font-weight: bold;
    color: #003366;
}

.btn {
    display: inline-block;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    border: 1px solid #b3cbd6;
    border-radius: 4px;
    transition: all 0.2s;
    background: linear-gradient(to bottom, #fff, #e6eff5);
    color: #333;
    text-align: center;
}

.btn:hover {
    background: linear-gradient(to bottom, #fff, #d2e4f1);
    border-color: #9abcca;
}

.btn-primary {
    background: linear-gradient(to bottom, #2585c4, #1a6296);
    color: #fff;
    border: 1px solid #15517e;
}

.btn-primary:hover {
    background: linear-gradient(to bottom, #2a96dc, #1e71ad);
}

.btn:disabled {
    background: #eee !important;
    color: #aaa !important;
    cursor: not-allowed;
    border-color: #ccc !important;
}

/* --- 📜 全局页脚样式（非固定悬浮） --- */
.site-footer {
    position: relative;
    flex-shrink: 0;     /* 防止被 Flexbox 压缩变形 */
    width: 100%;
    min-height: 80px;
    background-color: #1E553C;
    color: #FFFFFF;
    font-family: "Microsoft YaHei", "PingFang SC", "Heiti SC", sans-serif;
    font-weight: bold;
    font-size: 14px;
    box-sizing: border-box;
    margin-top: 40px; /* 留出呼吸间距 */
}

.site-footer .footer-content {
    max-width: 1200px;
    min-height: 80px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-footer .copyright {
    margin: 0;
    color: #FFFFFF;
}

.site-footer .footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}

.site-footer .footer-links a {
    color: #FFF200;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.site-footer .footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* 流畅滚动 */
}

/* --- 📱 三端自适应移动端适配 --- */
@media (max-width: 768px) {
    .header-navbar {
        flex-direction: column;
        height: auto;
        padding: 10px;
    }

    .nav-menu {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }

    .nav-item {
        padding: 10px 15px;
        font-size: 14px;
    }

    .site-footer .footer-content {
        flex-direction: column;
        justify-content: center;
        gap: 12px;
        text-align: center;
        height: auto !important;
    }

    .site-footer .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
}