/* =============================================================
   敦成书院管理系统 公用样式（唯一入口）
   所有页面均从此文件调用格式，禁止在页面内单独写 CSS
   Bootstrap 已下载到本地，通过 @import 引入，不访问外部资源
   ============================================================= */
@import url("bootstrap.min.css");

/* 全局 */
body {
    font-family: -apple-system, "Microsoft YaHei", "PingFang SC", "Helvetica Neue", sans-serif;
    background-color: #f5f6f8;
    color: #333;
    font-size: 14px;
    padding-bottom: 52px; /* 给底部固定版权留出空间 */
}

a { text-decoration: none; }

/* 登录页 */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #2f6fed 0%, #1e4fc4 100%);
    padding-bottom: 0;
}
.login-box {
    width: 400px;
    background: #fff;
    border-radius: 12px;
    padding: 40px 36px 32px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
}
.login-box h1 { font-size: 22px; text-align: center; color: #1a1a1a; }
.login-sub { text-align: center; color: #999; font-size: 12px; margin: 8px 0 26px; }
.login-error { color: #e5484d; min-height: 20px; margin-top: 12px; text-align: center; font-size: 13px; }

/* 布局 */
.layout { display: flex; min-height: 100vh; }
.sidebar {
    width: 220px;
    background: #1f2733;
    color: #cfd6e0;
    flex-shrink: 0;
}
.sidebar .brand {
    padding: 20px;
    font-size: 18px;
    color: #fff;
    border-bottom: 1px solid #333d4d;
    font-weight: 600;
}
.sidebar nav a {
    display: block;
    padding: 13px 20px;
    color: #cfd6e0;
    font-size: 14px;
    border-left: 3px solid transparent;
}
.sidebar nav a:hover,
.sidebar nav a.active {
    background: #2b3648;
    color: #fff;
    border-left-color: #2f6fed;
}

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
    height: 56px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 24px;
    gap: 16px;
}
.content { padding: 24px; flex: 1; }

/* 工具栏 */
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.toolbar h2 { font-size: 18px; margin: 0; }

/* 卡片 */
.card { background: #fff; border-radius: 8px; padding: 20px; border: 1px solid #eceef1; }

/* 表格容器 */
.table-wrap { background: #fff; border-radius: 8px; border: 1px solid #eceef1; }
.table thead th { background: #fafbfc; color: #555; font-weight: 600; white-space: nowrap; }
.table td { vertical-align: middle; }

/* 底部固定版权 */
.footer-fixed {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 44px;
    line-height: 44px;
    text-align: center;
    color: #888;
    font-size: 13px;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    z-index: 1000;
}
