/* =====================================================================
   MASTERS LEAGUE - responsive-plus.css
   Miglioramenti responsive caricati DOPO responsive.css.
   Vincolo: nessuna modifica a palette colori e famiglie di font
   (Oswald / Open Sans / Droid Sans); si interviene solo su dimensioni,
   spaziature, scorrimento e area di tocco.
   ===================================================================== */

/* ---------- Base: media fluidi e scorrimento orizzontale sicuro ---------- */
.ml-contentbox img,
.ml-description img,
.ml-main-section img {
    max-width: 100%;
    height: auto;
}

/* I contenitori scrollabili esistenti (style="overflow-x:auto") e quelli nuovi
   (.table-responsive) scorrono in modo fluido sui dispositivi touch */
.table-responsive,
[style*="overflow-x:auto"],
[style*="overflow-x: auto"] {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    max-width: 100%;
}
.table-responsive {
    border: 0;
    margin-bottom: 15px;
}
.table-responsive > table {
    margin-bottom: 0;
}

/* Parole lunghe (email, user agent, nomi squadra) non devono allargare la pagina */
.ml-break {
    word-break: break-word;
    overflow-wrap: anywhere;
}
.ml-small {
    font-size: 12px;
    line-height: 16px;
}

/* ---------- Area Admin ---------- */
.ml-admin-page {
    margin: 110px 2% 0;
}
.ml-admin-title {
    margin-top: 10px;
}
.ml-admin-subtitle {
    margin: 25px 0 10px;
}
.ml-admin-note {
    margin-bottom: 15px;
}
.ml-admin-filters > div {
    margin-bottom: 10px;
}
.ml-admin-filters .btn {
    width: 100%;
}
.ml-inline-form {
    display: inline;
    margin: 0;
}
.ml-row-blocked td {
    font-weight: 700;
}
.admin_menu a {
    display: block;
}

/* ---------- Tablet (<= 991px) ---------- */
@media (max-width: 991px) {
    .admin_menu div {
        padding: 14px 6px;
    }
}

/* ---------- Smartphone e tablet piccoli (<= 767px) ---------- */
@media (max-width: 767px) {
    /* Evita lo zoom automatico di iOS sui campi con font < 16px */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="search"],
    select,
    textarea,
    .form-control {
        font-size: 16px;
    }

    /* Finestre modali (login/registrazione) più larghe su schermi stretti */
    .ml-modalbox.fade .modal-dialog {
        width: 94%;
        left: 3%;
        top: 4%;
    }
    .ml-modal-content {
        padding: 15px;
    }

    /* Tabelle più compatte */
    table > thead > tr > th,
    table > tbody > tr > th,
    table > tfoot > tr > th,
    table > thead > tr > td,
    table > tbody > tr > td,
    table > tfoot > tr > td {
        padding: 5px 4px;
    }
    table thead tr th,
    table > thead > tr > th {
        font-size: 13px;
    }

    /* Area Admin: margini ridotti e menu a 2 colonne con area di tocco ampia */
    .ml-admin-page {
        margin: 90px 8px 0;
    }
    .admin_menu > div {
        width: 50%;
    }
    .admin_menu div {
        padding: 12px 4px;
        font-size: 13px;
    }
    .admin_menu a {
        min-height: 24px;
        line-height: 24px;
    }

    /* Pulsante "torna su" non sovrapposto ai controlli di sistema */
    #btn-back-to-top {
        right: 12px;
        bottom: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom));
    }

    /* Spaziature verticali eccessive impostate inline nelle viste */
    [style*="margin-top: 160px"] {
        margin-top: 110px !important;
    }
    [style*="margin-bottom: 130px"] {
        margin-bottom: 60px !important;
    }
    [style*="margin-top:110px;margin-left: 2%;margin-right: 2%;"] {
        margin-top: 90px !important;
        margin-left: 8px !important;
        margin-right: 8px !important;
    }
}

/* ---------- Smartphone (<= 480px) ---------- */
@media (max-width: 480px) {
    h1 {
        font-size: 28px;
    }
    h2 {
        font-size: 24px;
    }
    h3 {
        font-size: 20px;
    }
    .ml-btn,
    .btn {
        min-height: 40px;
    }
    .btn-xs {
        min-height: 32px;
        padding: 6px 10px;
    }
}

/* ---------- Schermi molto stretti (<= 360px) ---------- */
@media (max-width: 360px) {
    table thead tr th,
    table > thead > tr > th {
        font-size: 12px;
    }
    .admin_menu div {
        font-size: 12px;
    }
}

/* ---------- PWA in modalità standalone: rispetto delle aree sicure ---------- */
@media all and (display-mode: standalone) {
    body {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
}

/* ---------- Preferenza movimento ridotto ---------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- Form di registrazione ---------- */
.ml-regform .form-group {
    margin-bottom: 12px;
}
.ml-reg-label {
    display: block;
    margin: 0 0 4px;
    font-weight: 400;
    text-transform: uppercase;
    font-size: 13px;
    color: #373542;
}
.ml-reg-help {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    line-height: 16px;
    color: #999;
}
.ml-reg-error {
    display: block;
    min-height: 0;
    margin-top: 3px;
    font-size: 13px;
    line-height: 17px;
    color: darkred;
}
.ml-reg-error:empty {
    display: none;
}
.ml-regform .has-error .form-control {
    border-color: darkred;
}
.ml-pwd-wrap {
    position: relative;
    /* L'etichetta sopra è flottante: senza clear il contenitore la includerebbe
       e l'occhio (alto quanto il contenitore) risulterebbe spostato in alto */
    clear: both;
}
.ml-pwd-wrap .form-control {
    padding-right: 46px;
    /* Blocco: il contenitore ha la stessa altezza del campo e l'occhio resta centrato */
    display: block;
    width: 100%;
}
.ml-pwd-toggle {
    position: absolute;
    top: 0;
    right: 0;
    width: 44px;
    height: 100%;
    min-height: 34px;
    border: 0;
    background: transparent;
    color: #999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.ml-pwd-toggle:hover,
.ml-pwd-toggle:focus {
    color: #373542;
}
.ml-reg-consent label {
    font-weight: 400;
    font-size: 13px;
    line-height: 20px;
    cursor: pointer;
}
.ml-reg-consent input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0 6px 0 0;
    vertical-align: -3px;
}
/* Campo trappola anti-bot: fuori schermo ma non display:none */
.ml-hp {
    position: absolute !important;
    left: -10000px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.ml-reg-errors {
    margin: 10px 0 20px 18px;
    text-align: left;
}
.ml-reg-errors li {
    list-style: disc;
    color: darkred;
    margin-bottom: 4px;
}
#btnReg[disabled] {
    opacity: 0.7;
    cursor: wait;
}

/* ---------- Area Admin: ricerca globale e Panoramica ---------- */
.ml-admin-search {
    display: flex;
    gap: 6px;
    max-width: 560px;
    margin: 0 auto 15px;
}
.ml-admin-search .form-control {
    flex: 1 1 auto;
    min-width: 0;
}
.ml-dash-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}
.ml-dash-update {
    color: #999;
    font-size: 13px;
}
.ml-dash-season {
    margin: 10px 0 20px;
    padding: 12px 15px;
    background: #f7f7f7;
    border-left: 4px solid #ddaa11;
}
.ml-dash-progress {
    height: 8px;
    margin-top: 8px;
    background: #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
}
.ml-dash-progress > span {
    display: block;
    height: 100%;
    background: #b8860b;
    border-radius: 4px;
}
.ml-dash-progress-sm {
    display: inline-block;
    width: 70px;
    height: 6px;
    margin: 0 4px 0 0;
    vertical-align: middle;
}
.ml-dash-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 10px;
}
.ml-dash-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.ml-dash-grid > section,
.ml-dash-grid > figure {
    min-width: 0;
    margin: 0;
}
.ml-dash-card {
    background: #fff;
    border: 1px solid #ededed;
    border-top: 3px solid #ddaa11;
    padding: 12px 15px;
}
.ml-dash-card h4 {
    font-size: 16px;
    margin-bottom: 4px;
}
.ml-dash-big {
    font-size: 32px;
    line-height: 40px;
    color: #373542;
    margin-bottom: 8px;
}
.ml-dash-big small {
    font-size: 13px;
    color: #999;
}
.ml-dash-card dl {
    margin: 0;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 10px;
    font-size: 13px;
}
.ml-dash-card dt {
    font-weight: 400;
    color: #666;
}
.ml-dash-card dd {
    margin: 0;
    text-align: right;
    font-weight: 700;
    color: #373542;
}
.ml-dash-alerts {
    margin: 0 0 20px;
    padding: 0;
}
.ml-dash-alerts li {
    list-style: none;
    padding: 8px 12px;
    margin-bottom: 6px;
    border-left: 4px solid;
    background: #fafafa;
}
.ml-dash-alert-warning {
    border-color: #ddaa11 !important;
}
.ml-dash-alert-danger {
    border-color: darkred !important;
}
.ml-dash-alert-danger .glyphicon {
    color: darkred;
}
.ml-dash-alert-warning .glyphicon {
    color: #b8860b;
}
.ml-dash-ok {
    color: darkgreen;
}
.ml-neg {
    color: darkred;
    font-weight: 700;
}
.ml-chart figcaption {
    font-size: 14px;
    margin-bottom: 8px;
    color: #373542;
}
.ml-chart-total {
    display: block;
    font-size: 12px;
    color: #999;
}
.ml-chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 120px;
    border-bottom: 1px solid #ddd;
}
.ml-chart-bar {
    flex: 1 1 0;
    height: 100%;
    display: flex;
    align-items: flex-end;
    min-width: 0;
    cursor: default;
}
.ml-chart-bar > span {
    display: block;
    width: 100%;
    background: #b8860b;
    border-radius: 4px 4px 0 0;
}
.ml-chart-bar:hover > span,
.ml-chart-bar:focus > span {
    background: #373542;
}
.ml-chart-bar:focus {
    outline: 2px solid #373542;
    outline-offset: 1px;
}
.ml-chart-axis {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}
.ml-chart details {
    margin-top: 8px;
    font-size: 13px;
}
.ml-chart summary {
    cursor: pointer;
    color: #666;
}
.ml-dash-msg {
    margin: 0;
    padding: 0;
}
.ml-dash-msg li {
    list-style: none;
    padding: 6px 0;
    border-bottom: 1px solid #ededed;
}
@media (max-width: 1199px) {
    .ml-dash-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 767px) {
    .ml-dash-grid,
    .ml-dash-grid-2 {
        grid-template-columns: minmax(0, 1fr);
    }
    .ml-dash-big {
        font-size: 26px;
        line-height: 32px;
    }
}

/* Consenso privacy: il tema applica float:right ai link nei campi del modale
   (le parole risultavano invertite e attaccate) */
.ml-modal-content form fieldset .ml-reg-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.ml-modal-content form fieldset .ml-reg-consent input[type="checkbox"] {
    flex: 0 0 auto;
    margin: 1px 0 0;
    vertical-align: baseline;
}
.ml-modal-content form fieldset .ml-reg-consent label.ml-reg-consent-text {
    float: none;
    flex: 1 1 auto;
    display: block;
    margin: 0;
    font-weight: 400;
    font-size: 13px;
    line-height: 20px;
    text-transform: none;
}
.ml-modal-content form fieldset .ml-reg-consent a {
    float: none;
    display: inline;
    color: #b8860b;
    text-decoration: underline;
}
.ml-modal-content form fieldset .ml-reg-consent .ml-reg-error {
    flex-basis: 100%;
}
.ml-modal-content form fieldset .ml-reg-consent {
    flex-wrap: wrap;
}
.ml-modal-content form fieldset .ml-reg-consent label.ml-reg-consent-text {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
}

/* =====================================================================
   PAGINE STATISTICHE PUBBLICHE (ranking, top, all time, albo d'oro...)
   Struttura comune: .ml-pointstablewrapper > .bkpage / .bkpagecenter.
   Solo dimensioni e spaziature: colori e font del sito invariati.
   ===================================================================== */
@media (max-width: 767px) {
    /* Distanza dal logo: l'intestazione mobile è alta circa 128px */
    .ml-pointstablewrapper .bkpage,
    .ml-pointstablewrapper .bkpagecenter {
        margin-top: 150px !important;
        margin-bottom: 50px !important;
        padding-bottom: 12px;
    }
    /* Titolo della statistica */
    .ml-pointstablewrapper .bkpage > div:first-child > span[style*="font-size: 34px"],
    .ml-pointstablewrapper .bkpagecenter > div:first-child > span[style*="font-size: 34px"] {
        display: block;
        padding: 0 12px;
        margin-bottom: 6px;
        font-size: 28px !important;
        line-height: 1.15;
        letter-spacing: 0.5px;
    }
    /* Dimensioni proporzionate allo schermo */
    .ml-pointstablewrapper [style*="font-size: 40px"] { font-size: 30px !important; }
    .ml-pointstablewrapper [style*="font-size: 32px"] { font-size: 26px !important; }
    .ml-pointstablewrapper [style*="font-size: 28px"],
    .ml-pointstablewrapper [style*="font-size:28px"] { font-size: 23px !important; }
    .ml-pointstablewrapper [style*="font-size: 26px"] { font-size: 21px !important; }
    .ml-pointstablewrapper [style*="font-size: 24px"] { font-size: 20px !important; }
    .ml-pointstablewrapper [style*="font-size: 22px"] { font-size: 18px !important; }
    /* Righe più compatte e nomi lunghi che vanno a capo senza uscire */
    .ml-pointstablewrapper .bkpage table,
    .ml-pointstablewrapper .bkpagecenter table {
        margin-bottom: 8px;
    }
    .ml-pointstablewrapper .bkpage td,
    .ml-pointstablewrapper .bkpagecenter td {
        padding: 6px 6px;
        vertical-align: middle;
    }
    .ml-pointstablewrapper .bkpage td a,
    .ml-pointstablewrapper .bkpagecenter td a {
        overflow-wrap: anywhere;
    }
    /* Bandiere e loghi in proporzione */
    .ml-pointstablewrapper td img[style*="width:32px"] {
        width: 28px !important;
        max-width: 28px !important;
    }
    /* Spazio in fondo al footer: l'icona del consenso cookie in basso
       a sinistra non deve coprire copyright e link */
    .ml-footer .ml-footerbar {
        padding-bottom: 70px;
    }
}
@media (max-width: 360px) {
    .ml-pointstablewrapper .bkpage > div:first-child > span[style*="font-size: 34px"],
    .ml-pointstablewrapper .bkpagecenter > div:first-child > span[style*="font-size: 34px"] {
        font-size: 24px !important;
    }
}

/* Pagine statistiche: footer sempre a fondo pagina anche con poco contenuto.
   Il contenitore occupa almeno l'altezza dello schermo e il contenuto
   principale si allunga; intestazione (assoluta) e menu mobile (fisso)
   restano fuori dal flusso e non sono toccati. */
.ml-wrapper.ml-wrapper-grey {
    display: flex;
    flex-direction: column;
    height: auto; /* il tema imposta height:100%, che troncava le pagine lunghe */
    min-height: 100vh;
    min-height: 100dvh;
}
.ml-wrapper.ml-wrapper-grey > #ml-main {
    flex: 1 0 auto;
}
.ml-wrapper.ml-wrapper-grey > #ml-footer {
    flex-shrink: 0;
}

/* Finestra di LOGIN centrata verticalmente (tutte le larghezze).
   L'animazione di Bootstrap (scorrimento dall'alto) viene mantenuta
   partendo da poco sopra il centro. La registrazione, più lunga,
   resta allineata in alto. */
#ml-login.fade .modal-dialog {
    top: 50%;
    max-height: calc(100% - 24px);
    overflow-y: auto;
    -webkit-transform: translate(0, -60%);
    transform: translate(0, -60%);
}
#ml-login.in .modal-dialog {
    -webkit-transform: translate(0, -50%);
    transform: translate(0, -50%);
}

/* =====================================================================
   PULSANTI DEL TEMA (.ml-btn) IN BLU NOTTE PIENO (senza sfumature) su tutta la piattaforma
   (al posto del grigio antracite; testo e bordo oro invariati)
   ===================================================================== */
.ml-btn {
    background: #0c1127;
    background-image: none;
    transition: background 0.25s, box-shadow 0.25s;
}
.ml-btn:hover,
.ml-btn:focus {
    background: #1a2348;
    background-image: none;
    box-shadow: 0 4px 12px rgba(4, 10, 38, 0.35);
}
.ml-btn[disabled],
.ml-btn:disabled {
    background: #3c4670;
    background-image: none;
    box-shadow: none;
}

/* =====================================================================
   ORO PIÙ SCURO per maggiore risalto sul bianco
   ===================================================================== */
/* Pulsante "torna su" (tutte le pagine) */
#btn-back-to-top {
    background: #b8860b;
    border-color: #966c00;
    color: #fff;
}
#btn-back-to-top:hover,
#btn-back-to-top:focus {
    background: #966c00;
    color: #fff;
}
#btn-back-to-top .glyphicon {
    color: #fff;
}
/* Link delle statistiche in fondo alla home e link del footer: stesso oro del pulsante "torna su" */
/* (solo footer chiari: nelle pagine con footer blu notte resta l'oro chiaro) */
a.ml-link-stat,
a.ml-link-stat span,
.ml-wrapper:not(.ml-wrapper-grey) .ml-footer .ml-copyright a {
    color: #b8860b;
}
a.ml-link-stat:hover,
a.ml-link-stat:hover span,
.ml-wrapper:not(.ml-wrapper-grey) .ml-footer .ml-copyright a:hover {
    color: #966c00;
}

/* =====================================================================
   TITOLI LATERALI VERTICALI (.ml-section-name) rimossi su tutta la piattaforma
   ===================================================================== */
.ml-section-name {
    display: none !important;
}

/* Posizione "TOP VdM" in home: blu notte del pattern (al posto del verde) */
.ml-matchdate.ml-pos-notte {
    background: #0b1d5c;
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(90, 150, 255, 0.35), inset 0 -3px 0 #3fa9f5;
}

/* =====================================================================
   INTRO DELLA HOME in stile notte: sfondo unico a tutto schermo
   (public/images/intro/intro.jpg, versione _m per smartphone)
   ===================================================================== */
.ml-sliderbox.ml-intro-notte {
    height: 100vh;
    min-height: 560px;
    background: #040a26;
}
.ml-intro-notte .ml-imglayer,
.ml-intro-notte .ml-imglayer picture {
    position: absolute;
    inset: 0;
    display: block;
    height: 100%;
}
.ml-intro-notte .ml-imglayer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: ml-intro-zoom 18s ease-in-out infinite alternate;
}
/* Sfumatura verso la sezione successiva e leggero velo per la leggibilità */
.ml-intro-notte::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 50% 55%, rgba(4, 10, 38, 0) 35%, rgba(4, 10, 38, 0.55) 100%),
        linear-gradient(180deg, rgba(4, 10, 38, 0) 70%, #040a26 100%);
}
.ml-intro-notte .ml-home-slider {
    z-index: 2;
}
/* Sagoma del calciatore chiara e luminosa sul fondo scuro */
.ml-intro-notte .ml-home-slider .swiper-slide figure img {
    filter: brightness(0) invert(1) drop-shadow(0 0 18px rgba(34, 228, 255, 0.8));
    opacity: 0.16;
}
.ml-intro-notte .ml-slider-content h1 {
    text-shadow: 0 0 24px rgba(34, 228, 255, 0.35), 2px 0 #0c1127, -2px 0 #0c1127, 0 2px #0c1127, 0 -2px #0c1127;
}
.ml-intro-notte .ml-slider-content .ml-btnbox h2 {
    text-shadow: 0 0 14px rgba(34, 228, 255, 0.45), 1px 1px #0c1127, -1px -1px #0c1127;
}
@keyframes ml-intro-zoom {
    from { transform: scale(1); }
    to { transform: scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
    .ml-intro-notte .ml-imglayer img {
        animation: none;
    }
}

/* Sezioni che avevano il titolo laterale: contenuto centrato
   (prima era spostato a destra per lasciare spazio al titolo verticale) */
:has(> .ml-section-name) {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}
:has(> .ml-section-name)::before,
:has(> .ml-section-name)::after {
    display: none;
}
.ml-section-name ~ [class*="col-"].pull-right {
    float: none !important;
}
/* Su smartphone queste sezioni usano tutta la larghezza (margini laterali ridotti) */
@media (max-width: 767px) {
    .ml-section-name ~ [class*="col-"].pull-right {
        width: 100%;
        padding-left: 0;
        padding-right: 0;
    }
}

/* Icona del menu (pulsante giallo) sempre nera, su tutte le pagine */
.navbar-toggle .fa-bars,
.navbar-toggle:hover .fa-bars,
.navbar-toggle:focus .fa-bars {
    color: #000 !important;
}

/* Pulsante di chiusura del menu mobile (X): stesso stile del pulsante menu
   della home (riquadro giallo con icona nera), nella stessa posizione */
#ml-navigationm-mobile .ml-close {
    top: 28px;
    right: 30px;
    width: 70px;
    height: 48px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: #ffcc33;
    color: #000 !important;
    font-size: 26px;
    line-height: 46px;
    text-align: center;
}
#ml-navigationm-mobile .ml-close:hover,
#ml-navigationm-mobile .ml-close:focus {
    background: #eebb22;
    color: #000 !important;
}

