:root {
    --sidebar-width: 240px;
    --primary-color: #409EFF;
    --sidebar-bg: #2c3e50;
    --xyrj-red: #e74c3c;
    --xyrj-red-dark: #c0392b;
}

body {
    background-color: #f4f7f6;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    /* 全局字体也稍微调小一点，使其更协调 */
    font-size: 14px; 
}

/* ================== 输入框/选择框样式优化 ================== */
.form-control:focus, 
.form-select:focus {
    border-color: #66afe9;
    outline: 0;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102,175,233,.6);
}

/* ================== 登录页专用 ================== */
#login-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.login-container {
    width: 380px;
    padding: 40px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
}

/* ================== 后台布局 (XYRJ 风格) ================== */
#admin-container {
    min-height: 100vh;
    display: flex;
}

/* 侧边栏整体风格 */
.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: #ecf0f1;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 2px 0 5px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

/* 侧边栏头部 */
.sidebar-header {
    text-align: center;
    font-weight: bold;
    font-size: 20px;
    padding: 20px;
    margin-bottom: 0;
    background-color: #2c3e50;
    border-bottom: 1px solid #34495e;
    color: #ecf0f1;
}

/* 菜单链接样式 */
.nav-link {
    color: #bdc3c7;
    padding: 15px 20px;
    cursor: pointer;
    display: block;
    text-decoration: none;
    border-left: 3px solid transparent;
    font-size: 14px; /* 侧边栏字体保持小巧 */
    transition: all 0.3s;
}

.nav-link i {
    width: 20px;
    text-align: center;
    margin-right: 10px;
    font-size: 14px;
}

/* 鼠标悬停效果 */
.nav-link:hover {
    background: #34495e;
    color: #ffffff;
}

/* 选中激活效果 */
.nav-link.active {
    background-color: var(--xyrj-red);
    color: #ffffff;
    border-left-color: var(--xyrj-red-dark);
}

/* 右侧内容区域 */
.admin-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 20px;
    width: 100%;
    font-size: 14px; /* 【修改】明确设置右侧内容区域字体为 14px */
}

/* 内容卡片 */
.content-card {
    background: #fff;
    padding: 25px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    /* 【修改】已删除 animation 属性，去除淡入动画 */
}

/* 已删除 @keyframes fadeIn 动画定义 */

/* ================== 移动端适配 ================== */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: #fff;
    border-bottom: 1px solid #eee;
    z-index: 1001;
    align-items: center;
    padding: 0 15px;
    justify-content: space-between;
}

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
}

@media (max-width: 768px) { 
    .mobile-header { display: flex; } 
    .admin-sidebar { transform: translateX(-100%); transition: 0.3s; } 
    .admin-sidebar.show { transform: translateX(0); } 
    .admin-content { margin-left: 0; padding-top: 60px; } 
    #overlay.show { display: block; }
}
