/* CSS Document */
html {
    min-height: 100%;
    //margin-left: calc(100vw - 100%);
}
body {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    min-height: 100vh;
}
main {
    -webkit-box-flex: 1;
        -ms-flex: 1 0 auto;
            flex: 1 0 auto;
}
.narrow-input {
    width: 100px; /* Puoi modificare questa larghezza secondo le tue esigenze */
}
.tagify__tag {
            font-size: 18px;
}
.tagify__input {
            font-size: 18px;
}
.tagify__dropdown__item {
    font-size: 18px; 
}
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none;
    float: left;
    min-width: 10rem;
    padding: .5rem 0;
    margin: .125rem 0 0;
    font-size: 1rem;
    color: #212529;
    text-align: left;
    list-style: none;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: .25rem;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: .25rem 1.5rem;
    clear: both;
    font-weight: 400;
    color: #212529;
    text-align: inherit;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
}
.dropdown-item:focus, .dropdown-item:hover {
    color: #16181b;
    text-decoration: none;
    background-color: #f8f9fa;
}
.dropdown-item.active, .dropdown-item:active {
    color: #fff;
    text-decoration: none;
    background-color: #007bff;
}

/* Regola le dimensioni del pulsante */
input[type="radio"] {
  width: 20px; /* Larghezza */
  height: 20px; /* Altezza */
}

/* Regola la dimensione del testo delle etichette */
.radio-label {
  font-size: 18px; /* Dimensione del testo */
  margin-left: 10px; /* Spazio tra il pulsante e l'etichetta */
}
.style1 {
    padding-bottom: 50px;
}
.style2 {
    margin-top: 0px;
    padding-top: 10px;
    padding-bottom: 10px;
}
.style3 {
    padding-top: 10px;
}
.style4 {
    padding-top: 10px;
    padding-bottom: 10px;
}
.style5 {
    padding-bottom: 20px;
}
.style6 {
    padding-top: 50px;
    padding-bottom: 50px;
}
input[type="text"] {
  -webkit-appearance: none; /* Disattiva lo zoom automatico su iOS */
}
/* Fix select con testo lungo su mobile */
@media (max-width: 767px) {
  .select-wrapper {
    position: relative;
    overflow: hidden;
  }

  .select-wrapper select {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 2rem; /* spazio per la freccia nativa */
  }
}

/* =========================================================
   Vista rapportini a SCHEDE su mobile  (solo user-rapportini)
   Scope: #user-ok main table.table-hover #tableRepeat2
   Non tocca l'HTML: la tabella su desktop resta invariata,
   sotto i 768px ogni riga diventa una card leggibile.
   ========================================================= */
