/* Reset base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ********** Stili generali del body ********** */
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: #f5f5f5;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-size: 14px;
}

/* ********** Toolbar superiore ********** */
.toolbar {
    background-color: #2c3e50;
    padding: 12px;
    display: flex;
    gap: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toolbar button {
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 10px;
}

.toolbar button:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
}


.toolbar .phpmyadmin-btn {
    background-color: #e74c3c;
    margin-left: auto;  /* Spinge il bottone verso destra */
}

.toolbar .phpmyadmin-btn:hover {
    background-color: #c0392b;
}
/* ********** Container principale ********** */
.container {
    flex: 1;
    display: flex;
    padding: 10px;
    gap: 10px;
    overflow: hidden;
    height: calc(100vh - 100px);
    /* Sottrai l'altezza della toolbar e del ticker */
}

/* ********** Pannelli ********** */
.panel {
    width: 200px;          /* Larghezza iniziale dei pannelli laterali */
    min-width: 100px;      /* Larghezza minima */
    max-width: 900px;      /* Larghezza massima */
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}


/* ********** Indici Panel ********** */
#indici.panel {
    width: 500px;
}

.indici-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.indice-info, .fornitore-info {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid #3498db;
}

.indice-info h3, .fornitore-info h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.indici-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.indici-table th, .indici-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.indici-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.indici-table tr:hover {
    background-color: #f5f5f5;
}

.message {
    padding: 20px;
    text-align: center;
    color: #666;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.indice-chart-container {
width: 100%;
    max-width: 800px;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#indiceChart {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.indice-values {
    margin-top: 20px;
}

.indice-values h4 {
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 16px;
}

.indici-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 14px;
}

.indici-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    padding: 10px;
    text-align: left;
    border-bottom: 2px solid #e0e0e0;
}

.indici-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e0e0e0;
}

.indici-table tr:hover {
    background-color: #f5f5f5;
}


/* Stili per i risultati del refresh degli indici */
.refresh-result {
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
}

.refresh-result.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.refresh-result.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.refresh-result h3 {
    margin-bottom: 15px;
}

.refresh-result ul {
    margin: 10px 0;
    padding-left: 20px;
}

.btn-formula {
    background-color: #9b59b6 !important;
}

.btn-formula:hover {
    background-color: #8e44ad !important;
}


/* ********** Stili per il pannello Help AI ********** */
#helpai.panel {
    width: 400px;
    position: relative;
    margin-left: auto; /* Sposta il pannello sul lato destro */
}

.helpai-welcome {
    text-align: center;
    padding: 20px;
    margin-bottom: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.helpai-welcome h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.helpai-interaction {
    margin-bottom: 0;
    position: sticky;
    bottom: 0;
    background-color: #fff;
    z-index: 2;
}

#helpai-query {
    width: 100%;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    resize: vertical;
    font-family: 'Segoe UI', Arial, sans-serif;
    margin-bottom: 10px;
}

.helpai-submit-btn {
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    float: right;
}

.helpai-submit-btn:hover {
    background-color: #2980b9;
}

.helpai-response {
    padding: 15px;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column-reverse; /* Inverte la direzione per far scorrere verso l'alto */
    gap: 12px;
}

.ai-message {
    background-color: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 3px solid #3498db;
    align-self: flex-start;
    max-width: 90%;
    margin-right: auto;
    margin-left: 5px;
    word-break: break-word;
}

.user-message {
    background-color: #e8f4fc;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 3px solid #2ecc71;
    text-align: right;
    align-self: flex-end;
    max-width: 90%;
    margin-left: auto;
    margin-right: 5px;
    word-break: break-word;
}

/* Layout per il contenitore principale di HelpAI */
#helpai-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    position: relative;
}

/* Stile per le informazioni sul provider */
.helpai-provider-info {
    padding: 8px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    z-index: 2;
    flex-shrink: 0;
}

