﻿/* ===== STILI CONDIVISI - disponibili in tutte le pagine del sito, non serve ripeterli nei singoli .razor.css ===== */

.intestazione {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

    .intestazione h2 {
        margin: 0;
        font-size: 26px;
    }

.btn-nuovo {
    padding: 14px 22px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
}

.lista {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px 24px;
    cursor: pointer;
    transition: box-shadow 0.15s;
}

    .card:hover {
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.cliente {
    font-weight: 600;
    font-size: 20px;
    margin: 0;
}

.badge {
    font-size: 15px;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: 14px;
}

.stato-programmato {
    background: #e6f0ff;
    color: #1a56db;
}

.stato-incorso {
    background: #dc3545;
    color: white;
}

.stato-completato {
    background: #e3f9e5;
    color: #1a7f37;
}

.stato-sconosciuto {
    background: #eee;
    color: #666;
}

.riga {
    font-size: 17px;
    color: #555;
    margin: 6px 0;
}

    .riga.muted {
        color: #999;
        font-size: 16px;
        margin-top: 10px;
    }

.errore {
    color: #dc3545;
    font-size: 17px;
}

.commessa-riga {
    color: #1a3a4a;
    font-size: 17px;
}

/* ===== FORM STANDARD (campi, autocomplete, righe doppie, azioni) - condiviso da tutte le pagine di creazione/modifica ===== */

.campo {
    margin-bottom: 18px;
}

    .campo label {
        display: block;
        font-size: 16px;
        color: #555;
        margin-bottom: 6px;
        font-weight: 600;
    }

    .campo input[type="text"],
    .campo input[type="number"],
    .campo input[type="date"],
    .campo select,
    .campo textarea {
        width: 100%;
        padding: 12px;
        border: 1px solid #ccc;
        border-radius: 6px;
        box-sizing: border-box;
        font-size: 17px;
        font-family: inherit;
    }

    .campo textarea {
        resize: vertical;
    }

.riga-doppia {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

    .riga-doppia .campo {
        margin-bottom: 0;
    }

.campo-autocomplete {
    position: relative;
}

.elenco-suggerimenti {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    border-radius: 6px;
    max-height: 220px;
    overflow-y: auto;
    z-index: 50;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.suggerimento {
    padding: 12px 14px;
    cursor: pointer;
    font-size: 16px;
}

    .suggerimento:hover {
        background: #f0f4ff;
    }

.azioni {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.btn-annulla {
    padding: 12px 24px;
    background: white;
    color: #555;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.btn-salva {
    padding: 12px 28px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

    .btn-salva:disabled,
    .btn-annulla:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.successo {
    color: #1a7f37;
    font-size: 17px;
}

.link-indietro {
    display: inline-block;
    margin-bottom: 18px;
    color: #007bff;
    text-decoration: none;
    font-size: 17px;
}

.form-container {
    max-width: 700px;
}

form {
    max-width: 700px;
}

/* ===== TESTATA RAPPORTO - condivisa da tutte le pagine dettaglio/verifica/riparazione ===== */

.testata {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 18px 16px;
    margin-bottom: 22px;
}

.testata-riga {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
}

.testata-azioni {
    display: flex;
    align-items: center;
    gap: 12px;
}

.testata-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    border-top: 1px solid #eee;
    padding-top: 16px;
}

.testata-desc {
    border-top: 1px solid #eee;
    padding-top: 16px;
    margin-top: 16px;
}

.testata-piede {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #eee;
}

.etichetta {
    font-size: 16px;
    color: #888;
    margin: 0 0 4px;
}

.etichetta-piccola {
    font-size: 13px;
    color: #999;
    margin: 0;
}

.valore {
    font-size: 18px;
    margin: 0;
}

.valore-grande {
    font-size: 26px;
    font-weight: 600;
    margin: 0;
}

.btn-modifica {
    padding: 8px 14px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
}

/* ===== SEZIONI (giornate, impianti, ecc.) ===== */

.intestazione-sezione {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.titolo-sezione {
    font-size: 19px;
    font-weight: 600;
    color: #555;
    margin: 0;
}

.btn-aggiungi {
    padding: 10px 18px;
    background: #20c997;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
}

.nessun-dato {
    color: #999;
    font-style: italic;
    font-size: 17px;
}

/* ===== FIRMA / CHIUSURA / INVIO ===== */

.chiusura {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 18px 16px;
    margin-top: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.btn-invia {
    padding: 14px 24px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 17px;
    cursor: pointer;
    margin-top: 16px;
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.pannello {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 420px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.pannello-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
}

.pannello-titolo {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.btn-chiudi {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #888;
    padding: 4px 8px;
}

.pannello-corpo {
    padding: 20px 24px;
}

.pannello-azioni {
    display: flex;
    flex-direction: column;
    padding: 12px;
    gap: 6px;
}

.azione-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: white;
    border: none;
    border-radius: 8px;
    font-size: 17px;
    text-align: left;
    cursor: pointer;
}

    .azione-btn:hover {
        background: #f0f4ff;
    }

    .azione-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

/* ===== SEZIONE EMAIL (dentro il pannello invio) ===== */

.sezione-email {
    padding: 20px 24px;
}

.sezione-email-titolo {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 14px;
}

.checkbox-email {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    font-size: 15px;
    cursor: pointer;
}

    .checkbox-email input {
        width: 18px;
        height: 18px;
    }

.errore-email {
    color: #dc3545;
    font-size: 14px;
    margin-top: 10px;
}

.sezione-email-azioni {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.btn-indietro {
    padding: 10px 16px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
}

.btn-invia-email {
    padding: 10px 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
}

/* ===== BANNER SUGGERIMENTO - nota a scomparsa che guida passo-passo, non un popup da confermare ===== */
.banner-suggerimento {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: #eef6ff;
    border: 1px solid #bcdcff;
    border-left: 5px solid #2b7de9;
    border-radius: 8px;
    padding: 16px 18px;
    margin-bottom: 20px;
    font-size: 17px;
    line-height: 1.4;
    color: #1a4a7a;
}

    .banner-suggerimento span {
        flex: 1 1 auto;
    }

    .banner-suggerimento-chiudi {
        flex: 0 0 auto;
        background: none;
        border: none;
        color: #1a4a7a;
        font-size: 20px;
        cursor: pointer;
        line-height: 1;
        padding: 2px 6px;
    }

    .btn-invia-email:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

/* ===== BOTTONI ICONA COMPATTI (righe elenco componenti/circuiti ecc.) ===== */
.btn-mini {
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    padding: 5px 9px;
    cursor: pointer;
    line-height: 1;
}

    .btn-mini-elimina {
        border-color: #f3c2c8;
    }

    .btn-mini-elimina:hover {
        background: #fdeef0;
    }

.btn-whatsapp {
    padding: 12px 24px;
    background: #25D366;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

    .btn-whatsapp:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.btn-salva-piccolo {
    padding: 10px 18px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    margin-top: 6px;
}