/* PAGHE WEB - pagina del portale COLF per il telefono (client/custom/paghe/). Solo caratteri ASCII.
   Colori del riquadro PortaleColf (verde petrolio su beige). 28/10/2026 */
:root {
  --bg: #f3f0e9; --surface: #ffffff; --surface-2: #faf8f4; --ink: #1f2a2e; --muted: #5b6468;
  --line: #e3ded3; --line2: #cfc8ba; --brand: #1e5f5b; --brand-ink: #ffffff; --brand-soft: #dcebe8;
  --ok: #1e5f5b; --ok-soft: #dcebe8; --warn: #7a4f0f; --warn-soft: #f3e6cf; --danger: #8e2f22; --danger-soft: #f5e0dc;
  --grey-soft: #eae6dd; --shadow: 0 1px 2px rgba(40, 30, 10, .06), 0 4px 14px rgba(40, 30, 10, .05);
  --nv: #0b8a3c; --nv-ink: #0b7a35; --nv-soft: #f0f9f2;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overscroll-behavior-y: none; }
body { background: var(--bg); color: var(--ink); font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px; line-height: 1.38; -webkit-text-size-adjust: 100%; }
button { font: inherit; cursor: pointer; }
a { color: var(--brand); }
#root { height: 100%; display: flex; justify-content: center; background: var(--bg); }
.app { width: 100%; max-width: 560px; height: 100%; display: flex; flex-direction: column; background: var(--bg); position: relative; overflow: hidden; }
@media (min-width: 600px) { .app { box-shadow: 0 0 0 1px var(--line), var(--shadow); } }

/* barra in alto e in basso */
.topbar { flex: none; display: flex; align-items: center; gap: 10px; padding: calc(env(safe-area-inset-top, 0px) + 8px) 14px 8px; }
.topbar .tt { flex: 1; min-width: 0; }
.topbar h1 { margin: 0; font-size: 20px; line-height: 1.15; }
.topbar .rap { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mark-img { width: 46px; height: 46px; display: grid; place-items: center; flex: none; }
.mark-img img { width: 46px; height: 46px; }
.iconbtn { width: 42px; height: 42px; border-radius: 12px; border: 0; background: transparent; display: grid; place-items: center; color: var(--ink); }
.iconbtn:active { background: var(--grey-soft); }
.iconbtn svg { width: 21px; height: 21px; }
.content { flex: 1; overflow-y: auto; padding: 2px 14px 18px; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; }
.tabbar { flex: none; display: flex; border-top: 1px solid var(--line); background: var(--surface); padding-bottom: env(safe-area-inset-bottom, 0px); }
.tabbar button { flex: 1; min-width: 0; border: 0; background: transparent; padding: 8px 0 6px; color: var(--muted); display: grid; justify-items: center; gap: 2px; font-size: 11px; position: relative; }
.tabbar button svg { width: 22px; height: 22px; }
.tabbar button.on { color: var(--brand); font-weight: 700; }
.tabbar .bdg { position: absolute; top: 4px; left: calc(50% + 6px); background: var(--brand); color: var(--brand-ink); font-size: 10px; font-weight: 800; border-radius: 999px; padding: 0 5px; line-height: 15px; font-style: normal; }

/* componenti */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 13px 14px; margin-bottom: 10px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; border: 1px solid var(--line2); background: var(--surface); color: var(--ink);
  border-radius: 12px; padding: 0 13px; font: inherit; font-size: 16px; outline: none; }
.field textarea { padding: 10px 13px; min-height: 80px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.pw { position: relative; }
.pw input { padding-right: 52px; }
.pw button { position: absolute; right: 4px; top: 4px; width: 42px; height: 40px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; }
.pw button svg { width: 21px; height: 21px; }
.btn { width: 100%; min-height: 50px; border: 0; background: var(--brand); color: var(--brand-ink); border-radius: 12px; padding: 0 14px; font-weight: 700; font-size: 16px; }
.btn[disabled] { background: #d9d4c9; color: var(--muted); cursor: default; }
.btn.sec { background: var(--surface); color: var(--brand); border: 2px solid var(--brand); }
.btn.ghost { background: transparent; color: var(--brand); min-height: 44px; font-size: 15px; }
.btn.out { background: var(--surface); color: var(--danger); border: 1px solid var(--danger); }
.msg { border-radius: 12px; padding: 11px 13px; font-size: 14px; margin: 0 0 12px; }
.msg.ok { background: var(--ok-soft); color: var(--ok); font-weight: 700; }
.msg.warn { background: var(--warn-soft); color: var(--warn); }
.msg.err { background: var(--danger-soft); color: var(--danger); }
.msg b { display: block; margin-bottom: 2px; }
.help { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; color: var(--muted); margin-top: 14px; }
.help svg { width: 17px; height: 17px; flex: none; margin-top: 1px; color: var(--brand); }
.caric { color: var(--muted); padding: 18px 4px; }

/* accesso */
.login { flex: 1; overflow-y: auto; padding: calc(env(safe-area-inset-top, 0px) + 14px) 22px 20px; display: flex; flex-direction: column; }
.login .head { text-align: center; margin-bottom: 18px; }
.logo-studio { display: flex; justify-content: center; align-items: center; margin: 0 auto 6px; min-height: 136px; }
.logo-studio img { width: 136px; height: 136px; display: block; }
.login h1.marchio { font-size: 27px; letter-spacing: .08em; font-weight: 800; margin: 0 0 6px; }
.login .lead { margin: 0; color: var(--muted); }
.login .foot { margin-top: auto; padding-top: 18px; text-align: center; font-size: 12px; color: var(--muted); }

/* numero verde */
.nv { display: flex; align-items: center; gap: 12px; text-decoration: none; background: var(--nv-soft); border: 2px solid var(--nv); border-radius: 14px; padding: 10px 14px; margin-top: 10px; color: var(--nv-ink); }
.nv-ico { width: 44px; height: 44px; border-radius: 50%; background: var(--nv); color: #ffffff; display: grid; place-items: center; flex: none; }
.nv-ico svg { width: 22px; height: 22px; }
.nv-tx { display: flex; flex-direction: column; line-height: 1.1; }
.nv-k { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--nv); }
.nv-n { font-size: 25px; font-weight: 800; letter-spacing: .03em; color: var(--nv-ink); margin: 2px 0 1px; }
.nv-s { font-size: 12px; color: #3f6b4d; }
.nv-in { color: var(--nv-ink); font-weight: 800; white-space: nowrap; text-decoration: none; }

/* contenuti */
.invito { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border-radius: 14px; background: var(--brand); color: var(--brand-ink); margin-bottom: 12px; }
.invito div { flex: 1; min-width: 0; }
.invito strong { display: block; font-size: 15px; }
.invito span { font-size: 12.5px; opacity: .85; }
.invito button { flex: none; height: 42px; padding: 0 13px; border: 0; border-radius: 10px; background: #ffffff; color: var(--brand); font-weight: 700; font-size: 14px; }
.anni { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 10px; }
.anni button { flex: none; height: 38px; padding: 0 15px; border: 1px solid var(--line2); border-radius: 999px; background: var(--surface); color: var(--ink); font-weight: 700; font-size: 14.5px; }
.anni button.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.lista { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.riga { display: flex; align-items: center; gap: 12px; padding: 11px 10px 11px 14px; border-bottom: 1px solid var(--line); }
.riga:last-child { border-bottom: 0; }
.riga .ico { width: 38px; height: 38px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.riga .ico svg { width: 20px; height: 20px; }
.riga .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.riga .et { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.riga .ti { font-size: 15.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.riga .so { font-size: 12.5px; color: var(--muted); }
.riga .nu { flex: none; font-size: 10.5px; font-weight: 800; letter-spacing: 0; color: var(--brand); background: var(--brand-soft); border-radius: 999px; padding: 1px 7px; }
.dl { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--line2); border-radius: 12px; background: var(--surface); color: var(--brand); }
.dl svg { width: 21px; height: 21px; }
.dl[disabled] { opacity: .5; }
.vuoto { border: 1px dashed var(--line2); border-radius: 12px; padding: 14px; color: var(--muted); font-size: 14px; text-align: center; }
.sez { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 16px 2px 8px; font-weight: 700; }
.card h4 { margin: 0 0 11px; font-size: 16px; }
.due { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.due .field { margin-bottom: 8px; }
.aiuto { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.periodo { display: flex; align-items: center; gap: 10px; padding: 11px 8px 11px 13px; border-radius: 12px; margin-bottom: 8px; }
.periodo div { flex: 1; min-width: 0; }
.periodo strong { display: block; font-size: 15px; }
.periodo span { font-size: 13.5px; color: var(--ink); }
.togli { flex: none; width: 42px; height: 42px; border: 1px solid var(--line2); border-radius: 10px; background: #ffffff; color: #8e2f22; font-size: 22px; line-height: 1; }
.totali { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13.5px; font-weight: 700; margin: 4px 2px 12px; }
.prof { display: flex; align-items: center; gap: 12px; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 800; font-size: 18px; flex: none; }
.prof .n { font-weight: 800; font-size: 17px; }
.prof .s { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.chip { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); margin-top: 5px; }
.contatto { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.contatto:last-child { border-bottom: 0; }
.contatto .ico, .casa .ico { width: 38px; height: 38px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.contatto .ico svg, .casa .ico svg { width: 19px; height: 19px; }
.contatto .k { font-size: 12.5px; color: var(--muted); }
.contatto .v { font-weight: 700; }
.casa { display: flex; gap: 10px; align-items: flex-start; }
.casa small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.rapporto { padding: 4px 0; font-weight: 600; overflow-wrap: anywhere; }
.toast { position: absolute; left: 14px; right: 14px; bottom: calc(env(safe-area-inset-bottom, 0px) + 74px); background: var(--ink); color: #ffffff; border-radius: 12px;
  padding: 11px 14px; font-size: 13.5px; box-shadow: 0 6px 20px rgba(0, 0, 0, .2); z-index: 9; }

/* Home: benvenuto, meteo, rinnovo del servizio (anteprima 28/10/2026) */
.hero { display: flex; align-items: stretch; gap: 12px; padding: 16px; border-radius: 18px; margin: 4px 0 12px; color: #ffffff;
  background: linear-gradient(135deg, #1e5f5b 0%, #2b7c74 100%); box-shadow: var(--shadow); }
.hero-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hero-k { font-size: 14px; opacity: .85; }
.hero-n { font-size: 27px; font-weight: 800; line-height: 1.1; overflow-wrap: anywhere; }
.hero-d { font-size: 13px; opacity: .9; margin-top: 8px; }
.hero-r { font-size: 12.5px; opacity: .8; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meteo { flex: none; width: 98px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 8px 6px;
  border-radius: 14px; background: rgba(255, 255, 255, .14); text-align: center; }
.meteo svg { width: 34px; height: 34px; }
.meteo b { font-size: 23px; line-height: 1.1; }
.meteo span { font-size: 11.5px; line-height: 1.2; }
.meteo small { font-size: 10.5px; opacity: .8; }
.rinnovo { border-radius: 16px; padding: 14px; margin-bottom: 4px; background: var(--warn-soft); border: 1px solid #e2c48a; color: var(--warn); }
.rinnovo.scaduto { background: var(--danger-soft); border-color: #e3b0a6; color: var(--danger); }
.rinnovo .r-top { display: flex; gap: 11px; align-items: flex-start; }
.rinnovo .r-ico { width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .7); display: grid; place-items: center; flex: none; }
.rinnovo .r-ico svg { width: 21px; height: 21px; }
.rinnovo strong { display: block; font-size: 16px; }
.rinnovo p { margin: 3px 0 0; font-size: 13.5px; color: var(--ink); }
.paga { display: flex; align-items: center; justify-content: center; gap: 9px; height: 50px; margin-top: 12px; border-radius: 12px;
  background: var(--warn); color: #ffffff; font-weight: 800; font-size: 16px; text-decoration: none; }
.paga svg { width: 21px; height: 21px; }
.rinnovo.scaduto .paga { background: var(--danger); }
.rinnovo small { display: block; margin-top: 8px; font-size: 12px; color: var(--muted); }
.tutte { display: block; margin: 8px 2px 0 auto; padding: 4px 0; border: 0; background: none; color: var(--brand); font-weight: 700; font-size: 14px; }
.scorci { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.scorcio { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); box-shadow: var(--shadow); color: var(--ink); text-align: left; }
.scorcio .ico { width: 36px; height: 36px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 4px; }
.scorcio .ico svg { width: 19px; height: 19px; }
.scorcio b { font-size: 15px; }
.scorcio span { font-size: 12.5px; color: var(--muted); }
/* servizio scaduto: al datore la proposta di rinnovo, al lavoratore il messaggio */
.scad { text-align: center; padding: 20px 16px 16px; border-radius: 18px; background: var(--danger-soft); border: 1px solid #e3b0a6; color: var(--danger); }
.scad.grigio { background: var(--surface); border-color: var(--line); color: var(--ink); }
.scad-ico { width: 54px; height: 54px; margin: 0 auto 8px; border-radius: 16px; background: rgba(255, 255, 255, .75); display: grid; place-items: center; }
.scad.grigio .scad-ico { background: var(--grey-soft); color: var(--muted); }
.scad-ico svg { width: 27px; height: 27px; }
.scad h2 { margin: 0; font-size: 20px; }
.scad .scad-d { margin: 2px 0 10px; font-weight: 700; font-size: 14px; }
.scad p { margin: 6px 0 0; font-size: 14px; color: var(--ink); }
.scad .paga { background: var(--danger); }
.scad small { display: block; margin-top: 8px; font-size: 12px; color: var(--muted); }
.gia { margin-top: 10px; text-align: left; background: rgba(255, 255, 255, .7); border-radius: 12px; padding: 10px 12px; }
.gia summary { cursor: pointer; font-weight: 700; color: var(--ink); font-size: 14px; }
.gia p { font-size: 13.5px; }
/* rinnovo con pagamento online: pulsante e esito al ritorno da SumUp (29/10/2026) */
button.paga { width: 100%; border: 0; }
.paga:disabled { opacity: .7; cursor: default; }
.esito { display: flex; gap: 11px; align-items: flex-start; border-radius: 16px; padding: 13px 8px 13px 14px; margin: 0 0 10px; border: 1px solid; }
.esito.ok { background: var(--ok-soft); border-color: #b9d6d0; color: var(--ok); }
.esito.attesa { background: var(--warn-soft); border-color: #e2c48a; color: var(--warn); }
.esito.no { background: var(--danger-soft); border-color: #e3b0a6; color: var(--danger); }
.e-ico { width: 38px; height: 38px; border-radius: 12px; background: rgba(255, 255, 255, .7); display: grid; place-items: center; flex: none; }
.e-ico svg { width: 22px; height: 22px; }
.e-tx { flex: 1; min-width: 0; }
.e-tx strong { display: block; font-size: 15.5px; }
.e-tx p { margin: 3px 0 0; font-size: 13.5px; color: var(--ink); }
.e-x { flex: none; width: 30px; height: 30px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 21px; line-height: 1; }
.meteo .fonte { font-size: 9px; font-style: normal; opacity: .7; margin-top: 1px; }
.crediti { font-size: 11.5px; color: var(--muted); text-align: center; margin: 16px 0 4px; line-height: 1.5; }
.crediti a { color: inherit; }
