.codt-summary-grid {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    max-width: 1000px;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0 20px
}

.codt-stats-summary-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 1rem;
    padding: 0 20px;
    animation: kickoffZoom 1s ease-out both
}

.codt-stats-summary-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    background: #000000a6;
    border: 1px solid #cfae704d;
    border-radius: var(--radius-lg);
    padding: 1.5rem 1rem;
    box-shadow: var(--shadow-soft);
    gap: 10px
}

.codt-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-right: 1px solid #cfae7026
}

.codt-stat-item:last-child {
    border-right: none
}

.codt-stat-item img {
    width: 32px;
    height: 32px;
    margin-bottom: .8rem;
    filter: drop-shadow(0 0 8px #cfae7066)
}

.codt-stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 4px
}

.codt-stat-label {
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: .6
}

.codt-coaches-header {
    display: flex;
    justify-content: center;
    align-items: center
}

.codt-chart-container-full {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    width: 100%;
    max-width: 100%;
}

.codt-chart-container-full canvas {
    max-height: 400px;
    width: 100% !important;
}

.codt-id-card-container {
    width: 100%;
    display: flex;
    justify-content: center;
    /*margin-bottom: 1rem;*/
    padding: 0 1rem;
    animation: fadeIn .8s ease-out both
}

.codt-coach-id-card {
    background: linear-gradient(135deg, #1f2937 0, #0b0f19 100%);
    border: 2px solid var(--primary-color);
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .8), 0 0 15px rgba(207, 174, 112, .2);
    overflow: hidden;
    color: #fff;
    font-family: "Montserrat Alternates", sans-serif
}

.codt-coach-id-card::before {
    content: "";
    inset: 0;
    background-image: repeating-linear-gradient(45deg, rgba(207, 174, 112, .03)0, rgba(207, 174, 112, .03) 1px, transparent 1px, transparent 10px)
}

.codt-coach-id-card::before {
    position: absolute;
    pointer-events: none
}

.codt-id-logo-bg {
    position: absolute;
    pointer-events: none
}

.codt-id-logo-bg {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 10rem;
    font-weight: 700;
    color: rgba(255, 255, 255, .03);
    z-index: 0
}

.codt-id-field-group label {
    color: var(--primary-color);
    text-transform: uppercase
}

.codt-id-field-group {
    display: flex;
    flex-direction: column
}

.codt-id-field-group.full-width {
    grid-column: 1/-1
}

.codt-id-field-group label {
    font-size: .6rem;
    margin-bottom: 2px;
    opacity: .8
}

.codt-id-header {
    background: rgba(207, 174, 112, .15);
    padding: 12px 20px;
    border-bottom: 1px solid var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative
}

.codt-id-title {
    color: var(--primary-color);
    text-transform: uppercase
}

.codt-id-title {
    font-weight: 700;
    letter-spacing: 2px;
    font-size: .9rem;
    text-shadow: 0 0 5px rgba(207, 174, 112, .5)
}

.codt-id-league {
    font-size: .7rem;
    opacity: .7;
    letter-spacing: 1px
}

.codt-id-body-flex {
    display: flex;
    padding: 20px;
    gap: 25px;
    position: relative;
    z-index: 1
}

.codt-id-photo-box {
    flex: 0 0 130px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /*border: 1px solid rgba(255, 255, 255, .1);*/
    border: 2px solid rgba(207, 174, 112, 0.3);
    background: rgba(0, 0, 0, .3);
    border-radius: 8px;
    padding: 10px
}

.codt-id-photo-box img {
    width: 100px;
    height: 100px;
    display: block;
    object-fit: cover;
    border-radius: 50%
}

.codt-id-photo-box div:first-child {
    width: 100px;
    height: 100px;
    overflow: hidden
}

.codt-id-photo-label {
    color: var(--primary-color);
    text-align: center;
}

.codt-id-photo-label {
    font-size: 1.2rem;
    font-weight: 700;
    border-top: 1px solid var(--primary-color);
    width: 100%;
    padding-top: 5px;
    margin-top: 10px;
}

.codt-id-value img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    display: block
}

