/* Le Mie Ore — Build 58 TEST. Solo presentazione: accesso e riepilogo. */
@media screen and (max-width:760px){
  /* L'area accesso non può trascinare la pagina esterna. Campi di recupero e tastiera
     restano raggiungibili mediante scorrimento nel solo riquadro se necessario. */
  html:has(body.v58-auth-active){height:100%;overflow:hidden!important;overscroll-behavior:none}
  body.v58-auth-active{position:fixed!important;inset:0!important;width:100%!important;
    height:var(--v58-viewport-height,100dvh)!important;max-height:var(--v58-viewport-height,100dvh)!important;
    overflow:hidden!important;overscroll-behavior:none;touch-action:manipulation}
  body.v58-auth-active>header,body.v58-auth-active>footer{display:none!important}
  body.v58-auth-active>main{display:flex!important;align-items:center!important;justify-content:center!important;
    width:100%;max-width:100%!important;height:var(--v58-viewport-height,100dvh)!important;
    max-height:var(--v58-viewport-height,100dvh)!important;min-height:0!important;
    padding:calc(7px + env(safe-area-inset-top,0px)) calc(11px + env(safe-area-inset-right,0px))
            calc(8px + env(safe-area-inset-bottom,0px)) calc(11px + env(safe-area-inset-left,0px))!important;
    margin:0!important;overflow:hidden!important;overscroll-behavior:none;
  }
  body.v58-auth-active #authScreen{box-sizing:border-box;flex:0 1 auto;min-height:0;
    width:100%;max-width:420px!important;max-height:100%!important;
    margin:0 auto!important;padding:clamp(11px,2.8vw,17px)!important;
    border-radius:19px!important;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;
    background:var(--v24-cards,#fff)!important;color:var(--v24-card-text,#58394b)!important;
  }
  body.v58-auth-active #authScreen .brand{font-size:clamp(24px,6vw,31px)!important;line-height:1!important;margin:0 0 3px!important}
  body.v58-auth-active #authScreen h2{font-size:clamp(19px,5.5vw,23px)!important;line-height:1.16!important;margin:0 0 2px!important}
  body.v58-auth-active #authScreen>p.muted{text-align:center;font-size:11px!important;line-height:1.22!important;margin:4px 0 7px!important}
  body.v58-auth-active #authScreen .authswitch{gap:6px!important;margin:7px 0 8px!important}
  body.v58-auth-active #authScreen .authswitch button{min-height:40px!important;padding:7px 8px!important;font-size:13px!important}
  body.v58-auth-active #authScreen label{font-size:12px!important;min-height:0!important;line-height:1.22!important;margin:6px 0 3px!important}
  body.v58-auth-active #authScreen input:not([type=checkbox]){min-height:41px!important;height:41px!important;
    padding:8px 10px!important;font-size:16px!important;margin:0 0 4px!important}
  body.v58-auth-active #authScreen .v18-password-line{margin:0 0 5px!important;gap:6px!important}
  body.v58-auth-active #authScreen .v18-eye{min-width:67px;min-height:41px!important;padding:7px 8px!important;font-size:12px!important}
  body.v58-auth-active #authScreen #authSubmit,
  body.v58-auth-active #authScreen #resetPassword,
  body.v58-auth-active #authScreen #demoLogin{min-height:40px!important;padding:8px 10px!important;font-size:13px!important;line-height:1.2!important}
  body.v58-auth-active #authScreen #resetPassword,
  body.v58-auth-active #authScreen #demoLogin{margin-top:7px!important}
  body.v58-auth-active #authScreen #authMessage{min-height:19px!important;font-size:11px!important;line-height:1.25!important;margin:6px 0 0!important;overflow-wrap:anywhere}
  body.v58-auth-active #authScreen #setupNotice{font-size:11px!important;padding:6px!important;margin:3px 0!important}
  body.v58-auth-active #authScreen .v17-recovery{margin:5px 0!important}
  body.v58-auth-active #authScreen .v17-recovery h3{font-size:16px!important;margin:4px 0!important}
  body.v58-auth-active #authScreen .v17-recovery button{min-height:39px!important;margin-top:5px!important;padding:7px 8px!important}
  body.v58-auth-active.v58-auth-keyboard>main{align-items:flex-start!important;padding-top:4px!important}
  body.v58-auth-active.v58-auth-keyboard #authScreen,
  body.v58-auth-active.v58-auth-recovery #authScreen{overflow-y:auto!important;-webkit-overflow-scrolling:touch}
}
@media screen and (max-width:760px) and (max-height:605px){
 body.v58-auth-active #authScreen{padding:9px 13px!important}
 body.v58-auth-active #authScreen .brand{font-size:23px!important}
 body.v58-auth-active #authScreen>p.muted{margin:3px 0 5px!important}
 body.v58-auth-active #authScreen .authswitch{margin:5px 0!important}
 body.v58-auth-active #authScreen label{margin:4px 0 2px!important}
 body.v58-auth-active #authScreen #resetPassword,body.v58-auth-active #authScreen #demoLogin{margin-top:4px!important}
 body.v58-auth-active #authScreen{overflow-y:auto!important}
}
/* Spazi ridotti senza nascondere dati o funzionalità. */
#summaryPage>.card:first-child{padding:clamp(9px,2.7vw,13px)!important}
#summaryPage>.card:first-child h2{margin:0 0 3px!important;font-size:19px!important}
#summaryPage .v58-summary-hint{margin:0 0 8px!important;font-size:11px!important;line-height:1.25!important}
#summaryPage .summary-filters{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:6px!important;align-items:end!important}
#summaryPage .summary-filters #monthSelector{grid-column:auto!important}
#summaryPage .summary-filters label{margin:0 0 3px!important;min-height:0!important;line-height:1.2!important;font-size:11px!important}
#summaryPage .summary-filters select{box-sizing:border-box;min-width:0!important;min-height:42px!important;
  padding:7px 5px!important;font-size:16px!important;max-width:100%!important}
