/* 请假历史页面样式 */
.leave-history {
    margin: 30px 0;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.section-header h2 {
    font-size: 20px;
    color: #333;
    margin: 0;
}

.apply-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.3s;
}

.apply-btn:hover {
    background-color: #a50009;
    color: white;
}

/* 筛选区域 */
.leave-filter {
    display: flex;
    margin-bottom: 20px;
    padding: 10px;
    background-color: var(--bg-light);
    border-radius: 4px;
}

.filter-item {
    margin-right: 20px;
    display: flex;
    align-items: center;
}

.filter-item label {
    margin-right: 8px;
    font-size: 14px;
    color: #666;
}

.filter-item select {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: white;
    font-size: 14px;
}

/* 请假列表 */
.leave-list {
    margin-bottom: 20px;
}

.leave-item {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.leave-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.leave-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.leave-title {
    font-weight: bold;
    font-size: 16px;
    color: #333;
}

.leave-date {
    font-size: 14px;
    color: #666;
}

.leave-reason {
    margin-bottom: 10px;
    color: #555;
    font-size: 14px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leave-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.leave-status {
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
    background-color: #f0f0f0;
}

.leave-status.pending {
    background-color: #ffecb3;
    color: #856404;
}

.leave-status.approved {
    background-color: #d4edda;
    color: #155724;
}

.leave-status.rejected {
    background-color: #f8d7da;
    color: #721c24;
}

.leave-action {
    display: flex;
    gap: 10px;
}

.detail-btn {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.detail-btn:hover {
    background-color: #5a6268;
}

/* 分页控件 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.page-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background-color: white;
    color: #333;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}

.page-btn:hover {
    background-color: var(--bg-light);
}

.page-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-btn.disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* 详情模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 80%;
    max-width: 600px;
    position: relative;
}

.close-btn {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #aaa;
}

.close-btn:hover {
    color: #333;
}

.leave-detail-content {
    margin-top: 20px;
}

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

.detail-label {
    font-weight: bold;
    margin-bottom: 5px;
    color: #666;
}

.detail-value {
    color: #333;
    line-height: 1.5;
}

/* 响应式样式 */
@media (max-width: 768px) {
    /* 导航栏移动端适配 */
    .main-header .container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .logo-container {
        margin-bottom: 15px;
    }
    
    .nav {
        width: 100%;
        display: none;
    }
    
    .nav.active {
        display: block;
    }
    
    .nav ul {
        flex-direction: column;
    }
    
    .nav li {
        margin: 10px 0;
        margin-left: 0;
    }
    
    .menu-toggle {
        display: flex;
        position: absolute;
        top: 15px;
        right: 15px;
    }
    
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    /* 请假历史列表移动端适配 */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .section-header h2 {
        margin-bottom: 10px;
    }
    
    .leave-filter {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-item {
        margin-right: 0;
        margin-bottom: 10px;
        width: 100%;
    }
    
    .filter-item select {
        width: 100%;
    }
    
    .leave-item-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .leave-date {
        margin-top: 5px;
    }
    
    .leave-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .leave-action {
        margin-top: 10px;
    }
    
    .leave-item {
        padding: 12px;
    }
}

@media (max-width: 576px) {
    .leave-history {
        padding: 15px;
        margin: 15px 0;
    }
    
    .section-header h2 {
        font-size: 18px;
    }
    
    .leave-title {
        font-size: 15px;
    }
    
    .leave-reason {
        font-size: 13px;
    }
    
    .leave-status {
        font-size: 12px;
        padding: 3px 6px;
    }
    
    .detail-btn {
        padding: 3px 6px;
        font-size: 11px;
    }
    
    .pagination {
        gap: 3px;
    }
    
    .page-btn {
        padding: 4px 8px;
        font-size: 12px;
    }
}