.codt-id-details-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    align-content: start
}

.codt-id-value {
    font-size: .95rem;
    font-weight: 600;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    padding-bottom: 2px
}

.codt-id-value.text-xl {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 12px
}

.codt-id-value.text-xl img {
    height: 40px;
    width: auto;
    display: block
}

.codt-id-signature {
    font-family: "Cursive", "Segoe Script", "Brush Script MT", cursive;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, .6);
    transform: rotate(-2deg);
    display: block;
    text-align: right;
    padding-right: 20px
}

.codt-id-footer-stripe {
    background: var(--primary-color);
    color: #000;
    padding: 8px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: 1px
}

.codt-active-status {
    color: #4caf50;
    text-shadow: 0 0 8px rgba(76, 175, 80, .4)
}

.codt-inactive-status {
    color: #af4c50;
    text-shadow: 0 0 8px rgba(76, 175, 80, .4)
}

.codt-signature-box {
    margin-top: auto;
    padding-top: 10px
}

.coach-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(207, 174, 112, 0.2);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.85rem;
    width: 100%;
    box-sizing: border-box;
}

.coach-input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.coach-input:invalid {
    border-color: #af4c50;
}

/* Container pulsante in basso a destra */
.codt-update-actions {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    animation: fadeIn 0.5s ease;
}

.codt-wrapper-card-save {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Allinea i figli (scheda e pulsante) a sinistra */
    width: 100%;
    max-width: 600px; /* Stessa larghezza massima della card */
}

/* Pulsante posizionato sotto la scheda */
.codt-update-inline {
    margin-top: 1px; 
    width: auto;
    animation: fadeIn 0.4s ease;
}

.btn-update-coach {
    background-color: var(--primary-color);
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 4px; /* Ridotto il raggio per un look più integrato alla card */
    font-family: "Montserrat Alternates", sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 1px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.btn-update-coach:hover {
    filter: brightness(1.1);
    box-shadow: 0 0 15px var(--primary-color);
}



/* Fix per l'icona del calendario in Chrome/Edge */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1); /* Rende l'icona del calendario bianca */
}

.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    font-family: "Montserrat Alternates", sans-serif;
    background: #1a1a1a;
    border-bottom: 3px solid var(--primary-color);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    margin-top: 10px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease-out, fadeOut 0.5s ease-in 2.5s forwards;
}

.toast.success { border-left-color: #4caf50; }
.toast.error { border-left-color: #af4c50; }

.btn-edit-photo {
    position: absolute;
    bottom: 35px; /* Sopra la label HC */
    right: 10px;
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    transition: transform 0.2s;
    z-index: 10;
}

.btn-edit-photo:hover {
    transform: scale(1.1);
}

/* Stile Modale Upload Foto */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    background: var(--primary-color);
    padding: 20px;
    border-radius: 13px 13px 0 0;
    text-align: center;
}

.modal-header h2 {
    margin: 0;
    color: white;
    font-size: 22px;
    font-weight: 700;
}

.modal-body {
    padding: 30px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

.modal-body p {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.modal-body ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modal-body ul li {
    padding: 8px 0;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
}

.modal-footer {
    padding: 20px 30px;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-modal-cancel,
.btn-modal-confirm {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat Alternates', sans-serif;
}

.btn-modal-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.btn-modal-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.btn-modal-confirm {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.3);
}

.btn-modal-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 255, 0.4);
}

.btn-modal-confirm:active {
    transform: translateY(0);
}









/* Titolo di sezione su riga propria, centrato (usato per BIO e PALMARES) */
.codt-section-title {
    display: block;
    width: 100%;
    text-align: center;
    margin-bottom: 0.3rem;
}

/* === SEZIONE BIO === */
.codt-bio-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 1rem;
    /*padding: 0 1rem;*/
    animation: fadeIn .8s ease-out both;
}

.codt-bio-textarea {
    width: 100%;
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
    font-size: 0.9rem;
    /*padding: 12px 14px;*/
    border-radius: 8px;
    box-sizing: border-box;
}

