/* User Earning Report Styles - Professional Table Design */

/* Main Card Styles */
.earning-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.earning-form {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
    justify-content: center;
}

.date-input-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    flex: 1;
}

.date-input-container {
    flex: 1;
    min-width: 200px;
}

.date-label {
    display: block;
    color: white;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.date-label i {
    margin-right: 8px;
}

.date-input-wrapper {
    position: relative;
}

.date-input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.date-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.date-input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    font-size: 16px;
}

.submit-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    position: relative;
    min-width: 250px;
    justify-content: center;
}

.submit-btn:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 107, 107, 0.4);
}

.btn-spinner {
    display: none;
}

.btn-spinner.show {
    display: inline-block;
}

/* Quick Date Buttons */
.quick-date-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.quick-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Loading Animation */
.loading-animation {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.loading-content {
    text-align: center;
    background: white;
    padding: 40px;
    border-radius: 20px;
    min-width: 300px;
}

.loading-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.spinner-ring:nth-child(1) {
    animation-delay: -0.45s;
}

.spinner-ring:nth-child(2) {
    animation-delay: -0.3s;
    border-top-color: #764ba2;
}

.spinner-ring:nth-child(3) {
    animation-delay: -0.15s;
    border-top-color: #ff6b6b;
}

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

.loading-content h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 20px;
}

.loading-content p {
    color: #666;
    font-size: 14px;
}

/* No Data Message */
.no-data-message {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 16px;
    margin-top: 30px;
}

.no-data-icon {
    font-size: 64px;
    color: #ccc;
    margin-bottom: 20px;
}

.no-data-message h3 {
    color: #333;
    margin-bottom: 10px;
}

.no-data-message p {
    color: #666;
    margin-bottom: 20px;
}

.retry-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background: #5a67d8;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .earning-card {
        padding: 20px;
    }
    
    .date-input-group {
        flex-direction: column;
    }
    
    .date-input-container {
        width: 100%;
    }
    
    .submit-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .quick-date-buttons {
        gap: 8px;
    }
    
    .quick-btn {
        padding: 6px 12px;
        font-size: 11px;
    }
}

/* ============================================
   FIXED TABLE - NO CUTOFF, VERTICAL + HORIZONTAL SCROLL
   ============================================ */

/* Results Section */
.results-section {
    animation: fadeIn 0.5s ease;
    width: 100%;
    overflow: visible;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Table Card - Full Width Container */
.table-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #eef2f6;
    width: 100%;
    display: block;
}

/* Table Header with Actions */
.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    background: linear-gradient(135deg, #f8fafd 0%, #f1f5f9 100%);
    border-bottom: 2px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 15px;
}

.table-header h4 {
    font-size: 18px;
    color: #1e293b;
    margin: 0;
    font-weight: 700;
}

.table-header h4 i {
    color: #667eea;
    margin-right: 10px;
    background: white;
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.table-actions {
    display: flex;
    gap: 10px;
}

/* Scroll Container - Handles Both Horizontal & Vertical */
.table-responsive {
    overflow-x: auto;
    overflow-y: auto;
    position: relative;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    max-height: 500px;
    width: 100%;
}

/* Custom Scrollbar */
.table-responsive::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #5a67d8;
}

/* DataTable Wrapper Styles */
.dataTables_wrapper {
    font-family: inherit;
    padding: 0 20px 20px 20px;
    width: 100%;
    overflow-x: auto;
}

/* Table Styles - Prevents Cutoff */
#earningTable {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 100%;
    margin-top: 0;
    table-layout: auto;
}

/* Table Header Row - Premium Design */
#earningTable thead tr {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
}

/* Individual Header Cells */
#earningTable th {
    padding: 16px 14px;
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    color: white;
    border: none;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-family: inherit;
    background: inherit;
    position: relative;
}

/* Add separator between header cells */
#earningTable th:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: rgba(255, 255, 255, 0.2);
}

/* First Column Sticky for Better UX */
#earningTable th:first-child,
#earningTable td:first-child {
    position: sticky;
    left: 0;
    background: inherit;
    z-index: 10;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
}

#earningTable th:first-child {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    z-index: 20;
}

#earningTable td:first-child {
    background-color: #fefce8;
    font-weight: 800;
    color: #0f172a;
    border-right: 2px solid #e2e8f0;
}

