/* Pagina di una persona (#panel-persona) e resoconto operaio.
   Markup in index.html, resoconto disegnato da js/resocontoOperaio.js, pagina da risorse.js.
   Tutto qui e niente `style="…"` nel JS: gli attributi in linea sono un debito
   con un cricchetto (vedi stiliInline.test.js). Usa i token di styles.css. */

.resoc-sottotitolo { margin-top: 3px; font-size: 13px; color: var(--ink-soft); }

/* Pagina: testata, poi sezioni a scheda una sotto l'altra */
.pers-testa { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 18px; }
.pers-titolo { flex: 1 1 220px; min-width: 0; }
.pers-titolo h2 { margin: 0; font-size: 22px; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.pers-sezione { margin-top: 18px; padding: 18px 20px; background: var(--card, #fff); border: 1px solid var(--line); border-radius: 14px; }
.pers-sezione > h3 { margin: 0 0 12px; font-size: 15px; font-weight: 750; letter-spacing: -0.01em; }
.pers-trasferta { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.pers-trasferta-azioni { margin-top: 12px; }
#persStatistiche:empty { display: none; }

/* Periodo: preset a chip + intervallo libero */
.resoc-periodo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.resoc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.resoc-chip { appearance: none; font: inherit; font-size: 12.5px; font-weight: 650; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--ink-soft); cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.resoc-chip:hover { border-color: var(--brand); color: var(--brand-dark); }
.resoc-chip.attivo { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); }
.resoc-chip:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.resoc-date { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-soft); }
.resoc-date input[type="date"] { width: auto; padding: 7px 10px; font: inherit; font-size: 13px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }

.resoc-kpis { margin: 18px 0 4px; }
.resoc-sezione { margin: 26px 0 10px; font-size: 14.5px; font-weight: 750; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; }
.resoc-conteggio { font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: #eef1ef; color: var(--ink-soft); }

/* Tabelle */
.resoc-tab { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.resoc-tab th { padding: 9px 12px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--ink-soft); background: var(--bg-soft); border-bottom: 1px solid var(--line); white-space: nowrap; }
.resoc-tab td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.resoc-tab .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.resoc-tab tfoot td { font-weight: 800; background: var(--bg-soft); border-top: 1px solid var(--line-card); border-bottom: 0; }
.resoc-tab tbody tr:last-child td { border-bottom: 1px solid var(--line); }
.resoc-tab tfoot tr:last-child td { border-bottom: 0; }
.resoc-scroll { max-height: 440px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.resoc-scroll .resoc-tab thead th { position: sticky; top: 0; z-index: 1; }
.resoc-scroll .resoc-tab tbody tr:last-child td { border-bottom: 0; }
.resoc-tab-giorni .resoc-inizio-giorno td { border-top: 1px solid var(--line-card); }
.resoc-tab-giorni tbody tr:first-child td { border-top: 0; }
.resoc-fonte { color: var(--ink-soft); font-size: 12.5px; }
.resoc-tipo { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: #eef1ef; color: var(--ink-soft); }
.resoc-tipo-giornata { background: var(--blu-bg); color: var(--blu); }
.resoc-tipo-ferie { background: var(--giallo-bg); color: var(--giallo); }
.resoc-nota { color: var(--giallo); font-weight: 700; }

/* «Da verificare»: un avviso, non un allarme */
.resoc-avviso { margin-top: 18px; padding: 14px 16px; border-radius: 12px; background: var(--giallo-bg); border: 1px solid color-mix(in srgb, var(--giallo), transparent 70%); font-size: 13px; }
.resoc-avviso-titolo { font-weight: 800; color: var(--giallo); margin-bottom: 6px; }
.resoc-avviso ul { margin: 0; padding-left: 18px; display: grid; gap: 3px; }

.resoc-nota-fondo { margin: 16px 2px 0; font-size: 12px; color: var(--ink-soft); }
.resoc-vuoto { margin: 28px 0; text-align: center; color: var(--ink-soft); font-size: 14px; }
.resoc-errore { margin: 20px 0; padding: 12px 14px; border-radius: 10px; background: var(--rosso-bg); color: var(--rosso); font-size: 13.5px; }
.resoc-aggiorna { opacity: .55; transition: opacity .15s ease; }


@media (max-width: 720px) {
  .pers-sezione { padding: 14px; }
  .resoc-periodo { align-items: stretch; }
  .resoc-tab th, .resoc-tab td { padding: 8px 9px; }
  .resoc-tab { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .resoc-chip, .resoc-aggiorna { transition: none; }
}
/* Ore in trasferta: un'etichetta discreta, stessa famiglia dei tipi. */
.resoc-trasf { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--blu-bg); color: var(--blu); white-space: nowrap; }
