/* Market Intelligence Dashboard - Professional CSS */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #ffd700;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow-light: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 20px rgba(0,0,0,0.15);
    --shadow-heavy: 0 8px 30px rgba(0,0,0,0.2);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    padding-top: 76px;
}

/* Navigation */
.navbar {
    box-shadow: var(--shadow-medium);
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: #fff !important;
    transform: translateY(-1px);
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-medium);
    border-radius: var(--border-radius);
}

.dropdown-item {
    transition: var(--transition);
    padding: 0.75rem 1.5rem;
}

.dropdown-item:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateX(5px);
}

/* Hero Section */
.hero-section {
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="rgba(255,255,255,0.05)" points="0,1000 1000,0 1000,1000"/></svg>');
    background-size: cover;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-stats {
    margin-top: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.stat-icon {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Feature Cards */
.feature-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid #e9ecef;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: var(--secondary-color);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: white;
}

.feature-card h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.feature-list li {
    padding: 0.25rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.feature-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
    border: none;
    padding: 0.75rem 1.5rem;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-outline-light:hover {
    transform: translateY(-2px);
}

/* Data Tables */
.table-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    margin-bottom: 2rem;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: var(--gradient-primary);
    color: white;
    border: none;
    font-weight: 600;
    padding: 1rem;
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background-color: rgba(52, 144, 220, 0.05);
    transform: scale(1.01);
}

.table tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    border-color: #e9ecef;
}

/* DataTables Styling */
.dataTables_wrapper {
    padding: 1.5rem;
}

.dataTables_filter input {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 0.5rem 1rem;
    transition: var(--transition);
}

.dataTables_filter input:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 144, 220, 0.25);
    outline: none;
}

.dataTables_length select:focus {
    border-color: var(--secondary-color);
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* Fix DataTables dropdown arrow overlap - Comprehensive Solution */
.dataTables_length select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 16px 12px;
    padding: 0.5rem 2.5rem 0.5rem 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    transition: var(--transition);
    min-width: 80px;
    margin: 0 0.5rem;
}

.paginate_button {
    border-radius: var(--border-radius) !important;
    margin: 0 2px !important;
    transition: var(--transition) !important;
}

.paginate_button.current {
    background: var(--gradient-primary) !important;
    border-color: transparent !important;
    color: white !important;
}

.paginate_button:hover {
    background: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
    color: white !important;
}

/* Badges */
.badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
}

.badge-success {
    background: var(--success-color);
}

.badge-warning {
    background: var(--warning-color);
}

.badge-danger {
    background: var(--accent-color);
}

.badge-info {
    background: var(--info-color);
}

.badge-primary {
    background: var(--secondary-color);
}

/* Statistics Dashboard */
.stats-dashboard {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
}

.stat-item i {
    opacity: 0.8;
    margin-bottom: 1rem;
}

.stat-item h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

/* Filters */
.filters-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.filter-group {
    margin-bottom: 1rem;
}

.filter-group label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: block;
}

.filter-group select {
    width: 100%;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 0.5rem 1rem;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.filter-group select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 144, 220, 0.25);
    outline: none;
}

/* Loading States */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--secondary-color);
}

.loading i {
    font-size: 3rem;
    animation: spin 1s linear infinite;
}

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

/* Color Coding */
.positive {
    color: var(--success-color) !important;
    font-weight: 600;
}

.negative {
    color: var(--accent-color) !important;
    font-weight: 600;
}

.neutral {
    color: var(--warning-color) !important;
    font-weight: 600;
}