/* Table Body Cells */
#earningTable td {
    padding: 14px 14px;
    text-align: center;
    border-bottom: 1px solid #eef2f6;
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
    transition: all 0.2s ease;
    white-space: nowrap;
}

/* Zebra striping for table rows */
#earningTable tbody tr:nth-child(even) {
    background-color: #ffffff;
}

#earningTable tbody tr:nth-child(odd) {
    background-color: #fafcff;
}

/* Hover effect on rows */
#earningTable tbody tr:hover {
    background: linear-gradient(90deg, #f0f9ff 0%, #ffffff 100%);
    cursor: pointer;
    transition: all 0.3s ease;
}

#earningTable tbody tr:hover td:first-child {
    background: #fef3c7;
}

/* Amount Cell Styling */
#earningTable .amount-cell {
    color: #10b981;
    font-weight: 800;
    font-size: 15px;
}

/* TDS Cell Styling */
#earningTable .tds-cell {
    color: #f97316;
    font-weight: 700;
}

/* DataTables Custom Button Styles */
.dt-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.dt-buttons .dt-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.dt-buttons .dt-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.dt-buttons .dt-button:active {
    transform: translateY(0);
}

/* DataTables Search and Length Styling */
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 15px;
    float: right;
}

.dataTables_wrapper .dataTables_filter label {
    font-weight: 600;
    color: #475569;
    font-size: 13px;
}

.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px 15px;
    margin-left: 10px;
    outline: none;
    transition: all 0.3s ease;
    width: 250px;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.dataTables_wrapper .dataTables_length {
    margin-bottom: 15px;
    float: left;
}

.dataTables_wrapper .dataTables_length label {
    font-weight: 600;
    color: #475569;
    font-size: 13px;
}

.dataTables_wrapper .dataTables_length select {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 7px 10px;
    margin: 0 5px;
    outline: none;
    font-weight: 600;
    background: white;
    cursor: pointer;
}

/* Clear floats */
.dataTables_wrapper .dataTables_filter::after,
.dataTables_wrapper .dataTables_length::after {
    content: '';
    clear: both;
    display: table;
}

/* Pagination Styling */
.dataTables_wrapper .dataTables_paginate {
    margin-top: 20px;
    text-align: right;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 8px 14px;
    margin: 0 3px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: white;
    color: #475569;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    border: none;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #667eea;
    color: white !important;
    border-color: #667eea;
    transform: translateY(-1px);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    background: white;
    color: #475569 !important;
    transform: none;
}

