#menuTrigger {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 1200;
  width: 50px;
  height: 50px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid rgba(10, 23, 48, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.97);
  color: #0a1730;
  box-shadow: 0 8px 24px rgba(10, 23, 48, 0.18);
  cursor: pointer;
}

#menuTrigger span {
  width: 21px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

#drawerOverlay {
  position: fixed;
  inset: 0;
  z-index: 1201;
  background: rgba(10, 18, 32, 0.48);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

#drawerOverlay.open {
  opacity: 1;
  pointer-events: auto;
}

#drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 1202;
  width: min(380px, 88vw);
  overflow-y: auto;
  padding: 28px 24px;
  background: #fff;
  color: #111827;
  box-shadow: -16px 0 48px rgba(0, 0, 0, 0.2);
  transform: translateX(105%);
  transition: transform 0.25s ease;
}

#drawer.open { transform: translateX(0); }

#drawer .drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

#drawer .drawer-title { font-size: 1.15rem; font-weight: 800; }

#drawer .drawer-close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: #f1f3f6;
  color: #172033;
  font-size: 1.35rem;
  cursor: pointer;
}

#drawer .drawer-nav { display: grid; gap: 6px; }
#drawer .drawer-nav a,
#drawer .drawer-nav button {
  display: block;
  width: 100%;
  padding: 13px 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #172033;
  text-align: left;
  text-decoration: none;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
}

#drawer .drawer-nav a[aria-current="page"] { background: #edf1f6; color: #0a1730; }
#drawer .drawer-nav a:hover,
#drawer .drawer-nav button:hover { background: #f1f4f7; }
#drawer .drawer-nav .drawer-separator { height: 1px; margin: 8px 0; background: #e7eaf0; }
#drawer .drawer-nav .drawer-logout { color: #a62937; }

@media (max-width: 520px) {
  #menuTrigger { top: 12px; right: 12px; width: 46px; height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  #drawer, #drawerOverlay { transition: none; }
}
