/* ==========================================================================
   LHAL — Pagine interne (classifiche, giocatori, squadre)
   Da caricare DOPO bootstrap.css, styles.css e i CSS di DataTables.
   Usa le variabili definite in lhal-home.css: caricare anche quello.
   ========================================================================== */

/* --- Intestazione di pagina --------------------------------------------- */

.lhal-page-head {
    background: var(--lhal-ink);
    color: #fff;
    border-bottom: 3px solid var(--lhal-red);
    padding: 1.5rem 0;
    margin-bottom: 1.5rem;
}

.lhal-page-head h1 {
    font-family: var(--lhal-display);
    font-weight: 600;
    font-size: clamp(1.6rem, 4vw, 2.25rem);
    margin: 0;
}

.lhal-page-head p {
    color: #9FB6C5;
    font-size: .875rem;
    margin: .25rem 0 0;
}

/* --- Navigazione interna delle classifiche ------------------------------ */

/* L'altezza della navbar cambia con il logo e con la larghezza dello schermo:
   viene misurata da JavaScript e scritta in --lhal-navbar-h. Il valore di
   riserva serve solo al primo istante, prima che lo script giri. */

.lhal-subnav {
    position: sticky;
    top: calc(var(--lhal-navbar-h, 56px) + .5rem);
    /* Un gradino sotto .sticky-top (1020): l'offcanvas del menu vive dentro la
       navbar, quindi a parità di z-index vincerebbe il menu interno, che sta
       più avanti nel documento. */
    z-index: 1019;
    background: var(--lhal-ink);
    border-radius: 999px;
    padding: .35rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 18px rgba(16, 31, 42, .22);
    overflow-x: auto;
    scrollbar-width: none;
}

.lhal-subnav::-webkit-scrollbar {
    display: none;
}

.lhal-subnav ul {
    display: flex;
    gap: .25rem;
    margin: 0;
    padding: 0;
    list-style: none;
    white-space: nowrap;
}

.lhal-subnav a {
    display: block;
    padding: .4rem .9rem;
    border-radius: 999px;
    font-size: .875rem;
    text-decoration: none;
    color: #9FB6C5;
}

.lhal-subnav a:hover {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

.lhal-subnav a.active {
    background: #fff;
    color: var(--lhal-ink);
}

/* I titoli di sezione non devono finire sotto navbar e menu quando si salta a un'ancora */
section[id] {
    scroll-margin-top: calc(var(--lhal-navbar-h, 56px) + 4.5rem);
}

/* Neutralizza la riga gialla di styles.css: qui la prima posizione è la barra
   dorata sulla colonna. Puoi anche cancellare quel blocco da styles.css. */
#classificaGiocatoritotali tr:first-child td,
#classificaPortieritotali tr:first-child td,
#classificaFairPlaytotali tr:first-child td,
#classificaGiocatoriarchivio tr:first-child td,
#classificaPortieriarchivio tr:first-child td,
#classificaFairPlayarchivio tr:first-child td {
    background-color: transparent;
}

/* --- Tabelle ------------------------------------------------------------- */

.lhal-tablecard {
    background: var(--lhal-paper);
    border: 1px solid var(--lhal-line);
    border-radius: var(--lhal-radius);
    overflow: hidden;
    margin-bottom: 2.5rem;
}

.lhal-tablecard > .lhal-tablecard__head {
    display: flex;
    align-items: baseline;
    gap: .75rem;
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--lhal-line);
}

.lhal-tablecard__head h2 {
    font-family: var(--lhal-display);
    font-weight: 600;
    font-size: 1.35rem;
    margin: 0;
}

.lhal-tablecard__head .lhal-hint {
    margin-left: auto;
    font-size: .75rem;
    color: var(--lhal-muted);
}

/* La tabella vera e propria: niente zebra, righe separate da una linea sottile */
table.lhal-grid {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    font-size: .9375rem;
}

table.lhal-grid thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #F1F5F8;
    font-size: .6875rem;
    font-weight: 600;
    color: var(--lhal-muted);
    text-align: left;
    padding: .5rem .75rem;
    border-bottom: 1px solid var(--lhal-line);
    white-space: nowrap;
}