/* Pagination Flex Display Fix */
div.dataTables_wrapper div.dataTables_paginate ul.pagination {
    display: flex !important;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Info Text Styling */
.dataTables_wrapper .dataTables_info {
    color: #64748b;
    font-size: 13px;
    padding: 15px 0;
    font-weight: 500;
    float: left;
}

/* Horizontal Scroll Hint */
.table-responsive {
    position: relative;
}

/* Responsive Table Adjustments - FIXED NO CUTOFF */
@media (max-width: 992px) {
    .table-responsive {
        max-height: 450px;
    }
    
    #earningTable th,
    #earningTable td {
        padding: 12px 10px;
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .table-card {
        border-radius: 16px;
    }
    
    .table-header {
        padding: 15px 18px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .dataTables_wrapper {
        padding: 0 15px 15px 15px;
    }
    
    .table-responsive {
        max-height: 400px;
    }
    
    #earningTable th {
        padding: 10px 8px;
        font-size: 11px;
        letter-spacing: 0.5px;
    }
    
    #earningTable td {
        padding: 8px 8px;
        font-size: 11px;
    }
    
    .dt-buttons .dt-button {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .dataTables_wrapper .dataTables_filter {
        float: none;
        text-align: center;
        margin-bottom: 15px;
    }
    
    .dataTables_wrapper .dataTables_length {
        float: none;
        text-align: center;
        margin-bottom: 15px;
    }
    
    .dataTables_wrapper .dataTables_info {
        float: none;
        text-align: center;
    }
    
    .dataTables_wrapper .dataTables_paginate {
        text-align: center;
    }
    
    div.dataTables_wrapper div.dataTables_paginate ul.pagination {
        justify-content: center;
        margin-top: 15px;
    }
    
    .table-responsive::after {
        display: none;
    }
}

@media (max-width: 480px) {
    .dataTables_wrapper .dataTables_filter input {
        width: 180px;
    }
    
    .dataTables_wrapper .dataTables_paginate .paginate_button {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .table-responsive {
        max-height: 350px;
    }
    
    #earningTable th,
    #earningTable td {
        padding: 8px 6px;
        font-size: 10px;
    }
}

/* Print Styles */
@media print {
    .earning-card,
    .quick-date-buttons,
    .table-actions,
    .dt-buttons,
    .dataTables_filter,
    .dataTables_length,
    .dataTables_paginate,
    .loading-animation,
    .no-data-message {
        display: none !important;
    }
    
    .results-section {
        display: block !important;
    }
    
    .table-card {
        padding: 0;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .table-responsive {
        overflow: visible !important;
        max-height: none !important;
    }
    
    #earningTable {
        min-width: auto !important;
        white-space: normal !important;
    }
    
    #earningTable th:first-child,
    #earningTable td:first-child {
        position: static !important;
    }
    
    div.dataTables_wrapper div.dataTables_paginate ul.pagination {
        display: flex !important;
    }
    
    #earningTable thead tr {
        background: #333 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    #earningTable th {
        color: white !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Force full width on main content */
.main-content .max-w-7xl {
    max-width: 100%;
    padding: 0 15px;
}

/* Ensure container takes full width */
.max-w-7xl {
    width: 100%;
}

/* Fix for any hidden overflow */
body {
    overflow-x: hidden;
}

.results-section,
.table-card,
.dataTables_wrapper {
    width: 100%;
    overflow: visible;
}
/* ============================================
   VERTICAL TABLE DESIGN - ROWS AS METRICS
   ============================================ */

/* Results Section */
.results-section {
    animation: fadeIn 0.5s ease;
    width: 100%;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Table Card */
.table-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #eef2f6;
    width: 100%;
}

/* Table Header with Actions */
.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    background: linear-gradient(135deg, #f8fafd 0%, #f1f5f9 100%);
    border-bottom: 2px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 15px;
}

.table-header h4 {
    font-size: 18px;
    color: #1e293b;
    margin: 0;
    font-weight: 700;
}

.table-header h4 i {
    color: #667eea;
    margin-right: 10px;
    background: white;
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.table-actions {
    display: flex;
    gap: 10px;
}

/* Table Container */
.table-responsive {
    overflow-x: auto;
    overflow-y: auto;
    position: relative;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    max-height: 550px;
    width: 100%;
}

/* Custom Scrollbar */
.table-responsive::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
}

/* DataTable Wrapper */
.dataTables_wrapper {
    font-family: inherit;
    padding: 0 20px 20px 20px;
    width: 100%;
}

/* Vertical Table Styles */
#earningTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0;
    border-radius: 12px;
    overflow: hidden;
}

/* Table Header */
#earningTable thead tr {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
}

#earningTable th {
    padding: 16px 20px;
    font-weight: 700;
    font-size: 14px;
    color: white;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

#earningTable th:first-child {
    text-align: left;
    border-top-left-radius: 12px;
}

#earningTable th:last-child {
    text-align: right;
    border-top-right-radius: 12px;
}

/* Table Body Cells */
#earningTable td {
    padding: 16px 20px;
    border-bottom: 1px solid #eef2f6;
    transition: all 0.2s ease;
}

/* Metric Name Column */
#earningTable .metric-name {
    font-weight: 600;
    color: #1e293b;
    background-color: #f8fafc;
    border-right: 1px solid #eef2f6;
    font-size: 15px;
}

#earningTable .metric-name i {
    margin-right: 12px;
    width: 24px;
    color: #667eea;
    font-size: 1.1rem;
}

/* Amount Column */
#earningTable .amount-cell {
    font-weight: 700;
    font-size: 16px;
    color: #10b981;
    text-align: right;
}

#earningTable .tds-cell {
    color: #f97316;
}

/* Row Hover Effect */
#earningTable tbody tr:hover {
    background: #f0f9ff;
}

#earningTable tbody tr:hover .metric-name {
    background: #e0f2fe;
}

/* Total Row Special Styling */
#earningTable .total-row .metric-name {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    font-weight: 800;
    font-size: 16px;
    border-top: 2px solid #667eea;
    border-bottom: 2px solid #667eea;
}

#earningTable .total-row .amount-cell {
    background: #eff6ff;
    font-size: 18px;
    color: #059669;
    font-weight: 800;
    border-top: 2px solid #667eea;
    border-bottom: 2px solid #667eea;
}