/* Links */
a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .feature-card {
        margin-bottom: 2rem;
    }
    
    .table-responsive {
        border-radius: var(--border-radius);
    }
    
    .dataTables_wrapper {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .display-4 {
        font-size: 1.75rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .filters-container,
    .dataTables_wrapper .dataTables_paginate,
    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        display: none !important;
    }
    
    body {
        padding-top: 0;
    }
    
    .table-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for keyboard navigation */
.btn:focus,
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(52, 144, 220, 0.25);
    outline: none;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000;
        --secondary-color: #0066cc;
        --accent-color: #cc0000;
        --success-color: #006600;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
/* Chart Container Styles */
.chart-container {
    position: relative;
    height: 500px;
    width: 100%;
    margin: 0 auto;
    background: #ffffff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    padding: 10px;
}

/* Responsive Chart Heights */
@media (max-width: 768px) {
    .chart-container {
        height: 400px;
    }
}

@media (max-width: 576px) {
    .chart-container {
        height: 350px;
    }
}

@media (min-width: 1200px) {
    .chart-container {
        height: 600px;
    }
}

/* Chart Canvas Styling */
.chart-container canvas {
    border-radius: var(--border-radius);
}

/* Table Container Enhancements */
.table-container {
    background: #ffffff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    margin-bottom: 2rem;
}

.table-container .table-responsive {
    border-radius: var(--border-radius);
}

/* DataTable Styling */
.dataTables_wrapper {
    padding: 1rem;
}

.dataTables_filter input {
    border-radius: var(--border-radius);
    border: 1px solid #dee2e6;
    padding: 0.5rem 1rem;
    margin-left: 0.5rem;
}

/* Chart Section Spacing */
.chart-section {
    margin-bottom: 3rem;
}

.chart-section h5 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

/* Enhanced Statistics Cards */
.stat-item {
    padding: 1.5rem;
    text-align: center;
    background: #ffffff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    height: 100%;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.stat-item i {
    margin-bottom: 1rem;
}

.stat-item h4 {
    font-weight: 700;
    margin: 0.5rem 0;
    color: var(--primary-color);
}

.stat-item p {
    margin: 0;
    font-size: 0.9rem;
    color: #6c757d;
}
/* DataTable Column Styling */
.dataTables_wrapper .table td.text-nowrap {
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Specific column width adjustments */
.dataTables_wrapper .table th:nth-child(10), /* Area column */
.dataTables_wrapper .table td:nth-child(10) {
    min-width: 80px;
    white-space: nowrap;
    text-align: center;
}

/* Width column */
.dataTables_wrapper .table th:nth-child(9), 
.dataTables_wrapper .table td:nth-child(9) {
    min-width: 70px;
    white-space: nowrap;
    text-align: center;
}

/* Beds, Baths, Park columns */
.dataTables_wrapper .table th:nth-child(3),
.dataTables_wrapper .table th:nth-child(4),
.dataTables_wrapper .table th:nth-child(5),
.dataTables_wrapper .table td:nth-child(3),
.dataTables_wrapper .table td:nth-child(4),
.dataTables_wrapper .table td:nth-child(5) {
    min-width: 60px;
    white-space: nowrap;
    text-align: center;
}

/* Price column */
.dataTables_wrapper .table th:nth-child(2),
.dataTables_wrapper .table td:nth-child(2) {
    min-width: 120px;
    white-space: nowrap;
    text-align: right;
}

/* Date column */
.dataTables_wrapper .table th:nth-child(1),
.dataTables_wrapper .table td:nth-child(1) {
    min-width: 100px;
    white-space: nowrap;
    text-align: center;
}
/* Responsive table improvements */
@media (max-width: 768px) {
    .dataTables_wrapper .table-responsive {
        font-size: 0.875rem;
    }
    
    .dataTables_wrapper .table th,
    .dataTables_wrapper .table td {
        padding: 0.5rem 0.25rem;
    }
    
    /* Adjust column widths for mobile */
    .dataTables_wrapper .table th:nth-child(10), /* Area column */
    .dataTables_wrapper .table td:nth-child(10) {
        min-width: 70px;
    }
    
    .dataTables_wrapper .table th:nth-child(9), /* Width column */
    .dataTables_wrapper .table td:nth-child(9) {
        min-width: 60px;
    }
}

/* Ensure non-breaking spaces work properly */
.dataTables_wrapper .table td {
    word-break: keep-all;
    overflow-wrap: normal;
}

/* Table scroll improvements */
.table-responsive {
    -webkit-overflow-scrolling: touch;
}

/* DataTable search and pagination styling */
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 1rem;
}

.dataTables_wrapper .dataTables_length {
    margin-bottom: 1rem;
}
/* Full Address column (19th column) */
.dataTables_wrapper .table th:nth-child(19),
.dataTables_wrapper .table td:nth-child(19) {
    min-width: 320px;
    max-width: 320px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Full Address links styling */
.dataTables_wrapper .table td:nth-child(19) a {
    color: #0066cc;
    text-decoration: none;
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dataTables_wrapper .table td:nth-child(19) a:hover {
    color: #004499;
    text-decoration: underline;
}

/* Responsive adjustments for Full Address */
@media (max-width: 1200px) {
    .dataTables_wrapper .table th:nth-child(19),
    .dataTables_wrapper .table td:nth-child(19) {
        min-width: 280px;
        max-width: 280px;
    }
}

@media (max-width: 768px) {
    .dataTables_wrapper .table th:nth-child(19),
    .dataTables_wrapper .table td:nth-child(19) {
        min-width: 250px;
        max-width: 250px;
    }
}
/* Reduced margins for table sections */
.table-section .container {
    max-width: 95%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

/* Alternative: Full width table sections */
.table-section-full .container {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 30px;
    padding-right: 30px;
}

/* Responsive adjustments for reduced margins */
@media (max-width: 768px) {
    .table-section .container,
    .table-section-full .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (max-width: 576px) {
    .table-section .container,
    .table-section-full .container {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* Ensure table containers use full available width */
.table-section .table-container,
.table-section-full .table-container {
    width: 100%;
    margin: 0;
}

/* DataTable wrapper adjustments for wider tables */
.table-section .dataTables_wrapper,
.table-section-full .dataTables_wrapper {
    width: 100%;
}

/* Table responsive container adjustments */
.table-section .table-responsive,
.table-section-full .table-responsive {
    width: 100%;
    margin: 0;
}
/* Enhanced table width utilization */
.table-section .table,
.table-section-full .table {
    width: 100%;
    margin-bottom: 0;
}

/* Ensure DataTables use full width */
.table-section .dataTables_wrapper .table,
.table-section-full .dataTables_wrapper .table {
    width: 100% !important;
}

/* Better spacing for table controls */
.table-section .dataTables_wrapper .dataTables_length,
.table-section .dataTables_wrapper .dataTables_filter,
.table-section-full .dataTables_wrapper .dataTables_length,
.table-section-full .dataTables_wrapper .dataTables_filter {
    margin-bottom: 1rem;
}

.table-section .dataTables_wrapper .dataTables_info,
.table-section .dataTables_wrapper .dataTables_paginate,
.table-section-full .dataTables_wrapper .dataTables_info,
.table-section-full .dataTables_wrapper .dataTables_paginate {
    margin-top: 1rem;
}

/* Improved horizontal scrolling */
.table-section .table-responsive,
.table-section-full .table-responsive {
    -webkit-overflow-scrolling: touch;
    border: none;
}

/* Statistics section adjustments */
.table-section .stat-item,
.table-section-full .stat-item {
    margin-bottom: 1rem;
}
/* Text visibility fixes */

/* Ensure navbar text is always visible */
.navbar-dark .navbar-brand,
.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
    color: #ffffff !important;
}

.navbar-dark .navbar-nav .nav-link.active {
    color: #ffffff !important;
    font-weight: 600;
}

/* Dropdown menu text visibility */
.dropdown-menu .dropdown-item {
    color: #212529 !important;
}

.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus {
    background: var(--gradient-primary);
    color: #ffffff !important;
}

.dropdown-menu .dropdown-item.active {
    background: var(--gradient-primary);
    color: #ffffff !important;
}

/* Hero section text visibility */
.hero-section .text-white {
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.hero-section .text-white-50 {
    color: rgba(255, 255, 255, 0.75) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Statistics section text visibility */
.bg-primary.text-white,
.bg-primary .text-white {
    color: #ffffff !important;
}

/* Footer text visibility */
.bg-dark.text-white,
.bg-dark .text-white {
    color: #ffffff !important;
}

.bg-dark .text-white-50,
.bg-dark a.text-white-50 {
    color: rgba(255, 255, 255, 0.6) !important;
}

.bg-dark a.text-white-50:hover {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Table header text visibility */
.table thead th {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Button text visibility */
.btn-primary {
    color: #ffffff !important;
}

.btn-primary:hover,
.btn-primary:focus {
    color: #ffffff !important;
}

/* DataTables pagination text visibility */
.paginate_button.current {
    color: #ffffff !important;
}

/* Alert and badge text visibility fixes */
.alert-primary {
    color: #084298 !important;
}

.alert-info {
    color: #055160 !important;
}

.alert-warning {
    color: #664d03 !important;
}

.badge.bg-primary,
.badge.bg-info,
.badge.bg-success,
.badge.bg-warning,
.badge.bg-danger {
    color: #ffffff !important;
}

.badge.bg-light,
.badge.bg-warning {
    color: #000000 !important;
}

/* Ensure proper contrast for custom elements */
.stat-item h4 {
    color: var(--primary-color) !important;
}

.stat-item p {
    color: #6c757d !important;
}

/* Fix any potential issues with white text on light backgrounds */
.bg-light .text-white,
.bg-white .text-white,
.table-light .text-white {
    color: #212529 !important;
}

/* Accessibility improvements */
@media (prefers-contrast: high) {
    .text-white {
        text-shadow: 0 0 2px rgba(0, 0, 0, 0.8);
    }
    
    .navbar-dark .navbar-nav .nav-link {
        color: #ffffff !important;
    }
}
/* Enhanced warning text visibility for dark backgrounds */
.text-warning {
    color: var(--warning-color) !important;
}

/* Specific improvements for dark backgrounds */
.bg-dark .text-warning,
.bg-black .text-warning,
footer.bg-dark .text-warning {
    color: #ffd700 !important; /* Professional Gold */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* For your black background theme */
.bg-black .muted-text,
body[style*="background-color: #000000"] .muted-text {
    color: #ffd700 !important; /* Professional Gold */
}

/* Ensure warning badges are visible */
.badge-warning,
.badge.bg-warning {
    background-color: var(--warning-color) !important;
    color: #000000 !important; /* Black text on gold background */
    font-weight: 600;
}

/* Warning alerts with better contrast */
.alert-warning {
    background-color: rgba(255, 215, 0, 0.1);
    border-color: var(--warning-color);
    color: var(--warning-color);
}
/* Comprehensive DataTables control spacing to prevent overlaps */
.dataTables_wrapper .dataTables_length {
    margin-bottom: 1.5rem;
    display: inline-block;
    margin-right: 2rem;
    vertical-align: top;
}

.dataTables_wrapper .dataTables_filter {
    margin-bottom: 1.5rem;
    vertical-align: top;
}

.dataTables_wrapper .dataTables_info {
    margin-top: 1.5rem;
    margin-right: 2rem;
    display: inline-block;
    vertical-align: top;
}

.dataTables_wrapper .dataTables_paginate {
    margin-top: 1.5rem;
    vertical-align: top;
}

/* Ensure proper row spacing in DataTables wrapper */
.dataTables_wrapper .row {
    margin-bottom: 0.75rem;
}

.dataTables_wrapper .row:last-child {
    margin-bottom: 0;
}

/* Fix for mobile responsiveness */
@media (max-width: 768px) {
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        display: block;
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        margin-top: 1rem;
    }
}
