/* Payroll specific styles */

/* Main layout fix */
main[role="main"] {
    padding: 0 1.5rem;
    width: 100%;
    margin-left: 0; /* Removed fixed margin */
}

/* Payroll table styles */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

.table {
    width: 100%;
    margin-bottom: 0;
    color: var(--bs-table-color);
    vertical-align: middle;
    border-color: var(--bs-table-border-color);
}

.table th {
    font-weight: 600;
    background-color: rgba(0, 0, 0, 0.03);
}

.table td, .table th {
    padding: 0.75rem;
    vertical-align: middle;
    border-top: 1px solid #dee2e6;
}

/* Payroll cards */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: #fff;
    background-clip: border-box;
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0.25rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
}

.card-header {
    padding: 1rem 1.25rem;
    margin-bottom: 0;
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.card-body {
    flex: 1 1 auto;
    padding: 1.25rem;
}

/* Payroll filter form */
.payroll-filter-form {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

@media (max-width: 767.98px) {
    .payroll-filter-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .payroll-filter-form .form-select,
    .payroll-filter-form .btn {
        margin-bottom: 0.5rem;
    }
}

/* Payroll status badges */
.badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

.bg-success {
    background-color: #198754 !important;
}

.bg-warning {
    background-color: #ffc107 !important;
    color: #000 !important;
}

.bg-danger {
    background-color: #dc3545 !important;
}

/* Payslip specific styles */
#payslip {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    margin-bottom: 2rem;
}

#payslip .table {
    margin-bottom: 0;
}

#payslip .table-bordered {
    border: 1px solid #dee2e6;
}

#payslip .table-bordered th,
#payslip .table-bordered td {
    border: 1px solid #dee2e6;
}

#payslip .table-light {
    background-color: rgba(0, 0, 0, 0.03);
}

#payslip .table-primary {
    background-color: rgba(13, 110, 253, 0.1);
}

#payslip .table-danger {
    background-color: rgba(220, 53, 69, 0.1);
}

#payslip .table-success {
    background-color: rgba(25, 135, 84, 0.1);
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .card-header .row {
        flex-direction: column;
    }
    
    .card-header .col-md-6:first-child {
        margin-bottom: 1rem;
    }
    
    .card-header .col-md-6 {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
    }
    
    .btn-toolbar {
        justify-content: flex-start !important;
        margin-top: 1rem;
    }
}