diff --git a/app.html b/app.html
index 0d5dc80..1b3ae0f 100644
--- a/app.html
+++ b/app.html
@@ -99,9 +99,9 @@ function saveA(d){localStorage.setItem("pab_audits",JSON.stringify(d))}
function saveU(d){localStorage.setItem("pab_users",JSON.stringify(d))}
// Supabase sync — фоном, не ломает вкладки
-function sbSyncAll(){sbPullUsers();sbPullAudits()}
-function sbPullUsers(){fetch(SBU+"/rest/v1/users?select=*",{headers:{"apikey":SBK,"Authorization":"Bearer "+SBK}}).then(function(r){return r.json()}).then(function(d){var um=getU();d.forEach(function(x){if(!um[x.login])um[x.login]={pass:x.pass,name:x.name,email:x.email,role:x.role,freq:x.freq,branch:x.branch,dept:x.dept,region:x.region,oblast:x.oblast,city:x.city}});saveU(um)}).catch(function(){})}
-function sbPullAudits(){fetch(SBU+"/rest/v1/audits?select=*&order=created_at.desc",{headers:{"apikey":SBK,"Authorization":"Bearer "+SBK}}).then(function(r){return r.json()}).then(function(d){var am=[],ca=getA();d.forEach(function(x){am.push({id:x.id,number:x.number,date:x.date,location:x.location,region:x.region,workType:x.work_type,workerCount:x.worker_count,observer:x.observer,observerRole:x.observer_role,overallSafe:x.overall_safe,categories:x.categories,totalViolations:x.total_violations,dialogue:x.dialogue,photos:x.photos,docs:x.docs,createdBy:x.created_by,createdAt:x.created_at})});ca.forEach(function(a){var found=false;am.forEach(function(b){if(b.id===a.id)found=true});if(!found)am.push(a)});saveA(am)}).catch(function(){})}
+function sbSyncAll(){return Promise.all([sbPullUsers(),sbPullAudits()])}
+function sbPullUsers(){return fetch(SBU+"/rest/v1/users?select=*",{headers:{"apikey":SBK,"Authorization":"Bearer "+SBK}}).then(function(r){return r.json()}).then(function(d){var um=getU();d.forEach(function(x){if(!um[x.login])um[x.login]={pass:x.pass,name:x.name,email:x.email,role:x.role,freq:x.freq,branch:x.branch,dept:x.dept,region:x.region,oblast:x.oblast,city:x.city}});saveU(um)}).catch(function(){})}
+function sbPullAudits(){return fetch(SBU+"/rest/v1/audits?select=*&order=created_at.desc",{headers:{"apikey":SBK,"Authorization":"Bearer "+SBK}}).then(function(r){return r.json()}).then(function(d){var am=[],ca=getA();d.forEach(function(x){am.push({id:x.id,number:x.number,date:x.date,location:x.location,region:x.region,workType:x.work_type,workerCount:x.worker_count,observer:x.observer,observerRole:x.observer_role,overallSafe:x.overall_safe,categories:x.categories,totalViolations:x.total_violations,dialogue:x.dialogue,photos:x.photos,docs:x.docs,createdBy:x.created_by,createdAt:x.created_at})});ca.forEach(function(a){var found=false;am.forEach(function(b){if(b.id===a.id)found=true});if(!found)am.push(a)});saveA(am)}).catch(function(){})}
function sbPushAudit(e){fetch(SBU+"/rest/v1/audits",{method:"POST",headers:{"apikey":SBK,"Authorization":"Bearer "+SBK,"Content-Type":"application/json","Prefer":"resolution=merge-duplicates"},body:JSON.stringify({id:e.id,number:e.number,date:e.date,location:e.location,region:e.region,work_type:e.workType,worker_count:e.workerCount,observer:e.observer,observer_role:e.observerRole,overall_safe:e.overallSafe,categories:e.categories,total_violations:e.totalViolations,dialogue:e.dialogue,photos:e.photos,docs:e.docs,created_by:e.createdBy,created_at:e.createdAt})}).catch(function(){})}
function sbPushUser(login,data){fetch(SBU+"/rest/v1/users",{method:"POST",headers:{"apikey":SBK,"Authorization":"Bearer "+SBK,"Content-Type":"application/json","Prefer":"resolution=merge-duplicates"},body:JSON.stringify({login:login,pass:data.pass,name:data.name,email:data.email,role:data.role,freq:data.freq,branch:data.branch,dept:data.dept,region:data.region,oblast:data.oblast,city:data.city})}).catch(function(){})}
@@ -129,7 +129,12 @@ function showPanel(n){
["NA","MS","DB","VL","HS"].forEach(function(id){document.getElementById("pn"+id).classList.remove("ac")});
document.getElementById("pn"+n).classList.add("ac");
document.querySelectorAll("nav a").forEach(function(a){a.classList.toggle("ac",a.getAttribute("onclick").indexOf("'"+n+"'")>=0)});
+ // Сразу рендерим из localStorage (быстро)
if(n==="MS")rMS();if(n==="DB")rDB();if(n==="VL")rVL();if(n==="HS")rHS();
+ // Потом синхронизируемся с Supabase и обновляем
+ sbSyncAll().then(function(){
+ if(n==="MS")rMS();if(n==="DB")rDB();if(n==="VL")rVL();if(n==="HS")rHS();
+ });
}
function doLogout(){sessionStorage.removeItem("pab_user");location.href="index.html"}