/* ════════════════════════════════════════════════════════════════════
   Enhanced Card System - Modern & Interactive
   ════════════════════════════════════════════════════════════════════ */

:root {
    --card-bg: #fff;
    --card-border-color: rgba(226, 232, 240, 0.8);
    --card-border-radius: 24px;
    --card-padding: 24px;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    --card-shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.12);
    --card-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Base Card */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border-color);
    border-radius: var(--card-border-radius);
    padding: var(--card-padding);
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--card-shadow-hover);
    border-color: rgba(37, 99, 235, 0.3);
}

.card:hover::before {
    opacity: 1;
}

/* Card Variants */
.card-primary {
    background: var(--card-gradient);
    color: white;
    border-color: transparent;
}

.card-primary::before {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.2) 0%, 
        rgba(255, 255, 255, 0) 100%);
}

.card-secondary {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

.card-glass {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.9) 0%, 
        rgba(255, 255, 255, 0.7) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.card-dark {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    border-color: rgba(255, 255, 255, 0.1);
}

.card-dark::before {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0) 100%);
}

/* Card Sizes */
.card-sm {
    --card-padding: 16px;
    --card-border-radius: 16px;
}

.card-lg {
    --card-padding: 32px;
    --card-border-radius: 32px;
}

.card-xl {
    --card-padding: 40px;
    --card-border-radius: 40px;
}

/* Interactive Cards */
.card-clickable {
    cursor: pointer;
    user-select: none;
}

.card-clickable:active {
    transform: translateY(-6px) scale(1.01);
}

/* Card with Icon */
.card-icon {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.card-icon .icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-gradient);
    color: white;
    flex-shrink: 0;
}

/* Card Stats */
.card-stat {
    text-align: center;
    padding: 20px;
}

.card-stat .stat-value {
    font-size: 2rem;
    font-weight: 800;
    font-family: 'Syne', sans-serif;
    margin-bottom: 8px;
    background: var(--card-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-stat .stat-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

/* Card Header */
.card-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--card-border-color);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    font-family: 'Syne', sans-serif;
    margin-bottom: 4px;
    color: #1e293b;
}

.card-subtitle {
    font-size: 0.875rem;
    color: #64748b;
}

/* Card Footer */
.card-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--card-border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* Loading Skeleton Card */
.card-skeleton {
    background: linear-gradient(90deg, 
        #f8fafc 25%, 
        #e2e8f0 50%, 
        #f8fafc 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-color: #e2e8f0;
}

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

/* Card List */
.card-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card-list .card {
    margin: 0;
}

/* Card Grid */
.card-grid {
    display: grid;
    gap: 24px;
}

.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Mobile Responsive */
@media (max-width: 768px) {
    :root {
        --card-padding: 20px;
        --card-border-radius: 20px;
    }
    
    .card {
        margin: 8px 0;
    }
    
    .card:hover {
        transform: translateY(-4px) scale(1.01);
    }
    
    .card-grid {
        gap: 16px;
        grid-template-columns: 1fr !important;
    }
    
    .card-stat .stat-value {
        font-size: 1.5rem;
    }
    
    .card-icon {
        gap: 12px;
    }
    
    .card-icon .icon-wrapper {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    :root {
        --card-padding: 16px;
        --card-border-radius: 16px;
    }
    
    .card-sm {
        --card-padding: 12px;
        --card-border-radius: 12px;
    }
    
    .card-lg {
        --card-padding: 20px;
        --card-border-radius: 20px;
    }
}
