﻿body {
}

/* ========================================
   PAGINE INDEX - Stili esistenti
   ======================================== */

/* Card container per pagine Index */
.index-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.index-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.index-card-title {
    color: #ffffff;
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Pulsante Nuovo elemento */
.btn-new-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    color: #ffffff;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    cursor: pointer;
}

.btn-new-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: #ffffff;
    text-decoration: none;
}

.btn-new-item:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.btn-new-item i {
    font-size: 1.1rem;
}

/* Variante per card con sfondo più tenue */
.index-card-soft {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.index-card-soft .index-card-title {
    color: #667eea;
    text-shadow: none;
}

/* ========================================
   PULSANTI AZIONI TABELLA INDEX
   ======================================== */

/* Contenitore pulsanti azioni */
.btn-group-table-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

/* Stile base per i pulsanti delle tabelle */
.btn-table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    color: #ffffff;
    margin:5px;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: visible;
}

.btn-table-action:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    color: #ffffff;
    text-decoration: none;
    z-index: 10;
}

.btn-table-action:active {
    transform: scale(1.05);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.btn-table-action i {
    font-size: 0.875rem;
    z-index: 1;
    transition: transform 0.3s ease;
}

.btn-table-action:hover i {
    transform: scale(1.1) rotate(-5deg);
}

/* Pulsante Details - Blu/Indaco */
.btn-table-details {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

.btn-table-details:hover {
    background: linear-gradient(135deg, #5558e3 0%, #4338ca 100%);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.5);
}

/* Pulsante Edit - Arancione/Ambra */
.btn-table-edit {
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
}

.btn-table-edit:hover {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    box-shadow: 0 6px 16px rgba(251, 146, 60, 0.5);
}

/* Pulsante Delete - Rosso */
.btn-table-delete {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.btn-table-delete:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.5);
}

/* Pulsante Success - Verde */
.btn-table-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.btn-table-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.5);
}

/* Varianti con icone e testo per tabelle più larghe */
.btn-table-action-text {
    width: auto;
    padding: 0.4rem 0.75rem;
    gap: 0.4rem;
}

.btn-table-action-text .btn-text {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Tooltip personalizzato per le azioni */
.btn-table-action[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
    animation: tooltipFadeIn 0.2s ease;
}

.btn-table-action[title]:hover::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    pointer-events: none;
    animation: tooltipFadeIn 0.2s ease;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Stile per tabelle con hover row */
.table-hover tbody tr:hover .btn-table-action {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

/* ========================================
   PAGINE CREATE - Toni verdi/acqua
   ======================================== */

/* Card container per pagine Create */
.create-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.08) 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 2px solid rgba(16, 185, 129, 0.2);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.1);
}

.create-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(16, 185, 129, 0.15);
}

.create-card-title {
    color: #059669;
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.create-card-title i {
    color: #10b981;
    font-size: 1.5rem;
}

/* Pulsante ritorno alla lista per Create */
.btn-back-to-list {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
    border: 2px solid #10b981;
    border-radius: 10px;
    padding: 0.6rem 1.25rem;
    color: #059669;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

.btn-back-to-list:hover {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    text-decoration: none;
}

.btn-back-to-list:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.2);
}

.btn-back-to-list i {
    font-size: 1rem;
}

/* Pulsante salvataggio per Create */
.btn-save-create {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    margin:5px;
    border-radius: 12px;
    padding: 0.85rem 2rem;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-save-create::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-save-create:hover::before {
    left: 100%;
}

.btn-save-create:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(16, 185, 129, 0.45);
    color: #ffffff;
}

.btn-save-create:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
}

.btn-save-create i {
    font-size: 1.2rem;
}

/* ========================================
   PAGINE EDIT - Toni ambra/arancio
   ======================================== */

/* Card container per pagine Edit */
.edit-card {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.08) 0%, rgba(249, 115, 22, 0.08) 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 2px solid rgba(251, 146, 60, 0.25);
    box-shadow: 0 8px 24px rgba(251, 146, 60, 0.12);
}

.edit-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(251, 146, 60, 0.2);
}

.edit-card-title {
    color: #ea580c;
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.edit-card-title i {
    color: #fb923c;
    font-size: 1.5rem;
}

/* Pulsante ritorno alla lista per Edit */
.btn-back-to-list-edit {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.1) 0%, rgba(249, 115, 22, 0.1) 100%);
    border: 2px solid #fb923c;
    border-radius: 10px;
    padding: 0.6rem 1.25rem;
    color: #ea580c;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(251, 146, 60, 0.18);
}

.btn-back-to-list-edit:hover {
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251, 146, 60, 0.35);
    text-decoration: none;
}

.btn-back-to-list-edit:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(251, 146, 60, 0.25);
}

.btn-back-to-list-edit i {
    font-size: 1rem;
}

/* Pulsante salvataggio per Edit */
.btn-save-edit {
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
    border: none;
    margin: 5px;
    border-radius: 12px;
    padding: 0.85rem 2rem;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(251, 146, 60, 0.4);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-save-edit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-save-edit:hover::before {
    left: 100%;
}

.btn-save-edit:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(251, 146, 60, 0.5);
    color: #ffffff;
}

.btn-save-edit:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(251, 146, 60, 0.4);
}

.btn-save-edit i {
    font-size: 1.2rem;
}

/* ========================================
   PAGINE DETAILS - Toni blu/indaco
   ======================================== */

/* Card container per pagine Details */
.details-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(79, 70, 229, 0.08) 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 2px solid rgba(99, 102, 241, 0.25);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.12);
}

.details-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(99, 102, 241, 0.2);
}

.details-card-title {
    color: #4f46e5;
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.details-card-title i {
    color: #6366f1;
    font-size: 1.5rem;
}

/* Pulsante ritorno alla lista per Details */
.btn-back-to-list-details {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(79, 70, 229, 0.1) 100%);
    border: 2px solid #6366f1;
    border-radius: 10px;
    padding: 0.6rem 1.25rem;
    color: #4f46e5;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.18);
}

.btn-back-to-list-details:hover {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
    text-decoration: none;
}

.btn-back-to-list-details:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.25);
}

.btn-back-to-list-details i {
    font-size: 1rem;
}

/* Pulsante ritorno alla lista per Details */
.btn-edit-details {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border: none;
    border-radius: 10px;
    padding: 0.6rem 1.25rem;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(139, 92, 246, 0.3);
}

.btn-edit-details:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 5px 18px rgba(139, 92, 246, 0.45);
    text-decoration: none;
}

.btn-edit-details:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.btn-edit-details i {
    font-size: 1rem;
}

/* Pulsante per azioni su Details (es. modifica) */
.btn-action-details {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.75rem;
    color: #ffffff;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 18px rgba(99, 102, 241, 0.35);
    cursor: pointer;
}

.btn-action-details:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 24px rgba(99, 102, 241, 0.45);
    color: #ffffff;
    text-decoration: none;
}

.btn-action-details:active {
    transform: translateY(0);
    box-shadow: 0 3px 14px rgba(99, 102, 241, 0.35);
}

.btn-action-details i {
    font-size: 1.1rem;
}

/* Pulsante per eliminazione su Details */
.btn-action-delete {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.75rem;
    color: #ffffff;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 18px rgba(239, 68, 68, 0.35);
    cursor: pointer;
}

.btn-action-delete:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 24px rgba(239, 68, 68, 0.45);
    color: #ffffff;
    text-decoration: none;
}

.btn-action-delete:active {
    transform: translateY(0);
    box-shadow: 0 3px 14px rgba(239, 68, 68, 0.35);
}

.btn-action-delete i {
    font-size: 1.1rem;
}

/* ========================================
   PAGINE DELETE CONFIRM - Toni rossi
   ======================================== */

/* Card container per conferma eliminazione */
.delete-confirm-card {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(220, 38, 38, 0.08) 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 2px solid rgba(239, 68, 68, 0.25);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.12);
}

.delete-confirm-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(239, 68, 68, 0.18);
}

.delete-confirm-card-title {
    color: #dc2626;
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.delete-confirm-card-title i {
    color: #ef4444;
    font-size: 1.5rem;
}

/* Pulsanti azione per conferma eliminazione */
.btn-cancel-delete {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
    border: 2px solid #ef4444;
    border-radius: 10px;
    padding: 0.6rem 1.25rem;
    color: #dc2626;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.18);
}

.btn-cancel-delete:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
    text-decoration: none;
}

.btn-cancel-delete:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.25);
}

.btn-cancel-delete i {
    font-size: 1rem;
}

.btn-confirm-delete {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none;
    border-radius: 12px;
    padding: 0.85rem 2rem;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-confirm-delete::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-confirm-delete:hover::before {
    left: 100%;
}

.btn-confirm-delete:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(239, 68, 68, 0.45);
    color: #ffffff;
}

.btn-confirm-delete:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.35);
}

.btn-confirm-delete i {
    font-size: 1.2rem;
}

/* ========================================
   STILI COMUNI PER FORM
   ======================================== */

/* Sezione actions dei form */
.form-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Label nei form con indicatori di pagina */
.form-label-create {
    color: #059669;
    font-weight: 600;
}

.form-label-edit {
    color: #ea580c;
    font-weight: 600;
}

.form-label-details {
    color: #4f46e5;
    font-weight: 600;
}

/* ========================================
   MASTER DETAIL CARDS - Palette Viola Elettrico & Grigio Pietra
   ======================================== */

/* Card principale - Viola elettrico leggero */
.master-detail-primary-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.04) 0%, rgba(124, 58, 237, 0.03) 100%);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.08);
    border: 2px solid rgba(139, 92, 246, 0.12);
    transition: all 0.3s ease;
}

.master-detail-primary-card:hover {
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.14);
    transform: translateY(-2px);
    border-color: rgba(139, 92, 246, 0.18);
}

.master-detail-primary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(139, 92, 246, 0.1);
}

.master-detail-primary-title {
    color: #7c3aed;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.master-detail-primary-title i {
    color: #8b5cf6;
    font-size: 1.4rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.12) 0%, rgba(124, 58, 237, 0.08) 100%);
    padding: 0.5rem;
    border-radius: 10px;
}

.master-detail-primary-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.master-detail-primary-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-master-primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border: none;
    border-radius: 10px;
    padding: 0.65rem 1.25rem;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.25);
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-master-primary:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.35);
    transform: translateY(-2px);
    color: #fff;
    text-decoration: none;
}

.btn-master-primary i {
    font-size: 0.95rem;
}

/* Card secondaria - Grigio pietra */
.master-detail-secondary-card {
    background: linear-gradient(135deg, rgba(120, 113, 108, 0.04) 0%, rgba(87, 83, 78, 0.03) 100%);
    border-radius: 18px;
    padding: 1.75rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 3px 12px rgba(120, 113, 108, 0.08);
    border: 1.5px solid rgba(120, 113, 108, 0.12);
    transition: all 0.3s ease;
}

.master-detail-secondary-card:hover {
    box-shadow: 0 6px 20px rgba(120, 113, 108, 0.14);
    transform: translateY(-2px);
    border-color: rgba(120, 113, 108, 0.18);
}

.master-detail-secondary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 1.5px solid rgba(120, 113, 108, 0.1);
}

.master-detail-secondary-title {
    color: #57534e;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.master-detail-secondary-title i {
    color: #78716c;
    font-size: 1.15rem;
    background: linear-gradient(135deg, rgba(120, 113, 108, 0.1) 0%, rgba(87, 83, 78, 0.08) 100%);
    padding: 0.45rem;
    border-radius: 9px;
}

