/**
 * Dashboard Custom Styles
 * Enhanced styles for the comprehensive dashboard upgrade
 */

/* Notification Alerts */
.notification-alert {
    border-left: 4px solid;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    animation: slideInDown 0.3s ease-out;
}

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

/* Financial Health Card */
.health-card {
    border: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 10px;
}

.health-score {
    text-align: center;
}

.score-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    color: white;
    margin: 0 auto 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.score-label {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.health-metric {
    text-align: center;
    padding: 15px;
}

.metric-label {
    font-size: 12px;
    text-transform: uppercase;
    color: #6c757d;
    margin-bottom: 5px;
}

.metric-value {
    font-size: 24px;
    font-weight: bold;
}

/* Quick Actions Panel */
.quick-actions-panel {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.quick-actions-panel h5 {
    color: white;
    margin-bottom: 15px;
}

.btn-quick-action {
    background: rgba(255,255,255,0.95);
    border: none;
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-quick-action:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-quick-action i {
    font-size: 24px;
    color: #667eea;
}

.btn-quick-action span {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* Enhanced Goal Cards */
.enhanced-goal-card {
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.enhanced-goal-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.goal-progress-section {
    position: relative;
}

.progress {
    background-color: #e9ecef;
}

.milestone-marker {
    position: absolute;
    top: 0;
    width: 2px;
    height: 100%;
    background-color: rgba(0,0,0,0.2);
    z-index: 1;
}

.milestone-marker::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -3px;
    width: 8px;
    height: 8px;
    background: white;
    border: 2px solid rgba(0,0,0,0.3);
    border-radius: 50%;
}

.goal-stats {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
}

/* Recent Activity Feed */
.activity-feed {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
    transition: background 0.2s ease;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item:hover {
    background: #f8f9fa;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: white;
    flex-shrink: 0;
}

.activity-content {
    flex-grow: 1;
}

.activity-description {
    font-weight: 500;
    margin-bottom: 2px;
}

.activity-meta {
    font-size: 12px;
}

.activity-amount {
    font-weight: bold;
    font-size: 16px;
    flex-shrink: 0;
    margin-left: 10px;
}

/* Dashboard Stats Enhancements */
.stat-badge {
    margin-top: 10px;
    display: flex;
    justify-content: center;
}

.stat-badge .badge {
    font-size: 12px;
    padding: 6px 12px;
}

/* Budget List Enhancements */
.list-group-item {
    transition: all 0.3s ease;
}

.list-group-item:hover {
    background: #f8f9fa;
    transform: translateX(4px);
}

/* Loading States */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Skeleton Screens */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
    border-radius: 4px;
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: 12px;
    border-radius: 4px;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        margin-bottom: 15px;
    }
    
    .quick-actions-panel .row {
        gap: 10px;
    }
    
    .btn-quick-action {
        padding: 12px 15px;
    }
    
    .btn-quick-action i {
        font-size: 20px;
    }
    
    .btn-quick-action span {
        font-size: 12px;
    }
    
    .health-card .row {
        text-align: center;
    }
    
    .score-circle {
        width: 80px;
        height: 80px;
        font-size: 28px;
    }
    
    .metric-value {
        font-size: 20px;
    }
    
    .activity-amount {
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .quick-actions-panel {
        padding: 15px;
    }
    
    .notification-alert {
        font-size: 14px;
        padding: 10px 15px;
    }
    
    .page-header h1 {
        font-size: 24px;
    }
    
    .budget-selector {
        flex-direction: column;
    }
    
    .budget-selector .form-select {
        width: 100%;
    }
}

/* Smooth Transitions */
.card {
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Goal Navigation Enhancements */
.goals-navigation button {
    padding: 4px 8px;
    font-size: 12px;
}

.goals-navigation button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Modal Enhancements */
.modal-content {
    border: none;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.modal-header {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

/* Form Focus States */
.form-control:focus,
.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Button Enhancements */
.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn:active {
    transform: translateY(0);
}

/* Badge Enhancements */
.badge {
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
}

/* Alert Enhancements */
.alert {
    border-radius: 8px;
    border-left: 4px solid;
}

.alert-success {
    border-left-color: #28a745;
}

.alert-danger {
    border-left-color: #dc3545;
}

.alert-warning {
    border-left-color: #ffc107;
}

.alert-info {
    border-left-color: #17a2b8;
}

/* Progress Bar Enhancements */
.progress {
    border-radius: 10px;
    overflow: visible;
}

.progress-bar {
    border-radius: 10px;
    background: linear-gradient(90deg, currentColor, currentColor);
    transition: width 0.6s ease;
}

/* Empty State Styling */
.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-state-icon {
    font-size: 48px;
    color: #6c757d;
    margin-bottom: 20px;
}

.empty-state h4 {
    color: #343a40;
    margin-bottom: 10px;
}

.empty-state p {
    color: #6c757d;
    margin-bottom: 20px;
}

/* Card Header Enhancements */
.card-header {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    font-weight: 600;
}

/* Tooltip Styling */
.tooltip-inner {
    background-color: #333;
    border-radius: 4px;
    padding: 8px 12px;
}

.tooltip.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: #333;
}

.tooltip.bs-tooltip-bottom .tooltip-arrow::before {
    border-bottom-color: #333;
}

/* Accessibility Improvements */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .quick-actions-panel,
    .btn,
    .modal,
    .notification-alert {
        display: none;
    }
    
    .card {
        break-inside: avoid;
    }
}

/* Dark Mode Support (Future Enhancement) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles would go here */
}

/* Animation for goal milestones */
@keyframes celebrate {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.milestone-reached {
    animation: celebrate 0.5s ease-in-out;
}

/* Keyboard Shortcut Indicators */
.keyboard-shortcut {
    display: inline-block;
    padding: 2px 6px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    font-size: 11px;
    font-family: monospace;
    margin-left: 8px;
}
