﻿/* ============================================
   FORM MODIFICA CACCE - CSS OTTIMIZZATO
   ============================================ */

/* 1. FORM PRINCIPALE */
.caccia-edit-form {
    background: #1e1e1e !important;
    border-radius: 8px;
    border: 1px solid #007acc !important;
    padding: 0;
    margin-bottom: 2rem;
    box-shadow: 0 0 20px rgba(0, 122, 204, 0.3) !important;
    color: #cccccc;
}

/* 2. HEADER FORM */
.caccia-edit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #007acc;
    background: #252526 !important;
    border-radius: 8px 8px 0 0;
}

    .caccia-edit-header h4 {
        margin: 0;
        color: #9cdcfe !important; /* Blu chiaro VS Code */
        font-weight: 600;
        font-size: 1.1rem;
        display: flex;
        align-items: center;
        gap: 0.75rem;
        font-family: 'Consolas', 'Monaco', monospace;
    }

        .caccia-edit-header h4 i {
            color: #569cd6 !important; /* Blu VS Code */
        }

/* Pulsante chiusura */
.btn-close-edit {
    background: #c42b1c !important; /* Rosso VS Code attivo */
    border: 2px solid #f14c4c !important;
    color: white !important;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.4);
    position: relative;
    z-index: 100;
}

    .btn-close-edit:hover {
        background: #f14c4c !important; /* Rosso più chiaro */
        border-color: #ff6b6b !important;
        color: white !important;
        transform: scale(1.1) rotate(90deg);
        box-shadow: 0 4px 12px rgba(244, 67, 54, 0.6);
    }


/* 3. SEZIONI FORM */
.form-section {
    background: #252526 !important;
    border-radius: 4px;
    margin: 1rem 1.5rem;
    border-left: 3px solid #569cd6; /* Blu VS Code */
    overflow: hidden;
    border: 1px solid #3e3e42;
}

    .form-section h5 {
        background: #2d2d30 !important;
        padding: 0.75rem 1.25rem !important;
        margin: 0;
        color: #9cdcfe !important; /* Blu chiaro VS Code */
        font-weight: 600;
        font-size: 0.95rem;
        border-bottom: 1px solid #3e3e42;
        display: flex;
        align-items: center;
        gap: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

        .form-section h5 i {
            color: #569cd6 !important; /* Blu VS Code */
        }

/* Contenuto sezione */
.form-section-inner {
    padding: 1rem;
}

/* 4. CONTROLLI FORM */
.form-group {
    margin-bottom: 0.75rem;
}

    .form-group:last-child {
        margin-bottom: 0;
    }

    .form-group label {
        display: block;
        margin-bottom: 0.5rem;
        font-weight: 500;
        color: #495057;
        font-size: 0.95rem;
    }

        .form-group label i {
            color: #6c757d;
            margin-right: 0.5rem;
            width: 16px;
        }


/* Input, textarea, select */
.form-control, .form-select,
.caccia-edit-form input,
.caccia-edit-form textarea,
.caccia-edit-form select {
    background: #1e1e1e !important;
    border: 1px solid #3e3e42 !important;
    color: #cccccc !important;
    border-radius: 3px;
    padding: 0.6rem 0.8rem !important;
    font-size: 0.95rem;
    width: 100%;
    transition: all 0.2s ease;
    font-family: 'Consolas', 'Monaco', monospace;
}

    .form-control:focus, .form-select:focus {
        border-color: #007acc !important;
        box-shadow: 0 0 0 1px rgba(0, 122, 204, 0.3) !important;
        outline: none;
    }

.form-group label {
    color: #9cdcfe !important; /* Blu chiaro VS Code */
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
    display: block;
}

    .form-group label i {
        color: #569cd6 !important; /* Blu VS Code */
    }



/* 5. SEZIONE FOTO 16:9 */
.foto-section {
    margin-bottom: 1rem;
}

.foto-preview-container {
    background-color: #1e1e1e !important;
    border: 2px dashed #3e3e42 !important;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.75rem;
    position: relative;
}

.foto-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.foto-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.5rem;
    display: flex;
    justify-content: center;
}