.master-detail-secondary-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.master-detail-secondary-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.btn-master-secondary {
    background: linear-gradient(135deg, #78716c 0%, #57534e 100%);
    border: none;
    border-radius: 9px;
    padding: 0.55rem 1.1rem;
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: 0 2px 6px rgba(120, 113, 108, 0.22);
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
}

.btn-master-secondary:hover {
    background: linear-gradient(135deg, #57534e 0%, #44403c 100%);
    box-shadow: 0 4px 14px rgba(120, 113, 108, 0.32);
    transform: translateY(-2px);
    color: #fff;
    text-decoration: none;
}

.btn-master-secondary i {
    font-size: 0.9rem;
}

/* Card terziaria - Toni tenui chiari */
.master-detail-tertiary-card {
    background: linear-gradient(135deg, #fafaf9 0%, #f5f5f4 100%);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    border: 1px solid #e7e5e4;
    transition: all 0.3s ease;
}

.master-detail-tertiary-card:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    border-color: #d6d3d1;
}

.master-detail-tertiary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e7e5e4;
}

.master-detail-tertiary-title {
    color: #44403c;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.master-detail-tertiary-title i {
    color: #78716c;
    font-size: 1rem;
    background: #f5f5f4;
    padding: 0.4rem;
    border-radius: 8px;
}

.master-detail-tertiary-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.master-detail-tertiary-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-master-tertiary {
    background: #fafaf9;
    border: 1px solid #d6d3d1;
    border-radius: 8px;
    padding: 0.5rem 0.95rem;
    color: #44403c;
    font-weight: 600;
    font-size: 0.8rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
}

.btn-master-tertiary:hover {
    background: #f5f5f4;
    border-color: #a8a29e;
    color: #292524;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
    text-decoration: none;
}

.btn-master-tertiary i {
    font-size: 0.85rem;
}

/* Card evidenziata - Viola elettrico intenso */
.master-detail-highlighted-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(124, 58, 237, 0.06) 100%);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.15);
    border: 2px solid rgba(139, 92, 246, 0.25);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.master-detail-highlighted-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #8b5cf6 0%, #7c3aed 50%, #6d28d9 100%);
}

.master-detail-highlighted-card:hover {
    box-shadow: 0 10px 32px rgba(139, 92, 246, 0.22);
    transform: translateY(-3px);
    border-color: rgba(139, 92, 246, 0.35);
}

.master-detail-highlighted-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(139, 92, 246, 0.15);
}

.master-detail-highlighted-title {
    color: #6d28d9;
    font-size: 1.65rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.master-detail-highlighted-title i {
    color: #8b5cf6;
    font-size: 1.5rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.18) 0%, rgba(124, 58, 237, 0.12) 100%);
    padding: 0.55rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
}

.master-detail-highlighted-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.master-detail-highlighted-actions {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.btn-master-highlighted {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-master-highlighted::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-master-highlighted:hover::before {
    left: 100%;
}

.btn-master-highlighted:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.45);
    transform: translateY(-2px);
    color: #fff;
    text-decoration: none;
}

.btn-master-highlighted i {
    font-size: 1rem;
}

/* ========================================
   COMPONENTI PER I CONTENUTI DELLE CARD
   ======================================== */

/* Campo dati generico */
.master-detail-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.master-detail-field-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #78716c;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.master-detail-field-value {
    font-size: 1rem;
    font-weight: 500;
    color: #292524;
}

/* Variante per card primaria */
.master-detail-primary-card .master-detail-field-label {
    color: #a78bfa;
}

.master-detail-primary-card .master-detail-field-value {
    color: #7c3aed;
    font-weight: 600;
}

/* Variante per card secondaria */
.master-detail-secondary-card .master-detail-field-label {
    color: #a8a29e;
}

.master-detail-secondary-card .master-detail-field-value {
    color: #57534e;
}

/* Variante per card highlighted */
.master-detail-highlighted-card .master-detail-field-label {
    color: #8b5cf6;
}

.master-detail-highlighted-card .master-detail-field-value {
    color: #6d28d9;
    font-weight: 600;
}

/* Badge per stati */
.master-detail-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    width: fit-content;
}

.master-detail-badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.master-detail-badge-warning {
    background: rgba(251, 191, 36, 0.1);
    color: #d97706;
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.master-detail-badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.master-detail-badge-info {
    background: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.master-detail-badge-neutral {
    background: rgba(120, 113, 108, 0.1);
    color: #57534e;
    border: 1px solid rgba(120, 113, 108, 0.2);
}

/* Divider per separare sezioni */
.master-detail-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #e7e5e4, transparent);
    margin: 1.25rem 0;
}

/* Divider viola per card highlighted */
.master-detail-highlighted-card .master-detail-divider {
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.2), transparent);
}

/* ========================================
   SECTION HEADERS - Intestazioni sezioni
   ======================================== */

/* Section header generico - Toni neutri */
.section-header {
    background: linear-gradient(90deg, rgba(120, 113, 108, 0.06) 0%, rgba(245, 245, 244, 0.8) 100%);
    border-radius: 14px;
    padding: 24px 32px 18px 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(120, 113, 108, 0.15);
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.section-header:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border-color: rgba(120, 113, 108, 0.22);
}

.section-header-content {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.section-header-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #44403c;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.section-header-title i {
    color: #78716c;
    font-size: 1.15rem;
}

.section-header-desc {
    font-size: 0.95rem;
    color: #78716c;
    opacity: 0.9;
}

/* Section header per pagine Create - Toni verdi */
.section-header-create {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.08) 0%, rgba(240, 253, 250, 0.9) 100%);
    /*border: 1px solid rgba(16, 185, 129, 0.2);*/
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.08);
}

.section-header-create:hover {
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.3);
}

.section-header-create .section-header-title {
    color: #047857;
}

.section-header-create .section-header-title i {
    color: #10b981;
}

.section-header-create .section-header-desc {
    color: #059669;
}

/* Section header per pagine Edit - Toni ambra */
.section-header-edit {
    background: linear-gradient(90deg, rgba(251, 146, 60, 0.08) 0%, rgba(255, 251, 235, 0.9) 100%);
    /*border: 1px solid rgba(251, 146, 60, 0.22);*/
    box-shadow: 0 2px 10px rgba(251, 146, 60, 0.1);
}

.section-header-edit:hover {
    box-shadow: 0 4px 16px rgba(251, 146, 60, 0.16);
    border-color: rgba(251, 146, 60, 0.32);
}

.section-header-edit .section-header-title {
    color: #c2410c;
}

.section-header-edit .section-header-title i {
    color: #fb923c;
}

.section-header-edit .section-header-desc {
    color: #ea580c;
}

/* Section header evidenziato - Toni viola elettrico */
.section-header-highlighted {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.1) 0%, rgba(245, 243, 255, 0.95) 100%);
/*    border: 2px solid rgba(139, 92, 246, 0.25);*/
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.12);
    position: relative;
    overflow: hidden;
}

.section-header-highlighted::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #8b5cf6 0%, #7c3aed 100%);
}

.section-header-highlighted:hover {
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.18);
    border-color: rgba(139, 92, 246, 0.35);
    transform: translateY(-1px);
}

.section-header-highlighted .section-header-title {
    color: #6d28d9;
    font-weight: 700;
}

.section-header-highlighted .section-header-title i {
    color: #8b5cf6;
    background: rgba(139, 92, 246, 0.12);
    padding: 0.4rem;
    border-radius: 8px;
}

.section-header-highlighted .section-header-desc {
    color: #7c3aed;
    font-weight: 500;
}

/* Badge di evidenziazione per section header highlighted */
.section-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.7rem;
    border-radius: 16px;
    font-size: 0.7rem;
    font-weight: 600;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: #fff;
    margin-left: 0.75rem;
    box-shadow: 0 2px 6px rgba(139, 92, 246, 0.25);
}

.section-header-badge i {
    font-size: 0.65rem;
}

/* Responsive behavior */
@media (min-width: 576px) {
    .section-header-content {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }

    .section-header-desc {
        margin-left: 0.5rem;
        padding-left: 0.75rem;
        border-left: 2px solid currentColor;
        opacity: 0.7;
    }
}

@media (max-width: 575px) {
    .section-header {
        padding: 18px 20px 14px 20px;
    }

    .section-header-title {
        font-size: 1.1rem;
    }

    .section-header-desc {
        font-size: 0.85rem;
    }
}

/* ========================================
   CREATE FORM - Green Theme for Create Pages
   ======================================== */

/* Variables for green theme */
:root {
    --create-primary: #10b981;
    --create-primary-light: #34d399;
    --create-primary-dark: #059669;
    --create-secondary: #f0fdf4;
    --create-accent: #d1fae5;
    --create-soft-green: #ecfdf5;
    --create-border: #a7f3d0;
    --create-text: #064e3b;
    --create-text-light: #065f46;
}

/* Create Page Header - Matching Index Style */
.page-header-create {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(52, 211, 153, 0.05) 50%, rgba(16, 185, 129, 0.08) 100%);
    border-radius: 16px;
    padding: 2rem;
    margin: 0 2rem 2rem;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-left: 3px solid var(--create-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: box-shadow 0.2s ease;
}

    .page-header-create:hover {
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.12);
    }

