/* Master Transaction Reports CSS */

/* Page Header Styles */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 24px 32px;
    border-radius: 16px;
    color: white;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.page-header h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-header h1 i {
    font-size: 32px;
}

.page-header p {
    font-size: 16px;
    opacity: 0.9;
    margin: 0;
}

/* Calendar Card Styles - Matching main_ledger.css */
.calendar-card {
    background: white;
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.calendar-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.calendar-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.date-input-group {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 20px;
    align-items: flex-end;
}

.date-input-container {
    flex: 1;
    min-width: 0;
}

.date-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.date-label i {
    color: #667eea;
    font-size: 14px;
}

.date-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.date-input {
    width: 100%;
    padding: 14px 16px;
    padding-right: 45px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: white;
    color: #1e293b;
    font-weight: 500;
    cursor: pointer;
}

.date-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.date-input-icon {
    position: absolute;
    right: 16px;
    color: #94a3b8;
    pointer-events: none;
    font-size: 16px;
}

/* Form Select Styles */
.form-select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: white;
    color: #1e293b;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
}

.form-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Submit Button */
.submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    width: auto;
    min-width: 250px;
    margin: 0 auto;
    position: relative;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn i {
    font-size: 18px;
}

.btn-spinner {
    display: none;
    position: absolute;
    right: 20px;
}

.btn-spinner.show {
    display: inline-block;
}

/* Button Group */
.button-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.reset-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4);
    width: auto;
    min-width: 200px;
}

.reset-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.5);
}

.reset-btn i {
    font-size: 18px;
}

/* Quick Date Buttons */
.quick-date-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px dashed #e2e8f0;
    justify-content: center;
}

.quick-btn {
    padding: 8px 20px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.quick-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.quick-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: white;
}

/* Report Info Card */
.report-info-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 24px;
    color: white;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    animation: slideDown 0.5s ease;
}

.report-info-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.report-icon {
    font-size: 32px;
    opacity: 0.9;
}

.report-details h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.report-details p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

/* Summary Cards Container */
.summary-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.summary-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.summary-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

/* Background colors for summary icons */
.bg-blue-100 { background: rgba(59, 130, 246, 0.1); }
.bg-green-100 { background: rgba(16, 185, 129, 0.1); }
.bg-purple-100 { background: rgba(139, 92, 246, 0.1); }
.bg-yellow-100 { background: rgba(245, 158, 11, 0.1); }
.bg-red-100 { background: rgba(239, 68, 68, 0.1); }
.bg-indigo-100 { background: rgba(99, 102, 241, 0.1); }
.bg-pink-100 { background: rgba(236, 72, 153, 0.1); }
.bg-teal-100 { background: rgba(20, 184, 166, 0.1); }
.bg-orange-100 { background: rgba(249, 115, 22, 0.1); }
.bg-gray-100 { background: rgba(107, 114, 128, 0.1); }

