/* Stili personalizzati per l'applicazione */

.navbar-brand {
    font-weight: bold;
}

.card {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: none;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn {
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.table {
    border-radius: 0.375rem;
    overflow: hidden;
}

.alert {
    border-radius: 0.375rem;
    animation: slideInDown 0.5s ease-out;
}

/* Animazioni */
@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Stili per la dashboard */
.dashboard-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid #007bff;
    animation: fadeInUp 0.6s ease-out;
}

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

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

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

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

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.dashboard-card:hover .stat-icon {
    opacity: 1;
    transform: scale(1.1);
}

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

/* Fix per i canvas dei grafici Chart.js */
#sociChart,
#tessereChart {
    max-height: 250px !important;
    height: 250px !important;
}

.card-body canvas {
    max-height: 250px !important;
    height: 250px !important;
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Stili per il form di login */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    animation: fadeInUp 0.8s ease-out;
}

/* Stili per le foto dei soci */
.socio-foto {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #dee2e6;
    transition: all 0.3s ease;
}

.socio-foto:hover {
    transform: scale(1.05);
    border-color: #007bff;
}

.socio-foto-small {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.socio-foto-small:hover {
    transform: scale(1.1);
}

/* Stili per le tessere */
.tessera-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin: 1rem 0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tessera-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.tessera-card:hover::before {
    left: 100%;
}

.tessera-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.tessera-numero {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Stili per i grafici */
.chart-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

/* Stili per le notifiche */
.notification-card {
    border-left: 4px solid #ffc107;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    animation: slideInDown 0.5s ease-out;
}

.notification-item {
    transition: all 0.3s ease;
}

.notification-item:hover {
    transform: translateX(5px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .socio-foto {
        width: 100px;
        height: 100px;
    }

    .tessera-card {
        padding: 1rem;
    }

    .tessera-numero {
        font-size: 1.2rem;
    }

    .chart-container {
        height: 250px;
    }

    .stat-icon {
        font-size: 2rem;
    }
}

/* Stili per il loading */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Miglioramenti per l'accessibilità */
.btn:focus,
.form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

/* Stili per i tooltip personalizzati */
.custom-tooltip {
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.875rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}