/* Header Left Content */
.page-header-create-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.page-header-create-icon {
    background: rgba(16, 185, 129, 0.1);
    padding: 0.75rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .page-header-create-icon i {
        color: var(--create-primary);
        font-size: 1.8rem;
    }

.page-header-create-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.page-header-create h1 {
    color: var(--create-text);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.page-header-create p {
    color: var(--create-text-light);
    font-size: 0.95rem;
    margin: 0;
    font-weight: 500;
}

/* Header Actions (Back Button) */
.page-header-create-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.btn-create-back {
    background: #ffffff;
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 10px;
    padding: 0.65rem 1.25rem;
    color: var(--create-primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

    .btn-create-back:hover {
        background: var(--create-secondary);
        border-color: var(--create-primary);
        color: var(--create-primary-dark);
        text-decoration: none;
        transform: translateY(-1px);
    }

    .btn-create-back:active {
        transform: translateY(0);
    }

    .btn-create-back i {
        font-size: 1rem;
    }

/* Create Form Section - Matching Index Style */
.create-form-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    margin: 0 2rem 2rem;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-left: 3px solid var(--create-primary);
    transition: box-shadow 0.2s ease;
}

    .create-form-section:hover {
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.12);
    }

    /* Form Labels */
    .create-form-section label,
    .create-form-section .form-label {
        color: var(--create-text);
        font-weight: 600;
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

        .create-form-section label i,
        .create-form-section .form-label i {
            color: var(--create-primary);
            font-size: 0.9rem;
        }

        .create-form-section label .required,
        .create-form-section .form-label .required {
            color: #ef4444;
            font-size: 1.1rem;
            margin-left: 0.2rem;
        }

    /* Form Inputs */
    .create-form-section input,
    .create-form-section select,
    .create-form-section textarea,
    .create-form-section .form-control,
    .create-form-section .form-select {
        border: 1px solid rgba(16, 185, 129, 0.3);
        border-radius: 8px;
        padding: 0.65rem 1rem;
        font-size: 0.9rem;
        transition: all 0.2s ease;
        background: #fafafa;
        color: var(--create-text);
    }

        .create-form-section input:focus,
        .create-form-section select:focus,
        .create-form-section textarea:focus,
        .create-form-section .form-control:focus,
        .create-form-section .form-select:focus {
            border-color: var(--create-primary);
            outline: none;
            background: #ffffff;
        }

        .create-form-section input::placeholder,
        .create-form-section textarea::placeholder {
            color: #9ca3af;
            font-style: italic;
        }

    /* Validation Messages */
    .create-form-section .field-validation-error,
    .create-form-section .invalid-feedback {
        color: #ef4444;
        font-size: 0.85rem;
        margin-top: 0.4rem;
        display: flex;
        align-items: center;
        gap: 0.3rem;
    }

        .create-form-section .field-validation-error::before {
            content: '?';
            font-size: 0.95rem;
        }

    .create-form-section .input-validation-error,
    .create-form-section .is-invalid {
        border-color: #ef4444 !important;
        background-color: #fef2f2 !important;
    }

        .create-form-section .input-validation-error:focus,
        .create-form-section .is-invalid:focus {
            border-color: #ef4444 !important;
            outline: none !important;
        }

    /* Validation Summary */
    .create-form-section .validation-summary-errors,
    .create-form-section .validation-errors {
        background: #fef2f2;
        border: 1px solid #ef4444;
        border-left: 3px solid #ef4444;
        border-radius: 10px;
        padding: 1rem 1.25rem;
        margin-bottom: 1.5rem;
        color: #dc2626;
    }

        .create-form-section .validation-summary-errors ul,
        .create-form-section .validation-errors ul {
            margin: 0;
            padding-left: 1.5rem;
            list-style: none;
        }

        .create-form-section .validation-summary-errors li,
        .create-form-section .validation-errors li {
            padding: 0.3rem 0;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

            .create-form-section .validation-summary-errors li::before,
            .create-form-section .validation-errors li::before {
                content: '?';
                color: #ef4444;
                font-size: 1rem;
            }

/* Button Styles */
.btn-create-primary {
    background: var(--create-primary);
    border: none;
    border-radius: 10px;
    padding: 0.75rem 2rem;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    transition: all 0.2s ease;
    cursor: pointer;
    min-width: 160px;
}

    .btn-create-primary:hover {
        background: var(--create-primary-dark);
        transform: translateY(-1px);
        color: #ffffff;
    }

    .btn-create-primary:active {
        transform: translateY(0);
    }

    .btn-create-primary:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

    .btn-create-primary i {
        font-size: 1.1rem;
    }

.btn-create-secondary {
    background: #ffffff;
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 10px;
    padding: 0.65rem 1.75rem;
    color: var(--create-primary);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    transition: all 0.2s ease;
    cursor: pointer;
    min-width: 140px;
}

    .btn-create-secondary:hover {
        background: var(--create-secondary);
        border-color: var(--create-primary);
        color: var(--create-primary-dark);
        transform: translateY(-1px);
        text-decoration: none;
    }

    .btn-create-secondary:active {
        transform: translateY(0);
    }

    .btn-create-secondary i {
        font-size: 1rem;
    }

/* Form Actions Container */
.create-form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--create-secondary);
    border-radius: 12px;
    border: 1px solid rgba(16, 185, 129, 0.15);
}

/* Success/Error Messages */
.create-success-message {
    background: var(--create-soft-green);
    border: 1px solid var(--create-primary);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--create-text);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    .create-success-message i {
        color: var(--create-primary);
        font-size: 1.5rem;
    }

.create-error-message {
    background: #fef2f2;
    border: 1px solid #ef4444;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    color: #dc2626;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    .create-error-message i {
        color: #ef4444;
        font-size: 1.5rem;
    }

/* Info Box */
.create-info-box {
    background: var(--create-soft-green);
    border-left: 3px solid var(--create-primary);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--create-text-light);
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

    .create-info-box i {
        color: var(--create-primary);
        font-size: 1.2rem;
        flex-shrink: 0;
        margin-top: 0.1rem;
    }

/* Required Field Indicator */
.create-required-indicator {
    color: #6b7280;
    font-size: 0.85rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(16, 185, 129, 0.15);
    font-style: italic;
}

    .create-required-indicator::before {
        content: '* ';
        color: #ef4444;
        font-size: 1.1rem;
        margin-right: 0.3rem;
    }

/* Field Help Text */
.create-form-section .field-help,
.create-form-section .form-text {
    color: #6b7280;
    font-size: 0.85rem;
    margin-top: 0.4rem;
    font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .page-header-create {
        padding: 1.75rem;
        margin: 0 1.5rem 2rem;
    }

    .create-form-section {
        padding: 1.75rem;
        margin: 0 1.5rem 2rem;
    }
}

@media (max-width: 768px) {
    .page-header-create {
        padding: 1.5rem;
        margin: 0 1rem 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .page-header-create-content {
        width: 100%;
    }

    .page-header-create-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .page-header-create h1 {
        font-size: 1.3rem;
    }

    .page-header-create-icon i {
        font-size: 1.5rem;
    }

    .create-form-section {
        padding: 1.5rem;
        margin: 0 1rem 1.5rem;
    }

    .create-form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .btn-create-primary,
    .btn-create-secondary,
    .btn-create-back {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 576px) {
    .page-header-create {
        padding: 1.25rem;
        margin: 0 0.75rem 1.25rem;
        border-radius: 12px;
    }

        .page-header-create h1 {
            font-size: 1.2rem;
        }

        .page-header-create p {
            font-size: 0.875rem;
        }

    .page-header-create-icon {
        padding: 0.6rem;
    }

        .page-header-create-icon i {
            font-size: 1.3rem;
        }

    .create-form-section {
        padding: 1.25rem;
        margin: 0 0.75rem 1.25rem;
        border-radius: 12px;
    }

    .create-form-actions {
        padding: 1.25rem;
    }

    .btn-create-primary,
    .btn-create-secondary,
    .btn-create-back {
        padding: 0.65rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* ========================================
   DATA TABLE - Lightweight styling for Index pages
   ======================================== */

/* Main table container */
.datatable-container {
    background: #ffffff;
    border-radius: 12px;
    padding: 0;
    margin: 0 2rem 2rem;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-left: 3px solid #6366f1;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

    .datatable-container:hover {
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
    }

/* Table header */
.datatable-header {
    background: #6366f1;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

    .datatable-header h5 {
        color: #ffffff;
        font-size: 1.1rem;
        font-weight: 600;
        margin: 0;
        display: flex;
        align-items: center;
        gap: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

        .datatable-header h5 i {
            font-size: 1.2rem;
            background: rgba(255, 255, 255, 0.15);
            padding: 0.4rem;
            border-radius: 8px;
        }

    .datatable-header .badge {
        background: #ffffff;
        color: #6366f1;
        font-size: 0.9rem;
        font-weight: 600;
        padding: 0.5rem 1rem;
        border-radius: 16px;
    }

/* DataTables controls wrapper */
.datatable-container .dataTables_wrapper {
    padding: 1.5rem 2rem !important;
}

    /* Override DataTables default row layout */
    .datatable-container .dataTables_wrapper .row {
        margin: 0 !important;
    }

        .datatable-container .dataTables_wrapper .row > div {
            padding: 0 !important;
        }

/* Search and length controls - Force override */
.datatable-container .dataTables_filter,
.datatable-container .dataTables_length {
    margin-bottom: 1.25rem !important;
    float: none !important;
}

.datatable-container .dataTables_filter {
    text-align: left !important;
}

.datatable-container .dataTables_length {
    text-align: left !important;
}

.datatable-container .dataTables_filter label {
    color: #4f46e5 !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    margin: 0 !important;
}

/* Table styling */
.datatable-container table.dataTable {
    width: 100% !important;
    margin: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

    /* Table header */
    .datatable-container table.dataTable thead {
        background: #f8f9fc !important;
        border-bottom: 2px solid rgba(99, 102, 241, 0.15) !important;
    }

        .datatable-container table.dataTable thead th {
            background: transparent !important;
            color: #4f46e5 !important;
            font-weight: 700 !important;
            font-size: 0.85rem !important;
            padding: 1rem 1.25rem !important;
            border: none !important;
            border-bottom: none !important;
            text-transform: uppercase !important;
            letter-spacing: 0.5px !important;
            white-space: nowrap !important;
        }

            /* Remove sorting icons styling */
            .datatable-container table.dataTable thead th.sorting:before,
            .datatable-container table.dataTable thead th.sorting:after,
            .datatable-container table.dataTable thead th.sorting_asc:before,
            .datatable-container table.dataTable thead th.sorting_asc:after,
            .datatable-container table.dataTable thead th.sorting_desc:before,
            .datatable-container table.dataTable thead th.sorting_desc:after {
                display: none !important;
            }

    /* Table body */
    .datatable-container table.dataTable tbody tr {
        transition: background-color 0.15s ease !important;
        border-bottom: 1px solid rgba(99, 102, 241, 0.06) !important;
    }

        .datatable-container table.dataTable tbody tr:hover {
            background: rgba(99, 102, 241, 0.08) !important;
        }

    .datatable-container table.dataTable tbody td {
        padding: 1rem 1.25rem !important;
        color: #334155 !important;
        font-size: 0.9rem !important;
        vertical-align: middle !important;
        border: none !important;
        border-top: none !important;
        border-bottom: none !important;
    }

    /* Alternating row colors - Zebra striping */
    .datatable-container table.dataTable tbody tr:nth-child(odd) {
        background: #ffffff !important;
    }

    .datatable-container table.dataTable tbody tr:nth-child(even) {
        background: #f8f9fc !important;
    }

    .datatable-container table.dataTable tbody tr:nth-child(odd):hover {
        background: rgba(99, 102, 241, 0.08) !important;
    }

    .datatable-container table.dataTable tbody tr:nth-child(even):hover {
        background: rgba(99, 102, 241, 0.08) !important;
    }

    /* Override DataTables stripe class */
    .datatable-container table.dataTable.stripe tbody tr.odd,
    .datatable-container table.dataTable.display tbody tr.odd {
        background: #ffffff !important;
    }

    .datatable-container table.dataTable.stripe tbody tr.even,
    .datatable-container table.dataTable.display tbody tr.even {
        background: #f8f9fc !important;
    }

    .datatable-container table.dataTable.stripe tbody tr.odd:hover,
    .datatable-container table.dataTable.display tbody tr.odd:hover {
        background: rgba(99, 102, 241, 0.08) !important;
    }

    .datatable-container table.dataTable.stripe tbody tr.even:hover,
    .datatable-container table.dataTable.display tbody tr.even:hover {
        background: rgba(99, 102, 241, 0.08) !important;
    }

    /* Selected rows */
    .datatable-container table.dataTable tbody tr.selected {
        background: rgba(99, 102, 241, 0.15) !important;
    }

/* Action buttons in table */
.datatable-container .btn-sm {
    padding: 0.45rem 0.9rem !important;
    font-size: 0.85rem !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    margin: 0 0.2rem !important;
    border: none !important;
}

    .datatable-container .btn-sm:hover {
        transform: translateY(-1px) !important;
    }

.datatable-container .btn-primary {
    background: #6366f1 !important;
    color: #ffffff !important;
}

    .datatable-container .btn-primary:hover {
        background: #5558e3 !important;
    }

.datatable-container .btn-warning {
    background: #f59e0b !important;
    color: #ffffff !important;
}

    .datatable-container .btn-warning:hover {
        background: #d97706 !important;
    }

.datatable-container .btn-danger {
    background: #ef4444 !important;
    color: #ffffff !important;
}

    .datatable-container .btn-danger:hover {
        background: #dc2626 !important;
    }

.datatable-container .btn-success {
    background: #10b981 !important;
    color: #ffffff !important;
}

    .datatable-container .btn-success:hover {
        background: #059669 !important;
    }

.datatable-container .btn-info {
    background: #3b82f6 !important;
    color: #ffffff !important;
}

    .datatable-container .btn-info:hover {
        background: #2563eb !important;
    }

/* Badges in table */
.datatable-container .badge {
    padding: 0.4rem 0.85rem !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
}

    .datatable-container .badge.bg-success {
        background: #10b981 !important;
        color: #ffffff !important;
    }

    .datatable-container .badge.bg-warning {
        background: #f59e0b !important;
        color: #ffffff !important;
    }

    .datatable-container .badge.bg-danger {
        background: #ef4444 !important;
        color: #ffffff !important;
    }

    .datatable-container .badge.bg-info {
        background: #3b82f6 !important;
        color: #ffffff !important;
    }

    .datatable-container .badge.bg-secondary {
        background: #6b7280 !important;
        color: #ffffff !important;
    }

    .datatable-container .badge.bg-primary {
        background: #6366f1 !important;
        color: #ffffff !important;
    }

/* Pagination */
.datatable-container .dataTables_paginate {
    margin-top: 1.5rem !important;
    display: flex !important;
    justify-content: center !important;
    gap: 0.4rem !important;
    float: none !important;
    text-align: center !important;
}

    .datatable-container .dataTables_paginate .paginate_button {
        background: #ffffff !important;
        border: 1px solid rgba(99, 102, 241, 0.3) !important;
        border-radius: 8px !important;
        padding: 0.5rem 1rem !important;
        color: #6366f1 !important;
        font-weight: 600 !important;
        font-size: 0.9rem !important;
        transition: all 0.2s ease !important;
        cursor: pointer !important;
        margin: 0 0.15rem !important;
        box-shadow: none !important;
    }

        .datatable-container .dataTables_paginate .paginate_button:hover:not(.disabled) {
            background: #6366f1 !important;
            color: #ffffff !important;
            border-color: #6366f1 !important;
            box-shadow: none !important;
        }

        .datatable-container .dataTables_paginate .paginate_button.current {
            background: #6366f1 !important;
            color: #ffffff !important;
            border-color: #6366f1 !important;
            box-shadow: none !important;
        }

        .datatable-container .dataTables_paginate .paginate_button.disabled {
            opacity: 0.4 !important;
            cursor: not-allowed !important;
            background: #fafafa !important;
            box-shadow: none !important;
        }

/* Info text */
.datatable-container .dataTables_info {
    color: #64748b !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    padding: 1rem 0 !important;
    display: inline-block !important;
    float: none !important;
    margin: 0 !important;
}

    .datatable-container .dataTables_info::before {
        content: '?? ';
    }

/* Bottom info wrapper */
.datatable-container .dataTables_wrapper .row:last-child {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-top: 1rem !important;
}

    .datatable-container .dataTables_wrapper .row:last-child .col-sm-12.col-md-5 {
        display: flex !important;
        align-items: center !important;
    }

    .datatable-container .dataTables_wrapper .row:last-child .col-sm-12.col-md-7 {
        display: flex !important;
        justify-content: flex-end !important;
    }

/* Processing indicator */
.datatable-container .dataTables_processing {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    background: rgba(99, 102, 241, 0.95) !important;
    color: #ffffff !important;
    padding: 1.5rem 2.5rem !important;
    border-radius: 12px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3) !important;
    z-index: 9999 !important;
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    margin: 0 !important;
}

    .datatable-container .dataTables_processing::before {
        content: '';
        width: 20px;
        height: 20px;
        border: 2px solid rgba(255, 255, 255, 0.3);
        border-top-color: #ffffff;
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
    }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Empty state */
.datatable-container .dataTables_empty {
    text-align: center !important;
    padding: 3rem 2rem !important;
    color: #64748b !important;
    font-size: 1rem !important;
    font-style: italic !important;
}

    .datatable-container .dataTables_empty::before {
        content: '??';
        display: block;
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

/* Responsive adjustments */
@media (max-width: 992px) {
    .datatable-container {
        margin: 0 1.5rem 2rem;
    }

        .datatable-container .dataTables_wrapper {
            padding: 1.25rem 1.5rem !important;
        }

    .datatable-header {
        padding: 1rem 1.5rem;
    }

    .datatable-container .dataTables_filter input[type="search"] {
        min-width: 200px !important;
    }
}

@media (max-width: 768px) {
    .datatable-container {
        margin: 0 1rem 1.5rem;
        border-radius: 10px;
    }

        .datatable-container .dataTables_wrapper {
            padding: 1rem !important;
        }

    .datatable-header {
        padding: 1rem;
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

        .datatable-header h5 {
            font-size: 1rem;
        }

    .datatable-container .dataTables_filter label,
    .datatable-container .dataTables_length label {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    .datatable-container .dataTables_filter input[type="search"] {
        min-width: 100% !important;
        margin-left: 0 !important;
    }

    .datatable-container .dataTables_length select {
        margin: 0 !important;
    }

    .datatable-container table.dataTable thead th,
    .datatable-container table.dataTable tbody td {
        padding: 0.85rem 0.75rem !important;
        font-size: 0.85rem !important;
    }

    .datatable-container .dataTables_paginate {
        flex-wrap: wrap !important;
    }

        .datatable-container .dataTables_paginate .paginate_button {
            padding: 0.45rem 0.85rem !important;
            font-size: 0.85rem !important;
        }

    /* Make table scrollable on mobile */
    .datatable-container .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Stack info and pagination on mobile */
    .datatable-container .dataTables_wrapper .row:last-child {
        flex-direction: column !important;
        gap: 1rem !important;
    }

        .datatable-container .dataTables_wrapper .row:last-child .col-sm-12.col-md-5,
        .datatable-container .dataTables_wrapper .row:last-child .col-sm-12.col-md-7 {
            width: 100% !important;
            justify-content: center !important;
        }
}

@media (max-width: 576px) {
    .datatable-container {
        margin: 0 0.75rem 1.25rem;
        border-radius: 8px;
    }

        .datatable-container .dataTables_wrapper {
            padding: 0.75rem !important;
        }

    .datatable-header {
        padding: 0.875rem;
    }

        .datatable-header h5 {
            font-size: 0.95rem;
        }

    .datatable-container .btn-sm {
        padding: 0.35rem 0.7rem !important;
        font-size: 0.8rem !important;
        margin: 0.1rem !important;
    }

    .datatable-container .badge {
        padding: 0.35rem 0.7rem !important;
        font-size: 0.75rem !important;
    }
}

/* Custom scrollbar for table */
.datatable-container .table-responsive::-webkit-scrollbar {
    height: 6px;
}

.datatable-container .table-responsive::-webkit-scrollbar-track {
    background: rgba(99, 102, 241, 0.08);
    border-radius: 8px;
}

.datatable-container .table-responsive::-webkit-scrollbar-thumb {
    background: #6366f1;
    border-radius: 8px;
}

    .datatable-container .table-responsive::-webkit-scrollbar-thumb:hover {
        background: #5558e3;
    }

/* Highlight for specific columns (e.g., amounts, dates) */
.datatable-container .highlight-amount {
    font-weight: 700 !important;
    color: #6366f1 !important;
    font-size: 1rem !important;
}

.datatable-container .highlight-date {
    font-weight: 600 !important;
    color: #8b5cf6 !important;
}

/* Status indicators */
.status-paid {
    color: #10b981 !important;
    font-weight: 700 !important;
}

.status-pending {
    color: #f59e0b !important;
    font-weight: 700 !important;
}

.status-overdue {
    color: #ef4444 !important;
    font-weight: 700 !important;
}

/* Attachment icon styling */
.attachment-icon {
    color: #6366f1 !important;
    font-size: 1.1rem !important;
    transition: color 0.2s ease !important;
}

    .attachment-icon:hover {
        color: #8b5cf6 !important;
    }


/* ========================================
   FILTER SECTION - Sezione filtri per pagine Index con Accordion
   ======================================== */

/* Container principale della sezione filtri */
.filter-section {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.05) 50%, rgba(99, 102, 241, 0.08) 100%);
    background-size: 200% 200%;
    border-radius: 16px;
    margin: 0 2rem 2rem;
    max-width: calc(100% - 4rem);
    border: 2px solid rgba(99, 102, 241, 0.15);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.1), 0 2px 8px rgba(139, 92, 246, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .filter-section:hover {
        border-color: rgba(99, 102, 241, 0.25);
        box-shadow: 0 8px 25px rgba(99, 102, 241, 0.15), 0 4px 12px rgba(139, 92, 246, 0.08);
    }

/* Header della sezione filtri - Accordion Toggle */
.filter-section-header.filter-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-bottom: 2px solid rgba(99, 102, 241, 0.12);
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

    .filter-section-header.filter-accordion-header:hover {
        background: rgba(99, 102, 241, 0.05);
    }

    .filter-section-header.filter-accordion-header:active {
        background: rgba(99, 102, 241, 0.08);
    }

/* Header content wrapper */
.filter-header-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.filter-section-title {
    color: #4f46e5;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

    .filter-section-title i {
        color: #6366f1;
        font-size: 1.1rem;
        background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
        padding: 0.5rem;
        border-radius: 10px;
        box-shadow: 0 2px 6px rgba(99, 102, 241, 0.15);
    }

/* Toggle Button */
.filter-toggle-btn {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.08) 100%);
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    flex-shrink: 0;
}

    .filter-toggle-btn:hover {
        background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.12) 100%);
        border-color: rgba(99, 102, 241, 0.35);
        transform: scale(1.05);
    }

    .filter-toggle-btn:active {
        transform: scale(0.95);
    }

.filter-toggle-icon {
    color: #6366f1;
    font-size: 1rem;
    transition: transform 0.3s ease;
}

/* Ruota l'icona quando l'accordion è espanso */
.filter-accordion-header.expanded .filter-toggle-icon {
    transform: rotate(180deg);
}

/* Collapse container */
.filter-section-collapse {
    transition: all 0.3s ease;
}

    .filter-section-collapse.collapsing {
        overflow: hidden;
    }

/* Contenuto dei filtri */
.filter-section-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
    align-items: end;
    padding: 2rem;
}

/* Singolo campo filtro */
.filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

    .filter-field label {
        color: #4f46e5;
        font-size: 0.875rem;
        font-weight: 600;
        margin-bottom: 0.25rem;
        display: flex;
        align-items: center;
        gap: 0.4rem;
    }

        .filter-field label i {
            font-size: 0.8rem;
            color: #6366f1;
        }

    .filter-field input,
    .filter-field select,
    .filter-field .form-control,
    .filter-field .form-select {
        border: 2px solid rgba(99, 102, 241, 0.2);
        border-radius: 10px;
        padding: 0.65rem 1rem;
        font-size: 0.95rem;
        transition: all 0.3s ease;
        background: rgba(255, 255, 255, 0.95);
        color: #1e293b;
    }

        .filter-field input:focus,
        .filter-field select:focus,
        .filter-field .form-control:focus,
        .filter-field .form-select:focus {
            border-color: #6366f1;
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1), 0 4px 12px rgba(99, 102, 241, 0.15);
            outline: none;
            background: #ffffff;
        }

        .filter-field input::placeholder {
            color: #94a3b8;
            font-style: italic;
        }

/* Sezione azioni filtri */
.filter-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 0.5rem;
}

/* Pulsante applica filtri */
.btn-apply-filters {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.75rem;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3), 0 2px 4px rgba(139, 92, 246, 0.2);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

    .btn-apply-filters::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        transition: left 0.5s ease;
    }

    .btn-apply-filters:hover::before {
        left: 100%;
    }

    .btn-apply-filters:hover {
        background: linear-gradient(135deg, #5558e3 0%, #7c3aed 100%);
        transform: translateY(-2px);
        box-shadow: 0 6px 18px rgba(99, 102, 241, 0.4), 0 3px 8px rgba(139, 92, 246, 0.3);
        color: #ffffff;
    }

    .btn-apply-filters:active {
        transform: translateY(0);
        box-shadow: 0 3px 10px rgba(99, 102, 241, 0.3), 0 1px 4px rgba(139, 92, 246, 0.2);
    }

    .btn-apply-filters i {
        font-size: 1rem;
    }

/* Pulsante reset filtri */
.btn-reset-filters {
    background: rgba(99, 102, 241, 0.08);
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    padding: 0.65rem 1.5rem;
    color: #4f46e5;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.08);
    cursor: pointer;
    white-space: nowrap;
}

    .btn-reset-filters:hover {
        background: rgba(99, 102, 241, 0.15);
        border-color: rgba(99, 102, 241, 0.35);
        color: #4338ca;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
        text-decoration: none;
    }

    .btn-reset-filters:active {
        transform: translateY(0);
        box-shadow: 0 2px 6px rgba(99, 102, 241, 0.08);
    }

    .btn-reset-filters i {
        font-size: 0.95rem;
    }

/* Badge contatore filtri attivi */
.filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 0.6rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Sezione espandibile per filtri avanzati */
.filter-section-expandable {
    margin-top: 1.25rem;
    padding: 1.25rem 2rem;
    border-top: 2px solid rgba(99, 102, 241, 0.1);
}

.filter-expand-toggle {
    background: transparent;
    border: none;
    color: #6366f1;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
}

    .filter-expand-toggle:hover {
        color: #4f46e5;
        text-decoration: underline;
    }

    .filter-expand-toggle i {
        transition: transform 0.3s ease;
    }

    .filter-expand-toggle.expanded i {
        transform: rotate(180deg);
    }

.filter-advanced-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

    .filter-advanced-content.show {
        max-height: 500px;
        margin-top: 1rem;
    }

/* Variante compatta */
.filter-section-compact {
    margin: 0 2rem 1.5rem;
}

    .filter-section-compact .filter-section-header {
        padding: 1rem 1.5rem;
    }

    .filter-section-compact .filter-section-content {
        padding: 1.5rem;
        gap: 1rem;
    }

/* Variante evidenziata */
.filter-section-highlighted {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(124, 58, 237, 0.08) 50%, rgba(139, 92, 246, 0.1) 100%);
    border-color: rgba(139, 92, 246, 0.25);
}

    .filter-section-highlighted .filter-section-title {
        color: #7c3aed;
    }

        .filter-section-highlighted .filter-section-title i {
            color: #8b5cf6;
            background: linear-gradient(135deg, rgba(139, 92, 246, 0.18) 0%, rgba(124, 58, 237, 0.12) 100%);
        }

/* Responsive behavior */
@media (max-width: 992px) {
    .filter-section {
        margin: 0 1.5rem 2rem;
        max-width: calc(100% - 3rem);
    }

    .filter-section-header.filter-accordion-header {
        padding: 1.25rem 1.5rem;
    }

    .filter-section-content {
        padding: 1.5rem;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .filter-section {
        margin: 0 1rem 1.5rem;
        max-width: calc(100% - 2rem);
    }

    .filter-section-header.filter-accordion-header {
        padding: 1rem 1.25rem;
    }

    .filter-header-content {
        gap: 0.5rem;
    }

    .filter-section-title {
        font-size: 0.85rem;
    }

        .filter-section-title i {
            font-size: 1rem;
            padding: 0.4rem;
        }

    .filter-toggle-btn {
        width: 36px;
        height: 36px;
    }

    .filter-section-content {
        padding: 1.25rem;
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }

    .filter-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn-apply-filters,
    .btn-reset-filters {
        width: 100%;
        justify-content: center;
    }

    .filter-badge {
        min-width: 24px;
        height: 24px;
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    .filter-section {
        margin: 0 0.75rem 1.25rem;
        max-width: calc(100% - 1.5rem);
        border-radius: 12px;
    }

    .filter-section-header.filter-accordion-header {
        padding: 0.875rem 1rem;
    }

    .filter-section-title {
        font-size: 0.8rem;
    }

        .filter-section-title i {
            font-size: 0.95rem;
            padding: 0.35rem;
        }

    .filter-toggle-btn {
        width: 32px;
        height: 32px;
    }

    .filter-toggle-icon {
        font-size: 0.9rem;
    }

    .filter-section-content {
        padding: 1rem;
    }

    .filter-field label {
        font-size: 0.8rem;
    }

    .filter-field input,
    .filter-field select,
    .filter-field .form-control,
    .filter-field .form-select {
        padding: 0.55rem 0.85rem;
        font-size: 0.9rem;
    }

    .btn-apply-filters,
    .btn-reset-filters {
        padding: 0.65rem 1.25rem;
        font-size: 0.9rem;
    }

    .filter-section-expandable {
        padding: 1rem 1.25rem;
    }
}

/* ========================================
   NAVBAR THEME - Menu di navigazione
   Palette: Viola/Indaco con tocchi moderni
   ======================================== */

/* Navbar principale */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.25);
    border-bottom: 3px solid rgba(118, 75, 162, 0.4);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

    .navbar:hover {
        box-shadow: 0 6px 28px rgba(102, 126, 234, 0.35);
    }

/* Brand / Logo */
.navbar-brand {
    color: #ffffff !important;
    font-weight: 700;
    font-size: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .navbar-brand:hover {
        transform: scale(1.05);
        text-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    }

    .navbar-brand img {
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
        transition: all 0.3s ease;
    }

    .navbar-brand:hover img {
        transform: scale(1.1);
    }

/* Nav items - Link principali */
.navbar-nav .nav-item {
    margin: 0 0.25rem;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.6rem 1rem !important;
    border-radius: 10px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

    /* Effetto hover sui link */
    .navbar-nav .nav-link::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: rgba(255, 255, 255, 0.15);
        transition: left 0.4s ease;
        z-index: 0;
    }

    .navbar-nav .nav-link:hover::before {
        left: 0;
    }

    .navbar-nav .nav-link:hover {
        color: #ffffff !important;
        background: rgba(255, 255, 255, 0.2);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

    .navbar-nav .nav-link:active {
        transform: translateY(0);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    }

    /* Icone nei link */
    .navbar-nav .nav-link i {
        font-size: 1.1rem;
        margin-right: 0.35rem;
        transition: transform 0.3s ease;
        z-index: 1;
        position: relative;
    }

    .navbar-nav .nav-link:hover i {
        transform: scale(1.15) rotate(-5deg);
    }

    /* Link attivo */
    .navbar-nav .nav-link.active {
        background: rgba(255, 255, 255, 0.25);
        color: #ffffff !important;
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
    }

/* Dropdown toggle (freccia) */
.navbar-nav .dropdown-toggle::after {
    border: none;
    content: "\f107"; /* FontAwesome chevron-down */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-left: 0.4rem;
    font-size: 0.85rem;
    transition: transform 0.3s ease;
}

.navbar-nav .dropdown.show .dropdown-toggle::after {
    transform: rotate(180deg);
}

/* Dropdown menu */
.navbar-nav .dropdown-menu {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.98) 0%, rgba(118, 75, 162, 0.98) 100%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    padding: 0.75rem 0.5rem;
    margin-top: 0.5rem;
    backdrop-filter: blur(8px);
    animation: dropdownSlideIn 0.3s ease;
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dropdown header */
.navbar-nav .dropdown-header {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.5rem 1rem 0.35rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .navbar-nav .dropdown-header i {
        font-size: 0.9rem;
        color: rgba(255, 255, 255, 0.8);
    }

/* Dropdown items */
.navbar-nav .dropdown-item {
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    margin: 0.15rem 0.35rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 500;
}

    .navbar-nav .dropdown-item i {
        font-size: 1rem;
        width: 20px;
        text-align: center;
        transition: transform 0.3s ease;
    }

    .navbar-nav .dropdown-item:hover {
        background: rgba(255, 255, 255, 0.25);
        color: #ffffff !important;
        transform: translateX(5px);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }

        .navbar-nav .dropdown-item:hover i {
            transform: scale(1.2) rotate(-5deg);
        }

    .navbar-nav .dropdown-item:active {
        background: rgba(255, 255, 255, 0.3);
    }

/* Dropdown divider */
.navbar-nav .dropdown-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin: 0.5rem 0.75rem;
}

/* Toggler per mobile */
.navbar-toggler {
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
    transition: all 0.3s ease;
}

    .navbar-toggler:hover {
        border-color: rgba(255, 255, 255, 0.8);
        background: rgba(255, 255, 255, 0.15);
    }

    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.3);
    }

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Box shadow della navbar */
.navbar.shadow-sm,
.navbar.box-shadow {
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.25) !important;
}

/* Navbar responsive - Mobile */
@media (max-width: 991px) {
    .navbar-collapse {
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.98) 0%, rgba(118, 75, 162, 0.98) 100%);
        border-radius: 12px;
        padding: 1rem;
        margin-top: 1rem;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
        backdrop-filter: blur(8px);
    }

    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        margin: 0.25rem 0;
    }

    .navbar-nav .dropdown-menu {
        background: rgba(118, 75, 162, 0.8);
        border: 1px solid rgba(255, 255, 255, 0.15);
        margin-top: 0.25rem;
        margin-left: 1rem;
    }

    .navbar-nav .dropdown-item {
        padding: 0.5rem 0.75rem;
    }
}

/* Variante navbar light (se necessaria) */
.navbar-light .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
}

    .navbar-light .navbar-nav .nav-link:hover,
    .navbar-light .navbar-nav .nav-link:focus {
        color: #ffffff !important;
    }

    .navbar-light .navbar-nav .nav-link.active {
        color: #ffffff !important;
    }