/* Container per l'input fisso in basso */
.helpai-input-container {
    position: sticky;
    bottom: 0;
    background-color: #fff;
    padding: 12px;
    border-top: 1px solid #e0e0e0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Stile per textarea di input */
#helpai-query {
    width: 100%;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    resize: none;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 14px;
}

/* Stile per il bottone di invio */
.helpai-submit-btn {
    align-self: flex-end;
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.helpai-submit-btn:hover {
    background-color: #2980b9;
}

/* Stile per messaggio di caricamento */
.ai-message.loading {
    background-color: #f0f0f0;
    color: #666;
    font-style: italic;
}

/* Stile per messaggi di errore */
.ai-message.error {
    background-color: #fee;
    border-left: 3px solid #e74c3c;
    color: #e74c3c;
}



/* Larghezza personalizzata per il pannello progetti */
#projects.panel {
    width: 500px;
}

.main-panel {
    flex: 1;              /* Il pannello centrale (notes) occupa tutto lo spazio rimanente */
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

/* ********** Resizer ********** */
.resizer-right {
    width: 4px;
    height: 100%;
    background-color: transparent;
    position: absolute;
    right: 0;
    top: 0;
    cursor: e-resize;
    transition: background-color 0.2s;
}

.resizer-left {
    width: 4px;
    height: 100%;
    background-color: transparent;
    position: absolute;
    left: 0;
    top: 0;
    cursor: w-resize;
    transition: background-color 0.2s;
}

.resizer-right:hover,
.resizer-left:hover,
.resizer-right.active,
.resizer-left.active {
    background-color: #3498db;
}

/* ********** Header dei pannelli ********** */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #ecf0f1;
}

.panel-header h2 {
    font-size: 16px;
    color: #2c3e50;
    font-weight: 600;
}

.panel-header button {
    padding: 6px 12px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.panel-header .button-group {
    display: flex;
    gap: 8px;
}

/* ********** Controlli dei pannelli ********** */
.panel-controls {
    padding: 10px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #ecf0f1;
    display: flex;
    gap: 10px;
    align-items: center;
}

.panel-controls select,
.panel-controls input {
    padding: 6px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 12px;
    width: 100%;
}

/* ********** Contenuto principale ********** */
.panel-content {
    flex: 1;
    overflow: auto;
    padding: 10px;
    position: relative;
}

/* ********** Stili specifici per le note ********** */

#note-editor-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#note-editor {
    flex: 1;
    width: 100%;
    height: 100%;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    resize: none;
    font-size: 14px;
    margin-bottom: 10px;
    background-color: #ffffff;
}

#note-editor:focus {
    outline: none;
    border-color: #3498db;
}

.note-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 10px 0;
}

.version-badge {
    font-size: 12px;
    background-color: #3498db;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    font-weight: normal;
    vertical-align: middle;
}

.task-header-container {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background-color: #f8f9fa;
}

#note-date-input,
    #note-selector {
    flex: 0 0 auto;
    width: 120px;
}


#note-date,
#note-dates {
    width: 100%;
    padding: 8px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.task-header-buttons {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.task-header-buttons button {
    padding: 6px 12px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.task-header-buttons button:hover {
    background-color: #2980b9;
}

.task-header-buttons button:last-child {
    background-color: #e74c3c;
}

.task-header-buttons button:last-child:hover {
    background-color: #c0392b;
}


/* Stili specifici per i progetti */

.project-category-supplier {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
    margin: 5px 0;
}

.project-category, .project-supplier {
    background-color: #f8f9fa;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    color: #2c3e50;
    display: inline-block;
}
/* Stili per i select */

.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232c3e50' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
}

.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.project-item {
    padding: 15px;
    border-bottom: 1px solid #ecf0f1;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: white;
}

.project-item:hover {
    background-color: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.project-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
    line-height: 1.4;
    flex: 1;
    margin-right: 10px;
}

.project-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    color: white;
    background-color: #95a5a6;
}

.project-status.done {
    background-color: #2ecc71;
}

.project-status.running,
.project-status.to.start {
    background-color: #3498db;
}

