/* Dashboard Animations and Effects */
@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-180deg) scale(0.3);
    }
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

/* Enhanced Card Animations */
.summary-card {
    animation: fadeInScale 0.8s ease-out;
}

.summary-card:nth-child(1) { animation-delay: 0.1s; }
.summary-card:nth-child(2) { animation-delay: 0.3s; }
.summary-card:nth-child(3) { animation-delay: 0.5s; }

/* Hover Effects */
.summary-card:hover .card-icon {
    animation: rotateIn 0.6s ease-out;
}

.summary-card:hover .card-amount {
    background-size: 200% 200%;
    animation: shimmer 2s infinite;
}

/* Table Row Animations */
.table tbody tr {
    animation: slideInFromRight 0.6s ease-out;
}

.table tbody tr:nth-child(1) { animation-delay: 0.1s; }
.table tbody tr:nth-child(2) { animation-delay: 0.2s; }
.table tbody tr:nth-child(3) { animation-delay: 0.3s; }
.table tbody tr:nth-child(4) { animation-delay: 0.4s; }

/* Sidebar Navigation Animations */
.nav-link {
    animation: slideInFromLeft 0.6s ease-out;
}

.nav-item:nth-child(1) .nav-link { animation-delay: 0.1s; }
.nav-item:nth-child(2) .nav-link { animation-delay: 0.2s; }
.nav-item:nth-child(3) .nav-link { animation-delay: 0.3s; }
.nav-item:nth-child(4) .nav-link { animation-delay: 0.4s; }
.nav-item:nth-child(5) .nav-link { animation-delay: 0.5s; }
.nav-item:nth-child(6) .nav-link { animation-delay: 0.6s; }
.nav-item:nth-child(7) .nav-link { animation-delay: 0.7s; }
.nav-item:nth-child(8) .nav-link { animation-delay: 0.8s; }
.nav-item:nth-child(9) .nav-link { animation-delay: 0.9s; }

/* Loading States */
.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}

/* Enhanced Button Effects */
.track-button {
    position: relative;
    overflow: hidden;
}

.track-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.track-button:hover::before {
    left: 100%;
}

/* Notification Badge Pulse */
.notification-badge {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Card Icon Bounce */
.card-icon {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Table Row Hover Effects */
.table tbody tr {
    position: relative;
    overflow: hidden;
}

.table tbody tr::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.3s ease;
}

.table tbody tr:hover::before {
    left: 100%;
}

/* Responsive Animations */
@media (max-width: 768px) {
    .summary-card {
        animation: slideInFromRight 0.6s ease-out;
    }
    
    .nav-link {
        animation: slideInFromLeft 0.6s ease-out;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .summary-card {
        background: rgba(30, 30, 30, 0.95);
        color: #ffffff;
    }
    
    .data-table-container {
        background: rgba(30, 30, 30, 0.95);
        color: #ffffff;
    }
    
    .table th {
        background: rgba(102, 126, 234, 0.2);
        color: #ffffff;
    }
    
    .table td {
        color: #ffffff;
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus States for Accessibility */
.nav-link:focus,
.track-button:focus,
.notification-bell:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .animated-bg,
    .particles,
    .top-navbar,
    .sidebar {
        display: none !important;
    }
    
    .main-content {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .summary-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}

/* Top Bar Styles */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
}

.user-name {
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--danger-color, #dc2626);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-normal);
    text-decoration: none;
}

.logout-btn:hover {
    background: var(--danger-hover, #b91c1c);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.logout-btn:active {
    transform: translateY(0);
}

.logout-btn i {
    font-size: 1rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .top-bar {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .top-bar-left,
    .top-bar-right {
        width: 100%;
        justify-content: center;
    }
    
    .user-menu {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .logout-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Sidebar Logout Section */
.logout-section {
    margin-top: auto;
    border-top: 1px solid var(--gray-200);
    padding-top: 1rem;
}

.logout-nav-link {
    background: var(--danger-color, #dc2626) !important;
    color: var(--white) !important;
    border: none !important;
    width: 100%;
    text-align: left;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
}

.logout-nav-link:hover {
    background: var(--danger-hover, #b91c1c) !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.logout-nav-link:active {
    transform: translateY(0);
}

.logout-nav-link i {
    margin-right: 0.5rem;
    font-size: 1rem;
} 