/* Effetto scroll - navbar più compatta */
.navbar.scrolled {
    padding: 0.5rem 1rem;
    box-shadow: 0 2px 12px rgba(102, 126, 234, 0.3);
}

    .navbar.scrolled .navbar-brand {
        font-size: 1.3rem;
    }

/* Animation per l'apparizione della navbar */
@keyframes navbarFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navbar {
    animation: navbarFadeIn 0.5s ease;
}

/* Hover effect per tutta la navbar */
.navbar-nav {
    gap: 0.25rem;
}

    /* Partial Login - stili per la sezione utente */
    .navbar-nav .nav-item.user-menu .nav-link {
        background: rgba(255, 255, 255, 0.15);
        border-radius: 20px;
        padding: 0.5rem 1rem !important;
    }

        .navbar-nav .nav-item.user-menu .nav-link:hover {
            background: rgba(255, 255, 255, 0.3);
        }

    /* Badge nel menu (per notifiche) */
    .navbar-nav .badge {
        position: absolute;
        top: 0.25rem;
        right: 0.25rem;
        background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
        color: #ffffff;
        font-size: 0.65rem;
        padding: 0.25rem 0.4rem;
        border-radius: 10px;
        box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
    }

/* Responsive - Tablet */
@media (min-width: 768px) and (max-width: 991px) {
    .navbar-nav .nav-link {
        font-size: 0.95rem;
        padding: 0.5rem 0.8rem !important;
    }
}