/* Text colors */
.text-blue-600 { color: #2563eb; }
.text-green-600 { color: #16a34a; }
.text-purple-600 { color: #9333ea; }
.text-yellow-600 { color: #ca8a04; }
.text-red-600 { color: #dc2626; }
.text-indigo-600 { color: #4f46e5; }
.text-pink-600 { color: #db2777; }
.text-teal-600 { color: #0d9488; }
.text-orange-600 { color: #ea580c; }
.text-gray-600 { color: #4b5563; }

.summary-details {
    flex: 1;
}

.summary-label {
    display: block;
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 6px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.2;
}

/* Charts Container */
.charts-container {
    margin-bottom: 30px;
    animation: fadeIn 0.5s ease;
}

.chart-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 400px;
}

/* Table Card */
.table-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: 24px;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.table-header h4 {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-header h4 i {
    color: #667eea;
}

.table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* DataTable Customization */
.ledger-table {
    width: 100% !important;
    border-collapse: separate;
    border-spacing: 0;
}

.ledger-table thead th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    font-size: 14px;
    padding: 16px 12px;
    border: none;
    white-space: nowrap;
}

.ledger-table thead th:first-child {
    border-top-left-radius: 12px;
}

.ledger-table thead th:last-child {
    border-top-right-radius: 12px;
}

.ledger-table tbody td {
    padding: 14px 12px;
    font-size: 14px;
    color: #1f2937;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.ledger-table tbody tr:hover {
    background-color: #f9fafb;
}

.ledger-table tbody tr:last-child td {
    border-bottom: none;
}

/* Badge Styles */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    text-align: center;
    min-width: 80px;
}

.bg-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.bg-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.bg-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.bg-secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
}

.bg-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

/* Trend Indicators */
.trend-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.trend-up {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.trend-down {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* Loading Animation */
.loading-animation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-content {
    text-align: center;
    max-width: 400px;
    padding: 40px;
}

.loading-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid transparent;
    animation: spin 1.5s linear infinite;
}

.spinner-ring:nth-child(1) {
    border-top-color: #667eea;
    animation-delay: -0.5s;
}

.spinner-ring:nth-child(2) {
    border-right-color: #764ba2;
    animation-delay: -0.3s;
}

.spinner-ring:nth-child(3) {
    border-bottom-color: #f687b3;
    animation-delay: -0.1s;
}

.loading-content h3 {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.loading-content p {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
}

/* No Data Message */
.no-data-message {
    background: white;
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-top: 30px;
}

.no-data-content {
    max-width: 400px;
    margin: 0 auto;
}

.no-data-icon {
    font-size: 64px;
    color: #9ca3af;
    margin-bottom: 20px;
}

.no-data-icon i {
    animation: bounce 2s infinite;
}

.no-data-message h3 {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.no-data-message p {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 24px;
}

.retry-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

/* Error Message */
.error-message {
    background: #fee2e2;
    border: 1px solid #ef4444;
    border-radius: 12px;
    padding: 16px 20px;
    margin: 20px 0;
    animation: shake 0.5s ease;
}

.error-content {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #dc2626;
}

.error-content i {
    font-size: 24px;
}

.error-content span {
    font-size: 16px;
    font-weight: 500;
}

/* DataTable Buttons Customization */
.dt-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.dt-button {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.dt-button:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.dt-button.buttons-excel:hover {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.dt-button.buttons-pdf:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.dt-button.buttons-print:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.dt-button.buttons-copy:hover {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

/* DataTable Search and Length Menu */
.dataTables_filter {
    margin-bottom: 20px;
}

.dataTables_filter label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #4a5568;
}

.dataTables_filter input {
    padding: 10px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    min-width: 250px;
}

.dataTables_filter input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.dataTables_length {
    margin-bottom: 20px;
}

.dataTables_length label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #4a5568;
}

.dataTables_length select {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

.dataTables_info {
    padding: 16px 0;
    font-size: 14px;
    color: #6b7280;
}

.dataTables_paginate {
    padding: 16px 0;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.paginate_button {
    padding: 8px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.paginate_button:hover:not(.disabled) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: white;
}

.paginate_button.current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: white;
}

.paginate_button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Fix for Select2 design */
.select2-container--default .select2-selection--single {
    height: 50px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 46px !important;
    padding-left: 16px !important;
    color: #1e293b !important;
    font-weight: 500 !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 46px !important;
    right: 12px !important;
}

.select2-dropdown {
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

.select2-results__option {
    padding: 12px 16px !important;
    font-size: 14px !important;
}

.select2-results__option--highlighted {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

/* ===== MOBILE RESPONSIVE - WITH LABELS AND BACKGROUND COLORS ===== */
@media (max-width: 640px) {
    /* Hide table headers completely - we'll use data-label instead */
    .ledger-table thead {
        display: none;
    }
    
    /* Convert table to block display */
    .ledger-table,
    .ledger-table tbody,
    .ledger-table tr,
    .ledger-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Style each row as a card with gradient background */
    .ledger-table tr {
        background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
        border-radius: 16px;
        margin-bottom: 20px;
        padding: 0;
        border: 1px solid #e2e8f0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        position: relative;
        overflow: hidden;
    }
    
    /* Add a colorful header bar to each card */
    .ledger-table tr::before {
        content: '';
        display: block;
        height: 8px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f687b3 100%);
        width: 100%;
        position: absolute;
        top: 0;
        left: 0;
        z-index: 1;
    }
    
    /* Style each data cell with label and value side by side */
    .ledger-table td {
        padding: 14px 18px;
        border: none;
        border-bottom: 1px solid #edf2f7;
        text-align: right;
        font-size: 14px;
        color: #1e293b;
        display: flex;
        justify-content: space-between;
        align-items: center;
        background-color: transparent;
        position: relative;
        font-weight: 500;
    }
    
    /* Alternating background for better readability */
    .ledger-table tr td:nth-child(even) {
        background-color: rgba(102, 126, 234, 0.02);
    }
    
    /* Add subtle hover effect */
    .ledger-table tr:hover {
        box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
        transform: translateY(-2px);
        transition: all 0.3s ease;
    }
    
    /* Remove border from last cell */
    .ledger-table td:last-child {
        border-bottom: none;
    }
    
    /* Style for the label part (left side) using data-label */
    .ledger-table td:before {
        content: attr(data-label);
        font-weight: 700;
        color: #334155;
        text-align: left;
        font-size: 13px;
        text-transform: uppercase;
        letter-spacing: 0.4px;
        background: transparent;
        padding: 4px 0;
        display: inline-block;
        position: relative;
    }
    
    /* Add a subtle dot before each label */
    .ledger-table td:before {
        padding-left: 12px;
        position: relative;
    }
    
    .ledger-table td:before::before {
        content: '•';
        color: #667eea;
        font-size: 16px;
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
    }
    
    /* Style for the value part (right side) */
    .ledger-table td span.value,
    .ledger-table td .badge,
    .ledger-table td .trend-indicator,
    .ledger-table td .type-badge {
        font-weight: 600;
        text-align: right;
        margin-left: 15px;
        padding: 4px 12px;
        border-radius: 20px;
        display: inline-block;
    }
    
    /* Amount styling with gradient background */
    .ledger-table td.amount-cell {
        font-weight: 700;
        background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
        border-radius: 8px;
        padding: 10px 18px;
        margin: 5px 0;
    }
    
    .ledger-table td.amount-cell.credit-amount {
        color: #059669;
        background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
        font-weight: 700;
        border-left: 4px solid #10b981;
    }
    
    .ledger-table td.amount-cell.debit-amount {
        color: #b91c1c;
        background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
        font-weight: 700;
        border-left: 4px solid #ef4444;
    }
    
    /* Balance styling with gradient background */
    .ledger-table td.balance-cell {
        font-weight: 700;
        color: #4f46e5;
        background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
        border-radius: 8px;
        padding: 10px 18px;
        border-left: 4px solid #4f46e5;
    }
    
    /* Badge styling with gradients */
    .ledger-table td .badge {
        display: inline-block;
        padding: 6px 16px;
        border-radius: 30px;
        font-size: 12px;
        font-weight: 700;
        min-width: 80px;
        text-align: center;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
        letter-spacing: 0.3px;
    }
    
    /* Different badge backgrounds with gradients */
    .bg-success {
        background: linear-gradient(135deg, #10b981 0%, #059669 100%);
        color: white;
    }
    
    .bg-danger {
        background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
        color: white;
    }
    
    .bg-warning {
        background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
        color: white;
    }
    
    .bg-secondary {
        background: linear-gradient(135deg, #6b7280 0%, #374151 100%);
        color: white;
    }
    
    .bg-info {
        background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
        color: white;
    }
    
    /* Type badge styling with gradients */
    .ledger-table td .type-badge {
        display: inline-block;
        padding: 6px 20px;
        border-radius: 30px;
        font-size: 12px;
        font-weight: 700;
        text-align: center;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
        letter-spacing: 0.3px;
    }
    
    .type-credit {
        background: linear-gradient(135deg, #10b981 0%, #059669 100%);
        color: white;
    }
    
    .type-debit {
        background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
        color: white;
    }
    
    /* Trend indicator styling with gradients */
    .ledger-table td .trend-indicator {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 6px 16px;
        border-radius: 30px;
        font-size: 12px;
        font-weight: 700;
        background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
        color: #1e293b;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    }
    
    .trend-up {
        background: linear-gradient(135deg, #10b981 0%, #059669 100%);
        color: white;
    }
    
    .trend-down {
        background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
        color: white;
    }
    
    /* Responsive table container */
    .table-responsive {
        overflow-x: hidden;
        padding: 0 8px;
    }
    
    /* Table card with gradient */
    .table-card {
        background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
        padding: 16px;
        border-radius: 20px;
    }
    
    /* Style for the table title */
    .table-header h4 {
        font-size: 20px;
        font-weight: 700;
        color: #1e293b;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        margin-bottom: 10px;
    }
    
    /* Summary cards mobile with gradient backgrounds */
    .summary-card {
        padding: 18px;
        background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
        border: 1px solid #e2e8f0;
        border-radius: 16px;
        transition: all 0.3s ease;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    }
    
    .summary-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
    }
    
    .summary-icon {
        width: 55px;
        height: 55px;
        font-size: 26px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border-radius: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
    }
    
    .summary-value {
        font-size: 24px;
        font-weight: 700;
        color: #1e293b;
        line-height: 1.3;
    }
    
    .summary-label {
        font-size: 12px;
        color: #64748b;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        font-weight: 600;
        margin-bottom: 4px;
    }
    
    /* Report info card mobile with gradient */
    .report-info-card {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        padding: 18px;
        border-radius: 16px;
        margin-bottom: 20px;
    }
    
    .report-info-content {
        flex-direction: column;
        text-align: center;
    }
    
    .report-icon {
        font-size: 36px;
        background: rgba(255, 255, 255, 0.2);
        width: 60px;
        height: 60px;
        border-radius: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 10px;
    }
    
    .report-details h4 {
        font-size: 18px;
        font-weight: 700;
        color: white;
        margin-bottom: 5px;
    }
    
    .report-details p {
        font-size: 13px;
        color: rgba(255, 255, 255, 0.9);
    }
    
    /* Loading animation mobile with gradient */
    .loading-content {
        padding: 25px;
        margin: 20px;
        background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
        border-radius: 24px;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    }
    
    .loading-content h3 {
        font-size: 22px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    /* No data message mobile with gradient */
    .no-data-message {
        padding: 45px 25px;
        background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
        border-radius: 24px;
    }
    
    .no-data-icon {
        font-size: 54px;
        color: #667eea;
        background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
        width: 90px;
        height: 90px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 20px;
        box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
    }
    
    .retry-btn {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        padding: 14px 35px;
        font-size: 15px;
        border-radius: 40px;
        box-shadow: 0 6px 15px rgba(102, 126, 234, 0.4);
    }
    
    /* Form elements mobile with gradient */
    .date-input-group {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .date-input {
        background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
        border: 2px solid #e2e8f0;
        padding: 14px 16px;
        font-size: 14px;
    }
    
    .date-input:focus {
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
    }
    
    .date-label {
        font-size: 13px;
        margin-bottom: 6px;
        color: #475569;
    }
    
    .submit-btn, .reset-btn {
        width: 100%;
        min-width: auto;
        padding: 16px 20px;
        font-weight: 700;
        letter-spacing: 0.5px;
        border-radius: 40px;
        font-size: 15px;
    }
    
    .submit-btn {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        box-shadow: 0 6px 15px rgba(102, 126, 234, 0.4);
    }
    
    .reset-btn {
        background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
        color: white;
        box-shadow: 0 6px 15px rgba(75, 85, 99, 0.4);
    }
    
    .button-group {
        flex-direction: column;
        gap: 12px;
    }
    
    .quick-date-buttons {
        flex-direction: column;
        gap: 10px;
        margin-top: 20px;
        padding-top: 20px;
    }
    
    .quick-btn {
        width: 100%;
        padding: 14px;
        background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
        border: 2px solid #e2e8f0;
        color: #475569;
        font-weight: 600;
        border-radius: 40px;
        font-size: 14px;
        transition: all 0.3s ease;
    }
    
    .quick-btn:hover {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border-color: transparent;
        transform: translateY(-2px);
        box-shadow: 0 6px 15px rgba(102, 126, 234, 0.3);
    }
    
    /* DataTable pagination mobile */
    .dataTables_paginate {
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .paginate_button {
        padding: 8px 14px;
        font-size: 13px;
        border-radius: 30px;
        background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
        border: 1px solid #e2e8f0;
    }
    
    .paginate_button.current {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border-color: transparent;
    }
    
    .dataTables_info {
        font-size: 13px;
        text-align: center;
        padding: 15px 0 10px;
        color: #64748b;
    }
    
    .dataTables_filter input {
        min-width: 100%;
        padding: 12px 16px;
        border-radius: 40px;
        background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
        border: 2px solid #e2e8f0;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .page-header h1 {
        font-size: 22px;
    }
    
    .page-header h1 i {
        font-size: 26px;
    }
    
    .page-header {
        padding: 18px 20px;
    }
    
    .calendar-card {
        padding: 18px;
    }
    
    .ledger-table td {
        padding: 12px 15px;
        font-size: 13px;
    }
    
    .ledger-table td:before {
        font-size: 12px;
    }
    
    .badge, .type-badge, .trend-indicator {
        padding: 5px 12px;
        font-size: 11px;
        min-width: 70px;
    }
    
    .summary-card {
        padding: 15px;
    }
    
    .summary-icon {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }
    
    .summary-value {
        font-size: 20px;
    }
    
    .summary-label {
        font-size: 11px;
    }
    
    .chart-card {
        height: 220px;
        padding: 12px;
    }
    
    .dt-button {
        width: calc(50% - 3px);
        padding: 8px 8px;
        font-size: 11px;
    }
    
    .dt-button i {
        font-size: 11px;
        margin-right: 3px;
    }
}

/* Very small devices */
@media (max-width: 360px) {
    .ledger-table td {
        padding: 10px 12px;
        font-size: 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .ledger-table td:before {
        margin-bottom: 3px;
    }
    
    .ledger-table td span.value,
    .ledger-table td .badge,
    .ledger-table td .trend-indicator,
    .ledger-table td .type-badge {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }
    
    .badge {
        min-width: 100%;
    }
    
    .dt-button {
        width: 100%;
    }
    
    .summary-card {
        padding: 12px;
    }
    
    .summary-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .summary-value {
        font-size: 18px;
    }
}

/* Responsive Design - Desktop and Tablet */
@media (max-width: 1024px) {
    .date-input-group {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .summary-cards-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 20px;
    }
    
    .page-header h1 {
        font-size: 24px;
    }
    
    .calendar-card {
        padding: 20px;
    }
    
    .submit-btn, .reset-btn {
        width: 100%;
        min-width: auto;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .quick-date-buttons {
        flex-direction: column;
    }
    
    .quick-btn {
        width: 100%;
    }
    
    .summary-cards-container {
        grid-template-columns: 1fr;
    }
    
    .table-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .table-actions {
        width: 100%;
    }
    
    .dt-buttons {
        width: 100%;
        justify-content: space-between;
    }
    
    .dt-button {
        flex: 1;
        justify-content: center;
    }
    
    .dataTables_filter input {
        min-width: 100%;
    }
    
    .dataTables_paginate {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .chart-card {
        height: 300px;
    }
}

/* Print Styles */
@media print {
    .calendar-card,
    .quick-date-buttons,
    .submit-btn,
    .reset-btn,
    .table-actions,
    .dataTables_filter,
    .dataTables_length,
    .dataTables_paginate,
    .dt-buttons {
        display: none !important;
    }
    
    .results-section {
        display: block !important;
    }
    
    .ledger-table {
        border: 1px solid #000;
    }
    
    .ledger-table thead th {
        background: #f0f0f0 !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Utility Classes */
.min-h-screen {
    min-height: 100vh;
}

.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mt-4 {
    margin-top: 1rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46a0 100%);
}