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

.rotating {
    animation: rotate 1s linear infinite;
}

/* Stile generale */
body {
    font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    color: #333;
    overflow-x: hidden;
}

/* Layout con menu a sinistra */
.container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Contenuto principale */
.main-content {
    flex: 1;
    padding: 20px;
    background-color: white;
    margin-left: 250px; /* Allineato con la larghezza della sidebar */
    min-height: 100vh;
    transition: margin-left 0.3s ease;
    box-sizing: border-box;
}

/* Quando la sidebar è collassata */
.sidebar.collapsed + .main-content {
    margin-left: 70px;
}

/* Intestazioni generiche */
h1, h2, h3, h4, h5, h6 {
    color: #1a237e;
    margin-top: 0;
}

h1 {
    font-size: 24px;
    margin-bottom: 20px;
}

h2 {
    font-size: 20px;
    margin-bottom: 15px;
}

/* Card generiche */
.card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

/* Stile pulsanti generici */
button {
    background-color: #1a237e;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #303f9f;
}

button.secondary {
    background-color: #ffc107;
    color: #1a237e;
}

button.secondary:hover {
    background-color: #ffb300;
}

/* Icone e badge */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    color: white;
    background-color: #1a237e;
}

.badge.success {
    background-color: #4CAF50;
}

.badge.warning {
    background-color: #FFC107;
    color: #333;
}

.badge.danger {
    background-color: #F44336;
}

/* Form e input */
input, select, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 10px;
    box-sizing: border-box;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #1a237e;
    box-shadow: 0 0 0 2px rgba(26, 35, 126, 0.2);
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

/* Stile per il menu utente */
.user-menu {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.user-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
}

.user-icon img {
    width: 90%;
    height: 90%;
    border-radius: 50%;
}

.status-indicator {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background-color: #4CAF50;
    border-radius: 50%;
    border: 2px solid white;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 50px;
    right: 0;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    width: 200px;
    z-index: 1001;
}

.dropdown-menu.active {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.dropdown-menu p {
    padding: 10px 15px;
    margin: 0;
    font-weight: bold;
    border-bottom: 1px solid #eee;
}

.dropdown-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown-menu li {
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
}

.dropdown-menu li:hover {
    background-color: #f5f5f5;
}

.dropdown-menu li:last-child {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.dropdown-menu li i {
    margin-right: 10px;
    color: #1a237e;
}

/* Animazioni */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .main-content {
        margin-left: 70px;
        padding: 15px;
    }

    .card {
        padding: 15px;
    }

    h1 {
        font-size: 20px;
    }

    h2 {
        font-size: 18px;
    }

    .user-menu {
        top: 10px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 10px;
    }

    button {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* Scrollbar personalizzato */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #1a237e;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #303f9f;
}