/* v76: strict scroll/layout repair. Does not touch employee/pointage logic. */
:root{--v76-sidebar:238px;}

/* PUBLIC WEBSITE: never lock the page scroll */
html,body{max-width:100%;}
body:not(.admin-body){height:auto!important;min-height:100%!important;overflow-x:hidden!important;overflow-y:auto!important;position:static!important;}
body:not(.admin-body) main{height:auto!important;min-height:0!important;overflow:visible!important;display:block!important;}
body:not(.admin-body) .top, body:not(.admin-body) .mobile-pro-header{flex-shrink:0!important;}
body:not(.admin-body) .mobile-drawer{overflow-y:auto!important;}
body:not(.admin-body).menu-open{overflow:hidden!important;}

/* DESKTOP ADMIN: left sidebar fixed, only the right panel scrolls */
@media (min-width:981px){
  body.admin-body{height:100vh!important;min-height:100vh!important;overflow:hidden!important;background:#f3f6fb!important;}
  body.admin-body .admin-shell{display:grid!important;grid-template-columns:var(--v76-sidebar) minmax(0,1fr)!important;width:100%!important;height:100vh!important;min-height:100vh!important;overflow:hidden!important;margin:0!important;}
  body.admin-body .sidebar{position:sticky!important;left:0!important;top:0!important;width:var(--v76-sidebar)!important;max-width:var(--v76-sidebar)!important;height:100vh!important;min-height:100vh!important;overflow-y:auto!important;overflow-x:hidden!important;z-index:20!important;transform:none!important;margin:0!important;}
  body.admin-body .admin-main{display:block!important;margin:0!important;width:100%!important;min-width:0!important;height:100vh!important;min-height:100vh!important;overflow-y:auto!important;overflow-x:hidden!important;padding:16px 18px!important;background:#f3f6fb!important;}
}

/* MOBILE ADMIN: real mobile-app layout, but body/page can scroll */
@media (max-width:980px){
  html,body.admin-body{height:auto!important;min-height:100dvh!important;width:100%!important;overflow-x:hidden!important;overflow-y:auto!important;position:static!important;background:#f3f6fb!important;}
  body.admin-body .admin-shell{display:block!important;height:auto!important;min-height:100dvh!important;width:100%!important;overflow:visible!important;margin:0!important;padding:0!important;}
  body.admin-body .admin-main{display:block!important;margin:0!important;width:100%!important;max-width:100%!important;height:auto!important;min-height:100dvh!important;overflow:visible!important;overflow-x:hidden!important;padding:10px!important;background:#f3f6fb!important;}

  body.admin-body .sidebar{position:fixed!important;top:0!important;left:-288px!important;bottom:auto!important;width:278px!important;max-width:86vw!important;height:100dvh!important;overflow-y:auto!important;overflow-x:hidden!important;z-index:10020!important;background:#0f172a!important;transition:left .22s ease!important;transform:none!important;box-shadow:18px 0 45px rgba(2,6,23,.28)!important;}
  body.admin-body.sidebar-open .sidebar{left:0!important;}
  body.admin-body.sidebar-open::after{content:""!important;position:fixed!important;inset:0!important;background:rgba(2,6,23,.46)!important;z-index:10010!important;}
  body.admin-body.sidebar-open{overflow:hidden!important;}

  body.admin-body .admin-menu-toggle{display:inline-flex!important;align-items:center!important;justify-content:center!important;cursor:pointer!important;touch-action:manipulation!important;position:relative!important;z-index:1000!important;}
  body.admin-body .pro-admin-top, body.admin-body .admin-top{position:sticky!important;top:8px!important;z-index:900!important;display:grid!important;grid-template-columns:1fr!important;gap:8px!important;overflow:visible!important;margin:0 0 12px!important;}
  body.admin-body .top-title-wrap{display:grid!important;grid-template-columns:40px minmax(0,1fr) auto!important;align-items:center!important;gap:8px!important;width:100%!important;min-width:0!important;}
  body.admin-body .top-title-wrap h1{font-size:16px!important;line-height:1.1!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;min-width:0!important;margin:0!important;}
  body.admin-body .title-site-link{height:34px!important;min-height:34px!important;padding:0 10px!important;border-radius:9px!important;font-size:10.5px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;white-space:nowrap!important;margin:0!important;}

  body.admin-body .admin-top-actions{display:grid!important;grid-template-columns:repeat(3,36px) minmax(0,1fr)!important;gap:6px!important;width:100%!important;align-items:center!important;}
  body.admin-body .admin-top-actions .notif{width:36px!important;min-width:36px!important;height:34px!important;padding:0!important;border-radius:9px!important;display:flex!important;align-items:center!important;justify-content:center!important;}
  body.admin-body .admin-top-actions .lang-switch-clean{grid-column:4!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:3px!important;width:100%!important;min-width:0!important;height:34px!important;padding:3px!important;border-radius:9px!important;overflow:hidden!important;background:#f1f5f9!important;border:1px solid #dce6f1!important;}
  body.admin-body .admin-top-actions .lang-switch-clean a{min-width:0!important;width:100%!important;height:26px!important;padding:0 3px!important;font-size:9.5px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:2px!important;}
  body.admin-body .admin-user-card{grid-column:1/-1!important;width:100%!important;height:52px!important;min-height:52px!important;display:grid!important;grid-template-columns:36px minmax(0,1fr) 22px!important;align-items:center!important;gap:8px!important;overflow:hidden!important;border-radius:11px!important;}

  body.admin-body .admin-card, body.admin-body .card, body.admin-body .panel-card{max-width:100%!important;overflow-x:hidden!important;}
  body.admin-body .table-wrap, body.admin-body .table-responsive{max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch!important;}
  body.admin-body table.table, body.admin-body .table{max-width:100%!important;}
}

@media (max-width:380px){
  body.admin-body .admin-top-actions{grid-template-columns:repeat(3,34px) minmax(0,1fr)!important;gap:5px!important;}
  body.admin-body .admin-top-actions .notif{width:34px!important;min-width:34px!important;}
  body.admin-body .title-site-link{font-size:9px!important;padding:0 7px!important;}
}