/* Immagini delle sezioni della home in stile notte: angoli arrotondati e ombra */
img.ml-img-notte {
    width: 100%;
    height: auto;
    border: 1px solid rgba(34, 228, 255, 0.35);
    border-radius: 12px;
    box-shadow: 0 14px 30px rgba(4, 10, 38, 0.35), 0 0 22px rgba(34, 228, 255, 0.12);
}
/* Immagine sotto il link al regolamento (sezione "Diventa manager") */
.ml-description figure.ml-img-sotto {
    width: 100%;
    float: none;
    margin: 24px 0 0;
}
/* Sezione "Diventa manager" su desktop: logo e lavagna tattica a sinistra,
   testo a destra, colonne centrate in verticale */
.ml-description figure.ml-img-lato,
figure.ml-img-lato {
    width: 100%;
    float: none;
    margin: 28px 0 0;
}
@media (min-width: 992px) {
    .ml-row-manager {
        display: flex;
        align-items: center;
    }
    .ml-row-manager::before,
    .ml-row-manager::after {
        display: none;
    }
}
/* Sezione "Il gioco": solo il logo con un alone blu leggero */
figure.ml-logo-alone {
    position: relative;
    width: 100%;
    float: none;
    margin: 10px 0 20px;
    padding: 30px 0;
    text-align: center;
    background: radial-gradient(closest-side, rgba(11, 42, 138, 0.22), rgba(34, 120, 255, 0.10) 55%, rgba(255, 255, 255, 0) 100%);
}
figure.ml-logo-alone img {
    display: inline-block;
    width: 52%;
    max-width: 250px;
    height: auto;
    filter: drop-shadow(0 0 18px rgba(34, 120, 255, 0.35)) drop-shadow(0 10px 18px rgba(4, 10, 38, 0.25));
}
@media (max-width: 991px) {
    figure.ml-logo-alone img {
        width: 45%;
        max-width: 200px;
    }
}

/* =====================================================================
   FINESTRA DI REGISTRAZIONE compatta: entra nello schermo senza scorrere.
   Desktop/tablet: finestra centrata larga max 720px, campi su due colonne
   (squadra|manager, email, password|conferma). Smartphone: una colonna
   con spaziature ridotte. Se lo schermo è troppo basso scorre la finestra.
   ===================================================================== */
#ml-register.fade .modal-dialog {
    top: 50%;
    left: 50%;
    width: 94%;
    max-width: 720px;
    max-height: calc(100% - 20px);
    overflow-y: auto;
    -webkit-transform: translate(-50%, -56%);
    transform: translate(-50%, -56%);
}
#ml-register.in .modal-dialog {
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
}
#ml-register .ml-modal-content {
    padding: 18px 24px 8px;
}
#ml-register .ml-border-heading h3 {
    margin: 0;
}
#ml-register .ml-modal-content form {
    padding-top: 10px;
}
#ml-register .ml-regform .form-group {
    margin-bottom: 10px;
}
#ml-register .ml-reg-label {
    margin-bottom: 3px;
    font-size: 12px;
}
#ml-register .form-control {
    height: 40px;
    padding-top: 6px;
    padding-bottom: 6px;
}
#ml-register .ml-reg-help {
    margin-top: 2px;
    font-size: 11px;
    line-height: 14px;
}
#ml-register .ml-reg-consent {
    margin-bottom: 8px;
}
#ml-register .ml-btn {
    width: 100%;
}
@media (min-width: 768px) {
    #ml-register .ml-regform fieldset {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 18px;
    }
    #ml-register .ml-regform fieldset > .form-group {
        width: auto;
        float: none;
        min-width: 0;
    }
    #ml-register .ml-regform [data-field="email"],
    #ml-register .ml-regform .ml-reg-consent,
    #ml-register .ml-regform fieldset > .form-group:last-child {
        grid-column: 1 / -1;
    }
}
@media (max-width: 767px) {
    #ml-register .ml-modal-content {
        padding: 14px 16px 4px;
    }
    #ml-register .ml-regform .form-group {
        margin-bottom: 8px;
    }
    #ml-register .form-control {
        height: 38px;
    }
}

/* Posizione "TOP Skill" in home: oro con lineetta in basso oro scuro
   (come la lineetta azzurra dei box blu "TOP VdM") */
.ml-matchdate.ml-pos-oro {
    background: #cc9900;
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 230, 150, 0.35), inset 0 -3px 0 #8a6400;
}
/* Effetto al passaggio del mouse su entrambi i box (TOP VdM e TOP Skill) */
.ml-matchdate.ml-pos-notte,
.ml-matchdate.ml-pos-oro {
    transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}
.ml-ticket:hover .ml-matchdate.ml-pos-notte {
    transform: translateY(-3px);
    filter: brightness(1.25);
    box-shadow: inset 0 0 0 1px rgba(90, 150, 255, 0.6), inset 0 -4px 0 #3fa9f5, 0 8px 18px rgba(11, 29, 92, 0.35);
}
.ml-ticket:hover .ml-matchdate.ml-pos-oro {
    transform: translateY(-3px);
    filter: brightness(1.1);
    box-shadow: inset 0 0 0 1px rgba(255, 230, 150, 0.6), inset 0 -4px 0 #8a6400, 0 8px 18px rgba(138, 100, 0, 0.35);
}
@media (prefers-reduced-motion: reduce) {
    .ml-ticket:hover .ml-matchdate.ml-pos-notte,
    .ml-ticket:hover .ml-matchdate.ml-pos-oro {
        transform: none;
    }
}

/* =====================================================================
   MESSAGGIO ALL'UTENTE (home partecipante) in stile notte: finestra
   centrata su sfondo oscurato, altezza adattata al testo
   ===================================================================== */
.ml-msg-velo {
    position: fixed;
    inset: 0;
    z-index: 99987;
    background: rgba(2, 5, 15, 0.72);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}