/* Responsive - Large screens */
@media (min-width: 1200px) {
    .navbar-nav .nav-link {
        padding: 0.6rem 1.25rem !important;
    }

    .navbar {
        padding: 0.85rem 2rem;
    }
}

body {
}

/* ========================================
   PAGE HEADER TAG HELPER - Intestazioni pagine Index
   ======================================== */

/* Container principale del page header */
.page-header-index {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    background-size: 200% 200%;
    border-radius: 20px;
    padding: 2rem 3rem;
    margin: 0 2rem 2.5rem;
    max-width: calc(100% - 4rem);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.25), 0 4px 10px rgba(118, 75, 162, 0.15);
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

    .page-header-index::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
        animation: rotate 20s linear infinite;
    }

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.page-header-index:hover {
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.35), 0 6px 15px rgba(118, 75, 162, 0.25);
    transform: translateY(-3px);
    background-position: 100% 50%;
}

/* Titolo del page header */
.page-header-index h1 {
    color: #ffffff;
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2), 0 4px 20px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    gap: 1rem;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
    flex: 1;
}

    .page-header-index h1 i {
        font-size: 1.75rem;
        opacity: 0.95;
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    }

/* Pulsante Crea nuovo nel page header */
.page-header-btn-create {
    background: rgba(255, 255, 255, 0.98);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 14px;
    padding: 0.85rem 2rem;
    color: #667eea;
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15), 0 2px 5px rgba(255, 255, 255, 0.2) inset;
    cursor: pointer;
    position: relative;
    z-index: 1;
    overflow: hidden;
    letter-spacing: 0.3px;
    white-space: nowrap;
    flex-shrink: 0;
}

    .page-header-btn-create::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.15), transparent);
        transition: left 0.5s ease;
    }

    .page-header-btn-create:hover::before {
        left: 100%;
    }

    .page-header-btn-create:hover {
        background: #ffffff;
        border-color: rgba(255, 255, 255, 0.6);
        transform: translateY(-2px) scale(1.05);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2), 0 3px 8px rgba(255, 255, 255, 0.3) inset;
        color: #5a67d8;
        text-decoration: none;
    }

    .page-header-btn-create:active {
        transform: translateY(0) scale(1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 5px rgba(255, 255, 255, 0.2) inset;
    }

    .page-header-btn-create i {
        font-size: 1.15rem;
        transition: transform 0.3s ease;
    }

    .page-header-btn-create:hover i {
        transform: rotate(90deg);
    }

/* Variante con sfondo più tenue per page header */
.page-header-index-soft {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.12) 0%, rgba(118, 75, 162, 0.08) 50%, rgba(102, 126, 234, 0.12) 100%);
    background-size: 200% 200%;
    border-radius: 20px;
    padding: 2rem 3rem;
    margin: 0 2rem 2.5rem;
    max-width: calc(100% - 4rem);
    border: 2px solid rgba(102, 126, 234, 0.25);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15), 0 4px 10px rgba(118, 75, 162, 0.08);
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

    .page-header-index-soft::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(102, 126, 234, 0.05) 0%, transparent 70%);
        animation: rotate 20s linear infinite;
    }

    .page-header-index-soft:hover {
        box-shadow: 0 12px 35px rgba(102, 126, 234, 0.22), 0 6px 15px rgba(118, 75, 162, 0.12);
        transform: translateY(-3px);
        border-color: rgba(102, 126, 234, 0.35);
        background-position: 100% 50%;
    }

    .page-header-index-soft h1 {
        color: #667eea;
        font-size: 2rem;
        font-weight: 700;
        margin: 0;
        text-shadow: 0 2px 8px rgba(102, 126, 234, 0.15), 0 1px 3px rgba(118, 75, 162, 0.1);
        display: flex;
        align-items: center;
        gap: 1rem;
        letter-spacing: 0.5px;
        position: relative;
        z-index: 1;
        flex: 1;
    }

        .page-header-index-soft h1 i {
            font-size: 1.75rem;
            opacity: 0.95;
            filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.2));
        }

    .page-header-index-soft .page-header-btn-create {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: #ffffff;
        border: 2px solid transparent;
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3), 0 2px 5px rgba(255, 255, 255, 0.1) inset;
    }

        .page-header-index-soft .page-header-btn-create::before {
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        }

        .page-header-index-soft .page-header-btn-create:hover {
            background: linear-gradient(135deg, #5a67d8 0%, #6b3f99 100%);
            color: #ffffff;
            transform: translateY(-2px) scale(1.05);
            box-shadow: 0 8px 28px rgba(102, 126, 234, 0.4), 0 3px 8px rgba(255, 255, 255, 0.15) inset;
        }

        .page-header-index-soft .page-header-btn-create:active {
            transform: translateY(0) scale(1);
            box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3), 0 2px 5px rgba(255, 255, 255, 0.1) inset;
        }