#summaryPage #weekSelector{margin-top:6px!important}
#summaryPage #weekSelector label{margin:0 0 3px!important;font-size:11px!important}
#summaryPage #weekSelector select{font-size:16px!important;min-height:42px!important}
#summaryPage .summary-pdf-action{margin:7px 0 2px!important}
#summaryPage #summaryToPdf{min-height:38px!important;padding:6px 11px!important;font-size:12px!important}
#summaryPage #summary{margin:7px 0 6px!important;display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}
#summaryPage #summary>.stat{min-height:54px!important;max-width:100%;min-width:0;
  padding:7px 9px!important;display:flex;flex-direction:column;justify-content:space-between;gap:4px;
  border-radius:10px!important;overflow-wrap:anywhere}
#summaryPage #summary>.stat .muted{font-size:10.5px!important;line-height:1.2!important}
#summaryPage #summary>.stat strong{font-size:clamp(14px,4vw,19px)!important;line-height:1.15!important;
  margin:0!important;overflow-wrap:anywhere}
#summaryPage .v58-expand-stats{width:100%;min-height:39px;margin:1px 0 7px!important;
  border:1px solid var(--v24-primary,#e7c2d5);border-radius:10px;
  background:var(--v24-secondary,#fff0f7);color:var(--v24-card-text,#743b59);
  font-size:12px;padding:7px 10px}
@media screen and (max-width:760px){
 #summaryPage #summary:not(.v58-all-stats) .stat-action:not([data-stat-detail="hours"]):not([data-stat-detail="monthlyOvertime"]):not([data-stat-detail="yearOvertime"]):not([data-stat-detail="nightHours"]):not([data-stat-detail="ferie"]):not([data-stat-detail="workedDays"]):not([data-stat-detail="plannedHours"]):not([data-stat-detail="riposo"]){display:none!important}
}
#summaryPage .v58-disclosure{display:block;min-width:0;margin:6px 0!important;
  border:1px solid var(--v24-primary,#e7bed0)!important;border-radius:12px!important;
  background:var(--v24-cards,#fff9fc)!important;overflow:hidden}
#summaryPage .v58-disclosure>summary{display:flex;align-items:center;justify-content:space-between;
  list-style:none;cursor:pointer;min-height:43px;padding:9px 11px;font-size:13px;font-weight:750;
  color:var(--v24-card-text,#753c58);line-height:1.25}
#summaryPage .v58-disclosure>summary::-webkit-details-marker{display:none}
#summaryPage .v58-disclosure>summary::after{content:'⌄';font-size:18px;line-height:1;margin-left:8px;flex:none}
#summaryPage .v58-disclosure[open]>summary::after{content:'⌃'}
#summaryPage .v58-disclosure>summary:focus-visible{outline:2px solid var(--v24-primary,#b64f7b);outline-offset:-2px}
#summaryPage .v58-disclosure-body{min-width:0;padding:0 11px 11px;font-size:12px;overflow-wrap:anywhere}
#summaryPage .v58-disclosure-body p{font-size:11px;line-height:1.35;margin:5px 0}
#summaryPage .notes-summary{margin:6px 0!important;padding:0!important}
#summaryPage .notes-summary label{margin:3px 0 4px!important}
#summaryPage .notes-summary #notesSearch{font-size:16px!important;padding:8px 10px!important;min-height:42px}
#summaryPage #v22CustomSummary{padding:0!important;margin:5px 0!important}
#summaryPage .summary-detail:not([hidden]){margin:7px 0!important;padding:9px!important}
@media(max-width:350px){
 #summaryPage .summary-filters{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 #summaryPage .summary-filters #monthSelector{grid-column:1/-1!important}
}
@media screen and (min-width:761px){
 #summaryPage .v58-disclosure{border-radius:12px;border:1px solid var(--v24-primary,#e7bed0);margin:9px 0}
 #summaryPage .v58-disclosure>summary{list-style:none;cursor:pointer;padding:11px 14px;font-weight:700}
 #summaryPage .v58-disclosure>summary::-webkit-details-marker{display:none}
 #summaryPage .v58-disclosure-body{padding:4px 14px 13px}
 #summaryPage .v58-expand-stats{display:none}
}
@media print{
 body.v58-auth-active,body.v58-auth-active>main{position:static!important;height:auto!important;overflow:visible!important}
 #summaryPage #summary>.stat{display:block!important}
 #summaryPage #summary .stat-action{display:flex!important}
 #summaryPage .v58-expand-stats{display:none!important}
}
/* Night theme: do not let the light custom palette override the existing dark UI. */
body.v22-night.v58-auth-active #authScreen{
 background:#20242e!important;color:#f1e9f0!important;border-color:#414858!important;
}
body.v22-night #summaryPage .v58-disclosure{
 background:#20242e!important;border-color:#505064!important;
}
body.v22-night #summaryPage .v58-disclosure>summary{color:#f1d4e4!important}
body.v22-night #summaryPage .v58-expand-stats{
 background:#303541!important;color:#f8eaf2!important;border-color:#666074!important;
}
#summaryPage .v16-card.v58-disclosure{padding:0!important}