.project-status.cancelled {
    background-color: #e74c3c;
}


.status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    color: white;
}

.status.planned {
    background-color: #f1c40f;
    color: #2c3e50;
}

.status.active {
    background-color: #3498db;
}

.status.ongoing {
    background-color: #2ecc71;
}

.status.completed {
    background-color: #95a5a6;
}

.project-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.project-info {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #666;
}

.project-leader {
    color: #34495e;
    font-weight: 500;
}

.project-dates {
    color: #7f8c8d;
}

.project-scope {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    margin-top: 5px;
}

/* Stili per il form del progetto */
.project-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.project-form .form-group {
    margin-bottom: 15px;
}

.project-form label {
    display: block;
    margin-bottom: 5px;
    color: #2c3e50;
    font-weight: 500;
}

.project-form input,
.project-form textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.project-form textarea {
    min-height: 100px;
    resize: vertical;
}

.project-form .form-row {
    display: flex;
    gap: 20px;
}

.project-form .form-row .form-group {
    flex: 1;
}

/* Stili per i bottoni del modal */
.modal-footer .btn-danger {
    background-color: #e74c3c;
    color: white;
}

.modal-footer .btn-danger:hover {
    background-color: #c0392b;
}

/* Stili per il form delle azioni */



/* Stili migliorati per la lista delle azioni */
.actions-list {
    margin-top: 15px;
}

.action-item {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-item:hover {
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.action-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.action-text {
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
    line-height: 1.4;
    flex: 1;
}

.action-badge {
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    background-color: #eee;
    border-radius: 12px;
    margin-left: 10px;
    color: #555;
}

.action-badge.task {
    background-color: #3498db;
    color: white;
}

.action-badge.project {
    background-color: #2ecc71;
    color: white;
}

.action-badge.idea {
    background-color: #9b59b6;
    color: white;
}

.action-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: #666;
    font-size: 13px;
}

.action-category,
.action-responsible {
    background-color: #f5f5f5;
    padding: 3px 8px;
    border-radius: 4px;
}

.action-date {
    font-weight: 500;
}

.action-status {
    padding: 3px 8px;
    border-radius: 4px;
    background-color: #eee;
}

.action-status.status-done {
    background-color: #2ecc71;
    color: white;
}

.action-status.status-running {
    background-color: #3498db;
    color: white;
}

.action-status.status-to-start {
    background-color: #f39c12;
    color: white;
}

.action-status.status-cancelled {
    background-color: #e74c3c;
    color: white;
}

/* Stile per il pulsante Nuova Azione */
.actions-toolbar .btn-primary {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.actions-toolbar .btn-primary:hover {
    background-color: #2980b9;
}


.action-form {
    padding: 15px;
}

.action-form .form-group {
    margin-bottom: 15px;
}

.action-form label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 500;
}

.action-form textarea,
.action-form select,
.action-form input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
}

.action-form textarea {
    min-height: 100px;
    resize: vertical;
}

.action-form .form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.action-form .form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* ********** Email items ********** */
.email-item {
    padding: 15px;
    border-bottom: 1px solid #ecf0f1;
    cursor: pointer;
}

.email-sender {
    font-weight: bold;
    margin-bottom: 5px;
}

.email-subject {
    color: #666;
    margin-bottom: 5px;
}

.email-date {
    font-size: 12px;
    color: #999;
}

/* ********** Task items ********** */
.task-item {
    padding: 15px;
    border-bottom: 1px solid #ecf0f1;
}

.task-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.task-date {
    font-size: 12px;
    color: #999;
}

/* ********** Calendar ********** */
#current-date {
    font-size: 14px;
    padding: 0 10px;
}

.event-item {
    padding: 15px;
    border-bottom: 1px solid #ecf0f1;
}

.event-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.event-date {
    font-size: 12px;
    color: #666;
}

/* ********** Ticker ********** */
.ticker {
    height: 40px;
    background-color: #2c3e50;
    color: white;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 0 15px;
    font-size: 14px;
}

