/* Main Styles - Enhanced for Professional Sidebar Layout */
:root {
    --primary-color: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --secondary-color: #1e40af;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    --dark-color: #1f2937;
    --light-color: #f8fafc;
    --border-color: #e5e7eb;
    --text-muted: #6b7280;
}

body {
    background-color: var(--light-color);
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Legacy navbar - hidden when sidebar is active */
.navbar {
    display: none;
}

/* Enhanced main container */
.main-container {
    padding: 0;
    margin: 0;
}

/* Enhanced Cards with Blue Theme */
.card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    background: white;
}

.card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    border-bottom: none;
    font-weight: 600;
    padding: 1.25rem 1.5rem;
}

/* Upload Box */
.upload-box {
    background-color: white;
    border: 2px dashed #cfd8dc;
    border-radius: 10px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.upload-box:hover {
    border-color: var(--primary-color);
}

.upload-icon {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-container {
    position: relative;
}

/* Feature boxes */
.features-container {
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.feature-box {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    height: 100%;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.feature-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    background-color: rgba(57, 73, 171, 0.1);
    color: var(--primary-color);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

/* File info and action cards */
.file-info-card, .action-card {
    background-color: white;
    border-radius: 10px;
    padding: 1.5rem;
    height: 100%;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.data-preview {
    margin-top: 2rem;
}

/* Analysis progress */
.progress-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 1.5rem 0;
}

.progress {
    height: 10px;
    border-radius: 5px;
}

/* Dashboard specific */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.dashboard-stat-card {
    border-radius: 10px;
    padding: 1.5rem;
    height: 100%;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.dashboard-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    background-color: rgba(255, 255, 255, 0.2);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.5rem;
}

.stat-info h3 {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    opacity: 0.9;
}

.stat-info h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0;
}

/* Transaction table */
.transaction-table th, .transaction-table td {
    padding: 1rem;
    vertical-align: middle;
}

.transaction-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 0.75rem;
}

.transaction-type-credit {
    color: var(--success-color);
    font-weight: 500;
}

.transaction-type-debit {
    color: var(--danger-color);
    font-weight: 500;
}

.amount-credit {
    color: var(--success-color);
    font-weight: 600;
}

.amount-debit {
    color: var(--danger-color);
    font-weight: 600;
}

.category-badge {
    padding: 0.35rem 0.65rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Modal */
.transaction-detail-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.transaction-detail-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 1rem;
}

.transaction-detail-title h4 {
    margin-bottom: 0;
    font-weight: 600;
}

.transaction-detail-title p {
    margin-bottom: 0;
    font-size: 0.875rem;
    color: #6c757d;
}

.detail-group {
    margin-bottom: 1.5rem;
}

.detail-label {
    font-size: 0.8125rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.detail-value {
    font-weight: 500;
}

.compliance-alert {
    background-color: rgba(255, 179, 0, 0.1);
    border-left: 4px solid var(--warning-color);
    padding: 1rem;
    border-radius: 4px;
}

.compliance-alert .fa-exclamation-triangle {
    color: var(--warning-color);
}

/* Sorting Styles */
.sortable-header {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: background-color 0.2s ease;
}

.sortable-header:hover {
    background-color: rgba(57, 73, 171, 0.1);
}

.sort-icon {
    opacity: 0.5;
    margin-left: 5px;
    font-size: 0.8rem;
    transition: opacity 0.2s ease;
}

.sortable-header:hover .sort-icon {
    opacity: 1;
}

.sortable-header.sorted-asc .sort-icon::before {
    content: "\f0de"; /* fa-sort-up */
    color: var(--primary-color);
    opacity: 1;
}

.sortable-header.sorted-desc .sort-icon::before {
    content: "\f0dd"; /* fa-sort-down */
    color: var(--primary-color);
    opacity: 1;
}

.sorting-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sorting-controls .form-select {
    min-width: 120px;
}

/* Filter Controls Layout */
.filters {
    flex-wrap: wrap;
    gap: 1rem;
}

@media (max-width: 992px) {
    .filters {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .sorting-controls,
    .category-filter {
        width: 100%;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .dashboard-actions {
        margin-top: 1rem;
    }
    
    .stat-info h3 {
        font-size: 0.75rem;
    }
    
    .stat-info h2 {
        font-size: 1.5rem;
    }
}

/* Transaction Limit Modal Styling */
.transaction-limit-modal {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.transaction-limit-modal .swal2-html-container {
    font-size: 14px;
    line-height: 1.6;
}

.transaction-limit-modal .swal2-html-container ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.transaction-limit-modal .swal2-html-container li {
    margin-bottom: 0.3rem;
}

.transaction-limit-modal .swal2-html-container strong {
    color: var(--primary-color);
}

.transaction-limit-modal .swal2-icon.swal2-warning {
    border-color: var(--warning-color);
    color: var(--warning-color);
}