/* Modern Shared Components & Utilities */

/* Modern animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fadeInUp {
    animation: fadeInUp 0.6s ease-out;
}

.slideIn {
    animation: slideIn 0.4s ease-out;
}

.fadeIn {
    animation: fadeIn 0.3s ease-out;
}

/* Modern toggle switches */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: hsl(var(--muted));
    transition: all 0.3s ease;
    border-radius: 26px;
    border: 1px solid hsl(var(--border));
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 2px;
    background-color: hsl(var(--background));
    transition: all 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

input:checked + .toggle-slider {
    background-color: hsl(var(--primary));
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

/* Modern avatar styles */
.avatar-lg {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
    background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--primary) / 0.8) 100%);
    color: hsl(var(--primary-foreground));
    box-shadow: 0 8px 24px -4px hsl(var(--primary) / 0.4);
    transition: all 0.3s ease;
}

.avatar-lg:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 32px -4px hsl(var(--primary) / 0.5);
}

.stats-row {
    display: flex;
    justify-content: space-between;
    text-align: center;
    margin-top: 12px;
    gap: 8px;
}

.stat-item {
    flex: 1;
    padding: 12px 8px;
    border-radius: var(--radius);
    background-color: hsl(var(--muted) / 0.5);
    transition: all 0.2s ease;
}

.stat-item:hover {
    background-color: hsl(var(--muted));
    transform: translateY(-2px);
}

.stat-item h6 {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
    color: hsl(var(--foreground));
}

.stat-item small {
    font-size: 0.75rem;
    display: block;
    color: hsl(var(--muted-foreground));
}

/* Modern visual effects */
.glass-effect {
    background: hsl(var(--background) / 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
}

.shadow-soft {
    box-shadow: 0 20px 80px -20px hsl(var(--foreground) / 0.08);
}

.shadow-hover {
    transition: box-shadow 0.3s ease;
}

.shadow-hover:hover {
    box-shadow: 0 25px 50px -12px hsl(var(--foreground) / 0.25);
}

.gradient-text {
    background: linear-gradient(90deg, hsl(var(--primary)) 0%, hsl(var(--accent)) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 600;
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, hsl(var(--muted)) 0%, hsl(var(--muted) / 0.5) 50%, hsl(var(--muted)) 100%);
    background-size: 200px 100%;
    background-repeat: no-repeat;
    border-radius: var(--radius);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

/* Modern card components */
.card {
    margin-bottom: 28px;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 6px -1px hsl(var(--foreground) / 0.1), 
                0 2px 4px -1px hsl(var(--foreground) / 0.06);
    overflow: hidden;
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease-out;
    background-color: hsl(var(--card));
    position: relative;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px hsl(var(--foreground) / 0.1), 
                0 10px 10px -5px hsl(var(--foreground) / 0.04);
}

.card-header {
    background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--primary) / 0.9) 100%);
    color: hsl(var(--primary-foreground));
    font-weight: 600;
    padding: 20px 24px;
    border-bottom: none;
    display: flex;
    align-items: center;
    font-size: 1.1rem;
}

.card-header.variant-outline {
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    border-bottom: 1px solid hsl(var(--border));
}

.card-header i {
    margin-right: 12px;
    font-size: 1.2rem;
    opacity: 0.9;
}

.card-body {
    padding: 24px;
    color: hsl(var(--card-foreground));
}

.card-footer {
    padding: 16px 24px;
    background-color: hsl(var(--muted) / 0.3);
    border-top: 1px solid hsl(var(--border));
}

/* Utility classes */
.text-gradient {
    background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--accent)) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.border-gradient {
    position: relative;
    border: 1px solid transparent;
    background: linear-gradient(hsl(var(--background)), hsl(var(--background))) padding-box,
                linear-gradient(135deg, hsl(var(--primary)), hsl(var(--accent))) border-box;
}

.hover-lift {
    transition: transform 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
}
