/* Colori del marchio, presi dai loghi in /Loghi. Un posto solo: le due app li leggono da qui. */
:root {
    --ot-blu-notte: #0b2b7a;
    --ot-blu-scuro: #071e56;
    --ot-blu: #1b5dff;
    --ot-azzurro: #147bff;
    --ot-turchese: #22d7d3;
    --ot-sfondo: #f4f7fb;
    --ot-testo: #0b1f4d;
    --ot-ok: #18a957;
    --ot-ko: #d93025;
    --ot-attesa: #f2a900;
}

html, body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--ot-sfondo);
    color: var(--ot-testo);
}

.ot-pagina {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    box-sizing: border-box;
}

.ot-scheda {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(11, 43, 122, .08);
    padding: 32px;
    max-width: 30rem;
    width: 100%;
    text-align: center;
}

.ot-stato {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .9rem;
    color: #4a5a80;
}

.ot-pallino { width: .65rem; height: .65rem; border-radius: 50%; display: inline-block; }
.ot-ok { background: var(--ot-ok); }
.ot-ko { background: var(--ot-ko); }
.ot-attesa { background: var(--ot-attesa); }

#blazor-error-ui {
    background: #fff4e5;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, .2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: .6rem 1.25rem .7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

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

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e6f2;
    stroke-width: .6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: var(--ot-blu);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray .05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto .2rem;
}

.loading-progress-text:after { content: var(--blazor-load-percentage-text, "Caricamento"); }

/* Firma col dito: niente scorrimento della pagina mentre si traccia. */
.ot-firma-canvas {
    width: 100%;
    height: 170px;
    border: 1px dashed #9aa6c0;
    border-radius: 8px;
    background: #fff;
    touch-action: none;
    display: block;
}

.ot-galleria {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
}

.ot-galleria-foto { position: relative; }

.ot-galleria-foto img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.ot-galleria-elimina {
    position: absolute !important;
    top: 2px;
    right: 2px;
    background: rgba(255, 255, 255, .85) !important;
}

/* La striscia dello stato di invio, sotto la barra in alto. */
.ot-sincronizzazione {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .3rem 1rem;
    font-size: .8rem;
}

.ot-sinc-ok { background: #e8f6ee; color: #1b6b3f; }
.ot-sinc-attesa { background: #eef2f9; color: #0b2b7a; }
.ot-sinc-offline { background: #fff4e0; color: #8a5a00; }
.ot-sinc-errore { background: #fdecea; color: #a1261c; }