.popupmsg.ml-msg-notte {
    top: 50%;
    left: 50%;
    width: 92%;
    max-width: 560px;
    height: auto;
    max-height: 82vh;
    overflow-y: auto;
    padding: 26px 26px 22px;
    border: 1px solid rgba(34, 228, 255, 0.3);
    border-radius: 16px;
    color: #e8eeff;
    background:
        linear-gradient(180deg, rgba(4, 10, 38, 0.82) 0%, rgba(11, 42, 138, 0.62) 60%, rgba(4, 10, 38, 0.92) 100%),
        url('../images/bk_page.jpg') center / cover no-repeat,
        #040a26;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transform: translate(-50%, -50%);
    animation: ml-msg-entra 0.35s ease-out;
}
.popupmsg.ml-msg-notte::before {
    content: '';
    position: absolute;
    top: 0;
    left: 12%;
    right: 12%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #22e4ff, #8a5cff, transparent);
}
.ml-msg-notte .ml-msg-etichetta {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(255, 204, 51, 0.15);
    color: #ffcc33;
    font-family: 'Oswald', sans-serif;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.popupmsg.ml-msg-notte h2 {
    margin: 14px 0 0;
    color: #fff;
    font-size: 24px;
    line-height: 1.2;
    text-transform: uppercase;
}
.ml-msg-notte h2 img {
    width: 42px;
    vertical-align: middle;
}
.ml-msg-notte .ml-msg-logo {
    width: 46px;
}
.ml-msg-notte .ml-msg-linea {
    width: 70px;
    height: 3px;
    margin: 12px 0 0;
    border-radius: 3px;
    background: linear-gradient(90deg, #22e4ff, #8a5cff);
}
.popupmsg.ml-msg-notte .content {
    margin-top: 16px;
    color: #e8eeff;
    font-size: 16px;
    line-height: 1.55;
}
.ml-msg-notte .content a {
    color: #ffcc33;
}
.ml-msg-notte .content strong {
    color: #fff;
}
.popupmsg.ml-msg-notte .close {
    top: 14px;
    right: 18px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 26px;
    line-height: 34px;
    text-align: center;
    opacity: 1;
    text-shadow: none;
}
.popupmsg.ml-msg-notte .close:hover {
    background: rgba(255, 204, 51, 0.25);
    color: #ffcc33;
}
.ml-msg-notte .ml-msg-azioni {
    margin-top: 22px;
    text-align: right;
}
@keyframes ml-msg-entra {
    from { opacity: 0; transform: translate(-50%, -46%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}
@media (prefers-reduced-motion: reduce) {
    .popupmsg.ml-msg-notte {
        animation: none;
    }
}

/* Testata della squadra nella home del partecipante: blu notte con
   sfumatura, righe diagonali leggere e filo azzurro in basso */
.ml-section-heading.ml-testata-notte {
    position: relative;
    overflow: hidden;
    border-bottom: 2px solid #1d4f8f;
    background:
        repeating-linear-gradient(115deg, rgba(60, 110, 200, 0.16) 0 1px, transparent 1px 24px) left top / 45% 45% no-repeat,
        radial-gradient(ellipse at 0% 50%, rgba(13, 40, 120, 0.85) 0%, rgba(13, 40, 120, 0) 55%),
        linear-gradient(90deg, #071a5a 0%, #040f3a 40%, #050d33 75%, #08154a 100%);
}
/* Celle evidenziate (es. punteggio nel dettaglio partita): blu notte */
td.ml-cella-notte {
    background: linear-gradient(90deg, #071a5a 0%, #050d33 100%);
}
/* Riquadri dei risultati delle partite: stesso blu notte delle testate */
.ml-matchresult,
.ml-matchresult2 {
    background:
        repeating-linear-gradient(115deg, rgba(60, 110, 200, 0.14) 0 1px, transparent 1px 24px) left top / 40% 50% no-repeat,
        linear-gradient(90deg, #071a5a 0%, #040f3a 45%, #050d33 80%, #08154a 100%);
    border-bottom: 2px solid #1d4f8f;
}

/* Pagine con tabelle (rosa, classifica, calendario...) su smartphone: margini laterali di 8px e tabella
   più compatta, così si vedono più colonne senza scorrere */
@media (max-width: 767px) {
    .container:has(> .ml-contentbox > .idteam),
    .container:has(> .ml-contentbox > .ml-description table.tablegrey),
    .container:has(> .ml-contentbox > .ml-description > .cal_all) {
        padding-left: 8px;
        padding-right: 8px;
    }
    .idteam table.tablegrey th,
    .idteam table.tablegrey td,
    .ml-contentbox > .ml-description table.tablegrey th,
    .ml-contentbox > .ml-description table.tablegrey td {
        padding-left: 4px !important;
        padding-right: 4px !important;
    }
    /* Calendario: riquadri delle giornate a tutta larghezza */
    .cal_all > .boxp_all {
        padding-left: 0;
        padding-right: 0;
    }
    /* Pulsanti delle giornate (1-10, 11-20...) sempre su una riga */
    .cal_all [class*="col-xs-2"][style*="eebb22"] {
        padding-left: 2px;
        padding-right: 2px;
        white-space: nowrap;
    }
    .idteam table.tablegrey td img[src*="/flags/"] {
        width: 24px !important;
        max-width: 24px !important;
    }
}

/* =====================================================================
   ULTIMO RISULTATO / PROSSIMA PARTITA (home partecipante): schede in
   stile notte con squadre ai lati e punteggio al centro tra linee viola.
   La prossima partita è in grigio chiaro (non ancora giocata).
   ===================================================================== */
.ml-match-card {
    position: relative;
    width: 100%;
    float: left;
    margin: 10px 0 0;
    padding: 22px 12px 20px;
    overflow: hidden;
    border-radius: 14px;
    text-align: center;
}
.ml-match-card::before,
.ml-match-card::after {
    content: '';
    position: absolute;
    left: 20%;
    right: 20%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #9b4dff, transparent);
}
.ml-match-card::before { top: 0; }
.ml-match-card::after { bottom: 0; }
.ml-match-giocata {
    color: #fff;
    background:
        linear-gradient(180deg, rgba(4, 10, 38, 0.78) 0%, rgba(11, 42, 138, 0.55) 55%, rgba(4, 10, 38, 0.9) 100%),
        url('../images/bk_page.jpg') center / cover no-repeat,
        #040a26;
    box-shadow: 0 14px 30px rgba(4, 10, 38, 0.35);
}
.ml-match-dagiocare {
    color: #2a2f45;
    border: 1px solid #dde1ea;
    background: linear-gradient(180deg, #f7f8fb 0%, #eceef3 100%);
}
.ml-match-riga {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: start;
    gap: 10px;
}
.ml-match-squadra {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}
.ml-match-squadra img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35));
}
.ml-match-dagiocare .ml-match-squadra img {
    filter: grayscale(0.15) drop-shadow(0 4px 6px rgba(0, 0, 0, 0.15));
}
.ml-match-card a.ml-match-nome {
    display: block;
    margin-top: 10px;
    max-width: 100%;
    font-family: 'Oswald', sans-serif;
    font-size: 18px;
    line-height: 1.2;
    overflow-wrap: anywhere;
    color: inherit !important;
}
.ml-match-gol {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
    color: #b9c8ef;
    font-size: 12px;
    line-height: 1.5;
}
.ml-match-gol li::before {
    content: '\26BD\00A0';
    font-size: 10px;
}
.ml-match-centro {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 92px;
    padding-top: 6px;
    color: inherit !important;
    text-decoration: none !important;
}
.ml-match-stato {
    font-family: 'Oswald', sans-serif;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #22e4ff;
}
.ml-match-dagiocare .ml-match-stato {
    color: #7a8094;
}
.ml-match-linea {
    width: 60px;
    height: 2px;
    margin: 8px 0;
    background: linear-gradient(90deg, transparent, #9b4dff, transparent);
}
.ml-match-punteggio {
    font-family: 'Oswald', sans-serif;
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}
.ml-match-dagiocare .ml-match-punteggio {
    color: #9aa0b2;
    font-style: italic;
}
.ml-match-dettaglio {
    margin-top: 10px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: rgba(255, 204, 51, 0.18);
    color: #ffcc33;
}
.ml-match-dagiocare .ml-match-dettaglio {
    background: rgba(12, 17, 39, 0.08);
    color: #5a6178;
}
.ml-match-centro:hover .ml-match-dettaglio {
    background: #ffcc33;
    color: #0c1127;
}
.ml-match-riposo {
    padding: 26px 0;
    font-family: 'Oswald', sans-serif;
    font-size: 22px;
    text-transform: uppercase;
    letter-spacing: 2px;
}
@media (max-width: 480px) {
    .ml-match-squadra img {
        width: 56px;
        height: 56px;
    }
    .ml-match-card a.ml-match-nome {
        font-size: 15px;
    }
    .ml-match-punteggio {
        font-size: 30px;
    }
    .ml-match-centro {
        min-width: 76px;
    }
}

/* Barra in alto delle pagine del partecipante (colori squadra + testata):
   stessa larghezza su tutte le pagine; su smartphone margini di 8px */
.ml-aboutussection [class*="col-md-12"]:has(> .ml-contentbox > .ml-testata-notte) {
    padding-left: 0;
    padding-right: 0;
}
@media (max-width: 767px) {
    .container:has(.ml-testata-notte) {
        padding-left: 8px;
        padding-right: 8px;
    }
}
/* Barra in alto del partecipante: 10px in più di distanza dal logo (30 -> 40px) */
.ml-aboutussection:has(.ml-testata-notte) {
    margin-top: 40px !important;
}

/* =====================================================================
   INTESTAZIONI DELLE TABELLE (area partecipante): grigio chiaro con linee
   viola sopra e sotto, come la scheda "Prossima partita"
   ===================================================================== */
.ml-main:has(.ml-testata-notte) table thead tr {
    background:
        linear-gradient(90deg, transparent, #9b4dff 50%, transparent) top / 100% 2px no-repeat,
        linear-gradient(90deg, transparent, #9b4dff 50%, transparent) bottom / 100% 2px no-repeat,
        linear-gradient(180deg, #f7f8fb 0%, #eceef3 100%);
}
.ml-main:has(.ml-testata-notte) table thead tr th {
    border-top: 0 !important;
    border-bottom: 0 !important;
    background: transparent !important;
    color: #5a6178 !important;
    font-family: 'Oswald', Arial, Helvetica, sans-serif;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.ml-main:has(.ml-testata-notte) table thead tr th a {
    color: #5a6178;
}
/* Riga dei totali in fondo alle tabelle: stesso stile dell'intestazione */
tr.ml-riga-totale {
    background:
        linear-gradient(90deg, transparent, #9b4dff 50%, transparent) top / 100% 2px no-repeat,
        linear-gradient(90deg, transparent, #9b4dff 50%, transparent) bottom / 100% 2px no-repeat,
        linear-gradient(180deg, #f7f8fb 0%, #eceef3 100%);
}
tr.ml-riga-totale > td {
    border-top: 0 !important;
    border-bottom: 0 !important;
    background: transparent !important;
    color: #5a6178 !important;
    font-family: 'Oswald', Arial, Helvetica, sans-serif;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* =====================================================================
   MAGLIA DELLA SQUADRA (SVG, Application_Maglia): anteprima e scelta stile
   ===================================================================== */
.ml-maglia-colori svg.ml-maglia {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 8px 12px rgba(4, 10, 38, 0.25));
}
.ml-maglia-anteprima,
.ml-maglia-retro {
    width: 180px;
    max-width: 70%;
    margin: 0 auto;
}
.ml-maglia-scelta-tit {
    margin: 14px 0 6px;
    font-size: 16px;
}
.ml-maglia-scelta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    max-width: 320px;
    margin: 0 auto 12px;
}
.ml-maglia-opzione {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin: 0;
    padding: 6px 4px 5px;
    border: 2px solid #e2e5ee;
    border-radius: 10px;
    background: #fff;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.ml-maglia-opzione input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.ml-maglia-opzione svg.ml-maglia {
    width: 58px;
    filter: none;
}
.ml-maglia-opzione:hover {
    border-color: #b9c2d8;
}
.ml-maglia-opzione:has(input:checked) {
    border-color: #0b1d5c;
    box-shadow: 0 0 0 2px rgba(255, 204, 51, 0.8);
}
.ml-maglia-opzione:has(input:focus-visible) {
    outline: 2px solid #0b1d5c;
    outline-offset: 2px;
}
/* Intestazioni e riga totali: padding interno uniforme e testo centrato in verticale */
.ml-main:has(.ml-testata-notte) table thead tr th,
tr.ml-riga-totale > td {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    padding-left: 10px;
    padding-right: 10px;
    line-height: 1.2 !important;
    vertical-align: middle !important;
}
.ml-main:has(.ml-testata-notte) table thead tr th > :is(h1, h2, h3, h4, h5, h6, p) {
    margin: 0;
    line-height: 1.2;
    color: inherit;
}
/* Titoli dentro le intestazioni: sempre grigi anche con colore impostato nel codice */
.ml-main:has(.ml-testata-notte) table thead tr th > :is(h1, h2, h3, h4, h5, h6, p, span) {
    color: #5a6178 !important;
}

/* Messaggio dell'admin nella home del partecipante: scheda come "Prossima partita" */
.ml-avviso-card {
    position: relative;
    width: 100%;
    float: left;
    margin: 12px 0 0;
    padding: 14px 20px 16px;
    overflow: hidden;
    border: 1px solid #dde1ea;
    border-radius: 14px;
    background: linear-gradient(180deg, #f7f8fb 0%, #eceef3 100%);
    color: #2a2f45;
    text-align: center;
}
.ml-avviso-card::before,
.ml-avviso-card::after {
    content: '';
    position: absolute;
    left: 20%;
    right: 20%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #9b4dff, transparent);
}
.ml-avviso-card::before { top: 0; }
.ml-avviso-card::after { bottom: 0; }
.ml-avviso-testa {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.ml-avviso-testa img {
    width: 34px;
    height: auto;
}
.ml-avviso-etichetta {
    margin-top: 6px;
    font-family: 'Oswald', sans-serif;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #7a8094;
}
.ml-avviso-linea {
    width: 60px;
    height: 2px;
    margin: 8px 0 12px;
    background: linear-gradient(90deg, transparent, #9b4dff, transparent);
}
.ml-avviso-testo {
    font-size: 17px;
    line-height: 1.55;
    color: #2a2f45;
}
.ml-avviso-firma {
    margin-top: 12px;
    font-family: 'Oswald', sans-serif;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #9aa0b2;
}

/* =====================================================================
   PAGINA CASSA (area partecipante): riepilogo, indicatori, grafici
   ===================================================================== */
.ml-cassa-hero {
    position: relative;
    margin: 6px 0 14px;
    padding: 18px 16px 16px;
    overflow: hidden;
    border-radius: 14px;
    color: #fff;
    background:
        repeating-linear-gradient(115deg, rgba(60, 110, 200, 0.16) 0 1px, transparent 1px 24px) left top / 45% 100% no-repeat,
        linear-gradient(90deg, #071a5a 0%, #040f3a 45%, #050d33 80%, #08154a 100%);
    box-shadow: 0 12px 26px rgba(4, 10, 38, 0.25);
}
.ml-cassa-hero::after {
    content: '';
    position: absolute;
    left: 20%;
    right: 20%;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #9b4dff, transparent);
}
.ml-cassa-hero-tit {
    font-family: 'Oswald', sans-serif;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #a9bdf0;
}
.ml-cassa-hero-tit img {
    width: 26px;
    vertical-align: middle;
    filter: brightness(0) invert(1);
    opacity: 0.85;
}
.ml-cassa-hero-val {
    margin-top: 4px;
    font-family: 'Oswald', sans-serif;
    font-size: 38px;
    font-weight: 700;
    line-height: 1.1;
    color: #4be08a;
}
.ml-cassa-hero.is-rosso .ml-cassa-hero-val {
    color: #ff7a7a;
}
.ml-cassa-hero-sub {
    margin-top: 6px;
    font-size: 13px;
    color: #c9d3f0;
}
.ml-cassa-kpi {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.ml-cassa-kpi-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 12px 8px;
    border: 1px solid #dde1ea;
    border-radius: 12px;
    background: linear-gradient(180deg, #f7f8fb 0%, #eceef3 100%);
}
.ml-cassa-kpi-l {
    font-family: 'Oswald', sans-serif;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #7a8094;
}
.ml-cassa-kpi-v {
    font-family: 'Oswald', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #2a2f45;
    white-space: nowrap;
}
.ml-cassa-kpi-n {
    font-size: 11px;
    line-height: 1.3;
    color: #5a6178;
}
.is-verde { color: #1f9d55 !important; }
.is-rosso { color: #d64545 !important; }
.ml-cassa-hero .is-rosso { color: #ff7a7a !important; }
.ml-cassa-nota {
    float: none;
    margin: 8px 0 0;
    font-size: 12px;
    color: #9aa0b2;
}
.ml-cassa-card {
    position: relative;
    margin-top: 16px;
    padding: 14px 14px 12px;
    border: 1px solid #dde1ea;
    border-radius: 14px;
    background: #fff;
    text-align: left;
}
.ml-cassa-card::before {
    content: '';
    position: absolute;
    left: 20%;
    right: 20%;
    top: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #9b4dff, transparent);
}
.ml-cassa-card-tit {
    margin-bottom: 10px;
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #2a2f45;
}
.ml-cassa-card-tit small {
    margin-left: 6px;
    font-size: 11px;
    letter-spacing: 0;
    text-transform: none;
    color: #9aa0b2;
}
svg.ml-cassa-grafico {
    display: block;
    width: 100%;
    height: 180px;
}
.ml-cassa-assi {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    font-size: 11px;
    color: #9aa0b2;
}
.ml-cassa-barre {
    margin: 0;
    padding: 0;
    list-style: none;
}
.ml-cassa-barre li {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid #f0f1f5;
    font-size: 14px;
}
.ml-cassa-barre li:last-child {
    border-bottom: 0;
}
.ml-cassa-barre-l small {
    color: #9aa0b2;
}
.ml-cassa-barre-t {
    display: block;
    height: 8px;
    border-radius: 6px;
    background: #eef0f5;
    overflow: hidden;
}
.ml-cassa-barre-t span {
    display: block;
    height: 100%;
    border-radius: 6px;
    background: currentColor;
}
.ml-cassa-barre-v {
    min-width: 92px;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}
.ml-cassa-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 22px 0 6px;
}
.ml-cassa-tab {
    padding: 8px 16px;
    border: 1px solid #dde1ea;
    border-radius: 20px;
    background: #fff;
    color: #5a6178;
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.ml-cassa-tab.is-attivo {
    border-color: #0b1d5c;
    background: #0b1d5c;
    color: #ffcc33;
}
td.ml-cassa-imp {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    white-space: nowrap;
}
@media (max-width: 767px) {
    .ml-cassa-kpi {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .ml-cassa-kpi-v {
        font-size: 18px;
    }
    .ml-cassa-hero-val {
        font-size: 32px;
    }
    svg.ml-cassa-grafico {
        height: 140px;
    }
    .ml-cassa-barre li {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 4px 10px;
    }
    .ml-cassa-barre-t {
        grid-column: 1 / -1;
        grid-row: 2;
    }
    .ml-cassa-barre-v {
        min-width: 0;
    }
    .ml-cassa-tab {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* Regolamento: righe di intestazione delle tabelle dei premi nello stesso
   stile delle intestazioni dell'area partecipante (grigio e viola) */
tr.ml-tr-intestazione {
    background:
        linear-gradient(90deg, transparent, #9b4dff 50%, transparent) top / 100% 2px no-repeat,
        linear-gradient(90deg, transparent, #9b4dff 50%, transparent) bottom / 100% 2px no-repeat,
        linear-gradient(180deg, #f7f8fb 0%, #eceef3 100%) !important;
}
tr.ml-tr-intestazione > td,
tr.ml-tr-intestazione > th {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    background: transparent !important;
    color: #5a6178 !important;
    font-family: 'Oswald', Arial, Helvetica, sans-serif;
    font-weight: 400 !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    vertical-align: middle !important;
}
/* Importi su una riga sola (la tabella scorre di lato se serve) */
.ml-tab-premi td {
    white-space: nowrap;
}
.ml-cassa-assi strong {
    font-family: 'Oswald', sans-serif;
    font-size: 13px;
    color: #2a2f45;
}
.ml-cassa-assi-c {
    align-self: flex-end;
    text-align: center;
}

/* =====================================================================
   PAGINA MERCATO: numeri, filtri e paginazione
   ===================================================================== */
.ml-mercato-kpi {
    margin-bottom: 16px;
}
.ml-mercato-filtri {
    position: relative;
    margin: 6px 0 18px;
    padding: 16px 14px 14px;
    border: 1px solid #c9cedb;
    border-radius: 14px;
    /* Grigio più scuro: i campi bianchi risaltano meglio */
    background: linear-gradient(180deg, #e3e6ed 0%, #d4d8e1 100%);
    text-align: left;
}
.ml-mercato-filtri::before {
    content: '';
    position: absolute;
    left: 20%;
    right: 20%;
    top: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #9b4dff, transparent);
}
.ml-mercato-filtri-tit {
    margin-bottom: 10px;
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #2a2f45;
}
.ml-mercato-cerca input {
    height: 42px;
    border-radius: 10px;
}
.ml-mercato-griglia {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}
.ml-mercato-griglia label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    font-family: 'Oswald', sans-serif;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #7a8094;
}
.ml-mercato-griglia select.form-control {
    width: 100%;
    height: 40px;
    padding: 6px 8px;
    border-radius: 10px;
    background-color: #fff;
    color: #2a2f45;
    font-size: 14px;
    letter-spacing: 0;
    text-transform: none;
}
.ml-mercato-azioni {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
}
.ml-mercato-azzera {
    color: #5a6178;
    font-size: 13px;
    text-decoration: underline;
}
.ml-mercato-conta {
    margin-left: 6px;
    color: #9aa0b2;
    font-size: 13px;
    text-transform: none;
}
.ml-mercato-pagine {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 12px 0 26px;
    font-size: 14px;
    color: #5a6178;
}
.ml-mercato-pagine a {
    padding: 6px 14px;
    border: 1px solid #dde1ea;
    border-radius: 20px;
    background: #fff;
    color: #0b1d5c;
}
@media (max-width: 991px) {
    .ml-mercato-griglia {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .ml-mercato-griglia label:last-child {
        grid-column: 1 / -1;
    }
}
.ml-cassa-hero,
.ml-cassa-kpi-box {
    text-align: center;
}
/* Paginazione sotto l'elenco (la tabella del tema è flottante) */
.ml-mercato-pagine {
    clear: both;
    float: left;
    width: 100%;
}
.ml-mercato-schede {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 14px;
}
.ml-mercato-schede a {
    padding: 7px 14px;
    border: 1px solid #dde1ea;
    border-radius: 20px;
    background: #fff;
    color: #5a6178;
    font-family: 'Oswald', sans-serif;
    font-size: 13px;
    text-transform: uppercase;
}
.ml-mercato-schede a.is-attivo {
    border-color: #0b1d5c;
    background: #0b1d5c;
    color: #ffcc33;
}

/* Riepilogo squadra nella home del partecipante: riquadri come Cassa/Mercato */
.ml-home-kpi {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 16px 0 6px;
}
.ml-home-kpi a.ml-cassa-kpi-box {
    color: inherit;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.ml-home-kpi a.ml-cassa-kpi-box:hover,
.ml-home-kpi a.ml-cassa-kpi-box:focus {
    transform: translateY(-2px);
    border-color: #b9a6ff;
    box-shadow: 0 8px 18px rgba(11, 29, 92, 0.12);
}
.ml-home-vnp small {
    margin: 0 6px 0 1px;
    font-size: 12px;
    color: #b8860b;
}
@media (max-width: 767px) {
    .ml-home-kpi {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* =====================================================================
   CLASSIFICA (area partecipante): vista semplificata/completa e forma
   ===================================================================== */
.ml-classifica-vista {
    display: flex;
    margin: 4px 0 14px;
    padding: 4px;
    border-radius: 12px;
    background: #e4e7ef;
}
.ml-classifica-vista button {
    flex: 1 1 0;
    padding: 9px 10px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #5a6178;
    font-family: 'Oswald', sans-serif;
    font-size: 15px;
}
.ml-classifica-vista button.is-attivo {
    background: #fff;
    color: #0b1d5c;
    box-shadow: 0 2px 8px rgba(11, 29, 92, 0.12);
}
.ml-classifica-scroll {
    overflow-x: auto;
}
table.ml-classifica-tab {
    width: 100%;
    border-collapse: collapse;
}
table.ml-classifica-tab th,
table.ml-classifica-tab td {
    padding: 10px 4px !important;
    border: 0 !important;
    border-bottom: 1px solid #e8eaf0 !important;
    text-align: center;
    vertical-align: middle !important;
    white-space: nowrap;
}
table.ml-classifica-tab thead tr th {
    font-size: 13px;
}
table.ml-classifica-tab td.cl-pos {
    position: relative;
    width: 36px;
    color: #5a6178;
    font-size: 15px;
}
/* Barra colorata della zona (coppa, promozione, retrocessione) */
table.ml-classifica-tab tr[class*="cl-z-"] td.cl-pos::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 3px;
}
tr.cl-z-coppa td.cl-pos::before,
.ml-classifica-legenda i.cl-z-coppa { background: #ffcc33; }
tr.cl-z-promo td.cl-pos::before,
.ml-classifica-legenda i.cl-z-promo { background: #1f9d55; }
tr.cl-z-retro td.cl-pos::before,
.ml-classifica-legenda i.cl-z-retro { background: #d64545; }
table.ml-classifica-tab td.cl-sq,
table.ml-classifica-tab th.cl-sq {
    text-align: left;
}
table.ml-classifica-tab td.cl-sq a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2a2f45;
    font-size: 16px;
}
table.ml-classifica-tab td.cl-sq img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    flex: 0 0 34px;
}
table.ml-classifica-tab td.cl-sq span {
    overflow: hidden;
    max-width: 170px;
    text-overflow: ellipsis;
}
table.ml-classifica-tab td.cl-n {
    min-width: 30px;
    color: #2a2f45;
    font-size: 15px;
}
table.ml-classifica-tab td.cl-pti {
    min-width: 38px;
    color: #0b1d5c;
    font-family: 'Oswald', sans-serif;
    font-size: 18px;
    font-weight: 700;
}
tr.cl-mia td {
    background: #fff8e1;
}
.cl-esito {
    display: inline-block;
    width: 24px;
    height: 24px;
    margin: 0 1px;
    border-radius: 50%;
    color: #fff;
    font-family: 'Oswald', sans-serif;
    font-size: 12px;
    font-weight: 700;
    line-height: 24px;
    text-align: center;
}
.cl-esito-v { background: #1f9d55; }
.cl-esito-n { background: #b9bfd0; color: #2a2f45; }
.cl-esito-p { background: #d64545; }
.cl-esito.cl-ultima {
    box-shadow: 0 3px 0 -1px #fff, 0 5px 0 -1px currentColor;
}
.cl-esito-v.cl-ultima { box-shadow: 0 4px 0 -2px #fff, 0 6px 0 -2px #1f9d55; }
.cl-esito-n.cl-ultima { box-shadow: 0 4px 0 -2px #fff, 0 6px 0 -2px #9aa0b2; }
.cl-esito-p.cl-ultima { box-shadow: 0 4px 0 -2px #fff, 0 6px 0 -2px #d64545; }
.cl-nd {
    color: #b9bfd0;
}
/* Vista semplificata: nascoste le colonne della vista completa */
.ml-classifica:not(.is-completa) .cl-full,
.ml-classifica:not(.is-completa) .cl-full-legenda {
    display: none;
}
.ml-classifica-legenda {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-top: 10px;
    font-size: 12px;
    color: #5a6178;
}
.ml-classifica-legenda i {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 4px;
    border-radius: 2px;
    vertical-align: -1px;
}
.ml-classifica-legenda .cl-esito {
    width: 18px;
    height: 18px;
    font-size: 10px;
    line-height: 18px;
}
@media (max-width: 480px) {
    table.ml-classifica-tab td.cl-sq a {
        font-size: 15px;
        gap: 8px;
    }
    table.ml-classifica-tab td.cl-sq img {
        width: 28px;
        height: 28px;
        flex-basis: 28px;
    }
    table.ml-classifica-tab td.cl-sq span {
        max-width: 120px;
    }
}
/* Vista completa su smartphone: solo lo stemma (come le classifiche ufficiali) */
@media (max-width: 767px) {
    .ml-classifica.is-completa table.ml-classifica-tab td.cl-sq span,
    .ml-classifica.is-completa table.ml-classifica-tab th.cl-sq {
        font-size: 0;
    }
    .ml-classifica.is-completa table.ml-classifica-tab td.cl-sq span {
        display: none;
    }
    .ml-classifica.is-completa table.ml-classifica-tab th,
    .ml-classifica.is-completa table.ml-classifica-tab td {
        padding-left: 2px !important;
        padding-right: 2px !important;
    }
    .ml-classifica.is-completa table.ml-classifica-tab td.cl-n {
        min-width: 22px;
        font-size: 14px;
    }
    .ml-classifica.is-completa .cl-esito {
        width: 20px;
        height: 20px;
        font-size: 11px;
        line-height: 20px;
    }
}

/* =====================================================================
   SCHEDA CLUB (pagina squadra, sezione "Il club")
   ===================================================================== */
.ml-club-hero {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 6px 0 14px;
    padding: 16px;
    overflow: hidden;
    border-radius: 14px;
    color: #fff;
    background:
        repeating-linear-gradient(115deg, rgba(60, 110, 200, 0.16) 0 1px, transparent 1px 24px) left top / 45% 100% no-repeat,
        linear-gradient(90deg, #071a5a 0%, #040f3a 45%, #050d33 80%, #08154a 100%);
    box-shadow: 0 12px 26px rgba(4, 10, 38, 0.25);
    text-align: left;
}
.ml-club-hero::after {
    content: '';
    position: absolute;
    left: 20%;
    right: 20%;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #9b4dff, transparent);
}
.ml-club-logo {
    flex: 0 0 84px;
    width: 84px;
    height: 84px;
    object-fit: contain;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.4));
}
.ml-club-info {
    flex: 1 1 auto;
    min-width: 0;
}
.ml-club-nome {
    font-family: 'Oswald', sans-serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.15;
    text-transform: uppercase;
}
.ml-club-manager {
    margin-top: 2px;
    font-size: 13px;
    color: #a9bdf0;
}
a.ml-club-pos {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    color: #e8eeff !important;
    font-size: 14px;
    line-height: 1.3;
}
a.ml-club-pos img {
    flex: 0 0 24px;
    width: 24px;
    border-radius: 3px;
}
a.ml-club-pos strong {
    color: #ffcc33;
}
.ml-club-vnp {
    margin-top: 10px;
    font-family: 'Oswald', sans-serif;
    font-size: 16px;
}
.ml-club-vnp .cl-esito {
    width: 22px;
    height: 22px;
    margin: 0 2px 0 6px;
    font-size: 11px;
    line-height: 22px;
}
.ml-club-vnp .cl-esito:first-child {
    margin-left: 0;
}
.ml-club-maglia {
    flex: 0 0 92px;
    width: 92px;
}
.ml-club-kpi {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.ml-club-trofei {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}
.ml-club-trofeo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 6px;
    border: 1px solid #ecdca4;
    border-radius: 12px;
    background: linear-gradient(180deg, #fffbea 0%, #fff4cc 100%);
    text-align: center;
}
.ml-club-trofeo img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}
.ml-club-trofeo strong {
    font-family: 'Oswald', sans-serif;
    font-size: 20px;
    color: #8a6400;
}
.ml-club-trofeo span {
    font-size: 12px;
    line-height: 1.2;
    color: #5a6178;
}
@media (max-width: 767px) {
    .ml-club-hero {
        flex-wrap: wrap;
        gap: 12px;
    }
    .ml-club-logo {
        flex-basis: 64px;
        width: 64px;
        height: 64px;
    }
    .ml-club-nome {
        font-size: 20px;
    }
    .ml-club-maglia {
        position: absolute;
        right: 10px;
        top: 10px;
        width: 54px;
        opacity: 0.9;
    }
    .ml-club-info {
        flex-basis: calc(100% - 140px);
    }
    .ml-club-kpi {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 767px) {
    .ml-club-hero:has(.ml-club-maglia) .ml-club-info {
        padding-right: 56px;
    }
}

/* =====================================================================
   CALENDARIO: competizioni a colori e menù delle giornate a scorrimento
   (Campionato oro, Coppa Nazionale blu, Coppa Intercontinentale verde)
   ===================================================================== */
.ml-cal { --cc: #b8960b; --cc-scuro: #7a6206; --cc-chiaro: #fff7da; }
.ml-cal.is-naz, .ml-cal .is-naz { --cc: #24478f; --cc-scuro: #142a5c; --cc-chiaro: #e6edfb; }
.ml-cal.is-inter, .ml-cal .is-inter { --cc: #0a7a33; --cc-scuro: #00491d; --cc-chiaro: #e3f5e9; }
.ml-cal .is-camp { --cc: #b8960b; --cc-scuro: #7a6206; --cc-chiaro: #fff7da; }

.ml-cal-comp { display: flex; gap: 8px; margin: 10px 0 18px; }
.ml-cal-comp a {
    flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 10px 6px 9px; border-radius: 12px; background: #f3f4f8; border: 2px solid transparent;
    color: #4a5068; font-family: 'Oswald', sans-serif; text-transform: uppercase; letter-spacing: .5px;
    font-size: 13px; line-height: 1.15; text-align: center; transition: background .2s, border-color .2s;
    border-bottom: 4px solid var(--cc);
}
.ml-cal-comp a img { width: 40px; height: 40px; object-fit: contain; filter: grayscale(1); opacity: .55; }
.ml-cal-comp a:hover { background: var(--cc-chiaro); color: var(--cc-scuro); }
.ml-cal-comp a.is-attiva { background: var(--cc); border-color: var(--cc); color: #fff; box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
.ml-cal-comp a.is-attiva img { filter: none; opacity: 1; }

.ml-cal-strip-box { position: relative; display: flex; align-items: stretch; gap: 6px; margin-bottom: 14px; }
.ml-cal-strip {
    flex: 1 1 auto; display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 4px 2px 8px;
}
.ml-cal-strip::-webkit-scrollbar { display: none; }
.ml-cal-freccia {
    flex: 0 0 34px; border: 0; border-radius: 10px; background: #0c1127; color: #fff;
    font-size: 26px; line-height: 1; cursor: pointer;
}
.ml-cal-freccia:hover { background: var(--cc); }
.ml-cal-chip {
    flex: 0 0 auto; scroll-snap-align: center; min-width: 74px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 1px; padding: 7px 10px; border-radius: 12px;
    background: #fff; border: 1px solid #dfe2ec; color: #20253a; font-family: 'Oswald', sans-serif;
    cursor: pointer; text-decoration: none; line-height: 1.15;
}
.ml-cal-chip small { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: #7c829a; }
.ml-cal-chip b { font-size: 17px; font-weight: 600; white-space: nowrap; }
.ml-cal-chip em { font-style: normal; font-size: 11px; color: var(--cc-scuro); text-transform: uppercase; white-space: nowrap; }
.ml-cal-chip.is-giocata { background: #f6f7fa; }
.ml-cal-chip:hover { border-color: var(--cc); }
.ml-cal-chip.is-attivo { background: var(--cc); border-color: var(--cc); color: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .2); }
.ml-cal-chip.is-attivo small, .ml-cal-chip.is-attivo em { color: rgba(255, 255, 255, .85); }
/* Turni di coppa intercalati nel campionato: rimandano all'altro calendario */
.ml-cal-chip.is-coppa { background: var(--cc-chiaro); border: 1px dashed var(--cc); color: var(--cc-scuro); min-width: 90px; }
.ml-cal-chip.is-coppa small { color: var(--cc); font-weight: 600; }
.ml-cal-chip.is-coppa b { font-size: 13px; }
.ml-cal-chip.is-coppa:hover, .ml-cal-chip.is-coppa:focus { color: var(--cc-scuro); text-decoration: none; border-style: solid; }

.ml-cal.js-attivo .ml-cal-giornata { display: none; }
.ml-cal.js-attivo .ml-cal-giornata.is-attiva { display: block; animation: mlCalComparsa .25s ease; }
@keyframes mlCalComparsa { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ml-cal-giornata { margin-bottom: 18px; border-radius: 14px; overflow: hidden; background: #fff; border: 1px solid #e3e6ef; box-shadow: 0 6px 18px rgba(12, 17, 39, .06); }
.ml-cal-testa {
    display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap;
    padding: 12px 16px; background: linear-gradient(120deg, var(--cc-scuro), var(--cc)); color: #fff;
}
.ml-cal-testa h3 { margin: 0; color: #fff; font-size: 20px; text-transform: uppercase; letter-spacing: .5px; }
.ml-cal-testa span { font-size: 14px; opacity: .9; }
.ml-cal-partite { display: grid; grid-template-columns: 1fr; }
@media (min-width: 768px) { .ml-cal-partite { grid-template-columns: 1fr 1fr; } }
.ml-cal-match { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid #eef0f5; border-left: 4px solid transparent; }
@media (min-width: 768px) { .ml-cal-match:nth-child(odd) { border-right: 1px solid #eef0f5; } }
.ml-cal-match.is-mia { background: var(--cc-chiaro); border-left-color: var(--cc); }
.ml-cal-sq { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ml-cal-sq a { display: flex; align-items: center; gap: 10px; color: #3a3f55; font-size: 15px; line-height: 1.2; min-width: 0; }
.ml-cal-sq a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-cal-sq a.is-vince { color: #0c1127; font-weight: 700; }
.ml-cal-sq img { width: 28px; height: 28px; object-fit: contain; flex: 0 0 28px; }
.ml-cal-ris {
    flex: 0 0 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    padding: 4px 0; border-left: 1px solid #eef0f5; color: #6d738a; font-family: 'Oswald', sans-serif; text-decoration: none;
}
.ml-cal-ris b { font-size: 18px; line-height: 28px; font-weight: 500; }
.ml-cal-ris b.is-vince { color: #0c1127; font-weight: 700; }
a.ml-cal-ris:hover, a.ml-cal-ris:focus { text-decoration: none; color: var(--cc-scuro); background: var(--cc-chiaro); }
.ml-cal-ris.is-da-giocare { font-size: 15px; color: #20253a; gap: 0; }
.ml-cal-ris.is-da-giocare small { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: #9aa0b4; }
.ml-cal-vuoto { text-align: center; color: #7c829a; padding: 30px 0; }
@media (max-width: 480px) {
    .ml-cal-comp a { font-size: 11px; padding: 8px 4px; }
    .ml-cal-comp a img { width: 32px; height: 32px; }
    .ml-cal-freccia { display: none; }
    .ml-cal-match { padding: 9px 10px; }
}
/* Icona della competizione attiva in bianco (leggibile sul fondo colorato) */
.ml-cal-comp a.is-attiva img { filter: brightness(0) invert(1); opacity: 1; }

/* Intro della home: titolo "Masters League / Stagione N" centrato in verticale
   (prima il padding superiore fisso di 245px lo spingeva in basso) */
.ml-intro-notte .ml-home-slider {
    padding: 90px 0 40px;
    display: flex;
    align-items: center;
}
.ml-intro-notte .ml-home-slider .swiper-wrapper,
.ml-intro-notte .ml-home-slider .swiper-slide { height: auto; }
.ml-intro-notte .ml-home-slider .swiper-slide > .container { position: relative; width: 100%; }
.ml-intro-notte .ml-home-slider .swiper-slide figure {
    position: absolute; top: 50%; left: 0; right: 0; transform: translateY(-50%); float: none;
}
.ml-intro-notte .ml-slider-content {
    position: relative; top: auto; margin: 0; padding: 0 16px;
}
.ml-intro-notte .ml-slider-content .ml-btnbox { text-align: center; }
.ml-intro-notte .ml-slider-content .ml-btnbox h2 { float: none; display: inline-block; margin: 0; }
.ml-intro-notte .ml-slider-content h1 { text-align: center; }

/* "Diventa manager": spazio tra logo e titolo "Il destino del club..." */
.ml-row-manager > div > img[alt^="logo"] { margin-bottom: 28px; }
/* Spazio tra il QR code di Instagram e i link agli hashtag */
.ml-insta-qr { margin-bottom: 40px; }

/* =====================================================================
   MENÙ MOBILE DELL'AREA PARTECIPANTE: pannello laterale a tutta altezza
   in stile notte (icona + voce, voce corrente evidenziata)
   ===================================================================== */
@media (max-width: 991px) {
    .ml-wrapper > .ml-navigationm-mobile.ml-menu-notte {
        left: 0; top: 0; bottom: 0; right: auto;
        width: min(86vw, 380px); height: 100vh; height: 100dvh; max-height: none;
        padding: 0 !important; overflow-y: auto; overflow-x: hidden;
        display: flex !important; flex-direction: column;
        background:
            radial-gradient(120% 60% at 100% 100%, rgba(155, 77, 255, .28), transparent 60%),
            radial-gradient(90% 50% at 0% 0%, rgba(34, 228, 255, .14), transparent 60%),
            linear-gradient(180deg, #0b1d5c 0%, #071341 45%, #040a26 100%);
        /* Scorrimento fluido: solo transform (composto dalla GPU, nessun repaint a ogni frame).
           Lo sfondo scurito è un livello separato (.ml-menu-velo) che anima solo l'opacità. */
        transform: translate3d(-105%, 0, 0);
        transition: transform .26s cubic-bezier(.22, .61, .36, 1);
        will-change: transform;
        backface-visibility: hidden;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
    }
    .ml-wrapper > .ml-navigationm-mobile.ml-menu-notte.in {
        transform: translate3d(0, 0, 0);
        box-shadow: 0 0 40px rgba(4, 10, 38, .45);
    }
    .ml-wrapper > .ml-navigationm-mobile.ml-menu-notte.collapsing { height: 100vh !important; transition: none; }
    /* Velo scuro dietro al menù (aggiunto da area-partecipante.js) */
    .ml-menu-velo {
        position: fixed; inset: 0; z-index: 9998; background: rgba(4, 10, 38, .62);
        opacity: 0; pointer-events: none; transition: opacity .26s ease; will-change: opacity;
    }
    .ml-menu-velo.is-visibile { opacity: 1; pointer-events: auto; }
    /* Pagina sotto bloccata mentre il menù è aperto */
    .ml-wrapper.ml-menu-aperto { overflow: hidden !important; }
    #ml-navigationm-mobile.ml-menu-notte .ml-close {
        top: 14px; right: 14px; width: 44px; height: 44px; line-height: 42px; font-size: 20px; border-radius: 10px; z-index: 3;
    }
    .ml-menu-testa { flex: 0 0 auto; padding: 22px 22px 16px; text-align: center; border-bottom: 1px solid rgba(255, 255, 255, .09); }
    .ml-menu-logo { width: 96px; height: auto; display: block; margin: 0 auto; filter: drop-shadow(0 6px 18px rgba(34, 228, 255, .25)); }
    .ml-menu-squadra { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 12px; color: #fff; font-family: 'Oswald', sans-serif; font-size: 16px; text-transform: uppercase; letter-spacing: .6px; }
    .ml-menu-squadra img { width: 30px; height: 30px; object-fit: contain; }
    .ml-menu-voci { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: space-between; padding: 8px 0 4px; }
    .ml-menu-voci ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
    .ml-menu-voci > ul:first-child { flex: 1 1 auto; justify-content: space-evenly; }
    .ml-menu-voci li { display: block; margin: 0; padding: 0; float: none; width: auto; line-height: 0; }
    .ml-menu-voci li a i { line-height: 1; }
    .ml-menu-voci li a {
        display: flex; align-items: center; gap: 18px; min-height: 48px; padding: 6px 24px;
        color: #e9edfb !important; font-family: 'Oswald', sans-serif; font-size: 18px; font-weight: 400;
        text-transform: uppercase; letter-spacing: 2.2px; line-height: 1.2; text-decoration: none; border-left: 3px solid transparent;
    }
    .ml-menu-voci li a i { width: 24px; text-align: center; font-size: 20px; color: rgba(233, 237, 251, .78); }
    .ml-menu-voci li a:hover, .ml-menu-voci li a:focus { background: rgba(255, 255, 255, .06); color: #fff !important; text-decoration: none; }
    .ml-menu-voci li.is-attiva a { background: linear-gradient(90deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .02)); border-left-color: #ffcc33; color: #fff !important; }
    .ml-menu-voci li.is-attiva a i { color: #ffcc33; }
    .ml-menu-secondario { margin-top: 8px !important; padding-top: 8px !important; border-top: 1px solid rgba(255, 255, 255, .12) !important; }
    .ml-menu-secondario li a { min-height: 42px; font-size: 14px; letter-spacing: 1.8px; color: #aab4d8 !important; }
    .ml-menu-secondario li a i { font-size: 16px; }
    .ml-menu-piede { flex: 0 0 auto; padding: 12px 24px 18px; font-family: 'Oswald', sans-serif; font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: rgba(170, 180, 216, .55); }
}

/* Barre dei colori societari: bordo sottile se il colore è chiaro (es. bianco) */
.ml-colore-chiaro { box-shadow: inset 0 0 0 1px #c9cfdd; }

/* =====================================================================
   AREA PARTECIPANTE (MOBILE): logo, menù e top bar fissi in alto allo scroll
   ===================================================================== */
.ml-barra-fissa { display: none; }
@media (max-width: 767px) {
    .ml-barra-fissa {
        display: block; position: fixed; top: 0; left: 0; right: 0; z-index: 1500;
        background: #fff; box-shadow: 0 6px 18px rgba(4, 10, 38, .22);
        transform: translateY(-110%); transition: transform .25s ease; pointer-events: none;
    }
    .ml-barra-fissa.is-visibile { transform: translateY(0); pointer-events: auto; }
    .ml-barra-fissa-testa { display: flex; align-items: center; justify-content: space-between; padding: 6px 12px; }
    .ml-barra-fissa-testa a img { height: 46px; width: auto; display: block; }
    .ml-barra-fissa-menu {
        width: 58px; height: 44px; border: 0; border-radius: 6px; background: #ffcc33; color: #000; font-size: 22px; line-height: 44px; padding: 0;
    }
    .ml-barra-fissa-colori { display: flex; height: 6px; }
    .ml-barra-fissa-colori span { flex: 1 1 50%; }
    .ml-barra-fissa-squadra {
        display: flex; align-items: center; justify-content: center; gap: 10px; padding: 6px 12px;
        background: linear-gradient(120deg, #0b1d5c, #071341 60%, #040a26); color: #fff;
        font-family: 'Oswald', sans-serif; font-size: 15px; text-transform: uppercase; letter-spacing: .5px;
        border-bottom: 2px solid #1d4f8f;
    }
    .ml-barra-fissa-squadra img.ml-bf-logo { width: 26px; height: 26px; object-fit: contain; border-radius: 50%; }
    .ml-barra-fissa-squadra img.ml-bf-flag { width: 20px; height: auto; }
    .ml-barra-fissa-squadra small { font-size: 13px; opacity: .85; }
}

/* Area partecipante: meno spazio vuoto tra l'ultimo contenuto e il piè di pagina */
.ml-main:has(.ml-testata-notte) { padding-bottom: 0; }
.ml-main:has(.ml-testata-notte) > .ml-main-section:last-child { padding-bottom: 24px; }
.ml-main:has(.ml-testata-notte) ~ .ml-footer .ml-footerbar { padding-top: 6px; text-align: center; }
/* Barra fissa: un'unica barra blu (logo e menù ridotti accanto alla squadra), senza fascia bianca */
@media (max-width: 767px) {
    .ml-barra-fissa { background: transparent; }
    .ml-barra-fissa-colori { height: 5px; }
    .ml-barra-fissa .ml-barra-fissa-squadra { justify-content: space-between; gap: 8px; padding: 5px 10px; }
    .ml-bf-home img { height: 34px; width: auto; display: block; }
    .ml-bf-info { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 7px; }
    .ml-bf-nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .ml-bf-info small { white-space: nowrap; }
    .ml-barra-fissa .ml-barra-fissa-menu { flex: 0 0 auto; width: 40px; height: 32px; line-height: 32px; font-size: 17px; border-radius: 6px; }
    .ml-bf-voci { display: none; }
}
/* Barra fissa anche su desktop/tablet: logo, voci del menù principale e squadra */
@media (min-width: 768px) {
    .ml-barra-fissa {
        display: block; position: fixed; top: 0; left: 0; right: 0; z-index: 1500;
        box-shadow: 0 6px 18px rgba(4, 10, 38, .22);
        transform: translateY(-110%); transition: transform .25s ease; pointer-events: none;
    }
    .ml-barra-fissa.is-visibile { transform: translateY(0); pointer-events: auto; }
    .ml-barra-fissa-colori { display: flex; height: 5px; }
    .ml-barra-fissa-colori span { flex: 1 1 50%; }
    .ml-barra-fissa .ml-barra-fissa-squadra {
        display: flex; align-items: center; gap: 16px; padding: 6px 24px;
        background: linear-gradient(120deg, #0b1d5c, #071341 60%, #040a26); color: #fff;
        font-family: 'Oswald', sans-serif; text-transform: uppercase; letter-spacing: .5px;
        border-bottom: 2px solid #1d4f8f;
    }
    .ml-barra-fissa .ml-barra-fissa-menu { display: none; }
    .ml-bf-home { flex: 0 0 auto; }
    .ml-bf-home img { height: 40px; width: auto; display: block; }
    .ml-bf-voci { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 2px 4px; }
    .ml-bf-voci a {
        display: inline-flex; align-items: center; height: 32px; padding: 0 9px; border-radius: 6px;
        color: #e9edfb !important; font-size: 14px; letter-spacing: 1.2px; line-height: 1; text-decoration: none; white-space: nowrap;
        border-bottom: 2px solid transparent;
    }
    .ml-bf-voci a:hover, .ml-bf-voci a:focus { background: rgba(255, 255, 255, .08); color: #fff !important; text-decoration: none; }
    .ml-bf-voci a.is-attiva { color: #ffcc33 !important; border-bottom-color: #ffcc33; border-radius: 6px 6px 0 0; }
    .ml-bf-voci a.is-esci .glyphicon { font-size: 16px; top: 0; }
    .ml-bf-info { flex: 0 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; font-size: 15px; }
    .ml-bf-info img.ml-bf-logo { width: 28px; height: 28px; object-fit: contain; border-radius: 50%; }
    .ml-bf-info img.ml-bf-flag { width: 20px; height: auto; }
    .ml-bf-nome { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
/* Tablet e desktop piccoli: nome squadra nascosto (restano logo e bandiera) e voci più strette */
@media (min-width: 768px) and (max-width: 1199px) {
    .ml-barra-fissa .ml-barra-fissa-squadra { gap: 10px; padding: 6px 12px; }
    .ml-bf-voci a { padding: 0 6px; font-size: 12.5px; letter-spacing: .6px; }
    .ml-bf-nome { display: none; }
}
/* Tablet stretti: voci compatte per restare su una sola riga */
@media (min-width: 768px) and (max-width: 991px) {
    .ml-barra-fissa .ml-barra-fissa-squadra { gap: 6px; padding: 6px 8px; }
    .ml-bf-home img { height: 34px; }
    .ml-bf-voci { gap: 0; }
    .ml-bf-voci a { padding: 0 4px; font-size: 11.5px; letter-spacing: .3px; }
    .ml-bf-info img.ml-bf-logo { width: 24px; height: 24px; }
    .ml-bf-info img.ml-bf-flag { display: none; }
}

/* =====================================================================
   HOME PARTECIPANTE: riquadri compatti, ultimi 5 risultati, donazione,
   invito all'installazione dell'app, firma dei messaggi
   ===================================================================== */
.ml-cassa-kpi.ml-home-kpi { gap: 8px; margin-top: 14px; }
.ml-home-kpi .ml-cassa-kpi-box { padding: 9px 8px 8px; border-radius: 12px; min-height: 0; }
.ml-home-kpi .ml-cassa-kpi-l { font-size: 11px; letter-spacing: 1px; }
.ml-home-kpi .ml-cassa-kpi-v { font-size: 20px; line-height: 1.15; margin: 2px 0 1px; }
.ml-home-kpi .ml-cassa-kpi-n { font-size: 12px; line-height: 1.2; }
@media (max-width: 767px) {
    .ml-cassa-kpi.ml-home-kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ml-home-kpi .ml-cassa-kpi-box { padding: 8px 4px 7px; }
    .ml-home-kpi .ml-cassa-kpi-l { font-size: 10px; letter-spacing: .4px; }
    .ml-home-kpi .ml-cassa-kpi-v { font-size: 16px; }
    .ml-home-kpi .ml-cassa-kpi-n { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .ml-home-kpi .ml-home-vnp small { font-size: 10px; }
}

.ml-ultimi5 { --cc: #b8960b; margin: 14px 0 6px; padding: 12px 12px 10px; border: 1px solid #e3e6ef; border-radius: 14px; background: #fff; box-shadow: 0 6px 18px rgba(12, 17, 39, .06); }
.ml-ultimi5 .is-camp { --cc: #b8960b; }
.ml-ultimi5 .is-naz { --cc: #24478f; }
.ml-ultimi5 .is-inter { --cc: #0a7a33; }
.ml-ultimi5-titolo { font-family: 'Oswald', sans-serif; text-transform: uppercase; letter-spacing: 2px; font-size: 13px; color: #5a6178; text-align: center; margin-bottom: 8px; }
.ml-ultimi5-lista { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.ml-ultimi5-voce { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 50px; padding: 6px 4px 5px; border-radius: 10px; border-bottom: 4px solid var(--cc); background: #f6f7fa; text-decoration: none; }
.ml-ultimi5-voce:hover, .ml-ultimi5-voce:focus { text-decoration: none; background: #eef0f6; }
.ml-ultimi5-esito { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 14px; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--cc); }
.ml-ultimi5-esito.is-v { background: #1f9d55; }
.ml-ultimi5-esito.is-n { background: #9aa0b4; }
.ml-ultimi5-esito.is-p { background: #d64545; }
.ml-ultimi5-ris { font-family: 'Oswald', sans-serif; font-size: 15px; color: #20253a; margin-top: 3px; }
.ml-ultimi5-comp { font-size: 10px; font-weight: 700; letter-spacing: .5px; color: var(--cc); }
.ml-ultimi5-legenda { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 11px; color: #7c829a; }
.ml-ultimi5-legenda span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--cc); margin-right: 5px; vertical-align: -1px; }

.ml-msg-firma { margin-top: 14px; font-family: 'Oswald', sans-serif; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: #ffcc33; opacity: .9; }

.ml-pwa-invito {
    display: flex; align-items: center; gap: 12px; margin: 14px 0 4px; padding: 12px 40px 12px 12px; position: relative;
    border-radius: 14px; color: #fff; border: 1px solid rgba(34, 228, 255, .35);
    background: radial-gradient(120% 140% at 100% 0, rgba(155, 77, 255, .35), transparent 55%), linear-gradient(120deg, #0b1d5c, #071341 60%, #040a26);
    box-shadow: 0 10px 24px rgba(4, 10, 38, .25);
}
.ml-pwa-invito[hidden] { display: none; }
.ml-pwa-icona { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 2px #ffcc33; }
.ml-pwa-testo { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
.ml-pwa-testo strong { font-family: 'Oswald', sans-serif; font-size: 16px; text-transform: uppercase; letter-spacing: .5px; color: #ffcc33; }
.ml-pwa-testo span { font-size: 13px; color: #d7def5; }
.ml-pwa-testo span[hidden] { display: none; }
.ml-pwa-btn { flex: 0 0 auto; border: 0; border-radius: 10px; padding: 9px 14px; background: #ffcc33; color: #0c1127; font-family: 'Oswald', sans-serif; font-size: 15px; text-transform: uppercase; letter-spacing: .5px; }
.ml-pwa-btn[hidden] { display: none; }
.ml-pwa-btn:hover { background: #eebb22; }
.ml-pwa-chiudi { position: absolute; top: 6px; right: 8px; border: 0; background: transparent; color: #aab4d8; font-size: 22px; line-height: 1; padding: 2px 6px; }
@media (max-width: 480px) {
    .ml-pwa-invito { flex-wrap: wrap; }
    .ml-pwa-btn { width: 100%; }
}

.ml-caffe {
    display: flex; align-items: center; gap: 18px; margin: 40px 0 10px; padding: 18px 18px;
    border-radius: 16px; border: 1px solid #f0dfa6; background: linear-gradient(135deg, #fffaf0, #fff4d6);
    box-shadow: 0 8px 20px rgba(184, 134, 11, .12);
}
.ml-caffe-img { flex: 0 0 104px; width: 104px; }
.ml-caffe-img svg { width: 100%; height: auto; display: block; }
.ml-caffe-vapore { animation: mlCaffeVapore 2.4s ease-in-out infinite; transform-origin: center bottom; }
@keyframes mlCaffeVapore { 0%, 100% { opacity: .35; transform: translateY(2px); } 50% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .ml-caffe-vapore { animation: none; } }
.ml-caffe-testo { flex: 1 1 auto; min-width: 0; }
.ml-caffe-testo h3 { margin: 0 0 4px; font-size: 22px; color: #0c1127; text-transform: uppercase; }
.ml-caffe-testo > p { margin: 0 0 10px; color: #4a5068; font-size: 15px; line-height: 1.35; }
.ml-caffe-importi { display: flex; gap: 8px; margin-bottom: 10px; }
.ml-caffe-importi button { border: 1px solid #d9c27a; background: #fff; color: #7a5a06; border-radius: 999px; padding: 4px 14px; font-family: 'Oswald', sans-serif; font-size: 15px; }
.ml-caffe-importi button.is-attivo { background: #b8860b; border-color: #b8860b; color: #fff; }
.ml-caffe-btn {
    display: inline-flex; align-items: center; gap: 10px; padding: 11px 20px; border-radius: 12px;
    background: #0c1127; color: #ffcc33 !important; font-family: 'Oswald', sans-serif; font-size: 17px; text-transform: uppercase; letter-spacing: .6px;
    border: 1px solid #ffcc33; text-decoration: none !important; box-shadow: 0 6px 14px rgba(12, 17, 39, .25);
}
.ml-caffe-btn:hover, .ml-caffe-btn:focus { background: #0b1d5c; }
.ml-caffe-btn b { color: #fff; font-weight: 600; }
.ml-caffe-nota { margin: 10px 0 0 !important; font-size: 12px !important; color: #7c6a3a !important; line-height: 1.4 !important; }
@media (max-width: 520px) {
    .ml-caffe { flex-direction: column; text-align: center; }
    .ml-caffe-importi { justify-content: center; }
}

/* Schermata di avvio dell'app installata */
.ml-avvio { display: none; }
.ml-avvio.is-attivo {
    display: flex; position: fixed; inset: 0; z-index: 100000; align-items: center; justify-content: center;
    background: #ffffff;
    transition: opacity .4s ease;
}
.ml-avvio.is-uscita { opacity: 0; }
.ml-avvio-centro { text-align: center; animation: mlAvvioEntra .35s ease-out both; }
/* Ingresso morbido dopo lo splash di sistema (stesso colore di sfondo) */
@keyframes mlAvvioEntra { from { opacity: 0; } to { opacity: 1; } }
.ml-avvio-centro img { width: 150px; height: auto; animation: mlAvvioPulsa 1.6s ease-in-out infinite; }
@keyframes mlAvvioPulsa { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.ml-avvio-barra { width: 150px; height: 4px; margin: 26px auto 14px; border-radius: 4px; background: rgba(8, 20, 65, .12); overflow: hidden; }
.ml-avvio-barra span { display: block; width: 40%; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #22e4ff, #9b4dff, #ffcc33); animation: mlAvvioBarra 1.1s ease-in-out infinite; }
@keyframes mlAvvioBarra { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
.ml-avvio-centro p { margin: 0; color: #081441; font-family: 'Oswald', sans-serif; font-size: 13px; letter-spacing: 2.5px; text-transform: uppercase; }

/* Scheda club: campionato sulla riga sotto la posizione */
.ml-club-pos .ml-club-camp { display: block; font-weight: 400; opacity: .9; }
/* Account: campo nome manager */
.ml-account-manager { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 6px auto 0; max-width: 320px; font-weight: 400; }
.ml-account-manager input.form-control { flex: 1 1 auto; height: 38px; font-size: 17px; font-weight: 700; text-align: center; }

/* Mercato: pulsanti "Lancia asta" / "Rilancia" con testo centrato */
.btn.ml-btn-asta {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-width: 110px; padding: 6px 10px; white-space: nowrap; text-align: center; line-height: 1.2;
}

/* =====================================================================
   SCHEDA CALCIATORE (area partecipante): scheda notte + riquadri
   ===================================================================== */
.ml-calc-hero {
    display: flex; align-items: center; gap: 16px; margin: 16px 0 12px; padding: 18px 18px;
    border-radius: 16px; color: #fff; position: relative; overflow: hidden;
    background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .035) 0 2px, transparent 2px 46px), linear-gradient(120deg, #0b1d5c, #071341 60%, #040a26);
    box-shadow: 0 10px 24px rgba(4, 10, 38, .25); border-bottom: 3px solid #9b4dff;
}
.ml-calc-ruolo {
    flex: 0 0 64px; width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-family: 'Oswald', sans-serif; font-size: 22px; font-weight: 700; color: #fff; background: #4a5068;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .85), 0 0 18px rgba(34, 228, 255, .35);
}
.ml-calc-ruolo.is-p { background: #e0a100; }
.ml-calc-ruolo.is-d { background: #1f6fd1; }
.ml-calc-ruolo.is-c { background: #1f9d55; }
.ml-calc-ruolo.is-a { background: #d64545; }
.ml-calc-info { flex: 1 1 auto; min-width: 0; }
.ml-calc-nome { margin: 0 0 4px; color: #fff; font-size: 28px; line-height: 1.1; text-transform: uppercase; letter-spacing: .5px; }
.ml-calc-modifica { color: #aab4d8 !important; font-size: 15px; margin-left: 6px; vertical-align: middle; }
.ml-calc-dett { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 15px; color: #d7def5; }
.ml-calc-dett img { width: 22px; height: auto; border-radius: 2px; }
.ml-calc-sep { opacity: .6; }
.ml-calc-squadra { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: rgba(255, 255, 255, .1); color: #ffcc33 !important; font-family: 'Oswald', sans-serif; font-size: 15px; text-decoration: none !important; }
.ml-calc-squadra img { width: 26px; height: 26px; object-fit: contain; }
.ml-calc-squadra:hover { background: rgba(255, 255, 255, .18); }
.ml-cassa-kpi.ml-calc-kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ml-calc-kpi .ml-cassa-kpi-box { padding: 10px 6px; }
.ml-calc-kpi .ml-cassa-kpi-v { font-size: 20px; }
.ml-calc-valore .ml-cassa-kpi-v { color: #0b2a8a; }
@media (max-width: 767px) {
    .ml-cassa-kpi.ml-calc-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ml-calc-hero { padding: 14px 12px; gap: 12px; }
    .ml-calc-ruolo { flex-basis: 52px; width: 52px; height: 52px; font-size: 18px; }
    .ml-calc-nome { font-size: 23px; }
}
.ml-calc-azioni { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 14px 0 22px; }
.ml-calc-btn {
    flex: 1 1 140px; max-width: 220px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 16px; border-radius: 12px; font-family: 'Oswald', sans-serif; font-size: 17px; text-transform: uppercase; letter-spacing: .6px; text-decoration: none !important;
}
/* Vendi verde scuro, Svincola rosso scuro, testo bianco */
.ml-calc-btn.is-vendi { background: linear-gradient(180deg, #1e7a3c, #145a2b); color: #fff !important; border: 1px solid #0f4a22; box-shadow: 0 3px 8px rgba(20, 90, 43, .25); }
.ml-calc-btn.is-svincola { background: linear-gradient(180deg, #a3202a, #7a141c); color: #fff !important; border: 1px solid #5f0f15; box-shadow: 0 3px 8px rgba(122, 20, 28, .25); }
.ml-calc-btn.is-vendi .glyphicon, .ml-calc-btn.is-svincola .glyphicon { color: #fff; }
.ml-calc-btn:hover { filter: brightness(1.1); }
.ml-calc-asta { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 12px; background: #fff7da; border: 1px solid #f0dfa6; color: #7a5a06; font-size: 15px; }
.ml-calc-asta strong { font-family: 'Oswald', sans-serif; font-size: 20px; color: #b8860b; }
.ml-calc-nota { margin: 0; text-align: center; font-style: italic; color: #6d738a; }
/* Distacco del riquadro "Offrimi un caffè" dalla scheda della partita */
.ml-tickets .ml-caffe, .ml-caffe { margin-top: 44px !important; }
.ml-caffe { clear: both; }
.ml-tickets .ml-match-card:has(+ .ml-caffe), .ml-tickets .ml-match-card:has(+ script + .ml-caffe) { margin-bottom: 44px; }

/* =====================================================================
   ACCOUNT: CANCELLAZIONE (main/account) E PAGINA DI CONFERMA
   ===================================================================== */
.ml-chiudi-account {
    margin-top: 30px;
    text-align: center;
}
.ml-chiudi-account h4 .glyphicon {
    font-size: 20px;
    color: #c0392b;
}
.ml-chiudi-box {
    margin: 10px 0;
    padding: 16px;
    text-align: left;
    border: 1px solid #e6b0aa;
    border-radius: 10px;
    background: #fdf5f4;
}
.ml-chiudi-box p {
    font-size: 14px;
    line-height: 1.45;
}
.ml-chiudi-box .btn {
    width: 100%;
    white-space: normal;
}
.ml-chiudi-esito {
    text-align: left;
}
.ml-account-stato {
    font-size: 16px;
}
.ml-account-stato-azioni {
    margin: 18px 0;
}

/* Icona "Installa l'app" in fondo alla home pubblica (common/pwa_icona.php) */
.ml-pwa-fondo { clear: both; width: 100%; padding: 26px 16px 18px; text-align: center; }
.ml-pwa-fondo[hidden] { display: none; }
.ml-pwa-fondo-btn {
    display: inline-flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 14px;
    border: 0; border-radius: 16px; background: transparent; cursor: pointer;
}
.ml-pwa-fondo-btn img { width: 64px; height: 64px; border-radius: 16px; background: #fff; box-shadow: 0 0 0 2px #ffcc33, 0 8px 18px rgba(4, 10, 38, .25); transition: transform .15s; }
.ml-pwa-fondo-btn:hover img, .ml-pwa-fondo-btn:focus-visible img { transform: translateY(-2px); }
.ml-pwa-fondo-btn span { font-family: 'Oswald', sans-serif; font-size: 15px; text-transform: uppercase; letter-spacing: .5px; color: #0c1127; }
.ml-pwa-fondo-ios { margin: 8px auto 0; max-width: 320px; font-size: 14px; color: #444; }
.ml-pwa-fondo-ios[hidden] { display: none; }

/* =====================================================================
   HOME PUBBLICA: liste TOP VdM / TOP Skill (card compatte con medaglie)
   ===================================================================== */
.ml-top-col { margin-bottom: 28px; }
.ml-top-lista {
    --ml-top-acc: #0b1d5c;
    position: relative; overflow: hidden; border: 1px solid #d6dae4; border-radius: 14px;
    background: linear-gradient(180deg, #eef0f4 0%, #e2e5ec 100%);
    box-shadow: 0 4px 14px rgba(12, 17, 39, .05);
}
/* Cornice come la scheda "Comunicazione": linee viola sfumate sopra e sotto */
.ml-top-lista::before,
.ml-top-lista::after {
    content: ''; position: absolute; left: 20%; right: 20%; height: 2px; z-index: 1;
    background: linear-gradient(90deg, transparent, #9b4dff, transparent);
}
.ml-top-lista::before { top: 0; }
.ml-top-lista::after { bottom: 0; }
.ml-top-lista.ml-top-skill { --ml-top-acc: #b8960b; }
.ml-top-testa {
    position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 16px 16px 14px; color: #2a2f45;
    background: transparent;
}
.ml-top-icona {
    flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
    background: #fff; color: var(--ml-top-acc); font-size: 18px; border: 1px solid #d6dae4; box-shadow: 0 1px 4px rgba(12, 17, 39, .08);
}
.ml-top-testa h3 { margin: 0; color: #2a2f45; font-family: 'Oswald', sans-serif; font-size: 20px; letter-spacing: 1.5px; text-transform: uppercase; line-height: 1.1; }
.ml-top-testa small { display: block; color: #7a8094; font-family: 'Oswald', sans-serif; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; }
.ml-top-testa::after {
    content: ''; position: absolute; left: 50%; bottom: 0; width: 60px; height: 2px; margin-left: -30px;
    background: linear-gradient(90deg, transparent, #9b4dff, transparent);
}
.ml-top-voci { list-style: none; margin: 0; padding: 4px 0; }
.ml-top-voce {
    display: flex; align-items: center; gap: 12px; padding: 11px 14px; margin: 0; list-style: none;
    border-bottom: 1px solid rgba(255, 255, 255, .75); transition: background .15s ease;
}
.ml-top-voce:last-child { border-bottom: 0; }
@media (hover: hover) {
    .ml-top-voce:hover { background: rgba(255, 255, 255, .55); }
}
.ml-top-num {
    flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: #fff; color: #0b1d5c; font-family: 'Oswald', sans-serif; font-size: 19px; font-weight: 700; line-height: 1;
}
.ml-top-pos1 .ml-top-num { background: linear-gradient(145deg, #ffe07a, #e0a800); color: #3a2a00; box-shadow: 0 3px 10px rgba(224, 168, 0, .45); }
.ml-top-pos2 .ml-top-num { background: linear-gradient(145deg, #eef1f6, #a9b3c4); color: #26304a; box-shadow: 0 3px 10px rgba(110, 122, 145, .35); }
.ml-top-pos3 .ml-top-num { background: linear-gradient(145deg, #f2c08f, #b8692c); color: #3d1f05; box-shadow: 0 3px 10px rgba(184, 105, 44, .35); }
.ml-top-info { flex: 1 1 auto; min-width: 0; }
.ml-top-nome {
    display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-family: 'Oswald', sans-serif; font-size: 20px; line-height: 1.2; color: #0b1d5c !important; text-decoration: none !important;
}
.ml-top-nome:hover, .ml-top-nome:focus { color: #b8960b !important; }
.ml-top-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin-top: 3px; }
.ml-top-ruolo {
    display: inline-block; padding: 2px 8px; border-radius: 6px; background: #fff; color: #373542; border: 1px solid #e1e3ea;
    font-family: 'Oswald', sans-serif; font-size: 11.5px; letter-spacing: 1px; text-transform: uppercase; line-height: 1.4; white-space: nowrap;
}
.ml-top-valore { font-family: 'Oswald', sans-serif; font-size: 14px; color: #5a6178; white-space: nowrap; }
.ml-top-valore strong { color: #20253a; font-weight: 700; }
.ml-top-barra { height: 4px; margin-top: 7px; border-radius: 4px; background: #d3d7e0; overflow: hidden; }
.ml-top-barra span { display: block; height: 100%; border-radius: 4px; background: var(--ml-top-acc); }
.ml-top-skill .ml-top-barra span { background: linear-gradient(90deg, #b8960b, #ffcc33); }
.ml-top-vdm .ml-top-barra span { background: linear-gradient(90deg, #0b1d5c, #2a5bd7); }
.ml-top-squadra { flex: 0 0 auto; display: block; width: 46px; height: 46px; }
.ml-top-squadra img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform .15s ease; }
@media (hover: hover) {
    .ml-top-squadra:hover img { transform: scale(1.08); }
}
@media (max-width: 480px) {
    .ml-top-voce { gap: 10px; padding: 10px 12px; }
    .ml-top-num { width: 34px; height: 34px; font-size: 16px; }
    .ml-top-nome { font-size: 18px; }
    .ml-top-squadra { width: 40px; height: 40px; }
}

/* =====================================================================
   HOME PUBBLICA: TOP PLAYERS a scudetti scorrevoli (primi tre posti).
   Scudetto con cornice sfumata (oro/argento/bronzo + viola), fondo notte
   con bagliori viola e maglia della squadra vista di spalle.
   ===================================================================== */
.ml-scudi-col { margin-bottom: 30px; }
.ml-scudi-blocco {
    position: relative; padding: 0 0 14px; border: 1px solid #d6dae4; border-radius: 14px;
    background: linear-gradient(180deg, #eef0f4 0%, #e2e5ec 100%);
    box-shadow: 0 4px 14px rgba(12, 17, 39, .05);
}
.ml-scudi-blocco::before,
.ml-scudi-blocco::after {
    content: ''; position: absolute; left: 20%; right: 20%; height: 2px;
    background: linear-gradient(90deg, transparent, #9b4dff, transparent);
}
.ml-scudi-blocco::before { top: 0; }
.ml-scudi-blocco::after { bottom: 0; }
.ml-scudi-titolo {
    position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 16px 16px 14px;
}
.ml-scudi-titolo::after {
    content: ''; position: absolute; left: 50%; bottom: 0; width: 60px; height: 2px; margin-left: -30px;
    background: linear-gradient(90deg, transparent, #9b4dff, transparent);
}
.ml-scudi-skill { --ml-top-acc: #b8960b; }
.ml-scudi-titolo h3 { margin: 0; color: #2a2f45; font-family: 'Oswald', sans-serif; font-size: 20px; letter-spacing: 1.5px; text-transform: uppercase; line-height: 1.1; }
.ml-scudi-titolo small { display: block; color: #7a8094; font-family: 'Oswald', sans-serif; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; }

/* Pista scorrevole: su mobile uno scudetto alla volta (con il successivo che si intravede) */
.ml-scudi-pista {
    display: flex; gap: 20px; padding: 18px calc(50% - 90px) 10px; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.ml-scudi-pista::-webkit-scrollbar { display: none; }
.ml-scudi-pista:focus { outline: none; }
.ml-scudi-pista:focus-visible { outline: 2px solid #9b4dff; outline-offset: -2px; border-radius: 10px; }
.ml-scudo { flex: 0 0 180px; max-width: 180px; scroll-snap-align: center; margin: 0; }
.ml-scudi-punti { display: flex; justify-content: center; gap: 8px; padding-top: 2px; }
@media (max-width: 767px) {
    /* Scudetto mobile da 180px: testi ridotti in proporzione */
    .ml-scudi-pista .ml-scudo-rating strong { font-size: 23px; }
    .ml-scudi-pista .ml-scudo-posto { font-size: 20px; }
    .ml-scudi-pista .ml-scudo-nome { font-size: 23px; }
    .ml-scudi-pista .ml-scudo-valore { font-size: 15px; }
    .ml-scudi-pista .ml-scudo-flag { width: 26px; }
    .ml-scudi-pista .ml-scudo-logo { width: 28px; height: 28px; }
    .ml-scudi-pista .ml-scudo-stat b { font-size: 13px; }
    .ml-scudi-pista .ml-scudo-centro { padding-top: 34%; }
    .ml-scudi-pista .ml-scudo-insegne { margin-top: 5px; }
}
.ml-scudi-punti span { width: 8px; height: 8px; border-radius: 50%; background: #c3c8d6; cursor: pointer; transition: all .2s ease; }
.ml-scudi-punti span.is-attivo { width: 22px; border-radius: 4px; background: #9b4dff; }
@media (min-width: 768px) {
    .ml-scudi-pista { justify-content: center; overflow-x: visible; scroll-snap-type: none; gap: 30px; padding: 22px 16px 12px; }
    .ml-scudo { flex: 0 1 160px; max-width: 160px; }
    /* Scudetti più piccoli su desktop: testi ridotti in proporzione */
    .ml-scudi-pista .ml-scudo-rating strong { font-size: 20px; }
    .ml-scudi-pista .ml-scudo-rating em { font-size: 11px; }
    .ml-scudi-pista .ml-scudo-posto { font-size: 17px; }
    .ml-scudi-pista .ml-scudo-centro { padding-top: 30%; }
    .ml-scudi-pista .ml-scudo-nome { font-size: 20px; }
    .ml-scudi-pista .ml-scudo-valore { font-size: 13px; margin-top: 2px; }
    .ml-scudi-pista .ml-scudo-insegne { gap: 9px; margin-top: 6px; }
    .ml-scudi-pista .ml-scudo-flag { width: 22px; }
    .ml-scudi-pista .ml-scudo-logo { width: 24px; height: 24px; }
    .ml-scudi-pista .ml-scudo-stat small { font-size: 8px; }
    .ml-scudi-pista .ml-scudo-stat b { font-size: 12px; }
    .ml-scudi-pista .ml-scudo-ruolo { font-size: 8px; }
    .ml-scudi-punti { display: none; }
}

/* Forma dello scudetto (cornice e corpo usano lo stesso profilo):
   angoli superiori a gradino, leggero avvallamento centrale, base a punta */
.ml-scudo-cornice,
.ml-scudo-corpo {
    clip-path: polygon(0 9%, 7% 9%, 14% 2%, 37% 2%, 50% 6%, 63% 2%, 86% 2%, 93% 9%, 100% 9%, 100% 82%, 86% 88.5%, 50% 100%, 14% 88.5%, 0 82%);
}
/* Metalli per posizione: 1° oro, 2° argento, 3° bronzo */
.ml-scudo {
    --ml-bordo: linear-gradient(160deg, #fff1a8 0%, #8a6410 38%, #ffe28a 60%, #6b4c0a 100%);
    --ml-metallo: linear-gradient(160deg, #fff3b0 0%, #f2cf5b 22%, #c9971e 45%, #f7dc7a 62%, #a87a12 82%, #d9b043 100%);
    --ml-t: #2b1d00; --ml-t2: rgba(43, 29, 0, .68); --ml-acc: #6b4a00; --ml-ombra: 0 1px 0 rgba(255, 255, 255, .45);
    --ml-badge: #2b1d00; --ml-badge-t: #ffe07a;
}
.ml-scudo-pos2 {
    --ml-bordo: linear-gradient(160deg, #ffffff 0%, #6f747c 38%, #f2f3f5 60%, #555a62 100%);
    --ml-metallo: linear-gradient(160deg, #ffffff 0%, #dcdfe3 22%, #9ea3ab 45%, #eef0f2 62%, #7d828a 82%, #c4c7cc 100%);
    --ml-t: #1c2230; --ml-t2: rgba(28, 34, 48, .68); --ml-acc: #3d4658; --ml-ombra: 0 1px 0 rgba(255, 255, 255, .5);
    --ml-badge: #1c2230; --ml-badge-t: #eef0f2;
}
.ml-scudo-pos3 {
    --ml-bordo: linear-gradient(160deg, #ffd2a6 0%, #6e3d1a 38%, #e7a56b 60%, #4d2a11 100%);
    --ml-metallo: linear-gradient(160deg, #f3c08e 0%, #c58349 22%, #8a5228 45%, #d99a5f 62%, #6a3c1c 82%, #a8693a 100%);
    --ml-t: #fff4e8; --ml-t2: rgba(255, 240, 225, .82); --ml-acc: #ffe0b8; --ml-ombra: 0 2px 6px rgba(40, 18, 4, .6);
    --ml-badge: #3d1f05; --ml-badge-t: #f3c08e;
}
.ml-scudo-cornice {
    position: relative; display: block; padding: 4px; aspect-ratio: 3 / 4.35; text-decoration: none !important;
    background: var(--ml-bordo);
    filter: drop-shadow(0 12px 18px rgba(4, 10, 38, .35));
    transition: transform .2s ease, filter .2s ease;
}
@media (hover: hover) {
    .ml-scudo-cornice:hover { transform: translateY(-4px); filter: drop-shadow(0 18px 24px rgba(4, 10, 38, .45)); }
}
.ml-scudo-corpo {
    position: relative; display: flex; flex-direction: column; align-items: center; height: 100%; overflow: hidden;
    padding: 12% 8% 15%; color: var(--ml-t); text-align: center;
    background:
        linear-gradient(118deg, transparent 0 43%, rgba(255, 255, 255, .55) 46.5%, transparent 50% 55%, rgba(0, 0, 0, .14) 57.5%, transparent 63%),
        linear-gradient(62deg, transparent 0 70%, rgba(255, 255, 255, .18) 74%, transparent 78%),
        var(--ml-metallo);
}
.ml-scudo-rating {
    position: absolute; top: 12%; left: 9%; display: flex; flex-direction: column; align-items: center; line-height: 1;
    font-family: 'Oswald', sans-serif; text-shadow: var(--ml-ombra);
}
.ml-scudo-rating strong { font-size: 25px; font-weight: 700; letter-spacing: -.5px; color: var(--ml-t); }
.ml-scudo-rating em { margin-top: 2px; font-style: normal; font-size: 13px; letter-spacing: 1px; color: var(--ml-acc); }
.ml-scudo-posto {
    position: absolute; top: 12%; right: 10%; line-height: 1;
    font-family: 'Oswald', sans-serif; font-size: 22px; font-weight: 700;
    color: var(--ml-t); text-shadow: var(--ml-ombra);
}
/* Centro dello scudetto: nome e valore centrati verticalmente nello spazio libero */
.ml-scudo-centro { flex: 1 1 auto; min-height: 0; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-top: 26%; }
.ml-scudo-nome {
    display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-family: 'Oswald', sans-serif; font-size: 26px; font-weight: 700; line-height: 1.1; color: var(--ml-t); text-shadow: var(--ml-ombra);
}
.ml-scudo-valore { display: block; margin-top: 4px; font-family: 'Oswald', sans-serif; font-size: 16px; font-weight: 700; letter-spacing: .5px; color: var(--ml-acc); text-shadow: var(--ml-ombra); }
.ml-scudo-stat { display: flex; justify-content: space-between; width: 100%; margin-top: 4%; }
.ml-scudo-stat > span { display: flex; flex-direction: column; align-items: center; flex: 1 1 0; line-height: 1.05; font-family: 'Oswald', sans-serif; }
.ml-scudo-stat small { font-size: 9px; letter-spacing: .5px; color: var(--ml-t2); }
.ml-scudo-stat b { margin-top: 1px; font-size: 14px; font-weight: 700; color: var(--ml-t); text-shadow: var(--ml-ombra); }
.ml-scudo-insegne { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 8px; }
.ml-scudo-piede { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 6%; }
.ml-scudo-flag { width: 28px; height: auto; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); }
.ml-scudo-ruolo { font-family: 'Oswald', sans-serif; font-size: 9px; letter-spacing: .8px; text-transform: uppercase; color: var(--ml-t2); white-space: nowrap; }
.ml-scudo-logo { width: 30px; height: 30px; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .3)); }

/* Animazioni ridotte se richiesto dal sistema operativo */
@media (prefers-reduced-motion: reduce) {
    .ml-wrapper > .ml-navigationm-mobile.ml-menu-notte, .ml-menu-velo { transition: none; }
}

/* =====================================================================
   ACCOUNT: riquadro "Modifica password" con cornice e grigio scuro
   (stesso stile del form "Cerca calciatori" del Mercato)
   ===================================================================== */
.ml-pwd-box {
    position: relative;
    margin: 8px 0 30px;
    padding: 20px 18px 18px;
    border: 1px solid #c9cedb;
    border-radius: 14px;
    background: linear-gradient(180deg, #e3e6ed 0%, #d4d8e1 100%);
    box-shadow: 0 4px 14px rgba(12, 17, 39, .05);
}
.ml-pwd-box::before,
.ml-pwd-box::after {
    content: '';
    position: absolute;
    left: 20%;
    right: 20%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #9b4dff, transparent);
}
.ml-pwd-box::before { top: 0; }
.ml-pwd-box::after { bottom: 0; }
.ml-pwd-box .form-control { background-color: #fff; border-color: #c3c8d5; border-radius: 8px; }
.ml-pwd-box .form-group:last-of-type { margin-bottom: 18px; }

/* =====================================================================
   FINESTRE LOGIN E REGISTRAZIONE: cornice con linee viola (stile dei
   riquadri del sito), sfondo grigio, angoli arrotondati, campi bianchi
   ===================================================================== */
#ml-login.ml-modalbox .modal-dialog,
#ml-register.ml-modalbox .modal-dialog {
    border-top: 0;
    border: 1px solid rgba(155, 77, 255, .45);
    border-radius: 16px;
    background: linear-gradient(180deg, #e3e6ed 0%, #d4d8e1 100%);
    box-shadow: 0 0 0 4px rgba(155, 77, 255, .12), 0 18px 40px rgba(4, 10, 38, .45);
}
#ml-login.ml-modalbox .modal-dialog::before,
#ml-login.ml-modalbox .modal-dialog::after,
#ml-register.ml-modalbox .modal-dialog::before,
#ml-register.ml-modalbox .modal-dialog::after {
    content: '';
    position: absolute;
    left: 15%;
    right: 15%;
    height: 3px;
    z-index: 2;
    background: linear-gradient(90deg, transparent, #9b4dff, transparent);
    pointer-events: none;
}
#ml-login.ml-modalbox .modal-dialog::before,
#ml-register.ml-modalbox .modal-dialog::before { top: 0; }
#ml-login.ml-modalbox .modal-dialog::after,
#ml-register.ml-modalbox .modal-dialog::after { bottom: 0; }
#ml-login .ml-border-heading h3,
#ml-register .ml-border-heading h3 { color: #0b1d5c; }
#ml-login .form-control,
#ml-register .form-control {
    background-color: #fff;
    border-color: #c3c8d5;
    border-radius: 8px;
}
#ml-login .form-control:focus,
#ml-register .form-control:focus {
    border-color: #9b4dff;
    box-shadow: 0 0 0 3px rgba(155, 77, 255, .18);
}
/* "Password dimenticata": niente riquadro bianco sul nuovo sfondo grigio */
#ml-login input[name="breset"] {
    background: transparent !important;
    color: #5a6178 !important;
    padding: 0;
    text-decoration: underline;
}

/* Mercato: aggiornamento dei risultati senza ricaricare la pagina */
#ml-mercato-risultati { transition: opacity .15s ease; }
#ml-mercato-risultati.is-caricamento { opacity: .45; pointer-events: none; }
.ml-mercato-filtri .ml-mercato-azioni { justify-content: flex-end; }

/* Titolo principale delle pagine statistiche come H1 (SEO) con lo stesso aspetto dello span precedente */
.ml-stats-h1 {
    display: inline-block;
    margin: 0;
    padding: 0;
    font-family: inherit;
    font-weight: inherit;
    line-height: 1.2;
    letter-spacing: inherit;
    text-transform: inherit;
}

/* ==========================================================================
   MERCATO: titoli delle sezioni "Trasferimenti in corso" e "Svincolati"
   icona in un riquadro colorato, testo scuro Oswald, contatore a pillola e
   linea viola sfumata sotto (stile dei titoli della home)
   ========================================================================== */
.ml-mercato-titolo {
    position: relative; clear: both; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px;
    margin: 34px 0 16px; padding: 0 0 12px;
    color: #2a2f45; font-family: 'Oswald', sans-serif; font-size: 22px; letter-spacing: 1.5px;
    text-transform: uppercase; line-height: 1.15;
}
.ml-mercato-titolo::after {
    content: ''; position: absolute; left: 0; bottom: 0; width: 100%; max-width: 320px; height: 2px;
    background: linear-gradient(90deg, #9b4dff, rgba(155, 77, 255, 0));
}
.ml-mercato-titolo .ml-mt-icona {
    flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 12px; color: #fff; font-size: 18px;
    box-shadow: 0 4px 10px rgba(11, 29, 92, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.ml-mercato-titolo .ml-mt-icona .glyphicon { top: 0; }
.ml-mercato-titolo .ml-mt-oro { background: linear-gradient(135deg, #f2c94c, #b8860b); color: #0b1d5c; }
.ml-mercato-titolo .ml-mt-bordeaux { background: linear-gradient(135deg, #b0283a, #6b0014); }
.ml-mercato-titolo .ml-mt-testo { flex: 0 1 auto; min-width: 0; }
.ml-mercato-titolo .ml-mercato-conta {
    margin: 0; padding: 3px 10px; border-radius: 20px; background: #eef0f5; color: #5a6178;
    font-family: 'Oswald', sans-serif; font-size: 12px; letter-spacing: 1px; text-transform: uppercase;
}
.ml-mercato-legenda {
    display: block; margin: -8px 0 10px; color: #8a90a2; font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
}
@media (max-width: 767px) {
    .ml-mercato-titolo { font-size: 19px; margin-top: 26px; }
    .ml-mercato-titolo .ml-mt-icona { width: 36px; height: 36px; border-radius: 10px; font-size: 16px; }
}

/* Mercato: più spazio tra la paginazione dei trasferimenti e la sezione Svincolati
   (la paginazione è flottante: il margine inferiore non collassa) */
.ml-mercato-pagine { margin-bottom: 64px; }
@media (max-width: 767px) {
    .ml-mercato-pagine { margin-bottom: 52px; }
}

/* Classifica: bandiera della nazione dentro la select del campionato */
.ml-select-bandiera { position: relative; display: inline-block; max-width: 100%; }
.ml-select-bandiera .ml-sb-flag {
    position: absolute; left: 16px; top: 50%; z-index: 1; width: 30px; height: 20px; margin-top: -10px;
    object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12); pointer-events: none;
}
.ml-select-bandiera .ml-sb-flag[hidden] { display: none; }
.ml-select-bandiera .ml-sb-flag:not([hidden]) + select { padding-left: 58px !important; }

/* ==========================================================================
   SCHEDA CALCIATORE: cronologia trasferimenti a schede (dal più recente)
   colonna stagione grigia, logo della squadra, bandiera + nome, data e
   provenienza, valore a destra; riga finale con il costo totale
   ========================================================================== */
.ml-tr-sezione { margin-top: 10px; }
.ml-tr-lista {
    list-style: none; margin: 0; padding: 0; border-radius: 14px; overflow: hidden;
    border: 1px solid #e3e6ef; background: #fff; box-shadow: 0 4px 14px rgba(11, 29, 92, 0.06);
}
.ml-tr-voce {
    display: grid; grid-template-columns: 64px 52px minmax(0, 1fr) auto; align-items: center; gap: 0 12px;
    min-height: 74px; border-bottom: 1px solid #eceef4;
}
.ml-tr-voce:last-child { border-bottom: 0; }
.ml-tr-stagione {
    align-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: #eef0f5; color: #0b1d5c; font-family: 'Oswald', sans-serif; line-height: 1.1;
}
.ml-tr-stagione small { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: #6d738a; }
.ml-tr-stagione strong { font-size: 20px; }
.ml-tr-logo { width: 44px; height: 44px; object-fit: contain; justify-self: center; }
.ml-tr-info { min-width: 0; padding: 10px 0; }
.ml-tr-squadra, .ml-tr-venditore { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; color: #1a5fa8 !important; }
.ml-tr-squadra { font-family: 'Oswald', sans-serif; font-size: 17px; font-weight: 500; }
.ml-tr-squadra span, .ml-tr-venditore span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-tr-squadra.is-vuoto, .ml-tr-venditore.is-vuoto { color: #8a90a2 !important; font-style: italic; }
.ml-tr-flag { flex: 0 0 auto; width: 20px; height: 14px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12); }
.ml-tr-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; margin-top: 3px; color: #5a6178; font-size: 13px; }
.ml-tr-da { display: inline-flex; align-items: center; gap: 5px; min-width: 0; max-width: 100%; }
.ml-tr-venditore { font-size: 13px; }
.ml-tr-valore { padding-right: 14px; color: #1a5fa8; font-family: 'Oswald', sans-serif; font-size: 17px; font-weight: 600; text-align: right; white-space: nowrap; }
.ml-tr-valore.is-zero { color: #6d738a; font-weight: 400; }
.ml-tr-totale {
    display: flex; justify-content: flex-end; align-items: baseline; gap: 14px; margin: 8px 0 0; padding: 12px 14px;
    border-radius: 12px; background: #f4f5f9; color: #5a6178; font-family: 'Oswald', sans-serif; font-size: 15px;
}
.ml-tr-totale strong { color: #0b1d5c; font-size: 18px; }
@media (max-width: 480px) {
    .ml-tr-voce { grid-template-columns: 54px 40px minmax(0, 1fr) auto; gap: 0 9px; min-height: 68px; }
    .ml-tr-logo { width: 36px; height: 36px; }
    .ml-tr-squadra { font-size: 15px; }
    .ml-tr-valore { font-size: 15px; padding-right: 10px; }
    .ml-tr-meta { font-size: 12px; }
}

/* Scheda calciatore: trofei vinti sotto il box del nome (icona + numero in un bollino) */
.ml-calc-trofei {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; list-style: none;
    margin: -6px 0 16px; padding: 14px 12px 12px; border: 1px solid #e3e6ef; border-top: 0;
    border-radius: 0 0 16px 16px; background: #fff; box-shadow: 0 4px 14px rgba(11, 29, 92, 0.06);
}
.ml-calc-trofei li { position: relative; display: flex; flex-direction: column; align-items: center; width: 64px; cursor: default; }
.ml-calc-trofei img { width: 38px; height: 38px; object-fit: contain; }
.ml-calc-trofei .ml-ct-n {
    position: absolute; top: 18px; left: 50%; margin-left: 8px; min-width: 24px; height: 24px; padding: 0 6px;
    border: 2px solid #fff; border-radius: 12px; background: #1a5fa8; color: #fff;
    font-family: 'Oswald', sans-serif; font-size: 13px; line-height: 20px; text-align: center;
}
.ml-calc-trofei .ml-ct-nome {
    margin-top: 6px; color: #6d738a; font-family: 'Oswald', sans-serif; font-size: 10px; letter-spacing: .5px;
    line-height: 1.15; text-align: center; text-transform: uppercase;
}

/* Scheda calciatore: valore, ingaggio, skill ed età dentro il riquadro blu
   (mobile: fascia sotto il nome; da 768px: griglia 2x2 a destra) */
.ml-calc-hero { flex-wrap: wrap; }
.ml-calc-dati {
    flex: 1 1 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 4px 0 0; padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, .14);
}
.ml-calc-dati > div { min-width: 0; padding: 0 6px; text-align: center; border-left: 1px solid rgba(255, 255, 255, .12); }
.ml-calc-dati > div:first-child { border-left: 0; }
.ml-calc-dati dt {
    color: #aab4d8; font-family: 'Oswald', sans-serif; font-size: 10px; font-weight: 400; letter-spacing: 1px;
    line-height: 1.2; text-transform: uppercase;
}
.ml-calc-dati dd { margin: 3px 0 0; color: #fff; font-family: 'Oswald', sans-serif; font-size: 18px; font-weight: 600; line-height: 1.15; white-space: nowrap; }
.ml-calc-dati .is-valore dd { color: #ffcc33; }
.ml-calc-dati dd * { color: inherit !important; }
@media (max-width: 400px) {
    .ml-calc-dati { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 10px; }
    .ml-calc-dati > div:nth-child(3) { border-left: 0; }
}
@media (min-width: 768px) {
    .ml-calc-hero { flex-wrap: nowrap; }
    .ml-calc-dati {
        flex: 0 0 320px; grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 12px; margin: 0; padding: 4px 0 4px 18px;
        border-top: 0; border-left: 1px solid rgba(255, 255, 255, .14);
    }
    .ml-calc-dati > div:nth-child(3) { border-left: 0; }
    .ml-calc-dati dd { font-size: 22px; }
}
/* Riquadro icona verde per i titoli di sezione (es. Carriera nella scheda calciatore) */
.ml-mercato-titolo .ml-mt-verde { background: linear-gradient(135deg, #8cc63f, #3f7d12); }

/* ==========================================================================
   FINESTRE DI AVVISO E CONFERMA (public/js/dialoghi.js) al posto di quelle
   native: testata notte con linea viola, testo chiaro, pulsanti grandi
   ========================================================================== */
html.ml-dlg-aperta, html.ml-dlg-aperta body { overflow: hidden; }
.ml-dlg-velo {
    position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 16px;
    background: rgba(4, 10, 38, 0.62); opacity: 0; transition: opacity .16s ease;
    -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.ml-dlg-velo.is-visibile { opacity: 1; }
.ml-dlg {
    width: 100%; max-width: 420px; overflow: hidden; border-radius: 18px; background: #fff;
    box-shadow: 0 24px 60px rgba(4, 10, 38, 0.45); transform: translateY(14px) scale(.97); transition: transform .18s ease;
}
.ml-dlg-velo.is-visibile .ml-dlg { transform: none; }
.ml-dlg-testa {
    position: relative; display: flex; align-items: center; gap: 12px; padding: 16px 20px;
    background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .035) 0 2px, transparent 2px 46px), linear-gradient(120deg, #0b1d5c, #071341 60%, #040a26);
    border-bottom: 3px solid #9b4dff;
}
.ml-dlg-icona {
    flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #f2c94c, #b8860b); color: #0b1d5c; font-family: 'Oswald', sans-serif; font-size: 20px; font-weight: 700;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .18);
}
.ml-dlg.is-pericolo .ml-dlg-icona { background: linear-gradient(135deg, #e0535d, #8f1620); color: #fff; }
/* Avviso di esito positivo (es. rilancio effettuato): icona verde con spunta */
.ml-dlg.is-successo .ml-dlg-icona { background: linear-gradient(135deg, #3fbf6a, #145a2b); color: #fff; }
/* Immagine illustrativa nel popup (es. martelletto dell'asta) */
.ml-dlg-figura { padding: 18px 22px 0; text-align: center; }
.ml-dlg-figura img { display: inline-block; width: 100%; max-width: 210px; height: auto; animation: mlDlgBatti .6s ease-out .15s both; }
@keyframes mlDlgBatti { from { opacity: 0; transform: scale(.85) rotate(-6deg); } 60% { opacity: 1; transform: scale(1.04) rotate(2deg); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .ml-dlg-figura img { animation: none; } }
.ml-dlg-titolo { margin: 0; color: #fff; font-family: 'Oswald', sans-serif; font-size: 21px; letter-spacing: 1.2px; text-transform: uppercase; }
.ml-dlg-msg {
    margin: 0; padding: 22px 22px 8px; color: #2a2f45; font-size: 17px; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere;
}
.ml-dlg-piede { display: flex; gap: 10px; padding: 16px 20px 20px; }
.ml-dlg-btn {
    flex: 1 1 0; min-height: 46px; padding: 10px 14px; border-radius: 12px; cursor: pointer;
    font-family: 'Oswald', sans-serif; font-size: 16px; letter-spacing: .6px; text-transform: uppercase;
}
.ml-dlg-btn.is-annulla { border: 1px solid #d5d9e4; background: #f4f5f9; color: #5a6178; }
.ml-dlg-btn.is-ok {
    border: 1px solid #0f4a22; background: linear-gradient(180deg, #1e7a3c, #145a2b); color: #fff;
    box-shadow: 0 3px 8px rgba(20, 90, 43, .25);
}
.ml-dlg.is-pericolo .ml-dlg-btn.is-ok {
    border-color: #5f0f15; background: linear-gradient(180deg, #a3202a, #7a141c); box-shadow: 0 3px 8px rgba(122, 20, 28, .25);
}
.ml-dlg-btn:hover { filter: brightness(1.07); }
.ml-dlg-btn:focus-visible { outline: 3px solid #9b4dff; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
    .ml-dlg-velo, .ml-dlg { transition: none; }
}

/* Scheda calciatore: trasferimenti più compatti in altezza */
.ml-tr-voce { min-height: 56px; }
.ml-tr-info { padding: 6px 0; line-height: 1.2; }
.ml-tr-meta { margin-top: 1px; }
.ml-tr-logo { width: 36px; height: 36px; }
.ml-tr-stagione strong { font-size: 17px; }
.ml-tr-stagione small { font-size: 10px; }
.ml-tr-totale { padding: 9px 14px; }
@media (max-width: 480px) {
    .ml-tr-voce { min-height: 52px; grid-template-columns: 48px 34px minmax(0, 1fr) auto; }
    .ml-tr-logo { width: 30px; height: 30px; }
}

/* Scheda calciatore: grafico dell'andamento del valore (sotto i trasferimenti) */
.ml-tr-grafico {
    margin-top: 14px; overflow: hidden; border: 1px solid #e3e6ef; border-radius: 14px; background: #fff;
    box-shadow: 0 4px 14px rgba(11, 29, 92, 0.06);
}
.ml-trg-testa {
    padding: 10px 16px; background: #e6edf6; color: #2a2f45; font-family: 'Oswald', sans-serif; font-size: 16px;
    letter-spacing: .8px; text-transform: uppercase; border-bottom: 2px solid #9b4dff;
}
.ml-trg-valori { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px 0; }
.ml-trg-valori > div { display: flex; flex-direction: column; min-width: 0; }
.ml-trg-valori .is-destra { align-items: flex-end; text-align: right; }
.ml-trg-valori span { color: #5a6178; font-size: 13px; }
.ml-trg-valori strong { color: #0b1d5c; font-family: 'Oswald', sans-serif; font-size: 17px; line-height: 1.2; }
.ml-trg-valori strong.is-attuale { color: #1a5fa8; font-size: 24px; }
.ml-trg-valori small { color: #5a6178; font-size: 12px; }
.ml-trg-svg { display: block; width: 100%; height: auto; padding: 4px 8px 0; }
.ml-trg-asse { stroke: #cfd5e3; stroke-width: 1; }
.ml-trg-linea { fill: none; stroke: #0b1d5c; stroke-width: 2.5; stroke-linejoin: round; }
.ml-trg-bollo { fill: #fff; stroke: #0b1d5c; stroke-width: 2; }
.ml-trg-pallino { fill: #fff; stroke: #0b1d5c; stroke-width: 3; }
.ml-trg-punto.is-oggi .ml-trg-pallino { fill: #ffcc33; }
.ml-trg-data { fill: #6d738a; font-family: 'Oswald', sans-serif; font-size: 13px; }
.ml-trg-nota { margin: 0; padding: 4px 16px 12px; color: #8a90a2; font-size: 11px; text-align: right; }
.ml-trg-linea { stroke-width: 4; }
.ml-trg-bollo { stroke-width: 3; }
.ml-trg-pallino { stroke-width: 4; }
.ml-trg-data { font-size: 22px; }

/* Scheda calciatore: dati nel riquadro blu sempre 2x2 fino al tablet (i valori
   lunghi come "100,0 mila €" non escono dal box) */
@media (max-width: 767px) {
    .ml-calc-dati { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 10px; }
    .ml-calc-dati > div:nth-child(3) { border-left: 0; }
}
.ml-calc-dati dd { overflow-wrap: anywhere; white-space: normal; }
.ml-calc-dati dt { overflow-wrap: anywhere; }
/* Grafico dell'andamento valore: su schermi larghi non oltre 720px di larghezza */
.ml-trg-svg { max-width: 720px; margin: 0 auto; }

/* Rosa (area partecipante): numero di maglia e fascia da capitano */
.ml-rosa-numero { color: #0b1d5c; font-family: 'Oswald', sans-serif; font-weight: 600; white-space: nowrap; }
.ml-fascia-capitano {
    display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-left: 6px;
    border: 2px solid #b8860b; border-radius: 4px; background: linear-gradient(180deg, #ffd84d, #f2b705); color: #0b1d5c;
    font-family: 'Oswald', sans-serif; font-size: 12px; font-weight: 700; line-height: 1; vertical-align: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}

/* Scheda calciatore: numero di maglia prima del nome e fascia da capitano */
.ml-calc-numero { margin-right: 4px; color: #ffcc33; }
.ml-fascia-capitano.is-grande { width: 26px; height: 26px; margin-left: 8px; font-size: 15px; vertical-align: 4px; }
@media (max-width: 767px) {
    .ml-fascia-capitano.is-grande { width: 22px; height: 22px; font-size: 13px; vertical-align: 3px; }
}

/* Scheda calciatore, desktop: trasferimenti a sinistra e andamento del valore a destra */
@media (min-width: 992px) {
    .ml-tr-corpo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
    .ml-tr-corpo .ml-tr-grafico { margin-top: 0; }
    .ml-tr-corpo .ml-trg-svg { max-width: none; }
}
/* Grafico leggermente più piccolo accanto ai trasferimenti */
@media (min-width: 992px) {
    .ml-tr-corpo { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
    .ml-tr-corpo .ml-trg-svg { padding: 4px 12px 0; }
}

/* Modifica nome calciatore: suggerimento sul formato del cognome */
.ml-cognome-aiuto { display: block; margin-top: 6px; color: #6d738a; font-size: 12px; text-align: left; }

/* Modifica calciatore: form in un riquadro con cornice viola (stile box password) */
.ml-nome-box {
    position: relative; margin: 10px 0 30px; padding: 6px 22px 22px; border: 1px solid #c9cedb; border-radius: 16px;
    background: linear-gradient(180deg, #e9ebf1 0%, #dadee6 100%); box-shadow: 0 6px 18px rgba(11, 29, 92, .08);
}
.ml-nome-box::before, .ml-nome-box::after {
    content: ''; position: absolute; left: 20%; right: 20%; height: 2px;
    background: linear-gradient(90deg, transparent, #9b4dff, transparent);
}
.ml-nome-box::before { top: 0; }
.ml-nome-box::after { bottom: 0; }
.ml-nome-box .ml-mercato-titolo { margin-top: 16px; }
.ml-nome-form label {
    display: block; margin-bottom: 6px; color: #3c4257; font-family: 'Oswald', sans-serif; font-size: 13px;
    font-weight: 500; letter-spacing: 1px; text-transform: uppercase;
}
.ml-nome-form .form-control {
    height: 46px; padding: 8px 14px; border: 1px solid #c3c8d5; border-radius: 10px; background-color: #fff;
    color: #0b1d5c; font-size: 16px; box-shadow: none;
}
.ml-nome-form .form-control:focus { border-color: #9b4dff; box-shadow: 0 0 0 3px rgba(155, 77, 255, .18); outline: 0; }
.ml-nome-form .form-group { margin-bottom: 16px; }
.ml-nome-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 200px; min-height: 46px;
    padding: 10px 22px; border: 1px solid #0f4a22; border-radius: 12px; background: linear-gradient(180deg, #1e7a3c, #145a2b);
    color: #fff; font-family: 'Oswald', sans-serif; font-size: 17px; letter-spacing: .6px; text-transform: uppercase;
    box-shadow: 0 3px 8px rgba(20, 90, 43, .25); cursor: pointer;
}
.ml-nome-btn:hover { filter: brightness(1.08); }
.ml-nome-errore {
    margin: 0 0 14px; padding: 10px 14px; border: 1px solid #e3a7a3; border-radius: 10px; background: #fdecea; color: #8f1620; font-size: 14px;
}
@media (max-width: 767px) {
    .ml-nome-box { padding: 4px 14px 18px; }
    .ml-nome-btn { width: 100%; }
}

/* Modifica calciatore: numero di maglia, avvisi ed esito */
.ml-numero-campo { position: relative; max-width: 160px; }
.ml-numero-campo > span {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #6d738a;
    font-family: 'Oswald', sans-serif; font-size: 18px; pointer-events: none;
}
.ml-nome-form .ml-numero-campo .form-control { padding-left: 32px; font-family: 'Oswald', sans-serif; font-size: 18px; font-weight: 600; }
.ml-cognome-aiuto.is-avviso { color: #8a5a00; font-weight: 600; }
.ml-cognome-aiuto.is-errore { color: #8f1620; font-weight: 600; }
.ml-nome-ok {
    margin: 0 0 14px; padding: 10px 14px; border: 1px solid #9fd3ad; border-radius: 10px; background: #e8f6ec; color: #145a2b; font-size: 14px;
}
.ml-nome-ok div + div { margin-top: 4px; }
.ml-nome-nota { margin: 0 0 14px; padding: 10px 14px; border: 1px solid #f0dfa6; border-radius: 10px; background: #fff7da; color: #7a5a06; font-size: 14px; }
/* Numero di maglia in viola anche nella rosa della squadra */
.ml-rosa-numero { color: #7b2ff7; }
/* Grafico valore: tacche di inizio stagione */
.ml-trg-tacca { stroke: #9b4dff; stroke-width: 1.5; stroke-dasharray: 4 5; opacity: .55; }
/* Numero di maglia in giallo scuro nella rosa della squadra */
.ml-rosa-numero { color: #b8860b; }

/* Rosa della squadra: più spazio tra Ruolo, N. (numero di maglia), Naz. e Nome */
.idteam .tablegrey th:nth-child(-n+3), .idteam .tablegrey td:nth-child(-n+3) { padding-left: 10px; padding-right: 10px; }
.idteam .tablegrey td:nth-child(4), .idteam .tablegrey th:nth-child(4) { padding-left: 12px; }
.idteam .tablegrey td.ml-rosa-numero { min-width: 46px; text-align: center; }
/* Rosa della squadra: spazio tra bandiera e nome */
.idteam .tablegrey td:nth-child(3) { padding-right: 14px !important; }
.idteam .tablegrey td:nth-child(4), .idteam .tablegrey th:nth-child(4) { padding-left: 16px !important; }
/* (più specifiche della regola mobile ".ml-contentbox > .ml-description table.tablegrey td" con !important) */
.ml-description.idteam table.tablegrey > tbody > tr > td:nth-child(-n+3),
.ml-description.idteam table.tablegrey > thead > tr > th:nth-child(-n+3) { padding-left: 10px !important; padding-right: 10px !important; }
.ml-description.idteam table.tablegrey > tbody > tr > td:nth-child(3) { padding-right: 14px !important; }
.ml-description.idteam table.tablegrey > tbody > tr > td:nth-child(4),
.ml-description.idteam table.tablegrey > thead > tr > th:nth-child(4) { padding-left: 16px !important; }
/* Spazio bandiera-nome ridotto */
.ml-description.idteam table.tablegrey > tbody > tr > td:nth-child(3) { padding-right: 6px !important; }
.ml-description.idteam table.tablegrey > tbody > tr > td:nth-child(4),
.ml-description.idteam table.tablegrey > thead > tr > th:nth-child(4) { padding-left: 8px !important; }

/* ==========================================================================
   PAGINA DI ESITO ACCESSO (index/login): login errato, email errata,
   password inviata, accesso bloccato
   ========================================================================== */
.ml-esito {
    max-width: 560px; margin: 26px 0 40px; overflow: hidden; border: 1px solid #e3e6ef; border-radius: 18px;
    background: #fff; box-shadow: 0 10px 28px rgba(11, 29, 92, 0.10);
}
.ml-esito-testa {
    display: flex; align-items: center; gap: 14px; padding: 16px 20px;
    background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .035) 0 2px, transparent 2px 46px), linear-gradient(120deg, #0b1d5c, #071341 60%, #040a26);
    border-bottom: 3px solid #9b4dff;
}
.ml-esito-testa h3 { margin: 0; color: #fff; font-family: 'Oswald', sans-serif; font-size: 22px; letter-spacing: 1.2px; text-transform: uppercase; }
.ml-esito-icona {
    flex: 0 0 44px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 50%;
    color: #fff; font-size: 19px; box-shadow: 0 0 0 3px rgba(255, 255, 255, .18);
}
.ml-esito-icona .glyphicon { top: 0; }
.ml-esito-errore .ml-esito-icona { background: linear-gradient(135deg, #e0535d, #8f1620); }
.ml-esito-blocco .ml-esito-icona { background: linear-gradient(135deg, #f2c94c, #b8860b); color: #0b1d5c; }
.ml-esito-ok .ml-esito-icona { background: linear-gradient(135deg, #3fbf6b, #145a2b); }
.ml-esito-corpo { padding: 20px 22px 22px; }
.ml-esito-corpo p { margin: 0 0 16px; color: #2a2f45; font-size: 16px; line-height: 1.5; }
.ml-esito-tentativi {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 18px; padding: 10px 14px;
    border: 1px solid #f0dfa6; border-radius: 12px; background: #fff7da; color: #7a5a06;
}
.ml-esito-tent-label { font-family: 'Oswald', sans-serif; font-size: 13px; letter-spacing: .8px; text-transform: uppercase; }
.ml-esito-pallini { display: inline-flex; gap: 5px; }
.ml-esito-pallini i { width: 12px; height: 12px; border-radius: 50%; background: #e7d9b0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.ml-esito-pallini i.is-pieno { background: #b8860b; }
.ml-esito-tentativi strong { margin-left: auto; color: #0b1d5c; font-family: 'Oswald', sans-serif; font-size: 18px; }
.ml-esito-nota { color: #5a6178 !important; font-size: 14px !important; }
.ml-esito-azioni { display: flex; flex-wrap: wrap; gap: 10px; }
.ml-esito-btn {
    display: inline-flex; flex: 1 1 160px; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 18px;
    border-radius: 12px; font-family: 'Oswald', sans-serif; font-size: 17px; letter-spacing: .6px; text-transform: uppercase;
    text-decoration: none !important;
}
.ml-esito-btn.is-primario { border: 1px solid #ffcc33; background: #0c1127; color: #ffcc33 !important; box-shadow: 0 4px 10px rgba(11, 29, 92, .2); }
.ml-esito-btn.is-secondario { border: 1px solid #c9cedb; background: #f4f5f9; color: #0b1d5c !important; }
.ml-esito-btn:hover { filter: brightness(1.1); }
/* Esito accesso senza riquadro esterno e senza testata blu */
.ml-esito { border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
.ml-esito-testa { padding: 0 0 12px; background: none; border-bottom: 2px solid #ece6fb; }
.ml-esito-testa h3 { color: #2a2f45; }
.ml-esito-errore .ml-esito-testa h3 { color: #8f1620; }
.ml-esito-icona { box-shadow: 0 4px 10px rgba(11, 29, 92, .15); }
.ml-esito-corpo { padding: 18px 0 0; }
/* Esito accesso: il blocco non si affianca agli elementi flottanti del tema */
.ml-esito { display: flow-root; clear: both; margin-left: auto; margin-right: auto; }
/* Solo lo slogan, centrato (senza il titolo "Masters League") */
.ml-esito-spot { float: none; width: 100%; text-align: center; }
.ml-esito-spot h2 { margin: 0 auto; text-align: center; }

/* ==========================================================================
   PAGINA DI ERRORE (error/error): 404 e 500 con cartellini dell'arbitro
   ========================================================================== */
.ml-errore { max-width: 620px; margin: 30px auto 60px; text-align: center; }
.ml-errore-cartellini { width: 200px; max-width: 60%; margin: 0 auto 10px; filter: drop-shadow(0 10px 14px rgba(11, 29, 92, .18)); }
.ml-errore-cartellini svg { display: block; width: 100%; height: auto; }
.ml-errore-pre { margin: 0 0 4px; color: #6d738a; font-family: 'Oswald', sans-serif; font-size: 15px; letter-spacing: 1.5px; text-transform: uppercase; }
.ml-errore-titolo {
    position: relative; margin: 0 0 16px; padding-bottom: 14px; color: #2a2f45; font-family: 'Oswald', sans-serif;
    font-size: 40px; letter-spacing: 1px; line-height: 1.1; text-transform: uppercase;
}
.ml-errore-titolo::after {
    content: ''; position: absolute; left: 50%; bottom: 0; width: 120px; height: 3px; margin-left: -60px;
    background: linear-gradient(90deg, transparent, #9b4dff, transparent);
}
.ml-errore-testo { margin: 0 auto 26px; max-width: 480px; color: #3c4257; font-size: 17px; line-height: 1.5; }
.ml-errore-azioni { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.ml-errore-azioni .ml-esito-btn { flex: 0 1 230px; }
.ml-errore-dettagli { margin-top: 30px; text-align: left; }
.ml-errore-dettagli pre { max-height: 300px; overflow: auto; font-size: 12px; }
@media (max-width: 767px) {
    .ml-errore { margin-top: 16px; }
    .ml-errore-titolo { font-size: 30px; }
    .ml-errore-azioni .ml-esito-btn { flex: 1 1 100%; }
}

/* Pagina di esito accesso con disegno a tema calcio (stessa impostazione della pagina 404) */
.ml-esito-pagina .ml-esito-tentativi { max-width: 480px; margin: -6px auto 22px; text-align: left; }
.ml-esito-pagina .ml-esito-nota { font-size: 14px; color: #5a6178; }

/* ==========================================================================
   HOME PUBBLICA: "Passa la palla!" - condivisione su Instagram, Facebook, copia link
   ========================================================================== */
.ml-condividi { clear: both; max-width: 640px; margin: 10px auto 30px; padding: 0 16px; text-align: center; }
.ml-condividi-pre { margin: 0 0 2px; color: #b8860b; font-family: 'Oswald', sans-serif; font-size: 15px; letter-spacing: 1.5px; text-transform: uppercase; }
.ml-condividi-palla { display: inline-block; margin-right: 4px; animation: ml-palla-rotola 3s ease-in-out infinite; }
@keyframes ml-palla-rotola { 0%, 100% { transform: translateX(0) rotate(0); } 50% { transform: translateX(6px) rotate(180deg); } }
.ml-condividi-titolo {
    position: relative; margin: 0 0 18px; padding-bottom: 12px; color: #2a2f45; font-family: 'Oswald', sans-serif;
    font-size: 24px; letter-spacing: 1px; text-transform: uppercase;
}
.ml-condividi-titolo::after {
    content: ''; position: absolute; left: 50%; bottom: 0; width: 100px; height: 2px; margin-left: -50px;
    background: linear-gradient(90deg, transparent, #9b4dff, transparent);
}
.ml-condividi-azioni { display: flex; justify-content: center; gap: 22px; }
.ml-condividi-btn {
    display: inline-flex; flex-direction: column; align-items: center; gap: 6px; padding: 0; border: 0; background: none;
    color: #2a2f45 !important; font-family: 'Oswald', sans-serif; font-size: 13px; letter-spacing: .8px; text-transform: uppercase;
    text-decoration: none !important; cursor: pointer;
}
.ml-condividi-icona {
    position: relative; display: flex; align-items: center; justify-content: center; width: 58px; height: 58px; border-radius: 50%;
    color: #fff; font-size: 26px; box-shadow: 0 6px 14px rgba(11, 29, 92, .2); transition: transform .2s ease;
}
/* Cuciture del pallone attorno all'icona */
.ml-condividi-icona::after {
    content: ''; position: absolute; inset: -5px; border: 2px dashed rgba(11, 29, 92, .25); border-radius: 50%;
}
.ml-condividi-btn:hover .ml-condividi-icona, .ml-condividi-btn:focus-visible .ml-condividi-icona { transform: translateY(-3px) rotate(-8deg); }
.ml-condividi-btn.is-ig .ml-condividi-icona { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.ml-condividi-btn.is-fb .ml-condividi-icona { background: #1877f2; }
.ml-condividi-btn.is-link .ml-condividi-icona { background: linear-gradient(180deg, #1e7a3c, #145a2b); }
.ml-condividi-btn.is-copiato .ml-condividi-icona { background: #ffcc33; color: #0b1d5c; }
.ml-condividi-esito { min-height: 20px; margin: 12px 0 0; color: #145a2b; font-size: 14px; }
@media (prefers-reduced-motion: reduce) {
    .ml-condividi-palla { animation: none; }
    .ml-condividi-icona { transition: none; }
}
.ml-condividi-palla svg { display: block; }
.ml-condividi-palla { vertical-align: -3px; }
.ml-condividi-btn.is-wa .ml-condividi-icona { background: #25d366; font-size: 30px; }

/* ==========================================================================
   LINK: colore base giallo scuro (simil oro, come gli hashtag delle statistiche)
   al posto del giallo chiaro del tema (#eebb22), poco leggibile su sfondo chiaro.
   :where() mantiene la specificità di un semplice "a": restano valide tutte le
   regole più specifiche (pulsanti, menù, testate scure, stili inline).
   ========================================================================== */
:where(.ml-main) a,
:where(.ml-main) a:focus,
:where(.ml-main) a:active,
:where(.ml-main) p a { color: #b8860b; }
:where(.ml-main) a:hover,
:where(.ml-main) p a:hover { color: #8a6508; }
/* Riquadri scuri senza un colore proprio per i link: resta il giallo chiaro del tema */
.ml-scudi-blocco a, .ml-scudi-blocco a:hover, .ml-scudi-blocco a:focus,
.ml-testata-notte a, .ml-testata-notte a:hover { color: #eebb22; }
/* Barra superiore scura dell'area admin: il nome "Area Admin" resta giallo chiaro */
.ml-adm-topbar a.ml-adm-brand, .ml-adm-topbar a.ml-adm-brand:hover, .ml-adm-topbar a.ml-adm-brand:focus { color: #eebb22; }

/* ==========================================================================
   TROFEI VINTI (Application_Trofei): stessa grafica della scheda calciatore
   (icona colorata, numero nel bollino blu, nome sotto) in tutte le sezioni.
   .ml-trofei = riquadro chiaro autonomo; .is-compatto = elenchi (solo icona e numero)
   ========================================================================== */
.ml-trofei {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; list-style: none;
    margin: 14px 0 18px; padding: 14px 12px 12px; border: 1px solid #e3e6ef; border-radius: 16px;
    background: #fff; box-shadow: 0 4px 14px rgba(11, 29, 92, 0.08); text-shadow: none;
}
.ml-trofei li { position: relative; display: flex; flex-direction: column; align-items: center; width: 70px; cursor: default; }
.ml-trofei img { width: 38px !important; max-width: 38px !important; height: 38px; object-fit: contain; }
.ml-trofei .ml-ct-n {
    position: absolute; top: 18px; left: 50%; margin-left: 8px; min-width: 24px; height: 24px; padding: 0 6px;
    border: 2px solid #fff; border-radius: 12px; background: #1a5fa8; color: #fff;
    font-family: 'Oswald', sans-serif; font-size: 13px; line-height: 20px; text-align: center;
}
.ml-trofei .ml-ct-nome {
    margin-top: 6px; color: #6d738a; font-family: 'Oswald', sans-serif; font-size: 10px; letter-spacing: .5px;
    line-height: 1.15; text-align: center; text-transform: uppercase;
}
/* Bacheca della squadra: dentro la scheda, senza doppio riquadro */
.ml-trofei.is-bacheca { margin: 6px 0 0; border: 0; box-shadow: none; padding: 6px 0 0; }
/* Elenchi (squadre e calciatori più titolati): icone piccole con il bollino, senza nome */
.ml-trofei.is-compatto {
    display: inline-flex; gap: 6px 14px; margin: 0; padding: 6px 10px 4px; border-radius: 12px;
    box-shadow: none; vertical-align: middle;
}
.ml-trofei.is-compatto li { width: auto; padding-right: 10px; }
.ml-trofei.is-compatto img { width: 24px !important; max-width: 24px !important; height: 24px; }
.ml-trofei.is-compatto .ml-ct-n {
    top: auto; bottom: -3px; left: auto; right: -2px; margin: 0; min-width: 17px; height: 17px; padding: 0 4px;
    border-width: 1.5px; border-radius: 9px; font-size: 10px; line-height: 14px;
}
.ml-trofei.is-compatto .ml-ct-nome { display: none; }
/* Versione compatta su una sola riga anche nelle colonne strette degli elenchi */
.ml-trofei.is-compatto { flex-wrap: nowrap; gap: 4px; padding: 5px 6px 3px; }
.ml-trofei.is-compatto li { padding-right: 9px; }
.ml-trofei.is-compatto img { width: 22px !important; max-width: 22px !important; height: 22px; }

/* Trofei vinti: grafica invariata, il numero di vittorie (prima "xN") è in un cerchio blu
   come nella scheda calciatore. Dimensione proporzionata al testo della sezione (em). */
.ml-trofeo-n,
.ml-club-trofeo .ml-trofeo-n {
    display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
    min-width: 1.75em; height: 1.75em; margin: 0 .45em 0 .2em; padding: 0 .4em; vertical-align: middle;
    border: 2px solid #fff; border-radius: 1em; background: #1a5fa8; color: #fff !important;
    font-family: 'Oswald', sans-serif; font-size: 13px; font-weight: 600; line-height: 1; text-shadow: none;
}
/* Elenchi dei più titolati (icone da 16px): cerchio più piccolo */
.ml-description[style*="font-size: 11px"] .ml-trofeo-n,
td .ml-trofeo-n { font-size: 11px; border-width: 1.5px; margin-right: .3em; }
/* Bacheca della squadra: il numero sotto l'icona, al posto di "xN" */
.ml-club-trofeo .ml-trofeo-n { margin: 2px 0 0; font-size: 14px; }

/* Numero cerchiato sovrapposto all'angolo in basso a destra del trofeo (come nella scheda calciatore) */
.ml-trofeo-n {
    position: relative; z-index: 1; top: .55em; margin-left: -.85em; margin-right: 1em;
}
td .ml-trofeo-n { top: .5em; margin-left: -.8em; margin-right: .7em; }
/* Bacheca della squadra: cerchio sull'icona, non sotto */
.ml-club-trofeo { position: relative; }
.ml-club-trofeo .ml-trofeo-n {
    position: absolute; top: 34px; left: 50%; margin: 0 0 0 6px; font-size: 13px;
}
/* Classifiche dei più titolati (icone da 16px): cerchio più piccolo sull'angolo dell'icona */
td .ml-trofeo-n { font-size: 9px; border-width: 1px; top: .7em; margin-left: -.55em; margin-right: .9em; }

/* Classifiche dei più titolati: coppe in colonne fisse, allineate tra tutte le righe */
.ml-trofei-griglia {
    display: grid; grid-template-columns: repeat(var(--ml-colonne, 3), 30px); justify-content: center;
    align-items: center; gap: 4px 8px; text-shadow: none;
}
.ml-trofei-cella { position: relative; display: block; width: 30px; height: 28px; }
.ml-trofei-cella img { position: absolute; left: 0; top: 2px; width: 22px !important; max-width: 22px !important; height: 22px; object-fit: contain; }
.ml-trofei-griglia .ml-trofeo-n {
    position: absolute; top: auto; bottom: -1px; right: -2px; left: auto; margin: 0;
    min-width: 17px; height: 17px; padding: 0 3px; border-width: 1.5px; font-size: 10px;
}
@media (max-width: 400px) {
    .ml-trofei-griglia { grid-template-columns: repeat(var(--ml-colonne, 3), 27px); gap: 4px 5px; }
    .ml-trofei-cella { width: 27px; }
    .ml-trofei-cella img { width: 20px !important; max-width: 20px !important; height: 20px; }
}
/* La colonna delle coppe è larga esattamente quanto la griglia in ogni riga (ogni riga è una
   tabella a sé): le coppe restano allineate anche con nomi di lunghezza diversa */
td:has(> .ml-trofei-griglia) { width: 1% !important; padding-left: 6px; padding-right: 6px; }
/* Schermi piccoli: griglia delle coppe più stretta e nomi lunghi che vanno a capo solo se
   necessario, così nessuna riga allarga la propria colonna e le coppe restano allineate */
@media (max-width: 400px) {
    .ml-trofei-griglia { grid-template-columns: repeat(var(--ml-colonne, 3), 25px); gap: 4px 3px; }
    .ml-trofei-cella { width: 25px; }
    .ml-trofei-cella img { width: 19px !important; max-width: 19px !important; height: 19px; }
    .ml-trofei-griglia .ml-trofeo-n { right: -3px; min-width: 15px; height: 15px; font-size: 9px; }
}
tr:has(.ml-trofei-griglia) td:first-child a { overflow-wrap: anywhere; }

/* ==========================================================================
   CLASSIFICHE DEI PIÙ TITOLATI: colonne a larghezza fissa uguali in ogni riga
   (nome su una riga sola, totale, coppe e bandiera allineati)
   ========================================================================== */
table.ml-titolati-tab { width: 100%; table-layout: fixed; }
table.ml-titolati-tab td { vertical-align: middle; }
table.ml-titolati-tab .ml-tt-logo { width: 64px !important; }
table.ml-titolati-tab .ml-tt-nome { overflow: hidden; }
table.ml-titolati-tab .ml-tt-nome a {
    display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; overflow-wrap: normal !important;
}
table.ml-titolati-tab .ml-tt-tot { width: 46px !important; padding-left: 2px; padding-right: 2px; }
table.ml-titolati-tab.is-3 .ml-tt-coppe { width: 124px !important; }
table.ml-titolati-tab.is-4 .ml-tt-coppe { width: 160px !important; }
table.ml-titolati-tab .ml-tt-band { width: 46px !important; }
table.ml-titolati-tab .ml-trofei-griglia { justify-content: start; }
@media (max-width: 400px) {
    table.ml-titolati-tab .ml-tt-logo { width: 54px !important; }
    table.ml-titolati-tab .ml-tt-logo img { width: 44px !important; }
    table.ml-titolati-tab .ml-tt-nome a { font-size: 16px !important; }
    table.ml-titolati-tab .ml-tt-tot { width: 36px !important; }
    table.ml-titolati-tab .ml-tt-tot span { font-size: 20px !important; }
    table.ml-titolati-tab.is-3 .ml-tt-coppe { width: 96px !important; }
    table.ml-titolati-tab.is-4 .ml-tt-coppe { width: 124px !important; }
    table.ml-titolati-tab .ml-tt-band { width: 40px !important; }
    table.ml-titolati-tab .ml-tt-band img { width: 28px !important; }
}
/* Più spazio per il nome su smartphone: colonne di totale, coppe e bandiera al minimo */
@media (max-width: 400px) {
    table.ml-titolati-tab .ml-tt-nome { padding-right: 2px !important; }
    table.ml-titolati-tab .ml-tt-nome a { font-size: 15px !important; }
    table.ml-titolati-tab .ml-tt-tot { width: 30px !important; padding: 0 !important; }
    table.ml-titolati-tab .ml-tt-tot span { font-size: 19px !important; }
    table.ml-titolati-tab .ml-tt-coppe { padding-left: 2px !important; padding-right: 0 !important; }
    table.ml-titolati-tab.is-3 .ml-tt-coppe { width: 84px !important; }
    table.ml-titolati-tab.is-4 .ml-tt-coppe { width: 112px !important; }
    table.ml-titolati-tab .ml-tt-band { width: 34px !important; padding: 0 !important; }
    table.ml-titolati-tab .ml-tt-band img { width: 26px !important; }
}
/* Classifiche dei più titolati: niente puntini sul nome (il carattere si riduce per farlo entrare) */
table.ml-titolati-tab .ml-tt-nome a { text-overflow: clip !important; }
/* Telefoni molto stretti (fino a 360px): coppe, totale e bandiera più piccoli per lasciare spazio al nome */
@media (max-width: 360px) {
    table.ml-titolati-tab .ml-tt-logo { width: 46px !important; }
    table.ml-titolati-tab .ml-tt-logo img { width: 38px !important; }
    table.ml-titolati-tab .ml-tt-tot { width: 26px !important; }
    table.ml-titolati-tab .ml-tt-tot span { font-size: 17px !important; }
    table.ml-titolati-tab.is-3 .ml-tt-coppe { width: 66px !important; }
    table.ml-titolati-tab.is-4 .ml-tt-coppe { width: 88px !important; }
    table.ml-titolati-tab .ml-tt-band { width: 26px !important; }
    table.ml-titolati-tab .ml-tt-band img { width: 22px !important; }
    .ml-titolati-tab .ml-trofei-griglia { grid-template-columns: repeat(var(--ml-colonne, 3), 20px); gap: 3px 2px; }
    .ml-titolati-tab .ml-trofei-cella { width: 20px; height: 22px; }
    .ml-titolati-tab .ml-trofei-cella img { width: 16px !important; max-width: 16px !important; height: 16px; }
    .ml-titolati-tab .ml-trofei-griglia .ml-trofeo-n { right: -4px; min-width: 13px; height: 13px; padding: 0 2px; font-size: 8px; border-width: 1px; }
}
/* Telefoni da 320px: senza bandiera, più spazio per il nome */
@media (max-width: 340px) {
    table.ml-titolati-tab .ml-tt-band { display: none; }
}
@media (max-width: 340px) {
    table.ml-titolati-tab.is-3 .ml-tt-coppe { width: 74px !important; padding-right: 8px !important; }
    table.ml-titolati-tab.is-4 .ml-tt-coppe { width: 96px !important; padding-right: 8px !important; }
}

/* Privacy / Policy (index/privacy e main/privacy): testo leggibile con titoli, elenchi e indice */
.ml-privacy-titolo { margin: 6px 0 14px; color: #8b0000; }
.ml-privacy { max-width: 820px; color: #333; font-size: 15px; line-height: 1.65; text-align: left; }
.ml-privacy p { margin: 0 0 12px; }
.ml-privacy-intro { padding: 12px 16px; border-left: 4px solid #b8860b; border-radius: 0 10px 10px 0; background: #faf6ea; }
.ml-privacy-indice { margin: 16px 0 6px; padding: 12px 16px; border: 1px solid #e3e6ef; border-radius: 12px; background: #f7f8fc; }
.ml-privacy-indice ol { margin: 6px 0 0; padding-left: 22px; columns: 2; column-gap: 28px; }
.ml-privacy-indice li { margin: 2px 0; break-inside: avoid; }
.ml-privacy h4 {
    margin: 26px 0 10px; padding-bottom: 6px; border-bottom: 2px solid #e3e6ef;
    color: #0b1d5c; font-size: 19px; scroll-margin-top: 90px;
}
.ml-privacy ul { margin: 0 0 12px; padding-left: 20px; }
.ml-privacy ul li, .ml-privacy-indice li { line-height: 1.5; }
.ml-privacy ul li { margin: 0 0 6px; list-style: disc; }
.ml-privacy em { color: #6d738a; font-size: 13px; }
.ml-privacy-data { margin-top: 24px !important; color: #6d738a; font-size: 13px; font-style: italic; }
@media (max-width: 600px) {
    .ml-privacy { font-size: 14px; }
    .ml-privacy-indice ol { columns: 1; }
    .ml-privacy h4 { font-size: 17px; }
}

/* Rosa (main/squadra, La rosa) su mobile: colonna del nome più stretta
   e meno spazio laterale su ruolo e bandiera, così la skill resta visibile */
@media (max-width: 480px) {
    .idteam table.tablegrey td.ml-rosa-nomecol { min-width: 122px !important; }
    .ml-description.idteam table.tablegrey > tbody > tr > td:nth-child(-n+2),
    .ml-description.idteam table.tablegrey > thead > tr > th:nth-child(-n+2) { padding-left: 6px !important; padding-right: 6px !important; }
}

/* Scheda calciatore: retro della maglia a destra nel riquadro blu, tra nome e dati
   (dimensioni fisse e "flex: none": non si sovrappone a nome, nazione e squadra) */
.ml-calc-maglia { flex: 0 0 96px; width: 96px; align-self: center; }
.ml-calc-maglia .ml-maglia-retro { width: 100%; max-width: none; margin: 0; }
.ml-calc-maglia svg.ml-maglia { filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); }
@media (min-width: 768px) {
    .ml-calc-maglia { flex-basis: 118px; width: 118px; margin-right: 6px; }
}
@media (max-width: 767px) {
    .ml-calc-maglia { flex-basis: 78px; width: 78px; }
}
@media (max-width: 360px) {
    .ml-calc-maglia { flex-basis: 58px; width: 58px; }
    .ml-calc-hero:has(.ml-calc-maglia) .ml-calc-nome { font-size: 19px; }
    .ml-calc-hero:has(.ml-calc-maglia) { gap: 10px; }
    .ml-calc-hero:has(.ml-calc-maglia) .ml-calc-ruolo { flex-basis: 42px; width: 42px; height: 42px; font-size: 15px; }
    .ml-calc-hero:has(.ml-calc-maglia) .ml-calc-dett { font-size: 13px; }
}
/* Con la maglia il blocco del nome si restringe (il testo va a capo) invece di
   spingere la maglia su una nuova riga */
.ml-calc-hero:has(.ml-calc-maglia) .ml-calc-info { flex: 1 1 0; }
.ml-calc-hero:has(.ml-calc-maglia) .ml-calc-squadra { max-width: 100%; }
.ml-calc-hero:has(.ml-calc-maglia) .ml-calc-squadra span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