/* First Row Top Border Radius */
#earningTable tbody tr:first-child td:first-child {
    border-top-left-radius: 0;
}

#earningTable tbody tr:first-child td:last-child {
    border-top-right-radius: 0;
}

/* Last Row Bottom Border Radius */
#earningTable tbody tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
}

#earningTable tbody tr:last-child td:last-child {
    border-bottom-right-radius: 12px;
}

/* DataTables Buttons */
.dt-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.dt-buttons .dt-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.dt-buttons .dt-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* DataTables Search */
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 15px;
    float: right;
}

.dataTables_wrapper .dataTables_filter label {
    font-weight: 600;
    color: #475569;
    font-size: 13px;
}

.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px 15px;
    margin-left: 10px;
    outline: none;
    transition: all 0.3s ease;
    width: 250px;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

/* DataTables Length */
.dataTables_wrapper .dataTables_length {
    margin-bottom: 15px;
    float: left;
}

.dataTables_wrapper .dataTables_length label {
    font-weight: 600;
    color: #475569;
    font-size: 13px;
}

.dataTables_wrapper .dataTables_length select {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 7px 10px;
    margin: 0 5px;
    outline: none;
    font-weight: 600;
    background: white;
    cursor: pointer;
}

/* Clear floats */
.dataTables_wrapper .dataTables_filter::after,
.dataTables_wrapper .dataTables_length::after {
    content: '';
    clear: both;
    display: table;
}

/* Pagination */
.dataTables_wrapper .dataTables_paginate {
    margin-top: 20px;
    text-align: right;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 8px 14px;
    margin: 0 3px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: white;
    color: #475569;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    border: none;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #667eea;
    color: white !important;
    border-color: #667eea;
}

/* Pagination Container */
div.dataTables_wrapper div.dataTables_paginate ul.pagination {
    display: flex !important;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Info Text */
.dataTables_wrapper .dataTables_info {
    color: #64748b;
    font-size: 13px;
    padding: 15px 0;
    font-weight: 500;
    float: left;
}

/* Responsive Design */
@media (max-width: 768px) {
    .table-header {
        padding: 15px 18px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .dataTables_wrapper {
        padding: 0 15px 15px 15px;
    }
    
    .table-responsive {
        max-height: 450px;
    }
    
    #earningTable th {
        padding: 12px 15px;
        font-size: 12px;
    }
    
    #earningTable td {
        padding: 12px 15px;
    }
    
    #earningTable .metric-name {
        font-size: 13px;
    }
    
    #earningTable .amount-cell {
        font-size: 14px;
    }
    
    #earningTable .total-row .metric-name {
        font-size: 14px;
    }
    
    #earningTable .total-row .amount-cell {
        font-size: 16px;
    }
    
    .dt-buttons .dt-button {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .dataTables_wrapper .dataTables_filter {
        float: none;
        text-align: center;
        margin-bottom: 15px;
    }
    
    .dataTables_wrapper .dataTables_length {
        float: none;
        text-align: center;
        margin-bottom: 15px;
    }
    
    .dataTables_wrapper .dataTables_info {
        float: none;
        text-align: center;
    }
    
    .dataTables_wrapper .dataTables_paginate {
        text-align: center;
    }
    
    div.dataTables_wrapper div.dataTables_paginate ul.pagination {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .dataTables_wrapper .dataTables_filter input {
        width: 180px;
    }
    
    .table-responsive {
        max-height: 400px;
    }
    
    #earningTable th {
        padding: 10px 12px;
        font-size: 11px;
    }
    
    #earningTable td {
        padding: 10px 12px;
    }
    
    #earningTable .metric-name {
        font-size: 12px;
    }
    
    #earningTable .metric-name i {
        margin-right: 8px;
        font-size: 0.9rem;
    }
    
    #earningTable .amount-cell {
        font-size: 13px;
    }
}

/* Print Styles */
@media print {
    .earning-card,
    .quick-date-buttons,
    .table-actions,
    .dt-buttons,
    .dataTables_filter,
    .dataTables_length,
    .dataTables_paginate,
    .loading-animation,
    .no-data-message {
        display: none !important;
    }
    
    .results-section {
        display: block !important;
    }
    
    .table-card {
        padding: 0;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .table-responsive {
        overflow: visible !important;
        max-height: none !important;
    }
    
    #earningTable thead tr {
        background: #333 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    #earningTable th {
        color: white !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}