/* Dashboard Modern Styles with WOW Effect */

/* Animazioni */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Stats Cards Modernizzate */
.stat-card {
    background: linear-gradient(135deg, var(--card-gradient-start) 0%, var(--card-gradient-end) 100%);
    border-radius: 16px;
    padding: 1.5rem;
    color: white;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.18);
}

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

.stat-card.primary {
    --card-gradient-start: #667eea;
    --card-gradient-end: #764ba2;
}

.stat-card.success {
    --card-gradient-start: #56ab2f;
    --card-gradient-end: #a8e063;
}

.stat-card.info {
    --card-gradient-start: #2193b0;
    --card-gradient-end: #6dd5ed;
}

.stat-card.warning {
    --card-gradient-start: #f2994a;
    --card-gradient-end: #f2c94c;
}

.stat-card.danger {
    --card-gradient-start: #eb3349;
    --card-gradient-end: #f45c43;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
    font-weight: 500;
}

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.3;
}

.stat-change {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    margin-top: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    background: rgba(255,255,255,0.2);
}

/* Dashboard Cards */
.dashboard-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
    overflow: hidden;
}

.dashboard-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transform: translateY(-4px);
}

.dashboard-card .card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
    padding: 1rem;
}

.chart-container-sm {
    height: 200px;
}

/* Lista Items */
.list-item {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: background-color 0.2s ease;
    animation: slideInRight 0.4s ease-out;
    animation-fill-mode: both;
}

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

.list-item:hover {
    background-color: rgba(102, 126, 234, 0.03);
}

.list-item-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.list-item-content {
    flex: 1;
    min-width: 0;
}

.list-item-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.list-item-subtitle {
    font-size: 0.8rem;
    color: #7f8c8d;
}

.list-item-meta {
    font-size: 0.75rem;
    color: #95a5a6;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.quick-action-btn {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.quick-action-btn:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.15);
}

.quick-action-icon {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.quick-action-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #2c3e50;
}

/* Progress Ring */
.progress-ring {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.progress-ring-circle {
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

.progress-ring-text {
    position: absolute;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
}

/* Activity Timeline */
.activity-timeline {
    position: relative;
    padding-left: 2rem;
}

.activity-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.activity-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #667eea;
    border: 3px solid white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.activity-item::after {
    content: '';
    position: absolute;
    left: -1.69rem;
    top: 12px;
    width: 2px;
    height: calc(100% - 12px);
    background: #e9ecef;
}

.activity-item:last-child::after {
    display: none;
}

.activity-time {
    font-size: 0.75rem;
    color: #95a5a6;
    margin-bottom: 0.25rem;
}

.activity-content {
    font-size: 0.875rem;
    color: #2c3e50;
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

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

/* Responsive Grid */
@media (max-width: 768px) {
    .stat-value {
        font-size: 2rem;
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }

    .chart-container {
        height: 250px;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #95a5a6;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.empty-state-subtext {
    font-size: 0.875rem;
}

/* Badge Customizzati */
.badge-soft {
    padding: 0.35rem 0.75rem;
    font-weight: 600;
    border-radius: 20px;
}

.badge-soft-primary {
    background-color: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.badge-soft-success {
    background-color: rgba(86, 171, 47, 0.1);
    color: #56ab2f;
}

.badge-soft-warning {
    background-color: rgba(242, 153, 74, 0.1);
    color: #f2994a;
}

.badge-soft-danger {
    background-color: rgba(235, 51, 73, 0.1);
    color: #eb3349;
}

/* Stagger Animation Delays */
.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

.dashboard-card:nth-child(1) { animation-delay: 0.2s; }
.dashboard-card:nth-child(2) { animation-delay: 0.3s; }
.dashboard-card:nth-child(3) { animation-delay: 0.4s; }
.dashboard-card:nth-child(4) { animation-delay: 0.5s; }
.dashboard-card:nth-child(5) { animation-delay: 0.6s; }
.dashboard-card:nth-child(6) { animation-delay: 0.7s; }

.list-item:nth-child(1) { animation-delay: 0.1s; }
.list-item:nth-child(2) { animation-delay: 0.2s; }
.list-item:nth-child(3) { animation-delay: 0.3s; }
.list-item:nth-child(4) { animation-delay: 0.4s; }
.list-item:nth-child(5) { animation-delay: 0.5s; }