table.lhal-grid tbody td {
    padding: .5rem .75rem;
    border-bottom: 1px solid #EEF2F5;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

table.lhal-grid tbody tr:last-child td {
    border-bottom: 0;
}

table.lhal-grid tbody tr:hover td {
    background: #F6F9FB;
}

/* Colonne numeriche allineate a destra, testuali a sinistra */
table.lhal-grid th.num,
table.lhal-grid td.num {
    text-align: right;
}

table.lhal-grid td.nome {
    white-space: normal;
    min-width: 9rem;
}

/* Colonna posizione */
table.lhal-grid td.pos {
    width: 2.5rem;
    color: var(--lhal-muted);
    font-family: var(--lhal-display);
    font-size: 1.0625rem;
    text-align: center;
}

/* Prima posizione: barra dorata sottile, non tutta la riga gialla */
table.lhal-grid tr.is-first td.pos {
    box-shadow: inset 3px 0 0 #C8A227;
    color: var(--lhal-ink);
}

table.lhal-grid tr.is-first td.nome {
    font-weight: 600;
}

/* Posizioni che accedono ai playoff */
table.lhal-grid tr.is-qualified td.pos {
    box-shadow: inset 3px 0 0 var(--lhal-blue);
    color: var(--lhal-ink);
}

/* Valore in evidenza (punti, ratio) */
table.lhal-grid td.key {
    font-family: var(--lhal-display);
    font-size: 1.0625rem;
    text-align: right;
}

/* --- Contrassegni ------------------------------------------------------- */

.lhal-tag {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .6875rem;
    line-height: 1;
    padding: .2rem .45rem;
    border-radius: 3px;
    border: 1px solid;
    white-space: nowrap;
}

.lhal-tag--ok {
    color: #0F5132;
    border-color: #BADBCC;
    background: #F1F8F4;
}

.lhal-tag--warn {
    color: var(--lhal-red);
    border-color: #F2C2C9;
    background: #FDF3F4;
}

.lhal-tag--muted {
    color: var(--lhal-muted);
    border-color: var(--lhal-line);
    background: #F6F9FB;
}

.lhal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: .6rem 1rem;
    border-top: 1px solid var(--lhal-line);
    font-size: .75rem;
    color: var(--lhal-muted);
    background: #FAFCFD;
}

