/* Add any custom styles here */
body {
    padding-top: 0px;
    background-color: #212529;
    color: #f8f9fa;
}

.alert {
    margin-top: 20px;
}

/* Add these styles */
.btn-group {
    display: flex;
    gap: 0.5rem;
}

.btn-group .btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn i {
    font-size: 0.9em;
}

/* Add some hover effects */
.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

/* Add some transition effects */
.btn {
    transition: all 0.2s ease-in-out;
}

/* Add some animation for the redo icon */
.fa-redo {
    transition: transform 0.3s ease-in-out;
}

.btn:hover .fa-redo {
    transform: rotate(-180deg);
}

/* Add these styles */
#paginationControls {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

#paginationButtons .btn {
    margin: 0 0.25rem;
}

.table-responsive {
    max-height: 600px;
    overflow-y: auto;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.25rem;
}

/* Add these styles */
.processing-status {
    margin: 20px 0;
}

.processing-status .progress {
    height: 25px;
    background-color: #f5f5f5;
    border-radius: 4px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.processing-status .progress-bar {
    background-color: #007bff;
    transition: width 0.6s ease;
}

.processing-status .status-text {
    margin-top: 10px;
    text-align: center;
    color: #666;
}

.progress-bar-striped {
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%,
        transparent
    );
    background-size: 1rem 1rem;
}

.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
    0% {
        background-position-x: 1rem;
    }
}

.card-title {
    margin-bottom: 1rem;
    color: #333;
}

/* Dark mode specific styles */
body {
    background-color: #212529;
    color: #f8f9fa;
}

.card {
    background-color: #2c3034;
    border-color: #373b3e;
}

.card-header {
    background-color: #343a40;
    border-bottom-color: #373b3e;
}

.table {
    color: #f8f9fa;
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.05);
}

.alert-info {
    background-color: #1c3a4e;
    border-color: #214b63;
    color: #8bb9cf;
}

.alert-warning {
    background-color: #4d3c10;
    border-color: #664d14;
    color: #ffd970;
}

.alert-secondary {
    background-color: #2d3238;
    border-color: #373b3e;
    color: #9da2a7;
}

.progress {
    background-color: #343a40;
}

.progress-bar {
    background-color: #0d6efd;
}

/* Dark mode form elements */
.form-control,
.form-select {
    background-color: #343a40;
    border-color: #495057;
    color: #f8f9fa;
}

.form-control:focus,
.form-select:focus {
    background-color: #3d444a;
    border-color: #0d6efd;
    color: #f8f9fa;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Dark mode buttons */
.btn-outline-primary {
    color: #0d6efd;
    border-color: #0d6efd;
}

.btn-outline-primary:hover {
    background-color: #0d6efd;
    color: #fff;
}

/* Badge colors for dark mode */
.badge.bg-danger {
    background-color: #dc3545 !important;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #000;
}

.badge.bg-info {
    background-color: #0dcaf0 !important;
    color: #000;
}

/* Table responsive container */
.table-responsive {
    background-color: #2c3034;
    border-radius: 0.375rem;
}

/* Processing status card */
.processing-status {
    background-color: #2c3034;
    border-color: #373b3e;
}

.processing-status .status-text {
    color: #adb5bd;
}

/* Pagination controls */
#paginationControls {
    border-top-color: #373b3e;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #343a40;
}

::-webkit-scrollbar-thumb {
    background-color: #495057;
    border-radius: 6px;
    border: 3px solid #343a40;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #6c757d;
}

/* Hover effects for table rows */
.table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.075) !important;
}

/* File input custom styling */
.custom-file-input::-webkit-file-upload-button {
    background-color: #343a40;
    border-color: #495057;
    color: #f8f9fa;
}

/* Dropdown menus */
.dropdown-menu {
    background-color: #343a40;
    border-color: #495057;
    z-index: 1050 !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.dropdown-item {
    color: #f8f9fa;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: #495057;
    color: #fff;
}

/* Ensure navbar dropdowns are visible */
.navbar .dropdown-menu {
    z-index: 1050 !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    display: none;
}

.navbar .dropdown-menu.show {
    display: block !important;
}

/* Modal styling if you have any */
.modal-content {
    background-color: #2c3034;
    border-color: #373b3e;
}

.modal-header {
    border-bottom-color: #373b3e;
}

.modal-footer {
    border-top-color: #373b3e;
}

.loading-indicator {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(33, 37, 41, 0.9); /* Dark theme background */
    margin-top: 1rem;
    padding: 1rem;
    text-align: center;
    z-index: 1000;
}

.spinner-border {
    width: 2rem;
    height: 2rem;
}

/* Smooth fade effect for new rows */
.table tbody tr {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Keep header visible while scrolling */
.table thead th {
    position: sticky;
    top: 0;
    background: #212529; /* Match your dark theme */
    z-index: 1;
}

/* Add a subtle shadow to the header */
.table thead th:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

/* Drag & Drop Styles */
.drop-zone {
    border: 2px dashed #495057;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    background-color: #343a40;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(13, 110, 253, 0.2);
}

.drop-zone.drag-over {
    border-style: solid;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

.drop-zone-content {
    max-width: 400px;
}

.drop-zone-content i {
    transition: transform 0.3s ease;
}

.drop-zone:hover .drop-zone-content i {
    transform: scale(1.1);
}

.file-info {
    background-color: rgba(13, 110, 253, 0.1);
    border: 2px solid #0d6efd;
    border-radius: 8px;
    padding: 1rem;
}

.file-info .fas {
    font-size: 1.5rem;
}

/* File type icons */
.file-info .fa-file-excel {
    color: #28a745 !important;
}

.file-info .fa-file-csv {
    color: #ffc107 !important;
}

/* Upload button states */
#uploadBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* File info button spacing */
#removeFile {
    margin-left: 0.5rem;
}

/* Loading overlay for exports */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-content {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    text-align: center;
    min-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    color: #333;
}

.loading-content h5 {
    color: #333;
    margin-bottom: 0.5rem;
}

.loading-content .text-muted {
    color: #666 !important;
}

/* Loading states */
.drop-zone.loading {
    border-color: #ffc107;
    background-color: rgba(255, 193, 7, 0.1);
}

.drop-zone.loading .drop-zone-content i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* File size validation */
.file-too-large {
    border-color: #dc3545 !important;
    background-color: rgba(220, 53, 69, 0.1) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .drop-zone {
        padding: 1.5rem 1rem;
        min-height: 150px;
    }

    .drop-zone-content h5 {
        font-size: 1.1rem;
    }

    .drop-zone-content .fa-3x {
        font-size: 2rem !important;
    }
}
