/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

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

/* 表格容器，添加水平滚动 */
.table-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

/* 头部样式 */
header {
    background-color: #333;
    color: #fff;
    padding: 10px 0;
    margin-bottom: 20px;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
}

nav ul li a:hover {
    text-decoration: underline;
}

/* 标题样式 */
h1 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
}

/* 表单样式 */
form {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

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

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input[type="text"],
input[type="password"],
input[type="file"],
input[type="number"],
select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

input[type="submit"],
button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-right: 10px;
}

input[type="submit"]:hover,
button:hover {
    background-color: #45a049;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

th, td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f2f2f2;
    font-weight: bold;
    font-size: 13px;
}

tr:hover {
    background-color: #f5f5f5;
}

/* 链接样式 */
a {
    color: #337ab7;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* 登录页面 */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* 消息样式 */
.success {
    background-color: #dff0d8;
    color: #3c763d;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.error {
    background-color: #f2dede;
    color: #a94442;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination a {
    padding: 8px 12px;
    margin: 0 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #337ab7;
}

.pagination a.active {
    background-color: #337ab7;
    color: #fff;
    border: 1px solid #337ab7;
}

.pagination a:hover:not(.active) {
    background-color: #f5f5f5;
}

/* 搜索栏样式 */
.search-container {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
}

.search-form {
    display: flex;
    gap: 10px;
    background: none;
    box-shadow: none;
    padding: 0;
    flex-wrap: wrap;
    align-items: flex-end;
}

.search-form input[type="text"] {
    width: 300px;
}

/* 响应式样式 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 20px;
    }
    
    h2 {
        font-size: 16px;
    }
    
    .search-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-form input[type="text"],
    .search-form input[type="date"] {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .search-form input[type="submit"] {
        width: 100%;
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 8px;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }
    
    nav ul li {
        margin: 0;
    }
}

@media (max-width: 480px) {
    .form-group input[type="submit"] {
        width: 100%;
        margin-right: 0;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .pagination a {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* 详情页面 */
.detail-container {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.detail-item {
    margin-bottom: 10px;
}

.detail-label {
    font-weight: bold;
    display: inline-block;
    width: 120px;
}

/* 页脚样式 */
footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 10px 0;
    margin-top: 20px;
    font-size: 12px;
}