/* Stili propri dell'applicazione. Tutto il resto lo mette MudBlazor. */

html, body {
    margin: 0;
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* --- Pagina di accesso ------------------------------------------------------------- */

.accesso-sfondo {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1f6f5c 0%, #14342c 100%);
    padding: 1.5rem;
    box-sizing: border-box;
}

.accesso-scheda {
    width: 100%;
    max-width: 26rem;
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 18px 45px rgba(0, 0, 0, .28);
    box-sizing: border-box;
}

.accesso-intestazione {
    text-align: center;
    margin-bottom: 1.5rem;
}

.accesso-emblema {
    font-size: 2.6rem;
    line-height: 1;
}

.accesso-intestazione h1 {
    font-size: 1.4rem;
    margin: .6rem 0 .2rem;
    color: #14342c;
}

.accesso-sottotitolo {
    margin: 0;
    color: #5d6b66;
    font-size: .9rem;
}

.accesso-modulo {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.accesso-modulo label {
    font-size: .82rem;
    font-weight: 600;
    color: #3c4a45;
    margin-top: .7rem;
}

.accesso-modulo input {
    padding: .6rem .75rem;
    border: 1px solid #ccd5d1;
    border-radius: 8px;
    font-size: 1rem;
    background: #fbfcfb;
}

.accesso-modulo input:focus {
    outline: 2px solid #1f6f5c;
    border-color: #1f6f5c;
}

.accesso-modulo button {
    margin-top: 1.4rem;
    padding: .7rem;
    border: 0;
    border-radius: 8px;
    background: #1f6f5c;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.accesso-modulo button:hover {
    background: #185849;
}

.accesso-messaggio {
    padding: .65rem .8rem;
    border-radius: 8px;
    font-size: .88rem;
    margin-bottom: .5rem;
}

.accesso-errore {
    background: #fdecea;
    color: #a3231b;
    border: 1px solid #f5c6c2;
}

.accesso-ok {
    background: #e8f5e9;
    color: #256029;
    border: 1px solid #c3e6c8;
}

.accesso-nota {
    margin-top: 1.2rem;
    font-size: .78rem;
    color: #6b7873;
    line-height: 1.45;
}

/* Il pulsante "Esci" e' dentro un form, ma deve sembrare una voce di menu. */
.pulsante-esci {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

/* --- Stampa ------------------------------------------------------------------------ */
/* Con Ctrl+P si ottiene un documento pulito: via menu, barra e pulsanti. */

@media print {
    .mud-appbar,
    .mud-drawer,
    .no-stampa {
        display: none !important;
    }

    .mud-main-content {
        padding: 0 !important;
        margin: 0 !important;
    }

    .mud-container {
        max-width: 100% !important;
        padding: 0 !important;
    }

    .solo-stampa {
        display: block !important;
    }

    .mud-table {
        break-inside: auto;
    }

    tr {
        break-inside: avoid;
        break-after: auto;
    }

    thead {
        display: table-header-group;
    }

    body {
        background: #fff !important;
        font-size: 11pt;
    }
}

.solo-stampa {
    display: none;
}

/* --- Errore di connessione Blazor -------------------------------------------------- */

#blazor-error-ui {
    color-scheme: light only;
    background: #ffd9d9;
    border-top: 1px solid #d99;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}