.lhal-legend span {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

/* Nota della classifica (ex alert giallo) */
.lhal-note {
    background: #FFF9E6;
    border: 1px solid #F0DFA8;
    border-left: 3px solid #C8A227;
    border-radius: var(--lhal-radius);
    padding: .85rem 1rem;
    font-size: .875rem;
}

/* --- Tabellone playoff --------------------------------------------------- */

.lhal-bracket-wrap {
    overflow-x: auto;
    padding-bottom: .5rem;
}

.lhal-bracket {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 1.25rem;
    min-width: 720px;
    align-items: center;
}

.lhal-bracket__col {
    display: grid;
    gap: .75rem;
}

.lhal-bracket__col h3 {
    font-family: var(--lhal-display);
    font-weight: 600;
    font-size: .9375rem;
    color: var(--lhal-muted);
    text-align: center;
    margin: 0 0 .25rem;
}

/* Le colonne successive hanno meno incontri: si distanziano da sole */
.lhal-bracket__col--2 { gap: 4.25rem; }
.lhal-bracket__col--3 { gap: 10.75rem; }

.lhal-slot {
    background: var(--lhal-paper);
    border: 1px solid var(--lhal-line);
    border-radius: var(--lhal-radius);
    padding: .5rem;
    display: flex;
    align-items: center;
    gap: .6rem;
    min-height: 58px;
    position: relative;
}

.lhal-slot img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.lhal-slot span {
    font-size: .8125rem;
    line-height: 1.15;
}

.lhal-slot--empty {
    border-style: dashed;
    color: var(--lhal-muted);
    justify-content: center;
    font-size: .75rem;
}

/* Linea di collegamento verso la colonna successiva */
.lhal-bracket__col:not(:last-child) .lhal-slot::after {
    content: "";
    position: absolute;
    right: -1.25rem;
    top: 50%;
    width: 1.25rem;
    border-top: 1px solid var(--lhal-line);
}

/* Il campione: unica scheda scura del tabellone */
.lhal-slot--champ {
    background: var(--lhal-ink);
    border-color: var(--lhal-ink);
    color: #fff;
    border-bottom: 3px solid #C8A227;
    min-height: 96px;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: .35rem;
}

.lhal-slot--champ img {
    width: 56px;
    height: 56px;
}

.lhal-slot--champ span {
    font-family: var(--lhal-display);
    font-size: 1.125rem;
}

/* --- DataTables: adattamento alla palette -------------------------------- */

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select,
div.dt-container input,
div.dt-container select {
    border: 1px solid var(--lhal-line);
    border-radius: var(--lhal-radius);
    padding: .3rem .5rem;
    background: #fff;
}

.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_info,
div.dt-container .dt-search,
div.dt-container .dt-length,
div.dt-container .dt-info {
    font-size: .8125rem;
    color: var(--lhal-muted);
    padding: .5rem 1rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button,
div.dt-container .dt-paging button {
    font-size: .8125rem !important;
    border-radius: var(--lhal-radius) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
div.dt-container .dt-paging button.current {
    background: var(--lhal-ink) !important;
    border-color: var(--lhal-ink) !important;
    color: #fff !important;
}

/* --- Azioni di gestione (visibili solo all'amministratore) ---------------- */

.lhal-actions {
    display: inline-flex;
    gap: .25rem;
}

.lhal-actions .btn {
    --bs-btn-padding-y: .15rem;
    --bs-btn-padding-x: .4rem;
    --bs-btn-font-size: .8125rem;
    --bs-btn-color: var(--lhal-muted);
    --bs-btn-border-color: var(--lhal-line);
    --bs-btn-hover-bg: var(--lhal-ink);
    --bs-btn-hover-border-color: var(--lhal-ink);
    --bs-btn-hover-color: #fff;
}

/* --- Schermi stretti ------------------------------------------------------ */

@media (max-width: 767.98px) {
    table.lhal-grid {
        font-size: .875rem;
    }

    table.lhal-grid thead th,
    table.lhal-grid tbody td {
        padding: .45rem .5rem;
    }
}

/* ==========================================================================
   Squadre: elenco e rosa
   ========================================================================== */

/* --- Elenco squadre ------------------------------------------------------ */

.lhal-squadre {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.lhal-squadre a {
    background: var(--lhal-paper);
    border: 1px solid var(--lhal-line);
    border-radius: var(--lhal-radius);
    padding: 1rem .75rem;
    display: grid;
    justify-items: center;
    gap: .75rem;
    text-decoration: none;
    color: inherit;
}

.lhal-squadre a:hover,
.lhal-squadre a:focus-visible {
    border-color: var(--lhal-blue);
    box-shadow: 0 4px 14px rgba(16, 31, 42, .08);
}

.lhal-squadre img {
    width: 100%;
    max-width: 110px;
    height: 96px;
    object-fit: contain;
}

.lhal-squadre span {
    font-family: var(--lhal-display);
    font-size: 1.0625rem;
    text-align: center;
    line-height: 1.15;
}

/* --- Intestazione della squadra ------------------------------------------ */

.lhal-team-head {
    background: var(--lhal-ink);
    color: #fff;
    border-bottom: 3px solid var(--lhal-red);
    padding: 1.5rem 0;
    margin-bottom: 1.5rem;
}

.lhal-team-head__inner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.lhal-team-head img {
    width: 96px;
    height: 96px;
    object-fit: contain;
    background: rgba(255, 255, 255, .07);
    border-radius: var(--lhal-radius);
    padding: .5rem;
}

.lhal-team-head h1 {
    font-family: var(--lhal-display);
    font-weight: 600;
    font-size: clamp(1.75rem, 5vw, 2.75rem);
    margin: 0;
    line-height: 1.05;
}

.lhal-team-head .lhal-back {
    display: inline-block;
    font-size: .8125rem;
    color: #9FB6C5;
    text-decoration: none;
    margin-bottom: .35rem;
}

.lhal-team-head .lhal-back:hover {
    color: #fff;
}

/* Numeri di riepilogo della rosa */
.lhal-stats {
    display: flex;
    gap: 1.75rem;
    margin-left: auto;
    flex-wrap: wrap;
}

.lhal-stat b {
    display: block;
    font-family: var(--lhal-display);
    font-size: 1.75rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.lhal-stat span {
    font-size: .75rem;
    color: #9FB6C5;
}

/* --- Rosa ---------------------------------------------------------------- */

/* Numero di maglia: piccolo riquadro, come sulla schiena */
.lhal-maglia {
    display: inline-grid;
    place-items: center;
    min-width: 1.75rem;
    padding: .1rem .3rem;
    border: 1px solid var(--lhal-line);
    border-radius: 3px;
    font-family: var(--lhal-display);
    font-size: .9375rem;
    color: var(--lhal-ink);
    background: #F6F9FB;
}

/* Fascia da capitano e assistente */
.lhal-fascia {
    display: inline-grid;
    place-items: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 3px;
    font-size: .6875rem;
    font-weight: 700;
    color: #fff;
    background: var(--lhal-blue);
}

.lhal-fascia--a {
    background: var(--lhal-muted);
}

@media (max-width: 575.98px) {
    .lhal-team-head img {
        width: 64px;
        height: 64px;
    }

    .lhal-stats {
        margin-left: 0;
        gap: 1.25rem;
    }
}

/* ==========================================================================
   Partite: piano partite e dettaglio
   ========================================================================== */

/* --- Selettore regular season / playoff ---------------------------------- */

.lhal-pills {
    display: flex;
    gap: .25rem;
    background: var(--lhal-ink);
    border-radius: 999px;
    padding: .35rem;
    margin-bottom: 1.5rem;
    width: fit-content;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
}

.lhal-pills::-webkit-scrollbar {
    display: none;
}

.lhal-pills a {
    padding: .4rem .9rem;
    border-radius: 999px;
    font-size: .875rem;
    text-decoration: none;
    color: #9FB6C5;
    white-space: nowrap;
}

.lhal-pills a:hover {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

.lhal-pills a.active {
    background: #fff;
    color: var(--lhal-ink);
}

/* --- Piano partite -------------------------------------------------------- */

.lhal-giornata {
    margin-bottom: 1.5rem;
}

.lhal-giornata__data {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    background: var(--lhal-ink);
    color: #fff;
    padding: .5rem 1rem;
    border-radius: var(--lhal-radius) var(--lhal-radius) 0 0;
    font-family: var(--lhal-display);
    font-size: 1.0625rem;
}

.lhal-giornata__data small {
    font-family: system-ui, sans-serif;
    font-size: .75rem;
    color: #9FB6C5;
    margin-left: auto;
}

.lhal-giornata__corpo {
    background: var(--lhal-paper);
    border: 1px solid var(--lhal-line);
    border-top: 0;
    border-radius: 0 0 var(--lhal-radius) var(--lhal-radius);
}

.lhal-fixture {
    display: grid;
    grid-template-columns: 2.5rem 3.5rem 1fr auto;
    align-items: center;
    gap: .75rem;
    padding: .65rem 1rem;
    border-bottom: 1px solid #EEF2F5;
}

.lhal-fixture:last-child {
    border-bottom: 0;
}

.lhal-fixture:hover {
    background: #F6F9FB;
}

.lhal-fixture__num {
    font-family: var(--lhal-display);
    font-size: .9375rem;
    color: var(--lhal-muted);
    text-align: center;
}

.lhal-fixture__ora {
    font-family: var(--lhal-display);
    font-size: 1.125rem;
    color: var(--lhal-blue);
    font-variant-numeric: tabular-nums;
}

.lhal-fixture__squadre {
    min-width: 0;
    font-size: .9375rem;
}

.lhal-fixture__squadre a {
    color: inherit;
    text-decoration: none;
}

.lhal-fixture__squadre a:hover {
    text-decoration: underline;
}

.lhal-fixture__esito {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-family: var(--lhal-display);
    font-size: 1.25rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.lhal-fixture__esito small {
    font-family: system-ui, sans-serif;
    font-size: .6875rem;
    color: var(--lhal-muted);
}

.lhal-lucchetto {
    color: var(--lhal-red);
    font-size: 1rem;
    text-decoration: none;
}

/* --- Tabellone del dettaglio partita -------------------------------------- */

.lhal-scoreboard {
    background:
        linear-gradient(105deg, rgba(255, 255, 255, .05) 0 2px, transparent 2px 34px),
        linear-gradient(160deg, var(--lhal-ink-2), var(--lhal-ink) 60%);
    color: #fff;
    border-bottom: 3px solid var(--lhal-red);
    padding: 1.75rem 0;
    margin-bottom: 1.5rem;
}

.lhal-scoreboard__grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
}

.lhal-scoreboard__team {
    display: flex;
    align-items: center;
    gap: .85rem;
    min-width: 0;
}

.lhal-scoreboard__team--away {
    flex-direction: row-reverse;
    text-align: right;
}

.lhal-scoreboard__team img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    flex: 0 0 72px;
}

.lhal-scoreboard__team span {
    font-family: var(--lhal-display);
    font-size: clamp(1.1rem, 3vw, 1.9rem);
    line-height: 1.05;
    overflow-wrap: break-word;
}

.lhal-scoreboard__score {
    text-align: center;
    padding: 0 1rem;
}

.lhal-scoreboard__score b {
    display: block;
    font-family: var(--lhal-display);
    font-size: clamp(2.2rem, 8vw, 3.5rem);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.lhal-scoreboard__stato {
    font-size: .75rem;
    color: #9FB6C5;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.lhal-scoreboard__stato--live {
    color: #FF8A9B;
}

.lhal-scoreboard__stato--live::before {
    content: "";
    width: .5rem;
    height: .5rem;
    border-radius: 50%;
    background: var(--lhal-red);
    animation: lhal-pulse 1.6s ease-in-out infinite;
}

/* Riga dei totali del tabellino */
table.lhal-grid tfoot td {
    padding: .5rem .75rem;
    border-top: 2px solid var(--lhal-line);
    font-family: var(--lhal-display);
    font-size: 1.0625rem;
    font-variant-numeric: tabular-nums;
}

table.lhal-grid tfoot td.num {
    text-align: right;
}

/* --- Moduli del cronometrista -------------------------------------------- */

.lhal-form-card {
    background: var(--lhal-paper);
    border: 1px solid var(--lhal-line);
    border-radius: var(--lhal-radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.lhal-form-card > h2 {
    font-family: var(--lhal-display);
    font-weight: 600;
    font-size: 1.25rem;
    margin: 0 0 .85rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--lhal-line);
}

@media (max-width: 575.98px) {
    .lhal-fixture {
        grid-template-columns: 2rem 3rem 1fr auto;
        gap: .5rem;
        padding: .6rem .5rem;
    }

    /* Nome sotto il logo: in tre colonne affiancate non c'è spazio per scriverlo di fianco */
    .lhal-scoreboard__grid {
        gap: .5rem;
    }

    .lhal-scoreboard__team,
    .lhal-scoreboard__team--away {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: .45rem;
    }

    .lhal-scoreboard__team img {
        width: 56px;
        height: 56px;
        flex: none;
    }

    .lhal-scoreboard__team span {
        font-size: .9375rem;
        line-height: 1.2;
        hyphens: auto;
    }

    .lhal-scoreboard__score {
        padding: 0 .25rem;
    }
}

/* --- Pagine di solo testo (privacy, regolamenti) -------------------------- */

.lhal-testo {
    max-width: 68ch;
    background: var(--lhal-paper);
    border: 1px solid var(--lhal-line);
    border-radius: var(--lhal-radius);
    padding: 1.5rem;
}

.lhal-testo p {
    margin-bottom: 1rem;
    line-height: 1.65;
}

.lhal-testo h2 {
    font-family: var(--lhal-display);
    font-weight: 600;
    font-size: 1.35rem;
    margin: 2rem 0 .75rem;
    padding-left: .75rem;
    border-left: 4px solid var(--lhal-blue);
}

.lhal-testo h2:first-of-type {
    margin-top: 1.75rem;
}

.lhal-testo a {
    color: var(--lhal-blue);
}

.lhal-testo p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   Archivio e albo d'oro
   ========================================================================== */

.lhal-albo-hero {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    background:
        linear-gradient(105deg, rgba(255, 255, 255, .05) 0 2px, transparent 2px 34px),
        linear-gradient(160deg, var(--lhal-ink-2), var(--lhal-ink) 60%);
    color: #fff;
    border-radius: var(--lhal-radius);
    border-bottom: 3px solid #C8A227;
    padding: 1.5rem;
    margin-bottom: 2.5rem;
}

.lhal-albo-hero img {
    width: 96px;
    height: 96px;
    object-fit: contain;
    background: rgba(255, 255, 255, .07);
    border-radius: var(--lhal-radius);
    padding: .5rem;
}

.lhal-albo-hero__eyebrow {
    font-size: .8125rem;
    color: #9FB6C5;
    margin: 0 0 .15rem;
}

.lhal-albo-hero h2 {
    font-family: var(--lhal-display);
    font-weight: 600;
    font-size: clamp(1.6rem, 4vw, 2.25rem);
    margin: 0;
    line-height: 1.05;
}

.lhal-albo-hero__azioni {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-left: auto;
}

/* Elenco delle edizioni */
.lhal-albo {
    background: var(--lhal-paper);
    border: 1px solid var(--lhal-line);
    border-radius: var(--lhal-radius);
    overflow: hidden;
}

.lhal-edizione {
    display: grid;
    grid-template-columns: 7rem 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: .75rem 1rem;
    border-bottom: 1px solid #EEF2F5;
}

.lhal-edizione:last-child {
    border-bottom: 0;
}

.lhal-edizione:hover {
    background: #F6F9FB;
}

.lhal-edizione__anno {
    font-family: var(--lhal-display);
    font-size: 1.25rem;
    font-variant-numeric: tabular-nums;
    color: var(--lhal-muted);
}

.lhal-edizione__campione {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
}

.lhal-edizione__campione img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex: 0 0 40px;
}

.lhal-edizione__campione span {
    font-family: var(--lhal-display);
    font-size: 1.125rem;
    line-height: 1.15;
}

.lhal-edizione__link {
    display: flex;
    gap: 1rem;
    font-size: .875rem;
    white-space: nowrap;
}

.lhal-edizione__link a {
    color: var(--lhal-blue);
    text-decoration: none;
}

.lhal-edizione__link a:hover {
    text-decoration: underline;
}

@media (max-width: 575.98px) {
    .lhal-albo-hero__azioni {
        margin-left: 0;
        width: 100%;
    }

    .lhal-edizione {
        grid-template-columns: 1fr;
        gap: .4rem;
        padding: .85rem 1rem;
    }

    .lhal-edizione__anno {
        font-size: 1rem;
    }
}

/* ==========================================================================
   Finestre modali
   Nessuna classe nuova nel markup: si agganciano a .modal-content e a
   data-bs-theme="dark", già presenti su tutte le finestre del sito
   (comprese quelle della pagina di gestione).
   ========================================================================== */

.modal-content {
    /* .text-bg-dark calcola il fondo da questa variabile: cambiandola qui
       il grigio di Bootstrap diventa il grafite del sito, senza !important. */
    --bs-dark-rgb: 16, 31, 42;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: var(--lhal-radius);
    box-shadow: 0 18px 48px rgba(4, 12, 18, .45);
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    box-shadow: inset 0 3px 0 var(--lhal-red);
    padding-top: 1.1rem;
}

.modal-title {
    font-family: var(--lhal-display);
    font-weight: 600;
    font-size: 1.375rem !important;
    letter-spacing: .01em;
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.modal-body h5 {
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 400;
}

/* Etichette e campi */

.modal .col-form-label,
.modal .form-label {
    color: #9FB6C5;
    font-size: .875rem;
}

.modal .form-control,
.modal .form-select {
    background-color: rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .16);
    color: #fff;
    border-radius: var(--lhal-radius);
}

.modal .form-control::placeholder {
    color: #7F98A8;
}

.modal .form-control:focus,
.modal .form-select:focus {
    background-color: rgba(255, 255, 255, .09);
    border-color: var(--lhal-blue);
    box-shadow: 0 0 0 .2rem rgba(22, 96, 180, .35);
    color: #fff;
}

.modal .form-control:disabled,
.modal .form-select:disabled {
    background-color: rgba(255, 255, 255, .03);
    color: #9FB6C5;
    border-style: dashed;
}

.modal .form-check-input:checked {
    background-color: var(--lhal-blue);
    border-color: var(--lhal-blue);
}

/* Pulsanti: rosso per l'azione che salva o elimina, contorno per chiudere */

.modal .btn-primary {
    --bs-btn-bg: var(--lhal-red);
    --bs-btn-border-color: var(--lhal-red);
    --bs-btn-hover-bg: #A80C25;
    --bs-btn-hover-border-color: #A80C25;
    --bs-btn-active-bg: #A80C25;
    --bs-btn-active-border-color: #A80C25;
    --bs-btn-color: #fff;
    font-weight: 600;
}

.modal .btn-secondary {
    --bs-btn-bg: transparent;
    --bs-btn-border-color: rgba(255, 255, 255, .3);
    --bs-btn-color: #fff;
    --bs-btn-hover-bg: rgba(255, 255, 255, .1);
    --bs-btn-hover-border-color: rgba(255, 255, 255, .45);
    --bs-btn-hover-color: #fff;
}

/* Elenchi di collegamenti dentro le finestre (Documenti) */

.modal-body .list-group-item {
    background: rgba(255, 255, 255, .04);
    border-color: rgba(255, 255, 255, .1);
    color: #fff;
}

.modal-body .list-group-item:hover {
    background: rgba(255, 255, 255, .09);
}

/* Tabelle dentro le finestre (statistiche del giocatore, tabellini) */

.modal .table {
    --bs-table-bg: transparent;
    --bs-table-color: #fff;
    --bs-table-border-color: rgba(255, 255, 255, .12);
    font-size: .875rem;
}

.modal .table thead th {
    font-family: system-ui, sans-serif;
    font-size: .6875rem;
    font-weight: 600;
    color: #9FB6C5;
    text-transform: none;
}

.modal .table td {
    font-variant-numeric: tabular-nums;
}

.modal .table td.key {
    font-family: var(--lhal-display);
    font-size: 1.0625rem;
}

/* Sfondo dietro la finestra: un filo più denso, così il contenuto sotto non distrae */

.modal-backdrop.show {
    --bs-backdrop-opacity: .65;
}

/* ==========================================================================
   Pagina di gestione
   ========================================================================== */

.lhal-stato {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .45rem .85rem;
    border-radius: var(--lhal-radius);
    font-size: .875rem;
    border: 1px solid;
}

.lhal-stato--ok {
    color: #9BE3B8;
    border-color: rgba(155, 227, 184, .35);
    background: rgba(155, 227, 184, .1);
}

.lhal-stato--ko {
    color: #FF9FAE;
    border-color: rgba(255, 159, 174, .35);
    background: rgba(255, 159, 174, .1);
}

/* Intestazione di scheda con pulsanti a destra */
.lhal-tablecard__head .lhal-actions {
    align-self: center;
}

.lhal-tablecard__head .lhal-actions .btn {
    --bs-btn-padding-y: .25rem;
    --bs-btn-padding-x: .6rem;
}

/* Logo in miniatura nelle tabelle di gestione */
.lhal-mini-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}
