:root{--navy:#19364a;--deep:#102839;--teal:#087b81;--teal2:#e5f5f4;--bg:#f4f7f9;--ink:#25394a;--muted:#6c7b86;--line:#dce5e9;--warn:#a45e1e;--red:#aa3e42;--white:#fff;--shadow:0 9px 32px rgba(18,47,62,.065)}*{box-sizing:border-box}html{font-family:Inter,"Segoe UI",Arial,sans-serif;font-size:14px}body{margin:0;background:var(--bg);color:var(--ink)}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}input,select,textarea{background:white;border:1px solid #cfdbe1;border-radius:10px;padding:10px 11px;outline:none;width:100%;color:var(--ink)}input:focus,select:focus,textarea:focus{border-color:#1a969b;box-shadow:0 0 0 3px #0d838420}label{display:block;font-size:12px;font-weight:700;color:#607584;margin-bottom:7px}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid transparent;border-radius:10px;background:var(--teal);color:white;padding:11px 16px;font-weight:700;white-space:nowrap}.btn:hover{filter:brightness(.96)}.btn.secondary{background:white;color:var(--navy);border-color:var(--line)}.btn.soft{background:var(--teal2);color:#00676c}.btn.danger{background:#b3494e;color:white}.btn.tiny{padding:7px 10px;font-size:12px}.topbar{height:70px;background:var(--deep);color:white;display:flex;align-items:center;justify-content:space-between;padding:0 30px;gap:20px}.brand{display:flex;align-items:center;gap:12px}.brand-logo{width:39px;height:39px;border-radius:11px;background:#118b90;color:white;font-weight:900;display:grid;place-items:center;font-size:18px;letter-spacing:-1px}.brand small{display:block;font-size:10px;letter-spacing:2px;text-transform:uppercase;color:#aec9cd}.brand strong{font-size:16px;letter-spacing:.2px}.userhead{display:flex;gap:12px;align-items:center}.person-chip{border:1px solid #53707a;background:#ffffff13;border-radius:30px;padding:7px 12px;color:#d6eced;font-weight:700;font-size:12px}.layout{display:grid;grid-template-columns:222px minmax(0,1fr);min-height:calc(100vh - 70px)}.sidebar{background:white;border-right:1px solid var(--line);padding:24px 12px}.navbtn{display:flex;align-items:center;width:100%;text-align:left;gap:10px;color:#536d7b;background:transparent;border:0;border-radius:9px;padding:13px 14px;font-weight:650;margin:2px 0}.navbtn.active{background:var(--teal2);color:#006f75}.navbtn:hover{background:#eef5f6}.nav-label{padding:18px 13px 8px;color:#92a2ad;text-transform:uppercase;letter-spacing:1.5px;font-size:10px;font-weight:700}.main{padding:30px clamp(20px,4vw,52px);max-width:1500px;width:100%;margin:auto}.heading{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin:2px 0 26px}.heading h1{margin:0;font-size:29px;letter-spacing:-.8px;color:var(--deep)}.heading p{color:var(--muted);margin:7px 0 0;font-size:14px}.actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.card{background:white;border:1px solid #e2e9ec;border-radius:15px;box-shadow:var(--shadow);padding:22px;margin-bottom:18px}.card h2{font-size:16px;margin:0 0 16px;color:var(--deep)}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:18px}.stat{background:white;padding:23px;border-radius:15px;border:1px solid #e2e9ec}.stat strong{font-size:30px;color:var(--deep);display:block;line-height:1.3}.stat span{font-size:12px;color:var(--muted);font-weight:700}.stat.turquoise{background:#dff1f1}.stat.turquoise strong{color:#04757c}.muted{color:var(--muted)}.small{font-size:12px}.flex{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.grow{flex:1}.filterbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:15px}.filterbar input{max-width:350px}.filterbar select{max-width:210px}.filterbar input[type=month]{max-width:160px}.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:12px}.table{border-collapse:collapse;width:100%;background:white;font-size:13px}.table th{background:#edf3f5;color:#5f7480;font-size:11px;text-align:left;letter-spacing:.5px;text-transform:uppercase;padding:12px 14px;white-space:nowrap}.table td{padding:12px 14px;border-top:1px solid #eaf0f2;vertical-align:middle}.table tbody tr:hover{background:#f7fbfb}.table .name{font-weight:750;color:var(--deep)}.right{text-align:right}.pill{display:inline-flex;border-radius:30px;padding:5px 10px;background:#edf2f4;color:#53656c;font-size:11px;font-weight:800}.pill.good{background:#e3f5e6;color:#247546}.pill.warn{background:#fff1d9;color:#93601e}.pill.bad{background:#ffe8e6;color:#a23d3a}.monthbar{display:flex;gap:12px;align-items:center;margin-bottom:18px}.monthbar input{max-width:190px}.form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}.grid7{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:9px}.daycard{border:1px solid var(--line);border-radius:12px;padding:12px;min-width:0;background:white}.daycard.weekend{background:#f4f7f9}.daycard.problem{border-color:#e69f87;background:#fff7f3}.dayhead{display:flex;justify-content:space-between;align-items:center;font-size:12px;margin-bottom:11px}.dayhead strong{color:var(--deep)}.dayhead span{color:#81929d}.daycard input,.daycard select{padding:7px 6px;font-size:12px;margin-bottom:6px}.daycard textarea{resize:vertical;min-height:32px;padding:7px;font-size:11px}.planned{font-size:10px;color:#71858b}.diff{font-size:12px;font-weight:800;margin-top:6px}.diff.plus{color:#15816b}.diff.minus{color:#ba514b}.hint{padding:14px 17px;border-radius:11px;background:#e8f4f6;color:#346c79;border:1px solid #d4e9ed;margin:14px 0}.notice{padding:14px 17px;border-radius:11px;background:#fff2de;color:#895a1f;border:1px solid #f5ddb6;margin:14px 0}.badnotice{padding:14px 17px;border-radius:11px;background:#fff0ee;color:#9d3d3d;border:1px solid #f4d4d0;margin:14px 0}.loginpage{min-height:100vh;display:flex;align-items:center;justify-content:center;background:radial-gradient(circle at 10% 10%,#226777 0,transparent 45%),linear-gradient(140deg,#102e44,#071a27);padding:20px}.loginbox{background:white;width:min(440px,100%);border-radius:20px;padding:35px;box-shadow:0 22px 90px #0004}.loginbox h1{margin:23px 0 4px;font-size:27px}.loginbox p{color:var(--muted);line-height:1.6}.loginbox label{margin-top:19px}.loginbox .btn{margin-top:18px;width:100%}.logo-large{background:var(--teal);width:53px;height:53px;color:white;border-radius:14px;display:grid;place-items:center;font-size:24px;font-weight:900}.empty{text-align:center;padding:48px 20px;color:var(--muted)}.empty strong{color:var(--deep);display:block;margin-bottom:8px}.divider{height:1px;background:var(--line);margin:25px 0}#toast{position:fixed;bottom:24px;right:24px;z-index:50;max-width:450px}.toast{background:#153948;color:white;padding:13px 19px;border-radius:12px;box-shadow:0 10px 28px #0003;margin-top:8px}.toast.error{background:#a83f40}.mini{max-width:110px}.print-only{display:none}.print-toolbar{margin:15px 0}.paper{background:white;border:1px solid var(--line);padding:15px;margin:15px 0;border-radius:10px}.paper h2{margin:3px 0 10px;font-size:16px}.print-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:10px}.print-table th,.print-table td{border:1px solid #d5dddf;padding:5px 4px;word-wrap:break-word;text-align:center}.print-table th{background:#e7eff1}.print-table .staffcol{text-align:left;width:160px}.print-table td.cellwarn{background:#ffe8d8}.print-table small{font-size:8px;color:#657b85}.sheet-head{display:flex;align-items:center;justify-content:space-between;font-size:11px;color:#6d808a;margin:8px 0}.tag{font-weight:700;background:#ecf5f6;padding:4px 7px;border-radius:6px}textarea{min-height:83px}.sticky-footer{position:sticky;bottom:0;background:rgba(244,247,249,.97);padding:12px 0;border-top:1px solid var(--line);display:flex;justify-content:flex-end;gap:10px}#user-form input{max-width:320px}a{color:var(--teal)}@media(max-width:1180px){.grid7{grid-template-columns:repeat(4,minmax(0,1fr))}.stats{grid-template-columns:repeat(2,1fr)}}@media(max-width:800px){.layout{grid-template-columns:1fr}.sidebar{display:flex;overflow:auto;border-right:0;border-bottom:1px solid var(--line);padding:8px}.nav-label{display:none}.navbtn{width:auto;white-space:nowrap;padding:11px}.main{padding:18px}.topbar{padding:0 16px}.grid7{grid-template-columns:repeat(2,minmax(0,1fr))}.form-grid{grid-template-columns:1fr}.heading{display:block}.heading .actions{margin-top:15px}.stats{grid-template-columns:repeat(2,1fr)}}@media print{@page{size:A3 landscape;margin:9mm}body{background:white;color:#111;font-family:Arial,sans-serif}.topbar,.sidebar,.no-print,.heading,.print-toolbar,#toast{display:none!important}.main,.layout{display:block;padding:0;margin:0;max-width:none}.print-only{display:block}.paper{border:0;margin:0;padding:0;border-radius:0;box-shadow:none}.print-table{font-size:9pt}.print-table th,.print-table td{border:1px solid #999;padding:4px 2px}.print-table .staffcol{width:160px}.print-page{page-break-after:always;break-after:page;page-break-inside:avoid;break-inside:avoid}.print-page:last-child{page-break-after:auto;break-after:auto}.sheet-head{font-size:10pt}.print-table small{font-size:8pt}}@media(max-width:420px){.grid7{grid-template-columns:1fr}}

/* Logo aziendale personalizzabile: PNG/JPG/WebP; ridimensionamento senza ritaglio. */
.brand-logo{flex-shrink:0;overflow:hidden;position:relative}
.brand-logo img{width:100%;height:100%;object-fit:contain;display:block;background:white;padding:3px}
.brand-logo span{width:100%;height:100%;display:grid;place-items:center}
.brand-logo-large{width:92px;height:92px;border-radius:18px}
.brand-logo-large img{padding:7px}
.logo-settings{align-items:center;gap:22px}
.logo-preview{background:#eff6f8;border:1px solid #dce5e9;border-radius:16px;padding:16px}
.logo-settings input[type=file]{max-width:400px}


/* NP_LOGIN_LOGO_V1_10_START */
/* Logo di login a dimensione naturale: l'intera immagine si adatta alla larghezza disponibile.
   Nessun ritaglio, nessun riquadro con altezza fissa, nessuna alterazione delle proporzioni. */
.loginpage .brand-logo-large {
  box-sizing: border-box;
  display: block;
  width: min(100%, 258px);
  height: auto;
  min-height: 0;
  max-width: 100%;
  max-height: none;
  aspect-ratio: auto;
  margin: 0 auto 16px;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  font-size: 46px;
}
.loginpage .brand-logo-large img {
  box-sizing: border-box;
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  max-width: 100%;
  max-height: none;
  margin: 0 auto;
  padding: 0 !important;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  object-position: center;
  background: transparent;
}
/* Messaggio NP di riserva se il file logo non fosse disponibile. */
.loginpage .brand-logo-large span {
  width: 100%;
  min-height: 130px;
  height: auto;
  align-items: center;
  justify-content: center;
}
.loginpage .loginbox h1 { text-align: center; margin-top: 12px; }
@media (max-width: 480px) {
  .loginpage .brand-logo-large { width: min(100%, 210px); margin-bottom: 13px; }
}
@media (max-height: 620px) {
  .loginpage .brand-logo-large { width: min(100%, 170px); margin-bottom: 10px; }
  .loginpage { align-items: flex-start; }
}
/* NP_LOGIN_LOGO_V1_10_END */


/* NP_HEADER_LOGO_V1_12_START */
/* Logo della barra interna: dimensione intermedia fra 39 e 144 px.
   L'immagine resta interamente visibile, compresa la firma. */
.topbar {
  height: auto;
  min-height: 104px;
  padding: 9px 24px;
  gap: 14px;
}
.topbar .brand {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}
.topbar .brand-logo {
  box-sizing: border-box;
  display: block;
  position: relative;
  flex: 0 0 90px;
  width: 90px;
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
}
.topbar .brand-logo img {
  box-sizing: border-box;
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  max-width: 100%;
  max-height: none;
  margin: 0;
  padding: 0 !important;
  border: 0;
  border-radius: 6px;
  object-fit: contain;
  object-position: center;
  background: white;
}
.topbar .brand-logo span {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 74px;
  min-height: 0;
  border-radius: 6px;
  background: #118b90;
}
.topbar .brand strong { font-size: 17px; }
.topbar .brand small { font-size: 10px; letter-spacing: 1px; }
.layout { min-height: calc(100vh - 104px); }
@media (max-width: 800px) {
  .topbar { min-height: 88px; padding: 7px 14px; gap: 10px; }
  .topbar .brand { gap: 9px; }
  .topbar .brand-logo { flex-basis: 72px; width: 72px; }
  .topbar .brand-logo span { height: 59px; }
  .topbar .brand strong { font-size: 15px; }
  .topbar .brand small { font-size: 9px; letter-spacing: .6px; }
  .layout { min-height: calc(100vh - 88px); }
}
@media (max-width: 480px) {
  .topbar { min-height: 78px; padding: 7px 10px; gap: 8px; }
  .topbar .brand { gap: 7px; }
  .topbar .brand-logo { flex-basis: 64px; width: 64px; }
  .topbar .brand-logo span { height: 53px; }
  .topbar .brand strong { font-size: 13px; }
  .topbar .brand small { font-size: 8px; letter-spacing: .2px; }
  .topbar .userhead { gap: 5px; }
  .topbar .person-chip { font-size: 10px; padding: 5px 7px; }
  .topbar .userhead .btn { font-size: 11px; padding: 6px 8px; }
  .layout { min-height: calc(100vh - 78px); }
}
@media (max-width: 370px) {
  .topbar .brand-logo { flex-basis: 56px; width: 56px; }
  .topbar .brand-logo span { height: 47px; }
  .topbar .brand > div:last-child { display: none; }
}
/* NP_HEADER_LOGO_V1_12_END */

/* NUOVAPRIMA_V116_RED_MISSING: una giornata senza ore (zero conta come compilata). */
.daycard.missing{border:2px solid #cf3039;box-shadow:0 0 0 1px rgba(207,48,57,.10)}
.daycard.missing .dayhead strong{color:#a8202b}
.daycard.problem:not(.missing){border:2px solid #df7950}
#calendar-save-status[data-state="error"]{color:#b42331;font-weight:700}
#calendar-save-status[data-state="pending"]{color:#9e5e16;font-weight:700}
#calendar-save-status[data-state="saved"]{color:#207449;font-weight:700}

/* NUOVAPRIMA_V116D_STILE_ICONA - icona sola in fondo alla barra laterale */
.sidebar{display:flex;flex-direction:column}
.nav-extra-icon{width:37px;height:37px;min-height:37px;min-width:37px;justify-content:center;align-self:flex-start;margin-top:auto;margin-left:12px;margin-bottom:8px;padding:8px;color:#7a8b94;border:1px solid #e6ecef;border-radius:10px;background:transparent}
.nav-extra-icon:hover{color:#087b81;border-color:#cfe3e4;background:#f2f8f8}
.nav-extra-icon:focus-visible{outline:2px solid #087b81;outline-offset:2px}
.nav-extra-icon svg{display:block;flex-shrink:0}
@media(max-width:800px){.sidebar{flex-direction:row;align-items:center}.nav-extra-icon{align-self:center;margin-top:0;margin-bottom:0;margin-left:auto;margin-right:8px;flex-shrink:0}}

/* NUOVAPRIMA_V117_ORE_DIURNE_NOTTURNE: due campi nello stesso giorno; allineati anche su schermi ridotti. */
.daycard .hour-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;align-items:end}
.daycard .hour-pair > div{min-width:0}
.daycard .hour-pair label{font-size:11px;white-space:nowrap;letter-spacing:-.15px;margin-bottom:5px}
.daycard .hour-pair input{width:100%;min-width:0;padding:7px 4px;font-size:12px}
.daycard .day-total{font-size:11px;font-weight:750;color:#234c59;margin:0 0 9px}
@media (max-width:950px){.grid7{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:620px){.grid7{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:420px){.grid7{grid-template-columns:1fr}}
