/* Payroll System Styles */

/* Payroll Navigation Icons */
.bg-light-yellow {
    background-color: #fff3cd !important;
}

.bg-light-purple {
    background-color: #e2e3ff !important;
}

.bg-light-cyan {
    background-color: #d1ecf1 !important;
}

.bg-light-gray {
    background-color: #f8f9fa !important;
}

.text-orange {
    color: #fd7e14 !important;
}

.text-purple {
    color: #6f42c1 !important;
}

.text-cyan {
    color: #17a2b8 !important;
}

/* Staff Selection Table */
.staff-selection-table {
    max-height: 400px;
    overflow-y: auto;
}

.staff-checkbox {
    width: 18px;
    height: 18px;
}

/* Payroll Processing Form */
.payroll-period-selector {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.payroll-period-selector .form-group label {
    font-weight: 600;
    color: #495057;
}

/* Processing Results */
.processing-results {
    margin: 20px 0;
}

.processing-results .alert {
    border-left: 4px solid;
}

.processing-results .alert-success {
    border-left-color: #28a745;
}

.processing-results .alert-danger {
    border-left-color: #dc3545;
}

/* Pay Slip Styles */
.payslip-container {
    background: white;
    padding: 30px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.payslip-header {
    text-align: center;
    border-bottom: 3px solid #007bff;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.payslip-header h2 {
    margin-bottom: 10px;
    color: #007bff;
    font-weight: 700;
}

.payslip-header p {
    font-size: 18px;
    color: #6c757d;
    margin: 0;
}

.employee-info {
    margin-bottom: 25px;
}

.payslip-details {
    margin-bottom: 25px;
}

.payslip-table th {
    background-color: #f8f9fa !important;
    font-weight: 600;
}

.payslip-table .total-row {
    background-color: #e9ecef !important;
    font-weight: 700;
}

.net-pay-summary {
    margin: 30px 0;
}

.net-pay-summary table {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
}

.net-pay-summary th {
    border: none;
    color: white;
    font-size: 20px;
    font-weight: 700;
}

.payslip-footer {
    border-top: 2px solid #dee2e6;
    padding-top: 20px;
    text-align: center;
}

.action-buttons {
    margin-top: 15px;
}

.action-buttons .btn {
    margin: 0 10px;
    min-width: 120px;
}

/* Modal Pay Slip */
.payslip-modal-content {
    font-size: 14px;
}

.payslip-modal-content table {
    margin-bottom: 15px;
}

.payslip-modal-content .table td,
.payslip-modal-content .table th {
    padding: 8px 12px;
}

/* Tax Settings */
.form-check-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.form-check-group .form-check {
    margin-right: 0;
}

/* Status Badges */
.badge-info {
    background-color: #17a2b8;
}

.badge-secondary {
    background-color: #6c757d;
}

.badge-success {
    background-color: #28a745;
}

.badge-warning {
    background-color: #ffc107;
    color: #212529;
}

.badge-danger {
    background-color: #dc3545;
}

.badge-primary {
    background-color: #007bff;
}

/* Employment Period Badges */
.employment-period-badge {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 12px;
}

/* Department Summary */
.dept-summary-card {
    border-left: 4px solid #007bff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .payslip-container {
        padding: 15px;
        margin: 10px 0;
    }
    
    .payslip-header h2 {
        font-size: 24px;
    }
    
    .form-check-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-group-sm .btn {
        padding: 2px 6px;
        font-size: 11px;
    }
}

/* Print styles */
@media print {
    .payslip-container {
        box-shadow: none;
        margin: 0;
        padding: 20px;
    }
    
    .action-buttons,
    .btn,
    .modal-footer {
        display: none !important;
    }
    
    .payslip-header {
        border-bottom: 2px solid #000;
    }
    
    .table {
        border: 1px solid #000;
    }
    
    .table th,
    .table td {
        border: 1px solid #000;
    }
    
    .net-pay-summary table {
        background: #f0f0f0 !important;
        color: #000 !important;
        border: 2px solid #000 !important;
    }
    
    .net-pay-summary th {
        color: #000 !important;
        border: 2px solid #000 !important;
    }
}

/* Additional utility classes */
.text-nowrap {
    white-space: nowrap !important;
}

.cursor-pointer {
    cursor: pointer;
}

.employment-info {
    font-size: 12px;
    color: #6c757d;
}

.salary-amount {
    font-weight: 600;
    color: #28a745;
}

.deduction-amount {
    font-weight: 600;
    color: #dc3545;
}

/* Loading states */
.payroll-loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.payroll-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #007bff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
