/* 全局样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

header h1 {
    color: #2c3e50;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info span {
    font-size: 14px;
}

#user-role {
    background-color: #3498db;
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.logout-btn {
    background-color: #e74c3c;
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    text-decoration: none;
    font-size: 14px;
}

/* 导航样式 */
nav {
    margin-bottom: 20px;
}

nav ul {
    display: flex;
    list-style: none;
    background-color: #2c3e50;
    border-radius: 5px;
}

nav ul li {
    padding: 0;
}

nav ul li a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    transition: background-color 0.3s;
}

nav ul li a:hover {
    background-color: #34495e;
}

nav ul li a.active {
    background-color: #3498db;
}

/* 卡片样式 */
.card {
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input[type="text"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-family: inherit;
    font-size: 14px;
}

button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

.danger-btn {
    background-color: #e74c3c;
}

.danger-btn:hover {
    background-color: #c0392b;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background-color: white;
}

th, td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

th {
    background-color: #f2f2f2;
    font-weight: bold;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* 输入区域样式 */
.input-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* 搜索区域样式 */
.search-area {
    margin-bottom: 20px;
}

#search-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 16px;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    margin-bottom: 20px;
}

.pagination button {
    margin: 0 5px;
    padding: 5px 15px;
}

.pagination button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* 错误消息样式 */
.error-message {
    color: #e74c3c;
    margin-bottom: 10px;
    font-weight: bold;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 50%;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}

/* 管理员操作区域 */
.admin-actions {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.export-buttons {
    display: flex;
    gap: 10px;
}

.export-btn {
    background-color: #27ae60;
}

.export-btn:hover {
    background-color: #219653;
}

/* 登录页面样式 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f5f5f5;
}

.login-box {
    background-color: white;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 400px;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 10px;
    color: #2c3e50;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #7f8c8d;
    font-size: 18px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .input-area {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 90%;
    }
    
    nav ul {
        flex-direction: column;
    }
}