/* reports.css */
/* Reports Dashboard Styles */
.report-filters {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 35px;
    border: 1px solid #f0f0f0;
    max-width: 100%;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

.report-filters::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.report-filters:hover::before {
    opacity: 1;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: end;
}

.filter-group {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

.filter-group:focus-within label {
    color: #4CAF50;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #fafbfc;
    font-family: 'Open Sans', sans-serif;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
    background: white;
    transform: translateY(-2px);
}

.date-inputs {
    display: flex;
    gap: 12px;
    align-items: center;
}

.date-inputs span {
    color: #666;
    font-weight: 500;
    white-space: nowrap;
    font-size: 14px;
}

/* Summary Cards - Horizontal Layout */
.report-summary-cards {
    display: flex;  /* Changed to flex for horizontal layout */
    flex-direction: row;  /* Ensure horizontal */
    overflow-x: auto;  /* Allow horizontal scrolling if needed on small screens */
    gap: 20px;
    margin-bottom: 40px;
    width: 100%;
    max-width: 100%;
    scroll-snap-type: x mandatory;  /* Snap scrolling for better UX */
}

.summary-card {
    background: white;
    border-radius: 12px;
    padding: 25px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 15px;
    border-left: 5px solid #4CAF50;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 100px;
    min-width: 250px;  /* Fixed min-width for horizontal cards */
    flex-shrink: 0;  /* Prevent shrinking */
    box-sizing: border-box;
    scroll-snap-align: start;  /* Snap alignment */
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.summary-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: all 0.5s ease;
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.summary-card:hover::before {
    opacity: 1;
}

.summary-card:hover::after {
    left: 100%;
}

.summary-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    transition: all 0.3s ease;
}

.summary-card:hover .summary-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.summary-content {
    flex: 1;
    min-width: 0; /* Prevent text overflow */
}

.summary-content h3 {
    margin: 0;
    font-size: 13px;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Poppins', sans-serif;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.3s ease;
}

.summary-card:hover .summary-content h3 {
    color: #333;
}

.summary-content p {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.2;
    font-family: 'Poppins', sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.3s ease;
}

.summary-card:hover .summary-content p {
    color: #4CAF50;
}

/* Different colors for each summary card */
.report-summary-cards .summary-card:nth-child(1) {
    border-left-color: #4CAF50;
}

.report-summary-cards .summary-card:nth-child(1) .summary-icon {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.report-summary-cards .summary-card:nth-child(2) {
    border-left-color: #2196F3;
}

.report-summary-cards .summary-card:nth-child(2) .summary-icon {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

.report-summary-cards .summary-card:nth-child(3) {
    border-left-color: #FF9800;
}

.report-summary-cards .summary-card:nth-child(3) .summary-icon {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

.report-summary-cards .summary-card:nth-child(4) {
    border-left-color: #9C27B0;
}

.report-summary-cards .summary-card:nth-child(4) .summary-icon {
    background: linear-gradient(135deg, #9C27B0, #7B1FA2);
    box-shadow: 0 4px 15px rgba(156, 39, 176, 0.3);
}

/* Report Sections */
.report-content {
    margin-top: 20px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.report-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    border: 1px solid #f0f0f0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.report-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4CAF50, #2196F3);
    opacity: 0.8;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
    flex-wrap: wrap;
    gap: 15px;
}

.section-header h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 24px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
}

.section-header h2 i {
    margin-right: 12px;
    color: #4CAF50;
}

.section-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: 'Open Sans', sans-serif;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: all 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    box-shadow: 0 2px 10px rgba(76, 175, 80, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #45a049, #4CAF50);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.btn-outline {
    background: white;
    color: #666;
    border: 2px solid #e1e5e9;
    font-weight: 500;
}

.btn-outline:hover {
    background: #f8f9fa;
    color: #333;
    border-color: #4CAF50;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.export-btn {
    padding: 10px 18px;
    font-size: 14px;
}

/* Chart Containers */
.chart-container {
    position: relative;
    height: 380px;
    margin-bottom: 25px;
    background: #fafbfc;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #e1e5e9;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.chart-container:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-color: #4CAF50;
}

.half-width {
    width: calc(50% - 12px);
    display: inline-block;
    vertical-align: top;
    margin-right: 12px;
}

.half-width:last-child {
    margin-right: 0;
}

.chart-container:not(.half-width) {
    width: 100%;
}

/* Table Containers */
.table-container {
    margin-top: 30px;
    width: 100%;
    overflow-x: auto;
}

.table-container h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #2c3e50;
    font-weight: 600;
    padding-bottom: 12px;
    border-bottom: 3px solid #4CAF50;
    font-family: 'Poppins', sans-serif;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e5e9;
    min-width: 600px; /* Ensure table has minimum width for small screens */
}

.report-table th,
.report-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    font-family: 'Open Sans', sans-serif;
    transition: all 0.3s ease;
}

.report-table th {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    font-weight: 600;
    color: #2c3e50;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e1e5e9;
    white-space: nowrap;
}

.report-table tr {
    transition: all 0.3s ease;
}

.report-table tr:hover {
    background: #f8f9fa;
    transform: scale(1.01);
}

.report-table tr:hover td {
    color: #4CAF50;
    font-weight: 500;
}

.report-table tr:last-child td {
    border-bottom: none;
}

/* Loading indicator */
.report-loading {
    display: none;
    text-align: center;
    padding: 60px 20px;
    color: #4CAF50;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin: 20px 0;
    border: 1px solid #f0f0f0;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.report-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(76, 175, 80, 0.05), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.report-loading i {
    font-size: 3rem;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.report-loading p {
    font-size: 16px;
    margin: 0;
    color: #666;
    font-family: 'Open Sans', sans-serif;
    position: relative;
    z-index: 2;
}

/* Hide time period selector */
#timePeriod {
    display: none !important;
}

#timePeriod + label {
    display: none !important;
}

/* Ensure custom date range is always visible */
.date-range {
    display: flex !important;
    flex-direction: column;
}

/* Main content container fixes */
.main-content {
    padding: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.admin-container {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.admin-header {
    margin-bottom: 25px;
    width: 100%;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .report-summary-cards {
        gap: 15px;
    }
    
    .summary-card {
        padding: 20px 15px;
        min-width: 220px;  /* Adjust min-width for smaller screens */
    }
    
    .summary-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .summary-content p {
        font-size: 24px;
    }
    
    .chart-container {
        height: 350px;
        padding: 18px;
    }
}

@media (max-width: 1200px) {
    .half-width {
        width: 100%;
        display: block;
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .filter-group {
        min-width: 180px;
    }
    
    .report-section {
        padding: 20px;
    }

    .report-summary-cards {
        flex-wrap: nowrap;  /* Keep horizontal, allow scroll */
    }

    body, html {
        overflow-x: hidden;  /* Prevent body horizontal scroll */
    }

    .main-content, .admin-container {
        overflow-x: hidden !important;  /* Force no horizontal overflow */
    }
}

@media (max-width: 992px) {
    .report-summary-cards {
        gap: 15px;
    }
    
    .filter-row {
        gap: 15px;
    }
    
    .filter-group {
        min-width: 160px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .section-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .chart-container {
        height: 320px;
        padding: 15px;
    }

    .summary-card {
        min-width: 200px;  /* Smaller cards for mid-size */
    }
}

@media (max-width: 768px) {
    .report-summary-cards {
        gap: 12px;
    }
    
    .filter-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .filter-group {
        min-width: 100%;
    }
    
    .date-inputs {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .date-inputs span {
        display: none;
    }
    
    .chart-container {
        height: 300px;
        padding: 12px;
        margin-bottom: 20px;
    }
    
    .summary-card {
        padding: 18px 15px;
        min-height: 90px;
        min-width: 180px;  /* Even smaller for mobile */
    }
    
    .summary-icon {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .summary-content p {
        font-size: 22px;
    }
    
    .summary-content h3 {
        font-size: 12px;
    }
    
    .report-section {
        padding: 18px;
        margin-bottom: 20px;
    }
    
    .section-header h2 {
        font-size: 20px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .main-content {
        padding: 15px;
    }
}

@media (max-width: 576px) {
    .report-summary-cards {
        gap: 12px;
    }
    
    .summary-card {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        padding: 20px 15px;
        min-width: 100%;  /* Full width on very small screens */
    }
    
    .summary-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .summary-content h3 {
        font-size: 11px;
        margin-bottom: 5px;
    }
    
    .summary-content p {
        font-size: 20px;
    }
    
    .chart-container {
        height: 280px;
        padding: 10px;
    }
    
    .report-section {
        padding: 15px;
    }
    
    .section-header h2 {
        font-size: 18px;
    }
    
    .report-table {
        font-size: 12px;
    }
    
    .report-table th,
    .report-table td {
        padding: 10px 12px;
    }
    
    .btn {
        padding: 8px 14px;
        font-size: 12px;
    }
    
    .export-btn {
        padding: 8px 12px;
    }
}

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

.fa-spin {
    animation: spin 1s linear infinite;
}

/* Custom scrollbar for tables */
.report-table-container {
    overflow-x: auto;
    margin: 10px 0;
    border-radius: 8px;
    width: 100%;
}

.report-table-container::-webkit-scrollbar {
    height: 6px;
}

.report-table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.report-table-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.report-table-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* No data states */
.report-table tbody tr td.text-center {
    color: #666;
    font-style: italic;
    padding: 40px 20px;
    text-align: center;
    font-size: 14px;
}

/* Chart title styles */
.chart-title {
    text-align: center;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    font-family: 'Poppins', sans-serif;
}

/* Button disabled states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

.btn:disabled::before {
    display: none;
}

/* Focus styles for accessibility */
.btn:focus,
.form-control:focus,
.export-btn:focus {
    outline: 3px solid rgba(76, 175, 80, 0.3);
    outline-offset: 2px;
}

/* Payment method specific styles */
.payment-method-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.payment-method-paypal {
    background: rgba(0, 48, 135, 0.1);
    color: #003087;
    border: 1px solid rgba(0, 48, 135, 0.2);
}

.payment-method-cash {
    background: rgba(76, 175, 80, 0.1);
    color: #2e7d32;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

/* Ensure no horizontal scrolling on body */
body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Grid layout for charts */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.charts-grid .chart-container {
    margin-bottom: 0;
    height: 350px;
}

/* Compact layout for better space utilization */
.compact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

@media (max-width: 1200px) {
    .compact-layout {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Improved table responsiveness */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 15px 0;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

/* Ensure all containers respect max-width */
.report-filters,
.report-summary-cards,
.report-section,
.chart-container,
.table-container {
    max-width: 100%;
    overflow-x: hidden;  /* Extra precaution against horizontal overflow */
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .summary-card:hover,
    .btn:hover,
    .chart-container:hover,
    .report-table tr:hover {
        transform: none;
    }
    
    .fa-spin {
        animation: none;
    }
    
    .report-loading::before {
        animation: none;
    }
    
    .summary-card:hover .summary-icon {
        transform: none;
    }
}




/* Full Page Modal */
.insight-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
.insight-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border-bottom: 1px solid #e9ecef;
}

.insight-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.close-modal {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Tabs */
.insight-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 0 2rem;
}

.insight-tab {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #6c757d;
    border-bottom: 3px solid transparent;
}

.insight-tab.active {
    color: #4CAF50;
    border-bottom-color: #4CAF50;
    background: white;
}

/* Content Area */
.insight-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Sections - Better spacing */
.insight-section {
    margin-bottom: 3rem;
}

.insight-section:last-child {
    margin-bottom: 0;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f8f9fa;
}

.section-title {
    margin: 0;
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 600;
}

.section-content {
    margin-bottom: 2rem;
}

.section-content:last-child {
    margin-bottom: 0;
}

/* Metric Cards - Better separation */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    border-left: 4px solid #4CAF50;
}

.metric-card.highlight {
    border-left-color: #4CAF50;
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.metric-title {
    margin: 0;
    color: #2c3e50;
    font-size: 1rem;
    font-weight: 600;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.metric-label {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0;
}

/* Customer Cards - Better separation */
.customers-grid {
    display: grid;
    gap: 1.5rem;
}

.customer-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    margin-bottom: 1rem;
}

.customer-card:last-child {
    margin-bottom: 0;
}

.customer-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f8f9fa;
}

.customer-main-info h4 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
}

.customer-email {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.customer-financial-stats {
    display: flex;
    gap: 1.5rem;
    text-align: right;
}

.financial-stat .stat-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: #4CAF50;
}

.financial-stat .stat-label {
    display: block;
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.customer-card-body {
    display: grid;
    gap: 1.5rem;
}

.customer-meta-info {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #6c757d;
    background: #f8f9fa;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
}

.meta-item i {
    color: #4CAF50;
    width: 16px;
}

.recent-orders-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.25rem;
}

.recent-orders-list {
    display: grid;
    gap: 0.75rem;
}

.recent-order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.order-info {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.order-date {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
}

.order-amount {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

.order-status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.order-status-badge.delivered,
.order-status-badge.completed {
    background: #d4edda;
    color: #155724;
}

.order-status-badge.pending,
.order-status-badge.processing {
    background: #fff3cd;
    color: #856404;
}

.order-status-badge.cancelled {
    background: #f8d7da;
    color: #721c24;
}

.more-orders-indicator {
    text-align: center;
    padding: 0.75rem;
    color: #6c757d;
    font-size: 0.85rem;
    font-style: italic;
    background: white;
    border-radius: 6px;
    border: 1px dashed #dee2e6;
}

/* Progress bars */
.progress-container {
    margin-bottom: 1rem;
}

.progress-container:last-child {
    margin-bottom: 0;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #495057;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    border-radius: 3px;
}

/* Action items */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.action-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    border-left: 4px solid #dc3545;
}

.action-card.priority-medium {
    border-left-color: #ffc107;
}

.action-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.75rem;
}

.action-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    background: #f8f9fa;
}

.action-item i {
    color: #4CAF50;
    margin-top: 0.1rem;
}

.action-item span {
    color: #495057;
    line-height: 1.4;
}

/* Orders list */
.orders-list {
    display: grid;
    gap: 1rem;
}

.order-item {
    background: white;
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e9ecef;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f8f9fa;
}

.order-header strong {
    color: #2c3e50;
    font-size: 0.95rem;
}

.order-amount {
    font-weight: 700;
    color: #4CAF50;
    font-size: 1rem;
}

.order-details {
    display: grid;
    gap: 0.75rem;
}

.customer-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6c757d;
    font-size: 0.9rem;
}

.customer-info i {
    color: #4CAF50;
    width: 16px;
}

.order-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.payment-method {
    background: #e8f5e8;
    color: #27ae60;
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: capitalize;
}

/* Scrollbar */
.insight-content::-webkit-scrollbar {
    width: 6px;
}

.insight-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}