/* Responsive behavior */
@media (max-width: 992px) {
    .page-header-index,
    .page-header-index-soft {
        padding: 1.75rem 2rem;
        margin: 0 1.5rem 2rem;
        max-width: calc(100% - 3rem);
        gap: 1.5rem;
    }

        .page-header-index h1,
        .page-header-index-soft h1 {
            font-size: 1.75rem;
        }

            .page-header-index h1 i,
            .page-header-index-soft h1 i {
                font-size: 1.5rem;
            }

    .page-header-btn-create {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .page-header-index,
    .page-header-index-soft {
        padding: 1.5rem 1.5rem;
        margin: 0 1rem 2rem;
        max-width: calc(100% - 2rem);
        flex-direction: column;
        gap: 1.25rem;
        text-align: center;
    }

        .page-header-index h1,
        .page-header-index-soft h1 {
            font-size: 1.5rem;
            justify-content: center;
        }

    .page-header-btn-create {
        width: 100%;
        padding: 0.8rem 1.5rem;
    }
}

@media (max-width: 576px) {
    .page-header-index,
    .page-header-index-soft {
        padding: 1.25rem 1rem;
        margin: 0 0.75rem 1.5rem;
        max-width: calc(100% - 1.5rem);
        border-radius: 16px;
    }

        .page-header-index h1,
        .page-header-index-soft h1 {
            font-size: 1.35rem;
            flex-direction: column;
            gap: 0.5rem;
        }

            .page-header-index h1 i,
            .page-header-index-soft h1 i {
                font-size: 1.25rem;
            }

    .page-header-btn-create {
        padding: 0.7rem 1.25rem;
        font-size: 0.95rem;
    }

        .page-header-btn-create i {
            font-size: 1rem;
        }
}

/* ========================================
   UPDATE FORM - Blue Theme for Update/Edit Pages
   ======================================== */

/* Variables for blue theme */
:root {
    --update-primary: #3b82f6;
    --update-primary-light: #60a5fa;
    --update-primary-dark: #2563eb;
    --update-secondary: #eff6ff;
    --update-accent: #dbeafe;
    --update-soft-blue: #f0f9ff;
    --update-border: #93c5fd;
    --update-text: #1e3a8a;
    --update-text-light: #1e40af;
}

/* Update Page Header - Matching Create Style but Blue */
.page-header-update {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(96, 165, 250, 0.05) 50%, rgba(59, 130, 246, 0.08) 100%);
    border-radius: 16px;
    padding: 2rem;
    margin: 0 2rem 2rem;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-left: 3px solid var(--update-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: box-shadow 0.2s ease;
}

    .page-header-update:hover {
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.12);
    }

