/* Export Page Styles */
body {
    font-family: Arial, sans-serif;
    margin: 30px;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

h1 {
    color: #333;
    border-bottom: 3px solid #007bff;
    padding-bottom: 10px;
}

h2 {
    margin-top: 30px;
    color: #555;
}

.export-section {
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.export-buttons {
    margin: 20px 0;
    text-align: center;
}

button {
    padding: 12px 20px;
    margin-right: 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

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

button:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.loading {
    display: none;
    color: #007bff;
    margin-top: 15px;
    padding: 10px 15px;
    background-color: #e6f2ff;
    border-radius: 6px;
    border: 1px solid #b8daff;
    font-weight: 500;
    text-align: center;
}

.loading-icon {
    margin-right: 8px;
    font-size: 16px;
    display: inline-block;
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* Table Controls */
.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.filter-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-section label {
    font-weight: 600;
    color: #495057;
}

.filter-dropdown {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: white;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.filter-dropdown:hover {
    border-color: #007bff;
}

.filter-dropdown:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.results-info {
    color: #6c757d;
    font-size: 14px;
    font-style: italic;
}

/* Enhanced Table Styling */
.export-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    table-layout: fixed;
}

th, td {
    padding: 12px 15px;
    border-bottom: 1px solid #dee2e6;
    text-align: left;
    vertical-align: middle;
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
    position: relative;
    border-bottom: 2px solid #dee2e6;
    color: #495057;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    font-size: 14px;
    color: #495057;
    padding: 15px;
}

/* Date & Time column */
th:nth-child(1), td:nth-child(1) {
    width: 25%;
    text-align: left;
}

/* Type column */
th:nth-child(2), td:nth-child(2) {
    width: 18%;
    text-align: left;
}

td:nth-child(2) {
    font-weight: 500;
    text-transform: capitalize;
}

/* Status column */
th:nth-child(3), td:nth-child(3) {
    width: 18%;
    text-align: center;
}

/* Record Count column */
th:nth-child(4), td:nth-child(4) {
    width: 18%;
    text-align: center;
}

td:nth-child(4) {
    font-weight: 500;
}

/* File column */
th:nth-child(5), td:nth-child(5) {
    width: 21%;
    text-align: center;
}

/* Alternating row colors */
tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

tbody tr:hover {
    background-color: #e9ecef;
    transition: background-color 0.2s ease;
}

.sort-link {
    color: #495057;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 0;
    transition: color 0.3s ease;
    width: 100%;
}

.sort-link:hover {
    color: #007bff;
    text-decoration: none;
}

.sort-arrow {
    font-size: 14px;
    margin-left: 8px;
    color: #007bff;
    font-weight: bold;
    min-width: 12px;
}

/* Active sorting column styling */
th:hover {
    background-color: #e9ecef;
}

/* Ensure table headers are clickable */
th a {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}

/* Remove default link styling in table headers */
th a:visited {
    color: #495057;
}

/* Enhanced Status Badge Styling */
.success {
    display: inline-block;
    background-color: #28a745;
    color: white !important;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    text-transform: capitalize;
    letter-spacing: 0.2px;
    /* text-align: center; */
    min-width: 70px;
    border: none;
    line-height: 1.3;
    white-space: nowrap;
}

.failed {
    display: inline-block;
    background-color: #dc3545;
    color: white !important;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    text-transform: capitalize;
    letter-spacing: 0.2px;
    text-align: center;
    min-width: 70px;
    border: none;
    line-height: 1.3;
    white-space: nowrap;
}

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

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

.last-export {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    border-left: 4px solid #007bff;
}

.last-export p {
    margin: 8px 0;
}

.download-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: inline-block;
    font-size: 13px;
    border: 1px solid #007bff;
}

.download-link:hover {
    background-color: #007bff;
    color: white;
    text-decoration: none;
}

.alert {
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    display: none;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}