.ticker-content {
    white-space: nowrap;
    animation: ticker 30s linear infinite;
}

@keyframes ticker {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}


/* ********** Modal Popup ********** */


.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    overflow: auto;
    padding: 20px;
}

#projectActionsModal.modal-overlay {
    z-index: 1001;  /* Un livello sopra il modal normale */
}

#actionFormModal.modal-overlay {
    z-index: 1002;  /* Highest z-index to ensure it's always on top */
}

.modal-content {
    display: flex;
    flex-direction: column;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin: auto;
    position: relative;
    z-index: 1;
}

.modal-header {
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 15px;
    min-height: 100px;
    max-height: calc(80vh - 150px);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid #eee;
    flex-shrink: 0;
    background-color: white;
}

.modal-footer button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    min-width: 100px;
}

/* Assicura che il corpo non faccia overflow */
#emailBody {
    overflow: auto;
    width: 100%;
    max-height: calc(70vh - 150px);
    border-radius: 6px;
    margin-top: 15px;
    background-color: #f9f9f9;
}

/* Migliora la responsività per dispositivi mobili */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 85vh;
    }
    
    .modal-body {
        max-height: calc(85vh - 170px);
    }
    
    .modal-footer button {
        min-width: 80px;
        padding: 8px 12px;
    }
}

/* ********** Stili per il contenuto dell'email ********** */
#emailSubject {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    word-break: break-word;
    line-height: 1.3;
}

#emailFrom, #emailDate {
    margin-bottom: 5px;
    font-size: 14px;
    color: #555;
    word-break: break-word;
}

/* Stile per il contenuto dell'email */
.email-content {
    line-height: 1.6 !important;
    white-space: normal !important;
    word-break: break-word !important;
    font-family: Arial, sans-serif !important;
    color: #333 !important;
    padding: 15px !important;
    overflow: visible !important;
}

/* Stile per le interruzioni di riga */
.email-content br {
    display: block !important;
    content: "" !important;
    margin-top: 0.5em !important;
}

/* Stile per i paragrafi */
.email-content p {
    margin-bottom: 1em !important;
}

/* Stile per i link nell'email */
.email-content a {
    color: #3498db !important;
    text-decoration: underline !important;
    word-break: break-all !important;
}

.email-content a:hover {
    color: #2980b9 !important;
}

/* ********** Animazione per il modal ********** */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content {
    animation: modalFadeIn 0.3s ease-out;
}

/* ********** Market items ********** */
.historical-data-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.chart-container {
    background: white;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.chart-type-selector {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    padding: 6px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: white;
    font-size: 14px;
    color: #333;
    cursor: pointer;
}

.chart-type-selector:hover {
    border-color: #3498db;
}

.chart-type-selector:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}


/* ********** Utility ********** */
.hidden {
    display: none !important;
}

/* ********** Scrollbar personalizzata ********** */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #95a5a6;
}

/* ********** Stati ********** */
.loading {
    padding: 20px;
    text-align: center;
    color: #666;
}

.error {
    padding: 20px;
    text-align: center;
    color: #e74c3c;
}

.ai-message.error {
    background-color: #fee;
    border-left: 3px solid #e74c3c;
}

/* ********** Hover effects ********** */
.panel-header button:hover,
.note-actions button:hover {
    opacity: 0.9;
}

.email-item:hover,
.task-item:hover {
    background-color: #f8f9fa;
}

/* Stili per il menu contestuale */
#custom-context-menu {
    position: fixed;
    background-color: white;
    border: 1px solid #ddd;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 4px;
    z-index: 1000;
    display: none;
    min-width: 200px;
}

.context-menu-item {
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s;
}

.context-menu-item:hover {
    background-color: #f0f0f0;
}

.context-menu-item .icon {
    font-size: 16px;
}

.actions-toolbar {
    margin-bottom: 20px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.actions-toolbar button {
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.actions-toolbar button:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
}