/* 回执登记系统样式文件 */

/* 全局样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
.header {
    background-color: #007bff;
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 24px;
    font-weight: bold;
    margin: 0;
}

/* 导航菜单样式 */
.nav-menu {
    margin-top: 10px;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    margin-right: 20px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.nav-menu a:hover {
    text-decoration: underline;
    color: #e9ecef;
}

/* 用户信息样式 */
.user-info {
    text-align: right;
    margin-top: 10px;
}

.user-info span {
    margin-right: 15px;
}

/* 表单样式 */
.form-container {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group .required {
    color: red;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    margin-right: 5px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* 表格样式 */
.table-container {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

/* 外层容器 - 处理纵向滚动 */
.table-scroll-vertical {
    overflow-y: auto;
    max-height: 600px;
    overflow-x: hidden;
    width: 100%;
    position: relative;
    scrollbar-width: thin;
}

/* 内层容器 - 处理横向滚动 */
.table-scroll-horizontal {
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    position: relative;
    scrollbar-width: thin;
}

/* 确保表格内容填满容器宽度 */
.table-scroll-horizontal table {
    width: 100%;
    min-width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

/* 自定义纵向滚动条样式 */
.table-scroll-vertical::-webkit-scrollbar {
    width: 8px;
}

.table-scroll-vertical::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-scroll-vertical::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.table-scroll-vertical::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 自定义横向滚动条样式 */
.table-scroll-horizontal::-webkit-scrollbar {
    height: 8px;
}

.table-scroll-horizontal::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-scroll-horizontal::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.table-scroll-horizontal::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 固定表头 */
.table-scroll-horizontal th {
    position: sticky;
    top: 0;
    background-color: #f8f9fa;
    z-index: 10;
    white-space: nowrap;
}

/* 确保表格单元格不换行 */
.table-scroll-horizontal td {
    white-space: nowrap;
}

/* 确保页面不产生横向滚动 */
body {
    overflow-x: hidden;
}

/* 确保容器宽度正确 */
.container {
    width: 100%;
    padding: 0 15px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* 卡片容器样式 */
.card {
    width: 100%;
    box-sizing: border-box;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #495057;
}

tr:hover {
    background-color: #f5f5f5;
}

/* 消息提示样式 */
.error {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.success {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.info {
    color: #0c5460;
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* 卡片样式 */
.card {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #495057;
}

/* 统计图表样式 */
.chart-container {
    margin-bottom: 20px;
}

/* 登录页面样式 */
.login-container {
    max-width: 400px;
    margin: 50px auto;
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.login-container h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #495057;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 20px;
    }
    
    .nav-menu {
        text-align: center;
    }
    
    .nav-menu a {
        display: inline-block;
        margin: 5px 10px;
    }
    
    .user-info {
        text-align: center;
    }
    
    .login-container {
        margin: 20px;
        padding: 20px;
    }
    
    .table-container {
        padding: 10px;
    }
    
    th, td {
        padding: 8px;
        font-size: 12px;
    }
}

/* 分页样式 */
.pagination {
    text-align: center;
    margin-top: 20px;
}

.pagination a {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 5px;
    background-color: #f8f9fa;
    color: #007bff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    text-decoration: none;
}

.pagination a:hover {
    background-color: #e9ecef;
}

.pagination .active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

/* 搜索框样式 */
.search-container {
    margin-bottom: 20px;
}

.search-container input {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    margin-right: 5px;
}

/* 加载动画样式 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 123, 255, 0.3);
    border-radius: 50%;
    border-top-color: #007bff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 隐藏元素 */
.hidden {
    display: none;
}

/* 清除浮动 */
.clearfix::after {
    content: "";
    clear: both;
    display: table;
}

/* 左对齐和右对齐 */
.text-left {
    text-align: left;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

/* 页脚样式 */
.footer {
    background-color: #f8f9fa;
    padding: 20px 0;
    text-align: center;
    margin-top: 20px;
    border-top: 1px solid #e9ecef;
    color: #6c757d;
    font-size: 14px;
}

/* 打印样式 */
@media print {
    .header, .nav-menu, .footer, .btn {
        display: none;
    }
    
    .container {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
    
    .table-container {
        box-shadow: none;
        padding: 0;
    }
    
    table {
        border-collapse: collapse;
    }
    
    th, td {
        border: 1px solid #000;
        padding: 5px;
    }
}