/* Header Left Content */
.page-header-update-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.page-header-update-icon {
    background: rgba(59, 130, 246, 0.1);
    padding: 0.75rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .page-header-update-icon i {
        color: var(--update-primary);
        font-size: 1.8rem;
    }

.page-header-update-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.page-header-update h1 {
    color: var(--update-text);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.page-header-update p {
    color: var(--update-text-light);
    font-size: 0.95rem;
    margin: 0;
    font-weight: 500;
}

/* Header Actions (Back Button) */
.page-header-update-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.btn-update-back {
    background: #ffffff;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 10px;
    padding: 0.65rem 1.25rem;
    color: var(--update-primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

    .btn-update-back:hover {
        background: var(--update-secondary);
        border-color: var(--update-primary);
        color: var(--update-primary-dark);
        text-decoration: none;
        transform: translateY(-1px);
    }

    .btn-update-back:active {
        transform: translateY(0);
    }

    .btn-update-back i {
        font-size: 1rem;
    }

/* Update Form Section - Matching Create Style but Blue */
.update-form-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    margin: 0 2rem 2rem;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-left: 3px solid var(--update-primary);
    transition: box-shadow 0.2s ease;
}
    .update-form-section:hover {
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.12);
    }

    /* Form Labels */
    .update-form-section label,
    .update-form-section .form-label {
        color: var(--update-text);
        font-weight: 600;
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

        .update-form-section label i,
        .update-form-section .form-label i {
            color: var(--update-primary);
            font-size: 0.9rem;
        }

        .update-form-section label .required,
        .update-form-section .form-label .required {
            color: #ef4444;
            font-size: 1.1rem;
            margin-left: 0.2rem;
        }

    /* Form Inputs */
    .update-form-section input,
    .update-form-section select,
    .update-form-section textarea,
    .update-form-section .form-control,
    .update-form-section .form-select {
        border: 1px solid rgba(59, 130, 246, 0.3);
        border-radius: 8px;
        padding: 0.65rem 1rem;
        font-size: 0.9rem;
        transition: all 0.2s ease;
        background: #fafafa;
        color: var(--update-text);
    }

        .update-form-section input:focus,
        .update-form-section select:focus,
        .update-form-section textarea:focus,
        .update-form-section .form-control:focus,
        .update-form-section .form-select:focus {
            border-color: var(--update-primary);
            outline: none;
            background: #ffffff;
        }

        .update-form-section input::placeholder,
        .update-form-section textarea::placeholder {
            color: #9ca3af;
            font-style: italic;
        }

    /* Validation Messages */
    .update-form-section .field-validation-error,
    .update-form-section .invalid-feedback {
        color: #ef4444;
        font-size: 0.85rem;
        margin-top: 0.4rem;
        display: flex;
        align-items: center;
        gap: 0.3rem;
    }

        .update-form-section .field-validation-error::before {
            content: '?';
            font-size: 0.95rem;
        }

    .update-form-section .input-validation-error,
    .update-form-section .is-invalid {
        border-color: #ef4444 !important;
        background-color: #fef2f2 !important;
    }

        .update-form-section .input-validation-error:focus,
        .update-form-section .is-invalid:focus {
            border-color: #ef4444 !important;
            outline: none !important;
        }

    /* Validation Summary */
    .update-form-section .validation-summary-errors,
    .update-form-section .validation-errors {
        background: #fef2f2;
        border: 1px solid #ef4444;
        border-left: 3px solid #ef4444;
        border-radius: 10px;
        padding: 1rem 1.25rem;
        margin-bottom: 1.5rem;
        color: #dc2626;
    }

        .update-form-section .validation-summary-errors ul,
        .update-form-section .validation-errors ul {
            margin: 0;
            padding-left: 1.5rem;
            list-style: none;
        }

        .update-form-section .validation-summary-errors li,
        .update-form-section .validation-errors li {
            padding: 0.3rem 0;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

            .update-form-section .validation-summary-errors li::before,
            .update-form-section .validation-errors li::before {
                content: '?';
                color: #ef4444;
                font-size: 1rem;
            }

/* Button Styles */
.btn-update-primary {
    background: var(--update-primary);
    border: none;
    border-radius: 10px;
    padding: 0.75rem 2rem;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    transition: all 0.2s ease;
    cursor: pointer;
    min-width: 160px;
}

    .btn-update-primary:hover {
        background: var(--update-primary-dark);
        transform: translateY(-1px);
        color: #ffffff;
    }

    .btn-update-primary:active {
        transform: translateY(0);
    }

    .btn-update-primary:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

    .btn-update-primary i {
        font-size: 1.1rem;
    }

.btn-update-secondary {
    background: #ffffff;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 10px;
    padding: 0.65rem 1.75rem;
    color: var(--update-primary);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    transition: all 0.2s ease;
    cursor: pointer;
    min-width: 140px;
}

    .btn-update-secondary:hover {
        background: var(--update-secondary);
        border-color: var(--update-primary);
        color: var(--update-primary-dark);
        transform: translateY(-1px);
        text-decoration: none;
    }

    .btn-update-secondary:active {
        transform: translateY(0);
    }

    .btn-update-secondary i {
        font-size: 1rem;
    }

/* Form Actions Container */
.update-form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--update-secondary);
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.15);
}

/* Success/Error Messages */
.update-success-message {
    background: var(--update-soft-blue);
    border: 1px solid var(--update-primary);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--update-text);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    .update-success-message i {
        color: var(--update-primary);
        font-size: 1.5rem;
    }

.update-error-message {
    background: #fef2f2;
    border: 1px solid #ef4444;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    color: #dc2626;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    .update-error-message i {
        color: #ef4444;
        font-size: 1.5rem;
    }

/* Info Box */
.update-info-box {
    background: var(--update-soft-blue);
    border-left: 3px solid var(--update-primary);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--update-text-light);
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

    .update-info-box i {
        color: var(--update-primary);
        font-size: 1.2rem;
        flex-shrink: 0;
        margin-top: 0.1rem;
    }

/* Required Field Indicator */
.update-required-indicator {
    color: #6b7280;
    font-size: 0.85rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(59, 130, 246, 0.15);
    font-style: italic;
}

    .update-required-indicator::before {
        content: '* ';
        color: #ef4444;
        font-size: 1.1rem;
        margin-right: 0.3rem;
    }

/* Field Help Text */
.update-form-section .field-help,
.update-form-section .form-text {
    color: #6b7280;
    font-size: 0.85rem;
    margin-top: 0.4rem;
    font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .page-header-update {
        padding: 1.75rem;
        margin: 0 1.5rem 2rem;
    }

    .update-form-section {
        padding: 1.75rem;
        margin: 0 1.5rem 2rem;
    }
}

@media (max-width: 768px) {
    .page-header-update {
        padding: 1.5rem;
        margin: 0 1rem 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .page-header-update-content {
        width: 100%;
    }

    .page-header-update-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .page-header-update h1 {
        font-size: 1.3rem;
    }

    .page-header-update-icon i {
        font-size: 1.5rem;
    }

    .update-form-section {
        padding: 1.5rem;
        margin: 0 1rem 1.5rem;
    }

    .update-form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .btn-update-primary,
    .btn-update-secondary,
    .btn-update-back {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 576px) {
    .page-header-update {
        padding: 1.25rem;
        margin: 0 0.75rem 1.25rem;
        border-radius: 12px;
    }

        .page-header-update h1 {
            font-size: 1.2rem;
        }

        .page-header-update p {
            font-size: 0.875rem;
        }

    .page-header-update-icon {
        padding: 0.6rem;
    }

        .page-header-update-icon i {
            font-size: 1.3rem;
        }

    .update-form-section {
        padding: 1.25rem;
        margin: 0 0.75rem 1.25rem;
        border-radius: 12px;
    }

    .update-form-actions {
        padding: 1.25rem;
    }

    .btn-update-primary,
    .btn-update-secondary,
    .btn-update-back {
        padding: 0.65rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* ========================================
   DETAILS PAGE STYLES - Toni blu/indaco
   File CSS dedicato per le pagine Details
   ======================================== */

/* Variables for details theme */
:root {
    --details-primary: #6366f1;
    --details-primary-light: #818cf8;
    --details-primary-dark: #4f46e5;
    --details-secondary: #eef2ff;
    --details-accent: #c7d2fe;
    --details-soft-blue: #e0e7ff;
    --details-border: #a5b4fc;
    --details-text: #312e81;
    --details-text-light: #3730a3;
}

/* ========================================
   PAGE HEADER DETAILS
   ======================================== */

/* Details Page Header - Container principale */
.page-header-details {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(129, 140, 248, 0.05) 50%, rgba(99, 102, 241, 0.08) 100%);
    border-radius: 16px;
    padding: 2rem;
    margin: 0 2rem 2rem;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-left: 3px solid var(--details-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: box-shadow 0.2s ease;
}

    .page-header-details:hover {
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
    }

/* Header Left Content */
.page-header-details-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.page-header-details-icon {
    background: rgba(99, 102, 241, 0.1);
    padding: 0.75rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .page-header-details-icon i {
        color: var(--details-primary);
        font-size: 1.8rem;
    }

.page-header-details-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.page-header-details h1 {
    color: var(--details-text);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.page-header-details p {
    color: var(--details-text-light);
    font-size: 0.95rem;
    margin: 0;
    font-weight: 500;
}

/* Header Actions (Buttons) */
.page-header-details-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

/* ========================================
   DETAILS BUTTONS
   ======================================== */

/* Pulsante Back to List */
.btn-back-to-list-details {
    background: #ffffff;
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 10px;
    padding: 0.65rem 1.25rem;
    color: var(--details-primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

    .btn-back-to-list-details:hover {
        background: var(--details-secondary);
        border-color: var(--details-primary);
        color: var(--details-primary-dark);
        text-decoration: none;
        transform: translateY(-1px);
    }

    .btn-back-to-list-details:active {
        transform: translateY(0);
    }

    .btn-back-to-list-details i {
        font-size: 1rem;
    }

/* Pulsante Edit */
.btn-edit-details {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border: none;
    border-radius: 10px;
    padding: 0.65rem 1.25rem;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

    .btn-edit-details:hover {
        background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
        color: #ffffff;
        transform: translateY(-1px);
        text-decoration: none;
    }

    .btn-edit-details:active {
        transform: translateY(0);
    }

    .btn-edit-details i {
        font-size: 1rem;
    }

/* Pulsante Action Details (generico) */
.btn-action-details {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.75rem;
    color: #ffffff;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 18px rgba(99, 102, 241, 0.35);
    cursor: pointer;
}

    .btn-action-details:hover {
        transform: translateY(-2px);
        box-shadow: 0 7px 24px rgba(99, 102, 241, 0.45);
        color: #ffffff;
        text-decoration: none;
    }

    .btn-action-details:active {
        transform: translateY(0);
        box-shadow: 0 3px 14px rgba(99, 102, 241, 0.35);
    }

    .btn-action-details i {
        font-size: 1.1rem;
    }

/* Pulsante Delete */
.btn-action-delete {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.75rem;
    color: #ffffff;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 18px rgba(239, 68, 68, 0.35);
    cursor: pointer;
}

    .btn-action-delete:hover {
        transform: translateY(-2px);
        box-shadow: 0 7px 24px rgba(239, 68, 68, 0.45);
        color: #ffffff;
        text-decoration: none;
    }

    .btn-action-delete:active {
        transform: translateY(0);
        box-shadow: 0 3px 14px rgba(239, 68, 68, 0.35);
    }

    .btn-action-delete i {
        font-size: 1.1rem;
    }

/* ========================================
   DETAILS SECTION - Container principale
   ======================================== */

.details-form-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    margin: 0 2rem 2rem;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-left: 3px solid var(--details-primary);
    transition: box-shadow 0.2s ease;
}

    .details-form-section:hover {
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
    }

/* ========================================
   DETAILS FIELDS
   ======================================== */

/* Details Field Groups - Griglia responsive */
.details-field-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Individual Detail Field */
.details-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.details-field-label {
    color: #6366f1;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.details-field-value {
    color: #1e293b;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem 0;
}

/* ========================================
   DETAILS BADGES
   ======================================== */

.details-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    width: fit-content;
}

.details-badge-primary {
    background: rgba(99, 102, 241, 0.1);
    color: #4f46e5;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.details-badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.details-badge-warning {
    background: rgba(251, 191, 36, 0.1);
    color: #d97706;
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.details-badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.details-badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* ========================================
   DETAILS UTILITIES
   ======================================== */

/* Details Divider */
.details-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.2), transparent);
    margin: 2rem 0;
}

/* Details Info Box */
.details-info-box {
    background: var(--details-soft-blue);
    border-left: 3px solid var(--details-primary);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--details-text-light);
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

    .details-info-box i {
        color: var(--details-primary);
        font-size: 1.2rem;
        flex-shrink: 0;
        margin-top: 0.1rem;
    }

/* Details Success Message */
.details-success-message {
    background: #ecfdf5;
    border: 1px solid #10b981;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    color: #064e3b;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    .details-success-message i {
        color: #10b981;
        font-size: 1.5rem;
    }

/* Details Error Message */
.details-error-message {
    background: #fef2f2;
    border: 1px solid #ef4444;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    color: #dc2626;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    .details-error-message i {
        color: #ef4444;
        font-size: 1.5rem;
    }

/* ========================================
   DETAILS CARD (variante)
   ======================================== */

.details-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(79, 70, 229, 0.08) 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 2px solid rgba(99, 102, 241, 0.25);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.12);
}

.details-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(99, 102, 241, 0.2);
}

.details-card-title {
    color: #4f46e5;
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    .details-card-title i {
        color: #6366f1;
        font-size: 1.5rem;
    }

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablet (992px and below) */
@media (max-width: 992px) {
    .page-header-details {
        padding: 1.75rem;
        margin: 0 1.5rem 2rem;
    }

    .details-form-section {
        padding: 1.75rem;
        margin: 0 1.5rem 2rem;
    }

    .details-field-group {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 1.25rem;
    }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
    .page-header-details {
        padding: 1.5rem;
        margin: 0 1rem 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .page-header-details-content {
        width: 100%;
    }

    .page-header-details-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .page-header-details h1 {
        font-size: 1.3rem;
    }

    .page-header-details-icon i {
        font-size: 1.5rem;
    }

    .details-form-section {
        padding: 1.5rem;
        margin: 0 1rem 1.5rem;
    }

    .details-field-group {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .btn-back-to-list-details,
    .btn-edit-details,
    .btn-action-details,
    .btn-action-delete {
        width: 100%;
        justify-content: center;
    }
}

/* Small Mobile (576px and below) */
@media (max-width: 576px) {
    .page-header-details {
        padding: 1.25rem;
        margin: 0 0.75rem 1.25rem;
        border-radius: 12px;
    }

        .page-header-details h1 {
            font-size: 1.2rem;
        }

        .page-header-details p {
            font-size: 0.875rem;
        }

    .page-header-details-icon {
        padding: 0.6rem;
    }

        .page-header-details-icon i {
            font-size: 1.3rem;
        }

    .details-form-section {
        padding: 1.25rem;
        margin: 0 0.75rem 1.25rem;
        border-radius: 12px;
    }

    .btn-back-to-list-details,
    .btn-edit-details {
        padding: 0.65rem 1.25rem;
        font-size: 0.9rem;
    }

    .btn-action-details,
    .btn-action-delete {
        padding: 0.65rem 1.5rem;
        font-size: 0.95rem;
    }

    .details-badge {
        padding: 0.35rem 0.7rem;
        font-size: 0.8rem;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .page-header-details-actions,
    .btn-back-to-list-details,
    .btn-edit-details,
    .btn-action-details,
    .btn-action-delete {
        display: none !important;
    }

    .page-header-details,
    .details-form-section {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
}

/* ========================================
   DELETE CONFIRMATION PAGE STYLES
   Tema: Rosso/Warning - Stile coerente con theme.css
   ======================================== */

/* Variables for delete theme */
:root {
    --delete-primary: #ef4444;
    --delete-primary-light: #f87171;
    --delete-primary-dark: #dc2626;
    --delete-secondary: #fef2f2;
    --delete-accent: #fee2e2;
    --delete-soft-red: #fef2f2;
    --delete-border: #fca5a5;
    --delete-text: #7f1d1d;
    --delete-text-light: #991b1b;
}

/* ========================================
   PAGE HEADER DELETE
   ======================================== */

/* Delete Page Header - Container principale */
.page-header-delete {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(248, 113, 113, 0.05) 50%, rgba(239, 68, 68, 0.08) 100%);
    border-radius: 16px;
    padding: 2rem;
    margin: 0 2rem 2rem;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-left: 3px solid var(--delete-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: box-shadow 0.2s ease;
}

    .page-header-delete:hover {
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.12);
    }

/* Header Left Content */
.page-header-delete-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.page-header-delete-icon {
    background: rgba(239, 68, 68, 0.1);
    padding: 0.75rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .page-header-delete-icon i {
        color: var(--delete-primary);
        font-size: 1.8rem;
    }

.page-header-delete-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.page-header-delete h1 {
    color: var(--delete-text);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.page-header-delete p {
    color: var(--delete-text-light);
    font-size: 0.95rem;
    margin: 0;
    font-weight: 500;
}

/* Header Actions (Cancel Button) */
.page-header-delete-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* ========================================
   DELETE SECTION - Container principale
   ======================================== */

.delete-form-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    margin: 0 2rem 2rem;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-left: 3px solid var(--delete-primary);
    transition: box-shadow 0.2s ease;
}

    .delete-form-section:hover {
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.12);
    }

/* ========================================
   DELETE WARNING BOX
   ======================================== */

.delete-warning-box {
    background: var(--delete-soft-red);
    border-left: 3px solid var(--delete-primary);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--delete-text-light);
    font-size: 0.95rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    animation: warningPulse 2s ease-in-out infinite;
}

@keyframes warningPulse {
    0%, 100% {
        border-left-color: var(--delete-primary);
    }

    50% {
        border-left-color: var(--delete-primary-dark);
        box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
    }
}

.delete-warning-box i {
    color: var(--delete-primary);
    font-size: 1.3rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
    animation: warningShake 1s ease-in-out infinite;
}

@keyframes warningShake {
    0%, 100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-5deg);
    }

    75% {
        transform: rotate(5deg);
    }
}

.delete-warning-box strong {
    color: var(--delete-text);
}

/* ========================================
   DELETE FIELDS
   ======================================== */

/* Delete Field Groups - Griglia responsive */
.delete-field-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Individual Delete Field */
.delete-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.delete-field-label {
    color: #ef4444;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

    .delete-field-label i {
        font-size: 0.9rem;
    }

.delete-field-value {
    color: #1e293b;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem 0;
}

/* ========================================
   DELETE BUTTONS
   ======================================== */

/* Pulsante Cancel Delete */
.btn-cancel-delete {
    background: #ffffff;
    border: 2px solid var(--delete-primary);
    border-radius: 10px;
    padding: 0.65rem 1.25rem;
    color: var(--delete-text-light);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.18);
    cursor: pointer;
}

    .btn-cancel-delete:hover {
        background: var(--delete-secondary);
        border-color: var(--delete-primary-dark);
        color: var(--delete-text);
        text-decoration: none;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
    }

    .btn-cancel-delete:active {
        transform: translateY(0);
        box-shadow: 0 2px 6px rgba(239, 68, 68, 0.18);
    }

    .btn-cancel-delete i {
        font-size: 1rem;
    }

/* Pulsante Confirm Delete */
.btn-confirm-delete {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none;
    border-radius: 12px;
    padding: 0.75rem 2rem;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    margin: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

    .btn-confirm-delete::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
        transition: left 0.5s ease;
    }

    .btn-confirm-delete:hover::before {
        left: 100%;
    }

    .btn-confirm-delete:hover {
        background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
        transform: translateY(-2px);
        box-shadow: 0 8px 28px rgba(239, 68, 68, 0.45);
        color: #ffffff;
    }

    .btn-confirm-delete:active {
        transform: translateY(0);
        box-shadow: 0 4px 16px rgba(239, 68, 68, 0.35);
    }

    .btn-confirm-delete i {
        font-size: 1.2rem;
    }

/* ========================================
   DELETE FORM ACTIONS
   ======================================== */

.delete-form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--delete-secondary);
    border-radius: 12px;
    border: 1px solid rgba(239, 68, 68, 0.15);
}

/* ========================================
   DELETE DIVIDER
   ======================================== */

.delete-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(239, 68, 68, 0.3), transparent);
    margin: 2rem 0;
}