.foto-remove-btn {
    color: white;
    background: rgba(220, 53, 69, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .foto-remove-btn:hover {
        background: rgba(220, 53, 69, 1);
    }

.foto-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6c757d !important;
}

    .foto-placeholder i {
        font-size: 3rem;
        margin-bottom: 0.5rem;
        opacity: 0.5;
        color: #569cd6 !important; /* Blu VS Code */
    }

    .foto-placeholder span {
        font-size: 0.9rem;
    }

.foto-upload-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.foto-upload-label {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #0d6efd;
    font-weight: 500;
}

    .foto-upload-label:hover {
        color: #0b5ed7;
    }

.foto-hint {
    font-size: 0.85rem;
    color: #6c757d;
    font-style: italic;
}

/* 6. RIGHE DOPPIE (Comune/Località) */
.row-double-field {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.double-field {
    flex: 1;
    min-width: 0;
}

    .double-field label {
        display: block;
        margin-bottom: 0.5rem;
        font-weight: 500;
        color: #495057;
        font-size: 0.95rem;
    }

        .double-field label i {
            color: #6c757d;
            margin-right: 0.5rem;
            width: 16px;
        }

/* 6. DATE ORIZZONTALI */
.dates-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.date-group {
    flex: 1;
    min-width: 0;
}

/* 7. SEZIONE POSIZIONE COMPATTA */
.position-section-compact {
    margin: 1rem 1.5rem;
    padding: 0.75rem;
    background: #252526 !important;
    border-left: 3px solid #4ec9b0; /* Turchese VS Code */
    border-radius: 4px;
    border: 1px solid #3e3e42;
}

.position-compact-title {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

    .position-compact-title i {
        color: #9cdcfe !important; /* Blu chiaro VS Code */
    }

.position-compact-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.position-compact-coordinates {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    color: #495057;
    min-width: 200px;
}

.coordinate-text-compact {
    color: #ce9178 !important; /* Arancione VS Code per valori */
    background: rgba(206, 145, 120, 0.1);
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    padding: 0.3rem 0.6rem;
    border-radius: 3px;
}

.no-coordinates-compact {
    color: #6c757d;
    font-style: italic;
    font-size: 0.9rem;
}

.position-compact-separator {
    color: #adb5bd;
    font-size: 1.2rem;
    margin: 0 0.25rem;
}

/* Pulsante posizionamento */
.btn-position-compact {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: #0d6efd;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

    .btn-position-compact:hover {
        background: #007acc !important;
        border-color: #007acc !important;
        color: white !important;
    }

    .btn-position-compact.active {
        background: #198754;
    }

        .btn-position-compact.active:hover {
            background: #157347;
        }

    .btn-position-compact i {
        font-size: 0.8rem;
    }

.position-compact-hint {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #e7f1ff;
    border: 1px solid #b6d4fe;
    border-radius: 4px;
    color: #084298;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: fadeIn 0.3s ease;
}

    .position-compact-hint i {
        color: #0d6efd;
    }

/* 8. PULSANTI AZIONE */
.form-actions {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #252526 !important;
    border-top: 1px solid #3e3e42;
    margin: 0 1.5rem 1.5rem 1.5rem;
    border-radius: 0 0 8px 8px;
}

    .form-actions .btn {
        background: #2d2d30 !important;
        border: 1px solid #3e3e42 !important;
        color: #cccccc !important;
        padding: 0.6rem 1.2rem !important;
        font-family: 'Consolas', 'Monaco', monospace;
        font-size: 0.9rem;
    }

    .form-actions .btn-primary {
        background: #0e639c !important; /* Blu scuro VS Code */
        border-color: #007acc !important;
        color: white !important;
    }

    .form-actions .btn-outline-primary {
        color: #9cdcfe !important; /* Blu chiaro VS Code */
        border-color: #007acc !important;
    }

        .form-actions .btn-outline-primary:hover {
            background: #007acc !important;
            color: white !important;
        }

.btn-primary {
    background: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

    .btn-primary:hover {
        background: #0b5ed7;
        border-color: #0a58ca;
    }

.btn-outline-primary {
    background: transparent;
    color: #0d6efd;
    border-color: #0d6efd;
}

    .btn-outline-primary:hover {
        background: #0d6efd;
        color: white;
    }

.btn-outline-secondary {
    background: transparent;
    color: #6c757d;
    border-color: #6c757d;
}

    .btn-outline-secondary:hover {
        background: #6c757d;
        color: white;
    }



/* 9. ANIMAZIONI */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* 10. RESPONSIVE */
@media (max-width: 768px) {
    .caccia-edit-form {
        margin: 0 -1rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .form-section,
    .position-section-compact {
        margin: 1rem;
    }

    .row-double-field,
    .dates-row {
        flex-direction: column;
        gap: 0.75rem;
    }

    .position-compact-content {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .position-compact-coordinates {
        min-width: auto;
    }

    .foto-upload-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .form-actions {
        flex-direction: column;
        margin: 0 1rem 1rem 1rem;
        padding: 1.25rem;
    }

        .form-actions .btn {
            width: 100%;
        }
}

/* 11. UTILITY */
.caccia-edit-titolo {
    color: #0d6efd;
    font-size: 1.7rem;
    font-weight: 700;
    background: rgba(13, 110, 253, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    border: 1px solid rgba(13, 110, 253, 0.2);
}

/* Stato vuoto */
.empty-tesori-compact {
    text-align: center;
    padding: 2.5rem 1.5rem;
    color: #6c757d;
    background: white;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    margin: 1rem 0;
}

    .empty-tesori-compact i {
        font-size: 2.5rem;
        margin-bottom: 1rem;
        color: #adb5bd;
    }

    .empty-tesori-compact p {
        margin-bottom: 1.5rem;
        font-size: 1rem;
    }


/* ============================================
   FIX PER LABEL DELLA FORM CACCE
   ============================================ */

/* TUTTI I LABEL NELLA FORM CACCE */
.caccia-edit-form .form-group > label,
.caccia-edit-form .double-field > label,
.caccia-edit-form .date-group > label{
    color: #9cdcfe !important; /* Blu chiaro VS Code */
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    /* ICONE DENTRO I LABEL */
    .caccia-edit-form .form-group > label i,
    .caccia-edit-form .double-field > label i,
    .caccia-edit-form .date-group > label i{
        color: #569cd6 !important; /* Blu VS Code */
        font-size: 0.8rem;
        width: 16px;
        text-align: center;
    }

/* SEZIONE POSIZIONE CACCE (titolo + icona) */
.caccia-edit-form .position-compact-title {
    color: #9cdcfe !important; /* Blu chiaro VS Code */
    font-size: 0.9rem;
    font-weight: 600;
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

    .caccia-edit-form .position-compact-title i {
        color: #569cd6 !important; /* Blu VS Code */
        font-size: 0.9rem;
    }




/* Fine form caccia ottimizzato */





/* ============================================
   TESTATINA VS CODE DARK - FORM TESORO
   ============================================ */

/* RIMPIAZZA completamente l'attuale header della form */
.tesoro-expanded-form h6 {
    display: none !important; /* Nascondi il vecchio header */
}

/* Nuova barra testatina VS Code */
.tesoro-expanded-form-header {
    background: #007acc; /* Blu VS Code attivo */
    color: white;
    height: 50px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px 8px 0 0;
    position: relative;
    user-select: none;
}

/* Icona a sinistra */
.tesoro-expanded-form-header-icon {
    margin-right: 12px;
    font-size: 16px;
    opacity: 0.9;
}

/* Titolo centrale */
.tesoro-expanded-form-header-title {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Nome tesoro tra virgolette */
.tesoro-expanded-form-header-tesoro-nome {
    color: #ffcc00; /* Giallo VS Code per stringhe */
    font-size: 14px;
    font-weight: 500;
    font-style: italic;
}

/* Container pulsanti destro */
.tesoro-expanded-form-header-actions {
    display: flex;
    gap: 8px;
}

/* Pulsanti circolari */
.tesoro-header-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

    .tesoro-header-btn:hover {
        background: rgba(255, 255, 255, 0.25);
        transform: scale(1.05);
    }

/* Colori specifici per azioni */
.tesoro-header-btn-close:hover {
    background: rgba(255, 100, 100, 0.3);
}

.tesoro-header-btn-save:hover {
    background: rgba(100, 255, 100, 0.3);
}

.tesoro-header-btn-delete:hover {
    background: rgba(255, 50, 50, 0.4);
}

/* Separatore tra pulsanti */
.tesoro-expanded-form-header-separator {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 4px;
}











/* ============================================
   TESTATINA VS CODE DARK - VERSIONE SCURA
   ============================================ */

/* Nuova barra testatina VS Code DARK */
.tesoro-expanded-form-header {
    background: #252526; /* Sfondo VS Code dark sidebar */
    color: #cccccc;
    height: 50px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #1a365d;
    border-bottom: 1px solid #2d3748;
    position: relative; 
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px 8px 0 0;
    position: relative;
    user-select: none;
    border-bottom: 1px solid #007acc; /* Linea blu sottile sotto */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Icona a sinistra (blu VS Code) */
.tesoro-expanded-form-header-icon {
    margin-right: 12px;
    font-size: 16px;
    color: #569cd6; /* Blu VS Code per parole chiave */
}

/* Titolo centrale */
.tesoro-expanded-form-header-title {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

    /* Testo normale */
    .tesoro-expanded-form-header-title > span:first-child {
        color: #9cdcfe; /* Blu chiaro VS Code */
    }

/* Nome tesoro (arancione VS Code per stringhe) */
.tesoro-expanded-form-header-tesoro-nome {
    color: #ce9178; /* Arancione VS Code per stringhe */
    font-size:16px;
    font-weight: 500;
    font-style: normal;
    background: rgba(206, 145, 120, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    border-left: 2px solid #ce9178;
}

.tesoro-expanded-form-header-close {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: #a0aec0;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

    .tesoro-expanded-form-header-close:hover {
        color: white;
        background: rgba(255, 255, 255, 0.1);
    }

    .tesoro-expanded-form-header-close:active {
        transform: scale(0.95);
    }


/* Container pulsanti destro */
.tesoro-expanded-form-header-actions {
    display: flex;
    gap: 6px;
}

/* Pulsanti quadrati VS Code style */
.tesoro-header-btn {
    width: 28px;
    height: 28px;
    border-radius: 4px; /* VS Code usa angoli leggermente arrotondati */
    background: #2d2d30; /* Sfondo pulsanti VS Code */
    border: 1px solid #3e3e42;
    color: #cccccc;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
}

    .tesoro-header-btn:hover {
        background: #3e3e42;
        border-color: #569cd6;
        color: white;
    }

/* Colori specifici per azioni */
.tesoro-header-btn-close:hover {
    background: #c42b1c;
    border-color: #c42b1c;
    color: white;
}

.tesoro-header-btn-save:hover {
    background: #0e639c;
    border-color: #0e639c;
    color: white;
}

.tesoro-header-btn-delete:hover {
    background: #f14c4c;
    border-color: #f14c4c;
    color: white;
}

/* Separatore tra pulsanti */
.tesoro-expanded-form-header-separator {
    width: 1px;
    height: 20px;
    background: #3e3e42;
    margin: 0 8px;
}

/* Cambia anche lo sfondo della form a scuro */
.tesoro-expanded-form {
    background: #1e1e1e !important; /* VS Code main background */
    color: #cccccc !important;
    border: 1px solid #007acc !important;
    box-shadow: 0 0 20px rgba(0, 122, 204, 0.3) !important;
}






/* ============================================
   RIGA TIPO + TITOLO FORM TESORO - VS CODE DARK
   ============================================ */
.tesoro-form-header-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 15px; /* Ridotto */
    background: #252526;
    border-bottom: 1px solid #2d2d30;
    border-radius: 4px;
    margin-bottom: 0.75rem; /* Ridotto */
    height: 50px; /* Altezza fissa compatta */
}

.tesoro-form-field-group {
    display: flex;
    align-items: center;
    gap: 8px; /* Ridotto */
    height: 100%;
}

    /* Gruppo Tipo (25% larghezza) */
    .tesoro-form-field-group.tipo-group {
        flex: 0 0 25%;
    }

    /* Gruppo Titolo (75% larghezza) */
    .tesoro-form-field-group.titolo-group {
        flex: 1;
    }

/* Label senza icona, compatto */
.tesoro-form-label {
    color: #9cdcfe;
    font-size: 11px; /* Più piccolo */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    min-width: 45px; /* Ridotto */
    white-space: nowrap;
}

/* Select e Input compatti */
.tesoro-form-select,
.tesoro-form-input {
    background: #1e1e1e;
    border: 1px solid #3e3e42;
    color: #cccccc;
    padding: 5px 10px; /* Ridotto */
    border-radius: 3px;
    font-size: 12px; /* Più piccolo */
    font-family: 'Consolas', 'Monaco', monospace;
    height: 28px; /* Altezza fissa */
    flex: 1;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

    .tesoro-form-select:focus,
    .tesoro-form-input:focus {
        border-color: #007acc;
        box-shadow: 0 0 0 1px rgba(0, 122, 204, 0.3); /* Ridotto */
        outline: none;
    }





/* ============================================
   SEZIONE GENERICA - AREA ATTENZIONE AREA - ATTENZIONE - PARAMETRI 
   ============================================ */
.tesoro-sezione {
    background: #252526;
    border: 1px solid #3e3e42;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 0px;
}

/* HEADER SEZIONE - solo testo */
.tesoro-sezione-header {
    color: #4ec9b0; /* verde VS Code */
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 8px;
    margin-bottom: 12px;
    border-bottom: 1px solid #4ec9b0; /* Bordo verde */
}

/* CAMPO SINGOLO */
.tesoro-campo {
    margin-bottom: 12px;
}

    .tesoro-campo:last-child {
        margin-bottom: 0;
    }

/* LABEL */
.tesoro-label {
    color: #9cdcfe; /* Blu chiaro VS Code */
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

/* TEXTAREA */
.tesoro-textarea {
    background: #1e1e1e;
    border: 1px solid #3e3e42;
    color: white;
    padding: 8px;
    border-radius: 3px;
    font-size: 12px;
    font-family: 'Consolas', 'Monaco', monospace;
    width: 100%;
    resize: vertical;
    min-height: 60px;
    max-height: 120px;
    box-sizing: border-box;
}

    .tesoro-textarea:focus {
        border-color: #007acc;
        box-shadow: 0 0 0 1px rgba(0, 122, 204, 0.3);
        outline: none;
    }

/* RIGA POSIZIONE */
.tesoro-posizione-riga {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* COORDINATE */
.tesoro-coordinate {
    flex: 1;
    background: #1e1e1e;
    border: 1px solid #3e3e42;
    color: #ce9178; /* Arancione VS Code per valori */
    padding: 6px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-weight: 500;
}

/* PULSANTE MAPPA */
.tesoro-btn-mappa {
    background: #0e639c; /* Blu scuro VS Code */
    color: white;
    border: none;
    border-radius: 3px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

    .tesoro-btn-mappa:hover {
        background: #1177bb;
    }

/* RIGA RAGGIO */
.tesoro-raggio-riga {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* INPUT NUMERO */
.tesoro-input-numero {
    background: #1e1e1e;
    border: 1px solid #3e3e42;
    color: white;
    padding: 6px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-family: 'Consolas', 'Monaco', monospace;
    width: 80px;
    text-align: center;
}

    .tesoro-input-numero:focus {
        border-color: #007acc;
        box-shadow: 0 0 0 1px rgba(0, 122, 204, 0.3);
        outline: none;
    }

/* UNITA' DI MISURA */
.tesoro-unita {
    color: #9cdcfe;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}


.tesoro-raggio-riga {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tesoro-label.inline {
    display: inline;
    margin-bottom: 0;
    margin-right: 8px;
}

.tesoro-input-numero.inline {
    width: 70px;
    margin-right: 4px;
    color: white;
}

.tesoro-unita.inline {
    font-size: 11px;
}





/* RIGA PARAMETRO COMPATTA */
.tesoro-parametro-riga {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 0;
    border-bottom: 1px solid #3e3e42;
}

    .tesoro-parametro-riga:last-child {
        border-bottom: none;
    }

/* LABEL PARAMETRO */
.tesoro-parametro-label {
    color: #9cdcfe; /* Blu chiaro VS Code */
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex: 1;
    min-width: 180px;
}

/* CONTROLLO PARAMETRO */
.tesoro-parametro-controllo {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 150px;
    justify-content: flex-end;
}

    /* INPUT NUMERO PARAMETRO */
    .tesoro-parametro-controllo .tesoro-input-numero {
        width: 70px;
        text-align: center;
        padding: 4px 8px;
        font-size: 12px;
        color: white;
    }

/* UNITA' PARAMETRO */
.tesoro-parametro-unita {
    color: #ce9178; /* Arancione VS Code */
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    min-width: 60px;
}







/* ============================================
   MACRO-SEZIONI FORM CACCE
   ============================================ */

/* Classi base macro-sezioni */
.macro-section {
    margin-bottom: 1.5rem !important;
    border-left-width: 4px !important;
}

    .macro-section .form-section-inner {
        padding: 1.25rem !important;
    }

    /* Intestazioni potenziate */
    .macro-section h5 {
        font-size: 1.05rem !important;
        padding: 1rem 1.25rem !important;
        font-weight: 600;
        background: linear-gradient(to right, #252526 0%, #2d2d30 100%) !important;
    }

/* Colori semantici intestazioni */
.posizione-section h5 {
    color: #0d6d5e !important;
    border-left-color: #0d6d5e !important;
}

    .posizione-section h5 i {
        color: #0d6d5e !important;
    }

.identita-section h5 {
    color: #0e639c !important;
    border-left-color: #0e639c !important;
}

    .identita-section h5 i {
        color: #0e639c !important;
    }

.tempi-section h5 {
    color: #c5862c !important;
    border-left-color: #c5862c !important;
}

    .tempi-section h5 i {
        color: #c5862c !important;
    }

/* Hover sulle intestazioni */
.macro-section h5:hover {
    background: linear-gradient(to right, #2d2d30 0%, #3e3e42 100%) !important;
}

/* ============================================
   PULSANTI AZIONE UNIFICATI (Stile Tesori)
   ============================================ */

/* Contenitore unificato */
.form-actions-unified {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.25rem !important;
    background: #252526 !important;
    border-top: 1px solid #3e3e42 !important;
    margin: 0 1.5rem 1.5rem 1.5rem !important;
    border-radius: 0 0 8px 8px;
    justify-content: center;
}

/* Pulsanti base stile Tesori */
.btn-action {
    padding: 0.5rem 1.5rem !important;
    border-radius: 4px !important;
    font-size: 0.9rem !important;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid transparent;
    font-family: 'Consolas', 'Monaco', monospace;
}

/* Varianti colore */
.btn-action-primary {
    background: #0e639c !important;
    color: white !important;
    border-color: #007acc !important;
}

.btn-action-secondary {
    background: #2d2d30 !important;
    color: #cccccc !important;
    border-color: #3e3e42 !important;
}

/* Hover effects */
.btn-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-action-primary:hover {
    background: #1177bb !important;
}

.btn-action-secondary:hover {
    background: #3e3e42 !important;
    color: white !important;
}

/* ============================================
   MIGLIORAMENTI LAYOUT INTERNO
   ============================================ */

/* Foto section dentro identità */
.identita-section .foto-section {
    margin-top: 1rem;
    border: 1px solid #3e3e42;
    border-radius: 4px;
    padding: 1rem;
    background: #1e1e1e;
}

/* Dates row più spaziosa */
.tempi-section .dates-row {
    margin-bottom: 1.5rem;
}

/* Textarea premio più alta */
.tempi-section textarea.form-control {
    min-height: 100px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .macro-section {
        margin: 1rem !important;
    }

        .macro-section h5 {
            font-size: 1rem !important;
            padding: 0.875rem 1rem !important;
        }

    .form-actions-unified {
        flex-direction: column;
        margin: 0 1rem 1rem 1rem !important;
        padding: 1.25rem !important;
    }

    .btn-action {
        width: 100%;
        justify-content: center;
    }
}



/* ============================================
   INTESTAZIONI SEZIONI - COLORATE E PIÙ GRANDI
   ============================================ */

.macro-section h5 {
    font-size: 1.15rem !important; /* Più grande del 0.95rem originale */
    padding: 1rem 1.25rem !important;
    font-weight: 600;
    background: linear-gradient(to right, #0a2a2a 0%, #0d6d5e 100%) !important; /* Verde petrolio */
    color: white !important; /* Testo bianco su sfondo verde */
    border-left: 4px solid #4ec9b0 !important; /* Bordo sinistro turchese */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

    /* Icone bianche su sfondo verde */
    .macro-section h5 i {
        color: white !important;
        font-size: 1.1rem;
    }

/* Colori specifici per bordo inferiore e hover */
.posizione-section h5 {
    border-bottom: 2px solid #0d6d5e !important;
}

.identita-section h5 {
    border-bottom: 2px solid #0e639c !important;
}

.tempi-section h5 {
    border-bottom: 2px solid #c5862c !important;
}

/* Hover effect leggero */
.macro-section h5:hover {
    background: linear-gradient(to right, #0d6d5e 0%, #0e8c7a 100%) !important;
}

/* ============================================
   PULSANTI AZIONE - STILE TESORI
   ============================================ */

.form-actions-unified {
    display: flex;
    gap: 1rem;
    padding: 1.25rem !important;
    background: #252526 !important;
    border-top: 2px solid #3e3e42 !important;
    margin: 0 1.5rem 1.5rem 1.5rem !important;
    border-radius: 0 0 8px 8px;
    justify-content: center;
}

.btn-action {
    padding: 0.6rem 1.5rem !important;
    border-radius: 4px !important;
    font-size: 0.95rem !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid transparent;
    font-family: 'Consolas', 'Monaco', monospace;
    min-width: 120px;
    justify-content: center;
}

.btn-action-primary {
    background: #0e639c !important; /* Blu VS Code */
    color: white !important;
    border-color: #007acc !important;
}

.btn-action-secondary {
    background: #2d2d30 !important; /* Grigio scuro VS Code */
    color: #cccccc !important;
    border-color: #3e3e42 !important;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.btn-action-primary:hover {
    background: #1177bb !important;
    border-color: #0a8cff !important;
}

.btn-action-secondary:hover {
    background: #3e3e42 !important;
    color: white !important;
    border-color: #569cd6 !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .macro-section h5 {
        font-size: 1.05rem !important;
        padding: 0.875rem 1rem !important;
    }

    .form-actions-unified {
        flex-direction: column;
        margin: 0 1rem 1rem 1rem !important;
        padding: 1rem !important;
    }

    .btn-action {
        width: 100%;
        padding: 0.75rem 1rem !important;
    }
}