/* Custom Styles for Financial Dashboard */

/* Tab Styles */
.tab-btn {
    border-bottom-color: transparent;
}

.tab-btn.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.tab-btn:not(.active):hover {
    background-color: #f9fafb;
}

/* KPI Card Animations */
.kpi-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Chart Container Styles */
.chart-container {
    position: relative;
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* Table Styles */
table {
    font-size: 14px;
}

tbody tr:hover {
    background-color: #f3f4f6;
}

tbody tr {
    transition: background-color 0.2s ease;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Loading Animation */
.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2563eb;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Filter Select Styles */
select[multiple] {
    min-height: 100px;
}

select[multiple] option:checked {
    background: linear-gradient(0deg, #2563eb 0%, #2563eb 100%);
    color: white;
}

/* Responsive Tables */
@media (max-width: 768px) {
    .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 0.5rem !important;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
    }
    
    .chart-container {
        page-break-inside: avoid;
    }
}

/* Number Formatting */
.currency {
    font-variant-numeric: tabular-nums;
}

/* Tooltip Styles */
.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    z-index: 1000;
    white-space: nowrap;
}

/* Alert Styles */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-warning {
    background-color: #fed7aa;
    color: #92400e;
    border: 1px solid #fb923c;
}

/* Animation for data updates */
.data-update {
    animation: highlight 1s ease;
}

@keyframes highlight {
    0% { background-color: #fef3c7; }
    100% { background-color: transparent; }
}