/* Attendance specific styles */

/* Attendance table styles */
.attendance-table {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border-radius: 0.375rem;
}

.attendance-table table {
    min-width: 800px; /* Ensures table doesn't shrink too much on small screens */
    margin-bottom: 0;
}

.attendance-table th,
.attendance-table td {
    white-space: nowrap;
    padding: 0.75rem;
    vertical-align: middle;
}

.attendance-table th {
    background-color: rgba(0, 0, 0, 0.03);
    font-weight: 600;
    border-bottom-width: 1px;
}

.attendance-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Month/Year selector form */
.attendance-filter-form {
    margin-bottom: 0;
}

.attendance-filter-form select {
    font-size: 0.9rem;
    border-radius: 0.25rem;
}

.attendance-filter-form button {
    font-size: 0.9rem;
    padding: 0.375rem 0.75rem;
}

@media (max-width: 767.98px) {
    .attendance-filter-form {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    
    .attendance-filter-form select,
    .attendance-filter-form button {
        margin-bottom: 0.5rem;
        width: 100%;
        max-width: 100% !important;
    }
    
    .attendance-filter-form .d-flex {
        width: 100%;
        flex-direction: column;
    }
}

/* Attendance summary cards */
.attendance-summary-card {
    transition: all 0.3s ease;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.attendance-summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.attendance-summary-card .card-body {
    padding: 1.25rem;
}

.attendance-summary-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.attendance-summary-card .card-value {
    font-size: 1.75rem;
    font-weight: 700;
}

/* Status badges */
.status-badge {
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
    border-radius: 0.25rem;
    text-transform: uppercase;
    display: inline-block;
    min-width: 80px;
    text-align: center;
}

.status-present {
    background-color: #d1e7dd;
    color: #0f5132;
}

.status-absent {
    background-color: #f8d7da;
    color: #842029;
}

.status-half-day {
    background-color: #fff3cd;
    color: #664d03;
}

.status-leave {
    background-color: #cff4fc;
    color: #055160;
}

.status-holiday {
    background-color: #e2e3e5;
    color: #41464b;
}

/* Responsive adjustments */
@media (max-width: 991.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%;
    }
}

/* Fix for attendance page layout */
.attendance-page-container {
    width: 100%;
    padding-right: var(--bs-gutter-x, 0.75rem);
    padding-left: var(--bs-gutter-x, 0.75rem);
    margin-right: auto;
    margin-left: auto;
}

/* Improve card styling */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    padding: 1rem 1.25rem;
}

.card-body {
    padding: 1.25rem;
}

/* Improve button styling */
.btn-primary {
    padding: 0.375rem 1rem;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Fix for table on mobile */
@media (max-width: 767.98px) {
    .table-responsive {
        border: 0;
        margin-bottom: 0;
    }
}