/* Custom Styles for Financial Dashboard */

:root {
    --primary-color: #3B82F6;
    --secondary-color: #10B981;
    --danger-color: #EF4444;
    --warning-color: #F59E0B;
    --dark-color: #1F2937;
    --light-color: #F9FAFB;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Card Animations */
.bg-white {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bg-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 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;
}

/* Chart Container */
canvas {
    max-height: 300px;
}

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

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .5;
    }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Table Styles */
table {
    border-collapse: separate;
    border-spacing: 0;
}

table th {
    font-weight: 600;
    color: var(--dark-color);
    background-color: var(--light-color);
    position: sticky;
    top: 0;
    z-index: 10;
}

table td {
    border-bottom: 1px solid #E5E7EB;
}

table tr:hover td {
    background-color: #F9FAFB;
}

/* Positive and Negative Values */
.text-positive {
    color: var(--secondary-color);
}

.text-negative {
    color: var(--danger-color);
}

/* Custom Button Styles */
button {
    transition: all 0.2s ease;
}

button:hover {
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

/* Alert Box Styles */
.alert-box {
    border-left-width: 4px;
    border-left-style: solid;
}

.alert-success {
    border-left-color: var(--secondary-color);
    background-color: #F0FDF4;
}

.alert-warning {
    border-left-color: var(--warning-color);
    background-color: #FFFBEB;
}

.alert-danger {
    border-left-color: var(--danger-color);
    background-color: #FEF2F2;
}

.alert-info {
    border-left-color: var(--primary-color);
    background-color: #EFF6FF;
}

/* Responsive Typography */
@media (max-width: 640px) {
    .text-3xl {
        font-size: 1.5rem;
        line-height: 2rem;
    }
    
    .text-2xl {
        font-size: 1.25rem;
        line-height: 1.75rem;
    }
}

/* Print Styles */
@media print {
    body {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
    
    .no-print {
        display: none !important;
    }
    
    .bg-white {
        break-inside: avoid;
    }
}

/* Dark mode support (if implemented later) */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #111827;
        color: #F9FAFB;
    }
    
    .bg-white {
        background-color: #1F2937;
        color: #F9FAFB;
    }
    
    .text-gray-800 {
        color: #F9FAFB;
    }
    
    .text-gray-600 {
        color: #D1D5DB;
    }
}

/* Smooth Transitions */
* {
    transition: color 0.2s ease, background-color 0.2s ease;
}

/* Custom Tooltip */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1F2937;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 50;
}

.tooltip:hover::after {
    opacity: 1;
}