/* Custom CSS for Financial Reconciliation Tool */

/* Root variables for consistent theming */
:root {
    --bs-font-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --transition-speed: 0.3s;
    --border-radius-lg: 0.75rem;
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Layout improvements */
body {
    font-family: var(--bs-font-sans-serif);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
}

/* Card enhancements */
.card {
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-speed) ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0 !important;
    border-bottom: 1px solid var(--bs-border-color);
}

/* File upload areas */
.card.border-dashed {
    border-style: dashed !important;
    border-width: 2px !important;
    transition: all var(--transition-speed) ease;
}

.card.border-dashed:hover {
    border-color: var(--bs-primary) !important;
    background-color: rgba(var(--bs-primary-rgb), 0.05) !important;
}

.file-info {
    min-height: 2rem;
}

/* Navigation enhancements */
.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

.nav-link {
    transition: color var(--transition-speed) ease;
}

/* Button improvements */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all var(--transition-speed) ease;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

/* Table styling */
.table {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.table th {
    background-color: var(--bs-gray-100);
    border-top: none;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table-responsive {
    border-radius: var(--border-radius-lg);
}

/* Badge styling */
.badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
}

/* Progress indicators */
.progress {
    height: 0.5rem;
    border-radius: 0.25rem;
    background-color: var(--bs-gray-200);
}

.progress-bar {
    border-radius: 0.25rem;
    transition: width 0.6s ease;
}

/* Alert improvements */
.alert {
    border-radius: var(--border-radius-lg);
    border: none;
    box-shadow: var(--shadow-sm);
}

.alert-dismissible .btn-close {
    opacity: 0.7;
}

.alert-dismissible .btn-close:hover {
    opacity: 1;
}

/* Form styling */
.form-control,
.form-select {
    border-radius: 0.5rem;
    border: 1px solid var(--bs-border-color);
    transition: border-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
    border-color: var(--bs-primary);
}

.form-range {
    height: 0.5rem;
}

.form-range::-webkit-slider-thumb {
    height: 1.25rem;
    width: 1.25rem;
    border-radius: 50%;
    background: var(--bs-primary);
    border: none;
    box-shadow: var(--shadow-sm);
}

.form-range::-moz-range-thumb {
    height: 1.25rem;
    width: 1.25rem;
    border-radius: 50%;
    background: var(--bs-primary);
    border: none;
    box-shadow: var(--shadow-sm);
}

/* Tab styling */
.nav-tabs .nav-link {
    border-radius: 0.5rem 0.5rem 0 0;
    border: 1px solid transparent;
    margin-right: 0.25rem;
}

.nav-tabs .nav-link.active {
    border-color: var(--bs-border-color);
    border-bottom-color: transparent;
    background-color: var(--bs-body-bg);
}

/* Chart containers */
.chart-container {
    position: relative;
    height: 300px;
    margin: 1rem 0;
}

/* Loading states */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    color: white;
    font-size: 2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode specific adjustments */
[data-bs-theme="dark"] .table th {
    background-color: var(--bs-gray-800);
    color: var(--bs-light);
}

[data-bs-theme="dark"] .card.border-dashed:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.1) !important;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: var(--bs-gray-900);
    border-color: var(--bs-gray-700);
    color: var(--bs-light);
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-in-right {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    .alert,
    .card-footer {
        display: none !important;
    }
    
    .card {
        border: 1px solid #dee2e6 !important;
        box-shadow: none !important;
    }
    
    .table {
        font-size: 0.8rem;
    }
}
