*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:system-ui,-apple-system,Segoe UI,sans-serif;
  background:#f4f6ff;
  color:#111;
}
a{text-decoration:none;color:inherit}
button{font-family:inherit}

.topbar{
  position:sticky;
  top:0;
  z-index:1000;
  height:56px;
  background:#1565C0;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 14px;
  box-shadow:0 2px 10px rgba(0,0,0,.08);
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:800;
  font-size:18px;
  min-width:0;
}

.brand span{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.topbar-right{
  display:flex;
  align-items:center;
  gap:10px;
  flex-shrink:0;
}

.header-profile img{
  width:36px;
  height:36px;
  border-radius:50%;
  object-fit:cover;
  border:2px solid #fff;
  display:block;
}

.menu-btn{
  background:none;
  border:0;
  color:#fff;
  font-size:22px;
  cursor:pointer;
  padding:4px 8px;
}

.bell-btn{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:38px;
  height:38px;
  border-radius:50%;
  background:rgba(255,255,255,.10);
}

.bell-icon{
  display:inline-block;
  line-height:1;
  font-size:21px;
}

.bell-status{
  position:absolute;
  top:6px;
  right:6px;
  width:12px;
  height:12px;
  border-radius:50%;
  border:2px solid #1565C0;
  box-shadow:0 0 0 1px rgba(255,255,255,.15);
}

.bell-on{
  background:#19c15f;
}

.bell-off{
  background:#e53935;
}
.bell-default{
  background:#f59e0b;
}
.drawer-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.45);
  opacity:0;
  visibility:hidden;
  transition:.25s;
  z-index:1999;
}

.drawer{
  position:fixed;
  right:-85%;
  top:0;
  width:78%;
  max-width:360px;
  height:100vh;
  background:#fff;
  z-index:2000;
  transition:.25s;
  border-radius:18px 0 0 18px;
  overflow-y:auto;
  box-shadow:-10px 0 30px rgba(0,0,0,.12);
}

body.drawer-open .drawer{right:0}
body.drawer-open .drawer-overlay{
  opacity:1;
  visibility:visible;
}

.drawer-head{
  padding:14px 16px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  background:#f4f6ff;
  font-weight:800;
  font-size:22px;
  position:sticky;
  top:0;
  z-index:2;
}

.drawer-head button{
  border:1px solid #ddd;
  background:#fff;
  border-radius:8px;
  width:38px;
  height:38px;
  cursor:pointer;
  font-size:18px;
}

.drawer-body{padding:14px}

.drawer-btn{
  display:block;
  width:100%;
  padding:12px 14px;
  margin-bottom:10px;
  border:1px solid #e0e6ff;
  border-radius:14px;
  background:#fff;
  font-weight:700;
  font-size:15px;
  line-height:1.35;
  text-align:left;
  cursor:pointer;
}

.container{
  max-width:1100px;
  margin:auto;
  padding:12px;
  padding-bottom:100px;
}

#pushPopup{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.45);
  z-index:99999;
  align-items:center;
  justify-content:center;
  padding:18px;
  overflow:auto;
}

#pushPopup.active{display:flex}

.drawer[hidden],
.drawer-overlay[hidden],
#pushPopup[hidden]{
  display:none !important;
}

.push-modal{
  width:100%;
  max-width:420px;
  max-height:90vh;
  overflow-y:auto;
  background:#fff;
  border-radius:18px;
  padding:20px;
  box-shadow:0 10px 30px rgba(0,0,0,.18);
  text-align:left;
  color:#111;
}

#categoryCheckboxWrap{
  display:grid;
  gap:12px;
}

.push-cat-row{
  display:grid;
  grid-template-columns:26px 1fr;
  align-items:center;
  gap:12px;
  color:#111;
  font-size:16px;
  font-weight:700;
  line-height:1.35;
}

.push-cat-row input[type="checkbox"]{
  width:20px;
  height:20px;
  margin:0;
  accent-color:#1565C0;
  cursor:pointer;
}

.push-cat-text{
  display:flex;
  align-items:center;
  gap:10px;
  color:#111;
  word-break:break-word;
}

#pushDeniedMsg,
#pushStatusMsg{
  display:none;
  margin:12px 0 0;
  font-size:14px;
  text-align:center;
  line-height:1.5;
}

#pushDeniedMsg{
  color:#c62828;
}

#pushStatusMsg{
  color:#177a35;
}

.push-progress-wrap{
  margin-top:14px;
}

.push-progress-text{
  font-size:14px;
  color:#1565C0;
  margin-bottom:8px;
  text-align:left;
}

.push-progress-bar{
  width:100%;
  height:10px;
  background:#e8eefc;
  border-radius:999px;
  overflow:hidden;
  position:relative;
}

.push-progress-fill{
  position:absolute;
  top:0;
  left:0;
  width:35%;
  height:100%;
  background:#1565C0;
  border-radius:999px;
  animation:pushLoadingBar 1.1s linear infinite;
}

@keyframes pushLoadingBar{
  0%{ left:-35%; }
  100%{ left:100%; }
}

.global-form-loader{
  position:fixed;
  inset:0;
  background:rgba(255,255,255,0.88);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:100000;
  backdrop-filter:blur(2px);
}

.global-form-loader.show{
  display:flex;
}

.loader-box{
  background:#fff;
  padding:22px 26px;
  border-radius:18px;
  box-shadow:0 10px 30px rgba(0,0,0,0.12);
  text-align:center;
  min-width:180px;
}

.loader-spinner{
  width:46px;
  height:46px;
  border:4px solid #e5e7eb;
  border-top:4px solid #1565C0;
  border-radius:50%;
  margin:0 auto 12px;
  animation:spin .8s linear infinite;
}

.loader-text{
  font-size:15px;
  font-weight:600;
  color:#222;
}

body.form-loading{
  overflow:hidden;
}

@keyframes spin{
  100%{transform:rotate(360deg);}
}