.codt-bio-text {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(207, 174, 112, 0.2);
    border-radius: 8px;
    padding: 16px 18px;
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    line-height: 1.7;
    font-family: "Montserrat Alternates", sans-serif;
    white-space: pre-wrap;
}

.codt-bio-empty {
    color: rgba(255, 255, 255, 0.35);
    font-style: italic;
}

/* === FINE SEZIONE BIO === */

/* Fix per l'anteprima logo accanto alla select */
#nfl-preview {
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
    transition: transform 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
    to { opacity: 0; visibility: hidden; }
}

@media (max-width:768px) {
    .codt-summary-grid {
        flex-direction: column;
        align-items: center
    }

    .codt-stats-summary-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px 10px
    }

    .codt-stat-item:nth-child(3) {
        border-right: none
    }
}

@media (max-width:550px) {
    .codt-id-body-flex {
        flex-direction: column;
        align-items: center;
        text-align: center
    }

    .codt-id-photo-box {
        width: 100%;
        flex: unset;
        margin-bottom: 15px
    }

    .codt-id-details-grid {
        width: 100%;
        grid-template-columns: 1fr;
        text-align: left
    }

    .codt-id-signature {
        text-align: center;
        padding-right: 0
    }
}

@media (max-width:480px) {
    .codt-summary-grid {
        margin-top: 3.5rem;
        gap: 1.5rem
    }

    .codt-stats-summary-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .codt-stat-item:nth-child(even) {
        border-right: none
    }

    .codt-stat-value {
        font-size: 1.1rem
    }
}

/* === SLIDESHOW TROFEI === */
.trophies-slideshow-container {
    width: 100%;
    max-width: 800px;
    margin: 1rem auto;
    padding: 0 20px;
}

/* Pulsante per mostrare la galleria */
.gallery-toggle-btn {
    display: block;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    background: rgba(207, 174, 112, 0.2);
    border: 1px solid rgba(207, 174, 112, 0.5);
    border-radius: var(--radius-lg);
    color: var(--primary-color);
    font-family: "Montserrat Alternates", sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
}

.gallery-toggle-btn:hover {
    background: rgba(207, 174, 112, 0.4);
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(207, 174, 112, 0.4);
    transform: translateY(-2px);
}

.trophies-slideshow {
    position: relative;
    width: 100%;
    height: 400px;
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid rgba(207, 174, 112, 0.3);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    display: none; /* Inizialmente nascosta */
    margin-top: 1.5rem;
}

.trophies-slideshow.visible {
    display: block;
}

.trophy-slide {
    display: none;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.8s ease-in-out;
}

.trophy-slide.active {
    display: flex;
}

.trophy-slide img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(207, 174, 112, 0.4));
}

/* Pulsanti navigazione */
.slide-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(207, 174, 112, 0.2);
    border: 1px solid rgba(207, 174, 112, 0.5);
    color: var(--primary-color);
    font-size: 2.5rem;
    font-weight: bold;
    width: 50px;
    height: 50px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    padding: 0 0 8px 0; /* Aggiunto padding-bottom per spostare verso l'alto */
    z-index: 10;
}

.slide-nav:hover {
    background: rgba(207, 174, 112, 0.4);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(207, 174, 112, 0.5);
}

.slide-nav.prev {
    left: 15px;
}

.slide-nav.next {
    right: 15px;
}

/* Dots di navigazione */
.slide-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(207, 174, 112, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot:hover {
    background: rgba(207, 174, 112, 0.6);
}

.dot.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(207, 174, 112, 0.8);
}

/* Animazione fade */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .trophies-slideshow {
        height: 300px;
    }
    
    .slide-nav {
        width: 40px;
        height: 40px;
        font-size: 2rem;
    }
    
    .slide-nav.prev {
        left: 10px;
    }
    
    .slide-nav.next {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .trophies-slideshow-container {
        margin: 1.5rem auto;
    }
    
    .trophies-slideshow {
        height: 250px;
    }
    
    .slide-nav {
        width: 35px;
        height: 35px;
        font-size: 1.8rem;
    }
    
    .dot {
        width: 10px;
        height: 10px;
    }
}
