/* 考勤管理样式 */
.attendance-header {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.attendance-controls {
    flex: 1;
    min-width: 200px;
}

.attendance-controls button {
    padding: 10px 15px;
    margin-right: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.attendance-controls button:hover {
    background-color: #0056b3;
}

.calendar-container {
    flex: 2;
    min-width: 300px;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

#attendance-calendar {
    width: 100%;
}

#attendance-calendar table {
    width: 100%;
    border-collapse: collapse;
}

#attendance-calendar th,
#attendance-calendar td {
    padding: 8px;
    text-align: center;
    border: 1px solid #dee2e6;
}

#attendance-calendar th {
    background-color: #e9ecef;
    font-weight: bold;
}

#attendance-calendar .today {
    background-color: #007bff;
    color: white;
}

#attendance-calendar .punched {
    background-color: #d4edda;
    color: #155724;
}

.attendance-data {
    overflow-x: auto;
}

#attendance-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

#attendance-table th,
#attendance-table td {
    padding: 12px;
    text-align: left;
    border: 1px solid #dee2e6;
}

#attendance-table th {
    background-color: #f8f9fa;
    font-weight: bold;
}

#attendance-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

#attendance-table tbody tr:hover {
    background-color: #e9ecef;
}

.status-normal {
    color: #28a745;
    font-weight: bold;
}

.status-absent {
    color: #dc3545;
    font-weight: bold;
}

.status-early {
    color: #ffc107;
    font-weight: bold;
}

.status-late {
    color: #fd7e14;
    font-weight: bold;
}

.attendance-table-actions button {
    padding: 5px 10px;
    margin-right: 5px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.edit-btn {
    background-color: #ffc107;
    color: #000;
}

.edit-btn:hover {
    background-color: #e0a800;
}

.delete-btn {
    background-color: #dc3545;
    color: white;
}

.delete-btn:hover {
    background-color: #c82333;
}

/* 考勤编辑模态框样式 */
#attendance-edit-modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

#attendance-edit-modal .modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 5px;
}

#attendance-edit-modal .close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

#attendance-edit-modal .close:hover,
#attendance-edit-modal .close:focus {
    color: black;
}

#attendance-edit-modal h3 {
    margin-top: 0;
}

#attendance-edit-modal .form-group {
    margin-bottom: 15px;
}

#attendance-edit-modal label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

#attendance-edit-modal input,
#attendance-edit-modal select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

#attendance-edit-modal button[type="submit"] {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

#attendance-edit-modal button[type="submit"]:hover {
    background-color: #0056b3;
}

.management-section {
    margin-top: 20px;
}

@media (max-width: 768px) {
    .attendance-header {
        flex-direction: column;
    }
    
    .attendance-controls {
        order: 2;
    }
    
    .calendar-container {
        order: 1;
    }
    
    #attendance-table {
        font-size: 14px;
    }
    
    #attendance-table th,
    #attendance-table td {
        padding: 8px;
    }
    
    .attendance-table-actions button {
        padding: 3px 6px;
        font-size: 11px;
    }
}