/* ========================================
   DELETE BADGES
   ======================================== */

.delete-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    width: fit-content;
}

.delete-badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.delete-badge-warning {
    background: rgba(251, 191, 36, 0.1);
    color: #d97706;
    border: 1px solid rgba(251, 191, 36, 0.2);
}

/* ========================================
   DELETE MESSAGES
   ======================================== */

/* Delete Success Message (usato dopo la cancellazione) */
.delete-success-message {
    background: #ecfdf5;
    border: 1px solid #10b981;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    color: #064e3b;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    .delete-success-message i {
        color: #10b981;
        font-size: 1.5rem;
    }

/* Delete Error Message */
.delete-error-message {
    background: #fef2f2;
    border: 1px solid #ef4444;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    color: #dc2626;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    .delete-error-message i {
        color: #ef4444;
        font-size: 1.5rem;
    }

/* ========================================
   DELETE CONFIRM CARD (variante alternativa)
   ======================================== */

.delete-confirm-card {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(220, 38, 38, 0.08) 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 2px solid rgba(239, 68, 68, 0.25);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.12);
    position: relative;
    overflow: hidden;
}

    .delete-confirm-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 4px;
        background: linear-gradient(90deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
    }

.delete-confirm-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(239, 68, 68, 0.18);
}

.delete-confirm-card-title {
    color: #dc2626;
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    .delete-confirm-card-title i {
        color: #ef4444;
        font-size: 1.5rem;
    }

/* ========================================
   DELETE INFO BOXES
   ======================================== */

/* Info Box generico per delete */
.delete-info-box {
    background: var(--delete-soft-red);
    border-left: 3px solid var(--delete-primary);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--delete-text-light);
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

    .delete-info-box i {
        color: var(--delete-primary);
        font-size: 1.2rem;
        flex-shrink: 0;
        margin-top: 0.1rem;
    }

/* Critical Warning Box - più intenso */
.delete-critical-box {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(220, 38, 38, 0.08) 100%);
    border: 2px solid var(--delete-primary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.15);
}

    .delete-critical-box i {
        color: var(--delete-primary);
        font-size: 2.5rem;
        margin-bottom: 0.75rem;
        display: block;
        animation: warningPulseIcon 1.5s ease-in-out infinite;
    }

@keyframes warningPulseIcon {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.delete-critical-box strong {
    color: var(--delete-text);
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.5rem;
}

.delete-critical-box p {
    color: var(--delete-text-light);
    margin: 0;
}

/* ========================================
   DELETE DATA DISPLAY
   ======================================== */

/* Container per mostrare i dati da eliminare */
.delete-data-display {
    background: #f8f9fc;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

    .delete-data-display h3 {
        color: var(--delete-text);
        font-size: 1.1rem;
        font-weight: 600;
        margin-bottom: 1rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

        .delete-data-display h3 i {
            color: var(--delete-primary);
        }

.delete-data-row {
    display: flex;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(239, 68, 68, 0.1);
}

    .delete-data-row:last-child {
        border-bottom: none;
    }

.delete-data-label {
    font-weight: 600;
    color: #64748b;
    min-width: 150px;
    font-size: 0.9rem;
}

.delete-data-value {
    color: #1e293b;
    font-size: 0.95rem;
}

/* ========================================
   DELETE CONFIRMATION CHECKBOX
   ======================================== */

.delete-confirm-checkbox {
    background: var(--delete-soft-red);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    .delete-confirm-checkbox input[type="checkbox"] {
        width: 20px;
        height: 20px;
        cursor: pointer;
        accent-color: var(--delete-primary);
    }

    .delete-confirm-checkbox label {
        color: var(--delete-text-light);
        font-weight: 500;
        cursor: pointer;
        margin: 0;
    }

/* ========================================
   DELETE CONSEQUENCES LIST
   ======================================== */

.delete-consequences {
    background: rgba(239, 68, 68, 0.05);
    border-left: 3px solid var(--delete-primary);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

    .delete-consequences h4 {
        color: var(--delete-text);
        font-size: 1rem;
        font-weight: 700;
        margin-bottom: 1rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

        .delete-consequences h4 i {
            color: var(--delete-primary);
        }

    .delete-consequences ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .delete-consequences li {
        padding: 0.5rem 0;
        color: var(--delete-text-light);
        display: flex;
        align-items: flex-start;
        gap: 0.75rem;
    }

        .delete-consequences li::before {
            content: '×';
            color: var(--delete-primary);
            font-size: 1.5rem;
            font-weight: bold;
            flex-shrink: 0;
            line-height: 1;
        }

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablet (992px and below) */
@media (max-width: 992px) {
    .page-header-delete {
        padding: 1.75rem;
        margin: 0 1.5rem 2rem;
    }

    .delete-form-section {
        padding: 1.75rem;
        margin: 0 1.5rem 2rem;
    }

    .delete-field-group {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 1.25rem;
    }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
    .page-header-delete {
        padding: 1.5rem;
        margin: 0 1rem 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .page-header-delete-content {
        width: 100%;
    }

    .page-header-delete-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .page-header-delete h1 {
        font-size: 1.3rem;
    }

    .page-header-delete-icon i {
        font-size: 1.5rem;
    }

    .delete-form-section {
        padding: 1.5rem;
        margin: 0 1rem 1.5rem;
    }

    .delete-form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .btn-cancel-delete,
    .btn-confirm-delete {
        width: 100%;
        justify-content: center;
    }

    .delete-field-group {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .delete-data-row {
        flex-direction: column;
        gap: 0.25rem;
    }

    .delete-data-label {
        min-width: auto;
    }
}

/* Small Mobile (576px and below) */
@media (max-width: 576px) {
    .page-header-delete {
        padding: 1.25rem;
        margin: 0 0.75rem 1.25rem;
        border-radius: 12px;
    }

        .page-header-delete h1 {
            font-size: 1.2rem;
        }

        .page-header-delete p {
            font-size: 0.875rem;
        }

    .page-header-delete-icon {
        padding: 0.6rem;
    }

        .page-header-delete-icon i {
            font-size: 1.3rem;
        }

    .delete-form-section {
        padding: 1.25rem;
        margin: 0 0.75rem 1.25rem;
        border-radius: 12px;
    }

    .delete-form-actions {
        padding: 1.25rem;
    }

    .btn-cancel-delete,
    .btn-confirm-delete {
        padding: 0.65rem 1.5rem;
        font-size: 0.9rem;
    }

    .delete-critical-box {
        padding: 1.25rem;
    }

        .delete-critical-box i {
            font-size: 2rem;
        }

    .delete-consequences {
        padding: 1rem 1.25rem;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .page-header-delete-actions,
    .btn-cancel-delete,
    .btn-confirm-delete,
    .delete-form-actions {
        display: none !important;
    }

    .page-header-delete,
    .delete-form-section {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }

    .delete-warning-box {
        animation: none;
    }

        .delete-warning-box i {
            animation: none;
        }
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */

/* Focus states per accessibilità */
.btn-cancel-delete:focus,
.btn-confirm-delete:focus {
    outline: 3px solid rgba(239, 68, 68, 0.5);
    outline-offset: 2px;
}

.delete-confirm-checkbox input[type="checkbox"]:focus {
    outline: 2px solid var(--delete-primary);
    outline-offset: 2px;
}

/* Riduzione animazioni per utenti con preferenze di movimento ridotto */
@media (prefers-reduced-motion: reduce) {
    .delete-warning-box,
    .delete-warning-box i,
    .delete-critical-box i {
        animation: none;
    }

    .btn-confirm-delete::before {
        transition: none;
    }
}

/* ========================================
   CHECKBOX STYLES - Stile classico per checkbox
   ======================================== */

/* Stile base per checkbox (Bootstrap/Blazorise) */
.form-check-input {
    width: 1.25em;
    height: 1.25em;
    margin-top: 0.15em;
    vertical-align: middle;
    appearance: none;
    -webkit-appearance: none;
    background-color: #ffffff;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border: 2px solid #9ca3af;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Hover state */
.form-check-input:hover {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Focus state */
.form-check-input:focus {
    border-color: #6366f1;
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

/* Checked state */
.form-check-input:checked {
    background-color: #6366f1;
    border-color: #6366f1;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
}

/* Checked hover state */
.form-check-input:checked:hover {
    background-color: #4f46e5;
    border-color: #4f46e5;
}

/* Indeterminate state */
.form-check-input:indeterminate {
    background-color: #6366f1;
    border-color: #6366f1;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e");
}

/* Disabled state */
.form-check-input:disabled {
    pointer-events: none;
    filter: none;
    opacity: 0.5;
    background-color: #f3f4f6;
    border-color: #d1d5db;
    cursor: not-allowed;
}

/* Disabled checked state */
.form-check-input:disabled:checked {
    background-color: #a5b4fc;
    border-color: #a5b4fc;
}

/* Form check container */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 1.5rem;
    padding-left: 0;
    margin-bottom: 0.25rem;
}

/* Form check label */
.form-check-label {
    color: #374151;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 0;
    user-select: none;
}

.form-check-input:disabled ~ .form-check-label,
.form-check-input[disabled] ~ .form-check-label {
    color: #9ca3af;
    cursor: not-allowed;
}

/* Variante inline */
.form-check-inline {
    display: inline-flex;
    align-items: center;
    margin-right: 1rem;
}

/* Variante switch */
.form-switch .form-check-input {
    width: 2.5em;
    height: 1.25em;
    border-radius: 1.25em;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%239ca3af'/%3e%3c/svg%3e");
    background-position: left center;
    transition: all 0.25s ease-in-out;
}

.form-switch .form-check-input:checked {
    background-position: right center;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23ffffff'/%3e%3c/svg%3e");
}

/* Checkbox size variants */
.form-check-input.form-check-sm {
    width: 1em;
    height: 1em;
}

.form-check-input.form-check-lg {
    width: 1.5em;
    height: 1.5em;
}

/* Checkbox color variants */

/* Success - Verde */
.form-check-input.form-check-success:checked {
    background-color: #10b981;
    border-color: #10b981;
}

.form-check-input.form-check-success:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

/* Warning - Ambra */
.form-check-input.form-check-warning:checked {
    background-color: #f59e0b;
    border-color: #f59e0b;
}

.form-check-input.form-check-warning:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}

/* Danger - Rosso */
.form-check-input.form-check-danger:checked {
    background-color: #ef4444;
    border-color: #ef4444;
}

.form-check-input.form-check-danger:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25);
}

/* Info - Blu */
.form-check-input.form-check-info:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.form-check-input.form-check-info:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

/* Checkbox in cards */
.master-detail-primary-card .form-check-input:checked,
.master-detail-highlighted-card .form-check-input:checked {
    background-color: #8b5cf6;
    border-color: #8b5cf6;
}

.master-detail-secondary-card .form-check-input:checked {
    background-color: #78716c;
    border-color: #78716c;
}

/* Checkbox in form sections */
.create-form-section .form-check-input:checked {
    background-color: var(--create-primary);
    border-color: var(--create-primary);
}

.update-form-section .form-check-input:checked {
    background-color: var(--update-primary);
    border-color: var(--update-primary);
}

.details-form-section .form-check-input:checked {
    background-color: var(--details-primary);
    border-color: var(--details-primary);
}

.delete-form-section .form-check-input:checked {
    background-color: var(--delete-primary);
    border-color: var(--delete-primary);
}

