/* Stile ereditato dal sito esistente */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #1a202c;
    background-color: #ffffff;
    display: flex;
    min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 250px;
    background-color: #ffffff;
    border-right: 1px solid #eeeeee;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow: hidden;
}




/* Nascondere la barra di scorrimento */
.sidebar-nav-container::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav-container::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.sidebar-nav-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.sidebar-nav {
    margin-bottom: 1.5rem;
    padding: 0 1.2rem;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 0.4rem;
}

.nav-link {
    color: #64748b;
    text-decoration: none;
    padding: 0.6rem 0.8rem;
    display: block;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-link:hover {
    background-color: #ffffff;
    color: #64748b;
}

.nav-link.active {
    background-color: #ffffff;
    color: #64748b;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #ffffff;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    align-items: center;
}

.logout-btn {
    width: 80%;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    border: 2px solid #2563eb;
    background-color: #2563eb;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto;
    margin-right: auto;
}

.logout-btn:hover {
    background-color: #1e40af;
    border-color: #1e40af;
}

/* ===== CONTENUTO PRINCIPALE ===== */
.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 2rem;
    max-width: calc(100% - 250px);
}

/* Stile specifico per la pagina profilo */
.profile-container {
    max-width: 1200px;
    margin: 0 auto;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.profile-avatar {
    position: relative;
}

.profile-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
}

.edit-avatar-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #2563eb;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-info {
    flex: 1;
}

.profile-info h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.profile-info p {
    color: #64748b;
    margin-bottom: 1rem;
}

.profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background-color: #eff6ff;
    color: #2563eb;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.profile-actions button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.profile-section {
    background-color: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.profile-section h2 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.info-item label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #374151;
}

.info-item p {
    color: #6b7280;
}

.questionnaire-card, .test-card, .school-card, .conversation-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.questionnaire-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.questionnaire-header h3 {
    font-size: 1.1rem;
    color: #1e293b;
}

.score {
    background-color: #10b981;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
}

.questionnaire-details {
    margin-top: 1rem;
}

.detail {
    margin-bottom: 0.8rem;
}

.detail span {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.progress-bar {
    height: 8px;
    background-color: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #3b82f6;
    border-radius: 4px;
}

.test-type {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.3rem;
}

.test-date {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.test-score {
    font-weight: 600;
    color: #10b981;
    margin-bottom: 0.8rem;
}

.test-subject {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.school-notes {
    margin: 0.8rem 0;
    padding: 0.8rem;
    background-color: #f9fafb;
    border-radius: 6px;
}

.school-notes p {
    color: #6b7280;
    font-size: 0.9rem;
}

.school-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6b7280;
}

.icon-btn:hover {
    background-color: #f9fafb;
    color: #374151;
}

.conversation-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
}

.conversation-card:hover {
    background-color: #f9fafb;
}

.conversation-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.conversation-info h3 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
    color: #1e293b;
}

.conversation-info p {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.conversation-time {
    color: #9ca3af;
    font-size: 0.8rem;
}

.search-users {
    margin-bottom: 1.5rem;
}

.search-box {
    display: flex;
    margin-bottom: 1rem;
}

.search-box input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px 0 0 8px;
    font-size: 1rem;
}

.search-btn {
    padding: 0 1.2rem;
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Modale */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
    font-size: 1.5rem;
    color: #1e293b;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
}

.modal-body {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Bottoni */
.btn-primary {
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    font-size: 0.95rem;
    border: 2px solid #2563eb;
    background-color: #2563eb;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background-color: #1e40af;
    border-color: #1e40af;
}

.btn-secondary {
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    font-size: 0.95rem;
    border: 2px solid #e5e7eb;
    background-color: white;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background-color: #f9fafb;
}

/* Responsive */
@media (max-width: 968px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-tags {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .main-content {
        margin-left: 0;
        max-width: 100%;
        padding: 1rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
}
/* Stili per la cronologia test */
.empty-state, .error-state {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.empty-state i, .error-state i {
    margin-bottom: 1rem;
    color: #ccc;
}

.error-state i {
    color: #ff4757;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.questionnaire-card .view-details {
    margin-top: 1rem;
    width: 100%;
    text-align: center;
}

/* Miglioramenti visivi */
.questionnaire-card {
    transition: transform 0.2s ease;
}

.questionnaire-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.progress-bar {
    background: #e9ecef;
    border-radius: 10px;
    height: 8px;
    margin: 0.5rem 0;
}

.progress-fill {
    background: linear-gradient(90deg, #4e54c8, #8f94fb);
    border-radius: 10px;
    height: 100%;
    transition: width 0.3s ease;
}
/* Stili per la cronologia test */
.empty-state, .error-state {
    text-align: center;
    padding: 2rem;
    color: #666;
    background: #f8f9fa;
    border-radius: 10px;
    margin: 1rem 0;
}

.empty-state i, .error-state i {
    margin-bottom: 1rem;
    color: #ccc;
    display: block;
}

.error-state i {
    color: #ff4757;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.questionnaire-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 1rem 0;
    border: 1px solid #e9ecef;
}

.questionnaire-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 1rem;
}

.questionnaire-header h3 {
    margin: 0;
    flex: 1;
}

.score {
    background: #4e54c8;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.1rem;
}

.progress-bar {
    background: #e9ecef;
    border-radius: 10px;
    height: 8px;
    margin: 0.5rem 0;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, #4e54c8, #8f94fb);
    border-radius: 10px;
    height: 100%;
    transition: width 0.3s ease;
}

.view-details {
    margin-top: 1rem;
    width: 100%;
}

/* Miglioramenti visivi */
.questionnaire-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.questionnaire-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.detail {
    margin: 0.5rem 0;
}

.detail span {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
}