/* 通用样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", Arial, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
}

/* 容器样式 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}

/* 手机端容器特殊适配 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
}

/* 表单组样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 16px;
}

/* 输入框、下拉框、文本域通用样式 */
input[type="text"],
input[type="tel"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

/* 必填项标记 */
.required-mark {
    color: #dc3545;
    margin-left: 3px;
}

/* 错误提示样式 */
.error-tip {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

/* 按钮通用样式 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #007bff;
    color: #fff;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-success {
    background-color: #28a745;
    color: #fff;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-info {
    background-color: #17a2b8;
    color: #fff;
}

.btn-info:hover {
    background-color: #138496;
}

/* 多选框组样式 */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 16px;
}

/* 字数统计样式 */
.word-count {
    text-align: right;
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* 表格通用样式（PC端） */
.table-container {
    overflow-x: auto;
    margin: 20px 0;
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* 分页样式（PC端） */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.page-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.page-btn.active {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

.page-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* 详情页样式（PC端） */
.detail-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    margin-top: 20px;
}

.detail-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    color: #343a40;
}

.detail-item {
    display: flex;
    margin-bottom: 20px;
    font-size: 16px;
}

.detail-label {
    width: 120px;
    font-weight: 600;
    color: #6c757d;
}

.detail-value {
    flex: 1;
    color: #343a40;
    line-height: 1.5;
}

.back-link {
    display: inline-block;
    color: #007bff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

.back-link:hover {
    text-decoration: underline;
}

/* 搜索栏样式（PC端） */
.search-bar {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 排序相关样式 */
.sortable-header {
    cursor: pointer;
    position: relative;
    padding-right: 20px;
}

.sortable-header::after {
    content: "";
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
}

.sortable-header.asc::after {
    border-bottom: 5px solid #007bff;
}

.sortable-header.desc::after {
    border-top: 5px solid #007bff;
}