@media (max-width: 767px) {

  /* la tabella e la sua intestazione non servono in modalità card */
  #user-ok main table.table-hover { border: 0; }
  #user-ok main table.table-hover thead { display: none; }
  #user-ok main table.table-hover #tableRepeat2 { display: block; }

  /* ogni riga = una card */
  #user-ok main table.table-hover #tableRepeat2 > tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: #212529;
    background: #fff;
    border: 1px solid #dee2e6;
    border-left-width: 4px;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
  }

  /* accento di stato a sinistra (sostituisce la tinta di riga).
     table-warning (non terminato) va DOPO table-info così il rosso
     vince quando una riga ha entrambe le classi. */
  #user-ok main table.table-hover #tableRepeat2 > tr.table-info    { border-left-color: #17a2b8; }
  #user-ok main table.table-hover #tableRepeat2 > tr.table-warning { border-left-color: #dc3545; }

  /* badge codrap rosso quando la striscia laterale è rossa (non terminato) */
  #user-ok main table.table-hover #tableRepeat2 > tr.table-warning .badge {
    background-color: #dc3545 !important;
  }

  /* celle come blocchi: niente bordi né tinte della tabella */
  #user-ok main table.table-hover #tableRepeat2 > tr > td {
    border: 0 !important;
    background: transparent !important;
    padding: 0;
  }

  /* riga 1 della card: n. rapportino + stato (sx) e data (dx) */
  #user-ok main table.table-hover #tableRepeat2 > tr > td:nth-child(1) { order: 1; }
  #user-ok main table.table-hover #tableRepeat2 > tr > td:nth-child(5) {
    order: 2;
    margin-left: auto;
    color: #6c757d;
    font-size: .9rem;
    white-space: nowrap;
  }

  /* cliente = titolo a tutta larghezza */
  #user-ok main table.table-hover #tableRepeat2 > tr > td:nth-child(3) {
    order: 3;
    flex: 0 0 100%;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.25;
  }

  /* commessa = sottotitolo */
  #user-ok main table.table-hover #tableRepeat2 > tr > td:nth-child(4) {
    order: 4;
    flex: 0 0 100%;
    color: #6c757d;
    font-size: .9rem;
    margin-bottom: 2px;
  }

  /* barra pulsanti (icone): modifica, foto, pdf/firma, ricambi */
  #user-ok main table.table-hover #tableRepeat2 > tr > td:nth-child(2) { order: 5; flex: 0 0 auto; }
  #user-ok main table.table-hover #tableRepeat2 > tr > td:nth-child(6) { order: 6; flex: 0 0 auto; }
  #user-ok main table.table-hover #tableRepeat2 > tr > td:nth-child(7) { order: 7; flex: 0 0 auto; }
  #user-ok main table.table-hover #tableRepeat2 > tr > td:nth-child(8) { order: 8; flex: 0 0 auto; }

  /* pulsante CALCOLA COSTO: ultima cella, spinta in fondo a destra dopo gli altri */
  #user-ok main table.table-hover #tableRepeat2 > tr > td:nth-child(9) { order: 9; flex: 0 0 auto; margin-left: auto; }

  /* MOUSE OVER: il contorno diventa nero. Stesso spessore, stesso ingombro. */
  #user-ok main table.table-hover #tableRepeat2 > tr {
    transition: border-color .1s ease;
  }
  #user-ok main table.table-hover #tableRepeat2 > tr:hover {
    border-color: #000;
  }
  /* la striscia di stato a sinistra tiene il suo colore anche al passaggio */
  #user-ok main table.table-hover #tableRepeat2 > tr.table-info:hover    { border-left-color: #17a2b8; }
  #user-ok main table.table-hover #tableRepeat2 > tr.table-warning:hover { border-left-color: #dc3545; }
}

/* =========================================================
   Pagina MODIFICA rapportino — compattazione + etichette (mobile)
   Solo grafica: nessuna modifica a campi, id, binding o funzioni.
   - riduce gli spazi verticali (pagina molto lunga)
   - allarga l'etichetta dal 25% al 34% SOLO nelle righe standard
     (quelle col campo col-9), lasciandola affiancata al campo.
     Le righe orario (col-4/col-1) NON vengono toccate.
   ========================================================= */
@media (max-width: 767px) {

  /* meno spazio verticale tra i campi */
  #user-ok main .form-row {
    padding-top: .5rem !important;
    padding-bottom: .35rem !important;
  }

  /* il titolo in alto aveva 50px sopra+sotto: lo riduco */
  #user-ok main h4.style6 {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
  }

  /* etichetta al 34% così le scritte respirano e resta accanto al campo.
     Vale per righe col-9, righe data (col-8) e righe orario (con col-1),
     così i menù orario si allineano ai campi data sopra. */
  #user-ok main .form-row:has(> .col-9) > .font-weight-bolder,
  #user-ok main .form-row:has(> .col-8) > .font-weight-bolder,
  #user-ok main .form-row:has(> .col-1) > .font-weight-bolder {
    flex: 0 0 34%;
    max-width: 34%;
  }
  #user-ok main .form-row:has(> .col-9) > .col-9 {
    flex: 0 0 66%;
    max-width: 66%;
  }

  /* righe orario: i due select insieme al ":" occupano la stessa larghezza
     dei campi data (col-8), così i bordi destri si allineano e non sporgono.
     Ogni select = metà di (66.67% - 22px del separatore). */
  #user-ok main .form-row:has(> .col-1) > .col-4 {
    flex: 0 0 calc(33.33% - 14px);
    max-width: calc(33.33% - 14px);
  }

  /* separatore ore:minuti: colonna con ":" centrato e un po' d'aria */
  #user-ok main .form-row > .col-1 {
    flex: 0 0 28px;
    max-width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
  }
  #user-ok main .form-row > .col-1::after {
    content: ":";
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
  }
}
